{"version":3,"sources":["stores/lis-journal-store.js","stores/lis-print-store.js","lis-shared/tinymce/lineNumberPlugin.js","lis-shared/tinymce/copyHeadStylePlugin.js","lis-shared/tinymce/rejectedButtonPlugin.js","lis-shared/tinymce/agreedButtonPlugin.js","lis-shared/tinymce/createAmendmentPlugin.js","lis-admin/lis-version-management/components/lis-review.js","services/request.service.js","services/json-to-html.js","lis-admin/lis-version-management/components/lis-amendments.js","lis-admin/lis-version-management/components/lis-version-management.js","lis-admin/lis-version-management/components/lis-bill-grid.js","lis-admin/lis-version-management/components/lis-selectors.js","lis-admin/lis-version-management/components/lis-bill-preview.js","lis-admin/lis-version-management/components/lis-text-list.js","stores/lis-nav-store.js","stores/lis-session-store.js","lis-shared/lis-layout/components/lis-forms-component.js","lis-shared/tinymce/rightMarginPlugin.js","stores/lis-legislation-store.js","authConfig.js","stores/lis-auth-store.js","lis-shared/lis-login/components/lis-house-login-button.js","lis-shared/lis-login/components/lis-login-form.js","lis-shared/lis-layout/components/lis-house-logout-button.js","lis-shared/lis-layout/components/lis-profile-component.js","lis-shared/lis-layout/components/lis-submenu-component.js","lis-shared/lis-layout/components/lis-global-search-input-component.js","lis-shared/lis-layout/components/lis-nav-component.js","lis-shared/lis-layout/components/lis-session-selector.js","lis-shared/lis-layout/components/lis-popup-component.js","lis-shared/lis-layout/components/lis-toast-component.js","lis-shared/lis-layout/components/lis-icon-links-component.js","lis-shared/lis-layout/components/lis-layout-component.js","stores/lis-user-store.js","lis-shared/lis-login/components/lis-create-account-form.js","lis-shared/lis-login/components/lis-register-account-form.js","lis-shared/lis-login/components/lis-forgot-password-form.js","lis-shared/lis-login/components/lis-change-password-form.js","lis-admin/lis-member-management/components/lis-member-grid.js","lis-admin/lis-member-management/components/lis-contact-form.js","lis-admin/lis-member-management/components/lis-user-creation.js","lis-admin/lis-member-management/components/lis-member-form.js","lis-admin/lis-member-management/components/lis-member-management.js","lis-admin/lis-session-management/components/lis-session-grid.js","lis-admin/lis-session-management/components/lis-session-form.js","lis-admin/lis-session-management/components/lis-session-management.js","lis-admin/lis-committee-management/components/lis-committee-grid.js","lis-admin/lis-committee-management/components/lis-committee-personnel-dnd.js","lis-admin/lis-committee-management/components/lis-committee-members-dnd.js","lis-admin/lis-committee-management/components/lis-subcommittee-grid.js","stores/lis-personnel-store.js","lis-admin/lis-committee-management/components/lis-partner-committee-details.js","lis-admin/lis-committee-management/components/lis-committee-form.js","lis-admin/lis-committee-management/components/lis-committee-management.js","services/emptyCache.js","stores/lis-calendar-store.js","stores/lis-schedule-store.js","lis-admin/lis-docket-management/components/lis-docket-grid.js","lis-admin/lis-docket-management/components/lis-committee-bills-grid.js","lis-shared/lis-dockets/lis-docket-details.js","lis-admin/lis-docket-management/components/lis-docket-patron-list.js","lis-admin/lis-docket-management/components/lis-docket-form.js","lis-admin/lis-docket-management/components/lis-docket-management.js","lis-admin/lis-calendar-management/components/lis-calendar-grid.js","lis-shared/lis-calendar/lis-agenda-items.js","lis-admin/lis-calendar-management/components/lis-house-bills-grid.js","services/csv.service.js","stores/lis-votes-store.js","stores/lis-patron-store.js","lis-shared/lis-bills/lis-bill-version-list.js","stores/lis-report-store.js","lis-public/components/lis-bill-search/lis-report-maker.js","lis-shared/lis-calendar/lis-calendar-details.js","lis-shared/lis-calendar/lis-calendar-details-printout.js","lis-admin/lis-calendar-management/components/lis-house-calendar-form.js","lis-admin/lis-calendar-management/components/lis-senate-bills-grid.js","lis-admin/lis-calendar-management/components/lis-senate-calendar-form.js","lis-admin/lis-calendar-management/components/lis-calendar-form-container.js","lis-admin/lis-calendar-management/components/lis-calendar-management.js","stores/lis-minutes-store.js","lis-admin/lis-minutes-management/components/lis-minutes-grid.js","lis-shared/lis-layout/components/lis-loader-component.js","lis-admin/lis-minutes-management/components/forms/misc.js","services/event-references-helpers.js","lis-admin/lis-minutes-management/components/input-types.js","lis-admin/lis-minutes-management/components/forms/comment-box.js","lis-admin/lis-minutes-management/components/forms/non-legislative-form.js","lis-admin/lis-minutes-management/components/forms/legislative-form.js","lis-shared/lis-minutes/lis-minutes-details.js","stores/lis-communications-store.js","lis-admin/lis-minutes-management/components/lis-minutes-form.js","lis-admin/lis-minutes-management/components/lis-minutes-management.js","lis-admin/lis-bill-management/components/event-controls.js","lis-shared/lis-search/lis-search-categories.js","lis-shared/lis-search/lis-advanced-search-box.js","lis-shared/lis-search/lis-search-selections.js","lis-public/components/lis-bill-details/lis-history-form.js","lis-shared/lis-search/lis-legislation-watchlists.js","lis-shared/lis-search/lis-collection-controls.js","stores/lis-collection-store.js","lis-shared/lis-search/lis-bill-info.js","lis-admin/lis-bill-management/components/lis-bill-management.js","lis-admin/lis-communications-management/components/lis-communications-grid.js","images/houseclerk_paulnardo.png","lis-shared/lis-communications/lis-communications-details.js","images/senateclerk_susanclarkeschaar.png","lis-admin/lis-communications-management/components/lis-bills-grid.js","lis-admin/lis-communications-management/components/lis-communications-form.js","lis-admin/lis-communications-management/components/lis-communications-management.js","lis-admin/lis-vote-management/components/lis-vote-grid.js","lis-shared/lis-votes/lis-vote-details.js","lis-admin/lis-vote-management/components/lis-vote-form.js","lis-admin/lis-vote-management/components/lis-vote-management.js","lis-admin/lis-print-management/components/lis-print-room-grid.js","lis-admin/lis-print-management/components/lis-print-management.js","lis-admin/lis-report-management/components/lis-report-management.js","lis-admin/lis-amendment-management/components/lis-bill-grid.js","lis-admin/lis-amendment-management/components/lis-selectors.js","lis-admin/lis-amendment-management/components/lis-amendment-management.js","lis-admin/lis-admin-dashboard/components/lis-admin-dashboard.js","lis-admin/lis-notifications-management/components/lis-notification-management.js","stores/lis-developers-store.js","lis-admin/lis-partner-management/components/lis-partner-grid.js","lis-admin/lis-partner-management/components/lis-partner-form.js","lis-admin/lis-partner-management/components/lis-partner-management.js","lis-admin/lis-user-management/components/lis-user-management.js","lis-public/components/lis-home/lis-public-home-search.js","lis-public/components/lis-home/lis-public-home-resources.js","lis-public/components/lis-home/lis-public-home-session-info.js","lis-public/components/lis-home/lis-public-home-schedule.js","lis-public/components/lis-home/lis-public-message-of-the-day.js","lis-public/components/lis-home/lis-public-home.js","lis-public/components/lis-public-session-list.js","lis-public/components/lis-committee/lis-public-committee-list.js","lis-public/components/lis-committee/lis-public-committee-details.js","lis-public/components/lis-committee/lis-public-meeting-details.js","lis-public/components/lis-committee/lis-public-docket-details.js","lis-public/components/lis-committee/lis-public-committee-information.js","lis-public/components/lis-public-members-list.js","lis-public/components/lis-public-member-details.js","lis-shared/lis-search/lis-watchlist-notifications.js","lis-public/components/lis-bill-search/lis-search-help.js","lis-public/components/lis-bill-search/quick-add-bills.js","lis-public/components/lis-bill-search/lis-public-bill-search.js","lis-public/components/lis-bill-search/share-report.js","lis-public/components/lis-bill-search/lis-report-bill-search.js","lis-public/components/lis-bill-search/search-translator.js","lis-public/components/lis-bill-search/shorthand-url-translator.js","stores/lis-org-store.js","lis-public/components/lis-bill-details/lis-impact-statements.js","lis-public/components/lis-bill-details/collection-notes.js","lis-public/components/lis-bill-details/lis-public-bill-details.js","lis-public/components/lis-public-vote-details.js","lis-public/components/lis-public-data-files.js","lis-public/components/lis-public-communications.js","lis-public/components/lis-public-calendar-list.js","lis-public/components/lis-public-calendar-details.js","lis-public/components/lis-public-minutes.js","lis-public/components/lis-public-minutes-details.js","lis-admin/lis-update-patronage-modal.js","services/json-to-jsx.js","lis-public/components/lis-public-full-text.js","lis-shared/lis-custom-components/lis-custom-components.js","lis-shared/lis-meetings/lis-meetings-form-component.js","lis-shared/lis-meetings/lis-meetings-calendar-preview.js","lis-public/components/lis-public-schedule.js","lis-public/components/lis-public-vote-search.js","lis-public/components/lis-public-member-legislation.js","lis-public/components/lis-public-communication-details.js","stores/lis-statistics-store.js","lis-public/components/lis-committee-statistics.js","lis-public/components/lis-session-statistics.js","lis-public/components/lis-unauthorized.js","lis-public/components/lis-watchlists.js","lis-shared/lis-profile/components/lis-profile-form.js","lis-public/components/lis-privacy.js","lis-developers/public/components/lis-developers-portal.js","lis-developers/public/components/lis-document.js","lis-developers/public/components/lis-api-key-registration.js","lis-developers/public/components/lis-api-key-confirmation.js","lis-developers/public/components/lis-terms-of-service.js","lis-developers/admin/components/lis-admin-developers-portal.js","lis-developers/admin/components/lis-admin-document.js","lis-developers/admin/components/lis-admin-docs.js","lis-public/components/lis-footer.js","lis-admin/lis-configurations/lis-configurations-table.js","lis-admin/lis-configurations/lis-calendar-configurations.js","lis-admin/lis-configurations/lis-communications-configurations.js","lis-admin/lis-configurations/lis-configurations-grid.js","lis-admin/lis-configurations/lis-configurations-management.js","lis-admin/lis-journal-management/components/lis-journal-grid.js","lis-admin/lis-journal-management/components/lis-journal-details.js","lis-admin/lis-journal-management/forms/journal-vote.js","lis-admin/lis-journal-management/components/lis-journal-form.js","lis-admin/lis-journal-management/components/lis-journal-management.js","App.js","registerServiceWorker.js","configureStore.js","index.js","reducers.js","stores/lis-committee-store.js","stores/lis-members-store.js","lis-shared/lis-layout/components/lis-popout-component.js"],"names":["API_URL","window","env","API_SERVER","journalCategoryListRequest","journalCategoryListSuccess","journalCategoryListFailure","journalListRequest","journalListSuccess","journalListFailure","journalByIdRequest","journalByIdSuccess","journalByIdFailure","journalBuildSuccess","journalBuildFailure","journalGenerationSuccess","journalGenerationFailure","journalSaveSuccess","journalSaveFailure","journalDeleteSuccess","journalDeleteFailure","receiveCategoryData","receiveCategoryDataFailure","initialState","journalCategoryList","journalCategoryMessage","journalList","journalMessage","journalById","journalByIdMessage","journalBuild","journalBuildError","journalGeneration","journalGenerationError","journalSave","journalSaveError","categoryData","categoryDataError","journalDeleteError","journalActionCreators","requestJournalCategoryList","type","isFetching","receiveJournalCategoryList","list","message","journalCategoryListError","getJournalCategories","dispatch","partnerRequest","process","REACT_APP_JOURNAL_API_URL","then","result","Promise","reject","JournalCategoryTypes","map","x","label","Name","value","JournalCategoryTypeID","name","catch","err","requestJournalList","receiveJournalList","journalListError","getJournals","params","Journals","requestJournalById","receiveJournalById","journalByIdError","getJournalById","receiveJournalBuild","buildJournal","receiveJournalGeneration","bytes","generateJournal","config","method","headers","localStorage","getItem","url","fetch","a","status","body","getReader","read","error","JSON","parse","Buffer","from","buffer","toString","text","responseText","receiveJournalSave","saveJournal","responseObj","getCategoryData","decoder","TextDecoder","decode","receiveJournalDelete","deleteJournal","reducer","state","action","Object","assign","journalDelete","printDocumentsSuccess","printDocumentsFailure","printCreateSuccess","printCreateFailure","printSaveSuccess","printSaveFailure","printParchmentEmailSuccess","batchItemCompleteSuccess","batchItemCompleteFailure","printAllEnrolledSuccess","printAllEnrolledFailure","printDocuments","printDocumentsError","printCreate","printCreateError","printSave","printSaveError","printParchmentEmail","printParchmentEmailError","batchItemComplete","batchItemCompleteError","printAllEnrolledError","printActionCreators","receivePrintDocuments","resObj","getPrintDocuments","REACT_APP_PRINT_DOCUMENTS_SERVICE","PrintBatches","receivePrintCreate","createPrintDocument","receivePrintSave","savePrintDocument","receivePrintParchmentEmail","printParchmentemailError","printParchmentError","sendParchmentEmail","receiveBatchItemComplete","completeBatchItem","receivePrintAllEnrolled","printAllEnrolled","tinymce","PluginManager","add","editor","width","linePositions","bodyHeight","container","document","createElement","lineNumberContainer","on","_e","root","contentDocument","activeElement","scrollHeight","update","contentWindow","onscroll","scrollNumbers","style","margin","marginLeft","overflow","position","appendChild","contentAreaContainer","scrollTop","scrollY","childNodes","forEach","rootChild","clonedRootChild","cloneNode","insertBefore","oldDisplay","display","tagNewLines","removeChild","height","scrollingElement","bodyFontSize","getComputedStyle","getPropertyValue","innerText","beginDrawing","i","length","lineNumber","fontWeight","fontSize","top","node","oldLocation","atBillNumber","atGovernorsActions","child","includes","nodeName","testNode","nodeVal","nodeValue","innerHTML","replace","testChild","rect","getBoundingClientRect","location","bottom","push","parentNode","classList","head","querySelectorAll","element","newEl","attributes","rel","addedStyles","intialValue","hasFocus","e","points","elementsFromPoint","y","selection","select","collapse","getButton","buttonText","intialText","onAction","fire","toolbarKey","items","ui","registry","addMenuButton","callback","addNestedMenuItem","getSubmenuItems","addContextForm","scope","initValue","launch","commands","formApi","getValue","insertContent","hide","addButton","addMenuItem","selections","members","getParam","committees","addAmendmentCallback","userChamber","billNumber","allowGovernorAmendmentSponsor","amendmentOrigin","sponsor","member","committee","formItems","placeholder","unshift","concat","dialog","windowManager","open","initialPageConfig","setData","billnumber","toUpperCase","amendmentorigin","title","html","buttons","disabled","onChange","dialogApi","data","getData","enable","disable","details","redial","amendmentTypeDialog","versiontype","committeeAndMemberConfig","undefined","amendmenttype","previousValue","initialData","amendmentstobeinserted","class","isNaN","onSubmit","textToBeInserted","amendmentBuilder","endNode","getEnd","close","formData","amendmentsToBeInserted","parseInt","billNumberSection","titleSection","committeeSection","patronSection","lineSections","ReviewSection","props","selectedBillNumberIsLoaded","selectedSponsorIsLoaded","selectedMemberIsLoaded","selectedCommitteeIsLoaded","showLineNumbers","showTooltip","currentFormats","toggleShowLineNumbers","bind","toggleTooltip","setFormat","sessionId","this","setState","memberIsLoaded","actions","getMemberList","memberList","filter","m","ListDisplayName","ChamberCode","PatronDisplayName","membersCallback","finally","committeIsLoaded","getCommitteeList","committeeList","ParentCommitteeID","c","committeesCallback","committeeIsLoaded","content","handleEditorChange","wasEmpty","replaced","setWasEmpty","setReplaced","activeEditor","execCommand","setItem","getSelection","focusNode","parentElement","editorContent","versionAuthoring","loadCommittees","loadMembers","prevProps","selectedSponsor","selectedMember","selectedCommittee","className","Fragment","marginBottom","marginTop","onClick","stopPropagation","float","init","setup","addToggleButton","tooltip","bookmark","getBookmark","moveToBookmark","browser_spellcheck","plugins","allowAmendmentActions","toolbar","overrideRemoveAgreeRejectButtons","overrideRemoveCreateAmendmentButton","contextmenu","skin","paste_as_text","pasteAsText","valid_children","content_css","content_style","find","paste_word_valid_elements","paste_convert_word_fake_lists","paste_enable_default_filters","paste_data_images","paste_preprocess","plugin","args","table_default_attributes","border","formats","section","block","ldtitle","enactstatement","enactclause","catchline","rejected","i10","i0","i15","i20","customcenter","strikethrough","inline","end","textind","textbl","textbi","textasis","table","testc","tablec","tblhdn","tbllft","tblctr","tblrt","txtctr","drafter","billblank","pro","sumtext","lddata","ld","patctr","patalt","textrt","testhdrchar","texthdr","new","classes","style_formats","format","onEditorChange","reviewKey","React","Component","connect","bindActionCreators","committeeActionCreators","memberActionCreators","idToken","refreshToken","refreshTokenExpiration","claims","abortController","AbortController","signal","cancelRequest","abort","publicRequest","WebAPIKey","stringify","aborted","response","console","log","json","nonAbortable","checkToken","Authorization","FormData","token","jwtDecode","stringToken","exp","Date","getTime","getNewToken","resolve","rtoken","removeItem","user","roles","Claims","Roles","AccessToken","RefreshToken","mapJson","object","headerContent","id","nc","hierarchicalContent","nnc","nestedNestedContent","createTextNode","cssText","Style","Class","nestedContent","outerHTML","getHtml","jsonObject","AmendmentSection","shown","showAll","showInactiveAmendments","getAmendmentDescription","showAmendment","showAllAmendments","toggleInactiveAmendments","amendment","descriptionAndDisposition","Description","DocumentCode","TextDispositionID","TextDisposition","IsReprint","LDNumber","index","opposite","Array","amendments","fill","IsActive","backgroundColor","padding","checked","DraftText","renderHTML","VersionManagement","billFieldsetIsActive","amendmentFieldsetIsActive","reviewFieldsetIsActive","sessionOptions","legOptions","billVersionRef","selectedSession","selectedLegType","originalBillText","selectedBillText","selectedBillTextIndex","isLoaded","billList","selectedBill","billText","isPreviewVisible","processingFile","showPortal","billDataIsLoading","showCompletedItems","versionDate","moment","legDateOptions","selectedLegDate","selectedLegNum","showHeaders","previewContent","previewContentError","editorChanged","savedReviewContent","gettingIncompletePdf","showIncompletePdf","checkedBills","enrolledPrintQueue","useCurrentPublishDates","reviewContent","onReconvene","isDirty","showTextConfirmation","showBillConfirmation","changeCount","storedTextIndex","storedBill","storedBillIndex","sessionBillsList","checkAll","lastCheckedBills","amendmentRef","createRef","reviewRef","togglePreview","togglePortal","toggleFieldsetCollapse","handleSelectorChange","checkHandleSelectorChange","selectBill","selectBillIndex","checkBill","batchPublish","batchComplete","togglePublishDatePreference","handlePublishDateChange","toggleCompleteItems","handleSave","handleSaveCompletedItem","handleVersionDateChange","toggleHeaders","resetWarning","getJsonHeadersRequestString","getPreviewRequest","previewPdf","toggleReprint","filterReprints","setLegDateOptions","closeConfirmation","updateBillListByLegislationID","toggleCheckAll","pdfRef","isActive","reprintsFiltered","billTexts","val","newDraftText","previewRequest","doc","insertAdjacentHTML","docDivs","getElementsByTagName","j","docParagraphs","searchForLDTitleContainer","draftLDTitle","querySelector","DraftTitle","EditTitle","SessionCode","Chamber","LegislationChamberCode","VersionChamber","LegislationKey","LegislationNumber","substr","OnReconvene","LegislationClass","LegislationClassID","LegislationVersionID","getElementsByClassName","ReferredCommittee","split","trim","gettingCompletedItemPreview","previewPdfFile","src","bills","sasUrl","current","setAttribute","onload","getHtmlPreview","htmlPreview","locked","patronageInfo","textContent","htmlPreviewError","publish","isComplete","isSaving","customPublishDate","LegislationTextID","LegislationID","batchGenBillFile","SessionID","makeToast","IsPublic","newBillText","LegislationTextActionID","ModificationDate","IsComplete","HTMLFile","JSONFile","PDFFile","CandidateDate","LegislationVersion","subNumber","replaceAll","Sponsor","SponsorTypeID","CommitteeID","Patrons","CommitteeName","CommitteeNumber","VersionDate","removeAttribute","childNode","header","headerContainer","headerParagraphs","saveBillText","TextsList","billTextParams","getBillText","newbillTextList","priorBillText","findIndex","t","legFileGenParams","genBillFile","prevState","jsonPromise","bill","jsonHeadersRequestString","getJsonHeaders","jsonHeaders","LegislationTypeCode","applyPassageDates","HousePassageDate","SenatePassageDate","session","sessionList","SessionEvents","DisplayName","ActualDate","isSameOrBefore","headerDoc","SessionYear","isArray","all","replacement","paragraphs","legDates","isValid","sort","b","key","confirmed","storedKey","storedValue","showCategoryConfirmation","version","AuthoringLabel","getBillManagementList","getSessionBills","billManagementList","PendingChange","toLowerCase","legislationID","billListGetResponse","billListInState","associatedBillInStateIndex","associatedBillInGetResponse","updateDraftTextVersionDate","DOMParser","parseFromString","draftText","elements","billIndex","sbl","bt","billTextForReviewPane","target","href","confirm","click","billVersionDate","headerError","test","checkedBillsIndex","indexOf","splice","enrolledPrintQueueIndex","windowY","scrollTo","behavior","changingBillIndex","it","date","sessionBills","login","userClaims","legislationNumbers","LegislationNumbers","legislationTypeCode","housePassageDate","senatePassageDate","preDoc","preDocParagraphs","housePassage","senatePassage","legislationTextId","documentCode","overrideParam","getSessionShallowList","sessionShallowList","IsDefault","getBillVersionRef","billVersionsToUse","v","billVersionOptions","Resource","Scope","localeCompare","signedText","windowTitle","ref","paddingTop","trigger","componentRef","pageStyle","el","htmlFor","whiteSpace","scopes","marginRight","when","paddingBottom","billManagementListError","completedItems","legislationVersionID","verticalAlign","selected","legislationVersion","nav","billActionCreators","sessionActionCreators","navActionCreators","BillGridSection","selectedSessionBill","ldNumberSearch","searchingLDNumber","ldWarning","selectSessionBill","handleLdNumberSearchChange","searchByLDNumber","legislation","preventDefault","columns","Header","sortable","sortMethod","rowA","rowB","desc","legChamberA","legChamberB","legTypeA","legTypeB","filterable","accessor","Cell","original","to","row","patron","cursor","docCodeColumn","publishDateColumn","defaultChecked","billListIDs","left","classNamePrefix","options","sb","styles","provided","gridTemplateColumns","color","flex","right","readOnly","isClearable","resizable","loading","r","reactTable","minRows","defaultPageSize","pageSizeOptions","SelectorSection","handleSessionChange","handleLegTypeChange","handleLegDateChange","handleLegNumChange","isDisabled","selectedOption","triggeredAction","isSearchable","PreviewSection","Suffix","TextList","nonAmendments","originalIndex","showPageSizeOptions","showPagination","showPageJump","pageSize","getTrProps","_state","rowInfo","background","noDataText","previousLocationRequest","changeSessionRequest","makeToastRequest","toggleOverlayRequest","fileSuccess","fileFailure","reloadSessionSelectorChange","currentLocation","createBrowserHistory","previousLocation","toasts","hideSessionSelectorPaths","showOverlay","getPreviousLocation","changeSession","toggleOverlay","overlay","receiveFile","file","fileError","getFile","reloadSessionSelector","reload","getDefaultSessionAsyncRequest","getDefaultSessionAsyncSuccess","getDefaultSessionAsyncFailure","getSessionListRequest","getSessionListSuccess","getSessionListFailure","getSessionShallowListSuccess","getSessionShallowListFailure","getDefaultSessionSuccess","getSessionByIdRequest","getSessionByIdSuccess","getSessionByIdFailure","getSessionEventTypesRequest","getSessionEventTypesSuccess","getSessionEventTypesFailure","editSessionSuccess","editSessionFailure","createSessionSuccess","createSessionFailure","getSessionByCodeRequest","defaultSession","defaultSessionAsync","sessionListError","sessionEventTypes","sessionEvents","SessionType","SessionStart","BillCrossover","PrefileStart","BillCutoff","Adjournment","Reconvene","getSessionError","saveSession","saveSessionError","createSession","createSessionError","requestSessionEventTypes","receiveSessionEventTypes","sessionEventTypesError","getSessionEventTypes","SessionEventTypes","requestDefaultSessionAsync","receiveDefaultSessionAsync","defaultSessionAsyncError","getDefaultSessionAsync","receiveDefaultSession","sessiondata","setDefaultSession","defaultSessionObject","requestSessionList","receiveSessionList","getSessionList","year","Sessions","receiveSessionShallowList","sessionShallowListError","sessionShallowListMessage","requestSessionById","receiveSessionById","sessionByIdError","getSessionById","partner","sessionData","getSessionByCode","setSelectedSession","sessionObject","receiveEditSession","res","editSessionError","editSession","receiveCreateSession","defaultSessionAsyncMessage","sessionEventTypesMessage","errorMessage","InputFeedback","Label","children","originatingChamberOptions","sessionTypeOptions","stateOptions","customStyles","option","base","control","minHeight","menu","zIndex","singleValue","MenuList","maxHeight","initialOffset","itemCount","itemSize","initialScrollOffset","LargeListSelect","filterOption","createFilter","ignoreCase","ignoreAccents","matchFrom","components","Dropdown","multi","onBlur","TextInput","defaultValue","TextArea","legislationIdsListRequest","legislationIdsListSuccess","legislationIdsListFailure","billListByIdsRequest","billListByIdsSuccess","billListByIdsFailure","legislationTextsHitCountsRequest","legislationTextsHitCountsSuccess","legislationTextsHitCountsFailure","billListRequest","billListSuccess","billListFailure","mostFrequentBillListSuccess","mostFrequentBillListFailure","billSummaryRequest","billSummarySuccess","billSummaryFailure","saveBillSummaryRequest","saveBillSummarySuccess","saveBillSummaryFailure","billHistorySuccess","billHistoryFailure","billVersionRequest","billVersionSuccess","billVersionFailure","billNumbersSuccess","billNumbersFailure","legislationClassesSuccess","legislationClassesFailure","billStatusRefSuccess","billStatusRefFailure","billStatusCategoryRefSuccess","billStatusCategoryRefFailure","billEventRefSuccess","billEventRefFailure","legislationEventsByIdSuccess","legislationEventsByIdFailure","billTextSuccess","billTextFailure","ihodAmendmentSaveSuccess","ihodAmendmentSaveFailure","billVersionRefSuccess","billVersionRefFailure","sponsorRefListSuccess","sponsorRefListFailure","billSummaryRefSuccess","billSummaryRefFailure","batchPublishSuccess","batchPublishFailure","batchCompleteSuccess","batchCompleteFailure","billTextSaveSuccess","billTextSaveFailure","jsonHeadersSuccess","jsonHeadersFailure","pdfPreviewSuccess","pdfPreviewFailure","previewPdfFileSuccess","previewPdfFileFailure","htmlPreviewSuccess","htmlPreviewFailure","htmlFilePreviewSuccess","htmlFilePreviewFailure","billSaveSuccess","billSaveFailure","billFileGenSuccess","billFileGenFailure","batchBillFileGenSuccess","batchBillFileGenFailure","billManagementListSuccess","billManagementListFailure","sessionBillsSuccess","sessionBillsFailure","billEventsSuccess","billEventsFailure","billEventSaveSuccess","billEventSaveFailure","textListSuccess","textListFailure","subjectListSuccess","subjectListFailure","introDateListSuccess","introDateListFailure","legislationAmendmentListSuccess","legislationAmendmentListFailure","legislationDispositionsSuccess","legislationDispositionsFailure","legislationStatusHistorySuccess","legislationStatusHistoryFailure","deleteBlobFileSuccess","deleteBlobFileFailure","sasURLSuccess","sasURLFailure","billSuccess","billFailure","uploadImpactStatementRequest","legislationIdsList","legislationIdsListPagination","billListByIds","billListByIdsPagination","legislationTextsHitCounts","billListPagination","mostFrequentBillList","searchCriteria","billDetails","billsByMember","billHistory","billVersion","billNumbers","billSummary","billSummarySave","billVersionRefError","sponsorRefList","sponsorRefListError","billEventRef","billEventRefError","billTextError","batchPublishSave","batchPublishError","batchCompleteSave","batchCompleteError","billTextSave","billTextSaveError","jsonHeadersError","pdfPreview","pdfPreviewError","sasUrlError","htmlFilePreview","htmlFilePreviewError","billFileGen","billFileGenError","batchBillFileGen","batchBillFileGenError","billStatusReferences","legislationClasses","billStatusCategoryReferences","sessionBillsError","billEvents","billEventsError","billEventSave","billEventSaveError","textList","textListError","subjectList","subjectListError","introDateList","introDateListError","legislationAmendmentList","legislationAmendmentListError","legislationDispositions","legislationDispositionsError","legislationStatusHistory","legislationStatusHistoryError","sasURLLink","sasURLLinkError","billError","uploadImpactStatementResponse","uploadImpactStatementError","deleteBlobFileResponse","deleteBlobFileError","receiveBill","getBill","REACT_APP_LEGISLATION_API_URL","Legislations","receiveBillHistory","billHistoryError","getBillHistoryByBillID","LegislationEvents","requestBillVersion","receiveBillVersion","billVersionError","getBillVersionByBillNumber","LegislationsVersion","getBillVersionsByBillID","requestBillSummary","receiveBillSummary","billSummaryError","getBillSummary","SummaryList","LegislationSummaries","requestSaveBillSummary","receiveSaveBillSummary","saveBillSummaryError","saveBillSummary","receiveBillStatusRefs","billStatusRefsError","getBillStatusReferences","References","receiveLegislationClasses","legislationClassesError","getLegislationClasses","LegislationClasses","receiveBillStatusCategoryRefs","billStatusCategoryRefsError","getBillStatusCategoryReferences","LegislationCategoriesList","receiveBillEventRefs","billEventRefsError","getBillEventReferences","EventTypes","receiveLegislationEventsById","legislationEventsById","legislationEventsByIdError","getLegislationEventsByLegislationId","requestLegislationIdsList","receiveLegislationIdsList","pagination","FailureMessage","legislationIdsListError","getLegislationIdsList","get","requestBillListByIds","receiveBillListByIds","billListByIdsError","getBillListByIds","requestLegislationTextsHitCounts","receiveLegislationTextsHitCounts","legislationTextsHitCountsError","getLegislationTextsHitCounts","HitCounts","requestBillList","receiveBillList","billListError","getBillList","requestMostFrequentBillList","receiveMostFrequentBillList","mostFrequentBillListError","getMostFrequentBillList","receiveBillNumbers","billNumbersError","billNumberMessage","getBillNumbers","LegislationNumbersList","receiveBillVersionRef","LegislationVersionList","receiveSponsorRefList","getSponsorRefList","SponsorTypes","receiveBillSummaryRef","billSummaryRef","billSummaryRefError","getBillSummaryRef","SummaryVersions","receiveBillText","receiveBillTextSave","receiveIhodAmendmentSave","ihodAmendmentSave","ihodAmendmentSaveError","saveIhodAmendment","receiveBatchPublish","receiveCompletePublish","receiveJsonHeaders","receivePdfPreview","getPdfPreview","receivePreviewPdfFile","previewPdfFileError","sasUrlFailure","sasTokenUrl","receiveHtmlPreview","receiveHtmlFilePreview","getHtmlFilePreview","receiveBillSave","billSave","billSaveError","saveBill","receiveBillFileGen","receiveBatchBillFileGen","receiveBillManagementList","receiveSessionBills","receiveBillEvents","getBillEvents","receiveBillEventSave","saveBillEvent","receiveTextList","getTextList","LegislationTextList","receiveSubjectList","getSubjectList","REACT_APP_LEGISLATION_SUBJECT_SERVICE","SubjectsReference","subject","Subject","SubjectIndexID","receiveIntroDateList","getIntroDateList","LegislationDatesList","receiveLegislationAmendmentList","getLegislationAmendmentList","LegislationAmendmentList","receiveLegislationDispositions","getLegislationDispositions","TextDispositionList","receiveLegislationStatusHistory","getBillStatusHistory","LegislationsStatusHistory","receiveSasURL","sasURLError","getSasURL","uploadImpactStatement","append","receiveDeleteBlobFile","deleteBlobFileStatement","FilesDeleted","batchPublishSaveError","batchCompleteSaveError","msalConfig","auth","clientId","APP_ENV","authority","redirectUri","postLogoutRedirectUri","cache","cacheLocation","storeAuthStateInCookie","system","loggerOptions","loggerCallback","level","containsPii","LogLevel","Error","Info","info","Verbose","debug","Warning","warn","loginRequest","graphToken","loginSuccess","loginFailure","logoutSuccess","refreshTokenRequest","refreshTokenSuccess","refreshTokenFailure","houseLoginRequest","houseLoginSuccess","houseLoginFailure","decodedToken","jwtToken","userData","initials","chamber","email","resources","parsedToken","given_name","charAt","family_name","expr","isTokenExpired","parsedClaims","claimsObject","RoleName","authActionCreators","requestLogin","creds","initiateRedirect","receiveLogin","isAuthenticated","userProfile","loginError","loginUser","UserID","userId","Password","userPassword","GraphToken","requestLogout","receiveLogout","logoutUser","requestRefreshToken","receiveRefreshToken","refreshTokenError","refreshAccessToken","requestHouseLogin","receiveHouseLogin","houseLogin","authToken","expirationDate","HouseLoginButton","instance","useMsal","username","loginHint","loginRedirect","LoginForm","password","isSubmitting","checkForHouseDomain","handleChange","handleSubmit","userNameSplit","IsPasswordTemporaryOrExpired","history","failureMessage","failureCode","match","isSubmenu","autoFocus","onFocus","textDecoration","HouseLogoutButton","logoutRedirect","logout","Links","unsortedLinks","canAccessMemberMgmt","route","canAccessSessionMgmt","canAccessCommitteeMgmt","canAccessMinutesMgmt","canAccessDocketMgmt","canAccessBillMgmt","canAccessVersionMgmt","canAccessAmendmentMgmt","canAccessCommMgmt","canAccessCalendarMgmt","canAccessConfigurationsMgmt","canAccessJournalMgmt","canAccessVoteMgmt","canAccessPrintMgmt","canAccessMeetingsMgmt","canAccessPartnerMgmt","canAccessUserMgmt","canAccessBds","outside","link","idx","canAccessReportMgmt","canAccessSenateLinks","canAccessPatronStatusReport","isLoggedIn","canAccessWatchlists","UserProfile","tabIndexNum","targetFocus","slideout","slideoutToggle","isOpen","isAriaHidden","isAriaExpanded","isMenuVisible","permissions","focus","tabIndex","handleLogout","Boolean","p","bdsRole","Submenu","isAuth","SearchInputComponent","search","handleInputChange","event","getSessionPromise","pathname","regexResult","legNumbers","searchTerms","searchWithRemovedBillNumbers","resultIndex","param","selectedBillNumbers","selectedKeywords","btoa","queryString","collection","parsed","q","withRouter","NavMenu","showLogin","pathName","handleClick","handleClosingLoginOnOffClick","mousedownListener","addEventListener","removeEventListener","loginBox","profileLink","loginLink","contains","button","ProfileButton","LoginButton","isBillPath","transitionName","transitionEnterTimeout","transitionLeaveTimeout","Menu","borderRadius","menuList","indicatorSeparator","SessionSelector","HISTORICAL_DATA_REDIRECT","LegacySessionID","historicalSessionRedirect","redirect","substring","s","sessionListMessage","getSessions","reverse","overrideSession","newSession","path","RegExp","maxMenuHeight","getSelectedSessionLabel","Popup","componentWillUnmount","timerHandle","clearTimeout","closePopup","logOut","togglePopup","isIdle","setTimeout","ToastContainer","visible","dismiss","dismissed","long","Toast","item","IconLinks","budgetUrl","Layout","helpBanner","showPopup","popupMessage","dismissHelpBanner","logOutUser","contactReferencesSuccess","contactReferencesFailure","contactSaveSuccess","contactSaveFailure","personListSuccess","personListFailure","personSuccess","personFailure","personContactRequest","personContactSuccess","personContactFailure","userListSuccess","userListFailure","userSuccess","userFailure","userByEmailSuccess","userByEmailFailure","userSaveSuccess","userSaveFailure","userCreateSuccess","userCreateFailure","newUserCreateSuccess","newUserCreateFailure","personCreateSuccess","personCreateFailure","personSaveSuccess","personSaveFailure","dirListSuccess","dirListFailure","userRegisterSuccess","userRegisterFailure","userCreatePublicSuccess","userCreatePublicFailure","requestPasswordResetSuccess","requestPasswordResetFailure","passwordResetSuccess","passwordResetFailure","changePasswordSuccess","changePasswordFailure","contactReferences","contactReferencesError","contactSave","contactSaveError","userList","userListError","personList","personListError","personContact","userError","userByEmail","userByEmailError","personCreate","personCreateError","dirList","dirListError","userSave","userSaveError","userCreate","userCreateError","newUserCreate","newUserCreateError","userCreatePublic","userCreatePublicError","userRegister","userRegisterError","requestPasswordReset","requestPasswordResetError","passwordReset","passwordResetError","changePassword","changePasswordError","userActionCreators","receiveContactReferences","getContactReferences","ContactTypeReferences","receiveContactSave","saveContact","requestPersonContact","receivePersonContact","contact","personContactError","personConact","getPersonContact","receivePersonList","getPersonList","Persons","receivePerson","person","personError","getPerson","receiveUserList","getUserList","UserProfiles","receiveUser","userdata","getUser","receiveUserByEmail","userByEmaildata","getUserByEmail","receiveUserSave","userErrorSave","saveUser","receiveUserCreate","userErrorCreate","createUser","receiveNewUserCreate","newUserErrorCreate","createNewUser","receivePersonCreate","createPerson","receivePersonSave","personSave","personSaveError","savePerson","receiveDirList","getDirReferences","Directories","receiveRegisterUser","userErrorRegister","registerUser","receiveCreatePublicUser","userErrorCreatePublic","Value","startsWith","endsWith","createPublicUser","receiveRequestPasswordReset","receivePasswordReset","resetPassword","receiveChangePassword","calculateNumberOfCriteriaMet","criteriaMet","CreateAccount","firstname","lastname","passwordconfirm","showPassword","handleTextChange","toggleShowPassword","checkName","checkPassword","checkPasswordConfirm","toggleShowTooltip","handleClickOutside","createAccount","infoRef","infoButtonRef","nameError","showHelp","passwordError","currentpassword","passwordConfirmError","toolTip","isError","isCreating","FirstName","LastName","HashedWord","registerhash","accountCreated","users","passwordHelp","indicate","gridGap","autoComplete","emailRegex","RegisterAccount","checkEmail","registerAccount","emailError","encodeURIComponent","ForgotPassword","paswordResetRequested","houseDomains","senateDomains","legislativeDomains","ChangePassword","isChanging","confirmPassword","passwordChangeFinished","resettingPassword","emailaddress","newpassword","loginObj","emailAddress","resetHash","resethash","EmailAddress","passwordHasBeenResetCheckEmail","passwordistemporaryorexpired","passwordIsTemporaryOrExpired","emailSplit","MemberManagementGrid","searchFilter","handleFilterChange","filterData","formattedFilter","memberContacts","memberListContactData","MemberDisplayName","MemberNumber","getMemberListContact","checkedMembers","lineHeight","dropdownIndicator","ServiceEndDate","ServiceEndReason","headerClassName","expander","Expander","isExpanded","ContactInformation","MemberID","SubComponent","MemberInfo","contactIndex","ContactType","Address1","Address2","City","StateCode","ZipCode","PhoneNumber","contactList","contactOptions","removeContact","changeContact","Fields","addContact","UserForm","firstName","lastName","selectedDomain","handleDomainChange","userObj","LoginID","DomainName","DomainID","IdentityID","personData","domainOptions","toggleUserCreation","MemberManagementForm","userFieldsetIsActive","personalFieldsetIsActive","memberFieldsetisActive","memberData","chamberOptions","districtOptions","showUserCreation","statusOptions","showPersonCreation","memberNumberError","buildListDisplayName","handleMemberChange","handlePersonChange","handleContactChange","selectPerson","togglePersonCreation","selectUser","saveForm","getMemberData","listDisplayName","MiddleName","AlternateName","memberDisplayName","personObj","memberDataObject","fieldset","buildMemberDisplayName","stateVar","newMember","DistrictID","PartyCode","newMemberObj","sessionCode","buildPatronDisplayName","memberNumbers","createMember","memberCreate","fullName","FullName","rowIndex","saveMember","contactArray","contactObj","memberId","getMember","Person","getMemberNumbers","getPersonData","getDistricts","districtList","district","Title","getParties","getPartyCodeList","partyOptions","partyCodeList","party","getContactTypes","ContactTypeID","getStatuses","getMemberStatuses","memberStatuses","MemberStatusID","dir","PersonTable","selectedPersonIndex","handleSearchChange","formattedSearch","filteredPersonList","personIndex","PersonInformation","OwnerID","ContactInformationID","Prefix","OwnerTypeID","MemberInformation","invalidGabEmail","invalidGabPhone","markOverride","VotingSequence","SeatNumber","paddingLeft","ServiceBeginDate","GABEmailAddress","GABPhoneNumber","RoomNumber","CreateMember","EditMember","memberid","MemberManagement","exact","component","SessionGridComponent","filtered","currentYear","getFullYear","isCurrentBiennium","filterAll","defaultFilterMethod","onFilteredChange","Year","sessionStartObj","startDate","Filter","getProps","filterMethod","rows","yearfilter","defaultSorted","SessionManagementGrid","SessionForm","selectedSessionType","selectedSessionEventType","sessionEventData","handleEventChange","handleSessionEventTypeChange","handleCopyContinuedChange","addSessionDate","sessionCodeSuffix","romanize","Number","sessionTypeData","num","NaN","digits","String","roman","pop","join","copyContinuedLegislation","prefileDate","prefileDueDate","codeError","prefileDueDateError","prefileDateError","startDateError","displayNameError","initialSessionCode","CopyContinuedLegislation","EventTypeID","sessionEventsIsLoaded","sessionsAreLoaded","SessionTypeID","sessionHasBills","sessionBillsAreLoaded","filteredSessionEvents","eventData","eventIndex","SessionManagement","SessionManagementForm","CommitteeGridComponent","showCreateSuccess","showCreateFailure","isSubcommittee","disableChamberSelector","selectedError","currentDate","filterChamber","filterName","committeeNameInput","committeeNumberInput","committeeNameChange","committeeNumberChange","sendCreateDetails","getPartnerCommittees","houseScope","senateScope","committeeChamber","newCommittee","createNewCommittee","getCommittees","committeeName","committeeNumber","toggleChamber","tableData","partnerCommittees","partnerCommitteesError","createCommitteeMessage","committeePartnerListError","column","lowercaseRow","lowercaseFilter","CommitteeManagementGrid","getListStyle","isDraggingOver","SelectMenu","dropdown","dropdownData","isDuplicate","selectedPersonnel","handleDropDownChange","Email","onInsert","PersonnelDraggableComponent","personnel","personnelArray","Sequence","onDragEnd","staffRoleTypeID","EffectiveEndDate","AffiliationID","affiliation","StaffRoleTypeID","onPersonnelChange","rowID","tempArray","StaffID","destination","startIndex","endIndex","removed","reorder","source","keys","droppableId","snapshot","innerRef","draggableId","draggableProps","dragHandleProps","isDragging","draggableStyle","userSelect","pendingDeletion","onRemove","dropdownDataMembers","dropdownDataRoles","handleRolesDropDownChange","Seniority","handleSeniorityChange","handleEditVotingSequence","AssignDate","handleDateChange","popperPlacement","filterDate","isValidTerminationDate","placeholderText","MembersDraggableComponent","DisplaySequence","role","selectedRole","CommitteeRoleID","membersDropdown","RemoveDate","onMemberChange","newItems","memberRole","valObj","isPendingAdd","toggleInput","memberSeniority","memberVotingSequence","memberAssignDate","memberRemoveDate","tempValue","stateName","roleID","memberRoleEditStyle","sortByVotingSequence","handleEditRoles","handleSaveRoles","getCommitteeRoleName","handleEditSeniority","handleSaveSeniority","handleSaveVotingSequence","handleEditAssignDate","handleSaveAssignDate","handleEditRemoveDate","maxDate","handleSaveRemoveDate","SubcommitteeManagementGrid","subcommitteeData","subcommitteeNameInput","subcommitteeNumberInput","calculatedFullCommitteeNumber","subcommitteeNameChange","subcommitteeNumberChange","calculateFullCommitteeNumber","sendSubcommitteeCreateDetails","subcommitteeName","subcommitteeNumber","number","parentCommitteeNumber","padStart","isInteger","createSubcommittee","subcommitteeMessage","min","max","parentCommitteeID","personnelListRequest","personnelListSuccess","personnelListFailure","roleTypesRequest","roleTypesSuccess","roleTypesFailure","personnelReferencesRequest","personnelReferencesSuccess","personnelReferencesFailure","personnelSaveRequest","personnelSaveSuccess","personnelSaveFailure","personnelStaffList","personnelClerkList","personnelOtherList","personnelStaffReferences","personnelClerkReferences","personnelErrorSave","receivePersonnelSave","personnelStaffSave","personnelClerkSave","roleTypes","personnelActionCreators","requestPersonnelReferences","personnelReferences","receivePersonnelReferences","clerkReferences","staffReferences","personnelReferencesError","getPersonnelReferences","Personnels","personnelObj","isOtherDuplicate","requestPersonnelList","personnelList","receivePersonnelList","clerkList","staffList","otherList","personnelListError","getPersonnelList","isPublic","requestRoleTypes","receiveRoleTypes","roleTypesError","getRoleTypes","StaffRoleTypes","requestPersonnelSave","savePersonnel","SubCommitteesList","listCommittees","Math","random","MemberListComponent","names","PersonnelListComponent","CommitteeDetailsComponent","committeeData","subcommitteesList","Abbreviation","MeetingNote","TwitterHandle","TwitterEmail","membersByCommitteeError","memberRoles","partnerCommitteeListError","PartnerCommitteeDetails","NewCommitteeFormComponent","infoFieldsetIsActive","clerkFieldsetIsActive","staffFieldsetIsActive","membershipFieldsetIsActive","subcommFieldsetIsActive","clerks","staff","committeeMemberRoles","committeeMemberNames","subcommitteeIsLoaded","showPreview","ascending","isFormDirty","getSubcommittees","handleClerkChange","handleStaffChange","handleClose","committeeid","subcommitteeid","getPartnerCommitteeList","partnerCommitteeList","serviceEndDate","memberObject","MemberList","personnelObject","saveCommittee","saveCommitteeError","commData","savedCommittee","saveMemberCommittee","memberCommitteeSaveError","memberCommitteeSave","saved","committeeNameMissing","goBack","committeeId","committeeParams","getPartnerCommitteeById","partnerCommitteeByIdData","committeeLoaded","getCommitteeMemberRoles","committeeHouseRoles","committeeSenateRoles","chamberCode","organizeMembers","getMembersByCommittee","membersByCommittee","membersLoaded","parentCommData","parentCommitteeName","filteredStaffAndClerkReferences","OrganizationName","personnelParams","clerk","staf","personnelLoaded","AgendaURL","CommitteeFiles","isBefore","isAfter","paddingRight","CommitteeManagement","CommitteeManagementForm","emptyCache","caches","delete","getReferencesSuccess","getReferencesFailure","getCalendarListSuccess","getCalendarListFailure","createCalendarSuccess","createCalendarFailure","saveCalendarSuccess","saveCalendarFailure","saveCalendarFileSuccess","saveCalendarFileFailure","getCalendarSuccess","getCalendarFailure","getDocketListSuccess","getDocketListFailure","createDocketSuccess","createDocketFailure","saveDocketSuccess","saveDocketFailure","docketByIdRequest","docketByIdSuccess","docketByIdFailure","patronListDocketByIdRequest","patronListDocketByIdSuccess","patronListDocketByIdFailure","getCalendarCategoriesReferencesSuccess","getCalendarCategoriesReferencesFailure","getCalendarAssignmentsSuccess","getCalendarAssignmentsFailure","getAdminCalendarAssignmentsSuccess","getAdminCalendarAssignmentsFailure","saveCalendarAssignmentSuccess","saveCalendarAssignmentFailure","saveCalendarCurrentItemSuccess","saveCalendarCurrentItemFailure","replacePdfRequest","references","getReferencesError","docketList","getDocketListError","calendarList","calendarListError","calendarCreate","calendarCreateError","calendarSave","calendarSaveError","calendarFileSave","calendarFileSaveError","calendarGet","calendarGetError","calendarCategoriesReferences","calendarCategoriesReferencesError","docketByIdData","docketSave","docketSaveError","replacePdfResponse","replacePdfError","patronListDocketByIdData","sendDocketHtmlError","sendCalendarHtmlError","sendDocketHtmlResponse","sendCalendarHtmlResponse","calendarAssignments","getCalendarAssignmentsError","adminCalendarAssignments","getAdminCalendarAssignmentsError","calendarAssignmentSave","saveCalendarAssignmentsError","calendarActionCreators","requestDocketById","receiveDocketById","docketByIdError","getDocketById","Dockets","requestPatronListDocketById","receivePatronListDocketById","patronListDocketByIdError","getPatronListDocketById","ListItems","receiveReferences","getReferences","CalendarActions","receiveDocketList","getDocketList","receiveDocketCreate","docketCreate","createDocketError","createDocket","receiveDocketSave","saveDocket","HouseAgendas","receiveCalendarCategoriesReferences","includeChairmansReportCategories","CalendarCategoryTypes","cc","CategoryType","getCalendarCategoriesReferencesError","getCalendarCategoriesReferences","receiveCalendarAssignments","CalendarAssignments","getCalendarAssignments","receiveAdminCalendarAssignments","getAdminCalendarAssignments","receiveCalendarAssignmentSave","saveCalendarAssignmentError","saveCalendarAssignment","Message","receiveCalendarList","getCalendarList","Calendars","receiveCalendarCreate","createCalendarError","createCalendar","createCalendarResponse","receiveCalendarSave","saveCalendar","saveCalendarResponse","receiveCalendarFileSave","saveCalendarFile","receiveCalendarById","getCalendarById","receiveCalendarCurrentItem","calendarCurrentItem","calendarCurrentItemError","saveCalendarCurrentItem","replacePdf","sendDocketHtml","sendCalendarHtml","docketCreateError","scheduleListSuccess","scheduleListFailure","scheduleTypeListSuccess","scheduleTypeListFailure","scheduleGetSuccess","scheduleGetFailure","scheduleSaveSuccess","scheduleSaveFailure","scheduleCreateSuccess","scheduleCreateFailure","meetingsCalendarPreviewSuccess","meetingsCalendarPreviewFailure","getMeetingRoomReferencesSuccess","getMeetingRoomReferencesFailure","subcommitteeMembersRequest","subcommitteeMembersSuccess","subcommitteeMembersFailure","uploadMeetingPdfSuccess","uploadMeetingPdfFailure","scheduleList","schedule","scheduleListError","scheduleTypeListError","scheduleGetError","scheduleSaveError","scheduleCreateError","meetingRoomReferences","meetingRoomReferencesError","meetingsCalendarPreview","meetingsCalendarPreviewError","subcommitteeMembers","uploadMeetingPdf","uploadMeetingPdfError","scheduleActionCreators","receiveScheduleList","getScheduleList","parter","REACT_APP_SCHEDULE_API_URL","Schedules","receiveScheduleTypeList","scheduleTypeList","getScheduleTypeList","ScheduleTypes","receiveSchedule","scheduleError","getSchedule","receiveScheduleSave","scheduleSave","saveSchedule","receiveScheduleCreate","scheduleCreate","createSchedule","receiveMeetingRoomReferences","getMeetingRoomReferencesError","getMeetingRoomReferences","MeetingRooms","receiveMeetingsCalendarPreview","getMeetingsCalendarPreviewError","getMeetingsCalendarPreview","requestSubcommitteeMembers","receiveSubcommitteeMembers","subcommitteeMembersError","getSubcommitteeMembers","SubcomitteeMembers","receiveUploadMeetingPdf","DocketGrid","committeeOptions","subcommitteeOptions","docketDate","utc","startOf","hour","minute","createFailureMessage","isAdding","showDeleteModal","docketToDeleteIndex","getDockets","deleteDocket","checkDeleteDocket","cancelDeleteDocket","handleSessionSelectChange","handleCommitteeSelectChange","handleSubcommitteeSelectChange","newState","selectedSubcommittee","handleDropdownChange","createDocketObj","DocketDate","DocketType","DocketTypeID","VoteRoomID","ScheduleDate","ScheduleTypeID","calendar","docketBeingDeleted","DocketID","docketData","DocketCategories","DocketItems","DeletionDate","showDeleteSuccess","deleteFailureMessage","docketIndex","filteredCommittees","listParams","docketParams","DocketNumber","getItemStyle","CommitteeBillsGrid","showAuxBillForm","auxBill","savingAuxBill","toggleRow","toggleBill","toggleBillBulk","toggleEdit","saveChange","toggleAuxBillAdd","addAuxBill","setAuxBill","categorySequence","categories","catIndex","category","itemIndex","lastCheckedBill","nativeEvent","shiftKey","abs","updateDocket","sequence","nextHighestActiveLegislationNumber","currentSequences","apply","Infinity","activate","isEditing","newDescription","notesCategories","IsLegislationCategory","docketBills","flatMap","d","gap","selectAllActive","toggleAllActive","selectAllInactive","gridTemplateRows","categoryIndex","dataActive","note","dataInactive","resize","cols","LegislationDescription","DocketItemID","HouseAgendaItemID","Docket","patronList","docket","hideCaption","hidePatron","hideSummary","Summary","hideTitle","hideLDNumber","DocketDetailsComponent","HouseAgendaCategories","Staff","obj","committeeHeader","ParentCommitteeName","subcommitteeHeader","sessionHeader","memberNames","CommitteeMember","clerkNames","staffNames","hideClerk","hideStaff","scheduleIndex","ScheduleTime","RoomDescription","Comments","HouseAgendaItems","DocketPatronList","patronListDocketData","CalendarDate","Legislation","togglePatronList","PUBLISH_DOCKET","TIME_REGEX","DocketFormComponent","handleMeetingRoomChange","selectedMeetingRoom","pendingSave","committeeClerk","committeeStaff","committeeLeadership","meetingRoomsList","showPatronList","handleSequenceChange","toggleDocketSection","downloadWordFile","handleCommentHeight","docketBillParams","docketid","getDocketBills","CalendarDisplay","DisplayColumn","IsDisplayed","noSavedItems","memberDelimiter","getMeetingRoomsReferences","notesCategory","calCategory","CategoryCode","cat","time24Hr","hours","minutes","modifier","active","publishFlag","unpublishing","DocketFiles","hasNotes","ContentHTML","filename","downloadLink","legislationKey","SummaryVersion","round","commentHeight","committeeDate","dockets","disablePublish","for","fontFamily","room","DocketManagementForm","DocketManagement","render","DocketForm","CalendarGrid","nextBusinessDay","day","selectedChamber","calendarDate","calendarToBeDeleted","calendarBeingDeleted","showDeleteWarning","getCalendars","handleChamberChange","deleteCalendar","toggleDeleteCalendar","calendarNumber","isSame","createCalendarObj","CalendarType","CalendarTypeID","CalendarNumber","CalendarID","calendarData","calendarParams","ReferenceNumber","newAgendaItemText","AgendaItemsComponent","agendaItemContent","saveAgendaItems","addNote","toggleCustomNote","agendaItems","agenda","AgendaItems","newAgendaItem","AgendaId","updateAgendaItems","agendaIndex","toggleAgendaItemEditor","CalendarDescription","OrigIsActive","sortedAgendaItems","newAgendaItemContent","alert","removedItemContent","removedItem","tinyMceEditor","tinyMceId","tinyMceHtmlElem","tinyMceHeaderElem","getElementById","tinymceId","editors","_snapshot","isDragDisabled","AgendaItemId","borderRight","borderTop","borderLeft","borderBottom","onInit","setTinyMceIds","menubar","statusbar","textAlign","isNotHidden","IsHidden","CalendarCategoryTypeID","NUMERIC_SORT_CATEGORIES","sortAgendas","calendarChamber","Ranking","sortAgendasNumerically","BillsGrid","categoryDescription","associatedReferenceCategory","calendarCategories","PluralDescription","Agendas","showAgendaItemEditor","showAgendaItemEditorCategoryIndex","handleAgendaSort","toggleSelectAll","showAgendaItems","toggleEditCategoryDescription","expandTitle","getCategoryBills","setDescription","setBillsInConferenceCategoryDescription","categoryDescriptionIsEdited","changeCommitteeDropdown","changeDateDropdown","addBill","toggleShowAmendments","setRanking","handleDescriptionChange","selectAllCommending","selectAllMemorial","organizedBills","selectAll","leg","updateAgenda","categoryAsDisplayed","updatedOrganizedBills","newTypeAndPluralityLanguage","existingDescription","categoryLegislations","activeCategoryLegislations","cl","numResolutions","acl","numBills","agendas","categoryTypeId","unrankedAgendas","rankedAgendas","inactiveAgendas","rankings","gaps","sortInactiveAgendasNumerically","sortInactiveAgendas","Set","size","insertPoint","pending","duplicateCategory","duplicateAgenda","duplicateCategoryIndex","legNumbersToBeIncluded","topOrBottom","checkedAgenda","CalendarCategoryID","existingCategoryAgendaIndex","LegislationTitle","associatedCategory","showAmendments","ranking","save","editing","tempDescription","calendarCategoryOptions","billButtonText","billExists","some","selectedDate","dateList","selectedCategory","changeCategoryDropdown","addCategory","toggleHideAllCategories","hideCategories","toggleHideAllNonIncludedBills","hideAllNonIncludedBills","showTitles","toggleHideCategory","DisplayType","userRoles","deleteCategory","switchCategory","toggleCalendarPreview","changeBillDropdown","inputValue","alignItems","moveTo","showNewIndicator","AgendaID","fullCommitteeList","calendarTime","CalendarCategoryTemplateID","generateCsv","col","rowText","voteLinkRequest","voteLinkSuccess","voteLinkFailure","voteDetailsRequest","voteDetailsSuccess","voteDetailsFailure","voteActionListRequest","voteActionListSuccess","voteActionListFailure","voteListSuccess","voteListFailure","voteTypesSuccess","voteTypesFailure","voteSaveSuccess","voteSaveFailure","voteFileSuccess","voteFileFailure","voteSaveMotionSuccess","voteSaveMotionFailure","voteLinkResponse","voteLinkError","voteDetailsResponse","voteDetailsError","voteList","voteListError","voteTypes","voteTypesError","voteSave","voteSaveError","voteSaveBulk","voteSaveBulkError","voteFile","voteFileError","voteSaveMotion","voteSaveMotionError","voteActionCreators","requestVoteDetails","receiveVoteDetails","getVoteDetails","Votes","requestVoteLink","receiveVoteLink","getVoteLink","VoteLinks","requestVoteActionList","receiveVoteActionList","voteActionList","voteActionListError","getVoteActionList","VoteActions","receiveVoteList","getVoteList","ShallowVotes","receiveVoteTypes","getVoteTypes","VoteTypes","receiveVoteSave","saveVote","receiveVoteSaveBulk","saveVoteBulk","receiveVoteFile","voteFileGen","REACT_APP_VOTE_FILE_GEN_URL","receiveVoteSaveMotion","saveVoteMotion","patronListRequest","patronListSuccess","patronListFailure","patronRolesSuccess","patronRolesFailure","patronTypesSuccess","patronTypesFailure","patronSaveSuccess","patronSaveFailure","senatePatronsList","housePatronsList","chiefPatronsList","patronRoles","patronRolesError","patronTypes","patronTypesError","patronSaveList","patronSaveError","patronActionCreators","requestPatronList","receivePatronList","housePatrons","senatePatrons","chiefPatrons","patronListError","getPatronList","patronsListError","patrons","receivePatronRoles","getPatronRoles","PatronRolesList","receivePatronTypes","getPatronTypes","MemberPatronTypes","requestPatronSave","receivePatronSave","savePatrons","patronSave","VersionData","useState","showText","toggleText","impactFileUrls","pdfLink","ImpactFile","FileURL","description","pushWithKeywords","substituteLdAndDocCodeString","resource","legislationClass","legislationNumber","handleToggleDescriptionEdit","saveDescription","countMatches","LinkFile","toggleStatementForm","DraftDate","VersionList","keywordExpression","keywordParts","foundAnOperator","keywordPart","sanitizedKeywords","chars","wordToInsert","phraseToInsert","statementDate","statementDescription","descriptionEditable","reportTypesSuccess","reportTypesFailure","reportSuccess","reportFailure","billReportInformationSuccess","billReportInformationFailure","shareReportRequest","reportTypes","reportTypesError","report","reportError","shareReport","billReportInformation","billReportInformationError","reportActionCreators","receiveReportTypes","getReportTypes","REACT_APP_REPORT_FILE_GEN_SERVICE","Reports","receiveReport","getReport","ReportDataList","receiveBillReportInformation","getBillReportInformation","StronglyTypedObject","saveBillReportInformation","REACT_APP_NOTIFICATIONS_API_URL","shareReportError","ReportMaker","creating","showCatchline","showCurrentStatus","showTitle","showChiefPatron","showAllPatrons","showSummary","showNotes","selectedNotes","selectedCollection","WatchListID","showHistory","showHouseAmendments","showSenateAmendments","showConferenceAmendments","showGovernorsRecommendations","personalMessage","showStatus","showCommitteeEvent","showAllBills","showClerkNames","showDlsStaffNames","showLdNumber","startRange","endRange","rangeError","DLS_STAFF","getReportUrl","toggleShowBills","checkParams","generateBillList","recent","mostRecentAmount","showVotes","newWindow","jsonData","userCreated","reportTitle","ReportNumber","startType","endType","typeFilled","Committee","Subcommittee","showPassedHouse","showPassedSenate","showPassed","showApproved","showVetoed","showContinued","showFailed","showEmergency","showFirstHouseCommittee","showFirstSenateCommittee","showLastHouseSubcommittee","showLastSenateSubcommittee","toggleReportMaker","autoReport","lisDocDomain","STORAGE_ACCOUNT_DOMAIN","HOUSE_NUMERIC_SORT_CATEGORIES","SENATE_NUMERIC_SORT_CATEGORIES","CalendarDetailsComponent","hideAll","currentItemSelection","toggleAll","toggleCategory","fetchCsv","handleCurrentItemChange","generateClerksCopy","CalendarCategories","CalendarCategory","Patron","fileName","saveAs","Blob","showReportMaker","setCategoryReportBillList","categoryReportBillList","comments","filteredCategories","calendarFileUrl","pdfFile","CalendarFiles","URL","calendarCategoryReferences","canSetCurrentItem","isCalendarForm","IsProforma","comment","Comment","currentProceduralMotion","currentAgendaItem","currentCategoryItem","commonCurrentItemOptions","formatCreateLabel","isSavingCalendarCurrentItem","setCurrentItem","creatingCollection","ClerksCopy","editHistory","createWatchlist","createdCollections","sessionOnly","show","toggleAgenda","agendaNote","AgendaNote","AgendaActivities","sortedPatrons","patronIndex","sameAsPrevious","sameAsNext","patronDisplayName","Versions","votes","CalendarDetailsPrintout","agendaNode","dangerouslySetInnerHTML","__html","HouseCalendarFormComponent","showCategoryPreview","selectedFile","calendatDate","commentEdit","tempComments","initializeForm","handleBulkAgendaSort","addComment","removeComment","commentShift","handleProFormaChange","handlePdfFile","submitPdfFile","changeConveneTime","toggleCommentEdit","confirmCommentEdit","toggleShowTitles","setPending","fileInput","referenceCategory","OnDemand","thisDate","Map","values","agendaItem","CalendarComments","tempComment","saveRequired","forceUpdate","categoryFinder","newCalendarCategory","isNewCategory","newCategoryIndex","selectedCategoryIndex","newAgenda","duplicateBillIndex","categoryType","gettingPdf","blob","createObjectURL","newComments","newTempComments","CalendarCommentID","toISOString","newSequence","shiftUp","genCalendarPreview","calendarId","navigate","files","isSubmittingFile","versions","ver","Version","conveneTime","timeChecker","clone","showTimeSelect","showTimeSelectOnly","dateFormat","timeFormat","accept","handleCommentChange","CalendarManagementForm","findLastByIsActiveThenCalendarDateThenCandidateDateThenLegChamberTypeKey","ignoreCalendarDate","ignoreCandidateDate","findLastByCalendarDateThenCandidateDateThenLegChamberTypeKey","findLastByLegChamberTypeKey","SenateBillsGrid","textHeight","sortNumeric","newAgendaSequence","categoryIsSequenced","lowerLegislationNumberAgenda","findLast","finalLowerLegislationNumberIndex","sortCategoryNumeric","SenateCalendarFormComponent","hideCategory","CalendarFormContainerComponent","isLoading","calendarBillParams","calendarid","CalendarFormContainer","CalendarManagement","minutesListRequest","minutesListSuccess","minutesListFailure","minutesCreateRequest","minutesCreateSuccess","minutesCreateFailure","categoryCreateSuccess","categoryCreateFailure","minutesBookSuccess","minutesBookFailure","minutesBookForCalendarSuccess","minutesBookForCalendarFailure","minutesBookSaveSuccess","minutesBookSaveFailure","minutesBookPublishSuccess","minutesBookPublishFailure","entriesSaveSuccess","entriesSaveFailure","entriesCreateSuccess","entriesCreateFailure","entriesCommunicationSaveSuccess","entriesCommunicationSaveFailure","actionTypesSuccess","actionTypesFailure","chairReportSuccess","chairReportFailure","committeeMinutesSummarySuccess","committeeMinutesSummaryFailure","minutesList","minutesMessage","minutesCreateMessage","minutesBook","minutesBookError","minutesBookForCalendar","minutesBookErrorForCalendarError","minutesBookSave","minutesBookSaveError","minutesBookPublish","minutesBookPublishError","clerksCopyGen","clerksCopyGenError","categoryCreate","categoryCreateError","entriesSave","entriesSaveError","entriesCreate","entriesCreateError","entriesCommunicationSave","entriesCommunicationSaveError","minutesGen","minutesGenError","actionTypes","actionTypesError","chairReport","chairReportError","committeeMinutesSummary","committeeMinutesSummaryError","minutesActionCreators","requestMinutesList","receiveMinutesList","minutesListError","getMinutesList","Minutes","requestMinutesCreate","receiveMinutesCreate","minutesCreateError","createMinutes","createMinutesError","receiveMinutesBook","getMinutesBook","MinutesBooks","receiveMinutesBookForCalendar","minutesBookForCalendarError","getMinutesBookForCalendar","receiveMinutesBookSave","saveMinutesBook","receiveMinutesBookPublish","publishMinutesBook","receiveClerksCopyGen","genClerksCopy","receiveCategoryCreate","createCategory","receiveEntriesSave","saveEntries","receiveEntriesCreate","createEntries","receiveEntriesCommunicationSave","saveEntriesCommunication","receiveActionTypes","getActionTypes","ActionReferenceTypeList","receiveChairReport","getChairReport","minutesBookID","ChairReports","receiveCommitteeMinutesSummary","getCommitteeMinutesSummary","minutesBookIDs","categoryCreateMessage","entriesSaveMessage","entriesCreateMessage","MinutesGridComponent","getMinutesData","minutesDate","sessionDropdown","selectedSessionToolbar","selectedSessionGrid","selectedRow","minutesObj","minutesId","newSelected","MinutesBookID","input","indeterminate","MinutesDate","MinutesManagementGrid","LoaderComponent","loadingCheck","prototype","call","Misc","newEntries","cancelEdit","entries","EntryText","MinutesEntries","handleSaveEntry","entry","MinutesEntryID","getReferenceList","eventCode","fullList","filteredOptions","otherVersions","otherAmendments","lt","o","otherSubs","CustomCreatableSelect","inputMinWidth","inputWidth","selectedActionType","inputSizer","newWidth","scrollWidth","inputStyle","minWidth","boxShadow","autoselected","isNewEvent","getOptionLabel","visibility","selectStyle","isValidNewOption","CustomInput","maxWidth","textListLength","InputType","handleActionTypeChange","addInput","actionTypeDropdown","referenceIndex","entryIndex","activityIndex","originalValue","reference","ActionReferenceType","ReferenceText","__isNew__","ReferenceID","LegislationEventID","EventCode","IsPassed","CommunicationDate","CommunicationNumber","CommunicationSummaries","newInput","ActionReferenceTypeID","divStyle","errorCheck","incompleteInputs","force_br_newlines","force_p_newlines","forced_root_block","memberVal","newEvent","committeeVal","eventChamber","subCommitteeVal","subCommittee","textVal","autoselect","opt","newLabel","time","timeIntervals","timeCaption","datetime","ActionReferences","ActivityReferences","EventReferences","eventList","evt","getOptionValue","communicationList","communicationVal","comm","CommunicationID","communication","legislationVal","legislationList","fetchingSessionLegislation","opacity","onKeyDown","menuIsOpen","valueContainer","CommentBox","selectedComment","selectComment","showView","toggleViews","MinutesSummary","handleCommentBoxChange","toggleBox","firstElement","getCommentPreview","Footer","innerHeight","saveComment","NonLegislativeForm","selectedMotion","insertEntry","templateInputs","motionOptions","selectedMotions","closeNewEntries","onEntryDragEnd","onActivityDragEnd","removeActivity","addBackActivity","insertMotion","handleTemplateChange","handleMotionChange","handleSelectedMotionDescriptionChange","getCatActionList","toggleMenu","addEntry","toggleCommentBox","toggleShowDeleted","getNonLegislativeActionList","handleNewMotionChange","toggleSwitchCategory","handleSwitchCategoryChange","toggleSelectEntry","toggleEditActivityDescription","menuBoxRef","MinutesActivities","newActivity","InPreview","act","eventReference","actionReferences","missingActivitiyReferences","existingActivities","textType","MinutesActivityID","editingActivityDescription","initialText","activity","VoteTally","handleActivityDescriptionChange","attr","tempVoteTally","activities","onMultipleEntryChange","currentActivitySequence","MinutesSummaries","tInput","ms","cs","commSummary","promises","ar","onEntryChange","templatedEdited","activityRefs","actIndex","MinutesCategoryID","showSwitchCategory","selectedSwitchCategory","catId","referenceParams","CalendarActionID","currentTarget","relatedTarget","showMenu","newEntry","IsOOB","commentBoxContent","showCommentBox","showDeleted","AdministrativeAction","dropdownOptions","switchingCategories","origSequence","bulkMoveEntry","showDeletedItemsCheckbox","getIndexOfFirstActivity","categoryFormDisabled","reconsiderationEvents","getCategoryDescriptionText","disableChanges","provided2","ma","contentEditable","suppressContentEditableWarning","toggleMoveEntry","tIndex","summary","summaryIndex","toggleChairsReport","MinutesNumber","EditVoteTally","forwardRef","LegislativeForm","nonLegislativeActionReferences","fullEventList","votesToBeSaved","savingVotes","togglingEdit","smallMotionForm","selectedBillNumber","savingNonLegAction","otherBillEventOptions","otherEvent","otherEventSelected","removeMotion","unSelectOtherEvent","handleOtherEventChange","getOtherBillEventOptions","filterBillEventReferences","handleBillChange","addAllEntries","toggleSmallMotionForm","handleBillNumberChange","applyLegislationToEntry","getReconsiderationEvents","unSelectOtherEventEdit","handleOtherActivityDescriptionChange","motionRef","motionDropdownRef","VoteID","activitiesToBeSaved","OtherEvent","_","newMotion","reversedActivities","OtherMotionSelected","unreversedActivities","memberListEvents","ReconsiderationGrammar","ReconsiderationDescription","billEventReferences","templateEdited","self","openMotionEditor","isNewEntry","minutesEntry","theNewActivity","needToSave","eventReferenceIndex","cb","isOOB","newInserEntries","_entryIndex","_activityIndex","recess","MinutesEntryCreate","me","firstActivityIndex","extractText","justifyContent","toggleOOB","legNumSelectStyle","onKeyUp","motion","handleOtherChange","outOfBlockEntries","inBlockEntries","auxOptions","isMulti","formatGroupLabel","formInput","ent","MinutesDetails","publicPage","nonPublicEntries","CategoryDescription","CategoryText","categoryTextPiece","p1","commListSuccess","commListFailure","commGetSuccess","commGetFailure","commSaveSuccess","commSaveFailure","commFileSaveSuccess","commFileSaveFailure","commCreateSuccess","commCreateFailure","commCategoriesSuccess","commCategoriesFailure","getCommunicationAssignmentsSuccess","getCommunicationAssignmentsFailure","getCommunicationSummaryListSuccess","getCommunicationSummaryListFailure","getAdminCommunicationAssignmentsSuccess","getAdminCommunicationAssignmentsFailure","saveCommunicationAssignmentSuccess","saveCommunicationAssignmentFailure","joinCommFileSuccess","joinCommFileFailure","commList","commListError","commCreate","commCreateError","commGet","commGetError","commSave","commSaveError","commFileSave","commFileSaveError","commCategories","commCategoriesError","commChamber","joinCommFile","joinCommFileError","communicationSummaryList","communicationSummaryListError","communicationAssignments","getCommunicationAssignmentsError","adminCommunicationAssignments","getAdminCommunicationAssignmentsError","communicationAssignmentSave","saveCommunicationAssignmentsError","communicationsActionCreators","receiveCommList","getCommList","CommunicationsList","receiveCommSummaryList","commSummaryListError","getCommunicationSummaryList","CommunicationSummariesResponse","receiveCommGet","getComm","CommunicationResponse","receiveCommCategories","getCommCategories","CommunicationCategoryTypesReference","receiveCommunicationAssignments","CommunicationAssignments","getCommunicationAssignments","receiveAdminCommunicationAssignments","getAdminCommunicationAssignments","receiveCommunicationAssignmentSave","saveCommunicationAssignmentError","saveCommunicationAssignment","receiveCommSave","saveComm","saveCommError","saveCommunicationResponse","receiveCommFileSave","saveCommFile","receiveJoinCommFile","receiveCommCreate","createComm","createCommunicationResponse","MinutesManagementForm","buildingCategoryConnection","buildingEntryConnection","isPendingChange","lastSavedTime","lastPublishedTime","entryHubConnection","categoryHubConnection","indexFieldsetIsActive","activityFieldsetIsActive","previewFieldsetIsActive","categoriesToMove","selectedCategoryToMoveTo","publishing","committeeMinutesBooks","chairReportCategoriesSetForRegeneration","regeneratingCategories","fetchedMinutesBookIDs","activityRef","entryFormRef","entryChange","multipleEntryChange","moveEntry","saveCategory","saveEntry","publishAllEntries","showActivity","duplicateChairmansCategory","receiveEntryByWebsocket","receiveCategoryByWebsocket","toggleFetchChairs","handleChairsReportDateChange","fetchChairsReports","regenerateChairsReportCategory","toggleEditCategoryText","setTempCategoryText","toggleMinutesStatus","getMinutes","editingCategoryText","MinutesCategories","tempCategoryText","newFormData","currentCategory","applicableCategories","movingCategorySource","movingEntrySource","showMoveEntryDialog","destinationCategoryIndex","sourceCategory","sourceEntry","destinationCategory","sourceCategoryIdx","destinationCategoryID","mc","sourceEntryIdx","theEntry","entryObject","MinutesEntrySave","invoke","promise","activitesForClerksCopy","categoryIdx","ReleaseToPreview","entryIdx","publishEntry","IsReleased","IsPassage","activityRect","MinutesFiles","newMinutesBook","newCategory","creatingCategory","minutesbookid","fetchingChairsReports","calendarCategoryTypeID","categoryToDuplicate","MinutesSummaryID","entryFromResult","minuteEntries","categoryFromResult","getConnectionId","conn","connectionName","connectionId","handleMessage","functionToRun","StatusCode","lastSaveErr","handleMessageOriginatedFromWebsocket","Success","entryConnection","signalR","withUrl","withAutomaticReconnect","build","serverTimeoutInMilliseconds","startConn","categoryConnection","sequences","every","seq","communications","usedCommunicationSummary","communicationSummaries","start","withCredentials","onreconnecting","onreconnected","onclose","chairsReportStartDate","chairsReportEndDate","endOf","MinutesStatus","combinedMinutesBookIDs","uniqueCombinedMinutesBookIDs","totalIterations","newIterations","matchingIterations","existingMatchingCategory","matchingCategoryIdx","existingCategoryIndex","cmte","existingMatchingEntryIndex","existingMatchingSummaryIndex","activitySequence","committeeMinutesBookIDs","associatedCommitteeMinutesEntry","existingMs","MinutesStatusId","MinutesStatusID","MinutesCalendars","flexShrink","sty","onSequenceChange","reconnectingCategory","closedCategory","categoryID","TypeSwitcher","reconnectingEntry","closedEntry","MinutesIndex","selectedCalendarCategory","handleCalendarCategoryChange","pointerEvents","renderCategoryDescription","Preview","newPreviewArray","entryObj","overflowY","MinutesManagement","EventControls","eventDate","utcOffset","set","second","millisecond","eventSequence","addEvent","removeEvent","_a","_b","eventObj","actorType","ActorType","eventAdded","eventRemoved","billEventOptions","buttonDisabled","required","maxLength","comitteeList","singleStyles","group","groupHeading","BillCategories","selectedPatron","selectedSubject","handlePatronChange","handleCommitteeChange","handleSubjectChange","selectedBillStatusCategory","statusCategoriesList","LegislationCategoryID","introDate","introductionDate","statusCategoryName","currentStatus","honorExcludeFailed","statusCategoryId","statusCategory","excludeFailed","allLegislation","uniqueSearch","query","frequentParams","mostFrequent","frequentJson","frequentQuery","frequentLink","includeDates","makeLink","clearIndicator","AdvancedSearchBoxComponent","billStatusDateError","showFindSection","showCategorySection","toggleFindSection","toggleCategorySection","setOpenSection","toggleShowCategories","showCategories","failedToGetSessions","billStatusStartDate","billStatusEndDate","adjournmentEvent","queryObj","selectedBillRangeBeginning","selectedBillRangeEnd","selectedChapterNumber","selectedLocation","selectedSummaryVersion","selectedBillVersion","selectedPatronType","selectedBillType","selectedBillEvent","billEventStartDate","billEventEndDate","billActionStartDate","billActionEndDate","keywordUseGlobalSessionSearch","searchParam","innerWidth","handleExcludeFailedChange","toggleGroup","billFieldset","toggleHelpModal","keywordFieldset","billManagement","handleRadioChange","handleSelectChange","billVersionList","billSummaryList","statusFieldset","billStatusCategoryList","handleCurrentStatusChange","chamberChange","committeesFieldset","committeeChange","newCmte","getSelectedCommitteeLabel","subcommitteeList","subcommittee","membersFieldset","PatronTypeID","handlePatronTypeChange","subjectFieldset","clearForm","showUpdateSearchButton","SearchSelections","clear","handleSelectionClear","typeIndex","handleMultiSelectionClear","updateSearch","Selection","UpdateSearch","NEW_EVENT","historyItem","isNewlyAdded","isNewlyDeleted","dateChanged","sequenceChanged","descriptionChanged","eventCodeChanged","BillHistoryForm","checkForScrollUp","conNodeRect","scrollToEvent","checkForScrollDown","organizedEvents","newEventDate","editingEvents","currentInput","eventGroupIndex","inputNumber","changeToBill","handleEventInputChange","changeEvent","changeDate","toggleEventGroup","bulkToggleEventGroup","toggleEditDescription","changeDescription","formDescription","handleNewEventChange","handleNewEventDateChange","saveEvents","handleMovingFocus","handleMovingFocusFromBillChanger","receiveEventByWebsocket","getSessionLegislation","_inputRefs","_containerRefs","_billSwitcherRef","_addEventRef","switchedToBill","organizeEvents","historyList","addEventNode","ReactDOM","findDOMNode","numberOfEvents","hidden","isBillManagement","events","HubConnectionBuilder","entryConnectionId","handleEvent","billData","legislationEventID","eventInputValue","origEventCode","LegislationEventTypeID","hasChanged","lEvent","EventDate","origDate","newEventGroupIndex","eventGroup","newEventGroup","hideAllEvents","togglehideAllEvents","expand","currentEvent","missingActionReferences","existingEvt","descEdit","origDescription","IsMandatory","eventReferences","inputs","substitueRejectedEvents","overrideSet","wasLastEventGroup","eventsToSave","eventGroupsToSave","success","orgEvents","g","lastSavedEventGroup","savedEventsInLastSavedEventGroup","lastSavedEvent","lastSavedEventIndex","sessionID","sessionLegislation","conNode","lastItemIndexInEventGroup","changer","inputNode","lastEventGroup","lastEvent","changeToNewBillHistoryForm","nodeRect","pageYOffset","windowHeight","inputRefs","containerRefs","containers","_historyItem","toggleEditContent","AddEventForm","addEventRef","versionsList","reconsiderationActionReference","eg","latestEvent","expandAllEvents","focusOnInputContainer","onInputChange","onMenuClose","deleteEvent","previousDate","eventsInADay","valueOf","originallyDeleted","inputId","statusCode","HistoryForm","LegislationProfiles","showSection","filteredWatchlists","filteredWatchlistsValue","toggleSection","createCollection","filterWatchlist","WatchListLegislation","collections","coll","watchlists","selectedCollectionIndex","w","isAuthor","collectionIsSaving","listIndex","IsPaid","claim","selectCollection","MERGE","DELETE","CollectionControls","selectedWatchlists","selectedMergeWatchlists","editWatchlistName","newName","deleteCollection","handleWatchlistChange","handleMergeWatchlistChange","handleToggleCompositeView","toggleEditWatchlistName","saveWatchlistName","addToWatchlists","handleCollectionChange","merge","saveResultCollections","associatedWatchlist","calendarHeader","searchMade","mergeButtonDisabled","createOptionPosition","billListLength","getCollectionFailure","getCollectionSuccess","getCollectionsFailure","getCollectionsSuccess","saveCollectionsFailure","saveCollectionsSuccess","getCriteriaTypesSuccess","getCriteriaTypesFailure","notificationListSuccess","notificationListFailure","messageListSuccess","messageListFailure","adminMessageListSuccess","adminMessageListFailure","createMessageSuccess","createMessageFailure","saveMessageSuccess","saveMessageFailure","collectionsError","collectionSave","collectionSaveError","criteriaTypes","criteriaTypesError","notifications","notificationsError","messages","messagesError","adminMessages","adminMessagesError","messageCreate","messageCreateError","messageSave","messageSaveError","collectionActionCreators","receiveCollection","collectionError","getCollection","REACT_APP_LEGISLATION_COLLECTION_API_URL","WatchLists","receiveCollections","getCollections","receiveCollectionSave","saveCollections","useCreate","receiveCriteriaTypes","getCriteriaTypes","CriteriaTypes","receiveNotifications","getNotifications","Notifications","receiveMessages","getMessages","Messages","receiveAdminMessages","getAdminMessages","receiveMessageCreate","createMessage","receiveMessageSave","saveMessage","HistoryList","filterAmount","setFilterAmount","filteredBillHistory","slice","filterOptions","hIndex","opened","vIndex","VoteNumber","toggleShowLinks","BillInfoComponent","billHistoryIsLoading","showInfo","showBillHistory","showBillVersions","newBillNote","showBillNote","handleNoteChange","toggleShowInfo","getHistory","toggleVersions","toggleBillNote","toggleBillNotesFromParent","saveNote","toggleShowData","billHistoryMessage","vote","historyIndex","links","linkPromises","cmtePromise","getCommitteeById","committeeByIdData","ReferenceType","collectionBillIndex","cBill","Note","userCanUseCollections","displayCrossSession","eventsChanged","fontStyle","handleBillCheckbox","displayChapterNumber","ChapterNumber","LegislationStatus","expanded","LegislationSummary","SearchText","marginBlockEnd","BILL_COLLECTION_AUTHOR","BillManagement","billStatusCategoryListIsLoading","selectedBillAction","selectedBillSession","previousSearch","searchType","filteredPatronList","groupedCommitteeList","filteredCommitteeList","selectAllBills","legislationIDs","showSidebar","showModal","searchOnEnterPress","handleSearch","getBillsResults","sessionChange","toggleSidebar","toggleAllBills","handleEditedBills","executeSearch","toggleModal","toggleExpandAllLegislation","searchBox","base64","decodedSearch","atob","calendarCategoryDescription","getBillStatusCategoryOptions","getBillVersionOptions","getBillSummaryOptions","getBillEventOptions","msg","updated","sessions","dateParam","sessionParam","getPatrons","getSubjects","getIntroDates","groupName","clearUrl","clearBillData","isPending","displaySelectedLocation","encodedSearch","keywordVersion","KeywordLegislationVersionID","KeywordSummaryVersionID","PatronTypes","StartDate","EndDate","KeywordExpression","KeywordLocation","EventStartDate","EventEndDate","IsPending","MostFrequent","AllLegislation","CurrentStatus","ExcludeFailed","LegislationIDs","IntroductionDate","activityFieldset","closeBillInfo","pos","l","billVersionReferences","billSummaryReferences","SummaryVersionID","datesList","code","collectionIsLoading","collectionIndex","returningFromSearch","legislationIds","LegislationId","insertIdx","displaySequence","dateItem","dateItemIdx","eventItem","newEvents","deletedEvents","reDeletedEvents","dateChangedEvents","sequenceChangedEvents","descriptionChangedEvents","eventCodeChangedEvents","_bill","historyIsLoaded","billID","bool","scrollIntoView","toggleArrows","isCreatingCollection","resetUrl","saveCollection","PublicBillSearch","CommunicationsManagementGrid","commDate","loadCommsList","deleteCommunication","commParams","createObj","CommunicationType","createErrorMessage","communicationBeingDeleted","communicationData","Communication","legList","CommunicationLegislation","legNumber","billType","numbers","char","billLink","draftTitle","removeLDNum","EffectiveType","categoryStyle","CommunicationsDetailsComponent","refNum","authoring","referenceNumber","CommunicationCategories","CommunicationCategoryID","ShowSignatureNote","FooterSentence","WebkitPrintColorAdjust","houseSig","ClerkName","ClerkTitle","newDescriptions","handleTitleChange","organizedComms","getCommunicationCategoryHeight","newDraftTitle","stripTags","initialOverflow","communicationCategories","textOverflow","searchText","regexp","newSearchText","SyntaxError","numeric","CommunicationLegislationID","existsInMultipleCategories","CommunicationCategoryTypeID","IsCandidate","CommunicationsForm","failedToJoinBills","isDoubleSided","genCommDoc","hasSelectedBills","hasIncludedBills","toggleShowSignatureNote","includeAll","validateCommunicationNumber","toggleIsDoubleSided","newReferenceNumber","commId","duplicateCommNumber","commNumbers","n","newCommCategory","printAllIncluded","billsToGen","billNum","AmendmentCount","FirstChamberCount","SecondChamberCount","pdfSrc","LegislationFiles","Pdf","FileContents","urlObj","failedBills","JoinLegislation","Generated","showPdfWindow","communicationsId","communicationid","catList","roleType","clerkRoleTypeID","hasDuplicates","print","changeCategoryPositionDropdown","CommunicationsManagement","VoteGrid","voteOriginOptions","saving","getVoteTypeReferences","saveVotes","toggleDeleteVoteModal","deleteVote","voteIndex","organizedVotes","voteToDelete","votesToSave","deletingVote","VoteList","getVotes","datesToIterate","checkedVotes","invalidFinalVotePublish","voteOrigin","FinalVote","voteObj","VoteLegislation","VoteDate","CommitteeVotedOnLegislation","VoteIDs","chairmansReportFailures","createChairmansReportSummarizedOnMinutes","chairmansReportVotes","VoteTypeID","fetchingCommittees","voteDay","sortTimeDesc","endDate","IsVoice","sortVotes","voteActions","VoteDetails","voteMembers","voteData","memberYeas","nObj","ResponseCode","memberNays","memberAbstentions","memberNoVote","voteStatements","VoteStatement","voteActionDescription","LegislationActionDescription","VoteType","displayTallySheet","voteFileUrl","displayCommitteeLink","linksGridColumns","linksGridTemplateColumns","headerGridTemplateColumns","mobileLinksPosition","printedContent","removedContent","billDescription","ReferToCommitteeID","ReferToCommitteeName","statement","statementIndex","VoteComment","PassFailOptions","REFER_ACTIONS","INCORPORATED_ACTIONS","VoteForm","isPreviewing","changeVotes","selectedVoteActionDescription","selectedCalendarCategoryType","calendarCategoryTypeList","showWarning","settingIsBlock","savedIncorporated","resetForm","resetVoteMembers","getVoteActionReferences","getCalendarCategoryTypes","handleVoteActionDescriptionChange","handleCalendarCategoryTypeChange","handleVoteChange","handleVoteLegislationChange","updateStatement","toggleTallySheetPDFPreview","toggleChangeVotes","setVoteTally","toggleWarning","getVoteListForFinalVote","toggleEditVoteLegislation","getBills","handleSenateCommitteeVoteLegislationChange","originalVoteData","originalVoteMembers","VoteMember","setSelectedValue","loadingVoteActionList","voteAction","VoteActionID","VoteActionDescription","committeeSameDayVoteList","undo","editingVoteLegislation","showEditingVoteLegislationMessage","uneditedVoteLegislation","voteLegislation","deletedLegIndex","vl","legIndex","removedValue","IsBlock","ReferToCommitteeNumber","yeaVotes","vm","nayVotes","abstainVotes","isPublishing","voteId","voteid","voteParams","preventPublish","showVoteTallyWarningMessage","voteTallyInDescription","PassFail","bl","EventDeletionDate","onMouseEnter","VoteMembers","responseStyle","arrangedVoteMembers","voteColumns","memberColumn","memberVote","VoteStatements","newVoteStatement","toggleEditing","handleMemberSelection","addStatement","exitEdit","memberIndex","memberOptions","removeStatement","VoteManagement","dateIndex","committeeID","votedLegislation","votedLegislationNumbers","commCategoriesWithVotedBills","voteArray","previousVote","newDateContainer","legislationKeyA","legislationKeyB","newOrganizedVoteDate","newDate","PrintRoomGrid","showRow","printPreviewIndex","togglePrintView","batchIndex","urlBatchId","textResults","urlBatchIndex","PrintBatchID","findMember","headerStyle","headerStyleComplete","viewCompletedByBill","flatBillList","batch","BatchItems","PrintDate","printDate","flattenBatches","BatchDate","BatchSequence","BatchDescription","VendorBatch","totalPageCount","PageCount","filteredTextResults","showComplete","viewOnlyCompletedItems","introStartDate","introEndDate","formattedStartDate","formattedEndDate","isBetween","isSameOrAfter","filterTextResults","batchDate","pdfMarked","textIndex","BatchItemID","markPdf","overflowX","SasURL","versionOptions","PrintManagement","billRoomView","isSearching","selectedVersion","anyChecked","handleFilter","handleReleaseToPrint","handlePrintComplete","handlePrintAllEnrolled","toggleBillRoomView","rej","showReprints","returnItem","billInNewFilteredDataset","textId","vendorBatch","isReleased","releaseDate","batchItemsToSave","itemsToRemove","completeDate","BatchItemIDs","Editing","showBillText","BillGrid","LegislationText","ReportManagement","selectedReport","reportData","handleFormChange","handleReportTypeChange","ReportID","reportDataChamber","reportDataName","ReportName","rpt","showItem","reportDataDate","filteredReportData","reportItem","Heading","sessionisLoaded","reportTypesAreLoaded","rt","flags","uniqueHeaderItems","has","dateLabel","printRef","reportItemIndex","patronString","ByRequest","ConsentRequired","GovernorsRequest","onExpandedChange","legislationText","newExpanded","toggleExpandedBills","currentPage","autoResetExpanded","freezeWhenExpanded","expandedBills","page","pages","ceil","onPageChange","Amendments","amendmentIndex","selectAmendment","onPageSizeChange","onSessionChange","onChamberChange","chamberIsDisabled","AmendmentManagement","selectedAmendment","billFilter","firstPass","unpublished","filterBills","getEDoc","appendEdoc","filterToEDocReady","isEDocReady","amendmentsToSave","domContainer","publishedBillIndex","filteredBillList","publishedLegislationIndex","createEDoc","eDocFiltered","amendmentNumber","amendmentTexts","amendmentItems","amendmentText","AmendmentItems","LineNumber","k","thisDraftText","ClassName","LineClassName","Line","amendmentChanges","AmendmentActions","TextClassName","Lines","eDocText","appendedEDoc","keepExpanded","resultsChanged","pageIndex","amendmentsFilteredByOpposingChamber","eDoc","SponsorType","aPrefix","bPrefix","aNumber","bNumber","AdminDashboard","criteriaTypeWeights","LegEvent","showLinks","toggleLinks","toggleLoading","voteLinks","setVoteLinks","getVoteLinks","BillInfo","reasonGrouping","allBillsExpanded","toggleInfo","useEffect","deleteBillFromCollection","addBillToCollection","handleCheckbox","CriteriaType","NotificationManagement","expandLatestHistory","getWatchlists","selectWatchlist","addBillsToWatchlist","stickyHeader","notificationsRef","notificationIDs","notificationID","checkedBillIdx","NotificationID","wl","billsFound","duplicate","Committees","Reasons","Bills","WatchListLegislationID","savedWatchlistIndex","sortLegNumbers","organizedNotifications","committeesArr","previousNotification","notification","newNotificationContainer","Notification","NotificationGroupings","objName","NotificationGrouping","NotificationReason","reasonObjIdx","legListing","watchlistId","selectedWatchlist","NotificationCriterias","CriteriaValue","organizeNotifications","remove","notificationIndex","committeeGrouping","committeeGroupingIndex","reasonGroupingIndex","Reason","watchlistID","notificationGroupings","reasons","criteriaType","reason","docListSuccess","docListFailure","docSuccess","docFailure","keyRegistrationSuccess","keyRegistrationFailure","confirmKeyRegistrationSuccess","confirmKeyRegistrationFailure","savePartnerSuccess","savePartnerFailure","partnerListSuccess","partnerListFailure","getPartnerSuccess","getPartnerFailure","getPartnerKeySuccess","docList","docListError","docError","savePartnerError","keyRegistrationError","partnerListError","partnerError","partnerKeyError","developersActionCreators","receiveDocList","getDocList","ApiDocumentations","receiveDoc","getDoc","Documentation","receiveKeyRegistration","submitKeyRegistration","receiveConfirmKeyRegistration","confirmKeyRegistrationError","submitConfirmKeyRegistration","receiveSavePartner","savePartner","receivePartnerList","partnerList","getPartnerList","PartnerList","receivePartner","getPartnerError","getPartner","receivePartnerKey","partnerKey","getPartnerKeyError","getPartnerKey","PartnerGridComponent","nameSearch","orgSearch","developers","partnerName","_original","ContactName","nameFilter","partnerOrg","orgFilter","PartnerID","phoneRegex","PartnerForm","initIsActive","checkPhone","partnerId","phoneError","PartnerFormWrapper","PartnerManagement","PartnerManagementGrid","PartnerManagementForm","UserManagement","newUser","existingUser","searching","cancel","create","splitName","Search","handleMemberDropdownChange","handleSubjectDropdownChange","openToDate","ResourcesComponent","SessionInfo","adjournment","reconvene","activeSessions","activeSession","tz","guess","Schedule","Times","timeIndex","Items","OwnerName","IsCancelled","renderHtml","defaultStyle","freshMessage","BulletinMessage","MessageOfTheDay","handleBold","handleItalic","toggleLink","linking","linkUrl","linkText","setLinkUrl","setLinkText","handleLink","editMessage","anchor","adminView","previewing","toggleAdminView","toggleShowAll","newMessageRef","bulletinID","BulletinID","filteredMessages","messagesToDisplay","admin","local","gettingAdminMessages","gettingMessages","MessageList","HomeComponent","searchIsLoaded","sessionInfoIsLoaded","scheduleIsLoaded","setupPage","getMembers","getDates","getStatusCategories","dateComp","timeA","TimeDescription","timeB","organizedSchedule","scheduleArray","previousSchedule","scheduleDateTime","getScheduleDateTime","previousScheduleDateTime","organizeTimes","itemsList","organizedTimes","Time","scheduleDate","scheduleTime","sessionCodeParam","currentHour","subtract","organizeSchedule","filteredOrganizedEvents","times","thisDayMeetings","timeObj","overflowWrap","SessionInformationComponent","listSessions","PublicSessionInformation","CommitteeListComponent","activeKey","listMembers","houseCommitteesIsLoaded","senateCommitteesIsLoaded","houseCommittees","senateCommittees","conveneDate","showSenateChamber","showHouseChamber","getCommitteeLists","toggleGetMembers","listName","chairmanIndex","CommitteeRoleTitle","chairman","memberString","detailString","EffectiveBeginDate","sessioncode","listCommittee","legislationObj","selectedBillStatus","legislationLink","listHouseCommittees","listSenateCommittees","PublicCommitteeList","CURRENTLY_IN","ASSIGNED_TO","MinutesData","MinutesList","listMinutes","DocketData","formattedSessionCode","HouseAgendaDate","DocketList","count","listDockets","maxSize","SubCommittees","parentCommitteeData","getCommitteeDetails","getCommitteeMembers","getMeetings","setupDoc","committeenumber","getCommitteeByNumber","committeeByNumberData","detailsIsLoaded","membersIsLoaded","parentID","subcommitteesIsLoaded","meetingParam","minutesListIsLoaded","docketListIsLoaded","closingEvent","reconveneEvent","defaultDocket","committeeLabel","changedMembers","Change","ChangeDate","buildMembers","slideDockets","linkIndex","PublicCommitteeDetails","Entry","VoteIsPublic","senateUser","PublicMeetingDetails","subformIsLoaded","view","chairmanReport","voteSheet","setView","toggleMeetingStatus","ChairmansCategory","getVoteSheetData","getBillDetailData","getVoteDetailData","voteDetails","memberRule36","minutesBookId","meetingid","parentCommittee","entIndex","actionIndex","ChairmansLegislation","formattedBill","striptags","PublicDocketDetails","docketId","sessionIsLoaded","htmlFile","dataIsLoaded","docketFile","trimmedUrl","removeZeros","CommitteeInformationComponent","slide","MemberInfoComponent","memberID","prefileEvent","MemberStatus","memberDetails","PartyName","DistrictName","MemberInformationComponent","houseMembers","senateMembers","getMembersLists","getMemberContact","memberContactData","houseMembersIsLoaded","senateMembersIsLoaded","listHouseMembers","listSenateMembers","PublicMemberInformation","subcommittees","subcomm","CommitteeAssignments","PatronRoles","roleLinks","roleIndex","memberNumber","memberChamber","memberNumberWithoutChamber","formattedMemberNumber","b64Link","MemberDetailsComponent","memberCommittees","memberSessionContact","memberDistrictContact","memberConferenceBills","getMemberCommittees","getMemberConferenceBills","effectiveDate","getCommitteesByMember","committeesByMember","parent","memberCommitteesIsLoaded","gaAddress","mailingAddress","contactIsLoaded","memberConferenceBillsIsLoaded","patronRolesIsLoaded","membernumber","jwt","showMemberStatusPageLink","getPrototypeOf","sessionContactInfo","districtContactInfo","PublicMemberDetails","WATCHLIST_LEGISLATION","ALL_LEGISLATION","WatchlistNotifications","hideNotifications","newKeywords","toggleNotifications","handleFrequenyChange","toggleEditKeywords","handleKeywordChange","handleKeywordSave","handleCheckboxChange","Frequency","NotificationFrequencyID","criteriaTypeObj","newCriteria","criteria","indexOfCriteriaInValue","CriteriaTypeID","keywordCriteria","showKeywordEditor","isDelete","criteriaToUseIndex","kc","nk","criteriaIndices","criteriaIndex","selectedHousePatrons","selectedSenatePatrons","selectedHouseCommittees","selectedSenateCommittees","getSelectedCommitteesLabel","statusChangeCheck","docketCheck","versionCheck","impactStatementCheck","keywords","introducedCheck","keyword","keywordIndex","HelpPage","QuickAdd","handleAddBillChange","isAddingBill","toggleIsAddingBill","quickAddBills","quickAddErr","sortLegislations","aLegislationKey","bLegislationKey","validLegPrefixes","BillSearchComponent","searchedKeywords","showAllNotes","showHelpModal","compositeView","removeWatchlistBills","toggleAllNotes","unload","getReportTitle","_billResultRefs","fullLegislationList","skippedRecords","skipIdsCall","KeywordUseGlobalSessionSearch","getResultsPromise","numSearchedIds","hasResults","paginatedLegislationIds","legislationIdsResponse","LegislationIds","totalResults","hasNextPage","observer","IntersectionObserver","handleObserver","rootMargin","threshold","observe","loadingRef","LOADING","hitCountRequestBody","flat","hitCounts","hitCount","reduce","st","HitCount","entities","boundingClientRect","prevY","savedCollectionIndex","errorMsg","billsToAdd","duplicatedBills","watchlist","removedBillCount","_cb","cbIndex","legislationIndex","billsToSearchFor","ranges","exitFn","existingWatchListLegislation","rangeStartAndEnd","rangeStart","rangeStartNumber","rangeEnd","rangeEndNumber","prefix","missedBills","fb","noWhiteSpaceBill","billKey","billPrefix","range","saveWatchlist","nextPageLoadingHeight","billResultRefs","getReportTitleObject","documentElement","clientHeight","ShareReport","emailAddresses","isSharing","handleEmailAddressChange","sendReport","toggleShareForm","STAFF","weights","getBillHistoryTypeLabel","committeeClerksAndStaff","generatingBillNumbers","generatingReport","hbCount","hjCount","sbCount","sjCount","compositeSortValue","getReportData","makeHtml","makePrintout","makeSpreadsheet","toggleCompositeSort","toggleShowNotes","htmlRef","printOutRef","sessionStartDate","loadingStaffNames","loadingClerkNames","loadingLdNumber","fullTextVersions","latestFullTextVersion","LdNumber","loadingAmendments","getLdNumber","loadingHistory","allResults","results","Status","committeeEvents","firstSenateCommitteeEvent","firstHouseCommitteeEvent","lastSenateSubcommitteeEvent","lastHouseSubcommitteeEvent","loadingVotes","loadingPatrons","loadingStatusHistory","billStatuses","committeePromises","patronPromises","historyPromises","textPromises","statusHistoryPromises","showStatusBool","showCommitteeEventBool","gettingBillHistory","gettingBillStatusHistory","gettingClerkNames","gettingStaffNames","gettingPatrons","gettingVotes","gettingLdNumbers","gettingAmendments","clerkRoleType","staffRoleType","committeesAndSessionsToSearch","getCommitteeClerksOrStaff","sl","se","billHistoryChunks","Notes","Emergency","ListName","getAmendments","chunk","getBillHistory","printWindow","contentData","htmlRefNode","breaks","historyRows","historyHeaders","hyperlinkedBill","formattedName","typeA","typeB","sortBillHistoryTypes","billHistoryType","billHistoryItems","newRow","Billno","YEAS","NAYS","ABSTENTIONS","PassedHouse","PassedSenate","Passed","Failed","Continued","Approved","Vetoed","columnHeader","noteIndex","historyFileName","showShareForm","reportId","BillInformation","gettingCommittees","sortBillsNumerically","direction","shareable","pageBreakInside","billHistoryTypeIndex","billHistoryItem","billHistoryItemIndex","gridColumn","frameBorder","SearchTranslator","wordToTranslate","word","wordparam","billSearchParams","ShorthandUrlTranslator","findPatronType","agencyListSuccess","agencyListFailure","agencyList","agencyListError","orgActionCreators","receiveAgencyList","getAgencyList","REACT_APP_STATS_API_URL","Agencies","ImpactStatementForm","fiscal","selectedAgency","uploadFile","getImpactStatementDescription","handleAgencyChange","handleFileChange","submit","agencyOptions","CollectionNotes","notes","toggleExpandNotes","legId","legislationInCollection","BILL_EVENT_AUTHOR","BILL_AUTHOR","VERSION_AUTHOR","SUMMARY","DESCRIPTION","isStatic","PatronName","PatronList","patronsLength","listPatrons","BillDetailsComponent","summariesList","editingHistory","displayStatementForm","statementSubmitting","statementLegislationTextID","statementDocumentcode","showWatchlistForm","getBillDetails","getBillVersion","saveSummary","submitImpactStatement","closeStatementForm","checkForDuplicates","togglePatronModal","handleAddToWatchlists","toggleWatchlistForm","saveVersionDescription","legislationNumberDigitsWithZeroPadding","legislationNumberDigitsWithOutZeroPadding","previousSessionCode","previousLegislationNumber","summaryIsLoaded","versionsIsLoaded","patronIsLoaded","billDataIsLoaded","openBillHistory","abbrev","agencies","organizations","agency","AgencyName","AgencyNumber","originalPatronList","expandPatrons","slideVersions","partnerEditor","billId","footer","errJson","modifiedBillData","LegislationList","newBillData","deletion","LegislationSummaryID","modifiedSummaryData","toggleDeleteSummaryModal","keyState","breaklessMatch","summaryToDelete","patronUpdate","activeVersions","billHeader","billHeaderEditor","formatSummaryVersion","billSummaryEditor","summaries","PublicBillDetails","VoteDetailsComponent","voteNumber","votenumber","voteDataIsLoaded","VoteFiles","PublicVoteDetails","csv_info","csv_name","csv_file","PublicDataFiles","loadingSessions","setSession","csv","PublicCommunicationsList","senateIsLoaded","houseIsLoaded","senateCommList","houseCommList","createCommList","jsonFile","CommunicationFiles","IsGenerated","PublicCalendarList","senateCalendarList","houseCalendarList","PublicCalendarDetails","currentItemHubConnection","receiveCurrentItem","getCalendar","calendarFile","currentItemConnection","currentItem","stronglyTypedObject","calendarCategoryID","agendaID","proceduralMotion","ProceduralMotion","categoryId","agendaId","displayDescription","PublicMinutesList","senateMinutesList","houseMinutesList","MinutesunicatilonNumber","PublicMinutesDetails","minutesid","minutesFile","ltGovPromise","ltGovParams","ltGov","clerkOfSenatePromise","clerkOfSenateParams","clerkofTheSenate","categoriesToShow","RESET","isHeader","selectStyles","UpdatePatronageModal","showPatronTypeChangeWarning","newPatron","showConfirmButton","pt","handleNewPatronChange","addNewPatron","droppableProps","IsIntroducing","togglePatron","savingPatrons","updatePatrons","attributeObject","hasOwnProperty","processStyle","Url","newElements","nestedElements","properties","property","objectName","urlChecker","getJsx","NEXT","PREVIOUS","inlineStyles","PatronDisplayInfo","FullText","draftTextCopy","sponsorOptions","highlight","amendmentSelections","houseMemberOptions","senateMemberOptions","showPatronModal","initialPass","markHelpIndex","createNewAmendment","saveText","handleBillDispositionChange","toggleHighlight","highlightText","handleParamChange","handleIsActiveChange","handleIsPublicChange","isLdIncluded","triggerDownload","passageCheck","resetPatrons","navToKeywordHit","dispositionRef","sponsorRef","memberRef","committeeRef","gettingEditData","beginningOfTextParagraphClassesInPriorityOrder","beginningOfTextParagraphIndex","loopIdx","indexTracker","validateData","grandchildNode","greatGrandchildNode","DraftTextFromJson","documentCodeChanged","valid","focused","textDispositionError","sponsorError","memberError","committeeError","draftTextError","keywordsFromQueryString","markInstance","Mark","asteriskSearch","separateWordSearch","accuracy","limiters","mark","showMarkHelp","showNextMarkHelp","scrollElement","currentIdx","numElements","newIndex","Content","documentNumber","documentcode","DLSPrepared","dispo","versionSession","originalTextDisposition","OfferedDate","PrefileDate","LegislationType","DraftTextJSON","jsonFileFound","passageDates","htmlDoc","prevClass","passage","insertText","patronListBeforeEdit","currentPatronLineElement","currChamber","patronInfo","patronsSameChamber","multiplePatrons","newPatronLine","associatedPatron","calculatePatronSequence","addedPatron","removedPatron","keepPatronType","PatronDate","currentSeq","existingPatronOfSameType","existingPatronOfHigherPriority","fetchingPatronage","disableSponsor","MarkHelpBar","patronArray","senators","delegates","finishedText","getPatronText","Button","icons","icon","hyperlinkInstructions","chamberList","MeetingsForm","scheduleID","scheduleType","meetingDateTime","timeDescription","ownerName","isCancelled","onCalendar","scheduleTypeOptions","remarks","scheduleFiles","highlightFileAnchorTag","setFormIsDirty","field","lastIndexOf","createTextRange","selRange","moveStart","moveEnd","setSelectionRange","selectionStart","selectionEnd","meeting","ScheduleID","OnCalendar","createMeeting","saveMeetings","originalFile","originalFileIdx","fileURL","committeeDropDownOptions","locationList","toggleEditMeeting","f","nextProps","ScheduleFiles","MeetingsCalendarPreview","setDate","getPreview","gettingPreview","toggleMeetingsCalendarPreview","SCHEDULE_EDITOR","PublicSchedule","currentDayIndex","locationOptions","showAllDates","calendarDisabled","displayScheduleModal","displayMeetingsCalendarPreview","showConfirmation","toggleAllDates","changeDay","handleReset","openMeeting","toggleCancelMeeting","deleteMeeting","openScheduleModal","closeScheduleModal","amount","parentCmteOption","sub","preserveIndex","voteRooms","roomDescription","meetings","onFail","scheduleFile","FileID","flatMappedSchedules","isSavingDrag","showDates","meetingDate","meetingTime","lastDate","lastTime","dateDate","Meeting","Location","ScheduleType","isPartner","marginBlockStart","currentDay","keyIndex","EventFinder","todayButton","PartnerSchedule","selectedMeeting","LinkURL","ScheduleModal","showInstructions","toggleInstructions","icsLink","PublicVoteSearch","voteTypeOptions","selectedMembers","selectedVoteType","searchSelectedMember","searchSelectedSession","searchSelectedVoteType","memberListError","getMemberVotes","memberVotesError","memberVotes","VoteSearchResults","toggleShow","VoteResult","nextState","memberName","organizeVotes","ClassificationName","VoteDescription","PublicMemberLegislation","hideBills","collapseAll","showPrefileOnly","toggleShowPrefile","chambercode","getMemberLegislation","memberLegislationError","memberLegislation","filteredMembers","totalBills","prefiledBills","IsPrefile","nonPrefiledBills","memberBills","PublicCommunicationDetails","communicationFile","clerkInfo","commid","chamberStatsSuccess","chamberStatsFailure","committeeStatsSuccess","committeeStatsFailure","stat","statsError","committeeStats","committeeStatsError","statActionCreators","receiveChamberStats","chamberStats","chamberStatsError","getChamberStats","ChamberStatistics","receiveCommitteeStats","getCommitteeStats","CommitteeStatistics","CommitteeStatDetails","stats","totals","ContinuedFromTotal","HReferredTotal","SReferredTotal","HInCommitteeTotal","SInCommitteeTotal","HInSubCommitteeTotal","SInSubCommitteeTotal","HReportedTotal","SReportedTotal","HIncorporatedTotal","SIncorporatedTotal","HFailedTotal","SFailedTotal","ContinuedToTotal","HContinuedFrom","SContinuedFrom","HReferred","SReferred","HInCommittee","SInCommittee","HInSubCommittee","SInSubCommittee","HReported","SReported","HIncorporated","SIncorporated","HFailed","SFailed","HContinued","SContinued","colSpan","rowSpan","statIndex","SessionStatDetails","IntroducedTotal","InCommitteeTotal","PassedHouseTotal","PassedSenateTotal","PassedTotal","IncorporatedTotal","FailedTotal","PendingTotal","ApprovedTotal","VetoTotal","ContinuedFromLastSession","Introduced","InCommittee","Incorporated","Pending","Veto","ContinuedToNextSession","Unauthorized","WatchlistsComponent","nameSort","descSort","dateSort","billNumberSort","viewCrossReferenceList","expandedWatchlists","filteredBills","filteredBillsValue","expandAllWatchlists","expandAllBills","loadingCollections","sortByName","sortByDesc","sortByDate","sortByBillNumber","toggleBillList","toggleCrossReferenceList","toggleWatchlistList","toggleWatchlist","deleteWatchlists","updateCrossReferenceList","newLegislation","watchListIDsParam","watchListIDs","watchlistIndex","watchlistsToDelete","deletingWatchlists","legislationNumbersParam","crossRefList","isProfilePage","toggleExpandAll","ProfileForm","apiKeys","apiKeyIsLoading","getApiKeys","handleCopy","navigator","clipboard","writeText","canCreateMultipleWatchlists","APIKey","PrivacyComponent","DevsPortal","ApiName","DocumentComponent","backToList","docName","spec","nativeScrollbars","theme","colors","primary","main","http","responses","typography","headings","visited","hover","optimizeSpeed","sidebar","rightPanel","spacing","sectionHorizontal","sectionVertical","lazyRendering","KeyRegistration","urlRegex","KeyConfirmation","urlError","organization","phone","agree","checkUrl","Phone","EulaDate","TermsOfService","AdminDevsPortal","AdminDocumentComponent","AdminDocs","FooterWrapper","ConfigurationsTable","getTdProps","associatedAdminAssignment","uniqueIdentifier","adminAssignments","showDifferences","aca","associatedAdminValue","uniqueCategoryIdentifier","associatedRowCategoryCodeHasMultipleChambers","associatedRowAdminCategoryCodeHasMultipleChambers","assignments","newAssignment","getTheadProps","getTheadFilterThProps","finalState","getTheadThProps","pivotId","isNewRow","rowValue","categoryChamberIdentifier","requiredFields","newAssignmentFreshValues","p_LegislationDescription","IsUncontested","CalendarConfigurations","getAssociatedAdminAssignmentWithoutModDate","assignment","legislationClassOptions","loadedCategories","loadedAssignments","loadedAdminAssignments","loadedLegislationClassOptions","categoriesError","assignmentsError","legislationClassOptionsError","adminAssignmentsError","duplicates","showAllDifferences","filteringMismatches","assignmentMismatches","getCategories","getAssignments","getAdminAssignments","handleAssignmentChange","checkDuplicates","getUneditedAssignment","toggleDifferences","findDifferences","legClass","uid","ca","referenceEvent","editedAssignment","preSaveEventControlID","EventControlID","assignmentSave","existingAssignmentIndex","assignmentIndex","uneditedAssignment","cas","billEventOptionsError","loadedBillEventOptions","Placeholder","associatedAdminAssignmentWithoutModDate","originalWithoutModificationDate","differentInAdminDB","doesNotExistInAdminDB","originalCategoryDisplayCode","associatedAdminCategoryDisplayCode","cm","requiredFieldsNotCompleted","uneditedWithoutCategoryChamberIdentifier","originalWithoutCategoryChamberIdentifier","originalWithoutCategoryChamberIdentifierAndModificationDate","differentOrNonExistentInAdminDB","isDifferentOrNonExistentInAdminDB","CommunicationsConfigurations","refCategory","ConfigurationsGrid","categoryColumn","isAscending","arr","ConfigurationsManagement","getEventReferences","currentlyAsc","first","getAssociatedAdminAssignmentFn","originalWithoutCategoryChamberAndModificationDate","JournalGridComponent","getJournalData","handleCategoryChange","journalDate","handleSendCategory","handleDeleteJournal","journal","JournalDate","journalId","excludeDates","JournalID","JournalManagementGrid","JournalDetails","JournalEntries","JournalVote","infoBoxRef","JournalEntryID","JournalManagementForm","generateMml","JournalCategories","JournalCategoryID","journals","newJournal","generatingMml","download","revokeObjectURL","journalid","JournalIndex","ObjectName","JournalManagement","PrivateRoute","authstatus","hasPermission","checkingToken","rest","LISApp","counter","houseToken","idleTimer","onActive","onIdle","checkPermissions","setHouseToken","canAccessDocs","tokenExp","getElapsedTime","getLastActiveTime","timeout","divElement","offsetHeight","Home","SearchReportPage","SearchHelp","PublicCommitteeInformation","Login","ProfileContent","accounts","request","account","acquireTokenSilent","accessToken","expiresOn","RequestAccessToken","App","isLocalhost","hostname","registerValidSW","swUrl","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","controller","reactRouterMiddleware","routerMiddleware","middleWares","thunk","msalInstance","PublicClientApplication","store","preloadedState","createStore","combineReducers","router","connectRouter","Users","Session","Calendar","Members","Nav","Personnel","Communications","Print","Report","Collection","Stat","Org","Dev","Journal","compose","applyMiddleware","configureStore","rootElement","iKey","ApplicationInsights","instrumentationKey","loadAppInsights","origin","ready","unregister","checkValidServiceWorker","registerServiceWorker","committeeListRequest","committeeListSuccess","committeeListFailure","createCommitteeRequest","createCommitteeSuccess","createCommitteeFailure","saveCommitteeRequest","saveCommitteeSuccess","saveCommitteeFailure","partnerCommitteeListRequest","partnerCommitteeListSuccess","partnerCommitteeListFailure","partnerCommitteesRequest","partnerCommitteesSuccess","partnerCommitteesFailure","committeeByIdRequest","committeeByIdSuccess","committeeByIdFailure","committeeByNumberRequest","committeeByNumberSuccess","committeeByNumberFailure","committeePartnerByIdRequest","committeePartnerByIdSuccess","committeePartnerByIdFailure","committeesByMemberRequest","committeesByMemberSuccess","committeesByMemberFailure","membersList","createdCommittee","receiveSaveCommittee","receiveCreateCommittee","createCommitteeError","requestPartnerCommitteeList","receivePartnerCommitteeList","requestPartnerCommittees","receivePartnerCommittees","requestCommitteesByMember","receiveCommitteesByMember","committeesByMemberError","requestCommitteeList","receiveCommitteeList","committeeListError","requestCommitteeById","receiveCommitteeById","committeeByIdError","requestCommitteeByNumber","receiveCommitteeByNumber","committeeByNumberError","requestPartnerCommitteeById","receivePartnerCommitteeById","committeePartnerByIdError","districtListSuccess","districtListFailure","memberStatusesSuccess","memberStatusesFailure","partyCodeListSuccess","partyCodeListFailure","memberNumbersRequest","memberNumbersSuccess","memberNumbersFailure","memberListRequest","memberListSuccess","memberListFailure","memberContactRequest","memberContactSuccess","memberContactFailure","memberListContactRequest","memberListContactSuccess","memberListContactFailure","memberByIdSuccess","memberByIdFailure","membersByCommitteeRequest","membersByCommitteeSuccess","membersByCommitteeFailure","committeeMemberRolesRequest","committeeMemberRolesSuccess","committeeMemberRolesFailure","memberCommitteeSaveSuccess","memberCommitteeSaveFailure","memberCreateSuccess","memberCreateFailure","memberSaveSuccess","memberSaveFailure","memberLegislationSuccess","memberLegislationFailure","memberVotesSuccess","memberVotesFailure","memberConferenceBillsSuccess","memberConferenceBillsFailure","districtListError","memberStatusesError","partyCodeListError","memberCreateError","memberSave","memberSaveError","memberConferenceBillsError","memberListContactError","receiveDistricts","Districts","receivePartyCodeList","Parties","receiveMemberStatuses","MemberStatuses","requestMembersByCommittee","receiveMembersByCommittee","requestCommitteeMemberRoles","receiveCommitteeMemberRoles","houseRoles","senateRoles","committteeMemberRolesError","committeeMemberRolesError","committeeMembersArray","CommitteeRoles","committeeMemberSenateRoles","committeeMemberHouseRoles","elemObj","requestMemberNumbers","receiveMemberNumbers","memberNumbersError","MemberNumberList","requestMemberList","receiveMemberList","ShallowMembers","receiveMember","requestMemberContact","receiveMemberContact","memberContactError","MemberContactInformationList","requestMemberListContact","receiveMemberListContact","receiveMemberCommitteeSave","receiveMemberCreate","receiveMemberSave","receiveMemberLegislation","PatronLegislation","receiveMemberVotes","REACT_APP_MEMBER_VOTE_SEARCH_SERVICE","MemberVoteList","receiveMemberConferenceBills","ConferenceLegislationList","Popout","containerEl","sourceDoc","targetDoc","windowWidth","externalWindow","styleSheets","styleSheet","cssRules","newStyleEl","cssRule","newLinkEl","createPortal"],"mappings":"wNAEMA,EAAUC,OAAOC,IAAMD,OAAOC,IAAIC,WAAa,GAK/CC,EAA6B,gCAC7BC,EAA6B,gCAC7BC,EAA6B,gCAE7BC,EAAqB,uBACrBC,EAAqB,uBACrBC,EAAqB,uBAErBC,EAAqB,wBACrBC,EAAqB,wBACrBC,EAAqB,wBAErBC,EAAsB,wBACtBC,EAAsB,wBAEtBC,EAA2B,6BAC3BC,EAA2B,6BAE3BC,EAAqB,uBACrBC,EAAqB,uBAErBC,EAAuB,yBACvBC,EAAuB,yBAEvBC,EAAsB,wBACtBC,EAA6B,wBAE7BC,EAAe,CACjBC,oBAAqB,GACrBC,uBAAwB,GACxBC,YAAa,GACbC,eAAgB,GAChBC,YAAa,GACbC,mBAAoB,GACpBC,aAAc,GACdC,kBAAmB,GACnBC,kBAAmB,GACnBC,uBAAwB,GACxBC,YAAa,GACbC,iBAAkB,GAClBC,aAAc,GACdC,kBAAmB,GACnBC,mBAAoB,IAGXC,EAAwB,CAEjCC,2BAA4B,iBAAO,CAC/BC,KAAMrC,EACNoB,oBAAqB,GACrBkB,YAAY,IAGhBC,2BAA4B,SAACC,EAAMC,GAAP,MAAoB,CAC5CJ,KAAMpC,EACNqC,YAAY,EACZlB,oBAAqBoB,EACrBnB,uBAAwBoB,IAG5BC,yBAA0B,SAACD,GAAD,MAAc,CACpCJ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L,SAASC,cAAc,OAG1C,IA3BYm6L,EAAWC,EA2BjBz6L,EAAQ,EAAK0K,MAAMgwL,aAAe,IAClCt4L,EAAS,EAAKsI,MAAMulH,cAAgB,IAP3B,OAQf,EAAK0qE,eAAiB3kM,OAAO+R,KAAK,GAAI,GAAhB,gBAA6B/H,EAA7B,mBAA6CoC,EAA7C,sBAGtB,EAAKu4L,eAAev6L,SAAS3E,KAAK6F,YAAY,EAAKi5L,aAEnD,EAAKI,eAAev6L,SAASiI,MAAQ,EAAKqC,MAAMoe,YAlCpC0xK,EAmCDp6L,SAnCYq6L,EAmCF,EAAKE,eAAev6L,SAlC7C0X,MAAM9b,KAAKw+L,EAAUI,aAAaj5L,SAAQ,SAAAk5L,GACtC,GAAIA,EAAWC,SAAU,CACrB,IAAMC,EAAaP,EAAUn6L,cAAc,SAE3CyX,MAAM9b,KAAK6+L,EAAWC,UAAUn5L,SAAQ,SAAAq5L,GACpCD,EAAWz5L,YAAYk5L,EAAUpkL,eAAe4kL,EAAQ3kL,aAG5DokL,EAAUp2L,KAAK/C,YAAYy5L,QACxB,GAAIF,EAAWz0K,KAAM,CACxB,IAAM60K,EAAYT,EAAUn6L,cAAc,QAE1C46L,EAAUv2L,IAAM,aAChBu2L,EAAU70K,KAAOy0K,EAAWz0K,KAC5Bq0K,EAAUp2L,KAAK/C,YAAY25L,OAMhB,E,qDAkBnB,WAAqB,IAAD,OAEhB1vL,KAAKovL,eAAezlJ,iBAAiB,gBAAgB,WACjD,EAAKxqC,MAAMiR,cAAa,Q,kCAKhC,WACIpQ,KAAKovL,eAAe3wL,U,oBAGxB,WACI,OAAO0iH,IAASwuE,aAAa3vL,KAAKb,MAAM0qB,SAAU7pB,KAAKgvL,iB,GAhC1CtnL,IAAMC,WAoCZonL,O","file":"static/js/main.1554e309.chunk.js","sourcesContent":["import { partnerRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst journalCategoryListRequest = 'JOURNAL_CATEGORY_LIST_REQUEST';\nconst journalCategoryListSuccess = 'JOURNAL_CATEGORY_LIST_SUCCESS';\nconst journalCategoryListFailure = 'JOURNAL_CATEGORY_LIST_FAILURE';\n\nconst journalListRequest = 'JOURNAL_LIST_REQUEST';\nconst journalListSuccess = 'JOURNAL_LIST_SUCCESS';\nconst journalListFailure = 'JOURNAL_LIST_FAILURE';\n\nconst journalByIdRequest = 'JOURNAL_BY_ID_REQUEST';\nconst journalByIdSuccess = 'JOURNAL_BY_ID_SUCCESS';\nconst journalByIdFailure = 'JOURNAL_BY_ID_FAILURE';\n\nconst journalBuildSuccess = 'JOURNAL_BUILD_SUCCESS';\nconst journalBuildFailure = 'JOURNAL_BUILD_FAILURE';\n\nconst journalGenerationSuccess = 'JOURNAL_GENERATION_SUCCESS';\nconst journalGenerationFailure = 'JOURNAL_GENERATION_FAILURE';\n\nconst journalSaveSuccess = 'JOURNAL_SAVE_SUCCESS';\nconst journalSaveFailure = 'JOURNAL_SAVE_FAILURE';\n\nconst journalDeleteSuccess = 'JOURNAL_DELETE_SUCCESS';\nconst journalDeleteFailure = 'JOURNAL_DELETE_FAILURE';\n\nconst receiveCategoryData = 'CATEGORY_DATA_SUCCESS';\nconst receiveCategoryDataFailure = 'CATEGORY_DATA_FAILURE';\n\nconst initialState = {\n    journalCategoryList: [],\n    journalCategoryMessage: '',\n    journalList: [],\n    journalMessage: '',\n    journalById: [],\n    journalByIdMessage: '',\n    journalBuild: [],\n    journalBuildError: '',\n    journalGeneration: [],\n    journalGenerationError: '',\n    journalSave: [],\n    journalSaveError: '',\n    categoryData: '',\n    categoryDataError: '',\n    journalDeleteError: ''\n};\n\nexport const journalActionCreators = {\n    // GET JOURNAL CATEGORY LIST FOR JOURNAL MGMT GRID\n    requestJournalCategoryList: () => ({\n        type: journalCategoryListRequest,\n        journalCategoryList: [],\n        isFetching: true\n    }),\n\n    receiveJournalCategoryList: (list, message) => ({\n        type: journalCategoryListSuccess,\n        isFetching: false,\n        journalCategoryList: list,\n        journalCategoryMessage: message\n    }),\n\n    journalCategoryListError: (message) => ({\n        type: journalCategoryListFailure,\n        isFetching: false,\n        journalCategoryList: [],\n        journalCategoryMessage: message\n    }),\n\n    getJournalCategories: () => {\n        return dispatch => {\n            dispatch(journalActionCreators.requestJournalCategoryList());\n\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_JOURNAL_API_URL) + '/JournalFileGeneration/api/GetJournalCategoryTypes', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(journalActionCreators.journalCategoryListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(journalActionCreators.receiveJournalCategoryList(result[1].JournalCategoryTypes.map(x => { return { label: x.Name, value: x.JournalCategoryTypeID } })))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(journalActionCreators.receiveJournalCategoryList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // GET JOURNAL LIST FOR JOURNAL MGMT GRID\n    requestJournalList: () => ({\n        type: journalListRequest,\n        journalList: [],\n        isFetching: true\n    }),\n\n    receiveJournalList: (list, message) => ({\n        type: journalListSuccess,\n        isFetching: false,\n        journalList: list,\n        journalMessage: message\n    }),\n\n    journalListError: (message) => ({\n        type: journalListFailure,\n        isFetching: false,\n        journalList: [],\n        journalMessage: message\n    }),\n\n    getJournals: (params) => {\n        return dispatch => {\n            dispatch(journalActionCreators.requestJournalList());\n\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_JOURNAL_API_URL) + '/JournalFileGeneration/api/GetJournalData?', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(journalActionCreators.journalListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(journalActionCreators.receiveJournalList(result[1].Journals))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(journalActionCreators.receiveJournalList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // GET JOURNAL BY ID FOR JOURNAL FORM\n    requestJournalById: () => ({\n        type: journalByIdRequest,\n        journalById: [],\n        isFetching: true\n    }),\n\n    receiveJournalById: (list, message) => ({\n        type: journalByIdSuccess,\n        isFetching: false,\n        journalById: list,\n        journalByIdMessage: message\n    }),\n\n    journalByIdError: (message) => ({\n        type: journalByIdFailure,\n        isFetching: false,\n        journalById: [],\n        journalByIdMessage: message\n    }),\n\n    getJournalById: (params) => {\n        return dispatch => {\n            dispatch(journalActionCreators.requestJournalById());\n\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_JOURNAL_API_URL) + '/JournalFileGeneration/api/GetJournalDataById?', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(journalActionCreators.journalByIdError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(journalActionCreators.receiveJournalById(result[1].Journals))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(journalActionCreators.receiveJournalById([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    //BUILD JOURNAL DAY\n    receiveJournalBuild: (list) => ({\n        type: journalBuildSuccess,\n        journalBuild: list[0],\n    }),\n\n    journalBuildError: (message) => ({\n        type: journalBuildFailure,\n        journalBuild: [],\n        journalBuildError: message\n    }),\n\n    buildJournal: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_JOURNAL_API_URL) + '/JournalFileGeneration/api/BuildSenateJournalDay', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(journalActionCreators.journalBuildError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(journalActionCreators.receiveJournalBuild(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(journalActionCreators.journalBuildError('Journal Data not available'))\n                        return Promise.reject('No Journal Data')\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    //GENERATE JOURNAL DAY\n    receiveJournalGeneration: (bytes) => ({\n        type: journalGenerationSuccess,\n        journalGeneration: bytes,\n    }),\n\n    journalGenerationError: (message) => ({\n        type: journalGenerationFailure,\n        journalGeneration: [],\n        journalGenerationError: message\n    }),\n\n    generateJournal: (params) => {\n        return dispatch => {\n            let config = {\n                method: \"GET\",\n                headers: {\n                    \"Content-Type\": \"application/json; charset=utf-8\",\n                    \"authorization\": \"Bearer \" + localStorage.getItem('LIS_ID_TOKEN'),\n                    \"WebAPIKey\": process.env.REACT_APP_API_KEY\n                }\n            }\n            let url = (API_URL || process.env.REACT_APP_JOURNAL_API_URL) + '/JournalFileGeneration/api/GenerateSenateJournalDay' + params;\n            return fetch(url, config)\n                .then(async result => {\n                    if (!result) {\n                        dispatch(journalActionCreators.journalGenerationError(\"File not generated\"));\n                    } else if (result.status === 400) {\n                        await result.body.getReader().read().then(({ value }) => {\n                            const error = JSON.parse(Buffer.from(value.buffer).toString())\n                            dispatch(journalActionCreators.journalGenerationError(error.Name || \"Unknown Error\"));\n                        })\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    } else {\n                        const responseText = await result.text();\n                        dispatch(journalActionCreators.receiveJournalGeneration(responseText));\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    //SAVE JOURNAL\n    receiveJournalSave: (list) => ({\n        type: journalSaveSuccess,\n        journalSave: list[0],\n    }),\n\n    journalSaveError: (message) => ({\n        type: journalSaveFailure,\n        journalSave: [],\n        journalSaveError: message\n    }),\n\n    saveJournal: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_JOURNAL_API_URL) + '/JournalFileGeneration/api/SaveJournalData', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(journalActionCreators.journalSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(journalActionCreators.receiveJournalSave(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(journalActionCreators.journalSaveError('Journal Data not available'))\n                        return Promise.reject('No Journal Data')\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCategoryData: responseObj => ({\n        type: receiveCategoryData,\n        categoryData: responseObj\n    }),\n\n    categoryDataError: message => ({\n        type: receiveCategoryDataFailure,\n        categoryDataError: message\n    }),\n\n    getCategoryData: (params) => {\n        return dispatch => {\n            let config = {\n                method: \"GET\",\n                headers: {\n                    \"Content-Type\": \"application/json; charset=utf-8\",\n                    \"authorization\": \"Bearer \" + localStorage.getItem('LIS_ID_TOKEN'),\n                    \"WebAPIKey\": process.env.REACT_APP_API_KEY\n                }\n            }\n\n            let url = API_URL + '/JournalFileGeneration/api/GenerateJournalCategoryType?' + params;\n\n            return fetch(url, config)\n                .then(async result => {\n                    if (!result) {\n                        dispatch(journalActionCreators.categoryDataError(\"File not generated\"));\n                    } else if (result.status === 400) {\n                        await result.body.getReader().read().then(({ value }) => {\n                            const error = JSON.parse(Buffer.from(value.buffer).toString())\n                            dispatch(journalActionCreators.categoryDataError(error.Name || \"Unknown Error\"));\n                        })\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    } else {\n                        await result.body.getReader().read().then(({ value }) => {\n                            let decoder = new TextDecoder;\n                            dispatch(journalActionCreators.receiveCategoryData(decoder.decode(value)));\n                        })\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    //SAVE JOURNAL\n    receiveJournalDelete: () => ({\n        type: journalDeleteSuccess,\n    }),\n\n    journalDeleteError: (message) => ({\n        type: journalDeleteFailure,\n        journalDeleteError: message\n    }),\n\n    deleteJournal: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_JOURNAL_API_URL) + '/JournalFileGeneration/api/DeleteJournalDay?journalId=' + params, 'DELETE', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(journalActionCreators.journalDeleteError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(journalActionCreators.receiveJournalDelete())\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(journalActionCreators.journalDeleteError('Journal Data not available'))\n                        return Promise.reject('No Journal Data')\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    }\n}\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n\n    switch (action.type) {\n\n        case journalCategoryListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case journalCategoryListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                journalCategoryList: action.journalCategoryList,\n                journalMessage: ''\n            })\n        case journalCategoryListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                journalCategoryList: action.journalCategoryList,\n                journalMessage: action.journalMessage\n            })\n        case journalListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case journalListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                journalList: action.journalList,\n                journalMessage: ''\n            })\n        case journalListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                journalList: action.journalList,\n                journalMessage: action.journalMessage\n            })\n        case journalByIdRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case journalByIdSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                journalById: action.journalById,\n                journalByIdMessage: ''\n            })\n        case journalByIdFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                journalById: action.journalById,\n                journalByIdMessage: action.journalByIdMessage\n            })\n        case journalBuildSuccess:\n            return Object.assign({}, state, {\n                journalBuild: action.journalBuild,\n                journalBuildError: ''\n            })\n        case journalBuildFailure:\n            return Object.assign({}, state, {\n                journalBuildError: action.journalBuildError\n            })\n        case journalGenerationSuccess:\n            return Object.assign({}, state, {\n                journalGeneration: action.journalGeneration,\n                journalGenerationError: ''\n            })\n        case journalGenerationFailure:\n            return Object.assign({}, state, {\n                journalGenerationError: action.journalGenerationError\n            })\n        case journalSaveSuccess:\n            return Object.assign({}, state, {\n                journalSave: action.journalSave,\n                journalSaveError: ''\n            })\n        case journalSaveFailure:\n            return Object.assign({}, state, {\n                journalSaveError: action.journalSaveError\n            })\n        case journalDeleteSuccess:\n            return Object.assign({}, state, {\n                journalDelete: action.journalDelete,\n                journalDeleteError: ''\n            })\n        case journalDeleteFailure:\n            return Object.assign({}, state, {\n                journalDeleteError: action.journalDeleteError\n            })\n        case receiveCategoryData:\n            return Object.assign({}, state, {\n                categoryData: action.categoryData,\n                categoryDataError: ''\n            })\n        case receiveCategoryDataFailure:\n            return Object.assign({}, state, {\n                categoryDataError: action.categoryDataError\n            })\n        default:\n            return state\n    }\n};","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst printDocumentsSuccess = \"PRINT_DOCUMENTS_SUCCESS\";\nconst printDocumentsFailure = \"PRINT_DOCUMENTS_FAILURE\";\n\nconst printCreateSuccess = \"PRINT_CREATE_SUCCESS\";\nconst printCreateFailure = \"PRINT_CREATE_FAILURE\";\n\nconst printSaveSuccess = \"PRINT_SAVE_SUCCESS\";\nconst printSaveFailure = \"PRINT_SAVE_FAILURE\";\n\nconst printParchmentEmailSuccess = \"PRINT_PARCHMENT_EMAIL_SUCCESS\";\nconst printParchmentEmailFailure = \"PRINT_PARCHMENT_EMAIL_FAILURE\";\n\nconst batchItemCompleteSuccess = \"BATCH_ITEM_SUCCESS\";\nconst batchItemCompleteFailure = \"BATCH_ITEM_FAILURE\";\n\nconst printAllEnrolledSuccess = \"PRINT_ALL_ENROLLED_SUCCESS\";\nconst printAllEnrolledFailure = \"PRINT_ALL_ENROLLED_FAILURE\";\n\nconst initialState = {\n    printDocuments: [],\n    printDocumentsError: '',\n    printCreate: '',\n    printCreateError: '',\n    printSave: '',\n    printSaveError: '',\n    printParchmentEmail: '',\n    printParchmentEmailError: '',\n    batchItemComplete: '',\n    batchItemCompleteError: '',\n    printAllEnrolledError: ''\n};\n\nexport const printActionCreators = {\n\n    receivePrintDocuments: resObj => ({\n        type: printDocumentsSuccess,\n        printDocuments: resObj\n    }),\n\n    printDocumentsError: (message) => ({\n        type: printDocumentsFailure,\n        printDocumentsError: message\n    }),\n\n    getPrintDocuments: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PRINT_DOCUMENTS_SERVICE) + '/PrintDocuments/api/getprintdocumentsasync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(printActionCreators.printDocumentsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(printActionCreators.receivePrintDocuments(result[1].PrintBatches))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(printActionCreators.receivePrintDocuments([]))\n                        return Promise.reject('No documents found');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receivePrintCreate: resObj => ({\n        type: printCreateSuccess,\n        printCreate: resObj\n    }),\n\n    printCreateError: (message) => ({\n        type: printCreateFailure,\n        printCreateError: message\n    }),\n\n    createPrintDocument: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PRINT_DOCUMENTS_SERVICE) + '/printdocuments/api/createprintdocumentasync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(printActionCreators.printCreateError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(printActionCreators.receivePrintCreate(result[1][0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(printActionCreators.printCreateError('No Content'))\n                        return Promise.reject('No Content');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receivePrintSave: resObj => ({\n        type: printSaveSuccess,\n        printSave: resObj\n    }),\n\n    printSaveError: (message) => ({\n        type: printSaveFailure,\n        printSaveError: message\n    }),\n\n    savePrintDocument: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PRINT_DOCUMENTS_SERVICE) + '/printdocuments/api/saveprintdocumentasync', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(printActionCreators.printSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(printActionCreators.receivePrintSave(result[1][0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(printActionCreators.printSaveError('No Content'))\n                        return Promise.reject('No Content');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receivePrintParchmentEmail: resObj => ({\n        type: printParchmentEmailSuccess,\n        printParchmentEmail: resObj\n    }),\n\n    printParchmentemailError: (message) => ({\n        type: printParchmentEmailFailure,\n        printParchmentError: message\n    }),\n\n    sendParchmentEmail: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PRINT_DOCUMENTS_SERVICE) + '/PrintDocuments/api/SendPrintParchmentEmailAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(printActionCreators.printParchmentEmailError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(printActionCreators.receivePrintParchmentEmail(result[1][0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(printActionCreators.printParchmentEmailError('No Content'))\n                        return Promise.reject('No Content');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBatchItemComplete: resObj => ({\n        type: batchItemCompleteSuccess,\n        batchItemComplete: resObj\n    }),\n\n    batchItemCompleteError: (message) => ({\n        type: batchItemCompleteFailure,\n        batchItemCompleteError: message\n    }),\n\n    completeBatchItem: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PRINT_DOCUMENTS_SERVICE) + '/printdocuments/api/CompletePrintDocumentAsync', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(printActionCreators.batchItemCompleteError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(printActionCreators.receiveBatchItemComplete(result[1][0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(printActionCreators.batchItemCompleteError('No Content'))\n                        return Promise.reject(\"No Content\");\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receivePrintAllEnrolled: resObj => ({\n        type: printAllEnrolledSuccess\n    }),\n\n    printAllEnrolledError: (message) => ({\n        type: printAllEnrolledFailure,\n        printAllEnrolledError: message\n    }),\n\n    printAllEnrolled: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PRINT_DOCUMENTS_SERVICE) + '/printdocuments/api/ProcessAllEnrolledBillsAsync', 'POST', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(printActionCreators.printAllEnrolledError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(printActionCreators.receivePrintAllEnrolled(result[1][0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(printActionCreators.printAllEnrolledError('No Content'))\n                        return Promise.reject(\"No Content\");\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    }\n};\n\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n\n    switch (action.type) {\n        case printDocumentsSuccess:\n            return Object.assign({}, state, {\n                printDocuments: action.printDocuments,\n                printDocumentsError: action.printDocumentsError\n            })\n        case printDocumentsFailure:\n            return Object.assign({}, state, {\n                printDocumentsError: action.printDocumentsError\n            })\n        case printCreateSuccess:\n            return Object.assign({}, state, {\n                printCreate: action.printCreate,\n                printCreateError: action.printCreateError\n            })\n        case printCreateFailure:\n            return Object.assign({}, state, {\n                printCreateError: action.printCreateError\n            })\n        case printSaveSuccess:\n            return Object.assign({}, state, {\n                printSave: action.printSave,\n                printSaveError: action.printSaveError\n            })\n        case printSaveFailure:\n            return Object.assign({}, state, {\n                printSaveError: action.printSaveError\n            })\n        case printParchmentEmailSuccess:\n            return Object.assign({}, state, {\n                printParchmentEmail: action.printParchmentEmail,\n                printParchmentEmailError: action.printParchmentEmailError\n            })\n        case printSaveFailure:\n            return Object.assign({}, state, {\n                printParchmentEmailError: action.printParchmentEmailError\n            })\n        case batchItemCompleteSuccess:\n            return Object.assign({}, state, {\n                batchItemComplete: action.batchItemComplete,\n                batchItemCompleteError: action.batchItemCompleteError\n            })\n        case batchItemCompleteFailure:\n            return Object.assign({}, state, {\n                batchItemCompleteError: action.batchItemCompleteError\n            })\n        case printAllEnrolledSuccess:\n            return Object.assign({}, state, {\n                printAllEnrolledError: action.printAllEnrolledError\n            })\n        case printAllEnrolledFailure:\n            return Object.assign({}, state, {\n                printAllEnrolledError: action.printAllEnrolledError\n            })\n        default:\n            return state\n    }\n};","import tinymce from 'tinymce/tinymce';\n\ntinymce.PluginManager.add('linenumbers', function (editor) {\n    const width = '40px'\n    let linePositions = [];\n    let bodyHeight = 0;\n    const container = document.createElement('div');\n    const lineNumberContainer = document.createElement('div');\n    // NodeChange stops firing when text start to wrap. input does not fire when font size is changed.\n    // Neither of these fire when a the tinymce react component changes state so SetContent is used as well.\n    // So this function is ran regardless of which event happens\n    editor.on('NodeChange input SetContent', _e => {\n        const root = editor.contentDocument.activeElement;\n        // The line numbers only need to be updated when the vertical size of the content changes. Any more would be unnecessary since the line numbers wouldn't change\n        if (bodyHeight !== root.scrollHeight) {\n            update();\n            bodyHeight = root.scrollHeight;\n        }\n    });\n    // Where text wraps have a chance of changing when the windows resizes \n    editor.on('ResizeWindow', _e => {\n        update();\n    });\n    editor.on('init', _e => {\n        editor.contentWindow.onscroll = () => scrollNumbers();\n        //Style the tinymce body to allow room for the line numbers on the left side\n        const root = editor.contentDocument.activeElement;\n        root.style.margin = 0;\n        root.style.marginLeft = width;\n        bodyHeight = root.scrollHeight;\n        // Style the line number container and container to allow for the content to scroll\n        container.style.width = width;\n        container.style.overflow = 'hidden';\n        lineNumberContainer.style.position = 'relative'; // Needs to be relative or else the line numbers will not scroll\n        container.appendChild(lineNumberContainer);\n        editor.contentAreaContainer.appendChild(container);\n        //Account for content already in the editor on initiation\n        update();\n    });\n    editor.on('ScrollContent', _e => {\n        update();\n    });\n\n    // Scroll the collection of line numbers with the tinymce window\n    // This is so the line numbers will stay next to their line\n    const scrollNumbers = () => {\n        const contentWindow = editor.contentWindow;\n        container.scrollTop = contentWindow.scrollY;\n    }\n\n    // Updates the line numbers to the correct amount and position\n    // Only runs at tinymce initiation and when the tinymce body changes height\n    const update = () => {\n        const root = editor.contentDocument.activeElement;\n        linePositions = [];\n\n        //If line numbering is disabled by the user then escape and clear line numbers\n        if (localStorage.getItem(\"showLineNumbers\") === \"false\") {\n            lineNumberContainer.innerText = '';\n            return;\n        }\n\n        root.childNodes.forEach(rootChild => {\n            // Since the content of the html is going to be changed to find where the lines end it is safer to make a copy of the editor body\n            let clonedRootChild = rootChild.cloneNode(true);\n            root.insertBefore(clonedRootChild, rootChild);\n            // Hide the original editor body so that its height does not offset the line positions\n            const oldDisplay = rootChild.style.display;\n            rootChild.style.display = 'none';\n            if(clonedRootChild.style.display != \"none\") {\n                tagNewLines(clonedRootChild, root.scrollHeight * -1);\n            }\n            // Remove the node used to find line positions and show the original editor body again\n            root.removeChild(clonedRootChild);\n            rootChild.style.display = oldDisplay;\n        });\n        lineNumberContainer.style.height = editor.contentDocument.scrollingElement.scrollHeight + 'px';\n        // Get the font size. Most browsers default it to 16px\n        const bodyFontSize = window.getComputedStyle(root).getPropertyValue('font-size') || \"16px\";\n        lineNumberContainer.innerText = ''\n\n        let beginDrawing = false;\n\n        for (let i = 0; i < linePositions.length; i++) {\n            //Attempt to limit the amount of line numbers being drawn at any given time based on the scroll position of the window\n            if ((editor.contentWindow.scrollY === 0 && i < 100)\n                || (i < 225 && editor.contentWindow.scrollY < 7500)\n                || (editor.contentWindow.scrollY / i > 28.5 && editor.contentWindow.scrollY / i < 33.5)) {\n                let lineNumber = document.createElement('div');\n                lineNumber.style.position = 'absolute'\n                lineNumber.style.fontWeight = '700';\n                lineNumber.style.fontSize = bodyFontSize;\n                //Set the position of the line number. Need to account for how the position changes with the scroll height\n                lineNumber.style.top = linePositions[i].top + editor.contentWindow.scrollY + 'px';\n                lineNumber.innerText = i + 1;\n                lineNumberContainer.appendChild(lineNumber)\n                beginDrawing = true;\n            } else if (beginDrawing) {\n                //Exit the loop now that we're outside of the drawing range\n                return;\n            }\n        }\n    }\n\n    // This is a recursive function.\n    // It takes text nodes and converts them to an element that can be used to find the node's position\n    // The function calls itself when reaching a non-text node so that it can traverse that node's children until it reaches a text node\n    const tagNewLines = (node, oldLocation) => {\n        let atBillNumber = false;\n        let atGovernorsActions = false;\n        node.childNodes.forEach(child => {\n            if ([\"#text\", \"U\", \"S\", \"LI\", \"STRONG\", \"EM\", \"SPAN\"].includes(child.nodeName)) {\n                let testNode = document.createElement('span');\n                //Surround each word with an <n> tag\n                //There is not a way to find the location of each seperate word\n                //So an element is created with the word as the content. That way the location of the element can be found\n                let nodeVal = child.nodeValue || child.innerText;\n                testNode.innerHTML = nodeVal.replace(/[^\\s-]+/g, '<n>$&</n>');\n                //Get rid of the text node and replace it with the new element \n                node.insertBefore(testNode, child);\n                node.removeChild(child);\n                testNode.childNodes.forEach(testChild => {\n                    if (testChild.nodeName === \"#text\") {\n                        // Leftover text nodes will always be either the whitespace between the words or dashes between the words\n                        // Their location does not need to be checked because text is wrapped on words\n                        return;\n                    }\n                    const rect = testChild.getBoundingClientRect()\n                    const location = rect.bottom;\n                    const height = rect.height;\n                    if (testChild.nodeName === 'N') {\n                        // Account for the height of an element because an element that is taller then the last element doesn't mean it is on a new line\n                        if (location >= oldLocation + height) {\n                            // This word is on a different line then the previous. Save the position so that it can be referenced later when placing the line numbers\n                            linePositions.push(testChild.getBoundingClientRect());\n                        }\n                    }\n                    oldLocation = location;\n                });\n            } else if (child.nodeName === \"TR\") {\n                //Add a line for each table row\n                linePositions.push(child.getBoundingClientRect());\n            } else if (child.nodeName === 'BR') {\n                // BR tags also count as new lines only when they are by themselves on a line\n                if (child.parentNode.childNodes.length === 1) {\n                    linePositions.push(child.getBoundingClientRect());\n                }\n            } else {\n                //Continuously check for the bill number or the VA acts of assembly line until we find it\n                //Don't start tagging lines until we reach one of these lines\n                if (child.classList && child.classList.value == \"billnumber\" || child.innerText === \"VIRGINIA ACTS OF ASSEMBLY -- CHAPTER\") {\n                    atBillNumber = true;\n                    oldLocation = tagNewLines(child, oldLocation);\n                    //Skip tagging the patron line\n                } else if (atBillNumber === true && child.classList.value != \"patronLine\") {\n                    //Traverse through this element's children until a text node is reached\n                    oldLocation = tagNewLines(child, oldLocation)\n                }\n                //Continuously check for governor actions lines until we find it\n                //Don't start tagging lines until after these lines\n                if (child.classList && child.classList.value == \"governorsactions\") {\n                    atGovernorsActions = true;\n                } else if (atGovernorsActions === true && child.classList.value != \"governorsactions\") {\n                    //Traverse through this element's children until a text node is reached\n                    oldLocation = tagNewLines(child, oldLocation)\n                }\n                //Go into the table so we can tag the child <tr>s  \n                if (child.nodeName === 'TBODY') {\n                    oldLocation = tagNewLines(child, oldLocation)\n                }\n            }\n        });\n        // Return the last element's location to be compared against the next element's location\n        return oldLocation;\n    }\n});","import tinymce from 'tinymce/tinymce';\n\ntinymce.PluginManager.add('copyheadstyle', function (editor) {\n    // Since TinyMCE is in an iframe the <style> tags and <link> tags from the root document need to be copied into the iframe\n    editor.on('init', _e => {\n        const styleTags = document.head.querySelectorAll('style');\n        styleTags.forEach(element => {\n            const newEl = element.cloneNode(true);\n            editor.contentDocument.head.appendChild(newEl);\n        });\n        const linkTags = document.head.querySelectorAll('link');\n        linkTags.forEach(element => {\n            if(element.attributes.rel && element.attributes.rel.nodeValue === \"stylesheet\") {\n                const newEl = element.cloneNode(true);\n                editor.contentDocument.head.appendChild(newEl);\n            }\n        });\n\n        let addedStyles = document.createElement('style');\n        //This is a fix for firefox since the body element's height is 100% be default\n        addedStyles.innerHTML += 'body {height: auto;}';\n        //They do not want links to be seen in the editor.\n        addedStyles.innerHTML += \"a, a:link, a:hover, a:link:hover {color: #333333; text-decoration: none;}\"\n        editor.contentDocument.head.appendChild(addedStyles);\n    });\n    \n});","import tinymce from 'tinymce/tinymce';\n\ntinymce.PluginManager.add('rejectedbutton', function (editor) {\n    let intialValue = \"REJECTED\";\n    let hasFocus = false;\n    editor.on(\"contextmenu\", e => {\n        // Right clicking the tinymce editor when the editor is not in focus does not add the cursor in the right area.\n        // This is used to counteract that and place the cursor in the about the right spot\n        // At the front of the clicked element\n        if(!hasFocus) {\n            const points = editor.contentDocument.elementsFromPoint(e.x, e.y);\n            if(points.length > 0) {\n                editor.selection.select(points[0], true);\n                editor.selection.collapse(true);\n            }\n            hasFocus = true;\n        }\n    });\n    // Since the contextmenu event fires after focus is gained the state of focus has to be manually controlled here.\n    editor.on(\"click\", () => hasFocus = true);\n    editor.on(\"blur\", () => hasFocus = false);\n\n    const getButton = (buttonText, intialText) => {\n        return {\n            type: \"menuitem\",\n            text: buttonText,\n            onAction: () => {\n                intialValue = intialText;\n                editor.fire(\"contexttoolbar-show\", {toolbarKey:\"rejectedinput\"});\n            }\n        }\n    }\n    const items = [\n        getButton(\"Rejected\", \"REJECTED\"),\n        getButton(\"Withdrawn\", \"WITHDRAWN\"),\n        getButton(\"Ruled Out Of Order\", \"RULED OUT OF ORDER\"),\n        getButton(\"Passed By\", \"PASSED BY\"),\n        getButton(\"Not Specific Or Severable\", \"NOT SPECIFIC OR SEVERABLE\"),\n        getButton(\"Ruled Not Germane\", \"RULED NOT GERMANE\"),\n    ]\n     // Create buttons in the toolbar to add the rejected text\n    editor.ui.registry.addMenuButton('rejectedbuttons', {\n        text:\"Rejected\",\n        fetch: callback => {\n            callback(items)\n        }\n    });\n    // Create button in the right-click context menu to add the rejected text\n    editor.ui.registry.addNestedMenuItem('rejectedbuttonscontext', {\n        text: \"Rejected\",\n        getSubmenuItems: () => {\n            return items;\n        }\n    });\n\n    editor.ui.registry.addContextForm(\"rejectedinput\", {\n        position: \"selection\",\n        scope: \"node\",\n        initValue: () => intialValue,\n        launch: {\n            type: 'contextformbutton',\n            text: 'Submit'\n        },\n        commands: [{\n            type: \"contextformbutton\",\n            text: 'Submit',\n            onAction: formApi => {\n                const value = formApi.getValue();\n                editor.insertContent(`<span class=\"rejected\"> [${value}] </span>`);\n                formApi.hide();\n            }\n        }]\n    })\n});","import tinymce from 'tinymce/tinymce';\n\ntinymce.PluginManager.add('agreedbutton', function (editor) {\n    let intialValue = \"AGREED\";\n    let hasFocus = false;\n    editor.on(\"contextmenu\", e => {\n        // Right clicking the tinymce editor when the editor is not in focus does not add the cursor in the right area.\n        // This is used to counteract that and place the cursor in the about the right spot\n        // At the front of the clicked element\n        if(!hasFocus) {\n            const points = editor.contentDocument.elementsFromPoint(e.x, e.y);\n            if(points.length > 0) {\n                editor.selection.select(points[0], true);\n                editor.selection.collapse(true);\n            }\n            hasFocus = true;\n        }\n    });\n    // Since the contextmenu event fires after focus is gained the state of focus has to be manually controlled here.\n    editor.on(\"click\", () => hasFocus = true);\n    editor.on(\"blur\", () => hasFocus = false);\n\n     // Create buttons in the toolbar to add the agreed to text\n    editor.ui.registry.addButton('agreedbutton', {\n        text:\"Agreed\",\n        onAction: () => {\n            editor.fire(\"contexttoolbar-show\", {toolbarKey:\"agreedinput\"});\n        }\n    });\n    // Create button in the right-click context menu to add the agreed to text\n    editor.ui.registry.addMenuItem('agreedbuttoncontext', {\n        text:\"Agreed\",\n        onAction: () => {\n            editor.fire(\"contexttoolbar-show\", {toolbarKey:\"agreedinput\"});\n        }\n    });\n\n    editor.ui.registry.addContextForm(\"agreedinput\", {\n        position: \"selection\",\n        scope: \"node\",\n        initValue: () => intialValue,\n        launch: {\n            type: 'contextformbutton',\n            text: 'Submit'\n        },\n        commands: [{\n            type: \"contextformbutton\",\n            text: 'Submit',\n            onAction: formApi => {\n                const value = formApi.getValue();\n                intialValue = value\n                editor.insertContent(`<span class=\"agreed\"> [${value}] </span>`);\n                formApi.hide();\n            }\n        }]\n    })\n});","import tinymce from 'tinymce/tinymce';\n\ntinymce.PluginManager.add('createamendment', function (editor) {\n    let selections = {};\n    let members = editor.getParam(\"members\") || [];\n    let committees = editor.getParam(\"committees\") || [];\n    let addAmendmentCallback = editor.getParam(\"addAmendmentCallback\");\n    let userChamber = editor.getParam(\"userChamber\");\n    let billNumber = editor.getParam(\"billNumber\");\n    let allowGovernorAmendmentSponsor = editor.getParam(\"allowGovernorAmendmentSponsor\");\n    let amendmentOrigin = editor.getParam(\"amendmentOrigin\");\n    if (amendmentOrigin && amendmentOrigin === \"H\") { amendmentOrigin = \"HOUSE\" }\n    else if (amendmentOrigin && amendmentOrigin === \"S\") { amendmentOrigin = \"SENATE\" }\n    else if (allowGovernorAmendmentSponsor && amendmentOrigin && amendmentOrigin === \"G\") { amendmentOrigin = \"GOVERNOR\" }\n    let sponsor = editor.getParam(\"sponsor\");\n    let member = editor.getParam(\"member\");\n    let committee = editor.getParam(\"committee\");\n\n    let formItems = [];\n    const placeholder = {\n        text: \"Select\",\n        value: \"\"\n    }\n    if (members.length > 0) {\n        members.unshift(placeholder);\n        formItems = formItems.concat({\n            type: \"selectbox\",\n            name: \"member\",\n            label: \"Choose a member\",\n            items: members\n        });\n    }\n    if (committees.length > 0) {\n        committees.unshift(placeholder);\n        formItems = formItems.concat({\n            type: \"selectbox\",\n            name: \"committee\",\n            label: \"Choose a committee\",\n            items: committees\n        });\n    }\n    editor.ui.registry.addButton('createamendment', {\n        text: 'Add Amendment',\n        onAction: () => {\n            const dialog = editor.windowManager.open(initialPageConfig);\n            if (billNumber) {\n                dialog.setData({ billnumber: billNumber });\n            }\n            if (amendmentOrigin && ['HOUSE', 'SENATE', 'GOVERNOR'].includes(amendmentOrigin.toUpperCase())) {\n                dialog.setData({ amendmentorigin: amendmentOrigin });\n            }\n        }\n    })\n\n    const initialPageConfig = {\n        title: \"Insert Amendment\",\n        body: {\n            type: \"panel\",\n            items: [\n                {\n                    type: \"input\",\n                    name: \"billnumber\",\n                    label: \"Type in a bill number\"\n                },\n                {\n                    type: 'htmlpanel',\n                    html: '<p class=\"small-text\">Select the origin of the amendments and press Next to continue or Cancel to exit</p>'\n                },\n                {\n                    type: \"selectbox\",\n                    name: \"amendmentorigin\",\n                    label: \"Amendment origin\",\n                    items: userChamber === \"Admin\"\n                        ? [\n                            { value: \"HOUSE\", text: \"House\" },\n                            { value: \"SENATE\", text: \"Senate\" },\n                            ...(allowGovernorAmendmentSponsor ? [{ value: \"GOVERNOR\", text: \"Governor\" }] : [])\n                        ]\n                        : userChamber === \"H\"\n                            ? [\n                                { value: \"HOUSE\", text: \"House\" },\n                                ...(allowGovernorAmendmentSponsor ? [{ value: \"GOVERNOR\", text: \"Governor\" }] : [])\n                            ]\n                            : [\n                                { value: \"SENATE\", text: \"Senate\" },\n                                ...(allowGovernorAmendmentSponsor ? [{ value: \"GOVERNOR\", text: \"Governor\" }] : [])\n                            ]\n                },\n            ]\n        },\n        buttons: [\n            {\n                type: \"cancel\",\n                name: \"cancel\",\n                text: \"Cancel\"\n            },\n            {\n                type: \"custom\",\n                name: \"next\",\n                text: \"Next\",\n                disabled: !billNumber || billNumber.length <= 2\n            }\n        ],\n        onChange: (dialogApi) => {\n            const data = dialogApi.getData();\n            // bill numbers will always have more than two characters\n            if (data.billnumber.length > 2 && data.amendmentorigin) {\n                dialogApi.enable('next')\n            } else {\n                dialogApi.disable('next')\n            }\n        },\n        onAction: (dialogApi, details) => {\n            if (details.name === 'next') {\n                selections = { ...selections, ...dialogApi.getData() }\n                if ((!selections.amendmentorigin || selections.amendmentorigin !== \"GOVERNOR\") && (members.length > 0 || committees.length > 0)) {\n                    dialogApi.redial(committeeAndMemberConfig);\n                    if (sponsor && sponsor === \"Member\") {\n                        dialogApi.disable('committee')\n                        if (member) {\n                            dialogApi.setData({ member: member })\n                        }\n                    } else if (sponsor && sponsor === \"Committee\") {\n                        dialogApi.disable('member')\n                        if (committee) {\n                            dialogApi.setData({ committee: committee })\n                        }\n                    }\n                } else {\n                    dialogApi.redial(amendmentTypeDialog);\n                    if (selections.amendmentorigin === 'GOVERNOR' && !selections.versiontype) {\n                        dialogApi.setData({ versiontype: 'enrolled' })\n                    } else if (selections.versiontype) {\n                        dialogApi.setData({ versiontype: selections.versiontype })\n                    }\n                }\n            }\n        }\n    }\n\n    const committeeAndMemberConfig = {\n        title: \"Insert Amendment\",\n        body: {\n            type: \"panel\",\n            items: formItems\n        },\n        buttons: [\n            {\n                type: \"custom\",\n                name: \"previous\",\n                text: \"Previous\"\n            },\n            {\n                type: \"custom\",\n                name: \"next\",\n                text: \"Next\",\n            }\n        ],\n        onChange: (dialogApi) => {\n            const data = dialogApi.getData();\n            if (data.member !== undefined) {\n                if (data.member !== '') {\n                    dialogApi.disable('committee')\n                    dialogApi.setData({ amendmenttype: \"floor\" })\n                } else {\n                    dialogApi.enable('committee')\n                    dialogApi.setData({ amendmenttype: \"\" })\n                }\n            }\n\n            if (data.committee !== undefined) {\n                if (data.committee !== '') {\n                    dialogApi.disable('member')\n                    dialogApi.setData({ amendmenttype: \"committee\" })\n                } else {\n                    dialogApi.enable('member')\n                    dialogApi.setData({ amendmenttype: \"\" })\n                }\n            }\n        },\n        onAction: (dialogApi, details) => {\n            selections = { ...selections, ...dialogApi.getData() }\n            if (details.name === 'next') {\n                dialogApi.redial(amendmentTypeDialog);\n                if (selections.amendmentorigin === 'GOVERNOR' && !selections.versiontype) {\n                    dialogApi.setData({ versiontype: 'enrolled' })\n                } else if (selections.versiontype) {\n                    dialogApi.setData({ versiontype: selections.versiontype })\n                }\n            }\n            if (details.name === \"previous\") {\n                dialogApi.redial(initialPageConfig);\n                if (selections.billnumber) {\n                    dialogApi.setData({ billnumber: selections.billnumber });\n                } else if (billNumber) {\n                    dialogApi.setData({ billnumber: billNumber });\n                }\n                if (selections.amendmentorigin) {\n                    dialogApi.setData({ amendmentorigin: selections.amendmentorigin });\n                } else if (amendmentOrigin && ['HOUSE', 'SENATE', 'GOVERNOR'].includes(amendmentOrigin.toUpperCase())) {\n                    dialogApi.setData({ amendmentorigin: amendmentOrigin });\n                }\n            }\n        }\n    }\n\n    let previousValue = \"1\";\n    const amendmentTypeDialog = {\n        title: \"Insert Amendment\",\n        initialData: {\n            amendmentstobeinserted: previousValue\n        },\n        body: {\n            type: \"panel\",\n            items: [\n                {\n                    type: \"selectbox\",\n                    name: \"versiontype\",\n                    label: \"Version type\",\n                    items: [\n                        { value: \"introduced\", text: \"Introduced\" },\n                        { value: \"substitute\", text: \"Substitute\" },\n                        { value: \"engrossed\", text: \"Engrossed\" },\n                        { value: \"enrolled\", text: \"Enrolled\" }\n                    ]\n                },\n                {\n                    type: \"input\",\n                    name: \"amendmentstobeinserted\",\n                    label: \"Number of amendments to be inserted\",\n                    width: 45,\n                    class: \"fake-class\"\n                }\n            ]\n        },\n        buttons: [\n            {\n                type: \"custom\",\n                name: \"previous\",\n                text: \"Previous\"\n            },\n            {\n                type: \"submit\",\n                name: \"submitbutton\",\n                text: \"OK\"\n            }\n        ],\n        onChange: (dialogApi, details) => {\n            if (details.name === \"amendmentstobeinserted\") {\n                const data = dialogApi.getData();\n                // The amount of amendments to be inserted need to be a number\n                if (isNaN(data.amendmentstobeinserted)) {\n                    dialogApi.setData({ amendmentstobeinserted: previousValue })\n                } else {\n                    previousValue = data.amendmentstobeinserted\n                    if (data.amendmentstobeinserted) {\n                        dialogApi.enable('submitbutton')\n                    } else {\n                        dialogApi.disable('submitbutton')\n                    }\n                }\n            }\n        },\n        onAction: (dialogApi, details) => {\n            if (details.name === 'previous') {\n                selections = { ...selections, ...dialogApi.getData() }\n                if ((!selections.amendmentorigin || selections.amendmentorigin !== \"GOVERNOR\") && (members.length > 0 || committees.length > 0)) {\n                    dialogApi.redial(committeeAndMemberConfig);\n                    if (selections.member) {\n                        dialogApi.disable('committee')\n                        dialogApi.setData({ member: selections.member })\n                    } else if (selections.committee) {\n                        dialogApi.disable('member')\n                        dialogApi.setData({ committee: selections.committee })\n                    } else if (sponsor && sponsor === \"Member\") {\n                        dialogApi.disable('committee')\n                        if (member) {\n                            dialogApi.setData({ member: member })\n                        }\n                    } else if (sponsor && sponsor === \"Committee\") {\n                        dialogApi.disable('member')\n                        if (committee) {\n                            dialogApi.setData({ committee: committee })\n                        }\n                    }\n                } else {\n                    dialogApi.redial(initialPageConfig);\n                    if (selections.billnumber) {\n                        dialogApi.setData({ billnumber: selections.billnumber });\n                    } else if (billNumber) {\n                        dialogApi.setData({ billnumber: billNumber });\n                    }\n                    if (selections.amendmentorigin) {\n                        dialogApi.setData({ amendmentorigin: selections.amendmentorigin });\n                    } else if (amendmentOrigin && ['HOUSE', 'SENATE', 'GOVERNOR'].includes(amendmentOrigin.toUpperCase())) {\n                        dialogApi.setData({ amendmentorigin: amendmentOrigin });\n                    }\n                }\n            }\n        },\n        onSubmit: dialogApi => {\n            selections = { ...selections, ...dialogApi.getData() }\n            const textToBeInserted = amendmentBuilder(selections);\n            // Insert the text after whatever the current selection is\n            const endNode = editor.selection.getEnd();\n            editor.selection.select(endNode);\n            editor.selection.collapse();\n            editor.insertContent(textToBeInserted);\n\n            if (addAmendmentCallback) {\n                addAmendmentCallback(selections);\n            }\n\n            dialogApi.close();\n        }\n    }\n});\n\nconst amendmentBuilder = formData => {\n    const amendmentsToBeInserted = parseInt(formData.amendmentstobeinserted, 10)\n    const billNumberSection = formData.amendmentorigin === 'GOVERNOR' ? '' : `<p class=\"textbl\">(${formData.billnumber.toUpperCase()})</p>`;\n    const titleSection = formData.amendmentorigin === 'GOVERNOR' ? '' : `<p class=\"textbl\">AMENDMENT${amendmentsToBeInserted > 1 ? \"S\" : \"\"} PROPOSED BY ${formData.amendmentorigin !== \"CONFERENCE\" ? \"THE\" : \"\"} ${formData.amendmentorigin}</p>`\n    const committeeSection = formData.committee ? `<p class='i0'>${formData.committee.toUpperCase()}</p>` : \"\";\n    const patronSection = formData.member ? `<p class='i0'>${formData.member.toUpperCase()}</p>` : \"\";\n    let lineSections = '';\n    for (let i = 1; i <= amendmentsToBeInserted; i++) {\n        const lineSection = (i > 1 ? `<p></p>` : '') + (patronSection || committeeSection) + `\n            <p class='textbi'>${i}. Line #, ${formData.versiontype}, after </p>\n            <p class='i10'>strike</p>\n            <p class='i15'></p>\n            <p class='i10'>insert</p>\n            <p class='i15'></p>\n        `;\n        lineSections += lineSection\n    }\n\n    return billNumberSection + titleSection + lineSections;\n}","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport 'tinymce/themes/silver/theme';\nimport 'tinymce/icons/default'\nimport 'tinymce/plugins/paste/plugin';\nimport 'tinymce/plugins/link/plugin';\nimport 'tinymce/plugins/save/plugin';\nimport 'tinymce/plugins/lists/plugin';\nimport 'tinymce/plugins/code/plugin';\nimport 'tinymce/plugins/preview/plugin';\nimport 'tinymce/plugins/searchreplace/plugin';\nimport 'tinymce/plugins/pagebreak/plugin';\nimport 'tinymce/plugins/table/plugin';\nimport '../../../stylesheets/tinymce/oxide/skin.min.css';\nimport '../../../stylesheets/tinymce/legislation_text_stylesheet.scss';\nimport '../../../stylesheets/tinymce/custom.scss';\nimport { Editor } from '@tinymce/tinymce-react';\nimport '../../../lis-shared/tinymce/lineNumberPlugin';\nimport '../../../lis-shared/tinymce/copyHeadStylePlugin';\nimport '../../../lis-shared/tinymce/rejectedButtonPlugin';\nimport '../../../lis-shared/tinymce/agreedButtonPlugin';\nimport '../../../lis-shared/tinymce/createAmendmentPlugin';\nimport '../../../lis-shared/tinymce/rightMarginPlugin';\nimport tinymce from 'tinymce';\n\nclass ReviewSection extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            members: [],\n            committees: [],\n            selectedBillNumberIsLoaded: true,\n            selectedSponsorIsLoaded: true,\n            selectedMemberIsLoaded: true,\n            selectedCommitteeIsLoaded: true,\n            showLineNumbers: true,\n            showTooltip: false,\n            currentFormats: \"\"\n        }\n\n        this.toggleShowLineNumbers = this.toggleShowLineNumbers.bind(this);\n        this.toggleTooltip = this.toggleTooltip.bind(this);\n        this.setFormat = this.setFormat.bind(this);\n    }\n\n    loadMembers(sessionId) {\n        this.setState({ memberIsLoaded: false })\n        this.props.actions.getMemberList(`sessionID=${sessionId}`)\n            .then(() => {\n                const members = this.props.members.memberList\n                    .filter(m => m.ListDisplayName)\n                    .map(m => ({ value: (m.ChamberCode === \"H\" ? \"DEL. \" : \"SEN. \") + m.PatronDisplayName, text: m.ListDisplayName }));\n                this.setState({\n                    members: members\n                }, () => {\n                    if (this.props.membersCallback) {\n                        this.props.membersCallback(this.props.members.memberList)\n                    }\n                });\n            }).finally(() => {\n                this.setState({\n                    memberIsLoaded: true\n                })\n            });\n    }\n\n    loadCommittees(sessionId) {\n        this.setState({ committeIsLoaded: false })\n        this.props.actions.getCommitteeList(`sessionID=${sessionId}` + \"&includeSubCommittees=true\")\n            .then(() => {\n                const committees = this.props.committee.committeeList.filter(x => !x.ParentCommitteeID).map(c => ({ value: c.Name, text: c.Name }));\n                this.setState({\n                    committees: committees\n                }, () => {\n                    if (this.props.committeesCallback) {\n                        this.props.committeesCallback(this.props.committee.committeeList)\n                    }\n                });\n            }).finally(() => {\n                this.setState({\n                    committeeIsLoaded: true\n                })\n            });\n    }\n\n    handleEditorChange(content) {\n        this.props.handleEditorChange(content);\n        //Hack to set the cursor position to the right of the first character entered\n        //This is because the editor sets the cursor position to index 0 after automatically applying the default style to the first paragraph\n\n        //We replace the content of the editor with itself after entering the first character and automatically applying the default format in the parent component\n        //This places the cursor on the right hand side of the character\n        //The booleans are used to prevent an infinite loop of handleEditorChange calls\n\n        //If the editor had no content after the last keydown then mark the editor as having been empty\n        if (content.length === 0 && !this.props.wasEmpty) {\n            this.props.setWasEmpty(true);\n            //Else if the content length is 24 (Paragraph tag with the section class apllied containing one character)\n            //And the editor was previously empty\n            //And there has been no replacement yet\n            //Then mark that the edior was not empty after the last keydown, that the text has been replaced, and then execute the replacement\n        } else if (content.length == 24 && this.props.wasEmpty && !this.props.replaced) {\n            this.props.setWasEmpty(false, () => {\n                this.props.setReplaced(true, () => {\n                    tinymce.activeEditor.execCommand('selectAll');\n                    tinymce.activeEditor.execCommand('mceReplaceContent', true, content);\n                });\n            })\n            //Else this was any other kind of keydown event, mark that the editor was not empty, and that no replacement took place\n        } else {\n            this.props.setWasEmpty(false, () => {\n                this.props.setReplaced(false);\n            })\n        }\n    }\n\n    toggleShowLineNumbers() {\n        this.setState({\n            showLineNumbers: !this.state.showLineNumbers\n        }, () => {\n            if (this.state.showLineNumbers) {\n                localStorage.setItem(\"showLineNumbers\", true)\n                tinymce.activeEditor.execCommand(\"mceInsertNewLine\");\n                tinymce.activeEditor.execCommand(\"Undo\");\n            } else {\n                localStorage.setItem(\"showLineNumbers\", false)\n                tinymce.activeEditor.execCommand(\"mceInsertNewLine\");\n                tinymce.activeEditor.execCommand(\"Undo\");\n            }\n        })\n    }\n\n    toggleTooltip() {\n        this.setState({\n            showTooltip: !this.state.showTooltip\n        })\n    }\n\n    setFormat() {\n        this.setState({\n            currentFormats: tinymce.activeEditor.contentWindow.getSelection().focusNode.parentElement.classList[0] //We can always assume classList[0] because we only allow one format at a time\n        })\n    }\n\n    componentDidMount() {\n        //Default line numbers off for very large bills to prevent crashing on initial laod\n        if (this.props.editorContent.length < 80000 && !this.props.versionAuthoring) {\n            localStorage.setItem(\"showLineNumbers\", true);\n        } else {\n            this.setState({\n                showLineNumbers: false\n            }, () => {\n                localStorage.setItem(\"showLineNumbers\", false);\n            })\n        }\n\n        if (this.props.sessionId) {\n            this.loadCommittees(this.props.sessionId);\n            this.loadMembers(this.props.sessionId);\n        } else {\n            this.setState({\n                committeeIsLoaded: true,\n                memberIsLoaded: true\n            })\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        if (prevProps.sessionId !== this.props.sessionId) {\n            this.loadCommittees(this.props.sessionId);\n            this.loadMembers(this.props.sessionId);\n        }\n\n        //below is annoying and seems useless but is needed in order to get the add amendment wizard to auto-populate based on user's sponsor/member/cmte choices\n        if (prevProps.billNumber !== this.props.billNumber || prevProps.selectedSponsor !== this.props.selectedSponsor || prevProps.selectedMember !== this.props.selectedMember || prevProps.selectedCommittee !== this.props.selectedCommittee) {\n            this.setState({ selectedBillNumberIsLoaded: false, selectedSponsorIsLoaded: false, selectedMemberIsLoaded: false, selectedCommitteeIsLoaded: false, }, () => {\n                this.setState({ selectedBillNumberIsLoaded: true, selectedSponsorIsLoaded: true, selectedMemberIsLoaded: true, selectedCommitteeIsLoaded: true })\n            })\n        }\n    }\n\n    render() {\n        if (!this.state.memberIsLoaded || !this.state.committeeIsLoaded || !this.state.selectedBillNumberIsLoaded || !this.state.selectedSponsorIsLoaded || !this.state.selectedMemberIsLoaded || !this.state.selectedCommitteeIsLoaded) {\n            return <div className=\"spinner center-spinner\"></div>;\n        }\n\n        const setup = (editor) => {\n            editor.ui.registry.addToggleButton('bracketbutton', {\n                text: \"[ ]\",\n                tooltip: \"Insert Brackets\",\n                onAction: function () {\n                    editor.insertContent('<span class=\"bracket\">[</span> ');\n                    let bookmark = editor.selection.getBookmark(2);\n                    editor.insertContent('<span class=\"bracket\">]</span>')\n                    editor.selection.moveToBookmark(bookmark);\n                }\n            });\n            editor.ui.registry.addToggleButton('lBracketbutton', {\n                text: \"[\",\n                tooltip: \"Insert Left Bracket\",\n                onAction: function () {\n                    editor.insertContent('<span class=\"bracket\">[</span>');\n                }\n            });\n            editor.ui.registry.addToggleButton('rBracketbutton', {\n                text: \"]\",\n                tooltip: \"Insert Right Bracket\",\n                onAction: function () {\n                    editor.insertContent('<span class=\"bracket\">]</span>');\n                }\n            });\n            editor.ui.registry.addToggleButton('sectionButton', {\n                text: \"§\",\n                tooltip: \"Insert Section Symbol\",\n                onAction: function () {\n                    editor.insertContent('§');\n                }\n            });\n            editor.on(\"keydown\", (e) => {\n                this.setFormat();\n            });\n            editor.on(\"click\", (e) => {\n                this.setFormat();\n            })\n        }\n\n        return (\n            <React.Fragment key={this.props.reviewKey}>\n                <div className='inner-grid eight-and-one'>\n                    <div />\n                    <div style={{ display: \"inline-flex\", marginBottom: \"20px\", marginTop: this.props.location === \"/amendment-management\" ? \"13px\" : \"8px\" }}>\n                        <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip() }} className=\"button info\" style={{ margin: \"10px 10px 0 0\" }}>Info</a>\n                        <button type=\"button\" className=\"button primary\" onClick={() => this.toggleShowLineNumbers()}>{(this.state.showLineNumbers ? \"Hide\" : \"Show\") + \" Line Numbers\"}</button>\n                        {this.state.showTooltip &&\n                            <div className=\"info-box editor-tooltip\">\n                                <p>Hiding line numbers will improve the response time of the editor. You may turn them back on at any point during editing. It may take some time to turn on line numbers for exceptionally large bills.</p>\n                            </div>\n                        }\n                    </div>\n                </div>\n                <div style={{ width: \"100%\", height: \"40px\" }}>\n                    {this.state.currentFormats &&\n                        <span style={{ float: \"right\" }}>{\"Format: \" + this.state.currentFormats}</span>\n                    }\n                </div>\n                <Editor\n                    value={this.props.editorContent}\n                    init={{\n                        setup: setup,\n                        browser_spellcheck: true,\n                        height: this.props.height || 500,\n                        plugins: 'paste save lists preview searchreplace pagebreak code linenumbers table copyheadstyle rightmargin' + (this.props.allowAmendmentActions ? ' rejectedbutton agreedbutton createamendment' : ''),\n                        toolbar: 'undo redo | styleselect | fontsizeselect | bold italic strikethrough underline | alignleft aligncenter alignright | bracketButton lBracketbutton rBracketbutton | sectionButton | ' + (this.props.allowAmendmentActions && !this.props.overrideRemoveAgreeRejectButtons ? ' | rejectedbuttons agreedbutton' : '') + (this.props.allowAmendmentActions && !this.props.overrideRemoveCreateAmendmentButton ? ' | createamendment' : ''),\n                        contextmenu: this.props.allowAmendmentActions ? 'rejectedbuttonscontext agreedbuttoncontext' : '',\n                        skin: false,\n                        paste_as_text: this.props.pasteAsText || this.props.pasteAsText === undefined,\n                        members: this.state.members,\n                        committees: this.state.committees,\n                        valid_children: '+body[style]',\n                        content_css: false,\n                        content_style: 'table { border-collapse: collapse; border: 1px solid #FFFFFF; }' + 'td { padding: 12px 0px; }',\n                        userChamber: this.props.userChamber,\n                        billNumber: this.props.billNumber,\n                        sponsor: this.props.selectedSponsor ? this.props.selectedSponsor.value : '',\n                        member: this.props.selectedMember && this.state.members.find(m => m.text === this.props.selectedMember.value.ListDisplayName) ? this.state.members.find(m => m.text === this.props.selectedMember.value.ListDisplayName).value : '',\n                        committee: this.props.selectedCommittee && this.state.committees.find(c => c.text === this.props.selectedCommittee.value.Name) ? this.state.committees.find(c => c.text === this.props.selectedCommittee.value.Name).value : '',\n                        amendmentOrigin: this.props.selectedMember && this.state.members.find(m => m.text === this.props.selectedMember.value.ListDisplayName) ? this.props.selectedMember.value.ChamberCode : this.props.selectedCommittee && this.state.committees.find(c => c.text === this.props.selectedCommittee.value.Name) ? this.props.selectedCommittee.value.ChamberCode : this.props.amendmentOrigin ? this.props.amendmentOrigin : '',\n                        allowGovernorAmendmentSponsor: this.props.allowGovernorAmendmentSponsor,\n                        paste_word_valid_elements: 'p,table,tbody,td,tr,s,u,b,sup,sub',\n                        paste_convert_word_fake_lists: false, //doesn't convert indented <p> tags to <ul>,<ol> etc...\n                        paste_enable_default_filters: false, //doesn't add the TinyMCE classes\n                        paste_data_images: true,\n                        paste_preprocess: function (plugin, args) { //removes the Word \"curved quotes\"\n                            args.content = args.content.replace('&ldquo;', '\"').replace('&rdquo;', '\"').replace('\"', '\"').replace('\"', '\"');\n                        },\n                        table_default_attributes: {\n                            border: '0'\n                        },\n                        formats: {\n                            section: {\n                                block: 'p', attributes: { class: 'section' }\n                            },\n                            ldtitle: {\n                                block: 'p', attributes: { class: 'ldtitle' }\n                            },\n                            enactstatement: {\n                                block: 'p', attributes: { class: 'enactstm' }\n                            },\n                            enactclause: {\n                                block: 'p', attributes: { class: 'enactcls' }\n                            },\n                            billnumber: {\n                                block: 'p', attributes: { class: 'billno' }\n                            },\n                            catchline: {\n                                block: 'p', attributes: { class: 'catchln' }\n                            },\n                            rejected: {\n                                block: 'p', attributes: { class: 'rejected' }\n                            },\n                            i10: {\n                                block: 'p', attributes: { class: 'i10' }\n                            },\n                            i0: {\n                                block: 'p', attributes: { class: 'i0' }\n                            },\n                            i15: {\n                                block: 'p', attributes: { class: 'i15' }\n                            },\n                            i20: {\n                                block: 'p', attributes: { class: 'i20' }\n                            },\n                            customcenter: {\n                                block: 'p', attributes: { class: 'center' }\n                            },\n                            strikethrough: {\n                                inline: 's'\n                            },\n                            end: {\n                                block: 'p', attributes: { class: 'end' }\n                            },\n                            textind: {\n                                block: 'p', attributes: { class: 'textind' }\n                            },\n                            textbl: {\n                                block: 'p', attributes: { class: 'textbl' }\n                            },\n                            textbi: {\n                                block: 'p', attributes: { class: 'textbi' }\n                            },\n                            textasis: {\n                                block: 'p', attributes: { class: 'textasis' }\n                            },\n                            table: {\n                                block: 'p', attributes: { class: 'table' }\n                            },\n                            testc: {\n                                block: 'p', attributes: { class: 'testc' }\n                            },\n                            tablec: {\n                                block: 'p', attributes: { class: 'tablec' }\n                            },\n                            tblhdn: {\n                                block: 'p', attributes: { class: 'tblhdn' }\n                            },\n                            tbllft: {\n                                block: 'p', attributes: { class: 'tbllft' }\n                            },\n                            tblctr: {\n                                block: 'p', attributes: { class: 'tblctr' }\n                            },\n                            tblrt: {\n                                block: 'p', attributes: { class: 'tblrt' }\n                            },\n                            txtctr: {\n                                block: 'p', attributes: { class: 'txtctr' }\n                            },\n                            drafter: {\n                                block: 'p', attributes: { class: 'drafter' }\n                            },\n                            billblank: {\n                                block: 'p', attributes: { class: 'billblank' }\n                            },\n                            pro: {\n                                block: 'p', attributes: { class: 'pro' }\n                            },\n                            sumtext: {\n                                block: 'p', attributes: { class: 'sumtext' }\n                            },\n                            lddata: {\n                                block: 'p', attributes: { class: 'lddata' }\n                            },\n                            ld: {\n                                block: 'p', attributes: { class: 'ld' }\n                            },\n                            patctr: {\n                                block: 'p', attributes: { class: 'patctr' }\n                            },\n                            patalt: {\n                                block: 'p', attributes: { class: 'patalt' }\n                            },\n                            textrt: {\n                                block: 'p', attributes: { class: 'textrt' }\n                            },\n                            testhdrchar: {\n                                block: 'p', attributes: { class: 'testhdrchar' }\n                            },\n                            texthdr: {\n                                block: 'p', attributes: { class: 'texthdr' }\n                            },\n                            new: {\n                                block: 'p', classes: 'new'\n                            }\n                        },\n                        style_formats: [\n                            { title: 'Section', format: 'section' },\n                            { title: 'LD Title', format: 'ldtitle' },\n                            { title: 'Enact Statement', format: 'enactstatement' },\n                            { title: 'Enact Clause', format: 'enactclause' },\n                            { title: 'Bill Number', format: 'billnumber' },\n                            { title: 'Catchline', format: 'catchline' },\n                            { title: 'Rejected', format: 'rejected' },\n                            { title: 'i10', format: 'i10' },\n                            { title: 'i0', format: 'i0' },\n                            { title: 'i15', format: 'i15' },\n                            { title: 'i20', format: 'i20' },\n                            { title: 'Center', format: 'customcenter' },\n                            { title: \"End\", format: \"end\" },\n                            { title: \"Textind\", format: \"textind\" },\n                            { title: \"Textbl\", format: \"textbl\" },\n                            { title: \"Textbi\", format: \"textbi\" },\n                            { title: \"Textasis\", format: \"textasis\" },\n                            { title: \"Table\", format: \"table\" },\n                            { title: \"Testc\", format: \"testc\" },\n                            { title: \"Tablec\", format: \"tablec\" },\n                            { title: \"Tblhdn\", format: \"tblhdn\" },\n                            { title: \"Tbllft\", format: \"tbllft\" },\n                            { title: \"Tblctr\", format: \"tblctr\" },\n                            { title: \"Tblrt\", format: \"tblrt\" },\n                            { title: \"Txtctr\", format: \"txtctr\" },\n                            { title: \"Drafter\", format: \"drafter\" },\n                            { title: \"Billblank\", format: \"billblank\" },\n                            { title: \"Pro\", format: \"pro\" },\n                            { title: \"Sumtext\", format: \"sumtext\" },\n                            { title: \"Lddata\", format: \"lddata\" },\n                            { title: \"Ld\", format: \"ld\" },\n                            { title: \"Patctr\", format: \"patctr\" },\n                            { title: \"Patalt\", format: \"patalt\" },\n                            { title: \"Textrt\", format: \"textrt\" },\n                            { title: \"Testhdrchar\", format: \"testhdrchar\" },\n                            { title: \"Texthdr\", format: \"texthdr\" },\n                            { title: \"New\", format: \"new\" }\n                        ],\n                    }}\n                    onEditorChange={(e) => this.handleEditorChange(e)}\n                />\n            </React.Fragment>\n        );\n    }\n}\n\n\nexport default connect(\n    (state) => {\n        const { committee, members } = state;\n        return {\n            committee,\n            members\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, committeeActionCreators, memberActionCreators), dispatch)\n        }\n    }\n)(ReviewSection)","import jwtDecode from 'jwt-decode';\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst idToken = 'LIS_ID_TOKEN';\nconst refreshToken = 'LIS_REFRESH_TOKEN';\nconst refreshTokenExpiration = 'LIS_REFRESH_TOKEN_EXPIRATION';\nconst claims = \"LIS_CLAIMS\";\nconst graphToken = 'GRAPH_ID_TOKEN';\n\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nlet abortController = new window.AbortController();\nlet signal = abortController ? abortController.signal : \"\";\n\nexport const cancelRequest = () => {\n    if (abortController)\n        abortController.abort();\n}\n\n//The only difference between publicRequest and partnerRequest is that partnerRequest checks to see if the token is valid and sends it with the fetch\nexport const publicRequest = (url, method, headers, body, params) => {\n    let config = {\n        method: method,\n    }\n    if (headers) {\n        headers.WebAPIKey = process.env.REACT_APP_API_KEY;\n        config.headers = headers;\n    } else {\n        config.headers = {\n            WebAPIKey: process.env.REACT_APP_API_KEY\n        }\n    }\n    if (body) {\n        config.body = JSON.stringify(body)\n    }\n    if (signal && signal != \"\" && signal.aborted === true) {\n        //Refresh the abortController because you can't reset the abort property of a signal\n        abortController = new window.AbortController();\n        signal = abortController ? abortController.signal : \"\";\n    }\n    if (signal && signal != \"\") {\n        config.signal = signal;\n    }\n    return fetch(url + params, config)\n        .then(response => {\n            if (response.status === 204) {\n                //Some endpoints do not return anything if there is no data to be returned. So NO_CONTENT must be specified as it is not always an error\n                throw [NO_CONTENT, 'No Content'];\n            } else if (response.status > 399) {\n                //There was a request failure. Return the response. Do not try to convert it to a JSON object as there is no guarantee that it is formatted as a json\n                return (response.text()\n                    .then(text => {\n                        console.log(text);\n                        return Promise.reject([REQUEST_FAILURE, text])\n                    })\n                )\n            }\n            return response\n\n        })\n        .then(response =>\n            //Our request is successful. Convert it to JSON\n            response.json().then(data => ({ data, response }))\n        )\n        .then(({ data, response }) => {\n            return [REQUEST_SUCCESS, data, response.headers]\n        })\n        .catch(err => err);\n}\n\nexport const partnerRequest = (url, method, headers, body, params, nonAbortable) => {\n    //Check the token first to see if it is valid\n    return checkToken()\n        .then(() => {\n            //Just in case the method is initiated with a blank string as the headers\n            if (!headers) {\n                headers = {\n                    'content-type': \"application/json; charset=utf-8\"\n                }\n            }\n            headers.Authorization = \"Bearer \" + localStorage.getItem(idToken);\n            headers.WebAPIKey = process.env.REACT_APP_API_KEY;\n            let config = {\n                method: method,\n                headers: headers,\n            }\n            if (body) {\n                if (body instanceof FormData) {\n                    config.body = body\n                } else {\n                    config.body = JSON.stringify(body);\n                }\n            }\n            if (signal && signal != \"\" && signal.aborted === true) {\n                //Refresh the abortController because you can't reset the abort property of a signal\n                abortController = new window.AbortController();\n                signal = abortController ? abortController.signal : \"\";\n            }\n            if (signal && !nonAbortable) {\n                config.signal = signal;\n            }\n            return fetch(url + params, config)\n        })\n        .then(response => {\n            if (response.status === 204) {\n                throw [NO_CONTENT, 'No Content'];\n            } else if (response.status > 399) {\n                return (response.text()\n                    .then(text => {\n                        return Promise.reject([REQUEST_FAILURE, text])\n                    })\n                )\n            }\n            return response\n\n        })\n        .then(response =>\n            response.json().then(data => ({ data, response }))\n        )\n        .then(({ data, response }) => {\n            return [REQUEST_SUCCESS, data, response.headers]\n        })\n        .catch(err => err);\n\n}\n\nexport const checkToken = () => {\n    let token = localStorage.getItem(idToken);\n\n    if (token !== null && token !== 'undefined') {\n        const decode = jwtDecode(token);\n        const stringToken = JSON.stringify(decode);\n        const parsedToken = JSON.parse(stringToken);\n        //If true then then expiration hasn't passed yet. So return a promise so partnerRequest can keep on running\n        if (parsedToken.exp < new Date().getTime() / 1000) {\n            return getNewToken(function (result) {\n                return result\n            })\n        } else {\n            return new Promise(function (resolve, reject) { resolve(true) });\n        }\n    } else {\n        return Promise.reject([REQUEST_FAILURE, 'Error: No Token']);\n    }\n}\n\nconst getNewToken = (callback) => {\n    let rtoken = localStorage.getItem(refreshToken);\n    let config = {\n        method: 'POST',\n        headers: {\n            \"authorization\": rtoken,\n            \"content-type\": \"application/json; charset=utf-8\",\n            \"WebAPIKey\": process.env.REACT_APP_API_KEY\n        }\n    }\n    return fetch((API_URL || process.env.REACT_APP_AUTH_API_URL) + '/Authentication/api/RefreshAccessTokenAsync', config)\n        .then(response => {\n            if (response.status === 204) { return Promise.reject('Error: No Content') }\n            else if (response.status === 401) {\n                //The user's token is expired. Log them out\n                localStorage.removeItem(idToken);\n                localStorage.removeItem(refreshToken);\n                localStorage.removeItem(refreshTokenExpiration);\n                localStorage.removeItem(claims);\n                localStorage.removeItem(graphToken);\n\n                return Promise.reject(\"Error: Refresh Token Expired\");\n            }\n            else if (response.status > 399) { return Promise.reject([REQUEST_FAILURE, response.text()]) }\n            else { return response }\n        })\n        .then(response =>\n            response.json().then(user => ({ user, response }))\n        ).then(({ user, response }) => {\n            // If refresh was successful, set the tokens in local storage\n            let roles = [];\n            if (user.Claims && user.Claims.Roles) {\n                roles = user.Claims.Roles;\n            }\n            localStorage.setItem(claims, JSON.stringify(roles));\n            localStorage.setItem(idToken, user.AccessToken);\n            localStorage.setItem(refreshToken, user.RefreshToken);\n            //604800000 is 7 days in milliseconds\n            localStorage.setItem(refreshTokenExpiration, new Date().getTime() + 604800000)\n            callback(0);\n        }).catch(err => callback([REQUEST_FAILURE, Promise.reject(err)]))\n}","const getHtml = (jsonObject) => {\n    //Check that the param is an object before beginning\n    if (typeof jsonObject !== 'object' || jsonObject === null) {\n        console.error(\"jsonObject param is not an object\")\n        return null;\n    }\n    return mapJson(jsonObject);\n}\n\n\nconst mapJson = (object) => {\n    if (typeof object === \"string\") {\n        return object;\n    }\n\n    let headerContent = document.createElement('div');\n    headerContent.id = \"header-content\";\n\n    for (const c of object[\"Content\"]) {\n        if (c !== \"\") {\n            if (c[\"Content\"] && c[\"Content\"].length > 1) {\n                let content = document.createElement(c[\"TagName\"]);\n\n                for (const nc of c[\"Content\"]) {\n                    //If the nested content has its own content then build out an element for it\n                    //Otherwise it's a string, so just append it to the parent content                    \n                    if (nc[\"Content\"]) {\n                        //We have nested content within the nested content\n                        if (nc[\"Content\"].length > 1) {\n                            let hierarchicalContent = document.createElement(nc[\"TagName\"]);\n                            for (const nnc of nc[\"Content\"]) {\n                                if (nnc[\"Content\"]) {\n                                    let nestedNestedContent = document.createElement(nnc[\"TagName\"]);\n                                    nestedNestedContent.appendChild(document.createTextNode(nnc[\"Content\"]));\n                                    nestedNestedContent.style.cssText = (nnc[\"Attributes\"] && nnc[\"Attributes\"].Style) ? nnc[\"Attributes\"].Style : \"\";\n                                    if (nnc[\"Attributes\"] && nnc[\"Attributes\"].Class) {\n                                        nestedNestedContent.classList = nnc[\"Attributes\"].Class;\n                                    }\n                                    hierarchicalContent.appendChild(nestedNestedContent);\n                                    content.appendChild(hierarchicalContent);\n                                } else {\n                                    hierarchicalContent.appendChild(document.createTextNode(nnc));\n                                    content.appendChild(hierarchicalContent)\n                                }\n                            }\n                        } else {\n                            let nestedContent = document.createElement(nc[\"TagName\"]);\n                            nestedContent.appendChild(document.createTextNode(nc[\"Content\"]));\n                            nestedContent.style.cssText = (nc[\"Attributes\"] && nc[\"Attributes\"].Style) ? nc[\"Attributes\"].Style : \"\";\n                            if (nc[\"Attributes\"] && nc[\"Attributes\"].Class) {\n                                nestedContent.classList = nc[\"Attributes\"].Class;\n                            }\n                            content.appendChild(nestedContent);\n                        }\n                    } else {\n                        content.appendChild(document.createTextNode(nc));\n                    }\n                }\n\n                content.style.cssText = c[\"Attributes\"].Style ? c[\"Attributes\"].Style : \"\";\n                if (c[\"Attributes\"].Class) {\n                    content.classList = c[\"Attributes\"].Class;\n                }\n                headerContent.appendChild(content)\n            } else {\n                let content = document.createElement(c[\"TagName\"]);\n                content.appendChild(document.createTextNode(c[\"Content\"]));\n                content.style.cssText = c[\"Attributes\"].Style ? c[\"Attributes\"].Style : \"\";\n                if (c[\"Attributes\"].Class) {\n                    content.classList = c[\"Attributes\"].Class;\n                }\n                headerContent.appendChild(content)\n            }\n        }\n    }\n\n    return headerContent.outerHTML.toString()\n}\n\nexport default getHtml;","import React from 'react';\nimport renderHTML from 'react-render-html';\n\nclass AmendmentSection extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            shown: [],\n            showAll: false,\n            showInactiveAmendments: false\n        }\n\n        this.getAmendmentDescription = this.getAmendmentDescription.bind(this);\n        this.showAmendment = this.showAmendment.bind(this);\n        this.showAllAmendments = this.showAllAmendments.bind(this);\n        this.toggleInactiveAmendments = this.toggleInactiveAmendments.bind(this);\n    }\n\n    getAmendmentDescription(amendment) {\n        let descriptionAndDisposition = amendment.Description;\n\n        if (!amendment.DocumentCode || amendment.DocumentCode === \"\") {\n            return descriptionAndDisposition;\n        }\n\n        if (amendment.TextDispositionID === 12) {\n            return descriptionAndDisposition + \" Engrossed\"\n        }\n\n        if (amendment.TextDisposition === \"Hold\") {\n            return descriptionAndDisposition;\n        } else if (amendment.TextDisposition !== \"Posted\") {\n            descriptionAndDisposition = `${amendment.Description} ${amendment.TextDisposition || ''}`;\n        }\n\n        if (amendment.IsReprint && !descriptionAndDisposition.includes(\"(Reprint)\")) {\n            descriptionAndDisposition = descriptionAndDisposition + \" (Reprint)\";\n        }\n\n        if (amendment.LDNumber) {\n            descriptionAndDisposition = descriptionAndDisposition + \" - \" + amendment.LDNumber;\n        }\n\n        return descriptionAndDisposition;\n    }\n\n    showAmendment(e, index) {\n        if (e) {\n            e.stopPropagation();\n        }\n        let shown = [...this.state.shown];\n        shown[index] = !shown[index];\n        this.setState({\n            shown: shown\n        });\n    }\n\n    showAllAmendments(e) {\n        if (e) {\n            e.stopPropagation();\n        }\n        const opposite = !this.state.showAll;\n        let shown = new Array(this.props.amendments.length).fill(opposite);\n        this.setState({\n            showAll: opposite,\n            shown: shown\n        });\n    }\n\n    toggleInactiveAmendments() {\n        this.setState(state => ({\n            showInactiveAmendments: !state.showInactiveAmendments\n        }));\n    }\n\n    componentDidUpdate(prevProps) {\n        if (this.props.amendments !== prevProps.amendments) {\n            this.setState({\n                shown: [],\n                showAll: false,\n                showInactiveAmendments: false\n            });\n        }\n    }\n\n    render() {\n        const { shown, showAll, showInactiveAmendments } = this.state;\n        let amendments = [...this.props.amendments];\n        if (!showInactiveAmendments) {\n            amendments = amendments.filter(amendment => amendment.IsActive);\n        }\n        return (\n            <div style={{ backgroundColor: 'white', padding: \"10px\" }}>\n                <div className=\"flex-row\">\n                    <div className=\"flex-row flex-vertical-center\">\n                        {this.props.amendments.find(amendment => !amendment.IsActive) &&\n                            <React.Fragment>\n                                <input style={{ margin: '0px 5px' }} type=\"checkbox\" onChange={this.toggleInactiveAmendments} checked={showInactiveAmendments} />\n                                <label>Show Inactive Amendments</label>\n                            </React.Fragment>\n                        }\n                    </div>\n                    <div>\n                        {this.props.amendments.length > 0 &&\n                            <button onClick={this.showAllAmendments} className=\"button-link\" type=\"button\">{showAll ? \"Collapse All +/-\" : \"Expand All +/-\"}</button>\n                        }\n                    </div>\n                </div>\n                {amendments.map((amendment, index) =>\n                    <div key={index}>\n                        <div>\n                            <button onClick={e => this.showAmendment(e, index)} className={`data-url ${shown[index] ? \"arrow-up\" : \"arrow-down\"}`}></button>\n                            <label className=\"small-text\">{this.getAmendmentDescription(amendment)}</label>\n                            {!amendment.IsActive && <label>{\" (INACTIVE)\"}</label>}\n                        </div>\n                        {shown[index] &&\n                            <div className=\"dlas-forms amendments-review\">\n                                {amendment.DraftText ? renderHTML(amendment.DraftText) : ''}\n                            </div>\n                        }\n                        {index !== amendments.length - 1 && <hr />}\n                    </div>\n                )}\n            </div>\n        );\n    }\n}\n\nexport default AmendmentSection;\n","import React from 'react';\nimport { Prompt } from 'react-router';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport moment from 'moment-timezone';\nimport ReactToPrint from 'react-to-print';\nimport Popout from '../../../lis-shared/lis-layout/components/lis-popout-component';\nimport DatePicker from 'react-datepicker';\nimport getHtml from '../../../services/json-to-html';\n\nimport BillGridSection from './lis-bill-grid';\nimport SelectorSection from './lis-selectors';\nimport AmendmentSection from './lis-amendments';\nimport ReviewSection from './lis-review';\nimport PreviewSection from './lis-bill-preview';\nimport TextList from './lis-text-list';\nimport { printActionCreators } from '../../../stores/lis-print-store';\n\nclass VersionManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            billFieldsetIsActive: true,\n            amendmentFieldsetIsActive: false,\n            reviewFieldsetIsActive: false,\n            sessionOptions: [],\n            legOptions: [],\n            billVersionRef: [],\n            selectedSession: '',\n            selectedLegType: '',\n            originalBillText: [],\n            selectedBillText: '',\n            selectedBillTextIndex: -1,\n            isLoaded: true,\n            billList: [],\n            selectedBill: '',\n            billText: '',\n            amendments: [],\n            isPreviewVisible: false,\n            processingFile: false,\n            showPortal: false,\n            billDataIsLoading: null,\n            showCompletedItems: false,\n            versionDate: moment(),\n            legDateOptions: [],\n            selectedLegDate: '',\n            selectedLegNum: '',\n            showHeaders: true,\n            headers: null,\n            reviewKey: 1,\n            previewContent: '',\n            previewContentError: '',\n            editorChanged: false,\n            savedReviewContent: '',\n            gettingIncompletePdf: false,\n            showIncompletePdf: false,\n            checkedBills: [],\n            enrolledPrintQueue: [],\n            useCurrentPublishDates: true,\n            reviewContent: '',\n            onReconvene: false,\n            isDirty: false,\n            showTextConfirmation: false,\n            showBillConfirmation: false,\n            changeCount: 0,\n            storedTextIndex: 0,\n            storedBill: \"\",\n            storedBillIndex: 0,\n            sessionBillsList: [],\n            wasEmpty: false,\n            replaced: false,\n            checkAll: false,\n            lastCheckedBills: []\n        };\n\n        //Ref used to scroll down to amendment section\n        this.amendmentRef = React.createRef();\n        this.reviewRef = React.createRef();\n\n        this.togglePreview = this.togglePreview.bind(this);\n        this.togglePortal = this.togglePortal.bind(this);\n        this.toggleFieldsetCollapse = this.toggleFieldsetCollapse.bind(this);\n        this.handleSelectorChange = this.handleSelectorChange.bind(this);\n        this.checkHandleSelectorChange = this.checkHandleSelectorChange.bind(this);\n        this.selectBill = this.selectBill.bind(this);\n        this.selectBillIndex = this.selectBillIndex.bind(this);\n        this.checkBill = this.checkBill.bind(this);\n        this.batchPublish = this.batchPublish.bind(this);\n        this.batchComplete = this.batchComplete.bind(this);\n        this.togglePublishDatePreference = this.togglePublishDatePreference.bind(this);\n        this.handlePublishDateChange = this.handlePublishDateChange.bind(this);\n        this.toggleCompleteItems = this.toggleCompleteItems.bind(this);\n        this.handleEditorChange = this.handleEditorChange.bind(this);\n        this.handleSave = this.handleSave.bind(this);\n        this.handleSaveCompletedItem = this.handleSaveCompletedItem.bind(this);\n        this.handleVersionDateChange = this.handleVersionDateChange.bind(this);\n        this.toggleHeaders = this.toggleHeaders.bind(this);\n        this.resetWarning = this.resetWarning.bind(this);\n        this.getJsonHeadersRequestString = this.getJsonHeadersRequestString.bind(this);\n        this.getPreviewRequest = this.getPreviewRequest.bind(this);\n        this.previewPdf = this.previewPdf.bind(this);\n        this.toggleReprint = this.toggleReprint.bind(this);\n        this.filterReprints = this.filterReprints.bind(this);\n        this.setLegDateOptions = this.setLegDateOptions.bind(this);\n        this.closeConfirmation = this.closeConfirmation.bind(this);\n        this.updateBillListByLegislationID = this.updateBillListByLegislationID.bind(this);\n        this.setWasEmpty = this.setWasEmpty.bind(this);\n        this.setReplaced = this.setReplaced.bind(this);\n        this.toggleCheckAll = this.toggleCheckAll.bind(this);\n\n        this.pdfRef = React.createRef();\n    }\n\n    toggleFieldsetCollapse(isActive) {\n        this.setState(state => ({\n            [isActive]: !state[isActive]\n        }));\n    }\n\n    filterReprints() {\n        this.setState({ reprintsFiltered: !this.state.reprintsFiltered }, () => {\n            this.setLegDateOptions(this.state.billList);\n        })\n    }\n\n    toggleReprint() {\n        let billTexts = [...this.state.originalBillText];\n        billTexts[this.state.selectedBillTextIndex].IsReprint = !billTexts[this.state.selectedBillTextIndex].IsReprint;\n        this.setState({ billTexts });\n    }\n\n    setWasEmpty(val, callback) {\n        this.setState({ wasEmpty: val }, () => {\n            if (callback) {\n                callback();\n            }\n        })\n    }\n\n    setReplaced(val, callback) {\n        this.setState({ replaced: val }, () => {\n            if (callback) {\n                callback();\n            }\n        })\n    }\n\n    getPreviewRequest() {\n        let previewRequest = { ...this.state.originalBillText[this.state.selectedBillTextIndex] };\n\n        let newDraftText;\n        let doc = document.createElement('div');\n        //Use what's in the editor for completed items, otherwise use what's been saved\n        doc.insertAdjacentHTML(\"afterbegin\", this.state.showCompletedItems ? this.state.reviewContent : previewRequest.DraftText);\n        if (!this.state.showCompletedItems) {\n            //Remove ldtitle from document\n            let docParagraphs = doc.getElementsByTagName('p');\n\n            for (let j = 0; j < docParagraphs.length; j++) {\n                //Do not remove the patronLine from the original text before requesting preview for incomplete items\n                if (['section', 'enactstm'].includes(docParagraphs[j].classList[0])) {\n                    break; //reached the actal body of the text, don't remove any more\n                } else if (['ldtitle', 'ld'].includes(docParagraphs[j].classList[0])) {\n                    doc.removeChild(docParagraphs[j])\n                    j--\n                }\n            }\n        } else {\n            //remove header-content from document\n            let docDivs = doc.getElementsByTagName('div');\n            for (let j = 0; j < docDivs.length; j++) {\n                //Do not remove the patronLine from the original text before requesting preview for incomplete items\n                if (this.state.showCompletedItems) {\n                    if (docDivs[j].id === 'header-content') {\n                        doc.removeChild(docDivs[j]);\n                    }\n                }\n            }\n        }\n\n        newDraftText = doc.innerHTML;\n\n        previewRequest.DraftText = newDraftText;\n        if (this.state.showCompletedItems) {\n            //Try to find the draft title in the text and set it\n            //For incomplete items, the text has to have already been saved before previewing, which means the DraftTitle attribute will already be set appropriately\n            //but for completed items, they preview without saving, so the DraftTitle needs to be updated in the request we send to the API in order for the title in the headers (programmatically added) to be correct\n            let searchForLDTitleContainer = document.createElement('div');\n            searchForLDTitleContainer.innerHTML = this.state.reviewContent;\n            //The first element in the content with this class is the draft title\n            let draftLDTitle = searchForLDTitleContainer.querySelector('.ldtitle');\n            if (draftLDTitle && draftLDTitle.innerHTML !== '') {\n                previewRequest.DraftTitle = draftLDTitle.innerHTML;\n                previewRequest.EditTitle = draftLDTitle.innerHTML;\n            }\n        }\n        previewRequest.SessionCode = this.state.selectedSession.SessionCode;\n        previewRequest.Chamber = previewRequest.LegislationChamberCode === \"H\" ? \"House\" : \"Senate\";\n        previewRequest.VersionChamber = previewRequest.ChamberCode === \"H\" ? \"House\" : \"Senate\";\n        previewRequest.LegislationKey = previewRequest.LegislationNumber.substr(2, previewRequest.LegislationNumber.length);\n        previewRequest.OnReconvene = this.state.onReconvene;\n        previewRequest.LegislationClass = this.state.selectedBill.LegislationClass;\n        previewRequest.LegislationClassID = this.state.selectedBill.LegislationClassID;\n\n        //Pull the ReferredCommittee out of the doc in case the text version hasn't been saved before and doesn't already have a ReferredCommittee\n        //Only when authoring engrossed or renengrossed\n        if (this.state.selectedLegType.LegislationVersionID === 6 || this.state.selectedLegType.LegislationVersionID === 2) {\n            let headers = document.createElement('div');\n            headers.insertAdjacentHTML(\"afterbegin\", this.state.headers);\n\n            if (headers.getElementsByClassName(\"CommitteeReferral\")[0]) {\n                previewRequest.ReferredCommittee = headers.getElementsByClassName(\"CommitteeReferral\")[0].innerText.split(\"Committee on the \")[1]\n                    ? headers.getElementsByClassName(\"CommitteeReferral\")[0].innerText.split(\"Committee on the \")[1].trim()\n                    : headers.getElementsByClassName(\"CommitteeReferral\")[0].innerText.split(\"Committee for \")[1]\n                        ? headers.getElementsByClassName(\"CommitteeReferral\")[0].innerText.split(\"Committee for \")[1].trim()\n                        : headers.getElementsByClassName(\"CommitteeReferral\")[0].innerText.split(\"Committee on \")[1].trim();\n            }\n        }\n\n        return previewRequest;\n    }\n\n    previewPdf() {\n        if (!this.state.showCompletedItems) {\n            this.setState({ showIncompletePdf: true, gettingIncompletePdf: true })\n        } else {\n            this.setState({ showIncompletePdf: false, gettingCompletedItemPreview: true })\n        }\n        const previewRequest = this.getPreviewRequest();\n\n        this.props.actions.previewPdfFile(previewRequest)\n            .then(() => {\n                if (this.state.showCompletedItems) {\n                    this.setState({\n                        previewContent: 'true', //just makes it so the preview page will indeed show\n                        isPreviewVisible: !this.state.isPreviewVisible,\n                        gettingCompletedItemPreview: false\n                    }, () => {\n                        document.querySelector(\"iframe\").src = this.props.bills.sasUrl;\n                    })\n                } else {\n                    if (this.pdfRef && this.pdfRef.current) {\n                        let pdfRef = this.pdfRef.current;\n                        pdfRef.setAttribute('src', this.props.bills.sasUrl);\n                        pdfRef.onload = () => {\n                            this.setState({\n                                gettingIncompletePdf: false\n                            });\n                        };\n                    }\n                }\n            }).catch((e) => {\n                console.log(e);\n                this.setState({ gettingCompletedItemPreview: false, gettingIncompletePdf: false })\n            })\n    }\n\n    togglePreview() {\n        if (!this.state.isPreviewVisible) {\n            if (this.state.showCompletedItems) {\n                this.previewPdf();\n            } else {\n                const previewRequest = this.getPreviewRequest();\n                this.props.actions.getHtmlPreview(previewRequest)\n                    .then(() => {\n                        if (this.props.bills.htmlPreview && this.props.bills.htmlPreview.body && !this.props.bills.htmlPreview.body.locked) {\n                            //checking 'locked' prevents this  if-block from returning true because of an old htmlPreview - \n                            //for example, hitting preview on a bill that results in a valid htmlPreview obj, then switching bills to one that does not result in a valid htmlPreview would break here \n                            //because 'this.props.bills.htmlPreview.body' is still true, but getReader is invalid on it since it is locked\n                            this.props.bills.htmlPreview.body.getReader().read().then(({ value }) => {\n                                this.setState({\n                                    isPreviewVisible: !this.state.isPreviewVisible,\n                                    showIncompletePdf: false,\n                                    previewContent: Buffer.from(value.buffer).toString(),\n                                    previewContentError: ''\n                                }, () => {\n                                    if (document.getElementsByClassName(\"billpatron\")[0] && this.state.selectedLegType.Name === \"Engrossed\" && this.state.patronageInfo) {\n                                        document.getElementsByClassName(\"billpatron\")[0].textContent = this.state.patronageInfo\n                                    }\n                                })\n                            })\n                        } else if (this.props.bills.htmlPreviewError) {\n                            this.setState({\n                                isPreviewVisible: !this.state.isPreviewVisible,\n                                showIncompletePdf: false,\n                                previewContent: '',\n                                previewContentError: this.props.bills.htmlPreviewError\n                            })\n                        }\n                    })\n\n                if (this.state.selectedLegType.Name === \"Enrolled\") {\n                    this.props.actions.previewPdfFile(previewRequest)\n                        .then(() => {\n                            //don't do anything; this just puts a non-public/SasURL-driven blob in blob storage that can later be used in print management\n                        });\n                }\n            }\n        } else {\n            this.setState({\n                isPreviewVisible: !this.state.isPreviewVisible,\n                showIncompletePdf: false,\n                previewContent: \"\"\n            })\n        }\n    }\n\n    togglePortal(state, e) {\n        if (e) {\n            e.stopPropagation();\n        }\n        this.setState({\n            showPortal: !state\n        });\n    }\n\n    handleSave(publish, isComplete) {\n        this.setState({ isSaving: true, enrolledPrintQueue: [], checkedBills: [], useCurrentPublishDates: true, customPublishDate: null });\n\n        //if publishing any of the below versions, skip all the processing and just use the batch publish endpoint (US10097)\n        if (publish && [\"Engrossed\", \"Reengrossed\", \"Enrolled\", \"Reenrolled\", \"Chaptered\"].includes(this.state.selectedLegType.Name)) {\n            this.props.actions.batchPublish({ \"PublishDate\": null, \"legislationTextIDs\": [this.state.originalBillText[this.state.selectedBillTextIndex].LegislationTextID], \"legislationIDs\": [this.state.selectedBill.LegislationID] })\n                .then(() => {\n                    this.props.actions.batchGenBillFile(\"?sessionID=\" + this.state.selectedSession.SessionID, [this.state.originalBillText[this.state.selectedBillTextIndex].LegislationTextID])\n                        .then(() => {\n                            this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }])\n\n                            this.setState({\n                                isPreviewVisible: false,\n                                selectedBill: '',\n                                reviewContent: '',\n                                savedReviewContent: '',\n                                editorChanged: false,\n                                selectedBillTextIndex: -1,\n                                reviewFieldsetIsActive: false,\n                                amendmentFieldsetIsActive: false,\n                                billFieldsetIsActive: true,\n                                reviewKey: 1,\n                                isSaving: false,\n                                isDirty: false\n                            });\n                            this.handleSelectorChange('selectedSession', this.state.selectedSession);\n                        }).catch((err) => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            this.props.actions.makeToast([{ message: \"File Generation Failed\", type: \"failure\" }]);\n                            this.setState({ isSaving: false });\n                        })\n                }).catch((err) => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Publish Failed\", type: \"failure\" }]);\n                    this.setState({ isSaving: false });\n                })\n        } else {\n            let originalBillText = [...this.state.originalBillText];\n            let selectedBillTextIndex = this.state.selectedBillTextIndex;\n            if (!publish && [\"Gov Recommendation\", \"Veto Explanation\"].includes(this.state.selectedLegType.Name) && selectedBillTextIndex === -1) {\n                //they manually added this bill, so we need to set a new object in the event that there wasn't a bill text object already\n                originalBillText.push({\n                    LegislationVersionID: this.state.selectedLegType.LegislationVersionID,\n                    LegislationID: this.state.selectedBill.LegislationID,\n                    DraftTitle: \"\",\n                    EditTitle: \"\",\n                    IsPublic: false,\n                    isDirty: false\n                });\n                selectedBillTextIndex = originalBillText.length - 1;\n            }\n            // if the selected bill text is published or is not the correct version then a new version needs to be created.\n            if (originalBillText[selectedBillTextIndex].IsPublic || this.state.selectedLegType.LegislationVersionID !== originalBillText[selectedBillTextIndex].LegislationVersionID) {\n                let newBillText = { ...originalBillText[selectedBillTextIndex] };\n                //Delete ID and mod date since this is a new text entry onto the bill\n                delete newBillText.LegislationTextID;\n                delete newBillText.LegislationTextActionID;\n                delete newBillText.ModificationDate;\n                delete newBillText.Description;\n                delete newBillText.TextDisposition;\n                delete newBillText.TextDispositionID;\n                delete newBillText.IsComplete;\n                delete newBillText.HTMLFile;\n                delete newBillText.JSONFile;\n                delete newBillText.PDFFile;\n                delete newBillText.IsReprint;\n                //Delete the document code so that the DB can construct it if it is not preengrossing; if it is preengrossing, we need to set it ourselves since we are the ones with knowledge of the base document\n                if (this.state.selectedLegType.Name !== \"Engrossed\" || this.state.selectedBill.CandidateDate) {\n                    delete newBillText.DocumentCode;\n                } else {\n                    if (newBillText.LegislationVersion === \"Introduced\") {\n                        newBillText.DocumentCode = this.state.selectedBill.LegislationNumber + \"E\";\n                    } else if (newBillText.LegislationVersion === \"Substitute\") {\n                        const subNumber = newBillText.DocumentCode.replaceAll(/\\D{2,3}\\d+/g, \"\"); //e.g. HB8660H1 -> H1\n                        newBillText.DocumentCode = this.state.selectedBill.LegislationNumber + \"E\" + subNumber;\n                    } else {\n                        //we were promised multiple times it would only ever be an introduced or substitute, but I'm going to delete the doc code if it isn't for whatever reason, and hope the DB sets it correctly\n                        delete newBillText.DocumentCode;\n                    }\n                }\n                newBillText.LegislationVersionID = this.state.selectedLegType.LegislationVersionID;\n                delete newBillText.LegislationVersion;\n                //delete the chambercode and set sponsor to Governor if Governor's Recommendation or Governor's Veto\n                if ([\"Gov Recommendation\", \"Veto Explanation\"].includes(this.state.selectedLegType.Name)) {\n                    delete newBillText.ChamberCode;\n                    newBillText.Sponsor = \"Governor\";\n                    newBillText.SponsorTypeID = 1;\n                } else if (this.state.selectedLegType.Name === \"Engrossed\") {\n                    delete newBillText.Sponsor;\n                    delete newBillText.SponsorTypeID;\n                    delete newBillText.CommitteeID;\n                    delete newBillText.Patrons;\n                }\n\n                originalBillText.push(newBillText);\n                selectedBillTextIndex = originalBillText.length - 1;\n            }\n            // Set the session code. This must be done for file generation to properly work\n            originalBillText[selectedBillTextIndex].SessionCode = this.state.selectedBill.SessionCode;\n            // Set the chamber code to the legislation's chamber code if it is an enrolled/reenrolled version, and remove committee info\n            if ([\"Enrolled\", \"Reenrolled\"].includes(this.state.selectedLegType.Name)) {\n                originalBillText[selectedBillTextIndex].ChamberCode = this.state.selectedBill.ChamberCode;\n                delete originalBillText[selectedBillTextIndex].CommitteeID;\n                delete originalBillText[selectedBillTextIndex].CommitteeName;\n                delete originalBillText[selectedBillTextIndex].CommitteeNumber;\n            }\n            //Try to find the draft title in the text and set it\n            let searchForLDTitleContainer = document.createElement('div');\n            searchForLDTitleContainer.innerHTML = this.state.reviewContent;\n            //The first element in the content with this class is the draft title\n            let draftLDTitle = searchForLDTitleContainer.querySelector('.ldtitle');\n            if (draftLDTitle && draftLDTitle.innerHTML !== '') {\n                originalBillText[selectedBillTextIndex].DraftTitle = draftLDTitle.innerHTML;\n                originalBillText[selectedBillTextIndex].EditTitle = draftLDTitle.innerHTML;\n            }\n\n            //add LegislationClassID/LegislationClass to the LegislationText obj\n            originalBillText[selectedBillTextIndex].LegislationClass = this.state.selectedBill.LegislationClass\n            originalBillText[selectedBillTextIndex].LegislationClassID = this.state.selectedBill.LegislationClassID\n\n            if (isComplete) { originalBillText[selectedBillTextIndex].IsComplete = true }\n\n            originalBillText[selectedBillTextIndex].VersionDate = this.state.versionDate;\n            originalBillText[selectedBillTextIndex].DraftText = this.state.reviewContent;\n            originalBillText[selectedBillTextIndex].IsActive = true;\n            originalBillText[selectedBillTextIndex].IsPublic = publish;\n\n            //Remove ldtitle from document if the header is present in the header and the header also contains the ldtitle\n            let doc = document.createElement('div');\n            doc.insertAdjacentHTML(\"afterbegin\", originalBillText[selectedBillTextIndex].DraftText);\n\n            //Remove any tags TinyMCE may have added when pasting from Word\n            doc.childNodes.forEach(node => {\n                if (node.nodeName !== \"#text\") {\n                    node.removeAttribute('data-mce-fragment');\n                    if (node.childNodes.length > 0) {\n                        node.childNodes.forEach(childNode => {\n                            if (childNode.nodeName !== \"#text\") {\n                                childNode.removeAttribute('data-mce-fragment');\n                            }\n                        })\n                    }\n                }\n            });\n\n            let header = doc.getElementsByTagName('div');\n            let newDraftText;\n\n            if (header[0]) {\n                //Store the header somewhere while we find and iterate over paragraphs in the rest of the doc\n                let headerContainer = header[0].innerHTML;\n                let headerParagraphs = header[0].getElementsByTagName('p');\n\n                for (let i = 0; i < headerParagraphs.length; i++) {\n                    if (['ldtitle', 'ld', 'patronLine', 'patctr'].includes(headerParagraphs[i].classList[0])) {\n                        //Temporarily remove header                              \n                        header[0].innerHTML = \"\";\n\n                        //We found the ldtitle or patronage in the header, so iterate over the paragraphs to find any duplicate ldtitles or patronages and eliminate them\n                        let docParagraphs = doc.getElementsByTagName('p');\n\n                        for (let j = 0; j < docParagraphs.length; j++) {\n                            if (['section', 'enactstm'].includes(docParagraphs[j].classList[0])) {\n                                break; //reached the actal body of the text, don't remove any more\n                            } else if (['ldtitle', 'ld', 'patronLine', 'patctr', 'center'].includes(docParagraphs[j].classList[0])) {\n                                doc.removeChild(docParagraphs[j])\n                                j--\n                            }\n                        }\n                    }\n                }\n                //Reattach the header\n                header[0].innerHTML = headerContainer;\n\n                newDraftText = doc.innerHTML\n            }\n\n            if (newDraftText != undefined) {\n                originalBillText[selectedBillTextIndex].DraftText = newDraftText\n            }\n\n            if (this.state.onReconvene) {\n                originalBillText[selectedBillTextIndex].OnReconvene = true;\n            }\n\n            this.props.actions.saveBillText({ TextsList: [originalBillText[selectedBillTextIndex]] })\n                .then(() => {\n                    let billTextParams = \"?legislationID=\" + this.state.selectedBill.LegislationID;\n                    this.props.actions.getBillText(billTextParams, true)\n                        .then(() => {\n                            const newbillTextList = [...this.props.bills.billText];\n                            const priorBillText = originalBillText[selectedBillTextIndex];\n                            // Need to figure out what the index of the bill text we saved was. It isn't always the same one that was sent.\n                            if (priorBillText && priorBillText.LegislationTextID) {\n                                selectedBillTextIndex = newbillTextList.findIndex(t => t.LegislationTextID === priorBillText.LegislationTextID)\n                            } else {\n                                // Hopefully this finds it, but since the API might change the draft text around the second findIndex function is used.\n                                selectedBillTextIndex = newbillTextList.findIndex(t => t.DraftText === priorBillText.DraftText && t.LegislationVersionID === priorBillText.LegislationVersionID);\n                                selectedBillTextIndex = selectedBillTextIndex !== -1 ? selectedBillTextIndex : newbillTextList.findIndex(t => t.LegislationVersionID === priorBillText.LegislationVersionID)\n                            }\n                            if (publish) {\n                                this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }])\n                                //Bill's status has changed. So move it out of the grid and of the review pane\n                                this.setState({\n                                    isSaving: false,\n                                    isPreviewVisible: false,\n                                    selectedBill: '',\n                                    reviewContent: '',\n                                    savedReviewContent: '',\n                                    editorChanged: false,\n                                    selectedBillTextIndex: -1,\n                                    reviewFieldsetIsActive: false,\n                                    amendmentFieldsetIsActive: false,\n                                    billFieldsetIsActive: true,\n                                    reviewKey: 1,\n                                    isDirty: false\n                                });\n                                this.handleSelectorChange('selectedSession', this.state.selectedSession);\n                                //Create the pdf version of the bill if the bill is published\n                                const legFileGenParams = \"?legislationID=\" + newbillTextList[selectedBillTextIndex].LegislationID\n                                    + \"&legislationTextID=\" + newbillTextList[selectedBillTextIndex].LegislationTextID\n                                    + \"&legislationVersionID=\" + newbillTextList[selectedBillTextIndex].LegislationVersionID\n                                    + \"&sessionID=\" + this.state.selectedSession.SessionID;\n                                this.props.actions.genBillFile(legFileGenParams)\n                            } else {\n                                // Refresh the bill info in the billList state (billGridSection)\n                                if (newbillTextList[selectedBillTextIndex]) {\n                                    this.updateBillListByLegislationID(newbillTextList[selectedBillTextIndex].LegislationID);\n                                }\n                                // Get the text again to get the mod dates\n                                this.setState(prevState => ({\n                                    originalBillText: newbillTextList,\n                                    selectedBillTextIndex: selectedBillTextIndex,\n                                    savedReviewContent: prevState.reviewContent,\n                                    editorChanged: true //have to do this to mimic the automatic editing the editor does when it is first initialized (see handleEditorChange method comments for more info)\n                                }), () => {\n                                    originalBillText = [...this.state.originalBillText];\n                                    selectedBillTextIndex = this.state.selectedBillTextIndex;\n\n                                    if (originalBillText[selectedBillTextIndex]) {\n                                        let newDraftText, jsonPromise;\n\n                                        //update headers; e.g. if chaptered, chapter number may have changed\n                                        if (this.state.selectedLegType.Name === \"Engrossed\"\n                                            || this.state.selectedLegType.Name === \"Reengrossed\"\n                                            || this.state.selectedLegType.Name === \"Chaptered\"\n                                            || this.state.selectedLegType.Name === \"Enrolled\"\n                                            || this.state.selectedLegType.Name === \"Reenrolled\") {\n                                            const billText = originalBillText[selectedBillTextIndex];\n                                            const bill = this.state.selectedBill;\n                                            const jsonHeadersRequestString = this.getJsonHeadersRequestString(billText.LegislationTextID, billText.DocumentCode);\n\n                                            jsonPromise = this.props.actions.getJsonHeaders(jsonHeadersRequestString)\n                                                .then(() => {\n                                                    if (this.props.bills.jsonHeaders) {\n                                                        let headers = getHtml(this.props.bills.jsonHeaders);\n\n                                                        //Add the PassageDates to the draft text if this is a resolution and in the enrolled queue\n                                                        if ((this.state.selectedLegType.Name === \"Chaptered\" || this.state.selectedLegType.Name === \"Enrolled\") && (bill.LegislationTypeCode === \"J\" || bill.LegislationTypeCode === \"R\")) {\n                                                            headers = this.applyPassageDates(headers, billText, bill.LegislationTypeCode, bill.HousePassageDate, bill.SenatePassageDate);\n                                                        }\n\n                                                        let reviewContent = headers + billText.DraftText;\n\n                                                        //Remove ldtitle from document if the header is present and the header also contains the ldtitle\n                                                        let doc = document.createElement('div');\n                                                        doc.insertAdjacentHTML(\"afterbegin\", reviewContent);\n                                                        let header = doc.getElementsByTagName('div');\n\n                                                        if (header[0] != undefined) {\n                                                            //Store the header somewhere while we find and iterate over paragraphs in the rest of the doc\n                                                            let headerContainer = header[0].innerHTML;\n                                                            let headerParagraphs = header[0].getElementsByTagName('p');\n\n                                                            for (let i = 0; i < headerParagraphs.length; i++) {\n                                                                if (['ldtitle', 'ld', 'patronLine', 'patctr'].includes(headerParagraphs[i].classList[0])) {\n                                                                    //Temporarily remove header                              \n                                                                    header[0].innerHTML = \"\";\n\n                                                                    //We found the ldtitle or patronage in the header, so iterate over the paragraphs to find any duplicate ldtitles or patronages and eliminate them\n                                                                    let docParagraphs = doc.getElementsByTagName('p');\n\n                                                                    for (let j = 0; j < docParagraphs.length; j++) {\n                                                                        if (billText.LegislationVersion === \"Substitute\" && ['pro', 'center', 'patronLine', 'patctr', 'textbl', 'ldtitle', 'ld'].includes(docParagraphs[j].classList[0])) {\n                                                                            doc.removeChild(docParagraphs[j])\n                                                                            j--;\n                                                                        } else if (billText.LegislationVersion === \"Substitute\") {\n                                                                            continue;\n                                                                        }\n\n                                                                        if (docParagraphs[j] && ['section', 'enactstm'].includes(docParagraphs[j].classList[0])) {\n                                                                            break; //reached the actal body of the text, don't remove any more\n                                                                        } else if (docParagraphs[j] && ['ldtitle', 'ld', 'patronLine', 'patctr', 'center'].includes(docParagraphs[j].classList[0])) {\n                                                                            doc.removeChild(docParagraphs[j])\n                                                                            j--\n                                                                        }\n                                                                    }\n                                                                } else if (this.state.selectedLegType.Name === \"Engrossed\" && doc.getElementsByClassName(\"billpatron\")[0]) {\n                                                                    //Not needed on save, but part of copy-paste; If working on an engrossed version, store the headers' patronage info which is needed for the preview (the object returned in the GetLegislationTextById call is not always correct)\n                                                                    //patronageInfo = doc.getElementsByClassName(\"billpatron\")[0].textContent\n                                                                }\n                                                            }\n\n                                                            if (this.state.selectedLegType.Name === \"Reenrolled\"\n                                                                && this.props.session.sessionList.find(x => x.SessionID === this.state.selectedSession.SessionID).SessionEvents.find(x => x.DisplayName === \"Reconvene\")\n                                                                && moment(this.props.session.sessionList.find(x => x.SessionID === this.state.selectedSession.SessionID).SessionEvents.find(x => x.DisplayName === \"Reconvene\").ActualDate).isSameOrBefore(moment(billText.VersionDate) ?? moment(), \"day\")) {\n                                                                //Set the header to reconvened session and reattach the header \n                                                                let headerDoc = document.createElement('div');\n                                                                headerDoc.insertAdjacentHTML(\"afterbegin\", headerContainer);\n                                                                let paragraphs = headerDoc.getElementsByTagName('p');\n                                                                paragraphs[0].innerHTML = this.state.selectedSession.SessionYear + \" RECONVENED SESSION\";\n\n                                                                header[0].appendChild(headerDoc);\n\n                                                                this.setState({\n                                                                    onReconvene: true\n                                                                })\n                                                            } else {\n                                                                //Reattach the header\n                                                                header[0].innerHTML = headerContainer;\n                                                                this.setState({\n                                                                    onReconvene: false\n                                                                })\n                                                            }\n\n                                                            newDraftText = doc.innerHTML\n                                                        }\n\n                                                        if (newDraftText != undefined) {\n                                                            this.setState({\n                                                                reviewContent: newDraftText\n                                                            })\n                                                        }\n                                                    }\n                                                }).catch(e => {\n                                                    console.log(e)\n                                                    this.setState({ reviewContent: `<p class=\"message-error\">${typeof e === 'object' && !Array.isArray ? JSON.parse(e).Name || \"Unknown Error\" : e}</p>` });\n                                                })\n                                        } else {\n                                            //Remove ldtitle from document if the header is present and the header also contains the ldtitle\n                                            let doc = document.createElement('div');\n                                            doc.insertAdjacentHTML(\"afterbegin\", originalBillText[selectedBillTextIndex].DraftText);\n                                            let header = doc.getElementsByTagName('div');\n\n                                            if (header[0]) {\n                                                //Store the header somewhere while we find and iterate over paragraphs in the rest of the doc\n                                                let headerContainer = header[0].innerHTML;\n                                                let headerParagraphs = header[0].getElementsByTagName('p');\n\n                                                for (let i = 0; i < headerParagraphs.length; i++) {\n                                                    if (['ldtitle', 'ld', 'patronLine', 'patctr'].includes(headerParagraphs[i].classList[0])) {\n                                                        //Temporarily remove header                              \n                                                        header[0].innerHTML = \"\";\n\n                                                        //We found the ldtitle or patronage in the header, so iterate over the paragraphs to find any duplicate ldtitles or patronages and eliminate them\n                                                        let docParagraphs = doc.getElementsByTagName('p');\n\n                                                        for (let j = 0; j < docParagraphs.length; j++) {\n                                                            if (['section', 'enactstm'].includes(docParagraphs[j].classList[0])) {\n                                                                break; //reached the actal body of the text, don't remove any more\n                                                            } else if (['ldtitle', 'ld', 'patronLine', 'patctr', 'center'].includes(docParagraphs[j].classList[0])) {\n                                                                doc.removeChild(docParagraphs[j])\n                                                                j--\n                                                            }\n                                                        }\n                                                    }\n                                                }\n                                                //Reattach the header\n                                                header[0].innerHTML = headerContainer;\n\n                                                newDraftText = doc.innerHTML;\n                                            }\n\n                                            if (newDraftText != undefined) {\n                                                originalBillText[selectedBillTextIndex].DraftText = newDraftText;\n\n                                                this.setState({\n                                                    originalBillText: originalBillText,\n                                                })\n                                            }\n                                        }\n\n                                        Promise.all([jsonPromise]).finally(() => {\n                                            this.setState(prevState => ({ isDirty: false, isSaving: false, savedReviewContent: prevState.reviewContent, editorChanged: false }));\n                                            this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }])\n                                        });\n                                    }\n\n                                });\n                            }\n                        })\n\n                })\n                .catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                    this.setState({\n                        isSaving: false\n                    });\n                });\n        }\n    }\n\n    handleSaveCompletedItem() {\n        this.setState({ isSaving: true, enrolledPrintQueue: [], checkedBills: [], useCurrentPublishDates: true, customPublishDate: null });\n\n        let billText = [...this.state.originalBillText];\n        let selectedBillTextIndex = this.state.selectedBillTextIndex;\n        billText[selectedBillTextIndex].DraftText = this.state.reviewContent;\n        //Try to find the draft title in the text and set it\n        let searchForLDTitleContainer = document.createElement('div');\n        searchForLDTitleContainer.innerHTML = this.state.reviewContent;\n\n        //Remove any tags TinyMCE may have added when pasting from Word (Borrowing the doc we're using for ldtitle search)\n        searchForLDTitleContainer.childNodes.forEach(node => {\n            if (node.nodeName !== \"#text\") {\n                node.removeAttribute('data-mce-fragment');\n                if (node.childNodes.length > 0) {\n                    node.childNodes.forEach(childNode => {\n                        if (childNode.nodeName !== \"#text\") {\n                            childNode.removeAttribute('data-mce-fragment');\n                        }\n                    })\n                }\n            }\n        });\n\n        //The first element in the content with this class is the draft title\n        let draftLDTitle = searchForLDTitleContainer.querySelector('.ldtitle');\n        if (draftLDTitle && draftLDTitle.innerHTML !== '') {\n            billText[selectedBillTextIndex].DraftTitle = draftLDTitle.innerHTML;\n            billText[selectedBillTextIndex].EditTitle = draftLDTitle.innerHTML;\n        }\n\n        //add LegislationClassID/LegislationClass to the LegislationText obj\n        billText.forEach(text => {\n            text.LegislationClass = this.state.selectedBill.LegislationClass\n            text.LegislationClassID = this.state.selectedBill.LegislationClassID\n        })\n\n        this.props.actions.saveBillText({ TextsList: billText })\n            .then(() => {\n                this.setState({ isSaving: false });\n                this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n                let billTextParams = \"?legislationID=\" + this.state.selectedBill.LegislationID;\n                this.props.actions.getBillText(billTextParams, true)\n                    .then(() => {\n                        const newbillTextList = [...this.props.bills.billText];\n                        const priorBillText = billText[selectedBillTextIndex];\n                        // Need to figure out what the index of the bill text we saved was. It isn't always the same one that was sent.\n                        if (priorBillText && priorBillText.LegislationTextID) {\n                            selectedBillTextIndex = newbillTextList.findIndex(t => t.LegislationTextID === priorBillText.LegislationTextID)\n                        } else {\n                            // Hopefully this finds it, but since the API might change the draft text around the second findIndex function is used.\n                            selectedBillTextIndex = newbillTextList.findIndex(t => t.DraftText === priorBillText.DraftText && t.LegislationVersionID === priorBillText.LegislationVersionID);\n                            selectedBillTextIndex = selectedBillTextIndex !== -1 ? selectedBillTextIndex : newbillTextList.findIndex(t => t.LegislationVersionID === priorBillText.LegislationVersionID)\n                        }\n\n                        this.handleSelectorChange('selectedSession', this.state.selectedSession);\n                        const legFileGenParams = \"?legislationID=\" + newbillTextList[selectedBillTextIndex].LegislationID\n                            + \"&legislationTextID=\" + newbillTextList[selectedBillTextIndex].LegislationTextID\n                            + \"&legislationVersionID=\" + newbillTextList[selectedBillTextIndex].LegislationVersionID\n                            + \"&sessionID=\" + this.state.selectedSession.SessionID;\n                        this.props.actions.genBillFile(legFileGenParams)\n\n                        this.setState({\n                            isPreviewVisible: false,\n                            selectedBill: '',\n                            reviewFieldsetIsActive: false,\n                            amendmentFieldsetIsActive: false,\n                            billFieldsetIsActive: true,\n                            originalBillText: [],\n                            billText: '',\n                            reviewContent: '',\n                            savedReviewContent: '',\n                            editorChanged: false,\n                            selectedBillTextIndex: -1,\n                            reviewKey: 1,\n                            isDirty: false\n                        });\n                    })\n            })\n            .catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                this.setState({\n                    isSaving: false\n                });\n            });\n    }\n\n    handleEditorChange(content) {\n        let replacement = false;\n        let doc = document.createElement('div');\n        doc.insertAdjacentHTML(\"afterbegin\", content);\n\n        //Remove the header information from the dom so none of the <p> tags within get styled\n        let header = doc.getElementsByTagName('div');\n        this.setState({\n            header: header[0] ? header[0].innerHTML : \"\"\n        }, () => {\n            if (header[0] !== undefined) {\n                header[0].innerHTML = \"\";\n            }\n\n            let paragraphs = doc.getElementsByTagName('p');\n\n            //Loop the paragraphs and add the section class to each paragraph with a class list length of 0\n            for (let i = 0; i < paragraphs.length; i++) {\n                if (paragraphs[i].classList.length === 0) {\n                    paragraphs[i].classList.add(\"section\");\n                    replacement = true;\n                }\n            }\n\n            if (header[0] !== undefined) {\n                header[0].innerHTML = this.state.header;\n            }\n\n            //If we've added a section class to a classless <p> tag then replace the content with the dom HTML\n            //Otherwise update normally\n            //This check is done because updating reviewContent in this way was causing tinyMCE to move the cursor position back to the first line\n            if (replacement) {\n                this.setState(prevState => ({\n                    reviewContent: doc.innerHTML,\n                    savedReviewContent: !prevState.editorChanged ? doc.innerHTML : prevState.savedReviewContent, //see notes below\n                    editorChanged: true,\n                    changeCount: this.state.changeCount + 1,\n                    isDirty: this.state.changeCount > 0 && this.state.reviewContent !== doc.innerHTML ? true : false\n                }));\n            } else {\n                this.setState(prevState => ({\n                    reviewContent: content,\n                    savedReviewContent: !prevState.editorChanged ? content : prevState.savedReviewContent, //see notes below\n                    editorChanged: true,\n                    changeCount: this.state.changeCount + 1,\n                    isDirty: this.state.changeCount > 0 && this.state.reviewContent !== doc.innerHTML ? true : false\n                }))\n            }\n        })\n\n        //I know changeCount is hack-y, using editorChanged wasn't working as expected -JGB\n\n        //handleEditorChange gets called when the editor is initalized, as some of the content is modified slightly; \n        //we therefore need to update the savedReviewContent state on this FIRST call only, as this will be the comparison used to know if the editor has been changed by the user\n    }\n\n    setLegDateOptions(billList) {\n        let legDates;\n        if (this.state.showCompletedItems) {\n            legDates = billList.map(x => { if (moment(x.VersionDate).isValid() && (!this.state.reprintsFiltered || x.IsReprint)) return { label: moment(x.VersionDate).format(\"MM/DD/YYYY\"), value: x.VersionDate } })\n        } else {\n            legDates = billList.map(x => { if (moment(x.CandidateDate).isValid()) return { label: moment(x.CandidateDate).format(\"MM/DD/YYYY\"), value: x.CandidateDate } })\n        }\n        let legDateOptions = legDates.filter((e, i) => legDates.findIndex(a => a && e && (a[\"label\"] === e[\"label\"])) === i);\n        legDateOptions.sort((a, b) => { return moment(a.value) - moment(b.value) })\n\n        this.setState({\n            billList: billList,\n            legDateOptions: legDateOptions\n        });\n    }\n\n    checkHandleSelectorChange(key, value, confirmed) {\n        if (this.state.isDirty && !confirmed) {\n            this.setState({\n                storedKey: key,\n                storedValue: value,\n                showCategoryConfirmation: true\n            })\n        } else if (confirmed) {\n            this.handleSelectorChange(this.state.storedKey, this.state.storedValue)\n        } else {\n            this.handleSelectorChange(key, value)\n        }\n\n        this.setState({\n            checkedBills: [],\n            checkAll: false\n        })\n    }\n\n    handleSelectorChange(key, value) {\n        //An option in the Selector section has been changed.\n        if (this.state[key] !== undefined) {\n            this.setState({\n                [key]: value,\n                showCategoryConfirmation: false\n            }, () => {\n                if (['showCompletedItems', 'selectedSession', 'selectedLegType'].includes(key)) {\n                    this.setState({\n                        enrolledPrintQueue: [],\n                        checkedBills: [],\n                        useCurrentPublishDates: true,\n                        customPublishDate: null,\n                    });\n                    //If switching between completed items and incomplete items, change the version type dropdown list\n                    if (key === 'showCompletedItems') {\n                        let legOptions = [...this.state.legOptions];\n                        legOptions.forEach(version => {\n                            version.label = this.state.showCompletedItems ? version.Name : version.AuthoringLabel;\n                            this.setState({ legOptions })\n                        })\n                    }\n                }\n                //If both a session is selected and a legislation type then load a list of bills that adhere to the two selected criteria\n                //Close the review and amendment field because the selected bill is no longer valid for the selected criteria\n                if (this.state.selectedLegType && this.state.selectedSession) {\n                    this.setState({\n                        isLoaded: false,\n                        selectedBill: '',\n                        originalBillText: [],\n                        reviewContent: '',\n                        amendmentFieldsetIsActive: false,\n                        reviewFieldsetIsActive: false,\n                        reprintsFiltered: key === \"selectedLegNum\" || key === \"selectedLegDate\" ? this.state.reprintsFiltered : false,\n                        reviewKey: 1\n                    });\n\n                    const params = \"?sessionID=\" + this.state.selectedSession.SessionID + \"&legislationVersionID=\" + this.state.selectedLegType.LegislationVersionID + \"&IsComplete=\" + (this.state.showCompletedItems ? 'true' : 'false');\n                    this.props.actions.getBillManagementList(params)\n                        .then(() => {\n                            if ([\"Gov Recommendation\", \"Veto Explanation\"].includes(this.state.selectedLegType.Name)) {\n                                //Get bills in the session for the bill dropdown\n                                this.getSessionBills();\n                            }\n\n                            let billList = [...this.props.bills.billManagementList];\n\n                            if (this.state.showCompletedItems) { billList = billList.filter(text => !text.PendingChange) }\n\n                            if (key === \"selectedLegNum\" || key === \"selectedLegDate\") {\n                                if (key === \"selectedLegNum\" && value.value !== \"clear\") {\n                                    billList = billList.filter(x => x.LegislationNumber.toLowerCase().includes(value.value.toLowerCase()))\n                                }\n\n                                if (key === \"selectedLegDate\" && value.value != \"clear\") {\n                                    billList = billList.filter(x => moment(this.state.showCompletedItems ? x.VersionDate : x.CandidateDate).format(\"MM/DD/YYYY\") === moment(value.value).format(\"MM/DD/YYYY\"));\n                                }\n\n                                //Apply previously set filters if needed\n                                if (key === \"selectedLegDate\" && this.state.selectedLegNum !== '' && this.state.selectedLegNum.value !== 'clear') {\n                                    billList = billList.filter(x => x.LegislationNumber.toLowerCase().includes(this.state.selectedLegNum.value.toLowerCase()))\n                                }\n\n                                if (key === \"selectedLegNum\" && this.state.selectedLegDate !== '' && this.state.selectedLegDate.value !== \"clear\") {\n                                    billList = billList.filter(x => moment(this.state.showCompletedItems ? x.VersionDate : x.CandidateDate).format(\"MM/DD/YYYY\") === moment(this.state.selectedLegDate.value).format(\"MM/DD/YYYY\"));\n                                }\n                            } else {\n                                this.setState({\n                                    selectedLegNum: '',\n                                    selectedLegDate: ''\n                                })\n                            }\n\n                            this.setLegDateOptions(billList);\n\n                            this.setState({\n                                isLoaded: true\n                            });\n                        }).catch(err => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            this.setState({\n                                billList: [], // makes it apparent that something may have gone wrong but also prevents the list retaining old values\n                                isLoaded: true\n                            });\n                        });\n\n                }\n            });\n        }\n    }\n\n    updateBillListByLegislationID(legislationID) {\n        const params = \"?sessionID=\" + this.state.selectedSession.SessionID + \"&legislationID=\" + legislationID + \"&legislationVersionID=\" + this.state.selectedLegType.LegislationVersionID + \"&IsComplete=\" + (this.state.showCompletedItems ? 'true' : 'false');\n        this.props.actions.getBillManagementList(params)\n            .then(() => {\n                let billListGetResponse = [...this.props.bills.billManagementList];\n                let billListInState = [...this.state.billList];\n\n                const associatedBillInStateIndex = billListInState.findIndex(b => b.LegislationID === legislationID);\n                if (associatedBillInStateIndex > -1) {\n                    const associatedBillInGetResponse = billListGetResponse.find(b => b.LegislationID === legislationID);\n                    if (associatedBillInGetResponse) {\n                        billListInState[associatedBillInStateIndex] = associatedBillInGetResponse;\n                        this.setState({ billList: billListInState })\n                    }\n                }\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    billList: [] // makes it apparent that something may have gone wrong but also prevents the list retaining old values\n                });\n            });\n    }\n\n    handleVersionDateChange(value) {\n        //Need to +1 the key to refresh the editor content\n        let key = this.state.reviewKey + 1;\n\n        this.setState({\n            versionDate: value,\n            reviewContent: this.updateDraftTextVersionDate(this.state.reviewContent, value),\n            reviewKey: key\n        }, () => {\n            //If the bill is reenrolled check the version publish date against the reconvene date to decide whether to set the header to SESSION or RECONVENED SESSION\n            if (this.state.selectedLegType.Name === \"Reenrolled\") {\n                let doc = new DOMParser().parseFromString(this.state.reviewContent, \"text/html\");\n                let paragraphs = doc.getElementsByTagName('p');\n\n                if (this.props.session.sessionList.find(x => x.SessionID === this.state.selectedSession.SessionID).SessionEvents.find(x => x.DisplayName === \"Reconvene\")\n                    && moment(this.props.session.sessionList.find(x => x.SessionID === this.state.selectedSession.SessionID).SessionEvents.find(x => x.DisplayName === \"Reconvene\").ActualDate).isSameOrBefore(this.state.versionDate, \"day\")) {\n                    paragraphs[0].innerHTML = this.state.selectedSession.SessionYear + \" RECONVENED SESSION\";\n\n                    this.setState({\n                        reviewContent: doc.body.innerHTML,\n                        onReconvene: true\n                    })\n                } else {\n                    paragraphs[0].innerHTML = this.state.selectedSession.SessionYear + \" SESSION\";\n\n                    this.setState({\n                        reviewContent: doc.body.innerHTML,\n                        onReconvene: false\n                    })\n                }\n            }\n        })\n    }\n\n    updateDraftTextVersionDate(draftText, versionDate) {\n        let doc = new DOMParser().parseFromString(draftText, \"text/html\");\n        let elements = doc.getElementsByClassName('versiondate');\n\n        //elements is an array, may as well iterate over it, especially since some bad data has had multiple tags with class versiondate \n        for (var i = 0; i < elements.length; i++) {\n            elements[i].innerText = moment(versionDate).format(\"LL\");\n        }\n\n        return doc.body.innerHTML;\n    }\n\n    selectBill(bill, billIndex, confirmed, LDNumber, callback) {\n        if (this.state.isDirty && !confirmed) {\n            this.setState({\n                showBillConfirmation: () => this.selectBill(bill, billIndex, true, LDNumber, callback),\n                storedBill: bill,\n                storedBillIndex: billIndex\n            })\n        } else {\n            this.setState({\n                showBillConfirmation: false,\n                replaced: false,\n                wasEmpty: false,\n                isDirty: false,\n                changeCount: 0\n            }, () => {\n                //A bill has been selected. Load the amendments and legislation text then scroll down to it\n                let billTextParams = bill ? \"?legislationID=\" + (bill.LegislationID) : ('?LDNumber=' + LDNumber + '&sessionID=' + this.state.selectedSession.SessionID);\n                this.setState({\n                    billDataIsLoading: billIndex\n                }, () => {\n                    this.props.actions.getBillText(billTextParams, true)\n                        .then(() => {\n                            if (!bill) {\n                                bill = (this.state.sessionBillsList.find(sbl => sbl.SessionID === this.state.selectedSession.SessionID) ? this.state.sessionBillsList.find(sbl => sbl.SessionID === this.state.selectedSession.SessionID).bills : []).find(b => b.LegislationID === this.props.bills.billText.find(bt => bt.LegislationID).LegislationID)\n                            }\n                            if (!bill) {\n                                this.setState({\n                                    billDataIsLoading: null\n                                })\n                                this.props.actions.makeToast([{ message: \"Bill data not found for LD Number provided\", type: \"failure\" }]);\n                                return;\n                            }\n                            //The first step to deciding what text should show by default is to filter out all the amendments and conference reports\n                            let billTextForReviewPane = this.props.bills.billText.filter(text => ![\"Amendment\", \"Conference Report\"].includes(text.LegislationVersion) && (text.LegislationVersion !== \"Gov Recommendation\" || this.state.selectedLegType.Name === \"Gov Recommendation\"))\n                            let billText;\n                            if (!this.state.showCompletedItems && [\"Gov Recommendation\", \"Veto Explanation\"].includes(this.state.selectedLegType.Name) && isNaN(billIndex) && this.props.bills.billText.find(bt => bt.LegislationVersion === this.state.selectedLegType.Name)) {\n                                //they are adding a bill to the queue via the session bill selector, but there is already a gov rec on their desired bill\n                                //notify them as such, and if there is a public version, propose a link to red edit for them to edit/re-publish this version;\n                                //otherwise, select the non-public version for editing\n                                //if we allowed them to edit the existing public version (if present), it could result in the version being saved but not having file gen run (if they save but don't publish)\n                                if (this.props.bills.billText.find(bt => bt.LegislationVersion === this.state.selectedLegType.Name && bt.IsPublic)) {\n                                    this.setState({\n                                        billDataIsLoading: null\n                                    })\n                                    if (callback) callback();\n                                    let a = document.createElement('a');\n                                    a.target = '_blank';\n                                    a.href = `/bill-details/${this.state.selectedSession.SessionCode}/${bill.LegislationNumber}/text/${this.props.bills.billText.find(bt => bt.LegislationVersion === this.state.selectedLegType.Name)?.DocumentCode}`;\n                                    document.body.appendChild(a);\n                                    if (confirm(`This bill already has a PUBLISHED ${this.state.selectedLegType.Name === \"Gov Recommendation\" ? \"Governor's Recommendation\" : \"Veto Explanation\"}. Press OK to be taken to the red-edit page for this existing version.`)) {\n                                        a.click();\n                                    }\n                                    document.body.removeChild(a);\n                                    return;\n                                } else {\n                                    billText = this.props.bills.billText.find(bt => bt.LegislationVersion === this.state.selectedLegType.Name);\n                                }\n                            }\n                            //If there is one that matches the legislation text id, use that one for the review pane\n                            billText = billText ?? billTextForReviewPane.find(bt => bt.LegislationTextID === bill.LegislationTextID);\n                            //If the search is by LD Number and there is only one returned, use that one\n                            if (LDNumber && billTextForReviewPane.length === 1) {\n                                billText = billTextForReviewPane[0];\n                            }\n                            //Otherwise, if there is an unpublished active version, then set that one as the main text since unpublished changes are from a previous save                            \n                            if (!billText) {\n                                billText = !isNaN(billIndex) ? billTextForReviewPane.find(text => !text.IsPublic && text.IsActive) : { DraftText: '' }; //if selecting a session bill, just use new object with only draft text\n                            }\n                            //If one isn't found then select the text that is active\n                            if (!billText) {\n                                billText = billTextForReviewPane.find(text => text.IsActive);\n                            }\n                            //If there still isn't one then select the first one in the list, or nothing if the list is empty\n                            if (!billText) {\n                                billText = billTextForReviewPane.length > 0 ? billTextForReviewPane[0] : { DraftText: '' }\n                            }\n                            //If the text is already of the version specified in the selector, then it has been previously saved (e.g. not just the base doc anymore)\n                            //Therefore, for the version date, use the existing version date if it has already been saved, otherwise default to today's date\n                            const billVersionDate = billText && this.state.selectedLegType.LegislationVersionID === billText.LegislationVersionID ? moment(billText.VersionDate) : moment();\n                            //Now get the index of the selected bill text\n                            const selectedBillTextIndex = this.props.bills.billText.findIndex(text => text.LegislationTextID === billText.LegislationTextID);\n                            const amendments = this.props.bills.billText.filter(text => [\"Amendment\", \"Conference Report\", \"Gov Recommendation\"].includes(text.LegislationVersion));\n\n                            // Get the json headers if the selected version queue is \"Engrossed\" and we are not in completed items\n                            let jsonPromise, headers, reviewContent, patronageInfo;\n                            let headerError = false;\n\n                            if (this.state.selectedLegType.Name === \"Engrossed\"\n                                || this.state.selectedLegType.Name === \"Reengrossed\"\n                                || this.state.selectedLegType.Name === \"Chaptered\"\n                                || this.state.selectedLegType.Name === \"Enrolled\"\n                                || this.state.selectedLegType.Name === \"Reenrolled\") {\n\n                                const jsonHeadersRequestString = this.getJsonHeadersRequestString(billText.LegislationTextID, bill.DocumentCode);\n\n                                jsonPromise = this.props.actions.getJsonHeaders(jsonHeadersRequestString)\n                                    .then(() => {\n                                        if (this.props.bills.jsonHeaders) {\n                                            headers = getHtml(this.props.bills.jsonHeaders);\n\n                                            //Add the PassageDates to the draft text if this is a resolution and in the enrolled queue\n                                            if ((this.state.selectedLegType.Name === \"Chaptered\" || this.state.selectedLegType.Name === \"Enrolled\") && (bill.LegislationTypeCode === \"J\" || bill.LegislationTypeCode === \"R\")) {\n                                                headers = this.applyPassageDates(headers, billText, bill.LegislationTypeCode, bill.HousePassageDate, bill.SenatePassageDate);\n                                            }\n\n                                            reviewContent = headers + billText.DraftText;\n\n                                            //Remove ldtitle from document if the header is present and the header also contains the ldtitle\n                                            let doc = document.createElement('div');\n                                            doc.insertAdjacentHTML(\"afterbegin\", reviewContent);\n                                            let header = doc.getElementsByTagName('div');\n                                            let newDraftText;\n\n                                            if (header[0] != undefined) {\n                                                //Store the header somewhere while we find and iterate over paragraphs in the rest of the doc\n                                                let headerContainer = header[0].innerHTML;\n                                                let headerParagraphs = header[0].getElementsByTagName('p');\n\n                                                for (let i = 0; i < headerParagraphs.length; i++) {\n                                                    if (['ldtitle', 'ld', 'patronLine', 'patctr'].includes(headerParagraphs[i].classList[0])) {\n                                                        //Temporarily remove header                              \n                                                        header[0].innerHTML = \"\";\n\n                                                        //We found the ldtitle or patronage in the header, so iterate over the paragraphs to find any duplicate ldtitles or patronages and eliminate them\n                                                        let docParagraphs = doc.getElementsByTagName('p');\n\n                                                        for (let j = 0; j < docParagraphs.length; j++) {\n                                                            if (billText.LegislationVersion === \"Substitute\" && ['pro', 'center', 'patronLine', 'patctr', 'ldtitle', 'ld'].includes(docParagraphs[j].classList[0])) {\n                                                                doc.removeChild(docParagraphs[j])\n                                                                j--;\n                                                            } else if (billText.LegislationVersion === \"Substitute\") {\n                                                                continue;\n                                                            }\n\n                                                            if (docParagraphs[j] && ['section', 'enactstm'].includes(docParagraphs[j].classList[0])) {\n                                                                break; //reached the actal body of the text, don't remove any more\n                                                            } else if (docParagraphs[j] && ['ldtitle', 'ld', 'patronLine', 'patctr', 'center'].includes(docParagraphs[j].classList[0])) {\n                                                                doc.removeChild(docParagraphs[j])\n                                                                j--\n                                                            }\n                                                        }\n                                                    } else if (this.state.selectedLegType.Name === \"Engrossed\" && doc.getElementsByClassName(\"billpatron\")[0]) {\n                                                        //If working on an engrossed version, store the headers' patronage info which is needed for the preview (the object returned in the GetLegislationTextById call is not always correct)\n                                                        patronageInfo = doc.getElementsByClassName(\"billpatron\")[0].textContent\n                                                    }\n                                                }\n\n                                                if (this.state.selectedLegType.Name === \"Reenrolled\"\n                                                    && this.props.session.sessionList.find(x => x.SessionID === this.state.selectedSession.SessionID).SessionEvents.find(x => x.DisplayName === \"Reconvene\")\n                                                    && moment(this.props.session.sessionList.find(x => x.SessionID === this.state.selectedSession.SessionID).SessionEvents.find(x => x.DisplayName === \"Reconvene\").ActualDate).isSameOrBefore(billVersionDate, \"day\")) {\n                                                    //Set the header to reconvened session and reattach the header \n                                                    let headerDoc = document.createElement('div');\n                                                    headerDoc.insertAdjacentHTML(\"afterbegin\", headerContainer);\n                                                    let paragraphs = headerDoc.getElementsByTagName('p');\n                                                    paragraphs[0].innerHTML = this.state.selectedSession.SessionYear + \" RECONVENED SESSION\";\n\n                                                    header[0].appendChild(headerDoc);\n\n                                                    this.setState({\n                                                        onReconvene: true\n                                                    })\n                                                } else {\n                                                    //Reattach the header\n                                                    header[0].innerHTML = headerContainer;\n                                                    this.setState({\n                                                        onReconvene: false\n                                                    })\n                                                }\n\n                                                newDraftText = doc.innerHTML\n                                            }\n\n                                            if (newDraftText != undefined) {\n                                                reviewContent = newDraftText\n                                            }\n                                        }\n                                    }).catch(e => {\n                                        console.log(e)\n                                        reviewContent = `<p class=\"message-error\">${typeof e === 'object' && !Array.isArray ? JSON.parse(e).Name || \"Unknown Error\" : e}</p>`;\n                                        headerError = true;\n                                    })\n                            } else {\n                                reviewContent = billText.DraftText\n                            }\n\n                            Promise.all([jsonPromise])\n                                .finally(() => {\n                                    let storedBill;\n\n                                    if (bill) {\n                                        bill.SessionCode = this.state.selectedSession.SessionCode;\n                                    } else {\n                                        storedBill = { ...this.state.storedBill }\n                                        storedBill.SessionCode = this.state.selectedSession.SessionCode;\n                                    }\n\n                                    //if this is a gov rec/veto version that has NOT already been saved, display the header info\n                                    if (!this.state.showCompletedItems && [\"Gov Recommendation\", \"Veto Explanation\"].includes(this.state.selectedLegType.Name) && !(/^\\<p class=['\"].*['\"]>\\([HS][BJR]\\d{1,5}\\)\\<\\/p>\\s{0,1}\\<p class=['\"].*['\"]>GOVERNOR'S (RECOMMENDATION|VETO)\\<\\/p>/).test(reviewContent)) {\n                                        //if it has bill number, but not the GOVERNOR'S RECOMMENDATION or GOVERNOR'S VETO line, remove the existing bill number line before we add both (to prevent duplicate bill # lines)\n                                        //if it has no bill number, but does have the GOVERNOR'S RECOMMENDATION or GOVERNOR'S VETO line, remove the existing GOV line before we add both (to prevent duplicate GOV lines)\n                                        reviewContent = reviewContent.replace(/^(\\<p class=['\"].*['\"]>\\([HS][BJR]\\d{1,5}\\)\\<\\/p>\\s{0,1}|\\<p class=['\"].*['\"]>GOVERNOR'S (RECOMMENDATION|VETO)\\<\\/p>\\s{0,1})/, \"\");\n                                        reviewContent = \"<p class='textbl'>\" + \"(\" + (bill.LegislationNumber) + \")</p><p class='textbl'>\" + (this.state.selectedLegType.Name === \"Gov Recommendation\" ? \"GOVERNOR'S RECOMMENDATION\" : \"GOVERNOR'S VETO\") + \"</p>\" + this.updateDraftTextVersionDate(reviewContent, billVersionDate);\n                                    } else {\n                                        //default version date within the draft text if present\n                                        reviewContent = this.updateDraftTextVersionDate(reviewContent, billVersionDate)\n                                    }\n\n                                    //remove selected bill from checkBills/enrolledPrintQueue arrays so they don't publish it from batch publish, or batch print, while they have maybe made unsaved changes in the tinymce editor\n                                    let checkedBills = [...this.state.checkedBills];\n                                    const checkedBillsIndex = checkedBills.map(b => b.LegislationID).indexOf((bill.LegislationID));\n                                    if (checkedBillsIndex !== -1) {\n                                        checkedBills.splice(checkedBillsIndex, 1);\n                                    }\n                                    let enrolledPrintQueue = [...this.state.enrolledPrintQueue];\n                                    const enrolledPrintQueueIndex = enrolledPrintQueue.map(b => b.LegislationID).indexOf((bill.LegislationID));\n                                    if (enrolledPrintQueueIndex !== -1) {\n                                        enrolledPrintQueue.splice(enrolledPrintQueueIndex, 1);\n                                    }\n\n                                    this.setState({\n                                        headers: headers,\n                                        patronageInfo: patronageInfo,\n                                        billDataIsLoading: null,\n                                        selectedBill: bill ? bill : storedBill,\n                                        originalBillText: this.props.bills.billText,\n                                        amendments: amendments,\n                                        amendmentFieldsetIsActive: true,\n                                        reviewFieldsetIsActive: true,\n                                        billFieldsetIsActive: false,\n                                        reviewContent: reviewContent,\n                                        savedReviewContent: reviewContent,\n                                        editorChanged: false,\n                                        checkedBills,\n                                        enrolledPrintQueue,\n                                        headerError: headerError,\n                                        selectedBillTextIndex: selectedBillTextIndex,\n                                        versionDate: billVersionDate,\n                                        reviewKey: 1\n                                    }, () => {\n                                        //Get the size and position of the amendment or review form and scroll down to it\n                                        const rect = this.state.showCompletedItems ? this.reviewRef.current.getBoundingClientRect() : this.amendmentRef.current.getBoundingClientRect();\n                                        const windowY = window.scrollY;\n                                        window.scrollTo({\n                                            top: rect.top + windowY,\n                                            behavior: 'smooth'\n                                        });\n                                        if (callback) callback();\n                                    });\n                                })\n                        }).catch(err => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            console.log(err);\n                            this.setState({\n                                billDataIsLoading: null\n                            });\n                            this.props.actions.makeToast([{ message: \"Failed to get Bill Text\", type: \"failure\" }]);\n                            if (callback) callback();\n                        });\n                });\n            })\n        }\n    }\n\n    closeConfirmation() {\n        this.setState({\n            showTextConfirmation: false,\n            showBillConfirmation: false,\n            showCategoryConfirmation: false\n        })\n    }\n\n    selectBillIndex(index, confirmed) {\n        if (this.state.isDirty && !confirmed) {\n            this.setState({\n                showTextConfirmation: true,\n                storedTextIndex: index\n            })\n        } else {\n            this.setState({\n                showTextConfirmation: false,\n                isDirty: false,\n                wasEmpty: false,\n                replaced: false,\n                changeCount: 0,\n                changingBillIndex: index\n            }, () => {\n                if (this.state.originalBillText[index]) {\n                    const selectedBillText = this.state.originalBillText[index];\n\n                    //If the text is already of the version specified in the selector, then it has been previously saved (e.g. not just the base doc anymore)\n                    //Therefore, for the version date, use the existing version date if it has already been saved, otherwise default to today's date\n                    const billVersionDate = this.state.selectedLegType.LegislationVersionID === selectedBillText.LegislationVersionID ? moment(selectedBillText.VersionDate) : moment();\n\n                    let jsonPromise, headers, reviewContent, patronageInfo;\n                    let headerError = false;\n                    const bill = this.state.billList.find(it => it.LegislationID === this.state.originalBillText[index].LegislationID) || (this.state.sessionBillsList.find(sbl => sbl.SessionID === this.state.selectedSession.SessionID) && this.state.sessionBillsList.find(sbl => sbl.SessionID === this.state.selectedSession.SessionID).bills.find(it => it.LegislationID === this.state.originalBillText[index].LegislationID));\n\n                    if (this.state.selectedLegType.Name === \"Engrossed\"\n                        || this.state.selectedLegType.Name === \"Reengrossed\"\n                        || this.state.selectedLegType.Name === \"Chaptered\"\n                        || this.state.selectedLegType.Name === \"Enrolled\"\n                        || this.state.selectedLegType.Name === \"Reenrolled\") {\n\n                        const jsonHeadersRequestString = this.getJsonHeadersRequestString(this.state.originalBillText[index].LegislationTextID, bill.DocumentCode);\n\n                        jsonPromise = this.props.actions.getJsonHeaders(jsonHeadersRequestString)\n                            .then(() => {\n                                if (this.props.bills.jsonHeaders) {\n                                    headers = getHtml(this.props.bills.jsonHeaders);\n\n                                    //Add the PassageDates to the draft text if this is a resolution and in the enrolled queue\n                                    if ((this.state.selectedLegType.Name === \"Chaptered\" || this.state.selectedLegType.Name === \"Enrolled\") && (bill.LegislationTypeCode === \"J\" || bill.LegislationTypeCode === \"R\")) {\n                                        headers = this.applyPassageDates(headers, selectedBillText, bill.LegislationTypeCode, bill.HousePassageDate, bill.SenatePassageDate)\n                                    }\n\n                                    reviewContent = headers + this.state.originalBillText[index].DraftText;\n\n                                    //Remove ldtitle from document if the header is present and the header also contains the ldtitle\n                                    let doc = document.createElement('div');\n                                    doc.insertAdjacentHTML(\"afterbegin\", reviewContent);\n                                    let header = doc.getElementsByTagName('div');\n                                    let newDraftText;\n\n                                    if (header[0] != undefined) {\n                                        //Store the header somewhere while we find and iterate over paragraphs in the rest of the doc\n                                        let headerContainer = header[0].innerHTML;\n                                        let headerParagraphs = header[0].getElementsByTagName('p');\n\n                                        for (let i = 0; i < headerParagraphs.length; i++) {\n                                            if (['ldtitle', 'ld', 'patronLine', 'patctr'].includes(headerParagraphs[i].classList[0])) {\n                                                //Temporarily remove header                              \n                                                header[0].innerHTML = \"\";\n\n                                                //We found the ldtitle or patronage in the header, so iterate over the paragraphs to find any duplicate ldtitles or patronages and eliminate them\n                                                let docParagraphs = doc.getElementsByTagName('p');\n\n                                                for (let j = 0; j < docParagraphs.length; j++) {\n                                                    if (selectedBillText.LegislationVersion === \"Substitute\" && ['pro', 'center', 'patronLine', 'patctr', 'ldtitle', 'ld'].includes(docParagraphs[j].classList[0])) {\n                                                        doc.removeChild(docParagraphs[j])\n                                                        j--;\n                                                    } else if (selectedBillText.LegislationVersion === \"Substitute\") {\n                                                        continue;\n                                                    }\n\n                                                    if (docParagraphs[j] && ['section', 'enactstm'].includes(docParagraphs[j].classList[0])) {\n                                                        break; //reached the actal body of the text, don't remove any more\n                                                    } else if (docParagraphs[j] && ['ldtitle', 'ld', 'patronLine', 'patctr', 'center'].includes(docParagraphs[j].classList[0])) {\n                                                        doc.removeChild(docParagraphs[j])\n                                                        j--\n                                                    }\n                                                }\n                                            } else if (this.state.selectedLegType.Name === \"Engrossed\" && doc.getElementsByClassName(\"billpatron\")[0]) {\n                                                //If working on an engrossed version, store the headers' patronage info which is needed for the preview (the object returned in the GetLegislationTextById call is not always correct)\n                                                patronageInfo = doc.getElementsByClassName(\"billpatron\")[0].textContent\n                                            }\n                                        }\n\n                                        if (this.state.selectedLegType.Name === \"Reenrolled\"\n                                            && this.props.session.sessionList.find(x => x.SessionID === this.state.selectedSession.SessionID).SessionEvents.find(x => x.DisplayName === \"Reconvene\")\n                                            && moment(this.props.session.sessionList.find(x => x.SessionID === this.state.selectedSession.SessionID).SessionEvents.find(x => x.DisplayName === \"Reconvene\").ActualDate).isSameOrBefore(billVersionDate, \"day\")) {\n                                            //Set the header to reconvened session and reattach the header \n                                            let headerDoc = document.createElement('div');\n                                            headerDoc.insertAdjacentHTML(\"afterbegin\", headerContainer);\n                                            let paragraphs = headerDoc.getElementsByTagName('p');\n                                            paragraphs[0].innerHTML = this.state.selectedSession.SessionYear + \" RECONVENED SESSION\";\n\n                                            header[0].appendChild(headerDoc);\n\n                                            this.setState({\n                                                onReconvene: true\n                                            })\n                                        } else {\n                                            //Reattach the header\n                                            header[0].innerHTML = headerContainer;\n\n                                            this.setState({\n                                                onReconvene: false\n                                            })\n                                        }\n\n                                        newDraftText = doc.innerHTML\n                                    }\n\n                                    if (newDraftText != undefined) {\n                                        reviewContent = newDraftText\n                                    }\n                                }\n                            }).catch(e => {\n                                console.log(e)\n                                reviewContent = `<p class=\"message-error\">${typeof e === 'object' && !Array.isArray ? JSON.parse(e).Name || \"Unknown Error\" : e}</p>`;\n                                headerError = true;\n                            })\n                    } else {\n                        reviewContent = this.state.originalBillText[index].DraftText;\n                    }\n\n                    Promise.all([jsonPromise])\n                        .finally(() => {\n                            //if this is a gov rec/veto version that has NOT already been saved, display the header info\n                            if (!this.state.showCompletedItems && [\"Gov Recommendation\", \"Veto Explanation\"].includes(this.state.selectedLegType.Name) && ![\"Gov Recommendation\", \"Veto Explanation\"].includes(this.state.originalBillText[index].LegislationVersion)) {\n                                reviewContent = \"<p class='textbl'>\" + \"(\" + bill.LegislationNumber + \")</p><p class='textbl'>\" + (this.state.selectedLegType.Name === \"Gov Recommendation\" ? \"GOVERNOR'S RECOMMENDATION\" : \"GOVERNOR'S VETO\") + \"</p><p></p>\"\n                            } else {\n                                //default version date within the draft text if present\n                                reviewContent = this.updateDraftTextVersionDate(reviewContent, billVersionDate)\n                            }\n\n                            this.setState({\n                                headers: headers,\n                                patronageInfo: patronageInfo,\n                                selectedBillTextIndex: index,\n                                reviewContent: reviewContent,\n                                savedReviewContent: reviewContent,\n                                editorChanged: false,\n                                headerError: headerError,\n                                versionDate: billVersionDate,\n                                reviewKey: 1,\n                                changingBillIndex: false\n                            })\n                        })\n                }\n            })\n        }\n    }\n\n    toggleCheckAll() {\n        const opposite = !this.state.checkAll;\n        let checkedBills = [...this.state.checkedBills];\n\n        this.state.billList.forEach(bill => {\n            const billIndex = checkedBills.findIndex(b => b.LegislationTextID === bill.LegislationTextID)\n            if (!opposite) {\n                checkedBills.splice(billIndex, 1);\n            } else if (billIndex === -1) {\n                checkedBills.push(bill);\n            }\n        });\n        this.setState({\n            checkedBills: checkedBills,\n            checkAll: opposite\n        })\n    }\n\n    checkBill(bill, enrolledPrintQueue, e) {\n        let checkedBills = enrolledPrintQueue ? [...this.state.enrolledPrintQueue] : [...this.state.checkedBills];\n        const billIndex = checkedBills.findIndex(b => b.LegislationTextID === bill.LegislationTextID)\n\n        if (billIndex !== -1) {\n            checkedBills.splice(billIndex, 1);\n        } else {\n            checkedBills.push(bill);\n        }\n        if (enrolledPrintQueue) {\n            this.setState({ enrolledPrintQueue: checkedBills });\n        } else {\n            this.setState({ checkedBills }, () => {\n                if (!this.state.checkedBills.length) {\n                    this.setState({\n                        customPublishDate: null,\n                        useCurrentPublishDates: true\n                    })\n                }\n            });\n        }\n    }\n\n    togglePublishDatePreference() {\n        this.setState({ useCurrentPublishDates: !this.state.useCurrentPublishDates }, () => {\n            if (this.state.useCurrentPublishDates) {\n                this.setState({ customPublishDate: null })\n            }\n        })\n    }\n\n    handlePublishDateChange(date) {\n        this.setState({ customPublishDate: date })\n    }\n\n    getSessionBills() {\n        if (!this.state.sessionBillsList || !this.state.sessionBillsList.length || !this.state.sessionBillsList.find(sbl => sbl.SessionID === this.state.selectedSession.SessionID))\n            //Get bills in the session for the bill dropdown\n            this.props.actions.getSessionBills('?sessionID= ' + this.state.selectedSession.SessionID).then(() => {\n                let bills = [...this.props.bills.sessionBills].filter(b => b.LegislationTypeCode === \"B\" && (this.props.login.userClaims.roles.find((x) => x === \"Admin\") ? true : this.props.login.userClaims.roles.find((x) => x === \"HouseLegislationAuthor\") ? b.ChamberCode === \"H\" : b.ChamberCode === \"S\"));\n                bills.forEach(bill => {\n                    bill.label = bill.LegislationNumber\n                    bill.value = bill.LegislationID\n                });\n                let sessionBillsList = [...this.state.sessionBillsList];\n                sessionBillsList.push({ SessionID: this.state.selectedSession.SessionID, bills: bills })\n                this.setState({\n                    sessionBillsList\n                })\n            })\n    }\n\n    batchPublish() {\n        this.setState({ isSaving: true }, () => {\n            this.props.actions.batchPublish({ \"PublishDate\": !this.state.useCurrentPublishDates && this.state.customPublishDate ? this.state.customPublishDate : null, \"legislationTextIDs\": this.state.checkedBills.map(bills => bills.LegislationTextID), \"legislationIDs\": this.state.checkedBills.map(bills => bills.LegislationID) })\n                .then(() => {\n                    this.props.actions.batchGenBillFile(\"?sessionID=\" + this.state.selectedSession.SessionID, this.state.checkedBills.map(bills => bills.LegislationTextID))\n                        .then(() => {\n                            this.props.actions.makeToast([{ message: \"Publish Successful - Processing Files...\", type: \"success\" }])\n\n                            this.setState({\n                                checkedBills: [],\n                                checkAll: false,\n                                enrolledPrintQueue: [],\n                                useCurrentPublishDates: true,\n                                customPublishDate: null,\n                                isLoaded: false,\n                                selectedBill: '',\n                                originalBillText: [],\n                                reviewContent: '',\n                                amendmentFieldsetIsActive: false,\n                                reviewFieldsetIsActive: false,\n                                reviewKey: 1,\n                                isSaving: false\n                            }, () => {\n                                const params = \"?sessionID=\" + this.state.selectedSession.SessionID + \"&legislationVersionID=\" + this.state.selectedLegType.LegislationVersionID + \"&IsComplete=\" + (this.state.showCompletedItems ? 'true' : 'false');\n                                this.props.actions.getBillManagementList(params)\n                                    .then(() => {\n                                        let billList = [...this.props.bills.billManagementList];\n\n                                        if (this.state.showCompletedItems) { billList = billList.filter(text => !text.PendingChange) }\n\n                                        this.setState({\n                                            selectedLegDate: '',\n                                            selectedLegNum: ''\n                                        })\n\n                                        this.setLegDateOptions(billList);\n                                        this.setState({\n                                            isLoaded: true\n                                        });\n                                    }).catch(err => {\n                                        if (err === 'Aborted') {\n                                            return;\n                                        }\n                                        this.setState({\n                                            billList: [], // makes it apparent that something may have gone wrong but also prevents the list retaining old values\n                                            isLoaded: true\n                                        });\n                                    });\n                            });\n                        }).catch((err) => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            this.props.actions.makeToast([{ message: \"File Generation Failed\", type: \"failure\" }]);\n                            this.setState({ isSaving: false });\n                        })\n                }).catch((err) => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Publish Failed\", type: \"failure\" }]);\n                    this.setState({ isSaving: false });\n                })\n        })\n    }\n\n    batchComplete() {\n        this.setState({ isSaving: true }, () => {\n            this.props.actions.batchComplete({ \"IsComplete\": true, \"IsReleased\": false, \"legislationTextIDs\": this.state.enrolledPrintQueue.map(bills => ({ LegislationTextID: bills.LegislationTextID })) })\n                .then(() => {\n                    let legislationNumbers = {\n                        LegislationNumbers: []\n                    };\n                    this.state.enrolledPrintQueue.forEach(x => {\n                        legislationNumbers.LegislationNumbers.push({\n                            LegislationNumber: x.LegislationNumber\n                        })\n                    })\n                    this.props.actions.sendParchmentEmail(legislationNumbers)\n                        .then(() => {\n                            this.props.actions.makeToast([{ message: \"Print Parchment Successful\", type: \"success\" }])\n\n                            this.setState({\n                                checkedBills: [],\n                                enrolledPrintQueue: [],\n                                useCurrentPublishDates: true,\n                                customPublishDate: null,\n                                isLoaded: false,\n                                selectedBill: '',\n                                originalBillText: [],\n                                reviewContent: '',\n                                amendmentFieldsetIsActive: false,\n                                reviewFieldsetIsActive: false,\n                                reviewKey: 1,\n                                isSaving: false\n                            }, () => {\n                                const params = \"?sessionID=\" + this.state.selectedSession.SessionID + \"&legislationVersionID=\" + this.state.selectedLegType.LegislationVersionID + \"&IsComplete=\" + (this.state.showCompletedItems ? 'true' : 'false');\n                                this.props.actions.getBillManagementList(params)\n                                    .then(() => {\n                                        let billList = [...this.props.bills.billManagementList];\n\n                                        if (this.state.showCompletedItems) { billList = billList.filter(text => !text.PendingChange) }\n\n                                        this.setState({\n                                            selectedLegDate: '',\n                                            selectedLegNum: ''\n                                        })\n\n                                        this.setLegDateOptions(billList);\n                                        this.setState({\n                                            isLoaded: true\n                                        });\n                                    }).catch(err => {\n                                        if (err === 'Aborted') {\n                                            return;\n                                        }\n                                        this.setState({\n                                            billList: [], // makes it apparent that something may have gone wrong but also prevents the list retaining old values\n                                            isLoaded: true\n                                        });\n                                    });\n                            });\n                        })\n                }).catch((err) => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Print Parchment Failed\", type: \"failure\" }]);\n                    this.setState({ isSaving: false });\n                })\n        })\n    }\n\n    applyPassageDates(headers, billText, legislationTypeCode, housePassageDate, senatePassageDate) {\n        //Check the text of the header and doc to make sure the passage dates haven't already been added\n        let preDoc = document.createElement('div');\n        preDoc.insertAdjacentHTML(\"afterbegin\", headers + billText.DraftText);\n        let preDocParagraphs = preDoc.getElementsByTagName(\"p\");\n        let housePassage = false\n        let senatePassage = false;\n\n        for (let i = 0; i < preDocParagraphs.length; i++) {\n            if (preDocParagraphs[i].classList && preDocParagraphs[i].classList[0] === \"house-passage\") {\n                housePassage = true;\n            }\n\n            if (preDocParagraphs[i].classList && preDocParagraphs[i].classList[0] === \"senate-passage\") {\n                senatePassage = true;\n            }\n        }\n\n        //Add the passage dates if they exist in the data but aren't in the DraftText yet - add both chambers for joint resolutions, or just the originating chamber for normal resolutions\n        if (billText.ChamberCode === \"H\") {\n            headers = housePassageDate && housePassageDate != \"\" && !housePassage ? headers + \"<p class='house-passage center'>Agreed to by the House of Delegates, \" + moment(housePassageDate).format(\"LL\") + \"</p>\" : headers;\n            if (legislationTypeCode === \"J\") {\n                headers = senatePassageDate && senatePassageDate != \"\" && !senatePassage ? headers + \"<p class='senate-passage center'>Agreed to by the Senate, \" + moment(senatePassageDate).format(\"LL\") + \"</p><p></p>\" : headers;\n            } else {\n                headers = headers + \"<p></p>\";\n            }\n        } else {\n            headers = senatePassageDate && senatePassageDate != \"\" && !senatePassage ? headers + \"<p class='senate-passage center'>Agreed to by the Senate, \" + moment(senatePassageDate).format(\"LL\") + \"</p>\" : headers;\n            if (legislationTypeCode === \"J\") {\n                headers = housePassageDate && housePassageDate != \"\" && !housePassage ? headers + \"<p class='house-passage center'>Agreed to by the House of Delegates, \" + moment(housePassageDate).format(\"LL\") + \"</p><p></p>\" : headers;\n            } else {\n                headers = headers + \"<p></p>\";\n            }\n        }\n\n        return headers;\n    }\n\n    getJsonHeadersRequestString(legislationTextId, documentCode) {\n        let overrideParam = this.state.selectedLegType.Name.toLowerCase();\n\n        let jsonHeadersRequestString = \"?legislationTextID=\" + legislationTextId + \"&sessionID=\" + this.state.selectedSession.SessionID + \"&overrideLegislationVersion=\" + overrideParam + \"&onlyHeader=true\";\n        if (this.state.selectedLegType.Name === \"Chaptered\") {\n            //For chaptered legislation, add overrideDocumentCode param and use the future chapter number to be displayed in the headers\n            jsonHeadersRequestString += \"&overrideDocumentCode=\" + documentCode;\n        }\n\n        return jsonHeadersRequestString\n    }\n\n    toggleCompleteItems() {\n        this.handleSelectorChange('showCompletedItems', !this.state.showCompletedItems);\n    }\n\n    componentDidMount() {\n        //Get the list of active sessions for the session dropdown\n        this.props.actions.getSessionShallowList(\"IsActive=true\")\n            .then(() => {\n                let sessionList = [...this.props.session.sessionShallowList];\n                sessionList.forEach((session, index) => {\n                    session.label = session.SessionYear + ' ' + session.DisplayName;\n                    session.value = session.SessionID;\n                    //Set the last session in the list as the selected session\n                    if (session.IsDefault) {\n                        this.handleSelectorChange('selectedSession', session);\n                    }\n                });\n                this.setState({\n                    sessionOptions: sessionList\n                });\n            });\n\n        this.props.actions.getBillVersionRef()\n            .then(() => {\n                const billVersionRef = [...this.props.bills.billVersionRef];\n                // Only list the important versions in the dropdown. AKA any version that has an AuthoringLabel is important \n                const billVersionsToUse = billVersionRef.filter(v => v.AuthoringLabel);\n                let billVersionOptions = []\n                billVersionsToUse.forEach(version => {\n                    //Do not add Chaptered to the version list dropdown if Senate user\n                    if (version.Name !== \"Chaptered\" || this.props.login.userClaims.claims.find(x => x.Resource === \"LegislationText\" && (x.Scope === \"All\" || x.Scope === \"House\"))) {\n                        version.label = this.state.showCompletedItems ? version.Name : version.AuthoringLabel;\n                        version.value = version.LegislationVersionID;\n                        billVersionOptions.push(version);\n                    }\n                });\n                this.setState({\n                    billVersionRef: billVersionRef,\n                    legOptions: billVersionOptions.sort((a, b) => a.label.localeCompare(b.label)),\n                });\n            });\n    }\n\n    toggleHeaders() {\n        this.setState(prevState => ({\n            showHeaders: !prevState.showHeaders\n        }))\n    }\n\n    resetWarning() {\n        this.setState({\n            reviewKey: 1\n        })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { selectedBill, originalBillText, headers } = this.state;\n        // Bills that were chaptered, vetoed, or had recommendations added need the date that they were originally signed by the governor visible to the user\n        const signedText = originalBillText.find(text =>\n            text.LegislationVersion === 'Veto Explanation' ||\n            text.LegislationVersion === 'Gov Recommendation' ||\n            text.LegislationVersion === 'Chaptered');\n        if (this.state.isPreviewVisible) {\n            return (\n                <div>\n                    {this.state.showIncompletePdf &&\n                        <Popout togglePortal={this.togglePortal} windowTitle=\"PDF Preview\">\n                            {this.state.gettingIncompletePdf &&\n                                <div className=\"center-spinner spinner\" />\n                            }\n                            <iframe style={{ display: this.state.gettingIncompletePdf ? 'none' : 'block', width: '100%', height: '100%' }} ref={this.pdfRef}></iframe>\n                        </Popout>\n                    }\n                    <div className=\"flex-row align-center bottomline\">\n                        <h2>{this.state.selectedSession.SessionYear} {this.state.selectedSession.DisplayName} / {selectedBill.LegislationNumber}</h2>\n                        <div>\n                            {!this.state.showCompletedItems && ['chaptered', 'enrolled', 'reenrolled', 'engrossed', 'reengrossed'].includes(this.state.selectedLegType.Name.toLowerCase()) &&\n                                <span><button type=\"button\" className=\"button pdf\" style={{ paddingTop: '5px' }} onClick={this.previewPdf}>PDF</button></span>\n                            }\n                            <ReactToPrint\n                                trigger={() => <span><button type=\"button\" className=\"button print\">Print</button></span>}\n                                content={() => this.componentRef}\n                                pageStyle={\"break-inside: avoid\"}\n                            />\n                        </div>\n                    </div>\n                    {this.state.previewContent !== '' && this.state.showCompletedItems\n                        ? <iframe ref={el => (this.componentRef = el)} src={this.state.previewContent} type=\"application/pdf\" width=\"100%\" height=\"1080px\" style={{ marginBottom: \"45px\" }}></iframe>\n                        : <PreviewSection ref={el => (this.componentRef = el)}\n                            headers={headers}\n                            selectedBill={selectedBill}\n                            editorContent={this.state.previewContent}\n                            error={this.state.previewContentError}\n                            selectedLegType={this.state.selectedLegType}\n                            billVersionRef={this.state.billVersionRef}\n                        />\n                    }\n                    <div className={\"align-right floating-button-bar inline-list\" + (!this.state.showCompletedItems && this.state.selectedLegType.Name === 'Enrolled' ? \" print-parchment\" : \"\")}>\n                        {\n                            this.state.showCompletedItems ?\n                                <button disabled={this.state.isSaving} onClick={this.togglePreview} className=\"button secondary\">Edit</button>\n                                : this.state.selectedLegType.Name === 'Enrolled' &&\n                                <React.Fragment>\n                                    <button disabled={this.state.isSaving} onClick={() => { this.handleSave(false, true); this.props.actions.sendParchmentEmail({ LegislationNumbers: [{ LegislationNumber: this.state.selectedBill.LegislationNumber }] }); }} className=\"button\">Print Parchment</button>\n                                    <div />\n                                </React.Fragment>\n                        }\n                        {this.state.showCompletedItems ?\n                            <React.Fragment>\n                                <div className=\"flex-row flex-vertical-center flex-end\">\n                                    <div className=\"toggle-switch\" onClick={this.toggleReprint}>\n                                        <input id=\"official-reprint-button\" checked={this.state.originalBillText[this.state.selectedBillTextIndex] && this.state.originalBillText[this.state.selectedBillTextIndex].IsReprint} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"official-reprint-button\" className=\"checkbox-label no-background\" style={{ whiteSpace: \"no-wrap\", marginTop: '0px', fontSize: '14px' }}>Mark As Official Reprint</label>\n                                    <button disabled={this.state.isSaving || !this.state.selectedBill || (!this.props.login.userClaims.scopes.find((x) => x === \"Senate\") && this.props.login.userClaims.roles.find((x) => x === \"HouseLegislationFilePublisher\") === undefined)} onClick={this.handleSaveCompletedItem} className=\"button\">{this.state.isSaving ? \"Republishing...\" : \"Republish\"}</button>\n                                </div>\n                            </React.Fragment>\n                            :\n                            <React.Fragment>\n                                <button disabled={this.state.isSaving} onClick={this.togglePreview} className=\"button secondary\">Edit</button>\n                                {(this.state.selectedBill.CandidateDate || ([2, 3, 6, 7, 9, 10].includes(this.state.selectedLegType.LegislationVersionID) && !this.state.selectedBill.CandidateDate)) &&\n                                    <button disabled={this.state.isSaving || !this.state.selectedBill || !this.state.originalBillText[this.state.selectedBillTextIndex].DocumentCode || (!this.props.login.userClaims.scopes.find((x) => x === \"Senate\") && this.props.login.userClaims.roles.find((x) => x === \"HouseLegislationFilePublisher\") === undefined)} onClick={() => this.handleSave(true)} className=\"button\">{this.state.isSaving ? \"Publishing...\" : \"Publish\"}</button>\n                                }\n                            </React.Fragment>\n                        }\n                    </div>\n                </div >\n            );\n        } else {\n            return (\n                <div>\n                    {(this.state.showTextConfirmation || this.state.showBillConfirmation) &&\n                        <div className=\"schedule-modal\">\n                            <div className=\"schedule-modal-content\">\n                                <p>You have unsaved changes. Are you sure you want to open a different document?</p>\n                                <button className=\"button secondary float-right\" onClick={() => this.closeConfirmation()}>No</button>\n                                <button className=\"button primary float-right\" onClick={() => this.state.showTextConfirmation ? this.selectBillIndex(this.state.storedTextIndex, true) : this.state.showBillConfirmation()} style={{ marginRight: \"10px\" }}>Yes</button>\n                                <br />\n                            </div>\n                        </div>\n                    }\n                    {this.state.showCategoryConfirmation &&\n                        <div className=\"schedule-modal\">\n                            <div className=\"schedule-modal-content\">\n                                <p>You have unsaved changes. Are you sure you want to select a different option?</p>\n                                <button className=\"button secondary float-right\" onClick={() => this.closeConfirmation()}>No</button>\n                                <button className=\"button primary float-right\" onClick={() => this.checkHandleSelectorChange(this.state.storedKey, this.state.storedValue, true)} style={{ marginRight: \"10px\" }}>Yes</button>\n                                <br />\n                            </div>\n                        </div>\n                    }\n                    <Prompt\n                        when={this.state.isDirty}\n                        message={`You have unsaved changes. Are you sure you would like to leave?`}\n                    />\n                    <div className=\"header-half\">\n                        <h1>Version Authoring{this.state.showCompletedItems && ' (Published Versions)'}</h1>\n                        <p>\n                            <button onClick={() => this.toggleCompleteItems()} className=\"button\" type=\"button\">{this.state.showCompletedItems ? 'Back' : 'View Published Versions'}</button>\n                        </p>\n                    </div>\n                    <div className=\"user-forms dlas-forms\" style={{ paddingBottom: \"40px\" }}>\n                        <fieldset className={this.state.billFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                            <legend onClick={this.toggleFieldsetCollapse.bind(this, 'billFieldsetIsActive')}>Bills {this.state.processingFile && <span> | <i>Creating file...</i></span>}</legend>\n                            <div>\n                                <SelectorSection\n                                    onChange={this.checkHandleSelectorChange}\n                                    sessionOptions={this.state.sessionOptions}\n                                    legOptions={this.state.legOptions}\n                                    selectedSession={this.state.selectedSession}\n                                    selectedLegType={this.state.selectedLegType}\n                                    selectedLegDate={this.state.selectedLegDate}\n                                    selectedLegNum={this.state.selectedLegNum}\n                                    legDateOptions={this.state.legDateOptions}\n                                    disable={this.state.isSaving}\n                                />\n                                <span className=\"insert-message small-text fail\">{this.props.bills.billManagementListError}</span>\n                                <BillGridSection\n                                    billList={this.state.billList.filter(b => !this.state.reprintsFiltered ? true : b.IsReprint)}\n                                    selectBill={this.selectBill}\n                                    selectedBill={this.state.selectedBill}\n                                    checkBill={this.checkBill}\n                                    checkedBills={this.state.checkedBills}\n                                    enrolledPrintQueue={this.state.enrolledPrintQueue}\n                                    batchPublish={this.batchPublish}\n                                    batchComplete={this.batchComplete}\n                                    isSaving={this.state.isSaving}\n                                    isLoaded={this.state.isLoaded}\n                                    billDataIsLoading={this.state.billDataIsLoading}\n                                    completedItems={this.state.showCompletedItems}\n                                    legislationVersionID={this.state.selectedLegType.LegislationVersionID}\n                                    useCurrentPublishDates={this.state.useCurrentPublishDates}\n                                    togglePublishDatePreference={this.togglePublishDatePreference}\n                                    handlePublishDateChange={this.handlePublishDateChange}\n                                    customPublishDate={this.state.customPublishDate}\n                                    reprintsFiltered={this.state.reprintsFiltered}\n                                    filterReprints={this.filterReprints}\n                                    sessionBillsList={this.state.sessionBillsList.find(sbl => sbl.SessionID === this.state.selectedSession.SessionID) ? this.state.sessionBillsList.find(sbl => sbl.SessionID === this.state.selectedSession.SessionID).bills : []}\n                                    toggleCheckAll={this.toggleCheckAll}\n                                    checkAll={this.state.checkAll}\n                                />\n                            </div>\n                        </fieldset>\n                        {!this.state.showCompletedItems &&\n                            <fieldset ref={this.amendmentRef} className={this.state.amendmentFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                                <legend onClick={this.toggleFieldsetCollapse.bind(this, 'amendmentFieldsetIsActive')}>\n                                    Amendments {this.state.amendments.length > 0 && <span style={{ verticalAlign: 'bottom' }} className=\"icon popout\" onClick={(e) => this.togglePortal(this.state.showPortal, e)}></span>}\n                                    {this.state.showPortal &&\n                                        <Popout togglePortal={this.togglePortal} windowTitle={this.state.selectedBill.LegislationNumber + ' Amendments'}>\n                                            <AmendmentSection\n                                                amendments={this.state.amendments}\n                                            />\n                                        </Popout>\n                                    }\n                                </legend>\n                                <div>\n                                    <AmendmentSection\n                                        amendments={this.state.amendments}\n                                    />\n                                </div>\n                            </fieldset>\n                        }\n                        <fieldset ref={this.reviewRef} className={this.state.reviewFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                            <legend onClick={this.toggleFieldsetCollapse.bind(this, 'reviewFieldsetIsActive')}><span>Review </span>\n                                {selectedBill &&\n                                    <span>\n                                        | {selectedBill.LegislationNumber}\n                                        {signedText && signedText.VersionDate &&\n                                            <React.Fragment> | Signed: {moment(signedText.VersionDate).format('MM/DD/YYYY')} </React.Fragment>\n                                        }\n                                    </span>\n                                }</legend>\n                            {!this.state.showCompletedItems && selectedBill &&\n                                <>\n                                    <label htmlFor=\"version-date-picker\">Version Publish Date</label>\n                                    <DatePicker\n                                        id=\"version-date-picker\"\n                                        selected={this.state.versionDate}\n                                        onChange={this.handleVersionDateChange}\n                                    />\n                                </>\n                            }\n                            <div>\n                                {!this.state.showCompletedItems &&\n                                    <React.Fragment>\n                                        <TextList\n                                            originalBillText={this.state.originalBillText}\n                                            selectedBillTextIndex={this.state.selectedBillTextIndex}\n                                            selectBillIndex={this.selectBillIndex}\n                                            selectedLegType={this.state.selectedLegType}\n                                            changingBillIndex={this.state.changingBillIndex}\n                                        />\n                                    </React.Fragment>\n                                }\n                                <ReviewSection\n                                    editorContent={this.state.reviewContent}\n                                    handleEditorChange={this.handleEditorChange}\n                                    sessionId={this.state.selectedSession.SessionID}\n                                    reviewKey={this.state.reviewKey}\n                                    resetWarning={this.resetWarning}\n                                    setWasEmpty={this.setWasEmpty}\n                                    wasEmpty={this.state.wasEmpty}\n                                    setReplaced={this.setReplaced}\n                                    replaced={this.state.replaced}\n                                    billNumber={this.state.selectedBill.LegislationNumber}\n                                    userChamber={this.props.login.userClaims.roles.find((x) => x === \"Admin\") ? \"Admin\" : this.props.login.userClaims.roles.find((x) => x === \"HouseLegislationAuthor\") ? \"H\" : \"S\"}\n                                    allowAmendmentActions={this.state.selectedLegType.Name === \"Gov Recommendation\"}\n                                    allowGovernorAmendmentSponsor={this.state.selectedLegType.Name === \"Gov Recommendation\"}\n                                    amendmentOrigin={this.state.selectedLegType.Name === \"Gov Recommendation\" ? \"G\" : \"\"}\n                                    overrideRemoveAgreeRejectButtons={true}\n                                    legislationVersion={originalBillText[this.state.selectedBillTextIndex] && originalBillText[this.state.selectedBillTextIndex].LegislationVersion}\n                                    pasteAsText={this.state.selectedLegType.Name !== \"Gov Recommendation\"}\n                                    versionAuthoring={true}\n                                />\n                                {this.state.reviewContent != \"\" &&\n                                    <div className=\"align-right floating-button-bar inline-list\">\n                                        {!this.state.showCompletedItems && <button type=\"button\" className=\"button\" disabled={this.state.isSaving || !this.state.selectedBill || this.state.headerError} onClick={() => this.handleSave(false)}>{this.state.isSaving ? \"Saving...\" : \"Save\"}</button>}\n                                        <button type=\"button\" className=\"button\" disabled={this.state.gettingCompletedItemPreview || this.state.isSaving || !this.state.selectedBill || !this.state.originalBillText[this.state.selectedBillTextIndex] || this.state.headerError || (!this.state.showCompletedItems && (this.state.reviewContent !== this.state.savedReviewContent || this.state.selectedLegType && this.state.originalBillText[this.state.selectedBillTextIndex] && this.state.selectedLegType.LegislationVersionID !== this.state.originalBillText[this.state.selectedBillTextIndex].LegislationVersionID))} onClick={this.togglePreview}>{this.state.gettingCompletedItemPreview ? 'Getting Preview' : 'Preview'}</button>\n                                    </div>\n                                }\n                            </div>\n                        </fieldset>\n                    </div>\n                </div>\n            );\n        }\n    }\n}\nexport default connect(\n    (state) => {\n        const { bills, session, nav, login } = state;\n        return {\n            bills,\n            session,\n            nav,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, sessionActionCreators, navActionCreators, printActionCreators), dispatch)\n        }\n    }\n)(VersionManagement)","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport DatePicker from 'react-datepicker';\nimport ReactTable from 'react-table';\nimport moment from 'moment-timezone';\nimport { LargeListSelect } from '../../../lis-shared/lis-layout/components/lis-forms-component';\n\nclass BillGridSection extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedSessionBill: null,\n            ldNumberSearch: '',\n            searchingLDNumber: false,\n            ldWarning: false\n        }\n\n        this.selectSessionBill = this.selectSessionBill.bind(this);\n        this.handleLdNumberSearchChange = this.handleLdNumberSearchChange.bind(this);\n        this.searchByLDNumber = this.searchByLDNumber.bind(this);\n    }\n\n    componentDidUpdate(prevProps) {\n        if ((this.state.selectedSessionBill && prevProps.selectedBill.LegislationNumber !== this.props.selectedBill.LegislationNumber && this.props.selectedBill.LegislationNumber !== this.state.selectedSessionBill.LegislationNumber) || prevProps.legislationVersionID !== this.props.legislationVersionID) {\n            this.setState({ selectedSessionBill: null })\n        }\n    }\n\n    selectSessionBill(legislation) {\n        this.setState({ selectedSessionBill: legislation })\n        this.props.selectBill(legislation, legislation.LegislationNumber);\n    }\n\n    handleLdNumberSearchChange(val) {\n        this.setState({ ldNumberSearch: val })\n    }\n\n    searchByLDNumber(e) {\n        if (e) e.preventDefault()\n        if (![\"G\", \"g\"].includes(this.state.ldNumberSearch[this.state.ldNumberSearch.length - 1])) {\n            this.setState({\n                ldWarning: true\n            })\n            return;\n        }\n        this.setState({ searchingLDNumber: true, ldWarning: false }, () => {\n            this.props.selectBill(null, null, null, this.state.ldNumberSearch, () => {\n                this.setState({ searchingLDNumber: false })\n            });\n        })\n    }\n\n    render() {\n        let columns = [\n            {\n                Header: 'Bill #',\n                sortable: true,\n                sortMethod: ((rowA, rowB, desc) => {\n                    const legChamberA = rowA[0];\n                    const legChamberB = rowB[0];\n                    if (legChamberA !== legChamberB) {\n                        return legChamberA.localeCompare(legChamberB);\n                    }\n\n                    const legTypeA = rowA[1];\n                    const legTypeB = rowB[1];\n                    if (legTypeA !== legTypeB) {\n                        return legTypeA.localeCompare(legTypeB);\n                    }\n\n                    const legKeyA = rowA.substr(2);\n                    const legKeyB = rowB.substr(2);\n                    return legKeyA - legKeyB;\n                }),\n                filterable: false,\n                width: 90,\n                accessor: \"LegislationNumber\",\n                Cell: ({ original, index }) => {\n                    const checked = this.props.enrolledPrintQueue.find(b => b.LegislationTextID === original.LegislationTextID);\n                    if (original.SessionCode) {\n                        return <div>\n                            <Link to={`/bill-details/${original.SessionCode}/${original.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\">{original.LegislationNumber}</Link>\n                            {!this.props.completedItems && original.VersionDate && this.props.legislationVersionID === 3 && <input id=\"sr-publish\" type=\"checkbox\" style={{ float: 'right' }} disabled={this.props.selectedBill && this.props.selectedBill.LegislationTextID === original.LegislationTextID ? true : false} onChange={(e) => this.props.checkBill(original, true, e)} checked={checked ? checked : false} />}\n                        </div>\n                    } else {\n                        return (<span>{original.LegislationNumber}</span>)\n                    }\n                }\n            },\n            {\n                Header: 'Patron',\n                sortable: true,\n                filterable: false,\n                accessor: \"Patrons\",\n                width: 100,\n                Cell: row =>\n                    <span>{row.value && row.value.map((patron, index) => <React.Fragment key={index}>{patron.PatronDisplayName}{index !== row.value.length - 1 && \", \"}</React.Fragment>)}</span>\n            },\n            {\n                Header: 'Caption',\n                sortable: true,\n                filterable: false,\n                accessor: \"Description\",\n                Cell: row => <span>{row.value}</span>\n            },\n            {\n                Header: this.props.completedItems\n                    ? <>Published Date <input\n                        id={'pd-checkbox-selectall'}\n                        type=\"checkbox\"\n                        className=\"checkbox\"\n                        checked={this.props.checkAll}\n                        onChange={this.props.toggleCheckAll}\n                    /></>\n                    : this.props.legislationVersionID === 2 ? 'Engrossed On' : this.props.legislationVersionID === 6 ? 'Reengrossed On' : [3, 7].includes(this.props.legislationVersionID) ? 'Passed on' : 'Candidate Date',\n                sortable: false,\n                filterable: false,\n                accessor: this.props.completedItems ? \"\" : \"CandidateDate\",\n                width: 135,\n                Cell: ({ original, index }) => {\n                    if (!this.props.completedItems) { return <span>{original.CandidateDate ? moment(original.CandidateDate).format(\"MM/DD/YYYY\") : [2, 3, 6, 7].includes(this.props.legislationVersionID) ? \"Pending\" : \"\"}</span> }\n                    else {\n                        const checked = this.props.checkedBills.find(b => b.LegislationTextID === original.LegislationTextID);\n                        return (<div>\n                            <span>{checked && this.props.customPublishDate ? moment(this.props.customPublishDate).format(\"MM/DD/YYYY\") : original.VersionDate ? moment(original.VersionDate).format(\"MM/DD/YYYY\") : \"\"}</span>\n                            {original.VersionDate && <input id=\"sr-publish\" type=\"checkbox\" style={{ float: 'right' }} disabled={this.props.selectedBill && this.props.selectedBill.LegislationTextID === original.LegislationTextID ? true : false} onChange={(e) => this.props.checkBill(original, false, e)} checked={checked ? checked : false} />}\n                        </div>)\n                    }\n                }\n            },\n            {\n                Header: 'Actions',\n                sortable: false,\n                filterable: false,\n                accessor: \"\",\n                width: 90,\n                Cell: ({ original, index }) =>\n                    <div className=\"committee-action-column\">\n                        {this.props.billDataIsLoading === index ?\n                            <div><span className=\"small-spinner\"></span></div>\n                            :\n                            <button className=\"button edit\" type=\"button\" onClick={() => this.props.selectBill(original, index)}>Edit</button>\n                        }\n                        {original.PendingChange\n                            ? <span className=\"icon flag\"></span>\n                            : <div />\n                        }\n                        {original.IsComplete\n                            ? !this.props.completedItems\n                                ? [3, 7].includes(this.props.legislationVersionID) && <i className=\"icon paper-yellow\" style={{ cursor: \"default\" }} />\n                                : <a className=\"icon book\" href={`/bill-details/${original.SessionCode}/${original.LegislationNumber}/text/${original.DocumentCode}`} target=\"_blank\" rel=\"noreferrer\" />\n                            : null\n                        }\n                    </div>\n            }\n        ];\n\n        if (this.props.completedItems) {\n            let docCodeColumn = {\n                Header: 'Doc Code',\n                sortable: true,\n                filterable: false,\n                accessor: \"DocumentCode\",\n                width: 110,\n                Cell: row =>\n                    <span>{row.value}</span>\n            }\n\n            columns.splice(1, 0, docCodeColumn)\n        }\n\n        if (!this.props.completedItems) {\n            let publishDateColumn = {\n                Header: <>Publish On <input\n                    id={'pd-checkbox-selectall'}\n                    type=\"checkbox\"\n                    className=\"checkbox\"\n                    checked={this.props.checkAll}\n                    onChange={this.props.toggleCheckAll}\n                /></>,\n                sortable: false,\n                filterable: false,\n                accessor: \"\",\n                width: 135,\n                Cell: ({ original, index }) => {\n                    const checked = this.props.checkedBills.find(b => b.LegislationTextID === original.LegislationTextID);\n                    return (<div>\n                        <span>{checked && this.props.customPublishDate ? moment(this.props.customPublishDate).format(\"MM/DD/YYYY\") : original.VersionDate ? moment(original.VersionDate).format(\"MM/DD/YYYY\") : \"\"}</span>\n                        {original.VersionDate && <input id=\"sr-publish\" type=\"checkbox\" style={{ float: 'right' }} disabled={((this.props.selectedBill && this.props.selectedBill.LegislationID === original.LegislationID) || (!original.CandidateDate && ![2, 3, 6, 7].includes(this.props.legislationVersionID))) ? true : false} onChange={(e) => this.props.checkBill(original, false, e)} defaultChecked={checked} />}\n                    </div>)\n                }\n            }\n\n            columns.splice(4, 0, publishDateColumn)\n        }\n\n        const billListIDs = this.props.billList && this.props.billList.length ? this.props.billList.map(b => b.LegislationID) : null;\n        return (\n            <div>\n                <div>\n                    <div style={{ display: 'flex', height: (this.props.billList && this.props.billList.length) || [9, 10].includes(this.props.legislationVersionID) ? '25px' : null }}>\n                        <div style={{ width: '90px' }}>\n                            {this.props.completedItems && ((this.props.billList && this.props.billList.length) || this.props.reprintsFiltered) ? <button type=\"button\" className=\"button\" onClick={this.props.filterReprints} style={{ left: '0px', position: 'absolute' }}>{this.props.reprintsFiltered ? 'Show All Legislation' : 'Only Show Reprints'}</button> : null}\n                            {!this.props.completedItems && [9, 10].includes(this.props.legislationVersionID) &&\n                                <div style={{ display: 'flex' }}>\n                                    <LargeListSelect\n                                        className=\"grid-selector-dropdown\"\n                                        classNamePrefix=\"grid-selector-dropdown\"\n                                        placeholder={\"Add a bill...\"}\n                                        options={[...this.props.sessionBillsList].filter(sb => billListIDs && billListIDs.length ? !billListIDs.includes(sb.LegislationID) : true)}\n                                        onChange={(value) => { this.selectSessionBill(value) }}\n                                        styles={{ container: provided => ({ ...provided, width: '130px', position: 'absolute' }) }}\n                                        value={this.state.selectedSessionBill}\n                                    />\n                                    <div style={{ left: '135px', position: 'absolute' }}>\n                                        {this.state.selectedSessionBill && this.props.billDataIsLoading === this.state.selectedSessionBill.LegislationNumber ?\n                                            <span className=\"small-spinner\"></span> : this.props.legislationVersionID === 10 ? <span style={{ fontSize: '12px' }}>OR</span> : null\n                                        }\n                                    </div>\n                                    {this.props.legislationVersionID === 10 &&\n                                        <form className=\"inner-grid\" style={{ left: '160px', width: '180px', position: 'absolute', gridTemplateColumns: '1fr min-content min-content' }}>\n                                            <input\n                                                placeholder='Add by LD Number'\n                                                onChange={(e) => this.handleLdNumberSearchChange(e.target.value)}\n                                                value={this.state.ldNumberSearch}\n                                            />\n                                            {this.state.ldNumberSearch && <button className=\"button\" type=\"submit\" disabled={this.state.searchingLDNumber} onClick={(e) => this.searchByLDNumber(e)}>{this.state.searchingLDNumber ? <div><span className=\"small-spinner\"></span></div> : 'Search'}</button>}\n                                            {this.state.ldWarning && <span style={{ whiteSpace: \"nowrap\", color: \"red\", fontSize: \"13px\" }}>Governor's Recommendation LD numbers must end with a G</span>}\n                                        </form>\n                                    }\n                                </div>\n                            }\n                            {!this.props.completedItems && this.props.legislationVersionID === 3 &&\n                                <button type=\"button\" className=\"button\" disabled={this.props.isSaving || !this.props.enrolledPrintQueue || !this.props.enrolledPrintQueue.length} onClick={this.props.batchComplete} style={{ position: 'relative' }}>Print Parchment</button>\n                            }\n                        </div>\n                        <div style={{ width: \"65px\" }} />\n                        <div style={{ width: '200px' }}>\n                            {!this.props.completedItems && this.props.legislationVersionID === 3 && ((this.props.billList && this.props.billList.length) || this.props.reprintsFiltered) &&\n                                <button type=\"button\" className=\"button\" disabled={this.props.isSaving || !this.props.enrolledPrintQueue || !this.props.enrolledPrintQueue.length || !this.props.checkedBills || !this.props.checkedBills.length} onClick={() => { this.props.batchComplete(); this.props.batchPublish(); }} style={{ position: 'relative' }}>{\"Print Parchment & \" + (this.props.completedItems ? 'Republish' : 'Publish')}</button>\n                            }\n                        </div>\n                        <div style={{ flex: '100 0 auto', width: '100px' }} />\n                        <div style={{ width: '135px' }} />\n                        <div style={{ width: '135px' }}>\n                            {((this.props.billList && this.props.billList.length) || this.props.reprintsFiltered) ? <button type=\"button\" className=\"button\" disabled={this.props.isSaving || !this.props.checkedBills || !this.props.checkedBills.length} onClick={this.props.batchPublish} style={{ width: '135px', position: 'absolute' }}>{this.props.completedItems ? 'Batch Republish' : 'Batch Publish'}</button> : null}\n                            {this.props.checkedBills && this.props.checkedBills.length ?\n                                <div className=\"flex-row flex-vertical-center flex-start\" style={{ right: '91px', marginRight: '135px', position: 'absolute', height: '35px' }} >\n                                    <div className=\"toggle-switch\" onClick={this.props.togglePublishDatePreference}>\n                                        <input id=\"sr-status-change\" disabled={this.props.isSaving} readOnly checked={!this.props.useCurrentPublishDates} type=\"checkbox\" />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"sr-status-change\" style={{ padding: '0.25em 5px', margin: '0px' }}>Use custom publish date</label>\n                                </div>\n                                :\n                                null\n                            }\n                            {this.props.checkedBills && this.props.checkedBills.length && !this.props.useCurrentPublishDates ?\n                                <div id=\"publish-date-datepicker\" style={{ marginRight: '330px', position: 'absolute' }}>\n                                    <DatePicker\n                                        isClearable\n                                        selected={this.props.customPublishDate}\n                                        onChange={this.props.handlePublishDateChange}\n                                    />\n                                </div>\n                                :\n                                null\n                            }\n                        </div>\n                        <div style={{ width: '90px' }} />\n                    </div>\n                </div>\n                {\n                    this.props.reprintsFiltered && this.props.checkedBills && this.props.checkedBills.length && this.props.checkedBills.filter(b => !b.IsReprint).length ?\n                        <div style={{ display: 'flex' }}>\n                            <span className=\"input-feedback\" style={{ marginBottom: '0px' }}>You have checked legislation that are no longer in view as you are only viewing reprints.</span>\n                        </div>\n                        : null\n                }\n                <div>\n                    <ReactTable\n                        resizable={false}\n                        data={this.props.billList}\n                        loading={!this.props.isLoaded}\n                        ref={r => this.reactTable = r}\n                        columns={columns}\n                        minRows={1}\n                        defaultPageSize={20}\n                        pageSizeOptions={[5, 10, 15, 20, 25, 50, 100]}\n                        className=\"committee-table -striped -highlight react-table-hide-no-data\"\n                    />\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default BillGridSection;","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\n\nclass SelectorSection extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n        };\n\n        this.handleSessionChange = this.handleSessionChange.bind(this);\n        this.handleLegTypeChange = this.handleLegTypeChange.bind(this);\n        this.handleLegDateChange = this.handleLegDateChange.bind(this);\n        this.handleLegNumChange = this.handleLegNumChange.bind(this);\n    }\n\n    handleSessionChange(value) {\n        this.props.onChange('selectedSession', value);\n    }\n\n    handleLegTypeChange(value) {\n        this.props.onChange('selectedLegType', value);\n    }\n\n    handleLegDateChange(value) {\n        this.props.onChange('selectedLegDate', value)\n    }\n\n    handleLegNumChange(value) {\n        if (value === \"\") {\n            value = \"clear\";\n        }\n\n        this.props.onChange('selectedLegNum', { value: value })\n    }\n\n    render() {\n        return (\n            <div className=\"inner-grid four\">\n                <div>\n                    <Fields.Dropdown\n                        isDisabled={this.props.disable}\n                        value={this.props.selectedSession}\n                        options={this.props.sessionOptions}\n                        id=\"sessionDropdown\"\n                        onChange={this.handleSessionChange}\n                        placeholder=\"Select Session\"\n                    />\n                </div>\n                <div>\n                    <Fields.Dropdown\n                        isDisabled={this.props.disable}\n                        value={this.props.selectedLegType}\n                        options={this.props.legOptions}\n                        id=\"legDropdown\"\n                        onChange={this.handleLegTypeChange}\n                        placeholder=\"Select Legislation Version\"\n                    />\n                </div>\n                <div>\n                    <Fields.Dropdown\n                        value={this.props.selectedLegDate}\n                        placeholder=\"Filter by Date\"\n                        options={this.props.legDateOptions}\n                        id=\"billDateSearch\"\n                        onChange={(selectedOption, triggeredAction) => {\n                            if (triggeredAction.action === 'clear') {\n                                this.handleLegDateChange({ value: \"clear\" })\n                            } else {\n                                this.handleLegDateChange(selectedOption)\n                            }\n                        }}\n                        isDisabled={this.props.disable || this.props.selectedLegType === \"\"}\n                        isSearchable\n                        isClearable\n                    />\n                </div>\n                <div style={{ display: \"grid\", gridTemplateColumns: \"1fr 50px\" }}>\n                    <input\n                        value={this.props.selectedLegNum.value === \"clear\" ? \"\" : this.props.selectedLegNum.value}\n                        id=\"billNumSearch\"\n                        onChange={(e) => this.handleLegNumChange(e.target.value)}\n                        disabled={this.props.disable || this.props.selectedLegType === \"\"}\n                        style={{ height: \"100%\", width: \"100%\" }}\n                        placeholder=\"Filter by Bill Number\"\n                    />\n                    <a className='icon delete' style={{ marginTop: \"10px\", marginLeft: \"15px\" }} onClick={() => this.handleLegNumChange(\"clear\")}></a>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { session, bills } = state;\n        return {\n            session,\n            bills\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, billActionCreators), dispatch)\n        }\n    }\n)(SelectorSection)","import React from 'react';\nimport renderHTML from 'react-render-html';\n\nclass PreviewSection extends React.Component {\n    render() {\n        const { billVersionRef, selectedLegType, editorContent, selectedBill, error } = this.props;\n        const version = billVersionRef.find(version => version.LegislationVersionID === selectedLegType.LegislationVersionID);\n        // A list of versions that get vertical text running down the side of the document\n        const verticalTextVersionTypes = ['Substitute', 'Introduced', 'Engrossed', 'Enrolled'];\n\n        return (\n            <div className=\"inner-grid two-col-sidebar version-print-preview\" style={{marginBottom: \"45px\"}}>\n                {error ?\n                    <div className=\"message-error\">{error}</div>\n                    :\n                    <React.Fragment>\n                        <div>\n                            {editorContent ? renderHTML(editorContent.replaceAll(\"&nbsp;\", \"\")) : ''}\n                        </div>\n                        {verticalTextVersionTypes.find(type => type === version.Name) &&\n                            <div className=\"status-text\">\n                                <div className=\"vertical-text-lg\">{version.Name}</div>\n                                <div className=\"vertical-text-sm\"><span>{selectedBill.LegislationNumber}{version ? version.Suffix : ''}</span></div>\n                            </div>\n                        }\n                    </React.Fragment>\n                }\n            </div>\n        );\n    }\n}\n\nexport default PreviewSection;","import React from 'react';\nimport ReactTable from \"react-table\";\n\nclass TextList extends React.Component {\n\n    render() {\n        let nonAmendments = [];\n        this.props.originalBillText.forEach((text, index) => {\n            if (![\"Amendment\", \"Conference Report\"].includes(text.LegislationVersion) && (text.LegislationVersion !== \"Gov Recommendation\" || this.props.selectedLegType.Name === \"Gov Recommendation\")) {\n                nonAmendments.push({ ...text, originalIndex: index })\n            }\n        });\n        return (\n            <div>\n                <ReactTable\n                    data={nonAmendments}\n                    showPageSizeOptions={false}\n                    showPagination={false}\n                    showPageJump={false}\n                    pageSize={nonAmendments.length}\n                    getTrProps={(_state, rowInfo) => {\n                        const original = rowInfo ? rowInfo.original : null;\n                        return {\n                            style: {\n                                background: original && original.originalIndex === this.props.selectedBillTextIndex ? '#89ff89' : '',\n                                cursor: 'pointer'\n                            },\n                            onClick: () => {\n                                this.props.selectBillIndex(original.originalIndex);\n                            }\n                        }\n                    }}\n                    noDataText=\"\"\n                    columns={[\n                        {\n                            id: \"checkbox\",\n                            className: \"checkbox-column\",\n                            Cell: ({ original }) => this.props.changingBillIndex !== false && this.props.changingBillIndex === original.originalIndex ? <span className=\"small-spinner\"></span> : <span className={original.originalIndex === this.props.selectedBillTextIndex ? \"icon checkmark\" : \"\"}></span>,\n                            sortable: false,\n                            filterable: false,\n                            width: 45\n                        },\n                        {\n                            Cell: ({ original }) => <span>{`${original.DocumentCode} ${!original.IsActive ? \"INACTIVE\" : ''} ${!original.IsPublic ? \"NOT PUBLISHED\" : ''}`}</span>\n                        }\n                    ]}\n                    className=\"-striped -highlight\"\n                />\n            </div>\n        );\n\n    }\n}\nexport default TextList;","import { createBrowserHistory } from \"history\";\nimport { publicRequest } from \"../services/request.service\";\n\nconst previousLocationRequest = \"REQUEST_PREVIOUS_LOCATION\";\nconst changeSessionRequest = \"CHANGE_SESSION\";\nconst makeToastRequest = \"MAKE_TOAST\";\nconst toggleOverlayRequest = \"TOGGLE_OVERLAY\"\nconst fileSuccess = \"FILE_SUCCESS\";\nconst fileFailure = \"FILE_FAILURE\";\nconst reloadSessionSelectorChange = \"RELOAD_SESSION_SELECTOR_CHANGE\";\n\nconst history = createBrowserHistory;\n\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst initialState = {\n    currentLocation: history.location,\n    previousLocation: '',\n    session: '',\n    toasts: [],\n    hideSessionSelectorPaths: [\n        '/profile',\n        '/developers',\n        'change-password',\n        'passwordreset',\n        '/forgot-password',\n        '/register-account',\n        '/committee-management',\n        '/session-management',\n        '/docket-management',\n        '/calendar-management',\n        '/minutes-management',\n        '/journal-management',\n        '/communications-management',\n        '/configurations-management',\n        '/version-management',\n        '/bill-search-report',\n        '/bill-details',\n        '/vote-details',\n        '/vote-management',\n        '/vote-search',\n        '/member-management',\n        '/print-management',\n        '/pdf',\n        '\\/calendar\\/[0-9]+',\n        '/member-legislation',\n        'notifications',\n        '/apiregistration'\n    ],\n    showOverlay: false\n};\n\nexport const navActionCreators = {\n    getPreviousLocation: (previousLocation) => ({\n        type: previousLocationRequest,\n        previousLocation: previousLocation\n    }),\n\n    changeSession: (session) => ({\n        type: changeSessionRequest,\n        session: session\n    }),\n\n    makeToast: (message) => ({\n        type: makeToastRequest,\n        toasts: message\n    }),\n\n    toggleOverlay: (overlay) => ({\n        type: toggleOverlayRequest,\n        showOverlay: overlay\n    }),\n\n    receiveFile: (result) => ({\n        type: fileSuccess,\n        file: result\n    }),\n\n    fileError: (message) => ({\n        type: fileFailure,\n        fileError: message\n    }),\n\n    getFile(url) {\n        return dispatch => {\n            let config = {\n                method: 'GET',\n                headers: { \"WebAPIKey\": process.env.REACT_APP_API_KEY }\n            }\n            return fetch(url, config)\n                .then(response => {\n                    if (response.status === 204) {\n                        dispatch(navActionCreators.fileError('No Content'));\n                        return Promise.reject('No Content');\n                    } else if (response.status > 399) {\n                        return (response.text()\n                            .then(text => {\n                                dispatch(navActionCreators.fileError(text));\n                                return Promise.reject(text)\n                            })\n                        )\n                    }\n                    return response.text();\n                })\n                .then((data) => {\n                    dispatch(navActionCreators.receiveFile(data));\n                }).catch(err => {\n                    console.log(err);\n                    return Promise.reject(err);\n                });\n        }\n    },\n\n    reloadSessionSelector: (reload) => ({\n        type: reloadSessionSelectorChange,\n        reloadSessionSelector: reload\n    })\n};\n\nexport const reducer = (state, action) => {\n    state = state || initialState;\n    switch (action.type) {\n        case previousLocationRequest:\n            return Object.assign({}, state, {\n                previousLocation: action.previousLocation\n            });\n        case changeSessionRequest:\n            return Object.assign({}, state, {\n                session: action.session\n            });\n        case makeToastRequest:\n            return Object.assign({}, state, {\n                toasts: action.toasts\n            });\n        case toggleOverlayRequest:\n            return Object.assign({}, state, {\n                showOverlay: action.showOverlay\n            });\n        case fileSuccess:\n            return Object.assign({}, state, {\n                file: action.file\n            });\n        case fileFailure:\n            return Object.assign({}, state, {\n                fileError: action.fileError\n            });\n        case reloadSessionSelectorChange:\n            return Object.assign({}, state, {\n                reloadSessionSelector: action.reloadSessionSelector\n            });\n        default:\n            return state;\n    }\n};\n","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst getDefaultSessionAsyncRequest = 'GET_DEFAULT_SESSION_ASYNC_REQUEST';\nconst getDefaultSessionAsyncSuccess = 'GET_DEFAULT_SESSION_ASYNC_SUCCESS';\nconst getDefaultSessionAsyncFailure = 'GET_DEFAULT_SESSION_ASYNC_FAILURE';\n\nconst getSessionListRequest = 'GET_SESSION_LIST_REQUEST';\nconst getSessionListSuccess = 'GET_SESSION_LIST_SUCCESS';\nconst getSessionListFailure = 'GET_SESSION_LIST_FAILURE';\n\nconst getSessionShallowListSuccess = 'GET_SESSION_SHALLOW_LIST_SUCCESS';\nconst getSessionShallowListFailure = 'GET_SESSION_SHALLOW_LIST_FAILURE';\n\nconst getDefaultSessionSuccess = 'GET_DEFAULT_SESSION_SUCCESS';\n\nconst getSessionByIdRequest = 'GET_SESSION_BY_ID_REQUEST';\nconst getSessionByIdSuccess = 'GET_SESSION_BY_ID_SUCCESS';\nconst getSessionByIdFailure = 'GET_SESSION_BY_ID_FAILURE';\n\nconst getSessionEventTypesRequest = 'GET_SESSION_EVENT_TYPES_REQUEST';\nconst getSessionEventTypesSuccess = 'GET_SESSION_EVENT_TYPES_SUCCESS';\nconst getSessionEventTypesFailure = 'GET_SESSION_EVENT_TYPES_FAILURE';\n\nconst editSessionRequest = 'EDIT_SESSION_REQUEST';\nconst editSessionSuccess = 'EDIT_SESSION_SUCCESS';\nconst editSessionFailure = 'EDIT_SESSION_FAILURE';\n\nconst createSessionRequest = 'CREATE_SESSION_REQUEST';\nconst createSessionSuccess = 'CREATE_SESSION_SUCCESS';\nconst createSessionFailure = 'CREATE_SESSION_FAILURE';\n\nconst getSessionByCodeRequest = 'GET_SESSION_BY_CODE_REQUEST';\n\nconst initialState = {\n    defaultSession: [], // sets default session from the session list\n    defaultSessionAsync: [], // sets default session from a call to API to find the default\n    sessionList: [],\n    sessionListError: '',\n    sessionShallowList: [],\n    sessionEventTypes: [],\n    sessionEvents: [],\n    selectedSession: {\n        SessionCode: '',\n        DisplayName: '',\n        SessionID: '',\n        SessionYear: '',\n        SessionType: { value: '', label: '' },\n        IsDefault: false,\n        SessionStart: null,\n        BillCrossover: null,\n        PrefileStart: null,\n        BillCutoff: null,\n        Adjournment: null,\n        Reconvene: null,\n        SessionEvents: []\n    },\n    getSessionError: '',\n    saveSession: '',\n    saveSessionError: '',\n    createSession: '',\n    createSessionError: ''\n};\n\nexport const sessionActionCreators = {\n\n    requestSessionEventTypes: () => ({\n        type: getSessionEventTypesRequest,\n        sessionEventTypes: [],\n        isFetching: true\n    }),\n\n    receiveSessionEventTypes: (responseObj) => ({\n        type: getSessionEventTypesSuccess,\n        isFetching: false,\n        sessionEventTypes: responseObj\n    }),\n\n    sessionEventTypesError: (message) => ({\n        type: getSessionEventTypesFailure,\n        isFetching: false,\n        sessionEventTypes: [],\n        sessionEventTypesError: message\n    }),\n\n    getSessionEventTypes: () => {\n        return dispatch => {\n            dispatch(sessionActionCreators.requestSessionEventTypes());\n\n            return publicRequest((API_URL || process.env.REACT_APP_SESSION_API_URL) + '/Session/api/GetSessionEventTypeReferencesAsync/', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(sessionActionCreators.sessionEventTypesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(sessionActionCreators.receiveSessionEventTypes(result[1].SessionEventTypes))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(sessionActionCreators.sessionEventTypesError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    requestDefaultSessionAsync: () => ({\n        type: getDefaultSessionAsyncRequest,\n        defaultSessionAsync: [],\n        isFetching: true\n    }),\n\n    receiveDefaultSessionAsync: (responseObj) => ({\n        type: getDefaultSessionAsyncSuccess,\n        isFetching: false,\n        defaultSessionAsync: responseObj\n    }),\n\n    defaultSessionAsyncError: (message) => ({\n        type: getDefaultSessionAsyncFailure,\n        isFetching: false,\n        defaultSessionAsync: [],\n        defaultSessionAsyncError: message\n    }),\n\n    getDefaultSessionAsync: () => {\n        return dispatch => {\n            dispatch(sessionActionCreators.requestDefaultSessionAsync());\n\n            return publicRequest((API_URL || process.env.REACT_APP_SESSION_API_URL) + '/Session/api/getDefaultSessionAsync', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(sessionActionCreators.defaultSessionAsyncError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        let session = result[1];\n                        dispatch(sessionActionCreators.receiveDefaultSessionAsync(session))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(sessionActionCreators.defaultSessionAsyncError('No Content'))\n                        return Promise.reject('No Content')\n                    }\n                }).catch(err => console.log(err))\n        }\n    },\n\n    receiveDefaultSession: (sessiondata) => ({\n        type: getDefaultSessionSuccess,\n        defaultSession: sessiondata\n    }),\n\n    setDefaultSession: (defaultSessionObject) => {\n        return dispatch => {\n            dispatch(sessionActionCreators.receiveDefaultSession(defaultSessionObject));\n        }\n    },\n\n    requestSessionList: () => ({\n        type: getSessionListRequest,\n        sessionList: [],\n        isFetching: true\n    }),\n\n    receiveSessionList: (sessiondata) => ({\n        type: getSessionListSuccess,\n        isFetching: false,\n        sessionList: sessiondata\n    }),\n\n    sessionListError: (message) => ({\n        type: getSessionListFailure,\n        isFetching: false,\n        sessionList: [],\n        sessionListError: message\n    }),\n\n    getSessionList: (year = '') => {\n        return dispatch => {\n            dispatch(sessionActionCreators.requestSessionList());\n            let params = ''\n            if (year) params += 'year=' + year\n\n            return publicRequest((API_URL || process.env.REACT_APP_SESSION_API_URL) + '/Session/api/GetSessionListAsync/?', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(sessionActionCreators.sessionListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(sessionActionCreators.receiveSessionList(result[1].Sessions))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(sessionActionCreators.receiveSessionList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveSessionShallowList: (sessiondata) => ({\n        type: getSessionShallowListSuccess,\n        sessionShallowList: sessiondata\n    }),\n\n    sessionShallowListError: (message) => ({\n        type: getSessionShallowListFailure,\n        sessionShallowList: [],\n        sessionShallowListMessage: message\n    }),\n\n    getSessionShallowList: (params) => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_SESSION_API_URL) + '/Session/api/GetSessionShallowListAsync/?', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(sessionActionCreators.sessionShallowListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        let session = result[1];\n                        dispatch(sessionActionCreators.receiveSessionShallowList(session.Sessions))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(sessionActionCreators.sessionShallowListError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    requestSessionById: () => ({\n        type: getSessionByIdRequest,\n        selectedSession: '',\n        isFetching: true\n    }),\n\n    receiveSessionById: (sessiondata, sessionEvents) => ({\n        type: getSessionByIdSuccess,\n        isFetching: false,\n        selectedSession: sessiondata,\n        sessionEvents: sessionEvents\n    }),\n\n    sessionByIdError: (message) => ({\n        type: getSessionByIdFailure,\n        isFetching: false,\n        selectedSession: '',\n        message\n    }),\n\n    getSessionById: (params, partner) => {\n        return dispatch => {\n            dispatch(sessionActionCreators.requestSessionById());\n            let request;\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_SESSION_API_URL) + '/Session/api/GetPartnerSessionByIdAsync/', 'GET', '', '', params)    \n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_SESSION_API_URL) + '/Session/api/GetSessionByIdAsync/', 'GET', '', '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(sessionActionCreators.sessionByIdError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        const sessionData = result[1].Sessions[0];\n                        dispatch(sessionActionCreators.receiveSessionById(sessionData, sessionData.SessionEvents))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(sessionActionCreators.sessionByIdError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    getSessionByCode: (params) => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_SESSION_API_URL) + '/Session/api/GetSessionByCodeAsync/', 'GET', '', '', params)\n            .then(result => {\n                if (result[0] === REQUEST_FAILURE) {\n                    dispatch({\n                        type: getSessionByCodeRequest,\n                        getSessionError: result[1]\n                    });\n                    return Promise.reject(result[1])\n                } else if (result[0] === REQUEST_SUCCESS) {\n                    dispatch({\n                        type: getSessionByCodeRequest,\n                        selectedSession: result[1].Sessions[0]\n                    });\n                } else if (result[0] === NO_CONTENT) {\n                    dispatch({\n                        type: getSessionByCodeRequest,\n                        getSessionError: \"No Content\"\n                    });\n                    return Promise.reject('No Content')\n                } else if (result.name === 'AbortError') {\n                    return Promise.reject(\"Aborted\");\n                }\n            }).catch(err => Promise.reject(err))\n        }\n    },\n\n    setSelectedSession: (sessionObject, sessionEvents) => {\n        return dispatch => {\n            dispatch(sessionActionCreators.receiveSessionById(sessionObject, sessionEvents));\n        }\n    },\n\n    receiveEditSession: (res) => ({\n        type: editSessionSuccess,\n        isFetching: false,\n        saveSession: res\n    }),\n    editSessionError: (res) => ({\n        type: editSessionFailure,\n        isFetching: false,\n        saveSessionError: res\n    }),\n    editSession: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_SESSION_API_URL) + '/Session/api/SaveSessionAsync/', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(sessionActionCreators.editSessionError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(sessionActionCreators.receiveEditSession(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(sessionActionCreators.editSessionError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCreateSession: (res) => ({\n        type: createSessionSuccess,\n        isFetching: false,\n        createSession: res\n    }),\n    createSessionError: (res) => ({\n        type: createSessionFailure,\n        isFetching: false,\n        createSessionError: res\n    }),\n    createSession: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_SESSION_API_URL) + '/Session/api/CreateSessionAsync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(sessionActionCreators.createSessionError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(sessionActionCreators.receiveCreateSession(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(sessionActionCreators.createSessionError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    }\n};\n\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n\n    switch (action.type) {\n        case getDefaultSessionAsyncRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case getDefaultSessionAsyncSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                defaultSessionAsync: action.defaultSessionAsync,\n                defaultSessionAsyncMessage: ''\n            })\n        case getDefaultSessionAsyncFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                defaultSessionAsyncError: action.defaultSessionAsyncMessage\n            })\n        case getSessionEventTypesRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case getSessionEventTypesSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                sessionEventTypes: action.sessionEventTypes,\n                sessionEventTypesMessage: ''\n            })\n        case getSessionEventTypesFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                sessionEventTypesMessage: action.sessionEventTypesMessage\n            })\n        case getSessionListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case getSessionListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                sessionList: action.sessionList,\n                sessionListError: ''\n            })\n        case getSessionListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                sessionListError: action.sessionListError\n            })\n        case getSessionShallowListSuccess:\n            return Object.assign({}, state, {\n                sessionShallowList: action.sessionShallowList,\n                sessionShallowListMessage: ''\n            })\n        case getSessionShallowListFailure:\n            return Object.assign({}, state, {\n                sessionShallowListMessage: action.sessionShallowListMessage\n            })\n        case getDefaultSessionSuccess:\n            return Object.assign({}, state, {\n                defaultSession: action.defaultSession\n            })\n        case getSessionByIdRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case getSessionByIdSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                selectedSession: action.selectedSession,\n                sessionEvents: action.sessionEvents,\n                errorMessage: ''\n            })\n        case getSessionByIdFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            })\n        case editSessionRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case editSessionSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                saveSession: action.saveSession,\n                saveSessionError: ''\n            })\n        case editSessionFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                saveSessionError: action.saveSessionError\n            })\n        case createSessionRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case createSessionSuccess:\n            return Object.assign({}, state, {\n                createSession: action.createSession,\n                createSessionError: ''\n            })\n        case createSessionFailure:\n            return Object.assign({}, state, {\n                createSessionError: action.createSessionError\n            })\n        case getSessionByCodeRequest:\n            return Object.assign({}, state, {\n                selectedSession: action.selectedSession || state.selectedSession,\n                getSessionError: action.getSessionError || ''\n            });\n        default:\n            return state\n    }\n};","import React from 'react';\nimport classnames from 'classnames';\nimport Select, { createFilter } from 'react-select';\nimport DatePicker from 'react-datepicker';\nimport { FixedSizeList as List } from \"react-window\";\n\nconst InputFeedback = ({ error }) =>\n    error ? (\n        <div className=\"input-feedback\">{error}</div>\n    ) : null;\n\nconst Label = ({\n    error,\n    className,\n    children,\n    ...props\n}) => {\n    return (\n        <label className=\"label\" {...props}>\n            {children}\n        </label>\n    );\n};\n\n\n//ADVANCED SEARCH OPTIONS\n\nexport const patronTypeOptions = [\n    { value: '1', label: 'Chief Patron' },\n    { value: '2', label: 'Co-Patron' },\n    { value: '3', label: 'Other' }\n];\n\nexport const searchTypeOptions = [\n    { value: 'all', label: 'All' },\n    { value: 'billNumber', label: 'Bill Number' },\n    { value: 'catchline', label: 'Catchline' }\n];\n\nexport const billActionsOptions = [\n    { value: 'introduced', label: 'Introduced' },\n    { value: 'passedHouse', label: 'Passed House' },\n    { value: 'passedSenate', label: 'Passed Senate' },\n    { value: 'passedBoth', label: 'Passed Both' },\n    { value: 'approvedEnacted', label: 'Approved/Enacted' }\n];\n\nexport const originatingChamberOptions = [\n    { value: 'H', label: 'House' },\n    { value: 'S', label: 'Senate' }\n];\n\n//EDIT/CREATE SESSION OPTIONS\n\nexport const sessionOptions = [\n    { value: 'Current Biennium', label: 'Current Biennium' },\n    { value: 'All Sessions', label: 'All Sessions' }\n];\n\nexport const districtOptions = [\n    { value: 'District 1', label: 'District 1' },\n    { value: 'District 2', label: 'District 2' }\n];\n\nexport const activeSessionOptions = [\n    { value: 'primary', label: 'Primary' },\n    { value: 'secondary', label: 'Secondary' },\n    { value: 'none', label: 'None' }\n];\n\nexport const sessionTypeOptions = [\n    { value: 1, label: 'Regular' },\n    { value: 2, label: 'Special' }\n];\n\n//EDIT/CREATE USER OPTIONS\n\nexport const orgOptions = [\n    { value: 'OrgName1', label: 'OrgName1' },\n    { value: 'OrgName2', label: 'OrgName2' },\n    { value: 'OrgName4', label: 'OrgName4' },\n    { value: 'OrgName5', label: 'OrgName5' },\n    { value: 'OrgName6', label: 'OrgName6' }\n];\n\n\nexport const stateOptions = [\n    {\n        \"value\": \"Alabama\",\n        \"label\": \"AL\"\n    },\n    {\n        \"value\": \"Alaska\",\n        \"label\": \"AK\"\n    },\n    {\n        \"value\": \"American Samoa\",\n        \"label\": \"AS\"\n    },\n    {\n        \"value\": \"Arizona\",\n        \"label\": \"AZ\"\n    },\n    {\n        \"value\": \"Arkansas\",\n        \"label\": \"AR\"\n    },\n    {\n        \"value\": \"California\",\n        \"label\": \"CA\"\n    },\n    {\n        \"value\": \"Colorado\",\n        \"label\": \"CO\"\n    },\n    {\n        \"value\": \"Connecticut\",\n        \"label\": \"CT\"\n    },\n    {\n        \"value\": \"Delaware\",\n        \"label\": \"DE\"\n    },\n    {\n        \"value\": \"District Of Columbia\",\n        \"label\": \"DC\"\n    },\n    {\n        \"value\": \"Federated States Of Micronesia\",\n        \"label\": \"FM\"\n    },\n    {\n        \"value\": \"Florida\",\n        \"label\": \"FL\"\n    },\n    {\n        \"value\": \"Georgia\",\n        \"label\": \"GA\"\n    },\n    {\n        \"value\": \"Guam\",\n        \"label\": \"GU\"\n    },\n    {\n        \"value\": \"Hawaii\",\n        \"label\": \"HI\"\n    },\n    {\n        \"value\": \"Idaho\",\n        \"label\": \"ID\"\n    },\n    {\n        \"value\": \"Illinois\",\n        \"label\": \"IL\"\n    },\n    {\n        \"value\": \"Indiana\",\n        \"label\": \"IN\"\n    },\n    {\n        \"value\": \"Iowa\",\n        \"label\": \"IA\"\n    },\n    {\n        \"value\": \"Kansas\",\n        \"label\": \"KS\"\n    },\n    {\n        \"value\": \"Kentucky\",\n        \"label\": \"KY\"\n    },\n    {\n        \"value\": \"Louisiana\",\n        \"label\": \"LA\"\n    },\n    {\n        \"value\": \"Maine\",\n        \"label\": \"ME\"\n    },\n    {\n        \"value\": \"Marshall Islands\",\n        \"label\": \"MH\"\n    },\n    {\n        \"value\": \"Maryland\",\n        \"label\": \"MD\"\n    },\n    {\n        \"value\": \"Massachusetts\",\n        \"label\": \"MA\"\n    },\n    {\n        \"value\": \"Michigan\",\n        \"label\": \"MI\"\n    },\n    {\n        \"value\": \"Minnesota\",\n        \"label\": \"MN\"\n    },\n    {\n        \"value\": \"Mississippi\",\n        \"label\": \"MS\"\n    },\n    {\n        \"value\": \"Missouri\",\n        \"label\": \"MO\"\n    },\n    {\n        \"value\": \"Montana\",\n        \"label\": \"MT\"\n    },\n    {\n        \"value\": \"Nebraska\",\n        \"label\": \"NE\"\n    },\n    {\n        \"value\": \"Nevada\",\n        \"label\": \"NV\"\n    },\n    {\n        \"value\": \"New Hampshire\",\n        \"label\": \"NH\"\n    },\n    {\n        \"value\": \"New Jersey\",\n        \"label\": \"NJ\"\n    },\n    {\n        \"value\": \"New Mexico\",\n        \"label\": \"NM\"\n    },\n    {\n        \"value\": \"New York\",\n        \"label\": \"NY\"\n    },\n    {\n        \"value\": \"North Carolina\",\n        \"label\": \"NC\"\n    },\n    {\n        \"value\": \"North Dakota\",\n        \"label\": \"ND\"\n    },\n    {\n        \"value\": \"Northern Mariana Islands\",\n        \"label\": \"MP\"\n    },\n    {\n        \"value\": \"Ohio\",\n        \"label\": \"OH\"\n    },\n    {\n        \"value\": \"Oklahoma\",\n        \"label\": \"OK\"\n    },\n    {\n        \"value\": \"Oregon\",\n        \"label\": \"OR\"\n    },\n    {\n        \"value\": \"Palau\",\n        \"label\": \"PW\"\n    },\n    {\n        \"value\": \"Pennsylvania\",\n        \"label\": \"PA\"\n    },\n    {\n        \"value\": \"Puerto Rico\",\n        \"label\": \"PR\"\n    },\n    {\n        \"value\": \"Rhode Island\",\n        \"label\": \"RI\"\n    },\n    {\n        \"value\": \"South Carolina\",\n        \"label\": \"SC\"\n    },\n    {\n        \"value\": \"South Dakota\",\n        \"label\": \"SD\"\n    },\n    {\n        \"value\": \"Tennessee\",\n        \"label\": \"TN\"\n    },\n    {\n        \"value\": \"Texas\",\n        \"label\": \"TX\"\n    },\n    {\n        \"value\": \"Utah\",\n        \"label\": \"UT\"\n    },\n    {\n        \"value\": \"Vermont\",\n        \"label\": \"VT\"\n    },\n    {\n        \"value\": \"Virgin Islands\",\n        \"label\": \"VI\"\n    },\n    {\n        \"value\": \"Virginia\",\n        \"label\": \"VA\"\n    },\n    {\n        \"value\": \"Washington\",\n        \"label\": \"WA\"\n    },\n    {\n        \"value\": \"West Virginia\",\n        \"label\": \"WV\"\n    },\n    {\n        \"value\": \"Wisconsin\",\n        \"label\": \"WI\"\n    },\n    {\n        \"value\": \"Wyoming\",\n        \"label\": \"WY\"\n    }\n]\n\n// Styles for select dropdowns to make them same size as other fields\nconst customStyles = {\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        minHeight: 0,\n        fontSize: '0.8em',\n    }),\n    menu: (base) => ({\n        ...base,\n        zIndex: '102' //show over fixed floating save bars\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    }\n}\n\nexport class CustomSelect extends React.Component {\n    handleChange = value => {\n        this.props.onChange(this.props.id, value);\n    };\n    handleBlur = () => {\n        this.props.onBlur(this.props.id, true);\n    };\n\n    render() {\n        return (\n            <div>\n                <label>{this.props.label}</label>\n                <Select\n                    className={this.props.className}\n                    placeholder={this.props.placeholder}\n                    styles={customStyles}\n                    options={this.props.options}\n                    isMulti={this.props.isMulti}\n                    isDisabled={this.props.isDisabled}\n                    onChange={this.handleChange}\n                    onBlur={this.handleBlur}\n                    value={this.props.value}\n                    filterOption={this.props.filterOption}\n                />\n            </div>\n        );\n    }\n}\n\nexport class CustomDatepicker extends React.Component {\n    handleChange = value => {\n        this.props.onChange(this.props.id, value);\n    };\n    handleBlur = () => {\n        this.props.onBlur(this.props.id, true);\n    };\n\n    render() {\n        return (\n            <div>\n                <label>{this.props.label}</label>\n                <DatePicker\n                    id={this.props.id}\n                    className={this.props.className}\n                    selected={this.props.value}\n                    onChange={this.handleChange}\n                    disabled={this.props.disabled}\n                    placeholderText={this.props.placeholderText}\n                    popperPlacement={this.props.popperPlacement}\n                    withPortal={this.props.withPortal}\n                    filterDate={this.props.filterDate}\n                />\n            </div>\n        );\n    }\n}\n\nclass MenuList extends React.Component {\n    render() {\n        const { options, children, maxHeight, getValue } = this.props;\n        const [value] = getValue();\n        const height = this.props.height || 35;\n        const initialOffset = options.indexOf(value) * height;\n        return (\n            <List\n                height={maxHeight}\n                itemCount={children.length}\n                itemSize={height}\n                initialScrollOffset={initialOffset}\n            >\n                {({ index, style }) => <div style={style}>{children[index]}</div>}\n            </List>\n        );\n    }\n}\n\n//React-select does not work well with large lists greater than 1000 items. This component utilizes react-window to only render a portion of the list so perfomance is not degraded.\nexport class LargeListSelect extends React.Component {\n    render() {\n        return (<Select\n            {...this.props}\n            filterOption={createFilter({ ignoreCase: true, ignoreAccents: false, matchFrom: 'any', stringify: option => `${option.label}`, trim: true, })}\n            components={{ MenuList }}\n        />)\n    }\n}\n\nexport const Dropdown = ({\n    options,\n    styles,\n    value,\n    onChange,\n    multi,\n    onBlur,\n    ...props\n}) => {\n    return (\n        <Select\n            options={options}\n            styles={customStyles}\n            multi={multi}\n            onChange={onChange}\n            onBlur={onBlur}\n            value={value}\n            {...props}\n        />\n    );\n};\n\nexport const TextInput = ({\n    type,\n    id,\n    label,\n    error,\n    value,\n    onChange,\n    className,\n    defaultValue,\n    ...props\n}) => {\n    return (\n        <div>\n            <Label htmlFor={id} error={error}>\n                {label}\n            </Label>\n            <input\n                id={id}\n                className={className}\n                type={type}\n                value={value}\n                defaultValue={defaultValue}\n                onChange={onChange}\n                {...props}\n            />\n            <InputFeedback error={error} />\n        </div>\n    );\n};\n\nexport const TextArea = ({\n    id,\n    label,\n    error,\n    value,\n    onChange,\n    className,\n    ...props\n}) => {\n    return (\n        <div>\n            <Label htmlFor={id} error={error}>\n                {label}\n            </Label>\n            <textarea\n                id={id}\n                className={className}\n                value={value}\n                onChange={onChange}\n                {...props}\n            />\n            <InputFeedback error={error} />\n        </div>\n    );\n};\n\nexport const CheckboxInput = ({\n    type,\n    id,\n    label,\n    error,\n    value,\n    onChange,\n    className,\n    ...props\n}) => {\n    const classes = classnames(\n        'input-group',\n        {\n            'animated shake error': !!error,\n        },\n        className\n    );\n    return (\n        <div className={classes}>\n            <Label htmlFor={id} error={error}>\n                {label}\n            </Label>\n            <label className=\"checkbox-label\">\n                <input\n                    id={id}\n                    className=\"formCheckbox\"\n                    type={type}\n                    checked={value}\n                    value={value}\n                    onChange={onChange}\n                    {...props}\n                />\n                <span>\n                    {value ? 'Yes' : 'No'}\n                </span>\n            </label>\n            <InputFeedback error={error} />\n        </div>\n    );\n};","tinymce.PluginManager.add('rightmargin', function (editor) {\n    const width = '10px'    \n    const container = document.createElement('div');\n    editor.on('init', _e => {        \n        const root = editor.contentDocument.activeElement;        \n        root.style.marginRight = width;                \n        editor.contentAreaContainer.appendChild(container);\n    });\n})","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst legislationIdsListRequest = \"GET_LEGISLATION_IDS_LIST_REQUEST\";\nconst legislationIdsListSuccess = \"GET_LEGISLATION_IDS_LIST_SUCCESS\";\nconst legislationIdsListFailure = \"GET_LEGISLATION_IDS_LIST_FAILURE\";\n\nconst billListByIdsRequest = \"GET_BILL_LIST_BY_IDS_REQUEST\";\nconst billListByIdsSuccess = \"GET_BILL_LIST_BY_IDS_SUCCESS\";\nconst billListByIdsFailure = \"GET_BILL_LIST_BY_IDS_FAILURE\";\n\nconst legislationTextsHitCountsRequest = \"GET_LEGISLATION_TEXTS_HIT_COUNTS_REQUEST\";\nconst legislationTextsHitCountsSuccess = \"GET_LEGISLATION_TEXTS_HIT_COUNTS_SUCCESS\";\nconst legislationTextsHitCountsFailure = \"GET_LEGISLATION_TEXTS_HIT_COUNTS_FAILURE\";\n\nconst billListRequest = \"GET_BILL_LIST_REQUEST\";\nconst billListSuccess = \"GET_BILL_LIST_SUCCESS\";\nconst billListFailure = \"GET_BILL_LIST_FAILURE\";\n\nconst mostFrequentBillListRequest = \"GET_MOST_FREQUENT_BILL_LIST_REQUEST\";\nconst mostFrequentBillListSuccess = \"GET_MOST_FREQUENT_BILL_LIST_SUCCESS\";\nconst mostFrequentBillListFailure = \"GET_MOST_FREQUENT_BILL_LIST_FAILURE\";\n\nconst billSummaryRequest = \"GET_BILL_SUMMARY_REQUEST\";\nconst billSummarySuccess = \"GET_BILL_SUMMARY_SUCCESS\";\nconst billSummaryFailure = \"GET_BILL_SUMMARY_FAILURE\";\n\nconst saveBillSummaryRequest = \"SAVE_BILL_SUMMARY_REQUEST\";\nconst saveBillSummarySuccess = \"SAVE_BILL_SUMMARY_SUCCESS\";\nconst saveBillSummaryFailure = \"SAVE_BILL_SUMMARY_FAILURE\";\n\nconst billHistorySuccess = \"GET_BILL_HISTORY_SUCCESS\";\nconst billHistoryFailure = \"GET_BILL_HISTORY_FAILURE\";\n\nconst billVersionRequest = \"GET_BILL_VERSION_REQUEST\";\nconst billVersionSuccess = \"GET_BILL_VERSION_SUCCESS\";\nconst billVersionFailure = \"GET_BILL_VERSION_FAILURE\";\n\nconst billNumbersSuccess = \"GET_BILL_NUMBERS_SUCCESS\";\nconst billNumbersFailure = \"GET_BILL_NUMBERS_FAILURE\";\n\nconst legislationClassesSuccess = \"GET_LEGISLATION_CLASSES_SUCCESS\";\nconst legislationClassesFailure = \"GET_LEGISLATION_CLASSES_FAILURE\";\n\nconst billStatusRefSuccess = \"GET_BILL_STATUS_REF_SUCCESS\";\nconst billStatusRefFailure = \"GET_BILL_STATUS_REF_FAILURE\";\n\nconst billStatusCategoryRefSuccess = \"GET_BILL_STATUS_CATEGORY_REF_SUCCESS\";\nconst billStatusCategoryRefFailure = \"GET_BILL_STATUS_CATEGORY_REF_FAILURE\";\n\nconst billEventRefSuccess = \"GET_BILL_EVENT_REF_SUCCESS\";\nconst billEventRefFailure = \"GET_BILL_EVENT_REF_FAILURE\";\n\nconst legislationEventsByIdSuccess = \"GET_LEGISLATION_EVENTS_BY_ID_SUCCESS\";\nconst legislationEventsByIdFailure = \"GET_LEGISLATION_EVENTS_BY_ID_FAILURE\";\n\nconst billTextSuccess = \"GET_BILL_TEXT_SUCCESS\";\nconst billTextFailure = \"GET_BILL_TEXT_FAILURE\";\n\nconst ihodAmendmentSaveSuccess = \"IHOD_AMENDMENT_SAVE_SUCCESS\";\nconst ihodAmendmentSaveFailure = \"IHOD_AMENDMENT_SAVE_FAILURE\";\n\nconst billVersionRefSuccess = \"GET_BILL_VERSION_REF_SUCCESS\";\nconst billVersionRefFailure = \"GET_BILL_VERSION_REF_FAILURE\";\n\nconst sponsorRefListSuccess = \"GET_SPONSOR_REF_LIST_SUCCESS\";\nconst sponsorRefListFailure = \"GET_SPONSOR_REF_LIST_FAILURE\";\n\nconst billSummaryRefSuccess = \"GET_BILL_SUMMARY_REF_SUCCESS\";\nconst billSummaryRefFailure = \"GET_BILL_SUMMARY_REF_FAILURE\";\n\nconst batchPublishSuccess = \"GET_BATCH_PUBLISH_SUCCESS\";\nconst batchPublishFailure = \"GET_BATCH_PUBLISH_FAILURE\";\n\nconst batchCompleteSuccess = \"GET_BATCH_COMPLETE_SUCCESS\";\nconst batchCompleteFailure = \"GET_BATCH_COMPLETE_FAILURE\";\n\nconst billTextSaveSuccess = \"GET_BILL_TEXT_SAVE_SUCCESS\";\nconst billTextSaveFailure = \"GET_BILL_TEXT_SAVE_FAILURE\";\n\nconst jsonHeadersSuccess = \"GET_JSON_HEADERS_SUCCESS\";\nconst jsonHeadersFailure = \"GET_JSON_HEADERS_FAILURE\";\n\nconst pdfPreviewSuccess = \"GET_VERSION_PREVIEW_SUCCESS\";\nconst pdfPreviewFailure = \"GET_VERSION_PREVIEW_FAILURE\";\n\nconst previewPdfFileSuccess = \"PREVIEW_PDF_FILE_SUCCESS\";\nconst previewPdfFileFailure = \"PREVIEW_PDF_FILE_FAILURE\";\n\nconst htmlPreviewSuccess = \"GET_HTML_PREVIEW_SUCCESS\";\nconst htmlPreviewFailure = \"GET_HTML_PREVIEW_FAILURE\";\n\nconst htmlFilePreviewSuccess = \"GET_HTML_FILE_PREVIEW_SUCCESS\";\nconst htmlFilePreviewFailure = \"GET_HTML_FILE_PREVIEW_FAILURE\";\n\nconst billSaveSuccess = \"GET_BILL_SAVE_SUCCESS\";\nconst billSaveFailure = \"GET_BILL_SAVE_FAILURE\";\n\nconst billFileGenSuccess = \"GET_BILL_FILE_GEN_SUCCESS\";\nconst billFileGenFailure = \"GET_BILL_FILE_GEN_FAILURE\";\n\nconst batchBillFileGenSuccess = \"GET_BATCH_BILL_FILE_GEN_SUCCESS\";\nconst batchBillFileGenFailure = \"GET_BATCH_BILL_FILE_GEN_FAILURE\";\n\nconst billManagementListSuccess = \"GET_BILL_MANAGEMENT_LIST_SUCCESS\";\nconst billManagementListFailure = \"GET_BILL_MANAGEMENT_LIST_FAILURE\";\n\nconst sessionBillsSuccess = \"GET_BILL_BY_SESSION_SUCCESS\";\nconst sessionBillsFailure = \"GET_BILL_BY_SESSION_FAILURE\";\n\nconst billEventsSuccess = \"GET_BILL_EVENT_TYPES_SUCCESS\";\nconst billEventsFailure = \"GET_BILL_EVENT_TYPES_FAILURE\";\n\nconst billEventSaveSuccess = \"GET_BILL_EVENT_SAVE_SUCCESS\";\nconst billEventSaveFailure = \"GET_BILL_EVENT_SAVE_FAILURE\";\n\nconst textListSuccess = \"GET_TEXT_LIST_SUCCESS\";\nconst textListFailure = \"GET_TEXT_LIST_FAILURE\";\n\nconst subjectListSuccess = \"GET_SUBJECT_LIST_SUCCESS\";\nconst subjectListFailure = \"GET_SUBJECT_LIST_FAILURE\";\n\nconst introDateListSuccess = \"GET_INTRO_DATE_LIST_SUCCESS\";\nconst introDateListFailure = \"GET_INTRO_DATE_LIST_FAILURE\";\n\nconst legislationAmendmentListSuccess = \"GET_LEGISLATION_AMENDMENT_LIST_SUCCESS\";\nconst legislationAmendmentListFailure = \"GET_LEGISLATION_AMENDMENT_LIST_FAILURE\";\n\nconst legislationDispositionsSuccess = \"GET_LEGISLATION_DISPOSITION_LIST_SUCCESS\";\nconst legislationDispositionsFailure = \"GET_LEGISLATION_DISPOSITION_LIST_FAILURE\";\n\nconst legislationStatusHistorySuccess = \"GET_LEGISLATION_STATUS_HISTORY_SUCCESS\";\nconst legislationStatusHistoryFailure = \"GET_LEGISLATION_STATUS_HISTORY_FAILURE\";\n\nconst deleteBlobFileSuccess = \"DELETE_BLOB_FILE_SUCCESS\";\nconst deleteBlobFileFailure = \"DELETE_BLOB_FILE_FAILURE\";\n\nconst sasURLSuccess = \"GET_SAS_URL_SUCCESS\";\nconst sasURLFailure = \"GET_SAS_URL_FAILURE\";\n\nconst billSuccess = \"GET_BILL_BY_ID_SUCCESS\";\nconst billFailure = \"GET_BILL_BY_ID_FAILURE\";\n\nconst uploadImpactStatementRequest = \"UPLOAD_IMPACT_STATEMENT_REQUEST\";\n\nconst initialState = {\n    legislationIdsList: [],\n    legislationIdsListPagination: null,\n    billListByIds: [],\n    billListByIdsPagination: null,\n    legislationTextsHitCounts: [],\n    billList: [],\n    billListPagination: null,\n    mostFrequentBillList: [],\n    billManagementList: [],\n    billManagementListError: '',\n    searchCriteria: [],\n    billDetails: [],\n    billsByMember: [],\n    billHistory: [],\n    billVersion: [],\n    billNumbers: [],\n    billSummary: [],\n    billSummarySave: [],\n    billVersionRef: [],\n    billVersionRefError: '',\n    sponsorRefList: [],\n    sponsorRefListError: '',\n    billEventRef: '',\n    billEventRefError: '',\n    billText: [],\n    billTextError: '',\n    batchPublishSave: [],\n    batchPublishError: '',\n    batchCompleteSave: [],\n    batchCompleteError: '',\n    billTextSave: [],\n    billTextSaveError: '',\n    jsonHeaders: [],\n    jsonHeadersError: '',\n    pdfPreview: '',\n    pdfPreviewError: '',\n    sasUrl: '',\n    sasUrlError: '',\n    htmlPreview: '',\n    htmlPreviewError: '',\n    htmlFilePreview: '',\n    htmlFilePreviewError: '',\n    billFileGen: '',\n    billFileGenError: '',\n    batchBillFileGen: '',\n    batchBillFileGenError: '',\n    billStatusReferences: [],\n    legislationClasses: [],\n    billStatusCategoryReferences: [],\n    sessionBills: [],\n    sessionBillsError: '',\n    billEvents: [],\n    billEventsError: '',\n    billEventSave: '',\n    billEventSaveError: '',\n    textList: [],\n    textListError: '',\n    subjectList: [],\n    subjectListError: '',\n    introDateList: [],\n    introDateListError: '',\n    legislationAmendmentList: [],\n    legislationAmendmentListError: '',\n    legislationDispositions: [],\n    legislationDispositionsError: '',\n    legislationStatusHistory: [],\n    legislationStatusHistoryError: '',\n    sasURLLink: '',\n    sasURLLinkError: '',\n    bill: '',\n    billError: '',\n    uploadImpactStatementResponse: '',\n    uploadImpactStatementError: '',\n    deleteBlobFileResponse: '',\n    deleteBlobFileError: '',\n};\n\nexport const billActionCreators = {\n\n    receiveBill: responseObj => ({\n        type: billSuccess,\n        bill: responseObj\n    }),\n\n    billError: message => ({\n        type: billFailure,\n        billError: message\n    }),\n\n    getBill: (params, partner) => {\n        return dispatch => {\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/GetPartnerLegislationByIdAsync/', 'GET', '', '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/GetLegislationByIdAsync/', 'GET', '', '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBill(result[1].Legislations[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillHistory: responseObj => ({\n        type: billHistorySuccess,\n        billHistory: responseObj\n    }),\n\n    billHistoryError: message => ({\n        type: billHistoryFailure,\n        billHistoryError: message\n    }),\n\n    getBillHistoryByBillID: (params, partner) => {\n        return dispatch => {\n            let request = '';\n\n            let headers = {\n                'cache-control': 'no-cache'\n            }\n\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_EVENT_API_URL) + '/LegislationEvent/api/GetLegislationEventListAsync/', 'GET', headers, '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_EVENT_API_URL) + '/LegislationEvent/api/GetLegislationEventByLegislationIDAsync/', 'GET', headers, '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billHistoryError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillHistory(result[1].LegislationEvents))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveBillHistory([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    //BILL VERSIONS\n    requestBillVersion: () => ({\n        type: billVersionRequest,\n        isFetching: true\n    }),\n\n    receiveBillVersion: responseObj => ({\n        type: billVersionSuccess,\n        isFetching: false,\n        billVersion: responseObj\n    }),\n\n    billVersionError: message => ({\n        type: billVersionFailure,\n        isFetching: false,\n        errorMessage: message\n    }),\n\n    getBillVersionByBillNumber: (params) => {\n        return dispatch => {\n            dispatch(billActionCreators.requestBillVersion());\n\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_VERSION_API_URL) + '/LegislationVersion/api/GetLegislationVersionbyBillNumberAsync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billVersionError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillVersion(result[1].LegislationsVersion))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billVersionError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    getBillVersionsByBillID: (params) => {\n        return dispatch => {\n            dispatch(billActionCreators.requestBillVersion());\n\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_VERSION_API_URL) + '/LegislationVersion/api/GetLegislationVersionbyLegislationIDAsync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billVersionError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillVersion(result[1].LegislationsVersion))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billVersionError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    //BILL SUMMARIES\n    requestBillSummary: () => ({\n        type: billSummaryRequest,\n        isFetching: true\n    }),\n\n    receiveBillSummary: responseObj => ({\n        type: billSummarySuccess,\n        isFetching: false,\n        billSummary: responseObj\n    }),\n\n    billSummaryError: message => ({\n        type: billSummaryFailure,\n        isFetching: false,\n        billSummary: [],\n        errorMessage: message\n    }),\n\n    getBillSummary: (params, partner) => {\n\n        return dispatch => {\n            dispatch(billActionCreators.requestBillSummary());\n\n            let request;\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_SUMMARY_SERVICE) + '/LegislationSummary/api/GetLegislationSummaryByIDAsync', 'GET', '', '', params);\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_SUMMARY_SERVICE) + '/LegislationSummary/api/GetLegislationSummaryListAsync', 'GET', '', '', params);\n            }\n\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billSummaryError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillSummary(partner ? result[1].SummaryList : result[1].LegislationSummaries))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billSummaryError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    //SAVE BILL SUMMARY\n    requestSaveBillSummary: () => ({\n        type: saveBillSummaryRequest,\n        isFetching: true\n    }),\n\n    receiveSaveBillSummary: responseObj => ({\n        type: saveBillSummarySuccess,\n        isFetching: false,\n        billSummarySave: responseObj\n    }),\n\n    saveBillSummaryError: message => ({\n        type: saveBillSummaryFailure,\n        isFetching: false,\n        billSummarySave: [],\n        errorMessage: message\n    }),\n\n    saveBillSummary: (body) => {\n        return dispatch => {\n            dispatch(billActionCreators.requestSaveBillSummary());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationSummary/api/SaveLegislationSummaryAsync', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.saveBillSummaryError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveSaveBillSummary(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveSaveBillSummary([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    //BILL STATUS REFERENCES\n    receiveBillStatusRefs: responseObj => ({\n        type: billStatusRefSuccess,\n        isFetching: false,\n        billStatusReferences: responseObj\n    }),\n\n    billStatusRefsError: message => ({\n        type: billStatusRefFailure,\n        isFetching: false,\n        errorMessage: message\n    }),\n\n    getBillStatusReferences: () => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_ADVANCED_SEARCH_API_URL) + '/AdvancedLegislationSearch/api/GetStatusReferencesAsync', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billStatusRefsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillStatusRefs(result[1].References))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billStatusRefsError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    //LEGISLATION CLASSES\n    receiveLegislationClasses: responseObj => ({\n        type: legislationClassesSuccess,\n        isFetching: false,\n        legislationClasses: responseObj\n    }),\n\n    legislationClassesError: message => ({\n        type: legislationClassesFailure,\n        isFetching: false,\n        errorMessage: message\n    }),\n\n    getLegislationClasses: () => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/GetLegislationClassesAsync', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.legislationClassesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveLegislationClasses(result[1].LegislationClasses))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.legislationClassesError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    //BILL STATUS CATEGORY REFERENCES\n    receiveBillStatusCategoryRefs: responseObj => ({\n        type: billStatusCategoryRefSuccess,\n        isFetching: false,\n        billStatusCategoryReferences: responseObj\n    }),\n\n    billStatusCategoryRefsError: message => ({\n        type: billStatusCategoryRefFailure,\n        isFetching: false,\n        errorMessage: message\n    }),\n\n    getBillStatusCategoryReferences: () => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_ADVANCED_SEARCH_API_URL) + '/AdvancedLegislationSearch/api/GetLegislationCategoryReferencesAsync', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billStatusCategoryRefsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillStatusCategoryRefs(result[1].LegislationCategoriesList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billStatusCategoryRefsError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveBillEventRefs: responseObj => ({\n        type: billEventRefSuccess,\n        billEventRef: responseObj\n    }),\n\n    billEventRefsError: message => ({\n        type: billEventRefFailure,\n        billEventRefError: message\n    }),\n\n    getBillEventReferences: (params) => {\n        return dispatch => {\n\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_EVENT_API_URL) + '/LegislationEvent/api/getLegislationEventTypeReferencesAsync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billEventRefsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillEventRefs(result[1].EventTypes))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billEventRefsError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveLegislationEventsById: responseObj => ({\n        type: legislationEventsByIdSuccess,\n        legislationEventsById: responseObj\n    }),\n\n    legislationEventsByIdError: message => ({\n        type: legislationEventsByIdFailure,\n        legislationEventsByIdError: message\n    }),\n\n    //Events for reconsideration\n    getLegislationEventsByLegislationId: (params) => {\n        return dispatch => {\n\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_EVENT_API_URL) + '/LegislationEvent/api/GetLegislationEventByLegislationIDAsync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.legislationEventsByIdError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveLegislationEventsById(result[1].LegislationEvents))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.legislationEventsByIdError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // ADVANCED BILL SEARCH\n    requestLegislationIdsList: () => ({\n        type: legislationIdsListRequest,\n        isFetching: true\n    }),\n\n    receiveLegislationIdsList: (responseObj, pagination) => ({\n        type: legislationIdsListSuccess,\n        isFetching: false,\n        legislationIdsList: responseObj,\n        legislationIdsListPagination: pagination,\n        errorMessage: responseObj.FailureMessage\n    }),\n\n    legislationIdsListError: message => ({\n        type: legislationIdsListFailure,\n        isFetching: false,\n        errorMessage: message\n    }),\n\n    getLegislationIdsList: (body, pagination) => {\n        return dispatch => {\n            dispatch(billActionCreators.requestLegislationIdsList());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            if (pagination) { headers['X-Pagination'] = JSON.stringify(pagination) }\n            let request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/GetLegislationIdsListAsync', 'POST', headers, body, '');\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.legislationIdsListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveLegislationIdsList(result[1], result[2] && result[2].get('X-Pagination') ? JSON.parse(result[2].get('X-Pagination')) : null))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveLegislationIdsList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    requestBillListByIds: () => ({\n        type: billListByIdsRequest,\n        isFetching: true\n    }),\n\n    receiveBillListByIds: (responseObj, pagination) => ({\n        type: billListByIdsSuccess,\n        isFetching: false,\n        billListByIds: responseObj,\n        billListByIdsPagination: pagination,\n        errorMessage: responseObj.FailureMessage\n    }),\n\n    billListByIdsError: message => ({\n        type: billListByIdsFailure,\n        isFetching: false,\n        errorMessage: message\n    }),\n\n    getBillListByIds: (body, pagination) => {\n        return dispatch => {\n            dispatch(billActionCreators.requestBillListByIds());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            if (pagination) { headers['X-Pagination'] = JSON.stringify(pagination) }\n            let request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/GetLegislationByLegislationIDsAsync', 'POST', headers, body, '');\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billListByIdsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillListByIds(result[1].Legislations, result[2] && result[2].get('X-Pagination') ? JSON.parse(result[2].get('X-Pagination')) : null))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveBillListByIds([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    requestLegislationTextsHitCounts: () => ({\n        type: legislationTextsHitCountsRequest,\n        isFetching: true\n    }),\n\n    receiveLegislationTextsHitCounts: (responseObj) => ({\n        type: legislationTextsHitCountsSuccess,\n        isFetching: false,\n        legislationTextsHitCounts: responseObj,\n        errorMessage: responseObj.FailureMessage\n    }),\n\n    legislationTextsHitCountsError: message => ({\n        type: legislationTextsHitCountsFailure,\n        isFetching: false,\n        errorMessage: message\n    }),\n\n    getLegislationTextsHitCounts: (body) => {\n        return dispatch => {\n            dispatch(billActionCreators.requestLegislationTextsHitCounts());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/GetLegislationTextsHitCountsAsync', 'POST', headers, body, '');\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.legislationTextsHitCountsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveLegislationTextsHitCounts(result[1].HitCounts))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveLegislationTextsHitCounts([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    requestBillList: () => ({\n        type: billListRequest,\n        isFetching: true\n    }),\n\n    receiveBillList: (responseObj, pagination) => ({\n        type: billListSuccess,\n        isFetching: false,\n        billList: responseObj,\n        billListPagination: pagination,\n        errorMessage: responseObj.FailureMessage\n    }),\n\n    billListError: message => ({\n        type: billListFailure,\n        isFetching: false,\n        errorMessage: message\n    }),\n\n    getBillList: (body, partner, pagination) => {\n        return dispatch => {\n            dispatch(billActionCreators.requestBillList());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            if (pagination) { headers['X-Pagination'] = JSON.stringify(pagination) }\n            let request = '';\n            if (partner) {\n                // THIS REQUEST NOT CURRENTLY IN USE. ADD THE SERVICE NAME TO THE REQUEST URL ONCE AVAILABLE\n                request = partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_ADVANCED_SEARCH_API_URL) + '/AdvancedLegislationSearch/api/GetPartnerLegislationListAsync', 'GET', '', '', '');\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_ADVANCED_SEARCH_API_URL) + '/AdvancedLegislationSearch/api/GetLegislationListAsync', 'POST', headers, body, '');\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillList(result[1].Legislations, result[2] && result[2].get('X-Pagination') ? JSON.parse(result[2].get('X-Pagination')) : null))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveBillList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    requestMostFrequentBillList: () => ({\n        type: mostFrequentBillListRequest,\n        isFetching: true\n    }),\n\n    receiveMostFrequentBillList: responseObj => ({\n        type: mostFrequentBillListSuccess,\n        isFetching: false,\n        mostFrequentBillList: responseObj,\n        errorMessage: responseObj.FailureMessage\n    }),\n\n    mostFrequentBillListError: message => ({\n        type: mostFrequentBillListFailure,\n        isFetching: false,\n        errorMessage: message\n    }),\n\n    getMostFrequentBillList: params => {\n        return dispatch => {\n            dispatch(billActionCreators.requestMostFrequentBillList());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_ADVANCED_SEARCH_API_URL) + '/AdvancedLegislationSearch/api/GetMostFrequentLegislationsAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.mostFrequentBillListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveMostFrequentBillList(result[1].Legislations))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveMostFrequentBillList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillNumbers: responseObj => ({\n        type: billNumbersSuccess,\n        billNumbers: responseObj\n    }),\n\n    billNumbersError: message => ({\n        type: billNumbersFailure,\n        isFetching: false,\n        billNumberMessage: message\n    }),\n\n    getBillNumbers: (params) => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_ADVANCED_SEARCH_API_URL) + '/AdvancedLegislationSearch/api/GetLegislativeNumbersAsync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billNumbersError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBillNumbers(result[1].LegislationNumbersList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveBillNumbers([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillVersionRef: responseObj => ({\n        type: billVersionRefSuccess,\n        billVersionRef: responseObj\n    }),\n\n    billVersionRefError: message => ({\n        type: billVersionRefFailure,\n        billVersionRefError: message\n    }),\n\n    getBillVersionRef: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/GetLegislationVersionListAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billVersionRefError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBillVersionRef(result[1].LegislationVersionList));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billVersionRefError('No Content'));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveSponsorRefList: responseObj => ({\n        type: sponsorRefListSuccess,\n        sponsorRefList: responseObj\n    }),\n\n    sponsorRefListError: message => ({\n        type: sponsorRefListFailure,\n        sponsorRefListError: message\n    }),\n\n    getSponsorRefList: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/GetSponsorTypeListAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.sponsorRefListError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveSponsorRefList(result[1].SponsorTypes));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.sponsorRefListError('No Content'));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillSummaryRef: responseObj => ({\n        type: billSummaryRefSuccess,\n        billSummaryRef: responseObj\n    }),\n\n    billSummaryRefError: message => ({\n        type: billSummaryRefFailure,\n        billSummaryRefError: message\n    }),\n\n    getBillSummaryRef: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_SUMMARY_SERVICE) + '/LegislationSummary/api/GetSummaryVersionsReferenceAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billSummaryRefError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBillSummaryRef(result[1].SummaryVersions));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billSummaryRefError('No Content'));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillText: responseObj => ({\n        type: billTextSuccess,\n        billText: responseObj\n    }),\n\n    billTextError: message => ({\n        type: billTextFailure,\n        billTextError: message\n    }),\n\n    getBillText: (params, partner) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/GetPartnerLegislationTextByIDAsync', 'GET', headers, '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/GetLegislationTextByIDAsync', 'GET', headers, '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billTextError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBillText(result[1].TextsList));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveBillText([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillTextSave: responseObj => ({\n        type: billTextSaveSuccess,\n        billTextSave: responseObj\n    }),\n\n    billTextSaveError: message => ({\n        type: billTextSaveFailure,\n        billTextSaveError: message\n    }),\n\n    saveBillText: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/SaveLegislationTextAsync', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billTextSaveError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBillTextSave(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveBillTextSave([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveIhodAmendmentSave: responseObj => ({\n        type: ihodAmendmentSaveSuccess,\n        ihodAmendmentSave: responseObj\n    }),\n\n    ihodAmendmentSaveError: message => ({\n        type: ihodAmendmentSaveFailure,\n        ihodAmendmentSaveError: message\n    }),\n\n    saveIhodAmendment: (params) => {\n        let config = {\n            method: 'POST',\n            headers: {\n                \"content-type\": \"application/json; charset=utf-8\",\n            }\n        }\n\n        return dispatch => {\n            return fetch(\"https://ihod-lisva.herokuapp.com/floor_amendments/create_amendment\" + params, config)\n                .then(() => {\n                    dispatch(billActionCreators.receiveIhodAmendmentSave([]));\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBatchPublish: responseObj => ({\n        type: batchPublishSuccess,\n        batchPublishSave: responseObj\n    }),\n\n    batchPublishError: message => ({\n        type: batchPublishFailure,\n        batchPublishError: message\n    }),\n\n    batchPublish: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/PublishLegislationTextsAsync', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.batchPublishError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBatchPublish(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveBatchPublish([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCompletePublish: responseObj => ({\n        type: batchCompleteSuccess,\n        batchCompleteSave: responseObj\n    }),\n\n    batchCompleteError: message => ({\n        type: batchCompleteFailure,\n        batchCompleteError: message\n    }),\n\n    batchComplete: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/CompletePrintLegislationTextsAsync', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.batchCompleteError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveCompletePublish(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveCompletePublish([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveJsonHeaders: responseObj => ({\n        type: jsonHeadersSuccess,\n        jsonHeaders: responseObj\n    }),\n\n    jsonHeadersError: message => ({\n        type: jsonHeadersFailure,\n        jsonHeadersError: message\n    }),\n\n    getJsonHeaders: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/PreviewJSONById', 'POST', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.jsonHeadersError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveJsonHeaders(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveJsonHeaders([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receivePdfPreview: responseObj => ({\n        type: pdfPreviewSuccess,\n        pdfPreview: responseObj\n    }),\n\n    pdfPreviewError: message => ({\n        type: pdfPreviewFailure,\n        pdfPreviewError: message\n    }),\n\n    getPdfPreview: (body) => {\n        return dispatch => {\n            let config = {\n                method: 'POST',\n                headers: {\n                    \"Content-Type\": \"application/json; charset=utf-8\",\n                    \"authorization\": \"Bearer \" + localStorage.getItem('LIS_ID_TOKEN'),\n                    \"WebAPIKey\": process.env.REACT_APP_API_KEY\n                },\n                body: JSON.stringify(body)\n            }\n\n            let url = (API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/PreviewPDFFile';\n\n            return fetch(url, config)\n                .then(result => {\n                    if (result) {\n                        dispatch(billActionCreators.receivePdfPreview(result));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    } else {\n                        dispatch(billActionCreators.pdfPreviewError(\"No preview file\"));\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receivePreviewPdfFile: responseObj => ({\n        type: previewPdfFileSuccess,\n        sasUrl: responseObj\n    }),\n\n    previewPdfFileError: message => ({\n        type: previewPdfFileFailure,\n        sasUrlFailure: message\n    }),\n\n    previewPdfFile: (body) => {\n        return dispatch => {\n            let headers = {\n                \"Content-Type\": \"application/json; charset=utf-8\"\n            }\n\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/PreviewStoredPDFFileAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.previewPdfFileError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receivePreviewPdfFile(result[1].sasTokenUrl));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.previewPdfFileError([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveHtmlPreview: responseObj => ({\n        type: htmlPreviewSuccess,\n        htmlPreview: responseObj\n    }),\n\n    htmlPreviewError: message => ({\n        type: htmlPreviewFailure,\n        htmlPreviewError: message\n    }),\n\n    getHtmlPreview: (body) => {\n        return dispatch => {\n            let config = {\n                method: \"POST\",\n                headers: {\n                    \"Content-Type\": \"application/json; charset=utf-8\",\n                    \"authorization\": \"Bearer \" + localStorage.getItem('LIS_ID_TOKEN'),\n                    \"WebAPIKey\": process.env.REACT_APP_API_KEY\n                },\n                body: JSON.stringify(body)\n            }\n\n            let url = (API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/PreviewHTMLFile';\n\n            return fetch(url, config)\n                .then(async result => {\n                    if (!result) {\n                        dispatch(billActionCreators.htmlPreviewError(\"Preview file not generated\"));\n                    } else if (result.status === 400) {\n                        await result.body.getReader().read().then(({ value }) => {\n                            const error = JSON.parse(Buffer.from(value.buffer).toString())\n                            dispatch(billActionCreators.htmlPreviewError(error.Name || \"Unknown Error\"));\n                        })\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    } else {\n                        dispatch(billActionCreators.receiveHtmlPreview(result));\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveHtmlFilePreview: responseObj => ({\n        type: htmlFilePreviewSuccess,\n        htmlFilePreview: responseObj\n    }),\n\n    htmlFilePreviewError: message => ({\n        type: htmlFilePreviewFailure,\n        htmlFilePreviewError: message\n    }),\n\n    getHtmlFilePreview: (params) => {\n        return dispatch => {\n            let config = {\n                method: \"POST\",\n                headers: {\n                    \"Content-Type\": \"application/json; charset=utf-8\",\n                    \"authorization\": \"Bearer \" + localStorage.getItem('LIS_ID_TOKEN'),\n                    \"WebAPIKey\": process.env.REACT_APP_API_KEY\n                }\n            }\n\n            let url = (API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/PreviewLegislationHTMLFileAsync' + params;\n\n            return fetch(url, config)\n                .then(async result => {\n                    if (!result) {\n                        dispatch(billActionCreators.htmlFilePreviewError(\"Preview file not generated\"));\n                    } else if (result.status === 400) {\n                        await result.body.getReader().read().then(({ value }) => {\n                            const error = JSON.parse(Buffer.from(value.buffer).toString())\n                            dispatch(billActionCreators.htmlFilePreviewError(error.Name || \"Unknown Error\"));\n                        })\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    } else {\n                        await result.body.getReader().read().then(({ value }) => {\n                            let decoder = new TextDecoder;\n                            dispatch(billActionCreators.receiveHtmlFilePreview(decoder.decode(value)));\n                        })\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillSave: responseObj => ({\n        type: billSaveSuccess,\n        billSave: responseObj\n    }),\n\n    billSaveError: message => ({\n        type: billSaveFailure,\n        billSaveError: message\n    }),\n\n    saveBill: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/SaveLegislationAsync', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billSaveError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBillSave(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveBillSave([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillFileGen: responseObj => ({\n        type: billFileGenSuccess,\n        billFileGen: responseObj\n    }),\n\n    billFileGenError: message => ({\n        type: billFileGenFailure,\n        billFileGenError: message\n    }),\n\n    genBillFile: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/ProcessLegislationFilesAsync', 'POST', headers, '', params, true)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billFileGenError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBillFileGen(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billFileGenError('No Content'));\n                        return Promise.reject('No Content')\n                    }\n                }).catch(err => console.log(err))\n        }\n    },\n\n    receiveBatchBillFileGen: responseObj => ({\n        type: batchBillFileGenSuccess,\n        batchBillFileGen: responseObj\n    }),\n\n    batchBillFileGenError: message => ({\n        type: batchBillFileGenFailure,\n        batchBillFileGenError: message\n    }),\n\n    batchGenBillFile: (params, body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/ProcessBatchLegislationFilesAsync', 'POST', headers, body, params, true)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.batchBillFileGenError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveBatchBillFileGen(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.batchBillFileGenError('No Content'));\n                        return Promise.reject('No Content')\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillManagementList: responseObj => ({\n        type: billManagementListSuccess,\n        billManagementList: responseObj,\n    }),\n\n    billManagementListError: message => ({\n        type: billManagementListFailure,\n        billManagementListError: message\n    }),\n\n    getBillManagementList: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/getLegislationManagementListAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billManagementListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillManagementList(result[1].Legislations))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveBillManagementList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveSessionBills: responseObj => ({\n        type: sessionBillsSuccess,\n        sessionBills: responseObj,\n    }),\n\n    sessionBillsError: message => ({\n        type: sessionBillsFailure,\n        sessionBillsError: message\n    }),\n\n    getSessionBills: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/getLegislationSessionListAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.sessionBillsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveSessionBills(result[1].Legislations))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveSessionBills([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillEvents: responseObj => ({\n        type: billEventsSuccess,\n        billEvents: responseObj,\n    }),\n\n    billEventsError: message => ({\n        type: billEventsFailure,\n        billEventsError: message\n    }),\n\n    getBillEvents: (params = '') => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_EVENT_API_URL) + '/LegislationEvent/api/getlegislationeventtypereferencesasync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billEventsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillEvents(result[1].EventTypes))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billEventsError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveBillEventSave: responseObj => ({\n        type: billEventSaveSuccess,\n        billEventSave: responseObj,\n    }),\n\n    billEventSaveError: message => ({\n        type: billEventSaveFailure,\n        billEventSaveError: message\n    }),\n\n    saveBillEvent: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_EVENT_API_URL) + '/LegislationEvent/api/savelegislationeventasync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.billEventSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(billActionCreators.receiveBillEventSave(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.billEventSaveError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveTextList: responseObj => ({\n        type: textListSuccess,\n        textList: responseObj,\n    }),\n\n    textListError: message => ({\n        type: textListFailure,\n        textListError: message\n    }),\n\n    getTextList: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/getlegislationtextlistasync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.textListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveTextList(result[1].LegislationTextList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveTextList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveSubjectList: responseObj => ({\n        type: subjectListSuccess,\n        subjectList: responseObj,\n    }),\n\n    subjectListError: message => ({\n        type: subjectListFailure,\n        subjectListError: message\n    }),\n\n    getSubjectList: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_SUBJECT_SERVICE) + '/LegislationSubject/api/GetSubjectReferencesAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.subjectListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        const subjectList = result[1].SubjectsReference;\n                        subjectList.forEach(subject => {\n                            subject.label = subject.Subject;\n                            subject.value = subject.SubjectIndexID;\n                        })\n                        dispatch(billActionCreators.receiveSubjectList(subjectList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveSubjectList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveIntroDateList: responseObj => ({\n        type: introDateListSuccess,\n        introDateList: responseObj,\n    }),\n\n    introDateListError: message => ({\n        type: introDateListFailure,\n        introDateListError: message\n    }),\n\n    getIntroDateList: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_ADVANCED_SEARCH_API_URL) + '/AdvancedLegislationSearch/api/GetIntroductionDateListAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.introDateListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveIntroDateList(result[1].LegislationDatesList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveIntroDateList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveLegislationAmendmentList: responseObj => ({\n        type: legislationAmendmentListSuccess,\n        legislationAmendmentList: responseObj,\n    }),\n\n    legislationAmendmentListError: message => ({\n        type: legislationAmendmentListFailure,\n        legislationAmendmentListError: message\n    }),\n\n    getLegislationAmendmentList: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/GetLegislationAmendmentListAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.legislationAmendmentListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveLegislationAmendmentList(result[1].LegislationAmendmentList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveLegislationAmendmentList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveLegislationDispositions: responseObj => ({\n        type: legislationDispositionsSuccess,\n        legislationDispositions: responseObj,\n    }),\n\n    legislationDispositionsError: message => ({\n        type: legislationDispositionsFailure,\n        legislationDispositionsError: message\n    }),\n\n    getLegislationDispositions: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_TEXT_API_URL) + '/LegislationText/api/GetTextDispositionsReferenceAsync/', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.legislationDispositionsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveLegislationDispositions(result[1].TextDispositionList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveLegislationDispositions([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveLegislationStatusHistory: responseObj => ({\n        type: legislationStatusHistorySuccess,\n        legislationStatusHistory: responseObj,\n    }),\n\n    legislationStatusHistoryError: message => ({\n        type: legislationStatusHistoryFailure,\n        legislationStatusHistoryError: message\n    }),\n\n    getBillStatusHistory: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/GetLegislationStatusHistoryByLegislationIDAsync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.legislationStatusHistoryError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveLegislationStatusHistory(result[1].LegislationsStatusHistory))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveLegislationStatusHistory([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveSasURL: responseObj => ({\n        type: sasURLSuccess,\n        sasURLLink: responseObj,\n    }),\n\n    sasURLError: message => ({\n        type: sasURLFailure,\n        sasURLLinkError: message\n    }),\n\n    getSasURL: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/GetSASUrlForPreviewAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.sasUrlError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveSasURL(result[1].sasTokenUrl))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveSasURL([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    uploadImpactStatement: (params, file) => {\n        return dispatch => {\n            const headers = {\n                'cache-control': 'no-cache'\n            }\n            let formData = new FormData();\n            formData.append('fiscalImpactPDF', file);\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/SaveImpactStatementFileAsync', 'POST', headers, formData, params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch({\n                            type: uploadImpactStatementRequest,\n                            uploadImpactStatementError: result[1]\n                        });\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch({\n                            type: uploadImpactStatementRequest,\n                            uploadImpactStatementResponse: result[1]\n                        });\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch({\n                            type: uploadImpactStatementRequest,\n                            uploadImpactStatementError: \"No Content\"\n                        });\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveDeleteBlobFile: responseObj => ({\n        type: deleteBlobFileSuccess,\n        deleteBlobFileResponse: responseObj,\n    }),\n\n    deleteBlobFileError: message => ({\n        type: deleteBlobFileFailure,\n        deleteBlobFileError: message\n    }),\n\n    deleteBlobFileStatement: (params) => {\n        return dispatch => {\n            const headers = {\n                'cache-control': 'no-cache'\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_EVENT_API_URL) + '/LegislationEvent/api/DeleteFileFromBlobStorageAsync', 'DELETE', headers, null, params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(billActionCreators.deleteBlobFileError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(billActionCreators.receiveDeleteBlobFile(result[1].FilesDeleted))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(billActionCreators.receiveDeleteBlobFile([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    }\n};\n\nexport const reducer = (state, action) => {\n    state = state || initialState;\n\n    switch (action.type) {\n        case billFailure:\n            return Object.assign({}, state, {\n                billError: action.billError\n            });\n        case billSuccess:\n            return Object.assign({}, state, {\n                bill: action.bill,\n                billError: ''\n            });\n        case billStatusRefFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case billStatusRefSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                billStatusReferences: action.billStatusReferences,\n                errorMessage: ''\n            });\n        case legislationClassesFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case legislationClassesSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                legislationClasses: action.legislationClasses,\n                errorMessage: ''\n            });\n        case billStatusCategoryRefFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case billStatusCategoryRefSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                billStatusCategoryReferences: action.billStatusCategoryReferences,\n                errorMessage: ''\n            });\n        case billNumbersFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                billNumberMessage: action.billNumberMessage\n            });\n        case billNumbersSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                billNumbers: action.billNumbers,\n                billNumberMessage: ''\n            });\n        case legislationIdsListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case legislationIdsListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                legislationIdsList: action.legislationIdsList,\n                legislationIdsListPagination: action.legislationIdsListPagination,\n                errorMessage: ''\n            });\n        case legislationIdsListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case billListByIdsRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case billListByIdsSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                billListByIds: action.billListByIds,\n                billListByIdsPagination: action.billListByIdsPagination,\n                errorMessage: ''\n            });\n        case billListByIdsFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case legislationTextsHitCountsRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case legislationTextsHitCountsSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                legislationTextsHitCounts: action.legislationTextsHitCounts,\n                errorMessage: ''\n            });\n        case legislationTextsHitCountsFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case billListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case billListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                billList: action.billList,\n                billListPagination: action.billListPagination,\n                errorMessage: ''\n            });\n        case billListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case mostFrequentBillListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                mostFrequentBillList: action.mostFrequentBillList,\n                errorMessage: ''\n            });\n        case mostFrequentBillListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case billSummaryRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case billSummarySuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                billSummary: action.billSummary,\n                errorMessage: ''\n            });\n        case billSummaryFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case saveBillSummaryRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case saveBillSummarySuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                billSummarySave: action.billSummarySave,\n                errorMessage: ''\n            });\n        case saveBillSummaryFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case billHistorySuccess:\n            return Object.assign({}, state, {\n                billHistory: action.billHistory,\n                billHistoryError: ''\n            });\n        case billHistoryFailure:\n            return Object.assign({}, state, {\n                billHistoryError: action.errorMessage\n            });\n        case billVersionRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case billVersionSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                billVersion: action.billVersion,\n                errorMessage: ''\n            });\n        case billVersionFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case sponsorRefListSuccess:\n            return Object.assign({}, state, {\n                sponsorRefList: action.sponsorRefList,\n                sponsorRefListError: ''\n            });\n        case sponsorRefListFailure:\n            return Object.assign({}, state, {\n                sponsorRefListError: action.sponsorRefListError\n            });\n        case billVersionRefSuccess:\n            return Object.assign({}, state, {\n                billVersionRef: action.billVersionRef,\n                billVersionRefError: ''\n            });\n        case billVersionRefFailure:\n            return Object.assign({}, state, {\n                billVersionRefError: action.billVersionRefError\n            });\n        case billSummaryRefSuccess:\n            return Object.assign({}, state, {\n                billSummaryRef: action.billSummaryRef,\n                billSummaryRefError: ''\n            });\n        case billSummaryRefFailure:\n            return Object.assign({}, state, {\n                billSummaryRefError: action.billSummaryRefError\n            });\n        case billEventRefSuccess:\n            return Object.assign({}, state, {\n                billEventRef: action.billEventRef,\n                billEventRefError: ''\n            });\n        case billEventRefFailure:\n            return Object.assign({}, state, {\n                billEventRefError: action.billEventRefError\n            });\n        case legislationEventsByIdSuccess:\n            return Object.assign({}, state, {\n                legislationEventsById: action.legislationEventsById,\n                legislationEventsByIdError: ''\n            });\n        case legislationEventsByIdFailure:\n            return Object.assign({}, state, {\n                legislationEventsByIdError: action.legislationEventsByIdError\n            });\n        case billTextSuccess:\n            return Object.assign({}, state, {\n                billText: action.billText,\n                billTextError: ''\n            });\n        case billTextFailure:\n            return Object.assign({}, state, {\n                billTextError: action.billTextError\n            });\n        case batchPublishSuccess:\n            return Object.assign({}, state, {\n                batchPublishSave: action.batchPublishSave,\n                batchPublishSaveError: ''\n            });\n        case batchPublishFailure:\n            return Object.assign({}, state, {\n                batchPublishError: action.batchPublishError\n            });\n        case batchCompleteSuccess:\n            return Object.assign({}, state, {\n                batchCompleteSave: action.batchCompleteSave,\n                batchCompleteSaveError: ''\n            });\n        case batchCompleteFailure:\n            return Object.assign({}, state, {\n                batchCompleteError: action.batchCompleteError\n            });\n        case billTextSaveSuccess:\n            return Object.assign({}, state, {\n                billTextSave: action.billTextSave,\n                billTextSaveError: ''\n            });\n        case billTextSaveFailure:\n            return Object.assign({}, state, {\n                billTextSaveError: action.billTextSaveError\n            });\n        case ihodAmendmentSaveSuccess:\n            return Object.assign({}, state, {\n                ihodAmendmentSave: action.ihodAmendmentSave,\n                ihodAmendmentSaveError: ''\n            });\n        case ihodAmendmentSaveFailure:\n            return Object.assign({}, state, {\n                ihodAmendmentSaveError: action.ihodAmendmentSaveError\n            });\n        case jsonHeadersSuccess:\n            return Object.assign({}, state, {\n                jsonHeaders: action.jsonHeaders,\n                jsonHeadersError: ''\n            });\n        case jsonHeadersFailure:\n            return Object.assign({}, state, {\n                jsonHeadersError: action.jsonHeadersError\n            });\n        case pdfPreviewSuccess:\n            return Object.assign({}, state, {\n                pdfPreview: action.pdfPreview,\n                pdfPreviewError: ''\n            });\n        case pdfPreviewFailure:\n            return Object.assign({}, state, {\n                pdfPreviewError: action.pdfPreviewError\n            });\n        case previewPdfFileSuccess:\n            return Object.assign({}, state, {\n                sasUrl: action.sasUrl,\n                sasUrlError: ''\n            });\n        case previewPdfFileFailure:\n            return Object.assign({}, state, {\n                sasUrlError: action.sasUrlError\n            });\n        case htmlPreviewSuccess:\n            return Object.assign({}, state, {\n                htmlPreview: action.htmlPreview,\n                htmlPreviewError: ''\n            });\n        case htmlPreviewFailure:\n            return Object.assign({}, state, {\n                htmlPreviewError: action.htmlPreviewError\n            });\n        case htmlFilePreviewSuccess:\n            return Object.assign({}, state, {\n                htmlFilePreview: action.htmlFilePreview,\n                htmlFilePreviewError: ''\n            });\n        case htmlFilePreviewFailure:\n            return Object.assign({}, state, {\n                htmlFilePreviewError: action.htmlFilePreviewError\n            });\n        case billSaveSuccess:\n            return Object.assign({}, state, {\n                billSave: action.billSave,\n                billSaveError: ''\n            });\n        case billSaveFailure:\n            return Object.assign({}, state, {\n                billSaveError: action.billSaveError\n            });\n        case billFileGenSuccess:\n            return Object.assign({}, state, {\n                billFileGen: action.billFileGen,\n                billFileGenError: ''\n            });\n        case billFileGenFailure:\n            return Object.assign({}, state, {\n                billFileGenError: action.billFileGenError\n            });\n        case batchBillFileGenSuccess:\n            return Object.assign({}, state, {\n                batchBillFileGen: action.batchBillFileGen,\n                batchBillFileGenError: ''\n            });\n        case batchBillFileGenFailure:\n            return Object.assign({}, state, {\n                batchBillFileGenError: action.batchBillFileGenError\n            });\n        case billManagementListSuccess:\n            return Object.assign({}, state, {\n                billManagementList: action.billManagementList,\n                billManagementListError: ''\n            });\n        case billManagementListFailure:\n            return Object.assign({}, state, {\n                billManagementListError: action.billManagementListError\n            });\n        case sessionBillsSuccess:\n            return Object.assign({}, state, {\n                sessionBills: action.sessionBills,\n                sessionBillsError: ''\n            });\n        case sessionBillsFailure:\n            return Object.assign({}, state, {\n                sessionBillsError: action.sessionBillsError\n            });\n        case billEventsSuccess:\n            return Object.assign({}, state, {\n                billEvents: action.billEvents,\n                billEventsError: ''\n            });\n        case billEventsFailure:\n            return Object.assign({}, state, {\n                billEventsError: action.billEventsError\n            });\n        case billEventSaveSuccess:\n            return Object.assign({}, state, {\n                billEventSave: action.billEventSave,\n                billEventSaveError: ''\n            });\n        case billEventSaveFailure:\n            return Object.assign({}, state, {\n                billEventSaveError: action.billEventSaveError\n            });\n        case textListSuccess:\n            return Object.assign({}, state, {\n                textList: action.textList,\n                textListError: ''\n            });\n        case textListFailure:\n            return Object.assign({}, state, {\n                textListError: action.textListError\n            });\n        case subjectListSuccess:\n            return Object.assign({}, state, {\n                subjectList: action.subjectList,\n                subjectListError: ''\n            });\n        case subjectListFailure:\n            return Object.assign({}, state, {\n                subjectListError: action.subjectListError\n            });\n        case introDateListSuccess:\n            return Object.assign({}, state, {\n                introDateList: action.introDateList,\n                introDateListError: ''\n            });\n        case introDateListFailure:\n            return Object.assign({}, state, {\n                introDateListError: action.introDateListError\n            });\n        case legislationAmendmentListSuccess:\n            return Object.assign({}, state, {\n                legislationAmendmentList: action.legislationAmendmentList,\n                legislationAmendmentListError: ''\n            });\n        case legislationAmendmentListFailure:\n            return Object.assign({}, state, {\n                legislationAmendmentListError: action.legislationAmendmentListError\n            });\n        case legislationDispositionsSuccess:\n            return Object.assign({}, state, {\n                legislationDispositions: action.legislationDispositions,\n                legislationDispositionsError: ''\n            });\n        case legislationDispositionsFailure:\n            return Object.assign({}, state, {\n                legislationDispositionsError: action.legislationDispositionsError\n            });\n        case legislationStatusHistorySuccess:\n            return Object.assign({}, state, {\n                legislationStatusHistory: action.legislationStatusHistory,\n                legislationStatusHistoryError: ''\n            });\n        case legislationStatusHistoryFailure:\n            return Object.assign({}, state, {\n                legislationStatusHistoryError: action.legislationStatusHistoryError\n            });\n        case sasURLSuccess:\n            return Object.assign({}, state, {\n                sasURLLink: action.sasURLLink,\n                sasURLLinkError: ''\n            });\n        case sasURLFailure:\n            return Object.assign({}, state, {\n                sasURLLinkError: action.sasURLLinkError\n            });\n        case uploadImpactStatementRequest:\n            return Object.assign({}, state, {\n                uploadImpactStatementResponse: action.uploadImpactStatementResponse || state.uploadImpactStatementResponse,\n                uploadImpactStatementError: action.uploadImpactStatementError || ''\n            });\n        case deleteBlobFileSuccess:\n            return Object.assign({}, state, {\n                deleteBlobFileResponse: action.deleteBlobFileResponse,\n                deleteBlobFileError: ''\n            });\n        case deleteBlobFileFailure:\n            return Object.assign({}, state, {\n                deleteBlobFileError: action.deleteBlobFileError\n            });\n        default:\n            return state;\n    }\n};\n","import { LogLevel } from \"@azure/msal-browser\";\n\nexport const msalConfig = {\n    auth: {\n        clientId: [\"dev\", \"test\", \"qa\"].includes(window.env.APP_ENV.toLowerCase()) ? \"d0952a15-c248-42cb-a3d5-31a104e6fe94\" : \"370fbf66-8bed-4f65-8938-9d97d9ff8e07\",\n        authority: \"https://login.microsoftonline.com/house.virginia.gov\",\n        redirectUri: [\"dev\", \"test\", \"qa\"].includes(window.env.APP_ENV.toLowerCase()) ? \"https://\" + window.env.APP_ENV + \".lis.virginia.gov\" : \"https://lis.virginia.gov\",\n        postLogoutRedirectUri: [\"dev\", \"test\", \"qa\"].includes(window.env.APP_ENV.toLowerCase()) ? \"https://\" + window.env.APP_ENV + \".lis.virginia.gov\" : \"https://lis.virginia.gov\"\n    },\n    cache: {\n        cacheLocation: \"localStorage\",\n        storeAuthStateInCookie: false,\n    },\n    system: {\n        loggerOptions: {\n            loggerCallback: (level, message, containsPii) => {\n                if (containsPii) {\n                    return;\n                }\n                switch (level) {\n                    case LogLevel.Error:\n                        console.error(message);\n                        return;\n                    case LogLevel.Info:\n                        console.info(message);\n                        return;\n                    case LogLevel.Verbose:\n                        console.debug(message);\n                        return;\n                    case LogLevel.Warning:\n                        console.warn(message);\n                        return;\n                    default:\n                        return;\n                }\n            } \n        }\n    }\n};\n\nexport const loginRequest = {\n    scopes: [\"User.Read\"]\n};\n\nexport const logoutRequest = {\n    scopes: [\"User.Read\"]\n};\n\nexport const graphConfig = {\n    graphMeEndpoint: \"https://graph.microsoft.com/v1.0/me\"\n};","import jwtDecode from 'jwt-decode';\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst graphToken = 'GRAPH_ID_TOKEN';\nconst idToken = 'LIS_ID_TOKEN';\nconst refreshToken = 'LIS_REFRESH_TOKEN';\nconst refreshTokenExpiration = 'LIS_REFRESH_TOKEN_EXPIRATION';\nconst claims = \"LIS_CLAIMS\";\n\nconst loginRequest = 'LOGIN_REQUEST';\nconst loginSuccess = 'LOGIN_SUCCESS';\nconst loginFailure = 'LOGIN_FAILURE';\n\nconst logoutRequest = 'LOGOUT_REQUEST';\nconst logoutSuccess = 'LOGOUT_SUCCESS';\n\nconst refreshTokenRequest = 'REFRESH_TOKEN_REQUEST';\nconst refreshTokenSuccess = 'REFRESH_TOKEN_SUCCESS';\nconst refreshTokenFailure = 'REFRESH_TOKEN_FAILURE';\n\nconst houseLoginRequest = 'HOUSE_ACCESS_TOKEN_REQUEST';\nconst houseLoginSuccess = 'HOUSE_ACCESS_TOKEN_SUCCESS';\nconst houseLoginFailure = 'HOUSE_ACCESS_TOKEN_FAILURE';\n\n//const initialState = {\n//    loggedIn: false\n//};\n\n// Decode the token, if it exists\n\nconst decodedToken = () => {\n    const jwtToken = localStorage.getItem(idToken);\n\n    const userData = {\n        initials: '',\n        name: '',\n        chamber: '',\n        email: '',\n        claims: [],\n        roles: [],\n        scopes: [],\n        resources: []        \n    };\n\n    if (jwtToken !== null && jwtToken !== 'undefined') {\n        const decode = jwtDecode(jwtToken);\n        const stringToken = JSON.stringify(decode);\n        const parsedToken = JSON.parse(stringToken);\n        userData.initials = parsedToken.given_name.charAt(0) + parsedToken.family_name.charAt(0);\n        userData.name = parsedToken.given_name + ' ' + parsedToken.family_name;\n        userData.expr = parsedToken.exp;\n        userData.email = parsedToken.email\n    }\n    return userData;\n}\n\nconst isTokenExpired = () => {\n    const jwtToken = localStorage.getItem(idToken);\n\n    var expr = '';\n\n    if (jwtToken !== null && jwtToken !== 'undefined') {\n        const decode = jwtDecode(jwtToken);\n        const stringToken = JSON.stringify(decode);\n        const parsedToken = JSON.parse(stringToken);\n\n        expr = parsedToken.exp;\n        return expr < new Date().getTime() / 1000;\n    } else {\n        return true;\n    }\n}\n\nconst parsedClaims = () => {\n    const claimsObject = JSON.parse(localStorage.getItem(claims));\n\n    let userClaims = {\n        scopes: [],\n        roles: [],\n        resources: [],\n        claims: []\n    };\n\n    if (claimsObject)\n        for (let i = 0; i < claimsObject.length; i++) {\n            userClaims.scopes.push(claimsObject[i].Scope)\n            userClaims.roles.push(claimsObject[i].RoleName)\n            userClaims.resources.push(claimsObject[i].Resource)\n            userClaims.claims.push(claimsObject[i])\n        }\n\n    return userClaims;\n}\n\nexport const authActionCreators = {\n\n    // LOGIN THE USER\n\n    requestLogin: (creds) => ({\n        type: loginRequest,\n        isFetching: true,\n        initiateRedirect: false,\n        creds\n    }),\n\n    receiveLogin: (user) => ({\n        type: loginSuccess,\n        isFetching: false,\n        initiateRedirect: true,\n        isAuthenticated: true,\n        isTokenExpired: isTokenExpired(user.AccessToken),\n        userProfile: decodedToken(user.AccessToken),\n        userClaims: parsedClaims()\n    }),\n\n    loginError: (message) => ({\n        type: loginFailure,\n        isFetching: false,\n        isAuthenticated: false,\n        message\n    }),\n\n    loginUser: (creds) => {\n        let config = {\n            method: 'POST',\n            headers: { \"Content-Type\": \"application/json; charset=utf-8\", \"WebAPIKey\": process.env.REACT_APP_API_KEY },\n            body: JSON.stringify({ UserID: creds.userId, Password: creds.userPassword })\n        }\n        return dispatch => {\n            // dispatch requestLogin and kickoff the call to the API\n            dispatch(authActionCreators.requestLogin(creds));\n\n            return fetch((API_URL || process.env.REACT_APP_AUTH_API_URL) + '/Authentication/api/LoginAsync', config)\n                .then(response =>\n                    response.json().then(user => ({ user, response }))\n                ).then(({ user, response }) => {\n                    if (response.status >= 400) {\n                        // If there was a problem, \n                        // dispatch the error condition\n                        dispatch(authActionCreators.loginError(user.FailureMessage))\n                        return Promise.reject(user)\n                    } else {\n                        // If login was successful, set the token in local storage\n                        let roles = [];\n                        if (user.Claims && user.Claims.Roles) {\n                            roles = user.Claims.Roles;\n                        }\n                        localStorage.setItem(claims, JSON.stringify(roles));\n                        localStorage.setItem(idToken, user.AccessToken);\n                        localStorage.setItem(refreshToken, user.RefreshToken);\n                        localStorage.setItem(graphToken, user.GraphToken);\n                        //604800000 is 7 days in milliseconds\n                        localStorage.setItem(refreshTokenExpiration, new Date().getTime() + 604800000);\n                        // Dispatch the success action\n                        dispatch(authActionCreators.receiveLogin(user))\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // LOGOUT THE USER\n\n    requestLogout: () => ({\n        type: logoutRequest,\n        isFetching: true,\n        initiateRedirect: false,\n        isAuthenticated: true\n    }),\n\n    receiveLogout: () => ({\n        type: logoutSuccess,\n        isFetching: false,\n        initiateRedirect: false,\n        isAuthenticated: false,\n        userProfile: false,\n        userClaims: false\n    }),\n\n    logoutUser: () => {\n        return dispatch => {\n            dispatch(authActionCreators.requestLogout());\n            localStorage.removeItem(idToken);\n            localStorage.removeItem(refreshToken);\n            localStorage.removeItem(refreshTokenExpiration);\n            localStorage.removeItem(claims);\n            localStorage.removeItem(graphToken);\n            dispatch(authActionCreators.receiveLogout())\n        }\n    },\n\n    // RERESH ACCESS TOKEN\n\n    requestRefreshToken: () => ({\n        type: refreshTokenRequest,\n        isFetching: true\n    }),\n\n    receiveRefreshToken: (user) => ({\n        type: refreshTokenSuccess,\n        isFetching: false,\n        userProfile: decodedToken(user.AccessToken),\n        userClaims: parsedClaims(),\n        isTokenExpired: isTokenExpired(user.AccessToken)\n    }),\n\n    refreshTokenError: (message) => ({\n        type: refreshTokenFailure,\n        message\n    }),\n\n    refreshAccessToken: () => {\n        let rtoken = localStorage.getItem(refreshToken);\n\n        let config = {\n            method: 'POST',\n            headers: {\n                \"authorization\": rtoken,\n                \"content-type\": \"application/json; charset=utf-8\",\n                \"WebAPIKey\": process.env.REACT_APP_API_KEY\n            }\n        }\n\n        return dispatch => {\n            // dispatch requestLogin and kickoff the call to the API\n            dispatch(authActionCreators.requestRefreshToken());\n\n            return fetch((API_URL || process.env.REACT_APP_AUTH_API_URL) + '/Authentication/api/RefreshAccessTokenAsync', config)\n                .then(response => {\n                    if (response.status > 399) {\n                        dispatch(authActionCreators.refreshTokenError(response));\n                        return Promise.reject(response);\n                    }\n                    return response\n                })\n                .then(response =>\n                    response.json().then(user => ({ user, response }))\n                ).then(({ user, response }) => {\n                    // If refresh was successful, set the tokens in local storage\n                    let roles = [];\n                    if (user.Claims && user.Claims.Roles) {\n                        roles = user.Claims.Roles;\n                    }\n                    localStorage.setItem(claims, JSON.stringify(roles));        \n                    localStorage.setItem(idToken, user.AccessToken);\n                    localStorage.setItem(refreshToken, user.RefreshToken);\n                    //604800000 is 7 days in milliseconds\n                    localStorage.setItem(refreshTokenExpiration, new Date().getTime() + 604800000);\n                    // Dispatch the success action\n                    dispatch(authActionCreators.receiveRefreshToken(user))\n                }).catch(err => console.log(\"Error: \", err))\n        }\n    },\n\n    requestHouseLogin: () => ({\n        type: houseLoginRequest,\n        isFetching: true\n    }),\n\n    receiveHouseLogin: (user) => ({\n        type: houseLoginSuccess,\n        isFetching: false,\n        initiateRedirect: true,\n        isAuthenticated: true,\n        isTokenExpired: isTokenExpired(user.AccessToken),\n        userProfile: decodedToken(user.AccessToken),\n        userClaims: parsedClaims()\n    }),\n\n    houseLoginFailure: (message) => ({\n        isFetching: false,\n        type: houseLoginFailure,\n        message\n    }),\n\n    houseLogin: (authToken, refreshToken, expirationDate) => {\n        let config = {\n            method: 'POST',\n            headers: { \"Content-Type\": \"application/json; charset=utf-8\", \"WebAPIKey\": process.env.REACT_APP_API_KEY },            \n        }\n\n        return dispatch => {\n            dispatch(authActionCreators.requestHouseLogin());\n\n            return fetch((API_URL || process.env.REACT_APP_AUTH_API_URL) + '/Authentication/api/GetAccessTokenAsync?accesstoken=' + authToken, config)\n                .then(response =>\n                    response.json().then(user => ({ user, response }))\n                ).then(({ user, response }) => {\n                    if (response.status >= 400) {                        \n                        dispatch(authActionCreators.houseLoginFailure(user.FailureMessage))\n                        return Promise.reject(user)\n                    } else {\n                        let roles = [];\n                        if (user.Claims && user.Claims.Roles) {\n                            roles = user.Claims.Roles;\n                        }\n                        localStorage.setItem(claims, JSON.stringify(roles));\n                        localStorage.setItem(idToken, user.AccessToken);\n                        localStorage.setItem(refreshToken, refreshToken);\n                        localStorage.setItem(graphToken, user.GraphToken);\n                        localStorage.setItem(refreshTokenExpiration, expirationDate.getTime() + 604800000);\n\n                        dispatch(authActionCreators.receiveHouseLogin(user))\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    }\n};\n\nexport const reducer = (state, action) => {\n\n    state = {\n        ...state,\n        isFetching: false,\n        initiateRedirect: false,\n        isAuthenticated: isTokenExpired() ? false : true,\n        userProfile: decodedToken(),\n        userClaims: parsedClaims(),\n        isTokenExpired: isTokenExpired()        \n    }\n\n    switch (action.type) {\n        case loginRequest:\n            return Object.assign({}, state, {\n                isFetching: true,\n                initiateRedirect: false,\n                user: action.creds\n            })\n        case loginSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                initiateRedirect: true,\n                isAuthenticated: true,\n                errorMessage: '',\n                userProfile: action.userProfile,\n                userClaims: action.userClaims,\n                isTokenExpired: action.isTokenExpired\n            })\n        case loginFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                initiateRedirect: false,\n                isAuthenticated: false,\n                errorMessage: action.message\n            })\n        case refreshTokenRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case refreshTokenSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                userProfile: action.userProfile,\n                userClaims: action.userClaims,\n                isTokenExpired: action.isTokenExpired,\n                errorMessage: ''\n            })\n        case refreshTokenFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                initiateRedirect: false,\n                isAuthenticated: false,\n                errorMessage: action.message\n            })\n        case logoutSuccess:\n            return Object.assign({}, state, {\n                isFetching: true,\n                initiateRedirect: false,\n                isAuthenticated: false\n            })\n        case houseLoginRequest:\n            return Object.assign({}, state, {\n                isFetching: true,\n                initiateRedirect: false\n            })\n        case houseLoginFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                initiateRedirect: false,\n                isAuthenticated: false,\n                errorMessage: action.message\n            })\n        case houseLoginSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                initiateRedirect: true,\n                isAuthenticated: true,\n                errorMessage: '',\n                userProfile: action.userProfile,\n                userClaims: action.userClaims,\n                isTokenExpired: action.isTokenExpired\n            })\n        default:\n            return state\n    }\n};","import React from \"react\";\nimport { useMsal } from \"@azure/msal-react\";\nimport { loginRequest } from \"../../../authConfig\";\n\nconst HouseLoginButton = (props) => {\n    const { instance } = useMsal();\n    const user = props.username;\n    const handleLogin = (loginType) => {\n        if (loginType === \"redirect\") {\n            loginRequest.loginHint = user\n            instance.loginRedirect(loginRequest).catch(e => {\n                console.log(e);\n            });\n        }\n    }\n    return (\n        <button className=\"button secondary\" type=\"submit\" onClick={() => handleLogin(\"redirect\")}>Login</button>\n    );\n}\n\nexport default HouseLoginButton;","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport * as Fields from '../../lis-layout/components/lis-forms-component';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport HouseLoginButton from './lis-house-login-button';\n\nclass LoginForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            username: '',\n            password: '',\n            isSubmitting: false,\n            errorMessage: '',\n            houseLogin: false\n        };\n\n        this.checkForHouseDomain = this.checkForHouseDomain.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.handleSubmit = this.handleSubmit.bind(this);\n    }\n\n    checkForHouseDomain() {\n        let userNameSplit = this.state.username.split(\"@\");\n\n        this.setState({\n            houseLogin: userNameSplit[1] && userNameSplit[1] === \"house.virginia.gov\" ? true : false\n        })\n    }\n\n    handleChange(key, val) {\n        this.setState({\n            [key]: val\n        }, () => {\n            if (key === \"username\") {\n                this.checkForHouseDomain();\n            }\n        });\n    }\n\n    handleSubmit(e) {\n        e.preventDefault();\n        if (this.state.houseLogin) { return; }\n        this.setState({\n            isSubmitting: true\n        })\n        const params = {\n            userId: this.state.username,\n            userPassword: this.state.password\n        }\n        this.props.actions.loginUser(params)\n            .catch(err => {\n                if (err.IsPasswordTemporaryOrExpired) {\n                    this.props.history.push('/change-password?emailaddress=' + params.userId + '&passwordistemporaryorexpired=true');\n                } else {\n                    const failureMessage = err.FailureMessage;\n                    const failureCode = failureMessage?.match(/Login failed \\(\\d+\\)/);\n                    this.setState({\n                        errorMessage: failureCode ? <span className=\"message-error\">Login failed. Invalid Email or Password. Please try again or <a style={{ display: \"inline-block\", padding: \"0px\", margin: \"0px\" }} href={`mailto:LIS@dlas.virginia.gov?subject=Login failed - invalid User ID or Password -- ${failureCode[0].match(/\\(\\d+\\)/)}`}>contact us</a> for assistance if the issue persists.</span> : <span className=\"message-error\">{failureMessage ?? JSON.stringify(err)}</span>,\n                        isSubmitting: false\n                    });\n                }\n            })\n    }\n\n    render() {\n        const {\n            isSubmitting,\n            errorMessage,\n            username,\n            password,\n            houseLogin\n        } = this.state;\n\n        const {\n            isSubmenu\n        } = this.props;\n\n        return (\n            <div className={!isSubmenu && \"inner-grid two multi-row\"}>\n                <div className=\"dlas-forms\">\n                    <form onSubmit={this.handleSubmit}>\n                        <div>\n                            <div className=\"single-row\">\n                                {isSubmenu\n                                    ? <span className=\"bold txt-blue\">Log In to LIS</span>\n                                    : <h3>Log In to LIS</h3>}\n                            </div>\n                            <div className=\"single-row\">\n                                <Fields.TextInput\n                                    id=\"userId\"\n                                    autoFocus={true}\n                                    type=\"text\"\n                                    placeholder=\"Email\"\n                                    value={username}\n                                    onChange={e => this.handleChange('username', e.target.value)}\n                                />\n                            </div>\n                            <div className=\"single-row\">\n                                {!houseLogin\n                                    ? <Fields.TextInput\n                                        id=\"userPassword\"\n                                        type=\"password\"\n                                        placeholder=\"Password\"\n                                        value={password}\n                                        onChange={e => this.handleChange('password', e.target.value)}\n                                        onFocus={() => this.checkForHouseDomain()}\n                                    />\n                                    : <HouseLoginButton username={username} />\n                                }\n                            </div>\n                            <div className=\"single-row\" style={!isSubmenu ? { marginTop: \"10px\" } : {}}>\n                                {!houseLogin && <button className=\"button secondary\" type=\"submit\" disabled={!username || !password || isSubmitting}>Login</button>}\n                            </div>\n                            {!houseLogin && errorMessage}\n                        </div>\n                    </form>\n                    {isSubmenu && <hr className=\"faded-line full-width\" />}\n                    <div className=\"flex-row\" style={!isSubmenu ? { marginTop: \"10px\" } : {}}>\n                        <Link style={{ textDecoration: \"none\" }} to=\"/forgot-password\">Forgot Password</Link>\n                        <Link style={{ textDecoration: \"none\" }} to=\"/register-account\">Register Account</Link>\n                    </div>\n                </div>\n                {!isSubmenu &&\n                    <div className=\"txt-blue\">\n                        <h3><b>Track up to 5 bills for free</b></h3>\n                        <p>Your new free account will allow you to track up to 5 bills in one Watchlist and set up notifications.</p>\n                        <p>Email notification triggers an email when bills are sponsored by a member of the General Assembly, referred to a House or Senate Committee or contain a specific key word(s), phrases, or Code section(s).</p>\n\n                        <h3><b>Lobbyist-in-a-Box Subscription</b></h3>\n                        <p>A subscription to Lobbyist-in-a-Box offers up to 100 Watchlists (previously called \"Profiles\") containing 300 bills each.</p>\n                        <p>The cost of this service is $400 per user for state agencies, and $600 per user for all other subscribers.  More user accounts can be added, please refer to the Subscription Information on the <a style={{ textDecoration: \"none\" }} target=\"_blank\" rel=\"noreferrer\" href=\"http://help.lis.virginia.gov/liab/index.asp\">LIS Learning Center</a> for additional options and fees, the 2-Step Registration and Payment process, and complete LIAB registration instructions.</p>\n                        <p><span className=\"bold\">Need additional information or assistance?</span> Please send an e-mail message to <a style={{ textDecoration: \"none\" }} href=\"mailto:lis@dlas.virginia.gov\">lis@dlas.virginia.gov</a>.</p>\n                        <p>For questions relating to LIAB Subscription payment procedures, please contact Virginia Interactive, LLC (VI) dba Tyler Virginia at <a style={{ textDecoration: \"none\" }} href=\"mailto:va-customerservice@tylertech.com\">va-customerservice@tylertech.com</a> or (804) 318-4133.</p>\n                    </div>\n                }\n            </div>\n        );\n\n    }\n};\n\nexport default connect(\n    (state) => {\n        const { login, nav } = state;\n        return {\n            login,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(LoginForm);\n\n\n\n\n\n","import React from \"react\";\nimport { useMsal } from \"@azure/msal-react\";\n\nconst graphToken = 'GRAPH_ID_TOKEN';\nconst idToken = 'LIS_ID_TOKEN';\nconst refreshToken = 'LIS_REFRESH_TOKEN';\nconst refreshTokenExpiration = 'LIS_REFRESH_TOKEN_EXPIRATION';\nconst claims = \"LIS_CLAIMS\";\n\nconst HouseLogoutButton = (props) => {\n    const { instance } = useMsal();\n\n    const handleLogout = (logoutType) => {\n        if (logoutType === \"redirect\") {\n            localStorage.removeItem(idToken);\n            localStorage.removeItem(refreshToken);\n            localStorage.removeItem(refreshTokenExpiration);\n            localStorage.removeItem(claims);\n            localStorage.removeItem(graphToken);\n            instance.logoutRedirect()\n                .then(() => {\n                    props.logout();\n                })\n        }\n    }\n\n    return (\n        <button type=\"button\" className=\"button profile-action danger\" onClick={() => handleLogout(\"redirect\")}>Logout</button>\n    );\n}\n\nexport default HouseLogoutButton","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport HouseLogoutButton from './lis-house-logout-button';\n\nconst Links = (props) => {\n    let unsortedLinks = [];\n    props.canAccessMemberMgmt &&\n        unsortedLinks.push({\n            route: \"/member-management\", label: \"Member Management\"\n        });\n    props.canAccessSessionMgmt &&\n        unsortedLinks.push({\n            route: \"/session-management\", label: \"Session Management\"\n        });\n    props.canAccessCommitteeMgmt &&\n        unsortedLinks.push({\n            route: \"/committee-management\", label: \"Committee Management\"\n        });\n    props.canAccessMinutesMgmt &&\n        unsortedLinks.push({\n            route: \"/minutes-management\", label: \"Minutes Management\"\n        });\n    props.canAccessDocketMgmt &&\n        unsortedLinks.push({\n            route: \"/docket-management\", label: \"Docket Management\"\n        });\n    props.canAccessBillMgmt &&\n        unsortedLinks.push({\n            route: \"/bill-management\", label: \"Bill Management\"\n        });\n    props.canAccessVersionMgmt &&\n        unsortedLinks.push({\n            route: \"/version-management\", label: \"Version Management\"\n        });\n    props.canAccessAmendmentMgmt &&\n        unsortedLinks.push({\n            route: \"/amendment-management\", label: \"Amendment Management\"\n        });\n    props.canAccessCommMgmt &&\n        unsortedLinks.push({\n            route: \"/communications-management\", label: \"Communications Management\"\n        });\n    props.canAccessCalendarMgmt &&\n        unsortedLinks.push({\n            route: \"/calendar-management\", label: \"Calendar Management\"\n        });\n    props.canAccessConfigurationsMgmt &&\n        unsortedLinks.push({\n            route: \"/configurations-management\", label: \"Configurations Management\"\n        });\n    props.canAccessJournalMgmt &&\n        unsortedLinks.push({\n            route: \"/journal-management\", label: \"Journal Management\"\n        });\n    props.canAccessVoteMgmt &&\n        unsortedLinks.push({\n            route: \"/vote-management\", label: \"Vote Management\"\n        });\n    props.canAccessPrintMgmt &&\n        unsortedLinks.push({\n            route: \"/print-management\", label: \"Print Management\"\n        });\n    props.canAccessMeetingsMgmt &&\n        unsortedLinks.push({\n            route: \"/schedule\", label: \"Meetings Management\"\n        });\n    props.canAccessPartnerMgmt &&\n        unsortedLinks.push({\n            route: \"/partner-management\", label: \"Partner Management\"\n        });\n    props.canAccessUserMgmt &&\n        unsortedLinks.push({\n            route: \"/user-management\", label: \"User Management\"\n        });\n    props.canAccessBds &&\n        unsortedLinks.push({\n            route: window.env?.APP_ENV === \"Production\" ? \"http://leg5.state.va.us/bd/frmBDSlogin.aspx\" : (\"http://test-bds.dlas.virginia.gov/default.aspx?srv=6&ses=\" + props.selectedSession.SessionCode.substr(2, 5) + \"&usr=D\"), label: \"Bill Drafting System (BDS)\", outside: true\n        });\n\n    return (\n        <div>\n            {unsortedLinks.sort((a, b) => a.label.localeCompare(b.label)).map((link, idx) => {\n                return !link.outside ? <li key={idx}><Link to={link.route}>{link.label}</Link></li> : <li key={idx}><a href={link.route}>{link.label}</a></li>\n            })\n            }\n            {\n                props.canAccessReportMgmt &&\n                <li><Link to=\"/report-management\">Rule Reports</Link></li>\n            }\n            {\n                props.canAccessSenateLinks &&\n                <React.Fragment>\n                    <li><a href=\"http://apps.dlas.virginia.gov/newamendments/ViewAmendmentsCommittee.aspx?hou=S\" target=\"_blank\" rel=\"noopener noreferrer\">Senate Committee Amendments</a></li>\n                    <li><a href=\"https://apps.dlas.virginia.gov/ComSubNew/Default.aspx\" target=\"_blank\" rel=\"noopener noreferrer\">Senate Committee Substitutes</a></li>\n                    <li><a href=\"https://apps.dlas.virginia.gov/newamendments/frmFloorAmendments.aspx?hou=S\" target=\"_blank\" rel=\"noopener noreferrer\">Senate Floor Amendments</a></li>\n                    <li><a href=\"https://apps.dlas.virginia.gov/newamendments/frmFloorSubstitutes.aspx?hou=S\" target=\"_blank\" rel=\"noopener noreferrer\">Senate Floor Substitutes</a></li>\n                    <li><a href=\"https://apps.dlas.virginia.gov/comsubnew/frmCommitteeSummary.aspx\" target=\"_blank\" rel=\"noopener noreferrer\">Senate Committee Vote Summary</a></li>\n                    <li><a href=\"http://leg4.state.va.us/dockets/frmLogin.aspx\" target=\"_blank\" rel=\"noopener noreferrer\">Senate Patron Notification System</a></li>\n                    <li><a href=\"https://apps.senate.virginia.gov/calendar/comListVoting.php\" target='_blank'>Committee Room Docket Load</a></li>                    \n                    <li><a href=\"https://apps.dlas.virginia.gov/comsubnew/frmLogin.aspx\" target='_blank'>Committee Vote Push</a></li>                            \n                </React.Fragment>\n            }\n            {\n                props.canAccessPatronStatusReport &&\n                <li><a href=\"http://efile.dlas.virginia.gov/frmMemberBD.aspx\" target=\"_blank\" rel=\"noopener noreferrer\">Patron Status Report</a></li>\n            }\n            {\n                props.isLoggedIn &&\n                <li><Link to=\"/watchlists\">{props.canAccessWatchlists ? \"My Watchlists\" : \"My Watchlist\"}</Link></li>\n            }\n        </div>\n    )\n}\n\nclass UserProfile extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            tabIndexNum: '-1',\n        }\n\n        this.targetFocus = React.createRef();\n    }\n\n    handleLogout(props) {\n        this.props.actions.logoutUser();\n        if (this.props.login.slideout) {\n            this.props.login.slideoutToggle();\n        }\n    }\n\n    render() {\n        const {\n            isOpen,\n            isAriaHidden,\n            isAriaExpanded,\n            isMenuVisible,\n            slideout,\n            permissions\n        } = this.props;\n\n        const {\n            tabIndexNum\n        } = this.state;\n\n        if (isOpen) {\n            this.targetFocus.current.focus();\n        }\n\n        return (\n            <div>\n                {!slideout\n                    ?\n                    <div>\n                        <p className=\"welcome-txt\">Hi, {this.props.login.userProfile.name}</p>\n                        <ul>\n                            <Links\n                                canAccessMemberMgmt={Boolean(permissions.find(p => p.canAccessMemberMgmt))}\n                                canAccessSessionMgmt={Boolean(permissions.find(p => p.canAccessSessionMgmt))}\n                                canAccessCommitteeMgmt={Boolean(permissions.find(p => p.canAccessCommitteeMgmt))}\n                                canAccessMinutesMgmt={Boolean(permissions.find(p => p.canAccessMinutesMgmt))}\n                                canAccessDocketMgmt={Boolean(permissions.find(p => p.canAccessDocketMgmt))}\n                                canAccessVersionMgmt={Boolean(permissions.find(p => p.canAccessVersionMgmt))}\n                                canAccessAmendmentMgmt={Boolean(permissions.find(p => p.canAccessAmendmentMgmt))}\n                                canAccessBillMgmt={Boolean(permissions.find(p => p.canAccessBillMgmt))}\n                                canAccessCommMgmt={Boolean(permissions.find(p => p.canAccessCommMgmt))}\n                                canAccessCalendarMgmt={Boolean(permissions.find(p => p.canAccessCalendarMgmt))}\n                                canAccessConfigurationsMgmt={Boolean(permissions.find(p => p.canAccessConfigurationsMgmt))}\n                                canAccessJournalMgmt={Boolean(permissions.find(p => p.canAccessJournalMgmt))}\n                                canAccessVoteMgmt={Boolean(permissions.find(p => p.canAccessVoteMgmt))}\n                                canAccessPrintMgmt={Boolean(permissions.find(p => p.canAccessPrintMgmt))}\n                                canAccessReportMgmt={Boolean(permissions.find(p => p.canAccessReportMgmt))}\n                                canAccessMeetingsMgmt={Boolean(permissions.find(p => p.canAccessMeetingsMgmt))}\n                                canAccessWatchlists={Boolean(permissions.find(p => p.canAccessWatchlists))}\n                                canAccessPartnerMgmt={Boolean(permissions.find(p => p.canAccessPartnerMgmt))}\n                                canAccessUserMgmt={Boolean(permissions.find(p => p.canAccessUserMgmt))}\n                                canAccessSenateLinks={Boolean(permissions.find(p => p.canAccessSenateLinks))}\n                                canAccessPatronStatusReport={Boolean(permissions.find(p => p.canAccessPatronStatusReport))}\n                                canAccessBds={Boolean(permissions.find(p => p.canAccessBds))}\n                                isLoggedIn={this.props.login.isAuthenticated}\n                                bdsRole={this.props.login.bdsRole}\n                                selectedSession={this.props.session.selectedSession}\n                            />\n                        </ul>\n                        <p className=\"profile-action-container\">\n                            <Link to=\"/profile\" className=\"button profile-action informational\" style={{ margin: '0px', padding: '7px 20px' }}>Profile</Link>\n                            {this.props.login.userProfile.email.split(\"@\")[1] === \"house.virginia.gov\"\n                                ? <HouseLogoutButton\n                                    logout={this.props.actions.logoutUser}\n                                />\n                                : <button className=\"button profile-action danger\" onClick={this.handleLogout.bind(this)}>Logout</button>}\n                        </p>\n                    </div>\n                    :\n                    <nav id=\"slideout-menu\" tabIndex={tabIndexNum} aria-expanded={isAriaExpanded} aria-hidden={isAriaHidden}>\n                        <div className={isMenuVisible ? 'slideout-inner show' : 'slideout-inner'}>\n                            <ul>\n                                <li className=\"menu-heading\">LIS</li>\n                                <li className='small-li'><a ref={this.targetFocus} href=\"http://virginiageneralassembly.gov/\">VIRGINIA GENERAL ASSEMBLY</a></li>\n                                <li className='small-li'><a href=\"http://help.lis.virginia.gov/\" target=\"_blank\" rel=\"noreferrer\">LIS LEARNING CENTER</a></li>\n                                <li className='small-li'><Link to=\"/home\">LIS HOME</Link></li>\n                                {\n                                    this.props.login.isAuthenticated &&\n                                    <li className='small-li'><Link to=\"/profile\">PROFILE</Link></li>\n                                }\n                                {this.props.login.userProfile.name === \"\"\n                                    ?\n                                    <React.Fragment>\n                                        <li className='small-li'><Link to=\"/register-account\">REGISTER ACCOUNT</Link></li>\n                                        <li className='small-li'><Link to=\"/login\">LOGIN</Link></li>\n                                    </React.Fragment>\n                                    : this.props.login.userProfile.email.split(\"@\")[1] === \"house.virginia.gov\"\n                                        ? <HouseLogoutButton />\n                                        : <li className='small-li' onClick={this.handleLogout.bind(this)}><a className=\"slideout-nav-logout\">LOGOUT</a></li>\n                                }\n                                <li><Link to={`/`}>Session Information</Link></li>\n                                <li><Link to=\"/bill-search\">Bills & Resolutions</Link></li>\n                                <li><a target=\"_blank\" href={\"https://budget.lis.virginia.gov/\"}>State Budget</a></li>\n                                <li><a target=\"_blank\" href=\"https://law.lis.virginia.gov/\">Virginia Law</a></li>\n                                <li><a target=\"_blank\" href=\"https://rga.lis.virginia.gov/\">Reports to the General Assembly</a></li>\n                                <Links\n                                    canAccessMemberMgmt={Boolean(permissions.find(p => p.canAccessMemberMgmt))}\n                                    canAccessSessionMgmt={Boolean(permissions.find(p => p.canAccessSessionMgmt))}\n                                    canAccessCommitteeMgmt={Boolean(permissions.find(p => p.canAccessCommitteeMgmt))}\n                                    canAccessMinutesMgmt={Boolean(permissions.find(p => p.canAccessMinutesMgmt))}\n                                    canAccessDocketMgmt={Boolean(permissions.find(p => p.canAccessDocketMgmt))}\n                                    canAccessBillMgmt={Boolean(permissions.find(p => p.canAccessBillMgmt))}\n                                    canAccessVersionMgmt={Boolean(permissions.find(p => p.canAccessVersionMgmt))}\n                                    canAccessAmendmentMgmt={Boolean(permissions.find(p => p.canAccessAmendmentMgmt))}\n                                    canAccessCommMgmt={Boolean(permissions.find(p => p.canAccessCommMgmt))}\n                                    canAccessCalendarMgmt={Boolean(permissions.find(p => p.canAccessCalendarMgmt))}\n                                    canAccessConfigurationsMgmt={Boolean(permissions.find(p => p.canAccessConfigurationsMgmt))}\n                                    canAccessJournalMgmt={Boolean(permissions.find(p => p.canAccessJournalMgmt))}\n                                    canAccessVoteMgmt={Boolean(permissions.find(p => p.canAccessVoteMgmt))}\n                                    canAccessPrintMgmt={Boolean(permissions.find(p => p.canAccessPrintMgmt))}\n                                    canAccessReportMgmt={Boolean(permissions.find(p => p.canAccessReportMgmt))}\n                                    canAccessMeetingsMgmt={Boolean(permissions.find(p => p.canAccessMeetingsMgmt))}\n                                    canAccessWatchlists={Boolean(permissions.find(p => p.canAccessWatchlists))}\n                                    canAccessPartnerMgmt={Boolean(permissions.find(p => p.canAccessPartnerMgmt))}\n                                    canAccessUserMgmt={Boolean(permissions.find(p => p.canAccessUserMgmt))}\n                                    canAccessSenateLinks={Boolean(permissions.find(p => p.canAccessSenateLinks))}\n                                    canAccessPatronStatusReport={Boolean(permissions.find(p => p.canAccessPatronStatusReport))}\n                                    canAccessBds={Boolean(permissions.find(p => p.canAccessBds))}\n                                    isLoggedIn={this.props.login.isAuthenticated}\n                                    selectedSession={this.props.session.selectedSession}\n                                />\n                                <li></li>\n                            </ul>\n                        </div>\n                    </nav>\n                }\n            </div>\n        )\n    }\n};\n\nexport default connect(\n    (state) => {\n        const { login, session } = state;\n        return {\n            session,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators), dispatch)\n        }\n    }\n)(UserProfile)","import React from 'react';\nimport Login from '../../lis-login/components/lis-login-form';\nimport UserProfile from './lis-profile-component';\n\n\nclass Submenu extends React.Component {\n\n    render() {\n        const {\n            isAuth\n        } = this.props;\n\n        if (!isAuth) {\n            return (\n                <ul className=\"nav-submenu\">\n                    <Login\n                        history={this.props.history}\n                        isSubmenu={true}\n                    />\n                </ul>\n            )\n        }\n        else {\n            return (\n                <ul className=\"nav-submenu\">\n                    <UserProfile permissions={this.props.permissions} />\n                </ul>\n            )\n        }\n    }\n}\n\nexport default Submenu;","import React from 'react';\nimport { withRouter } from 'react-router';\nimport { connect } from 'react-redux';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { bindActionCreators } from 'redux';\nimport queryString from 'query-string';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\n\nclass SearchInputComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            search: ''\n        };\n        this.handleInputChange = this.handleInputChange.bind(this);\n        this.handleSubmit = this.handleSubmit.bind(this);\n    }\n\n    handleInputChange(event) {\n        this.setState({ search: event.target.value });\n    }\n\n    handleSubmit(event) {\n        event.preventDefault();\n        event.stopPropagation();\n\n        //If nothing is in the search box then don't search\n        if (this.state.search.replace(/\\s/g, '') === '') {\n            return;\n        }\n\n        let session, getSessionPromise;\n        if (this.props.location.pathname.includes(\"bill-details\")) {\n            session = this.props.session.sessionList.find(x => x.SessionCode === this.props.location.pathname.split(\"/\")[2]).SessionID;\n        } else if (this.props.session.sessionList && this.props.session.sessionList.length) {\n            session = this.props.session.sessionList.find(session => session.SessionCode === this.props.nav.session).SessionID;\n        } else {\n            getSessionPromise = this.props.actions.getSessionByCode(this.props.nav.session)\n                .then(() => {\n                    session = this.props.session.selectedSession.SessionID;\n                })\n        }\n\n        Promise.all([getSessionPromise]).finally(() => {\n            // Check to see if the search term contains a bill number\n            // This regex means 'match any of the bill prefixes even if it is seperated by non alpha-numberic characters. Only match if it is followed by a number. Also, include the number in the match'\n            // A greater than sign (>) or less than sign (<) is a symbol used to search multiple bills. It also is part of a valid bill number\n            const regexResult = this.state.search.match(/[HS][^0-9A-Z]*[BJR][^0-9A-Z]*(?=[0-9])[0-9]+[<>-]?/gi);\n            let legNumbers = '';\n            let searchTerms = '';\n            if (regexResult) {\n                //bill number(s) found\n                legNumbers = '';\n                let foundRange = false;\n                let searchWithRemovedBillNumbers = this.state.search;\n                regexResult.forEach((result, resultIndex) => {\n                    foundRange = result.match(/-/g);\n                    //If it has a dash then it is a range of bills and should not get a comma after it\n                    if (foundRange !== null) {\n                        //Remove all the characters that are not a letter, number, or dash\n                        legNumbers += result.replace(/[^A-Za-z0-9\\-]+/g, '');\n                    } else {\n                        //Remove all the characters that are not a letter, number, greater than sign, or less than sign\n                        legNumbers += result.replace(/[^A-Za-z0-9<>]+/g, '');\n                        //Add a comma between the legislation numbers so the api can search for multiple legislation numbers\n                        if (regexResult.length !== resultIndex + 1) {\n                            legNumbers += ','\n                        }\n                    }\n                    // Remove the bill numbers from the search string. If there is anything left then add them as search terms\n                    searchWithRemovedBillNumbers = searchWithRemovedBillNumbers.replace(result, '')\n                });\n                searchTerms = searchWithRemovedBillNumbers;\n                // Remove any commas since those were probably added by the user to seperate the bill numbers\n                searchTerms = searchTerms.replace(',', '');\n\n            } else {\n                searchTerms = this.state.search;\n            }\n\n            if (/[A-Za-z0-9]+/g.test(searchTerms)) {\n                searchTerms = searchTerms.trim();\n            } else {\n                // Don't add search terms if there are no letters or numbers in it\n                searchTerms = '';\n            }\n            const param = {\n                selectedBillNumbers: legNumbers,\n                selectedKeywords: searchTerms,\n                selectedSession: session\n            }\n            const link = window.btoa(JSON.stringify(param));\n            let url = '/bill-search?q=' + link;\n            if (this.props.location.pathname === '/bill-search') {\n                //if they have selected a watchlist, keep the watchlist set in the url\n                if (queryString.parse(this.props.location.search).collection) url += \"&collection=\" + queryString.parse(this.props.location.search).collection;\n                //if they are re-executing the same search (i.e. same parameters) as they're currently viewing (essentially a refresh), just add a rnd so the url changes (needed for search to execute)\n                const parsed = queryString.parse(this.props.location.search, { decode: false });\n                if (parsed.q && parsed.q === link) {\n                    url += '&rnd=' + new Date().getTime();\n                }\n            }\n            this.props.history.push(url);\n        });\n    }\n\n    render() {\n        return (\n            <div className=\"global-search-box\">\n                <form>\n                    <label htmlFor=\"quick-search\" className=\"screen-reader-only\">Search for keyword or bill number</label>\n                    <input type=\"text\" id=\"quick-search\" className=\"quick-search\" onChange={this.handleInputChange} value={this.state.search} placeholder=\"Search for keyword or bill number\" />\n                    <input type=\"submit\" aria-label=\"search\" value=\"GO\" onClick={this.handleSubmit} className=\"input-searchbtn\" />\n                </form>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, session } = state;\n        return {\n            nav,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(withRouter(SearchInputComponent))","import React from 'react';\nimport { Link, withRouter } from 'react-router-dom';\nimport { CSSTransitionGroup } from 'react-transition-group';\nimport Submenu from './lis-submenu-component';\nimport SearchInput from './lis-global-search-input-component';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\n\nclass NavMenu extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showLogin: false,\n            pathName: ''\n        };\n        this.handleClick = this.handleClick.bind(this);\n        this.handleClosingLoginOnOffClick = this.handleClosingLoginOnOffClick.bind(this);\n        this.mousedownListener = this.mousedownListener.bind(this);\n    }\n\n    componentDidMount() {\n        const pathName = this.props.location.pathname;\n        this.setState({ pathName: pathName })\n\n        document.body.addEventListener('mousedown', this.mousedownListener);\n    }\n\n    componentDidUpdate(prevProps) {\n        if (this.props.location !== prevProps.location) {\n            this.setState(prevState => ({\n                showLogin: false,\n                pathName: this.props.location.pathname\n            }));\n        }\n        if (this.props.location.pathname !== prevProps.location.pathname && this.props.isOpen) {\n            this.props.slideoutToggle();\n        }\n    }\n\n    componentWillUnmount() {\n        document.body.removeEventListener('mousedown', this.mousedownListener)\n    }\n\n    mousedownListener(e) {\n        if (this.state.showLogin) {\n            const loginBox = document.getElementsByClassName(\"nav-submenu\")[0];\n            const profileLink = document.getElementsByClassName(\"profile-link\")[0];\n            const loginLink = document.getElementsByClassName(\"login-link\")[0];\n            if ((!loginBox || (loginBox !== e.target && !loginBox.contains(e.target))) &&\n                (!loginLink || (loginLink !== e.target && !loginLink.contains(e.target))) &&\n                (!profileLink || (profileLink !== e.target && !profileLink.contains(e.target)))) {\n                this.handleClosingLoginOnOffClick();\n            }\n        }\n    }\n\n    handleClosingLoginOnOffClick() {\n        if (this.state.showLogin) {\n            this.setState({\n                showLogin: false\n            });\n        }\n    }\n\n    handleClick() {\n        this.setState(prevState => ({\n            showLogin: !prevState.showLogin\n        }));\n    }\n\n    slideoutToggle() {\n        this.props.slideoutToggle();\n    }\n\n    render() {\n        const { isAuthenticated, userProfile } = this.props.login;\n        // Make dynamic button based on user's auth state\n        let button;\n        if (!isAuthenticated) {\n            button = <LoginButton onClick={this.handleClick} />;\n        } else {\n            button = <ProfileButton onClick={this.handleClick} name={userProfile.initials} />\n        }\n        // Make dynamic header based on URL path\n        let header;\n        let isBillPath = this.state.pathName.includes('/bill-search');\n        if (isBillPath) {\n            header = <h1>Bills &amp; Resolutions </h1>\n        } else {\n            header = <h1>Legislative Information System </h1>\n        }\n        // Assemble session-aware budget url\n        let budgetUrl = \"https://budget.lis.virginia.gov/\";\n        if (this.props.session) {\n           // budgetUrl += `default/${this.props.session.SessionCode.substr(0, 4)}/${this.props.session.SessionCode.substr(4)}`\n        }\n\n        return (\n            <nav>\n                <div className=\"lis-links-content full\">\n                    <ul>\n                        <li><a href=\"http://virginiageneralassembly.gov/\">Virginia General Assembly</a> /</li>\n                        <li><a href=\"http://help.lis.virginia.gov/\" target=\"_blank\" rel=\"noreferrer\">LIS Learning Center</a> /</li>\n                        <li><Link to=\"/privacy\" target=\"_blank\" rel=\"noreferrer\">Privacy Policy</Link> /</li>\n                        <li>\n                            <Link to=\"/home\">LIS Home</Link> /\n                        </li>\n                        {!isAuthenticated && <li>\n                            <Link to=\"/register-account\">Register Account</Link> /\n                        </li>}\n                        <li onClick={e => e.stopPropagation()} className=\"parent-link\">\n                            {button}\n                            <div className=\"submenu-container\">\n                                <CSSTransitionGroup\n                                    transitionName=\"slide\"\n                                    transitionEnterTimeout={300}\n                                    transitionLeaveTimeout={300}\n                                >\n                                    {this.state.showLogin && <Submenu history={this.props.history} isAuth={isAuthenticated} permissions={this.props.permissions} />}\n                                </CSSTransitionGroup>\n                            </div>\n                        </li>\n                    </ul>\n                </div>\n                <div className=\"grid-wrapper one-and-three halves\">\n                    <div className=\"menu-title\">\n                        <Link to=\"/home\">LIS</Link>\n                    </div>\n                    <div className=\"menu-links\">\n                        <div className=\"menu-btn\">\n                            <button type=\"button\" onClick={this.slideoutToggle.bind(this)} href=\"#menu\" tabIndex=\"0\" aria-label=\"Menu\">Menu</button>\n                        </div>\n                        <ul>\n                            <li>\n                                <Link className=\"txt-blue\" to={`/`}>Session Information</Link>\n                            </li>\n                            <li>\n                                <Link className=\"txt-dark-blue\" to=\"/bill-search\">Bills & Resolutions</Link>\n                            </li>\n                            <li>\n                                <a className=\"txt-green\" target=\"_blank\" href={`${budgetUrl}`}>State Budget</a>\n                            </li>\n                            <li>\n                                <a className=\"txt-light-green\" target=\"_blank\" href=\"https://law.lis.virginia.gov/\">Virginia Law</a>\n                            </li>\n                            <li>\n                                <a className=\"txt-orange\" target=\"_blank\" href=\"https://rga.lis.virginia.gov/\">Reports to the General Assembly</a>\n                            </li>\n                        </ul>\n                    </div>\n                </div>\n                <div id=\"site-title-container\" className={isBillPath ? 'bill-theme' : null}>\n                    <div className=\"site-title-content grid-wrapper three-and-two\">\n                        {header}\n                        <SearchInput />\n                    </div>\n                </div>\n            </nav>\n        )\n    }\n}\n\nfunction LoginButton(props) {\n    return (\n        <a className=\"login-link\" onClick={props.onClick}>\n            Login\n        </a>\n    );\n}\n\nfunction ProfileButton(props) {\n    return (\n        <a className=\"profile-link\" onClick={props.onClick}>\n            {props.name}\n        </a>\n    );\n}\n\nconst Menu = connect(\n    (state) => {\n        const { login, nav } = state;\n        return {\n            login,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, authActionCreators), dispatch)\n        }\n    }\n)(NavMenu)\n\nexport default withRouter(Menu);","import React from 'react';\nimport Select from 'react-select';\nimport { Link } from 'react-router-dom';\nimport { withRouter } from 'react-router';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\nconst customStyles = {\n    option: (base, state) => ({\n        ...base,\n        fontSize: '14px',\n        fontWeight: state.data.IsActive ? 'bold' : 'normal'\n    }),\n    control: (base) => ({\n        ...base,\n        fontSize: '14px',\n        background: '#f1f1f1',\n        border: '1px solid #d8d8d8',\n        borderRadius: '0 0 5px 5px'\n    }),\n    menu: (base) => ({\n        ...base,\n        width: '245px',\n        marginTop: '1px',\n\n    }),\n    menuList: (base) => ({\n        ...base,\n        marginTop: '1px'\n    }),\n    indicatorSeparator: (base) => ({\n        ...base,\n        display: \"none\"\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    }\n}\n\nclass SessionSelector extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            data: [],\n            selectedSession: {},\n            sessionListMessage: '',\n            sessionOptions: []\n        };\n\n        this.getSessions = this.getSessions.bind(this);\n    }\n\n    componentDidMount() {\n        this.getSessions();\n    }\n\n    getSessions() {\n        this.props.actions.getSessionList().then(() => {\n            if (this.props.session.sessionList.length > 0) {\n                // FORMAT DATA FOR DROPDOWN\n                let sessionList = [...this.props.session.sessionList]\n                sessionList.forEach(session => {\n                    session.value = session.SessionID;\n                    session.label = session.SessionYear + ' ' + session.DisplayName + (session.IsActive ? ' (Active)' : '');\n                    if (session.SessionCode === this.props.nav.session) {\n                        this.setState({\n                            selectedSession: session\n                        });\n                    } else if (session.IsDefault && !this.props.nav.session) {\n                        this.props.actions.changeSession(session.SessionCode);\n                        this.setState({\n                            selectedSession: session\n                        });\n                    }\n                });\n                sessionList = sessionList.reverse();\n                this.setState({\n                    sessionOptions: sessionList\n                });\n            } else {\n                this.setState({\n                    sessionListMessage: this.props.session.sessionListMessage\n                });\n            }\n        });\n    }\n\n    handleChange = value => {\n        if (window.env && window.env.HISTORICAL_DATA_REDIRECT && value && !value.IsDefault && value.LegacySessionID && value.SessionCode != \"20242\" && !this.props.login.userClaims.roles.find(x => x === \"LegacyDataReader\")) {\n            this.setState({\n                historicalSessionRedirect: (redirect) => {\n                    if (redirect) {\n                        let a = document.createElement('a');\n                        a.target = '_blank';\n                        a.href = `https://legacylis.virginia.gov/cgi-bin/legp604.exe?ses=${value.SessionCode.substring(2)}&typ=lnk&val=${value.LegacySessionID}`;\n                        document.body.appendChild(a);\n                        a.click();\n                        document.body.removeChild(a);\n                    }\n                    this.setState({ historicalSessionRedirect: false })\n                }\n            })\n            return;\n        }\n        if (value && value.SessionCode) {\n            this.setState({\n                selectedSession: this.state.sessionOptions.find(s => s.SessionCode === value.SessionCode)\n            });\n            this.props.actions.changeSession(value.SessionCode);\n        }\n    }\n\n    componentDidUpdate(prevProps, prevState) {\n        if (prevProps.nav.session !== this.props.nav.session || (prevState.sessionOptions.length !== this.state.sessionOptions.length && this.state.selectedSession?.SessionCode !== this.props.nav.session)) {\n            const selectedSession = this.state.sessionOptions.find(option => option.SessionCode?.toString() === this.props.nav.session?.toString())\n            if (selectedSession) {\n                this.setState({\n                    selectedSession: selectedSession\n                })\n            }\n        }\n        if (prevProps.nav.reloadSessionSelector !== this.props.nav.reloadSessionSelector && this.props.nav.reloadSessionSelector === true) {\n            this.getSessions();\n            this.props.actions.reloadSessionSelector(false);\n        }\n\n        if (this.props.overrideSession != \"\") {\n            this.handleChange(this.props.overrideSession)\n        }\n    }\n\n    getSelectedSessionLabel(selectedSession) {\n        let newSession = { ...selectedSession } //don't modify existing session values stored at state level & used in dropdown\n        if (newSession && newSession.label) {\n            newSession.label = newSession.label.replace(' (Active)', '')\n        }\n        return newSession;\n    }\n\n    render() {\n        const { sessionOptions, selectedSession } = this.state;\n        const hide = this.props.nav.hideSessionSelectorPaths.find(path => new RegExp(path, 'g').test(this.props.location.pathname))\n\n        return (\n            <div className=\"full\" id=\"session-select-container\">\n                {this.state.historicalSessionRedirect &&\n                    <div className=\"schedule-modal\">\n                        <div className=\"schedule-modal-content fit-content center-content\">\n                            <p>For historical data, please use <b>Legacy LIS</b>, available at <b><a href=\"https://legacylis.virginia.gov\" target=\"_blank\" rel=\"noreferrer\">https://legacylis.virginia.gov</a></b>.</p>\n                            <p>Click 'Go' to be taken to Legacy LIS, or 'Close' to remain here.</p>\n                            <div className=\"inline-list\">\n                                <button className=\"button primary float-right\" onClick={() => this.state.historicalSessionRedirect(true)}>Go</button>\n                                <button className=\"button secondary float-right\" onClick={() => this.state.historicalSessionRedirect(false)}>Close</button>\n                            </div>\n                            <br />\n                        </div>\n                    </div>\n\n                }\n                <div className={hide && this.props.location.pathname !== \"/profile\" ? \"session-select-tab hidden\" : \"session-select-tab\"}>\n                    <Select\n                        id=\"sessionSelector\"\n                        classNamePrefix=\"global-session-selector\"\n                        isSearchable={false}\n                        options={sessionOptions}\n                        maxMenuHeight={170}\n                        value={this.getSelectedSessionLabel(selectedSession)}\n                        onChange={this.handleChange}\n                        styles={customStyles}\n                    />\n                </div>\n                <div className=\"link-wrapper\">\n                    <Link to=\"/bill-search\">Advanced Search</Link>\n                </div>\n            </div>\n        )\n\n    }\n};\n\nexport default connect(\n    (state) => {\n        const { session, nav, login } = state;\n        return {\n            session,\n            nav,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(withRouter(SessionSelector))","import React from 'react';\nimport { checkToken } from '../../../services/request.service'\n\nclass Popup extends React.Component  {\n    constructor(props) {\n        super(props);\n        this.state = {\n        };\n        this.closePopup = this.closePopup.bind(this);\n        this.logOut = this.logOut.bind(this);\n    }\n\n    closePopup() {\n        checkToken()\n            .then(this.props.togglePopup());\n    }\n\n    logOut() {\n        this.props.logOut();\n        this.props.togglePopup();\n    }\n\n    componentDidMount() {\n        if (this.props.isIdle) {\n            this.timerHandle = setTimeout(() => {\n                this.props.logOut();\n                this.props.togglePopup();\n                this.timerHandle = 0\n            }, 60000 * 15);\n        }\n    }\n\n    componentWillUnmount = () => {\n        if (this.timerHandle) {\n            clearTimeout(this.timerHandle);\n            this.timerHandle = 0;\n        }\n    };\n\n    render() {\n        return (\n            <div className='popup'>\n                <div className='popup-inner'>\n                    <p>{this.props.text}</p>\n\n                        <div>\n                            <button className=\"button primary\" onClick={this.closePopup}>Yes</button>\n                            <button className=\"button secondary\" onClick={this.logOut}>No</button>\n                        </div>\n                    {/*this.props.deletionWarning &&\n                        <div>\n                        <button className=\"button primary\" onClick={this.props.togglePopup}>Continue</button>\n                            <button className=\"button secondary\" onClick={this.props.logOut}>Cancel</button>\n                        </div>\n                    */}\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default Popup;","import React from 'react';\n\nclass ToastContainer extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            toasts: this.props.toasts,\n            visible: false\n        }\n\n        this.dismiss = this.dismiss.bind(this);\n    }\n\n    componentDidUpdate(prevProps) {\n        if (prevProps.toasts !== this.props.toasts) {\n            this.setState({\n                visible: true,\n                dismissed: false\n            }, function () {\n                setTimeout(() => {\n                    this.setState({\n                        visible: false\n                    })\n                }, 3000)\n            })\n        }\n    }\n\n    dismiss() {\n        this.setState({\n            visible: false,\n            dismissed: true\n        })\n    }\n\n    render() {\n\n        const { toasts } = this.props\n        const visible = this.state.visible\n        return (\n            <div className={\"toast-container \" + (\n                visible\n                    ? this.props.toasts[0] && this.props.toasts[0].long\n                        ? \"show-long\"\n                        : 'show'\n                    : this.props.toasts[0] && this.props.toasts[0].long\n                        ? 'hide-long'\n                        : 'hide'\n            )}>\n                <Toast toasts={toasts} dismiss={this.dismiss} visible={visible} dismissed={this.state.dismissed} />\n            </div>\n        )\n    }\n}\nclass Toast extends React.Component {\n    render() {\n        const items = this.props.toasts.map((item, index) => {\n            return (\n                <div key={index} className={`toast ${item.type}${this.props.visible ? '' : ` hide${item.long ? '-long' : ''}`}${this.props.dismissed ? ' dismissed' : ''}`}>\n                    <div className='toast-inner'>\n                        <p>{item.message}</p>\n                        {item.long && <button className=\"icon cross\" onClick={() => this.props.dismiss()} style={{ margin: \"30px 0px 0px 15px\" }} />}\n                    </div>\n                </div>\n            );\n        })\n\n        return (<React.Fragment>{items}</React.Fragment>);\n    }\n}\n\nexport default ToastContainer;","import React from \"react\"\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { Link, withRouter } from 'react-router-dom';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\nclass IconLinks extends React.Component {\n    constructor(props) {\n        super(props);\n\n    }\n\n    render() {\n        const { selectedSession } = this.props;\n        let budgetUrl = \"https://budget.lis.virginia.gov/\";\n        if (selectedSession) {\n            //budgetUrl += `default/${selectedSession.SessionCode.substr(0, 4)}/${selectedSession.SessionCode.substr(4)}`\n        }\n\n        return (\n            <div className=\"landing home-icon-links\">\n                <div className=\"grid-wrapper four-icons\">\n                    <div className=\"landing legislation\">\n                        <Link className=\"info-link legislation\" to=\"/bill-search\"></Link>\n                        <Link to=\"/bill-search\">Bills & Resolutions</Link>\n                    </div>\n                    <div className=\"landing state-budget\">\n                        <a className=\"info-link state-budget\" href={`${budgetUrl}`}></a>\n                        <a href={`${budgetUrl}`}>State Budget</a>\n                    </div>\n                    <div className=\"landing virginia-law\">\n                        <a className=\"info-link virginia-law\" href={`https://law.lis.virginia.gov/`}></a>\n                        <a href={`https://law.lis.virginia.gov/`}>Virginia Law</a>\n                    </div>\n                    <div className=\"landing legislative-resources\">\n                        <a className=\"info-link legislative-resources\" href={`https://rga.lis.virginia.gov/`}></a>\n                        <a href={`https://rga.lis.virginia.gov/`}>Reports to the General Assembly</a>\n                    </div>\n                </div>\n            </div>\n        )\n    }\n}\n\nconst Links = connect(\n    (state) => {\n        const { nav } = state;\n        return {\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators), dispatch)\n        }\n    }\n)(IconLinks)\n\nexport default withRouter(Links)","import React from 'react';\nimport Menu from './lis-nav-component';\nimport SessionSelector from './lis-session-selector';\nimport Popup from './lis-popup-component';\nimport Profile from './lis-profile-component';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport ToastContainer from './lis-toast-component';\nimport IconLinks from './lis-icon-links-component';\n\nclass Layout extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            helpBanner: !localStorage.getItem(\"HELP_BANNER_DISMISSED\"),\n            showPopup: false,\n            popupMessage: '',\n            isIdle: false,\n            isAriaExpanded: false,\n            isAriaHidden: true,\n            isMenuVisible: false,\n            isOpen: false,\n            overrideSession: \"\"\n        };\n\n        this.dismissHelpBanner = this.dismissHelpBanner.bind(this);\n    }\n\n    componentDidUpdate(prevProps) {\n        if (!prevProps.isIdle && this.props.isIdle) {\n            this.setState({\n                showPopup: true\n            })\n        }\n\n        if (this.props.location.pathname === \"/home\" && prevProps.location.pathname !== \"/home\" && this.state.overrideSession === \"\") {\n            let session = this.props.session.sessionList.find(x => x.IsDefault);\n            if (session) {\n                this.props.actions.changeSession(session.SessionCode)\n                this.setState({ overrideSession: session })\n            }\n        } else if (this.state.overrideSession !== \"\") {\n            this.setState({\n                overrideSession: \"\"\n            })\n        }\n    }\n\n    logOutUser() {\n        this.props.actions.logoutUser();\n    }\n\n    togglePopup() {\n        this.setState(state => ({\n            showPopup: !state.showPopup\n        }));\n    }\n\n    slideoutToggle() {\n        this.setState(prevState => ({\n            isMenuVisible: !prevState.isMenuVisible,\n            isAriaHidden: !prevState.isAriaHidden,\n            isAriaExpanded: !prevState.isAriaExpanded,\n            isOpen: !prevState.isOpen\n        }));\n    }\n\n    dismissHelpBanner() {\n        localStorage.setItem(\"HELP_BANNER_DISMISSED\", true);\n        this.setState({ helpBanner: false })\n    }\n\n    render() {\n        const {\n            popupMessage\n        } = this.props;\n        const { isOpen, isAriaHidden, isAriaExpanded, isMenuVisible, helpBanner } = this.state;\n\n        return (\n            <div className={isOpen ? 'open-state' : null}>\n                {isOpen &&\n                    <div className=\"slideout-overlay\" onClick={this.slideoutToggle.bind(this)} />\n                }\n                {window.env?.APP_ENV?.toLowerCase() !== \"production\" && window.env?.API_SERVER?.toLowerCase() !== \"https://lis.virginia.gov\" && <div className=\"alert alert-warning mb-0\"><b>This is a non-production environment</b>. This environment is NOT for public access. You may access LIS at <a href=\"https://lis.virginia.gov\">LIS.virginia.gov</a>.</div>}\n                {this.props.login.userClaims?.claims?.find(c => c.RoleName?.toLowerCase() === \"admin\") && (window.env?.APP_ENV?.toLowerCase() === \"production\" || window.env?.API_SERVER?.toLowerCase() === \"https://lis.virginia.gov\") && <div className=\"alert alert-danger mb-0\"><b>PLEASE BEWARE</b>: YOU ARE IN THE PRODUCTION LIS ENVIRONMENT AND ANY ACTIONS TAKEN WILL BE SUBMITTED IN THE PRODUCTION DATABASE.</div>}\n                {helpBanner && <div className=\"help-banner\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\" onClick={this.dismissHelpBanner}><span aria-hidden=\"true\">×</span></button>Get acquainted with our new Virginia State Legislative Information System! <a href=\"https://help.lis.virginia.gov/start/index.asp\" target=\"_blank\" rel=\"noreferrer\">LIS Learning Center</a></div>}\n                <Menu slideoutToggle={this.slideoutToggle.bind(this)} isOpen={this.state.isOpen} session={this.props.session.sessionList.find(x => x.SessionCode === this.props.nav.session)} permissions={this.props.permissions} />\n                <Profile\n                    isMenuVisible={isMenuVisible}\n                    isAriaExpanded={isAriaExpanded}\n                    isAriaHidden={isAriaHidden}\n                    slideoutToggle={this.slideoutToggle.bind(this)}\n                    isOpen={isOpen}\n                    slideout={true}\n                    selectedSession={this.props.selectedSession}\n                    permissions={this.props.permissions}\n                />\n                <SessionSelector overrideSession={this.state.overrideSession} />\n                <ToastContainer toasts={this.props.nav.toasts} />\n                <main>\n                    <section>\n                        <div className=\"full\">\n                            <div className=\"content-wrapper\">\n                                {this.props.children}\n                            </div>\n                        </div>\n                    </section>\n                </main>\n                {this.state.showPopup ?\n                    <Popup\n                        text={popupMessage}\n                        showPopup={this.state.showPopup}\n                        togglePopup={this.togglePopup.bind(this)}\n                        logOut={this.logOutUser.bind(this)}\n                        isIdle={this.props.isIdle}\n                    />\n                    : null\n                }\n                {this.props.location.pathname != \"/\" && !this.props.location.pathname.includes('/home')\n                    ?\n                    null\n                    :\n                    <IconLinks selectedSession={this.props.session.selectedSession} />\n                }\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { login, nav, session } = state;\n        return {\n            login,\n            nav,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, navActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(Layout)","import { partnerRequest, publicRequest } from '../services/request.service';\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\nconst graphToken = 'GRAPH_ID_TOKEN';\n\nconst contactReferencesSuccess = 'CONTACT_REF_LIST_SUCCESS';\nconst contactReferencesFailure = 'CONTACT_REF_LIST_FAILURE';\n\nconst contactSaveSuccess = 'CONTACT_SAVE_SUCCESS';\nconst contactSaveFailure = 'CONTACT_SAVE_FAILURE';\n\nconst personListSuccess = 'PERSON_LIST_SUCCESS';\nconst personListFailure = 'PERSON_LIST_FAILURE';\n\nconst personSuccess = 'PERSON_SUCCESS';\nconst personFailure = 'PERSON_FAILURE';\n\nconst personContactRequest = 'PERSON_CONTACT_REQUEST';\nconst personContactSuccess = 'PERSON_CONTACT_SUCCESS';\nconst personContactFailure = 'PERSON_CONTACT_FAILURE';\n\nconst userListSuccess = 'USER_LIST_SUCCESS';\nconst userListFailure = 'USER_LIST_FAILURE';\n\nconst userSuccess = 'USER_SUCCESS';\nconst userFailure = 'USER_FAILURE';\n\nconst userByEmailSuccess = 'USER_BY_EMAIL_SUCCESS';\nconst userByEmailFailure = 'USER_BY_EMAIL_FAILURE';\n\nconst userSaveSuccess = 'USER_SAVE_SUCCESS';\nconst userSaveFailure = 'USER_SAVE_FAILURE';\n\nconst userCreateSuccess = 'USER_CREATE_SUCCESS';\nconst userCreateFailure = 'USER_CREATE_FAILURE';\n\nconst newUserCreateSuccess = 'NEW_USER_CREATE_SUCCESS';\nconst newUserCreateFailure = 'NEW_USER_CREATE_FAILURE';\n\nconst personCreateSuccess = 'PERSON_CREATE_SUCCESS';\nconst personCreateFailure = 'PERSON_CREATE_FAILURE';\n\nconst personSaveSuccess = 'PERSON_SAVE_SUCCESS';\nconst personSaveFailure = 'PERSON_SAVE_FAILURE';\n\nconst dirListSuccess = 'DIRECTORIES_LIST_SUCCESS';\nconst dirListFailure = 'DIRECTORIES_LIST_FAILURE';\n\nconst userRegisterSuccess = 'USER_REGISTER_SUCCESS';\nconst userRegisterFailure = 'USER_REGISTER_FAILURE';\n\nconst userCreatePublicSuccess = 'USER_CREATE_PUBLIC_SUCCESS';\nconst userCreatePublicFailure = 'USER_CREATE_PUBLIC_FAILURE';\n\nconst requestPasswordResetSuccess = 'REQUEST_PASSWORD_RESET_SUCCESS';\nconst requestPasswordResetFailure = 'REQUEST_PASSWORD_RESET_FAILURE';\n\nconst passwordResetSuccess = 'PASSWORD_RESET_SUCCESS';\nconst passwordResetFailure = 'PASSWORD_RESET_FAILURE';\n\nconst changePasswordSuccess = 'CHANGE_PASSWORD_SUCCESS';\nconst changePasswordFailure = 'CHANGE_PASSWORD_FAILURE';\n\nconst initialState = {\n    contactReferences: [],\n    contactReferencesError: '',\n    contactSave: '',\n    contactSaveError: null,\n    userList: [],\n    userListError: '',\n    personList: [],\n    personListError: '',\n    personContact: [],\n    user: '',\n    userError: null,\n    userByEmail: '',\n    userByEmailError: null,\n    personCreate: '',\n    personCreateError: null,\n    dirList: [],\n    dirListError: '',\n    userSave: '',\n    userSaveError: null,\n    userCreate: '',\n    userCreateError: null,\n    newUserCreate: '',\n    newUserCreateError: null,\n    userCreatePublic: '',\n    userCreatePublicError: '',\n    userRegister: '',\n    userRegisterError: '',\n    requestPasswordReset: '',\n    requestPasswordResetError: '',\n    passwordReset: '',\n    passwordResetError: '',\n    changePassword: '',\n    changePasswordError: ''\n};\n\nexport const userActionCreators = {\n\n    receiveContactReferences: (resObj) => ({\n        type: contactReferencesSuccess,\n        contactReferences: resObj,\n    }),\n\n    contactReferencesError: (message) => ({\n        type: contactReferencesFailure,\n        contactReferencesError: message\n    }),\n\n    getContactReferences: () => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_CONTACT_API_URL) + '/Contact/api/getcontacttypereferencesasync/', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.contactReferencesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(userActionCreators.receiveContactReferences(result[1].ContactTypeReferences))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.contactReferencesError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveContactSave: (resObj) => ({\n        type: contactSaveSuccess,\n        contactSave: resObj,\n    }),\n\n    contactSaveError: (message) => ({\n        type: contactSaveFailure,\n        contactSaveError: message\n    }),\n\n    saveContact: (body) => {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_CONTACT_API_URL) + '/Contact/api/savecontactasync/', 'POST', '', body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.contactSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(userActionCreators.receiveContactSave(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.contactSaveError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    requestPersonContact: () => ({\n        type: personContactRequest,\n        personContact: [],\n        isFetching: true\n    }),\n\n    receivePersonContact: (contact, message) => ({\n        type: personContactSuccess,\n        isFetching: false,\n        personContact: contact,\n        message\n    }),\n\n    personContactError: (message) => ({\n        type: personContactFailure,\n        isFetching: false,\n        personConact: [],\n        message\n    }),\n\n    getPersonContact: (params) => {\n        return dispatch => {\n            dispatch(userActionCreators.requestPersonContact());\n\n            return publicRequest((API_URL || process.env.REACT_APP_CONTACT_API_URL) + '/Contact/api/getContactsByOwnerAsync/', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.personContactError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(userActionCreators.receivePersonContact(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.personContactError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receivePersonList: (resObj) => ({\n        type: personListSuccess,\n        personList: resObj\n    }),\n\n    personListError: (message) => ({\n        type: personListFailure,\n        personListError: message\n    }),\n\n    getPersonList: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PERSON_API_URL) + '/Person/api/getPartnerPersonListAsync?', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.personListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(userActionCreators.receivePersonList(result[1].Persons))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.personListError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receivePerson: (resObj) => ({\n        type: personSuccess,\n        person: resObj\n    }),\n\n    personError: (message) => ({\n        type: personFailure,\n        personError: message\n    }),\n\n    getPerson: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PERSON_API_URL) + '/Person/api/getPartnerPersonByIdAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.personError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(userActionCreators.receivePerson(result[1].Persons[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.personError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveUserList: (resObj) => ({\n        type: userListSuccess,\n        userList: resObj,\n    }),\n\n    userListError: (message) => ({\n        type: userListFailure,\n        userListError: message\n    }),\n\n    getUserList: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/ListUsersAsync/', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.userListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(userActionCreators.receiveUserList(result[1].UserProfiles))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.userListError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveUser: (userdata) => ({\n        type: userSuccess,\n        user: userdata\n    }),\n\n    userError: (message) => ({\n        type: userFailure,\n        userError: message\n    }),\n\n    getUser: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/GetUserAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.userError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receiveUser(result[1].UserProfiles[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.userError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveUserByEmail: (userByEmaildata) => ({\n        type: userByEmailSuccess,\n        userByEmail: userByEmaildata\n    }),\n\n    userByEmailError: (message) => ({\n        type: userByEmailFailure,\n        userByEmailError: message\n    }),\n\n    getUserByEmail: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/GetUserByEmailAddressAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.userByEmailError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receiveUserByEmail(result[1].UserProfiles[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.receiveUserByEmail(\"\"))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveUserSave: (message) => ({\n        type: userSaveSuccess,\n        userSave: message\n    }),\n\n    userErrorSave: (message) => ({\n        type: userSaveFailure,\n        userSaveError: message\n    }),\n\n    saveUser: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\",\n                'GraphAuthorization': 'Bearer ' + localStorage.getItem(graphToken)\n\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/SaveUserAsync/', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.userErrorSave(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(userActionCreators.receiveUserSave(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.userErrorSave('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveUserCreate: (message) => ({\n        type: userCreateSuccess,\n        userCreate: message\n    }),\n\n    userErrorCreate: (message) => ({\n        type: userCreateFailure,\n        userCreateError: message\n    }),\n\n\n    createUser: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\",\n                'GraphAuthorization': 'Bearer ' + localStorage.getItem(graphToken)\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/CreateUserAsync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.userErrorCreate(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receiveUserCreate(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.userErrorCreate('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveNewUserCreate: (message) => ({\n        type: newUserCreateSuccess,\n        newUserCreate: message\n    }),\n\n    newUserErrorCreate: (message) => ({\n        type: newUserCreateFailure,\n        newUserCreateError: message\n    }),\n\n\n    createNewUser: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\",\n                'GraphAuthorization': 'Bearer ' + localStorage.getItem(graphToken)\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/CreateNewUserAsync/', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.newUserErrorCreate(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receiveNewUserCreate(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.newUserErrorCreate('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receivePersonCreate: (resObj) => ({\n        type: personCreateSuccess,\n        personCreate: resObj\n    }),\n\n    personCreateError: (message) => ({\n        type: personCreateFailure,\n        personCreateError: message\n    }),\n\n\n    createPerson: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PERSON_API_URL) + '/Person/api/createpersonasync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.personCreateError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receivePersonCreate(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.personCreateError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receivePersonSave: (resObj) => ({\n        type: personSaveSuccess,\n        personSave: resObj\n    }),\n\n    personSaveError: (message) => ({\n        type: personSaveFailure,\n        personSaveError: message\n    }),\n\n\n    savePerson: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PERSON_API_URL) + '/Person/api/savepersonasync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.personSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receivePersonSave(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.personSaveError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveDirList: (resObj) => ({\n        type: dirListSuccess,\n        dirList: resObj\n    }),\n\n    dirListError: (message) => ({\n        type: dirListFailure,\n        dirListError: message\n    }),\n\n\n    getDirReferences: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/GetDirectoryReferencesAsync/', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.dirListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receiveDirList(result[1].Directories))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.dirListError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveRegisterUser: (message) => ({\n        type: userRegisterSuccess,\n        userRegister: message\n    }),\n\n    userErrorRegister: (message) => ({\n        type: userRegisterFailure,\n        userRegisterError: message\n    }),\n\n    registerUser: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/registerpublicuserasync/', 'POST', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.userErrorRegister(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receiveRegisterUser(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.userErrorRegister('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCreatePublicUser: (message) => ({\n        type: userCreatePublicSuccess,\n        userCreatePublic: message\n    }),\n\n    userErrorCreatePublic: (message) => {\n        let error = message;\n        try {\n            error = JSON.parse(message);\n            if (error.Value) { error = error.Value }\n        } catch (err) {\n            error = message;\n        }\n        if (typeof error === 'string' && error.startsWith('\"') && error.endsWith('\"')) {\n            error = error.substr(1, error.length - 2);\n        }\n\n        return ({\n            type: userCreatePublicFailure,\n            userCreatePublicError: error\n        })\n    },\n\n    createPublicUser: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/createpublicuserasync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.userErrorCreatePublic(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receiveCreatePublicUser(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.userErrorCreatePublic('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveRequestPasswordReset: (message) => ({\n        type: requestPasswordResetSuccess,\n        requestPasswordReset: message\n    }),\n\n    requestPasswordResetError: (message) => ({\n        type: requestPasswordResetFailure,\n        requestPasswordResetError: message\n    }),\n\n    requestPasswordReset: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/RequestResetUserPasswordAsync/', 'POST', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.requestPasswordResetError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receiveRequestPasswordReset(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.requestPasswordResetError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receivePasswordReset: (message) => ({\n        type: passwordResetSuccess,\n        passwordReset: message\n    }),\n\n    passwordResetError: (message) => {\n        let error = message;\n        try {\n            error = JSON.parse(message);\n        } catch (err) {\n            error = message;\n        }\n        return ({\n            type: passwordResetFailure,\n            passwordResetError: error\n        })\n    },\n\n    resetPassword: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/User/api/ResetUserPasswordAsync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.passwordResetError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receivePasswordReset(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.passwordResetError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveChangePassword: (message) => ({\n        type: changePasswordSuccess,\n        changePassword: message\n    }),\n\n    changePasswordError: (message) => {\n        let error = message;\n        try {\n            error = JSON.parse(message);\n            if (error.Value) { error = error.Value }\n        } catch (err) {\n            error = message;\n        }\n        if (typeof error === 'string' && error.startsWith('\"') && error.endsWith('\"')) {\n            error = error.substr(1, error.length - 2);\n        }\n        if (error === \"Login failed (150)\") {\n            error = \"Invalid current password.\";\n        }\n        return ({\n            type: changePasswordFailure,\n            changePasswordError: error\n        })\n    },\n\n    changePassword: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_AUTH_API_URL) + '/Authentication/api/ChangePasswordAsync/', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(userActionCreators.changePasswordError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(userActionCreators.receiveChangePassword(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(userActionCreators.changePasswordError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    }\n};\n\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n\n    switch (action.type) {\n        case contactReferencesSuccess:\n            return Object.assign({}, state, {\n                contactReferences: action.contactReferences,\n                contactReferencesError: ''\n            })\n        case contactReferencesFailure:\n            return Object.assign({}, state, {\n                contactReferencesError: action.contactReferencesError\n            })\n        case contactSaveSuccess:\n            return Object.assign({}, state, {\n                contactSave: action.contactSave,\n                contactSaveError: null\n            })\n        case contactSaveFailure:\n            return Object.assign({}, state, {\n                contactSaveError: action.contactSaveError\n            })\n        case personContactRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case personContactSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                personContact: action.personContact,\n                message: ''\n            })\n        case personContactFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                personContact: action.personContact,\n                message: action.message\n            })\n        case personListSuccess:\n            return Object.assign({}, state, {\n                personList: action.personList,\n                personListError: ''\n            })\n        case personListFailure:\n            return Object.assign({}, state, {\n                personListError: action.personListError\n            })\n        case personSuccess:\n            return Object.assign({}, state, {\n                person: action.person,\n                personError: ''\n            })\n        case personFailure:\n            return Object.assign({}, state, {\n                personError: action.personError\n            })\n        case userListSuccess:\n            return Object.assign({}, state, {\n                userList: action.userList,\n                userListError: ''\n            })\n        case userListFailure:\n            return Object.assign({}, state, {\n                userListError: action.userListError\n            })\n        case userSuccess:\n            return Object.assign({}, state, {\n                user: action.user,\n                userError: null\n            })\n        case userFailure:\n            return Object.assign({}, state, {\n                userError: action.userError\n            })\n        case userByEmailSuccess:\n            return Object.assign({}, state, {\n                userByEmail: action.userByEmail,\n                userByEmailError: null\n            })\n        case userByEmailFailure:\n            return Object.assign({}, state, {\n                userByEmailError: action.userByEmailError\n            })\n        case userSaveSuccess:\n            return Object.assign({}, state, {\n                userSave: action.userSave,\n                userSaveError: null\n            })\n        case userSaveFailure:\n            return Object.assign({}, state, {\n                userSaveError: action.userSaveError\n            })\n        case userCreateSuccess:\n            return Object.assign({}, state, {\n                userCreate: action.userCreate,\n                userCreateError: null\n            })\n        case userCreateFailure:\n            return Object.assign({}, state, {\n                userCreateError: action.userCreateError\n            })\n        case newUserCreateSuccess:\n            return Object.assign({}, state, {\n                newUserCreate: action.newUserCreate,\n                newUserCreateError: null\n            })\n        case newUserCreateFailure:\n            return Object.assign({}, state, {\n                newUserCreateError: action.newUserCreateError\n            })\n        case personCreateSuccess:\n            return Object.assign({}, state, {\n                personCreate: action.personCreate,\n                personCreateError: null\n            })\n        case personCreateFailure:\n            return Object.assign({}, state, {\n                personCreateError: action.personCreateError\n            })\n        case personSaveSuccess:\n            return Object.assign({}, state, {\n                personSave: action.personSave,\n                personSaveError: null\n            })\n        case personSaveFailure:\n            return Object.assign({}, state, {\n                personSaveError: action.personSaveError\n            })\n        case dirListSuccess:\n            return Object.assign({}, state, {\n                dirList: action.dirList,\n                dirListError: ''\n            })\n        case dirListFailure:\n            return Object.assign({}, state, {\n                dirListError: action.dirListError\n            })\n        case userRegisterSuccess:\n            return Object.assign({}, state, {\n                userRegister: action.userRegister,\n                userRegisterError: ''\n            })\n        case userRegisterFailure:\n            return Object.assign({}, state, {\n                userRegisterError: action.userRegisterError\n            })\n        case userCreatePublicSuccess:\n            return Object.assign({}, state, {\n                userCreatePublic: action.userCreatePublic,\n                userCreatePublicError: ''\n            })\n        case userCreatePublicFailure:\n            return Object.assign({}, state, {\n                userCreatePublicError: action.userCreatePublicError\n            })\n        case requestPasswordResetSuccess:\n            return Object.assign({}, state, {\n                requestPasswordReset: action.requestPasswordReset,\n                requestPasswordResetError: ''\n            })\n        case requestPasswordResetFailure:\n            return Object.assign({}, state, {\n                requestPasswordResetError: action.requestPasswordResetError\n            })\n        case passwordResetSuccess:\n            return Object.assign({}, state, {\n                passwordReset: action.passwordReset,\n                passwordResetError: ''\n            })\n        case passwordResetFailure:\n            return Object.assign({}, state, {\n                passwordResetError: action.passwordResetError\n            })\n        case changePasswordSuccess:\n            return Object.assign({}, state, {\n                changePassword: action.changePassword,\n                changePasswordError: ''\n            })\n        case changePasswordFailure:\n            return Object.assign({}, state, {\n                changePasswordError: action.changePasswordError\n            })\n        default:\n            return state\n    }\n};","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { userActionCreators } from '../../../stores/lis-user-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport { Link } from 'react-router-dom';\n\nconst calculateNumberOfCriteriaMet = (password) => {\n    let criteriaMet = 0;\n    if (password.search(/[a-z]/) > -1) { criteriaMet++; }\n    if (password.search(/[A-Z]/) > -1) { criteriaMet++; }\n    if (password.search(/\\d/) > -1) { criteriaMet++; }\n    if (password.search(/[@^$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>]/) > -1) { criteriaMet++; }\n\n    return criteriaMet;\n}\n\nclass CreateAccount extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            firstname: '',\n            lastname: '',\n            password: '',\n            passwordconfirm: '',\n            showPassword: false\n        };\n\n        this.handleTextChange = this.handleTextChange.bind(this);\n        this.toggleShowPassword = this.toggleShowPassword.bind(this);\n        this.checkName = this.checkName.bind(this);\n        this.checkPassword = this.checkPassword.bind(this);\n        this.checkPasswordConfirm = this.checkPasswordConfirm.bind(this);\n        this.toggleShowTooltip = this.toggleShowTooltip.bind(this);\n        this.handleClickOutside = this.handleClickOutside.bind(this);\n        this.createAccount = this.createAccount.bind(this);\n\n        this.infoRef = React.createRef();\n        this.infoButtonRef = React.createRef();\n    }\n\n    toggleShowPassword() {\n        this.setState(state => ({\n            showPassword: !state.showPassword\n        }));\n    }\n\n    handleTextChange(e, key) {\n        const val = e.target.value;\n        this.setState({\n            [key]: val\n        });\n    }\n\n    checkName() {\n        if (!this.state.firstname || !this.state.lastname) {\n            this.setState({\n                nameError: 'first and last name are required'\n            });\n            return true;\n        }\n        this.setState({\n            nameError: false\n        });\n    }\n\n    checkPassword() {\n        this.setState({ showHelp: false })\n        if (this.state.password.length < 10) {\n            this.setState({ passwordError: 'password must be at least 10 characters long' });\n            return true;\n        }\n        if (this.state.password.length > 256) {\n            this.setState({ passwordError: 'password must be 256 characters or fewer' });\n            return true;\n        }\n        if (this.state.password.search(/^(?:(?=.*[a-z])(?:(?=.*[A-Z])(?=.*[\\d@$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>])|(?=.*[@^$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>])(?=.*\\d))|(?=.*[@^$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>])(?=.*[A-Z])(?=.*\\d)).{10,256}$/) === -1) {\n            this.setState({ passwordError: 'invalid password', showHelp: true });\n            return true;\n        } else {\n            this.setState({ showHelp: false })\n        }\n        if (this.state.password === this.state.currentpassword) {\n            this.setState({ passwordError: 'new password cannot be the same as your current password' });\n            return true;\n        }\n        this.setState({\n            passwordError: ''\n        });\n    }\n\n    checkPasswordConfirm() {\n        if (this.state.password && this.state.passwordconfirm !== this.state.password) {\n            this.setState({\n                passwordConfirmError: 'passwords do not match'\n            });\n            return true;\n        }\n        this.setState({\n            passwordConfirmError: ''\n        });\n    }\n\n    toggleShowTooltip() {\n        this.setState(state => ({\n            toolTip: !state.toolTip\n        }), () => {\n            if (this.state.toolTip) {\n                document.addEventListener('mousedown', this.handleClickOutside);\n            }\n        });\n    }\n\n    handleClickOutside(event) {\n        if (this.infoRef && !this.infoRef.current.contains(event.target) && this.infoButtonRef && !this.infoButtonRef.current.contains(event.target)) {\n            document.removeEventListener('mousedown', this.handleClickOutside);\n            this.setState({ toolTip: false })\n        }\n    }\n\n    createAccount(e) {\n        e.preventDefault();\n        let isError = false;\n        isError = this.checkName() || isError;\n        isError = this.checkPassword() || isError;\n        isError = this.checkPasswordConfirm() || isError;\n        if (isError) {\n            return\n        }\n\n        this.setState({\n            isCreating: true,\n            message: ''\n        });\n        const params = {\n            FirstName: this.state.firstname,\n            LastName: this.state.lastname,\n            Password: this.state.password,\n            HashedWord: this.props.match.params.registerhash\n        };\n        this.props.actions.createPublicUser(params)\n            .then(() => {\n                this.setState({\n                    isCreating: false,\n                    accountCreated: true,\n                    message: ''\n                });\n                setTimeout(() => {\n                    this.props.history.push('/login');\n                }, 5000)\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    message: this.props.users.userCreatePublicError ? this.props.users.userCreatePublicError : err.toString(),\n                    isCreating: false\n                });\n            })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { showPassword, firstname, lastname, password, passwordconfirm, passwordError, passwordConfirmError, nameError, isCreating, accountCreated } = this.state;\n        if (accountCreated) {\n            return (\n                <div className=\"center\">\n                    <h2>You have finished creating your account</h2>\n                    <h3>You will be redirected to the login form in 5 seconds</h3>\n                    <div className=\"small-text\">Click <Link to='/login'>Here</Link> to go there now</div>\n                </div>)\n        }\n\n        const passwordHelp = (indicate) => (\n            <React.Fragment>\n                <span>Your password must meet the following criteria:</span>\n                <ul>\n                    <li> Must be between 10 and 256 characters  {indicate && <span className={`icon ${password.length < 10 || password.length > 256 ? 'delete' : 'save'}`} />}</li>\n                    <li> Must contain at least three of the following four types of characters: {indicate && <span className={`icon ${calculateNumberOfCriteriaMet(password) < 3 ? 'delete' : 'save'}`} />}</li>\n                    <ol>\n                        <li> lowercase letter {indicate && <span className={`icon ${password.search(/[a-z]/) === -1 ? 'delete' : 'save'}`} />}</li>\n                        <li> uppercase letter {indicate && <span className={`icon ${password.search(/[A-Z]/) === -1 ? 'delete' : 'save'}`} />}</li>\n                        <li> number {indicate && <span className={`icon ${password.search(/\\d/) === -1 ? 'delete' : 'save'}`} />}</li>\n                        <li> special character {indicate && <span className={`icon ${password.search(/[@^$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>]/) === -1 ? 'delete' : 'save'}`} />}</li>\n                    </ol>\n                </ul>\n            </React.Fragment>\n        )\n\n        return (\n            <div className=\"dlas-forms create-account\">\n                <h1>Finish Account Creation</h1>\n                <hr className=\"faded-line\" />\n                <div className=\"inner-grid two multi-row\" style={{ gridGap: '50px' }}>\n                    <form>\n                        <br />\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <label htmlFor=\"sr-first-name\">First name</label>\n                                <input id=\"sr-first-name\" value={firstname} onChange={e => this.handleTextChange(e, \"firstname\")} type=\"text\" />\n                            </div>\n                            <div>\n                                <label htmlFor=\"sr-last-name\">Last name</label>\n                                <input id=\"sr-last-name\" value={lastname} onChange={e => this.handleTextChange(e, \"lastname\")} type=\"text\" />\n                            </div>\n                        </div>\n                        <span className=\"small-text fail\">{nameError}</span>\n                        <div>\n                            <label htmlFor=\"sr-password\">Password</label>\n                            <button onClick={this.toggleShowTooltip} type=\"button\" className=\"button info\" ref={this.infoButtonRef} > Info</button>\n                            <div className=\"info-box\" ref={this.infoRef} style={{ display: this.state.toolTip ? 'block' : 'none' }}>\n                                {passwordHelp(false)}\n                            </div>\n                            <input id=\"sr-password\" onBlur={this.checkPassword} value={password} onChange={e => this.handleTextChange(e, \"password\")} autoComplete=\"new-password\" type={showPassword ? 'text' : 'password'} />\n                            <span className=\"small-text fail\">{passwordError}</span>\n                            {this.state.showHelp && <React.Fragment><br />{passwordHelp(true)}</React.Fragment>}\n                        </div>\n                        <div>\n                            <label htmlFor=\"sr-password-confirm\">Password Confirmation</label>\n                            <input id=\"sr-password-confirm\" onBlur={this.checkPasswordConfirm} onChange={e => this.handleTextChange(e, \"passwordconfirm\")} value={passwordconfirm} type={showPassword ? 'text' : 'password'} />\n                            <span className=\"small-text fail\">{passwordConfirmError}</span>\n                        </div>\n                        <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                            <div className=\"toggle-switch\" onClick={this.toggleShowPassword}>\n                                <input id=\"sr-show-password\" checked={showPassword} type=\"checkbox\" style={{ width: \"inherit\" }} />\n                                <span className=\"slider\"></span>\n                            </div>\n                            <label htmlFor=\"sr-show-password\" className=\"checkbox-label no-background\">Show password</label>\n                        </div>\n                        <div>\n                            <br />\n                            {isCreating ?\n                                <div><span className=\"small-spinner\"></span></div>\n                                :\n                                <button onClick={this.createAccount} className=\"button\" type=\"submit\">Create Account</button>\n                            }\n                        </div>\n                        <div className=\"small-text fail\">{this.state.message}</div>\n                    </form>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { users } = state;\n        return {\n            users\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, userActionCreators), dispatch)\n        }\n    }\n)(CreateAccount)","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { userActionCreators } from '../../../stores/lis-user-store';\nimport { cancelRequest } from '../../../services/request.service';\n\nconst emailRegex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\nclass RegisterAccount extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            firstname: '',\n            lastname: '',\n            email: '',\n            password: '',\n            passwordconfirm: '',\n            showPassword: false\n        };\n\n        this.handleTextChange = this.handleTextChange.bind(this);\n        this.checkEmail = this.checkEmail.bind(this);\n        this.registerAccount = this.registerAccount.bind(this);\n    }\n\n    handleTextChange(e, key) {\n        const val = e.target.value;\n        this.setState({\n            [key]: val\n        });\n    }\n\n    checkEmail() {\n        const email = this.state.email.toLowerCase();\n\n        if (!emailRegex.test(email)) {\n            this.setState({\n                emailError: 'A valid email is required'\n            });\n            return true;\n        }\n        this.setState({\n            emailError: ''\n        });\n    }\n\n    registerAccount(e) {\n        e.preventDefault();\n        let isError = this.checkEmail()\n        if (isError) {\n            return\n        }\n\n        this.setState({\n            isCreating: true\n        });\n        const params = `?emailaddress=${encodeURIComponent(this.state.email)}`;\n        this.props.actions.registerUser(params)\n            .then(() => {\n                this.setState({\n                    isCreating: false,\n                    accountCreated: true,\n                    message: ''\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    message: err.toString(),\n                    isCreating: false\n                });\n            })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { email, emailError, isCreating, accountCreated } = this.state;\n        if (accountCreated) {\n            return (\n                <div className=\"center\">\n                    <h2>Please check your email to complete registration</h2>\n                    <h3>Don't forget to check your spam folder</h3>\n                </div>)\n        }\n        return (\n            <div className=\"dlas-forms\">\n                <h1>Register for a Lobbyist-in-a-Box Account</h1>\n                <hr className=\"faded-line\" />\n                <div className=\"inner-grid two multi-row\" style={{ gridGap: '50px' }}>\n                    <form>\n                        <h3 htmlFor=\"sr-email\">Email</h3>\n                        <div className=\"inner-grid three-and-one\">\n                            <div>\n                                <input id=\"sr-email\" style={{ margin: \"0\" }} onBlur={this.checkEmail} value={email} onChange={e => this.handleTextChange(e, \"email\")} type=\"text\" />\n                                <span className=\"small-text fail\">{emailError}</span>\n                            </div>\n                            <div>\n                                {isCreating ?\n                                    <div><span className=\"small-spinner\"></span></div>\n                                    :\n                                    <button onClick={this.registerAccount} className=\"button\" type=\"submit\">Register Account</button>\n                                }\n                            </div>\n                        </div>\n                        <div className=\"small-text fail\" style={{ marginTop: \"10px\" }}>\n                            {this.state.message && this.state.message}\n                        </div>\n                        <div>\n                            <Link to='/login' style={{ marginTop: \"10px\", textDecoration: \"none\" }}>\n                                Already have an account? Log in.\n                            </Link>\n                        </div>\n                    </form>\n                    <div className=\"txt-blue\">\n                        <h3><b>Track up to 5 bills for free</b></h3>\n                        <p>Your new free account will allow you to track up to 5 bills in one Watchlist and set up notifications.</p>\n                        <p>Email notification triggers an email when bills are sponsored by a member of the General Assembly, referred to a House or Senate Committee or contain a specific key word(s), phrases, or Code section(s).</p>\n\n                        <h3><b>Lobbyist-in-a-Box Subscription</b></h3>\n                        <p>A subscription to Lobbyist-in-a-Box offers up to 100 Watchlists (previously called \"Profiles\") containing 300 bills each.</p>\n                        <p>The cost of this service is $400 per user for state agencies, and $600 per user for all other subscribers.  More user accounts can be added, please refer to the Subscription Information on the <a style={{ textDecoration: \"none\" }} target=\"_blank\" rel=\"noreferrer\" href=\"http://help.lis.virginia.gov/liab/index.asp\">LIS Learning Center</a> for additional options and fees, the 2-Step Registration and Payment process, and complete LIAB registration instructions.</p>\n                        <p><span className=\"bold\">Need additional information or assistance?</span> Please send an e-mail message to <a style={{ textDecoration: \"none\" }} href=\"mailto:lis@dlas.virginia.gov\">lis@dlas.virginia.gov</a>.</p>\n                        <p>For questions relating to LIAB Subscription payment procedures, please contact Virginia Interactive, LLC (VI) dba Tyler Virginia at <a style={{ textDecoration: \"none\" }} href=\"mailto:va-customerservice@tylertech.com\">va-customerservice@tylertech.com</a> or (804) 318-4133.</p>\n                    </div>\n                </div>\n            </div>)\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { users } = state;\n        return {\n            users\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, userActionCreators), dispatch)\n        }\n    }\n)(RegisterAccount)","import React from 'react';\nimport * as Fields from '../../lis-layout/components/lis-forms-component';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { userActionCreators } from '../../../stores/lis-user-store';\nimport { cancelRequest } from '../../../services/request.service';\n\nclass ForgotPassword extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            errorMessage: '',\n            isFetching: false,\n            paswordResetRequested: false,\n            email: ''\n        };\n\n        this.requestPasswordReset = this.requestPasswordReset.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n    }\n\n    requestPasswordReset(e) {\n        e.preventDefault();\n        this.setState({\n            errorMessage: '',\n            isFetching: true\n        });\n        this.props.actions.requestPasswordReset('?emailAddress=' + encodeURIComponent(this.state.email))\n            .then(() => {\n                this.setState({\n                    isFetching: false,\n                    paswordResetRequested: true\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isFetching: false,\n                    errorMessage: err.toString()\n                });\n            })\n    }\n\n    handleChange(e) {\n        this.setState({\n            email: e.target.value\n        });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { errorMessage, isFetching, paswordResetRequested, email } = this.state;\n        if (paswordResetRequested) {\n            return (\n                <div className=\"center\">\n                    <h2>An email has been sent to your inbox with information on how to reset your password</h2>\n                    <h3>Please check your email to complete password reset</h3>\n                    <div className=\"small-text\">Don't forget to check your spam folder</div>\n                </div>)\n        }\n        return (\n            <div className=\"dlas-forms\">\n                <h1>Request Lobbyist-in-a-Box Password Reset</h1>\n                <hr className=\"faded-line\" />\n                <form>\n                    <div>\n                        <span className=\"error-message\">{errorMessage}</span>\n                        <div className=\"inner-grid three\">\n                            <div className=\"single-row\">\n                                <Fields.TextInput\n                                    id=\"email\"\n                                    label=\"Email\"\n                                    placeholder=\"Email\"\n                                    onChange={this.handleChange}\n                                    value={email}\n                                />\n                            </div>\n                        </div>\n                        <div>\n                            {isFetching ?\n                                <div><span className=\"spinner small-spinner\"></span></div>\n                                :\n                                <button disabled={!email} onClick={this.requestPasswordReset} className=\"button\" type=\"submit\">Request password reset</button>\n                            }\n                        </div>\n                    </div>\n                </form>\n            </div>\n        );\n    }\n};\n\nexport default connect(\n    (state) => {\n        const { users } = state;\n        return {\n            users\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, userActionCreators), dispatch)\n        }\n    }\n)(ForgotPassword);\n\n\n\n\n\n\n","import React from 'react';\nimport queryString from 'query-string';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { userActionCreators } from '../../../stores/lis-user-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { Link } from 'react-router-dom';\n\nconst houseInstructions = \"Please contact the House of Delegates administrator at (804) 698-1560.\";\nconst senateInstructions = \"Please email Senate Technology at sis@senate.virginia.gov or call 804-698-7470.\";\nconst legislativeInstructions = \"Please call the DLAS help desk at 804-786-9631 or email LIS@dlas.virginia.gov.\";\n\nconst houseDomains = [\n    \"house.virginia.gov\"\n];\n\nconst senateDomains = [\n    \"senate.virginia.gov\"\n];\n\nconst legislativeDomains = [\n    \"dlas.virginia.gov\",\n    \"dls.virginia.gov\",\n    \"sfac.virginia.gov\",\n    \"hac.virginia.gov\",\n    \"vcoy.virginia.gov\",\n    \"jchc.virginia.gov\",\n    \"vscc.virginia.gov\",\n    \"dcp.virginia.gov\",\n    \"vcf.virginia.gov\",\n    \"jlarc.virginia.gov\"\n];\n\nconst calculateNumberOfCriteriaMet = (password) => {\n    let criteriaMet = 0;\n    if (password.search(/[a-z]/) > -1) { criteriaMet++; }\n    if (password.search(/[A-Z]/) > -1) { criteriaMet++; }\n    if (password.search(/\\d/) > -1) { criteriaMet++; }\n    if (password.search(/[@^$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>]/) > -1) { criteriaMet++; }\n\n    return criteriaMet;\n}\n\nclass ChangePassword extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            errorMessage: '',\n            isChanging: false,\n            passwordReset: false,\n            confirmPassword: '',\n            passwordChangeFinished: false,\n            password: '',\n            passwordconfirm: '',\n            currentpassword: '',\n            resettingPassword: false,\n            passwordResetError: '',\n            showPassword: false,\n            passwordError: false,\n            passwordConfirmError: false\n        };\n\n        this.changePassword = this.changePassword.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.toggleShowPassword = this.toggleShowPassword.bind(this);\n        this.checkPassword = this.checkPassword.bind(this);\n        this.checkPasswordConfirm = this.checkPasswordConfirm.bind(this);\n        this.toggleShowTooltip = this.toggleShowTooltip.bind(this);\n        this.handleClickOutside = this.handleClickOutside.bind(this);\n\n        this.infoRef = React.createRef();\n        this.infoButtonRef = React.createRef();\n    }\n\n    changePassword(e) {\n        e.preventDefault();\n        let isError = false;\n        isError = this.checkPassword() || isError;\n        isError = this.checkPasswordConfirm() || isError;\n        if (isError) {\n            return\n        }\n\n        this.setState({\n            isChanging: true,\n            errorMessage: ''\n        });\n        const parsed = queryString.parse(this.props.location.search); //note this will replace all '+' signs with ' ' spaces, which we have to account for below\n        const emailaddress = parsed.emailaddress ? parsed.emailaddress.replaceAll(\" \", \"+\") : this.props.login.userProfile.email; //email address if registration or temp/expired password, userProfile prop if logged in and changing\n        const body = {\n            username: emailaddress,\n            password: this.state.currentpassword,\n            newpassword: this.state.password\n        };\n        this.props.actions.changePassword(body)\n            .then(() => {\n                this.setState({\n                    isChanging: false,\n                    passwordChangeFinished: true\n                });\n                //Login to get access token and refresh token\n                const loginObj = { userId: emailaddress, userPassword: this.state.password };\n                this.props.actions.loginUser(loginObj);\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    errorMessage: this.props.users.changePasswordError ? this.props.users.changePasswordError : err.toString(),\n                    isChanging: false\n                });\n            })\n    }\n\n    handleChange(key, val) {\n        this.setState({\n            [key]: val\n        });\n    }\n\n    toggleShowPassword() {\n        this.setState(state => ({\n            showPassword: !state.showPassword\n        }));\n    }\n\n    checkPassword() {\n        this.setState({ showHelp: false })\n        if (this.state.password.length < 10) {\n            this.setState({ passwordError: 'password must be at least 10 characters long' });\n            return true;\n        }\n        if (this.state.password.length > 256) {\n            this.setState({ passwordError: 'password must be 256 characters or fewer' });\n            return true;\n        }\n        if (this.state.password.search(/^(?:(?=.*[a-z])(?:(?=.*[A-Z])(?=.*[\\d@$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>])|(?=.*[@^$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>])(?=.*\\d))|(?=.*[@^$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>])(?=.*[A-Z])(?=.*\\d)).{10,256}$/) === -1) {\n            this.setState({ passwordError: 'invalid password', showHelp: true });\n            return true;\n        } else {\n            this.setState({ showHelp: false })\n        }\n        if (this.state.password === this.state.currentpassword) {\n            this.setState({ passwordError: 'new password cannot be the same as your current password' });\n            return true;\n        }\n        this.setState({\n            passwordError: ''\n        });\n    }\n\n    checkPasswordConfirm() {\n        if (this.state.password && this.state.passwordconfirm !== this.state.password) {\n            this.setState({\n                passwordConfirmError: 'passwords do not match'\n            });\n            return true;\n        }\n        this.setState({\n            passwordConfirmError: ''\n        });\n    }\n\n    toggleShowTooltip() {\n        this.setState(state => ({\n            toolTip: !state.toolTip\n        }), () => {\n            if (this.state.toolTip) {\n                document.addEventListener('mousedown', this.handleClickOutside);\n            }\n        });\n    }\n\n    handleClickOutside(event) {\n        if (this.infoRef && !this.infoRef.current.contains(event.target) && this.infoButtonRef && !this.infoButtonRef.current.contains(event.target)) {\n            document.removeEventListener('mousedown', this.handleClickOutside);\n            this.setState({ toolTip: false })\n        }\n    }\n\n    componentDidMount() {\n        if (this.props.location.pathname.includes('passwordreset')) {\n            this.setState({\n                resettingPassword: true\n            });\n            const resetHash = this.props.match.params.resethash;\n            let emailAddress;\n            if (this.props.location.search) {\n                emailAddress = queryString.parse(this.props.location.search).emailaddress;\n                if (emailAddress) { emailAddress = emailAddress.replaceAll(\" \", \"+\") }\n            }\n            this.props.actions.resetPassword({ HashedWord: resetHash, EmailAddress: emailAddress })\n                .then(() => {\n                    this.setState({\n                        resettingPassword: false\n                    });\n                    this.props.history.push('/change-password' + this.props.location.search);\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return\n                    }\n                    this.setState({\n                        passwordResetError: this.props.users.passwordResetError.Value ? this.props.users.passwordResetError.Value : err.toString()\n                    });\n                })\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { errorMessage, isChanging, passwordChangeFinished, password, passwordconfirm, currentpassword, resettingPassword, passwordResetError, showPassword, passwordError, passwordConfirmError } = this.state;\n        const passwordHasBeenResetCheckEmail = this.props.location.search && queryString.parse(this.props.location.search).emailaddress && !queryString.parse(this.props.location.search).passwordistemporaryorexpired;\n        const passwordIsTemporaryOrExpired = this.props.location.search && queryString.parse(this.props.location.search).emailaddress && queryString.parse(this.props.location.search).passwordistemporaryorexpired;\n        const emailSplit = this.props.login.userProfile.email.split(\"@\");\n\n        const passwordHelp = (indicate) => (\n            <React.Fragment>\n                <span>Your password must meet the following criteria:</span>\n                <ul>\n                    <li> Must be between 10 and 256 characters  {indicate && <span style={{ verticalAlign: 'middle' }} className={`icon ${password.length < 10 || password.length > 256 ? 'delete' : 'save'}`} />}</li>\n                    <li> Must contain at least three of the following four types of characters: {indicate && <span style={{ verticalAlign: 'middle' }} className={`icon ${calculateNumberOfCriteriaMet(password) < 3 ? 'delete' : 'save'}`} />}</li>\n                    <ol>\n                        <li> lowercase letter {indicate && <span style={{ verticalAlign: 'middle' }} className={`icon ${password.search(/[a-z]/) === -1 ? 'delete' : 'save'}`} />}</li>\n                        <li> uppercase letter {indicate && <span style={{ verticalAlign: 'middle' }} className={`icon ${password.search(/[A-Z]/) === -1 ? 'delete' : 'save'}`} />}</li>\n                        <li> number {indicate && <span style={{ verticalAlign: 'middle' }} className={`icon ${password.search(/\\d/) === -1 ? 'delete' : 'save'}`} />}</li>\n                        <li> special character {indicate && <span style={{ verticalAlign: 'middle' }} className={`icon ${password.search(/[@^$!%*?=\\-_+&\\[\\]{}|\\\\:'\\,\\.\\?\\/`~\"\"\\(\\);<>]/) === -1 ? 'delete' : 'save'}`} />}</li>\n                    </ol>\n                </ul>\n            </React.Fragment>\n        )\n\n        if (resettingPassword) {\n            if (passwordResetError) {\n                return (<div className=\"center\">\n                    <div className=\"fail\">There was a problem resetting your password</div>\n                    <div>{passwordResetError.toLowerCase().includes('information could not be found in cache') ? <Link to=\"/forgot-password\">Try again</Link> : passwordResetError}</div>\n                </div>)\n            }\n            return (<div className=\"spinner center-spinner\">Resetting Password</div>)\n        }\n        if (passwordChangeFinished) {\n            return (\n                <div className=\"center\">\n                    <h2>Your password has been changed</h2>\n                    <Link to=\"/home\">Home</Link>\n                </div>)\n        }\n        return (\n            <div className=\"dlas-forms change-password\">\n                {/* Find out if a reserved domain is present on either side of the @ in the event that the login email is formatted as user#domain@dlasva.onmicrosoft.com instead of user@domain*/}\n                {legislativeDomains.find(x => x === emailSplit[1]) || legislativeDomains.findIndex(x => emailSplit[0].includes(x)) >= 0\n                    ? <div className=\"homepage-links\"><p>{legislativeInstructions}</p> <Link to=\"/profile\">Return to Profile</Link></div>\n                    : houseDomains.find(x => x === emailSplit[1]) || houseDomains.findIndex(x => emailSplit[0].includes(x)) >= 0\n                        ? <div className=\"homepage-links\"><p>{houseInstructions}</p> <Link to=\"/profile\">Return to Profile</Link></div>\n                        : senateDomains.find(x => x === emailSplit[1]) || senateDomains.findIndex(x => emailSplit[0].includes(x)) >= 0\n                            ? <div className=\"homepage-links\"><p>{senateInstructions}</p> <Link to=\"/profile\">Return to Profile</Link></div>\n                            : <React.Fragment>\n                                <h1>New Password</h1>\n                                <hr className=\"faded-line\" />\n                                <div>\n                                    {passwordHasBeenResetCheckEmail ?\n                                        <p>Your password has been reset. Check your email for your temporary password.</p>\n                                        : passwordIsTemporaryOrExpired ?\n                                            <p>Your password is temporary or expired. Please change your password below.</p>\n                                            :\n                                            null\n                                    }\n                                </div>\n                                <div className=\"inner-grid two multi-row\" style={{ gridGap: '50px' }}>\n                                    <form>\n                                        <div>\n                                            <label htmlFor=\"sr-current-password\">{passwordHasBeenResetCheckEmail ? \"Temporary\" : \"Current\"} Password</label>\n                                            <input disabled={isChanging} id=\"sr-current-password\" value={currentpassword} onChange={e => this.handleChange(\"currentpassword\", e.target.value)} type={showPassword ? 'text' : 'password'} />\n                                        </div>\n                                        <div>\n                                            <label htmlFor=\"sr-new-password\">New Password</label>\n                                            <button onClick={this.toggleShowTooltip} type=\"button\" className=\"button info\" ref={this.infoButtonRef} > Info</button>\n                                            <div className=\"info-box\" ref={this.infoRef} style={{ display: this.state.toolTip ? 'block' : 'none' }}>\n                                                {passwordHelp(false)}\n                                            </div>\n                                            <input disabled={isChanging} id=\"sr-new-password\" autoComplete=\"false\" onBlur={this.checkPassword} value={password} onChange={e => this.handleChange(\"password\", e.target.value)} type={showPassword ? 'text' : 'password'} />\n                                            <span className=\"small-text fail\">{passwordError}</span>\n                                            {this.state.showHelp && <div style={{ fontSize: '0.8em' }}>{passwordHelp(true)}</div>}\n                                        </div>\n                                        <div>\n                                            <label htmlFor=\"sr-password-confirm\">New Password Confirmation</label>\n                                            <input disabled={isChanging} id=\"sr-password-confirm\" autoComplete=\"false\" onBlur={this.checkPasswordConfirm} onChange={e => this.handleChange(\"passwordconfirm\", e.target.value)} value={passwordconfirm} type={showPassword ? 'text' : 'password'} />\n                                            <span className=\"small-text fail\">{passwordConfirmError}</span>\n                                        </div>\n                                        <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                            <div className=\"toggle-switch\" onClick={this.toggleShowPassword}>\n                                                <input id=\"sr-show-password\" checked={showPassword} type=\"checkbox\" style={{ width: \"inherit\" }} />\n                                                <span className=\"slider\"></span>\n                                            </div>\n                                            <label htmlFor=\"sr-show-password\" className=\"checkbox-label no-background\">Show password</label>\n                                        </div>\n                                        <div>\n                                            {isChanging ?\n                                                <div><span className=\"spinner small-spinner\"></span></div>\n                                                :\n                                                <button onClick={this.changePassword} className=\"button\" type=\"submit\">Change password</button>\n                                            }\n                                        </div>\n                                        <span className=\"small-text fail\">{errorMessage}</span>\n                                    </form>\n                                </div>\n                            </React.Fragment>\n                }\n            </div>\n        );\n    }\n};\n\nexport default connect(\n    (state) => {\n        const { users, login } = state;\n        return {\n            users,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, userActionCreators, authActionCreators), dispatch)\n        }\n    }\n)(ChangePassword);\n\n\n\n\n\n\n","import React from \"react\";\nimport { Link } from 'react-router-dom';\nimport ReactTable from \"react-table\";\nimport '../../../stylesheets/shared/react-table.css';\nimport '../../../stylesheets/lis-member-management/member-management.css';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { userActionCreators } from '../../../stores/lis-user-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport Select from 'react-select';\nimport { sessionActionCreators } from \"../../../stores/lis-session-store\";\nimport { cancelRequest } from '../../../services/request.service';\nimport moment from 'moment-timezone';\n\nclass MemberManagementGrid extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            sessionOptions: [],\n            selectedSession: '',\n            isLoaded: true,\n            searchFilter: '',\n            memberList: []\n        };\n\n        this.handleSessionChange = this.handleSessionChange.bind(this);\n        this.handleFilterChange = this.handleFilterChange.bind(this);\n        this.filterData = this.filterData.bind(this);\n        this.getData = this.getData.bind(this);\n\n    }\n\n    handleSessionChange(val) {\n        this.setState({\n            selectedSession: val\n        }, () => this.getData());\n    }\n\n    handleFilterChange(e) {\n        const val = e.target.value;\n        this.setState({\n            searchFilter: val\n        }, () => this.filterData());\n    }\n\n    filterData() {\n        const filter = this.state.searchFilter;\n        const formattedFilter = filter.toLowerCase().replace(/ /g, '');\n        let memberContacts = [...this.props.members.memberListContactData];\n        if (filter !== '') {\n            memberContacts = memberContacts.filter(contact => {\n                if (contact.MemberDisplayName && contact.MemberDisplayName.toLowerCase().includes(formattedFilter)) {\n                    return true;\n                }\n                if (contact.MemberNumber && contact.MemberNumber.toLowerCase().includes(formattedFilter)) {\n                    return true;\n                }\n                return false;\n            });\n        }\n        this.setState({\n            memberList: memberContacts.filter(member => {\n                if (this.props.login.userClaims.claims.find(x => x.RoleName === \"Admin\")) {\n                    return true;\n                } else if (member.ChamberCode === \"H\" && this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseMemberEditor\") ||\n                    member.ChamberCode === \"S\" && this.props.login.userClaims.claims.find(x => x.RoleName === \"SenateMemberEditor\")) {\n                    return true;\n                }\n                return false;\n            })\n        });\n    }\n\n    getData() {\n        this.setState({\n            isLoaded: false\n        });\n        let params = 'isPublic=false&sessionID=' + this.state.selectedSession.SessionID;\n        this.props.actions.getMemberListContact(params)\n            .then(() => {\n                this.setState({\n                    isLoaded: true,\n                    checkedMembers: []\n                });\n                this.filterData();\n            });\n\n        //Get the member list so we can check for identical patron names on save on the member form\n        this.props.actions.getMemberList(params);\n    }\n\n    componentDidMount() {\n        this.props.actions.getSessionList()\n            .then(() => {\n                let sessionOptions = [...this.props.session.sessionList];\n                let selectedSession = '';\n                sessionOptions.forEach(session => {\n                    session.label = session.SessionYear + ' ' + session.DisplayName;\n                    session.value = session.SessionID;\n                    if (session.IsDefault) {\n                        selectedSession = session;\n                    }\n                });\n                this.setState({\n                    sessionOptions: sessionOptions,\n                    selectedSession: selectedSession\n                }, () => this.getData());\n            });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { sessionOptions, selectedSession, memberList, checkedMembers, searchFilter } = this.state;\n\n        const customStyles = {\n            container: base => ({\n                ...base,\n                lineHeight: 'normal',\n            }),\n            option: (base, state) => ({\n                ...base,\n                fontSize: '0.8em',\n            }),\n            control: (base) => ({\n                ...base,\n                padding: '1px',\n                margin: 0,\n                minHeight: 0,\n                fontSize: '0.8em',\n            }),\n            dropdownIndicator: base => ({\n                ...base,\n                padding: '0px 8px'\n            })\n        }\n        return (\n            <div>\n                <h1>Member Management</h1>\n                <div className=\"toolbar user-toolbar\">\n                    <div className=\"dlas-forms\">\n                        <div>\n                            <label>Session</label>\n                            <Select\n                                options={sessionOptions}\n                                value={selectedSession}\n                                id=\"session-dropdown\"\n                                onChange={this.handleSessionChange}\n                                styles={customStyles}\n                            />\n                        </div>\n                        <div>\n                            <label>Search Member</label>\n                            <input\n                                id='member-filter'\n                                onChange={this.handleFilterChange}\n                                value={searchFilter}\n                            />\n                        </div>\n                        <div>\n                            <Link className=\"button add-wide\" to={`/member-management/${this.state.selectedSession.SessionCode}/create-member`}>Add Member</Link>\n                        </div>\n                    </div>\n                </div>\n                <ReactTable\n                    loading={!this.state.isLoaded}\n                    data={memberList}\n                    columns={[\n                        {\n                            Header: \"Member ID\",\n                            accessor: \"MemberNumber\",\n                            width: 150\n                        },\n                        {\n                            Header: \"Name\",\n                            accessor: \"MemberDisplayName\",\n                            Cell: row => {\n                                return row.original.MemberDisplayName + (row.original.ServiceEndDate && row.original.ServiceEndReason ? \" (\" + row.original.ServiceEndReason + \")\" : \"\")\n                            }\n                        },\n                        {\n                            Header: \"Member Status\",\n                            accessor: \"MemberStatus\",\n                            width: 200\n                        },\n                        {\n                            Header: \"Action\",\n                            headerClassName: \"header-action\",\n                            accessor: \"action\",\n                            className: \"action-column\",\n                            width: 50,\n                            expander: true,\n                            Expander: ({ isExpanded, original }) => {\n                                if (original.ContactInformation && original.ContactInformation.length > 0) {\n                                    return (\n                                        <button className=\"button view\">View</button>\n                                    );\n                                } else {\n                                    return (false);\n                                }\n                            }\n                        },\n                        {\n                            Header: \"\",\n                            accessor: \"edit\",\n                            headerClassName: \"all-column\",\n                            width: 40,\n                            Cell: row => {\n                                return (\n                                    <Link to={`/member-management/${this.state.selectedSession.SessionCode}/edit-member/${row.original.MemberID}`} className=\"button edit\">Edit</Link>\n                                )\n                            }\n                        }\n                    ]}\n                    defaultPageSize={10}\n                    className=\"-striped -highlight\"\n                    SubComponent={row => {\n                        return (\n                            <div>\n                                <MemberInfo member={row.original} />\n                            </div>\n                        )\n                    }}\n                />\n                <br />\n            </div>\n        );\n    }\n}\n\nconst MemberInfo = props => {\n\n    return (\n        <div className=\"flex-row space-around\">\n            {props.member.ContactInformation.map((contact, contactIndex) =>\n                <div key={contactIndex} className=\"member-contact-container\">\n                    <span className=\"member-contact-type\">{contact.ContactType}</span>\n                    <div className=\"inner-grid two\">\n                        <div>\n                            <div>\n                                <span className=\"member-contact-title\">Address:</span>\n                            </div>\n                            <div>\n                                <span>{contact.Address1}</span>\n                            </div>\n                            <div>\n                                <span>{contact.Address2}</span>\n                            </div>\n                            <div>\n                                <span>{contact.City} {contact.StateCode}, {contact.ZipCode}</span>\n                            </div>\n                        </div>\n                        {(contact.PhoneNumber || contact.EmailAddress) &&\n                            <div>\n                                <div>\n                                    <span className=\"member-contact-title\">Contact:</span>\n                                </div>\n                                <div>\n                                    <span>{contact.PhoneNumber}</span>\n                                </div>\n                                <div>\n                                    <span>{contact.EmailAddress}</span>\n                                </div>\n                            </div>\n                        }\n                    </div>\n                </div>\n            )}\n        </div>\n    );\n}\n\nexport default connect(\n    (state) => {\n        const { users, members, session, login } = state;\n        return {\n            users,\n            members,\n            session,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, userActionCreators, memberActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(MemberManagementGrid)","import React from 'react';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport '../../../stylesheets/lis-member-management/member-management.css';\nimport Select from 'react-select';\n\nconst customStyles = {\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        minHeight: 0,\n        fontSize: '0.8em',\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    }\n}\n\nconst ContactInformation = props => {\n    const { contactList, contactOptions } = props;\n    return (\n        <div>\n            <h3>Contact Information</h3>\n            {contactList.map((contact, contactIndex) => {\n                if (!contact.IsActive) {\n                    return (<div key={contactIndex}></div>)\n                }\n                return(<div key={contactIndex}>\n                    <div className=\"flex-row\">\n                        <div className=\"multi-row four no-margin\"/>                            \n                        <div>\n                            <button type=\"button\" onClick={() => props.removeContact(contactIndex)} className=\"button danger\">Remove Contact</button>\n                        </div>\n                    </div>\n                    <div className=\"inner-grid two\">\n                        <div>\n                            <div>\n                                <span className=\"member-contact-title\">Mailing Address</span>\n                            </div>\n                            <div className=\"multi-row three no-margin\">\n                                <div>\n                                    <label>Address Line 1</label>\n                                    <input\n                                        type=\"text\"\n                                        placeholder=\"Address Line 1\"\n                                        value={contact.Address1}\n                                        onChange={(e) => props.changeContact(contactIndex, 'Address1', e.target.value)}\n                                    />\n                                </div>\n                            </div>\n                            <div className=\"multi-row three no-margin\">\n                                <div>\n                                    <label>Address Line 2</label>\n                                    <input\n                                        type=\"text\"\n                                        placeholder=\"Address Line 2\"\n                                        value={contact.Address2}\n                                        onChange={(e) => props.changeContact(contactIndex, 'Address2', e.target.value)}\n                                    />\n                                </div>\n                            </div>\n                            <div className=\"multi-row three no-margin\">\n                                <div>\n                                    <label>City</label>\n                                    <input\n                                        type=\"text\"\n                                        placeholder=\"City\"\n                                        value={contact.City}\n                                        onChange={(e) => props.changeContact(contactIndex, 'City', e.target.value)}\n                                    />\n                                </div>\n                                <div>\n                                    <label>State</label>\n                                    <Select\n                                        styles={customStyles}\n                                        options={Fields.stateOptions}\n                                        value={Fields.stateOptions.find(option => option.label === contact.StateCode)}\n                                        onChange={(val) => props.changeContact(contactIndex, 'StateCode', val.label)}\n                                    />\n                                </div>\n                                <div>\n                                    <label>Zip Code</label>\n                                    <input\n                                        type=\"number\"\n                                        placeholder=\"Zip Code\"\n                                        value={contact.ZipCode}\n                                        onChange={(e) => props.changeContact(contactIndex, 'ZipCode', e.target.value)}\n                                    />\n                                </div>\n                            </div>\n                        </div>\n                        <div>\n                            <div>\n                                <span className=\"member-contact-title\">Contact</span>\n                            </div>\n                            <div className=\"multi-row three no-margin\">\n                                <div>\n                                    <label>Phone Number</label>\n                                    <input\n                                        type=\"text\"\n                                        placeholder=\"Phone Number\"\n                                        value={contact.PhoneNumber}\n                                        onChange={(e) => props.changeContact(contactIndex, 'PhoneNumber', e.target.value)}\n                                    />\n                                </div>\n                            </div>\n                            <div className=\"multi-row three no-margin\">\n                                <div>\n                                    <label>Email Address</label>\n                                    <input\n                                        type=\"text\"\n                                        placeholder=\"Email Address\"\n                                        value={contact.EmailAddress}\n                                        onChange={(e) => props.changeContact(contactIndex, 'EmailAddress', e.target.value)}\n                                    />\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                    <hr />\n                </div>\n            )})}\n            <button type=\"button\" className=\"button\" onClick={props.addContact}>Add Contact</button>\n        </div>\n    );\n\n}\n\nexport default ContactInformation;\n\n\n\n\n\n\n\n\n","import React from 'react';\nimport '../../../stylesheets/lis-member-management/member-management.css';\nimport Select from 'react-select';\n\nconst customStyles = {\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        minHeight: 0,\n        fontSize: '0.8em',\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    }\n}\n\nclass UserForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            username: '',\n            firstName: '',\n            lastName: '',\n            selectedDomain: '',\n        }\n        this.handleTextChange = this.handleTextChange.bind(this);\n        this.handleDomainChange = this.handleDomainChange.bind(this);\n        this.saveUser = this.saveUser.bind(this);\n    }\n\n    handleTextChange(key, val) {\n        this.setState({\n            [key]: val\n        });\n    }\n\n    handleDomainChange(val) {\n        this.setState({\n            selectedDomain: val\n        });\n    }\n\n    saveUser() {\n        // Create the request object. The actual request is made in the parent component\n        // The email address will be used as the username\n        const userObj = {\n            LoginID: this.state.username + \"@\" + this.state.selectedDomain.DomainName,\n            FirstName: this.state.firstName,\n            LastName: this.state.lastName,\n            DomainID: this.state.selectedDomain.DomainID,\n            IdentityID: this.props.personData.IdentityID,\n            IsActive: true\n        }\n        this.props.saveUser(userObj);\n    }\n\n    componentDidMount() {\n        if (this.props.personData.FirstName) {\n            this.setState({\n                firstName: this.props.personData.FirstName\n            });\n        }\n        if (this.props.personData.LastName) {\n            this.setState({\n                lastName: this.props.personData.LastName\n            });\n        }\n    }\n\n    render() {\n        const { domainOptions, isSaving } = this.props;\n        const { username, selectedDomain, firstName, lastName } = this.state;\n        return (\n            <div>\n                <h3>Connect a User</h3>\n                <form className=\"dlas-forms user-forms\">\n                    <div className=\"multi-row fifth-even no-margin\">\n                        <div>\n                            <label>Username</label>\n                            <input type=\"text\"\n                                placeholder=\"Username\"\n                                value={username}\n                                onChange={(e) => this.handleTextChange(\"username\", e.target.value)}\n                            />\n                        </div>\n                        <div>\n                            <label>Directory</label>\n                            <Select\n                                styles={customStyles}\n                                options={domainOptions}\n                                value={selectedDomain}\n                                onChange={this.handleDomainChange}\n                            />\n                        </div>\n                    </div>\n                    <div className=\"multi-row fifth-even no-margin\">\n                        <div>\n                            <label>First Name</label>\n                            <input type=\"text\"\n                                placeholder=\"First Name\"\n                                value={firstName}\n                                onChange={(e) => this.handleTextChange(\"firstName\", e.target.value)}\n                            />\n                        </div>\n                        <div>\n                            <label>Last Name</label>\n                            <input type=\"text\"\n                                placeholder=\"Last Name\"\n                                value={lastName}\n                                onChange={(e) => this.handleTextChange(\"lastName\", e.target.value)}\n                            />\n                        </div>\n                    </div>\n                </form>\n                <div className=\"button-bar\">\n                    <div>\n                        <button onClick={this.props.toggleUserCreation} disabled={isSaving} type=\"button\" className=\"button secondary\">Close</button>\n                    </div>\n                    <div className=\"align-right\">\n                        <button onClick={this.saveUser} disabled={isSaving || (!username || !selectedDomain)} type=\"button\" className=\"button\">Save & Close</button>\n                    </div>\n                </div>\n                <div>\n                    <div className=\"input-feedback\">{this.props.userError}</div>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default UserForm;\n\n\n\n\n\n\n\n\n","import React from 'react';\nimport '../../../stylesheets/lis-member-management/member-management.css';\nimport { bindActionCreators } from 'redux';\nimport { Link, Prompt } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { userActionCreators } from '../../../stores/lis-user-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport { sessionActionCreators } from \"../../../stores/lis-session-store\";\nimport ReactTooltip from 'react-tooltip';\nimport Select from 'react-select';\nimport moment from 'moment-timezone';\nimport DatePicker from 'react-datepicker';\nimport ReactTable from \"react-table\";\nimport ContactInformation from './lis-contact-form';\nimport UserForm from './lis-user-creation';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { cancelRequest } from '../../../services/request.service';\n\nconst customStyles = {\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n        paddingBottom: '4px !important'\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        minHeight: 0,\n        fontSize: '0.8em',\n    }),\n    menuList: (base) => ({\n        ...base,\n        paddingBottom: '4px !important'\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    }\n}\n\nclass MemberManagementForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoaded: false,\n            isSaving: false,\n            userFieldsetIsActive: true,\n            personalFieldsetIsActive: true,\n            memberFieldsetisActive: true,\n            memberData: '',\n            personData: '',\n            userData: [],\n            chamberOptions: [\n                { label: 'House', value: 'H' },\n                { label: 'Senate', value: 'S' }\n            ],\n            districtOptions: [],\n            contactOptions: [],\n            userList: [],\n            personList: [],\n            showUserCreation: false,\n            domainOptions: [],\n            statusOptions: [],\n            showPersonCreation: true,\n            memberNumberError: false,\n            isDirty: false\n        };\n\n        this.buildListDisplayName = this.buildListDisplayName.bind(this);\n        this.toggleFieldsetCollapse = this.toggleFieldsetCollapse.bind(this);\n        this.handleMemberChange = this.handleMemberChange.bind(this);\n        this.handlePersonChange = this.handlePersonChange.bind(this);\n        this.handleContactChange = this.handleContactChange.bind(this);\n        this.selectPerson = this.selectPerson.bind(this);\n        this.createPerson = this.createPerson.bind(this);\n        this.toggleUserCreation = this.toggleUserCreation.bind(this);\n        this.togglePersonCreation = this.togglePersonCreation.bind(this);\n        this.saveUser = this.saveUser.bind(this);\n        this.selectUser = this.selectUser.bind(this);\n        this.saveForm = this.saveForm.bind(this);\n        this.getMemberData = this.getMemberData.bind(this);\n    }\n\n    buildListDisplayName(personData) {\n        let listDisplayName = '';\n        listDisplayName = personData.LastName && personData.LastName != \"\" ? listDisplayName + \" \" + personData.LastName + \",\" : listDisplayName;\n        listDisplayName = personData.FirstName && personData.FirstName != \"\" ? listDisplayName + \" \" + personData.FirstName : listDisplayName;\n        listDisplayName = personData.MiddleName && personData.MiddleName != \"\" ? listDisplayName + \" \" + personData.MiddleName : listDisplayName;\n        listDisplayName = personData.AlternateName && personData.AlternateName != \"\" ? listDisplayName + \" \" + personData.AlternateName : listDisplayName;\n        listDisplayName = personData.Suffix && personData.Suffix != \"\" ? listDisplayName + \" \" + personData.Suffix : listDisplayName;\n\n        return listDisplayName;\n    }\n\n    buildMemberDisplayName(personData) {\n        let memberDisplayName = '';\n        memberDisplayName = personData.FirstName && personData.FirstName != \"\" ? memberDisplayName + \" \" + personData.FirstName : memberDisplayName;\n        memberDisplayName = personData.MiddleName && personData.MiddleName != \"\" ? memberDisplayName + \" \" + personData.MiddleName : memberDisplayName;\n        memberDisplayName = personData.AlternateName && personData.AlternateName != \"\" ? memberDisplayName + \" \" + personData.AlternateName : memberDisplayName;\n        memberDisplayName = personData.LastName && personData.LastName != \"\" ? memberDisplayName + \" \" + personData.LastName : memberDisplayName;\n        memberDisplayName = personData.Suffix && personData.Suffix != \"\" ? memberDisplayName + \" \" + personData.Suffix : memberDisplayName;\n\n        return memberDisplayName;\n    }\n\n    buildPatronDisplayName(personObj, memberDataObject) {\n        let patronDisplayName = '';\n\n        //Set the PatronDisplayName to last name, unless the last name is not unique\n        if (this.props.members.memberList.find(x => x.ListDisplayName && x.ListDisplayName.split(\",\")[0] === personObj.LastName && (memberDataObject ? x.MemberID !== memberDataObject.MemberID : true))\n            || this.props.members.memberList.find(x => x.PatronDisplayName && x.PatronDisplayName.split(\",\")[0] === personObj.LastName && (memberDataObject ? x.MemberID !== memberDataObject.MemberID : true))) {\n            patronDisplayName = personObj.LastName + \", \" + personObj.FirstName[0] + \". \" + (personObj.MiddleName ? personObj.MiddleName[0] + \".\" : \"\")\n        } else {\n            patronDisplayName = personObj.LastName\n        }\n\n        return patronDisplayName;\n    }\n\n    toggleFieldsetCollapse(fieldset) {\n        this.setState(state => ({\n            [fieldset]: !state[fieldset]\n        }));\n    };\n\n    handleMemberChange(key, value) {\n        let memberData = { ...this.state.memberData };\n        if (key === 'MemberNumber') {\n            value = value ? value.toUpperCase() : value;\n            if (value && ['H', 'S'].includes(value[0])) {\n                memberData['ChamberCode'] = value[0];\n            } else {\n                memberData['ChamberCode'] = null;\n                memberData['DistrictID'] = null;\n            }\n        }\n\n        if ([\"ListDisplayName\", \"PatronDisplayName\", \"MemberDisplayName\"].includes(key)) {\n            memberData[\"override\"] = true;\n            memberData[\"markOverride\"] = false;\n        }\n\n        memberData[key] = value;\n        this.setState({\n            memberData: memberData,\n            isDirty: true,\n        });\n    }\n\n    handlePersonChange(key, value) {\n        let personData = { ...this.state.personData };\n        let memberData = { ...this.state.memberData };\n        personData[key] = value;\n\n        if ([\"FirstName\", \"MiddleName\", \"AlternateName\", \"LastName\", \"Suffix\"].includes(key)) {\n            if (memberData[\"override\"] === true) {\n                memberData[\"markOverride\"] = true;\n                memberData[\"namesChanged\"] = true;\n            } else {\n                memberData[\"namesChanged\"] = true;\n            }\n        }\n\n        memberData.ListDisplayName = this.buildListDisplayName(personData).trim();\n        memberData.MemberDisplayName = this.buildMemberDisplayName(personData).trim();\n\n        this.setState({\n            personData: personData,\n            memberData: memberData,\n            isDirty: true\n        });\n    }\n\n    handleContactChange(stateVar, value) {\n        this.setState({\n            [stateVar]: value,\n            isDirty: true\n        });\n    }\n\n    selectPerson(person) {\n        this.setState({\n            personData: person\n        }, () => {\n            let newMember = {};\n            if (person.FirstName && person.LastName) {\n                newMember.MemberDisplayName = this.buildMemberDisplayName(person);\n                newMember.ListDisplayName = this.buildListDisplayName(person);\n            } else {\n                newMember.MemberDisplayName = '';\n                newMember.ListDisplayName = '';\n            }\n            this.setState({\n                memberData: newMember\n            });\n        });\n    }\n\n    createPerson() {\n        // Check to make sure the required fields are filled out\n        if (!this.state.memberData.MemberNumber || !this.state.memberData.ChamberCode || !this.state.memberData.DistrictID || !this.state.memberData.PartyCode || (!this.state.personData.IdentityID && (!this.state.memberData.MemberDisplayName || !this.state.memberData.ListDisplayName))) {\n            return;\n        }\n        this.setState({\n            isSaving: true\n        }, () => {\n            const personObj = {\n                ...this.state.personData,\n            }\n            // If the person object has an IdentityID then the user has selected a person from the person list.\n            // So there is no need to create a new person\n            let createPerson = ''\n            if (personObj.IdentityID) {\n                createPerson = () => Promise.resolve();\n            } else {\n                createPerson = this.props.actions.createPerson(personObj)\n                    .then(() => {\n                        // The person has been succesfully created. Time to create the member\n                        // The response from the person creation will return an ID\n                        return Promise.resolve();\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.props.actions.makeToast([{ message: \"Person Creation Failure\", type: \"failure\" }]);\n                        return Promise.reject(err);\n                    });\n            }\n            Promise.all([createPerson])\n                .then(() => {\n                    const newMemberObj = {\n                        ...this.state.memberData,\n                        SessionCode: this.props.sessionCode,\n                        IdentityID: personObj.IdentityID || this.props.users.personCreate,\n                    };\n                    newMemberObj.PatronDisplayName = this.buildPatronDisplayName(personObj);\n\n                    //Make sure member number is unique\n                    if (this.props.members.memberNumbers.find(x => x.MemberNumber === this.state.memberData.MemberNumber)) {\n                        this.setState({\n                            memberNumberError: true,\n                            isSaving: false\n                        })\n                        return;\n                    }\n\n                    this.props.actions.createMember(newMemberObj)\n                        .then(() => {\n                            const member = this.props.members.memberCreate;\n                            this.setState({ isDirty: false }, () => {\n                                // If everything was succesful then send the user to the edit page for the newly created member\n                                this.props.history.push(`/member-management/${member.SessionCode}/edit-member/${member.MemberID}`)\n                            })\n                        }).catch(err => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            this.props.actions.makeToast([{ message: \"Member Creation Failure\", type: \"failure\" }]);\n                            this.setState({\n                                isSaving: false,\n                                memberNumberError: false\n                            });\n                        })\n                });\n        });\n    }\n\n    toggleUserCreation() {\n        this.setState(state => ({\n            showUserCreation: !state.showUserCreation\n        }));\n    }\n\n    togglePersonCreation() {\n        this.setState(state => ({\n            showPersonCreation: !state.showPersonCreation,\n            personData: ''\n        }));\n    }\n\n    saveUser(userObj) {\n        this.setState({\n            isSaving: true\n        }, () => {\n            this.props.actions.createUser(userObj)\n                .then(() => {\n                    this.props.actions.makeToast([{ message: \"User Creation Success\", type: \"success\" }]);\n                    // Add the new user to the top of the user table\n                    // The password is returned which will be used in the table\n                    let fullName = (userObj.FirstName || '') + ' ' + (userObj.LastName || '');\n                    userObj = {\n                        ...userObj,\n                        ...this.props.users.userCreate,\n                        FullName: fullName\n                    }\n                    let userData = [...this.state.userData];\n                    userData.unshift(userObj);\n                    this.setState({\n                        isSaving: false,\n                        showUserCreation: false,\n                        userData: userData\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"User Creation Failed\", type: \"failure\" }]);\n                    this.setState({\n                        isSaving: false\n                    });\n                })\n        });\n    }\n\n    selectUser(rowIndex) {\n        const userData = [...this.state.userData];\n        userData[rowIndex].IsActive = !userData[rowIndex].IsActive;\n        this.setState({\n            userData: userData\n        });\n    }\n\n    saveForm() {\n        // Check to make sure the required fields are filled out\n        if (!this.state.memberData.MemberNumber || !this.state.memberData.ChamberCode || !this.state.memberData.DistrictID || !this.state.memberData.PartyCode || !this.state.personData.FullName) {\n            return;\n        }\n        //Make sure member number is unique        \n        if (this.props.members.memberNumbers.filter(x => x.MemberID !== this.state.memberData.MemberID).find(x => x.MemberNumber === this.state.memberData.MemberNumber)) {\n            this.setState({\n                memberNumberError: true\n            })\n            return;\n        }\n        this.setState({\n            isSaving: true,\n            memberNumberError: false\n        }, () => {\n            const { memberData, personData } = this.state;\n            let memberDataObject = { ...memberData };\n\n            //Set the PatronDisplayName to last name, unless the last name is not unique\n            //Ignore if names have been overridden by the user and the user hasn't gone back and overwritten the override\n            //Ignore if there have been no changes to the name fields\n            if ((memberData[\"override\"] && !memberData[\"markOverride\"]) || !memberData[\"namesChanged\"]) {\n                //Do nothing\n            } else {\n                memberDataObject.PatronDisplayName = this.buildPatronDisplayName(personData, memberDataObject);\n            }\n\n            memberDataObject.ChamberCode = memberDataObject.MemberNumber[0];\n\n            //Pressing the save button will save the member info, the person info, and the contact info for user, member, and person\n            const saveMember = this.props.actions.saveMember(memberDataObject)\n                .then(() => {\n                    return Promise.resolve();\n                }).catch(err => Promise.reject(err));\n            //Check to see if the person already exists before deciding to save or create the person\n            const savePerson = personData.IdentityID\n                ? this.props.actions.savePerson(personData)\n                    .then(() => {\n                        return Promise.resolve();\n                    }).catch(err => Promise.reject(err))\n                : this.props.actions.createPerson(personData)\n                    .then(() => {\n                        return Promise.resolve();\n                    }).catch(err => Promise.reject(err))\n\n            let contactArray = [];\n            let saveContact;\n            if (memberData.ContactInformation.length > 0) {\n                contactArray = [\n                    ...contactArray,\n                    ...memberData.ContactInformation\n                ];\n            }\n            if (personData && personData.ContactInformation.length > 0) {\n                contactArray = [\n                    ...contactArray,\n                    ...personData.ContactInformation\n                ];\n            }\n            if (contactArray.length === 0) {\n                saveContact = () => Promise.resolve();\n            }\n            const contactObj = { ContactInformation: contactArray }\n            saveContact = this.props.actions.saveContact(contactObj)\n                .then(() => {\n                    if (this.props.users.contactSaveError !== null) {\n                        Promise.reject(this.props.users.contactSaveError)\n                    } else {\n                        return Promise.resolve();\n                    }\n                }).catch(err => Promise.reject(err));\n\n            Promise.all([\n                saveMember,\n                savePerson,\n                saveContact\n            ])\n                .then(() => {\n                    this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n                    this.getMemberData(this.props.memberId);\n                    this.setState({\n                        isSaving: false,\n                        isDirty: false\n                    });\n                })\n                .catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: err.includes(\"Historical Member records can not be updated\") ? \"Updating historical members is prohibited.\" : \"Save Failed\", type: \"failure\" }]);\n                    this.setState({\n                        isSaving: false,\n                    });\n                });\n        });\n    }\n\n    async getMemberData(memberId) {\n        await this.props.actions.getMember(memberId + '?sessionCode=' + this.props.sessionCode, true)\n            .then(() => {\n                let memberData = { ...this.props.members.member };\n                let personData = memberData.Person.length > 0 ? { ...memberData.Person[0] } : '';\n                let userData = [];\n                if (personData) {\n                    userData = personData.UserProfile;\n\n                    if (!memberData.ListDisplayName) {\n                        memberData.ListDisplayName = this.buildListDisplayName(personData).trim();\n                    }\n                    if (!memberData.MemberDisplayName) {\n                        memberData.MemberDisplayName = this.buildMemberDisplayName(personData).trim();\n                    }\n                    if (!memberData.PatronDisplayName) {\n                        memberData.PatronDisplayName = this.buildPatronDisplayName(personData, memberData);\n                    }\n                }\n\n                this.setState({\n                    memberData: memberData,\n                    personData: personData,\n                    userData: userData\n                });\n                return Promise.resolve();\n            }).catch(err => Promise.reject(err));\n    }\n\n    componentDidMount() {\n        this.props.actions.getMemberNumbers();\n        const memberId = this.props.memberId;\n        let getMemberData = '';\n        let getPersonData = ''\n        //It will undefined if the user is creating a new member instead of editing an existing one.\n        if (memberId === undefined) {\n            getMemberData = () => Promise.resolve();\n            // If a new member is being created then a list of persons needs to be fetched to allow the user to associate\n            // the new member to an existing person\n            getPersonData = this.props.actions.getPersonList('')\n                .then(() => {\n                    this.setState({\n                        memberData: '',\n                        personData: '',\n                        userData: [],\n                        personList: this.props.users.personList,\n                        showPersonCreation: false\n                    });\n                    return Promise.resolve();\n                })\n        } else {\n            getPersonData = () => Promise.resolve();\n            getMemberData = this.getMemberData(memberId)\n        }\n        // Get list of districts for the district dropdown in member information\n        const getDistricts = this.props.actions.getDistricts()\n            .then(() => {\n                let districtOptions = [...this.props.members.districtList];\n                districtOptions.forEach(district => {\n                    district.label = `(${district.ChamberCode}) ${district.Title}`;\n                    district.value = district.DistrictID;\n                });\n                this.setState({\n                    districtOptions: districtOptions\n                });\n                return Promise.resolve();\n            });\n        const getParties = this.props.actions.getPartyCodeList()\n            .then(() => {\n                let partyOptions = [...this.props.members.partyCodeList];\n                partyOptions.forEach(party => {\n                    party.label = party.PartyCode;\n                    party.value = party.PartyCode;\n                });\n                this.setState({\n                    partyOptions: partyOptions\n                });\n                return Promise.resolve();\n            });\n        // Get the list of contact types used in the contact sections\n        const getContactTypes = this.props.actions.getContactReferences()\n            .then(() => {\n                let contactOptions = [...this.props.users.contactReferences];\n                contactOptions.forEach(type => {\n                    type.label = type.ContactType;\n                    type.value = type.ContactTypeID;\n                });\n                this.setState({\n                    contactOptions: contactOptions\n                });\n                return Promise.resolve();\n            })\n        // Get list of possible member status for the dropdown in member information\n        const getStatuses = this.props.actions.getMemberStatuses()\n            .then(() => {\n                let statusOptions = [...this.props.members.memberStatuses];\n                statusOptions.forEach(status => {\n                    status.label = status.Name;\n                    status.value = status.MemberStatusID;\n                });\n                this.setState({\n                    statusOptions: statusOptions\n                });\n                return Promise.resolve();\n            });\n\n\n        // Once all those requests are finished then show the page\n        Promise.all([\n            getMemberData,\n            getPersonData,\n            getDistricts,\n            getParties,\n            getContactTypes,\n            getStatuses\n        ])\n            .then(() => {\n                this.setState({\n                    isLoaded: true\n                });\n            })\n            .catch(err => {\n                console.log(err)\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isLoaded: true,\n                    message: 'Error returned when retrieving the data: ' + err\n                });\n            });\n\n        //Get a list of AD directories. Used for creating a user. This does not appear on the main form so the page can be loaded before finishing this request\n        this.props.actions.getDirReferences()\n            .then(() => {\n                let dirList = [...this.props.users.dirList];\n                dirList.forEach(dir => {\n                    dir.label = dir.DomainName;\n                    dir.value = dir.DomainID;\n                });\n                this.setState({\n                    domainOptions: dirList\n                });\n                return Promise.resolve();\n            });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n\n    render() {\n        if (!this.state.isLoaded) {\n            return (\n                <div className=\"center-spinner spinner\">Loading results...</div>\n            );\n        }\n        if (this.state.message) {\n            return (\n                <div className=\"dlas-forms\">\n                    <span>{this.state.message}</span>\n                </div>\n            );\n\n        }\n        return (\n            <div className=\"dlas-forms user-forms\">\n                <div>\n                    <Prompt\n                        when={this.state.isDirty}\n                        message={`You have unsaved changes. Are you sure you would like to leave?`}\n                    />\n                </div>\n                {this.state.showUserCreation &&\n                    <div className=\"overlay\">\n                        <div className=\"full\">\n                            <div className=\"overlay-content animated-fade-in-up\">\n                                <UserForm\n                                    toggleUserCreation={this.toggleUserCreation}\n                                    isSaving={this.state.isSaving}\n                                    domainOptions={this.state.domainOptions}\n                                    saveUser={this.saveUser}\n                                    userError={this.props.users.userCreateError}\n                                    personData={this.state.personData}\n                                />\n                            </div>\n                        </div>\n                    </div>\n                }\n                <form>\n                    <fieldset className={this.state.personalFieldsetIsActive ? 'fieldset-collapse' : 'fieldset-collapse fieldset-closed'}>\n                        <legend onClick={() => this.toggleFieldsetCollapse('personalFieldsetIsActive')}>Personal Information</legend>\n                        {this.state.showPersonCreation ?\n                            <PersonInformation\n                                person={this.state.personData}\n                                contactOptions={this.state.contactOptions}\n                                handlePersonChange={this.handlePersonChange}\n                                handleContactChange={this.handleContactChange}\n                                memberId={this.props.memberId}\n                                togglePersonCreation={this.togglePersonCreation}\n                            />\n                            :\n                            <PersonTable\n                                personList={this.state.personList}\n                                togglePersonCreation={this.togglePersonCreation}\n                                selectPerson={this.selectPerson}\n                            />\n                        }\n                    </fieldset>\n                    <fieldset className={this.state.memberFieldsetisActive ? 'fieldset-collapse' : 'fieldset-collapse fieldset-closed'}>\n                        <legend onClick={() => this.toggleFieldsetCollapse('memberFieldsetisActive')}>Member Information</legend>\n                        <MemberInformation\n                            member={this.state.memberData}\n                            chamberOptions={this.state.chamberOptions}\n                            districtOptions={this.state.districtOptions}\n                            statusOptions={this.state.statusOptions}\n                            partyOptions={this.state.partyOptions}\n                            contactOptions={this.state.contactOptions}\n                            handleMemberChange={this.handleMemberChange}\n                            handleContactChange={this.handleContactChange}\n                            memberId={this.props.memberId}\n                            memberNumberError={this.state.memberNumberError}\n                        />\n                    </fieldset>\n                    <div className=\"button-bar\">\n                        <div>\n                            <Link to=\"/member-management\" className=\"button secondary\">Close</Link>\n                        </div>\n                        <div className=\"align-right\">\n                            {!this.props.memberId ?\n                                <button disabled={this.state.isSaving} type=\"button\" onClick={this.createPerson} className=\"button\">Create</button>\n                                :\n                                <button disabled={this.state.isSaving} className=\"button\" onClick={this.saveForm} type=\"button\">Save</button>\n                            }\n\n                        </div>\n                    </div>\n                </form>\n            </div>\n        );\n    }\n};\n\n\nclass UserInformation extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showPassword: []\n        };\n        this.toggleShowPassword = this.toggleShowPassword.bind(this);\n    }\n\n    toggleShowPassword(e, userIndex) {\n        if (e) {\n            e.stopPropagation();\n        }\n        let showPassword = this.state.showPassword;\n        showPassword[userIndex] = !showPassword[userIndex];\n        this.setState({\n            showPassword: showPassword\n        });\n    }\n\n    render() {\n        const { user, person } = this.props;\n\n        return (<div>\n            <div className=\"align-right\">\n                <button type=\"button\" onClick={this.props.toggleUserCreation} className=\"button add-wide\">Add User</button>\n            </div>\n            <ReactTable\n                data={user}\n                getTrProps={(state, rowInfo) => {\n                    let background = '';\n                    if (rowInfo) {\n                        background = rowInfo.original.IsActive ? '#89ff89' : '';\n                    }\n                    return {\n                        style: {\n                            background: background,\n                            cursor: rowInfo ? 'pointer' : 'default'\n                        },\n                        onClick: () => this.props.selectUser(rowInfo.index)\n                    }\n                }}\n                noDataText=\"No Users Found\"\n                columns={[\n                    {\n                        id: \"checkbox\",\n                        accessor: \"\",\n                        className: \"checkbox-column\",\n                        Cell: ({ original }) => {\n                            return <span\n                                className={original.IsActive ? \"icon checkmark\" : \"\"}>\n                            </span>;\n                        },\n                        sortable: false,\n                        filterable: false,\n                        width: 45\n                    },\n                    {\n                        Header: \"Login\",\n                        Cell: ({ original, index }) => {\n                            return (\n                                <div className=\"flex-row\">\n                                    <div>{original.LoginID}</div>\n                                    {original.Password &&\n                                        <div>\n                                            {this.state.showPassword[index] ?\n                                                <span style={{ fontWeight: 700 }}>{original.Password} <button type=\"button\" onClick={(e) => this.toggleShowPassword(e, index)} className=\"button small-button\">Hide</button></span>\n                                                :\n                                                <button type=\"button\" onClick={(e) => this.toggleShowPassword(e, index)} className=\"button small-button\">Show Password</button>\n                                            }\n                                        </div>\n                                    }\n                                </div>\n                            );\n                        }\n                    },\n                    {\n                        Header: \"Organization\",\n                        accessor: \"OrganizationName\",\n                        width: 300\n                    },\n                ]}\n                defaultPageSize={5}\n                className=\"-striped -highlight\"\n            />\n        </div>)\n    }\n}\n\nclass PersonTable extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedPersonIndex: null,\n            search: '',\n            personList: []\n        };\n        this.handleSearchChange = this.handleSearchChange.bind(this);\n        this.selectPerson = this.selectPerson.bind(this);\n    }\n\n    handleSearchChange(e) {\n        const val = e.target.value;\n        let personList = [...this.props.personList];\n        const formattedSearch = val.toLowerCase().replace(/ /g, '');\n        let filteredPersonList = null;\n        if (formattedSearch !== '') {\n            filteredPersonList = personList.filter(person => {\n                if (person.FullName) {\n                    return person.FullName.toLowerCase().includes(formattedSearch);\n                }\n            });\n        }\n        this.setState({\n            search: val,\n            personList: filteredPersonList || personList,\n            selectedPersonIndex: null\n        });\n    }\n\n    selectPerson(personIndex) {\n        this.setState({\n            selectedPersonIndex: personIndex\n        });\n        this.props.selectPerson(this.state.personList[personIndex]);\n    }\n\n    componentDidMount() {\n        this.setState({\n            personList: this.props.personList\n        });\n    }\n\n    render() {\n        return (\n            <div>\n                <div className=\"flex-row\">\n                    <input\n                        type=\"text\"\n                        onChange={this.handleSearchChange}\n                        value={this.state.search}\n                        placeholder=\"Search\"\n                    />\n                    <button onClick={this.props.togglePersonCreation} type=\"button\" className=\"button add-wide\">Add Person</button>\n                </div>\n                {!this.state.selectedPersonIndex && this.state.selectedPersonIndex != 0 && <div className=\"input-feedback align-right\">Person is required.</div>}\n                <br />\n                <ReactTable\n                    data={this.state.personList}\n                    getTrProps={(state, rowInfo) => {\n                        return {\n                            style: {\n                                background: rowInfo && rowInfo.index === this.state.selectedPersonIndex ? '#89ff89' : '',\n                                cursor: rowInfo ? 'pointer' : 'default'\n                            },\n                            onClick: () => this.selectPerson(rowInfo.index)\n                        }\n                    }}\n                    noDataText=\"No Persons Found\"\n                    columns={[\n                        {\n                            id: \"checkbox\",\n                            accessor: \"\",\n                            className: \"checkbox-column\",\n                            Cell: ({ original, index }) => {\n                                return <span className={index === this.state.selectedPersonIndex ? \"icon checkmark\" : \"\"}></span>;\n                            },\n                            sortable: false,\n                            filterable: false,\n                            width: 45\n                        },\n                        {\n                            Header: \"Name\",\n                            accessor: \"FullName\"\n                        },\n                    ]}\n                    defaultPageSize={5}\n                    className=\"-striped -highlight\"\n                />\n            </div>\n        );\n    }\n}\n\nclass PersonInformation extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.changeContact = this.changeContact.bind(this);\n        this.addContact = this.addContact.bind(this);\n        this.removeContact = this.removeContact.bind(this);\n    }\n\n    changeContact(contactIndex, key, value) {\n        let person = { ...this.props.person };\n        person.ContactInformation[contactIndex][key] = value;\n        this.props.handleContactChange(\"personData\", person);\n    }\n\n    addContact() {\n        let person = { ...this.props.person };\n        person.ContactInformation.push({\n            OwnerID: person.IdentityID,\n            IsActive: true,\n            IsPublic: true\n        });\n        this.props.handleContactChange(\"personData\", person);\n    }\n\n    removeContact(contactIndex) {\n        let person = { ...this.props.person };\n        // If it doesn't have an ID then that means it hasn't been saved yet. So remove it from the array\n        if (!person.ContactInformation[contactIndex].ContactInformationID) {\n            person.ContactInformation.splice(contactIndex, 1)\n        } else {\n            person.ContactInformation[contactIndex].IsActive = false;\n        }\n        this.props.handleContactChange(\"personData\", person);\n    }\n\n    render() {\n        const { person, contactOptions } = this.props;\n        return (\n            <div>\n                {/* if the memberid is there then a member already exists and already associated to a person */}\n                {!this.props.memberId &&\n                    <div className=\"align-right\">\n                        <button type=\"button\" className=\"button\" onClick={this.props.togglePersonCreation}>Use Existing Person</button>\n                    </div>\n                }\n                <div className=\"multi-row sixth-even no-margin\">\n                    <div>\n                        <label>Prefix</label>\n                        <input type=\"text\"\n                            placeholder=\"Prefix\"\n                            value={person.Prefix}\n                            onChange={(e) => this.props.handlePersonChange('Prefix', e.target.value)}\n                        />\n                    </div>\n                    <div>\n                        <label>First Name</label>\n                        <input type=\"text\"\n                            placeholder=\"First Name\"\n                            value={person.FirstName}\n                            onChange={(e) => this.props.handlePersonChange('FirstName', e.target.value)}\n                        />\n                    </div>\n                    <div>\n                        <label>Middle Name</label>\n                        <input type=\"text\"\n                            placeholder=\"Middle Name\"\n                            value={person.MiddleName}\n                            onChange={(e) => this.props.handlePersonChange('MiddleName', e.target.value)}\n                        />\n                    </div>\n                    <div>\n                        <label>Nickname</label>\n                        <input type=\"text\"\n                            placeholder=\"Nickname\"\n                            value={person.AlternateName}\n                            onChange={(e) => this.props.handlePersonChange('AlternateName', e.target.value)}\n                        />\n                    </div>\n                    <div>\n                        <label>Last Name</label>\n                        <input type=\"text\"\n                            placeholder=\"Last Name\"\n                            value={person.LastName}\n                            onChange={(e) => this.props.handlePersonChange('LastName', e.target.value)}\n                        />\n                    </div>\n                    <div>\n                        <label>Suffix</label>\n                        <input type=\"text\"\n                            placeholder=\"Suffix\"\n                            value={person.Suffix}\n                            onChange={(e) => this.props.handlePersonChange('Suffix', e.target.value)}\n                        />\n                    </div>\n                </div>\n                <div>\n                    {/* Do not allow the user to create a contact for a person that hasn't been created yet */}\n                    {this.props.memberId &&\n                        <ContactInformation\n                            changeContact={this.changeContact}\n                            contactOptions={contactOptions.filter(option => option.OwnerTypeID === 1)}\n                            removeContact={this.removeContact}\n                            addContact={this.addContact}\n                            contactList={person.ContactInformation || []}\n                        />\n                    }\n                </div>\n            </div>);\n    }\n}\n\nclass MemberInformation extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.changeContact = this.changeContact.bind(this);\n        this.addContact = this.addContact.bind(this);\n        this.removeContact = this.removeContact.bind(this);\n    }\n\n    changeContact(contactIndex, key, value) {\n        let member = { ...this.props.member };\n        member.ContactInformation[contactIndex][key] = value;\n        this.props.handleContactChange(\"memberData\", member);\n    }\n\n    addContact() {\n        let member = { ...this.props.member };\n        member.ContactInformation.push({\n            OwnerID: member.MemberID,\n            IsActive: true,\n            IsPublic: true\n        });\n        this.props.handleContactChange(\"memberData\", member);\n    }\n\n    removeContact(contactIndex) {\n        let member = { ...this.props.member };\n        // If it doesn't have an ID then that means it hasn't been saved yet. So remove it from the array\n        if (!member.ContactInformation[contactIndex].ContactInformationID) {\n            member.ContactInformation.splice(contactIndex, 1)\n        } else {\n            member.ContactInformation[contactIndex].IsActive = false;\n        }\n        this.props.handleContactChange(\"memberData\", member);\n    }\n\n    render() {\n        const { member, chamberOptions, districtOptions, statusOptions, partyOptions, contactOptions, invalidGabEmail, invalidGabPhone, memberNumberError } = this.props;\n        return (\n            <div>\n                <div className=\"multi-row sixth-even no-margin\">\n                    <div>\n                        <label>Member Display Name</label>\n                        <i data-tip={`Member display name is how the member's name appears on the primary member listing page and the patronage section of a bill's detail and bill limits page.\\nThe member display name is updated automatically when the name fields above are modified, but can be overridden here.`} className=\"icon notification member-form\" />\n                        <ReactTooltip key={new Date()} />\n                        <input type=\"text\"\n                            placeholder=\"Member Display Name\"\n                            value={member.MemberDisplayName}\n                            onChange={(e) => this.props.handleMemberChange('MemberDisplayName', e.target.value)}\n                            style={member.markOverride ? { color: \"red\" } : {}} />\n                    </div>\n                    <div>\n                        <label>Member Patron Name</label>\n                        <i data-tip={`Patron display name is how the member's last name is shown on the bill versions, calendar, communication, docket, etc.\\nThe patron display name is set when the member is saved unless the value has been overridden here.`} className=\"icon notification member-form\" />\n                        <ReactTooltip key={new Date()} />\n                        <input type=\"text\"\n                            placeholder=\"Member Patron Name\"\n                            value={member.PatronDisplayName}\n                            onChange={(e) => this.props.handleMemberChange('PatronDisplayName', e.target.value)}\n                            style={member.markOverride ? { color: \"red\" } : {}}\n                        />\n                    </div>\n                    <div>\n                        <label>List Display Name</label>\n                        <i data-tip={`List display name is how the member's name appears on BDS/eFile, member and watchlist notification searching, and how my legislator voted.\\nThe list display name is updated automatically when the name fields are modified, but can be overridden here.`} className=\"icon notification member-form\" />\n                        <ReactTooltip key={new Date()} />\n                        <input type=\"text\"\n                            placeholder=\"List Display Name\"\n                            value={member.ListDisplayName}\n                            onChange={(e) => this.props.handleMemberChange('ListDisplayName', e.target.value)}\n                            style={member.markOverride ? { color: \"red\" } : {}}\n                        />\n                    </div>\n                    <div>\n                        <label>Member Number</label>\n                        <input type=\"text\"\n                            placeholder=\"Member Number\"\n                            value={member.MemberNumber}\n                            onChange={(e) => this.props.handleMemberChange('MemberNumber', e.target.value)}\n                        />\n                        {!member.MemberNumber && <div className=\"input-feedback\">Member Number is required.</div>}\n                        {memberNumberError && <div className=\"input-feedback\">Member Number is already in use.</div>}\n                    </div>\n                    <div />\n                </div>\n                <div className=\"multi-row sixth-even no-margin\">\n                    <div>\n                        <label>Party Code</label>\n                        <Select\n                            styles={customStyles}\n                            value={partyOptions.find(option => option.value === member.PartyCode)}\n                            key={member.PartyCode}\n                            options={partyOptions}\n                            onChange={(val) => this.props.handleMemberChange('PartyCode', val.value)}\n                        />\n                        {!member.PartyCode && <div className=\"input-feedback\">Party Code is required.</div>}\n                    </div>\n                    <div>\n                        <label>District</label>\n                        <Select\n                            styles={customStyles}\n                            value={districtOptions.find(option => option.value === member.DistrictID && option.ChamberCode === member.ChamberCode)}\n                            key={member.DistrictID}\n                            isDisabled={!member.ChamberCode}\n                            options={districtOptions.filter(option => option.ChamberCode === member.ChamberCode)}\n                            onChange={(val) => this.props.handleMemberChange('DistrictID', val.value)}\n                        />\n                        {!member.DistrictID && <div className=\"input-feedback\">District is required.</div>}\n                    </div>\n                    <div>\n                        <label>Voting Sequence</label>\n                        <input type=\"number\"\n                            placeholder=\"Voting Sequence\"\n                            value={member.VotingSequence}\n                            onChange={(e) => this.props.handleMemberChange('VotingSequence', e.target.value)}\n                        />\n                    </div>\n                    <div>\n                        <label>Seat Number</label>\n                        <input type=\"number\"\n                            placeholder=\"Seat Number\"\n                            value={member.SeatNumber}\n                            onChange={(e) => this.props.handleMemberChange('SeatNumber', e.target.value)}\n                        />\n                    </div>\n                    <div>\n                        <label>Status</label>\n                        <Select\n                            styles={customStyles}\n                            options={statusOptions}\n                            key={member.MemberStatusID}\n                            value={statusOptions.find(option => option.value === member.MemberStatusID)}\n                            onChange={(val) => this.props.handleMemberChange('MemberStatusID', val.value)}\n                        />\n                    </div>\n                    <div>\n                        <label htmlFor=\"is-public-button\" className=\"checkbox-label no-background\" style={{ paddingLeft: '0px' }}>Is Public?</label>\n                        <div className=\"toggle-switch\" onClick={() => this.props.handleMemberChange('IsPublic', !member.IsPublic)}>\n                            <input id=\"is-public-button\" checked={member.IsPublic} type=\"checkbox\" style={{ width: 'inherit' }} />\n                            <span className=\"slider\"></span>\n                        </div>\n                    </div>\n                </div>\n                <div className=\"multi-row sixth-even no-margin\">\n                    <div>\n                        <label>Service Start Date</label>\n                        <DatePicker\n                            selected={member.ServiceBeginDate ? moment(member.ServiceBeginDate) : null}\n                            key={member.ServiceBeginDate}\n                            onChange={(val) => this.props.handleMemberChange('ServiceBeginDate', val)}\n                            isClearable\n                        />\n                    </div>\n                    <div>\n                        <label>Service End Date</label>\n                        <DatePicker\n                            selected={member.ServiceEndDate ? moment(member.ServiceEndDate) : null}\n                            key={member.ServiceEndDate}\n                            onChange={(val) => this.props.handleMemberChange('ServiceEndDate', val)}\n                            isClearable\n                        />\n                    </div>\n                    <div>\n                        <label>Service End Reason</label>\n                        <input\n                            type=\"text\"\n                            placeholder=\"Ex. Retired\"\n                            value={member.ServiceEndReason}\n                            onChange={(e) => this.props.handleMemberChange('ServiceEndReason', e.target.value)}\n                            disabled={!member.ServiceEndDate}\n                        />\n                    </div>\n                    <div>\n                        <label>GAB Email Address</label>\n                        <input type=\"text\"\n                            placeholder=\"GAB Email Address\"\n                            value={member.GABEmailAddress}\n                            onChange={(e) => this.props.handleMemberChange('GABEmailAddress', e.target.value)}\n                        />\n                    </div>\n                    <div>\n                        <label>GAB Phone Number</label>\n                        <input type=\"text\"\n                            placeholder=\"GAB Phone Number\"\n                            value={member.GABPhoneNumber}\n                            onChange={(e) => this.props.handleMemberChange('GABPhoneNumber', e.target.value)}\n                        />\n                    </div>\n                    <div>\n                        <label>Room Number</label>\n                        <input type=\"text\"\n                            placeholder=\"Room Number\"\n                            value={member.RoomNumber}\n                            onChange={(e) => this.props.handleMemberChange('RoomNumber', e.target.value)}\n                        />\n                    </div>\n                </div>\n                <div>\n                    {/* Do not allow the user to create a contact for a member that hasn't been created yet */}\n                    {this.props.memberId &&\n                        <ContactInformation\n                            changeContact={this.changeContact}\n                            contactOptions={contactOptions.filter(option => option.OwnerTypeID === 3)}\n                            removeContact={this.removeContact}\n                            addContact={this.addContact}\n                            contactList={member.ContactInformation || []}\n                        />\n                    }\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, users, members, session } = state;\n        return {\n            nav,\n            users,\n            members,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, userActionCreators, memberActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(MemberManagementForm)\n\n\n\n\n\n\n\n\n","import React from 'react';\nimport { Route } from 'react-router';\nimport MemberManagementGrid from './lis-member-grid';\nimport MemberManagementForm from './lis-member-form';\n\nconst CreateMember = props => <div><h1>Create Member</h1><MemberManagementForm history={props.history} sessionCode={props.match.params.sessionCode} /></div>;\nconst EditMember = props => <div><h1>Edit Member</h1><MemberManagementForm history={props.history} sessionCode={props.match.params.sessionCode} memberId={props.match.params.memberid} /></div>;\n\nclass MemberManagement extends React.Component {\n\n    render() {\n        return (\n            <div>\n                <Route exact path={this.props.match.path} component={MemberManagementGrid} />\n                <Route path={`${this.props.match.path}/:sessionCode/create-member`} component={CreateMember} />\n                <Route path={`${this.props.match.path}/:sessionCode/edit-member/:memberid`} component={EditMember} />\n            </div>\n        )\n    }\n}\n\nexport default MemberManagement;","import React from \"react\";\nimport ReactTable from \"react-table\";\nimport { Link } from 'react-router-dom';\nimport '../../../stylesheets/shared/react-table.css';\nimport moment from 'moment-timezone';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { cancelRequest } from '../../../services/request.service';\n\nfunction isEmpty(obj) {\n    for (var key in obj) {\n        if (obj.hasOwnProperty(key))\n            return false;\n    }\n    return true;\n}\n\nclass SessionGridComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            defaultSession: '',\n            error: null,\n            isLoaded: false,\n            data: [],            \n            filtered: [{ id: 'all', value: 'true' }],\n            currentYear: (new Date()).getFullYear(),\n            isCurrentBiennium: true,\n            filterAll: 'true',            \n        };        \n        this.filterAll = this.filterAll.bind(this);\n        this.getSessionList = this.getSessionList.bind(this);\n    }\n\n    //When component has mounted, make the call to the list users API\n    componentDidMount() {\n        this.getSessionList();\n    }\n\n    onFilteredChange(filtered) {\n        if (filtered.length > 1 && this.state.filterAll.length) {\n            // NOTE: this removes any FILTER ALL filter\n            const filterAll = '';\n            this.setState({ filtered: filtered.filter((item) => item.id !== 'all'), filterAll })\n        }\n        else\n            this.setState({ filtered });\n    }\n\n    getSessionList() {\n        this.props.actions.getSessionList().then(() => {\n            const defaultSession = this.props.session.sessionList.find(session => session.IsDefault === true)\n            this.setState({\n                data: this.props.session.sessionList,\n                isLoaded: true,\n                defaultSession: defaultSession ? defaultSession.SessionYear + ' ' + defaultSession.DisplayName : \"\"\n            })\n        })\n    }\n\n    getTrProps = (state, rowInfo, instance) => {\n        if (rowInfo) {\n            return {\n                style: {\n                    background: rowInfo.original.IsDefault ? 'rgb(202, 225, 241)' : null,\n                }\n            }\n        }\n        return true;\n    }\n\n\n    filterAll(e) {\n        const { value } = e.target;\n        const filterAll = value;\n        const filtered = [{ id: 'all', value: filterAll }];\n        // NOTE: this completely clears any COLUMN filters\n        this.setState({ filterAll, filtered });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { defaultSession } = this.state;\n        return (\n            <div>\n                <div className=\"header-half\">\n                    <h1>Session Management</h1>\n                    <p>Default Display Session: <span> {defaultSession}</span></p>\n                </div>\n\n                <div className=\"toolbar session-toolbar\">\n                    <div className=\"dlas-forms\">\n                        <select value={this.state.filterAll} onChange={this.filterAll}>\n                            <option value=\"true\">Current Biennium</option>\n                            <option value=\"false\">All Sessions</option>\n                        </select> \n                    </div>\n                    <div>\n                        <Link to=\"/session-management/edit-session\" className=\"button add-wide\">New Session</Link>\n                    </div>\n                </div>\n                <ReactTable\n                    filtered={this.state.filtered}\n                    resizable={false}\n                    loading={!this.state.isLoaded}\n                    defaultFilterMethod={(filter, row) => {\n                        if (filter.value === \"false\") {\n                            return true;\n                        }\n                        if (filter.value === \"true\") {\n                            return row.SessionYear === this.state.currentYear || row.SessionYear === this.state.currentYear - 1;\n                        }\n                    }}\n                    data={this.state.data}\n                    ref={r => this.reactTable = r}\n                    onFilteredChange={this.onFilteredChange.bind(this)}\n                    SubComponent={row => {\n                        return (\n                            <div className={row.original.IsDefault ? 'selected-session' : null} style={{ padding: \"10px\" }}>\n                                <ul>\n                                    <li>{row.original.Name}</li>\n                                    <li>{row.original.Year}</li>\n                                    <li>{row.original.SessionType}</li>\n                                </ul>\n                            </div>\n                        );\n                    }}\n                    columns={[\n                        {\n                            Header: \"Year\",\n                            accessor: \"SessionYear\",\n                            id: \"yearfilter\",\n                            width: 80\n                        },\n                        {\n                            Header: \"Type\",\n                            accessor: \"SessionType\",\n                            width: 85\n                        },\n                        {\n                            Header: \"Name\",\n                            accessor: \"DisplayName\",\n                            width: 180\n                        },\n                        {\n                            Header: \"Prefile Start\",\n                            Cell: ({ original }) => {\n                                if (original.SessionEvents !== undefined) {\n                                    for (var i = 0; i < original.SessionEvents.length; i++) {\n                                        //check for Session Start event type ID\n                                        if (original.SessionEvents[i].DisplayName === \"Prefile Date\") {\n                                            return moment(original.SessionEvents[i].ActualDate).format('L')\n                                        }\n                                    }\n                                    return false;\n                                } else {\n                                    return ' '\n                                }\n                            }\n                        },\n                        {\n                            Header: \"Session Start\",\n                            Cell: ({ original }) => {\n                                const sessionStartObj = original.SessionEvents && original.SessionEvents.length && original.SessionEvents.find(date => date.DisplayName === \"Session Start\");\n                                const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate) : '';\n                                return moment(startDate).format(\"MM/DD/YYYY\");\n                            }\n                        },\n                        {\n                            Header: \"Bill Cutoff\",\n                            Cell: ({ original }) => {\n                                if (original.SessionEvents !== undefined) {\n                                    for (var i = 0; i < original.SessionEvents.length; i++) {\n                                        if (original.SessionEvents[i].DisplayName === \"Bill Cutoff\") {\n                                            return moment(original.SessionEvents[i].ActualDate).format('L')\n                                        }\n                                    }\n                                    return false;\n                                } else {\n                                    return ' '\n                                }\n                            }\n                        },\n                        {\n                            Header: \"Crossover\",\n                            Cell: ({ original }) => {\n                                if (original.SessionEvents !== undefined) {\n                                    for (var i = 0; i < original.SessionEvents.length; i++) {\n                                        if (original.SessionEvents[i].DisplayName === \"Crossover\") {\n                                            return moment(original.SessionEvents[i].ActualDate).format('L')\n                                        }\n                                    }\n                                    return false;\n                                } else {\n                                    return ' '\n                                }\n                            }\n                        },\n                        {\n                            Header: \"Adjournment\",\n                            Cell: ({ original }) => {\n                                if (original.SessionEvents !== undefined) {\n                                    for (var i = 0; i < original.SessionEvents.length; i++) {\n                                        if (original.SessionEvents[i].DisplayName === \"Adjournment\") {\n                                            return moment(original.SessionEvents[i].ActualDate).format('L')\n                                        }\n                                    }\n                                    return false\n                                } else {\n                                    return ' '\n                                }\n                            }\n                        },\n                        {\n                            Header: \"Reconvene\",\n                            Cell: ({ original }) => {\n                                if (original.SessionEvents !== undefined) {\n                                    for (var i = 0; i < original.SessionEvents.length; i++) {\n                                        if (original.SessionEvents[i].DisplayName === \"Reconvene\") {\n                                            return moment(original.SessionEvents[i].ActualDate).format('L')\n                                        }\n                                    }\n                                    return false;\n                                } else {\n                                    return ' '\n                                }\n                            }\n                        },\n                        {\n                            Header: \"Action\",\n                            headerClassName: \"header-action\",\n                            accessor: \"action\",\n                            className: \"action-column\",\n                            width: 50,\n                            expander: true,\n                            Expander: ({ isExpanded, ...rest }) => {\n                                return (\n                                    <button className=\"button view\">View</button>\n                                );\n                            }\n                        },\n                        {\n                            Header: \"\",\n                            accessor: \"edit\",\n                            headerClassName: \"all-column\",\n                            width: 40,\n                            Cell: row => {\n                                return (\n                                    <Link to={`/session-management/edit-session/${row.original.SessionID}`} className=\"button edit\">Edit</Link>\n                                )\n                            }\n                        },\n                        {\n                            Header: \"All\",\n                            id: 'all',\n                            headerClassName: \"all-column\",\n                            width: 0,\n                            resizable: false,\n                            sortable: false,\n                            Filter: () => { },\n                            getProps: () => {\n                                return {\n                                    style: { padding: \"0px\"}\n                                }\n                            },\n                            filterMethod: (filter, rows) => {\n                                if (filter.value === \"false\") {\n                                    return true;\n                                }\n                                if (filter.value === \"true\") {\n                                    return rows.yearfilter === this.state.currentYear || rows.yearfilter === this.state.currentYear - 1;\n                                }\n                            }\n                        }\n                    ]}\n                    defaultSorted={[\n                        {\n                            id: \"yearfilter\",\n                            desc: true\n                        }\n                    ]}\n                    defaultPageSize={10}\n                    className=\"session-table -striped -highlight\"\n                    getTrProps={this.getTrProps}\n                />\n                <br />\n\n            </div>\n        );\n    }\n}\n\nconst SessionManagementGrid = connect(\n    (state) => {\n        const { session } = state;\n        return {\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators), dispatch)\n        }\n    }\n)(SessionGridComponent)\n\nexport default SessionManagementGrid;","import React from 'react';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport DatePicker from 'react-datepicker';\nimport Select from 'react-select';\nimport moment from 'moment-timezone';\nimport { Link, Prompt } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport { cancelRequest } from '../../../services/request.service';\n\nclass SessionForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            sessionEvents: [],\n            sessionData: '',\n            selectedSessionType: '',\n            selectedSessionEventType: '',\n            sessionEventData: [],\n            isSaving: false,\n            isDirty: false\n        };\n\n        this.handleInputChange = this.handleInputChange.bind(this);\n        this.handleEventChange = this.handleEventChange.bind(this);\n        this.handleSessionEventTypeChange = this.handleSessionEventTypeChange.bind(this);\n        this.handleCopyContinuedChange = this.handleCopyContinuedChange.bind(this);\n        this.addSessionDate = this.addSessionDate.bind(this);\n        this.saveForm = this.saveForm.bind(this);\n    }\n\n    handleInputChange(value, key) {\n        let sessionData = { ...this.state.sessionData };\n        if (key === 'SessionCode') {\n            //we allow for more than just single-digit special session # (e.g. Special Session V) despite the fact that this will never (say never) happen\n            value = value.replace(/[^0-9]/, \"\").substr(0, 6);\n            const sessionCodeSuffix = value && value.length >= 5 ? value.substr(4) : null;\n            if (sessionCodeSuffix) {\n                sessionData['SessionYear'] = value.substr(0, 4);\n                sessionData['SessionType'] = sessionCodeSuffix === '1' ? 'Regular' : 'Special';\n                sessionData['DisplayName'] = sessionData['SessionType'] + ' Session';\n                if (sessionData['SessionType'] === 'Special') {\n                    sessionData['DisplayName'] += ' ' + this.romanize(Number(sessionCodeSuffix) - 1);\n                }\n                const sessionTypeData = Fields.sessionTypeOptions.find(type => type.label === sessionData['SessionType']);\n                sessionData['SessionTypeID'] = sessionTypeData ? sessionTypeData.value : null; //null will fail but I think it's better than guessing\n            } else {\n                sessionData['DisplayName'] = null;\n                sessionData['SessionYear'] = null;\n                sessionData['SessionType'] = null;\n                sessionData['SessionTypeID'] = null;\n            }\n        }\n        sessionData[key] = value;\n        this.setState({\n            sessionData: sessionData,\n            isDirty: true\n        });\n    }\n\n    romanize(num) {\n        if (isNaN(num))\n            return NaN;\n        var digits = String(+num).split(\"\"),\n            key = [\"\", \"C\", \"CC\", \"CCC\", \"CD\", \"D\", \"DC\", \"DCC\", \"DCCC\", \"CM\",\n                \"\", \"X\", \"XX\", \"XXX\", \"XL\", \"L\", \"LX\", \"LXX\", \"LXXX\", \"XC\",\n                \"\", \"I\", \"II\", \"III\", \"IV\", \"V\", \"VI\", \"VII\", \"VIII\", \"IX\"],\n            roman = \"\",\n            i = 3;\n        while (i--)\n            roman = (key[+digits.pop() + (i * 10)] || \"\") + roman;\n        return Array(+digits.join(\"\") + 1).join(\"M\") + roman;\n    }\n\n    handleEventChange(value, index) {\n        let sessionEventData = [...this.state.sessionEventData];\n        if (value) {\n            sessionEventData[index].ActualDate = value;\n        } else {\n            // If the user clicks the 'X' button on a date then remove it from the session event list\n            sessionEventData.splice(index, 1);\n        }\n        this.setState({\n            sessionEventData: sessionEventData\n        });\n    }\n\n    handleSessionEventTypeChange(value) {\n        this.setState({\n            selectedSessionEventType: value\n        });\n    }\n\n    handleCopyContinuedChange(value) {\n        this.setState({\n            copyContinuedLegislation: value,\n            isDirty: true\n        })\n    }\n\n    addSessionDate() {\n        if (this.state.selectedSessionEventType) {\n            // Set the correct values for the new event date\n            let selectedSessionEventType = { ...this.state.selectedSessionEventType };\n            selectedSessionEventType.DisplayName = selectedSessionEventType.Name;\n            selectedSessionEventType.ActualDate = moment();\n            // Add it to the session events \n            let sessionEventData = [...this.state.sessionEventData];\n            sessionEventData.push(selectedSessionEventType);\n            this.setState({\n                sessionEventData: sessionEventData,\n                selectedSessionEventType: '',\n                isDirty: true\n            });\n        }\n\n    }\n\n    saveForm() {\n        let sessionData = this.state.sessionData;\n        let sessionEventData = this.state.sessionEventData;\n        let startDate = sessionEventData.find(date => date.DisplayName === \"Session Start\");\n        let prefileDate = sessionEventData.find(date => date.DisplayName === \"Prefile Date\");\n        let prefileDueDate = sessionEventData.find(date => date.DisplayName === \"Prefile Draft Due\");\n        // Lets do some validation\n        let error = false;\n        if (!sessionData.SessionCode || sessionData.SessionCode.length < 5) {\n            this.setState({ codeError: true });\n            error = true;\n        }\n        if (!startDate || !startDate.ActualDate) {\n            this.setState({ startDateError: true });\n            error = true;\n        } else if (!prefileDate || !prefileDate.ActualDate) {\n            this.setState({ prefileDateError: true });\n            error = true;\n        } else if (sessionData.SessionType === \"Regular\" && (!prefileDueDate || !prefileDueDate.ActualDate)) {\n            this.setState({ prefileDueDateError: true });\n            error = true;\n        }\n        if (!sessionData.DisplayName) {\n            this.setState({ displayNameError: true });\n            error = true;\n        }\n        if (!error) {\n            if ((!this.props.match.params.id || Number(this.state.initialSessionCode) !== Number(sessionData.SessionCode)) && this.state.sessionList.find(session => Number(session.SessionCode) === Number(sessionData.SessionCode))) {\n                this.props.actions.makeToast([{ message: \"Session Code Already In Use\", type: \"failure\" }]);\n                return;\n            }\n            this.setState({\n                isSaving: true\n            });\n            sessionData.SessionEvents = sessionEventData;\n            sessionData.CopyContinuedLegislation = this.state.copyContinuedLegislation ? this.state.copyContinuedLegislation.value : false;\n            let action = '';\n            if (this.props.match.params.id) {\n                action = this.props.actions.editSession(sessionData);\n            } else {\n                action = this.props.actions.createSession(sessionData);\n            }\n            action\n                .then(() => {\n                    this.setState({\n                        isSaving: false,\n                        isDirty: false\n                    }, () => {\n                        this.props.history.push('/session-management');\n                        this.props.actions.makeToast([{ message: \"Session Saved\", type: \"success\" }]);\n                        this.props.actions.reloadSessionSelector(true);\n                    })\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                    this.setState({\n                        isSaving: false,\n                    });\n                });\n        }\n    }\n\n    componentDidMount() {\n        //Get the session events\n        this.props.actions.getSessionEventTypes()\n            .then(() => {\n                let sessionEventTypes = [...this.props.session.sessionEventTypes];\n                sessionEventTypes.forEach(event => {\n                    event.label = event.Name;\n                    event.value = event.EventTypeID;\n                })\n                this.setState({\n                    sessionEvents: sessionEventTypes,\n                    sessionEventsIsLoaded: true\n                });\n            });\n        this.props.actions.getSessionList()\n            .then(() => {\n                const sessionList = [...this.props.session.sessionList];\n                this.setState({ sessionList, sessionsAreLoaded: true })\n            })\n        if (this.props.match.params.id) {\n            // This is an existing session. Go ahead and get the data\n            this.props.actions.getSessionById(this.props.match.params.id, true)\n                .then(() => {\n                    const selectedSession = this.props.session.selectedSession\n                    const selectedSessionType = Fields.sessionTypeOptions.find(type => type.value == selectedSession.SessionTypeID);\n                    this.setState({\n                        sessionData: selectedSession,\n                        initialSessionCode: selectedSession.SessionCode,\n                        selectedSessionType: selectedSessionType || '',\n                        sessionEventData: selectedSession.SessionEvents || [],\n                        isLoaded: true\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.setState({\n                        isLoaded: true,\n                        message: err.toString()\n                    });\n                })\n            //if session already has bills, do not allow session code change\n            this.props.actions.getSessionBills('?sessionID= ' + this.props.match.params.id)\n                .then(() => {\n                    if (this.props.bills.sessionBills && this.props.bills.sessionBills.length > 0) {\n                        this.setState({ sessionHasBills: true })\n                    }\n                    this.setState({ sessionBillsAreLoaded: true })\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.setState({\n                        sessionBillsAreLoaded: true,\n                        sessionHasBills: true //default to not allowing them to change the session code if the request fails..\n                    });\n                })\n        } else {\n            this.setState({\n                isLoaded: true,\n                sessionBillsAreLoaded: true\n            });\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { sessionData, sessionEventData, sessionEvents, selectedSessionEventType, selectedSessionType, copyContinuedLegislation } = this.state;\n        if (this.state.message) {\n            <div className=\"fail\">{this.state.message}</div>\n        }\n        const customStyles = {\n            option: (base, state) => ({\n                ...base,\n                fontSize: '0.8em',\n            }),\n            control: (base) => ({\n                ...base,\n                padding: '1px',\n                margin: 0,\n                minHeight: 0,\n                fontSize: '0.8em',\n            }),\n            singleValue: (base, state) => {\n                return { ...base, };\n            }\n        }\n        //Filter out the events that have already been added to the session\n        const filteredSessionEvents = sessionEvents.filter(event => {\n            if (sessionEventData.findIndex(eventData => eventData.EventTypeID === event.EventTypeID) < 0) {\n                return event;\n            }\n        });\n        if (this.state.isLoaded && this.state.sessionEventsIsLoaded && this.state.sessionsAreLoaded && this.state.sessionBillsAreLoaded) {\n            return (\n                <div className=\"user-forms\">\n                    <div>\n                        <Prompt\n                            when={this.state.isDirty}\n                            message={`You have unsaved changes. Are you sure you would like to leave?`}\n                        />\n                    </div>\n                    <div className=\"dlas-forms\">\n                        <form>\n                            <legend>\n                                <span>Session Setup</span>\n                                {sessionData.SessionYear && sessionData.DisplayName &&\n                                    <span style={{ float: 'right' }}>{sessionData.SessionYear + \" \" + sessionData.DisplayName}</span>\n                                }\n                            </legend>\n                            <div className=\"multi-row fifth-even no-margin\">\n                                <div>\n                                    <label className=\"label\" htmlFor=\"session-code\">Session Code</label>\n                                    <input\n                                        id=\"session-code\"\n                                        className={this.state.codeError && (!sessionData.SessionCode || sessionData.SessionCode.length < 5) ? 'input-error' : ''}\n                                        type=\"text\"\n                                        placeholder=\"Session Code\"\n                                        disabled={this.state.sessionHasBills}\n                                        value={sessionData.SessionCode || ''}\n                                        onChange={(e) => this.handleInputChange(e.target.value, 'SessionCode')}\n                                    />\n                                </div>\n\n                                {sessionEventData.map((event, eventIndex) =>\n                                    <div key={eventIndex}>\n                                        <label className=\"label\">{event.DisplayName}</label>\n                                        <DatePicker\n                                            selected={event.ActualDate ? moment(event.ActualDate) : null}\n                                            isClearable\n                                            onChange={(value) => {\n                                                this.handleEventChange(moment(value), eventIndex)\n                                            }}\n                                        />\n                                    </div>\n\n                                )}\n                            </div>\n                            <div className=\"multi-row fifth-even no-margin\">\n                                <div>\n                                    {filteredSessionEvents.length > 0 &&\n                                        <div>\n                                            <label>Add Session Date</label>\n                                            <Select\n                                                styles={customStyles}\n                                                className={(this.state.startDateError && !sessionEventData.find(date => date.DisplayName === \"Session Start\")) || (this.state.prefileDateError && !sessionEventData.find(it => it.DisplayName === \"Prefile Date\")) || (sessionData.SessionType === \"Regular\" && this.state.prefileDueDateError && !sessionEventData.find(it => it.DisplayName === \"Prefile Draft Due\")) ? 'input-error' : ''}\n                                                id=\"SessionDateTypeSelector\"\n                                                value={selectedSessionEventType}\n                                                options={filteredSessionEvents}\n                                                onChange={this.handleSessionEventTypeChange}\n                                            />\n                                            {this.state.startDateError && !sessionEventData.find(date => date.DisplayName === \"Session Start\") &&\n                                                <span className=\"input-feedback\">Please select a Session Start Date</span>\n                                            }\n                                            {this.state.prefileDateError && !sessionEventData.find(it => it.DisplayName === \"Prefile Date\") &&\n                                                <span className=\"input-feedback\">Please select a Session Prefile Date</span>\n                                            }\n                                            {sessionData.SessionType === \"Regular\" && this.state.prefileDueDateError && !sessionEventData.find(it => it.DisplayName === \"Prefile Draft Due\") &&\n                                                <span className=\"input-feedback\">Please select a Session Prefile Due Date</span>\n                                            }\n                                        </div>\n                                    }\n                                </div>\n                                <div>\n                                    {filteredSessionEvents.length > 0 &&\n                                        <div>\n                                            <br />\n                                            <button\n                                                disabled={!selectedSessionEventType}\n                                                className=\"button\"\n                                                type=\"button\"\n                                                onClick={this.addSessionDate}>\n                                                Add</button>\n                                        </div>\n                                    }\n                                </div>\n                                <div>\n                                    <label htmlFor=\"is-active-button\" className=\"checkbox-label no-background\" style={{ paddingLeft: '0px' }}>Session Active</label>\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange(!sessionData.IsActive, 'IsActive')}>\n                                        <input id=\"is-active-button\" checked={sessionData.IsActive} type=\"checkbox\" />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                </div>\n                                <div>\n                                    <label htmlFor=\"is-default-button\" className=\"checkbox-label no-background\" style={{ paddingLeft: '0px' }}>Default Display Session</label>\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange(!sessionData.IsDefault, 'IsDefault')}>\n                                        <input id=\"is-default-button\" checked={sessionData.IsDefault} type=\"checkbox\" />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                </div>\n                                <div>\n                                    <label htmlFor=\"CopyContinuedLegislation\">Copy Continued Bills</label>\n                                    <Select\n                                        styles={customStyles}\n                                        id=\"CopyContinuedLegislation\"\n                                        value={copyContinuedLegislation}\n                                        options={[\n                                            { label: \"Select...\", value: false },\n                                            { label: \"Yes\", value: true },\n                                        ]}\n                                        onChange={this.handleCopyContinuedChange}\n                                    />\n                                </div>\n                            </div>\n                            <div className=\"button-bar\">\n                                <div>\n                                </div>\n                                <div className=\"align-right\">\n                                    <Link to=\"/session-management\" className=\"button secondary\">Cancel</Link>\n                                    <button className=\"button\" type=\"button\" disabled={this.state.isSaving} onClick={this.saveForm}>Save</button>\n                                </div>\n                            </div>\n                        </form>\n                    </div>\n                </div>\n            );\n        } else {\n            return (<div className=\"center-spinner spinner\">Loading...</div>)\n        }\n    }\n};\n\nexport default connect(\n    (state) => {\n        const { session, nav, bills } = state;\n        return {\n            nav,\n            session,\n            bills\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, sessionActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(SessionForm)","import React from 'react';\nimport { Route } from 'react-router';\nimport SessionManagementGrid from './lis-session-grid';\nimport SessionManagementForm from './lis-session-form';\n\n\nclass SessionManagement extends React.Component {\n\n    render() {       \n\n        return (\n            <div>\n                <Route exact path={this.props.match.path} component={SessionManagementGrid} />\n                <Route exact path={`${this.props.match.path}/edit-session`} component={SessionManagementForm} />\n                <Route exact path={`${this.props.match.path}/edit-session/:id`} component={SessionManagementForm} />\n            </div>\n        )\n    }\n}\n\nexport default SessionManagement;","import React from \"react\";\nimport ReactTable from \"react-table\";\nimport { Link } from 'react-router-dom';\nimport '../../../stylesheets/shared/react-table.css';\nimport moment from 'moment-timezone';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { cancelRequest } from '../../../services/request.service';\n\nclass CommitteeGridComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showCreateSuccess: false,\n            showCreateFailure: false,\n            isSubcommittee: false,\n            error: null,\n            isLoaded: false,\n            disableChamberSelector: false,\n            selectedError: null,\n            filtered: [],\n            currentDate: new Date(),\n            filterChamber: '',\n            filterAll: '',\n            filterName: '',\n            committeeNameInput: '',\n            committeeNumberInput: '',\n            chamberOptions: [\n                { label: 'House', value: 'H' },\n                { label: 'Senate', value: 'S' }\n            ]\n        };\n\n        this.filterAll = this.filterAll.bind(this);\n        this.committeeNameChange = this.committeeNameChange.bind(this);\n        this.committeeNumberChange = this.committeeNumberChange.bind(this);\n        this.filterChamber = this.filterChamber.bind(this);\n        this.sendCreateDetails = this.sendCreateDetails.bind(this);\n    };\n\n    getCommittees() {\n        var params = \"PendingChange=\" + true;\n        this.props.actions.getPartnerCommittees(params).then(() => {\n            //Get rid of the tables loading screen because the data is loaded\n            this.setState({\n                isLoaded: true\n            })\n            //set the default chamber to house or senate depending on the user's role\n            let filterChamber = '';\n            let disableChamberSelector = false;\n            const scopes = this.props.login.userClaims.scopes;\n            const houseScope = scopes.find(scope => scope === \"House\");\n            const senateScope = scopes.find(scope => scope === \"Senate\");\n            //Checks to see if the user doesn't have both roles (like if they weren't admin). If they have both roles then leave the preselected chamber as all\n            if ((houseScope && !senateScope) || (!houseScope && senateScope)) {\n                //Find which role the user has\n                const scope = scopes.find(scope => scope === \"House\" || scope === \"Senate\");\n                filterChamber = this.state.chamberOptions.find(chamber => chamber.label === scope).value;\n                disableChamberSelector = true;\n            } else {\n                filterChamber = this.props.committee.committeeChamber;\n            }\n            this.setState({\n                filterChamber: filterChamber,\n                disableChamberSelector: disableChamberSelector\n            });\n        });\n    }\n\n    sendCreateDetails() {\n        var newCommittee = {\n            Name: this.state.committeeNameInput,\n            CommitteeNumber: this.state.committeeNumberInput,\n            ChamberCode: this.state.filterChamber,\n            IsPublic: 0\n        }\n        this.props.actions.createNewCommittee(newCommittee).then(() => {\n            this.setState({\n                showCreateSuccess: true,\n                showCreateFailure: false\n            });\n            setTimeout(function () {\n                this.setState({\n                    showCreateSuccess: false,\n                    showCreateFailure: false\n                });\n            }.bind(this), 5000);\n            this.getCommittees()\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            this.setState({\n                showCreateSuccess: false,\n                showCreateFailure: true\n            })\n            setTimeout(function () {\n                this.setState({\n                    showCreateSuccess: false,\n                    showCreateFailure: false\n                });\n            }.bind(this), 5000);\n            this.getCommittees()\n        })\n    }\n\n    onFilteredChange(filtered) {\n        if (filtered.length > 1 && this.state.filterAll.length) {\n            // NOTE: this removes any FILTER ALL filter\n            const filterAll = '';\n            this.setState({ filtered: filtered.filter((item) => item.id !== 'all'), filterAll })\n        }\n        else\n            this.setState({ filtered });\n    }\n\n    committeeNameChange(e) {\n        const { value } = e.target;\n        const committeeName = value;\n        // NOTE: this completely clears any COLUMN filters\n        this.setState({ committeeNameInput: committeeName });\n    }\n\n    committeeNumberChange(e) {\n        const { value } = e.target;\n        const committeeNumber = value;\n        // NOTE: this completely clears any COLUMN filters\n        this.setState({ committeeNumberInput: committeeNumber });\n    }\n\n    componentDidMount() {\n        this.getCommittees()\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    filterAll(e) {\n        const { value } = e.target;\n        const filterAll = value;\n        const filtered = [{ id: 'all', value: filterAll }];\n        // NOTE: this completely clears any COLUMN filters\n        this.setState({ filterAll, filtered });\n    }\n\n    filterChamber(e) {\n        const { value } = e.target;\n        const filterChamber = value;\n        this.setState({ filterChamber }, () => {\n            this.props.actions.toggleChamber(filterChamber);\n        });\n    }\n\n    render() {\n        const { committee } = this.props;\n        //Filter the table if the user has selected a chamber\n        const tableData = this.state.filterChamber ?\n            this.props.committee.partnerCommittees.filter(committee => committee.ChamberCode === this.state.filterChamber)\n            :\n            this.props.committee.partnerCommittees;\n        return (\n            <div>\n                <div className=\"header-half\">\n                    <h1>Committee Management</h1>\n                </div>\n                <div className=\"toolbar committee-bar\">\n                    <div className=\"dlas-forms\">\n                        {this.props.login.userClaims.claims.find(x => x.RoleName === \"Admin\") &&\n                            <div>\n                                <label>Chamber</label>\n                                <select value={this.state.filterChamber} onChange={this.filterChamber} disabled={this.state.disableChamberSelector}>\n                                    <option value=\"\">All</option>\n                                    <option value=\"S\">Senate</option>\n                                    <option value=\"H\">House</option>\n                                </select>\n                            </div>\n                        }\n                        <div>\n                            <label>Committee Name</label>\n                            <input value={this.state.filterAll} onChange={this.filterAll} />\n                        </div>\n                    </div>\n                </div>\n                {committee.partnerCommitteesError &&\n                    <p className=\"small-text message-error\">{committee.partnerCommitteesError}</p>\n                }\n                {committee.createCommitteeMessage &&\n                    <p className=\"small-text message-error\">{committee.createCommitteeMessage}</p>\n                }\n                <ReactTable\n                    filtered={this.state.filtered}\n                    resizable={false}\n                    defaultFilterMethod={(filter, row) =>\n                        String(row[filter.id]) === filter.value}\n                    defaultSorted={[\n                        {\n                            id: \"Name\"\n                        }\n                    ]}\n                    data={tableData}\n                    noDataText={committee.committeePartnerListError}\n                    loading={!this.state.isLoaded}\n                    ref={r => this.reactTable = r}\n                    onFilteredChange={this.onFilteredChange.bind(this)}\n                    columns={[\n                        {\n                            Header: \"Committee Name\",\n                            columns: [\n                                {\n                                    Header: (\n                                        <div className=\"dlas-forms\">\n                                            {!this.state.showCreateSuccess && !this.state.showCreateFailure &&\n                                                <div className=\"committee-grid-header-inputs\">\n                                                    <input id=\"insert-new-committee\" type=\"text\" value={this.state.committeeNameInput} placeholder=\"Type new committee name and committee number, click create\" onChange={this.committeeNameChange} disabled={this.state.isSubcommittee} />\n                                                    <input id=\"insert-new-committee-number\" type=\"text\" value={this.state.committeeNumberInput} placeholder=\"Committee number\" onChange={this.committeeNumberChange} />\n                                                </div>\n                                            }\n                                            {this.state.showCreateSuccess &&\n                                                <span className=\"insert-message\">Committee was created successfully!</span>\n                                            }\n                                            {this.state.showCreateFailure &&\n                                                <span className=\"insert-message fail\">Committee creation failed</span>\n                                            }\n                                        </div>\n                                    ),\n                                    headerClassName: \"header-insert\",\n                                    accessor: \"Name\",\n                                    sortable: false,\n                                    filterAll: true,\n                                    Cell: row => {\n                                        return (\n                                            <span id={'cm-namecell-' + row.index}>{row.original.Name}</span>\n                                        )\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Service Start Date\",\n                            columns: [\n                                {\n                                    headerClassName: \"header-insert\",\n                                    accessor: \"PendingChange\",\n                                    sortable: false,\n                                    filterAll: true,\n                                    width: 150,\n                                    Cell: row => {\n                                        if (row.original.ServiceBeginDate === '0001-01-01T00:00:00') {\n                                            return <span className=\"txt-greyed\" id={'cm-pending-' + row.index}>Pending</span>\n                                        }\n                                        else {\n                                            return <span id={'cm-pending-' + row.index}>{row.original.ServiceBeginDate ? moment(row.original.ServiceBeginDate).format('L') : ''}</span>\n                                        }\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Actions\",\n                            headerClassName: \"submit-action\",\n                            columns: [\n\n                                {\n                                    Header: (<span><button id=\"submit-new-committee\" onClick={this.sendCreateDetails} disabled={!this.state.filterChamber || !this.state.committeeNameInput || !this.state.committeeNumberInput} className=\"button\">Create</button></span>),\n                                    headerClassName: \"header-action\",\n                                    accessor: \"action\",\n                                    sortable: false,\n                                    className: \"action-column\",\n                                    width: 120,\n                                    Cell: row => {\n                                        return (\n                                            <div className=\"committee-action-column\">\n                                                <Link id={'cm-edit-' + row.index} to={`/committee-management/edit-committee/${row.original.CommitteeID}`} className=\"button edit\">Edit</Link>\n                                                <Link id={'cm-flag-' + row.index} to={`/docket-management/${row.original.CommitteeID}`} className=\"button paper\">Docket</Link>\n                                                {row.original.PendingChange ? <span id={'cm-flag-' + row.index} className=\"button flag\">Flag</span> : <span></span>}\n                                            </div>\n                                        )\n                                    }\n                                },\n                                {\n                                    Header: \"All\",\n                                    id: 'all',\n                                    className: \"all-column\",\n                                    headerClassName: \"all-header\",\n                                    width: 0,\n                                    resizable: false,\n                                    sortable: false,\n                                    Filter: () => { },\n                                    getProps: () => {\n                                        return {\n                                            style: { padding: \"0px\" }\n                                        }\n                                    },\n                                    filterMethod: (filter, row, column) => {\n                                        // convert to lowercase before comparing\n                                        var lowercaseRow = row.Name.toLowerCase();\n                                        var lowercaseFilter = filter.value.toLowerCase();\n                                        if (lowercaseRow.includes(lowercaseFilter)) {\n                                            return true\n                                        }\n                                    },\n                                }\n                            ]\n                        },\n                    ]}\n                    defaultPageSize={15}\n                    pageSizeOptions={[5, 10, 15, 20, 25, 50, 100]}\n                    className=\"committee-table -striped -highlight\"\n                />\n                <br />\n\n            </div>\n        );\n    }\n}\n\nconst CommitteeManagementGrid = connect(\n    (state) => {\n        const { login, committee, nav } = state;\n        return {\n            login,\n            committee,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, committeeActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(CommitteeGridComponent)\n\n\nexport default CommitteeManagementGrid;","import React from 'react';\nimport moment from 'moment-timezone';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\n\n\n// THE REORDER FUNCTION THAT FIRES WHEN ITEM IS DROPPED\nconst reorder = (list, startIndex, endIndex) => {\n    const result = Array.from(list);\n    const [removed] = result.splice(startIndex, 1);\n\n    result.splice(endIndex, 0, removed);\n    // Reorder the Sequence value too!\n    result.forEach(function (element, index) {\n        element.Sequence = index + 1\n    });\n    return result;\n};\n\n// STYLE TO SHOW WHEN ITEM IS BEING DRAGGED\nconst getItemStyle = (isDragging, draggableStyle, pendingDeletion) => ({\n    // some basic styles to make the items look a bit nicer\n    userSelect: 'none',\n    // change background colour if dragging\n    background: isDragging ? '#34495e' : 'white',\n    color: isDragging ? 'white' : '#34495e',\n    border: pendingDeletion ? 'red' : 'none',\n    // styles we need to apply on draggables\n    ...draggableStyle,\n});\n\nconst getListStyle = isDraggingOver => ({\n    background: isDraggingOver ? '#8b9fb3' : '#666666',\n    width: '100%',\n});\n\n\nclass PersonnelDraggableComponent extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedPersonnel: ''\n        };\n        this.onDragEnd = this.onDragEnd.bind(this);\n        this.onInsert = this.onInsert.bind(this);\n        this.handleDropDownChange = this.handleDropDownChange.bind(this);\n    }\n\n    onInsert(staffRoleTypeID) {\n        let selectedPersonnel = this.state.selectedPersonnel\n        //Make sure that a member is selected before trying to add \n        if (selectedPersonnel.IdentityID) {\n            delete selectedPersonnel.EffectiveEndDate;\n            //set isPublic to false by default just in case the user doesn't want to publish just yet\n            selectedPersonnel.IsPublic = false;\n            //Set the correct committee ID\n            selectedPersonnel.AffiliationID = this.props.affiliation;\n            //Set the correct StaffRoleTypeID (1 = clerk, 2 = staff)\n            selectedPersonnel.StaffRoleTypeID = staffRoleTypeID\n            selectedPersonnel.Sequence = this.props.items.length + 1;\n            this.props.onPersonnelChange([...this.props.items, selectedPersonnel]);\n            this.setState({\n                selectedPersonnel: ''\n            })\n        }\n    }\n\n    onRemove(rowID) {\n        var tempArray = this.props.items\n\n        tempArray.forEach(function (element) {\n            if (element.StaffID === rowID) {\n                //the element has already been marked to be deleted. un-mark it\n                if (element.EffectiveEndDate) {\n                    delete element.EffectiveEndDate;\n                } else {\n                    element.EffectiveEndDate = moment(new Date()).format(\"YYYY-MM-DDTHH:mm:ss.SS[Z]\");\n                }\n            }\n        })\n        this.props.onPersonnelChange(tempArray)\n\n    }\n\n    handleDropDownChange = value => {\n        //this function runs again after the member is inserted. It does not have a value so the dropdown text is replaced with the word 'Select'\n        if (value) {\n            var personnel = value;\n            var personnelArray = {\n                ...personnel,\n                Sequence: this.props.items.length\n            }\n            this.setState({\n                selectedPersonnel: personnelArray\n            });\n        } else {\n            this.setState({\n                selectedPersonnel: 'Select...'\n            })\n        }\n    }\n\n    onDragEnd(result) {\n        // dropped outside the list\n        if (!result.destination) {\n            return;\n        }\n        const items = reorder(\n            this.props.items,\n            result.source.index,\n            result.destination.index\n        );\n\n        this.props.onPersonnelChange(items);\n    }\n\n\n    render() {\n        const { items, dropdownData, name } = this.props;\n        const { selectedPersonnel } = this.state;\n        const headers = ['Name', 'Phone', 'Email'];\n        const keys = ['FullName', 'PhoneNumber', 'Email']\n        return (\n            <DragDropContext onDragEnd={this.onDragEnd}>\n                <Droppable droppableId={`${name}-droppable`}>\n                    {(provided, snapshot) => (\n                        <table\n                            className=\"dnd-grid-table personnel-grid\"\n                            ref={provided.innerRef}\n                            style={getListStyle(snapshot.isDraggingOver)}\n                        >\n                            <thead className=\"dnd-grid-header\" style={getListStyle(snapshot.isDraggingOver)}>\n                                <tr>\n                                    <th scope=\"col\" id={name + '-grabber-column'}></th>\n                                    <th scope=\"col\" id={name + '-display-column'}>Display #</th>\n                                    {headers.map((item, index) => (\n                                        <th key={index} scope=\"col\" id={name + '-' + item + '-column'} >{item}</th>\n                                    ))}\n                                    <th scope=\"col\" id={name + '-actions-column'}>Actions</th>\n                                </tr>\n                            </thead>\n                            <tbody>\n                                <SelectMenu\n                                    items={items}\n                                    name={name}\n                                    dropdownData={dropdownData}\n                                    handleDropDownChange={this.handleDropDownChange}\n                                    selectedPersonnel={selectedPersonnel}\n                                    onInsert={this.onInsert.bind(this, this.props.staffRoleTypeID)}\n                                />\n\n                                {this.props.items.map((item, index) => (\n                                    <Draggable key={`${item.StaffID}-${item.Sequence}`} draggableId={`${item.StaffID}-${item.Sequence}`} index={index}>\n                                        {(provided, snapshot) => (\n                                            <tr\n                                                className={item.EffectiveEndDate ? 'pending-delete' : ''}\n                                                id={name + '-' + item.StaffID}\n                                                ref={provided.innerRef}\n                                                {...provided.draggableProps}\n                                                {...provided.dragHandleProps}\n                                                style={getItemStyle(\n                                                    snapshot.isDragging,\n                                                    provided.draggableProps.style\n                                                )}\n                                            >\n                                                <td><button id={name + '-' + item.StaffID + '-grabber-button'} className=\"button draggable\">Drag and drop</button></td>\n                                                <td id={name + '-' + item.StaffID + '-index'}>{index + 1}</td>\n\n                                                {keys.map((key, index) => (\n                                                    <td key={index} id={name + '-' + item.StaffID + '-' + key}>{item[key]}</td>\n                                                ))}\n                                                <td><button id={name + '-' + item.StaffID + '-delete-button'} type=\"button\" onClick={this.onRemove.bind(this, item.StaffID)} className={item.EffectiveEndDate ? \"button add\" : \"button remove\"}>Delete</button></td>\n                                            </tr>\n                                        )}\n                                    </Draggable>\n                                ))}\n\n                                {provided.placeholder}\n                            </tbody>\n                        </table>\n                    )}\n                </Droppable>\n            </DragDropContext>\n        );\n    }\n}\n\nfunction SelectMenu(props) {\n\n    let dropdown = [];\n    //Remove personnel from dropdown that already belong to the committee\n    props.dropdownData.forEach(function (element) {\n        let isDuplicate = false;\n        props.items.forEach(function (item) {\n            if (item.IdentityID === element.IdentityID) {\n                isDuplicate = true;\n            }\n        });\n        if (!isDuplicate) {\n            dropdown.push(element);\n        }\n    })\n\n    return (\n        <tr id={props.name + '-insert-row'} className=\"dnd-insert-row\">\n            <td></td>\n            <td></td>\n            <td><Fields.Dropdown\n                className=\"grid-selector-dropdown\"\n                classNamePrefix=\"grid-selector-dropdown\"\n                value={props.selectedPersonnel}\n                options={dropdown}\n                id={props.name + '-dropdown'}\n                onChange={props.handleDropDownChange} />\n            </td>\n            <td id={props.name + '-phone-td'}>{props.selectedPersonnel.PhoneNumber}</td>\n            <td id={props.name + '-email-td'}>{props.selectedPersonnel.Email}</td>\n            <td><button type=\"button\" id={props.name + '-insert-button'} className=\"button\" onClick={props.onInsert}>Insert</button></td>\n        </tr>\n    )\n}\n\nexport default PersonnelDraggableComponent;","import React from 'react';\nimport DatePicker from \"react-datepicker\";\nimport moment from 'moment-timezone';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\n\n// STYLE TO SHOW WHEN ITEM IS BEING DRAGGED\nconst getItemStyle = (isDragging, draggableStyle, pendingDeletion) => ({\n    // some basic styles to make the items look a bit nicer\n    userSelect: 'none',\n    // change background colour if dragging\n    background: isDragging ? '#34495e' : 'white',\n    color: isDragging ? 'white' : '#34495e',\n    border: pendingDeletion ? 'red' : 'none',\n    // styles we need to apply on draggables\n    ...draggableStyle,\n});\n\nconst getListStyle = isDraggingOver => ({\n    background: isDraggingOver ? '#8b9fb3' : '#666666',\n    width: '100%',\n});\n\n\nclass MembersDraggableComponent extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            dropdownDataRoles: [{ value: 0, label: 'Role' }],\n            membersDropdown: [],\n            selectedMember: 'Select...',\n            selectedRole: { value: 0, label: 'Role' }\n        };\n        this.onDragEnd = this.onDragEnd.bind(this);\n        this.onInsert = this.onInsert.bind(this);\n        this.handleDropDownChange = this.handleDropDownChange.bind(this);\n        this.handleRolesDropDownChange = this.handleRolesDropDownChange.bind(this);\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.handleSeniorityChange = this.handleSeniorityChange.bind(this);\n    }\n\n    // HANDLE DATE ASSIGNED IN ADD NEW MEMBER ROW\n    handleDateChange(date) {\n        this.setState(state => ({\n            selectedMember: { ...state.selectedMember, AssignDate: moment(date) }\n        }));\n    }\n\n    // HANDLE SENIORITY CHANGE IN ADD NEW MEMBER ROW\n    handleSeniorityChange(e) {\n        let value = e.target.value;\n        this.setState(state => ({\n            selectedMember: { ...state.selectedMember, Seniority: value }\n        }));\n    }\n\n    // HANDLE MEMBER DROPDOWN CHANGE IN ADD NEW MEMBER ROW\n    handleDropDownChange = member => {\n        if (member) {\n            //The AssignDate is deleted because the subcommittee dropdown has it defined and\n            //the date is not formatted correctly for the DatePicker. Since a new date is being assigned anyway I am just going to delete this value\n            delete member.AssignDate;\n            this.setState(state => ({\n                selectedMember: {\n                    AssignDate: state.selectedMember.AssignDate,\n                    ...member,\n                    DisplaySequence: this.props.items.length,\n                }\n            }));\n        } else {\n            this.setState({\n                selectedMember: 'Select...'\n            });\n        }\n    }\n\n    // ADD THE SELECTED MEMBER TO THE GRID\n    onInsert() {\n\n        let selectedMember = this.state.selectedMember\n        //Make sure that a member is selected before trying to add \n        if (selectedMember.MemberID && this.state.selectedRole.value) {\n            delete selectedMember.RemoveDate;\n            //Add isPublic=false so duplicate entries are not created\n            selectedMember.IsPublic = false;\n            //If the user didn't set the date then assign today's date\n            if (!selectedMember.AssignDate) selectedMember.AssignDate = moment(new Date()).format(\"YYYY-MM-DDTHH:mm:ss.SS[Z]\");\n            selectedMember.DisplaySequence = this.props.items.length + 1;\n            selectedMember.CommitteeID = this.props.affiliation;\n            selectedMember.CommitteeRoleID = this.state.selectedRole.value;\n            this.props.onMemberChange([...this.props.items, selectedMember])\n            this.handleDropDownChange();\n        }\n\n    }\n\n    // REMOVE A MEMBER FROM THE GRID\n    onRemove(rowID) {\n\n        var tempArray = this.props.items\n\n        tempArray.forEach(function (element) {\n            if (element.MemberID === rowID) {\n                //the element has already been marked to be deleted. un-mark it\n                if (element.RemoveDate) {\n                    delete element.RemoveDate;\n                } else {\n                    element.RemoveDate = moment(new Date()).format(\"YYYY-MM-DDTHH:mm:ss.SS[Z]\");\n                }\n            }\n        })\n        this.props.onMemberChange(tempArray);\n    }\n\n    // FILTER DATEPICKER TO SHOW TODAY & PAST DAYS ONLY - IN ADD NEW MEMBER ROW\n    isValidTerminationDate = (date) => {\n        const day = date;\n        return day <= new Date()\n    }\n\n    // HANDLE ROLE DROPDOWN CHANGE\n    handleRolesDropDownChange = value => {\n        var role = value;\n        var selected = this.state.selectedMember;\n        this.setState({\n            selectedRole: role,\n            selectedMember: { ...selected, CommitteeRoleID: role.value }\n        })\n    }\n\n    // WHEN DRAGGED ITEM HAS BEEN PLACED\n    onDragEnd(result) {\n        if (!result.destination) {\n            return;\n        }\n        let newItems = [...this.props.items];\n        let [removed] = newItems.splice(result.source.index, 1);\n\n        newItems.splice(result.destination.index, 0, removed);\n        // Reorder the DisplaySequence value too!\n        newItems.forEach((element, index) => {\n            element.DisplaySequence = index + 1\n        });\n        this.props.onMemberChange(newItems);\n    }\n\n    // HANDLE EDITING OF ROLES INPUT (IN TABLE ROWS) - WILL NOT SET PROPS\n    handleEditRoles(memberRole, valObj) {\n        this.setState({ [memberRole]: valObj })\n    }\n\n    // HANDLE SAVING OF ROLES INPUT\n    handleSaveRoles(index, memberRole, member) {\n        const valObj = this.state[memberRole];\n        const items = this.props.items.map((item, i) => {\n            if (i === index) {\n                return { ...item, CommitteeRoleID: valObj.value, isPendingAdd: true };\n            } else {\n                return item;\n            }\n        });\n\n        this.props.onMemberChange(items);\n\n        this.toggleInput(member)\n    }\n\n    // HANDLE EDITING OF SENIORITY INPUT - WILL NOT SET PROPS\n    handleEditSeniority(memberSeniority, e) {\n        this.setState({ [memberSeniority]: e.target.value })\n    }\n\n    // HANDLE SAVING OF SENIORITY INPUT\n    handleSaveSeniority(index, memberSeniority, member) {\n        const value = this.state[memberSeniority];\n        const items = this.props.items.map((item, i) => {\n            if (i === index) {\n                return { ...item, Seniority: value, isPendingAdd: true };\n            } else {\n                return item;\n            }\n        });\n\n        this.props.onMemberChange(items);\n\n        this.toggleInput(member)\n    }\n\n    // HANDLE EDITING OF SENIORITY INPUT - WILL NOT SET PROPS\n    handleEditVotingSequence(memberVotingSequence, e) {\n        this.setState({ [memberVotingSequence]: e.target.value })\n    }\n\n    // HANDLE SAVING OF VOTE SEQUENCE INPUT\n    handleSaveVotingSequence(index, memberVotingSequence, member) {\n        const value = this.state[memberVotingSequence];\n        const items = this.props.items.map((item, i) => {\n            if (i === index) {\n                return { ...item, VotingSequence: value, isPendingAdd: true };\n            } else {\n                return item;\n            }\n        });\n\n        this.props.onMemberChange(items);\n\n        this.toggleInput(member)\n    }\n\n    // HANDLE EDITING OF ASSIGN DATE INPUT - WILL NOT SET PROPS\n    handleEditAssignDate(memberAssignDate, value) {\n        this.setState({ [memberAssignDate]: value })\n    }\n\n    // HANDLE SAVING OF ASSIGN DATE INPUT\n    handleSaveAssignDate(index, memberAssignDate, member) {\n        let memberId;\n\n        const value = this.state[memberAssignDate];\n        const items = this.props.items.map((item, i) => {\n            if (i === index) {\n                memberId = item.MemberID\n                return { ...item, AssignDate: value, isPendingAdd: true };\n            } else {\n                return item;\n            }\n        });\n\n        this.props.onMemberChange(items);\n\n        this.toggleInput(member, memberId + \"tempAssignDateValue\")\n    }\n\n    // HANDLE EDITING OF ASSIGN DATE INPUT - WILL NOT SET PROPS\n    handleEditRemoveDate(memberRemoveDate, value) {\n        this.setState({ [memberRemoveDate]: value })\n    }\n\n    // HANDLE SAVING OF ASSIGN DATE INPUT\n    handleSaveRemoveDate(index, memberRemoveDate, member) {\n        let memberId;\n\n        const value = memberRemoveDate === \"Now\" ? moment() : this.state[memberRemoveDate];\n        const items = this.props.items.map((item, i) => {\n            if (i === index) {\n                memberId = item.MemberID\n                return { ...item, RemoveDate: value, isPendingAdd: true };\n            } else {\n                return item;\n            }\n        });\n\n        this.props.onMemberChange(items);\n\n        this.toggleInput(member, memberId + \"tempRemoveDateValue\")\n    }\n\n    // SHOW INPUT OR NOT\n    toggleInput(value, tempValue, e) {\n        var stateName = value;\n\n        this.setState(prevState => ({\n            [stateName]: !prevState[stateName],            \n        }), () => {\n            //Delete the temp value from state\n            if(typeof tempValue === 'string') {                \n                this.setState({\n                    [tempValue]: undefined\n                })\n            }\n        });\n    }\n\n    // FILTER TO DISPLAY ROLE NAMES BASED ON ROLE IDS\n    getCommitteeRoleName(roleID) {\n        var result = 'Member';\n        this.props.dropdownDataRoles.forEach(function (element) {\n            if (roleID === element.value) {\n                result = element.label\n            }\n        })\n        return result;\n    }\n\n    render() {\n        const memberRoleEditStyle = {\n            gridTemplateColumns: '1fr 15px 15px',\n            gridGap: '5px',\n            backgroundColor: '#f3f5f5',\n        };\n        const { dropdownDataRoles, name, dropdownDataMembers, items } = this.props;\n        const { selectedMember } = this.state;\n\n        return (\n            <DragDropContext onDragEnd={this.onDragEnd}>\n                <Droppable droppableId=\"memberDroppable\">\n                    {(provided, snapshot) => (\n                        <table\n                            className=\"dnd-grid-table members-grid\"\n                            ref={provided.innerRef}\n                            style={getListStyle(snapshot.isDraggingOver)}\n                        >\n                            <thead className=\"dnd-grid-header\" style={getListStyle(snapshot.isDraggingOver)}>\n                                <tr>\n                                    <th scope=\"col\" id={name + '-grabber-column'}></th>\n                                    <th scope=\"col\" id={name + '-display-column'}>Display #</th>\n                                    <th scope=\"col\" id={name + '-membername-column'}>Member Name</th>\n                                    <th scope=\"col\" id={name + '-role-column'}>{this.props.isSubcommittee ? \"Subcommittee Role\" : \"Committee Role\"}</th>\n                                    <th scope=\"col\" id={name + '-party-column'}>Party</th>\n                                    <th scope=\"col\" id={name + '-seniority-column'}>Seniority</th>\n                                    <th scope=\"col\" id={name + '-voting-sequence-column'} className=\"voting-sequence-header\" onClick={this.props.sortByVotingSequence}>Voting Sequence</th>\n                                    <th scope=\"col\" id={name + '-date-column'}>Date Assigned</th>\n                                    <th scope=\"col\" id={name + '-date-column'}>Date Removed</th>\n                                    <th scope=\"col\" id={name + '-actions-column'}>Actions</th>\n                                </tr>\n                            </thead>\n                            <tbody>\n                                <SelectMenu\n                                    items={items}\n                                    name={name}\n                                    dropdownDataMembers={dropdownDataMembers}\n                                    dropdownDataRoles={dropdownDataRoles}\n                                    handleDropDownChange={this.handleDropDownChange}\n                                    handleRolesDropDownChange={this.handleRolesDropDownChange}\n                                    selectedMember={selectedMember}\n                                    handleSeniorityChange={this.handleSeniorityChange}\n                                    handleDateChange={this.handleDateChange}\n                                    isValidTerminationDate={this.isValidTerminationDate}\n                                    onInsert={this.onInsert}\n                                />\n                                {items.map((item, index) => (\n                                    <Draggable key={`${item.MemberID}-${item.DisplaySequence}`} draggableId={`${item.MemberID}-${item.DisplaySequence}`} index={index}>\n                                        {(provided, snapshot) => (\n                                            <tr\n                                                className={item.RemoveDate ? 'pending-delete' : 'nothing'}\n                                                id={name + '-' + item.MemberID}\n                                                ref={provided.innerRef}\n                                                {...provided.draggableProps}\n                                                {...provided.dragHandleProps}\n                                                style={getItemStyle(\n                                                    snapshot.isDragging,\n                                                    provided.draggableProps.style\n                                                )}\n                                            >\n                                                <td><button className=\"button draggable\">Drag and drop</button></td>\n                                                <td>{index + 1}</td>\n                                                <td>{item.MemberDisplayName}</td>\n                                                <td className={this.state[item.MemberID + 'showRoles'] ? 'td-split' : null} style={this.state[item.MemberID + 'showRoles'] ? memberRoleEditStyle : null}>\n                                                    {this.state[item.MemberID + 'showRoles'] ?\n                                                        <React.Fragment>\n                                                            <Fields.Dropdown\n                                                                options={dropdownDataRoles}\n                                                                id={name + '-dropdownRoles'}\n                                                                defaultValue={this.props.dropdownDataRoles.find(role => role.value === item.CommitteeRoleID)}\n                                                                onChange={this.handleEditRoles.bind(this, item.MemberID + 'tempRoleValue')} />\n                                                            <a\n                                                                disabled={!this.state[item.MemberID + 'tempRoleValue']}\n                                                                className=\"icon save\"\n                                                                onClick={this.handleSaveRoles.bind(this, index, item.MemberID + 'tempRoleValue', item.MemberID + 'showRoles')} ></a>\n                                                            <a\n                                                                onClick={this.toggleInput.bind(this, item.MemberID + 'showRoles')}\n                                                                className=\"icon grey-delete\"></a>\n                                                        </React.Fragment>\n                                                        :\n                                                        <div\n                                                            className={!this.state[item.MemberID + 'showRoles'] ? 'hide-input' : null}\n                                                            id={item.MemberID + 'showRoles'}\n                                                            onClick={this.toggleInput.bind(this, item.MemberID + 'showRoles')}>\n                                                            {this.getCommitteeRoleName(item.CommitteeRoleID)}\n                                                        </div>\n                                                    }\n                                                </td>\n                                                <td>{item.PartyCode}</td>\n                                                <td className={this.state[item.MemberID + 'showSeniority'] ? 'td-split' : null} style={this.state[item.MemberID + 'showSeniority'] ? memberRoleEditStyle : null}>\n                                                    {this.state[item.MemberID + 'showSeniority'] ?\n                                                        <React.Fragment>\n                                                            <input\n                                                                className=\"input-small\"\n                                                                id={item.MemberID + 'editSeniorityInput'}\n                                                                type=\"text\"\n                                                                defaultValue={item.Seniority}\n                                                                placeholder={item.Seniority}\n                                                                onChange={this.handleEditSeniority.bind(this, item.MemberID + 'tempSeniorityValue')} />\n                                                            <a\n                                                                disabled={!this.state[item.MemberID + 'tempSeniorityValue']}\n                                                                className=\"icon save\"\n                                                                onClick={this.handleSaveSeniority.bind(this, index, item.MemberID + 'tempSeniorityValue', item.MemberID + 'showSeniority')} ></a>\n                                                            <a\n                                                                onClick={this.toggleInput.bind(this, item.MemberID + 'showSeniority')}\n                                                                className=\"icon grey-delete\"></a>\n                                                        </React.Fragment>\n                                                        :\n                                                        <span\n                                                            className={!this.state[item.MemberID + 'showSeniority'] ? 'hide-input' : null}\n                                                            id={item.MemberID + 'showSeniority'}\n                                                            onClick={this.toggleInput.bind(this, item.MemberID + 'showSeniority')}>\n                                                            {!this.state[item.MemberID + 'showSeniority'] && item.Seniority > 0 ? item.Seniority : ''}\n                                                        </span>\n                                                    }\n                                                </td>\n                                                <td className={this.state[item.MemberID + 'showVotingSequence'] ? 'td-split' : null} style={this.state[item.MemberID + 'showVotingSequence'] ? memberRoleEditStyle : null}>\n                                                    {this.state[item.MemberID + 'showVotingSequence'] ?\n                                                        <React.Fragment>\n                                                            <input\n                                                                className=\"input-small\"\n                                                                id={item.MemberID + 'editVotingSequenceInput'}\n                                                                type=\"text\"\n                                                                defaultValue={item.VotingSequence}\n                                                                placeholder={item.VotingSequence}\n                                                                onChange={this.handleEditVotingSequence.bind(this, item.MemberID + 'tempVotingSequenceValue')} />\n                                                            <a\n                                                                disabled={!this.state[item.MemberID + 'tempVotingSequenceValue']}\n                                                                className=\"icon save\"\n                                                                onClick={this.handleSaveVotingSequence.bind(this, index, item.MemberID + 'tempVotingSequenceValue', item.MemberID + 'showVotingSequence')} ></a>\n                                                            <a\n                                                                onClick={this.toggleInput.bind(this, item.MemberID + 'showVotingSequence')}\n                                                                className=\"icon grey-delete\"></a>\n                                                        </React.Fragment>\n                                                        :\n                                                        <span\n                                                            className={!this.state[item.MemberID + 'showVotingSequence'] ? 'hide-input' : null}\n                                                            id={item.MemberID + 'showVotingSequence'}\n                                                            onClick={this.toggleInput.bind(this, item.MemberID + 'showVotingSequence')}>\n                                                            {!this.state[item.MemberID + 'showVotingSequence'] ? (item.VotingSequence ? item.VotingSequence : 0) : ''}\n                                                        </span>\n                                                    }\n                                                </td>\n                                                <td className={this.state[item.MemberID + 'showAssignDate'] ? 'td-split' : null} style={this.state[item.MemberID + 'showAssignDate'] ? memberRoleEditStyle : null}>\n                                                    {this.state[item.MemberID + 'showAssignDate'] ?\n                                                        <React.Fragment>\n                                                            <DatePicker\n                                                                id={item.MemberID + 'editAssignDateInput'}\n                                                                className=\"datepicker-filter\"\n                                                                value={this.state[item.MemberID + 'tempAssignDateValue'] ? moment(this.state[item.MemberID + 'tempAssignDateValue']).format(\"L\") : moment(item.AssignDate).format(\"L\")}\n                                                                onChange={this.handleEditAssignDate.bind(this, item.MemberID + 'tempAssignDateValue')} />\n                                                            <a\n                                                                disabled={!this.state[item.MemberID + 'tempAssignDateValue']}\n                                                                className=\"icon save\"\n                                                                onClick={!this.state[item.MemberID + 'tempAssignDateValue'] ? this.toggleInput.bind(this, item.MemberID + 'showAssignDate', item.MemberID + 'tempAssignDateValue') : this.handleSaveAssignDate.bind(this, index, item.MemberID + 'tempAssignDateValue', item.MemberID + 'showAssignDate')}\n                                                            >\n                                                            </a>\n                                                            <a\n                                                                onClick={this.toggleInput.bind(this, item.MemberID + 'showAssignDate', item.MemberID + 'tempAssignDateValue')}\n                                                                className=\"icon grey-delete\"></a>\n                                                        </React.Fragment>\n                                                        :                                                        \n                                                        <span\n                                                            className={!this.state[item.MemberID + 'showAssignDate'] ? 'hide-input' : null}\n                                                            id={item.MemberID + 'showAssignDate'}\n                                                            onClick={this.toggleInput.bind(this, item.MemberID + 'showAssignDate')}>\n                                                            {!this.state[item.MemberID + 'showAssignDate'] ? (item.AssignDate ? moment(item.AssignDate).format('L') : \"\") : ''}\n                                                        </span>\n                                                    }\n                                                </td>\n                                                <td className={this.state[item.MemberID + 'showRemoveDate'] ? 'td-split' : null} style={this.state[item.MemberID + 'showRemoveDate'] ? memberRoleEditStyle : null}>\n                                                    {this.state[item.MemberID + 'showRemoveDate'] ?\n                                                        <React.Fragment>\n                                                            <DatePicker\n                                                                id={item.MemberID + 'editRemoveDateInput'}\n                                                                className=\"datepicker-filter\"\n                                                                value={this.state[item.MemberID + 'tempRemoveDateValue'] ? moment(this.state[item.MemberID + 'tempRemoveDateValue']).format(\"L\") : moment(item.RemoveDate).format(\"L\")}\n                                                                onChange={this.handleEditRemoveDate.bind(this, item.MemberID + 'tempRemoveDateValue')} \n                                                                maxDate={moment()}\n                                                                />\n                                                            <a\n                                                                disabled={!this.state[item.MemberID + 'tempRemoveDateValue']}\n                                                                className=\"icon save\"\n                                                                onClick={!this.state[item.MemberID + 'tempRemoveDateValue'] ? this.handleSaveRemoveDate.bind(this, index, \"Now\", item.MemberID + 'showRemoveDate') : this.handleSaveRemoveDate.bind(this, index, item.MemberID + 'tempRemoveDateValue', item.MemberID + 'showRemoveDate')}\n                                                            >\n                                                            </a>\n                                                            <a\n                                                                onClick={this.toggleInput.bind(this, item.MemberID + 'showRemoveDate', item.MemberID + 'tempRemoveDateValue')}\n                                                                className=\"icon grey-delete\"></a>\n                                                        </React.Fragment>\n                                                        :                                                        \n                                                        <span\n                                                            className={!this.state[item.MemberID + 'showRemoveDate'] ? 'hide-input' : null}\n                                                            id={item.MemberID + 'showRemoveDate'}\n                                                            onClick={this.toggleInput.bind(this, item.MemberID + 'showRemoveDate')}>\n                                                            {!this.state[item.MemberID + 'tempRemoveDateValue'] ? (item.RemoveDate ? moment(item.RemoveDate).format('L') : \"\") : ''}\n                                                        </span>\n                                                    }\n                                                </td>\n                                                <td>{item.RemoveDate ? <button type=\"button\" onClick={this.onRemove.bind(this, item.MemberID)} className=\"button add\">Delete</button> : \"\"}</td>\n                                            </tr>\n                                        )}\n                                    </Draggable>\n                                ))}\n\n                                {provided.placeholder}\n                            </tbody>\n                        </table>\n                    )}\n                </Droppable>\n            </DragDropContext>\n        );\n    }\n}\n\n\nfunction SelectMenu(props) {\n\n    var dropdown = [];\n\n    props.dropdownDataMembers.forEach(function (element) {\n        let isDuplicate = false;\n        props.items.forEach(function (item) {\n            if (item.MemberID === element.MemberID) {\n                isDuplicate = true;\n            }\n        });\n        if (!isDuplicate) {\n            dropdown.push(element);\n        }\n    })\n\n    return (\n        <tr id={props.name + '-insert-row'} className=\"dnd-insert-row\">\n            <td></td>\n            <td></td>\n            <td><Fields.Dropdown className=\"grid-selector-dropdown\" classNamePrefix=\"grid-selector-dropdown\" value={props.selectedMember} options={dropdown} id={props.name + '-dropdownMembers'} onChange={props.handleDropDownChange} /></td>\n            <td><Fields.Dropdown className=\"grid-selector-dropdown\" classNamePrefix=\"grid-selector-dropdown\" options={props.dropdownDataRoles} id={props.name + '-dropdownRoles'} onChange={props.handleRolesDropDownChange} /></td>\n            <td>{props.selectedMember.PartyCode}</td>\n            <td><input id=\"seniorityInput\" type=\"text\" className=\"dnd-field\" value={props.selectedMember.Seniority} onChange={props.handleSeniorityChange} /></td>\n            <td><input id=\"votingSequenceInput\" type=\"text\" className=\"dnd-field\" value={props.selectedMember.VotingSequence} onChange={props.handleEditVotingSequence} /></td>\n            <td>\n                <DatePicker\n                    id=\"dateAssignedInput\"\n                    className=\"dnd-field\"\n                    selected={props.selectedMember.AssignDate}\n                    onChange={props.handleDateChange}\n                    popperPlacement=\"top-start\"\n                    autoComplete=\"off\"\n                    filterDate={props.isValidTerminationDate}\n                    placeholderText=\"Date Assigned\"\n\n                />\n            </td>\n            <td></td>\n            <td><button type=\"button\" id={props.name + '-insert-button'} className=\"button\" onClick={props.onInsert}>Insert</button></td>\n        </tr>\n    )\n}\nexport default MembersDraggableComponent;","import React from \"react\";\nimport ReactTable from \"react-table\";\nimport { Link } from 'react-router-dom';\nimport '../../../stylesheets/shared/react-table.css';\nimport moment from 'moment-timezone';\n\n\nclass SubcommitteeManagementGrid extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            error: null,\n            selected: {},\n            selectedError: null,\n            currentDate: new Date(),\n            subcommitteeData: [],\n            showCreateSuccess: false,\n            subcommitteeNameInput: '',\n            subcommitteeNumberInput: '',\n            calculatedFullCommitteeNumber: ''\n\n        };\n        this.subcommitteeNameChange = this.subcommitteeNameChange.bind(this);\n        this.subcommitteeNumberChange = this.subcommitteeNumberChange.bind(this);\n        this.calculateFullCommitteeNumber = this.calculateFullCommitteeNumber.bind(this);\n        this.sendSubcommitteeCreateDetails = this.sendSubcommitteeCreateDetails.bind(this);\n\n    };\n\n    subcommitteeNameChange(e) {\n        const { value } = e.target;\n        const subcommitteeName = value;\n        this.setState({ subcommitteeNameInput: subcommitteeName });\n    }\n\n    subcommitteeNumberChange(e) {\n        let { value } = e.target;\n        if (value.length < 4) {\n            value = value ? parseInt(value) : '';\n            const subcommitteeNumber = value;\n            const calculatedFullCommitteeNumber = this.calculateFullCommitteeNumber(subcommitteeNumber);\n            this.setState({ subcommitteeNumberInput: subcommitteeNumber, calculatedFullCommitteeNumber });\n        }\n    }\n\n    calculateFullCommitteeNumber(number) {\n        if (!number) { return '' }\n        let calculatedFullCommitteeNumber = this.props.parentCommitteeNumber;\n        calculatedFullCommitteeNumber += String(number).padStart(3, '0');\n        return calculatedFullCommitteeNumber;\n    }\n\n    sendSubcommitteeCreateDetails() {\n        if (!Number.isInteger(this.state.subcommitteeNumberInput) || this.state.subcommitteeNumberInput < 1 || this.state.subcommitteeNumberInput > 999) {\n            this.setState({ error: 'Subcommittee number must be between 1 and 999' });\n            return;\n        } else {\n            this.setState({ error: null })\n        }\n        let params = {\n            Name: this.state.subcommitteeNameInput,\n            CommitteeNumber: this.state.calculatedFullCommitteeNumber,\n        }\n        this.props.createSubcommittee(params);\n    }\n\n    render() {\n        return (\n            <div>\n                <ReactTable\n                    resizable={false}\n                    data={this.props.subcommitteeData}\n                    ref={r => this.reactTable = r}\n                    noDataText={this.props.subcommitteeMessage}\n                    loading={!this.props.isLoaded}\n                    columns={[\n                        {\n                            Header: \"Subcommittee Name\",\n                            columns: [\n\n                                {\n                                    Header: (\n                                        <div className=\"dlas-forms\">\n                                            {!this.state.showCreateSuccess && !this.state.showCreateFailure &&\n                                                <div className=\"committee-grid-header-inputs subcommittee\">\n                                                    <div><input id=\"insert-new-committee\" type=\"text\" value={this.state.subcommitteeNameChange} placeholder=\"Type new subcommittee name and subcommittee number, click create\" onChange={this.subcommitteeNameChange} /></div>\n                                                    <div>\n                                                        <input id=\"insert-new-committee-number\" type=\"number\" min={1} max={999} value={this.state.subcommitteeNumberInput.toString()} placeholder=\"Subcommittee number\" onChange={this.subcommitteeNumberChange} />\n                                                        {this.state.calculatedFullCommitteeNumber && <span className=\"subcommittee-number\">({this.state.calculatedFullCommitteeNumber})</span>}\n                                                        {this.state.error && <div className=\"input-feedback\">{this.state.error}</div>}\n                                                    </div>\n                                                </div>\n                                            }\n                                            {this.props.showCreateSuccess &&\n                                                <span className=\"insert-message\">Subcommittee was created successfully!</span>\n                                            }\n                                            {this.props.showCreateFailure &&\n                                                <span className=\"insert-message fail\">Subcommittee creation failed</span>\n                                            }\n                                        </div>\n                                    ),\n                                    headerClassName: \"header-insert\",\n                                    accessor: \"Name\",\n                                    sortable: false,\n                                    filterAll: true,\n                                    Cell: row => {\n                                        return (\n                                            <span id={'cm-namecell-' + row.index}>{row.original.Name}</span>\n                                        )\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Service Start Date\",\n                            columns: [\n                                {\n                                    headerClassName: \"header-insert\",\n                                    accessor: \"PendingChange\",\n                                    sortable: false,\n                                    filterAll: true,\n                                    width: 150,\n                                    Cell: row => {\n                                        if (row.original.ServiceBeginDate === '0001-01-01T00:00:00') {\n                                            return <span className=\"txt-greyed\" id={'cm-pending-' + row.index}>Pending</span>\n                                        }\n                                        else {\n                                            return <span id={'cm-pending-' + row.index}>{row.original.ServiceBeginDate ? moment(row.original.ServiceBeginDate).format('L') : ''}</span>\n                                        }\n\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Actions\",\n                            headerClassName: \"submit-action\",\n                            columns: [\n\n                                {\n                                    Header: (<span><button type=\"button\" id=\"submit-new-committee\" disabled={!this.state.subcommitteeNameInput || !this.state.subcommitteeNumberInput} onClick={this.sendSubcommitteeCreateDetails} className=\"button\">Create</button></span>),\n                                    headerClassName: \"header-action\",\n                                    accessor: \"action\",\n                                    sortable: false,\n                                    className: \"action-column\",\n                                    width: 50,\n                                    Cell: row => {\n                                        return (\n                                            <Link id={'cm-edit-' + row.index} to={`/committee-management/edit-subcommittee/${this.props.parentCommitteeID}/${row.original.CommitteeID}/`} className=\"button edit\">Edit</Link>\n                                        )\n                                    }\n                                },\n                                {\n                                    Header: \"\",\n                                    headerClassName: \"flag-header\",\n                                    accessor: \"PendingChange\",\n                                    width: 40,\n                                    Cell: row => {\n                                        if (row.original.PendingChange) {\n                                            return <span id={'cm-flag-' + row.index} className=\"button flag\">Flag</span>\n                                        } else {\n                                            return <span></span>\n                                        }\n                                    }\n                                }\n                            ]\n                        },\n                    ]}\n                    defaultSorted={[\n                        {\n                            id: \"Name\",\n                            desc: false\n                        }\n                    ]}\n                    showPagination={true}\n                    defaultPageSize={10}\n                    className=\"subcommittee-table -striped -highlight\"\n                />\n            </div>\n        );\n    }\n}\n\n\nexport default SubcommitteeManagementGrid;","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst personnelListRequest = 'PERSONNEL_LIST_REQUEST';\nconst personnelListSuccess = 'PERSONNEL_LIST_SUCCESS';\nconst personnelListFailure = 'PERSONNEL_LIST_FAILURE';\n\nconst roleTypesRequest = 'ROLE_TYPES_REQUEST';\nconst roleTypesSuccess = 'ROLE_TYPES_SUCCESS';\nconst roleTypesFailure = 'ROLE_TYPES_FAILURE';\n\nconst personnelReferencesRequest = 'PERSONNEL_REFERENCES_REQUEST';\nconst personnelReferencesSuccess = 'PERSONNEL_REFERENCES_SUCCESS';\nconst personnelReferencesFailure = 'PERSONNEL_REFERENCES_FAILURE';\n\nconst personnelSaveRequest = 'PERSONNEL_SAVE_REQUEST';\nconst personnelSaveSuccess = 'PERSONNEL_SAVE_SUCCESS';\nconst personnelSaveFailure = 'PERSONNEL_SAVE_FAILURE';\n\n\nconst initialState = {\n    personnelStaffList: [],\n    personnelClerkList: [],\n    personnelOtherList: [],\n    personnelStaffReferences: [],\n    personnelClerkReferences: [],\n    personnelErrorSave: '',\n    receivePersonnelSave: '',\n    personnelStaffSave: '',\n    personnelClerkSave: '',\n    roleTypes: []\n};\n\nexport const personnelActionCreators = {\n    // GET PERSONNEL REFERENCES FOR COMM MGMT DROPDOWNS\n    requestPersonnelReferences: () => ({\n        type: personnelReferencesRequest,\n        personnelReferences: [],\n        isFetching: true\n    }),\n\n    receivePersonnelReferences: (clerkReferences, staffReferences, message) => ({\n        type: personnelReferencesSuccess,\n        isFetching: false,\n        personnelStaffReferences: staffReferences,\n        personnelClerkReferences: clerkReferences,\n        message\n    }),\n\n    personnelReferencesError: (message) => ({\n        type: personnelReferencesFailure,\n        isFetching: false,\n        personnelStaffReferences: [],\n        personnelClerkReferences: [],\n        message\n    }),\n\n    getPersonnelReferences: (params) => {\n        return dispatch => {\n            dispatch(personnelActionCreators.requestPersonnelReferences());\n\n            return publicRequest((API_URL || process.env.REACT_APP_PERSONNEL_API_URL) + '/Personnel/api/GetReferencesAsync?', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(personnelActionCreators.personnelReferencesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        let personnelReferences = result[1];\n                        var personnelClerkReferences = [];\n                        var personnelStaffReferences = [];\n\n                        // STAFF = 2\n                        // CLERK = 1\n                        // FILTER OUT DUPLICATES----\n                        for (var i = 0; i < personnelReferences.Personnels.length; i++) {\n                            var personnelObj = { ...personnelReferences.Personnels[i], value: personnelReferences.Personnels[i].StaffID, label: personnelReferences.Personnels[i].FullName }\n\n                            if (personnelReferences.Personnels[i].StaffRoleTypeID === 2) {\n                                var isDuplicate = false;\n                                personnelStaffReferences.forEach(element => {\n                                    if (element.IdentityID === personnelObj.IdentityID) {\n                                        isDuplicate = true;\n                                    }\n                                });\n                                if (!isDuplicate) {\n                                    personnelStaffReferences.push(personnelObj)\n                                }\n                            } else {\n                                var isOtherDuplicate = false;\n                                personnelClerkReferences.forEach(element => {\n                                    if (element.IdentityID === personnelObj.IdentityID) {\n                                        isOtherDuplicate = true;\n                                    }\n                                })\n                                if (!isOtherDuplicate) {\n                                    personnelClerkReferences.push(personnelObj);\n                                }\n                            }\n                        }\n                        dispatch(personnelActionCreators.receivePersonnelReferences(personnelClerkReferences, personnelStaffReferences))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(personnelActionCreators.personnelReferencesError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n\n    // GET PERSONNEL STAFF AND CLERKS FOR COMM MGMT FORM GRID\n    requestPersonnelList: () => ({\n        type: personnelListRequest,\n        personnelList: [],\n        isFetching: true\n    }),\n\n    receivePersonnelList: (clerkList, staffList, otherList, message) => ({\n        type: personnelListSuccess,\n        isFetching: false,\n        personnelStaffList: staffList,\n        personnelClerkList: clerkList,\n        personnelOtherList: otherList,\n        message\n    }),\n\n    personnelListError: (message) => ({\n        type: personnelListFailure,\n        isFetching: false,\n        personnelList: [],\n        message\n    }),\n\n    getPersonnelList: (params, isPublic) => {\n\n        return dispatch => {\n            dispatch(personnelActionCreators.requestPersonnelList());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (isPublic) {\n                request = publicRequest((API_URL || process.env.REACT_APP_PERSONNEL_API_URL) + '/Personnel/api/getPersonnelListAsync?', 'GET', headers, '', params);\n            } else {\n                request = partnerRequest((API_URL || process.env.REACT_APP_PERSONNEL_API_URL) + '/Personnel/api/getPartnerPersonnelListAsync?', 'GET', headers, '', params);\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(personnelActionCreators.personnelListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        let personnelList = result[1]\n                        const personnelClerkList = personnelList.Personnels.filter(personnel => personnel.StaffRoleTypeID === 1)\n                        const personnelStaffList = personnelList.Personnels.filter(personnel => personnel.StaffRoleTypeID === 2)\n                        const personnelOtherList = personnelList.Personnels.filter(personnel => personnel.StaffRoleTypeID !== 1 && personnel.StaffRoleTypeID !== 2)\n                        dispatch(personnelActionCreators.receivePersonnelList(personnelClerkList, personnelStaffList, personnelOtherList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(personnelActionCreators.receivePersonnelList([], []))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    // GET PERSONNEL STAFF AND CLERKS FOR COMM MGMT FORM GRID\n    requestRoleTypes: () => ({\n        type: roleTypesRequest,\n        roleTypes: [],\n        isFetching: true\n    }),\n\n    receiveRoleTypes: (roleTypes, message) => ({\n        type: roleTypesSuccess,\n        isFetching: false,\n        roleTypes: roleTypes,\n        message\n    }),\n\n    roleTypesError: (message) => ({\n        type: roleTypesFailure,\n        isFetching: false,\n        roleTypes: [],\n        message\n    }),\n\n    getRoleTypes: (params) => {\n\n        return dispatch => {\n            dispatch(personnelActionCreators.requestRoleTypes());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_PERSONNEL_API_URL) + '/Personnel/api/GetStaffRoleTypesAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(personnelActionCreators.roleTypesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(personnelActionCreators.receiveRoleTypes(result[1].StaffRoleTypes))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(personnelActionCreators.receiveRoleTypes([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    requestPersonnelSave: () => ({\n        type: personnelSaveRequest,\n        isFetching: true\n    }),\n\n    receivePersonnelSave: (personnelClerkSave, personnelStaffSave) => ({\n        type: personnelSaveSuccess,\n        isFetching: false,\n        personnelClerkSave: personnelClerkSave,\n        personnelStaffSave: personnelStaffSave\n    }),\n\n    personnelErrorSave: (message) => ({\n        type: personnelSaveFailure,\n        isFetching: false,\n        personnelErrorSave: message\n    }),\n\n    savePersonnel: (body) => {\n\n        return dispatch => {\n            dispatch(personnelActionCreators.requestPersonnelSave());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_PERSONNEL_API_URL) + '/Personnel/api/SavePersonnelAsync/', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(personnelActionCreators.personnelErrorSave(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        const personnelList = result[1]\n                        const personnelClerkList = personnelList.filter(personnel => personnel.StaffRoleTypeID === 1)\n                        const personnelStaffList = personnelList.filter(personnel => personnel.StaffRoleTypeID === 2)\n                        dispatch(personnelActionCreators.receivePersonnelSave(personnelClerkList, personnelStaffList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(personnelActionCreators.receivePersonnelSave([], []))\n                        throw 'No personnel found'\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    }\n};\n\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n\n    switch (action.type) {\n        case personnelReferencesRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case personnelReferencesSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                personnelStaffReferences: action.personnelStaffReferences,\n                personnelClerkReferences: action.personnelClerkReferences,\n                message: ''\n            })\n        case personnelReferencesFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                message: action.message\n            })\n        case personnelListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case personnelListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                personnelStaffList: action.personnelStaffList,\n                personnelClerkList: action.personnelClerkList,\n                personnelOtherList: action.personnelOtherList,\n                message: ''\n            })\n        case personnelListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                message: action.message\n            })\n        case roleTypesRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case roleTypesSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                roleTypes: action.roleTypes,\n                message: ''\n            })\n        case roleTypesFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                message: action.message\n            })            \n        case personnelSaveRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case personnelSaveSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                personnelStaffSave: action.personnelStaffSave,\n                personnelClerkSave: action.personnelClerkSave,\n                personnelErrorSave: ''\n            })\n        case personnelSaveFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                personnelErrorSave: action.personnelErrorSave\n            })\n        default:\n            return state\n    }\n};","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport '../../../stylesheets/lis-public-view/public-view.css';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport { personnelActionCreators } from '../../../stores/lis-personnel-store';\n\nfunction SubCommitteesList(props) {\n    const listCommittees = props.committees.map(committee => {\n        let key = Math.random().toString();\n        return (\n            <div key={key} className=\"inner-grid two\" >\n                <div>\n                    <Link to=\"/committee-details\">{committee.Name}</Link>\n                </div>\n                <div>\n                    {committee.PendingChange && <p>Not Published</p>}\n                </div>\n            </div>\n            )\n    })\n    return (\n        <React.Fragment>\n            {listCommittees}\n        </React.Fragment>\n    )\n}\n\nfunction MemberListComponent(props) {\n    let key = '';\n    const names = props.members.map(member => {\n        //If the member is to be removed on the next save then don't show them in the preview\n        if (!member.EffectiveEndDate) {\n            key = Math.random().toString();\n            //Add the role label to the display, unless the role is 'Member' to keep things less redundant\n            let role = props.roles.find(role => role.value === member.CommitteeRoleID)\n            if (role && role.label !== 'Member') {\n                return (\n                    <div key={key} className=\"inner-grid two\">\n                        <div>\n                            <p><b>{role.label}</b>: {member.MemberDisplayName} </p>\n                        </div>\n                        <div>\n                            <p>{member.Seniority}</p>\n                        </div>\n                    </div>\n                )\n            } else {\n                return (\n                    <div key={key} className=\"inner-grid two\">\n                        <div>\n                            <p>{member.MemberDisplayName}</p>\n                        </div>\n                        <div>\n                            <p>{member.Seniority}</p>\n                        </div>\n                    </div>\n                )\n            }\n        }\n    });\n    return (\n        <React.Fragment>\n            {names}\n        </React.Fragment>\n    );\n}\n\nfunction PersonnelListComponent(props) {\n    let key = '';\n    //Creates the list of names\n    const names = props.personnel.map(personnel => {\n        key = Math.random().toString();\n        return (\n            <div key={key} className=\"inner-grid two\">\n                <div>\n                    <p>{personnel.FullName}</p>\n                </div>\n                <div>\n                    <p>{personnel.PhoneNumber}</p>\n                </div>\n            </div>)\n    });\n    return (\n        <React.Fragment>\n            {names}\n        </React.Fragment>\n    );\n}\n\nclass CommitteeDetailsComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            roles: [],\n        };\n    }\n\n    render() {\n        const { committeeData, clerkList, staffList, memberList, subcommitteesList } = this.props;\n\n        return (\n            <div className=\"partner-details\">\n                <div>\n                    <h3>{committeeData.Name}</h3>\n                </div>\n                <div className=\"details-section inner-grid three\">\n                    <div className=\"details-category\">\n                        <h4>COMMITTEE INFORMATION</h4>\n                    </div>\n                    <div className=\"span-two\">\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <p>Abbreviation:</p>\n                            </div>\n                            <div>\n                                <p>{committeeData.Abbreviation}</p>\n                            </div>\n                        </div>\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <p>Committee Number:</p>\n                            </div>\n                            <div>\n                                <p>{committeeData.CommitteeNumber}</p>\n                            </div>\n                        </div>\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <p>Chamber:</p>\n                            </div>\n                            <div>\n                                <p>{(committeeData.ChamberCode === 'S') ? 'Senate' : 'House'}</p>\n                            </div>\n                        </div>\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <p>Description:</p>\n                            </div>\n                            <div>\n                                <p>{committeeData.Description}</p>\n                            </div>\n                        </div>\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <p>Meeting Notes:</p>\n                            </div>\n                            <div>\n                                <p>{committeeData.MeetingNote}</p>\n                            </div>\n                        </div>\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <p>Twitter Handle:</p>\n                            </div>\n                            <div>\n                                <p>{committeeData.TwitterHandle}</p>\n                            </div>\n                        </div>\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <p>Twitter Email:</p>\n                            </div>\n                            <div>\n                                <p>{committeeData.TwitterEmail}</p>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div className=\"details-section inner-grid three\">\n                    <div className=\"details-category\">\n                        <h4>CLERK INFORMATION</h4>\n                    </div>\n                    {clerkList === undefined || clerkList.length === 0 ? (\n                        <div className=\"span-two\"><p>N/A</p></div>\n                    ) : (\n                        <div className=\"span-two\"><PersonnelListComponent personnel={clerkList} /></div>\n                    )}\n                </div>\n                <div className=\"details-section inner-grid three\">\n                    <div className=\"details-category\">\n                        <h4>STAFF INFORMATION</h4>\n                    </div>\n                    {staffList === undefined || staffList.length === 0 ? (\n                    <div className=\"span-two\"><p>N/A</p></div>\n                    ) : (\n                        <div className=\"span-two\"><PersonnelListComponent personnel={staffList} /></div>\n                    )}\n                </div>\n                <div className=\"details-section inner-grid three\">\n                    <div className=\"details-category\">\n                        <h4>Member Information</h4>\n                    </div>\n                    {memberList === undefined || memberList.length === 0 ? (\n                        <div className=\"span-two\"><p>{this.props.members.membersByCommitteeError}</p></div>\n                    ) : (\n                        <div className=\"span-two\"><MemberListComponent members={memberList} roles={this.props.memberRoles} /></div>\n                    )}\n                </div>\n                {subcommitteesList !== undefined && subcommitteesList.length > 0 &&\n                    <div className=\"details-section inner-grid three\">\n                        <div>\n                            <h4>Subcommittees</h4>\n                        </div>\n                        {subcommitteesList === undefined || subcommitteesList.length === 0 ? (\n                            <div className=\"span-two\"><p>{this.props.committee.partnerCommitteeListError}</p></div>\n                        ) : (\n                                <div className=\"span-two\"><SubCommitteesList committees={subcommitteesList} /></div>\n                            )}\n                    </div>\n                }\n                </div>\n        )\n    }\n}\n\nconst PartnerCommitteeDetails = connect(\n    (state) => {\n        const { committee, members, personnel } = state;\n        return {\n            committee,\n            members,\n            personnel\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, committeeActionCreators, memberActionCreators, personnelActionCreators), dispatch)\n        }\n    }\n)(CommitteeDetailsComponent)\n\nexport default PartnerCommitteeDetails;\n","import React from 'react';\nimport { Prompt } from 'react-router';\nimport ReactToPrint from 'react-to-print';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport DatePicker from 'react-datepicker';\nimport PersonnelDraggableComponent from './lis-committee-personnel-dnd';\nimport MembersDraggableComponent from './lis-committee-members-dnd';\nimport SubcommitteeManagementGrid from './lis-subcommittee-grid';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { personnelActionCreators } from '../../../stores/lis-personnel-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport CommitteeDetailsComponent from './lis-partner-committee-details';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport * as moment from 'moment-timezone';\n\nclass NewCommitteeFormComponent extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.state = {\n            infoFieldsetIsActive: true, // SET FIELDSET SECTIONS TO BE VISIBLE ON LOAD (OR NOT)\n            clerkFieldsetIsActive: true,\n            staffFieldsetIsActive: true,\n            membershipFieldsetIsActive: true,\n            subcommFieldsetIsActive: true,\n            isSaving: false,\n            selectedCommittee: {},\n            members: [],\n            clerks: [],\n            staff: [],\n            personnelReferences: [],\n            committeeMemberRoles: [],\n            committeeMemberNames: [],\n            subcommitteeIsLoaded: false,\n            subcommitteeData: [],\n            showPreview: false,\n            ascending: false,\n            isFormDirty: false\n        };\n        this.createSubcommittee = this.createSubcommittee.bind(this);\n        this.togglePreview = this.togglePreview.bind(this);\n        this.getSubcommittees = this.getSubcommittees.bind(this);\n        this.handleSave = this.handleSave.bind(this);\n        this.handleMemberChange = this.handleMemberChange.bind(this);\n        this.handleClerkChange = this.handleClerkChange.bind(this);\n        this.handleStaffChange = this.handleStaffChange.bind(this);\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.sortByVotingSequence = this.sortByVotingSequence.bind(this);\n        this.handleClose = this.handleClose.bind(this);\n    }\n\n    togglePreview() {\n        this.setState(state => ({\n            showPreview: !state.showPreview\n        }));\n    }\n\n    // TOGGLE FIELDSET VISIBILITY\n    toggleFieldsetCollapse(isActive) {\n        this.setState(state => ({\n            [isActive]: !state[isActive]\n        }));\n    };\n\n    // CALLBACK FOR CREATING NEW SUBCOMMITTEE\n    createSubcommittee(params) {\n        params = {\n            ...params,\n            ChamberCode: this.state.selectedCommittee.ChamberCode,\n            ParentCommitteeID: this.props.match.params.committeeid,\n            IsPublic: 0\n        };\n        this.props.actions.createNewCommittee(params).then(() => {\n            this.setState({\n                showCreateSuccess: true\n            });\n            setTimeout(function () {\n                this.setState({ showCreateSuccess: false });\n            }.bind(this), 5000);\n            this.getSubcommittees();\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            this.setState({ showCreateFailure: true });\n            setTimeout(function () {\n                this.setState({ showCreateFailure: false });\n            }.bind(this), 5000);\n        })\n    }\n\n    getSubcommittees() {\n        if (!this.props.match.params.subcommitteeid) {\n            var params = 'parentCommitteeID=' + this.props.match.params.committeeid + '&isPublic=false';\n            this.props.actions.getPartnerCommitteeList(params).then(() => {\n                this.setState({\n                    subcommitteeData: this.props.committee.partnerCommitteeList,\n                    subcommitteeMessage: this.props.committee.partnerCommitteeListError,\n                    subcommitteeIsLoaded: true\n                })\n            });\n        }\n\n    }\n\n    handleMemberChange(members) {\n        this.setState({\n            members: members,\n            isFormDirty: true\n        })\n    }\n\n    handleClerkChange(clerks) {\n        this.setState({\n            clerks: clerks,\n            isFormDirty: true\n        })\n    }\n\n    handleStaffChange(staff) {\n        this.setState({\n            staff: staff,\n            isFormDirty: true\n        })\n    }\n\n    handleDateChange(val, serviceEndDate) {\n        let selectedCommittee = { ...this.state.selectedCommittee };\n        if (serviceEndDate) {\n            selectedCommittee.ServiceEndDate = moment(val);\n        } else {\n            selectedCommittee.ServiceBeginDate = moment(val);\n        }\n        this.setState({\n            selectedCommittee: selectedCommittee,\n            isFormDirty: true\n        });\n    }\n\n    handleChange(key, value) {\n        if (this.state.selectedCommittee[key] !== undefined || key === 'AgendaURL') {\n            let selectedCommittee = { ...this.state.selectedCommittee };\n            selectedCommittee[key] = value;\n            this.setState({\n                selectedCommittee: selectedCommittee,\n                isFormDirty: true\n            });\n        }\n    }\n\n    handleSave(publish) {\n        //Turn off save/publish button\n        this.setState({ isSaving: true });\n        //Check to see that the committee has a name.\n        if (!this.state.selectedCommittee.Name) {\n            this.setState({\n                committeeNameMissing: true\n            });\n            return;\n        }\n        let members = [...this.state.members];\n        //Combine the personnel list back together so we do not have to make an extra request\n        let personnelList = [...this.state.clerks, ...this.state.staff];\n        let selectedCommittee = { ...this.state.selectedCommittee };\n        personnelList.forEach(personnel => personnel.AffiliationID = selectedCommittee.CommitteeID);\n        selectedCommittee.IsPublic = publish;\n        if (publish) {\n            members.forEach(member => { member.IsPublic = true })\n            personnelList.forEach(personnel => { personnel.IsPublic = true })\n        }\n        const memberObject = { MemberList: members }\n        const personnelObject = { Personnels: personnelList };\n        //Save committee details\n        const saveCommittee = this.props.actions.saveCommittee(selectedCommittee)\n            .then(() => {\n                if (this.props.committee.saveCommitteeError) {\n                    return Promise.reject(this.props.committee.saveCommitteeError);\n                } else {\n                    const commData = this.props.committee.savedCommittee\n                    this.setState({\n                        selectedCommittee: {\n                            ...commData,\n                            TwitterHandle: commData.TwitterHandle ? commData.TwitterHandle : '',\n                            TwitterEmail: commData.TwitterEmail ? commData.TwitterEmail : '',\n                            Description: commData.Description ? commData.Description : '',\n                            MeetingNote: commData.MeetingNote ? commData.MeetingNote : '',\n                            Abbreviation: commData.Abbreviation ? commData.Abbreviation : '',\n                            ServiceEndDate: commData.ServiceEndDate ? commData.ServiceEndDate : null\n                        }\n                    });\n                    return Promise.resolve();\n                }\n            });\n        //Save personnel to committee\n        const savePersonnel = personnelObject.Personnels.length > 0 ? this.props.actions.savePersonnel(personnelObject)\n            .then(() => {\n                if (this.props.personnel.personnelErrorSave) {\n                    return Promise.reject(this.props.personnel.personnelErrorSave);\n                } else {\n                    this.setState({\n                        clerks: this.props.personnel.personnelClerkSave,\n                        staff: this.props.personnel.personnelStaffSave\n                    });\n                    return Promise.resolve();\n                }\n            })\n            : Promise.resolve(true);\n        //Save members to committee\n        const saveMember = memberObject.MemberList.length > 0 ? this.props.actions.saveMemberCommittee(memberObject)\n            .then(() => {\n                if (this.props.members.memberCommitteeSaveError) {\n                    return Promise.reject(this.props.members.memberCommitteeSaveError);\n                } else {\n                    this.setState({\n                        members: this.props.members.memberCommitteeSave\n                    });\n                    return Promise.resolve();\n                }\n            })\n            : Promise.resolve(true);\n\n        //Save the data then grab the new list of personnel and members and update the view. This is done because if the user wants to save again they need updated mod dates\n        Promise.all([\n            saveMember,\n            savePersonnel,\n            saveCommittee\n        ])\n            //Will only run if the 3 promises above resolve\n            .then(() => {\n                this.props.actions.makeToast([{ message: \"Committee Saved\", type: \"success\" }])\n                this.setState({ isSaving: false, saved: true, isFormDirty: false }, () => {\n                    if (publish === true) {\n                        this.props.history.push(\"/committee-management\");\n                    }\n                });\n            })\n            .catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                //Part or all of the save has failed so send a mean red bar to the user\n                this.props.actions.makeToast([{ message: \"Committee Save Failed\", type: \"failure\" }])\n                this.setState({ isSaving: false });\n            });\n    }\n\n    sortByVotingSequence() {\n        let members = [...this.state.members];\n        if (this.state.ascending) {\n            members.sort((a, b) => b.VotingSequence - a.VotingSequence);\n        } else {\n            members.sort((a, b) => a.VotingSequence - b.VotingSequence);\n        }\n\n        this.setState({\n            members: members,\n            ascending: !this.state.ascending\n        })\n    }\n\n    handleClose() {\n        this.props.history.goBack();\n    }\n\n    componentDidMount() {\n        const committeeId = this.props.match.params.subcommitteeid ? this.props.match.params.subcommitteeid : this.props.match.params.committeeid\n        const committeeParams = committeeId + '?isPublic=0';\n        this.props.actions.getPartnerCommitteeById(committeeParams)\n            .then(() => {\n                // Checking to see if keys exist and setting initial value if not\n                // otherwise react throws an error in the form fields\n                const commData = this.props.committee.partnerCommitteeByIdData\n                this.setState({\n                    selectedCommittee: {\n                        ...this.props.committee.partnerCommitteeByIdData,\n                        TwitterHandle: commData.TwitterHandle ? commData.TwitterHandle : '',\n                        TwitterEmail: commData.TwitterEmail ? commData.TwitterEmail : '',\n                        Description: commData.Description ? commData.Description : '',\n                        MeetingNote: commData.MeetingNote ? commData.MeetingNote : '',\n                        Abbreviation: commData.Abbreviation ? commData.Abbreviation : '',\n                        ServiceEndDate: commData.ServiceEndDate ? commData.ServiceEndDate : null\n                    },\n                    committeeLoaded: true\n                })\n                return commData\n            })\n            .then((commData) => {\n                // GET MEMBER ROLES FOR THE MEMBERSHIP DROPDOWN\n                this.props.actions.getCommitteeMemberRoles().then(() => {\n                    this.setState({\n                        committeeMemberRoles: commData.ChamberCode === 'H' ? this.props.members.committeeHouseRoles : this.props.members.committeeSenateRoles\n                    })\n                })\n                const chamberCode = 'chamberCode=' + commData.ChamberCode;\n\n                //Get members list and set it to the committeeMemberNames key\n                const organizeMembers = members => {\n                    if (members) {\n                        members.forEach(member => {\n                            member.label = member.MemberDisplayName;\n                            member.value = member.MemberID;\n                        });\n                        this.setState({\n                            committeeMemberNames: members\n                        })\n                    }\n                }\n\n                //Get the session list so the default session ID can be found\n                this.props.actions.getSessionList()\n                    .then(() => {\n                        let defaultSession = null;\n                        this.props.session.sessionList.forEach(session => {\n                            if (session.IsDefault) {\n                                defaultSession = '&sessionID=' + session.SessionID;\n                            }\n                        });\n                        //Get list of current members of committee\n                        this.props.actions.getMembersByCommittee(`isPublic=false&CommitteeID=${committeeId}${defaultSession}`, true)\n                            .then(() => {\n                                // Set the DisplaySequence to the correct order. It should be linear.\n                                let members = [...this.props.members.membersByCommittee];\n                                members.forEach((member, index) => member.DisplaySequence = index + 1)\n                                this.setState({\n                                    members: members,\n                                    membersLoaded: true\n                                });\n                            });\n                        if (this.props.match.params.subcommitteeid) {\n                            //Since this is a subcommittee get the name of the parent committee and put it in the form\n                            this.props.actions.getPartnerCommitteeById(`${this.props.match.params.committeeid}?IsPublic=0`).then(() => {\n                                const parentCommData = this.props.committee.partnerCommitteeByIdData;\n                                this.setState({\n                                    parentCommitteeName: parentCommData.Name\n                                });\n                            });\n                            //Also only include the list of members in the parent committee for the member list\n                            this.props.actions.getMembersByCommittee(`isPublic=false&CommitteeID=${this.props.match.params.committeeid}${defaultSession}`, true)\n                                .then(() => organizeMembers(this.props.members.membersByCommittee));\n                        } else {\n                            //If this is not a subcommittee then get the full member list\n                            this.props.actions.getMemberList(chamberCode + defaultSession)\n                                .then(() => organizeMembers(this.props.members.memberList));\n                        }\n                    })\n\n\n                // Get personnel list for staff and clerk dropdowns\n                this.props.actions.getPersonnelReferences('')\n                    .then(() => {\n                        const filteredStaffAndClerkReferences = this.props.personnel.personnelStaffReferences.concat(this.props.personnel.personnelClerkReferences).filter(personnel => personnel.OrganizationName && personnel.OrganizationName.toLowerCase() === (chamberCode === \"H\" ? \"house\" : \"senate\"))\n                        this.setState({\n                            personnelReferences: filteredStaffAndClerkReferences\n                        });\n                    });\n\n\n            });\n\n        // GET STAFF AND CLERK PERSONNEL BY COMMITTEE ID\n        const personnelParams = 'affiliationID=' + committeeId + '&isPublic=false';\n        this.props.actions.getPersonnelList(personnelParams)\n            .then(() => {\n                // Set the Sequence to the correct order. It should be linear.\n                let clerks = [];\n                let staff = [];\n                this.props.personnel.personnelClerkList.forEach((clerk, index) => clerks.push({ ...clerk, Sequence: index + 1 }));\n                this.props.personnel.personnelStaffList.forEach((staf, index) => staff.push({ ...staf, Sequence: index + 1 }));\n                this.setState({\n                    clerks: clerks,\n                    staff: staff,\n                    personnelLoaded: true\n                })\n            });\n        this.getSubcommittees();\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const {\n            Abbreviation,\n            ChamberCode,\n            CommitteeID,\n            CommitteeNumber,\n            Description,\n            ServiceBeginDate,\n            ServiceEndDate,\n            MeetingNote,\n            Name,\n            TwitterHandle,\n            TwitterEmail,\n            CommitteeFiles,\n            AgendaURL\n        } = this.state.selectedCommittee;\n\n        const { isSaving, committeeLoaded, personnelLoaded, membersLoaded, saved, isFormDirty } = this.state;\n\n        let filterStartDate = (date) => {\n            let result = true;            \n            if (moment(ServiceEndDate).isBefore(date, \"days\")) {\n                result = false;\n            }\n            return result;\n        }\n\n        let filterEndDate = (date) => {\n            let result = true;\n            if (date >= new Date()) {\n                result = false;\n            }\n            if (moment(ServiceBeginDate).isAfter(date, \"days\")) {\n                result = false;\n            }\n            return result;\n        }\n\n        if (!committeeLoaded || !personnelLoaded || !membersLoaded) {\n            return (<div>\n                <div className=\"center-spinner spinner\"></div>\n            </div>)\n        }\n        if (this.state.showPreview) {\n            return (\n                <div>\n                    <div className=\"flex-row\">\n                        <h2>Committee Management Review</h2>\n                        <ReactToPrint\n                            trigger={() => <a type=\"button\" className=\"button print\"> Print</a>}\n                            content={() => this.componentRef}\n                            pageStyle={\"break-inside: avoid\"}\n                        />\n                    </div>\n                    <div ref={el => (this.componentRef = el)}>\n                        <CommitteeDetailsComponent\n                            committeeData={this.state.selectedCommittee}\n                            clerkList={this.state.clerks}\n                            staffList={this.state.staff}\n                            memberList={this.state.members}\n                            memberRoles={this.state.committeeMemberRoles}\n                            subcommitteesList={this.state.subcommitteeData}\n                        />\n                    </div>\n                    <div className=\"button-bar\">\n                        <div></div>\n                        <div className=\"align-right\">\n                            <button onClick={this.togglePreview} className=\"button secondary\">Edit</button>\n                            <button\n                                onClick={() => this.handleSave(true)}\n                                disabled={isSaving || !saved}\n                                className=\"button\">Publish\n                            </button>\n                        </div>\n                    </div>\n                </div>)\n        } else {\n            return (\n                <React.Fragment>\n                    <div>\n                        <Prompt\n                            when={isFormDirty === true}\n                            message={`You have unsaved changes. Are you sure you would like to leave?`}\n                        />\n                    </div>\n                    <h1>{this.props.match.params.subcommitteeid ? 'Edit Subcommittee' : 'Edit Committee'} </h1>\n                    <div className=\"user-forms\" style={{ paddingBottom: this.props.match.params.subcommitteeid ? \"150px\" : \"75px\" }}>\n                        <div className=\"dlas-forms\">\n                            <form>\n                                <fieldset className={this.state.infoFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                                    <legend onClick={this.toggleFieldsetCollapse.bind(this, 'infoFieldsetIsActive')}>{!this.props.match.params.subcommitteeid ? 'Committee Information' : 'Subcommittee Information'}</legend>\n                                    <div className={!this.props.match.params.subcommitteeid ? 'multi-row sixth-40-1 no-margin' : 'multi-row sixth-20-1 no-margin'}>\n                                        {this.props.match.params.subcommitteeid &&\n                                            <div>\n                                                <Fields.TextInput\n                                                    id=\"Name\"\n                                                    label=\"SubCommittee Name\"\n                                                    type=\"text\"\n                                                    placeholder=\"SubCommittee Name\"\n                                                    value={Name}\n                                                    onChange={(val) => this.handleChange(\"Name\", val.target.value)}\n                                                    onBlur={(val) => {\n                                                        if (!val.target.value) {\n                                                            this.setState({ committeeNameMissing: true });\n                                                        } else {\n                                                            this.setState({ committeeNameMissing: false });\n                                                        }\n                                                    }}\n                                                />\n                                                {this.state.committeeNameMissing && <div className=\"input-feedback\">Committee Name is required</div>}\n                                            </div>\n                                        }\n                                        <div>\n                                            <Fields.TextInput\n                                                id=\"Name\"\n                                                label=\"Committee Name\"\n                                                type=\"text\"\n                                                placeholder=\"Committee Name\"\n                                                value={this.props.match.params.subcommitteeid ? this.state.parentCommitteeName : Name}\n                                                onChange={(val) => this.handleChange(\"Name\", val.target.value)}\n                                                disabled={this.props.match.params.subcommitteeid}\n                                                onBlur={(val) => {\n                                                    if (!val.target.value) {\n                                                        this.setState({ committeeNameMissing: true });\n                                                    } else {\n                                                        this.setState({ committeeNameMissing: false });\n                                                    }\n                                                }}\n                                            />\n                                            {this.state.committeeNameMissing && !this.props.match.params.subcommitteeid && <div className=\"input-feedback\">Committee Name is required</div>}\n                                        </div>\n\n                                        <div>\n                                            <Fields.TextInput\n                                                id=\"Abbreviation\"\n                                                label=\"Abbreviation\"\n                                                type=\"text\"\n                                                placeholder=\"ABRV\"\n                                                value={Abbreviation}\n                                                onChange={(val) => this.handleChange(\"Abbreviation\", val.target.value)}\n                                            />\n                                        </div>\n                                        <div>\n                                            <label>Committee #</label>\n                                            <input type=\"text\" id=\"CommitteeNumber\" value={CommitteeNumber} disabled />\n                                        </div>\n                                        <div>\n                                            <label>Chamber</label>\n                                            <input type=\"text\" id=\"ChamberCode\" value={ChamberCode} disabled />\n                                        </div>\n                                        <div>\n                                            <label>Service Start Date</label>\n                                            <DatePicker\n                                                selected={ServiceBeginDate ? moment(ServiceBeginDate) : null}\n                                                onChange={(val) => this.handleDateChange(val, false)}\n                                                popperPlacement=\"top-start\"\n                                                placeholderText=\"Never\"\n                                                isClearable\n                                                filterDate={filterStartDate}\n                                            />\n                                        </div>\n                                        <div>\n                                            <label>Service End Date</label>\n                                            <DatePicker\n                                                selected={ServiceEndDate ? moment(ServiceEndDate) : null}\n                                                onChange={(val) => this.handleDateChange(val, true)}\n                                                popperPlacement=\"top-start\"\n                                                placeholderText=\"Never\"\n                                                isClearable\n                                                filterDate={filterEndDate}\n                                            />\n                                        </div>\n                                    </div>\n                                    <div className=\"single-row no-margin\">\n                                        <div>\n                                            <Fields.TextInput\n                                                id=\"MeetingNote\"\n                                                label=\"Meeting Notes\"\n                                                type=\"text\"\n                                                placeholder=\"Meeting Notes\"\n                                                value={MeetingNote}\n                                                onChange={(val) => this.handleChange(\"MeetingNote\", val.target.value)}\n                                            />\n                                        </div>\n                                    </div>\n                                        <div className=\"single-row no-margin\">\n                                            <div>\n                                                <Fields.TextInput\n                                                    id=\"AgendaURL\"\n                                                    label=\"Agenda URL\"\n                                                    type=\"text\"\n                                                    placeholder=\"Agenda URL\"\n                                                    value={AgendaURL}\n                                                    onChange={(val) => this.handleChange(\"AgendaURL\", val.target.value)}\n                                                />\n                                            </div>\n                                        </div>\n                                </fieldset>\n                                <fieldset className={this.state.clerkFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'}>\n                                    <legend onClick={this.toggleFieldsetCollapse.bind(this, 'clerkFieldsetIsActive')}>{!this.props.match.params.subcommitteeid ? 'Committee Clerk' : 'Subcommittee Clerk'}</legend>\n                                    <div className=\"draggable-grid comm-mgmt-clerk\">\n                                        <div>\n                                            <PersonnelDraggableComponent\n                                                onPersonnelChange={this.handleClerkChange}\n                                                items={this.state.clerks}\n                                                name=\"ClerkGrid\"\n                                                affiliation={this.props.match.params.subcommitteeid ? this.props.match.params.committeeid : this.props.match.params.committeeid}\n                                                dropdownData={this.state.personnelReferences}\n                                                staffRoleTypeID={1}\n                                            />\n                                        </div>\n                                    </div>\n                                </fieldset>\n                                <fieldset className={this.state.staffFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'}>\n                                    <legend onClick={this.toggleFieldsetCollapse.bind(this, 'staffFieldsetIsActive')}>{!this.props.match.params.subcommitteeid ? 'Committee Staff' : 'Subcommittee Staff'}</legend>\n                                    <div className=\"draggable-grid comm-mgmt-staff\">\n                                        <div>\n                                            <PersonnelDraggableComponent\n                                                onPersonnelChange={this.handleStaffChange}\n                                                items={this.state.staff}\n                                                name=\"StaffGrid\"\n                                                affiliation={this.props.match.params.subcommitteeid ? this.props.match.params.subcommitteeid : this.props.match.params.committeeid}\n                                                dropdownData={this.state.personnelReferences}\n                                                staffRoleTypeID={2}\n                                            />\n                                        </div>\n                                    </div>\n                                </fieldset>\n                                <fieldset className={this.state.membershipFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'}>\n                                    <legend onClick={this.toggleFieldsetCollapse.bind(this, 'membershipFieldsetIsActive')}>{!this.props.match.params.subcommitteeid ? 'Committee Membership' : 'Subcommittee Membership'}</legend>\n                                    <div className=\"draggable-grid comm-mgmt-staff\">\n                                        <div>\n                                            <MembersDraggableComponent\n                                                name=\"MembersGrid\"\n                                                affiliation={this.props.match.params.subcommitteeid ? this.props.match.params.subcommitteeid : this.props.match.params.committeeid}\n                                                dropdownDataRoles={this.state.committeeMemberRoles}\n                                                dropdownDataMembers={this.state.committeeMemberNames}\n                                                onMemberChange={this.handleMemberChange}\n                                                items={this.state.members}\n                                                isSubcommittee={this.props.match.params.subcommitteeid ? true : false}\n                                                sortByVotingSequence={this.sortByVotingSequence}\n                                                ascending={this.state.ascending}\n                                            />\n                                        </div>\n                                    </div>\n                                </fieldset>\n                                {!this.props.match.params.subcommitteeid &&\n                                    <fieldset className={this.state.subcommFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'}>\n                                        <legend onClick={this.toggleFieldsetCollapse.bind(this, 'subcommFieldsetIsActive')}>Subcommittee</legend>\n                                        <SubcommitteeManagementGrid\n                                            showCreateSuccess={this.state.showCreateSuccess}\n                                            showCreateFailure={this.state.showCreateFailure}\n                                            parentCommitteeID={CommitteeID}\n                                            parentCommitteeNumber={CommitteeNumber}\n                                            subcommitteeData={this.state.subcommitteeData}\n                                            isLoaded={this.state.subcommitteeIsLoaded}\n                                            subcommitteeMessage={this.state.subcommitteeMessage}\n                                            createSubcommittee={this.createSubcommittee}\n                                        />\n                                    </fieldset>\n                                }\n                                <div className=\"button-bar floating-button-bar\" style={{ paddingBottom: \"15px\", paddingRight: \"15px\" }}>\n                                    <button className=\"button secondary\" type=\"button\" onClick={() => this.handleClose()} style={{ width: \"100px\" }}>Close</button>\n                                    <div className=\"align-right\">\n                                        <button className=\"button\" onClick={() => this.handleSave(false)} type=\"button\" disabled={isSaving}>Save</button>\n                                        <button className=\"button\" type=\"button\" disabled={isSaving || !saved} onClick={this.togglePreview}>Preview</button>\n                                    </div>\n                                </div>\n                            </form>\n                        </div>\n                    </div>\n                </React.Fragment>\n            );\n        }\n    }\n};\n\nexport default connect(\n    (state) => {\n        const { session, committee, personnel, members, nav } = state;\n        return {\n            session,\n            committee,\n            personnel,\n            members,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, committeeActionCreators, personnelActionCreators, memberActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(NewCommitteeFormComponent)\n\n\n\n\n\n\n\n\n","import React from 'react';\nimport { Route } from 'react-router';\nimport CommitteeManagementGrid from './lis-committee-grid';\nimport CommitteeManagementForm from './lis-committee-form'; \n\n\nclass CommitteeManagement extends React.Component {\n    render() {\n        return (\n            <div>\n                <Route exact path={this.props.match.path} component={CommitteeManagementGrid} />\n                <Route path={`${this.props.match.path}/edit-committee/:committeeid`} component={CommitteeManagementForm} />\n                <Route path={`${this.props.match.path}/edit-subcommittee/:committeeid/:subcommitteeid`} component={CommitteeManagementForm} />\n            </div>\n        )\n    }\n}\n\nexport default CommitteeManagement;","const emptyCache = (cache) => {\n    if ('caches' in window) {\n        caches.keys().then((names) => {\n            names.forEach(name => {\n                caches.delete(name);\n            })\n        });\n        window.location.reload(true);\n    }\n}\n\nexport default emptyCache","import { partnerRequest, publicRequest } from '../services/request.service'\nimport emptyCache from '../services/emptyCache';\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst getReferencesSuccess = \"GET_REFERENCES_SUCCESS\";\nconst getReferencesFailure = \"GET_REFERENCES_FAILURE\";\n\nconst getCalendarListSuccess = \"GET_CALENDAR_LIST_SUCCESS\";\nconst getCalendarListFailure = \"GET_CALENDAR_LIST_FAILURE\";\n\nconst createCalendarSuccess = \"CREATE_CALENDAR_SUCCESS\";\nconst createCalendarFailure = \"CREATE_CALENDAR_FAILURE\";\n\nconst saveCalendarSuccess = \"SAVE_CALENDAR_SUCCESS\";\nconst saveCalendarFailure = \"SAVE_CALENDAR_FAILURE\";\n\nconst saveCalendarFileSuccess = \"SAVE_CALENDAR_FILE_SUCCESS\";\nconst saveCalendarFileFailure = \"SAVE_CALENDAR_FILE_FAILURE\";\n\nconst getCalendarSuccess = \"GET_CALENDAR_SUCCESS\";\nconst getCalendarFailure = \"GET_CALENDAR_FAILURE\"\n\nconst getDocketListSuccess = \"GET_DOCKET_LIST_SUCCESS\";\nconst getDocketListFailure = \"GET_DOCKET_LIST_FAILURE\";\n\nconst createDocketSuccess = \"CREATE_DOCKET_SUCCESS\";\nconst createDocketFailure = \"CREATE_DOCKET_FAILURE\";\n\nconst saveDocketSuccess = \"SAVE_DOCKET_SUCCESS\";\nconst saveDocketFailure = \"SAVE_DOCKET_FAILURE\";\n\nconst docketByIdRequest = \"GET_DOCKET_BY_ID_REQUEST\";\nconst docketByIdSuccess = \"GET_DOCKET_BY_ID_SUCCESS\";\nconst docketByIdFailure = \"GET_DOCKET_BY_ID_FAILURE\";\n\nconst patronListDocketByIdRequest = \"GET_PATRON_LIST_DOCKET_BY_ID_REQUEST\";\nconst patronListDocketByIdSuccess = \"GET_PATRON_LIST_DOCKET_BY_ID_SUCCESS\";\nconst patronListDocketByIdFailure = \"GET_PATRON_LIST_DOCKET_BY_ID_FAILURE\";\n\nconst getCalendarCategoriesReferencesSuccess = \"GET_CALENDAR_CATEGORIES_REFERENCES_SUCCESS\";\nconst getCalendarCategoriesReferencesFailure = \"GET_CALENDAR_CATEGORIES_REFERENCES_FAILURE\";\n\nconst getCalendarAssignmentsSuccess = \"GET_CALENDAR_MAPPINGS_SUCCESS\";\nconst getCalendarAssignmentsFailure = \"GET_CALENDAR_MAPPINGS_FAILURE\";\n\nconst getAdminCalendarAssignmentsSuccess = \"GET_ADMIN_CALENDAR_MAPPINGS_SUCCESS\";\nconst getAdminCalendarAssignmentsFailure = \"GET_ADMIN_CALENDAR_MAPPINGS_FAILURE\";\n\nconst saveCalendarAssignmentSuccess = \"SAVE_CALENDAR_MAPPING_SUCCESS\";\nconst saveCalendarAssignmentFailure = \"SAVE_CALENDAR_MAPPING_FAILURE\";\n\nconst saveCalendarCurrentItemSuccess = \"SAVE_CALENDAR_CURRENT_ITEM_SUCCESS\";\nconst saveCalendarCurrentItemFailure = \"SAVE_CALENDAR_CURRENT_ITEM_FAILURE\";\n\nconst replacePdfRequest = \"REPLACE_PDF_REQUEST\";\n\nconst sendDocketHtmlRequest = \"SEND_HTML_REQUEST\";\n\nconst sendCalendarHtmlRequest = \"SEND_HTML_REQUEST\";\n\nconst initialState = {\n    references: [],\n    getReferencesError: '',\n    docketList: [],\n    getDocketListError: '',\n    calendarList: [],\n    calendarListError: '',\n    calendarCreate: '',\n    calendarCreateError: '',\n    calendarSave: '',\n    calendarSaveError: '',\n    calendarFileSave: '',\n    calendarFileSaveError: '',\n    calendarGet: '',\n    calendarGetError: '',\n    calendarCategoriesReferences: [],\n    calendarCategoriesReferencesError: '',\n    docketByIdData: '',\n    docketSave: '',\n    docketSaveError: '',\n    replacePdfResponse: '',\n    replacePdfError: '',\n    patronListDocketByIdData: '',\n    sendDocketHtmlError: '',\n    sendCalendarHtmlError: '',\n    sendDocketHtmlResponse: '',\n    sendCalendarHtmlResponse: '',\n    calendarAssignments: [],\n    getCalendarAssignmentsError: '',\n    adminCalendarAssignments: [],\n    getAdminCalendarAssignmentsError: '',\n    calendarAssignmentSave: [],\n    saveCalendarAssignmentsError: ''\n};\n\nexport const calendarActionCreators = {\n\n    // GET CALENDAR BY ID FOR DOCKET MANAGEMENT (W/ PARTNER AUTH)\n    requestDocketById: () => ({\n        type: docketByIdRequest,\n        isFetching: true\n    }),\n\n    receiveDocketById: responseObj => ({\n        type: docketByIdSuccess,\n        isFetching: false,\n        docketByIdData: responseObj\n    }),\n\n    docketByIdError: message => ({\n        type: docketByIdFailure,\n        isFetching: false,\n        message\n    }),\n\n    getDocketById: (params, partner) => {\n        return dispatch => {\n            dispatch(calendarActionCreators.requestDocketById());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetPartnerDocketsByIdAsync', 'GET', headers, '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetDocketsByIdAsync', 'GET', headers, '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.docketByIdError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receiveDocketById(result[1].Dockets[0]))\n                        return result[1].Dockets[0];\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.docketByIdError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    requestPatronListDocketById: () => ({\n        type: patronListDocketByIdRequest,\n        isFetching: true\n    }),\n\n    receivePatronListDocketById: responseObj => ({\n        type: patronListDocketByIdSuccess,\n        isFetching: false,\n        patronListDocketByIdData: responseObj\n    }),\n\n    patronListDocketByIdError: message => ({\n        type: patronListDocketByIdFailure,\n        isFetching: false,\n        message\n    }),\n\n    getPatronListDocketById: (params) => {\n        return dispatch => {\n            dispatch(calendarActionCreators.requestPatronListDocketById());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetCalendarPatronListAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.patronListDocketByIdError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receivePatronListDocketById(result[1].ListItems[0]))\n                        return result.ListItems;\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.patronListDocketByIdError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveReferences: (responseObj) => ({\n        type: getReferencesSuccess,\n        references: responseObj\n    }),\n\n    getReferencesError: error => ({\n        type: getReferencesFailure,\n        getReferencesError: error\n    }),\n\n    getReferences: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetCalendarActionsReferenceAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.getReferencesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receiveReferences(result[1].CalendarActions))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.receiveReferences([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveDocketList: (responseObj) => ({\n        type: getDocketListSuccess,\n        docketList: responseObj\n    }),\n\n    getDocketListError: error => ({\n        type: getDocketListFailure,\n        getDocketListError: error\n    }),\n\n    getDocketList: (params, partner) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetDocketPartnerListAsync', 'GET', headers, '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetDocketListAsync', 'GET', headers, '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.getDocketListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(calendarActionCreators.receiveDocketList(result[1].Dockets))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.receiveDocketList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveDocketCreate: (responseObj) => ({\n        type: createDocketSuccess,\n        docketCreate: responseObj\n    }),\n\n    createDocketError: error => ({\n        type: createDocketFailure,\n        createDocketError: error\n    }),\n\n    createDocket: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/CreateDocketsAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.createDocketError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receiveDocketCreate(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.createDocketError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveDocketSave: (responseObj) => ({\n        type: saveDocketSuccess,\n        docketSave: responseObj\n    }),\n\n    docketSaveError: error => ({\n        type: saveDocketFailure,\n        docketSaveError: error\n    }),\n\n    saveDocket: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/SaveDocketsAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.docketSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        //If the response is an ID then the docket was deleted\n                        if (parseInt(result[1])) {\n                            dispatch(calendarActionCreators.receiveDocketSave(result[1]))\n                        } else {\n                            // Dispatch the success action                \n                            dispatch(calendarActionCreators.receiveDocketSave(result[1].Dockets[0] || result[1].HouseAgendas[0]))\n                        }\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.docketSaveError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCalendarCategoriesReferences: (responseObj, includeChairmansReportCategories) => ({\n        type: getCalendarCategoriesReferencesSuccess,\n        calendarCategoriesReferences: includeChairmansReportCategories ? responseObj.CalendarCategoryTypes : responseObj.CalendarCategoryTypes.filter(cc => cc.CategoryType !== 'Chairmans Report')\n    }),\n\n    getCalendarCategoriesReferencesError: error => ({\n        type: getCalendarCategoriesReferencesFailure,\n        getCalendarCategoriesReferencesError: error\n    }),\n\n    getCalendarCategoriesReferences: (params = '', includeChairmansReportCategories = false) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetCalendarCategoryTypesReferenceAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.getCalendarCategoriesReferencesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receiveCalendarCategoriesReferences(result[1], includeChairmansReportCategories))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.getCalendarCategoriesReferencesError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCalendarAssignments: (responseObj) => ({\n        type: getCalendarAssignmentsSuccess,\n        calendarAssignments: responseObj.CalendarAssignments\n    }),\n\n    getCalendarAssignmentsError: error => ({\n        type: getCalendarAssignmentsFailure,\n        getCalendarAssignmentsError: error\n    }),\n\n    getCalendarAssignments: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetCalendarAssignmentAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.getCalendarAssignmentsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receiveCalendarAssignments(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.getCalendarAssignmentsError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveAdminCalendarAssignments: (responseObj) => ({\n        type: getAdminCalendarAssignmentsSuccess,\n        adminCalendarAssignments: responseObj.CalendarAssignments\n    }),\n\n    getAdminCalendarAssignmentsError: error => ({\n        type: getAdminCalendarAssignmentsFailure,\n        getAdminCalendarAssignmentsError: error\n    }),\n\n    getAdminCalendarAssignments: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetAdminCalendarAssignmentAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.getAdminCalendarAssignmentsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receiveAdminCalendarAssignments(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.getAdminCalendarAssignmentsError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCalendarAssignmentSave: (responseObj) => ({\n        type: saveCalendarAssignmentSuccess,\n        calendarAssignmentSave: responseObj\n    }),\n\n    saveCalendarAssignmentError: error => ({\n        type: saveCalendarAssignmentFailure,\n        saveCalendarAssignmentsError: error\n    }),\n\n    saveCalendarAssignment: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/SaveCalendarAssignmentAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.saveCalendarAssignmentError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receiveCalendarAssignmentSave(JSON.parse(result[1].Message)))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.saveCalendarAssignmentError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCalendarList: (responseObj) => ({\n        type: getCalendarListSuccess,\n        calendarList: responseObj,\n\n    }),\n\n    calendarListError: error => ({\n        type: getCalendarListFailure,\n        calendarListError: error\n    }),\n\n    getCalendarList: (params, partner) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetCalendarPartnerListAsync', 'GET', headers, '', params);\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetCalendarListAsync', 'GET', headers, '', params);\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.calendarListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receiveCalendarList(result[1].Calendars))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.receiveCalendarList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCalendarCreate: (responseObj) => ({\n        type: createCalendarSuccess,\n        calendarCreate: responseObj,\n    }),\n\n    createCalendarError: error => ({\n        type: createCalendarFailure,\n        calendarCreateError: error\n    }),\n\n    createCalendar: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/CreateCalendarAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.createCalendarError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        const createCalendarResponse = JSON.parse(result[1].Message);\n                        dispatch(calendarActionCreators.receiveCalendarCreate(createCalendarResponse[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.createCalendarError('No Content'))\n                        return Promise.reject('No Content')\n                    } else {\n                        dispatch(calendarActionCreators.createCalendarError('fail'));\n                        return Promise.reject('fail');\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCalendarSave: (responseObj) => ({\n        type: saveCalendarSuccess,\n        calendarSave: responseObj\n    }),\n\n    calendarSaveError: error => ({\n        type: saveCalendarFailure,\n        calendarSaveError: error\n    }),\n\n    saveCalendar: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/SaveCalendarAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.calendarSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        try {\n                            const saveCalendarResponse = JSON.parse(result[1].Message);\n                            dispatch(calendarActionCreators.receiveCalendarSave(saveCalendarResponse[0]));\n                        } catch {\n                            // Message does not contain json. \n                            dispatch(calendarActionCreators.receiveCalendarSave(result[1].Message));\n                        }\n                        // The calendar save can go fine but the failure message can contain information about the minutes save failing\n                        if (result[1].FailureMessage) {\n                            return result[1].FailureMessage;\n                        }\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.calendarSaveError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCalendarFileSave: (responseObj) => ({\n        type: saveCalendarFileSuccess,\n        calendarFileSave: responseObj\n    }),\n\n    calendarFileSaveError: error => ({\n        type: saveCalendarFileFailure,\n        calendarFileSaveError: error\n    }),\n\n    saveCalendarFile: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_FILE_API_URL) + '/CalendarFileGeneration/api/ProcessCalendarFileAsync', 'GET', headers, '', params, true)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.calendarFileSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(calendarActionCreators.receiveCalendarFileSave(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.calendarFileSaveError('No Content'))\n                        return Promise.reject('No Content')\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCalendarById: responseObj => ({\n        type: getCalendarSuccess,\n        calendarGet: responseObj\n    }),\n\n    calendarGetError: message => ({\n        type: getCalendarFailure,\n        calendarGetError: message\n    }),\n\n    getCalendarById: (params, partner) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetPartnerCalendarsByIdAsync', 'GET', headers, '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/GetCalendarsByIdAsync', 'GET', headers, '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.calendarGetError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(calendarActionCreators.receiveCalendarById(result[1].Calendars[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.calendarGetError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCalendarCurrentItem: responseObj => ({\n        type: saveCalendarCurrentItemSuccess,\n        calendarCurrentItem: responseObj\n    }),\n\n    calendarCurrentItemError: message => ({\n        type: saveCalendarCurrentItemFailure,\n        calendarCurrentItemError: message\n    }),\n\n    saveCalendarCurrentItem: body => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/api/SaveCalendarCurrentItemAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(calendarActionCreators.calendarCurrentItemError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        try {\n                            const response = JSON.parse(result[1].Message);\n                            dispatch(calendarActionCreators.receiveCalendarCurrentItem(response[0]))\n                        } catch {\n                            dispatch(calendarActionCreators.calendarCurrentItemError('Response malformed: ' + result[1]))\n                            return Promise.reject('Response malformed: ' + result[1])\n                        }\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(calendarActionCreators.calendarCurrentItemError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    replacePdf: (params, body) => {\n        return dispatch => {\n            const headers = {\n                'cache-control': 'no-cache'\n            }\n            let formData = new FormData();\n            formData.append('replacementPdfFile', body);\n            return partnerRequest((API_URL || process.env.REACT_APP_CALENDAR_FILE_API_URL) + '/CalendarFileGeneration/api/UploadReplacementCalendarFileAsync', 'POST', headers, formData, params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch({\n                            type: replacePdfRequest,\n                            replacePdfError: result[1]\n                        });\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch({\n                            type: replacePdfRequest,\n                            replacePdfResponse: result[1]\n                        });\n                        emptyCache();\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch({\n                            type: replacePdfRequest,\n                            replacePdfError: \"No Content\"\n                        });\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    sendDocketHtml: (body) => {\n        return dispatch => {\n            const headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n\n            return partnerRequest(\"https://apps.dlas.virginia.gov/senatevote/api/savedocketasync\", 'POST', headers, body, '')\n                .then(result => {\n                    dispatch({\n                        type: sendDocketHtmlRequest,\n                        sendDocketHtmlResponse: result\n                    });\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    sendCalendarHtml: (body) => {\n        return dispatch => {\n            const headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n\n            return partnerRequest(\"https://apps.dlas.virginia.gov/SenateVote/api/saveCalendarAsync\", 'POST', headers, body, '')\n                .then(result => {\n                    dispatch({\n                        type: sendCalendarHtmlRequest,\n                        sendCalendarHtmlResponse: result\n                    });\n                }).catch(err => Promise.reject(err))\n        }\n    }\n};\n\nexport const reducer = (state, action) => {\n    state = state || initialState;\n\n    switch (action.type) {\n        case docketByIdRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case docketByIdSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                docketByIdData: action.docketByIdData,\n                errorMessage: ''\n            });\n        case docketByIdFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case patronListDocketByIdRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case patronListDocketByIdSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                patronListDocketByIdData: action.patronListDocketByIdData,\n                errorMessage: ''\n            });\n        case patronListDocketByIdFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.errorMessage\n            });\n        case getReferencesFailure:\n            return Object.assign({}, state, {\n                getReferencesError: action.getReferencesError\n            });\n        case getReferencesSuccess:\n            return Object.assign({}, state, {\n                references: action.references,\n                getReferencesError: ''\n            });\n        case getDocketListFailure:\n            return Object.assign({}, state, {\n                getDocketListError: action.getDocketListError\n            });\n        case getDocketListSuccess:\n            return Object.assign({}, state, {\n                docketList: action.docketList,\n                getDocketListError: ''\n            });\n        case createDocketFailure:\n            return Object.assign({}, state, {\n                docketCreateError: action.docketCreateError\n            });\n        case createDocketSuccess:\n            return Object.assign({}, state, {\n                docketCreate: action.docketCreate,\n                docketCreateError: ''\n            });\n        case saveDocketFailure:\n            return Object.assign({}, state, {\n                docketSaveError: action.docketSaveError\n            });\n        case saveDocketSuccess:\n            return Object.assign({}, state, {\n                docketSave: action.docketSave,\n                docketSaveError: ''\n            });\n        case getCalendarCategoriesReferencesFailure:\n            return Object.assign({}, state, {\n                getCalendarCategoriesReferencesError: action.getCalendarCategoriesReferencesError\n            });\n        case getCalendarCategoriesReferencesSuccess:\n            return Object.assign({}, state, {\n                calendarCategoriesReferences: action.calendarCategoriesReferences,\n                getCalendarCategoriesReferencesError: ''\n            });\n        case getCalendarAssignmentsFailure:\n            return Object.assign({}, state, {\n                getCalendarAssignmentsError: action.getCalendarAssignmentsError\n            });\n        case getCalendarAssignmentsSuccess:\n            return Object.assign({}, state, {\n                calendarAssignments: action.calendarAssignments,\n                getCalendarAssignmentsError: ''\n            });\n        case getAdminCalendarAssignmentsFailure:\n            return Object.assign({}, state, {\n                getAdminCalendarAssignmentsError: action.getAdminCalendarAssignmentsError\n            });\n        case getAdminCalendarAssignmentsSuccess:\n            return Object.assign({}, state, {\n                adminCalendarAssignments: action.adminCalendarAssignments,\n                getAdminCalendarAssignmentsError: ''\n            });\n        case saveCalendarAssignmentFailure:\n            return Object.assign({}, state, {\n                saveCalendarAssignmentsError: action.saveCalendarAssignmentsError\n            });\n        case saveCalendarAssignmentSuccess:\n            return Object.assign({}, state, {\n                calendarAssignmentSave: action.calendarAssignmentSave,\n                saveCalendarAssignmentsError: ''\n            });\n        case getCalendarListFailure:\n            return Object.assign({}, state, {\n                calendarListError: action.calendarListError\n            });\n        case getCalendarListSuccess:\n            return Object.assign({}, state, {\n                calendarList: action.calendarList,\n                calendarListError: ''\n            });\n        case createCalendarFailure:\n            return Object.assign({}, state, {\n                calendarCreateError: action.calendarCreateError\n            });\n        case createCalendarSuccess:\n            return Object.assign({}, state, {\n                calendarCreate: action.calendarCreate,\n                calendarCreateError: ''\n            });\n        case saveCalendarFailure:\n            return Object.assign({}, state, {\n                calendarSaveError: action.calendarSaveError\n            });\n        case saveCalendarSuccess:\n            return Object.assign({}, state, {\n                calendarSave: action.calendarSave,\n                calendarSaveError: ''\n            });\n        case saveCalendarFileFailure:\n            return Object.assign({}, state, {\n                calendarFileSaveError: action.calendarFileSaveError\n            });\n        case saveCalendarFileSuccess:\n            return Object.assign({}, state, {\n                calendarFileSave: action.calendarFileSave,\n                calendarFileSaveError: ''\n            });\n        case getCalendarFailure:\n            return Object.assign({}, state, {\n                calendarGetError: action.calendarGetError\n            });\n        case getCalendarSuccess:\n            return Object.assign({}, state, {\n                calendarGet: action.calendarGet,\n                calendarGetError: ''\n            });\n        case saveCalendarCurrentItemFailure:\n            return Object.assign({}, state, {\n                calendarCurrentItemError: action.calendarCurrentItemError\n            });\n        case saveCalendarCurrentItemSuccess:\n            return Object.assign({}, state, {\n                calendarCurrentItem: action.calendarCurrentItem,\n                calendarCurrentItemError: ''\n            });\n        case replacePdfRequest:\n            return Object.assign({}, state, {\n                replacePdfResponse: action.replacePdfResponse || state.replacePdfResponse,\n                replacePdfError: action.replacePdfError || ''\n            });\n        default:\n            return state;\n    }\n};\n","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst scheduleListSuccess = 'SCHEDULE_LIST_SUCCESS';\nconst scheduleListFailure = 'SCHEDULE_LIST_FAILURE';\n\nconst scheduleTypeListSuccess = 'SCHEDULE_TYPE_LIST_SUCCESS';\nconst scheduleTypeListFailure = 'SCHEDULE_TYPE_LIST_FAILURE';\n\nconst scheduleGetSuccess = 'SCHEDULE_GET_SUCCESS';\nconst scheduleGetFailure = 'SCHEDULE_GET_FAILURE';\n\nconst scheduleSaveSuccess = 'SCHEDULE_SAVE_SUCCESS';\nconst scheduleSaveFailure = 'SCHEDULE_SAVE_FAILURE';\n\nconst scheduleCreateSuccess = 'SCHEDULE_CREATE_SUCCESS';\nconst scheduleCreateFailure = 'SCHEDULE_CREATE_FAILURE';\n\nconst meetingsCalendarPreviewSuccess = \"MEETINGS_CALENDAR_PREVIEW_SUCCESS\";\nconst meetingsCalendarPreviewFailure = \"MEETINGS_CALENDAR_PREVIEW_FAILURE\";\n\nconst getMeetingRoomReferencesSuccess = \"GET_MEETING_ROOM_REFERENCES_SUCCESS\";\nconst getMeetingRoomReferencesFailure = \"GET_MEETING_ROOM_REFERENCES_FAILURE\";\n\nconst subcommitteeMembersRequest = \"GET_SUBCOMMITTEE_MEMBERS_REQUEST\";\nconst subcommitteeMembersSuccess = \"GET_SUBCOMMITTEE_MEMBERS_SUCCESS\";\nconst subcommitteeMembersFailure = \"GET_SUBCOMMITTEE_MEMBERS_FAILURE\";\n\nconst uploadMeetingPdfSuccess = \"UPLOAD_MEETING_PDF_SUCCESS\";\nconst uploadMeetingPdfFailure = \"UPLOAD_MEETING_PDF_FAILURE\";\n\nconst initialState = {\n    scheduleList: [],\n    schedule: {},\n    scheduleListError: '',\n    scheduleTypeListError: '',\n    scheduleGetError: '',\n    scheduleSaveError: '',\n    scheduleCreateError: '',\n    meetingRoomReferences: [],\n    meetingRoomReferencesError: '',\n    meetingsCalendarPreview: '',\n    meetingsCalendarPreviewError: '',\n    subcommitteeMembers: '',\n    uploadMeetingPdf: '',\n    uploadMeetingPdfError: ''\n};\n\nexport const scheduleActionCreators = {\n\n    receiveScheduleList: (content) => ({\n        type: scheduleListSuccess,\n        scheduleList: content\n    }),\n\n    scheduleListError: (message) => ({\n        type: scheduleListFailure,\n        scheduleListError: message\n    }),\n\n    getScheduleList: (params, parter) => {\n        return dispatch => {\n            let request = \"\";\n            if (parter) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_SCHEDULE_API_URL) + '/Schedule/api/GetPartnerScheduleListAsync?', 'GET', '', '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_SCHEDULE_API_URL) + '/Schedule/api/GetScheduleListAsync?', 'GET', '', '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(scheduleActionCreators.scheduleListError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(scheduleActionCreators.receiveScheduleList(result[1].Schedules));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(scheduleActionCreators.receiveScheduleList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveScheduleTypeList: (content) => ({\n        type: scheduleTypeListSuccess,\n        scheduleTypeList: content\n    }),\n\n    scheduleTypeListError: (message) => ({\n        type: scheduleTypeListFailure,\n        scheduleTypeListError: message\n    }),\n\n    getScheduleTypeList: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_SCHEDULE_API_URL) + '/Schedule/api/GetScheduleTypesReferenceAsync?', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(scheduleActionCreators.scheduleTypeListError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(scheduleActionCreators.receiveScheduleTypeList(result[1].ScheduleTypes));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(scheduleActionCreators.receiveScheduleTypeList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveSchedule: (content) => ({\n        type: scheduleGetSuccess,\n        schedule: content\n    }),\n\n    scheduleError: (message) => ({\n        type: scheduleGetFailure,\n        scheduleGetError: message\n    }),\n\n    getSchedule: (params) => {\n        return dispatch => {\n\n            return partnerRequest((API_URL || process.env.REACT_APP_SCHEDULE_API_URL) + '/Schedule/api/GetPartnerSchedulebyIdAsync?', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(scheduleActionCreators.scheduleError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(scheduleActionCreators.receiveSchedule(result[1].Schedules[0]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(scheduleActionCreators.receiveSchedule([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveScheduleSave: (message) => ({\n        type: scheduleSaveSuccess,\n        scheduleSave: message\n    }),\n\n    scheduleSaveError: (message) => ({\n        type: scheduleSaveFailure,\n        scheduleSaveError: message\n    }),\n\n    saveSchedule: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_SCHEDULE_API_URL) + '/Schedule/api/SaveScheduleAsync/', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(scheduleActionCreators.scheduleSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(scheduleActionCreators.receiveScheduleSave(result[1]))\n                        return Promise.resolve(result[1])\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(scheduleActionCreators.receiveScheduleSave(\"\"))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveScheduleCreate: (message) => ({\n        type: scheduleCreateSuccess,\n        scheduleCreate: message\n    }),\n\n    scheduleCreateError: (message) => ({\n        type: scheduleCreateFailure,\n        scheduleCreateError: message\n    }),\n\n    createSchedule: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_SCHEDULE_API_URL) + '/Schedule/api/CreateScheduleAsync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(scheduleActionCreators.scheduleCreateError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(scheduleActionCreators.receiveScheduleCreate(result[1]))\n                        return Promise.resolve(result[1])\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(scheduleActionCreators.scheduleCreateError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveMeetingRoomReferences: (responseObj) => ({\n        type: getMeetingRoomReferencesSuccess,\n        meetingRoomReferences: responseObj\n    }),\n\n    getMeetingRoomReferencesError: error => ({\n        type: getMeetingRoomReferencesFailure,\n        getMeetingRoomReferencesError: error\n    }),\n\n    getMeetingRoomReferences: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_SCHEDULE_API_URL) + '/Schedule/api/GetMeetingRoomsReferenceAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(scheduleActionCreators.getMeetingRoomReferencesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(scheduleActionCreators.receiveMeetingRoomReferences(result[1].MeetingRooms))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(scheduleActionCreators.getMeetingRoomReferencesError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveMeetingsCalendarPreview: (responseObj) => ({\n        type: meetingsCalendarPreviewSuccess,\n        meetingsCalendarPreview: responseObj\n    }),\n\n    getMeetingsCalendarPreviewError: error => ({\n        type: meetingsCalendarPreviewFailure,\n        getMeetingsCalendarPreviewError: error\n    }),\n\n    getMeetingsCalendarPreview: (params) => {\n        return dispatch => {\n            let config = {\n                method: 'GET',\n                headers: {\n                    \"Content-Type\": \"application/json; charset=utf-8\",\n                    \"authorization\": \"Bearer \" + localStorage.getItem('LIS_ID_TOKEN'),\n                    \"WebAPIKey\": process.env.REACT_APP_API_KEY\n                },\n            }\n\n            let url = (API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/Schedule/api/PreviewSchedulePDF' + params;\n\n            return fetch(url, config)\n                .then(result => {\n                    if (result) {\n                        dispatch(scheduleActionCreators.receiveMeetingsCalendarPreview(result))\n                    } else if (!result) {\n                        dispatch(scheduleActionCreators.getMeetingsCalendarPreviewError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    requestSubcommitteeMembers: () => ({\n        type: subcommitteeMembersRequest,\n        isFetching: true\n    }),\n\n    receiveSubcommitteeMembers: (responseObj) => ({\n        type: subcommitteeMembersSuccess,\n        isFetching: false,\n        subcommitteeMembers: responseObj\n    }),\n\n    subcommitteeMembersError: message => ({\n        type: subcommitteeMembersFailure,\n        isFetching: false,\n        subcommitteeMembersError: message\n    }),\n\n    getSubcommitteeMembers: (params) => {\n        return dispatch => {\n            dispatch(scheduleActionCreators.requestSubcommitteeMembers());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n\n            return partnerRequest(API_URL + '/Schedule/api/GetPartnerScheduleSubcommitteeMemberListAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(scheduleActionCreators.subcommitteeMembersError(result))\n                        return Promise.reject(result)\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(scheduleActionCreators.receiveSubcommitteeMembers(\"\"))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    } else if (result[1]) {\n                        // Dispatch the success action\n                        dispatch(scheduleActionCreators.receiveSubcommitteeMembers(result[1].SubcomitteeMembers))\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveUploadMeetingPdf: (responseObj) => ({\n        type: uploadMeetingPdfSuccess,\n        isFetching: false,\n        uploadMeetingPdf: responseObj\n    }),\n\n    uploadMeetingPdfError: message => ({\n        type: uploadMeetingPdfFailure,\n        isFetching: false,\n        uploadMeetingPdfError: message\n    }),\n\n    uploadMeetingPdf: (params, file) => {\n        return dispatch => {\n            let headers = {\n                'cache-control': 'no-cache'\n            }\n            let formData = new FormData();\n            formData.append('pdfFile', file);\n            return partnerRequest(API_URL + '/Schedule/api/UploadScheduleFileAsync', 'POST', headers, formData, params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(scheduleActionCreators.uploadMeetingPdfError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(scheduleActionCreators.receiveUploadMeetingPdf([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    } else if (result[1]) {\n                        // Dispatch the success action\n                        dispatch(scheduleActionCreators.receiveUploadMeetingPdf(result[1]))\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    }\n};\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n    switch (action.type) {\n        case scheduleListSuccess:\n            return Object.assign({}, state, {\n                scheduleList: action.scheduleList,\n                scheduleListError: ''\n            })\n        case scheduleListFailure:\n            return Object.assign({}, state, {\n                scheduleListError: action.scheduleListError\n            })\n        case scheduleTypeListSuccess:\n            return Object.assign({}, state, {\n                scheduleTypeList: action.scheduleTypeList,\n                scheduleTypeListError: ''\n            })\n        case scheduleTypeListFailure:\n            return Object.assign({}, state, {\n                scheduleTypeListError: action.scheduleTypeListError\n            })\n        case scheduleGetSuccess:\n            return Object.assign({}, state, {\n                schedule: action.schedule,\n                scheduleGetError: ''\n            })\n        case scheduleGetFailure:\n            return Object.assign({}, state, {\n                scheduleGetError: action.scheduleGetError\n            })\n        case scheduleSaveSuccess:\n            return Object.assign({}, state, {\n                scheduleSaveSuccess: action.scheduleSave,\n                scheduleSaveError: ''\n            })\n        case scheduleSaveFailure:\n            return Object.assign({}, state, {\n                scheduleSaveError: action.scheduleSaveError\n            })\n        case scheduleCreateSuccess:\n            return Object.assign({}, state, {\n                scheduleCreateSuccess: action.scheduleCreate,\n                scheduleCreateError: ''\n            })\n        case scheduleCreateFailure:\n            return Object.assign({}, state, {\n                scheduleCreateError: action.scheduleCreateError\n            })\n        case meetingsCalendarPreviewSuccess:\n            return Object.assign({}, state, {\n                meetingsCalendarPreview: action.meetingsCalendarPreview,\n                meetingsCalendarPreviewError: ''\n            });\n        case meetingsCalendarPreviewFailure:\n            return Object.assign({}, state, {\n                meetingsCalendarPreviewError: action.meetingsCalendarPreviewError\n            });\n        case getMeetingRoomReferencesFailure:\n            return Object.assign({}, state, {\n                getMeetingRoomReferencesError: action.getMeetingRoomReferencesError\n            });\n        case getMeetingRoomReferencesSuccess:\n            return Object.assign({}, state, {\n                meetingRoomReferences: action.meetingRoomReferences,\n                getMeetingRoomReferencesError: ''\n            });\n        case subcommitteeMembersRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case subcommitteeMembersSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                subcommitteeMembers: action.subcommitteeMembers,\n                errorMessage: ''\n            });\n        case subcommitteeMembersFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case uploadMeetingPdfSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                uploadMeetingPdf: action.uploadMeetingPdf,\n                uploadMeetingPdfError: ''\n            });\n        case uploadMeetingPdfFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                uploadMeetingPdfError: action.uploadMeetingPdfError\n            });\n        default:\n            return state\n    }\n};","import React from 'react';\nimport ReactTable from \"react-table\";\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { calendarActionCreators } from '../../../stores/lis-calendar-store';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { connect } from 'react-redux';\nimport moment from 'moment-timezone';\nimport DatePicker from \"react-datepicker\";\nimport { cancelRequest } from '../../../services/request.service';\nimport { scheduleActionCreators } from '../../../stores/lis-schedule-store';\n\nclass DocketGrid extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            isLoaded: false,\n            sessionOptions: [],\n            committeeOptions: [],\n            subcommitteeOptions: [],\n            docketList: [],\n            docketDate: moment().utc().startOf('day').hour(16).minute(30),\n            showCreateSuccess: false,\n            createFailureMessage: '',\n            isAdding: false,\n            showDeleteModal: false,\n            docketToDeleteIndex: \"\"\n        }\n\n        this.getCommittees = this.getCommittees.bind(this);\n        this.getSubcommittees = this.getSubcommittees.bind(this);\n        this.getDockets = this.getDockets.bind(this);\n        this.createDocket = this.createDocket.bind(this);\n        this.deleteDocket = this.deleteDocket.bind(this);\n        this.checkDeleteDocket = this.checkDeleteDocket.bind(this);\n        this.cancelDeleteDocket = this.cancelDeleteDocket.bind(this);\n\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.handleSessionSelectChange = this.handleSessionSelectChange.bind(this);\n        this.handleCommitteeSelectChange = this.handleCommitteeSelectChange.bind(this);\n        this.handleSubcommitteeSelectChange = this.handleSubcommitteeSelectChange.bind(this);\n    }\n\n    handleSessionSelectChange(value) {\n        //The session selectors value has been changed. Remove the committee and subcommittee selections as their dropdown options are going to change\n        const newState = {\n            selectedSession: value,\n            selectedCommittee: '',\n            selectedSubcommittee: ''\n        };\n        this.props.handleDropdownChange(newState, () => {\n            this.props.history.push(`/docket-management`);\n            //Get the new list of committees that belong to the selected session\n            this.getCommittees(value);\n        });\n        this.setState({\n            docketList: []\n        });\n    }\n\n    handleCommitteeSelectChange(value) {\n        //A committee has been selected. Remove the selected subcommittee because the sucommittee dropdown options are going to change\n        const newState = {\n            selectedCommittee: value,\n            selectedSubcommittee: ''\n        };\n        this.props.handleDropdownChange(newState, () => {\n            this.props.history.push(`/docket-management/${value.CommitteeID}`);\n            //Get the new list of available subcommittees\n            this.getSubcommittees(value.CommitteeID);\n            //Get the dockets for the committee to be displayed in the grid\n            this.getDockets();\n        });\n    }\n\n    handleSubcommitteeSelectChange(value) {\n        const newState = {\n            selectedSubcommittee: value || ''\n        };\n        this.props.handleDropdownChange(newState, () => {\n            this.getDockets();\n        });\n    }\n\n    handleDateChange(value) {\n        if (value) {\n            //Default docket/schedule to 4:30pm\n            value.utc().startOf('day').hour(16).minute(30);\n        }\n        //Used when inserting a new docket\n        this.setState({\n            docketDate: value\n        });\n    }\n\n    createDocket() {\n        if (this.props.selectedSession && this.props.selectedCommittee) {\n            this.setState({\n                isAdding: true\n            }, () => {\n                const committeeId = this.props.selectedSubcommittee ? this.props.selectedSubcommittee.CommitteeID : this.props.selectedCommittee.CommitteeID;\n                let createDocketObj = {\n                    Dockets: [{\n                        DocketDate: this.state.docketDate,\n                        IsPublic: false,\n                        DocketType: \"Committee\",\n                        DocketTypeID: 2,\n                        ChamberCode: this.props.selectedCommittee.ChamberCode,\n                        CommitteeID: committeeId,\n                        SessionID: this.props.selectedSession.SessionID,\n                        VoteRoomID: 1,\n                        Schedules: [\n                            {\n                                ScheduleDate: this.state.docketDate,\n                                ScheduleTypeID: 6\n                            }\n                        ]\n                    }]\n                };\n                this.props.actions.createDocket(createDocketObj)\n                    .then(() => {\n                        this.setState({ showCreateSuccess: true });\n                        this.getDockets(committeeId)\n                        setTimeout(() => {\n                            this.setState({\n                                showCreateSuccess: false,\n                                isAdding: false,\n                                createFailureMessage: ''\n                            })\n                        }, 3000);\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.setState({\n                            createFailureMessage: this.props.calendar.docketCreateError\n                        });\n                        setTimeout(() => {\n                            this.setState({\n                                showCreateSuccess: false,\n                                isAdding: false,\n                                createFailureMessage: ''\n                            })\n                        }, 3000);\n                    });\n            });\n        } else {\n            this.setState({\n                createFailureMessage: \"Please select a committee\"\n            });\n            setTimeout(() => {\n                this.setState({\n                    createFailureMessage: '',\n                });\n            }, 3000);\n        }\n    }\n\n    deleteDocket(rowIndex) {\n        this.setState({\n            docketBeingDeleted: rowIndex\n        });\n        // Get docket to be deleted\n        this.props.actions.getDocketById('?docketId=' + this.state.docketList[rowIndex].DocketID, true)\n            .then(() => {\n                let docketData = this.props.calendar.docketByIdData;\n                docketData.DocketCategories.forEach(x => x.DocketItems.forEach(y => y.IsActive = false));\n                docketData.DeletionDate = moment();\n\n                docketData.Schedules.forEach(x => x.DeletionDate = moment());\n                let params = {\n                    Schedules: docketData.Schedules\n                };\n                this.props.actions.saveSchedule(params)\n\n                return this.props.actions.saveDocket({ Dockets: [docketData] })\n            }).then(() => {\n                this.setState({\n                    showDeleteSuccess: true,\n                    docketBeingDeleted: -1,\n                    showDeleteModal: false,\n                    docketToDeleteIndex: \"\"\n                });\n                this.getDockets();\n                setTimeout(() => {\n                    this.setState({\n                        showDeleteSuccess: false\n                    })\n                }, 3000);\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    docketBeingDeleted: -1,\n                    deleteFailureMessage: 'Docket failed to be deleted',\n                    showDeleteModal: false,\n                    docketToDeleteIndex: \"\"\n                });\n                console.log(err)\n                setTimeout(() => {\n                    this.setState({\n                        deleteFailureMessage: '',\n                    });\n                }, 3000);\n            });\n    }\n\n    checkDeleteDocket(docketIndex) {\n        this.setState({\n            showDeleteModal: true,\n            docketToDeleteIndex: docketIndex\n        })\n    }\n\n    cancelDeleteDocket() {\n        this.setState({\n            showDeleteModal: false,\n            docketToDeleteIndex: \"\"\n        })\n    }\n\n    componentDidMount() {\n        let selectedSession = this.props.selectedSession;\n        this.props.actions.getSessionList().then(() => {\n            //Format data for dropdown\n            const sessionList = [...this.props.session.sessionList];\n            sessionList.forEach(session => {\n                session.value = session.SessionID;\n                session.label = session.SessionYear + ' ' + session.DisplayName;\n                // Select default session if one is not already selected\n                if (session.IsDefault && !selectedSession) {\n                    selectedSession = session;\n                }\n            });\n            this.setState({\n                sessionOptions: sessionList.reverse()\n            });\n            const newState = {\n                selectedSession: selectedSession,\n            }\n            this.props.handleDropdownChange(newState, () => {\n                //Checks to see if the committeeId is in the url, if so then get the subcommittees for that committee if one has not already been selected\n                let committeeId = parseInt(this.props.match.params.committeeid, 10);\n                if (this.props.selectedCommittee) {\n                    this.getCommittees(selectedSession, this.props.selectedCommittee.CommitteeID);\n                    this.getSubcommittees(this.props.selectedCommittee.CommitteeID);\n                } else if (!isNaN(committeeId)) {\n                    this.getCommittees(selectedSession, committeeId);\n                    this.getSubcommittees(committeeId);\n                } else {\n                    this.getCommittees(selectedSession)\n                }\n            });\n        });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    getCommittees(session, committeeId) {\n        //Get the committee list based off the session data\n        this.props.actions.getCommitteeList('sessionID=' + session.SessionID)\n            .then(() => {\n                // If the user is a senate user then only show the senate committees\n                // If the user is a house user then only show the house committees\n                // If the user is both then show all committees\n                let committees = [...this.props.committee.committeeList]\n                let filteredCommittees = [];\n                committees.forEach(committee => {\n                    if (committee.ChamberCode === 'S') {\n                        committee.label = committee.Name;\n                        committee.value = committee.CommitteeID;\n                        if (committee.CommitteeID === committeeId) {\n                            this.getSubcommittees(committeeId);\n                            this.props.handleDropdownChange({ selectedCommittee: committee }, () => {\n                                // Don't want to get the dockets for the parent committee if a subcommittee is selected.\n                                if (!this.props.selectedSubcommittee) {\n                                    this.getDockets();\n                                }\n                            })\n                        }\n                        filteredCommittees.push(committee);\n                    }\n                });\n\n                this.setState({\n                    committeeOptions: filteredCommittees,\n                    isLoaded: true\n                });\n            });\n    }\n\n    getSubcommittees(committeeId) {\n        let listParams = 'sessionID=' + this.props.selectedSession.SessionID + '&parentCommitteeID=' + committeeId\n        this.props.actions.getCommitteeList(listParams)\n            .then(() => {\n                let committees = [...this.props.committee.committeeList]\n                committees.forEach(committee => {\n                    committee.label = committee.Name;\n                    committee.value = committee.CommitteeID;\n                    if (this.props.selectedSubcommittee.CommitteeID === committee.CommitteeID) {\n                        this.getDockets();\n                    }\n                });\n                this.setState({\n                    subcommitteeOptions: committees\n                });\n            });\n    }\n\n    getDockets() {\n        const { selectedSession, selectedCommittee, selectedSubcommittee } = this.props;\n        this.setState({\n            isLoaded: false\n        });\n        //Get the dockets\n        let committeeId = selectedSubcommittee ? selectedSubcommittee.CommitteeID : selectedCommittee.CommitteeID;\n        const docketParams = \"?sessionID=\" + selectedSession.SessionID + \"&chamberCode=\" + selectedCommittee.ChamberCode + \"&committeeID=\" + committeeId + \"&isPublic=false\";\n        //The second parameter lets the store know to use the partner request instead of the public\n        this.props.actions.getDocketList(docketParams, true)\n            .then(() => {\n                this.setState({\n                    isLoaded: true,\n                    docketList: this.props.calendar.docketList\n                });\n            });\n    }\n\n    render() {\n        return (\n            <div>\n                {this.state.showDeleteModal &&\n                    <div className='schedule-modal'>\n                        <div className='schedule-modal-content'>\n                            <div className='grid-wrapper two'>\n                                <div className='inner-grid eight-one-and-one'>\n                                    <span>Are you sure you want to delete docket {moment(this.state.docketList[this.state.docketToDeleteIndex].DocketDate).format(\"MM/DD/YYYY\") + (this.state.docketList[this.state.docketToDeleteIndex].DocketNumber > 1 ? \" (\" + this.state.docketList[this.state.docketToDeleteIndex].DocketNumber + \")\" : \"\")}?</span>\n                                    {this.state.docketBeingDeleted === this.state.docketToDeleteIndex\n                                        ? <div className=\"small-spinner\"></div>\n                                        : <button className='button primary' onClick={() => this.deleteDocket(this.state.docketToDeleteIndex)}>Yes</button>\n                                    }\n                                    <button className='button secondary' onClick={() => this.cancelDeleteDocket()}>No</button>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                }\n                <div className=\"header-half\">\n                    <h1>Docket Management</h1>\n                </div>\n\n                <div className=\"toolbar inner-grid four\">\n                    <div>\n                        <Fields.Dropdown\n                            value={this.props.selectedSession}\n                            options={this.state.sessionOptions}\n                            id=\"sessionDropdown\"\n                            onChange={this.handleSessionSelectChange}\n                        />\n                    </div>\n                    <div>\n                        <Fields.Dropdown\n                            value={this.props.selectedCommittee}\n                            placeholder=\"Committee\"\n                            options={this.state.committeeOptions}\n                            id=\"committeeDropdown\"\n                            onChange={this.handleCommitteeSelectChange}\n                        />\n                    </div>\n                    <div>\n                        <Fields.Dropdown\n                            value={this.props.selectedSubcommittee}\n                            placeholder=\"Subcommittee?\"\n                            options={this.state.subcommitteeOptions}\n                            id=\"subcommitteeDropdown\"\n                            isClearable\n                            onChange={this.handleSubcommitteeSelectChange}\n                        />\n                    </div>\n                </div>\n                <ReactTable\n                    resizable={false}\n                    data={this.state.docketList}\n                    loading={!this.state.isLoaded}\n                    ref={r => this.reactTable = r}\n                    columns={[\n                        {\n                            Header: 'Dockets',\n                            width: 'auto',\n                            sortable: false,\n                            filterable: false,\n                            columns: [\n                                {\n                                    headerClassName: \"docket-datepicker-container\",\n                                    accessor: \"DocketDate\",\n                                    sortable: false,\n                                    Header: (\n                                        <div className=\"dlas-forms datepicker-container\">\n                                            {!this.state.showCreateSuccess && !this.state.createFailureMessage && !this.state.showDeleteSuccess && !this.state.deleteFailureMessage &&\n                                                <DatePicker\n                                                    className=\"dnd-field\"\n                                                    selected={this.state.docketDate}\n                                                    onChange={this.handleDateChange}\n                                                    placeholderText=\"Docket Date\"\n                                                />\n                                            }\n                                            {this.state.showCreateSuccess &&\n                                                <span className=\"insert-message\">Docket was created successfully!</span>\n                                            }\n                                            {this.state.createFailureMessage &&\n                                                <span className=\"insert-message fail\">{this.state.createFailureMessage}</span>\n                                            }\n                                            {this.state.showDeleteSuccess &&\n                                                <span className=\"insert-message\">Docket was deleted successfully!</span>\n                                            }\n                                            {this.state.deleteFailureMessage &&\n                                                <span className=\"insert-message fail\">{this.state.deleteFailureMessage}</span>\n                                            }\n                                        </div>\n                                    ),\n\n                                    Cell: ({ original }) => {\n                                        return <span>{moment(original.DocketDate).format(\"MM/DD/YYYY\")}{original.DocketNumber > 1 ? ` (${original.DocketNumber})` : ''}</span>\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: 'Actions',\n                            headerClassName: \"submit-action\",\n                            sortable: false,\n                            filterable: false,\n                            columns: [\n                                {\n                                    Header: () => {\n                                        return <span><button className=\"button\" onClick={this.createDocket} disabled={this.state.isAdding}>Create</button></span>\n                                    },\n                                    headerClassName: \"header-action\",\n                                    accessor: \"action\",\n                                    sortable: false,\n                                    className: \"action-column\",\n                                    width: 90,\n                                    Cell: row => {\n                                        if (this.state.docketBeingDeleted === row.index) {\n                                            return (\n                                                <div className=\"small-spinner\"></div>\n                                            )\n                                        }\n                                        return (\n                                            <div className=\"committee-action-column-two\">\n                                                <Link to={`/docket-management/${row.original.CommitteeID}/edit-docket/${row.original.DocketID}`} className=\"icon edit\"></Link>\n                                                {row.original.IsPublic\n                                                    ? <Link target=\"_blank\" to={`/session-details/${row.original.SessionCode}/committee-information/${this.props.selectedSubcommittee ? this.props.selectedSubcommittee.CommitteeNumber : this.props.selectedCommittee.CommitteeNumber}/dockets/${row.original.DocketID}`} className=\"icon book\"></Link>\n                                                    : <span onClick={() => this.checkDeleteDocket(row.index)} className=\"icon delete\"></span>\n                                                }\n                                            </div>\n                                        );\n                                    }\n                                }\n                            ]\n                        }\n                    ]}\n                    defaultPageSize={15}\n                    pageSizeOptions={[5, 10, 15, 20, 25, 50, 100]}\n                    className=\"committee-table -striped -highlight\"\n                />\n                <br />\n\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { committee, session, calendar, login } = state;\n        return {\n            committee,\n            session,\n            calendar,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, committeeActionCreators, sessionActionCreators, calendarActionCreators, authActionCreators, scheduleActionCreators), dispatch)\n        }\n    }\n)(DocketGrid)","import React from \"react\";\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport Select from \"react-select\";\nimport { Link } from 'react-router-dom';\n\nconst getItemStyle = (isDragging, draggableStyle, pendingDeletion) => ({\n    userSelect: 'none',\n    background: isDragging ? '#34495e' : 'white',\n    color: isDragging ? 'white' : '#34495e',\n    border: pendingDeletion ? 'red' : 'none',\n    ...draggableStyle\n});\n\nconst getListStyle = isDraggingOver => ({\n    background: isDraggingOver ? '#8b9fb3' : '#666666',\n    width: '100%'\n});\n\nclass CommitteeBillsGrid extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            lastCheckedBills: [],\n            showAuxBillForm: false,\n            auxBill: \"\",\n            savingAuxBill: false\n        }\n\n        this.toggleRow = this.toggleRow.bind(this);\n        this.toggleBill = this.toggleBill.bind(this);\n        this.toggleBillBulk = this.toggleBillBulk.bind(this);\n        this.onDragEnd = this.onDragEnd.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.saveChange = this.saveChange.bind(this);\n        this.toggleAuxBillAdd = this.toggleAuxBillAdd.bind(this);\n        this.addAuxBill = this.addAuxBill.bind(this);\n        this.setAuxBill = this.setAuxBill.bind(this);\n    }\n\n    toggleRow(LegislationID, categorySequence, e) {\n        //the categories array is split up in the view into non-legislative and active/inactive sections.\n        //So to find the correct array item to update the category's and item's Sequence property is used\n        let categories = [...this.props.categories];\n        const catIndex = categories.findIndex(category => category.Sequence === categorySequence);\n        let items = categories[catIndex].DocketItems;\n        let itemIndex = items.findIndex(bill => bill.LegislationID === LegislationID);\n\n        let lastCheckedBills = this.state.lastCheckedBills;\n        let lastCheckedBill = lastCheckedBills[categorySequence];\n        if (e.nativeEvent.shiftKey && !isNaN(lastCheckedBill) && lastCheckedBill !== -1) {\n            for (let i = 0; i < Math.abs(itemIndex - lastCheckedBill); i++) {\n                const index = lastCheckedBill + i * (itemIndex - lastCheckedBill) / Math.abs(itemIndex - lastCheckedBill);\n                items[index].checked = true;\n            }\n        } else {\n            lastCheckedBill = itemIndex;\n        }\n\n        items[itemIndex].checked = !items[itemIndex].checked;\n        this.props.updateDocket(categories);\n\n        lastCheckedBills[categorySequence] = lastCheckedBill;\n        this.setState({\n            lastCheckedBills: lastCheckedBills\n        });\n    }\n\n    toggleBill(legislationID, categorySequence) {\n        let categories = [...this.props.categories];\n        const catIndex = categories.findIndex(category => category.Sequence === categorySequence);\n        let items = categories[catIndex].DocketItems;\n        const itemIndex = items.findIndex(bill => bill.LegislationID === legislationID);\n\n        //Check the IsActive before setting it to see if we're going from inactive to active.\n        //If so then assign the sequence as the last sequence in the category.\n        //Otherwise remove the sequence and resequence existing included items from 1\n        if (items[itemIndex].IsActive) {\n            items[itemIndex].Sequence = null;\n            items[itemIndex].IsActive = false;\n            let sequence = 1;\n            for (let i = 0; i < items.length; i++) {\n                if (items[i].IsActive === true) {\n                    items[i].Sequence = sequence;\n                    sequence = sequence + 1;\n                }\n            }\n        } else {\n            items[itemIndex].IsActive = true;\n            //insert the newly included bill alphabetically\n            const nextHighestActiveLegislationNumber = items.filter(i => i.IsActive && i.Sequence).find(i => i.LegislationNumber.substr(0, 2).localeCompare(items[itemIndex].LegislationNumber.substr(0, 2)) === 1 || (i.LegislationNumber.substr(0, 2).localeCompare(items[itemIndex].LegislationNumber.substr(0, 2)) === 0 && i.LegislationKey > items[itemIndex].LegislationKey));\n            if (nextHighestActiveLegislationNumber) {\n                const sequence = nextHighestActiveLegislationNumber.Sequence\n                items.filter(i => i.IsActive && i.Sequence >= nextHighestActiveLegislationNumber.Sequence).forEach(i => i.Sequence++)\n                items[itemIndex].Sequence = sequence;\n            } else {\n                const currentSequences = items.filter(i => i.Sequence).map(i => { return i.Sequence; });\n                if (currentSequences.length) {\n                    items[itemIndex].Sequence = (Math.max.apply(Math, currentSequences) + 1) || 1;\n                } else {\n                    items[itemIndex].Sequence = 1;\n                }\n            }\n        }\n\n        items[itemIndex].checked = false;\n        //Must resort on the Sequence to prevent the index-based reordering in onDragEnd from breaking after bills are included or unincluded\n        items.sort((a, b) => (a.Sequence != null ? a.Sequence : Infinity) - (b.Sequence != null ? b.Sequence : Infinity))\n\n        this.props.updateDocket(categories);\n    }\n\n    toggleBillBulk(activate) {\n        let categories = [...this.props.categories];\n        categories.forEach(category => {\n            category.DocketItems.forEach(bill => {\n                if (bill.checked) {\n                    bill.IsActive = activate;\n                    bill.checked = false;\n\n                    if (activate) {\n                        //insert the newly included bill alphabetically\n                        const nextHighestActiveLegislationNumber = category.DocketItems.filter(i => i.IsActive && i.Sequence).find(i => i.LegislationNumber.substr(0, 2).localeCompare(bill.LegislationNumber.substr(0, 2)) === 1 || (i.LegislationNumber.substr(0, 2).localeCompare(bill.LegislationNumber.substr(0, 2)) === 0 && i.LegislationKey > bill.LegislationKey));\n                        if (nextHighestActiveLegislationNumber) {\n                            const sequence = nextHighestActiveLegislationNumber.Sequence\n                            category.DocketItems.filter(i => i.IsActive && i.Sequence >= nextHighestActiveLegislationNumber.Sequence).forEach(i => i.Sequence++)\n                            bill.Sequence = sequence;\n                        } else {\n                            const currentSequences = category.DocketItems.filter(i => i.Sequence).map(i => { return i.Sequence; });\n                            if (currentSequences.length) {\n                                bill.Sequence = (Math.max.apply(Math, currentSequences) + 1) || 1;\n                            } else {\n                                bill.Sequence = 1;\n                            }\n                        }\n                    } else {\n                        bill.Sequence = null;\n                        let sequence = 1;\n                        for (let i = 0; i < category.DocketItems.length; i++) {\n                            if (category.DocketItems[i].IsActive === true) {\n                                category.DocketItems[i].Sequence = sequence;\n                                sequence = sequence + 1;\n                            }\n                        }\n                    }\n                }\n            });\n\n            //Must resort on the Sequence to prevent the index-based reordering in onDragEnd from breaking after bills are included or unincluded\n            category.DocketItems.sort((a, b) => (a.Sequence != null ? a.Sequence : Infinity) - (b.Sequence != null ? b.Sequence : Infinity))\n        });\n\n        this.props.updateDocket(categories);\n    }\n\n    onDragEnd(result, categorySequence) {\n        // dropped outside the list\n        if (!result.destination) {\n            return;\n        }\n        // Only active bills can be dragged\n        let categories = [...this.props.categories];\n        const catIndex = categories.findIndex(category => category.Sequence === categorySequence);\n        let items = categories[catIndex].DocketItems;\n        items.sort((a, b) => (a.Sequence != null ? a.Sequence : Infinity) - (b.Sequence != null ? b.Sequence : Infinity))\n        let [removed] = items.splice(result.source.index, 1);\n        items.splice(result.destination.index, 0, removed);\n\n        // Reorder the Sequence value too because the sequence value is used to show what order the preview is in\n        items.forEach(function (element, index) {\n            if (element.IsActive) {\n                element.Sequence = index + 1;\n            }\n        });\n\n        //Send the new values up to the parent to be set in the parent's state\n        this.props.updateDocket(categories);\n    }\n\n    toggleEdit(categorySequence, legislationID) {\n        let categories = [...this.props.categories];\n        const catIndex = categories.findIndex(category => category.Sequence === categorySequence);\n        let items = categories[catIndex].DocketItems;\n        const itemIndex = items.findIndex(bill => bill.LegislationID === legislationID);\n        //This key is used to tell the DOM whether to display an input or a span\n        items[itemIndex].isEditing = !items[itemIndex].isEditing;\n        //Create a key called newDescription that will hold the text that  the user types in\n        items[itemIndex].newDescription = items[itemIndex].Description;\n        this.props.updateDocket(categories);\n    }\n\n    handleChange(categorySequence, legislationID, e) {\n        let categories = [...this.props.categories];\n        const catIndex = categories.findIndex(category => category.Sequence === categorySequence);\n        let items = categories[catIndex].DocketItems;\n        const itemIndex = items.findIndex(bill => bill.LegislationID === legislationID);\n        items[itemIndex].newDescription = e.target.value;\n        this.props.updateDocket(categories);\n    }\n\n    saveChange(categorySequence, legislationID) {\n        //Turn input back into span\n        let categories = [...this.props.categories];\n        const catIndex = categories.findIndex(category => category.Sequence === categorySequence);\n        let items = categories[catIndex].DocketItems;\n        const itemIndex = items.findIndex(bill => bill.LegislationID === legislationID);\n        items[itemIndex].isEditing = false;\n        // since the user saved changes they probably want to add it to the docket\n        items[itemIndex].IsActive = true;\n        //Set description to the text that the user has typed in. If new description is null then set it to the current description\n        items[itemIndex].Description = items[itemIndex].newDescription;\n        this.props.updateDocket(categories);\n    }\n\n    toggleAuxBillAdd() {\n        this.setState({\n            showAuxBillForm: !this.state.showAuxBillForm,\n            auxBill: ''\n        })\n    }\n\n    setAuxBill(value) {\n        this.setState({\n            auxBill: value\n        })\n    }\n\n    addAuxBill() {\n        this.setState({\n            savingAuxBill: true\n        }, () => {\n            this.props.getBill(this.state.auxBill.LegislationID, this.state.auxBill.LegislationKey);\n\n            this.setState({\n                savingAuxBill: false,\n                auxBill: '',\n                showAuxBillForm: false\n            })\n        })\n    }\n\n    render() {\n        const notesCategories = this.props.categories.filter(category => !category.IsLegislationCategory);\n        const categories = this.props.categories.filter(category => category.IsLegislationCategory);\n        const docketBills = categories.flatMap(c => c.DocketItems.map(d => d.LegislationNumber));\n        return (\n            <div className=\"drag-container\">\n                <div className=\"inner-grid three-and-two\" style={{ gap: '50px' }}>\n                    <div>\n                        <button type=\"button\" className=\"button m-right\" onClick={() => this.toggleBillBulk(false)} >Remove from Docket</button>\n                        <button type=\"button\" className=\"button m-right\" onClick={() => this.toggleBillBulk(true)} >Add to Docket</button>\n                        <div style={{ display: 'inline-block' }}>\n                            <label htmlFor=\"allActive\">Select All Active</label>\n                            <input type=\"checkbox\" name=\"allActive\" checked={this.props.selectAllActive} onChange={() => this.props.toggleAllActive(true)} />\n                            <label htmlFor=\"allInActive\">Select All Inactive</label>\n                            <input type=\"checkbox\" name=\"allInActive\" checked={this.props.selectAllInactive} onChange={() => this.props.toggleAllActive(false)} />\n                        </div>\n                    </div>\n                    {this.state.showAuxBillForm\n                        ?\n                        <div style={{ display: \"grid\", gridTemplateRows: \"1fr 1fr\", marginTop: \"6px\" }}>\n                            <div className=\"inner-grid\" style={{ gridTemplateColumns: \"25px 1fr\" }}>\n                                <a className=\"icon delete\" onClick={this.toggleAuxBillAdd} />\n                                <span style={{ fontSize: \"14px\" }}>This form may be used to add any bill in the session to this docket. Use with caution.</span>\n                            </div>\n                            <div className=\"inner-grid\" style={{ gridTemplateColumns: \"1fr 150px\" }}>\n                                <Select\n                                    options={this.props.sessionBills.filter(bill => !docketBills.includes(bill.LegislationNumber))}\n                                    onChange={this.setAuxBill}\n                                    isSearchable={true}\n                                />\n                                <button type=\"button\" className=\"button\" onClick={this.addAuxBill} disabled={this.state.savingAuxBill}>Add Bill to List</button>\n                            </div>\n                        </div>\n                        :\n                        <a className=\"icon warning\" onClick={this.toggleAuxBillAdd} style={{ marginTop: \"6px\" }} />\n                    }\n                </div>\n                {notesCategories.map((category, categoryIndex) => {\n                    const dataActive = category.DocketItems.filter(note => note.IsActive);\n                    const dataInactive = category.DocketItems.filter(note => !note.IsActive);\n                    return (<DragDropContext key={categoryIndex} onDragEnd={(result) => this.onDragEnd(result, category.Sequence)}>\n                        <Droppable droppableId=\"droppable1\">\n                            {(provided, snapshot) => (\n                                <table\n                                    className=\"dnd-grid-table margin dockets-agenda-notes-grid\"\n                                    ref={provided.innerRef}\n\n                                >\n                                    <thead className=\"dnd-grid-header\" style={getListStyle(snapshot.isDraggingOver)}>\n                                        <tr>\n                                            <th scope=\"col\" id={'-grabber-column'}></th>\n                                            <th scope=\"col\" id={'-display-column'}></th>\n                                            <th scope=\"col\" id={'-sequence-column'}>\n                                            </th>\n                                            <th scope=\"col\" id={'-bill-column'}>Notes</th>\n                                            <th scope=\"col\">Status</th>\n                                            <th scope=\"col\" id={'-actions-column'}>Action</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody>\n                                        {dataActive.map((item, index) => (\n                                            <Draggable key={index} draggableId={\"notes\" + index} index={index}>\n                                                {(provided, snapshot) => (\n                                                    <tr\n                                                        ref={provided.innerRef}\n                                                        {...provided.draggableProps}\n                                                        {...provided.dragHandleProps}\n                                                        className={item.IsActive ? 'selected' : 'not-selected'}\n                                                        style={getItemStyle(\n                                                            snapshot.isDragging,\n                                                            provided.draggableProps.style\n                                                        )}>\n                                                        <td><button id={item.LegislationNumber + '-grabber-button'} className=\"button draggable\">Drag and drop</button></td>\n                                                        <td>{index + 1}</td>\n                                                        <td>\n                                                            <input\n                                                                type=\"checkbox\"\n                                                                className=\"checkbox\"\n                                                                checked={item.checked || ''}\n                                                                onChange={(e) => this.toggleRow(item.LegislationID, category.Sequence, e)} />\n                                                        </td>\n                                                        <td>\n                                                            {item.isEditing ?\n                                                                <div style={{ width: '100%' }}>\n                                                                    <div className=\"bill-grid-actions\">\n                                                                        <button onClick={() => this.saveChange(category.Sequence, item.LegislationID)} type=\"button\" className=\"icon save float-right\"></button>\n                                                                        <button onClick={() => this.toggleEdit(category.Sequence, item.LegislationID)} type=\"button\" className=\"icon delete float-right\"></button>\n                                                                    </div>\n                                                                    <div>\n                                                                        <textarea value={item.newDescription || item.Description} style={{ resize: 'vertical', width: '75%' }} cols=\"2\" onChange={(e) => this.handleChange(category.Sequence, item.LegislationID, e)}></textarea>\n                                                                    </div>\n                                                                </div>\n                                                                :\n                                                                <div style={{ width: '100%' }}>\n                                                                    <span>{item.Description || item.LegislationDescription}</span>\n                                                                    <button onClick={() => this.toggleEdit(category.Sequence, item.LegislationID)} type=\"button\" className=\"icon edit float-right\"></button>\n                                                                </div>\n                                                            }\n                                                        </td>\n                                                        <td>\n                                                            <span className=\"message-success\">Included</span>\n                                                        </td>\n                                                        <td>\n                                                            <div onClick={() => this.toggleBill(item.LegislationID, category.Sequence)} className=\"toggle-switch\">\n                                                                <input id=\"sr-status-change\" checked={item.IsActive} type=\"checkbox\" />\n                                                                <span className=\"slider\"></span>\n                                                            </div>\n                                                        </td>\n                                                    </tr>\n                                                )}\n                                            </Draggable>\n                                        ))}\n                                        {provided.placeholder}\n                                        {dataInactive.map((item, index) => (\n                                            <tr key={index} className=\"tr-inactive\">\n                                                <td></td>\n                                                <td>{/* index + 1 */}</td>\n                                                <td>\n                                                    <input\n                                                        type=\"checkbox\"\n                                                        className=\"checkbox\"\n                                                        checked={item.checked || ''}\n                                                        onChange={(e) => this.toggleRow(item.LegislationID, category.Sequence, e)} />\n                                                </td>\n                                                <td>\n                                                    {item.isEditing ?\n                                                        <div style={{ width: '100%' }}>\n                                                            <div className=\"bill-grid-actions\">\n                                                                <button onClick={() => this.saveChange(category.Sequence, item.LegislationID)} type=\"button\" className=\"icon save float-right\"></button>\n                                                                <button onClick={() => this.toggleEdit(category.Sequence, item.LegislationID)} type=\"button\" className=\"icon delete float-right\"></button>\n                                                            </div>\n                                                            <div>\n                                                                <textarea value={item.newDescription || item.Description} style={{ resize: 'vertical', width: '75%' }} cols=\"2\" onChange={(e) => this.handleChange(category.Sequence, item.LegislationID, e)}></textarea>\n                                                            </div>\n                                                        </div>\n                                                        :\n                                                        <div style={{ width: '100%' }}>\n                                                            <span>{item.Description || item.LegislationDescription}</span>\n                                                            <button onClick={() => this.toggleEdit(category.Sequence, item.LegislationID)} type=\"button\" className=\"icon edit float-right\"></button>\n                                                        </div>\n                                                    }\n                                                </td>\n                                                <td>\n                                                    <span>Not Included</span>\n                                                </td>\n                                                <td>\n                                                    <div onClick={() => this.toggleBill(item.LegislationID, category.Sequence)} className=\"toggle-switch\">\n                                                        <input id=\"sr-status-change\" checked={item.IsActive} type=\"checkbox\" />\n                                                        <span className=\"slider\"></span>\n                                                    </div>\n                                                </td>\n                                            </tr>\n                                        ))}\n                                    </tbody>\n                                </table>\n                            )}\n                        </Droppable>\n                    </DragDropContext>)\n                })}\n\n                {categories.map((category, categoryIndex) => {\n                    const dataActive = category.DocketItems.filter(bill => bill.IsActive);\n                    const dataInactive = category.DocketItems.filter(bill => !bill.IsActive);\n                    return (<DragDropContext key={categoryIndex} onDragEnd={(result) => this.onDragEnd(result, category.Sequence)}>\n                        <Droppable droppableId=\"droppable\">\n                            {(provided, snapshot) => (\n                                <table\n                                    className=\"dnd-grid-table margin dockets-agenda-grid\"\n                                    ref={provided.innerRef}\n\n                                >\n                                    <thead className=\"dnd-grid-header\" style={getListStyle(snapshot.isDraggingOver)}>\n                                        <tr>\n                                            <th scope=\"col\" id={'-grabber-column'}></th>\n                                            <th scope=\"col\" id={'-display-column'}></th>\n                                            <th scope=\"col\" id={'-sequence-column'}>\n                                            </th>\n                                            <th scope=\"col\" id={'-bill-column'}>Bill #</th>\n                                            <th scope=\"col\" id={'-patron-column'}>Patron</th>\n                                            <th scope=\"col\" id={'-caption-column'}>Caption</th>\n                                            <th scope=\"col\">Status</th>\n                                            <th scope=\"col\" id={'-actions-column'}>Action</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody>\n                                        {dataActive.map((item, index) => (\n                                            <Draggable key={index} draggableId={\"bills\" + index} index={index}>\n                                                {(provided, snapshot) => (\n                                                    <tr\n                                                        ref={provided.innerRef}\n                                                        {...provided.draggableProps}\n                                                        {...provided.dragHandleProps}\n                                                        className={item.IsActive ? 'selected' : 'not-selected'}\n                                                        style={getItemStyle(\n                                                            snapshot.isDragging,\n                                                            provided.draggableProps.style\n                                                        )}>\n                                                        <td><button id={item.LegislationNumber + '-grabber-button'} className=\"button draggable\">Drag and drop</button></td>\n                                                        <td>{index + 1}</td>\n                                                        <td>\n                                                            <input\n                                                                type=\"checkbox\"\n                                                                className=\"checkbox\"\n                                                                checked={item.checked || ''}\n                                                                onChange={(e) => this.toggleRow(item.LegislationID, category.Sequence, e)} />\n                                                        </td>\n                                                        <td>\n                                                            <Link to={`/bill-details/${this.props.sessionCode}/${item.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\">{item.LegislationNumber}</Link>\n                                                        </td>\n                                                        <td>\n                                                            {item.Patrons[0] && item.Patrons[0].PatronDisplayName}\n                                                        </td>\n                                                        <td>\n                                                            {item.LegislationDescription}\n                                                        </td>\n                                                        <td>\n                                                            <span className=\"message-success\">Included</span>\n                                                        </td>\n                                                        <td>\n                                                            <div onClick={() => this.toggleBill(item.LegislationID, category.Sequence)} className=\"toggle-switch\">\n                                                                <input id=\"sr-status-change\" checked={item.IsActive} type=\"checkbox\" />\n                                                                <span className=\"slider\"></span>\n                                                            </div>\n                                                        </td>\n                                                    </tr>\n                                                )}\n                                            </Draggable>\n                                        ))}\n                                        {provided.placeholder}\n                                        {dataInactive.map((item, index) => (\n                                            <tr key={index} className=\"tr-inactive\">\n                                                <td></td>\n                                                <td>{/* index + 1 */}</td>\n                                                <td>\n                                                    <input\n                                                        type=\"checkbox\"\n                                                        className=\"checkbox\"\n                                                        checked={item.checked || ''}\n                                                        onChange={(e) => this.toggleRow(item.LegislationID, category.Sequence, e)} />\n                                                </td>\n                                                <td className=\"new-container\">\n                                                    <Link to={`/bill-details/${this.props.sessionCode}/${item.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\" style={{ color: 'inherit' }}>{item.LegislationNumber}</Link>\n                                                    {!item.DocketItemID && !item.HouseAgendaItemID &&\n                                                        <span className=\"corner-new\">NEW</span>\n                                                    }\n                                                </td>\n                                                <td>\n                                                    {item.Patrons[0] && item.Patrons[0].PatronDisplayName}\n                                                </td>\n                                                <td>\n                                                    {item.LegislationDescription}\n                                                </td>\n                                                <td>\n                                                    <span>Not Included</span>\n                                                </td>\n                                                <td>\n                                                    <div onClick={() => this.toggleBill(item.LegislationID, category.Sequence)} className=\"toggle-switch\">\n                                                        <input id=\"sr-status-change\" checked={item.IsActive} type=\"checkbox\" />\n                                                        <span className=\"slider\"></span>\n                                                    </div>\n                                                </td>\n                                            </tr>\n                                        ))}\n                                    </tbody>\n                                </table>\n                            )}\n                        </Droppable>\n                    </DragDropContext>)\n                })}\n            </div>\n        );\n    }\n}\n\nexport default CommitteeBillsGrid;","import React from 'react';\nimport renderHTML from 'react-render-html';\nimport moment from 'moment-timezone';\nimport { Link } from 'react-router-dom';\n\n\nconst Docket = props => {\n    const patronList = props.docket.Patrons.map((patron, index) => {\n        return (<React.Fragment key={patron.MemberID}>{patron.PatronDisplayName}{index !== props.docket.Patrons.length - 1 && \", \"}</React.Fragment>)\n    });\n    return (\n        <div>\n            <div className=\"details-header parent-li\" style={{ display: \"inline-flex\" }}>\n                <h4 className=\"bilnum\"><Link to={`/bill-details/${props.data.SessionCode}/${props.docket.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\">{props.docket.LegislationNumber}</Link>{!props.hideCaption && \" - \" + props.docket.LegislationDescription}</h4>\n            </div>\n            <div className=\"list-desc\">\n                <div className=\"bold\">\n                    {!props.hidePatron &&\n                        patronList.length > 1\n                        ? <p className=\"patalt\">Patrons: {patronList}</p>\n                        : !props.hidePatron && <p className=\"patalt\">Patron: {patronList}</p>\n                    }\n                </div>\n                <div style={{ marginBottom: '10px' }}>\n                    {!props.hideSummary &&\n                        <React.Fragment>\n                            {props.docket.Summary ? renderHTML(props.docket.Summary) : ''}\n                        </React.Fragment>\n                    }\n                </div>\n                <div>\n                    {!props.hideTitle &&\n                        <p>{props.docket.DraftTitle ? renderHTML(props.docket.DraftTitle) : ''}</p>\n                    }\n                </div>\n                <div>\n                    {!props.hideLDNumber &&\n                        <p className=\"ldrt\">{props.docket.LDNumber}</p>\n                    }\n                </div>\n            </div>\n        </div>\n    )\n}\n\nclass DocketDetailsComponent extends React.Component {\n    render() {\n        const { data, session } = this.props;\n        const categories = data.DocketCategories || data.HouseAgendaCategories;\n        const clerks = data.Staff.filter(obj => obj.StaffRoleTypeID === 1);\n        const staff = data.Staff.filter(obj => obj.StaffRoleTypeID === 2);\n        const committeeHeader = (data.ChamberCode === \"S\" ? \"Senate\" : \"House\") + \" Committee \" + (data.ParentCommitteeName\n            ? data.ParentCommitteeName === \"Judiciary\"\n                ? \"on the \" + data.ParentCommitteeName\n                : data.ParentCommitteeName === \"Courts of Justice\"\n                    ? \"for \" + data.ParentCommitteeName\n                    : \"on \" + data.ParentCommitteeName\n            : data.CommitteeName === \"Judiciary\"\n                ? \"on the \" + data.CommitteeName\n                : data.CommitteeName === \"Courts of Justice\"\n                    ? \"for \" + data.CommitteeName\n                    : \"on \" + data.CommitteeName\n        );\n        const subcommitteeHeader = data.ParentCommitteeName && \"Subcommittee on \" + data.CommitteeName;\n        const sessionHeader = session.SessionYear + \" \" + session.DisplayName;\n        const memberNames = data.CommitteeMember.map((member, index) => {\n            //Display Co-chair instead of Chair if there is more than one chairman on the committee\n            return (<React.Fragment key={member.MemberID}>\n                {data.CommitteeMember.length === 1 ? \"Chair: \" : \"Co-Chair: \"} {member.MemberDisplayName}{index !== data.CommitteeMember.length - 1 && \", \"}\n            </React.Fragment>);\n        });\n        const clerkNames = clerks.map((clerk, index) => {\n            //Display Co-chair instead of Chair if there is more than one chairman on the committee\n            return (<React.Fragment key={clerk.StaffID}>\n                {clerk.FullName}{index !== clerks.length - 1 && \", \"}\n            </React.Fragment>);\n        });\n        const staffNames = staff.map((staf, index) => {\n            //Display Co-chair instead of Chair if there is more than one chairman on the committee\n            return (<React.Fragment key={staf.StaffID}>\n                {staf.FullName}{index !== staff.length - 1 && \", \"}\n            </React.Fragment>);\n        });\n        return (\n            <div className=\"bill-theme public-details inner-grid docket-details-wrapper\">\n                <div>\n                    <h2>{sessionHeader}</h2>\n                </div>\n                <hr />\n                <div>\n                    <div className=\"details-header parent-li\">\n                        <h3 className=\"center\">{committeeHeader}</h3>\n                    </div>\n                    {subcommitteeHeader &&\n                        <div className=\"details-header parent-li\">\n                            <h3 className=\"center\">{subcommitteeHeader}</h3>\n                        </div>\n                    }\n                    <div className=\"list-desc\">\n                        <p>{memberNames}</p>\n                        <br />\n                        {!this.props.hideClerk &&\n                            <p className=\"i0\">{clerks.length === 1 ? \"Clerk: \" : \"Clerks: \"} {clerkNames}</p>\n                        }\n                        {!this.props.hideStaff && staffNames.length > 0 &&\n                            <p className=\"i0\">Staff: {staffNames}</p>\n                        }\n                        {data.Schedules.map((schedule, scheduleIndex) =>\n                            <React.Fragment key={scheduleIndex}>\n                                <p className=\"i0\">Date of Meeting: {moment(data.DocketDate).format(\"MM/DD/YYYY\")}</p>\n                                {schedule.ScheduleTime && <p className=\"i0\">{\"Time: \" + schedule.ScheduleTime}</p>}\n                                <p className=\"i0\">Room: {schedule.RoomDescription ? schedule.RoomDescription : \"None\"}</p>\n                                <p className=\"i0\" style={{ whiteSpace: 'pre-wrap' }}>Comments: {schedule.Comments ? schedule.Comments : \"None\"}</p>\n                            </React.Fragment>\n                        )}\n                    </div>\n                </div>\n                {categories.map((category, categoryIndex) => {\n                    let items = category.DocketItems || category.HouseAgendaItems;\n                    items = items.filter(item => item.IsActive);\n                    if (category.IsLegislationCategory) {\n                        return (\n                            <div key={categoryIndex}>\n                                {items.length > 0 && items.map(item => <Docket key={item.LegislationID} docket={item} {...this.props} />)}\n                            </div>\n                        );\n                    } else {\n                        return (\n                            <div>\n                                {items.length > 0 &&\n                                    <React.Fragment>\n                                        <div className=\"details-header parent-li\">\n                                            <h4>Notes</h4>\n                                        </div>\n                                        {items.map((item, index) =>\n                                            <div key={index}>\n                                                <div className=\"list-desc\">\n                                                    <div>\n                                                        <p>{item.Description}</p>\n                                                    </div>\n                                                </div>\n                                            </div>\n                                        )}\n                                    </React.Fragment>\n                                }\n                            </div>);\n                    }\n                })}\n            </div>\n        )\n    }\n}\n\nexport default DocketDetailsComponent;\n","import React from 'react';\nimport moment from 'moment-timezone';\nimport ReactToPrint from 'react-to-print';\n\nclass DocketPatronList extends React.Component {\n    constructor(props) {\n        super(props);\n    }\n\n    render() {\n        return (\n            <div>\n                <ReactToPrint\n                    trigger={() => <span><button style={{ float: \"right\" }} type=\"button\" className=\"button print\">Print</button></span>}\n                    content={() => this.componentRef}\n                    pageStyle={\"break-inside: avoid\"}\n                />\n                <div style={{ paddingBottom: \"40px\" }} ref={el => (this.componentRef = el)}>\n                    <h3>{this.props.patronListDocketData.CommitteeName}</h3>\n                    <p>{moment(this.props.patronListDocketData.CalendarDate).format(\"MMMM Do YYYY\")}</p>\n                    {this.props.patronListDocketData.IsPublic ? <p>Published</p> : <p className=\"dirty\">Not Published</p>}\n                    <hr />\n                    {this.props.patronListDocketData && this.props.patronListDocketData.Patrons.map((patron, i) => {\n                        return (\n                            <div style={{ marginTop: \"20px\", marginBottom: \"20px\" }} key={i}>\n                                <span>\n                                    {patron.PatronDisplayName} -\n                                    {patron.Legislation && patron.Legislation.map((item, j) => {\n                                        return (\n                                            <span> {j < patron.Legislation.length - 1 ? item.LegislationNumber + \", \" : item.LegislationNumber}</span>\n                                        )\n                                    })}\n                                </span>\n                            </div>\n                        )\n                    })}\n                </div>\n                <div className=\"button-bar floating-button-bar\" style={{ paddingBottom: \"15px\", paddingRight: \"15px\" }}>\n                    <button onClick={() => this.props.togglePatronList()} className=\"button\" type=\"button\" style={{ width: \"175px\" }}>Return to Docket Form</button>\n                    <div />\n                </div>\n            </div>\n        )\n    }\n}\n\nexport default DocketPatronList;","import React from 'react';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport ReactToPrint from \"react-to-print\";\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { calendarActionCreators } from '../../../stores/lis-calendar-store';\nimport CommitteeBillsGrid from './lis-committee-bills-grid';\nimport DocketDetailsComponent from '../../../lis-shared/lis-dockets/lis-docket-details'\nimport DocketPatronList from './lis-docket-patron-list';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { scheduleActionCreators } from '../../../stores/lis-schedule-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport moment from 'moment-timezone';\nimport DatePicker from 'react-datepicker';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { Prompt } from 'react-router';\n\nconst PUBLISH_DOCKET = true;\nconst UNPUBLISH_DOCKET = false;\nconst SAVE_DOCKET = false;\n\nconst TIME_REGEX = /[0-9]:[0-9]{2}\\s[AP]M/i;\n\nclass DocketFormComponent extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.state = {\n            isLoaded: false,\n            data: '',\n            categories: [],\n            selectAllActive: false,\n            selectAllInactive: false,\n            showPreview: false,\n            isSaving: false,\n            pendingSave: false,\n            committeeClerk: [],\n            committeeStaff: [],\n            committeeLeadership: '',\n            meetingRoomsList: [],\n            selectedSession: '',\n            hideClerk: false,\n            hideStaff: false,\n            hidePatron: false,\n            hideSummary: false,\n            hideTitle: false,\n            hideLDNumber: false,\n            hideCaption: false,\n            showPatronList: false,\n            patronListDocketByIdData: '',\n            sessionBills: [],\n            isDirty: false\n        };\n        this.togglePreview = this.togglePreview.bind(this);\n        this.updateDocket = this.updateDocket.bind(this);\n        this.toggleAllActive = this.toggleAllActive.bind(this);\n        this.handleSequenceChange = this.handleSequenceChange.bind(this);\n        this.saveDocket = this.saveDocket.bind(this);\n        this.handleMeetingRoomChange = this.handleMeetingRoomChange.bind(this);\n        this.toggleDocketSection = this.toggleDocketSection.bind(this);\n        this.downloadWordFile = this.downloadWordFile.bind(this);\n        this.togglePatronList = this.togglePatronList.bind(this);\n        this.getBill = this.getBill.bind(this);\n        this.handleCommentHeight = this.handleCommentHeight.bind(this);\n    }\n\n    componentDidMount() {\n        var id = this.props.match.params.docketid;\n        var docketBillParams = '?docketId=' + id;\n        this.props.actions.getDocketById(docketBillParams, true)\n            .then(() => {\n                this.props.actions.getCommitteeList(\"includeSubcommittees=true&effectiveDate=\" + this.props.session.sessionList.find(x => x.SessionID === this.props.calendar.docketByIdData.SessionID).SessionEvents.find(x => x.EventTypeID === 1).ActualDate)\n                this.getDocketBills(this.props.calendar.docketByIdData);\n                if (this.props.calendar.docketByIdData.CalendarDisplay) {\n                    for (let i = 0; i < this.props.calendar.docketByIdData.CalendarDisplay.length; i++) {\n                        switch (this.props.calendar.docketByIdData.CalendarDisplay[i].DisplayColumn) {\n                            case (\"Staffs Name\"):\n                                this.setState({\n                                    hideClerk: !this.props.calendar.docketByIdData.CalendarDisplay[i].IsDisplayed\n                                });\n                                break;\n                            case (\"Clerk Name\"):\n                                this.setState({\n                                    hideStaff: !this.props.calendar.docketByIdData.CalendarDisplay[i].IsDisplayed\n                                });\n                                break;\n                            case (\"Chief Patron\"):\n                                this.setState({\n                                    hidePatron: !this.props.calendar.docketByIdData.CalendarDisplay[i].IsDisplayed\n                                });\n                                break;\n                            case (\"Summary\"):\n                                this.setState({\n                                    hideSummary: !this.props.calendar.docketByIdData.CalendarDisplay[i].IsDisplayed\n                                });\n                                break;\n                            case (\"Title\"):\n                                this.setState({\n                                    hideTitle: !this.props.calendar.docketByIdData.CalendarDisplay[i].IsDisplayed\n                                });\n                                break;\n                            case (\"LD Number\"):\n                                this.setState({\n                                    hideLDNumber: !this.props.calendar.docketByIdData.CalendarDisplay[i].IsDisplayed\n                                });\n                                break;\n                            case (\"Caption\"):\n                                this.setState({\n                                    hideCaption: !this.props.calendar.docketByIdData.CalendarDisplay[i].IsDisplayed\n                                });\n                                break;\n                            default:\n                                break;\n                        }\n                    }\n                }\n\n                this.props.actions.getBillNumbers('?sessionID=' + this.props.calendar.docketByIdData.SessionID).then(() => {\n                    let billNumbers = this.props.bills.billNumbers;\n                    billNumbers.forEach(bill => {\n                        bill.label = bill.LegislationNumber;\n                        bill.value = bill.LegislationNumber;\n                    })\n                    this.setState({\n                        sessionBills: billNumbers\n                    });\n                })\n\n                this.props.actions.getCalendarCategoriesReferences();\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    message: 'Failed to retrieve data'\n                });\n            });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    togglePreview() {\n        this.setState(state => ({\n            showPreview: !state.showPreview\n        }), () => {\n            if (this.state.showPreview) {\n                window.scrollTo({\n                    top: 0,\n                    left: 0,\n                });\n            }\n        });\n    }\n\n    // GET MEETING ROOMS REFERENCES\n    getMeetingRoomsReferences(chamberCode) {\n        var params = '?chamberCode=' + chamberCode;\n\n        this.props.actions.getMeetingRoomReferences(params).then(() => {\n            const meetingRoomsList = Array.from(this.props.schedule.meetingRoomReferences, obj => {\n                const rObj = {\n                    ...obj,\n                    value: obj.VoteRoomID,\n                    label: obj.Description + ' ' + (obj.RoomNumber || '')\n                };\n                return rObj;\n            });\n            this.setState({\n                meetingRoomsList: meetingRoomsList,\n            });\n        })\n    }\n\n    // GET BILLS FOR DOCKET GRID\n    getDocketBills(data) {\n        const categories = data.DocketCategories;\n\n        //This will be used to tell if any bills have already been saved to the docket. If they have then enable the preview button.\n        //If not then grey out the preview button until a save has been performed\n        let noSavedItems = true;\n        let billList = [];\n        categories.forEach(category => {\n            billList = category.DocketItems;\n            billList.forEach(element => {\n                //Item has a docket ID so this means that a bill has been previously saved to this docket\n                if (element.DocketItemID) {\n                    noSavedItems = false;\n                }\n            });\n        });\n\n\n        // Set Clerk & Staff\n        let committeeClerk = [];\n        let committeeStaff = [];\n\n\n        if (data.Staff) {\n            committeeClerk = data.Staff.filter(clerk => clerk.StaffRoleTypeID === 1);\n            committeeStaff = data.Staff.filter(staff => staff.StaffRoleTypeID === 2);\n        }\n\n        // Set Committee Leadership\n        let committeeLeadership = '';\n\n        if (data.CommitteeMember) {\n            data.CommitteeMember.forEach((element, i) => {\n                var memberDelimiter = data.CommitteeMember.length === 1 || i + 1 !== data.CommitteeMember.length ? '' : ', ';\n                committeeLeadership = committeeLeadership + memberDelimiter + element.Title + ': ' + element.MemberDisplayName;\n            });\n        }\n\n        this.setState({\n            pendingSave: noSavedItems,\n            committeeLeadership: committeeLeadership,\n            committeeClerk: committeeClerk,\n            committeeStaff: committeeStaff,\n            data: data,\n            isLoaded: true\n        }, () => {\n            this.getMeetingRoomsReferences(data.ChamberCode)\n            this.props.actions.getSessionById(data.SessionID)\n                .then(() =>\n                    this.setState({ selectedSession: this.props.session.selectedSession })\n                );\n            this.state.data.Schedules.forEach((schedule, i) => {\n                this.handleCommentHeight(i)\n            })\n        });\n\n        //Get the calendar category types. This is used to create a blank notes category\n        this.props.actions.getCalendarCategoriesReferences()\n            .then(() => {\n                // Find out of there is a notes category already saved to the docket. If there isn't then add a default one.\n                // Notes categories should be the only non-legislative category\n                let notesCategories = categories.filter(category => !category.IsLegislationCategory);\n                if (notesCategories.length === 0) {\n                    // Using the Senate Docket Notes category for notes\n                    let notesCategory = this.props.calendar.calendarCategoriesReferences.find(calCategory => calCategory.CategoryCode === \"CSNOT\");\n                    if (notesCategory) {\n                        notesCategory.Sequence = 1;\n                        notesCategory.DocketItems = [\n                            {\n                                Description: '',\n                                Sequence: 1,\n                            }\n                        ];\n                        categories.unshift(notesCategory);\n                    }\n                }\n                // Set the categorys' Sequence to sequential order\n                categories.forEach((cat, catIndex) => {\n                    cat.Sequence = catIndex + 1;\n                    cat.DocketItems.forEach((item, itemIndex) => {\n                        if (item.IsActive) {\n                            item.Sequence = itemIndex + 1;\n                        } else {\n                            item.Sequence = null;\n                        }\n                    });\n                });\n                this.setState({\n                    categories: categories\n                });\n            });\n    }\n\n    handleSequenceChange(categories) {\n        this.setState({\n            categories: categories,\n            isDirty: true\n        });\n    }\n\n    handleInputChange(index, value, key) {\n        let data = { ...this.state.data };\n        data.Schedules[index][key] = value;\n        this.setState({\n            data: data,\n            isDirty: true\n        }, () => {\n            if (key === 'Comments') { this.handleCommentHeight(index); }\n        });\n    }\n\n    convertTime24to12(time24Hr) {\n        if (!time24Hr) return null;\n        let [hours, minutes] = time24Hr.split(':');\n        let modifier = 'AM';\n\n        if (hours === '00') {\n            hours = '12';\n        } else if (parseInt(hours, 10) >= 12) {\n            hours = hours === '12' ? hours : parseInt(hours, 10) - 12;\n            modifier = 'PM';\n        }\n\n        return `${parseInt(hours)}:${minutes} ${modifier}`;\n    }\n\n    handleMeetingRoomChange = (index, value) => {\n        let data = { ...this.state.data };\n        data.Schedules[index].VoteRoomID = value.VoteRoomID;\n        data.Schedules[index].RoomDescription = value.Description;\n        this.setState({\n            selectedMeetingRoom: value,\n            isDirty: true\n        });\n    }\n\n    updateDocket(categories) {\n        this.setState({\n            categories: categories,\n            pendingSave: true,\n            isDirty: true\n        });\n    }\n\n    toggleAllActive(active) {\n        let checked = false;\n        if (active) {\n            checked = !this.state.selectAllActive\n            this.setState({\n                selectAllActive: checked\n            });\n        } else {\n            checked = !this.state.selectAllInactive\n            this.setState({\n                selectAllInactive: checked\n            });\n        }\n        let categories = [...this.state.categories];\n        categories.forEach(category => {\n            let items = category.DocketItems;\n            items.forEach(bill => {\n                if (bill.IsActive === active || (active === false && !bill.IsActive)) {\n                    bill.checked = checked\n                }\n            });\n        });\n        this.updateDocket(categories);\n    }\n\n    saveDocket(publishFlag) {\n        let data = { ...this.state.data };\n        let unpublishing = false;\n        if (publishFlag === PUBLISH_DOCKET) {\n            //This function was initiated by the publish button so go ahead and publish the docket\n            data.IsPublic = PUBLISH_DOCKET;\n            // Set the schedule to public as well\n            data.Schedules.forEach(schedule => schedule.IsPublic = PUBLISH_DOCKET);\n        } else if (this.state.data.IsPublic) {\n            //The docket is already published, unpublish the docket\n            data.IsPublic = UNPUBLISH_DOCKET;\n            unpublishing = true;\n            //Unpublish the schedule as well\n            data.Schedules.forEach(schedule => schedule.IsPublic = UNPUBLISH_DOCKET);\n        } else {\n            //This function was initiated by the save button so do not publish the docket\n            data.IsPublic = SAVE_DOCKET;\n        }\n\n        //These parts are not needed when saving and will cause the save to fail\n        delete data.Staff;\n        delete data.CommitteeMember;\n        delete data.DocketFiles\n\n        let categories = [...this.state.categories];\n        categories.forEach(category => {\n            category.hasNotes = false;\n            let items = category.DocketItems;\n            items.forEach((item, index) => {\n                // set IsActive to false instead of just 'null'\n                if (!item.IsActive) {\n                    item.IsActive = false;\n                } else {\n                    //Fix the Sequence attribute to match what is displayed on the screen\n                    item.Sequence = index + 1;\n                }\n                //Only add the notes category to the save if it has any content\n                if (!category.IsLegislationCategory) {\n                    if (item.Description.replace(/\\s/g, '')) {\n                        category.hasNotes = true;\n                    }\n                }\n            });\n        });\n        //Filter out the notes categories that do not have any notes\n        categories = categories.filter(category => {\n            if (category.IsLegislationCategory || category.hasNotes) {\n                return category;\n            }\n        });\n        data.DocketCategories = categories;\n        //Disable the save button and the form while it is saving\n        this.setState({ isSaving: true }, () => {\n            this.props.actions.saveDocket({ Dockets: [data] })\n                .then(() => {\n                    if (this.state.showPreview || data.IsPublic) {\n                        let content = this.componentRef.innerHTML.replace(/\\\\\"/g, '');\n                        this.props.actions.sendDocketHtml({ CommitteeNumber: this.props.committee.committeeList.find(x => x.CommitteeID === data.CommitteeID).CommitteeNumber, DocketDate: data.DocketDate, DocketNumber: data.DocketNumber, ContentHTML: content });\n                    }\n                    if (publishFlag) {\n                        this.setState({\n                            isDirty: false\n                        }, () => {\n                            this.props.history.push('/docket-management');\n                            this.props.actions.makeToast([{ message: \"Publish Success\", type: \"success\" }])\n                        })\n                    } else {\n                        const docketSave = this.props.calendar.docketSave;\n                        //Add back a blank notes category if it is missing\n                        let notesCategories = docketSave.DocketCategories.filter(category => !category.IsLegislationCategory);\n                        if (notesCategories.length === 0) {\n                            // Using the Senate Docket Notes category for notes\n                            let notesCategory = this.props.calendar.calendarCategoriesReferences.find(calCategory => calCategory.CategoryCode === \"CSNOT\");\n                            if (notesCategory) {\n                                notesCategory.Sequence = 1;\n                                notesCategory.DocketItems = [\n                                    {\n                                        Description: '',\n                                        Sequence: 1,\n                                    }\n                                ];\n                                docketSave.DocketCategories.unshift(notesCategory);\n                            }\n                        }\n                        this.setState({\n                            data: docketSave,\n                            categories: docketSave.DocketCategories,\n                            pendingSave: false,\n                            isSaving: false,\n                            isDirty: false\n                        }, () => {\n                            if (unpublishing) {\n                                this.props.actions.makeToast([{ message: \"Unpublish Success\", type: \"success\" }])\n                            } else {\n                                this.props.actions.makeToast([{ message: \"Save Success\", type: \"success\" }])\n                            }\n                            this.state.data.Schedules.forEach((schedule, i) => {\n                                this.handleCommentHeight(i);\n                            })\n                        });\n                    }\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.setState({ isSaving: false });\n                    this.props.actions.makeToast([{ message: (this.props.calendar.docketSaveError.includes(\"Meeting Started\") ? \"Cannot Unpublish Docket After Meeting Has Started\" : \"Save Failed\"), type: \"failure\" }])\n                    console.log(err)\n                });\n        });\n\n    }\n\n    toggleDocketSection(section) {\n        let data = { ...this.state.data };\n\n        this.setState(state => ({\n            [section]: !state[section]\n        }), () => {\n            //If the section has already been toggled then just modify the column\n            //Otherwise insert the column and set it to what the column was just toggled to\n            switch (section) {\n                case (\"hideStaff\"):\n                    if (data.CalendarDisplay.find(x => x.DisplayColumn === \"Staffs Name\")) {\n                        data.CalendarDisplay.find(x => x.DisplayColumn === \"Staffs Name\").IsDisplayed = !this.state[section];\n                    } else {\n                        data.CalendarDisplay.push({\n                            DisplayColumn: \"Staffs Name\",\n                            IsDisplayed: !this.state[section]\n                        });\n                    }\n                    break;\n                case (\"hideClerk\"):\n                    if (data.CalendarDisplay.find(x => x.DisplayColumn === \"Clerk Name\")) {\n                        data.CalendarDisplay.find(x => x.DisplayColumn === \"Clerk Name\").IsDisplayed = !this.state[section];\n                    } else {\n                        data.CalendarDisplay.push({\n                            DisplayColumn: \"Clerk Name\",\n                            IsDisplayed: !this.state[section]\n                        });\n                    }\n                    break;\n                case (\"hidePatron\"):\n                    if (data.CalendarDisplay.find(x => x.DisplayColumn === \"Chief Patron\")) {\n                        data.CalendarDisplay.find(x => x.DisplayColumn === \"Chief Patron\").IsDisplayed = !this.state[section];\n                    } else {\n                        data.CalendarDisplay.push({\n                            DisplayColumn: \"Chief Patron\",\n                            IsDisplayed: !this.state[section]\n                        });\n                    }\n                    break;\n                case (\"hideSummary\"):\n                    if (data.CalendarDisplay.find(x => x.DisplayColumn === \"Summary\")) {\n                        data.CalendarDisplay.find(x => x.DisplayColumn === \"Summary\").IsDisplayed = !this.state[section];\n                    } else {\n                        data.CalendarDisplay.push({\n                            DisplayColumn: \"Summary\",\n                            IsDisplayed: !this.state[section]\n                        });\n                    }\n                    break;\n                case (\"hideTitle\"):\n                    if (data.CalendarDisplay.find(x => x.DisplayColumn === \"Title\")) {\n                        data.CalendarDisplay.find(x => x.DisplayColumn === \"Title\").IsDisplayed = !this.state[section];\n                    } else {\n                        data.CalendarDisplay.push({\n                            DisplayColumn: \"Title\",\n                            IsDisplayed: !this.state[section]\n                        });\n                    }\n                    break;\n                case (\"hideLDNumber\"):\n                    if (data.CalendarDisplay.find(x => x.DisplayColumn === \"LD Number\")) {\n                        data.CalendarDisplay.find(x => x.DisplayColumn === \"LD Number\").IsDisplayed = !this.state[section];\n                    } else {\n                        data.CalendarDisplay.push({\n                            DisplayColumn: \"LD Number\",\n                            IsDisplayed: !this.state[section]\n                        });\n                    }\n                    break;\n                case (\"hideCaption\"):\n                    if (data.CalendarDisplay.find(x => x.DisplayColumn === \"Caption\")) {\n                        data.CalendarDisplay.find(x => x.DisplayColumn === \"Caption\").IsDisplayed = !this.state[section];\n                    } else {\n                        data.CalendarDisplay.push({\n                            DisplayColumn: \"Caption\",\n                            IsDisplayed: !this.state[section]\n                        });\n                    }\n                    break;\n                default:\n                    break;\n            }\n            this.setState({\n                data: data,\n                isDirty: true\n            })\n        });\n    }\n\n    downloadWordFile() {\n        const html = `<html>\n            <head><meta charset=\"UTF-8\"></head>\n            <body>${this.componentRef.innerHTML}</body>\n        </html>`;\n        const filename = `${this.state.data.CommitteeName} Docket ${this.state.data.DocketDate}.doc`;\n\n        let downloadLink = document.createElement('a');\n        downloadLink.setAttribute('href', 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(html));\n        downloadLink.setAttribute('download', filename);\n\n        downloadLink.style.display = 'none';\n        document.body.appendChild(downloadLink);\n        downloadLink.click();\n\n        document.body.removeChild(downloadLink);\n    }\n\n    togglePatronList() {\n        //Have to pull the list fresh every time we view the patron list in case there was a save\n        if (this.state.showPatronList === false) {\n            this.props.actions.getPatronListDocketById(\"?calendarID=\" + this.props.match.params.docketid)\n                .then(() => {\n                    this.setState({\n                        showPatronList: true\n                    })\n                })\n        } else {\n            this.setState({\n                showPatronList: false\n            })\n        }\n    }\n\n    getBill(legislationID, legislationKey) {\n        this.props.actions.getBill(legislationID)\n            .then(() => {\n                let categories = [...this.state.categories];\n                let bill = {\n                    LegislationDescription: this.props.bills.bill.Description,\n                    LegislationID: this.props.bills.bill.LegislationID,\n                    LegislationKey: legislationKey,\n                    LegislationNumber: this.props.bills.bill.LegislationNumber,\n                    Patrons: this.props.bills.bill.Patrons,\n                    Summary: this.props.bills.bill.SummaryVersion,\n                    IsActive: true\n                };\n\n                //If we don't already have the senate general category in this docket then add it and push the bill to it. \n                //Otherwise push the new bill to the category.\n                if (!categories.find(x => x.CategoryCode === \"CSGEN\")) {\n                    let category = this.props.calendar.calendarCategoriesReferences.find(x => x.CategoryCode === \"CSGEN\");\n                    //Set new category's Sequence to be the current max sequence value +1\n                    category.Sequence = Math.max.apply(Math, categories.map((c) => { return c.Sequence; })) + 1;\n                    bill.Sequence = 1;\n                    category.DocketItems = [bill];\n                    categories.push(category);\n                } else {\n                    let index = categories.findIndex(x => x.CategoryCode === \"CSGEN\");\n                    //insert the newly included bill alphabetically\n                    const nextHighestActiveLegislationNumber = categories[index].DocketItems.filter(i => i.IsActive && i.Sequence).find(i => i.LegislationNumber.substr(0, 2).localeCompare(bill.LegislationNumber.substr(0, 2)) === 1 || (i.LegislationNumber.substr(0, 2).localeCompare(bill.LegislationNumber.substr(0, 2)) === 0 && i.LegislationKey > bill.LegislationKey));\n                    if (nextHighestActiveLegislationNumber) {\n                        const sequence = nextHighestActiveLegislationNumber.Sequence\n                        categories[index].DocketItems.filter(i => i.IsActive && i.Sequence >= nextHighestActiveLegislationNumber.Sequence).forEach(i => i.Sequence++)\n                        bill.Sequence = sequence;\n                    } else {\n                        const currentSequences = categories[index].DocketItems.filter(i => i.Sequence).map(i => { return i.Sequence; });\n                        if (currentSequences.length) {\n                            bill.Sequence = (Math.max.apply(Math, currentSequences) + 1) || 1;\n                        } else {\n                            bill.Sequence = 1;\n                        }\n                    }\n                    categories[index].DocketItems.push(bill);\n                    categories[index].DocketItems.sort((a, b) => (a.Sequence != null ? a.Sequence : Infinity) - (b.Sequence != null ? b.Sequence : Infinity))\n                }\n\n                this.setState({\n                    categories: categories\n                })\n            })\n    }\n\n    handleCommentHeight(index) {\n        let data = { ...this.state.data };\n        if (data.Schedules[index] && data.Schedules[index].Comments) {\n            const height = Math.round(data.Schedules[index].Comments.length / 120) * 20 + 40;\n            data.Schedules[index].commentHeight = height.toString() + 'px';\n            this.setState({\n                data\n            })\n        }\n    }\n\n    render() {\n        const { committeeName, committeeDate, message, data } = this.state;\n        if (message) {\n            return (\n                <div className=\"dlas-forms\">\n                    <span>{message}</span>\n                </div>\n            );\n        } else {\n            if (this.state.showPreview) {\n                return (\n                    <div>\n                        <div>\n                            <Prompt\n                                when={this.state.isDirty}\n                                message={`You have unsaved changes. Are you sure you would like to leave?`}\n                            />\n                        </div>\n                        <div className=\"flex-row\">\n                            <div className=\"advanced-search dlas-forms\">\n                                <h2>Docket Preview</h2>\n                                <div className=\"checkbox-container\">\n                                    <div className=\"inner-grid two\">\n                                        <div className=\"checkbox\">\n                                            <label><input type=\"checkbox\" onChange={() => this.toggleDocketSection('hideStaff')} checked={!this.state.hideStaff} /> Staff name</label>\n                                        </div>\n                                        <div className=\"checkbox\">\n                                            <label><input type=\"checkbox\" onChange={() => this.toggleDocketSection('hideClerk')} checked={!this.state.hideClerk} /> Clerk name</label>\n                                        </div>\n                                    </div>\n                                    <hr className=\"faded-line\" />\n                                    <div className=\"inner-grid two\">\n                                        <div className=\"checkbox\">\n                                            <label><input type=\"checkbox\" onChange={() => this.toggleDocketSection('hideTitle')} checked={!this.state.hideTitle} /> Title</label>\n                                        </div>\n                                        <div className=\"checkbox\">\n                                            <label><input type=\"checkbox\" onChange={() => this.toggleDocketSection('hideSummary')} checked={!this.state.hideSummary} /> Summary</label>\n                                        </div>\n                                    </div>\n                                    <hr className=\"faded-line\" />\n                                    <div className=\"inner-grid two\">\n                                        <div className=\"checkbox\">\n                                            <label><input type=\"checkbox\" onChange={() => this.toggleDocketSection('hidePatron')} checked={!this.state.hidePatron} /> Chief Patron</label>\n                                        </div>\n                                        <div className=\"checkbox\">\n                                            <label><input type=\"checkbox\" onChange={() => this.toggleDocketSection('hideLDNumber')} checked={!this.state.hideLDNumber} /> LD Number</label>\n                                        </div>\n                                    </div>\n                                    <hr className=\"faded-line\" />\n                                    <div className=\"inner-grid two\">\n                                        <div className=\"checkbox\">\n                                            <label><input type=\"checkbox\" onChange={() => this.toggleDocketSection('hideCaption')} checked={!this.state.hideCaption} /> Caption</label>\n                                        </div>\n                                        <div />\n                                    </div>\n                                </div>\n                            </div>\n                            <div className=\"inline-list\">\n                                <button type=\"button\" onClick={this.downloadWordFile} className=\"button-link with-icon\"><span className=\"icon word\"></span> View in Word</button>\n                                <ReactToPrint\n                                    trigger={() => <button type=\"button\" className=\"button-link with-icon\"><span className=\"icon print\"></span> Print</button>}\n                                    content={() => this.componentRef}\n                                    pageStyle={\"break-inside: avoid\"}\n                                />\n                            </div>\n                        </div>\n                        <div ref={el => (this.componentRef = el)}>\n                            <DocketDetailsComponent\n                                data={this.state.data}\n                                dockets={this.state.categories}\n                                session={this.state.selectedSession}\n                                selectedMeetingRoom={this.state.selectedMeetingRoom}\n                                toggleDocketSection={this.toggleDocketSection}\n                                hideClerk={this.state.hideClerk}\n                                hideStaff={this.state.hideStaff}\n                                hidePatron={this.state.hidePatron}\n                                hideSummary={this.state.hideSummary}\n                                hideTitle={this.state.hideTitle}\n                                hideLDNumber={this.state.hideLDNumber}\n                                hideCaption={this.state.hideCaption}\n                            />\n                        </div>\n                        <div className=\"button-bar\">\n                            <div></div>\n                            <div className=\"align-right\">\n                                <button onClick={this.togglePreview} className=\"button secondary\">Edit</button>\n                                <button onClick={() => this.saveDocket(PUBLISH_DOCKET)} type=\"button\" disabled={this.state.isSaving || this.state.disablePublish} className=\"button\">Publish</button>\n                            </div>\n                        </div>\n                    </div>\n                );\n            } else if (this.state.showPatronList) {\n                return (\n                    <DocketPatronList\n                        patronListDocketData={this.props.calendar.patronListDocketByIdData}\n                        togglePatronList={this.togglePatronList}\n                    />\n                )\n            } else {\n                const convertTime12to24 = (time12h) => {\n                    if (!time12h) return '';\n                    const [time, modifier] = time12h.split(' ');\n\n                    let [hours, minutes] = time.split(':');\n\n                    if (hours === '12') {\n                        hours = '00';\n                    }\n\n                    if (modifier === 'PM') {\n                        hours = parseInt(hours, 10) + 12;\n                    } else {\n                        hours = hours.padStart(2, '0');\n                    }\n\n                    return `${hours}:${minutes}`;\n                }\n                return (\n                    <React.Fragment>\n                        <div>\n                            <Prompt\n                                when={this.state.isDirty}\n                                message={`You have unsaved changes. Are you sure you would like to leave?`}\n                            />\n                        </div>\n                        <h1>{committeeName} {committeeDate}</h1>\n                        <div className=\"user-forms\" style={{ paddingBottom: \"45px\" }}>\n                            {!this.state.isLoaded &&\n                                <div className=\"center-spinner spinner\">Loading results...</div>\n                            }\n                            {this.state.isLoaded &&\n                                <div className=\"dlas-forms\">\n                                    <span className=\"error-message\">{message}</span>\n                                    <form>\n                                        <fieldset className=\"fieldset-collapse fieldset-open\">\n                                            <legend>Docket Information for <strong>{data.CommitteeName}</strong> on <strong>{moment(data.DocketDate).format('MM/DD/YYYY')}</strong></legend>\n                                            <div className=\"multi-row eight-and-one no-margin\">\n                                                <div>\n                                                    <div className=\"multi-row third no-margin\">\n                                                        <div>\n                                                            <Fields.TextInput\n                                                                id=\"leadership\"\n                                                                label=\"Committee Leadership\"\n                                                                type=\"text\"\n                                                                placeholder=\"Committee Leadership\"\n                                                                value={this.state.committeeLeadership}\n                                                                disabled\n                                                            />\n                                                        </div>\n                                                        <div>\n                                                            <Fields.TextInput\n                                                                id=\"clerk\"\n                                                                label=\"Committee Clerk\"\n                                                                type=\"text\"\n                                                                placeholder=\"Committee Clerk\"\n                                                                value={this.state.committeeClerk.map(clerk => clerk.FullName).join(', ')}\n                                                                disabled\n                                                            />\n                                                        </div>\n                                                        <div>\n                                                            <Fields.TextInput\n                                                                id=\"staff\"\n                                                                label=\"Committee Staff\"\n                                                                type=\"text\"\n                                                                placeholder=\"Committee Staff\"\n                                                                value={this.state.committeeStaff.map(staff => staff.FullName).join(', ')}\n                                                                disabled\n                                                            />\n                                                        </div>\n                                                    </div>\n                                                    {data.Schedules.map((schedule, index) =>\n                                                        <React.Fragment key={index}>\n                                                            <div className=\"multi-row one-and-three no-margin\" style={{ margin: 'initial', width: '60%' }}>\n                                                                <div>\n                                                                    <label for=\"meetingTime\">Meeting Time</label>\n                                                                    {TIME_REGEX.test(schedule.ScheduleTime) && <div className='icon clock' title=\"Correct Time Format\"/>}\n                                                                    <div>\n                                                                        <input\n                                                                            id=\"meetingTime\"\n                                                                            value={schedule.ScheduleTime}\n                                                                            style={{ maxHeight: '32px', fontFamily: 'arial' }}\n                                                                            onChange={(e) => this.handleInputChange(index, e ? e.target.value : e, 'ScheduleTime')}\n                                                                        />\n                                                                    </div>\n                                                                </div>\n                                                                <div>\n                                                                    <label>Meeting Room</label>\n                                                                    <Fields.Dropdown\n                                                                        value={this.state.meetingRoomsList.find(room => room.VoteRoomID === schedule.VoteRoomID)}\n                                                                        placeholder=\"Meeting Room\"\n                                                                        options={this.state.meetingRoomsList}\n                                                                        id=\"meetingRoomsDropdown\"\n                                                                        onChange={(value) => this.handleMeetingRoomChange(index, value)}\n                                                                    />\n                                                                </div>\n                                                            </div>\n                                                            <div className=\"single-row no-margin\">\n                                                                <div>\n                                                                    <Fields.TextArea\n                                                                        id=\"comments\"\n                                                                        label=\"Comments\"\n                                                                        type=\"text\"\n                                                                        placeholder=\"Comments\"\n                                                                        value={schedule.Comments}\n                                                                        style={{ height: schedule.commentHeight || '40px' }}\n                                                                        onChange={(e) => this.handleInputChange(index, e.target.value, 'Comments')}\n                                                                    />\n                                                                </div>\n                                                            </div>\n                                                        </React.Fragment>\n                                                    )}\n\n                                                </div>\n                                                <div>\n                                                    {this.state.data.IsPublic && <button type=\"button\" onClick={this.downloadWordFile} className=\"button-link with-icon\" style={{ marginLeft: \"15px\" }}><span className=\"icon word\"></span> View in Word</button>}\n                                                    <div className=\"published-status\">\n                                                        {this.state.data.IsPublic ? <span>Published</span> : <span className=\"dirty\">Not Published</span>}\n                                                    </div>\n                                                </div>\n                                            </div>\n                                            <CommitteeBillsGrid\n                                                categories={this.state.categories}\n                                                updateDocket={this.updateDocket}\n                                                handleSequenceChange={this.handleSequenceChange}\n                                                toggleAllActive={this.toggleAllActive}\n                                                chamberCode={this.state.data.ChamberCode}\n                                                sessionCode={this.state.data.SessionCode}\n                                                sessionBills={this.state.sessionBills}\n                                                getBill={this.getBill}\n                                            />\n                                        </fieldset>\n                                        <div className=\"button-bar floating-button-bar\" style={{ paddingBottom: \"15px\", paddingRight: \"15px\" }}>\n                                            <button onClick={this.togglePatronList} className=\"button\" type=\"button\" style={{ width: \"150px\" }}>Show Patron List</button>\n                                            <div className=\"align-right\">\n                                                <button disabled={this.state.isSaving} type=\"button\" onClick={() => this.saveDocket(SAVE_DOCKET)} className=\"button\">{this.state.isSaving ? \"Saving...\" : this.state.data.IsPublic ? \"Unpublish\" : \"Save\"}</button>\n                                                <button disabled={this.state.pendingSave} onClick={this.togglePreview} className=\"button\" type=\"button\">Preview</button>\n                                            </div>\n                                        </div>\n                                    </form>\n                                    {this.state.data.IsPublic &&\n                                        <div ref={el => (this.componentRef = el)} style={{ display: \"none\" }}>\n                                            <DocketDetailsComponent\n                                                data={this.state.data}\n                                                dockets={this.state.categories}\n                                                session={this.state.selectedSession}\n                                                selectedMeetingRoom={this.state.selectedMeetingRoom}\n                                                toggleDocketSection={this.toggleDocketSection}\n                                                hideClerk={this.state.hideClerk}\n                                                hideStaff={this.state.hideStaff}\n                                                hidePatron={this.state.hidePatron}\n                                                hideSummary={this.state.hideSummary}\n                                                hideTitle={this.state.hideTitle}\n                                                hideLDNumber={this.state.hideLDNumber}\n                                                hideCaption={this.state.hideCaption}\n                                            />\n                                        </div>\n                                    }\n                                </div>\n                            }\n                        </div>\n                    </React.Fragment>\n                );\n            }\n        }\n    }\n};\n\nconst DocketManagementForm = connect(\n    (state) => {\n        const { committee, calendar, session, nav, schedule, bills } = state;\n        return {\n            committee,\n            calendar,\n            session,\n            nav,\n            schedule,\n            bills\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, calendarActionCreators, committeeActionCreators, sessionActionCreators, navActionCreators, scheduleActionCreators), dispatch)\n        }\n    }\n)(DocketFormComponent)\n\nexport default DocketManagementForm;\n\n\n\n\n\n\n\n\n","import React from 'react';\nimport { Route } from 'react-router';\nimport DocketGrid from './lis-docket-grid';\nimport DocketForm from './lis-docket-form';\n\nclass DocketManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedSession: '',\n            selectedCommittee: '',\n            selectedSubcommittee: ''\n        };\n        this.handleDropdownChange = this.handleDropdownChange.bind(this);\n    }\n\n    handleDropdownChange(newState, callback) {\n        this.setState({\n            ...newState\n        }, () => callback());\n    }\n\n    render() {\n        return (\n            <div>\n                <Route exact path={[\"/docket-management\", \"/docket-management/:committeeid\"]} render={props => <DocketGrid\n                    {...props}\n                    selectedSession={this.state.selectedSession}\n                    selectedCommittee={this.state.selectedCommittee}\n                    selectedSubcommittee={this.state.selectedSubcommittee}\n                    handleDropdownChange={this.handleDropdownChange}\n                />} />\n                <Route path={`${this.props.match.path}/:committeeid/edit-docket/:docketid`} component={DocketForm} />\n            </div>\n        )\n    }\n}\n\nexport default DocketManagement;","import React from 'react';\nimport ReactTable from \"react-table\";\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { calendarActionCreators } from '../../../stores/lis-calendar-store';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { connect } from 'react-redux';\nimport moment from 'moment-timezone';\nimport DatePicker from \"react-datepicker\";\nimport { cancelRequest } from '../../../services/request.service';\n\nclass CalendarGrid extends React.Component {\n    constructor(props) {\n        super(props);\n        let nextBusinessDay;\n        if (moment().day() === 5 || moment().day() === 6) { // friday or saturday, show monday\n            nextBusinessDay = moment().add(8 - moment().day(), 'days')\n        } else { // other days, show next day\n            nextBusinessDay = moment().add(1, 'days')\n        }\n        this.state = {\n            isLoaded: true,\n            selectedSession: '',\n            sessionOptions: [],\n            selectedChamber: '',\n            chamberOptions: [\n                { label: \"House\", value: \"H\" },\n                { label: \"Senate\", value: \"S\" }\n            ],\n            calendarDate: nextBusinessDay,\n            calendarList: [],\n            showCreateSuccess: false,\n            createFailureMessage: '',\n            isAdding: false,\n            calendarToBeDeleted: 0,\n            calendarBeingDeleted: -1,\n            showDeleteWarning: false\n        }\n\n        this.getCalendars = this.getCalendars.bind(this);\n        this.createCalendar = this.createCalendar.bind(this);\n\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.handleSessionSelectChange = this.handleSessionSelectChange.bind(this);\n        this.handleChamberChange = this.handleChamberChange.bind(this);\n        this.deleteCalendar = this.deleteCalendar.bind(this);\n        this.toggleDeleteCalendar = this.toggleDeleteCalendar.bind(this);\n    }\n\n    handleSessionSelectChange(value) {\n        //The session selectors value has been changed. \n        this.props.handleDropdownChange('selectedSession', value, () => this.getCalendars());\n    }\n\n    handleChamberChange(value) {\n        //The chamber selectors value has been changed. \n        this.props.handleDropdownChange('selectedChamber', value, () => this.getCalendars());\n    }\n\n    handleDateChange(value) {\n        //Used when inserting a new calendar\n        this.setState({\n            calendarDate: moment(value)\n        });\n    }\n\n    createCalendar() {\n        if (this.props.selectedSession && this.props.selectedChamber) {\n            this.setState({\n                isAdding: true\n            }, () => {\n                //See if there are any other calendars with the selected date\n                const calendarWithSameDate = this.state.calendarList.filter(calendar => moment(this.state.calendarDate).isSame(moment(calendar.CalendarDate), 'day'));\n                let calendarNumber = calendarWithSameDate.length + 1;\n                let createCalendarObj = {\n                    Calendars: [{\n                        CalendarDate: this.state.calendarDate.format(\"MM/DD/YYYY\"),\n                        IsPublic: false,\n                        CalendarType: \"Chamber\",\n                        Comments: '',\n                        Description: 'Calendar',\n                        CalendarTypeID: 1,\n                        SessionID: this.props.selectedSession.SessionID,\n                        VoteRoomID: 1,\n                        ChamberCode: this.props.selectedChamber.value,\n                        CalendarNumber: calendarNumber\n                    }]\n                };\n                this.props.actions.createCalendar(createCalendarObj)\n                    .then(() => {\n                        this.setState({\n                            showCreateSuccess: true,\n                            createFailureMessage: ''\n                        });\n                        this.getCalendars()\n                        setTimeout(() => {\n                            this.setState({\n                                showCreateSuccess: false,\n                                createFailureMessage: '',\n                                isAdding: false\n                            })\n                        }, 3000);\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.setState({\n                            showCreateSuccess: false,\n                            createFailureMessage: 'Calendar Creation Failed',\n                        });\n                        this.getCalendars()\n                        setTimeout(() => {\n                            this.setState({\n                                showCreateSuccess: false,\n                                createFailureMessage: '',\n                                isAdding: false\n                            })\n                        }, 3000);\n                    });\n            });\n        } else {\n            this.setState({\n                createFailureMessage: \"Please select a session and chamber\"\n            });\n            setTimeout(() => {\n                this.setState({\n                    createFailureMessage: '',\n                });\n            }, 3000);\n        }\n    }\n\n    toggleDeleteCalendar(rowIndex) {\n        this.setState({\n            calendarToBeDeleted: rowIndex,\n            showDeleteWarning: !this.state.showDeleteWarning\n        })\n    }\n\n    deleteCalendar(rowIndex) {\n        this.setState({\n            calendarBeingDeleted: rowIndex\n        });\n        // Before being able to delete the calendar we need to get the mod dates. So get the calendar\n        this.props.actions.getCalendarById('?calendarId=' + this.state.calendarList[rowIndex].CalendarID, true)\n            .then(() => {\n                let calendarData = this.props.calendar.calendarGet;\n                // Now that we have the calendar data add a deletion date then save it\n                calendarData.DeletionDate = moment();\n                return this.props.actions.saveCalendar({ Calendars: [calendarData] })\n            }).then(() => {\n                this.setState({\n                    showDeleteSuccess: true,\n                    calendarBeingDeleted: -1,\n                    showDeleteWarning: false\n                });\n                this.getCalendars();\n                setTimeout(() => {\n                    this.setState({\n                        showDeleteSuccess: false\n                    })\n                }, 3000);\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    calendarBeingDeleted: -1,\n                    deleteFailureMessage: 'Calendar failed to be deleted'\n                });\n                console.log(err)\n                setTimeout(() => {\n                    this.setState({\n                        deleteFailureMessage: '',\n                    });\n                }, 3000);\n            });\n    }\n\n    componentDidMount() {\n        this.props.actions.getSessionShallowList('isActive=true').then(() => {\n            if (this.props.session.sessionShallowList !== undefined) {\n                let selectedSession = this.props.selectedSession;\n                let selectedChamber = this.props.selectedChamber;\n                //Format data for dropdown\n                let sessionList = [...this.props.session.sessionShallowList];\n                sessionList.forEach(session => {\n                    session.label = session.SessionYear + ' ' + session.DisplayName;\n                    session.value = session.SessionID;\n                    if (session.IsDefault && !selectedSession) {\n                        selectedSession = session;\n                    }\n                });\n                //set the default chamber to house or senate depending on the user's role\n                let disableChamberSelector = false;\n\n                if (!this.props.login.userClaims.claims.find(x => x.RoleName === \"Admin\")) {\n                    //Find if the user is a house calendar editor, if so select house, otherwise select senate, and disable the chamber selector\n                    selectedChamber = this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseCalendarEditor\") ? this.state.chamberOptions.find(chamber => chamber.label === \"House\") : this.state.chamberOptions.find(chamber => chamber.label === \"Senate\");\n                    disableChamberSelector = true;\n                }\n                this.setState({\n                    sessionOptions: sessionList,\n                    disableChamberSelector: disableChamberSelector\n                });\n                this.props.handleDropdownChange('selectedSession', selectedSession, () => {\n                    this.props.handleDropdownChange('selectedChamber', selectedChamber, () => this.getCalendars());\n                });\n\n            }\n        });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    getCalendars() {\n        const { selectedSession, selectedChamber } = this.props;\n        if (selectedSession && selectedChamber) {\n            this.setState({\n                isLoaded: false\n            });\n            //Get the calendars\n            const calendarParams = \"?isPublic=false&sessionID=\" + selectedSession.SessionID + '&chamberCode=' + selectedChamber.value;\n            //The second parameter lets the store know to use the partner request instead of the public\n            this.props.actions.getCalendarList(calendarParams, true)\n                .then(() => {\n                    this.setState({\n                        isLoaded: true,\n                        calendarList: this.props.calendar.calendarList\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return\n                    }\n                    this.setState({\n                        calendarListError: err.toString()\n                    });\n                });\n        }\n    }\n\n    render() {\n        return (\n            <div>\n                {this.state.showDeleteWarning &&\n                    <div className='schedule-modal'>\n                        <div style={{ height: \"120px\" }} className='schedule-modal-content'>\n                            <p>Are you sure you would like to delete this calendar?</p>\n                            <div>\n                                <button style={{ float: \"right\" }} type=\"button\" className='button danger' onClick={() => this.deleteCalendar(this.state.calendarToBeDeleted)}>Delete</button>\n                                <button style={{ float: \"right\", marginRight: \"10px\" }} type=\"button\" className='button secondary' onClick={() => this.toggleDeleteCalendar(0)}>Cancel</button>\n                            </div>\n                        </div>\n                    </div>\n                }\n                <div className=\"header-half\">\n                    <h1>Calendar Management</h1>\n                    {this.props.login.userClaims.claims.find(c => c.RoleName === \"Admin\") &&\n                        <div className=\"flex-row flex-vertical-center flex-end\">\n                            <a className=\"icon settings\" href=\"/configurations-management/calendar\" />\n                        </div>\n                    }\n                </div>\n                <p className=\"small-text message-error\">{this.state.calendarListError}</p>\n                <div className=\"toolbar inner-grid four\">\n                    <div>\n                        <Fields.Dropdown\n                            value={this.props.selectedChamber}\n                            options={this.state.chamberOptions}\n                            onChange={this.handleChamberChange}\n                            isDisabled={this.state.disableChamberSelector}\n                        />\n                    </div>\n                    <div>\n                        <Fields.Dropdown\n                            value={this.props.selectedSession}\n                            options={this.state.sessionOptions}\n                            id=\"sessionDropdown\"\n                            onChange={this.handleSessionSelectChange}\n                        />\n                    </div>\n                </div>\n                <ReactTable\n                    resizable={false}\n                    data={this.state.calendarList}\n                    loading={!this.state.isLoaded}\n                    ref={r => this.reactTable = r}\n                    columns={[\n                        {\n                            Header: 'Calendars',\n                            width: 240,\n                            sortable: false,\n                            filterable: false,\n                            columns: [\n                                {\n                                    headerClassName: \"calendar-datepicker-container\",\n                                    accessor: \"CalendarDate\",\n                                    width: 240,\n                                    sortable: false,\n                                    Header: (\n                                        <div className=\"dlas-forms datepicker-container\">\n                                            {!this.state.showCreateSuccess && !this.state.createFailureMessage && !this.state.showDeleteSuccess && !this.state.deleteFailureMessage &&\n                                                <DatePicker\n                                                    className=\"dnd-field\"\n                                                    selected={this.state.calendarDate}\n                                                    onChange={this.handleDateChange}\n                                                    placeholderText=\"Calendar Date\"\n                                                />\n                                            }\n                                            {this.state.showCreateSuccess &&\n                                                <span className=\"insert-message\">Calendar was created successfully!</span>\n                                            }\n                                            {this.state.createFailureMessage &&\n                                                <span className=\"insert-message fail\">{this.state.createFailureMessage}</span>\n                                            }\n                                            {this.state.showDeleteSuccess &&\n                                                <span className=\"insert-message\">Calendar was deleted successfully!</span>\n                                            }\n                                            {this.state.deleteFailureMessage &&\n                                                <span className=\"insert-message fail\">{this.state.deleteFailureMessage}</span>\n                                            }\n                                        </div>\n                                    ),\n\n                                    Cell: row => {\n                                        return <span>{moment(row.value).format(\"MM/DD/YYYY\")} {row.original.CalendarNumber > 1 && <React.Fragment>(Supp. {row.original.CalendarNumber - 1})</React.Fragment>}</span>\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: 'Comments',\n                            width: 'auto',\n                            sortable: false,\n                            filterable: false,\n                            columns: [\n                                {\n                                    headerClassName: \"docket-datepicker-container\",\n                                    accessor: \"Comments\",\n                                    sortable: false,\n                                    Header: (false),\n                                    Cell: row => {\n                                        return <span>{row.value}</span>\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: 'Actions',\n                            headerClassName: \"submit-action\",\n                            sortable: false,\n                            filterable: false,\n                            columns: [\n                                {\n                                    Header: () => {\n                                        return <span><button className=\"button\" onClick={this.createCalendar} disabled={this.state.isAdding}>Create</button></span>\n                                    },\n                                    headerClassName: \"header-action\",\n                                    accessor: \"action\",\n                                    sortable: false,\n                                    className: \"action-column\",\n                                    width: 90,\n                                    Cell: row => {\n                                        if (this.state.calendarBeingDeleted === row.index) {\n                                            return (\n                                                <div className=\"small-spinner\"></div>\n                                            )\n                                        }\n                                        return (\n                                            <div className=\"committee-action-column-two\">\n                                                <Link to={`/calendar-management/edit-calendar/${row.original.CalendarID}`} className=\"icon edit\"></Link>\n                                                {row.original.IsPublic ?\n                                                    <Link target=\"_blank\" to={`/session-details/${this.props.selectedSession.SessionCode}/calendar/${row.original.ReferenceNumber}`} className=\"icon book\"></Link>\n                                                    :\n                                                    <span onClick={() => this.toggleDeleteCalendar(row.index)} className=\"icon delete\"></span>}\n                                            </div>\n                                        );\n                                    }\n                                }\n                            ]\n                        }\n                    ]}\n                    defaultPageSize={15}\n                    pageSizeOptions={[5, 10, 15, 20, 25, 50, 100]}\n                    className=\"committee-table -striped -highlight\"\n                />\n                <br />\n\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { session, calendar, login } = state;\n        return {\n            session,\n            calendar,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, calendarActionCreators, authActionCreators), dispatch)\n        }\n    }\n)(CalendarGrid)","import React from 'react';\nimport Popout from '../lis-layout/components/lis-popout-component';\nimport tinymce from 'tinymce/tinymce';\nimport 'tinymce/themes/silver/theme';\nimport 'tinymce/icons/default'\nimport 'tinymce/plugins/paste/plugin';\nimport 'tinymce/plugins/link/plugin';\nimport 'tinymce/plugins/save/plugin';\nimport 'tinymce/plugins/lists/plugin';\nimport 'tinymce/plugins/code/plugin';\nimport 'tinymce/plugins/preview/plugin';\nimport 'tinymce/plugins/searchreplace/plugin';\nimport 'tinymce/plugins/pagebreak/plugin';\nimport 'tinymce/plugins/table/plugin';\nimport '../../stylesheets/tinymce/oxide/skin.min.css';\nimport { Editor } from '@tinymce/tinymce-react';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\n\nconst newAgendaItemText = '<p><strong>&#xFEFF;</strong></p>';\n\nconst getItemStyle = (isDragging, draggableStyle, isActive) => ({\n    // some basic styles to make the items look a bit nicer\n    display: 'flex',\n    userSelect: 'none',\n    marginBottom: '20px',\n    // change background colour if dragging\n    background: isDragging ? '#34495e' : !isActive ? '#f3f3f3' : 'white',\n    color: isDragging ? 'white' : '#34495e',\n    borderRight: '1px solid #e0e0e0',\n    borderTop: '1px solid #e0e0e0',\n    borderLeft: '1px solid #e0e0e0',\n    borderBottom: '1px solid #e0e0e0',\n    color: isActive ? '' : '#8b8b8b',\n    // styles we need to apply on draggables\n    ...draggableStyle,\n});\n\nclass AgendaItemsComponent extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            agendaItemContent: []\n        }\n\n        this.handleEditorChange = this.handleEditorChange.bind(this);\n        this.togglePortal = this.togglePortal.bind(this);\n        this.saveAgendaItems = this.saveAgendaItems.bind(this);\n        this.close = this.close.bind(this);\n        this.addNote = this.addNote.bind(this);\n        this.toggleCustomNote = this.toggleCustomNote.bind(this);\n    }\n\n    addNote() {\n        let agendaItems = [...this.props.agenda.AgendaItems].sort((a, b) => (a.DraftText ? 1 : b.DraftText ? -1 : 0) || (a.DisplaySequence && b.DisplaySequence && a.DisplaySequence < b.DisplaySequence) || a.Sequence < b.Sequence);\n        //insert the new note at the last index excluding amendments (keep amendments last)\n        let index = agendaItems.findIndex(a => a.DraftText);\n        if (index !== -1) {\n            //there is at least one amendment, increase its display sequence because the new note will be in its previous sequence/indexc\n            agendaItems.forEach((item, idx) => {\n                if (idx >= index) {\n                    item.DisplaySequence++;\n                }\n            })\n        }\n\n        const newAgendaItem = {\n            Description: newAgendaItemText,\n            IsActive: true,\n            Sequence: (index + 1) || agendaItems.length + 1,\n            DisplaySequence: (index + 1) || agendaItems.length + 1,\n            AgendaId: agendaItems && agendaItems[0] ? agendaItems[0].AgendaId : null\n        }\n        agendaItems.splice(index !== -1 ? index : agendaItems.length + 1, 0, newAgendaItem);\n        let agendaItemContent = [...this.state.agendaItemContent];\n        agendaItemContent.splice(index !== -1 ? index : agendaItems.length + 1, 0, newAgendaItem.Description);\n        this.props.updateAgendaItems(agendaItems, this.props.categoryIndex, this.props.agendaIndex);\n        this.setState({\n            agendaItemContent: agendaItemContent\n        });\n    }\n\n    handleEditorChange(content, itemIndex) {\n        let agendaItemContent = [...this.state.agendaItemContent];\n        agendaItemContent[itemIndex] = content;\n        this.setState({\n            agendaItemContent: agendaItemContent\n        });\n    }\n\n    togglePortal(state) {\n        this.setState({\n            showPortal: !state\n        }, () => {\n            if (!this.state.showPortal) {\n                this.props.toggleAgendaItemEditor(-1)\n            }\n        });\n    }\n\n    saveAgendaItems() {\n        let agendaItems = [...this.props.agenda.AgendaItems];\n        agendaItems.forEach((item, i) => {\n            if (item.DraftText) {\n                item.DraftText = this.state.agendaItemContent[i];\n            } else if (item.CalendarDescription) {\n                item.CalendarDescription = this.state.agendaItemContent[i];\n            } else {\n                item.Description = this.state.agendaItemContent[i];\n            }\n            item.Sequence = item.DisplaySequence;\n        });\n        this.props.updateAgendaItems(agendaItems, this.props.categoryIndex, this.props.agendaIndex);\n        this.props.toggleAgendaItemEditor(-1);\n    }\n\n    close() {\n        let agendaItems = [...this.props.agenda.AgendaItems].sort((a, b) => (a.DraftText ? 1 : b.DraftText ? -1 : 0) || (a.DisplaySequence && b.DisplaySequence && a.DisplaySequence < b.DisplaySequence) || a.Sequence < b.Sequence);\n        //filter out newly added items since they are cancelling, and undo re-sequencing\n        agendaItems = agendaItems.filter((item) => {\n            if (!item.Description || item.Description === newAgendaItemText) {\n                return false;\n            } else {\n                return true;\n            }\n        })\n        agendaItems.forEach(item => {\n            item.IsActive = item.OrigIsActive;\n            item.DisplaySequence = null;\n        });\n        const sortedAgendaItems = agendaItems.sort((a, b) => a.Sequence - b.Sequence);\n        this.props.updateAgendaItems(sortedAgendaItems, this.props.categoryIndex, this.props.agendaIndex);\n        this.props.toggleAgendaItemEditor(-1)\n    }\n\n    componentDidMount() {\n        let agendaItems = [...this.props.agenda.AgendaItems].sort((a, b) => (a.DraftText ? 1 : b.DraftText ? -1 : 0) || (a.DisplaySequence && b.DisplaySequence && a.DisplaySequence < b.DisplaySequence) || a.Sequence < b.Sequence);\n        let agendaItemContent = [];\n        this.props.updateAgendaItems(agendaItems, this.props.categoryIndex, this.props.agendaIndex);\n        agendaItems.forEach((item, idx) => {\n            item.DisplaySequence = idx + 1;\n            item.OrigIsActive = item.IsActive;\n            agendaItemContent.push(item.DraftText || item.CalendarDescription || item.Description);\n        });\n        this.setState({\n            agendaItemContent: agendaItemContent\n        });\n    }\n\n    componentDidUpdate(prevProps) {\n        if (this.props.agenda.AgendaItems !== prevProps.agenda.AgendaItems) {\n            let agendaItemContent = [];\n            this.props.agenda.AgendaItems.sort((a, b) => (a.DraftText ? 1 : b.DraftText ? -1 : 0) || (a.DisplaySequence && b.DisplaySequence && a.DisplaySequence < b.DisplaySequence) || a.Sequence < b.Sequence).forEach(item => {\n                agendaItemContent.push(item.DraftText || item.CalendarDescription || item.Description);\n            });\n            this.setState({\n                agendaItemContent: agendaItemContent\n            });\n        }\n    }\n\n    onDragEnd(result) {\n        if (!result.destination) {\n            return;\n        }\n        let newAgendaItemContent = [];\n        let agendaItemContent = [...this.state.agendaItemContent];\n        let agendaItems = [...this.props.agenda.AgendaItems].sort((a, b) => (a.DraftText ? 1 : b.DraftText ? -1 : 0) || (a.DisplaySequence && b.DisplaySequence && a.DisplaySequence < b.DisplaySequence) || a.Sequence < b.Sequence);\n        if (agendaItems.find(a => a.DraftText) && result.destination.index >= agendaItems.findIndex(a => a.DraftText)) {\n            alert(\"You cannot reposition amendments.\");\n            return;\n        }\n        let [removedItemContent] = agendaItemContent.splice(result.source.index, 1);\n        let [removedItem] = agendaItems.splice(result.source.index, 1);\n        agendaItemContent.splice(result.destination.index, 0, removedItemContent);\n        agendaItems.splice(result.destination.index, 0, removedItem);\n        //Ensure amendments are still last, and reorder the Sequence value too!\n        agendaItems.sort((a, b) => (a.DraftText ? 1 : b.DraftText ? -1 : 0) || (a.DisplaySequence && b.DisplaySequence && a.DisplaySequence < b.DisplaySequence) || a.Sequence < b.Sequence)\n        agendaItems.forEach((element, index) => {\n            element.DisplaySequence = index + 1;\n            newAgendaItemContent.push(agendaItemContent[index]);\n        });\n        this.props.updateAgendaItems(agendaItems, this.props.categoryIndex, this.props.agendaIndex);\n        this.setState({ agendaItemContent: newAgendaItemContent });\n    }\n\n    toggleCustomNote(index) {\n        if (index > -1) {\n            let agendaItems = [...this.props.agenda.AgendaItems].sort((a, b) => (a.DraftText ? 1 : b.DraftText ? -1 : 0) || (a.DisplaySequence && b.DisplaySequence && a.DisplaySequence < b.DisplaySequence) || a.Sequence < b.Sequence);\n            agendaItems[index].IsActive = !agendaItems[index].IsActive;\n\n            this.props.updateAgendaItems(agendaItems, this.props.categoryIndex, this.props.agendaIndex);\n\n            const tinyMceEditor = document.querySelector('iframe#' + agendaItems[index].tinyMceId + '_ifr');\n            if (tinyMceEditor) {\n                const tinyMceHtmlElem = tinyMceEditor.contentWindow.document.querySelector('html');\n                const tinyMceHeaderElem = document.getElementById(agendaItems[index].tinyMceId).parentElement.querySelector('.tox-toolbar__primary');\n                if (tinyMceHtmlElem && tinyMceHeaderElem) {\n                    tinyMceHtmlElem.style.background = agendaItems[index].IsActive ? 'white' : '#f3f3f3';\n                    tinyMceHeaderElem.style.background = agendaItems[index].IsActive ? 'white' : '#f3f3f3';\n                }\n            }\n        }\n    }\n\n    setTinyMceIds(tinymceId, index) {\n        if (index > -1) {\n            let agendaItems = [...this.props.agenda.AgendaItems].sort((a, b) => (a.DraftText ? 1 : b.DraftText ? -1 : 0) || (a.DisplaySequence && b.DisplaySequence && a.DisplaySequence < b.DisplaySequence) || a.Sequence < b.Sequence);\n            agendaItems[index].tinyMceId = tinymceId;\n            this.props.updateAgendaItems(agendaItems, this.props.categoryIndex, this.props.agendaIndex);\n            const tinyMceHeaderElem = document.getElementById(agendaItems[index].tinyMceId).parentElement.querySelector('.tox-toolbar__primary');\n            if (tinyMceHeaderElem) {\n                tinyMceHeaderElem.style.background = agendaItems[index].IsActive ? 'white' : '#f3f3f3';\n            }\n        }\n    }\n\n    render() {\n        const editors =\n            <DragDropContext onDragEnd={result => this.onDragEnd(result)}>\n                <Droppable droppableId=\"droppable\">\n                    {(provided, _snapshot) => (\n                        <div ref={provided.innerRef}>\n                            {[...this.props.agenda.AgendaItems].sort((a, b) => (a.DraftText ? 1 : b.DraftText ? -1 : 0) || (a.DisplaySequence && b.DisplaySequence && a.DisplaySequence < b.DisplaySequence) || a.Sequence < b.Sequence).map((item, itemIndex) => {\n                                if (this.state.agendaItemContent[itemIndex] || this.state.agendaItemContent[itemIndex] === \"\") {\n                                    //Have to defer the render until there's actually conent to check\n                                    //this.state.agendaItemContent[itemIndex] was coming through undefined on the first pass and we can't re-render with the new height\n                                    let height = this.state.agendaItemContent[itemIndex].length <= 100 ? 80 : 180\n                                    return (\n                                        <Draggable isDragDisabled={Boolean(item.DraftText)} key={`${item.AgendaItemId}-${itemIndex}`} draggableId={`${item.AgendaItemId}-${itemIndex}`} index={itemIndex}>\n                                            {(provided, snapshot) => (\n                                                <div ref={provided.innerRef}\n                                                    {...provided.draggableProps}\n                                                    {...provided.dragHandleProps}\n                                                    style={getItemStyle(\n                                                        snapshot.isDragging,\n                                                        provided.draggableProps.style,\n                                                        item.IsActive\n                                                    )}\n                                                >\n                                                    {!item.DraftText && <div style={{ margin: 'auto' }}><button className=\"button draggable\">Drag and drop</button></div>}\n                                                    <div style={{ width: item.DraftText ? '100%' : '97%' }}>\n                                                        <Editor\n                                                            value={this.state.agendaItemContent[itemIndex] || ''}\n                                                            disabled={!item.IsActive || item.DraftText}\n                                                            onInit={(e) => this.setTinyMceIds(e.target.id, itemIndex)}\n                                                            init={{\n                                                                browser_spellcheck: true,\n                                                                height: height,\n                                                                menubar: false,\n                                                                statusbar: false,\n                                                                plugins: 'lists searchreplace',\n                                                                toolbar: 'undo redo | bold italic strikethrough | alignleft aligncenter alignright',\n                                                                skin: false,\n                                                                valid_children: '+body[style]',\n                                                                content_css: false,\n                                                                content_style: (item.IsActive ? '' : 'html { background: #f3f3f3}') + 'table { border-collapse: collapse; border: 1px solid #FFFFFF }' + 'td { padding: 12px 0px }',\n                                                            }}\n                                                            onEditorChange={content => this.handleEditorChange(content, itemIndex)}\n                                                        />\n                                                    </div>\n                                                    <div style={{ width: '3%', margin: 'auto', textAlign: 'center' }}>\n                                                        <button className={`icon ${item.IsActive ? 'delete' : 'add'}`} onClick={() => this.toggleCustomNote(itemIndex)} />\n                                                    </div>\n                                                </div>\n                                            )}\n                                        </Draggable>\n                                    )\n                                }\n                            })\n                            }\n                        </div>\n                    )}\n                </Droppable>\n            </DragDropContext>;\n        const buttons =\n            <React.Fragment>\n                <button type=\"button\" onClick={this.addNote} className=\"button\" style={!this.props.agenda.AgendaItems.length ? { marginTop: '20px' } : {}} >Add Note</button>\n                <div className=\"flex-row\">\n                    <br />\n                    <div className=\"inline-list\">\n                        <button type=\"button\" onClick={this.close} className=\"button secondary\">Cancel</button>\n                        <button type=\"button\" onClick={this.saveAgendaItems} className=\"button\">Finish</button>\n                    </div>\n                </div>\n            </React.Fragment>\n        return (<div>\n            {this.state.showPortal ?\n                <Popout togglePortal={this.togglePortal} windowTitle={`${this.props.agenda.LegislationNumber} ${this.props.agenda.LegislationDescription}`}>\n                    {editors}\n                    {buttons}\n                </Popout>\n                :\n                <div onClick={() => this.props.toggleAgendaItemEditor(-1)} className=\"overlay\">\n                    <div className=\"full\">\n                        <div onClick={e => e.stopPropagation()} className=\"dlas-forms user-forms advanced-search overlay-content animated-fade-in-up\">\n                            <div className=\"background-blue inline-list flex-row flex-vertical-center\">\n                                <span className=\"icon popout\" onClick={() => this.togglePortal(this.state.showPortal)}></span>\n                                <span className=\"txt-white\">{this.props.agenda.LegislationNumber} {this.props.agenda.LegislationDescription}</span>\n                            </div>\n                            {editors}\n                            {buttons}\n                        </div>\n                    </div>\n                </div>}\n        </div>);\n    }\n}\n\nexport default AgendaItemsComponent;\n","import React from \"react\";\nimport { LargeListSelect } from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport Select from 'react-select';\nimport ReactTooltip from 'react-tooltip';\nimport { Link } from 'react-router-dom';\nimport renderHTML from 'react-render-html';\nimport AgendaItemsComponent from '../../../lis-shared/lis-calendar/lis-agenda-items';\nimport moment from 'moment-timezone';\nimport { Editor } from '@tinymce/tinymce-react';\n\nconst isNotHidden = (agenda, category, committeeList) => (!agenda.CommitteeID && !agenda.IsHidden) || (agenda.IsActive && !agenda.IsHidden) || (committeeList.find(x => x.value == agenda.CommitteeID) && category.CalendarCategoryTypeID === 66) /* Bills or Resolutions Rereferred */\n\nconst NUMERIC_SORT_CATEGORIES = [2, 3, 4, 26, 27, 5, 41, 6, 7, 28, 29, 30, 31, 32, 57, 33, 35, 45, 9, 10, 8, 11, 13, 37, 38, 44, 46, 22];\n\nconst sortAgendas = (a, b, calendarChamber) => {\n    return !a.IsActive && b.IsActive\n        ? 1\n        : a.IsActive && !b.IsActive\n            ? -1\n            : (!a.Ranking || a.Ranking === \"\") && b.Ranking\n                ? -1\n                : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n                    ? 1\n                    : a.Ranking > b.Ranking\n                        ? 1\n                        : a.Ranking < b.Ranking\n                            ? -1\n                            : moment(a.CalendarDate).isAfter(b.CalendarDate, \"day\")\n                                ? 1\n                                : moment(b.CalendarDate).isAfter(a.CalendarDate, \"day\")\n                                    ? -1\n                                    : moment(a.CandidateDate).isAfter(b.CandidateDate, \"day\")\n                                        ? 1\n                                        : moment(b.CandidateDate).isAfter(a.CandidateDate, \"day\")\n                                            ? -1\n                                            : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                                                a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                                    ? -1 : 1\n                                                : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                                    ? 1\n                                                    : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                                        ? -1\n                                                        : a.LegislationKey > b.LegislationKey\n                                                            ? 1\n                                                            : -1\n}\n\nconst sortAgendasNumerically = (a, b, calendarChamber) => {\n    return !a.IsActive && b.IsActive\n        ? 1\n        : a.IsActive && !b.IsActive\n            ? -1\n            : (!a.Ranking || a.Ranking === \"\") && (b.Ranking && b.Ranking !== \"\")\n                ? -1\n                : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n                    ? 1\n                    : a.Ranking > b.Ranking\n                        ? 1\n                        : a.Ranking < b.Ranking\n                            ? -1\n                            : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                                a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                    ? -1 : 1\n                                : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                    ? 1\n                                    : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                        ? -1\n                                        : a.LegislationKey > b.LegislationKey\n                                            ? 1\n                                            : -1\n}\n\nconst sortInactiveAgendas = (a, b, calendarChamber) => {\n    return (!a.Ranking || a.Ranking === \"\") && (b.Ranking && b.Ranking !== \"\")\n        ? -1\n        : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n            ? 1\n            : a.Ranking > b.Ranking\n                ? 1\n                : a.Ranking < b.Ranking\n                    ? -1\n                    : moment(a.CalendarDate).isAfter(b.CalendarDate, \"day\")\n                        ? 1\n                        : moment(b.CalendarDate).isAfter(a.CalendarDate, \"day\")\n                            ? -1\n                            : moment(a.CandidateDate).isAfter(b.CandidateDate, \"day\")\n                                ? 1\n                                : moment(b.CandidateDate).isAfter(a.CandidateDate, \"day\")\n                                    ? -1\n                                    : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                                        a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                            ? -1 : 1\n                                        : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                            ? 1\n                                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                                ? -1\n                                                : a.LegislationKey > b.LegislationKey\n                                                    ? 1\n                                                    : -1\n}\n\nconst sortInactiveAgendasNumerically = (a, b, calendarChamber) => {\n    return (!a.Ranking || a.Ranking === \"\") && (b.Ranking && b.Ranking !== \"\")\n        ? -1\n        : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n            ? 1\n            : a.Ranking > b.Ranking\n                ? 1\n                : a.Ranking < b.Ranking\n                    ? -1\n                    : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                        a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                            ? -1 : 1\n                        : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                            ? 1\n                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                ? -1\n                                : a.LegislationKey > b.LegislationKey\n                                    ? 1\n                                    : -1\n}\n\nconst findLastByIsActiveThenCalendarDateThenCandidateDateThenLegChamberTypeKey = (a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate) => (\n    a.IsActive && findLastByCalendarDateThenCandidateDateThenLegChamberTypeKey(a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate)\n)\n\nconst findLastByCalendarDateThenCandidateDateThenLegChamberTypeKey = (a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate) => (\n    (((ignoreCalendarDate || (a.CalendarDate && b.CalendarDate && moment(a.CalendarDate).isSame(b.CalendarDate, \"day\"))) && findLastByLegChamberTypeKey(a, b, calendarChamber)) ||\n        (!ignoreCalendarDate && a.CalendarDate && b.CalendarDate && moment(a.CalendarDate).isBefore(b.CalendarDate, \"day\"))) ||\n    (((ignoreCandidateDate || (a.CandidateDate && b.CandidateDate && moment(a.CandidateDate).isSame(b.CandidateDate, \"day\"))) && findLastByLegChamberTypeKey(a, b, calendarChamber)) ||\n        (!ignoreCandidateDate && a.CandidateDate && b.CandidateDate && moment(a.CandidateDate).isBefore(b.CandidateDate, \"day\"))) ||\n    ((ignoreCalendarDate || (!a.CalendarDate && !b.CalendarDate)) && (ignoreCandidateDate || (!a.CandidateDate && !b.CandidateDate)) &&\n        findLastByLegChamberTypeKey(a, b, calendarChamber))\n    || (!ignoreCalendarDate && !b.CalendarDate && a.CandidateDate)\n    || !ignoreCandidateDate && !b.CandidateDate && a.CandidateDate\n)\n\nconst findLastByLegChamberTypeKey = (a, b, calendarChamber) => (\n    (a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === (calendarChamber === \"H\" ? 1 : -1)) ||\n    (a.LegislationNumber && a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === 0 && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) === -1) ||\n    (a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === 0 && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) === 0 && a.LegislationKey && a.LegislationKey < parseInt(b.LegislationKey))\n)\n\nconst getItemStyle = (isDragging, draggableStyle, isActive) => ({\n    // some basic styles to make the items look a bit nicer\n    userSelect: 'none',\n    // change background colour if dragging\n    background: isDragging ? '#34495e' : 'white',\n    color: isDragging ? 'white' : '#34495e',\n    border: 'none',\n    borderLeft: '1px solid #e0e0e0',\n    borderBottom: '1px solid #e0e0e0',\n    color: isActive ? '' : '#8b8b8b',\n    // styles we need to apply on draggables\n    ...draggableStyle,\n});\n\nclass BillsGrid extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectAllActive: false,\n            selectAllInactive: false,\n            showAgendaItemEditor: -1,\n            showAgendaItemEditorCategoryIndex: -1,\n            lastCheckedBills: []\n        };\n        this.handleAgendaSort = this.handleAgendaSort.bind(this);\n        this.toggleSelectAll = this.toggleSelectAll.bind(this);\n        this.toggleRow = this.toggleRow.bind(this);\n        this.toggleBill = this.toggleBill.bind(this);\n        this.showAgendaItems = this.showAgendaItems.bind(this);\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.toggleEditCategoryDescription = this.toggleEditCategoryDescription.bind(this);\n        this.saveChange = this.saveChange.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.onDragEnd = this.onDragEnd.bind(this);\n        this.toggleAgendaItemEditor = this.toggleAgendaItemEditor.bind(this);\n        this.expandTitle = this.expandTitle.bind(this);\n        this.getCategoryBills = this.getCategoryBills.bind(this);\n        this.setDescription = this.setDescription.bind(this);\n        this.setBillsInConferenceCategoryDescription = this.setBillsInConferenceCategoryDescription.bind(this);\n        this.categoryDescriptionIsEdited = this.categoryDescriptionIsEdited.bind(this);\n        this.changeCommitteeDropdown = this.changeCommitteeDropdown.bind(this);\n        this.changeDateDropdown = this.changeDateDropdown.bind(this);\n        this.addBill = this.addBill.bind(this);\n        this.toggleShowAmendments = this.toggleShowAmendments.bind(this);\n        this.setRanking = this.setRanking.bind(this);\n        this.handleDescriptionChange = this.handleDescriptionChange.bind(this);\n        this.selectAllCommending = this.selectAllCommending.bind(this);\n        this.selectAllMemorial = this.selectAllMemorial.bind(this);\n    }\n\n    toggleSelectAll(categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n        const opposite = !organizedBills.filter(c => !c.DeletionDate)[categoryIndex].selectAll;\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].selectAll = opposite\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(leg => { if (isNotHidden(leg, organizedBills.filter(c => !c.DeletionDate)[categoryIndex], this.props.committeeList)) leg.checked = opposite });\n        this.props.updateAgenda(organizedBills);\n\n        let lastCheckedBills = this.state.lastCheckedBills;\n        lastCheckedBills[categoryIndex] = -1;\n        this.setState({\n            lastCheckedBills: lastCheckedBills\n        });\n    }\n\n    toggleRow(categoryIndex, itemIndex, e) {\n        let organizedBills = [...this.props.organizedBills];\n        let lastCheckedBills = this.state.lastCheckedBills;\n        let lastCheckedBill = lastCheckedBills[categoryIndex];\n        if (e.nativeEvent.shiftKey && !isNaN(lastCheckedBill) && lastCheckedBill !== -1) {\n            organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(agenda => agenda.checked = false);\n            for (let i = 0; i < Math.abs(itemIndex - lastCheckedBill); i++) {\n                const index = lastCheckedBill + i * (itemIndex - lastCheckedBill) / Math.abs(itemIndex - lastCheckedBill);\n                organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[index].checked = true;\n            }\n        } else {\n            lastCheckedBill = itemIndex;\n        }\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[itemIndex].checked = !organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[itemIndex].checked;\n        this.props.updateAgenda(organizedBills);\n\n        lastCheckedBills[categoryIndex] = lastCheckedBill;\n        this.setState({\n            lastCheckedBills: lastCheckedBills\n        });\n    }\n\n    categoryDescriptionIsEdited(categoryAsDisplayed, associatedReferenceCategory) {\n        if (this.props.chamberCode === 'H' && categoryAsDisplayed.CategoryCode === \"SENBRC\" || categoryAsDisplayed.CategoryCode === \"HOUBRC\") {\n            return !(\n                [\"House Bill in Conference\", \"Senate Bill in Conference\",\n                    \"House Bills in Conference\", \"Senate Bills in Conference\",\n                    \"House Joint Resolution in Conference\", \"Senate Joint Resolution in Conference\",\n                    \"House Joint Resolutions in Conference\", \"Senate Joint Resolutions in Conference\",\n                    \"House Bill and Joint Resolution in Conference\", \"Senate Bill and Joint Resolution in Conference\",\n                    \"House Bills and Joint Resolution in Conference\", \"Senate Bills and Joint Resolution in Conference\",\n                    \"House Bill and Joint Resolutions in Conference\", \"Senate Bill and Joint Resolutions in Conference\",\n                    \"House Bills and Joint Resolutions in Conference\", \"Senate Bills and Joint Resolutions in Conference\",\n                ].includes(categoryAsDisplayed.Description))\n        } else {\n            if (associatedReferenceCategory && associatedReferenceCategory.Description !== categoryAsDisplayed.Description && associatedReferenceCategory.PluralDescription !== categoryAsDisplayed.Description) {\n                return true;\n            } else {\n                return false;\n            }\n        }\n    }\n\n    setDescription(organizedBills, categoryIndex) {\n        let updatedOrganizedBills = [...organizedBills];\n\n        if (categoryIndex) {\n            //if it's been edited, leave it at that\n            const associatedReferenceCategory = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID);\n            if (this.categoryDescriptionIsEdited(updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex], associatedReferenceCategory)) {\n                //leave it alone\n            } else {\n                //otherwise, set description based on singular/plural reference description\n                if (this.props.chamberCode === 'H' && updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CategoryCode === \"SENBRC\" || updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CategoryCode === \"HOUBRC\") {\n                    updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].Description = this.setBillsInConferenceCategoryDescription(updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex]);\n                } else {\n                    if (associatedReferenceCategory) {\n                        if (updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.filter(x => x.IsActive).length > 1) {\n                            updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].Description = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID).PluralDescription;\n                        } else {\n                            updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].Description = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID).Description;\n                        }\n                    }\n                }\n            }\n        } else {\n            //iterate through all\n            updatedOrganizedBills.forEach((cat, index) => {\n                //if it's been edited, leave it at that\n                const associatedReferenceCategory = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === updatedOrganizedBills[index].CalendarCategoryTypeID)\n                if (this.categoryDescriptionIsEdited(cat, associatedReferenceCategory)) {\n                    return;\n                }\n\n                //otherwise, set description based on singular/plural reference description\n                if (this.props.chamberCode === 'H' && cat.CategoryCode === \"SENBRC\" || cat.CategoryCode === \"HOUBRC\") {\n                    updatedOrganizedBills[index].Description = this.setBillsInConferenceCategoryDescription(cat);\n                } else {\n                    if (associatedReferenceCategory) { //calendarCategories prop only contains same chamber categories, so could cause an NRE if iterating over an opposite-chamber category\n                        if (updatedOrganizedBills[index].Agendas.filter(x => x.IsActive).length > 1) {\n                            updatedOrganizedBills[index].Description = associatedReferenceCategory.PluralDescription;\n                        } else {\n                            updatedOrganizedBills[index].Description = associatedReferenceCategory.Description;\n                        }\n                    }\n                }\n            })\n        }\n\n        return updatedOrganizedBills;\n    }\n\n    setBillsInConferenceCategoryDescription(category) {\n        let existingDescription = category.Description;\n        let newTypeAndPluralityLanguage;\n        let newDescription;\n\n        //get all legislations in this category\n        const categoryLegislations = category.Agendas;\n        if (categoryLegislations) {\n            //filter to only the active legislations\n            const activeCategoryLegislations = categoryLegislations.filter(cl => cl.IsActive);\n            if (!activeCategoryLegislations.length) {\n                //not any active legislations - should only say 'bill'\n                newTypeAndPluralityLanguage = 'Bill';\n            } else {\n                const numResolutions = activeCategoryLegislations.filter(acl => acl.LegislationNumber[1] !== \"B\").length;\n                const numBills = activeCategoryLegislations.filter(acl => acl.LegislationNumber[1] === \"B\").length;\n                if (numResolutions > 0 && numBills > 0) {\n                    //At least one bill and at least one resolution\n                    newTypeAndPluralityLanguage = (numBills > 1 ? 'Bills' : 'Bill') + ' and Joint ';\n                    newTypeAndPluralityLanguage += numResolutions > 1 ? 'Resolutions' : 'Resolution';\n                } else if (numResolutions > 0 && numBills === 0) {\n                    //at least one resolution and no bills\n                    newTypeAndPluralityLanguage = numResolutions > 1 ? 'Joint Resolutions' : 'Joint Resolution';\n                } else if (numResolutions === 0 && numBills > 0) {\n                    //at least one bill and no resolutions\n                    newTypeAndPluralityLanguage = numBills > 1 ? 'Bills' : 'Bill';\n                }\n            }\n            newDescription = existingDescription.replace(/\\b(Bill and Joint Resolution|Bills and Joint Resolution|Bills and Joint Resolutions|Bill and Joint Resolutions|Bill|Bills|Joint Resolution|Joint Resolutions)\\b/, newTypeAndPluralityLanguage);\n        }\n\n        return newDescription;\n    }\n\n    handleAgendaSort(agendas, categoryTypeId) {\n        let unrankedAgendas = [];\n        let rankedAgendas = [];\n        let inactiveAgendas = [];\n        let rankings = [];\n\n        if (agendas) {\n            agendas.forEach((agenda) => {\n                if (!agenda.Ranking && agenda.IsActive) {\n                    unrankedAgendas.push(agenda);\n                } else if (agenda.IsActive) {\n                    rankedAgendas.push(agenda);\n                    rankings.push(agenda.Ranking);\n                } else {\n                    inactiveAgendas.push(agenda)\n                }\n            })\n\n            rankings.sort((a, b) => a - b);\n\n            let gaps = [];\n            for (let i = 1; i < rankings.length; i++) {\n                gaps.push(rankings[i] - rankings[i - 1]);\n            }\n\n            console.log(agendas, categoryTypeId)\n\n\n            if (NUMERIC_SORT_CATEGORIES.includes(categoryTypeId)) {\n                rankedAgendas.sort((a, b) => sortAgendasNumerically(a, b, this.props.chamberCode));\n            } else {\n                rankedAgendas.sort((a, b) => sortAgendas(a, b, this.props.chamberCode));\n            }\n            if (NUMERIC_SORT_CATEGORIES.includes(categoryTypeId)) {\n                unrankedAgendas.sort((a, b) => sortAgendasNumerically(a, b, this.props.chamberCode));\n            } else {\n                unrankedAgendas.sort((a, b) => sortAgendas(a, b, this.props.chamberCode));\n            }\n            if (NUMERIC_SORT_CATEGORIES.includes(categoryTypeId)) {\n                inactiveAgendas.sort((a, b) => sortInactiveAgendasNumerically(a, b, this.props.chamberCode));\n            } else {\n                inactiveAgendas.sort((a, b) => sortInactiveAgendas(a, b, this.props.chamberCode));\n            }\n\n            //If there are multiple ranks with a gap larger than 1 place all unranked agendas between them\n            if (new Set(rankings).size > 1 && Math.max(...gaps) > 1) {\n                let insertPoint = gaps.findIndex(x => x === Math.max(...gaps)) + 1\n\n                for (let i = 0; i < unrankedAgendas.length; i++) {\n                    rankedAgendas.splice(insertPoint, 0, unrankedAgendas[i]);\n                    insertPoint++;\n                }\n\n                return rankedAgendas.concat(inactiveAgendas);\n            } else {\n                //If the largest rank is greated than 50 put all unranked agendas above the ranked agendas, otherwise put them all at the bottom\n                if (Math.max(...rankings) >= 50) {\n                    return unrankedAgendas.concat(rankedAgendas).concat(inactiveAgendas);\n                } else {\n                    return rankedAgendas.concat(unrankedAgendas).concat(inactiveAgendas);\n\n                }\n            }\n        } else {\n            return agendas;\n        }\n    }\n\n    toggleBill(categoryIndex, itemIndex) {\n        let organizedBills = [...this.props.organizedBills];\n        let agenda = organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[itemIndex]\n        agenda.IsActive = !agenda.IsActive;\n        agenda.checked = false;\n        if (agenda.pending === false) {\n            delete agenda.pending;\n        }\n\n        organizedBills = this.setDescription(organizedBills, categoryIndex);\n        organizedBills[categoryIndex].Agendas = this.handleAgendaSort(organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas, organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID)\n\n        //check for this bill being a duplicate in other categories\n        const isDuplicate = organizedBills.filter(cc => cc.CalendarCategoryTypeID !== organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID && cc.Agendas.find(a => a.LegislationNumber === agenda.LegislationNumber))\n        if (isDuplicate.length) {\n            isDuplicate.forEach(duplicateCategory => {\n                duplicateCategory.Agendas.filter(a => a.LegislationNumber === agenda.LegislationNumber).forEach(duplicateAgenda => {\n                    duplicateAgenda.IsActive = false;\n                    duplicateAgenda.Ranking = null;\n                })\n                const duplicateCategoryIndex = organizedBills.findIndex(cc => cc.CalendarCategoryTypeID === duplicateCategory.CalendarCategoryTypeID);\n                organizedBills = this.setDescription(organizedBills, duplicateCategoryIndex);\n                const response = this.handleAgendaSort(organizedBills[duplicateCategoryIndex].Agendas, organizedBills[duplicateCategoryIndex].CalendarCategoryTypeID)\n                organizedBills[duplicateCategoryIndex].Agendas = response;\n            })\n        }\n\n        this.props.updateAgenda(organizedBills, true);\n    }\n\n    toggleBillBulk(activate, categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n\n        const legNumbersToBeIncluded = activate ? organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.filter(a => a.checked).flatMap(a => a.LegislationNumber) : [];\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(leg => {\n            if (leg.checked) {\n                leg.IsActive = activate;\n            }\n\n            if (leg.pending === false) {\n                delete leg.pending;\n            }\n\n            leg.checked = false;\n        });\n\n        organizedBills = this.setDescription(organizedBills, categoryIndex);\n        organizedBills[categoryIndex].Agendas = this.handleAgendaSort(organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas, organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID)\n\n        //check for this bill being a duplicate in other categories\n        const isDuplicate = organizedBills.filter(cc => cc.CalendarCategoryTypeID !== organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID && cc.Agendas.find(a => legNumbersToBeIncluded.includes(a.LegislationNumber)))\n        if (isDuplicate.length) {\n            isDuplicate.forEach(duplicateCategory => {\n                duplicateCategory.Agendas.filter(a => legNumbersToBeIncluded.includes(a.LegislationNumber)).forEach(duplicateAgenda => {\n                    duplicateAgenda.IsActive = false;\n                    duplicateAgenda.Ranking = null;\n                })\n                const duplicateCategoryIndex = organizedBills.findIndex(cc => cc.CalendarCategoryTypeID === duplicateCategory.CalendarCategoryTypeID);\n                organizedBills = this.setDescription(organizedBills, duplicateCategoryIndex);\n                organizedBills[duplicateCategoryIndex].Agendas.sort((a, b) => NUMERIC_SORT_CATEGORIES.includes(organizedBills[duplicateCategoryIndex].CalendarCategoryTypeID) ? sortAgendasNumerically(a, b, this.props.chamberCode) : sortAgendas(a, b, this.props.chamberCode));\n            })\n        }\n\n        this.props.updateAgenda(organizedBills, true);\n    }\n\n    moveTo(topOrBottom, categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(leg => {\n            if (leg.checked && leg.IsActive) {\n                leg.Ranking = topOrBottom === \"top\" ? 1 : 99\n            }\n        });\n\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.filter(a => a.checked).forEach(agenda => {\n            agenda.checked = false;\n        });\n\n        organizedBills = this.setDescription(organizedBills, categoryIndex);\n\n        const result = this.handleAgendaSort(organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas, organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID)\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas = result;\n        this.props.updateAgenda(organizedBills, true);\n    }\n\n    switchCategory(categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n\n        //uncheck the ones that are already in this category so that they don't get resequenced\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(a => a.checked = false);\n\n        let categoriesWithCheckedBills = organizedBills.filter(c => !c.DeletionDate && c.IsLegislationCategory && c.Agendas.find(a => a.checked));\n        categoriesWithCheckedBills.forEach(cat => {\n            cat.Agendas.filter(a => a.checked).forEach(checkedAgenda => {\n                checkedAgenda.Ranking = 0; //will get set later in toggleBillBulk\n                if (organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryID) {\n                    checkedAgenda.CalendarCategoryID = organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryID;\n                } else {\n                    delete checkedAgenda.CalendarCategoryID;\n                }\n                organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.push(checkedAgenda);\n                const existingCategoryAgendaIndex = cat.Agendas.findIndex(a => a.LegislationNumber === checkedAgenda.LegislationNumber);\n                if (existingCategoryAgendaIndex > -1) { //remove the bill from the old category; always should be found\n                    cat.Agendas.splice(existingCategoryAgendaIndex, 1);\n                }\n            })\n        })\n\n        this.toggleBillBulk(true, categoryIndex);\n    }\n\n    showAgendaItems(categoryIndex, agendaIndex) {\n        let organizedBills = [...this.props.organizedBills].filter(c => !c.DeletionDate);\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].showAgendaItems = !organizedBills[categoryIndex].Agendas[agendaIndex].showAgendaItems;\n        this.props.updateAgenda(organizedBills);\n    }\n\n    toggleEdit(categoryIndex, agendaIndex) {\n        let categories = [...this.props.organizedBills];\n        //This key is used to tell the DOM whether to display an input or a span\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].isEditing = !categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].isEditing;\n        //Create a key called newDescription that will hold the text that  the user types in\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].newDescription = categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].Description;\n        this.props.updateAgenda(categories);\n    }\n\n    handleChange(categoryIndex, agendaIndex, value, title) {\n        let categories = [...this.props.organizedBills];\n        if (title) {\n            categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].LegislationTitle = value;\n        } else {\n            categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].newDescription = value;\n        }\n\n        this.props.updateAgenda(categories);\n    }\n\n    saveChange(categoryIndex, agendaIndex) {\n        //Turn input back into span\n        let categories = [...this.props.organizedBills];\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].isEditing = false;\n        //Set description to the text that the user has typed in. If new description is null then set it to the current description\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].Description = categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].newDescription;\n        this.props.updateAgenda(categories, true);\n    }\n\n    expandTitle(categoryIndex, agendaIndex) {\n        let categories = [...this.props.organizedBills];\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].expandTitle = !categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].expandTitle ? true : false;\n\n        this.props.updateAgenda(categories, this.props.pendingSave);\n    }\n\n    onDragEnd(result, categoryIndex) {\n\n    }\n\n    toggleAgendaItemEditor(agendaIndex, categoryIndex) {\n        if (!categoryIndex || ([...this.props.organizedBills].filter(c => !c.DeletionDate).length && [...this.props.organizedBills].filter(c => !c.DeletionDate)[categoryIndex])) {\n            this.setState({\n                showAgendaItemEditor: agendaIndex,\n                showAgendaItemEditorCategoryIndex: Number.isInteger(categoryIndex) ? categoryIndex : -1\n            });\n        }\n    }\n\n    getCategoryBills(category) {\n        const associatedCategory = this.props.calendarCategories.find(c => c.CalendarCategoryTypeID === category.CalendarCategoryTypeID);\n        if (associatedCategory) {\n            return this.props.billList.filter(b => (b.ChamberCode === associatedCategory.LegislationChamberCode || !associatedCategory.LegislationChamberCode) && (b.LegislationTypeCode === associatedCategory.LegislationTypeCode || !associatedCategory.LegislationTypeCode))\n        } else { return this.props.billList }\n    }\n\n    toggleShowAmendments(categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].showAmendments = !organizedBills[categoryIndex].showAmendments;\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(agenda => {\n            agenda.AgendaItems.forEach(item => {\n                if (item.LDNumber) {\n                    item.IsActive = organizedBills[categoryIndex].showAmendments;\n                }\n            })\n        });\n        this.props.updateAgenda(organizedBills);\n    }\n\n    setRanking(categoryIndex, agendaIndex, ranking) {\n        let organizedBills = [...this.props.organizedBills];\n        if (parseInt(ranking)) {\n            organizedBills[categoryIndex].Agendas[agendaIndex].Ranking = parseInt(ranking);\n        } else if (ranking === \"\") {\n            organizedBills[categoryIndex].Agendas[agendaIndex].Ranking = \"\";\n        }\n        this.props.updateAgenda(organizedBills);\n    }\n\n    changeCommitteeDropdown(value) {\n        this.props.changeCommitteeDropdown(value, () => {\n            let organizedBills = [...this.props.organizedBills];\n            organizedBills = this.setDescription(organizedBills);\n            this.props.updateAgenda(organizedBills, true);\n        });\n    }\n\n    changeDateDropdown(value) {\n        this.props.changeDateDropdown(value, () => {\n            let organizedBills = [...this.props.organizedBills];\n            organizedBills = this.setDescription(organizedBills);\n            this.props.updateAgenda(organizedBills, true);\n        });\n    }\n\n    addBill(categoryIndex) {\n        this.props.addBill(categoryIndex, () => {\n            let organizedBills = [...this.props.organizedBills];\n            organizedBills = this.setDescription(organizedBills);\n            this.props.updateAgenda(organizedBills, true);\n        });\n    }\n\n    toggleEditCategoryDescription(categoryIndex, save) {\n        const categories = [...this.props.organizedBills];\n        let category = categories.filter(c => !c.DeletionDate)[categoryIndex];\n        category.editing = !category.editing;\n        if (save) {\n            category.Description = category.tempDescription;\n        } else {\n            category.tempDescription = this.categoryDescription(category);\n        }\n        this.props.updateAgenda(categories, save);\n    }\n\n    handleDescriptionChange(categoryIndex, val) {\n        let organizedBills = [...this.props.organizedBills];\n        organizedBills[categoryIndex].tempDescription = val;\n        this.props.updateAgenda(organizedBills);\n    }\n\n    categoryDescription = category => {\n        //if it's been edited, leave it at that\n        const associatedReferenceCategory = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === category.CalendarCategoryTypeID);\n        if (associatedReferenceCategory && associatedReferenceCategory.Description !== category.Description && associatedReferenceCategory.PluralDescription !== category.Description) {\n            return category.Description;\n        }\n\n        //otherwise, use singular or plural reference description\n        if (this.props.chamberCode === 'H' && category.CategoryCode === \"HOUBRC\" || category.CategoryCode === \"SENBRC\") {\n            return category.Description;\n        } else if (category.Agendas.filter(a => a.IsActive).length > 1 && category.PluralDescription) {\n            return category.PluralDescription;\n        } else {\n            return category.Description;\n        }\n    }\n\n    selectAllCommending(categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n        const opposite = !organizedBills.filter(c => !c.DeletionDate)[categoryIndex].selectAllCommending;\n        organizedBills[categoryIndex].selectAllCommending = opposite;\n        organizedBills[categoryIndex].Agendas.forEach(x => { if (x.LegislationClassID === 3) { x.checked = opposite } })\n        this.props.updateAgenda(organizedBills);\n    }\n\n    selectAllMemorial(categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n        const opposite = !organizedBills.filter(c => !c.DeletionDate)[categoryIndex].selectAllMemorial;\n        organizedBills[categoryIndex].selectAllMemorial = opposite\n        organizedBills[categoryIndex].Agendas.forEach(x => { if (x.LegislationClassID === 2) { x.checked = opposite } })\n        this.props.updateAgenda(organizedBills);\n    }\n\n    render() {\n        //Filter out the categories that have already been added to the calendar\n        const calendarCategoryOptions = this.props.calendarCategories.filter(category => {\n            if (this.props.organizedBills.findIndex(cat => !cat.DeletionDate && cat.CalendarCategoryTypeID === category.CalendarCategoryTypeID) < 0) {\n                return category;\n            }\n        });\n        // The button will read 'Add' if the bill is not already part of a category. The button will read 'Move' if it is already part of a category.\n        const billButtonText = index => {\n            let billExists = false;\n            if (this.props.selectedBill[index]) {\n                this.props.organizedBills.some(category => {\n                    if (category.Agendas.findIndex(bill => bill.LegislationID === this.props.selectedBill[index].LegislationID) >= 0) {\n                        billExists = true;\n                        return true;\n                    }\n                });\n                if (billExists) {\n                    return (\"Move\");\n                }\n            }\n            return (\"Add\");\n        }\n\n        return (\n            <div className=\"drag-container\">\n                {this.state.showAgendaItemEditor !== -1 &&\n                    <AgendaItemsComponent\n                        toggleAgendaItemEditor={this.toggleAgendaItemEditor}\n                        agenda={this.props.organizedBills.filter(c => !c.DeletionDate)[this.state.showAgendaItemEditorCategoryIndex].Agendas[this.state.showAgendaItemEditor]}\n                        categoryIndex={this.state.showAgendaItemEditorCategoryIndex}\n                        agendaIndex={this.state.showAgendaItemEditor}\n                        updateAgendaItems={this.props.updateAgendaItems}\n                    />\n                }\n                <div className=\"inner-grid two\">\n                    <React.Fragment>\n                        <span>Use these two selectors to view candidate bills reported out of committee.</span>\n                        <div />\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <label>Committee Reported Out</label>\n                                <Select\n                                    classNamePrefix=\"grid-selector-dropdown\"\n                                    value={this.props.selectedCommittee}\n                                    onChange={this.changeCommitteeDropdown}\n                                    options={this.props.committeeList.sort((a, b) => a.label > b.label)}\n                                    styles={{ menu: provided => ({ ...provided, zIndex: this.props.organizedBills.length + 1 }) }}\n                                    isSearchable\n                                    isClearable\n                                />\n                            </div>\n                            <div>\n                                <label>Date Reported Out</label>\n                                <Select\n                                    classNamePrefix=\"grid-selector-dropdown\"\n                                    value={this.props.selectedDate}\n                                    onChange={this.changeDateDropdown}\n                                    options={this.props.dateList.sort((a, b) => a.label > b.label)}\n                                    styles={{ menu: provided => ({ ...provided, zIndex: this.props.organizedBills.length + 1 }) }}\n                                    isSearchable\n                                    isClearable\n                                />\n                            </div>\n                        </div>\n                    </React.Fragment>\n                    <div className=\"inner-grid eight-and-one\">\n                        <div>\n                            <label>Category</label>\n                            <Select\n                                classNamePrefix=\"grid-selector-dropdown\"\n                                options={calendarCategoryOptions}\n                                value={this.props.selectedCategory}\n                                onChange={this.props.changeCategoryDropdown}\n                                styles={{ menu: provided => ({ ...provided, textAlign: 'right', whiteSpace: 'nowrap', right: '0', width: 'auto', zIndex: this.props.organizedBills.length + 1 }) }}\n                            />\n                        </div>\n                        <button disabled={!this.props.selectedCategory} type=\"button\" className=\"button primary\" style={{ marginTop: \"24px\", height: \"36px\" }} onClick={this.props.addCategory}>Add Category</button>\n                    </div>\n                </div>\n                <div style={{ display: 'flex', gap: '25px' }}>\n                    <button className=\"button-link\" onClick={() => this.props.toggleHideAllCategories(this.props.hideCategories.filter(c => c).length !== this.props.organizedBills.length)}>{this.props.hideCategories.filter(c => c).length !== this.props.organizedBills.length ? \"Collapse All Categories\" : \"Expand All Categories\"}</button>\n                    <button className=\"button-link\" onClick={() => this.props.toggleHideAllNonIncludedBills()}>{this.props.hideAllNonIncludedBills ? \"Show All Legislation\" : \"Hide Non-Included Legislation\"}</button>\n                </div>\n                <div style={{ marginTop: 15 }}>\n                    <div className=\"bill-grid communications-category-grid calendar-category-grid\">\n                        <div className=\"bill-grid-header\">\n                            <span>Seq.</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span></span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Bill #</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Committee/Date Reported</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>{this.props.showTitles ? \"Title\" : \"Caption\"}</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Status</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Action</span>\n                        </div>\n                    </div>\n                    {this.props.organizedBills.filter(c => !c.DeletionDate).map((category, categoryIndex) =>\n                        <form key={categoryIndex}>\n                            <div style={{ position: 'sticky', top: '0px', zIndex: this.props.organizedBills.filter(c => !c.DeletionDate).length - categoryIndex }}>\n                                <div className={`calendar-category-grid calendar-category-grid-header${category.Agendas && category.Agendas.length ? '' : ' deletable'}`}>\n                                    <div>\n                                        <button onClick={() => this.props.toggleHideCategory(categoryIndex)} type=\"button\" className={`${this.props.hideCategories[categoryIndex] ? \"arrow-down\" : \"arrow-up\"}`}></button>\n                                    </div>\n                                    <div>\n                                        <input\n                                            type=\"checkbox\"\n                                            className=\"checkbox\"\n                                            checked={category.selectAll || ''}\n                                            onChange={() => this.toggleSelectAll(categoryIndex)}\n                                        />\n                                    </div>\n                                    <div>\n                                        <span>\n                                            {category.editing ?\n                                                <React.Fragment>\n                                                    <textarea\n                                                        className={`category-description-${categoryIndex}`}\n                                                        style={{ width: '90%', fontSize: '0.9em' }}\n                                                        type=\"text\"\n                                                        onChange={(e) => this.handleDescriptionChange(categoryIndex, e.target.value)}\n                                                        value={category.tempDescription}\n                                                    />\n                                                    <a className=\"icon save\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryDescription(categoryIndex, true)} />\n                                                    <a className=\"icon delete\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryDescription(categoryIndex)} />\n                                                </React.Fragment>\n                                                :\n                                                <React.Fragment>\n                                                    <b>{category.DisplayType ? `${this.categoryDescription(category)} - ${category.CategoryType} ` : this.categoryDescription(category)}</b>\n                                                    <a className=\"icon edit\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryDescription(categoryIndex)} />\n                                                </React.Fragment>\n                                            }\n                                        </span>\n                                        {category.CalendarCategoryTypeID === 38 &&\n                                            <div style={{ display: \"inline-flex\" }}>\n                                                <button type=\"button\" class=\"button small-button\" style={{ marginRight: \"10px\" }} onClick={() => this.selectAllCommending(categoryIndex)}>Select All Commending</button>\n                                                <button type=\"button\" class=\"button small-button\" onClick={() => this.selectAllMemorial(categoryIndex)}>Select All Memorial</button>\n                                            </div>\n                                        }\n                                    </div>\n                                    <div>\n                                        {!category.Agendas || !category.Agendas.length ? <button onClick={() => this.props.deleteCategory(category)} className=\"icon delete\" type=\"button\" />\n                                            :\n                                            this.props.userRoles.find(x => x === \"SenateCalendarEditor\") && [98, 102].includes(category.CalendarCategoryTypeID) &&\n                                            <React.Fragment>\n                                                <label style={{ margin: \"0 5px 0 0\" }}>Show w/ Amendments</label>\n                                                <div className=\"bill-grid-actions\">\n                                                    <div onClick={() => this.toggleShowAmendments(categoryIndex)} className=\"toggle-switch\">\n                                                        <input id=\"sr-status-change\" checked={category.showAmendments} type=\"checkbox\" />\n                                                        <span className=\"slider\"></span>\n                                                    </div>\n                                                </div>\n                                            </React.Fragment>\n                                        }\n                                    </div>\n                                    <div className=\"flex-row\" style={{ gap: '10px' }}>\n                                        {\n                                            category.IsLegislationCategory && this.props.organizedBills.find(cat => !cat.DeletionDate && cat.CalendarCategoryTypeID !== category.CalendarCategoryTypeID && cat.IsLegislationCategory && cat.Agendas.find(agenda => agenda.checked)) ?\n                                                <button type=\"button\" className=\"button small-button\" onClick={() => this.switchCategory(categoryIndex)}>Move to Category</button>\n                                                : !category.IsLegislationCategory && category.Agendas.length && category.Agendas.find(a => a.checked) &&\n                                                <React.Fragment>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(false, categoryIndex)}>Exclude Selected</button>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(true, categoryIndex)}>Include Selected</button>\n                                                    </div>\n                                                </React.Fragment>\n                                        }\n                                    </div>\n                                    <div>\n                                        {!this.props.pendingSave && <button type=\"button\" className=\"button small-button\" onClick={() => this.props.toggleCalendarPreview(categoryIndex)} >Preview</button>}\n                                    </div>\n                                    <div>\n                                        {!this.props.pendingSave && category.CalendarCategoryTypeID != 131 && <button type=\"button\" className=\"button small-button\" onClick={() => this.props.togglePortal(this.props.showPortal, category)}>PDF Preview </button>}\n                                    </div>\n                                </div>\n                                {!this.props.hideCategories[categoryIndex] && category.IsLegislationCategory &&\n                                    <div className=\"bill-grid communications-category-grid calendar-category-grid\">\n                                        <div></div>\n                                        <div></div>\n                                        <div>\n                                            <LargeListSelect\n                                                className=\"grid-selector-dropdown\"\n                                                classNamePrefix=\"grid-selector-dropdown\"\n                                                options={this.getCategoryBills(category)}\n                                                onChange={(value) => this.props.changeBillDropdown(categoryIndex, value)}\n                                                value={this.props.selectedBill[categoryIndex]}\n                                                filterOption={(bill, inputValue) => {\n                                                    if (category.Agendas.findIndex(agenda => agenda.LegislationID === bill.value) < 0) {\n                                                        return bill.label.toLowerCase().includes(inputValue.toLowerCase());\n                                                    } else { return false; }\n                                                }}\n                                            />\n                                        </div>\n                                        <div className=\"center\">\n                                            <button\n                                                className=\"button\"\n                                                type=\"button\"\n                                                disabled={!this.props.selectedBill[categoryIndex]}\n                                                onClick={() => this.addBill(categoryIndex)}>\n                                                {billButtonText(categoryIndex)}\n                                            </button>\n                                        </div>\n                                        <div className=\"flex-row four space-around\" style={{ display: 'flex', alignItems: 'center' }}>\n                                            {category.Agendas.length && category.Agendas.find(a => a.checked) ?\n                                                <React.Fragment>\n                                                    <div>\n                                                        <span>Checked Legislation:</span>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(false, categoryIndex)}>Exclude</button>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(true, categoryIndex)}>Include</button>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.moveTo('top', categoryIndex)}>Move to Top</button>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.moveTo('bottom', categoryIndex)}>Move to Bottom</button>\n                                                    </div>\n                                                </React.Fragment>\n                                                : null\n                                            }\n                                        </div>\n                                    </div>\n                                }\n                            </div>\n                            {!this.props.hideCategories[categoryIndex] &&\n                                <div>\n                                    {category.Agendas.map((item, itemIndex) => {\n                                        if (this.props.hideAllNonIncludedBills && !item.IsActive) { return; }\n                                        const showNewIndicator = category.CategoryCode != \"Order\" && category.CalendarCategoryID && !item.AgendaID;\n                                        return (\n                                            <React.Fragment key={`${item.AgendaID}-${itemIndex}`}>\n                                                {isNotHidden(item, category, this.props.committeeList) ?\n                                                    <div className=\"bill-grid communications-category-grid calendar-category-grid\"\n                                                        style={getItemStyle(\n                                                            false,\n                                                            false,\n                                                            item.IsActive\n                                                        )}\n                                                    >\n                                                        <div className=\"dlas-forms\" style={{ padding: \"5px\" }}><input type=\"input\" value={item.Ranking ? item.Ranking : \"\"} onChange={(e) => this.setRanking(categoryIndex, itemIndex, e.target.value)} /></div>\n                                                        <div>\n                                                            <input\n                                                                type=\"checkbox\"\n                                                                className=\"checkbox\"\n                                                                checked={item.checked || ''}\n                                                                onChange={e => this.toggleRow(categoryIndex, itemIndex, e)} />\n                                                        </div>\n                                                        <div className=\"new-container\">\n                                                            {this.props.organizedBills.find(c => c.CalendarCategoryTypeID !== category.CalendarCategoryTypeID && c.Agendas.find(a => a.LegislationNumber === item.LegislationNumber)) &&\n                                                                <React.Fragment>\n                                                                    <i data-tip=\"This legislation exists in multiple categories.\" className={`icon notification calendar-authoring${showNewIndicator ? ' new' : ''}`} />\n                                                                </React.Fragment>\n                                                            }\n                                                            <Link to={`/bill-details/${this.props.sessionCode}/${item.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\" style={!item.IsActive ? { color: 'inherit' } : {}}> {item.LegislationNumber}</Link>\n                                                            {showNewIndicator && <span className='corner-new'>NEW</span>}\n                                                        </div>\n                                                        <div>\n                                                            <span>{this.props.fullCommitteeList.find(x => x.CommitteeID === item.CommitteeID) ? this.props.fullCommitteeList.find(x => x.CommitteeID === item.CommitteeID).Abbreviation + \" - \" + moment(item.CandidateDate).format(\"MM/DD/YYYY\") : category.CategoryCode != \"Order\" && item.CandidateDate && moment(item.CandidateDate).format(\"MM/DD/YYYY\")}</span>\n                                                        </div>\n                                                        <div>\n                                                            <div className=\"flex-row\" style={{ display: 'flex' }}>\n                                                                <div className=\"flex-row flex-vertical-center\" style={{ width: \"100%\", display: \"inline-flex\" }}>\n                                                                    {item.isEditing\n                                                                        ? category.Description !== \"Order of Business\"\n                                                                            ? <Editor\n                                                                                init={{\n                                                                                    inline: true,\n                                                                                    toolbar: false,\n                                                                                    menubar: false\n                                                                                }}\n                                                                                onEditorChange={(content) => this.handleChange(categoryIndex, itemIndex, content, item.LegislationTitle != null)}\n                                                                                value={item.LegislationTitle ? item.LegislationTitle : item.newDescription}\n                                                                            />\n                                                                            : <textarea\n                                                                                onChange={(e) => this.handleChange(categoryIndex, itemIndex, e.target.value, item.LegislationTitle != null)}\n                                                                                value={item.LegislationTitle ? item.LegislationTitle : item.newDescription}\n                                                                            />\n                                                                        :\n                                                                        <React.Fragment>\n                                                                            <span className={this.props.organizedBills && this.props.organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[itemIndex].expandTitle ? \"calendar-leg-title-wrapper expanded\" : \"calendar-leg-title-wrapper\"}>{item.Description === \"Call to Order\" ? \"Call to Order - \" + this.props.calendarTime : renderHTML(!this.props.showTitles && item.LegislationDescription ? item.LegislationDescription : !this.props.showTitles && item.Description ? item.Description : this.props.showTitles && item.LegislationTitle ? item.LegislationTitle : item.Description ? item.Description : \"\")}</span>\n                                                                            {!this.props.showTitles && item.LegislationDescription && item.LegislationDescription.length > 75\n                                                                                ? <a onClick={() => this.expandTitle(categoryIndex, itemIndex)} style={{ cursor: \"pointer\" }}>...</a>\n                                                                                : !this.props.showTitles && item.Description && item.Description.length > 75\n                                                                                    ? <a onClick={() => this.expandTitle(categoryIndex, itemIndex)} style={{ cursor: \"pointer\" }}>...</a>\n                                                                                    : this.props.showTitles && item.LegislationTitle && item.LegislationTitle.length > 75\n                                                                                        ? <a onClick={() => this.expandTitle(categoryIndex, itemIndex)} style={{ cursor: \"pointer\" }}>...</a>\n                                                                                        : item.Description && item.Description.length > 75\n                                                                                            ? <a onClick={() => this.expandTitle(categoryIndex, itemIndex)} style={{ cursor: \"pointer\" }}>...</a>\n                                                                                            : null}\n                                                                        </React.Fragment>\n                                                                    }\n                                                                </div>\n                                                                <React.Fragment>\n                                                                    <div className=\"bill-grid-actions\">\n                                                                        {item.isEditing\n                                                                            ?\n                                                                            <div className=\"bill-grid-actions\" style={{ display: \"inline-flex\" }}>\n                                                                                <button onClick={() => this.saveChange(categoryIndex, itemIndex)} type=\"button\" className=\"icon save float-right\"></button>\n                                                                                <button onClick={() => this.toggleEdit(categoryIndex, itemIndex)} type=\"button\" className=\"icon delete float-right\"></button>\n                                                                            </div>\n                                                                            :\n                                                                            <div className=\"bill-grid-actions\">\n                                                                                {/*Allow edit if it is not the call to order item, the item IsActive, and we are viewing titles OR it is the invocation, pledge, or reading of the journal*/}\n                                                                                {item.Description !== \"Call to Order\" && item.IsActive && (this.props.showTitles || [2, 3, 4, 6, 7, 8].includes(item.CalendarCategoryTemplateID)) &&\n                                                                                    <button onClick={() => this.toggleEdit(categoryIndex, itemIndex)} type=\"button\" className=\"icon edit float-right\"></button>\n                                                                                }\n                                                                            </div>\n                                                                        }\n                                                                        {category.CategoryCode !== \"Order\" && <button onClick={() => this.showAgendaItems(categoryIndex, itemIndex)} className={item.showAgendaItems ? 'arrow-up' : 'arrow-down'} type=\"button\"></button>}\n                                                                    </div>\n                                                                </React.Fragment>\n                                                            </div>\n                                                            {item.showAgendaItems &&\n                                                                <div>\n                                                                    <button type=\"button\" onClick={() => this.toggleAgendaItemEditor(itemIndex, categoryIndex)} className=\"button-link\">Edit Notes</button>\n                                                                    {/* If an item has an LdNumber it's assumed to be an amendment */}\n                                                                    {item.AgendaItems.filter(item => item.Description && item.IsActive && (!item.LDNumber ? true : category.showAmendments || ![98, 102].includes(category.CalendarCategoryTypeID) ? true : false)).map((item, itemIndex) =>\n                                                                        <div key={itemIndex} className=\"programmatic-notes\">\n                                                                            {renderHTML(item.DraftText || item.CalendarDescription || item.Description)}\n                                                                        </div>\n                                                                    )}\n                                                                </div>\n                                                            }\n                                                        </div>\n                                                        <div>\n                                                            <span className={item.IsActive ? \"message-success\" : \"\"}>{item.IsActive ? 'Included' : 'Not Included'}</span>\n                                                        </div>\n                                                        <div className=\"bill-grid-actions\">\n                                                            <div onClick={() => this.toggleBill(categoryIndex, itemIndex)} className=\"toggle-switch\">\n                                                                <input id=\"sr-status-change\" checked={item.IsActive} type=\"checkbox\" />\n                                                                <span className=\"slider\"></span>\n                                                            </div>\n                                                        </div>\n                                                    </div>\n                                                    :\n                                                    null\n                                                }\n                                            </React.Fragment>\n                                        )\n                                    }\n                                    )}\n                                </div>\n                            }\n                        </form>\n                    )}\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default BillsGrid;","export const generateCsv = (columns, rows) => {\n    let doc = \"\";\n    let newLine = \"\\r\\n\";\n\n    doc = columns.join(\",\");\n    doc = doc + newLine;\n\n    for (let i = 0; i < rows.length; i++) {\n        columns.forEach(column => {\n            let col = column.replace(/ /g, \"\");\n            if (rows[i][col] != undefined) {\n                let rowText = rows[i][col].toString().replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n                if (!rowText.startsWith(\"=HYPERLINK(\"))\n                    rowText = rowText.replaceAll('\"', \"'\");\n                rowText = `\\\"${rowText}\\\"`;\n                doc = doc + rowText + \",\";\n            } else {\n                doc = doc + \" \" + \",\";\n            }\n        });\n\n        doc = doc + newLine\n    }\n    return doc\n}","import { publicRequest, partnerRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst voteLinkRequest = \"GET_VOTE_LINK_REQUEST\";\nconst voteLinkSuccess = \"GET_VOTE_LINK_SUCCESS\";\nconst voteLinkFailure = \"GET_VOTE_LINK_FAILURE\";\n\nconst voteDetailsRequest = \"GET_VOTE_DETAILS_REQUEST\";\nconst voteDetailsSuccess = \"GET_VOTE_DETAILS_SUCCESS\";\nconst voteDetailsFailure = \"GET_VOTE_DETAILS_FAILURE\";\n\nconst voteActionListRequest = \"GET_VOTE_ACTION_LIST_REQUEST\";\nconst voteActionListSuccess = \"GET_VOTE_ACTION_LIST_SUCCESS\";\nconst voteActionListFailure = \"GET_VOTE_ACTION_LIST_FAILURE\";\n\nconst voteListSuccess = \"GET_VOTE_LIST_SUCCESS\";\nconst voteListFailure = \"GET_VOTE_LIST_FAILURE\";\n\nconst voteTypesSuccess = \"GET_VOTE_TYPE_SUCCESS\";\nconst voteTypesFailure = \"GET_VOTE_TYPE_FAILURE\";\n\nconst voteSaveSuccess = \"GET_VOTE_SAVE_SUCCESS\";\nconst voteSaveFailure = \"GET_VOTE_SAVE_FAILURE\";\n\nconst voteSaveBulkSuccess = \"GET_VOTE_SAVE_BULK_SUCCESS\";\nconst voteSaveBulkFailure = \"GET_VOTE_SAVE_BULK_FAILURE\";\n\nconst voteFileSuccess = \"GET_VOTE_FILE_GEN_SUCCESS\";\nconst voteFileFailure = \"GET_VOTE_FILE_GEN_FAILURE\";\n\nconst voteSaveMotionSuccess = \"SAVE_VOTE_MOTION_SUCCESS\";\nconst voteSaveMotionFailure = \"SAVE_VOTE_MOTION_FAILURE\";\n\nconst initialState = {\n    voteLinkResponse: [],\n    voteLinkError: '',\n    voteDetailsResponse: [],\n    voteDetailsError: '',\n    voteList: [],\n    voteListError: '',\n    voteTypes: [],\n    voteTypesError: '',\n    voteSave: [],\n    voteSaveError: '',\n    voteSaveBulk: '',\n    voteSaveBulkError: '',\n    voteFile: '',\n    voteFileError: '',\n    voteSaveMotion: '',\n    voteSaveMotionError: '',\n};\n\nexport const voteActionCreators = {\n    // GET VOTE DETAILS\n    requestVoteDetails: () => ({\n        type: voteDetailsRequest,\n        isFetching: true\n    }),\n\n    receiveVoteDetails: (response) => ({\n        type: voteDetailsSuccess,\n        isFetching: false,\n        voteDetailsResponse: response\n    }),\n\n    voteDetailsError: message => ({\n        type: voteDetailsFailure,\n        isFetching: false,\n        voteDetailsError: message\n    }),\n\n    getVoteDetails: (params, partner) => {\n        return dispatch => {\n            dispatch(voteActionCreators.requestVoteDetails());\n\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_VOTE_API_URL) + '/Vote/api/GetPartnerVoteByIdAsync/', 'GET', '', '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_VOTE_API_URL) + '/Vote/api/GetVoteByIdAsync/', 'GET', '', '', params);\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(voteActionCreators.voteDetailsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(voteActionCreators.receiveVoteDetails(result[1].Votes))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(voteActionCreators.voteDetailsError('No Vote Data'))\n                        return Promise.reject('No Vote Data')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // VOTE LINKS CALL\n    requestVoteLink: () => ({\n        type: voteLinkRequest,\n        isFetching: true\n    }),\n\n    receiveVoteLink: (response) => ({\n        type: voteLinkSuccess,\n        isFetching: false,\n        voteLinkResponse: response\n    }),\n\n    voteLinkError: message => ({\n        type: voteLinkFailure,\n        isFetching: false,\n        voteLinkError: message\n    }),\n\n    getVoteLink: (params) => {\n        return dispatch => {\n            dispatch(voteActionCreators.requestVoteLink());\n\n            return publicRequest((API_URL || process.env.REACT_APP_VOTE_API_URL) + '/Vote/api/GetVoteLinksAsync/', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(voteActionCreators.voteLinkError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(voteActionCreators.receiveVoteLink(result[1].VoteLinks))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(voteActionCreators.receiveVoteLink([]))\n                        return Promise.reject('No Content')\n                    }\n                }).catch(err => console.log(err))\n        }\n    },\n\n    // VOTE ACTION LIST CALL\n    requestVoteActionList: () => ({\n        type: voteActionListRequest,\n        isFetching: true\n    }),\n\n    receiveVoteActionList: (response) => ({\n        type: voteActionListSuccess,\n        isFetching: false,\n        voteActionList: response\n    }),\n\n    voteActionListError: message => ({\n        type: voteActionListFailure,\n        isFetching: false,\n        voteActionListError: message\n    }),\n\n    getVoteActionList: (params) => {\n        return dispatch => {\n            dispatch(voteActionCreators.requestVoteActionList());\n\n            return partnerRequest((API_URL || process.env.REACT_APP_VOTE_API_URL) + '/Vote/api/GetVoteActionListAsync/', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(voteActionCreators.voteActionListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(voteActionCreators.receiveVoteActionList(result[1].VoteActions))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(voteActionCreators.receiveVoteActionList([]))\n                        return Promise.reject('No Content')\n                    }\n                }).catch(err => console.log(err))\n        }\n    },\n\n    receiveVoteList: (response) => ({\n        type: voteListSuccess,\n        voteList: response\n    }),\n\n    voteListError: message => ({\n        type: voteListFailure,\n        voteListError: message\n    }),\n\n    getVoteList: (params) => {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_VOTE_API_URL) + '/Vote/api/GetPartnerVoteListAsync/', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(voteActionCreators.voteListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(voteActionCreators.receiveVoteList(result[1].ShallowVotes))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(voteActionCreators.receiveVoteList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveVoteTypes: (response) => ({\n        type: voteTypesSuccess,\n        voteTypes: response\n    }),\n\n    voteTypesError: message => ({\n        type: voteTypesFailure,\n        voteTypesError: message\n    }),\n\n    getVoteTypes: () => {\n        return dispatch => {\n\n            return publicRequest((API_URL || process.env.REACT_APP_VOTE_API_URL) + '/Vote/api/GetVoteTypeReferencesAsync/', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(voteActionCreators.voteTypesError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(voteActionCreators.receiveVoteTypes(result[1].VoteTypes));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(voteActionCreators.voteTypesError('No Content'));\n                        return Promise.reject('No Content');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveVoteSave: (response) => ({\n        type: voteSaveSuccess,\n        voteSave: response\n    }),\n\n    voteSaveError: message => ({\n        type: voteSaveFailure,\n        voteSaveError: message\n    }),\n\n    saveVote: (body) => {\n        return dispatch => {\n\n            return partnerRequest((API_URL || process.env.REACT_APP_VOTE_API_URL) + '/Vote/api/SaveVoteAsync/', 'POST', '', body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(voteActionCreators.voteSaveError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(voteActionCreators.receiveVoteSave(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(voteActionCreators.voteSaveError('No Content'));\n                        return Promise.reject('No Content');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveVoteSaveBulk: (response) => ({\n        type: voteSaveBulkSuccess,\n        voteSaveBulk: response\n    }),\n\n    voteSaveBulkError: message => ({\n        type: voteSaveBulkFailure,\n        voteSaveBulkError: message\n    }),\n\n    saveVoteBulk: (body) => {\n        return dispatch => {\n\n            return partnerRequest((API_URL || process.env.REACT_APP_VOTE_API_URL) + '/Vote/api/PublishVotesAsync/', 'PUT', '', body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(voteActionCreators.voteSaveBulkError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(voteActionCreators.receiveVoteSaveBulk(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(voteActionCreators.voteSaveBulkError('No Content'));\n                        return Promise.reject('No Content');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveVoteFile: (response) => ({\n        type: voteFileSuccess,\n        voteFile: response\n    }),\n\n    voteFileError: message => ({\n        type: voteFileFailure,\n        voteFileError: message\n    }),\n\n    voteFileGen: (params) => {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_VOTE_FILE_GEN_URL) + '/VoteFileGeneration/api/ProcessTallySheetFileAsync/', 'POST', '', '', params, true)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(voteActionCreators.voteFileError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(voteActionCreators.receiveVoteFile(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(voteActionCreators.voteFileError('No Content'));\n                        return Promise.reject('No Content');\n                    }\n                }).catch(err => console.log(err))\n        }\n    },\n\n    receiveVoteSaveMotion: (response) => ({\n        type: voteSaveMotionSuccess,\n        voteSaveMotion: response\n    }),\n\n    voteSaveMotionError: message => ({\n        type: voteSaveMotionFailure,\n        voteSaveMotionError: message\n    }),\n\n    saveVoteMotion: (body) => {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_VOTE_API_URL) + '/Vote/api/VoteMotionSaveAsync/', 'POST', '', body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(voteActionCreators.voteSaveMotionError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(voteActionCreators.receiveVoteSaveMotion(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(voteActionCreators.voteSaveMotionError('No Content'));\n                        return Promise.reject('No Content');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n};\n\nexport const reducer = (state, action) => {\n    state = state || initialState;\n\n    switch (action.type) {\n        case voteDetailsRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case voteDetailsSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                voteDetailsResponse: action.voteDetailsResponse,\n                voteDetailsError: ''\n            });\n        case voteDetailsFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                voteDetailsError: action.voteDetailsError\n            });\n        case voteLinkRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case voteLinkSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                voteLinkResponse: action.voteLinkResponse,\n                voteLinkError: ''\n            });\n        case voteLinkFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                voteLinkError: action.voteLinkError\n            });\n        case voteActionListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case voteActionListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                voteActionList: action.voteActionList,\n                voteActionListError: ''\n            });\n        case voteActionListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                voteActionListError: action.voteActionListError\n            });\n        case voteListSuccess:\n            return Object.assign({}, state, {\n                voteList: action.voteList,\n                voteListError: ''\n            });\n        case voteListFailure:\n            return Object.assign({}, state, {\n                voteListError: action.voteListError\n            });\n        case voteTypesSuccess:\n            return Object.assign({}, state, {\n                voteTypes: action.voteTypes,\n                voteTypesError: ''\n            });\n        case voteTypesFailure:\n            return Object.assign({}, state, {\n                voteTypesError: action.voteTypesError\n            });\n        case voteSaveSuccess:\n            return Object.assign({}, state, {\n                voteSave: action.voteSave,\n                voteSaveError: ''\n            });\n        case voteSaveFailure:\n            return Object.assign({}, state, {\n                voteSaveError: action.voteSaveError\n            });\n        case voteSaveSuccess:\n            return Object.assign({}, state, {\n                voteSaveBulk: action.voteSaveBulk,\n                voteSaveBulkError: ''\n            });\n        case voteSaveFailure:\n            return Object.assign({}, state, {\n                voteSaveBulkError: action.voteSaveBulkError\n            });\n        case voteFileSuccess:\n            return Object.assign({}, state, {\n                voteFile: action.voteFile,\n                voteFileError: ''\n            });\n        case voteFileFailure:\n            return Object.assign({}, state, {\n                voteFileError: action.voteFileError\n            });\n        case voteSaveMotionSuccess:\n            return Object.assign({}, state, {\n                voteSaveMotion: action.voteSaveMotion,\n                voteSaveMotionError: ''\n            });\n        case voteSaveMotionFailure:\n            return Object.assign({}, state, {\n                voteSaveMotionError: action.voteSaveMotionError\n            });\n        default:\n            return state;\n    }\n};\n","import { partnerRequest, publicRequest } from '../services/request.service';\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst patronListRequest = \"GET_PATRON_LIST_REQUEST\";\nconst patronListSuccess = \"GET_PATRON_LIST_SUCCESS\";\nconst patronListFailure = \"GET_PATRON_LIST_FAILURE\";\n\nconst patronRolesSuccess = \"GET_PATRON_ROLES_SUCCESS\"\nconst patronRolesFailure = \"GET_PATRON_ROLES_FAILURE\"\n\nconst patronTypesSuccess = \"GET_PATRON_TYPES_SUCCESS\";\nconst patronTypesFailure = \"GET_PATRON_TYPES_FAILURE\";\n\nconst patronSaveSuccess = \"PATRON_SAVE_SUCCESS\";\nconst patronSaveFailure = \"PATRON_SAVE_FAILURE\";\nconst patronSaveRequest = \"PATRON_SAVE_REQUEST\";\n\nconst initialState = {\n    senatePatronsList: [],\n    housePatronsList: [],\n    chiefPatronsList: [],\n    patronList: [],\n    patronRoles: [],\n    patronRolesError: '',\n    patronTypes: [],\n    patronTypesError: '',\n    patronSaveList: [],\n    patronSaveError: ''\n};\n\nexport const patronActionCreators = {\n    requestPatronList: () => ({\n        type: patronListRequest,\n        isFetching: true\n    }),\n\n    receivePatronList: (housePatrons, senatePatrons, chiefPatrons, patronList) => ({\n        type: patronListSuccess,\n        isFetching: false,\n        senatePatronsList: senatePatrons,\n        housePatronsList: housePatrons,\n        chiefPatronsList: chiefPatrons,\n        patronList: patronList\n    }),\n\n    patronListError: message => ({\n        type: patronListFailure,\n        isFetching: false,\n        message\n    }),\n\n    getPatronList: (params) => {\n        return dispatch => {\n            dispatch(patronActionCreators.requestPatronList());\n\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_PATRON_SERVICE) + '/LegislationPatron/api/GetLegislationPatronsByIdAsync/', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(patronActionCreators.patronsListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        let patrons = result[1];\n                        var housePatrons = [];\n                        var senatePatrons = [];\n                        var chiefPatrons = [];\n                        let patronList = [];\n                        for (var i = 0; i < patrons.Patrons.length; i++) {\n                            if (patrons.Patrons[i].ChamberCode === 'H' && patrons.Patrons[i].DisplayName !== \"(Chief Patron)\") {\n                                housePatrons.push(patrons.Patrons[i])\n                            }\n                            if (patrons.Patrons[i].ChamberCode === 'S' && patrons.Patrons[i].DisplayName !== \"(Chief Patron)\") {\n                                senatePatrons.push(patrons.Patrons[i])\n                            }\n                            if (patrons.Patrons[i].DisplayName === \"(Chief Patron)\") {\n                                chiefPatrons.push(patrons.Patrons[i])\n                            }\n                            patronList.push(patrons.Patrons[i])\n                        }\n\n                        dispatch(patronActionCreators.receivePatronList(housePatrons, senatePatrons, chiefPatrons, patronList))\n                    } else if (result[0] === NO_CONTENT) {\n                        var housePatrons = [];\n                        var senatePatrons = [];\n                        var chiefPatrons = [];\n                        let patronList = [];\n                        dispatch(patronActionCreators.receivePatronList(housePatrons, senatePatrons, chiefPatrons, patronList))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receivePatronRoles: responseObj => ({\n        type: patronRolesSuccess,\n        patronRoles: responseObj\n    }),\n\n    patronRolesError: message => ({\n        type: patronRolesFailure,\n        patronRolesError: message\n    }),\n\n    getPatronRoles: () => {\n        return dispatch => {\n\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_PATRON_SERVICE) + '/LegislationPatron/api/getPatronRoleTypeListAsync/', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(patronActionCreators.patronRolesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(patronActionCreators.receivePatronRoles(result[1].PatronRolesList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(patronActionCreators.patronRolesError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receivePatronTypes: responseObj => ({\n        type: patronTypesSuccess,\n        patronTypes: responseObj\n    }),\n\n    patronTypesError: message => ({\n        type: patronTypesFailure,\n        patronTypesError: message\n    }),\n\n    getPatronTypes: (params) => {\n        return dispatch => {\n\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_PATRON_SERVICE) + '/LegislationPatron/api/GetMemberPatronTypeListAsync/', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(patronActionCreators.patronTypesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(patronActionCreators.receivePatronTypes(result[1].MemberPatronTypes))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(patronActionCreators.patronTypesError([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    requestPatronSave: () => ({\n        type: patronSaveRequest,\n        isFetching: true\n    }),\n\n    receivePatronSave: responseObj => ({\n        type: patronSaveSuccess,\n        isFetching: false,\n        patronSaveList: responseObj\n    }),\n\n    patronSaveError: message => ({\n        type: patronSaveFailure,\n        isFetching: false,\n        patronSaveError: message\n    }),\n\n    savePatrons: (body) => {\n        return dispatch => {\n            dispatch(patronActionCreators.requestPatronSave());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            };\n\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_PATRON_SERVICE) + '/LegislationPatron/api/SaveLegislationPatronAsync/', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(patronActionCreators.patronSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(patronActionCreators.receivePatronSave(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(patronActionCreators.patronSaveError([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    }\n};\n\nexport const reducer = (state, action) => {\n    state = state || initialState;\n\n    switch (action.type) {\n        case patronListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case patronListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                senatePatronsList: action.senatePatronsList,\n                housePatronsList: action.housePatronsList,\n                chiefPatronsList: action.chiefPatronsList,\n                patronList: action.patronList\n            });\n        case patronListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case patronRolesSuccess:\n            return Object.assign({}, state, {\n                patronRoles: action.patronRoles,\n                patronRolesError: ''\n            });\n        case patronRolesFailure:\n            return Object.assign({}, state, {\n                patronRolesError: action.patronRolesError\n            });\n        case patronTypesSuccess:\n            return Object.assign({}, state, {\n                patronTypes: action.patronTypes,\n                patronTypesError: ''\n            });\n        case patronTypesFailure:\n            return Object.assign({}, state, {\n                patronTypesError: action.patronTypesError\n            });\n        case patronSaveSuccess:\n            return Object.assign({}, state, {\n                patronSave: action.patronSave,\n                patronSaveList: action.patronSaveList,\n                patronTypesError: ''\n            });\n        case patronSaveFailure:\n            return Object.assign({}, state, {\n                patronSaveError: action.patronSaveError\n            });\n\n        default:\n            return state;\n    }\n};\n","import React, { useState } from 'react';\nimport { Link, withRouter } from 'react-router-dom';\nimport renderHTML from 'react-render-html';\nimport ReactTooltip from 'react-tooltip';\n\nconst VERSION_AUTHOR = \"LegislationText\";\n\nfunction VersionData(props) {\n    const [showText, toggleText] = useState(false);\n    let impactFileUrls = [];\n    let pdfLink = '';\n\n    if (props.ImpactFile && props.ImpactFile.length > 0) {\n        for (let i = 0; i < props.ImpactFile.length; i++) {\n            impactFileUrls.push({\n                url: props.ImpactFile[i].FileURL,\n                description: props.ImpactFile[i].Description ? props.ImpactFile[i].Description.substr(0, props.ImpactFile[i].Description.indexOf(\"(\")) : \"Impact statement\"\n            });\n        }\n    }\n\n    if (props.PDFFile && props.PDFFile.length > 0) {\n        pdfLink = <a href={props.PDFFile[0].FileURL} target=\"_blank\" className=\"link-pdf\">PDF</a>\n    }\n    let descriptionAndDisposition = props.Description + (props.pushWithKeywords ? \" \" + props.DocumentCode : \"\");\n    let substituteLdAndDocCodeString = \"\";\n    // add (LD#-DocCodeSuffix) to the description (if not already there) if it is a substitute and does not have 'C' in the document code\n    if (props.LegislationVersion === \"Substitute\" && props.LDNumber && !props.Description.includes(props.LDNumber.replace(\"D\", \"\")) && props.DocumentCode && !props.DocumentCode.includes('C')) {\n        const subDocCodeRegex = /[HS](?:.(?![HS]))+$/; //matches the last H/S in the string and everything after (e.g. H13 from HB202H13)\n        substituteLdAndDocCodeString = \" (\" + props.LDNumber + \"-\" + props.DocumentCode.match(subDocCodeRegex) + \")\";\n    }\n    // Versions that are held should not be linked to except for certain signed in users\n    // Also the text disposition is hidden because they don't want public users to see that it is held\n    // We do not need to worry about adding the 'keyword-hit-list' class if props.pushWithKeywords is true (like we do for other dispositions) since 'Hold' versions shouldn't be returned in the keyword search results\n    if (props.TextDisposition === \"Hold\") {\n        return (<div className=\"bill-details-versions-grid-container\">\n            <div className={`bill-details-versions-grid${!props.IsPublic ? ' not-public' : ''}`}>\n                {/* Previously date */}\n                <div>{props.ChamberCode && props.ChamberCode !== \"\" ? props.ChamberCode === \"H\" ? \"House\" : \"Senate\" : props.Sponsor}</div>\n                <div>{props.userClaims.resources.find(resource => resource === VERSION_AUTHOR) ? <Link to={`/bill-details/${props.SessionCode || props.sessionCode}/${props.LegislationNumber}/text/${props.DocumentCode}`}>{props.Description}{substituteLdAndDocCodeString} (On Hold)</Link> : `${props.Description}`}</div>\n            </div>\n        </div>);\n    } else if (props.TextDisposition !== \"Posted\") {\n        descriptionAndDisposition = props.Description + \" \" +\n            (props.TextDisposition &&\n                (props.TextDisposition !== \"Offered\" || props.ChamberCode !== \"S\")\n                && ((props.LegislationVersion !== \"Substitute\" || props.TextDisposition === \"Adopted\" || props.ChamberCode === props.LegislationNumber.charAt(0))\n                    || (props.LegislationVersion === \"Substitute\" && props.ChamberCode !== props.LegislationNumber.charAt(0) && props.TextDisposition === \"Not Adopted\"))\n                ? props.TextDisposition\n                : '') + \" \"\n            + (substituteLdAndDocCodeString != \"\"\n                ? substituteLdAndDocCodeString\n                : props.pushWithKeywords\n                    ? props.DocumentCode\n                    : props.TextDisposition === \"Offered\"\n                        ? \"Offered\"\n                        : \"\");\n\n        //Bandaid over offered not always appear but also sometimes appearing twice\n        descriptionAndDisposition = descriptionAndDisposition.substring(descriptionAndDisposition.length - 15, descriptionAndDisposition.length) === \"Offered Offered\" ? descriptionAndDisposition.substring(0, descriptionAndDisposition.length - 8) : descriptionAndDisposition\n    }\n    //If the IsReprint boolean is true and the service didn't append Reprint to the description already\n    if (props.IsReprint && !descriptionAndDisposition.includes(\"(Reprint)\")) {\n        descriptionAndDisposition = descriptionAndDisposition + \" (Reprint)\";\n    }\n\n    return (\n        <React.Fragment>\n            <div className={showText && props.LegislationVersion && props.LegislationVersion.includes(\"Amendment\") ? \"bill-details-versions-grid-container no-border\" : \"bill-details-versions-grid-container\"}>\n                {/* This is a grid instead of a table because displaying the draft text messes up the alignment of tables */}\n                <div className={(props.pushWithKeywords\n                    ? \"bill-details-versions-grid keyword-hit-list\"\n                    : \"bill-details-versions-grid\" + (!props.IsPublic ? \" not-public\" : \"\"))\n                }>\n                    {/* Previously date */}\n                    <div>{props.Sponsor === \"Governor\" ? \"Governor\" : props.ChamberCode && props.ChamberCode !== \"\" ? props.ChamberCode === \"H\" ? \"House\" : \"Senate\" : props.Sponsor}</div>\n                    <div className={props.pushWithKeywords && \"double-version-links\"}>\n                        {props.editing == false || props.editing == undefined\n                            ? <React.Fragment>\n                                {props.pushWithKeywords || props.legislationClass === \"Budget\"\n                                    ? <span>{descriptionAndDisposition}</span>\n                                    : <Link to={`/bill-details/${props.SessionCode || props.sessionCode}/${props.LegislationNumber\n                                        ? props.LegislationNumber\n                                        : props.legislationNumber}/text/${props.DocumentCode}`}>{descriptionAndDisposition}</Link>\n                                }\n                                {props.userClaims && props.userClaims.roles && props.userClaims.roles.find(x => x === \"DLASStaff\") && <button className='icon edit' onClick={() => { props.handleToggleDescriptionEdit(props.index) }} />}\n                            </React.Fragment>\n                            : <React.Fragment>\n                                <input value={props.tempDescription} onChange={(e) => props.handleDescriptionChange(e.target.value, props.index)} />\n                                <span>{(props.TextDisposition && (props.TextDisposition !== \"Offered\" || props.ChamberCode !== \"S\") && (props.LegislationVersion !== \"Substitute\" || props.TextDisposition === \"Adopted\" || props.ChamberCode === props.LegislationNumber.charAt(0)) ? descriptionAndDisposition.includes(props.TextDisposition) && props.TextDisposition : '')}</span>\n                                <a className=\"icon save\" onClick={() => props.saveDescription(props.index)}></a>\n                                <a className=\"icon delete\" onClick={() => { props.handleToggleDescriptionEdit(props.index) }}></a>\n                            </React.Fragment>}\n                        {props.pushWithKeywords && <a style={{ zIndex: 2 }} onClick={() => props.pushWithKeywords(props.SessionCode || props.sessionCode, props.legislationNumber, props.DocumentCode)}>View Keyword Hits {props.countMatches === 'LOADING' ? <div aria-label=\"Loading\" className=\"small-spinner\" /> : props.countMatches > 0 ? \"(\" + props.countMatches + \")\" : ''}</a>}\n                        {!props.IsPublic && !props.pushWithKeywords &&\n                            <React.Fragment>\n                                <i data-tip=\"This version has not been published and is not visible to the public.\" className={'icon notification unpublished-version'} />\n                                <ReactTooltip />\n                            </React.Fragment>}\n                    </div>\n                    <div>{impactFileUrls[0] != undefined ? <a type=\"button\" href=\"javascript:void(0)\" onClick={() => toggleText(!showText)}>{impactFileUrls.length > 1 ? \"Impact Statements\" : \"Impact Statement\"}</a> : null}</div>\n                    <div>{props.LinkFile && props.LinkFile.length > 0 ? <a href={props.LinkFile[0].FileURL} target=\"_blank\" className=\"link-new-tab\">Link</a> : null}</div>\n                    <div>{pdfLink ? pdfLink : null}</div>\n                    <div>{props.userClaims && props.userClaims.roles && props.userClaims.roles.find(x => x === \"ImpactStatementAuthor\") && props.toggleStatementForm ? <div><a type=\"button\" className=\"button-link icon add impact-statement\" onClick={() => props.toggleStatementForm((props.VersionDate ? props.VersionDate : props.DraftDate), descriptionAndDisposition, props.DocumentCode)}>IS</a></div> : null}</div>\n                    <div style={{ textAlign: 'right' }}>{((props.LegislationVersion && props.LegislationVersion.includes(\"Amendment\")) || impactFileUrls.length) ? <button aria-expanded={showText} type=\"button\" className={showText ? \"arrow-up\" : \"arrow-down\"} onClick={() => toggleText(!showText)}>Show amendment text and/or impact statement(s)</button> : null}</div>\n                </div>\n                {showText && impactFileUrls.length ?\n                    <div>\n                        {impactFileUrls.map((file, idx) => {\n                            return (\n                                <div key={idx} className=\"impact-statements-grid\">\n                                    <div />\n                                    <div>\n                                        <a href={file.url} target=\"_blank\" className=\"link-pdf\">{file.description}</a>\n                                    </div>\n                                    <br />\n                                </div>\n                            )\n                        })\n                        }\n                    </div>\n                    :\n                    null\n                }\n            </div>\n            {showText && props.LegislationVersion && props.LegislationVersion.includes(\"Amendment\") &&\n                <div className=\"amendment-text\" style={{ paddingBottom: \"10px\", borderBottom: \"1px solid #d9dddd\" }}>\n                    {renderHTML(props.DraftText || '')}\n                </div>\n            }\n        </React.Fragment>\n    )\n}\n\nclass VersionList extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.pushWithKeywords = this.pushWithKeywords.bind(this);\n        this.toggleStatementForm = this.toggleStatementForm.bind(this);\n        this.handleToggleDescriptionEdit = this.handleToggleDescriptionEdit.bind(this);\n        this.handleDescriptionChange = this.handleDescriptionChange.bind(this);\n        this.saveDescription = this.saveDescription.bind(this);\n    }\n\n    pushWithKeywords(sessionCode, legislationNumber, documentCode) {\n        const keywordExpression = this.props.selectedKeywords;\n        if (keywordExpression) {\n            const partsRegex = /(\\().*?(\\)+)|(\").*?(\"+)|(').*?('+)|['a-zA-Z*]*/g;\n            const keywordParts = keywordExpression.match(partsRegex);\n            let foundAnOperator = false;\n            for (const keywordPart of keywordParts) {\n                if (keywordPart && (keywordPart.toLowerCase() === \"and\" || keywordPart.toLowerCase() === \"or\")) { foundAnOperator = true; break; }\n            }\n\n            let sanitizedKeywords = [];\n            var chars = { \"(\": \"\", \")\": \"\", '\"': \"\" };\n            if (!foundAnOperator) {\n                //need to behave like API to keep it consistent:\n                //per API, no operators so just clean expression from single quote operators and treat it as single keyword\n                let phraseToInsert = keywordExpression.replace(/[()\"]/g, m => chars[m]);\n                if (phraseToInsert.startsWith(\"'\") && phraseToInsert.endsWith(\"'\")) { phraseToInsert = phraseToInsert.substr(1, phraseToInsert.length - 2) }\n                if (phraseToInsert) { sanitizedKeywords.push(phraseToInsert); }\n            } else {\n                for (const keywordPart of keywordParts) {\n                    if (keywordPart && keywordPart.toLowerCase() != \"and\" && keywordPart.toLowerCase() != \"or\") {\n                        let wordToInsert = keywordPart.replace(/[()\"]/g, m => chars[m]);\n                        if (wordToInsert.startsWith(\"'\") && wordToInsert.endsWith(\"'\")) { wordToInsert = wordToInsert.substr(1, wordToInsert.length - 2) }\n                        if (wordToInsert) { sanitizedKeywords.push(wordToInsert); }\n                    }\n                }\n            }\n\n            this.props.history.push({\n                pathname: `/bill-details/${sessionCode}/${legislationNumber}/text/${documentCode}`,\n                state: { selectedKeywords: sanitizedKeywords }\n            })\n        }\n    }\n\n    toggleStatementForm(statementDate, statementDescription, documentCode) {\n        this.props.toggleStatementForm(statementDate, statementDescription, documentCode)\n    }\n\n    handleToggleDescriptionEdit(index) {\n        this.props.handleToggleDescriptionEdit(index);\n    }\n\n    handleDescriptionChange(value, index) {\n        this.props.handleDescriptionChange(value, index);\n    }\n\n    saveDescription(index) {\n        this.props.saveDescription(index);\n    }\n\n    render() {\n        const { version, userClaims, selectedKeywords, sessionCode } = this.props;\n        return (\n            version.map((version, i) => {\n                return (selectedKeywords\n                    ? <VersionData key={i} index={i} {...version} userClaims={userClaims} descriptionEditable={this.props.descriptionEditable} handleDescriptionChange={this.handleDescriptionChange} handleToggleDescriptionEdit={this.handleToggleDescriptionEdit} saveDescription={this.saveDescription} history={this.props.history} pushWithKeywords={this.pushWithKeywords} legislationNumber={this.props.legislationNumber} toggleStatementForm={this.toggleStatementForm} sessionCode={sessionCode} />\n                    : <VersionData key={i} index={i} {...version} userClaims={userClaims} descriptionEditable={this.props.descriptionEditable} handleDescriptionChange={this.handleDescriptionChange} handleToggleDescriptionEdit={this.handleToggleDescriptionEdit} saveDescription={this.saveDescription} history={this.props.history} toggleStatementForm={this.toggleStatementForm} legislationClass={this.props.legislationClass} sessionCode={sessionCode} />\n                )\n            })\n        )\n    }\n}\n\nexport default withRouter(VersionList);","import { bindActionCreators } from 'redux';\nimport { partnerRequest, publicRequest } from '../services/request.service';\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst reportTypesSuccess = \"REPORT_TYPES_SUCCESS\";\nconst reportTypesFailure = \"REPORT_TYPES_FAILURE\";\n\nconst reportSuccess = \"GET_REPORT_SUCCESS\";\nconst reportFailure = \"GET_REPORT_FAILURE\";\n\nconst billReportInformationSuccess = \"BILL_REPORT_INFORMATION_SUCCESS\";\nconst billReportInformationFailure = \"BILL_REPORT_INFORMATION_FAILURE\";\n\nconst shareReportRequest = \"SHARE_REPORT_REQUEST\";\n\nconst initialState = {\n    reportTypes: [],\n    reportTypesError: '',\n    report: [],\n    reportError: '',\n    shareReport: '',\n    billReportInformation: [],\n    billReportInformationError: ''\n};\n\nexport const reportActionCreators = {\n\n    receiveReportTypes: res => ({\n        type: reportTypesSuccess,\n        reportTypes: res,\n    }),\n\n    reportTypesError: message => ({\n        type: reportTypesFailure,\n        reportTypesError: message,\n    }),\n\n    getReportTypes: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_REPORT_FILE_GEN_SERVICE) + '/ReportFileGeneration/api/GetPartnerReportListAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(reportActionCreators.reportTypesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(reportActionCreators.receiveReportTypes(result[1].Reports))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(reportActionCreators.receiveReportTypes([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveReport: res => ({\n        type: reportSuccess,\n        report: res,\n    }),\n\n    reportError: message => ({\n        type: reportFailure,\n        reportError: message,\n    }),\n\n    getReport: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_REPORT_FILE_GEN_SERVICE) + '/ReportFileGeneration/api/GetPartnerReportDataAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(reportActionCreators.reportError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(reportActionCreators.receiveReport(result[1].ReportDataList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(reportActionCreators.reportError('No Data Found'));\n                        return Promise.reject('No Data Found');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveBillReportInformation: res => ({\n        type: billReportInformationSuccess,\n        billReportInformation: res,\n    }),\n\n    billReportInformationError: message => ({\n        type: billReportInformationFailure,\n        billReportInformationError: message,\n    }),\n\n    getBillReportInformation: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_REPORT_FILE_GEN_SERVICE) + '/ReportFileGeneration/api/GetReportInformation', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(reportActionCreators.billReportInformationError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(reportActionCreators.receiveBillReportInformation(result[1].StronglyTypedObject));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(reportActionCreators.billReportInformationError('No Data Found'));\n                        return Promise.reject('No Data Found');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    saveBillReportInformation: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_REPORT_FILE_GEN_SERVICE) + '/ReportFileGeneration/api/SaveReportInformation', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(reportActionCreators.billReportInformationError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(reportActionCreators.receiveBillReportInformation(result[1].StronglyTypedObject));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(reportActionCreators.billReportInformationError('No Data Found'));\n                        return Promise.reject('No Data Found');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    shareReport: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_NOTIFICATIONS_API_URL) + '/Notification/api/ShareReportAsync', 'POST', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch({\n                            type: shareReportRequest,\n                            shareReportError: result[1],\n                        })\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch({\n                            type: shareReportRequest,\n                            shareReport: result[1],\n                        })\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch({\n                            type: shareReportRequest,\n                            shareReportError: \"No data returned\",\n                        })\n                        return Promise.reject('No Data Found');\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n};\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n\n    switch (action.type) {\n        case reportTypesSuccess:\n            return Object.assign({}, state, {\n                reportTypes: action.reportTypes,\n                reportTypesError: ''\n            })\n        case reportTypesFailure:\n            return Object.assign({}, state, {\n                reportTypesError: action.reportTypesError\n            })\n        case reportSuccess:\n            return Object.assign({}, state, {\n                report: action.report,\n                reportError: ''\n            })\n        case reportFailure:\n            return Object.assign({}, state, {\n                reportError: action.reportError\n            })\n        case billReportInformationSuccess:\n            return Object.assign({}, state, {\n                billReportInformation: action.billReportInformation,\n                billReportInformationError: ''\n            })\n        case billReportInformationFailure:\n            return Object.assign({}, state, {\n                billReportInformationError: action.billReportInformationError\n            })\n        case shareReportRequest:\n            return Object.assign({}, state, {\n                shareReport: action.shareReport || state.shareReport,\n                shareReportError: action.shareReportError || ''\n            })\n        default:\n            return state;\n    }\n};","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { reportActionCreators } from \"../../../stores/lis-report-store\";\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\nconst BILL_COLLECTION_AUTHOR = \"LegislationCollections\";\n\nclass ReportMaker extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            creating: false,\n            showCatchline: false,\n            showCurrentStatus: false,\n            showTitle: false,\n            showChiefPatron: false,\n            showAllPatrons: false,\n            showSummary: false,\n            showNotes: false,\n            selectedNotes: props.selectedCollection && this.props.selectedCollection.Name && this.props.selectedCollection.WatchListID ? 'current' : 'all',\n            showHistory: false,\n            showHouseAmendments: false,\n            showSenateAmendments: false,\n            showConferenceAmendments: false,\n            showGovernorsRecommendations: false,\n            personalMessage: '',\n            showStatus: {},\n            showCommitteeEvent: {},\n            showAllBills: false,\n            showClerkNames: false,\n            showDlsStaffNames: false,\n            showLdNumber: false,\n            startRange: '',\n            endRange: '',\n            rangeError: false,\n            DLS_STAFF: this.props.login && this.props.login.userClaims && this.props.login.userClaims.claims && this.props.login.userClaims.claims.find(c => c.RoleName === 'BDSDrafter')\n        };\n        this.handleInputChange = this.handleInputChange.bind(this);\n        this.getReportUrl = this.getReportUrl.bind(this);\n        this.toggleShowBills = this.toggleShowBills.bind(this);\n        this.checkParams = this.checkParams.bind(this);\n        this.generateBillList = this.generateBillList.bind(this);\n        this.selectAll = this.selectAll.bind(this);\n    }\n\n    handleInputChange(key, val) {\n        if (key === 'showHistory' && val && !val.all && (!val.recent || val.mostRecentAmount === '' || val.mostRecentAmount < 2)) {\n            val.showVotes = false;\n        }\n        if (['startRange', 'endRange'].includes(key)) {\n            val = val.replace(/[^a-zA-Z0-9]/, \"\");\n        }\n        this.setState({\n            [key]: val,\n            rangeError: false\n        });\n    }\n\n    getReportUrl(newWindow) {\n        const billList = this.generateBillList();\n        if (billList && billList.length === 0) {\n            this.setState({\n                rangeError: true\n            });\n        } else {\n            this.setState({ creating: true }, () => {\n                const jsonData = JSON.stringify({\n                    showCatchline: this.state.showCatchline,\n                    showCurrentStatus: this.state.showCurrentStatus,\n                    showTitle: this.state.showTitle,\n                    showChiefPatron: this.state.showChiefPatron,\n                    showAllPatrons: this.state.showAllPatrons,\n                    showSummary: this.state.showSummary,\n                    showNotes: this.state.showNotes,\n                    userCreated: this.props.login.userProfile.email || '',\n                    selectedNotes: this.state.selectedNotes,\n                    selectedCollection: this.props.selectedCollection && this.props.selectedCollection.Name && this.props.selectedCollection.WatchListID ? this.props.selectedCollection.WatchListID : '',\n                    reportTitle: this.props.reportTitle || '',\n                    showHistory: this.state.showHistory,\n                    showHouseAmendments: this.state.showHouseAmendments,\n                    showSenateAmendments: this.state.showSenateAmendments,\n                    showConferenceAmendments: this.state.showConferenceAmendments,\n                    showGovernorsRecommendations: this.state.showGovernorsRecommendations,\n                    showStatus: this.state.showStatus,\n                    showCommitteeEvent: this.state.showCommitteeEvent,\n                    showLdNumber: this.state.showLdNumber,\n                    showClerkNames: this.state.showClerkNames,\n                    showDlsStaffNames: this.state.showDlsStaffNames,\n                    personalMessage: this.state.personalMessage,\n                    billList: billList\n                });\n                this.props.actions.saveBillReportInformation(window.btoa(jsonData)).then(() => {\n                    const billReportInformation = this.props.report.billReportInformation;\n                    if (billReportInformation && billReportInformation.ReportNumber) {\n                        newWindow.location = '/bill-search-report/' + billReportInformation.ReportNumber;\n                    } else {\n                        this.props.actions.makeToast([{ message: \"Report Failed\", type: \"failure\" }]);\n                        newWindow?.close();\n                    }\n                    this.setState({ creating: false })\n                }).catch(err => {\n                    newWindow?.close();\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err)\n                    this.props.actions.makeToast([{ message: \"Report Failed\", type: \"failure\" }]);\n                    this.setState({\n                        creating: false\n                    });\n                })\n            })\n        }\n    }\n\n    toggleShowBills() {\n        this.setState({\n            showAllBills: !this.state.showAllBills\n        })\n    }\n\n    checkParams() {\n        for (const x in this.state) {\n            if (typeof this.state[x] === \"object\") {\n                for (const y in this.state[x]) {\n                    if (this.state[x][y] === true)\n                        return false;\n                }\n            } else if (this.state[x] === true && x !== \"showAllBills\") {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    //Report bill range differs slightly from the bill search range functionality as it allows more advanced cross-chamber/cross-type searching.\n    //Order is HB, HJ, HR, SB, SJ, SR.\n    //If only one field is entered, it is ignored.\n    //If list is empty, it displays an error.\n    generateBillList() {\n        const startType = this.state.startRange.substring(0, 2).toUpperCase(), endType = this.state.endRange.substring(0, 2).toUpperCase();\n        const typeFilled = startType === '' || endType === '';\n        const startRange = parseInt(this.state.startRange.substring(2), 10);\n        const endRange = parseInt(this.state.endRange.substring(2), 10);\n\n        //return empty array if startType is alphabetically greater than endType (e.g. startType === SB, endType === HB)\n        if (startType.localeCompare(endType) === 1) {\n            return [];\n        }\n\n        return this.props.billList ? this.props.billList.filter(bill => {\n            const number = parseInt(bill.LegislationNumber.substring(2), 10), type = bill.LegislationNumber.substring(0, 2);\n            return typeFilled ? true :\n                //return true IF\n                //startType (e.g. HB) === type (e.g. HB) && number (e.g. 123) >= startRange (e.g. 123) \n                //OR type (e.g. SB) is alphabetically greater than startType (e.g. HB) && either endType (e.g. SR) !== type (e.g. SB) or number (e.g 123) <= endRange (e.g. 123)\n                ((startType === type && number >= startRange) || (type.localeCompare(startType) === 1 && type.localeCompare(endType) < 1 && (endType !== type || number <= endRange)))\n                //AND either endType (e.g. SR) !== type (e.g. HB) or number (e.g. 123) <= endRange (e.g. 123)\n                && (endType !== type || number <= endRange)\n        }).map(bill => ({\n            LegislationNumber: bill.LegislationNumber,\n            SessionID: bill.SessionID\n        })) : []\n    }\n\n    selectAll() {\n        this.setState({\n            showCatchline: true,\n            showCurrentStatus: true,\n            showTitle: true,\n            showChiefPatron: true,\n            showAllPatrons: true,\n            showSummary: true,\n            showNotes: true,\n            showHistory: {\n                all: true,\n                recent: false,\n                mostRecentAmount: 5,\n                showVotes: true,\n                Committee: false,\n                Subcommittee: false\n            },\n            showHouseAmendments: true,\n            showSenateAmendments: true,\n            showConferenceAmendments: true,\n            showGovernorsRecommendations: true,\n            showStatus: {\n                showPassedHouse: true,\n                showPassedSenate: true,\n                showPassed: true,\n                showApproved: true,\n                showVetoed: true,\n                showContinued: true,\n                showFailed: true,\n                showEmergency: true\n            },\n            showCommitteeEvent: {\n                showFirstHouseCommittee: true,\n                showFirstSenateCommittee: true,\n                showLastHouseSubcommittee: true,\n                showLastSenateSubcommittee: true\n            },\n            showAllBills: true,\n            selectedNotes: \"all\"\n        })\n    }\n\n    render() {\n        const { showCatchline, showCurrentStatus, showTitle, showChiefPatron, showAllPatrons, showSummary, showNotes, selectedNotes, showHistory, showHouseAmendments, showSenateAmendments, showConferenceAmendments, showGovernorsRecommendations, showStatus, showCommitteeEvent, rangeError, showLdNumber, showClerkNames, showDlsStaffNames, DLS_STAFF } = this.state;\n        return (<div onClick={() => this.props.toggleReportMaker(this.props.autoReport)} className=\"overlay center-content\">\n            <div className=\"full\" style={{ maxHeight: '100%' }}>\n                <div onClick={e => e.stopPropagation()} className=\"report-maker dlas-forms user-forms advanced-search overlay-content animated-fade-in-up\">\n                    <div onClick={() => this.props.toggleReportMaker(this.props.autoReport)} className=\"close-cross\">\n                        <span>x</span>\n                    </div>\n                    <div>\n                        <h3><b>Create Report</b>{this.props.selectedCollection.Name ? <span> | {this.props.selectedCollection.Name}</span> : \"\"}</h3>\n                    </div>\n                    <div className=\"inner-grid two-col-sidebar-tiny\">\n                        {this.props.billList && this.props.billList.length > 25\n                            ?\n                            <React.Fragment>\n                                {this.state.showAllBills\n                                    ?\n                                    <React.Fragment>\n                                        <p className=\"small-text\">{this.props.billList && this.props.billList.map((bill, billIndex) =>\n                                            <React.Fragment key={billIndex}>{billIndex !== 0 && `, `}{bill.LegislationNumber}</React.Fragment>\n                                        )}</p>\n                                        <button className=\"arrow-up\" onClick={this.toggleShowBills} />\n                                    </React.Fragment>\n                                    :\n                                    <React.Fragment>\n                                        <p className=\"small-text\">{this.props.billList && this.props.billList.map((bill, billIndex) => {\n                                            if (billIndex < 24) {\n                                                return (\n                                                    <React.Fragment key={billIndex}>{billIndex !== 0 && `, `}{bill.LegislationNumber}</React.Fragment>\n                                                )\n                                            } else if (billIndex == 25) {\n                                                return (\n                                                    <React.Fragment key={billIndex}>, {bill.LegislationNumber}...</React.Fragment>\n                                                )\n                                            }\n                                        })}</p>\n                                        <button className=\"arrow-down\" onClick={this.toggleShowBills} />\n                                    </React.Fragment>\n                                }\n                            </React.Fragment>\n                            :\n                            <p className=\"small-text\">{this.props.billList && this.props.billList.map((bill, billIndex) =>\n                                <React.Fragment key={billIndex}>{billIndex !== 0 && `, `}{bill.LegislationNumber}</React.Fragment>\n                            )}</p>\n                        }\n                    </div>\n                    <div className={`inner-grid ${DLS_STAFF ? 'four' : 'three'}`}>\n                        <div>\n                            <div className=\"checkbox-container\">\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange(\"showCatchline\", !showCatchline)}>\n                                        <input id=\"report-catchline\" checked={showCatchline} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-catchline\" className=\"checkbox-label no-background\">Catch line</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange(\"showCurrentStatus\", !showCurrentStatus)}>\n                                        <input id=\"report-current-status\" checked={showCurrentStatus} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-current-status\" className=\"checkbox-label no-background\">Current Status</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange(\"showSummary\", !showSummary)}>\n                                        <input id=\"report-summary\" checked={showSummary} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-summary\" className=\"checkbox-label no-background\">Summary</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange(\"showTitle\", !showTitle)}>\n                                        <input id=\"report-title\" checked={showTitle} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-title\" className=\"checkbox-label no-background\">Title</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange(\"showChiefPatron\", !showChiefPatron)}>\n                                        <input id=\"report-patrons\" checked={showChiefPatron} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-patrons\" className=\"checkbox-label no-background\">Chief Patron</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange(\"showAllPatrons\", !showAllPatrons)}>\n                                        <input id=\"report-patrons\" checked={showAllPatrons} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-patrons\" className=\"checkbox-label no-background\">All Patrons</label>\n                                </div>\n                            </div>\n                            <div className=\"checkbox-container\">\n                                <div style={{ padding: \"10px\", display: \"inline-flex\", width: \"100%\" }}>\n                                    <label htmlFor=\"report-personal-message\" className=\"label\">Personal Message</label>\n                                    <textarea id=\"report-personal-message\" onChange={e => this.handleInputChange(\"personalMessage\", e.target.value)} type=\"text\" />\n                                </div>\n                            </div>\n                            <div className='checkbox-container' style={{ padding: \"10px\" }}>\n                                <div className=\"inner-grid two\" style={{ gridGap: \"10px\" }}>\n                                    <div className=\"inner-grid two\" style={{ gridGap: \"0\" }}>\n                                        <label style={{ padding: \"0\", marginRight: \"15px\" }} htmlFor=\"report-start-range\" className=\"label report-range-start-label\">Select From Bill #</label>\n                                        <input id=\"report-start-range\" onChange={e => this.handleInputChange(\"startRange\", e.target.value)} type=\"text\" value={this.state.startRange} className=\"report-range-input\" />\n                                    </div>\n                                    <div className=\"inner-grid two\" style={{ gridGap: \"0\" }}>\n                                        <label style={{ padding: \"0\" }} htmlFor=\"report-end-range\" className=\"label report-range-end-label\">&nbsp;Through Bill #</label>\n                                        <input id=\"report-end-range\" onChange={e => this.handleInputChange(\"endRange\", e.target.value)} type=\"text\" value={this.state.endRange} className=\"report-range-input\" />\n                                    </div>\n                                </div>\n                                {rangeError && <span className=\"input-feedback\">No bills within this range</span>}\n                            </div>\n                        </div>\n                        <div>\n                            <div className=\"checkbox-container\">\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange(\"showHistory\", showHistory === false ? { all: false, recent: false, mostRecentAmount: 5, showVotes: false, Committee: false, Subcommittee: false } : false)}>\n                                        <input id=\"report-history\" checked={showHistory} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-history\" className=\"checkbox-label no-background\">Bill History</label>\n                                </div>\n                                <div style={{ marginLeft: '10px' }}>\n                                    <div className=\"checkbox checkbox-group\">\n                                        <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                            <div className=\"toggle-switch\" disabled={!showHistory} onClick={() => this.handleInputChange(\"showHistory\", { ...showHistory, all: !showHistory.all, recent: false })}>\n                                                <input id=\"report-history-type-all\" checked={showHistory.all} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                <span className=\"slider\"></span>\n                                            </div>\n                                            <label htmlFor=\"report-history-type-all\" className={`checkbox-label no-background${showHistory ? \"\" : \" txt-greyed\"}`}>All Events{showHistory.all && \"*\"}</label>\n                                        </div>\n                                    </div>\n                                    <div className=\"checkbox checkbox-group\">\n                                        <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                            <div className=\"toggle-switch\" disabled={!showHistory} onClick={() => this.handleInputChange(\"showHistory\", { ...showHistory, recent: !showHistory.recent, all: false })}>\n                                                <input id=\"report-history-type-recent\" checked={showHistory.recent} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                <span className=\"slider\"></span>\n                                            </div>\n                                            <label className=\"screen-reader-only\" htmlFor=\"report-history-type-recent-amount\">Most recent amount</label>\n                                            <label htmlFor=\"report-history-type-recent\" className={`checkbox-label no-background${showHistory ? \"\" : \" txt-greyed\"}`}>                                        <input\n                                                id=\"report-history-type-recent-amount\"\n                                                type=\"text\"\n                                                className=\"label-input\"\n                                                disabled={!showHistory.recent}\n                                                value={showHistory.mostRecentAmount}\n                                                onChange={(e) => {\n                                                    const val = e.target.value;\n                                                    if (val === '' || /[^0-9]/.test(val) === false) {\n                                                        this.handleInputChange(\"showHistory\", { ...showHistory, mostRecentAmount: val });\n                                                    }\n                                                }} />\n                                                Last Events{showHistory.recent && showHistory.mostRecentAmount > 1 && \"*\"}</label>\n                                        </div>\n                                    </div>\n                                    <div className=\"checkbox checkbox-group\">\n                                        <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                            <div className=\"toggle-switch\" disabled={!showHistory} onClick={() => this.handleInputChange(\"showHistory\", { ...showHistory, Committee: !showHistory.Committee })}>\n                                                <input id=\"report-history-type-committee\" checked={showHistory.Committee} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                <span className=\"slider\"></span>\n                                            </div>\n                                            <label htmlFor=\"report-history-type-committee\" className={`checkbox-label no-background${showHistory ? \"\" : \" txt-greyed\"}`}>Last Committee Event</label>\n                                        </div>\n                                    </div>\n                                    <div className=\"checkbox checkbox-group\">\n                                        <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                            <div className=\"toggle-switch\" disabled={!showHistory} onClick={() => this.handleInputChange(\"showHistory\", { ...showHistory, Subcommittee: !showHistory.Subcommittee })}>\n                                                <input id=\"report-history-type-sub\" checked={showHistory.Subcommittee} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                <span className=\"slider\"></span>\n                                            </div>\n                                            <label htmlFor=\"report-history-type-sub\" className={`checkbox-label no-background${showHistory ? \"\" : \" txt-greyed\"}`}>Last Subcommittee Event</label>\n                                        </div>\n                                    </div>\n                                </div>\n                                {(showHistory.all || (showHistory.recent && showHistory.mostRecentAmount > 1)) &&\n                                    <div className=\"checkbox checkbox-group\">\n                                        <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                            <div className=\"toggle-switch\" disabled={!showHistory} onClick={() => this.handleInputChange(\"showHistory\", { ...showHistory, showVotes: !showHistory.showVotes })}>\n                                                <input id=\"report-votes\" checked={showHistory.showVotes} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                <span className=\"slider\"></span>\n                                            </div>\n                                            <label htmlFor=\"report-votes\" className={`checkbox-label no-background${showHistory ? \"\" : \" txt-greyed\"}`}>Include Votes for '{showHistory.all ? 'All Events' : showHistory.mostRecentAmount.toString() + ' Last Events'}'</label>\n                                        </div>\n                                    </div>\n                                }\n                            </div>\n                            <div className=\"checkbox-container\">\n                                <div style={{ margin: '5px' }} className=\"small-text\">Include this detail:</div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showCommitteeEvent', { ...showCommitteeEvent, showFirstHouseCommittee: !showCommitteeEvent.showFirstHouseCommittee })}>\n                                        <input id=\"report-committee-house-referred\" checked={showCommitteeEvent.showFirstHouseCommittee || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-committee-house-referred\" className=\"checkbox-label no-background\">First House Committee Referred</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showCommitteeEvent', { ...showCommitteeEvent, showFirstSenateCommittee: !showCommitteeEvent.showFirstSenateCommittee })}>\n                                        <input id=\"report-committee-senate-referred\" checked={showCommitteeEvent.showFirstSenateCommittee || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-committee-senate-referred\" className=\"checkbox-label no-background\">First Senate Committee Referred</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showCommitteeEvent', { ...showCommitteeEvent, showLastHouseSubcommittee: !showCommitteeEvent.showLastHouseSubcommittee })}>\n                                        <input id=\"report-committee-house-assigned\" checked={showCommitteeEvent.showLastHouseSubcommittee || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-committee-house-assigned\" className=\"checkbox-label no-background\">Last House Subcommittee Assigned</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showCommitteeEvent', { ...showCommitteeEvent, showLastSenateSubcommittee: !showCommitteeEvent.showLastSenateSubcommittee })}>\n                                        <input id=\"report-committee-senate-assigned\" checked={showCommitteeEvent.showLastSenateSubcommittee || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-committee-senate-assigned\" className=\"checkbox-label no-background\">Last Senate Subcommittee Assigned</label>\n                                </div>\n                            </div>\n                        </div>\n                        <div>\n                            <div className=\"checkbox-container\">\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showHouseAmendments', !showHouseAmendments)}>\n                                        <input id=\"report-house-amendments\" checked={showHouseAmendments} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-house-amendments\" className=\"checkbox-label no-background\">House Amendments</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showSenateAmendments', !showSenateAmendments)}>\n                                        <input id=\"report-senate-amendments\" checked={showSenateAmendments} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-senate-amendments\" className=\"checkbox-label no-background\">Senate Amendments</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showConferenceAmendments', !showConferenceAmendments)}>\n                                        <input id=\"report-conference-amendments\" checked={showConferenceAmendments} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-conference-amendments\" className=\"checkbox-label no-background\">Conference Amendments</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showGovernorsRecommendations', !showGovernorsRecommendations)}>\n                                        <input id=\"report-governors-recommendations\" checked={showGovernorsRecommendations} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-governors-recommendations\" className=\"checkbox-label no-background\">Governor's Recommendations</label>\n                                </div>\n                            </div>\n                            <div className=\"checkbox-container\">\n                                <div style={{ margin: '5px' }} className=\"small-text\">Include whether the bill has ever been in this status:</div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showStatus', { ...showStatus, showPassedHouse: !showStatus.showPassedHouse })}>\n                                        <input id=\"report-passed-house\" checked={showStatus.showPassedHouse || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-passed-house\" className=\"checkbox-label no-background\">Passed House</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showStatus', { ...showStatus, showPassedSenate: !showStatus.showPassedSenate })}>\n                                        <input id=\"report-passed-senate\" checked={showStatus.showPassedSenate || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-passed-senate\" className=\"checkbox-label no-background\">Passed Senate</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showStatus', { ...showStatus, showPassed: !showStatus.showPassed })}>\n                                        <input id=\"report-passed\" checked={showStatus.showPassed || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-passed\" className=\"checkbox-label no-background\">Passed</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showStatus', { ...showStatus, showApproved: !showStatus.showApproved })}>\n                                        <input id=\"report-approved\" checked={showStatus.showApproved || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-approved\" className=\"checkbox-label no-background\">Approved</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showStatus', { ...showStatus, showVetoed: !showStatus.showVetoed })}>\n                                        <input id=\"report-vetoed\" checked={showStatus.showVetoed || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-vetoed\" className=\"checkbox-label no-background\">Vetoed</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showStatus', { ...showStatus, showContinued: !showStatus.showContinued })}>\n                                        <input id=\"report-continued\" checked={showStatus.showContinued || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-continued\" className=\"checkbox-label no-background\">Continued</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showStatus', { ...showStatus, showFailed: !showStatus.showFailed })}>\n                                        <input id=\"report-failed\" checked={showStatus.showFailed || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-failed\" className=\"checkbox-label no-background\">Failed</label>\n                                </div>\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showStatus', { ...showStatus, showEmergency: !showStatus.showEmergency })}>\n                                        <input id=\"report-emergency\" checked={showStatus.showEmergency || \"\"} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"report-emergency\" className=\"checkbox-label no-background\">Emergency</label>\n                                </div>\n                            </div>\n                            {this.props.login.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR) &&\n                                <div className=\"checkbox-container\">\n                                    <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                        <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showNotes', !showNotes)}>\n                                            <input id=\"report-notes\" checked={showNotes} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                            <span className=\"slider\"></span>\n                                        </div>\n                                        <label htmlFor=\"report-notes\" className=\"checkbox-label no-background\">Notes</label>\n                                    </div>\n                                    {this.props.selectedCollection && this.props.selectedCollection.Name && this.props.selectedCollection.WatchListID &&\n                                        <div className=\"checkbox\">\n                                            <label htmlFor=\"report-notes-from-collection\" className={`label radio-label ${showNotes ? \"\" : \"txt-greyed\"}`}>\n                                                <input id=\"report-notes-from-collection\" disabled={!showNotes} checked={selectedNotes === 'current'} onChange={() => this.handleInputChange(\"selectedNotes\", 'current')} type=\"radio\" />\n                                                Notes from {this.props.selectedCollection.Name}\n                                            </label>\n                                            <label htmlFor=\"report-notes-from-all\" className={`label radio-label ${showNotes ? \"\" : \"txt-greyed\"}`}>\n                                                <input id=\"report-notes-from-all\" disabled={!showNotes} checked={selectedNotes === 'all'} onChange={() => this.handleInputChange(\"selectedNotes\", 'all')} type=\"radio\" />\n                                                All Notes\n                                            </label>\n                                        </div>\n                                    }\n                                </div>\n                            }\n                        </div>\n                        {DLS_STAFF &&\n                            <div>\n                                <div className=\"checkbox-container\">\n                                    <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                        <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showLdNumber', !showLdNumber)}>\n                                            <input id=\"report-ld-number\" checked={showLdNumber} type=\"checkbox\" style={{ width: \"inherit\" }} />\n                                            <span className=\"slider\"></span>\n                                        </div>\n                                        <label htmlFor=\"report-ld-number\" className=\"checkbox-label no-background\">LD Number of current version</label>\n                                    </div>\n                                    <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                        <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showClerkNames', !showClerkNames)}>\n                                            <input id=\"report-clerk-names\" checked={showClerkNames} type=\"checkbox\" style={{ width: \"inherit\" }} />\n                                            <span className=\"slider\"></span>\n                                        </div>\n                                        <label htmlFor=\"report-clerk-names\" className=\"checkbox-label no-background\">Show clerk name(s) of current committee</label>\n                                    </div>\n                                    <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                        <div className=\"toggle-switch\" onClick={() => this.handleInputChange('showDlsStaffNames', !showDlsStaffNames)}>\n                                            <input id=\"report-staff-names\" checked={showDlsStaffNames} type=\"checkbox\" style={{ width: \"inherit\" }} />\n                                            <span className=\"slider\"></span>\n                                        </div>\n                                        <label htmlFor=\"report-staff-names\" className=\"checkbox-label no-background\">Show DLS staff name(s) of current committee</label>\n                                    </div>\n                                </div>\n                            </div>\n                        }\n                    </div>\n                    {(showHistory.all || (showHistory.recent && showHistory.mostRecentAmount > 1)) && <small>* If you include '{showHistory.all ? 'All Events' : showHistory.mostRecentAmount.toString() + ' Last Events'}' for each bill, and decide to generate a CSV on the resulting report, 2 CSVs will be generated: one CSV containing '{showHistory.all ? 'All Events' : showHistory.mostRecentAmount.toString() + ' Last Events'}' on that bill, and another CSV containing all other selected options (e.g. Catch line, Summary, etc.).</small>}\n                    <div className=\"inline-list\">\n                        <button className='button primary' onClick={() => this.selectAll()}>Select All</button>\n                        <button style={{ marginRight: \"10px\", marginLeft: \"0px\", float: \"right\" }} type=\"button\" className=\"button right\" disabled={this.state.creating || this.checkParams()} onClick={() => { const newWindow = window.open(); this.getReportUrl(newWindow) }}>{this.state.creating ? 'Creating' : 'Create'}</button>\n                        <button style={{ float: \"right\" }} type=\"button\" className=\"button secondary right\" onClick={() => this.props.toggleReportMaker(this.props.autoReport)}>Close</button>\n                    </div>\n                </div>\n            </div>\n        </div>);\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { login, nav, report } = state;\n        return {\n            login,\n            nav,\n            report\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, navActionCreators, reportActionCreators), dispatch)\n        }\n    }\n)(ReportMaker);","import React from 'react';\n\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport moment from 'moment-timezone';\nimport { saveAs } from 'file-saver';\nimport { generateCsv } from '../../services/csv.service';\nimport { voteActionCreators } from '../../stores/lis-votes-store';\nimport { patronActionCreators } from '../../stores/lis-patron-store';\nimport { Link } from 'react-router-dom';\nimport AgendaItemsComponent from './lis-agenda-items';\nimport VersionList from '../lis-bills/lis-bill-version-list';\nimport CreatableSelect from 'react-select/creatable';\nimport renderHTML from 'react-render-html';\nimport ReportMaker from '../../lis-public/components/lis-bill-search/lis-report-maker';\n\nconst BILL_COLLECTION_AUTHOR = \"LegislationCollections\";\nconst BILL_MANAGEMENT_AUTHOR = \"Legislation\";\nconst COMMUNICATION_AUTHOR = \"CommunicationFileGeneration\";\nconst CALENDAR_AUTHOR = \"Calendar\";\nconst lisDocDomain = window.env?.STORAGE_ACCOUNT_DOMAIN;\n\nconst HOUSE_NUMERIC_SORT_CATEGORIES = [2, 3, 4, 26, 27, 5, 41, 6, 7, 28, 29, 30, 31, 32, 57, 33, 35, 45, 9, 10, 8, 11, 13, 37, 38, 44, 46];\nconst SENATE_NUMERIC_SORT_CATEGORIES = [72, 111, 109, 112, 60, 110, 98, 102, 83, 90, 87, 93, 100, 104, 117, 118, 105, 106, 66, 67, 96, 97, 64, 68, 69, 65];\n\nconst sortAgendas = (a, b, calendarChamber) => {\n    if (calendarChamber === \"H\") {\n        return !a.IsActive && b.IsActive\n            ? 1\n            : a.IsActive && !b.IsActive\n                ? -1\n                : a.Sequence > 0 && b.Sequence > 0 ? a.Sequence - b.Sequence : (!a.Ranking || a.Ranking === \"\") && (b.Ranking && b.Ranking !== \"\")\n                    ? -1\n                    : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n                        ? 1\n                        : a.Ranking > b.Ranking\n                            ? 1\n                            : a.Ranking < b.Ranking\n                                ? -1\n                                : moment(a.CalendarDate).isAfter(b.CalendarDate, \"day\")\n                                    ? 1\n                                    : moment(b.CalendarDate).isAfter(a.CalendarDate, \"day\")\n                                        ? -1\n                                        : moment(a.CandidateDate).isAfter(b.CandidateDate, \"day\")\n                                            ? 1\n                                            : moment(b.CandidateDate).isAfter(a.CandidateDate, \"day\")\n                                                ? -1\n                                                : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                                                    a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                                        ? -1 : 1\n                                                    : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                                        ? 1\n                                                        : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                                            ? -1\n                                                            : a.LegislationKey > b.LegislationKey\n                                                                ? 1\n                                                                : -1\n    } else {\n        return b.IsActive !== a.IsActive\n            ? b.IsActive\n                ? 1\n                : -1\n            : a.Sequence > 0 && b.Sequence > 0 && a.Sequence !== b.Sequence\n                ? a.Sequence - b.Sequence > 0\n                    ? 1\n                    : -1\n                : a.CalendarDate !== b.CalendarDate\n                    ?\n                    !a.CalendarDate ?\n                        1 :\n                        !b.CalendarDate ? -1\n                            :\n                            a.CalendarDate - b.CalendarDate\n                    : a.CandidateDate !== b.CandidateDate\n                        ?\n                        !a.CandidateDate ?\n                            1 :\n                            !b.CandidateDate ? -1\n                                :\n                                a.CandidateDate - b.CandidateDate\n                        : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                            a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                ? -1 : 1\n                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) !== 0\n                                ? a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                    ? 1\n                                    : -1\n                                : a.LegislationKey && parseInt(a.LegislationKey) !== parseInt(b.LegislationKey)\n                                    ? parseInt(a.LegislationKey) - parseInt(b.LegislationKey) > 0\n                                        ? 1\n                                        : -1\n                                    : 0\n    }\n}\n\nconst sortAgendasNumerically = (a, b, calendarChamber) => {\n    if (calendarChamber === \"H\") {\n        return !a.IsActive && b.IsActive\n            ? 1\n            : a.IsActive && !b.IsActive\n                ? -1\n                : (!a.Ranking || a.Ranking === \"\") && (b.Ranking && b.Ranking !== \"\")\n                    ? -1\n                    : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n                        ? 1\n                        : a.Ranking > b.Ranking\n                            ? 1\n                            : a.Ranking < b.Ranking\n                                ? -1\n                                : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                                    a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                        ? -1 : 1\n                                    : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                        ? 1\n                                        : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                            ? -1\n                                            : a.LegislationKey > b.LegislationKey\n                                                ? 1\n                                                : -1\n    } else {\n        return !a.IsActive && b.IsActive\n            ? 1\n            : a.IsActive && !b.IsActive\n                ? -1\n                : a.Sequence > 0 && b.Sequence > 0 && a.Sequence !== b.Sequence\n                    ? a.Sequence - b.Sequence > 0\n                        ? 1\n                        : -1\n                    : a.LegislationNumber && b.LegislationNumber && a.LegislationNumber[0] !== b.LegislationNumber[0] ?\n                        a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                            ? -1\n                            : 1\n                        : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                            ? 1\n                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                ? -1\n                                : a.LegislationKey > b.LegislationKey\n                                    ? 1\n                                    : -1\n    }\n}\n\nclass CalendarDetailsComponent extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            hideAll: false,\n            hide: [],\n            showAgendaItemEditor: -1,\n            showAgendaItemEditorCategoryIndex: -1,\n            currentItemSelection: ''\n        }\n\n        this.toggleAll = this.toggleAll.bind(this);\n        this.toggleCategory = this.toggleCategory.bind(this);\n        this.fetchCsv = this.fetchCsv.bind(this);\n        this.toggleAgendaItemEditor = this.toggleAgendaItemEditor.bind(this);\n        this.handleCurrentItemChange = this.handleCurrentItemChange.bind(this);\n        this.generateClerksCopy = this.generateClerksCopy.bind(this);\n        this.toggleReportMaker = this.toggleReportMaker.bind(this);\n    }\n\n    toggleAll() {\n        const opposite = !this.state.hideAll;\n        let hide = new Array(this.props.calendar.CalendarCategories.length);\n        hide.fill(opposite);\n\n        this.setState({\n            hideAll: opposite,\n            hide: hide\n        });\n    }\n\n    toggleCategory(catIndex) {\n        let hide = [...this.state.hide];\n        hide[catIndex] = !hide[catIndex];\n        this.setState({\n            hide: hide\n        })\n    }\n\n    fetchCsv() {\n        let rows = [];\n        //Flatten the data and add the category to each row\n        this.props.calendar.CalendarCategories.forEach(category => {\n            category.Agendas.forEach(agenda => {\n                if (agenda.IsActive) {\n                    agenda.CalendarCategory = category.DisplayType ? category.Description + \" - \" + category.CategoryType : category.Description;\n                    //Handle inserting description text for non-legislation agenda items\n                    if (!agenda.LegislationDescription)\n                        agenda.LegislationDescription = agenda.Description;\n                    //Handle inserting patrons\n                    if (agenda.Patrons) {\n                        agenda.Patron = agenda.Patrons.map(p => p.PatronDisplayName).join(\",\");\n                    }\n                    rows.push(agenda);\n                }\n            });\n        })\n\n        let fileName = this.props.calendar.ChamberCode === \"S\" ? \"SenateCalendar\" : \"HouseCalendar\";\n        fileName = fileName + moment(this.props.calendar.CalendarDate).format(\"MMMMDoYYYY\") + \".csv\";\n\n        saveAs(new Blob([generateCsv([\"Calendar Category\", \"Legislation Number\", \"Legislation Description\", \"Patron\", \"Page Number\"], rows)], { type: \"data:text/csv;charset=utf-8,\" }), fileName);\n    }\n\n    toggleAgendaItemEditor(agendaIndex, categoryIndex) {\n        this.setState({\n            showAgendaItemEditor: agendaIndex,\n            showAgendaItemEditorCategoryIndex: categoryIndex || -1\n        });\n    }\n\n    handleCurrentItemChange(val) {\n        this.setState({\n            currentItemSelection: val\n        });\n    }\n\n    generateClerksCopy(category, e) {\n        e.stopPropagation();\n        this.props.generateClerksCopy(category);\n    }\n\n    toggleReportMaker(catIndex, e) {\n        if (e) {\n            e.stopPropagation();\n        }\n\n        if (!this.state.showReportMaker && !isNaN(parseInt(catIndex))) {\n            this.setCategoryReportBillList(catIndex);\n        } else {\n            //needs to be separated otherwise this will run before the setCategoryReportBillList method is done and the ReportMaker component will not have the info needed, resulting in NREs\n            this.setState(state => ({\n                showReportMaker: !state.showReportMaker\n            }));\n        }\n    }\n\n    setCategoryReportBillList(catIndex) {\n        const category = this.props.calendar.CalendarCategories[catIndex];\n        let categoryReportBillList = [];\n        category.Agendas.forEach(agenda => {\n            if (agenda.LegislationID && agenda.IsActive) {\n                categoryReportBillList.push({ LegislationID: agenda.LegislationID, LegislationNumber: agenda.LegislationNumber, SessionID: this.props.calendar.SessionID });\n            }\n        });\n\n        this.setState({ showReportMaker: true, categoryReportBillList })\n    }\n\n    render() {\n        const { session, calendar, comments } = this.props;\n        const { hide, hideAll } = this.state;\n        const filteredCategories = calendar.CalendarCategories.map(category => {\n            const checkForActiveAgendas = category.Agendas.find(agenda => agenda.IsActive && !agenda.IsHidden);\n            if (checkForActiveAgendas) {\n                if (category.CategoryType != \"Order\") {\n                    let unrankedAgendas = [];\n                    let rankedAgendas = [];\n                    let rankings = [];\n\n                    if (calendar.ChamberCode === \"H\") {\n                        //house calendar sort\n                        category.Agendas.forEach((agenda) => {\n                            if (!agenda.Ranking && agenda.IsActive) {\n                                unrankedAgendas.push(agenda);\n                            } else if (agenda.IsActive) {\n                                rankedAgendas.push(agenda);\n                                rankings.push(agenda.Ranking);\n                            }\n                        })\n\n                        rankings.sort((a, b) => a - b);\n\n                        let gaps = [];\n                        for (let i = 1; i < rankings.length; i++) {\n                            gaps.push(rankings[i] - rankings[i - 1]);\n                        }\n\n                        if (HOUSE_NUMERIC_SORT_CATEGORIES.includes(category.CalendarCategoryTypeID)) {\n                            rankedAgendas.sort((a, b) => sortAgendasNumerically(a, b, calendar.ChamberCode));\n                        } else {\n                            rankedAgendas.sort((a, b) => sortAgendas(a, b, calendar.ChamberCode));\n                        }\n                        if (HOUSE_NUMERIC_SORT_CATEGORIES.includes(category.CalendarCategoryTypeID)) {\n                            unrankedAgendas.sort((a, b) => sortAgendasNumerically(a, b, calendar.ChamberCode));\n                        } else {\n                            unrankedAgendas.sort((a, b) => sortAgendas(a, b, calendar.ChamberCode));\n                        }\n\n                        //If there are multiple ranks with a gap larger than 1 place all unranked agendas between them\n                        if (new Set(rankings).size > 1 && Math.max(...gaps) > 1) {\n                            let insertPoint = gaps.findIndex(x => x === Math.max(...gaps)) + 1\n\n                            for (let i = 0; i < unrankedAgendas.length; i++) {\n                                rankedAgendas.splice(insertPoint, 0, unrankedAgendas[i]);\n                                insertPoint++;\n                            }\n\n                            category.Agendas = rankedAgendas;\n                        } else {\n                            //If the largest rank is greated than 50 put all unranked agendas above the ranked agendas, otherwise put them all at the bottom\n                            if (Math.max(...rankings) >= 50) {\n                                category.Agendas = unrankedAgendas.concat(rankedAgendas);\n                            } else {\n                                category.Agendas = rankedAgendas.concat(unrankedAgendas);\n                            }\n                        }\n                    } else {\n                        //senate calendar sort\n                        if (SENATE_NUMERIC_SORT_CATEGORIES.includes(category.CalendarCategoryTypeID)) {\n                            category.Agendas.sort((a, b) => sortAgendasNumerically(a, b, calendar.ChamberCode))\n                        } else {\n                            category.Agendas.sort((a, b) => sortAgendas(a, b, calendar.ChamberCode))\n                        }\n                    }\n                }\n                return category;\n            } else {\n                return null;\n            }\n        });\n\n        let calendarFileUrl = '';\n        const pdfFile = calendar.CalendarFiles.find(file => file.FileURL.toUpperCase().includes('PDF'));\n        if (pdfFile) {\n            const url = new URL(pdfFile.FileURL);\n            calendarFileUrl = lisDocDomain + (url.pathname[0] === '/' ? url.pathname : '/' + url.pathname);\n        }\n        const categoryDescription = category => {\n            //if it's been edited, leave it at that\n            const associatedReferenceCategory = this.props.calendarCategoryReferences.find(x => x.CalendarCategoryTypeID === category.CalendarCategoryTypeID);\n            if (associatedReferenceCategory && associatedReferenceCategory.Description !== category.Description && associatedReferenceCategory.PluralDescription !== category.Description) {\n                return category.Description;\n            }\n\n            //otherwise, use singular or plural reference description\n            if (calendar.ChamberCode === 'H' && category.CategoryCode === \"HOUBRC\" || category.CategoryCode === \"SENBRC\") {\n                return category.Description;\n            } else if (category.Agendas.filter(a => a.IsActive).length > 1 && category.PluralDescription) {\n                return category.PluralDescription;\n            } else {\n                return category.Description;\n            }\n        }\n        const sessionHeader = session ? session.SessionYear + \" \" + session.DisplayName : '';\n        const canSetCurrentItem = Boolean(this.props.userClaims && this.props.userClaims.resources.find(resource => resource === CALENDAR_AUTHOR)) && this.props.userClaims.resources.find(x => x === \"LegislationEvent\");\n        return (\n            <div>\n                {this.state.showReportMaker &&\n                    <ReportMaker\n                        toggleReportMaker={this.toggleReportMaker}\n                        selectedCollection={{\n                            Name: `Report on ${moment(this.props.calendar.CalendarDate).format('MM/DD/YY')}`,\n                        }}\n                        billList={this.state.categoryReportBillList}\n                        reportTitle={`Report on ${moment(this.props.calendar.CalendarDate).format('MM/DD/YY')}`}\n                    />\n                }\n                {this.state.showAgendaItemEditor !== -1 &&\n                    <AgendaItemsComponent\n                        toggleAgendaItemEditor={this.toggleAgendaItemEditor}\n                        agenda={calendar.CalendarCategories[this.state.showAgendaItemEditorCategoryIndex].Agendas[this.state.showAgendaItemEditor]}\n                        categoryIndex={this.state.showAgendaItemEditorCategoryIndex}\n                        agendaIndex={this.state.showAgendaItemEditor}\n                        updateAgendaItems={this.props.updateAgendaItems}\n                    />\n                }\n                <br />\n                <div className=\"flex-row flex-vertical-center multiple-icons\">\n                    <h2 className=\"no-margin\">{sessionHeader}</h2>\n                    {calendarFileUrl\n                        && (this.props.userClaims && this.props.userClaims.resources.find(x => x !== \"LegislationCollections\") || this.props.isCalendarForm)\n                        && this.props.sessionList.find(x => x.SessionCode === this.props.calendar.SessionCode)\n                        && this.props.sessionList.find(x => x.SessionCode === this.props.calendar.SessionCode).SessionYear >= 2023\n                        && calendar.CalendarNumber < 2 ?\n                        //Need to prevent the padded calendar from displaying if the session is before go live\n                        <a target=\"_blank\" href={calendarFileUrl.replace(\".PDF\", \"-padded.PDF\")}>\n                            <span title=\"Padded-PDF\" aria-label=\"Padded-PDF\" className=\"icon file-empty\"></span>\n                        </a>\n                        :\n                        <div /> //For grid layout formatting\n                    }\n                    {calendarFileUrl &&\n                        <a target=\"_blank\" href={calendarFileUrl}>\n                            <span title=\"PDF\" aria-label=\"PDF\" className=\"icon pdf\"></span>\n                        </a>\n                    }\n                    <a target=\"_blank\" onClick={this.fetchCsv}>\n                        <span aria-label=\"Spreadsheet\" title=\"Spreadsheet\" role=\"button\" className=\"icon csv\"></span>\n                    </a>\n                </div>\n                <hr />\n                <div className=\"flex-row details-page-data-container\">\n                    <div>\n                        <h3 className=\"no-margin\">{calendar.ChamberCode === \"S\" ? \"Senate \" : \"House \"} Calendar {calendar.IsProforma && \"(Pro Forma)\"}</h3>\n                        <span>{moment(calendar.CalendarDate).format(\"LL\") + (calendar.CalendarNumber > 1 ? [' (', ')'].join('Supp. ' + (calendar.CalendarNumber - 1)) : '')}</span>\n                    </div>\n                    <div>\n                        <button className=\"button-link\" aria-expanded={!hideAll} onClick={this.toggleAll} type=\"button\">{hideAll ? \"Expand\" : \"Collapse\"} All +/-</button>\n                    </div>\n                </div>\n                {comments.length > 0 &&\n                    <div className=\"details-page-data-container public-details\">\n                        {comments.map((comment, i) => {\n                            return (\n                                <p key={i}>{\"Comment \" + comment.Sequence + \": \" + comment.Comment}</p>\n                            )\n                        })}\n                    </div>\n                }\n                <div className=\"flex-row\">\n                    <div className='details-page-data-container'>\n                        {\n                            this.props.currentProceduralMotion ? <span>Current Item: {this.props.currentProceduralMotion}</span>\n                                :\n                                this.props.currentAgendaItem && filteredCategories.find(cat => cat && cat.Agendas && cat.Agendas.find(agenda => agenda.AgendaID === this.props.currentAgendaItem)) ? <span>Current Item: {filteredCategories.find(cat => cat && cat.Agendas && cat.Agendas.find(agenda => agenda.AgendaID === this.props.currentAgendaItem)).Agendas.find(agenda => agenda.AgendaID === this.props.currentAgendaItem).LegislationNumber}</span>\n                                    :\n                                    this.props.currentCategoryItem && filteredCategories.find(cat => cat && cat.CalendarCategoryID === this.props.currentCategoryItem) ? <span>Current Item: {categoryDescription(filteredCategories.find(cat => cat && cat.CalendarCategoryID === this.props.currentCategoryItem))}</span>\n                                        :\n                                        null}\n                    </div>\n                    {!this.props.isCalendarForm && canSetCurrentItem &&\n                        <div className=\"inner-grid three-and-one\">\n                            <CreatableSelect\n                                options={this.props.commonCurrentItemOptions}\n                                onChange={this.handleCurrentItemChange}\n                                formatCreateLabel={val => val}\n                                value={this.state.currentItemSelection}\n                            />\n                            <button disabled={!this.state.currentItemSelection || this.props.isSavingCalendarCurrentItem} onClick={e => this.props.setCurrentItem(e, null, null, this.state.currentItemSelection.label)} className=\"button\" type=\"button\">Set current item</button>\n                        </div>\n                    }\n                </div>\n\n                <br />\n                <div className=\"collapsible-table\">\n                    {filteredCategories.map((category, catIndex) => {\n                        if (category) {\n                            return (<div key={catIndex}>\n                                <div style={{ cursor: 'pointer' }}\n                                    className={`${!hide[catIndex] ? 'opened' : ''} flex-row section-header`}\n                                    onClick={() => this.toggleCategory(catIndex)}\n                                    title={!this.props.currentAgendaItem && this.props.currentCategoryItem === category.CalendarCategoryID ? \"Current Item\" : \"\"}>\n                                    <div>\n                                        {!this.props.currentAgendaItem && this.props.currentCategoryItem === category.CalendarCategoryID &&\n                                            <div style={{ display: 'inline-block' }}>\n                                                <div className=\"arrow-right-text-filled\">Current Item</div>\n                                            </div>\n                                        }\n                                        {!this.props.isCalendarForm && canSetCurrentItem &&\n                                            <button onClick={e => this.props.setCurrentItem(e, category.CalendarCategoryID)} style={{ marginRight: '5px' }} className=\"txt-dark-blue button-link\">(c)</button>\n                                        }\n                                        <span>\n                                            {categoryDescription(category)}\n                                            {category.DisplayType && \" - \" + category.CategoryType}\n                                        </span>\n                                    </div>\n                                    <div>\n                                        <div className=\"inline-list\">\n                                            {this.props.creatingCollection === catIndex ?\n                                                <span className=\"small-spinner\"></span>\n                                                :\n                                                <React.Fragment>\n                                                    {this.props.userClaims && this.props.userClaims.resources.find(x => x === COMMUNICATION_AUTHOR) &&\n                                                        <React.Fragment>\n                                                            {this.props.calendarCategoryReferences && this.props.calendarCategoryReferences.find(x => x.CalendarCategoryTypeID === category.CalendarCategoryTypeID) && this.props.calendarCategoryReferences.find(x => x.CalendarCategoryTypeID === category.CalendarCategoryTypeID).ClerksCopy &&\n                                                                <button type=\"button\" onClick={(e) => this.generateClerksCopy(category, e)} className=\"button small-button\">Clerk's Copy</button>\n                                                            }\n                                                        </React.Fragment>\n                                                    }\n                                                    {this.props.editHistory && this.props.userClaims.resources.find(resource => resource === BILL_MANAGEMENT_AUTHOR) && category.IsLegislationCategory && this.props.userClaims.resources.find(x => x === \"LegislationEvent\") &&\n                                                        <React.Fragment>\n                                                            <button disabled={this.props.creatingCollection !== null} type=\"button\" onClick={(e) => this.props.editHistory(e, catIndex, categoryDescription(category) + (category.DisplayType ? ' - ' + category.CategoryType : ''))} className=\"button small-button\">Edit History</button>\n                                                        </React.Fragment>\n                                                    }\n                                                    {this.props.createWatchlist && this.props.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR) && category.IsLegislationCategory &&\n                                                        <React.Fragment>\n                                                            <button type=\"button\" onClick={(e) => this.toggleReportMaker(catIndex, e)} className=\"button small-button\">Create Report</button>\n                                                            {this.props.createdCollections[catIndex] ?\n                                                                <Link\n                                                                    style={{ fontSize: '12px' }}\n                                                                    to={{ pathname: \"bill-search\", search: `?collection=${this.props.createdCollections[catIndex].WatchListID}&q=${window.btoa(JSON.stringify({ selectedSession: calendar.SessionID, sessionOnly: true }))}` }}\n                                                                    target=\"_blank\">\n                                                                    Open Watchlist\n                                                                </Link>\n                                                                :\n                                                                <button disabled={this.props.creatingCollection !== null} type=\"button\" onClick={(e) => this.props.createWatchlist(e, catIndex)} className=\"button small-button\">Create Watchlist</button>\n                                                            }\n                                                        </React.Fragment>\n                                                    }\n                                                </React.Fragment>\n                                            }\n                                            <button aria-expanded={!hide[catIndex]} aria-label={`${hide[catIndex] ? \"Show\" : \"Hide\"} items`} type=\"button\" className=\"button-link\">+/-</button>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div className=\"section-body\">\n                                    {!hide[catIndex] &&\n                                        <React.Fragment>\n                                            {category.Agendas.map((agenda, agendaIndex) =>\n                                                <React.Fragment key={agendaIndex}>\n                                                    {agenda.IsActive && !agenda.IsHidden &&\n                                                        <React.Fragment>\n                                                            <div title={this.props.currentAgendaItem === agenda.AgendaID ? \"Current Item\" : \"\"} className=\"section-row inner-grid med-two-one\">\n                                                                <div className='align-right'>\n                                                                    {this.props.currentAgendaItem === agenda.AgendaID &&\n                                                                        <div style={{ display: 'inline-block', float: 'left' }}>\n                                                                            <div className=\"arrow-right-text-filled\">Current Item</div>\n                                                                        </div>\n                                                                    }\n                                                                    {!this.props.isCalendarForm && canSetCurrentItem && this.props.userClaims.resources.find(x => x === \"LegislationEvent\") &&\n                                                                        <button onClick={e => this.props.setCurrentItem(e, category.CalendarCategoryID, agenda.AgendaID, agenda.Description)} style={{ marginRight: '5px' }} className=\"txt-dark-blue button-link\">(c)</button>\n                                                                    }\n                                                                    {agenda.LegislationNumber && <Link target=\"_blank\" to={`/bill-details/${session.SessionCode}/${agenda.LegislationNumber}`}>{agenda.LegislationNumber}</Link>}\n                                                                </div>\n                                                                <div>\n                                                                    <div>\n                                                                        <span>{renderHTML(agenda.LegislationDescription || (agenda.Description === \"Call to Order\" && this.props.calendarTime ? \"Call to Order - \" + this.props.calendarTime : agenda.Description))}</span>\n                                                                        {this.props.isCalendarForm &&\n                                                                            <span className=\"inline-list\">\n                                                                                {agenda.AgendaItems && agenda.AgendaItems.length > 0 && !this.props.isCalendarForm &&\n                                                                                    <button type=\"button\" onClick={() => this.toggleAgendaItemEditor(agendaIndex, catIndex)} className=\"button-link\">Edit Agenda Items</button>\n                                                                                }\n                                                                            </span>\n                                                                        }\n                                                                    </div>\n                                                                </div>\n                                                                <span className='align-right'>\n                                                                    {((agenda.AgendaItems && agenda.AgendaItems.length > 0) || agenda.LegislationNumber) &&\n                                                                        <button aria-label=\"Show patrons, agenda descriptions, and versions\" aria-expanded={!!agenda.show} type=\"button\" onClick={() => this.props.toggleAgenda(catIndex, agendaIndex)} className={`${agenda.show ? \"arrow-up\" : \"arrow-down\"}`}></button>\n                                                                    }\n                                                                </span>\n                                                            </div>\n                                                            {agenda.show &&\n                                                                <AgendaActivities\n                                                                    agenda={agenda}\n                                                                    sessionCode={session.SessionCode}\n                                                                    chamberCode={agenda.LegislationNumber ? agenda.LegislationNumber[0] : calendar.ChamberCode}\n                                                                    agendaNote={agenda.AgendaNote}\n                                                                />\n                                                            }\n                                                        </React.Fragment>\n                                                    }\n                                                </React.Fragment>\n                                            )}\n                                        </React.Fragment>\n                                    }\n                                </div>\n                            </div>)\n                        } else {\n                            return null;\n                        }\n                    })}\n                </div>\n            </div >);\n    }\n}\n\nexport const AgendaActivities = props => {\n    const { agenda, chamberCode, sessionCode, agendaNote } = props;\n    const sortedPatrons = agenda.Patrons ? agenda.Patrons.sort((a, b) => { return chamberCode === b.ChamberCode ? 1 : -1 }) : [];\n    const patrons = sortedPatrons.length > 0\n        ? sortedPatrons.map((patron, patronIndex) => {\n            let sameAsPrevious = (!sortedPatrons[patronIndex - 1] && patron.ChamberCode === chamberCode && !sortedPatrons.find(p => p.ChamberCode !== chamberCode)) || (sortedPatrons[patronIndex - 1] && patron.ChamberCode === sortedPatrons[patronIndex - 1].ChamberCode);\n            let sameAsNext = sortedPatrons[patronIndex + 1] && patron.ChamberCode === sortedPatrons[patronIndex + 1].ChamberCode;\n            let patronDisplayName = patron.PatronDisplayName;\n            return (\n                <React.Fragment key={patronIndex}>\n                    {patron.ChamberCode !== chamberCode\n                        ? patronIndex !== agenda.Patrons.length - 1\n                            ? chamberCode === \"S\"\n                                ? !sameAsPrevious ? (patronIndex !== 0 ? \"; \" : \"\") + \"Delegates: \" + patronDisplayName + \", \" : sameAsNext ? patronDisplayName + \", \" : patronDisplayName\n                                : !sameAsPrevious ? (patronIndex !== 0 ? \"; \" : \"\") + \"Senators: \" + patronDisplayName + \", \" : sameAsNext ? patronDisplayName + \", \" : patronDisplayName\n                            : chamberCode === \"S\"\n                                ? !sameAsPrevious ? (patronIndex !== 0 ? \"; \" : \"\") + \"Delegate: \" + patronDisplayName : patronDisplayName\n                                : !sameAsPrevious ? (patronIndex !== 0 ? \"; \" : \"\") + \"Senator: \" + patronDisplayName : patronDisplayName\n                        : sameAsNext\n                            ? patronDisplayName + \", \" : patronDisplayName\n                    }\n                </React.Fragment>\n            )\n        })\n        : \"\"\n\n    return (\n        <div className=\"inner-grid med-two-one\">\n            <br />\n            <div>\n                <div>\n                    {patrons.length > 0 && <span>Patron(s): {patrons}</span>}\n                </div>\n                <div>\n                    {agenda.AgendaItems.filter(a => a.IsActive).map((item, itemIndex) =>\n                        <div key={itemIndex}>\n                            {renderHTML(item.Description || \"\")}\n                        </div>\n                    )}\n                </div>\n                <p className=\"bold line-break\">\n                    {agendaNote}\n                </p>\n                {agenda.Versions &&\n                    <>\n                        {agenda.Versions.length > 0 ?\n                            <>\n                                {agenda.Versions === 'fail' ?\n                                    <div className=\"small-text\">Failed to get versions</div>\n                                    :\n                                    <VersionList userClaims={[]} sessionCode={sessionCode} version={agenda.Versions} descriptionEditable={false} legislationClass={agenda.LegislationDescription.includes(\"Budget Bill\") ? \"Budget\" : \"\"} />\n                                }\n                            </>\n                            :\n                            <div className=\"small-spinner\"></div>\n                        }\n                    </>\n                }\n            </div>\n        </div>\n    );\n}\n\nexport default connect(\n    (state) => {\n        const { votes, patrons } = state;\n        return {\n            votes,\n            patrons\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, voteActionCreators, patronActionCreators), dispatch)\n        }\n    }\n)(CalendarDetailsComponent);\n","import React from 'react';\n\nimport moment from 'moment-timezone';\nimport { AgendaActivities } from './lis-calendar-details';\n\nconst CalendarDetailsPrintout = props => {\n    const { session, calendar, comments } = props;\n    const filteredCategories = calendar.CalendarCategories.map(category => {\n        const checkForActiveAgendas = category.Agendas.find(agenda => agenda.IsActive && !agenda.IsHidden);\n        if (checkForActiveAgendas) {\n            return category;\n        } else {\n            return null;\n        }\n    });\n    const categoryDescription = category => {\n        if (category.Agendas.filter(a => a.IsActive).length > 1 && category.PluralDescription) {\n            return category.PluralDescription;\n        } else {\n            return category.Description;\n        }\n    }\n    const sessionHeader = session ? session.SessionYear + \" \" + session.DisplayName : '';\n\n    return (\n        <div>\n            <br />\n            <div className=\"flex-row flex-vertical-center multiple-icons\">\n                <h2 className=\"no-margin\">{sessionHeader}</h2>\n            </div>\n            <hr />\n            <div className=\"flex-row\">\n                <div>\n                    <h3 className=\"no-margin\">{calendar.ChamberCode === \"S\" ? \"Senate \" : \"House \"} Calendar {calendar.IsProforma && \"(Pro Forma)\"}</h3>\n                    <span>{moment(calendar.CalendarDate).format(\"MMMM Do, YYYY\") + (calendar.CalendarNumber > 1 ? [' (', ')'].join('Supp. ' + (calendar.CalendarNumber - 1)) : '')}</span>\n                </div>\n                <div>\n                </div>\n            </div>\n            {comments.length > 0 &&\n                <div className=\"public-details\">\n                    {comments.map((comment, i) => {\n                        return (\n                            <p key={i}>{\"Comment \" + comment.Sequence + \": \" + comment.Comment}</p>\n                        )\n                    })}\n                </div>\n            }\n            <br />\n            <div className=\"collapsible-table\">\n                {filteredCategories.map((category, catIndex) => {\n                    if (category) {\n                        return (<div key={catIndex}>\n                            <div>\n                                <div>\n                                    <span>\n                                        {categoryDescription(category)}\n                                        {category.DisplayType && \" - \" + category.CategoryType}\n                                    </span>\n                                </div>\n                                <div>\n                                </div>\n                            </div>\n                            <div className=\"section-body\">\n                                {category.Agendas.map((agenda, agendaIndex) =>\n                                    <React.Fragment key={agendaIndex}>\n                                        {agenda.IsActive && !agenda.IsHidden &&\n                                            <React.Fragment>\n                                                <div>\n                                                    <div>\n                                                        <span>{agenda.LegislationNumber}</span>\n                                                    </div>\n                                                    <div>\n                                                        <div>\n                                                            <span>{agenda.LegislationDescription || agenda.Description}</span>\n                                                        </div>\n                                                    </div>\n                                                    <div>\n                                                        <AgendaActivities\n                                                            agenda={agenda}\n                                                            chamberCode={calendar.ChamberCode}\n                                                            sessionCode={calendar.SessionCode}\n                                                            agendaNode={agenda.AgendaNote}\n                                                        />\n                                                    </div>\n                                                    <div>\n                                                        {agenda.AgendaItems.map((x) => {\n                                                            if (x.Description && x.Description.includes(\"Amendment\")) {\n                                                                return <div dangerouslySetInnerHTML={{ __html: x.DraftText }} />\n                                                            }\n                                                        })}\n\n                                                    </div>\n                                                </div>\n                                            </React.Fragment>\n                                        }\n                                    </React.Fragment>\n                                )}\n                            </div>\n                        </div>)\n                    } else {\n                        return null;\n                    }\n                })}\n            </div>\n        </div>);\n}\n\nexport default CalendarDetailsPrintout;\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { Prompt } from 'react-router';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport moment from 'moment-timezone';\nimport ReactToPrint from \"react-to-print\";\nimport { calendarActionCreators } from '../../../stores/lis-calendar-store';\nimport BillsGrid from './lis-house-bills-grid';\nimport CalendarDetailsComponent from '../../../lis-shared/lis-calendar/lis-calendar-details'\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport Popout from '../../../lis-shared/lis-layout/components/lis-popout-component';\nimport DatePicker from 'react-datepicker';\nimport CalendarDetailsPrintout from '../../../lis-shared/lis-calendar/lis-calendar-details-printout';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\n\nconst PUBLISH_CALENDAR = true;\nconst SAVE_CALENDAR = false;\nconst lisDocDomain = window.env?.STORAGE_ACCOUNT_DOMAIN;\n\nconst NUMERIC_SORT_CATEGORIES = [2, 3, 4, 26, 27, 5, 41, 6, 7, 28, 29, 30, 31, 32, 57, 33, 35, 45, 9, 10, 8, 11, 13, 37, 38, 44, 46];\n\nconst sortAgendas = (a, b, calendarChamber) => {\n    return !a.IsActive && b.IsActive\n        ? 1\n        : a.IsActive && !b.IsActive\n            ? -1\n            : (!a.Ranking || a.Ranking === \"\") && (b.Ranking && b.Ranking !== \"\")\n                ? -1\n                : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n                    ? 1\n                    : a.Ranking > b.Ranking\n                        ? 1\n                        : a.Ranking < b.Ranking\n                            ? -1\n                            : moment(a.CalendarDate).isAfter(b.CalendarDate, \"day\")\n                                ? 1\n                                : moment(b.CalendarDate).isAfter(a.CalendarDate, \"day\")\n                                    ? -1\n                                    : moment(a.CandidateDate).isAfter(b.CandidateDate, \"day\")\n                                        ? 1\n                                        : moment(b.CandidateDate).isAfter(a.CandidateDate, \"day\")\n                                            ? -1\n                                            : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                                                a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                                    ? -1 : 1\n                                                : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                                    ? 1\n                                                    : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                                        ? -1\n                                                        : a.LegislationKey > b.LegislationKey\n                                                            ? 1\n                                                            : -1\n}\n\nconst sortAgendasNumerically = (a, b, calendarChamber) => {\n    return !a.IsActive && b.IsActive\n        ? 1\n        : a.IsActive && !b.IsActive\n            ? -1\n            : (!a.Ranking || a.Ranking === \"\") && (b.Ranking && b.Ranking !== \"\")\n                ? -1\n                : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n                    ? 1\n                    : a.Ranking > b.Ranking\n                        ? 1\n                        : a.Ranking < b.Ranking\n                            ? -1\n                            : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                                a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                    ? -1 : 1\n                                : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                    ? 1\n                                    : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                        ? -1\n                                        : a.LegislationKey > b.LegislationKey\n                                            ? 1\n                                            : -1\n}\n\nconst sortInactiveAgendas = (a, b, calendarChamber) => {\n    return (!a.Ranking || a.Ranking === \"\") && (b.Ranking && b.Ranking !== \"\")\n        ? -1\n        : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n            ? 1\n            : a.Ranking > b.Ranking\n                ? 1\n                : a.Ranking < b.Ranking\n                    ? -1\n                    : moment(a.CalendarDate).isAfter(b.CalendarDate, \"day\")\n                        ? 1\n                        : moment(b.CalendarDate).isAfter(a.CalendarDate, \"day\")\n                            ? -1\n                            : moment(a.CandidateDate).isAfter(b.CandidateDate, \"day\")\n                                ? 1\n                                : moment(b.CandidateDate).isAfter(a.CandidateDate, \"day\")\n                                    ? -1\n                                    : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                                        a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                            ? -1 : 1\n                                        : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                            ? 1\n                                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                                ? -1\n                                                : a.LegislationKey > b.LegislationKey\n                                                    ? 1\n                                                    : -1\n}\n\nconst sortInactiveAgendasNumerically = (a, b, calendarChamber) => {\n    return (!a.Ranking || a.Ranking === \"\") && (b.Ranking && b.Ranking !== \"\")\n        ? -1\n        : (a.Ranking && a.Ranking !== \"\") && (!b.Ranking || b.Ranking === \"\")\n            ? 1\n            : a.Ranking > b.Ranking\n                ? 1\n                : a.Ranking < b.Ranking\n                    ? -1\n                    : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                        a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                            ? -1 : 1\n                        : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                            ? 1\n                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                ? -1\n                                : a.LegislationKey > b.LegislationKey\n                                    ? 1\n                                    : -1\n}\n\nconst findLastByIsActiveThenCalendarDateThenCandidateDateThenLegChamberTypeKey = (a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate) => (\n    a.IsActive && findLastByCalendarDateThenCandidateDateThenLegChamberTypeKey(a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate)\n)\n\nconst findLastByCalendarDateThenCandidateDateThenLegChamberTypeKey = (a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate) => (\n    (((ignoreCalendarDate || (a.CalendarDate && b.CalendarDate && moment(a.CalendarDate).isSame(b.CalendarDate, \"day\"))) && findLastByLegChamberTypeKey(a, b, calendarChamber)) ||\n        (!ignoreCalendarDate && a.CalendarDate && b.CalendarDate && moment(a.CalendarDate).isBefore(b.CalendarDate, \"day\"))) ||\n    (((ignoreCandidateDate || (a.CandidateDate && b.CandidateDate && moment(a.CandidateDate).isSame(b.CandidateDate, \"day\"))) && findLastByLegChamberTypeKey(a, b, calendarChamber)) ||\n        (!ignoreCandidateDate && a.CandidateDate && b.CandidateDate && moment(a.CandidateDate).isBefore(b.CandidateDate, \"day\"))) ||\n    ((ignoreCalendarDate || (!a.CalendarDate && !b.CalendarDate)) && (ignoreCandidateDate || (!a.CandidateDate && !b.CandidateDate)) &&\n        findLastByLegChamberTypeKey(a, b, calendarChamber))\n    || (!ignoreCalendarDate && !b.CalendarDate && a.CandidateDate)\n    || !ignoreCandidateDate && !b.CandidateDate && a.CandidateDate\n)\n\nconst findLastByLegChamberTypeKey = (a, b, calendarChamber) => (\n    (a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === (calendarChamber === \"H\" ? 1 : -1)) ||\n    (a.LegislationNumber && a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === 0 && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) === -1) ||\n    (a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === 0 && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) === 0 && a.LegislationKey && a.LegislationKey < parseInt(b.LegislationKey))\n)\n\nclass HouseCalendarFormComponent extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.state = {\n            isLoaded: false,\n            calendarData: '',\n            hideCategories: [],\n            showPreview: false,\n            isSaving: false,\n            pendingSave: false,\n            comments: [],\n            message: '',\n            selectedSession: '',\n            selectAllActive: false,\n            selectAllInactive: false,\n            calendarCategories: [],\n            selectedCategory: '',\n            selectedBill: [],\n            billList: [],\n            showCategoryPreview: -1,\n            selectedFile: '',\n            calendatDate: \"\",\n            commentEdit: [],\n            tempComments: [],\n            showTitles: false,\n            selectedDate: \"\",\n            selectedCommittee: \"\",\n            dateList: [],\n            committeeList: [],\n            hideAllNonIncludedBills: false\n        };\n\n        this.initializeForm = this.initializeForm.bind(this);\n        this.handleAgendaSort = this.handleAgendaSort.bind(this);\n        this.handleBulkAgendaSort = this.handleBulkAgendaSort.bind(this);\n        this.togglePreview = this.togglePreview.bind(this);\n        this.updateAgenda = this.updateAgenda.bind(this);\n        this.updateAgendaItems = this.updateAgendaItems.bind(this);\n        this.changeCategoryDropdown = this.changeCategoryDropdown.bind(this);\n        this.addCategory = this.addCategory.bind(this);\n        this.toggleHideCategory = this.toggleHideCategory.bind(this);\n        this.toggleHideAllCategories = this.toggleHideAllCategories.bind(this);\n        this.toggleHideAllNonIncludedBills = this.toggleHideAllNonIncludedBills.bind(this);\n        this.changeBillDropdown = this.changeBillDropdown.bind(this);\n        this.changeDateDropdown = this.changeDateDropdown.bind(this);\n        this.changeCommitteeDropdown = this.changeCommitteeDropdown.bind(this);\n        this.addBill = this.addBill.bind(this);\n        this.addComment = this.addComment.bind(this);\n        this.removeComment = this.removeComment.bind(this);\n        this.commentShift = this.commentShift.bind(this);\n        this.handleProFormaChange = this.handleProFormaChange.bind(this);\n        this.toggleCalendarPreview = this.toggleCalendarPreview.bind(this);\n        this.togglePortal = this.togglePortal.bind(this);\n        this.saveCalendar = this.saveCalendar.bind(this);\n        this.handlePdfFile = this.handlePdfFile.bind(this);\n        this.submitPdfFile = this.submitPdfFile.bind(this);\n        this.changeConveneTime = this.changeConveneTime.bind(this);\n        this.toggleAgenda = this.toggleAgenda.bind(this);\n        this.toggleCommentEdit = this.toggleCommentEdit.bind(this);\n        this.confirmCommentEdit = this.confirmCommentEdit.bind(this);\n        this.toggleShowTitles = this.toggleShowTitles.bind(this);\n        this.setPending = this.setPending.bind(this);\n        this.deleteCategory = this.deleteCategory.bind(this);\n\n        this.pdfRef = React.createRef();\n        this.fileInput = React.createRef();\n    }\n\n    componentDidMount() {\n        this.initializeForm();\n    }\n\n    initializeForm() {\n        let calendarData = { ...this.props.calendarData };\n        let noSavedItems = true;\n        let comments = [];\n        let dateList = [];\n        let committeeList = [];\n\n        // For the 'add category' dropdown\n        this.props.actions.getCalendarCategoriesReferences('?chamberCode=' + calendarData.ChamberCode)\n            .then(() => {\n                let calendarCategories = this.props.calendar.calendarCategoriesReferences;\n                calendarCategories.forEach(category => {\n                    category.label = category.DisplayType ? `${category.Description} - ${category.CategoryType}` : category.Description;\n                    category.value = category.CalendarCategoryTypeID;\n                });\n                this.setState({\n                    calendarCategories: calendarCategories\n                }, () => {\n                    this.props.actions.getCommitteeList(\"sessionID=\" + calendarData.SessionID)\n                        .then(() => {\n                            calendarData.CalendarCategories.forEach((category, j) => {\n                                const referenceCategory = this.state.calendarCategories.find(c => c.CalendarCategoryTypeID === category.CalendarCategoryTypeID);\n                                const response = this.handleAgendaSort(category.Agendas, category.CategoryType, category.CalendarCategoryTypeID, calendarData.ChamberCode)\n                                category.Agendas = response;\n                                category.Agendas.forEach((agenda, i) => {\n                                    //If a bill is on first reading capture its committee and candidate date to use in the filters\n                                    if (referenceCategory && referenceCategory.OnDemand) {\n                                        if (agenda.CommitteeID && this.props.committee.committeeList.find(x => x.ChamberCode === calendarData.ChamberCode && x.CommitteeID === agenda.CommitteeID)) {\n                                            committeeList.push({ label: this.props.committee.committeeList.find(x => x.ChamberCode === calendarData.ChamberCode && x.CommitteeID === agenda.CommitteeID).Name, value: agenda.CommitteeID, date: agenda.CandidateDate });\n                                        }\n\n                                        if (agenda.CandidateDate && this.props.committee.committeeList.find(x => x.ChamberCode === calendarData.ChamberCode && x.CommitteeID === agenda.CommitteeID)) {\n                                            let thisDate = dateList.findIndex(x => moment(x.value).isSame(agenda.CandidateDate, \"day\"));\n                                            if (thisDate > -1) {\n                                                if (!dateList[thisDate].committee.includes(agenda.CommitteeID)) {\n                                                    dateList[thisDate].committee.push(agenda.CommitteeID)\n                                                }\n                                            } else {\n                                                dateList.push({ label: moment(agenda.CandidateDate).format(\"MM/DD/YYYY\"), value: agenda.CandidateDate, committee: [agenda.CommitteeID] });\n                                            }\n                                        }\n                                    }\n\n                                    //Item has an agenda ID so this means that a bill has been previously saved to this calendar\n                                    if (agenda.AgendaID) {\n                                        noSavedItems = false;\n                                    }\n\n                                    //If we've parsed the last agenda of the last category then set the reference lists to be used in the dropdowns\n                                    if (j === calendarData.CalendarCategories.length - 1 && i === category.Agendas.length - 1) {\n                                        dateList = dateList.sort((a, b) => { return moment(a.value) - moment(b.value) })\n                                        committeeList = committeeList.sort((a, b) => a.label.localeCompare(b.label));\n\n                                        this.setState({\n                                            dateList: [...new Map(dateList.map(x => [x[\"label\"], x])).values()],\n                                            committeeList: [...new Map(committeeList.map(x => [x[\"value\"], x])).values()]\n                                        })\n                                    }\n                                });\n                                if ([98, 102].includes(category.CalendarCategoryTypeID)) {\n                                    category.showAmendments = !!category.Agendas.flatMap(agenda => agenda.AgendaItems).find(agendaItem => agendaItem.IsActive && agendaItem.LDNumber);\n                                }\n                            })\n\n                            let commentEdit = [];\n                            let tempComments = [];\n\n                            for (let i = 0; i < calendarData.CalendarComments.length; i++) {\n                                let comment = calendarData.CalendarComments[i];\n                                comment.Sequence = i + 1;\n                                comments.push(comment);\n                                commentEdit.push(false);\n                                //I kid you not if I don't make a separate tempComment object here and push it into the tempComment array instead of inserting the entire comment\n                                //then this.state.comments gets mutated in the handleCommentChange function even though it would never get explicitly changed -JGB                    \n                                let tempComment = {\n                                    Sequence: comment.Sequence,\n                                    Comment: comment.Comment\n                                }\n                                tempComments.push(tempComment)\n                            }\n\n                            calendarData.CalendarCategories.forEach(category => this.handleAgendaSort(category.Agendas, category.CategoryType, category.CalendarCategoryTypeID, calendarData.ChamberCode));\n\n                            this.toggleHideAllCategories(true, calendarData.CalendarCategories);\n\n                            this.setState({\n                                calendarData: calendarData,\n                                showTitles: calendarData.ChamberCode === \"H\",\n                                pendingSave: noSavedItems,\n                                comments: comments,\n                                tempComments: tempComments,\n                                isLoaded: true,\n                                calendarDate: calendarData.CalendarDate,\n                                commentEdit: commentEdit,\n                            }, () => {\n                                //Get bills in the session for the bill dropdown\n                                this.props.actions.getSessionBills('?sessionID= ' + this.state.calendarData.SessionID).then(() => {\n                                    let billList = [...this.props.bills.sessionBills];\n                                    billList.forEach(bill => {\n                                        bill.label = bill.LegislationNumber\n                                        bill.value = bill.LegislationID\n                                    });\n                                    this.setState({\n                                        billList: billList,\n                                    })\n                                })\n                                this.props.actions.getSessionById(this.state.calendarData.SessionID)\n                                    .then(() =>\n                                        this.setState({ selectedSession: this.props.session.selectedSession })\n                                    );\n                            });\n                        })\n                });\n            });\n    }\n\n    togglePreview() {\n        const opposite = !this.state.showPreview;\n        this.setState({\n            showPreview: opposite\n        });\n    }\n\n    handleCommentChange(e, sequence) {\n        let tempComments = [...this.state.tempComments];\n\n        tempComments.find(x => x.Sequence === sequence).Comment = e.target.value;\n\n        this.setState({\n            tempComments: tempComments\n        });\n    }\n\n    updateAgenda(organizedBills, saveRequired) {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.CalendarCategories = organizedBills;\n\n        this.setState({\n            calendarData: calendarData,\n            pendingSave: saveRequired === undefined ? this.state.pendingSave : saveRequired\n        }, () => {\n            this.forceUpdate();\n        });\n    }\n\n    updateAgendaItems(agendaItems, categoryIndex, agendaIndex) {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.CalendarCategories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].AgendaItems = agendaItems;\n\n        this.setState({\n            calendarData: calendarData,\n            pendingSave: true\n        });\n    }\n\n    changeCategoryDropdown(value) {\n        this.setState({\n            selectedCategory: value\n        });\n    }\n\n    addCategory() {\n        const selectedCategory = this.state.selectedCategory;\n        //Used to find the new index of the category so the hidden categories indices can be updated\n        const categoryFinder = new Date().getTime();\n        let organizedBills = [...this.state.calendarData.CalendarCategories];\n        let newCalendarCategory = {\n            IsLegislationCategory: selectedCategory.IsLegislationCategory,\n            Agendas: [],\n            CalendarCategoryTypeID: selectedCategory.CalendarCategoryTypeID,\n            CategoryCode: selectedCategory.CategoryCode,\n            Description: selectedCategory.Description,\n            PluralDescription: selectedCategory.PluralDescription,\n            DisplayType: selectedCategory.DisplayType,\n            CategoryType: selectedCategory.CategoryType,\n            Sequence: selectedCategory.Sequence,\n            isNewCategory: categoryFinder\n        }\n        organizedBills.push(newCalendarCategory);\n        //Sort the calendar by smallest to greatest sequence\n        organizedBills.sort((a, b) => (a.Sequence > b.Sequence) ? 1 : -1)\n        //Update the categories that are hidden since the array indices have changed\n        const newCategoryIndex = organizedBills.filter(c => !c.DeletionDate).findIndex(cat => cat.isNewCategory === categoryFinder);\n        if (newCategoryIndex !== -1) {\n            let hideCategories = this.state.hideCategories;\n            hideCategories.splice(newCategoryIndex, 0, false);\n            this.setState({\n                hideCategories: hideCategories\n            });\n        }\n        //Remove the selected category so the user doesn't accidentally add it twice\n        this.setState({\n            selectedCategory: ''\n        });\n        this.updateAgenda(organizedBills, true);\n\n    }\n\n    deleteCategory(category) {\n        let calendarData = { ...this.state.calendarData };\n        const selectedCategoryIndex = calendarData.CalendarCategories.filter(c => !c.DeletionDate).findIndex(c => c.CategoryCode === category.CategoryCode);\n        calendarData.CalendarCategories.filter(c => !c.DeletionDate)[selectedCategoryIndex].DeletionDate = new Date();\n\n        let hideCategories = this.state.hideCategories;\n        if (hideCategories[selectedCategoryIndex] !== null && hideCategories[selectedCategoryIndex] !== undefined) {\n            hideCategories.splice(selectedCategoryIndex, 1);\n        }\n        this.setState({ calendarData, hideCategories })\n    }\n\n    toggleHideCategory(catIndex) {\n        let hideCategories = this.state.hideCategories;\n        hideCategories[catIndex] = !hideCategories[catIndex]\n        this.setState({\n            hideCategories: hideCategories\n        });\n    }\n\n    toggleHideAllCategories(hide, calendarCategories) {\n        let hideCategories = this.state.hideCategories;\n        calendarCategories = calendarCategories || this.state.calendarData.CalendarCategories;\n        calendarCategories.forEach((cat, catIndex) => {\n            hideCategories[catIndex] = hide\n        })\n        this.setState({\n            hideCategories: hideCategories\n        });\n    }\n\n    toggleHideAllNonIncludedBills() {\n        this.setState({\n            hideAllNonIncludedBills: !this.state.hideAllNonIncludedBills\n        });\n    }\n\n    changeBillDropdown(index, value) {\n        let selectedBill = [...this.state.selectedBill];\n        selectedBill[index] = value;\n        this.setState({\n            selectedBill: selectedBill\n        });\n    }\n\n    changeDateDropdown(value, callback) {\n        this.setState({\n            selectedDate: value\n        }, () => {\n            if (this.state.selectedDate && this.state.selectedCommittee)\n                this.setPending();\n            if (callback) {\n                callback();\n            }\n        });\n    }\n\n    changeCommitteeDropdown(value, callback) {\n        this.setState({\n            selectedCommittee: value\n        }, () => {\n            if (this.state.selectedDate && this.state.selectedCommittee)\n                this.setPending();\n            if (callback) {\n                callback();\n            }\n        });\n    }\n\n    setPending() {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.CalendarCategories.forEach((category, i) => {\n            category.Agendas.forEach((agenda, j) => {\n                //If a given agenda item matches one filter (if one filter is selected) or both filters (if both are selected) \n                //Then mark it isActive and give it the pending value so we know to deactivate it if the user changes the filter selections   \n                //Otherwise if it's active, pending, and it no longer matches the filters then remove the pending value and deactivate it so it's hidden\n                if (((!this.state.selectedDate || this.state.selectedDate === \"\") && this.state.selectedCommittee && this.state.selectedCommittee.value === agenda.CommitteeID && !agenda.IsHidden && agenda.pending !== false)\n                    || ((!this.state.selectedCommittee || this.state.selectedCommittee === \"\") && this.state.selectedDate && this.state.selectedDate.value === agenda.CandidateDate && !agenda.IsHidden && agenda.pending !== false)\n                    || (this.state.selectedDate && this.state.selectedDate !== \"\" && this.state.selectedCommittee && this.state.selectedCommittee !== \"\" && this.state.selectedCommittee.value === agenda.CommitteeID && this.state.selectedDate.value === agenda.CandidateDate && !agenda.IsHidden && agenda.pending !== false)) {\n                    agenda.IsActive = true;\n                    //Disabling the pending feature which removes bills from the calendar if they've been included but not saved. I feel like there's a chance they'll want it back -JGB\n                    //agenda.pending = true; \n                } else if (agenda.IsActive === true && agenda.pending === true) {\n                    agenda.IsActive = false;\n                    delete agenda.pending;\n                }\n            })\n\n            category.Agendas = this.handleAgendaSort(category.Agendas, category.CategoryType, category.CalendarCategoryTypeID);\n        })\n\n        this.setState({\n            calendarData\n        })\n    }\n\n    addBill(index, callback) {\n        let calendarCategories = [...this.state.calendarData.CalendarCategories];\n        let newAgenda = {};\n\n        //Check whether to move the bill from another category or add the bill\n        let billExists = false;\n        if (this.state.selectedBill[index]) {\n            let associatedCategory = calendarCategories.filter(c => !c.DeletionDate)[index];\n            calendarCategories.some((category, categoryIndex) => {\n                const duplicateBillIndex = category.Agendas.findIndex(bill => bill.LegislationID === this.state.selectedBill[index].LegislationID);\n                if (duplicateBillIndex >= 0) {\n                    billExists = true;\n                    newAgenda = { ...calendarCategories[categoryIndex].Agendas[duplicateBillIndex] };\n                    newAgenda.IsActive = true;\n                    newAgenda.CalendarCategoryTypeID = associatedCategory.CalendarCategoryTypeID;\n                    newAgenda.CalendarCategoryID = associatedCategory.CalendarCategoryID;\n                    calendarCategories[categoryIndex].Agendas.splice(duplicateBillIndex, 1);\n                    return true;\n                }\n            });\n\n            if (!billExists) {\n                newAgenda = {\n                    CalendarCategoryTypeID: associatedCategory.CalendarCategoryTypeID,\n                    CalendarCategoryID: associatedCategory.CalendarCategoryID,\n                    IsActive: true,\n                    LegislationID: this.state.selectedBill[index].LegislationID,\n                    LegislationNumber: this.state.selectedBill[index].LegislationNumber,\n                    LegislationKey: this.state.selectedBill[index].LegislationKey,\n                    Patrons: this.state.selectedBill[index].Patrons,\n                    LegislationDescription: this.state.selectedBill[index].Description,\n                    LegislationTitle: this.state.selectedBill[index].LegislationTitle,\n                    Ranking: null\n                }\n            }\n\n            associatedCategory.Agendas.splice(0, 0, newAgenda);\n            associatedCategory.Agendas = this.handleAgendaSort(associatedCategory.Agendas, associatedCategory.CategoryType, associatedCategory.CalendarCategoryTypeID)\n\n            this.updateAgenda(calendarCategories, true);\n\n            //Remove object so the bill is no longer currently selected in the dropdown\n            let selectedBill = [...this.state.selectedBill];\n            selectedBill[index] = '';\n            this.setState({\n                selectedBill: selectedBill\n            });\n        }\n\n        if (callback) {\n            callback();\n        }\n    }\n\n    handleBulkAgendaSort(calendar) {\n        calendar.CalendarCategories.forEach((category, i) => {\n            if (category.Agendas) {\n                const response = this.handleAgendaSort(category.Agendas, category.CategoryType, category.CalendarCategoryTypeID)\n                category.Agendas = response;\n            }\n\n            //Persist old showAmendments after save or unpublish\n            if ([98, 102].includes(category.CalendarCategoryTypeID)) {\n                category.showAmendments = !!category.Agendas.flatMap(agenda => agenda.AgendaItems).find(agendaItem => agendaItem.IsActive && agendaItem.LDNumber);\n            }\n        })\n\n        return calendar\n    }\n\n    handleAgendaSort(agendas, categoryType, categoryTypeId, chamberCode) {\n        let unrankedAgendas = [];\n        let rankedAgendas = [];\n        let inactiveAgendas = [];\n        let rankings = [];\n\n        if (agendas && categoryType != \"Order\") {\n            agendas.forEach((agenda) => {\n                if (!agenda.Ranking && agenda.IsActive) {\n                    unrankedAgendas.push(agenda);\n                } else if (agenda.IsActive) {\n                    rankedAgendas.push(agenda);\n                    rankings.push(agenda.Ranking);\n                } else {\n                    inactiveAgendas.push(agenda)\n                }\n            })\n\n            rankings.sort((a, b) => a - b);\n\n            let gaps = [];\n            for (let i = 1; i < rankings.length; i++) {\n                gaps.push(rankings[i] - rankings[i - 1]);\n            }\n\n            if (NUMERIC_SORT_CATEGORIES.includes(categoryTypeId)) {\n                rankedAgendas.sort((a, b) => sortAgendasNumerically(a, b, this.state.calendarData.ChamberCode ?? chamberCode));\n            } else {\n                rankedAgendas.sort((a, b) => sortAgendas(a, b, this.state.calendarData.ChamberCode));\n            }\n            if (NUMERIC_SORT_CATEGORIES.includes(categoryTypeId)) {\n                unrankedAgendas.sort((a, b) => sortAgendasNumerically(a, b, this.state.calendarData.ChamberCode ?? chamberCode));\n            } else {\n                unrankedAgendas.sort((a, b) => sortAgendas(a, b, this.state.calendarData.ChamberCode));\n            }\n            if (NUMERIC_SORT_CATEGORIES.includes(categoryTypeId)) {\n                inactiveAgendas.sort((a, b) => sortInactiveAgendasNumerically(a, b, this.state.calendarData.ChamberCode ?? chamberCode));\n            } else {\n                inactiveAgendas.sort((a, b) => sortInactiveAgendas(a, b, this.state.calendarData.ChamberCode ?? chamberCode));\n            }\n\n            //If there are multiple ranks with a gap larger than 1 place all unranked agendas between them\n            if (new Set(rankings).size > 1 && Math.max(...gaps) > 1) {\n                let insertPoint = gaps.findIndex(x => x === Math.max(...gaps)) + 1\n\n                for (let i = 0; i < unrankedAgendas.length; i++) {\n                    rankedAgendas.splice(insertPoint, 0, unrankedAgendas[i]);\n                    insertPoint++;\n                }\n\n                return rankedAgendas.concat(inactiveAgendas);\n            } else {\n                //If the largest rank is greater than 50 put all unranked agendas above the ranked agendas, otherwise put them all at the bottom\n                if (Math.max(...rankings) >= 50) {\n                    return unrankedAgendas.concat(rankedAgendas).concat(inactiveAgendas);\n                } else {\n                    return rankedAgendas.concat(unrankedAgendas).concat(inactiveAgendas);\n                }\n            }\n        } else {\n            return agendas;\n        }\n    }\n\n    genCalendarPreview(category) {\n        this.setState({\n            gettingPdf: true\n        });\n        // This endpoint returns a pdf document and not json so the partnerRequest function will not work\n        // It doesn't need to be saved to the redux store because it will not be referenced after the user sees it. So it is called here within the component.\n        const API_URL = window.env ? window.env.API_SERVER : '';\n        const idToken = 'LIS_ID_TOKEN';\n        let signal = new window.AbortController().signal;\n        const config = {\n            headers: {\n                'content-type': \"application/json; charset=utf-8\",\n                Authorization: \"Bearer \" + localStorage.getItem(idToken),\n                'WebAPIKey': process.env.REACT_APP_API_KEY\n            },\n            method: \"GET\",\n            signal: signal\n        };\n        let params = `?calendarId=${this.state.calendarData.CalendarID}`\n        if (category) {\n            params += `&calendarCategoryID=${category.CalendarCategoryID}`\n        }\n        fetch((API_URL || process.env.REACT_APP_CALENDAR_FILE_API_URL) + '/CalendarFileGeneration/api/PreviewCalendarFileAsync' + params, config)\n            .then(response => {\n                if (response.status === 204) {\n                    throw 'No Content';\n                } else if (response.status > 399) {\n                    throw response;\n                } else {\n                    response.blob()\n                        .then(res => {\n                            if (this.pdfRef && this.pdfRef.current) {\n                                let pdfRef = this.pdfRef.current;\n                                pdfRef.setAttribute('src', URL.createObjectURL(res));\n                                pdfRef.onload = () => {\n                                    this.setState({\n                                        gettingPdf: false\n                                    });\n                                };\n                            }\n                        })\n                }\n            }).catch(err => {\n                if (err.name === 'AbortError') {\n                    return;\n                }\n                this.setState({\n                    gettingPdf: false\n                });\n                //This is a response and the text needs to be extracted\n                if (err.text) {\n                    err.text().then(err => console.log(err.toString()));\n                } else {\n                    console.log(err.toString())\n                }\n                this.props.actions.makeToast([{ message: \"Failed To Get Data\", type: \"failure\" }]);\n            })\n    }\n\n    addComment() {\n        let newComments = this.state.comments;\n        let newTempComments = this.state.tempComments\n\n        newComments.push(\n            {\n                CalendarID: this.state.calendarData.CalendarID,\n                Comment: \"\",\n                Sequence: this.state.comments.length > 0 ? this.state.comments[this.state.comments.length - 1].Sequence + 1 : 1\n            }\n        )\n\n        newTempComments.push(\n            {\n                Comment: \"\",\n                Sequence: newComments[newComments.length - 1].Sequence\n            }\n        )\n\n        this.setState({\n            comments: newComments,\n            tempComments: newTempComments\n        }, () => {\n            this.toggleCommentEdit(newComments[newComments.length - 1].Sequence)\n        })\n    }\n\n    removeComment(i) {\n        let newComments = this.state.comments;\n        if (newComments[i].CalendarCommentID != undefined) {\n            newComments[i].DeletionDate = moment().toISOString();\n            newComments[i].Sequence = 0;\n            newComments.sort((a, b) => a.Sequence - b.Sequence);\n        } else {\n            newComments.splice(i, 1);\n        }\n\n        let newSequence = 1;\n\n        for (let j = 0; j < newComments.length; j++) {\n            if (!newComments[j].DeletionDate) {\n                newComments[j].Sequence = newSequence;\n                newSequence++;\n            }\n        }\n\n        this.setState({\n            comments: newComments\n        })\n    }\n\n    commentShift(i, shiftUp) {\n        let newComments = [...this.state.comments];\n        let newTempComments = [...this.state.tempComments];\n        let newSequence = shiftUp ? newComments[i - 1].Sequence : newComments[i + 1].Sequence;\n\n        let commentEdit = [...this.state.commentEdit];\n        commentEdit[i] = commentEdit[shiftUp ? i - 1 : i + 1] == true ? true : false;\n        commentEdit[shiftUp ? i - 1 : i + 1] = true;\n\n        newComments[i].Sequence = newSequence;\n        newTempComments[i].Sequence = newSequence\n\n        if (shiftUp) {\n            newComments[i - 1].Sequence = newSequence + 1;\n            newTempComments[i - 1].Sequence = newSequence + 1;\n        } else {\n            newComments[i + 1].Sequence = newSequence - 1;\n            newTempComments[i + 1].Sequence = newSequence - 1;\n        }\n\n        newComments.sort((a, b) => a.Sequence - b.Sequence);\n        newTempComments.sort((a, b) => a.Sequence - b.Sequence);\n\n        this.setState({\n            comments: newComments,\n            tempComments: newTempComments,\n            commentEdit: commentEdit\n        })\n    }\n\n    handleProFormaChange() {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.IsProforma = !calendarData.IsProforma\n        this.setState({\n            calendarData: calendarData\n        });\n    }\n\n    toggleCalendarPreview(categoryIndex) {\n        this.setState({\n            showCategoryPreview: categoryIndex\n        });\n    }\n\n    togglePortal(state, category) {\n        this.setState({\n            showPortal: !state\n        }, () => {\n            if (this.state.showPortal && category) {\n                this.genCalendarPreview(category === 'All' ? '' : category);\n            }\n        });\n    }\n\n    saveCalendar(publishFlag) {\n        this.setState({ isSaving: true });\n        let calendarSave = { ...this.state.calendarData };\n        //Add new comments\n        calendarSave.CalendarComments = this.state.comments;\n\n        //If saving or publishing set isActive off showAmendments. If unpublishing, set showAmendments off isActive. \n        calendarSave.CalendarCategories.forEach(category => {\n            if ([98, 102].includes(category.CalendarCategoryTypeID)) {\n                if (publishFlag || (!calendarSave.IsPublic && !publishFlag)) {\n                    category.Agendas.forEach(agenda => {\n                        agenda.AgendaItems?.forEach(item => {\n                            if (item.LDNumber) {\n                                item.IsActive = category.showAmendments;\n                            }\n                        });\n                    });\n                } else if (!publishFlag) {\n                    category.showAmendments = !!category.Agendas.flatMap(agenda => agenda.AgendaItems).find(agendaItem => agendaItem.IsActive && agendaItem.LDNumber);\n                }\n            }\n        })\n\n        calendarSave.CalendarCategories.forEach(category => {\n            const response = this.handleAgendaSort(category.Agendas, category.CategoryType, category.CalendarCategoryTypeID)\n            response.forEach((agenda, i) => {\n                if (agenda.IsActive) {\n                    agenda.Sequence = i + 1\n                }\n            })\n            category.Agendas = response;\n        });\n\n        //Set whether it should be published or not. The published value depends on what button the user clicked\n        calendarSave.IsPublic = publishFlag;\n        this.props.actions.saveCalendar({ Calendars: [calendarSave] })\n            .then(failureMessage => {\n                if (this.state.showPreview || calendarSave.IsPublic) {\n                    let content = this.componentRef.innerHTML.replace(/\\\\\"/g, '');\n                    this.props.actions.sendCalendarHtml({ Chamber: calendarSave.ChamberCode, CalendarDate: calendarSave.CalendarDate, CalendarNumber: calendarSave.CalendarNumber, ContentHTML: content });\n                }\n                if (publishFlag) {\n                    //Calendars cannot be edited once published so send the user back to the grid\n                    const calendarId = this.props.calendar.calendarSave.CalendarID;\n                    this.props.navigate('/calendar-management');\n                    this.props.actions.saveCalendarFile(\"?calendarID=\" + calendarId)\n                } else {\n                    //If the form was not published then get the new mod dates and update the React state variables\n                    let calendarSave = { ...this.props.calendar.calendarSave };\n                    let comments = [];\n\n                    for (let i = 0; i < calendarSave.CalendarComments.length; i++) {\n                        let comment = calendarSave.CalendarComments[i];\n                        comment.Sequence = i + 1;\n                        comments.push(comment);\n                    }\n\n                    const response = this.handleBulkAgendaSort(calendarSave)\n                    this.setState({\n                        calendarData: response,\n                        comments: comments,\n                        isSaving: false,\n                        pendingSave: false,\n                        calendarDate: calendarSave.CalendarDate\n                    }, () => {\n                        this.forceUpdate();\n                    });\n                }\n\n                let toasts = [];\n                if (failureMessage && failureMessage.includes(\"Minutes\")) {\n                    toasts.push({ message: \"Problem with Minutes Creation\", type: \"failure\" });\n                }\n                toasts.push({ message: `Calendar ${publishFlag ? 'Published' : 'Saved'}`, type: \"success\" });\n                this.props.actions.makeToast(toasts)\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isSaving: false\n                });\n                console.log(err)\n                this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n            });\n    }\n\n    handlePdfFile(e) {\n        this.setState({\n            selectedFile: e.target.files[0]\n        });\n    }\n\n    submitPdfFile() {\n        this.setState({\n            isSubmittingFile: true\n        });\n        this.props.actions.replacePdf('?calendarID=' + this.state.calendarData.CalendarID, this.state.selectedFile)\n            .then(() => {\n                this.setState({\n                    isSubmittingFile: false,\n                    selectedFile: ''\n                });\n                this.props.actions.makeToast([{ message: \"PDF Replacement Success\", type: \"success\" }]);\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isSubmittingFile: false\n                });\n                this.props.actions.makeToast([{ message: \"PDF Replacement Failed\", type: \"failure\" }]);\n            })\n    }\n\n    changeConveneTime(date) {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.CalendarDate = date.toISOString();\n        this.setState({\n            calendarData: calendarData\n        });\n    }\n\n    toggleAgenda(catIndex, agendaIndex) {\n        let calendar = { ...this.state.calendarData };\n        let agenda = calendar.CalendarCategories.filter(c => !c.DeletionDate)[catIndex].Agendas[agendaIndex];\n        agenda.show = !agenda.show;\n        if (agenda.IsActive && agenda.LegislationNumber && !agenda.Versions) {\n            agenda.Versions = []\n            this.props.actions.getBillVersionByBillNumber('?BillNumber=' + calendar.CalendarCategories.filter(c => !c.DeletionDate)[catIndex].Agendas[agendaIndex].LegislationNumber + '&SessionID=' + calendar.SessionID)\n                .then(() => {\n                    // Get the calendar data again just in case the user toggled the agenda items\n                    calendar = { ...this.state.calendarData };\n                    let versions = this.props.bills.billVersion.filter(ver => ver.Version !== \"Amendment\" && moment(ver.DraftDate).isSameOrBefore(calendar.CalendarDate))\n                    // Most recent versions first\n                    versions = versions.sort((a, b) => moment(a.DraftDate).isSameOrBefore(b.DraftDate))\n                    calendar.CalendarCategories.filter(c => !c.DeletionDate)[catIndex].Agendas[agendaIndex].Versions = versions\n                    this.setState({\n                        calendarData: calendar\n                    });\n                }).catch(err => {\n                    if (err === \"Aborted\") {\n                        return\n                    }\n                    calendar = { ...this.state.calendarData };\n                    calendar.CalendarCategories.filter(c => !c.DeletionDate)[catIndex].Agendas[agendaIndex].Versions = \"fail\";\n                    this.setState({\n                        calendarData: calendar\n                    });\n                })\n        }\n        this.setState({\n            calendarData: calendar\n        });\n    }\n\n    toggleCommentEdit(sequence) {\n        let commentEdit = [...this.state.commentEdit];\n        let tempComments = [...this.state.tempComments];\n\n        commentEdit[sequence - 1] = !commentEdit[sequence - 1];\n        //Reset the temporary comment value\n        tempComments.find(x => x.Sequence === sequence).Comment = this.state.comments.find(x => x.Sequence === sequence).Comment;\n\n        this.setState({\n            commentEdit: commentEdit,\n            tempComments: tempComments\n        })\n    }\n\n    confirmCommentEdit(sequence) {\n        let comments = [...this.state.comments];\n\n        comments.find(x => x.Sequence === sequence).Comment = this.state.tempComments.find(x => x.Sequence === sequence).Comment;\n\n        this.setState({\n            comments: comments\n        }, () => {\n            this.toggleCommentEdit(sequence)\n        })\n    }\n\n    toggleShowTitles() {\n        this.setState({\n            showTitles: !this.state.showTitles\n        })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { message } = this.state;\n\n        let conveneTime = moment.utc(this.state.calendarData.CalendarDate);\n        let timeChecker = conveneTime.clone().startOf('day');\n        // By default created calendars have a time of 00:00. If it is midnight then display it as 12:00 pm instead\n        if (conveneTime.isSame(timeChecker)) {\n            conveneTime.hour(12).startOf('hour');\n        }\n        if (message) {\n            return (\n                <div className=\"dlas-forms\">\n                    <span>{message}</span>\n                </div>\n            );\n        }\n        else {\n            let calendarFileUrl = '';\n            if (this.state.calendarData.CalendarFiles) {\n                const pdfFile = this.state.calendarData.CalendarFiles.find(file => file.FileURL.toUpperCase().includes('PDF'));\n                if (pdfFile) {\n                    const url = new URL(pdfFile.FileURL);\n                    calendarFileUrl = lisDocDomain + (url.pathname[0] === '/' ? url.pathname : '/' + url.pathname);\n                }\n            }\n\n            //This calendarTime logic is also set in lis-public-calendar-details, if changed here, change there as well\n            const calendarTime = moment.utc(this.state.calendarData.CalendarDate).isSame(moment.utc(this.state.calendarData.CalendarDate).hour(0), \"minute\")\n                || moment.utc(this.state.calendarData.CalendarDate).isSame(moment.utc(this.state.calendarData.CalendarDate).hour(12), \"minute\")\n                ? \"12 noon\"\n                : moment.utc(this.state.calendarData.CalendarDate).format(\"h:mm a\");\n\n            if (this.state.showPreview) {\n                return (\n                    <div style={{ paddingBottom: '75px' }}>\n                        {this.state.showPortal &&\n                            <Popout togglePortal={this.togglePortal} windowTitle=\"PDF Preview\">\n                                {this.state.gettingPdf &&\n                                    <div className=\"center-spinner spinner\">You must save before seeing changes in this PDF preview</div>\n                                }\n                                <iframe style={{ display: this.state.gettingPdf ? 'none' : 'block', width: '100%', height: '100%' }} ref={this.pdfRef}></iframe>\n                            </Popout>\n                        }\n                        <div className=\"flex-row\">\n                            <h2>Calendar Preview</h2>\n                            <ReactToPrint\n                                trigger={() => <a type=\"button\" className=\"button print\"> Print</a>}\n                                content={() => this.componentRef}\n                                pageStyle={\"break-inside: avoid\"}\n                            />\n                        </div>\n                        <CalendarDetailsComponent\n                            calendar={this.state.calendarData}\n                            calendarTime={calendarTime}\n                            session={this.state.selectedSession}\n                            comments={this.state.comments}\n                            updateAgendaItems={this.updateAgendaItems}\n                            isCalendarForm={true}\n                            toggleAgenda={this.toggleAgenda}\n                            sessionList={this.props.session.sessionList}\n                            calendarCategoryReferences={this.state.calendarCategories}\n                        />\n                        <div style={{ display: \"none\" }}>\n                            <div ref={el => (this.componentRef = el)}>\n                                <CalendarDetailsPrintout\n                                    calendar={this.state.calendarData}\n                                    session={this.state.selectedSession}\n                                    comments={this.state.comments}\n                                />\n                            </div>\n                        </div>\n                        <div className=\"align-right floating-button-bar inline-list\">\n                            <button onClick={() => this.saveCalendar(PUBLISH_CALENDAR)} disabled={this.state.isSaving} className=\"button\">{this.state.isSaving ? \"Publishing...\" : \"Publish\"}</button>\n                            <button onClick={this.togglePreview} className=\"button secondary\">Edit</button>\n                            <button disabled={this.state.pendingSave || this.state.calendarData.IsPublic} onClick={() => this.togglePortal(this.state.showPortal, 'All')} className=\"button\" type=\"button\">PDF Preview</button>\n                        </div>\n                    </div>\n                );\n            } else {\n                return (\n                    <React.Fragment>\n                        <div>\n                            <Prompt\n                                when={this.state.pendingSave === true}\n                                message={`You have unsaved changes. Are you sure you would like to leave?`}\n                            />\n                        </div>\n                        {this.state.calendarData ? <h1>{(this.state.calendarData.ChamberCode === \"H\" ? \"House \" : \"Senate \") + \"Calendar\"}</h1> : <h1>&nbsp;</h1>}\n                        {this.state.showPortal &&\n                            <Popout togglePortal={this.togglePortal} windowTitle=\"Preview\">\n                                {this.state.gettingPdf &&\n                                    <div className=\"center-spinner spinner\">You must save before seeing changes in this PDF preview</div>\n                                }\n                                <iframe style={{ display: this.state.gettingPdf ? 'none' : 'block', width: '100%', height: '100%' }} ref={this.pdfRef}></iframe>\n                            </Popout>\n                        }\n                        {this.state.showCategoryPreview !== -1 &&\n                            <div onClick={() => this.toggleCalendarPreview(-1)} className=\"overlay center-content\">\n                                <div className=\"full\">\n                                    <div onClick={e => e.stopPropagation()} className=\"dlas-forms user-forms advanced-search overlay-content animated-fade-in-up\" ref={el => (this.componentRef = el)}>\n                                        <CalendarDetailsComponent\n                                            calendar={{ ...this.state.calendarData, CalendarCategories: [this.state.calendarData.CalendarCategories[this.state.showCategoryPreview]] }}\n                                            calendarTime={calendarTime}\n                                            session={this.state.selectedSession}\n                                            comments={[]}\n                                            userClaims={{ resources: [] }}\n                                            toggleAgenda={this.toggleAgenda}\n                                            sessionList={this.props.session.sessionList}\n                                            isCalendarForm={true}\n                                            calendarCategoryReferences={this.state.calendarCategories}\n                                        />\n                                        <button type=\"button\" onClick={() => this.toggleCalendarPreview(-1)} className=\"button secondary\">Close</button>\n                                    </div>\n                                </div>\n                            </div>\n                        }\n                        <div className=\"user-forms\">\n                            {!this.state.isLoaded &&\n                                <div className=\"center-spinner spinner\">Loading results...</div>\n                            }\n                            {this.state.isLoaded &&\n                                <div className=\"dlas-forms\">\n                                    <span className=\"error-message\">{message}</span>\n\n                                    <fieldset style={{ paddingBottom: '50px' }} className=\"fieldset-collapse fieldset-open\">\n                                        <legend>Calendar Information</legend>\n                                        <div>\n                                            <div className=\"multi-row four no-margin\">\n                                                <div>\n                                                    <Fields.TextInput\n                                                        value={this.state.selectedSession ? this.state.selectedSession.SessionYear + ' ' + this.state.selectedSession.DisplayName : ''}\n                                                        disabled={true}\n                                                    />\n                                                </div>\n                                                <div>\n                                                    <Fields.TextInput\n                                                        value={this.state.calendarData ? moment(this.state.calendarData.CalendarDate).format(\"L\") + (this.state.calendarData.CalendarNumber > 1 ? [' (', ')'].join('Supp. ' + (this.state.calendarData.CalendarNumber - 1)) : '') : ''}\n                                                        disabled\n                                                    />\n                                                </div>\n                                                <div>\n                                                    {/* Supplemental calendars do not get this date picker */}\n                                                    {this.state.calendarData.CalendarNumber < 2 &&\n                                                        <DatePicker\n                                                            selected={conveneTime}\n                                                            showTimeSelect\n                                                            showTimeSelectOnly\n                                                            dateFormat=\"h:mm a\"\n                                                            timeFormat=\"h:mm a\"\n                                                            onChange={this.changeConveneTime}\n                                                        />\n                                                    }\n                                                </div>\n                                                <div className=\"flex-row flex-end flex-vertical-center\">\n                                                    {calendarFileUrl && !this.state.isSubmittingFile &&\n                                                        <>\n                                                            <button style={{ marginRight: 5 }} type=\"button\" className=\"button small-button file-button\"><input type=\"file\" accept=\".pdf\" onChange={this.handlePdfFile} />{this.state.selectedFile ? this.state.selectedFile.name : \"Replace PDF\"}</button>\n                                                            {this.state.selectedFile ?\n                                                                <button onClick={this.submitPdfFile} type=\"button\" className=\"button small-button\">Submit</button>\n                                                                :\n                                                                <React.Fragment>\n                                                                    <a target=\"_blank\" className=\"icon pdf\" href={calendarFileUrl}></a>\n                                                                    {this.state.calendarData.CalendarNumber < 2 &&\n                                                                        <a target=\"_blank\" className=\"icon file-empty\" style={{ marginLeft: \"5px\" }} href={calendarFileUrl.replace(\".PDF\", \"-padded.PDF\")}></a>}\n                                                                </React.Fragment>\n                                                            }\n                                                        </>\n                                                    }\n                                                    {calendarFileUrl && this.state.isSubmittingFile &&\n                                                        <div className=\"small-spinner\"></div>\n                                                    }\n                                                </div>\n                                            </div>\n                                            <div className=\"flex-row\">\n                                                <label className=\"label-and-checkbox pro-forma\"><input type=\"checkbox\" checked={this.state.calendarData.IsProforma} onChange={this.handleProFormaChange} /> Create a Pro Forma Calendar</label>\n                                                <button type=\"button\" className=\"button float-right title-toggle\" onClick={() => this.toggleShowTitles()}>{this.state.showTitles ? \"Show Bill Captions\" : \"Show Bill Titles\"}</button>\n                                            </div>\n                                            {this.state.comments.map((comment, i) => {\n                                                return (\n                                                    comment.DeletionDate === undefined &&\n                                                    <div className=\"grid-wrapper calendar-comment-row\" key={i}>\n                                                        {this.state.commentEdit[comment.Sequence - 1] ?\n                                                            <React.Fragment>\n                                                                <div>\n                                                                    <Fields.TextArea\n                                                                        label={\"Comment \" + comment.Sequence}\n                                                                        type=\"text\"\n                                                                        style={{ resize: 'vertical', minHeight: 65, width: \"100%\" }}\n                                                                        placeholder=\"Comments\"\n                                                                        value={this.state.tempComments.find(x => x.Sequence === comment.Sequence).Comment}\n                                                                        onChange={(e) => this.handleCommentChange(e, comment.Sequence)}\n                                                                    />\n                                                                </div>\n                                                                <div className=\"grid-wrapper two comment-controls\">\n                                                                    <div style={{ paddingTop: \"25px\" }}>\n                                                                        <button className=\"icon save\" style={{ marginRight: \"10px\" }} onClick={() => this.confirmCommentEdit(comment.Sequence)} />\n                                                                        <button className=\"icon delete\" onClick={() => this.toggleCommentEdit(comment.Sequence)} />\n                                                                    </div>\n                                                                    <div className=\"arrows\">\n                                                                        {i !== 0 && this.state.comments.length > 1 &&\n                                                                            <button className=\"arrow-up\" onClick={() => this.commentShift(i, true)} />\n                                                                        }\n                                                                        {i !== this.state.comments.length - 1 &&\n                                                                            <button className=\"arrow-down\" onClick={() => this.commentShift(i, false)} />\n                                                                        }\n                                                                    </div>\n                                                                </div>\n                                                            </React.Fragment>\n                                                            :\n                                                            <React.Fragment>\n                                                                <div>\n                                                                    <label>{\"Comment \" + comment.Sequence}</label>\n                                                                    <p class=\"calendar-comment\">{comment.Comment}</p>\n                                                                </div>\n                                                                <div className=\"grid-wrapper two\">\n                                                                    <div style={{ paddingTop: \"30px\", display: \"grid\", gridTemplateColumns: \"1fr 1fr\", gridGap: \"10px\" }}>\n                                                                        <button className=\"button edit\" onClick={() => this.toggleCommentEdit(comment.Sequence)} />\n                                                                        <button className=\"icon bin\" onClick={() => this.removeComment(i)} />\n                                                                    </div>\n                                                                    <div />\n                                                                </div>\n                                                            </React.Fragment>\n                                                        }\n                                                    </div>\n                                                )\n                                            })\n                                            }\n                                            <div className=\"add-comment\">\n                                                <button className=\"button float-right\" onClick={() => this.addComment()}>Add Comment</button>\n                                            </div>\n                                        </div>\n                                        <BillsGrid\n                                            organizedBills={this.state.calendarData.CalendarCategories}\n                                            updateAgenda={this.updateAgenda}\n                                            calendarCategories={this.state.calendarCategories}\n                                            hideCategories={this.state.hideCategories}\n                                            selectAllActive={this.state.selectAllActive}\n                                            selectAllInactive={this.state.selectAllInactive}\n                                            changeCategoryDropdown={this.changeCategoryDropdown}\n                                            selectedCategory={this.state.selectedCategory}\n                                            addCategory={this.addCategory}\n                                            deleteCategory={this.deleteCategory}\n                                            selectedBill={this.state.selectedBill}\n                                            changeBillDropdown={this.changeBillDropdown}\n                                            addBill={this.addBill}\n                                            billList={this.state.billList}\n                                            toggleCalendarPreview={this.toggleCalendarPreview}\n                                            pendingSave={this.state.pendingSave}\n                                            toggleHideCategory={this.toggleHideCategory}\n                                            toggleHideAllCategories={this.toggleHideAllCategories}\n                                            toggleHideAllNonIncludedBills={this.toggleHideAllNonIncludedBills}\n                                            hideAllNonIncludedBills={this.state.hideAllNonIncludedBills}\n                                            togglePortal={this.togglePortal}\n                                            showPortal={this.state.showPortal}\n                                            updateAgendaItems={this.updateAgendaItems}\n                                            calendarTime={calendarTime}\n                                            showTitles={this.state.showTitles}\n                                            changeDateDropdown={this.changeDateDropdown}\n                                            changeCommitteeDropdown={this.changeCommitteeDropdown}\n                                            dateList={this.state.selectedCommittee && this.state.selectedCommittee !== \"\" ? this.state.dateList.filter(x => x.committee.includes(this.state.selectedCommittee.value)) : this.state.dateList}\n                                            committeeList={this.state.selectedDate && this.state.selectedDate !== \"\" ? this.state.committeeList.filter(x => this.state.selectedDate.committee.includes(x.value)) : this.state.committeeList}\n                                            selectedCommittee={this.state.selectedCommittee}\n                                            selectedDate={this.state.selectedDate}\n                                            fullCommitteeList={this.props.committee.committeeList}\n                                            chamberCode={this.state.calendarData.ChamberCode}\n                                            sessionCode={this.state.calendarData.SessionCode}\n                                            userRoles={this.props.login.userClaims.roles}\n                                        />\n                                    </fieldset>\n                                    <div className=\"align-right floating-button-bar inline-list\">\n                                        <button disabled={this.state.isSaving} onClick={() => this.saveCalendar(SAVE_CALENDAR)} className=\"button\" type=\"submit\">{this.state.calendarData.IsPublic ? \"Unpublish\" : this.state.isSaving ? \"Saving...\" : \"Save\"}</button>\n                                        <button disabled={this.state.pendingSave || this.state.isSaving || this.state.calendarData.IsPublic} onClick={this.togglePreview} className=\"button\" type=\"button\">Preview</button>\n                                        <button disabled={this.state.pendingSave || this.state.isSaving || this.state.calendarData.IsPublic} onClick={() => this.togglePortal(this.state.showPortal, 'All')} className=\"button\" type=\"button\">PDF Preview</button>\n                                    </div>\n                                </div>\n                            }\n                        </div>\n                    </React.Fragment>\n                );\n            }\n        }\n    }\n};\n\nconst CalendarManagementForm = connect(\n    (state) => {\n        const { calendar, session, bills, nav, committee, login } = state;\n        return {\n            calendar,\n            session,\n            bills,\n            nav,\n            committee,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, calendarActionCreators, sessionActionCreators, billActionCreators, navActionCreators, committeeActionCreators), dispatch)\n        }\n    }\n)(HouseCalendarFormComponent)\n\nexport default CalendarManagementForm;\n","import React from \"react\";\nimport { LargeListSelect } from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport Select from 'react-select';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport ReactTooltip from 'react-tooltip';\nimport { Link } from 'react-router-dom';\nimport renderHTML from 'react-render-html';\nimport AgendaItemsComponent from '../../../lis-shared/lis-calendar/lis-agenda-items';\nimport moment from 'moment-timezone';\n\nconst isNotHidden = (agenda, category, committeeList) => (!agenda.CommitteeID && !agenda.IsHidden) || (agenda.IsActive && !agenda.IsHidden) || (committeeList.find(x => x.value == agenda.CommitteeID) && category.CalendarCategoryTypeID === 66) /* Bills or Resolutions Rereferred */\n\nconst NUMERIC_SORT_CATEGORIES = [72, 111, 109, 112, 60, 110, 98, 102, 83, 90, 87, 93, 100, 104, 117, 118, 105, 106, 66, 67, 96, 97, 64, 68, 69, 65];\n\nconst sortAgendas = (a, b, calendarChamber) => {\n    {\n        return b.IsActive !== a.IsActive\n            ? b.IsActive\n                ? 1\n                : -1\n            : a.Sequence > 0 && b.Sequence > 0 && a.Sequence !== b.Sequence\n                ? a.Sequence - b.Sequence > 0\n                    ? 1\n                    : -1\n                : a.CalendarDate !== b.CalendarDate\n                    ?\n                    !a.CalendarDate ?\n                        1 :\n                        !b.CalendarDate ? -1\n                            :\n                            a.CalendarDate - b.CalendarDate\n                    : a.CandidateDate !== b.CandidateDate\n                        ?\n                        !a.CandidateDate ?\n                            1 :\n                            !b.CandidateDate ? -1\n                                :\n                                a.CandidateDate - b.CandidateDate\n                        : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                            a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                ? -1 : 1\n                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) !== 0\n                                ? a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                    ? 1\n                                    : -1\n                                : a.LegislationKey && parseInt(a.LegislationKey) !== parseInt(b.LegislationKey)\n                                    ? parseInt(a.LegislationKey) - parseInt(b.LegislationKey) > 0\n                                        ? 1\n                                        : -1\n                                    : 0\n    }\n}\n\nconst sortAgendasNumerically = (a, b, calendarChamber) => {\n    {\n        return !a.IsActive && b.IsActive\n            ? 1\n            : a.IsActive && !b.IsActive\n                ? -1\n                : a.Sequence > 0 && b.Sequence > 0 && a.Sequence !== b.Sequence\n                    ? a.Sequence - b.Sequence > 0\n                        ? 1\n                        : -1\n                    : a.LegislationNumber && b.LegislationNumber && a.LegislationNumber[0] !== b.LegislationNumber[0] ?\n                        a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                            ? -1\n                            : 1\n                        : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                            ? 1\n                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                ? -1\n                                : a.LegislationKey > b.LegislationKey\n                                    ? 1\n                                    : -1\n    }\n}\n\nconst findLastByIsActiveThenCalendarDateThenCandidateDateThenLegChamberTypeKey = (a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate) => (\n    a.IsActive && findLastByCalendarDateThenCandidateDateThenLegChamberTypeKey(a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate)\n)\n\nconst findLastByCalendarDateThenCandidateDateThenLegChamberTypeKey = (a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate) => (\n    (((ignoreCalendarDate || (a.CalendarDate && b.CalendarDate && moment(a.CalendarDate).isSame(b.CalendarDate, \"day\"))) && findLastByLegChamberTypeKey(a, b, calendarChamber)) ||\n        (!ignoreCalendarDate && a.CalendarDate && b.CalendarDate && moment(a.CalendarDate).isBefore(b.CalendarDate, \"day\"))) ||\n    (((ignoreCandidateDate || (a.CandidateDate && b.CandidateDate && moment(a.CandidateDate).isSame(b.CandidateDate, \"day\"))) && findLastByLegChamberTypeKey(a, b, calendarChamber)) ||\n        (!ignoreCandidateDate && a.CandidateDate && b.CandidateDate && moment(a.CandidateDate).isBefore(b.CandidateDate, \"day\"))) ||\n    ((ignoreCalendarDate || (!a.CalendarDate && !b.CalendarDate)) && (ignoreCandidateDate || (!a.CandidateDate && !b.CandidateDate)) &&\n        findLastByLegChamberTypeKey(a, b, calendarChamber))\n    || (!ignoreCalendarDate && !b.CalendarDate && a.CandidateDate)\n    || !ignoreCandidateDate && !b.CandidateDate && a.CandidateDate\n)\n\nconst findLastByLegChamberTypeKey = (a, b, calendarChamber) => (\n    (a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === (calendarChamber === \"H\" ? 1 : -1)) ||\n    (a.LegislationNumber && a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === 0 && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) === -1) ||\n    (a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === 0 && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) === 0 && a.LegislationKey && a.LegislationKey < parseInt(b.LegislationKey))\n)\n\nconst getItemStyle = (isDragging, draggableStyle, isActive) => ({\n    // some basic styles to make the items look a bit nicer\n    userSelect: 'none',\n    // change background colour if dragging\n    background: isDragging ? '#34495e' : 'white',\n    color: isDragging ? 'white' : '#34495e',\n    border: 'none',\n    borderLeft: '1px solid #e0e0e0',\n    borderBottom: '1px solid #e0e0e0',\n    color: isActive ? '' : '#8b8b8b',\n    // styles we need to apply on draggables\n    ...draggableStyle,\n});\n\nclass SenateBillsGrid extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectAllActive: false,\n            selectAllInactive: false,\n            showAgendaItemEditor: -1,\n            showAgendaItemEditorCategoryIndex: -1,\n            lastCheckedBills: [],\n            textHeight: []\n        };\n        this.toggleSelectAll = this.toggleSelectAll.bind(this);\n        this.toggleRow = this.toggleRow.bind(this);\n        this.toggleBill = this.toggleBill.bind(this);\n        this.showAgendaItems = this.showAgendaItems.bind(this);\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.toggleEditCategoryDescription = this.toggleEditCategoryDescription.bind(this);\n        this.saveChange = this.saveChange.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.onDragEnd = this.onDragEnd.bind(this);\n        this.toggleAgendaItemEditor = this.toggleAgendaItemEditor.bind(this);\n        this.expandTitle = this.expandTitle.bind(this);\n        this.getCategoryBills = this.getCategoryBills.bind(this);\n        this.setDescription = this.setDescription.bind(this);\n        this.setBillsInConferenceCategoryDescription = this.setBillsInConferenceCategoryDescription.bind(this);\n        this.categoryDescriptionIsEdited = this.categoryDescriptionIsEdited.bind(this);\n        this.changeCommitteeDropdown = this.changeCommitteeDropdown.bind(this);\n        this.changeDateDropdown = this.changeDateDropdown.bind(this);\n        this.addBill = this.addBill.bind(this);\n        this.toggleShowAmendments = this.toggleShowAmendments.bind(this);\n        this.handleDescriptionChange = this.handleDescriptionChange.bind(this);\n    }\n\n    toggleSelectAll(categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n        const opposite = !organizedBills.filter(c => !c.DeletionDate)[categoryIndex].selectAll;\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].selectAll = opposite\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(leg => { if (isNotHidden(leg, organizedBills.filter(c => !c.DeletionDate)[categoryIndex], this.props.committeeList)) leg.checked = opposite });\n        this.props.updateAgenda(organizedBills);\n\n\n        let lastCheckedBills = this.state.lastCheckedBills;\n        lastCheckedBills[categoryIndex] = -1;\n        this.setState({\n            lastCheckedBills: lastCheckedBills\n        });\n    }\n\n    toggleRow(categoryIndex, itemIndex, e) {\n        let organizedBills = [...this.props.organizedBills];\n        let lastCheckedBills = this.state.lastCheckedBills;\n        let lastCheckedBill = lastCheckedBills[categoryIndex];\n        if (e.nativeEvent.shiftKey && !isNaN(lastCheckedBill) && lastCheckedBill !== -1) {\n            organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(agenda => agenda.checked = false);\n            for (let i = 0; i < Math.abs(itemIndex - lastCheckedBill); i++) {\n                const index = lastCheckedBill + i * (itemIndex - lastCheckedBill) / Math.abs(itemIndex - lastCheckedBill);\n                organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[index].checked = true;\n            }\n        } else {\n            lastCheckedBill = itemIndex;\n        }\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[itemIndex].checked = !organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[itemIndex].checked;\n        this.props.updateAgenda(organizedBills);\n\n        lastCheckedBills[categoryIndex] = lastCheckedBill;\n        this.setState({\n            lastCheckedBills: lastCheckedBills\n        });\n    }\n\n    categoryDescriptionIsEdited(categoryAsDisplayed, associatedReferenceCategory) {\n        if (this.props.chamberCode === 'H' && categoryAsDisplayed.CategoryCode === \"SENBRC\" || categoryAsDisplayed.CategoryCode === \"HOUBRC\") {\n            return !(\n                [\"House Bill in Conference\", \"Senate Bill in Conference\",\n                    \"House Bills in Conference\", \"Senate Bills in Conference\",\n                    \"House Joint Resolution in Conference\", \"Senate Joint Resolution in Conference\",\n                    \"House Joint Resolutions in Conference\", \"Senate Joint Resolutions in Conference\",\n                    \"House Bill and Joint Resolution in Conference\", \"Senate Bill and Joint Resolution in Conference\",\n                    \"House Bills and Joint Resolution in Conference\", \"Senate Bills and Joint Resolution in Conference\",\n                    \"House Bill and Joint Resolutions in Conference\", \"Senate Bill and Joint Resolutions in Conference\",\n                    \"House Bills and Joint Resolutions in Conference\", \"Senate Bills and Joint Resolutions in Conference\",\n                ].includes(categoryAsDisplayed.Description))\n        } else {\n            if (associatedReferenceCategory && associatedReferenceCategory.Description !== categoryAsDisplayed.Description && associatedReferenceCategory.PluralDescription !== categoryAsDisplayed.Description) {\n                return true;\n            } else {\n                return false;\n            }\n        }\n    }\n\n    setDescription(organizedBills, categoryIndex) {\n        let updatedOrganizedBills = [...organizedBills];\n\n        if (categoryIndex) {\n            //if it's been edited, leave it at that\n            const associatedReferenceCategory = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID);\n            if (this.categoryDescriptionIsEdited(updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex], associatedReferenceCategory)) {\n                //leave it alone\n            } else {\n                //otherwise, set description based on singular/plural reference description\n                if (this.props.chamberCode === 'H' && updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CategoryCode === \"SENBRC\" || updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CategoryCode === \"HOUBRC\") {\n                    updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].Description = this.setBillsInConferenceCategoryDescription(updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex]);\n                } else {\n                    if (associatedReferenceCategory) {\n                        if (updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.filter(x => x.IsActive).length > 1) {\n                            updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].Description = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID).PluralDescription;\n                        } else {\n                            updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].Description = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === updatedOrganizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID).Description;\n                        }\n                    }\n                }\n            }\n        } else {\n            //iterate through all\n            updatedOrganizedBills.forEach((cat, index) => {\n                //if it's been edited, leave it at that\n                const associatedReferenceCategory = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === updatedOrganizedBills[index].CalendarCategoryTypeID)\n                if (this.categoryDescriptionIsEdited(cat, associatedReferenceCategory)) {\n                    return;\n                }\n\n                //otherwise, set description based on singular/plural reference description                \n                if (this.props.chamberCode === 'H' && cat.CategoryCode === \"SENBRC\" || cat.CategoryCode === \"HOUBRC\") {\n                    updatedOrganizedBills[index].Description = this.setBillsInConferenceCategoryDescription(cat);\n                } else {\n                    if (associatedReferenceCategory) { //calendarCategories prop only contains same chamber categories, so could cause an NRE if iterating over an opposite-chamber category\n                        if (updatedOrganizedBills[index].Agendas.filter(x => x.IsActive).length > 1) {\n                            updatedOrganizedBills[index].Description = associatedReferenceCategory.PluralDescription;\n                        } else {\n                            updatedOrganizedBills[index].Description = associatedReferenceCategory.Description;\n                        }\n                    }\n                }\n            })\n        }\n\n        return updatedOrganizedBills;\n    }\n\n    setBillsInConferenceCategoryDescription(category) {\n        let existingDescription = category.Description;\n        let newTypeAndPluralityLanguage;\n        let newDescription;\n\n        //get all legislations in this category\n        const categoryLegislations = category.Agendas;\n        if (categoryLegislations) {\n            //filter to only the active legislations\n            const activeCategoryLegislations = categoryLegislations.filter(cl => cl.IsActive);\n            if (!activeCategoryLegislations.length) {\n                //not any active legislations - should only say 'bill'\n                newTypeAndPluralityLanguage = 'Bill';\n            } else {\n                const numResolutions = activeCategoryLegislations.filter(acl => acl.LegislationNumber[1] !== \"B\").length;\n                const numBills = activeCategoryLegislations.filter(acl => acl.LegislationNumber[1] === \"B\").length;\n                if (numResolutions > 0 && numBills > 0) {\n                    //At least one bill and at least one resolution\n                    newTypeAndPluralityLanguage = (numBills > 1 ? 'Bills' : 'Bill') + ' and Joint ';\n                    newTypeAndPluralityLanguage += numResolutions > 1 ? 'Resolutions' : 'Resolution';\n                } else if (numResolutions > 0 && numBills === 0) {\n                    //at least one resolution and no bills\n                    newTypeAndPluralityLanguage = numResolutions > 1 ? 'Joint Resolutions' : 'Joint Resolution';\n                } else if (numResolutions === 0 && numBills > 0) {\n                    //at least one bill and no resolutions\n                    newTypeAndPluralityLanguage = numBills > 1 ? 'Bills' : 'Bill';\n                }\n            }\n            newDescription = existingDescription.replace(/\\b(Bill and Joint Resolution|Bills and Joint Resolution|Bills and Joint Resolutions|Bill and Joint Resolutions|Bill|Bills|Joint Resolution|Joint Resolutions)\\b/, newTypeAndPluralityLanguage);\n        }\n\n        return newDescription;\n    }\n\n    toggleBill(categoryIndex, itemIndex) {\n        let organizedBills = [...this.props.organizedBills];\n        const sortNumeric = NUMERIC_SORT_CATEGORIES.includes(JSON.parse(JSON.stringify(organizedBills)).filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID);\n        let agenda = organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[itemIndex]\n        agenda.IsActive = !agenda.IsActive;\n        agenda.checked = false;\n        if (agenda.pending === false) {\n            delete agenda.pending;\n        }\n        organizedBills = this.setDescription(organizedBills, categoryIndex);\n\n        let newAgendaSequence = null;\n        const categoryIsSequenced = Boolean(organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas && organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.find(a => a.IsActive && Number.isInteger(a.Sequence)));\n        if (agenda.IsActive && categoryIsSequenced) {\n            let sortedAgendas;\n            if (sortNumeric) {\n                sortedAgendas = JSON.parse(JSON.stringify(organizedBills)).filter(c => !c.DeletionDate)[categoryIndex].Agendas.sort((a, b) => sortAgendasNumerically(a, b, this.props.chamberCode))\n            } else {\n                sortedAgendas = JSON.parse(JSON.stringify(organizedBills)).filter(c => !c.DeletionDate)[categoryIndex].Agendas.sort((a, b) => sortAgendas(a, b, this.props.chamberCode))\n            }\n\n            const lowerLegislationNumberAgenda = sortedAgendas.findLast(a => findLastByIsActiveThenCalendarDateThenCandidateDateThenLegChamberTypeKey(a, agenda, this.props.chamberCode, sortNumeric, sortNumeric));\n            if (lowerLegislationNumberAgenda) {\n                const finalLowerLegislationNumberIndex = organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.findIndex(a => a.LegislationNumber === lowerLegislationNumberAgenda.LegislationNumber);\n                newAgendaSequence = organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[finalLowerLegislationNumberIndex].Sequence + 1;\n            } else {\n                newAgendaSequence = 1;\n            }\n            organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(agenda => {\n                if (agenda.IsActive && agenda.Sequence >= newAgendaSequence) {\n                    agenda.Sequence++;\n                }\n            })\n\n            agenda.Sequence = newAgendaSequence;\n        } else if (!agenda.IsActive) { agenda.Sequence = 0; }\n\n        if (sortNumeric) {\n            organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.sort((a, b) => sortAgendasNumerically(a, b, this.props.chamberCode))\n        } else {\n            organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.sort((a, b) => sortAgendas(a, b, this.props.chamberCode))\n        }\n\n        //check for this bill being a duplicate in other categories\n        const isDuplicate = organizedBills.filter(cc => cc.CalendarCategoryTypeID !== organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID && cc.Agendas.find(a => a.LegislationNumber === agenda.LegislationNumber))\n        if (isDuplicate.length) {\n            isDuplicate.forEach(duplicateCategory => {\n                duplicateCategory.Agendas.filter(a => a.LegislationNumber === agenda.LegislationNumber).forEach(duplicateAgenda => {\n                    duplicateAgenda.IsActive = false;\n                    duplicateAgenda.Sequence = 0;\n                })\n                const duplicateCategoryIndex = organizedBills.findIndex(cc => cc.CalendarCategoryTypeID === duplicateCategory.CalendarCategoryTypeID);\n                organizedBills = this.setDescription(organizedBills, duplicateCategoryIndex);\n                organizedBills[duplicateCategoryIndex].Agendas.sort((a, b) => NUMERIC_SORT_CATEGORIES.includes(organizedBills[duplicateCategoryIndex].CalendarCategoryTypeID) ? sortAgendasNumerically(a, b, this.props.chamberCode) : sortAgendas(a, b, this.props.chamberCode));\n            })\n        }\n\n        this.props.updateAgenda(organizedBills, true);\n    }\n\n    toggleBillBulk(activate, categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n\n        const legNumbersToBeIncluded = activate ? organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.filter(a => a.checked).flatMap(a => a.LegislationNumber) : [];\n        const sortCategoryNumeric = NUMERIC_SORT_CATEGORIES.includes(JSON.parse(JSON.stringify(organizedBills)).filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID);\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(leg => {\n            if (leg.checked) {\n                leg.IsActive = activate;\n            }\n\n            if (leg.pending === false) {\n                delete leg.pending;\n            }\n\n            const categoryIsSequenced = Boolean(organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas && organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.find(a => a.IsActive && Number.isInteger(a.Sequence)));\n            let newAgendaSequence = null;\n            if (leg.checked && leg.IsActive && categoryIsSequenced) {\n                const sortedAgendas = JSON.parse(JSON.stringify(organizedBills)).filter(c => !c.DeletionDate)[categoryIndex].Agendas.sort((a, b) => sortCategoryNumeric ? sortAgendasNumerically(a, b, this.props.chamberCode) : sortAgendas(a, b, this.props.chamberCode))\n\n                const lowerLegislationNumberAgenda = sortedAgendas.findLast(a => findLastByIsActiveThenCalendarDateThenCandidateDateThenLegChamberTypeKey(a, leg, this.props.chamberCode, sortCategoryNumeric, sortCategoryNumeric));\n                if (lowerLegislationNumberAgenda) {\n                    const finalLowerLegislationNumberIndex = organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.findIndex(a => a.LegislationNumber === lowerLegislationNumberAgenda.LegislationNumber);\n                    newAgendaSequence = organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[finalLowerLegislationNumberIndex].Sequence + 1;\n                } else {\n                    newAgendaSequence = 1;\n                }\n                organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(agenda => {\n                    if (!agenda.checked && agenda.IsActive && agenda.Sequence >= newAgendaSequence) {\n                        agenda.Sequence++;\n                    }\n                })\n                leg.Sequence = newAgendaSequence;\n            } else if (!leg.IsActive) { leg.Sequence = 0; };\n            leg.checked = false;\n        });\n\n        organizedBills = this.setDescription(organizedBills, categoryIndex);\n\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.sort((a, b) => NUMERIC_SORT_CATEGORIES.includes(organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID) ? sortAgendasNumerically(a, b, this.props.chamberCode) : sortAgendas(a, b, this.props.chamberCode));\n\n        //check for this bill being a duplicate in other categories\n        const isDuplicate = organizedBills.filter(cc => cc.CalendarCategoryTypeID !== organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID && cc.Agendas.find(a => legNumbersToBeIncluded.includes(a.LegislationNumber)))\n        if (isDuplicate.length) {\n            isDuplicate.forEach(duplicateCategory => {\n                duplicateCategory.Agendas.filter(a => legNumbersToBeIncluded.includes(a.LegislationNumber)).forEach(duplicateAgenda => {\n                    duplicateAgenda.IsActive = false;\n                    duplicateAgenda.Sequence = 0;\n                })\n                const duplicateCategoryIndex = organizedBills.findIndex(cc => cc.CalendarCategoryTypeID === duplicateCategory.CalendarCategoryTypeID);\n                organizedBills = this.setDescription(organizedBills, duplicateCategoryIndex);\n                organizedBills[duplicateCategoryIndex].Agendas.sort((a, b) => NUMERIC_SORT_CATEGORIES.includes(organizedBills[duplicateCategoryIndex]) ? sortAgendasNumerically(a, b, this.props.chamberCode) : sortAgendas(a, b, this.props.chamberCode));\n            })\n        }\n\n        this.props.updateAgenda(organizedBills, true);\n    }\n\n    moveTo(topOrBottom, categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n\n        let newSequence = topOrBottom === 'top' ? 1 : (Math.max.apply(Math, organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.filter(a => a.Sequence).map(a => a.Sequence)) + 1) || 1;\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(leg => {\n            if (leg.checked && leg.IsActive) {\n                leg.Sequence = newSequence;\n                newSequence++;\n            }\n        });\n        newSequence = topOrBottom === 'top' ? newSequence : 1;\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.filter(a => !a.checked && a.IsActive).forEach(agenda => {\n            agenda.Sequence = newSequence;\n            newSequence++;\n        })\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.filter(a => a.checked).forEach(agenda => {\n            agenda.checked = false;\n        });\n        organizedBills = this.setDescription(organizedBills, categoryIndex);\n\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.sort((a, b) => NUMERIC_SORT_CATEGORIES.includes(organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryTypeID) ? sortAgendasNumerically(a, b, this.props.chamberCode) : sortAgendas(a, b, this.props.chamberCode))\n\n        this.props.updateAgenda(organizedBills, true);\n    }\n\n    switchCategory(categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n\n        //uncheck the ones that are already in this category so that they don't get resequenced\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(a => a.checked = false);\n\n        let categoriesWithCheckedBills = organizedBills.filter(c => !c.DeletionDate && c.IsLegislationCategory && c.Agendas.find(a => a.checked));\n        categoriesWithCheckedBills.forEach(cat => {\n            cat.Agendas.filter(a => a.checked).forEach(checkedAgenda => {\n                checkedAgenda.Sequence = 0; //will get set later in toggleBillBulk\n                if (organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryID) {\n                    checkedAgenda.CalendarCategoryID = organizedBills.filter(c => !c.DeletionDate)[categoryIndex].CalendarCategoryID;\n                } else {\n                    delete checkedAgenda.CalendarCategoryID;\n                }\n                organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.push(checkedAgenda);\n                const existingCategoryAgendaIndex = cat.Agendas.findIndex(a => a.LegislationNumber === checkedAgenda.LegislationNumber);\n                if (existingCategoryAgendaIndex > -1) { //remove the bill from the old category; always should be found\n                    cat.Agendas.splice(existingCategoryAgendaIndex, 1);\n                }\n            })\n        })\n\n        this.toggleBillBulk(true, categoryIndex);\n    }\n\n    showAgendaItems(categoryIndex, agendaIndex) {\n        let organizedBills = [...this.props.organizedBills].filter(c => !c.DeletionDate);\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].showAgendaItems = !organizedBills[categoryIndex].Agendas[agendaIndex].showAgendaItems;\n        this.props.updateAgenda(organizedBills);\n    }\n\n    toggleEdit(categoryIndex, agendaIndex) {\n        let categories = [...this.props.organizedBills];\n        //This key is used to tell the DOM whether to display an input or a span\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].isEditing = !categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].isEditing;\n        //Create a key called newDescription that will hold the text that  the user types in\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].newDescription = categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].Description;\n        this.props.updateAgenda(categories);\n    }\n\n    handleChange(categoryIndex, agendaIndex, e, title) {\n        let textHeight = [...this.state.textHeight];\n\n        //Init the nested height value if undefined at the category or agenda index\n        if (!textHeight[categoryIndex]) {\n            textHeight[categoryIndex] = {};\n            textHeight[categoryIndex].Agendas = [];\n            textHeight[categoryIndex].Agendas[agendaIndex] = {};\n            textHeight[categoryIndex].Agendas[agendaIndex].height = '40px';\n        } else if (!textHeight[categoryIndex].Agendas[agendaIndex]) {\n            textHeight[categoryIndex].Agendas[agendaIndex] = {};\n            textHeight[categoryIndex].Agendas[agendaIndex].height = '40px';\n        }\n\n        let height = Math.round(e.target.value.length / 95) * 20 + 40;\n\n        textHeight[categoryIndex].Agendas[agendaIndex].height = height.toString() + \"px\";\n\n        let categories = [...this.props.organizedBills];\n        if (title) {\n            categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].LegislationTitle = e.target.value;\n        } else {\n            categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].newDescription = e.target.value;\n        }\n\n        this.props.updateAgenda(categories);\n\n        this.setState({\n            textHeight: textHeight\n        })\n    }\n\n    saveChange(categoryIndex, agendaIndex) {\n        //Turn input back into span\n        let categories = [...this.props.organizedBills];\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].isEditing = false;\n        //Set description to the text that the user has typed in. If new description is null then set it to the current description\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].Description = categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].newDescription;\n        this.props.updateAgenda(categories, true);\n    }\n\n    expandTitle(categoryIndex, agendaIndex) {\n        let categories = [...this.props.organizedBills];\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].expandTitle = !categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].expandTitle ? true : false;\n\n        this.props.updateAgenda(categories, this.props.pendingSave);\n    }\n\n    onDragEnd(result, categoryIndex) {\n        if (!result.destination) {\n            return;\n        }\n        let categories = [...this.props.organizedBills];\n        const [removed] = categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas.splice(result.source.index, 1);\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas.splice(result.destination.index, 0, removed);\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach((element, index) => element.Sequence = index + 1);\n\n        categories.filter(c => !c.DeletionDate)[categoryIndex].Agendas.sort((a, b) => NUMERIC_SORT_CATEGORIES.includes(categories.filter(c => !c.DeletionDate)[categoryIndex]) ? sortAgendasNumerically(a, b, this.props.chamberCode) : sortAgendas(a, b, this.props.chamberCode))\n\n        this.props.updateAgenda(categories);\n    }\n\n    toggleAgendaItemEditor(agendaIndex, categoryIndex) {\n        if (!categoryIndex || ([...this.props.organizedBills].filter(c => !c.DeletionDate).length && [...this.props.organizedBills].filter(c => !c.DeletionDate)[categoryIndex])) {\n            this.setState({\n                showAgendaItemEditor: agendaIndex,\n                showAgendaItemEditorCategoryIndex: Number.isInteger(categoryIndex) ? categoryIndex : -1\n            });\n        }\n    }\n\n    getCategoryBills(category) {\n        const associatedCategory = this.props.calendarCategories.find(c => c.CalendarCategoryTypeID === category.CalendarCategoryTypeID);\n        if (associatedCategory) {\n            return this.props.billList.filter(b => (b.ChamberCode === associatedCategory.LegislationChamberCode || !associatedCategory.LegislationChamberCode) && (b.LegislationTypeCode === associatedCategory.LegislationTypeCode || !associatedCategory.LegislationTypeCode))\n        } else { return this.props.billList }\n    }\n\n    toggleShowAmendments(categoryIndex) {\n        let organizedBills = [...this.props.organizedBills];\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].showAmendments = !organizedBills[categoryIndex].showAmendments;\n        organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas.forEach(agenda => {\n            agenda.AgendaItems.forEach(item => {\n                if (item.LDNumber) {\n                    item.IsActive = organizedBills[categoryIndex].showAmendments;\n                }\n            })\n        });\n        this.props.updateAgenda(organizedBills);\n    }\n\n    changeCommitteeDropdown(value) {\n        this.props.changeCommitteeDropdown(value, () => {\n            let organizedBills = [...this.props.organizedBills];\n            organizedBills = this.setDescription(organizedBills);\n            this.props.updateAgenda(organizedBills, true);\n        });\n    }\n\n    changeDateDropdown(value) {\n        this.props.changeDateDropdown(value, () => {\n            let organizedBills = [...this.props.organizedBills];\n            organizedBills = this.setDescription(organizedBills);\n            this.props.updateAgenda(organizedBills, true);\n        });\n    }\n\n    addBill(categoryIndex) {\n        this.props.addBill(categoryIndex, () => {\n            let organizedBills = [...this.props.organizedBills];\n            organizedBills = this.setDescription(organizedBills);\n            this.props.updateAgenda(organizedBills, true);\n        });\n    }\n\n    toggleEditCategoryDescription(categoryIndex, save) {\n        const categories = [...this.props.organizedBills];\n        let category = categories.filter(c => !c.DeletionDate)[categoryIndex];\n        category.editing = !category.editing;\n        if (save) {\n            category.Description = category.tempDescription;\n        } else {\n            category.tempDescription = this.categoryDescription(category);\n        }\n        this.props.updateAgenda(categories, save);\n    }\n\n    handleDescriptionChange(categoryIndex, val) {\n        let organizedBills = [...this.props.organizedBills];\n        organizedBills[categoryIndex].tempDescription = val;\n        this.props.updateAgenda(organizedBills);\n    }\n\n    categoryDescription = category => {\n        //if it's been edited, leave it at that\n        const associatedReferenceCategory = this.props.calendarCategories.find(x => x.CalendarCategoryTypeID === category.CalendarCategoryTypeID);\n        if (associatedReferenceCategory && associatedReferenceCategory.Description !== category.Description && associatedReferenceCategory.PluralDescription !== category.Description) {\n            return category.Description;\n        }\n\n        //otherwise, use singular or plural reference description\n        if (this.props.chamberCode === 'H' && category.CategoryCode === \"HOUBRC\" || category.CategoryCode === \"SENBRC\") {\n            return category.Description;\n        } else if (category.Agendas.filter(a => a.IsActive).length > 1 && category.PluralDescription) {\n            return category.PluralDescription;\n        } else {\n            return category.Description;\n        }\n    }\n\n    render() {\n        //Filter out the categories that have already been added to the calendar\n        const calendarCategoryOptions = this.props.calendarCategories.filter(category => {\n            if (this.props.organizedBills.findIndex(cat => !cat.DeletionDate && cat.CalendarCategoryTypeID === category.CalendarCategoryTypeID) < 0) {\n                return category;\n            }\n        });\n        // The button will read 'Add' if the bill is not already part of a category. The button will read 'Move' if it is already part of a category.\n        const billButtonText = index => {\n            let billExists = false;\n            if (this.props.selectedBill[index]) {\n                this.props.organizedBills.some(category => {\n                    if (category.Agendas.findIndex(bill => bill.LegislationID === this.props.selectedBill[index].LegislationID) >= 0) {\n                        billExists = true;\n                        return true;\n                    }\n                });\n                if (billExists) {\n                    return (\"Move\");\n                }\n            }\n            return (\"Add\");\n        }\n\n        return (\n            <div className=\"drag-container\">\n                {this.state.showAgendaItemEditor !== -1 &&\n                    <AgendaItemsComponent\n                        toggleAgendaItemEditor={this.toggleAgendaItemEditor}\n                        agenda={this.props.organizedBills.filter(c => !c.DeletionDate)[this.state.showAgendaItemEditorCategoryIndex].Agendas[this.state.showAgendaItemEditor]}\n                        categoryIndex={this.state.showAgendaItemEditorCategoryIndex}\n                        agendaIndex={this.state.showAgendaItemEditor}\n                        updateAgendaItems={this.props.updateAgendaItems}\n                    />\n                }\n                <div className=\"inner-grid two\">\n                    <React.Fragment>\n                        <span>Use these two selectors to view candidate bills reported out of committee.</span>\n                        <div />\n                        <div className=\"inner-grid two\">\n                            <div>\n                                <label>Committee Reported Out</label>\n                                <Select\n                                    classNamePrefix=\"grid-selector-dropdown\"\n                                    value={this.props.selectedCommittee}\n                                    onChange={this.changeCommitteeDropdown}\n                                    options={this.props.committeeList.sort((a, b) => a.label > b.label)}\n                                    styles={{ menu: provided => ({ ...provided, zIndex: this.props.organizedBills.length + 1 }) }}\n                                    isSearchable\n                                    isClearable\n                                />\n                            </div>\n                            <div>\n                                <label>Date Reported Out</label>\n                                <Select\n                                    classNamePrefix=\"grid-selector-dropdown\"\n                                    value={this.props.selectedDate}\n                                    onChange={this.changeDateDropdown}\n                                    options={this.props.dateList.sort((a, b) => a.label > b.label)}\n                                    styles={{ menu: provided => ({ ...provided, zIndex: this.props.organizedBills.length + 1 }) }}\n                                    isSearchable\n                                    isClearable\n                                />\n                            </div>\n                        </div>\n                    </React.Fragment>\n                    <div className=\"inner-grid eight-and-one\">\n                        <div>\n                            <label>Category</label>\n                            <Select\n                                classNamePrefix=\"grid-selector-dropdown\"\n                                options={calendarCategoryOptions}\n                                value={this.props.selectedCategory}\n                                onChange={this.props.changeCategoryDropdown}\n                                styles={{ menu: provided => ({ ...provided, textAlign: 'right', whiteSpace: 'nowrap', right: '0', width: 'auto', zIndex: this.props.organizedBills.length + 1 }) }}\n                            />\n                        </div>\n                        <button disabled={!this.props.selectedCategory} type=\"button\" className=\"button primary\" style={{ marginTop: \"24px\", height: \"36px\" }} onClick={this.props.addCategory}>Add Category</button>\n                    </div>\n                </div>\n                <div style={{ display: 'flex', gap: '25px' }}>\n                    <button className=\"button-link\" onClick={() => this.props.toggleHideAllCategories(this.props.hideCategories.filter(c => c).length !== this.props.organizedBills.length)}>{this.props.hideCategories.filter(c => c).length !== this.props.organizedBills.length ? \"Collapse All Categories\" : \"Expand All Categories\"}</button>\n                    <button className=\"button-link\" onClick={() => this.props.toggleHideAllNonIncludedBills()}>{this.props.hideAllNonIncludedBills ? \"Show All Legislation\" : \"Hide Non-Included Legislation\"}</button>\n                </div>\n                <div style={{ marginTop: 15 }}>\n                    <div className=\"bill-grid communications-category-grid calendar-category-grid\">\n                        <div className=\"bill-grid-header\">\n                            <span></span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span></span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Bill #</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Committee/Date Reported</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>{this.props.showTitles ? \"Title\" : \"Caption\"}</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Status</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Action</span>\n                        </div>\n                    </div>\n                    {this.props.organizedBills.filter(c => !c.DeletionDate).map((category, categoryIndex) =>\n                        <form key={categoryIndex}>\n                            <div style={{ position: 'sticky', top: '0px', zIndex: this.props.organizedBills.filter(c => !c.DeletionDate).length - categoryIndex }}>\n                                <div className={`calendar-category-grid calendar-category-grid-header${category.Agendas && category.Agendas.length ? '' : ' deletable'}`}>\n                                    <div>\n                                        <button onClick={() => this.props.toggleHideCategory(categoryIndex)} type=\"button\" className={`${this.props.hideCategories[categoryIndex] ? \"arrow-down\" : \"arrow-up\"}`}></button>\n                                    </div>\n                                    <div>\n                                        <input\n                                            type=\"checkbox\"\n                                            className=\"checkbox\"\n                                            checked={category.selectAll || ''}\n                                            onChange={() => this.toggleSelectAll(categoryIndex)}\n                                        />\n                                    </div>\n                                    <div>\n                                        <span>\n                                            {category.editing ?\n                                                <React.Fragment>\n                                                    <textarea\n                                                        className={`category-description-${categoryIndex}`}\n                                                        style={{ width: '90%', fontSize: '0.9em' }}\n                                                        type=\"text\"\n                                                        onChange={(e) => this.handleDescriptionChange(categoryIndex, e.target.value)}\n                                                        value={category.tempDescription}\n                                                    />\n                                                    <a className=\"icon save\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryDescription(categoryIndex, true)} />\n                                                    <a className=\"icon delete\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryDescription(categoryIndex)} />\n                                                </React.Fragment>\n                                                :\n                                                <React.Fragment>\n                                                    <b>{category.DisplayType ? `${this.categoryDescription(category)} - ${category.CategoryType} ` : this.categoryDescription(category)}</b>\n                                                    <a className=\"icon edit\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryDescription(categoryIndex)} />\n                                                </React.Fragment>\n                                            }\n                                        </span>\n                                    </div>\n                                    <div>\n                                        {!category.Agendas || !category.Agendas.length ? <button onClick={() => this.props.deleteCategory(category)} className=\"icon delete\" type=\"button\" />\n                                            :\n                                            this.props.userRoles.find(x => x === \"SenateCalendarEditor\") && [98, 102].includes(category.CalendarCategoryTypeID) &&\n                                            <React.Fragment>\n                                                <label style={{ margin: \"0 5px 0 0\" }}>Show w/ Amendments</label>\n                                                <div className=\"bill-grid-actions\">\n                                                    <div onClick={() => this.toggleShowAmendments(categoryIndex)} className=\"toggle-switch\">\n                                                        <input id=\"sr-status-change\" checked={category.showAmendments} type=\"checkbox\" />\n                                                        <span className=\"slider\"></span>\n                                                    </div>\n                                                </div>\n                                            </React.Fragment>\n                                        }\n                                    </div>\n                                    <div className=\"flex-row\" style={{ gap: '10px' }}>\n                                        {\n                                            category.IsLegislationCategory && this.props.organizedBills.find(cat => !cat.DeletionDate && cat.CalendarCategoryTypeID !== category.CalendarCategoryTypeID && cat.IsLegislationCategory && cat.Agendas.find(agenda => agenda.checked)) ?\n                                                <button type=\"button\" className=\"button small-button\" onClick={() => this.switchCategory(categoryIndex)}>Move to Category</button>\n                                                : !category.IsLegislationCategory && category.Agendas.length && category.Agendas.find(a => a.checked) &&\n                                                <React.Fragment>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(false, categoryIndex)}>Exclude Selected</button>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(true, categoryIndex)}>Include Selected</button>\n                                                    </div>\n                                                </React.Fragment>\n                                        }\n                                    </div>\n                                    <div>\n                                        {!this.props.pendingSave && <button type=\"button\" className=\"button small-button\" onClick={() => this.props.toggleCalendarPreview(categoryIndex)} >Preview</button>}\n                                    </div>\n                                    <div>\n                                        {!this.props.pendingSave && category.CalendarCategoryTypeID != 132 && <button type=\"button\" className=\"button small-button\" onClick={() => this.props.togglePortal(this.props.showPortal, category)}>PDF Preview </button>}\n                                    </div>\n                                </div>\n                                {!this.props.hideCategories[categoryIndex] && category.IsLegislationCategory &&\n                                    <div className=\"bill-grid communications-category-grid calendar-category-grid\">\n                                        <div></div>\n                                        <div></div>\n                                        <div>\n                                            <LargeListSelect\n                                                className=\"grid-selector-dropdown\"\n                                                classNamePrefix=\"grid-selector-dropdown\"\n                                                options={this.getCategoryBills(category)}\n                                                onChange={(value) => this.props.changeBillDropdown(categoryIndex, value)}\n                                                value={this.props.selectedBill[categoryIndex]}\n                                                filterOption={(bill, inputValue) => {\n                                                    if (category.Agendas.findIndex(agenda => agenda.LegislationID === bill.value) < 0) {\n                                                        return bill.label.toLowerCase().includes(inputValue.toLowerCase());\n                                                    } else { return false; }\n                                                }}\n                                            />\n                                        </div>\n                                        <div className=\"center\">\n                                            <button\n                                                className=\"button\"\n                                                type=\"button\"\n                                                disabled={!this.props.selectedBill[categoryIndex]}\n                                                onClick={() => this.addBill(categoryIndex)}>\n                                                {billButtonText(categoryIndex)}\n                                            </button>\n                                        </div>\n                                        <div className=\"flex-row four space-around\" style={{ display: 'flex', alignItems: 'center' }}>\n                                            {category.Agendas.length && category.Agendas.find(a => a.checked) ?\n                                                <React.Fragment>\n                                                    <div>\n                                                        <span>Checked Legislation:</span>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(false, categoryIndex)}>Exclude</button>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(true, categoryIndex)}>Include</button>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.moveTo('top', categoryIndex)}>Move to Top</button>\n                                                    </div>\n                                                    <div>\n                                                        <button type=\"button\" className=\"button small-button\" onClick={() => this.moveTo('bottom', categoryIndex)}>Move to Bottom</button>\n                                                    </div>\n                                                </React.Fragment>\n                                                : null\n                                            }\n                                        </div>\n                                    </div>\n                                }\n                            </div>\n                            {!this.props.hideCategories[categoryIndex] &&\n                                <DragDropContext onDragEnd={result => this.onDragEnd(result, categoryIndex)}>\n                                    <Droppable droppableId=\"droppable\">\n                                        {(provided, _snapshot) => (\n                                            <div ref={provided.innerRef}>\n                                                {category.Agendas.map((item, itemIndex) => {\n                                                    if (this.props.hideAllNonIncludedBills && !item.IsActive) { return; }\n                                                    const showNewIndicator = category.CategoryCode != \"Order\" && category.CalendarCategoryID && !item.AgendaID;\n                                                    return (\n                                                        <React.Fragment key={`${item.AgendaID}-${itemIndex}`}>\n                                                            {isNotHidden(item, category, this.props.committeeList) ?\n                                                                <Draggable draggableId={`${item.AgendaID}-${itemIndex}`} index={itemIndex}>\n                                                                    {(provided, snapshot) => (\n                                                                        <div ref={provided.innerRef}\n                                                                            className=\"bill-grid communications-category-grid calendar-category-grid\"\n                                                                            {...provided.draggableProps}\n                                                                            {...provided.dragHandleProps}\n                                                                            style={getItemStyle(\n                                                                                snapshot.isDragging,\n                                                                                provided.draggableProps.style,\n                                                                                item.IsActive\n                                                                            )}\n                                                                        >\n                                                                            <div><button className=\"button draggable\">Drag and drop</button></div>\n                                                                            <div>\n                                                                                <input\n                                                                                    type=\"checkbox\"\n                                                                                    className=\"checkbox\"\n                                                                                    checked={item.checked || ''}\n                                                                                    onChange={e => this.toggleRow(categoryIndex, itemIndex, e)} />\n                                                                            </div>\n                                                                            <div className=\"new-container\">\n                                                                                {this.props.organizedBills.find(c => c.CalendarCategoryTypeID !== category.CalendarCategoryTypeID && c.Agendas.find(a => a.LegislationNumber === item.LegislationNumber)) &&\n                                                                                    <React.Fragment>\n                                                                                        <i data-tip=\"This legislation exists in multiple categories.\" className={`icon notification calendar-authoring${showNewIndicator ? ' new' : ''}`} />\n                                                                                    </React.Fragment>\n                                                                                }\n                                                                                <Link to={`/bill-details/${this.props.sessionCode}/${item.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\" style={!item.IsActive ? { color: 'inherit' } : {}}> {item.LegislationNumber}</Link>\n                                                                                {showNewIndicator && <span className='corner-new'>NEW</span>}\n                                                                            </div>\n                                                                            <div>\n                                                                                <span>{this.props.fullCommitteeList.find(x => x.CommitteeID === item.CommitteeID) ? this.props.fullCommitteeList.find(x => x.CommitteeID === item.CommitteeID).Abbreviation + \" - \" + moment(item.CandidateDate).format(\"MM/DD/YYYY\") : category.CategoryCode != \"Order\" && item.CandidateDate && moment(item.CandidateDate).format(\"MM/DD/YYYY\")}</span>\n                                                                            </div>\n                                                                            <div>\n                                                                                <div className=\"flex-row\" style={{ display: 'flex' }}>\n                                                                                    <div className=\"flex-row flex-vertical-center\" style={{ width: \"100%\", display: \"inline-flex\" }}>\n                                                                                        {item.isEditing ?\n                                                                                            <textarea value={item.LegislationTitle ? item.LegislationTitle : item.newDescription} style={{\n                                                                                                resize: 'vertical', width: '75%', height: this.state.textHeight[categoryIndex]\n                                                                                                    && this.state.textHeight[categoryIndex].Agendas[itemIndex]\n                                                                                                    && this.state.textHeight[categoryIndex].Agendas[itemIndex].height\n                                                                                                    ? this.state.textHeight[categoryIndex].Agendas[itemIndex].height\n                                                                                                    : \"40px\"\n                                                                                            }}\n                                                                                                cols=\"2\" onChange={(e) => this.handleChange(categoryIndex, itemIndex, e, item.LegislationTitle != null)}></textarea>\n                                                                                            :\n                                                                                            <React.Fragment>\n                                                                                                <span className={this.props.organizedBills && this.props.organizedBills.filter(c => !c.DeletionDate)[categoryIndex].Agendas[itemIndex].expandTitle ? \"calendar-leg-title-wrapper expanded\" : \"calendar-leg-title-wrapper\"}>{item.Description === \"Call to Order\" ? \"Call to Order - \" + this.props.calendarTime : renderHTML(!this.props.showTitles && item.LegislationDescription ? item.LegislationDescription : !this.props.showTitles && item.Description ? item.Description : this.props.showTitles && item.LegislationTitle ? item.LegislationTitle : item.Description ? item.Description : \"\")}</span>\n                                                                                                {!this.props.showTitles && item.LegislationDescription && item.LegislationDescription.length > 75\n                                                                                                    ? <a onClick={() => this.expandTitle(categoryIndex, itemIndex)} style={{ cursor: \"pointer\" }}>...</a>\n                                                                                                    : !this.props.showTitles && item.Description && item.Description.length > 75\n                                                                                                        ? <a onClick={() => this.expandTitle(categoryIndex, itemIndex)} style={{ cursor: \"pointer\" }}>...</a>\n                                                                                                        : this.props.showTitles && item.LegislationTitle && item.LegislationTitle.length > 75\n                                                                                                            ? <a onClick={() => this.expandTitle(categoryIndex, itemIndex)} style={{ cursor: \"pointer\" }}>...</a>\n                                                                                                            : item.Description && item.Description.length > 75\n                                                                                                                ? <a onClick={() => this.expandTitle(categoryIndex, itemIndex)} style={{ cursor: \"pointer\" }}>...</a>\n                                                                                                                : null}\n                                                                                            </React.Fragment>\n                                                                                        }\n                                                                                    </div>\n                                                                                    <React.Fragment>\n                                                                                        <div className=\"bill-grid-actions\">\n                                                                                            {item.isEditing\n                                                                                                ?\n                                                                                                <div className=\"bill-grid-actions\" style={{ display: \"inline-flex\" }}>\n                                                                                                    <button onClick={() => this.saveChange(categoryIndex, itemIndex)} type=\"button\" className=\"icon save float-right\"></button>\n                                                                                                    <button onClick={() => this.toggleEdit(categoryIndex, itemIndex)} type=\"button\" className=\"icon delete float-right\"></button>\n                                                                                                </div>\n                                                                                                :\n                                                                                                <div className=\"bill-grid-actions\">\n                                                                                                    {/*Allow edit if it is not the call to order item, the item IsActive, and we are viewing titles OR it is the invocation, pledge, or reading of the journal*/}\n                                                                                                    {item.Description !== \"Call to Order\" && item.IsActive && (this.props.showTitles || [2, 3, 4, 6, 7, 8].includes(item.CalendarCategoryTemplateID)) &&\n                                                                                                        <button onClick={() => this.toggleEdit(categoryIndex, itemIndex)} type=\"button\" className=\"icon edit float-right\"></button>\n                                                                                                    }\n                                                                                                </div>\n                                                                                            }\n                                                                                            {category.CategoryCode !== \"Order\" && <button onClick={() => this.showAgendaItems(categoryIndex, itemIndex)} className={item.showAgendaItems ? 'arrow-up' : 'arrow-down'} type=\"button\"></button>}\n                                                                                        </div>\n                                                                                    </React.Fragment>\n                                                                                </div>\n                                                                                {item.showAgendaItems &&\n                                                                                    <div>\n                                                                                        <button type=\"button\" onClick={() => this.toggleAgendaItemEditor(itemIndex, categoryIndex)} className=\"button-link\">Edit Notes</button>\n                                                                                        {/* If an item has an LdNumber it's assumed to be an amendment */}\n                                                                                        {item.AgendaItems.filter(item => item.Description && item.IsActive && (!item.LDNumber ? true : category.showAmendments || ![98, 102].includes(category.CalendarCategoryTypeID) ? true : false)).map((item, itemIndex) =>\n                                                                                            <div key={itemIndex} className=\"programmatic-notes\">\n                                                                                                {renderHTML(item.DraftText || item.CalendarDescription || item.Description)}\n                                                                                            </div>\n                                                                                        )}\n                                                                                    </div>\n                                                                                }\n                                                                            </div>\n                                                                            <div>\n                                                                                <span className={item.IsActive ? \"message-success\" : \"\"}>{item.IsActive ? 'Included' : 'Not Included'}</span>\n                                                                            </div>\n                                                                            <div className=\"bill-grid-actions\">\n                                                                                <div onClick={() => this.toggleBill(categoryIndex, itemIndex)} className=\"toggle-switch\">\n                                                                                    <input id=\"sr-status-change\" checked={item.IsActive} type=\"checkbox\" />\n                                                                                    <span className=\"slider\"></span>\n                                                                                </div>\n                                                                            </div>\n                                                                        </div>)}\n                                                                </Draggable>\n                                                                :\n                                                                null\n                                                            }\n                                                        </React.Fragment>\n                                                    )\n                                                }\n                                                )}\n                                            </div>)}\n                                    </Droppable>\n                                </DragDropContext>\n                            }\n                        </form>\n                    )}\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default SenateBillsGrid;","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { Prompt } from 'react-router';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport moment from 'moment-timezone';\nimport ReactToPrint from \"react-to-print\";\nimport { calendarActionCreators } from '../../../stores/lis-calendar-store';\nimport BillsGrid from './lis-senate-bills-grid';\nimport CalendarDetailsComponent from '../../../lis-shared/lis-calendar/lis-calendar-details'\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport Popout from '../../../lis-shared/lis-layout/components/lis-popout-component';\nimport DatePicker from 'react-datepicker';\nimport CalendarDetailsPrintout from '../../../lis-shared/lis-calendar/lis-calendar-details-printout';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\n\nconst PUBLISH_CALENDAR = true;\nconst SAVE_CALENDAR = false;\nconst lisDocDomain = window.env?.STORAGE_ACCOUNT_DOMAIN;\n\nconst NUMERIC_SORT_CATEGORIES = [72, 111, 109, 112, 60, 110, 98, 102, 83, 90, 87, 93, 100, 104, 117, 118, 105, 106, 66, 67, 96, 97, 64, 68, 69, 65];\n\nconst sortAgendas = (a, b, calendarChamber) => {\n    {\n        return b.IsActive !== a.IsActive\n            ? b.IsActive\n                ? 1\n                : -1\n            : a.Sequence > 0 && b.Sequence > 0 && a.Sequence !== b.Sequence\n                ? a.Sequence - b.Sequence > 0\n                    ? 1\n                    : -1\n                : a.CalendarDate !== b.CalendarDate\n                    ?\n                    !a.CalendarDate ?\n                        1 :\n                        !b.CalendarDate ? -1\n                            :\n                            a.CalendarDate - b.CalendarDate\n                    : a.CandidateDate !== b.CandidateDate\n                        ?\n                        !a.CandidateDate ?\n                            1 :\n                            !b.CandidateDate ? -1\n                                :\n                                a.CandidateDate - b.CandidateDate\n                        : a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) !== 0 ?\n                            a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                                ? -1 : 1\n                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) !== 0\n                                ? a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                                    ? 1\n                                    : -1\n                                : a.LegislationKey && parseInt(a.LegislationKey) !== parseInt(b.LegislationKey)\n                                    ? parseInt(a.LegislationKey) - parseInt(b.LegislationKey) > 0\n                                        ? 1\n                                        : -1\n                                    : 0\n    }\n}\n\nconst sortAgendasNumerically = (a, b, calendarChamber) => {\n    {\n        return !a.IsActive && b.IsActive\n            ? 1\n            : a.IsActive && !b.IsActive\n                ? -1\n                : a.Sequence > 0 && b.Sequence > 0 && a.Sequence !== b.Sequence\n                    ? a.Sequence - b.Sequence > 0\n                        ? 1\n                        : -1\n                    : a.LegislationNumber && b.LegislationNumber && a.LegislationNumber[0] !== b.LegislationNumber[0] ?\n                        a.LegislationNumber[0].localeCompare(calendarChamber) !== 0\n                            ? -1\n                            : 1\n                        : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) > 0\n                            ? 1\n                            : a.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) < 0\n                                ? -1\n                                : a.LegislationKey > b.LegislationKey\n                                    ? 1\n                                    : -1\n    }\n}\n\nconst findLastByIsActiveThenCalendarDateThenCandidateDateThenLegChamberTypeKey = (a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate) => (\n    a.IsActive && findLastByCalendarDateThenCandidateDateThenLegChamberTypeKey(a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate)\n)\n\nconst findLastByCalendarDateThenCandidateDateThenLegChamberTypeKey = (a, b, calendarChamber, ignoreCalendarDate, ignoreCandidateDate) => (\n    (((ignoreCalendarDate || (a.CalendarDate && b.CalendarDate && moment(a.CalendarDate).isSame(b.CalendarDate, \"day\"))) && findLastByLegChamberTypeKey(a, b, calendarChamber)) ||\n        (!ignoreCalendarDate && a.CalendarDate && b.CalendarDate && moment(a.CalendarDate).isBefore(b.CalendarDate, \"day\"))) ||\n    (((ignoreCandidateDate || (a.CandidateDate && b.CandidateDate && moment(a.CandidateDate).isSame(b.CandidateDate, \"day\"))) && findLastByLegChamberTypeKey(a, b, calendarChamber)) ||\n        (!ignoreCandidateDate && a.CandidateDate && b.CandidateDate && moment(a.CandidateDate).isBefore(b.CandidateDate, \"day\"))) ||\n    ((ignoreCalendarDate || (!a.CalendarDate && !b.CalendarDate)) && (ignoreCandidateDate || (!a.CandidateDate && !b.CandidateDate)) &&\n        findLastByLegChamberTypeKey(a, b, calendarChamber))\n    || (!ignoreCalendarDate && !b.CalendarDate && a.CandidateDate)\n    || !ignoreCandidateDate && !b.CandidateDate && a.CandidateDate\n)\n\nconst findLastByLegChamberTypeKey = (a, b, calendarChamber) => (\n    (a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === (calendarChamber === \"H\" ? 1 : -1)) ||\n    (a.LegislationNumber && a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === 0 && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) === -1) ||\n    (a.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) === 0 && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) === 0 && a.LegislationKey && a.LegislationKey < parseInt(b.LegislationKey))\n)\n\nclass SenateCalendarFormComponent extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.state = {\n            isLoaded: false,\n            calendarData: '',\n            hideCategories: [],\n            showPreview: false,\n            isSaving: false,\n            pendingSave: false,\n            comments: [],\n            message: '',\n            selectedSession: '',\n            selectAllActive: false,\n            selectAllInactive: false,\n            calendarCategories: [],\n            selectedCategory: '',\n            selectedBill: [],\n            billList: [],\n            showCategoryPreview: -1,\n            hideCategory: [],\n            selectedFile: '',\n            calendatDate: \"\",\n            commentEdit: [],\n            tempComments: [],\n            showTitles: false,\n            selectedDate: \"\",\n            selectedCommittee: \"\",\n            dateList: [],\n            committeeList: [],\n            hideAllNonIncludedBills: false\n        };\n        this.togglePreview = this.togglePreview.bind(this);\n        this.updateAgenda = this.updateAgenda.bind(this);\n        this.updateAgendaItems = this.updateAgendaItems.bind(this);\n        this.changeCategoryDropdown = this.changeCategoryDropdown.bind(this);\n        this.addCategory = this.addCategory.bind(this);\n        this.toggleHideCategory = this.toggleHideCategory.bind(this);\n        this.toggleHideAllCategories = this.toggleHideAllCategories.bind(this);\n        this.toggleHideAllNonIncludedBills = this.toggleHideAllNonIncludedBills.bind(this);\n        this.changeBillDropdown = this.changeBillDropdown.bind(this);\n        this.changeDateDropdown = this.changeDateDropdown.bind(this);\n        this.changeCommitteeDropdown = this.changeCommitteeDropdown.bind(this);\n        this.addBill = this.addBill.bind(this);\n        this.addComment = this.addComment.bind(this);\n        this.removeComment = this.removeComment.bind(this);\n        this.commentShift = this.commentShift.bind(this);\n        this.handleProFormaChange = this.handleProFormaChange.bind(this);\n        this.toggleCalendarPreview = this.toggleCalendarPreview.bind(this);\n        this.togglePortal = this.togglePortal.bind(this);\n        this.saveCalendar = this.saveCalendar.bind(this);\n        this.handlePdfFile = this.handlePdfFile.bind(this);\n        this.submitPdfFile = this.submitPdfFile.bind(this);\n        this.changeConveneTime = this.changeConveneTime.bind(this);\n        this.toggleAgenda = this.toggleAgenda.bind(this);\n        this.toggleCommentEdit = this.toggleCommentEdit.bind(this);\n        this.confirmCommentEdit = this.confirmCommentEdit.bind(this);\n        this.toggleShowTitles = this.toggleShowTitles.bind(this);\n        this.setPending = this.setPending.bind(this);\n        this.deleteCategory = this.deleteCategory.bind(this);\n\n        this.pdfRef = React.createRef();\n        this.fileInput = React.createRef();\n    }\n\n    componentDidMount() {\n        let calendarData = { ...this.props.calendarData };\n        let noSavedItems = true;\n        let comments = [];\n        let dateList = [];\n        let committeeList = [];\n\n        // For the 'add category' dropdown\n        this.props.actions.getCalendarCategoriesReferences('?chamberCode=' + calendarData.ChamberCode)\n            .then(() => {\n                let calendarCategories = this.props.calendar.calendarCategoriesReferences;\n                calendarCategories.forEach(category => {\n                    category.label = category.DisplayType ? `${category.Description} - ${category.CategoryType}` : category.Description;\n                    category.value = category.CalendarCategoryTypeID;\n                });\n                this.setState({\n                    calendarCategories: calendarCategories\n                }, () => {\n                    this.props.actions.getCommitteeList(\"sessionID=\" + calendarData.SessionID)\n                        .then(() => {\n                            calendarData.CalendarCategories.forEach(category => {\n                                const referenceCategory = this.state.calendarCategories.find(c => c.CalendarCategoryTypeID === category.CalendarCategoryTypeID);\n                                let sequence = 1;\n                                category.Agendas.forEach((agenda, i) => {\n                                    //If a bill is on first reading capture its committee and candidate date to use in the filters\n                                    if (referenceCategory && referenceCategory.OnDemand) {\n                                        if (agenda.CommitteeID && this.props.committee.committeeList.find(x => x.ChamberCode === calendarData.ChamberCode && x.CommitteeID === agenda.CommitteeID)) {\n                                            committeeList.push({ label: this.props.committee.committeeList.find(x => x.ChamberCode === calendarData.ChamberCode && x.CommitteeID === agenda.CommitteeID).Name, value: agenda.CommitteeID, date: agenda.CandidateDate });\n                                        }\n\n                                        if (agenda.CandidateDate && this.props.committee.committeeList.find(x => x.ChamberCode === calendarData.ChamberCode && x.CommitteeID === agenda.CommitteeID)) {\n                                            let thisDate = dateList.findIndex(x => moment(x.value).isSame(agenda.CandidateDate, \"day\"));\n                                            if (thisDate > -1) {\n                                                if (!dateList[thisDate].committee.includes(agenda.CommitteeID)) {\n                                                    dateList[thisDate].committee.push(agenda.CommitteeID)\n                                                }\n                                            } else {\n                                                dateList.push({ label: moment(agenda.CandidateDate).format(\"MM/DD/YYYY\"), value: agenda.CandidateDate, committee: [agenda.CommitteeID] });\n                                            }\n                                        }\n                                    }\n\n                                    //Item has an agenda ID so this means that a bill has been previously saved to this calendar\n                                    if (agenda.AgendaID) {\n                                        noSavedItems = false;\n                                    }\n                                });\n                                if ([98, 102].includes(category.CalendarCategoryTypeID)) {\n                                    category.showAmendments = !!category.Agendas.flatMap(agenda => agenda.AgendaItems).find(agendaItem => agendaItem.IsActive && agendaItem.LDNumber);\n                                }\n                                category.Agendas.sort((a, b) => NUMERIC_SORT_CATEGORIES.includes(category.CalendarCategoryTypeID) ? sortAgendasNumerically(a, b, calendarData.ChamberCode) : sortAgendas(a, b, calendarData.ChamberCode))\n                                category.Agendas.forEach((agenda, i) => {\n                                    if (agenda.IsActive) {\n                                        agenda.pending = false;\n                                        agenda.Sequence = sequence;\n                                        sequence++;\n                                    } else {\n                                        agenda.Sequence = 0;\n                                    }\n                                })\n                            });\n\n\n                            let commentEdit = [];\n                            let tempComments = [];\n\n                            for (let i = 0; i < calendarData.CalendarComments.length; i++) {\n                                let comment = calendarData.CalendarComments[i];\n                                comment.Sequence = i + 1;\n                                comments.push(comment);\n                                commentEdit.push(false);\n                                //I kid you not if I don't make a separate tempComment object here and push it into the tempComment array instead of inserting the entire comment\n                                //then this.state.comments gets mutated in the handleCommentChange function even though it would never get explicitly changed -JGB                    \n                                let tempComment = {\n                                    Sequence: comment.Sequence,\n                                    Comment: comment.Comment\n                                }\n                                tempComments.push(tempComment)\n                            }\n\n                            dateList = dateList.sort((a, b) => { return moment(a.value) - moment(b.value) })\n                            committeeList = committeeList.sort((a, b) => a.label.localeCompare(b.label));\n\n                            this.toggleHideAllCategories(true, calendarData.CalendarCategories);\n\n                            this.setState({\n                                calendarData: calendarData,\n                                showTitles: calendarData.ChamberCode === \"H\",\n                                pendingSave: noSavedItems,\n                                comments: comments,\n                                tempComments: tempComments,\n                                isLoaded: true,\n                                calendarDate: calendarData.CalendarDate,\n                                commentEdit: commentEdit,\n                                dateList: [...new Map(dateList.map(x => [x[\"label\"], x])).values()],\n                                committeeList: [...new Map(committeeList.map(x => [x[\"value\"], x])).values()]\n                            }, () => {\n                                //Get bills in the session for the bill dropdown\n                                this.props.actions.getSessionBills('?sessionID= ' + this.state.calendarData.SessionID).then(() => {\n                                    let billList = [...this.props.bills.sessionBills];\n                                    billList.forEach(bill => {\n                                        bill.label = bill.LegislationNumber\n                                        bill.value = bill.LegislationID\n                                    });\n                                    this.setState({\n                                        billList: billList,\n                                    })\n                                })\n                                this.props.actions.getSessionById(this.state.calendarData.SessionID)\n                                    .then(() =>\n                                        this.setState({ selectedSession: this.props.session.selectedSession })\n                                    );\n                            });\n                        });\n                });\n            })\n    }\n\n    togglePreview() {\n        const opposite = !this.state.showPreview;\n        this.setState({\n            showPreview: opposite\n        });\n    }\n\n    handleCommentChange(e, sequence) {\n        let tempComments = [...this.state.tempComments];\n\n        tempComments.find(x => x.Sequence === sequence).Comment = e.target.value;\n\n        this.setState({\n            tempComments: tempComments\n        });\n    }\n\n    updateAgenda(organizedBills, saveRequired) {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.CalendarCategories = organizedBills;\n        this.setState({\n            calendarData: calendarData,\n            pendingSave: saveRequired === undefined ? this.state.pendingSave : saveRequired\n        });\n    }\n\n    updateAgendaItems(agendaItems, categoryIndex, agendaIndex) {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.CalendarCategories.filter(c => !c.DeletionDate)[categoryIndex].Agendas[agendaIndex].AgendaItems = agendaItems;\n\n        this.setState({\n            calendarData: calendarData,\n            pendingSave: true\n        });\n    }\n\n    changeCategoryDropdown(value) {\n        this.setState({\n            selectedCategory: value\n        });\n    }\n\n    addCategory() {\n        const selectedCategory = this.state.selectedCategory;\n        //Used to find the new index of the category so the hidden categories indices can be updated\n        const categoryFinder = new Date().getTime();\n        let organizedBills = [...this.state.calendarData.CalendarCategories];\n        let newCalendarCategory = {\n            IsLegislationCategory: selectedCategory.IsLegislationCategory,\n            Agendas: [],\n            CalendarCategoryTypeID: selectedCategory.CalendarCategoryTypeID,\n            CategoryCode: selectedCategory.CategoryCode,\n            Description: selectedCategory.Description,\n            PluralDescription: selectedCategory.PluralDescription,\n            DisplayType: selectedCategory.DisplayType,\n            CategoryType: selectedCategory.CategoryType,\n            Sequence: selectedCategory.Sequence,\n            isNewCategory: categoryFinder\n        }\n        organizedBills.push(newCalendarCategory);\n        //Sort the calendar by smallest to greatest sequence\n        organizedBills.sort((a, b) => (a.Sequence > b.Sequence) ? 1 : -1)\n        //Update the categories that are hidden since the array indices have changed\n        const newCategoryIndex = organizedBills.filter(c => !c.DeletionDate).findIndex(cat => cat.isNewCategory === categoryFinder);\n        if (newCategoryIndex !== -1) {\n            let hideCategories = this.state.hideCategories;\n            hideCategories.splice(newCategoryIndex, 0, false);\n            this.setState({\n                hideCategories: hideCategories\n            });\n        }\n        //Remove the selected category so the user doesn't accidentally add it twice\n        this.setState({\n            selectedCategory: ''\n        });\n        this.updateAgenda(organizedBills, true);\n\n    }\n\n    deleteCategory(category) {\n        let calendarData = { ...this.state.calendarData };\n        const selectedCategoryIndex = calendarData.CalendarCategories.filter(c => !c.DeletionDate).findIndex(c => c.CategoryCode === category.CategoryCode);\n        calendarData.CalendarCategories.filter(c => !c.DeletionDate)[selectedCategoryIndex].DeletionDate = new Date();\n        let hideCategories = this.state.hideCategories;\n        if (hideCategories[selectedCategoryIndex] !== null && hideCategories[selectedCategoryIndex] !== undefined) {\n            hideCategories.splice(selectedCategoryIndex, 1);\n        }\n        this.setState({ calendarData, hideCategories })\n    }\n\n    toggleHideCategory(catIndex) {\n        let hideCategories = this.state.hideCategories;\n        hideCategories[catIndex] = !hideCategories[catIndex]\n        this.setState({\n            hideCategories: hideCategories\n        });\n    }\n\n    toggleHideAllCategories(hide, calendarCategories) {\n        let hideCategories = this.state.hideCategories;\n        calendarCategories = calendarCategories || this.state.calendarData.CalendarCategories;\n        calendarCategories.forEach((cat, catIndex) => {\n            hideCategories[catIndex] = hide\n        })\n        this.setState({\n            hideCategories: hideCategories\n        });\n    }\n\n    toggleHideAllNonIncludedBills() {\n        this.setState({\n            hideAllNonIncludedBills: !this.state.hideAllNonIncludedBills\n        });\n    }\n\n    changeBillDropdown(index, value) {\n        let selectedBill = [...this.state.selectedBill];\n        selectedBill[index] = value;\n        this.setState({\n            selectedBill: selectedBill\n        });\n    }\n\n    changeDateDropdown(value, callback) {\n        this.setState({\n            selectedDate: value\n        }, () => {\n            if (this.state.selectedDate && this.state.selectedCommittee)\n                this.setPending();\n            if (callback) {\n                callback();\n            }\n        });\n    }\n\n    changeCommitteeDropdown(value, callback) {\n        this.setState({\n            selectedCommittee: value\n        }, () => {\n            if (this.state.selectedDate && this.state.selectedCommittee)\n                this.setPending();\n            if (callback) {\n                callback();\n            }\n        });\n    }\n\n    setPending() {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.CalendarCategories.forEach((category, i) => {\n            category.Agendas.forEach((agenda, j) => {\n                //If a given agenda item matches one filter (if one filter is selected) or both filters (if both are selected) \n                //Then mark it isActive and give it the pending value so we know to deactivate it if the user changes the filter selections   \n                //Otherwise if it's active, pending, and it no longer matches the filters then remove the pending value and deactivate it so it's hidden\n                if (((!this.state.selectedDate || this.state.selectedDate === \"\") && this.state.selectedCommittee && this.state.selectedCommittee.value === agenda.CommitteeID && !agenda.IsHidden && agenda.pending !== false)\n                    || ((!this.state.selectedCommittee || this.state.selectedCommittee === \"\") && this.state.selectedDate && this.state.selectedDate.value === agenda.CandidateDate && !agenda.IsHidden && agenda.pending !== false)\n                    || (this.state.selectedDate && this.state.selectedDate !== \"\" && this.state.selectedCommittee && this.state.selectedCommittee !== \"\" && this.state.selectedCommittee.value === agenda.CommitteeID && this.state.selectedDate.value === agenda.CandidateDate && !agenda.IsHidden && agenda.pending !== false)) {\n                    agenda.IsActive = true;\n                    //Disabling the pending feature which removes bills from the calendar if they've been included but not saved. I feel like there's a chance they'll want it back -JGB\n                    //agenda.pending = true; \n                } else if (agenda.IsActive === true && agenda.pending === true) {\n                    agenda.IsActive = false;\n                    delete agenda.pending;\n                }\n            })\n\n            category.Agendas.sort((a, b) => NUMERIC_SORT_CATEGORIES.includes(category.CalendarCategoryTypeID) ? sortAgendasNumerically(a, b, calendarData.ChamberCode) : sortAgendas(a, b, calendarData.ChamberCode))\n        })\n\n        this.setState({\n            calendarData\n        })\n    }\n\n    addBill(index, callback) {\n        let calendarCategories = [...this.state.calendarData.CalendarCategories];\n        let newAgenda = {};\n        //Check whether to move the bill from another category or add the bill\n        let billExists = false;\n        if (this.state.selectedBill[index]) {\n            let associatedCategory = calendarCategories.filter(c => !c.DeletionDate)[index];\n            calendarCategories.some((category, categoryIndex) => {\n                const duplicateBillIndex = category.Agendas.findIndex(bill => bill.LegislationID === this.state.selectedBill[index].LegislationID);\n                if (duplicateBillIndex >= 0) {\n                    billExists = true;\n                    newAgenda = { ...calendarCategories[categoryIndex].Agendas[duplicateBillIndex] };\n                    newAgenda.IsActive = true;\n                    newAgenda.CalendarCategoryTypeID = associatedCategory.CalendarCategoryTypeID;\n                    newAgenda.CalendarCategoryID = associatedCategory.CalendarCategoryID;\n                    calendarCategories[categoryIndex].Agendas.splice(duplicateBillIndex, 1);\n                    calendarCategories[categoryIndex].Agendas.forEach((item, itemIndex) => item.Sequence = itemIndex + 1);\n                    return true;\n                }\n            });\n            const sortNumeric = NUMERIC_SORT_CATEGORIES.includes(associatedCategory.CalendarCategoryTypeID);\n            let newAgendaSequence = null;\n            const categoryIsSequenced = Boolean(associatedCategory.Agendas && associatedCategory.Agendas.find(a => a.IsActive && Number.isInteger(a.Sequence)));\n            if (categoryIsSequenced) {\n                const sortedAgendas = associatedCategory.Agendas.sort((a, b) => sortNumeric ? sortAgendasNumerically(a, b, this.state.calendarData.ChamberCode) : sortAgendas(a, b, this.state.calendarData.ChamberCode));\n                const lowerLegislationNumberAgenda = sortedAgendas.findLast(a => findLastByIsActiveThenCalendarDateThenCandidateDateThenLegChamberTypeKey(a, this.state.selectedBill[index], this.state.calendarData.ChamberCode, sortNumeric, sortNumeric));\n                if (lowerLegislationNumberAgenda) {\n                    const finalLowerLegislationNumberIndex = associatedCategory.Agendas.findIndex(a => a.LegislationNumber === lowerLegislationNumberAgenda.LegislationNumber);\n                    newAgendaSequence = associatedCategory.Agendas[finalLowerLegislationNumberIndex].Sequence + 1;\n                } else {\n                    newAgendaSequence = 1;\n                }\n                associatedCategory.Agendas.forEach(agenda => {\n                    if (agenda.IsActive && agenda.Sequence >= newAgendaSequence) {\n                        agenda.Sequence++;\n                    }\n                })\n            }\n            if (!billExists) {\n                newAgenda = {\n                    CalendarCategoryTypeID: associatedCategory.CalendarCategoryTypeID,\n                    CalendarCategoryID: associatedCategory.CalendarCategoryID,\n                    IsActive: true,\n                    LegislationID: this.state.selectedBill[index].LegislationID,\n                    LegislationNumber: this.state.selectedBill[index].LegislationNumber,\n                    LegislationKey: this.state.selectedBill[index].LegislationKey,\n                    Patrons: this.state.selectedBill[index].Patrons,\n                    LegislationDescription: this.state.selectedBill[index].Description,\n                    LegislationTitle: this.state.selectedBill[index].LegislationTitle,\n                }\n            }\n            newAgenda.Sequence = newAgendaSequence;\n            associatedCategory.Agendas.splice(newAgendaSequence || 0, 0, newAgenda);\n            associatedCategory.Agendas.sort((a, b) => sortNumeric ? sortAgendasNumerically(a, b, this.state.calendarData.ChamberCode) : sortAgendas(a, b, this.state.calendarData.ChamberCode))\n            associatedCategory.Agendas.forEach((item, itemIndex) => { if (item.IsActive) { item.Sequence = itemIndex + 1 } });\n\n            this.updateAgenda(calendarCategories, true);\n\n            //Remove object so the bill is no longer currently selected in the dropdown\n            let selectedBill = [...this.state.selectedBill];\n            selectedBill[index] = '';\n            this.setState({\n                selectedBill: selectedBill\n            });\n        }\n\n        if (callback) {\n            callback();\n        }\n    }\n\n    genCalendarPreview(category) {\n        this.setState({\n            gettingPdf: true\n        });\n        // This endpoint returns a pdf document and not json so the partnerRequest function will not work\n        // It doesn't need to be saved to the redux store because it will not be referenced after the user sees it. So it is called here within the component.\n        const API_URL = window.env ? window.env.API_SERVER : '';\n        const idToken = 'LIS_ID_TOKEN';\n        let signal = new window.AbortController().signal;\n        const config = {\n            headers: {\n                'content-type': \"application/json; charset=utf-8\",\n                Authorization: \"Bearer \" + localStorage.getItem(idToken),\n                'WebAPIKey': process.env.REACT_APP_API_KEY\n            },\n            method: \"GET\",\n            signal: signal\n        };\n        let params = `?calendarId=${this.state.calendarData.CalendarID}`\n        if (category) {\n            params += `&calendarCategoryID=${category.CalendarCategoryID}`\n        }\n        fetch((API_URL || process.env.REACT_APP_CALENDAR_FILE_API_URL) + '/CalendarFileGeneration/api/PreviewCalendarFileAsync' + params, config)\n            .then(response => {\n                if (response.status === 204) {\n                    throw 'No Content';\n                } else if (response.status > 399) {\n                    throw response;\n                } else {\n                    response.blob()\n                        .then(res => {\n                            if (this.pdfRef && this.pdfRef.current) {\n                                let pdfRef = this.pdfRef.current;\n                                pdfRef.setAttribute('src', URL.createObjectURL(res));\n                                pdfRef.onload = () => {\n                                    this.setState({\n                                        gettingPdf: false\n                                    });\n                                };\n                            }\n                        })\n                }\n            }).catch(err => {\n                if (err.name === 'AbortError') {\n                    return;\n                }\n                this.setState({\n                    gettingPdf: false\n                });\n                //This is a response and the text needs to be extracted\n                if (err.text) {\n                    err.text().then(err => console.log(err.toString()));\n                } else {\n                    console.log(err.toString())\n                }\n                this.props.actions.makeToast([{ message: \"Failed To Get Data\", type: \"failure\" }]);\n            })\n    }\n\n    addComment() {\n        let newComments = this.state.comments;\n        let newTempComments = this.state.tempComments\n\n        newComments.push(\n            {\n                CalendarID: this.state.calendarData.CalendarID,\n                Comment: \"\",\n                Sequence: this.state.comments.length > 0 ? this.state.comments[this.state.comments.length - 1].Sequence + 1 : 1\n            }\n        )\n\n        newTempComments.push(\n            {\n                Comment: \"\",\n                Sequence: newComments[newComments.length - 1].Sequence\n            }\n        )\n\n        this.setState({\n            comments: newComments,\n            tempComments: newTempComments\n        }, () => {\n            this.toggleCommentEdit(newComments[newComments.length - 1].Sequence)\n        })\n    }\n\n    removeComment(i) {\n        let newComments = this.state.comments;\n        if (newComments[i].CalendarCommentID != undefined) {\n            newComments[i].DeletionDate = moment().toISOString();\n            newComments[i].Sequence = 0;\n            newComments.sort((a, b) => a.Sequence - b.Sequence);\n        } else {\n            newComments.splice(i, 1);\n        }\n\n        let newSequence = 1;\n\n        for (let j = 0; j < newComments.length; j++) {\n            if (!newComments[j].DeletionDate) {\n                newComments[j].Sequence = newSequence;\n                newSequence++;\n            }\n        }\n\n        this.setState({\n            comments: newComments\n        })\n    }\n\n    commentShift(i, shiftUp) {\n        let newComments = [...this.state.comments];\n        let newTempComments = [...this.state.tempComments];\n        let newSequence = shiftUp ? newComments[i - 1].Sequence : newComments[i + 1].Sequence;\n\n        let commentEdit = [...this.state.commentEdit];\n        commentEdit[i] = commentEdit[shiftUp ? i - 1 : i + 1] == true ? true : false;\n        commentEdit[shiftUp ? i - 1 : i + 1] = true;\n\n        newComments[i].Sequence = newSequence;\n        newTempComments[i].Sequence = newSequence\n\n        if (shiftUp) {\n            newComments[i - 1].Sequence = newSequence + 1;\n            newTempComments[i - 1].Sequence = newSequence + 1;\n        } else {\n            newComments[i + 1].Sequence = newSequence - 1;\n            newTempComments[i + 1].Sequence = newSequence - 1;\n        }\n\n        newComments.sort((a, b) => a.Sequence - b.Sequence);\n        newTempComments.sort((a, b) => a.Sequence - b.Sequence);\n\n        this.setState({\n            comments: newComments,\n            tempComments: newTempComments,\n            commentEdit: commentEdit\n        })\n    }\n\n    handleProFormaChange() {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.IsProforma = !calendarData.IsProforma\n        this.setState({\n            calendarData: calendarData\n        });\n    }\n\n    toggleCalendarPreview(categoryIndex) {\n        this.setState({\n            showCategoryPreview: categoryIndex\n        });\n    }\n\n    togglePortal(state, category) {\n        this.setState({\n            showPortal: !state\n        }, () => {\n            if (this.state.showPortal && category) {\n                this.genCalendarPreview(category === 'All' ? '' : category);\n            }\n        });\n    }\n\n    saveCalendar(publishFlag) {\n        this.setState({ isSaving: true });\n        let calendarSave = { ...this.state.calendarData };\n        //Add new comments\n        calendarSave.CalendarComments = this.state.comments;\n\n        //If saving or publishing set isActive off showAmendments. If unpublishing, set showAmendments off isActive. \n        calendarSave.CalendarCategories.forEach(category => {\n            if ([98, 102].includes(category.CalendarCategoryTypeID)) {\n                if (publishFlag || (!calendarSave.IsPublic && !publishFlag)) {\n                    category.Agendas.forEach(agenda => {\n                        agenda.AgendaItems?.forEach(item => {\n                            if (item.LDNumber) {\n                                item.IsActive = category.showAmendments;\n                            }\n                        });\n                    });\n                } else if (!publishFlag) {\n                    category.showAmendments = !!category.Agendas.flatMap(agenda => agenda.AgendaItems).find(agendaItem => agendaItem.IsActive && agendaItem.LDNumber);\n                }\n            }\n        })\n\n        //Set whether it should be published or not. The published value depends on what button the user clicked\n        calendarSave.IsPublic = publishFlag;\n        this.props.actions.saveCalendar({ Calendars: [calendarSave] })\n            .then(failureMessage => {\n                if (this.state.showPreview || calendarSave.IsPublic) {\n                    let content = this.componentRef.innerHTML.replace(/\\\\\"/g, '');\n                    this.props.actions.sendCalendarHtml({ Chamber: calendarSave.ChamberCode, CalendarDate: calendarSave.CalendarDate, CalendarNumber: calendarSave.CalendarNumber, ContentHTML: content });\n                }\n                if (publishFlag) {\n                    //Calendars cannot be edited once published so send the user back to the grid\n                    const calendarId = this.props.calendar.calendarSave.CalendarID;\n                    this.props.navigate('/calendar-management')\n                    this.props.actions.saveCalendarFile(\"?calendarID=\" + calendarId)\n                } else {\n                    //If the form was not published then get the new mod dates and update the React state variables\n                    let calendarSave = { ...this.props.calendar.calendarSave };\n                    let comments = [];\n\n                    for (let i = 0; i < calendarSave.CalendarComments.length; i++) {\n                        let comment = calendarSave.CalendarComments[i];\n                        comment.Sequence = i + 1;\n                        comments.push(comment);\n                    }\n\n                    calendarSave.CalendarCategories.forEach(category => {\n                        category.Agendas.sort((a, b) => NUMERIC_SORT_CATEGORIES.includes(category.CalendarCategoryTypeID) ? sortAgendasNumerically(a, b, calendarSave.ChamberCode) : sortAgendas(a, b, calendarSave.ChamberCode))\n                        //Persist old showAmendments after save or unpublish\n                        if ([98, 102].includes(category.CalendarCategoryTypeID)) {\n                            category.showAmendments = !!category.Agendas.flatMap(agenda => agenda.AgendaItems).find(agendaItem => agendaItem.IsActive && agendaItem.LDNumber);\n                        }\n                    })\n\n                    this.setState({\n                        calendarData: calendarSave,\n                        comments: comments,\n                        isSaving: false,\n                        pendingSave: false,\n                        calendarDate: calendarSave.CalendarDate\n                    });\n                }\n                let toasts = [];\n                if (failureMessage && failureMessage.includes(\"Minutes\")) {\n                    toasts.push({ message: \"Problem with Minutes Creation\", type: \"failure\" });\n                }\n                toasts.push({ message: `Calendar ${publishFlag ? 'Published' : 'Saved'}`, type: \"success\" });\n                this.props.actions.makeToast(toasts)\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isSaving: false\n                });\n                console.log(err)\n                this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n            });\n    }\n\n    handlePdfFile(e) {\n        this.setState({\n            selectedFile: e.target.files[0]\n        });\n    }\n\n    submitPdfFile() {\n        this.setState({\n            isSubmittingFile: true\n        });\n        this.props.actions.replacePdf('?calendarID=' + this.state.calendarData.CalendarID, this.state.selectedFile)\n            .then(() => {\n                this.setState({\n                    isSubmittingFile: false,\n                    selectedFile: ''\n                });\n                this.props.actions.makeToast([{ message: \"PDF Replacement Success\", type: \"success\" }]);\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isSubmittingFile: false\n                });\n                this.props.actions.makeToast([{ message: \"PDF Replacement Failed\", type: \"failure\" }]);\n            })\n    }\n\n    changeConveneTime(date) {\n        let calendarData = { ...this.state.calendarData };\n        calendarData.CalendarDate = date.toISOString();\n        this.setState({\n            calendarData: calendarData\n        });\n    }\n\n    toggleAgenda(catIndex, agendaIndex) {\n        let calendar = { ...this.state.calendarData };\n        let agenda = calendar.CalendarCategories.filter(c => !c.DeletionDate)[catIndex].Agendas[agendaIndex];\n        agenda.show = !agenda.show;\n        if (agenda.IsActive && agenda.LegislationNumber && !agenda.Versions) {\n            agenda.Versions = []\n            this.props.actions.getBillVersionByBillNumber('?BillNumber=' + calendar.CalendarCategories.filter(c => !c.DeletionDate)[catIndex].Agendas[agendaIndex].LegislationNumber + '&SessionID=' + calendar.SessionID)\n                .then(() => {\n                    // Get the calendar data again just in case the user toggled the agenda items\n                    calendar = { ...this.state.calendarData };\n                    let versions = this.props.bills.billVersion.filter(ver => ver.Version !== \"Amendment\" && moment(ver.DraftDate).isSameOrBefore(calendar.CalendarDate))\n                    // Most recent versions first\n                    versions = versions.sort((a, b) => moment(a.DraftDate).isSameOrBefore(b.DraftDate))\n                    calendar.CalendarCategories.filter(c => !c.DeletionDate)[catIndex].Agendas[agendaIndex].Versions = versions\n                    this.setState({\n                        calendarData: calendar\n                    });\n                }).catch(err => {\n                    if (err === \"Aborted\") {\n                        return\n                    }\n                    calendar = { ...this.state.calendarData };\n                    calendar.CalendarCategories.filter(c => !c.DeletionDate)[catIndex].Agendas[agendaIndex].Versions = \"fail\";\n                    this.setState({\n                        calendarData: calendar\n                    });\n                })\n        }\n        this.setState({\n            calendarData: calendar\n        });\n    }\n\n    toggleCommentEdit(sequence) {\n        let commentEdit = [...this.state.commentEdit];\n        let tempComments = [...this.state.tempComments];\n\n        commentEdit[sequence - 1] = !commentEdit[sequence - 1];\n        //Reset the temporary comment value\n        tempComments.find(x => x.Sequence === sequence).Comment = this.state.comments.find(x => x.Sequence === sequence).Comment;\n\n        this.setState({\n            commentEdit: commentEdit,\n            tempComments: tempComments\n        })\n    }\n\n    confirmCommentEdit(sequence) {\n        let comments = [...this.state.comments];\n\n        comments.find(x => x.Sequence === sequence).Comment = this.state.tempComments.find(x => x.Sequence === sequence).Comment;\n\n        this.setState({\n            comments: comments\n        }, () => {\n            this.toggleCommentEdit(sequence)\n        })\n    }\n\n    toggleShowTitles() {\n        this.setState({\n            showTitles: !this.state.showTitles\n        })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { message } = this.state;\n\n        let conveneTime = moment.utc(this.state.calendarData.CalendarDate);\n        let timeChecker = conveneTime.clone().startOf('day');\n        // By default created calendars have a time of 00:00. If it is midnight then display it as 12:00 pm instead\n        if (conveneTime.isSame(timeChecker)) {\n            conveneTime.hour(12).startOf('hour');\n        }\n        if (message) {\n            return (\n                <div className=\"dlas-forms\">\n                    <span>{message}</span>\n                </div>\n            );\n        }\n        else {\n            let calendarFileUrl = '';\n            if (this.state.calendarData.CalendarFiles) {\n                const pdfFile = this.state.calendarData.CalendarFiles.find(file => file.FileURL.toUpperCase().includes('PDF'));\n                if (pdfFile) {\n                    const url = new URL(pdfFile.FileURL);\n                    calendarFileUrl = lisDocDomain + (url.pathname[0] === '/' ? url.pathname : '/' + url.pathname);\n                }\n            }\n\n            //This calendarTime logic is also set in lis-public-calendar-details, if changed here, change there as well\n            const calendarTime = moment.utc(this.state.calendarData.CalendarDate).isSame(moment.utc(this.state.calendarData.CalendarDate).hour(0), \"minute\")\n                || moment.utc(this.state.calendarData.CalendarDate).isSame(moment.utc(this.state.calendarData.CalendarDate).hour(12), \"minute\")\n                ? \"12 noon\"\n                : moment.utc(this.state.calendarData.CalendarDate).format(\"h:mm a\");\n\n            if (this.state.showPreview) {\n                return (\n                    <div style={{ paddingBottom: '75px' }}>\n                        {this.state.showPortal &&\n                            <Popout togglePortal={this.togglePortal} windowTitle=\"PDF Preview\">\n                                {this.state.gettingPdf &&\n                                    <div className=\"center-spinner spinner\">You must save before seeing changes in this PDF preview</div>\n                                }\n                                <iframe style={{ display: this.state.gettingPdf ? 'none' : 'block', width: '100%', height: '100%' }} ref={this.pdfRef}></iframe>\n                            </Popout>\n                        }\n                        <div className=\"flex-row\">\n                            <h2>Calendar Preview</h2>\n                            <ReactToPrint\n                                trigger={() => <a type=\"button\" className=\"button print\"> Print</a>}\n                                content={() => this.componentRef}\n                                pageStyle={\"break-inside: avoid\"}\n                            />\n                        </div>\n                        <CalendarDetailsComponent\n                            calendar={this.state.calendarData}\n                            calendarTime={calendarTime}\n                            session={this.state.selectedSession}\n                            comments={this.state.comments}\n                            updateAgendaItems={this.updateAgendaItems}\n                            isCalendarForm={true}\n                            toggleAgenda={this.toggleAgenda}\n                            sessionList={this.props.session.sessionList}\n                            calendarCategoryReferences={this.state.calendarCategories}\n                        />\n                        <div style={{ display: \"none\" }}>\n                            <div ref={el => (this.componentRef = el)}>\n                                <CalendarDetailsPrintout\n                                    calendar={this.state.calendarData}\n                                    session={this.state.selectedSession}\n                                    comments={this.state.comments}\n                                />\n                            </div>\n                        </div>\n                        <div className=\"align-right floating-button-bar inline-list\">\n                            <button onClick={() => this.saveCalendar(PUBLISH_CALENDAR)} disabled={this.state.isSaving} className=\"button\">{this.state.isSaving ? \"Publishing...\" : \"Publish\"}</button>\n                            <button onClick={this.togglePreview} className=\"button secondary\">Edit</button>\n                            <button disabled={this.state.pendingSave || this.state.calendarData.IsPublic} onClick={() => this.togglePortal(this.state.showPortal, 'All')} className=\"button\" type=\"button\">PDF Preview</button>\n                        </div>\n                    </div>\n                );\n            } else {\n                return (\n                    <React.Fragment>\n                        <div>\n                            <Prompt\n                                when={this.state.pendingSave === true}\n                                message={`You have unsaved changes. Are you sure you would like to leave?`}\n                            />\n                        </div>\n                        {this.state.calendarData ? <h1>{(this.state.calendarData.ChamberCode === \"H\" ? \"House \" : \"Senate \") + \"Calendar\"}</h1> : <h1>&nbsp;</h1>}\n                        {this.state.showPortal &&\n                            <Popout togglePortal={this.togglePortal} windowTitle=\"Preview\">\n                                {this.state.gettingPdf &&\n                                    <div className=\"center-spinner spinner\">You must save before seeing changes in this PDF preview</div>\n                                }\n                                <iframe style={{ display: this.state.gettingPdf ? 'none' : 'block', width: '100%', height: '100%' }} ref={this.pdfRef}></iframe>\n                            </Popout>\n                        }\n                        {this.state.showCategoryPreview !== -1 &&\n                            <div onClick={() => this.toggleCalendarPreview(-1)} className=\"overlay center-content\">\n                                <div className=\"full\">\n                                    <div onClick={e => e.stopPropagation()} className=\"dlas-forms user-forms advanced-search overlay-content animated-fade-in-up\" ref={el => (this.componentRef = el)}>\n                                        <CalendarDetailsComponent\n                                            calendar={{ ...this.state.calendarData, CalendarCategories: [this.state.calendarData.CalendarCategories[this.state.showCategoryPreview]] }}\n                                            calendarTime={calendarTime}\n                                            session={this.state.selectedSession}\n                                            comments={[]}\n                                            userClaims={{ resources: [] }}\n                                            toggleAgenda={this.toggleAgenda}\n                                            sessionList={this.props.session.sessionList}\n                                            isCalendarForm={true}\n                                            calendarCategoryReferences={this.state.calendarCategories}\n                                        />\n                                        <button type=\"button\" onClick={() => this.toggleCalendarPreview(-1)} className=\"button secondary\">Close</button>\n                                    </div>\n                                </div>\n                            </div>\n                        }\n                        <div className=\"user-forms\">\n                            {!this.state.isLoaded &&\n                                <div className=\"center-spinner spinner\">Loading results...</div>\n                            }\n                            {this.state.isLoaded &&\n                                <div className=\"dlas-forms\">\n                                    <span className=\"error-message\">{message}</span>\n\n                                    <fieldset style={{ paddingBottom: '50px' }} className=\"fieldset-collapse fieldset-open\">\n                                        <legend>Calendar Information</legend>\n                                        <div>\n                                            <div className=\"multi-row four no-margin\">\n                                                <div>\n                                                    <Fields.TextInput\n                                                        value={this.state.selectedSession ? this.state.selectedSession.SessionYear + ' ' + this.state.selectedSession.DisplayName : ''}\n                                                        disabled={true}\n                                                    />\n                                                </div>\n                                                <div>\n                                                    <Fields.TextInput\n                                                        value={this.state.calendarData ? moment(this.state.calendarData.CalendarDate).format(\"L\") + (this.state.calendarData.CalendarNumber > 1 ? [' (', ')'].join('Supp. ' + (this.state.calendarData.CalendarNumber - 1)) : '') : ''}\n                                                        disabled\n                                                    />\n                                                </div>\n                                                <div>\n                                                    {/* Supplemental calendars do not get this date picker */}\n                                                    {this.state.calendarData.CalendarNumber < 2 &&\n                                                        <DatePicker\n                                                            selected={conveneTime}\n                                                            showTimeSelect\n                                                            showTimeSelectOnly\n                                                            dateFormat=\"h:mm a\"\n                                                            timeFormat=\"h:mm a\"\n                                                            onChange={this.changeConveneTime}\n                                                        />\n                                                    }\n                                                </div>\n                                                <div className=\"flex-row flex-end flex-vertical-center\">\n                                                    {calendarFileUrl && !this.state.isSubmittingFile &&\n                                                        <>\n                                                            <button style={{ marginRight: 5 }} type=\"button\" className=\"button small-button file-button\"><input type=\"file\" accept=\".pdf\" onChange={this.handlePdfFile} />{this.state.selectedFile ? this.state.selectedFile.name : \"Replace PDF\"}</button>\n                                                            {this.state.selectedFile ?\n                                                                <button onClick={this.submitPdfFile} type=\"button\" className=\"button small-button\">Submit</button>\n                                                                :\n                                                                <React.Fragment>\n                                                                    <a target=\"_blank\" className=\"icon pdf\" href={calendarFileUrl}></a>\n                                                                    {this.state.calendarData.CalendarNumber < 2 &&\n                                                                        <a target=\"_blank\" className=\"icon file-empty\" style={{ marginLeft: \"5px\" }} href={calendarFileUrl.replace(\".PDF\", \"-padded.PDF\")}></a>}\n                                                                </React.Fragment>\n                                                            }\n                                                        </>\n                                                    }\n                                                    {calendarFileUrl && this.state.isSubmittingFile &&\n                                                        <div className=\"small-spinner\"></div>\n                                                    }\n                                                </div>\n                                            </div>\n                                            <div className=\"flex-row\">\n                                                <label className=\"label-and-checkbox pro-forma\"><input type=\"checkbox\" checked={this.state.calendarData.IsProforma} onChange={this.handleProFormaChange} /> Create a Pro Forma Calendar</label>\n                                                <button type=\"button\" className=\"button float-right title-toggle\" onClick={() => this.toggleShowTitles()}>{this.state.showTitles ? \"Show Bill Captions\" : \"Show Bill Titles\"}</button>\n                                            </div>\n                                            {this.state.comments.map((comment, i) => {\n                                                return (\n                                                    comment.DeletionDate === undefined &&\n                                                    <div className=\"grid-wrapper calendar-comment-row\" key={i}>\n                                                        {this.state.commentEdit[comment.Sequence - 1] ?\n                                                            <React.Fragment>\n                                                                <div>\n                                                                    <Fields.TextArea\n                                                                        label={\"Comment \" + comment.Sequence}\n                                                                        type=\"text\"\n                                                                        style={{ resize: 'vertical', minHeight: 65, width: \"100%\" }}\n                                                                        placeholder=\"Comments\"\n                                                                        value={this.state.tempComments.find(x => x.Sequence === comment.Sequence).Comment}\n                                                                        onChange={(e) => this.handleCommentChange(e, comment.Sequence)}\n                                                                    />\n                                                                </div>\n                                                                <div className=\"grid-wrapper two comment-controls\">\n                                                                    <div style={{ paddingTop: \"25px\" }}>\n                                                                        <button className=\"icon save\" style={{ marginRight: \"10px\" }} onClick={() => this.confirmCommentEdit(comment.Sequence)} />\n                                                                        <button className=\"icon delete\" onClick={() => this.toggleCommentEdit(comment.Sequence)} />\n                                                                    </div>\n                                                                    <div className=\"arrows\">\n                                                                        {i !== 0 && this.state.comments.length > 1 &&\n                                                                            <button className=\"arrow-up\" onClick={() => this.commentShift(i, true)} />\n                                                                        }\n                                                                        {i !== this.state.comments.length - 1 &&\n                                                                            <button className=\"arrow-down\" onClick={() => this.commentShift(i, false)} />\n                                                                        }\n                                                                    </div>\n                                                                </div>\n                                                            </React.Fragment>\n                                                            :\n                                                            <React.Fragment>\n                                                                <div>\n                                                                    <label>{\"Comment \" + comment.Sequence}</label>\n                                                                    <p class=\"calendar-comment\">{comment.Comment}</p>\n                                                                </div>\n                                                                <div className=\"grid-wrapper two\">\n                                                                    <div style={{ paddingTop: \"30px\", display: \"grid\", gridTemplateColumns: \"1fr 1fr\", gridGap: \"10px\" }}>\n                                                                        <button className=\"button edit\" onClick={() => this.toggleCommentEdit(comment.Sequence)} />\n                                                                        <button className=\"icon bin\" onClick={() => this.removeComment(i)} />\n                                                                    </div>\n                                                                    <div />\n                                                                </div>\n                                                            </React.Fragment>\n                                                        }\n                                                    </div>\n                                                )\n                                            })\n                                            }\n                                            <div className=\"add-comment\">\n                                                <button className=\"button float-right\" onClick={() => this.addComment()}>Add Comment</button>\n                                            </div>\n                                        </div>\n                                        <BillsGrid\n                                            organizedBills={this.state.calendarData.CalendarCategories}\n                                            updateAgenda={this.updateAgenda}\n                                            calendarCategories={this.state.calendarCategories}\n                                            hideCategories={this.state.hideCategories}\n                                            selectAllActive={this.state.selectAllActive}\n                                            selectAllInactive={this.state.selectAllInactive}\n                                            changeCategoryDropdown={this.changeCategoryDropdown}\n                                            selectedCategory={this.state.selectedCategory}\n                                            addCategory={this.addCategory}\n                                            deleteCategory={this.deleteCategory}\n                                            selectedBill={this.state.selectedBill}\n                                            changeBillDropdown={this.changeBillDropdown}\n                                            addBill={this.addBill}\n                                            billList={this.state.billList}\n                                            toggleCalendarPreview={this.toggleCalendarPreview}\n                                            pendingSave={this.state.pendingSave}\n                                            hideCategory={this.state.hideCategory}\n                                            toggleHideCategory={this.toggleHideCategory}\n                                            toggleHideAllCategories={this.toggleHideAllCategories}\n                                            toggleHideAllNonIncludedBills={this.toggleHideAllNonIncludedBills}\n                                            hideAllNonIncludedBills={this.state.hideAllNonIncludedBills}\n                                            togglePortal={this.togglePortal}\n                                            showPortal={this.state.showPortal}\n                                            updateAgendaItems={this.updateAgendaItems}\n                                            calendarTime={calendarTime}\n                                            showTitles={this.state.showTitles}\n                                            changeDateDropdown={this.changeDateDropdown}\n                                            changeCommitteeDropdown={this.changeCommitteeDropdown}\n                                            dateList={this.state.selectedCommittee && this.state.selectedCommittee !== \"\" ? this.state.dateList.filter(x => x.committee.includes(this.state.selectedCommittee.value)) : this.state.dateList}\n                                            committeeList={this.state.selectedDate && this.state.selectedDate !== \"\" ? this.state.committeeList.filter(x => this.state.selectedDate.committee.includes(x.value)) : this.state.committeeList}\n                                            selectedCommittee={this.state.selectedCommittee}\n                                            selectedDate={this.state.selectedDate}\n                                            fullCommitteeList={this.props.committee.committeeList}\n                                            chamberCode={this.state.calendarData.ChamberCode}\n                                            sessionCode={this.state.calendarData.SessionCode}\n                                            userRoles={this.props.login.userClaims.roles}\n                                        />\n                                    </fieldset>\n                                    <div className=\"align-right floating-button-bar inline-list\">\n                                        <button disabled={this.state.isSaving} onClick={() => this.saveCalendar(SAVE_CALENDAR)} className=\"button\" type=\"submit\">{this.state.calendarData.IsPublic ? \"Unpublish\" : this.state.isSaving ? \"Saving...\" : \"Save\"}</button>\n                                        <button disabled={this.state.pendingSave || this.state.isSaving || this.state.calendarData.IsPublic} onClick={this.togglePreview} className=\"button\" type=\"button\">Preview</button>\n                                        <button disabled={this.state.pendingSave || this.state.isSaving || this.state.calendarData.IsPublic} onClick={() => this.togglePortal(this.state.showPortal, 'All')} className=\"button\" type=\"button\">PDF Preview</button>\n                                    </div>\n                                </div>\n                            }\n                        </div>\n                    </React.Fragment>\n                );\n            }\n        }\n    }\n};\n\nconst CalendarManagementForm = connect(\n    (state) => {\n        const { calendar, session, bills, nav, committee, login } = state;\n        return {\n            calendar,\n            session,\n            bills,\n            nav,\n            committee,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, calendarActionCreators, sessionActionCreators, billActionCreators, navActionCreators, committeeActionCreators), dispatch)\n        }\n    }\n)(SenateCalendarFormComponent)\n\nexport default CalendarManagementForm;\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\n\nimport { calendarActionCreators } from '../../../stores/lis-calendar-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport HouseForm from './lis-house-calendar-form';\nimport SenateForm from './lis-senate-calendar-form';\n\nclass CalendarFormContainerComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoading: true\n        }\n\n        this.navigate = this.navigate.bind(this);\n    }\n\n    componentDidMount() {\n        let calendarBillParams = '?calendarId=' + this.props.match.params.calendarid;\n\n        this.props.actions.getCalendarById(calendarBillParams, true)\n            .then(() => {\n                this.setState({\n                    isLoading: false\n                })\n            })\n            .catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isLoading: false,\n                    message: \"Failed to get data from server\"\n                })\n                this.props.actions.makeToast([{ message: \"Load Failed\", type: \"failure\" }])\n            });\n    }\n\n    navigate(path) {\n        this.props.history.push(path);\n    }\n\n    render() {\n        return (\n            <div>\n                {!this.state.isLoading ?\n                    <React.Fragment>\n                        {this.props.calendar.calendarGet.ChamberCode === \"H\"\n                            ? <HouseForm\n                                calendarData={this.props.calendar.calendarGet}\n                                navigate={this.navigate}\n                            />\n                            : <SenateForm\n                                calendarData={this.props.calendar.calendarGet}\n                                navigate={this.navigate}\n                            />\n                        }\n                    </React.Fragment>\n                    : <div className=\"center-spinner spinner\">Loading results...</div>\n                }\n            </div>\n        )\n    }\n}\n\nconst CalendarFormContainer = connect(\n    (state) => {\n        const { calendar, nav } = state;\n        return {\n            calendar,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, calendarActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(CalendarFormContainerComponent)\n\nexport default CalendarFormContainer;","import React from 'react';\nimport { Route } from 'react-router';\nimport CalendarGrid from './lis-calendar-grid';\nimport CalendarFormContainer from './lis-calendar-form-container';\n\nclass CalendarManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedChamber: '',\n            selectedSession: ''\n        }\n        this.handleDropdownChange = this.handleDropdownChange.bind(this);\n    }\n\n    handleDropdownChange(key, val, callback) {\n        this.setState({\n            [key]: val\n        }, () => callback());\n    }\n\n    render() {\n        const { selectedChamber, selectedSession } = this.state;\n        return (\n            <div>\n                <Route exact path={this.props.match.path} render={props => <CalendarGrid\n                    {...props}\n                    selectedChamber={selectedChamber}\n                    selectedSession={selectedSession}\n                    handleDropdownChange={this.handleDropdownChange}\n                />} />\n                <Route path={\"/calendar-management/edit-calendar/:calendarid\"} component={CalendarFormContainer} />\n            </div>\n        )\n    }\n}\n\nexport default CalendarManagement;","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst minutesListRequest = 'MINUTES_LIST_REQUEST';\nconst minutesListSuccess = 'MINUTES_LIST_SUCCESS';\nconst minutesListFailure = 'MINUTES_LIST_FAILURE';\n\nconst minutesCreateRequest = 'MINUTES_CREATE_REQUEST';\nconst minutesCreateSuccess = 'MINUTES_CREATE_SUCCESS';\nconst minutesCreateFailure = 'MINUTES_CREATE_FAILURE';\n\nconst categoryCreateSuccess = 'CATEGORY_CREATE_SUCCESS';\nconst categoryCreateFailure = 'CATEGORY_CREATE_FAILURE';\n\nconst minutesBookSuccess = 'MINUTES_BOOK_SUCCESS';\nconst minutesBookFailure = 'MINUTES_BOOK_FAILURE';\n\nconst minutesBookForCalendarSuccess = 'MINUTES_BOOK_FOR_CALENDAR_SUCCESS';\nconst minutesBookForCalendarFailure = 'MINUTES_BOOK_FOR_CALENDAR_FAILURE';\n\nconst minutesBookSaveSuccess = 'MINUTES_BOOK_SAVE_SUCCESS';\nconst minutesBookSaveFailure = 'MINUTES_BOOK_SAVE_FAILURE';\n\nconst minutesBookPublishSuccess = 'MINUTES_BOOK_SAVE_SUCCESS';\nconst minutesBookPublishFailure = 'MINUTES_BOOK_SAVE_FAILURE';\n\nconst clerksCopyGenSuccess = 'GEN_CLERKS_COPY_SUCCESS';\nconst clerksCopyGenFailure = 'GEN_CLERKS_COPY_FAILURE';\n\nconst entriesSaveSuccess = 'ENTRIES_SAVE_SUCCESS';\nconst entriesSaveFailure = 'ENTRIES_SAVE_FAILURE';\n\nconst entriesCreateSuccess = 'ENTRIES_CREATE_SUCCESS';\nconst entriesCreateFailure = 'ENTRIES_CREATE_FAILURE';\n\nconst entriesCommunicationSaveSuccess = 'ENTRY_COMMUNICATION_SAVE_SUCCESS';\nconst entriesCommunicationSaveFailure = 'ENTRY_COMMUNICATION_SAVE_FAILURE';\n\nconst actionTypesSuccess = \"ACTION_TYPE_LIST_SUCCESS\";\nconst actionTypesFailure = \"ACTION_TYPE_LIST_FAILURE\";\n\nconst chairReportSuccess = \"CHAIR_REPORT_SUCCESS\";\nconst chairReportFailure = \"CHAIR_REPORT_FAILURE\";\n\nconst committeeMinutesSummarySuccess = \"COMMITTEE_MINUTES_SUMMARY_SUCCESS\";\nconst committeeMinutesSummaryFailure = \"COMMITTEE_MINUTES_SUMMARY_FAILURE\";\n\nconst initialState = {\n    minutesList: [],\n    minutesMessage: '',\n    minutesCreateMessage: '',\n    minutesBook: '',\n    minutesBookError: '',\n    minutesBookForCalendar: '',\n    minutesBookErrorForCalendarError: '',\n    minutesBookSave: [],\n    minutesBookSaveError: '',\n    minutesBookPublish: [],\n    minutesBookPublishError: '',\n    clerksCopyGen: [],\n    clerksCopyGenError: '',\n    categoryCreate: '',\n    categoryCreateError: '',\n    entriesSave: [],\n    entriesSaveError: '',\n    entriesCreate: [],\n    entriesCreateError: '',\n    entriesCommunicationSave: '',\n    entriesCommunicationSaveError: '',\n    minutesGen: '',\n    minutesGenError: '',\n    actionTypes: [],\n    actionTypesError: '',\n    chairReport: '',\n    chairReportError: '',\n    committeeMinutesSummary: '',\n    committeeMinutesSummaryError: ''\n};\n\nexport const minutesActionCreators = {\n    // GET MINUTES LIST FOR MINUTES MGMT GRID\n    requestMinutesList: () => ({\n        type: minutesListRequest,\n        minutesList: [],\n        isFetching: true\n    }),\n\n    receiveMinutesList: (list, message) => ({\n        type: minutesListSuccess,\n        isFetching: false,\n        minutesList: list,\n        minutesMessage: message\n    }),\n\n    minutesListError: (message) => ({\n        type: minutesListFailure,\n        isFetching: false,\n        minutesList: [],\n        minutesMessage: message\n    }),\n\n    getMinutesList: (params, partner) => {\n        return dispatch => {\n            dispatch(minutesActionCreators.requestMinutesList());\n\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/GetPartnerMinutesBookListAsync?', 'GET', headers, '', params);\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/GetPublishedMinutesBookListAsync?', 'GET', headers, '', params);\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.minutesListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(minutesActionCreators.receiveMinutesList(result[1].Minutes))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.receiveMinutesList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // MINUTES CREATE\n    requestMinutesCreate: () => ({\n        type: minutesCreateRequest,\n        isFetching: true\n    }),\n\n    receiveMinutesCreate: (message) => ({\n        type: minutesCreateSuccess,\n        isFetching: false,\n        minutesCreateMessage: message\n    }),\n\n    minutesCreateError: (message) => ({\n        type: minutesCreateFailure,\n        isFetching: false,\n        minutesCreateMessage: message\n    }),\n\n    createMinutes: (body, callback) => {\n        return dispatch => {\n            dispatch(minutesActionCreators.requestMinutesCreate());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/CreateMinuteBookAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.createMinutesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(minutesActionCreators.receiveMinutesCreate(result[1]))\n                        if (callback) callback()\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.minutesCreateError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveMinutesBook: (resObj) => ({\n        type: minutesBookSuccess,\n        minutesBook: resObj,\n    }),\n\n    minutesBookError: (message) => ({\n        type: minutesBookFailure,\n        minutesBook: '',\n        minutesBookError: message\n    }),\n\n    getMinutesBook: (params, partner) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/GetPartnerMinutesBookAsync/', 'GET', headers, '', params);\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/GetMinutesBookAsync/', 'GET', headers, '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.minutesBookError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(minutesActionCreators.receiveMinutesBook(result[1].MinutesBooks[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.minutesBookError('Minutes Data not available'))\n                        return Promise.reject('No Minutes Data')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveMinutesBookForCalendar: (resObj) => ({\n        type: minutesBookForCalendarSuccess,\n        minutesBookForCalendar: resObj,\n    }),\n\n    minutesBookForCalendarError: (message) => ({\n        type: minutesBookForCalendarFailure,\n        minutesBookForCalendar: '',\n        minutesBookForCalendarError: message\n    }),\n\n    getMinutesBookForCalendar: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/GetMinutesbookInteractiveCalendarAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.minutesBookForCalendarError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(minutesActionCreators.receiveMinutesBookForCalendar(result[1].MinutesBooks[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.minutesBookForCalendarError('Minutes Data not available'))\n                        return Promise.reject('No Minutes Data')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveMinutesBookSave: (list) => ({\n        type: minutesBookSaveSuccess,\n        minutesBookSave: list,\n    }),\n\n    minutesBookSaveError: (message) => ({\n        type: minutesBookSaveFailure,\n        minutesBookSave: [],\n        minutesBookSaveError: message\n    }),\n\n    saveMinutesBook: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/SaveMinuteBookAsync/?', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.minutesBookSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[1]) {\n                        // Dispatch the success action\n                        dispatch(minutesActionCreators.receiveMinutesBookSave(result[1][0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.minutesBookSaveError('Minutes Data not available'))\n                        return Promise.reject('No Minutes Data')\n                    }\n                }).catch(err => console.log(err))\n        }\n    },\n\n    receiveMinutesBookPublish: (list) => ({\n        type: minutesBookPublishSuccess,\n        minutesBookPublish: list,\n    }),\n\n    minutesBookPublishError: (message) => ({\n        type: minutesBookPublishFailure,\n        minutesBookPublish: [],\n        minutesBookPublishError: message\n    }),\n\n    publishMinutesBook: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/PublishMinuteBookAsync/?', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.minutesBookPublishError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[1]) {\n                        // Dispatch the success action\n                        dispatch(minutesActionCreators.receiveMinutesBookPublish(result[1][0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.minutesBookPublishError('Minutes Data not available'))\n                        return Promise.reject('No Minutes Data')\n                    }\n                }).catch(err => console.log(err))\n        }\n    },\n\n    receiveClerksCopyGen: (list) => ({\n        type: clerksCopyGenSuccess,\n        clerksCopyGen: list,\n    }),\n\n    clerksCopyGenError: (message) => ({\n        type: clerksCopyGenFailure,\n        clerksCopyGen: [],\n        clerksCopyGenError: message\n    }),\n\n    genClerksCopy: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/LegislationFileGeneration/api/ProcessMinutesClerkCopyAsync/?', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.clerksCopyGenError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[1]) {\n                        // Dispatch the success action\n                        dispatch(minutesActionCreators.receiveClerksCopyGen(result[1][0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.clerksCopyGenError('Minutes Data not available'))\n                        return Promise.reject('No Minutes Data')\n                    }\n                }).catch(err => console.log(err))\n        }\n    },\n\n    receiveCategoryCreate: (result) => ({\n        type: categoryCreateSuccess,\n        categoryCreate: result\n    }),\n\n    categoryCreateError: (message) => ({\n        type: categoryCreateFailure,\n        categoryCreate: '',\n        categoryCreateError: message\n    }),\n\n    createCategory: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/CreateMinuteCategoryAsync/?', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.calendarCreateError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(minutesActionCreators.receiveCategoryCreate(result[1][0]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.calendarCreateError('Minutes Data not available'))\n                        return Promise.reject('No Minutes Data')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveEntriesSave: (list) => ({\n        type: entriesSaveSuccess,\n        entriesSave: list[0]\n    }),\n\n    entriesSaveError: (message) => ({\n        type: entriesSaveFailure,\n        entriesSave: [],\n        entriesSaveError: message\n    }),\n\n    saveEntries: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_ENTRY_API_URL) + '/MinuteEntries/api/SaveMinutesEntryAsync/?', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.entriesSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(minutesActionCreators.receiveEntriesSave(result[1]))\n                        //result returns an array with one element\n                        return (result[1][0]);\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.entriesSaveError('Minutes Data not available'))\n                        return Promise.reject('No Minutes Data')\n                    }\n                }).catch(err => console.log(err))\n        }\n    },\n\n    receiveEntriesCreate: (list) => ({\n        type: entriesCreateSuccess,\n        entriesCreate: list[0]\n    }),\n\n    entriesCreateError: (message) => ({\n        type: entriesCreateFailure,\n        entriesCreate: [],\n        entriesCreateError: message\n    }),\n\n    createEntries: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_ENTRY_API_URL) + '/MinuteEntries/api/CreateMinutesEntryAsync/?', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.entriesCreateError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(minutesActionCreators.receiveEntriesCreate(result[1]));\n                        return (result[1][0]);\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.entriesCreateError('Minutes Data not available'));\n                        return Promise.reject('No Minutes Data');\n                    }\n                }).catch(err => console.log(err));\n        }\n    },\n\n    receiveEntriesCommunicationSave: (res) => ({\n        type: entriesCommunicationSaveSuccess,\n        entriesCreate: res\n    }),\n\n    entriesCommunicationSaveError: (message) => ({\n        type: entriesCommunicationSaveFailure,\n        entriesCommunicationSaveError: message\n    }),\n\n    saveEntriesCommunication: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_ENTRY_API_URL) + '/MinuteEntries/api/SaveMinuteEntryCommunicationAsync/', 'PUT', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.entriesCommunicationSaveError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(minutesActionCreators.receiveEntriesCommunicationSave(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.entriesCommunicationSaveError('No Content'));\n                        return Promise.reject('No Content');\n                    }\n                }).catch(err => console.log(err));\n        }\n    },\n\n    receiveActionTypes: (res) => ({\n        type: actionTypesSuccess,\n        actionTypes: res\n    }),\n\n    actionTypesError: (message) => ({\n        type: actionTypesFailure,\n        actionTypesError: message\n    }),\n\n    getActionTypes: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/GetActionReferenceTypeListAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.actionTypesError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(minutesActionCreators.receiveActionTypes(result[1].ActionReferenceTypeList));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.actionTypesError('No Content'));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveChairReport: (res) => ({\n        type: chairReportSuccess,\n        chairReport: res\n    }),\n\n    chairReportError: (message) => ({\n        type: chairReportFailure,\n        chairReportError: message\n    }),\n\n    getChairReport: (minutesBookID) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/GetChairReportAsync/', 'GET', headers, '', minutesBookID)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.chairReportError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(minutesActionCreators.receiveChairReport(result[1].ChairReports[0]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.chairReportError('No Content'));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCommitteeMinutesSummary: (res) => ({\n        type: committeeMinutesSummarySuccess,\n        committeeMinutesSummary: res\n    }),\n\n    committeeMinutesSummaryError: (message) => ({\n        type: committeeMinutesSummaryFailure,\n        committeeMinutesSummaryError: message\n    }),\n\n    getCommitteeMinutesSummary: (minutesBookIDs) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/api/GetCommitteeMinutesSummaryAsync/', 'GET', headers, '', minutesBookIDs)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(minutesActionCreators.committeeMinutesSummaryError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(minutesActionCreators.receiveCommitteeMinutesSummary(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(minutesActionCreators.committeeMinutesSummaryError('No Content'));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    }\n\n}\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n\n    switch (action.type) {\n\n        case minutesListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case minutesListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                minutesList: action.minutesList,\n                minutesMessage: ''\n            })\n        case minutesListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                minutesList: action.minutesList,\n                minutesMessage: action.minutesMessage\n            })\n        case minutesCreateRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            })\n        case minutesCreateSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                minutesCreateMessage: ''\n            })\n        case minutesCreateFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                minutesCreateMessage: action.minutesCreateMessage\n            })\n        case minutesBookSuccess:\n            return Object.assign({}, state, {\n                minutesBook: action.minutesBook,\n                minutesBookError: ''\n            })\n        case minutesBookFailure:\n            return Object.assign({}, state, {\n                minutesBookError: action.minutesBookError\n            })\n        case minutesBookForCalendarSuccess:\n            return Object.assign({}, state, {\n                minutesBookForCalendar: action.minutesBookForCalendar,\n                minutesBookForCalendarError: ''\n            })\n        case minutesBookForCalendarFailure:\n            return Object.assign({}, state, {\n                minutesBookForCalendarError: action.minutesBookForCalendarError\n            })\n        case minutesBookSaveSuccess:\n            return Object.assign({}, state, {\n                minutesBookSave: action.minutesBookSave,\n                minutesBookSaveError: ''\n            })\n        case minutesBookSaveFailure:\n            return Object.assign({}, state, {\n                minutesBookSaveError: action.minutesBookSaveError\n            })\n        case minutesBookPublishSuccess:\n            return Object.assign({}, state, {\n                minutesBookPublish: action.minutesBookPublish,\n                minutesBookPublishError: ''\n            })\n        case minutesBookPublishFailure:\n            return Object.assign({}, state, {\n                minutesBookPublishError: action.minutesBookPublishError\n            })\n        case categoryCreateFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                categoryCreateMessage: action.categoryCreateMessage\n            })\n        case categoryCreateSuccess:\n            return Object.assign({}, state, {\n                categoryCreate: action.categoryCreate,\n                categoryCreateMessage: ''\n            })\n        case entriesSaveFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                entriesSaveMessage: action.entriesSaveMessage\n            })\n        case entriesSaveSuccess:\n            return Object.assign({}, state, {\n                entriesSave: action.entriesSave,\n                entriesSaveMessage: ''\n            })\n        case entriesCreateFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                entriesCreateMessage: action.entriesCreateMessage\n            })\n        case entriesCreateSuccess:\n            return Object.assign({}, state, {\n                entriesCreate: action.entriesCreate,\n                entriesCreateMessage: ''\n            })\n        case entriesCommunicationSaveFailure:\n            return Object.assign({}, state, {\n                entriesCommunicationSaveError: action.entriesCommunicationSaveError\n            })\n        case entriesCommunicationSaveSuccess:\n            return Object.assign({}, state, {\n                entriesCommunicationSave: action.entriesCommunicationSave,\n                entriesCommunicationSaveError: ''\n            })\n        case actionTypesFailure:\n            return Object.assign({}, state, {\n                actionTypesError: action.actionTypesError\n            })\n        case actionTypesSuccess:\n            return Object.assign({}, state, {\n                actionTypes: action.actionTypes,\n                actionTypesError: ''\n            })\n        case chairReportFailure:\n            return Object.assign({}, state, {\n                chairReportError: action.chairReportError\n            })\n        case chairReportSuccess:\n            return Object.assign({}, state, {\n                chairReport: action.chairReport,\n                chairReportError: ''\n            })\n        case committeeMinutesSummaryFailure:\n            return Object.assign({}, state, {\n                committeeMinutesSummaryError: action.committeeMinutesSummaryError\n            })\n        case committeeMinutesSummarySuccess:\n            return Object.assign({}, state, {\n                committeeMinutesSummary: action.committeeMinutesSummary,\n                committeeMinutesSummaryError: ''\n            })\n        default:\n            return state\n    }\n};","import React from \"react\";\nimport ReactTable from \"react-table\";\nimport { Link } from 'react-router-dom';\nimport '../../../stylesheets/shared/react-table.css';\nimport moment from 'moment-timezone';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport DatePicker from \"react-datepicker\";\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { minutesActionCreators } from '../../../stores/lis-minutes-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { cancelRequest } from '../../../services/request.service';\n\n\nclass MinutesGridComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showCreateSuccess: false,\n            showCreateFailure: false,\n            isSaving: false,\n            minutesDate: moment(),\n            isLoaded: false,\n            selected: {},\n            sessionList: [],\n            chamberOptions: [{ value: 'H', label: 'House' }, {value: 'S', label: 'Senate' }],\n            sessionDropdown: [],\n            selectedSessionToolbar: '',\n            selectedSessionGrid: '',\n            selectAll: 0,\n            filtered: [{ id: 'all', value: 'true' }],\n            filterAll: 'true',\n            selectedRow: []\n        };\n        this.toggleRow = this.toggleRow.bind(this);\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.filterAll = this.filterAll.bind(this);\n    };\n\n    //When component has mounted, make the call to the list users API\n    componentDidMount() {\n        let selectedSession = this.props.selectedSession;\n        let defaultSession = '';\n        this.props.actions.getSessionList().then(() => {\n            let sessionList = [...this.props.session.sessionList].reverse();\n            sessionList.forEach(session => {\n                session.label = session.SessionYear + ' ' + session.DisplayName;\n                session.value = session.SessionID;\n                if (session.IsDefault) {\n                    selectedSession = selectedSession || session;\n                    defaultSession = session;\n                }\n            });\n            this.setState({\n                sessionDropdown: sessionList,\n                sessionList: sessionList,\n                selectedSessionGrid: defaultSession\n            });\n            this.props.handleSessionChange(selectedSession, () => this.getMinutesData());\n        });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    getMinutesData() {\n        if (!this.props.selectedSession) {\n            return\n        }\n        const params = 'sessionID=' + this.props.selectedSession.SessionID + '&chamberCode=S';\n        this.setState({\n            isLoaded: false\n        });\n        this.props.actions.getMinutesList(params, true).then(() => {\n            this.setState({\n                isLoaded: true,\n                minutesList: [...this.props.minutes.minutesList].filter(m => !m.CommitteeID)\n            });\n        }).catch(err => {\n            if(err === 'Aborted') {\n                return;\n            }\n            this.setState({\n                isLoaded: true,\n                message: err.toString()\n            });\n        });\n    }\n\n    handleDateChange(date) {\n        this.setState({\n            minutesDate: moment(date)\n        });\n    }\n\n    handleDropDownChange = (value, state) => {\n        this.setState({\n            [state]: value\n        })\n    }\n\n    handleSessionSelectChange = value => {\n        this.props.handleSessionChange(value, () => this.getMinutesData())\n    }\n\n\n    sendCreateDetails() {\n        const minutesObj = {\n            \"SessionID\": this.state.selectedSessionGrid.SessionID,\n            \"ChamberCode\": \"S\",\n            \"MinutesDate\": this.state.minutesDate\n        }\n        this.setState({\n            isSaving: true\n        });\n        this.props.actions.createMinutes(minutesObj).then(() => {\n            this.setState({\n                showCreateSuccess: true,\n                isSaving: false\n            })\n            setTimeout(function () {\n                this.setState({ showCreateSuccess: false });\n            }.bind(this), 5000);\n            this.props.handleSessionChange(this.state.selectedSessionGrid, () => this.getMinutesData())\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            this.setState({\n                showCreateFailure: true,\n                isSaving: false\n            });\n            setTimeout(function () {\n                this.setState({ showCreateFailure: false });\n            }.bind(this), 5000);\n        });\n    }\n\n    onFilteredChange(filtered) {\n        if (filtered.length > 1 && this.state.filterAll.length) {\n            // NOTE: this removes any FILTER ALL filter\n            const filterAll = '';\n            this.setState({ filtered: filtered.filter((item) => item.id !== 'all'), filterAll })\n        }\n        else\n            this.setState({ filtered });\n    }\n\n    filterAll(value) {\n        const filterAll = value;\n        const filtered = [{ id: 'all', value: filterAll }];\n        // NOTE: this completely clears any COLUMN filters\n        this.setState({ filterAll, filtered });\n    }\n\n    toggleRow(minutesId) {\n        const newSelected = Object.assign({}, this.state.selected);\n        newSelected[minutesId] = !this.state.selected[minutesId];\n        this.setState({\n            selected: newSelected,\n            selectAll: 2\n        });\n    }\n\n    toggleSelectAll() {\n        let newSelected = {};\n\n        if (this.state.selectAll === 0) {\n            this.state.minutesList.forEach(x => {\n                newSelected[x.MinutesBookID] = true;\n            });\n        }\n\n        this.setState({\n            selected: newSelected,\n            selectAll: this.state.selectAll === 0 ? 1 : 0\n        });\n    }\n\n    getTrProps = (state, rowInfo, instance) => {\n        if (rowInfo) {\n            return {\n                style: {\n                    background: rowInfo.original.IsDefault ? 'rgb(202, 225, 241)' : null,\n                }\n            }\n        }\n        return {};\n    }\n\n\n    render() {\n        return (\n            <div>\n                <div className=\"header-half\">\n                    <h1>Minutes Management</h1>\n                </div>\n\n                <div className=\"toolbar minutes-toolbar dlas-forms\">\n                    <div>\n                        <Fields.Dropdown\n                            value={this.props.selectedSession}\n                            options={this.state.sessionDropdown}\n                            id=\"sessionDropdown\"\n                            onChange={this.handleSessionSelectChange}\n                        />\n                    </div>\n                </div>\n                {this.state.message &&\n                    <span className=\"fail small-text\">{this.state.message}</span>\n                }\n                <ReactTable\n                    resizable={false}\n                    loading={!this.state.isLoaded}\n                    data={this.state.minutesList}\n                    ref={r => this.reactTable = r}\n                    defaultFilterMethod={(filter, row) =>\n                        String(row[filter.id]) === filter.value}\n                    noDataText={this.props.minutes.minutesMessage}\n                    onFilteredChange={this.onFilteredChange.bind(this)}\n                    columns={[\n                        {\n                            Header: \"Minutes Date\",\n                            columns: [\n                                {\n                                    id: \"checkbox\",\n                                    className: \"checkbox-column\",\n                                    headerClassName: \"header-checkbox\",\n                                    accessor: \"\",\n                                    Cell: ({ original, index }) => {\n                                        return (\n                                            <input\n                                                id={'cm-checkbox-' + index}\n                                                type=\"checkbox\"\n                                                className=\"checkbox\"\n                                                checked={this.state.selected[original.MinutesBookID] === true}\n                                                onChange={() => this.toggleRow(original.MinutesBookID)}\n                                            />\n                                        );\n                                    },\n                                    Header: x => {\n                                        return (\n                                            <input\n                                                id={'cm-checkbox-selectall'}\n                                                type=\"checkbox\"\n                                                className=\"checkbox\"\n                                                checked={this.state.selectAll === 1}\n                                                ref={input => {\n                                                    if (input) {\n                                                        input.indeterminate = this.state.selectAll === 2;\n                                                    }\n                                                }}\n                                                onChange={() => this.toggleSelectAll()}\n                                            />\n                                        );\n                                    },\n                                    sortable: false,\n                                    filterable: false,\n                                    width: 45\n                                },\n                                {\n                                    Header: (\n                                        <div className=\"dlas-forms datepicker-container\">\n                                            {!this.state.showCreateSuccess && !this.state.showCreateFailure &&\n                                                <DatePicker\n                                                    id=\"minutesDate\"\n                                                    className=\"dnd-field\"\n                                                    selected={this.state.minutesDate}\n                                                    onChange={this.handleDateChange}\n                                                    placeholderText=\"Minutes Date\"\n                                                />\n                                            }\n                                        </div>\n                                    ),\n                                    headerClassName: \"header-insert\",\n                                    accessor: \"MinutesDate\",\n                                    sortable: false,\n                                    filterAll: true,\n                                    width: 200,\n                                    Cell: row => {\n                                        return (\n                                            <span id={'cm-datecell-' + row.index}>{moment(row.original.MinutesDate).format('L')}</span>\n                                        )\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Session\",\n                            columns: [\n                                {\n                                    Header: (\n                                        <div>\n                                            {!this.state.showCreateSuccess && !this.state.showCreateFailure &&\n                                                <Fields.Dropdown\n                                                    value={this.state.selectedSessionGrid}\n                                                    options={this.state.sessionList}\n                                                    className=\"grid-selector-dropdown\"\n                                                    classNamePrefix=\"grid-selector-dropdown\"\n                                                    id=\"sessionDropdown\"\n                                                    onChange={(value) => { this.handleDropDownChange(value, 'selectedSessionGrid') }} />\n                                            }\n                                            {this.state.showCreateSuccess &&\n                                                <span className=\"insert-message\">Minutes created successfully</span>\n                                            }\n                                            {this.state.showCreateFailure &&\n                                                <span className=\"insert-message fail\">Minutes creation failed</span>\n                                            }\n                                        </div>\n                                    ),\n                                    headerClassName: \"header-insert-dropdown\",\n                                    accessor: \"SessionName\",\n                                    sortable: false,\n                                    filterAll: true,\n                                    Cell: row => {\n                                        return <span id={'mm-session-' + row.index}>{row.value}</span>\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Status\",\n                            columns: [\n                                {\n                                    Header: (\n                                        <div>\n                                            {!this.state.showCreateSuccess &&\n                                                <span className=\"txt-greyed txt-grid-header\">Pending</span>\n                                            }\n                                        </div>\n                                    ),\n                                    headerClassName: \"header-insert\",\n                                    accessor: \"Status\",\n                                    sortable: false,\n                                    filterAll: true,\n                                    Cell: row => {\n                                        return <span className=\"txt-greyed\" id={'mm-status-' + row.index}>{row.value}</span>\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Actions\",\n                            headerClassName: \"submit-action\",\n                            columns: [\n\n                                {\n                                    Header: (<span><button id=\"submit-new-minutes\" onClick={this.sendCreateDetails.bind(this)} disabled={this.state.isSaving} className=\"button\">Create</button></span>),\n                                    headerClassName: \"header-action\",\n                                    accessor: \"action\",\n                                    sortable: false,\n                                    className: \"action-column\",\n                                    width: 50,\n                                    Cell: row => {\n                                        return (\n                                            <Link id={'cm-edit-' + row.index} to={`/minutes-management/edit-minutes/${row.original.MinutesBookID}`} className=\"button edit\">Edit</Link>\n                                        )\n                                    }\n                                },\n                                {\n                                    Header: \"\",\n                                    headerClassName: \"flag-header\",\n                                    accessor: \"PendingChange\",\n                                    width: 40,\n                                    Cell: row => {\n                                        if (row.original.PendingChange) {\n                                            return <span id={'cm-flag-' + row.index} className=\"button flag\">Flag</span>\n                                        } else {\n                                            return <span></span>;\n                                        }\n                                    }\n                                },\n                                {\n                                    Header: \"All\",\n                                    id: 'all',\n                                    className: \"all-column\",\n                                    headerClassName: \"all-header\",\n                                    width: 0,\n                                    resizable: false,\n                                    sortable: false,\n                                    Filter: () => { },\n                                    getProps: () => {\n                                        return {\n                                            style: { padding: \"0px\" }\n                                        }\n                                    },\n                                    filterMethod: (filter, rows) => {\n                                        return rows.chamber === this.state.selectedChamber;\n                                    }\n                                }\n                            ]\n                        }\n                    ]}\n                    defaultSorted={[\n                        {\n                            id: \"Name\",\n                            desc: false\n                        }\n                    ]}\n                    defaultPageSize={15}\n                    pageSizeOptions={[5, 10, 15, 20, 25, 50, 100]}\n                    className=\"committee-table -striped -highlight\"\n                    getTrProps={(state, rowInfo) => {\n                        // console.log('original:',rowInfo.original);\n                        // console.log('row:',rowInfo.row);\n                        // console.log('row.firstName:',rowInfo.row.firstName);\n                        // console.log('original.children:',rowInfo.original.children);\n                        return {}\n                    }}\n                />\n                <br />\n\n            </div>\n        );\n    }\n}\n\nconst MinutesManagementGrid = connect(\n    (state) => {\n        const { minutes, session } = state;\n        return {\n            minutes,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, minutesActionCreators), dispatch)\n        }\n    }\n)(MinutesGridComponent)\n\n\nexport default MinutesManagementGrid;","import React from 'react';\n\nfunction LoaderComponent(props) {\n    let loadingCheck = false;\n    //typeof doesn't differentiate between an array and an object so we have to do this type of check\n    switch (Object.prototype.toString.call(props.data)) {\n        case '[object Array]':\n            if (props.data.length > 0) loadingCheck = true;\n            break;\n        case '[object Object]':\n            if (props.data) loadingCheck = true;\n            break;\n        default:\n            if (props.data) loadingCheck = true;\n    }\n    return (\n        <div className={`spinner-loader ${loadingCheck ? 'hide' : 'show'}`}>\n            <div className={`${props.className} spinner`}>Loading results...</div>\n        </div>\n    )\n}\n\nexport default (LoaderComponent);","import React from \"react\";\nimport 'tinymce/themes/silver/theme';\nimport 'tinymce/icons/default'\nimport 'tinymce/plugins/paste/plugin';\nimport 'tinymce/plugins/link/plugin';\nimport 'tinymce/plugins/save/plugin';\nimport 'tinymce/plugins/lists/plugin';\nimport 'tinymce/plugins/code/plugin';\nimport 'tinymce/plugins/preview/plugin';\nimport 'tinymce/plugins/searchreplace/plugin';\nimport 'tinymce/plugins/pagebreak/plugin';\nimport 'tinymce/plugins/table/plugin';\nimport '../../../../stylesheets/tinymce/oxide/skin.min.css';\nimport { Editor } from '@tinymce/tinymce-react';\nimport renderHTML from \"react-render-html\";\n\nclass Misc extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            newEntries: [],\n            editing: false\n        };\n\n        this.handleChange = this.handleChange.bind(this);\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.cancelEdit = this.cancelEdit.bind(this);\n        this.saveChange = this.saveChange.bind(this);\n    }\n\n    handleChange(content) {\n        //Update the local entry text without saving data to the parent\n        let entries = [...this.state.newEntries];\n\n        entries[0].EntryText = content;\n\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    toggleEdit() {\n        this.setState({\n            editing: !this.state.editing,\n        })\n    }\n\n    cancelEdit() {\n        this.setState({\n            editing: false,\n            newEntries: this.props.formData.MinutesEntries\n        })\n    }\n\n    saveChange() {\n        this.props.handleSaveEntry(this.state.newEntries[0])\n        this.toggleEdit();\n    }\n\n    componentDidMount() {\n        this.setState({\n            newEntries: this.props.formData ? this.props.formData.MinutesEntries : []\n        })\n    }\n\n    componentDidUpdate(prevProps) {\n        //If the entry has been saved or changed then swap out the entry with the latest\n        if (prevProps.formData && this.props.formData && prevProps.formData.MinutesEntries[0].ModificationDate != this.props.formData.MinutesEntries[0].ModificationDate) {\n            this.setState({\n                newEntries: this.props.formData.MinutesEntries\n            })\n        }\n    }\n\n    render() {\n        return (\n            <React.Fragment>\n                {this.state.newEntries.map((entry, i) => {\n                    return (\n                        <React.Fragment>\n                            <div key={entry.MinutesEntryID}>\n                                {this.state.editing\n                                    ?\n                                    <div className=\"grid-wrapper two-col-sidebar\">\n                                        <Editor\n                                            value={entry.EntryText}\n                                            init={{\n                                                browser_spellcheck: true,\n                                                plugins: 'link paste save lists preview searchreplace pagebreak code table',\n                                                toolbar: 'undo redo | bold italic strikethrough | alignleft aligncenter alignright',\n                                                skin: false,\n                                                valid_children: '+body[style]',\n                                                content_css: false,\n                                                content_style: 'table { border-collapse: collapse; border: 1px solid #FFFFFF }' + 'td { padding: 12px 0px }',\n                                            }}\n                                            onEditorChange={content => this.handleChange(content)}\n                                        />\n                                        <div>\n                                            <button onClick={() => this.saveChange()} type=\"button\" className=\"icon save\" style={{ marginRight: \"10px\" }}></button>\n                                            <button onClick={() => this.cancelEdit()} type=\"button\" className=\"icon delete\"></button>\n                                        </div>\n                                    </div>\n                                    :\n                                    <div className=\"grid-wrapper two-col-sidebar\">\n                                        <p>{renderHTML(entry.EntryText)}</p>\n                                        <button onClick={() => this.toggleEdit()} type=\"button\" className=\"icon edit\"></button>\n                                    </div>\n                                }\n\n                            </div>\n                        </React.Fragment>\n                    )\n                })}\n            </React.Fragment>\n        );\n    }\n}\n\nexport default Misc","const getReferenceList = (eventCode, fullList) => {\n    let filteredOptions;\n    let otherVersions;\n    switch (eventCode.substring(1)) {\n        case '4210':\n        case '4211':\n        case '4212':\n            //committee amendment\n            filteredOptions = fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'amendment' && text.Sponsor && text.Sponsor.toLowerCase() === 'committee');\n            const otherAmendments = fullList.filter(lt => (lt.LegislationVersion || lt.Version).toLowerCase() === 'amendment' && !filteredOptions.map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n            otherVersions = fullList.filter(lt => !filteredOptions.concat(otherAmendments).map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n            return [\n                { label: 'Committee Amendments', options: filteredOptions },\n                { label: !filteredOptions.length ? 'Amendments' : 'Other Amendments', options: otherAmendments },\n                { label: !filteredOptions.length && !otherAmendments.length ? 'All Versions' : 'Other Versions', options: otherVersions }\n            ];\n        case '4230':\n        case '4232':\n        case '4278':\n        case '4280':\n            //member amendment (S codes correlate to Senator amends, H codes correlate to Delegate amends)\n            if (eventCode[0] === 'S') {\n                filteredOptions = fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'amendment' && text.Sponsor &&\n                    (text.Sponsor.toLowerCase() === 'senate' || (text.Sponsor.toLowerCase() === 'member' && text.ChamberCode === 'S')));\n                const otherAmendments = fullList.filter(lt => (lt.LegislationVersion || lt.Version).toLowerCase() === 'amendment' && !filteredOptions.map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                otherVersions = fullList.filter(lt => !filteredOptions.concat(otherAmendments).map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                return [\n                    { label: 'Senator Amendments', options: filteredOptions },\n                    { label: !filteredOptions.length ? 'Amendments' : 'Other Amendments', options: fullList.filter(lt => (lt.LegislationVersion || lt.Version).toLowerCase() === 'amendment' && !filteredOptions.map(o => o.LegislationTextID).includes(lt.LegislationTextID)) },\n                    { label: !filteredOptions.length && !otherAmendments.length ? 'All Versions' : 'Other Versions', options: otherVersions }\n                ]\n            } else {\n                filteredOptions = fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'amendment' && text.Sponsor &&\n                    (text.Sponsor.toLowerCase().includes('house') || (text.Sponsor.toLowerCase() === 'member' && text.ChamberCode === 'H')));\n                const otherAmendments = fullList.filter(lt => (lt.LegislationVersion || lt.Version).toLowerCase() === 'amendment' && !filteredOptions.map(o => o.LegislationTextID).includes(lt.LegislationTextID))\n                otherVersions = fullList.filter(lt => !filteredOptions.concat(otherAmendments).map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                return [\n                    { label: 'Delegate Amendments', options: filteredOptions },\n                    { label: !filteredOptions.length ? 'Amendments' : 'Other Amendments', options: otherAmendments },\n                    { label: !filteredOptions.length && !otherAmendments.length ? 'All Versions' : 'Other Versions', options: otherVersions }\n                ]\n            }\n        case '4410':\n        case '4640':\n            //committee sub\n            filteredOptions = fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'substitute' && text.Sponsor && text.Sponsor.toLowerCase() === 'committee');\n            const otherSubs = fullList.filter(lt => (lt.LegislationVersion || lt.Version).toLowerCase() === 'substitute' && !filteredOptions.map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n            otherVersions = fullList.filter(lt => !filteredOptions.concat(otherSubs).map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n            return [\n                { label: 'Committee Substitutes', options: filteredOptions },\n                { label: !filteredOptions.length ? 'Substitutes' : 'Other Substitutes', options: otherSubs },\n                { label: !filteredOptions.length && !otherSubs.length ? 'All Versions' : 'Other Versions', options: otherVersions }\n            ]\n        case '4420':\n        case '4450':\n            //member sub (S codes correlate to Senator subs, H codes correlate to Delegate subs)\n            if (eventCode[0] === 'S') {\n                filteredOptions = fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'substitute' && text.Sponsor &&\n                    (text.Sponsor.toLowerCase() === 'senate' || (text.Sponsor.toLowerCase() === 'member' && text.ChamberCode === 'S')));\n                const otherSubs = fullList.filter(lt => (lt.LegislationVersion || lt.Version).toLowerCase() === 'substitute' && !filteredOptions.map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                otherVersions = fullList.filter(lt => !filteredOptions.concat(otherSubs).map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                return [\n                    { label: 'Senator Substitutes', options: filteredOptions },\n                    { label: !filteredOptions.length ? 'Substitutes' : 'Other Substitutes', options: otherSubs },\n                    { label: !filteredOptions.length && !otherSubs.length ? 'All Versions' : 'Other Versions', options: otherVersions }\n                ]\n            } else {\n                filteredOptions = fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'substitute' && text.Sponsor &&\n                    (text.Sponsor.toLowerCase().includes('house') || (text.Sponsor.toLowerCase() === 'member' && text.ChamberCode === 'H')));\n                const otherSubs = fullList.filter(lt => (lt.LegislationVersion || lt.Version).toLowerCase() === 'substitute' && !filteredOptions.map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                otherVersions = fullList.filter(lt => !filteredOptions.concat(otherSubs).map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                return [\n                    { label: 'Delegate Substitutes', options: filteredOptions },\n                    { label: !filteredOptions.length ? 'Substitutes' : 'Other Substitutes', options: otherSubs },\n                    { label: !filteredOptions.length && !otherSubs.length ? 'All Versions' : 'Other Versions', options: otherVersions }\n                ]\n            }\n        case '4641':\n            //floor sub\n            return fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'substitute' && (!text.Sponsor || !['committee', 'governor', 'conference'].includes(text.Sponsor.toLowerCase())))\n        case '5432':\n        case '5433':\n        case '5434':\n            //senate/house specific sub (H codes correlate to Senate subs, S codes correlate to House subs)\n            if (eventCode[0] === 'S') {\n                filteredOptions = fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'substitute' && ((text.Sponsor && text.Sponsor.toLowerCase().includes('house')) || (!text.Sponsor && text.ChamberCode === 'H')));\n                const otherSubs = fullList.filter(lt => (lt.LegislationVersion || lt.Version).toLowerCase() === 'substitute' && !filteredOptions.map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                otherVersions = fullList.filter(lt => !filteredOptions.concat(otherSubs).map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                return [\n                    { label: 'House Substitutes', options: filteredOptions },\n                    { label: !filteredOptions.length ? 'Substitutes' : 'Other Substitutes', options: otherSubs },\n                    { label: !filteredOptions.length && !otherSubs.length ? 'All Versions' : 'Other Versions', options: otherVersions }\n                ]\n            } else {\n                filteredOptions = fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'substitute' && ((text.Sponsor && text.Sponsor.toLowerCase() === 'senate') || (!text.Sponsor && text.ChamberCode === 'S')));\n                const otherSubs = fullList.filter(lt => (lt.LegislationVersion || lt.Version).toLowerCase() === 'substitute' && !filteredOptions.map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                otherVersions = fullList.filter(lt => !filteredOptions.concat(otherSubs).map(o => o.LegislationTextID).includes(lt.LegislationTextID));\n                return [\n                    { label: 'Senate Substitutes', options: filteredOptions },\n                    { label: !filteredOptions.length ? 'Substitutes' : 'Other Substitutes', options: otherSubs },\n                    { label: !filteredOptions.length && !otherSubs.length ? 'All Versions' : 'Other Versions', options: otherVersions }\n                ]\n            }\n        case '4643':\n            //governor's sub\n            return fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'substitute' && text.Sponsor.toLowerCase().includes('governor'))\n        case '5602':\n            //reenrolled\n            return fullList.filter(text => (text.LegislationVersion || text.Version).toLowerCase() === 'reenrolled')\n        case '4010':\n        case '4011':\n            //member\n            return fullList; //return all the members passed down\n        case '6013':\n        case '6113':\n        case '6213':\n            //delegate/senator (H codes correlate to Delegates, S codes correlate to Senators)\n            return fullList; //return all the members passed down, already filtered down to delegates in history form\n        case '4610':\n        case '5300':\n        case '5310':\n        case '5330':\n        case '5350':\n        case '5360':\n        case '5370':\n        case '5380':\n        case '5800':\n        case '5810':\n        case '6060':\n        case '7304':\n        case '9600':\n            //event\n            return fullList; //return all the events passed down, already filtered in history form\n        //not 100% certain what 'printed as...' (4620, 4622, 4630) is supposed to return\n        case '4620':\n        case '4622':\n        case '4630':\n        //not sure what '... bill reprinted' (4644, 4645, 4646) is supposed to return; there aren't any pickers in UI despite them being in the spreadsheet\n        case '4644':\n        case '4645':\n        case '4646':\n        //not sure what 'Bill text as passed ...' (5601, 5603) is supposed to return\n        case '5601':\n        case '5603':\n        default:\n            return fullList;\n    }\n}\n\nexport default getReferenceList;","import React from \"react\";\nimport moment from 'moment-timezone';\nimport DatePicker from 'react-datepicker'\nimport CreatableSelect from 'react-select/creatable';\nimport Select from 'react-select';\nimport getReferenceList from '../../../services/event-references-helpers';\nimport 'tinymce/themes/silver/theme';\nimport 'tinymce/icons/default'\nimport 'tinymce/plugins/paste/plugin';\nimport 'tinymce/plugins/link/plugin';\nimport 'tinymce/plugins/save/plugin';\nimport 'tinymce/plugins/lists/plugin';\nimport 'tinymce/plugins/code/plugin';\nimport 'tinymce/plugins/preview/plugin';\nimport 'tinymce/plugins/searchreplace/plugin';\nimport 'tinymce/plugins/pagebreak/plugin';\nimport 'tinymce/plugins/table/plugin';\nimport '../../../stylesheets/tinymce/oxide/skin.min.css';\nimport { Editor } from '@tinymce/tinymce-react';\n\nclass CustomCreatableSelect extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            inputMinWidth: 150,\n            inputWidth: 0,\n            selectedActionType: ''\n        };\n        this.inputSizer = React.createRef();\n    }\n\n    componentDidMount() {\n        const newWidth = this.inputSizer.current ? this.inputSizer.current.scrollWidth + 45 : 0\n        this.setState({\n            inputWidth: newWidth\n        });\n    }\n\n    componentDidUpdate(prevProps) {\n        if (prevProps.value !== this.props.value) {\n            const newWidth = this.inputSizer.current ? this.inputSizer.current.scrollWidth + 45 : 0\n            this.setState({\n                inputWidth: newWidth\n            });\n        }\n    }\n    render() {\n        const wrapperStyle = {\n            display: 'inline-block',\n            position: 'relative'\n        };\n        const inputStyle = {\n            minWidth: `${this.state.inputMinWidth}px`,\n            width: `${this.state.inputWidth}px`,\n            boxShadow: this.props.autoselected && !this.props.isNewEvent ? '0 0 7px 1px green' : '',\n            borderRadius: this.props.autoselected && !this.props.isNewEvent ? '4px' : '',\n            marginTop: this.props.autoselected && !this.props.isNewEvent ? '5px' : ''\n        };\n        const sizerStyle = {\n            position: 'absolute',\n            top: 0,\n            left: 0,\n            visibility: 'hidden',\n            height: 0,\n            overflow: 'scroll',\n            whiteSpace: 'pre',\n        };\n        const inputValue = this.props.getOptionLabel ? this.props.getOptionLabel(this.props.value) :\n            this.props.value ? this.props.value.label : '';\n        return (\n            <div style={wrapperStyle}>\n                {this.props.autoselected && !this.props.isNewEvent && <label><small><em>This has been autoselected, but not saved.</em></small></label>}\n                <div ref={this.inputSizer} style={sizerStyle}>{inputValue}</div>\n                <div style={inputStyle}>\n                    <CreatableSelect\n                        options={this.props.options}\n                        styles={selectStyle()}\n                        onChange={this.props.onChange}\n                        value={this.props.value}\n                        formatCreateLabel={input => input}\n                        //This is so an option can only be created once an option has been selected\n                        isValidNewOption={() => Boolean(this.props.value)}\n                        {...this.props} />\n                </div>\n            </div>\n        );\n    }\n}\n\nclass CustomInput extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            inputMinWidth: 150,\n            inputWidth: 0\n        };\n        this.inputSizer = React.createRef();\n    }\n\n    componentDidMount() {\n        const newWidth = this.inputSizer.current ? this.inputSizer.current.scrollWidth + 2 : 0\n        this.setState({\n            inputWidth: newWidth\n        });\n    }\n\n    componentDidUpdate(prevProps) {\n        if (prevProps.value !== this.props.value) {\n            const newWidth = this.inputSizer.current ? this.inputSizer.current.scrollWidth + 2 : 0\n            this.setState({\n                inputWidth: newWidth\n            });\n        }\n    }\n\n    render() {\n        const wrapperStyle = {\n            display: 'inline-block',\n            position: 'relative'\n        };\n        const inputStyle = {\n            minWidth: `${this.state.inputMinWidth}px`,\n            width: `${this.state.inputWidth}px`,\n            maxWidth: '70vw'\n        };\n        const sizerStyle = {\n            position: 'absolute',\n            top: 0,\n            left: 0,\n            visibility: 'hidden',\n            height: 0,\n            overflow: 'scroll',\n            whiteSpace: 'pre',\n        };\n        return (<div style={wrapperStyle}>\n            <div ref={this.inputSizer} style={sizerStyle}>{this.props.value}</div>\n            {this.props.textListLength > 0\n                ? <input\n                    {...this.props}\n                    style={inputStyle}\n                />\n                : <React.Fragment>\n                    <textarea\n                        {...this.props}\n                        style={inputStyle}\n                    />\n                </React.Fragment>\n            }\n\n        </div>)\n    }\n}\n\n//This class is used to take the ActivityReferences and turn them into a form\nclass InputType extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {};\n\n        this.handleChange = this.handleChange.bind(this);\n        this.handleActionTypeChange = this.handleActionTypeChange.bind(this);\n        this.addInput = this.addInput.bind(this);\n\n        this.actionTypeDropdown = React.createRef();\n    }\n\n    handleChange(referenceIndex, value, autoselected) {\n        const { entryIndex, activityIndex, references, billHistory } = this.props;\n        //Send the index of the minute entry, the entire minute entries object (so we don't have to save the entire book),\n        //the value of the text input, and the sequence to show which category to update\n        const originalValue = JSON.parse(JSON.stringify(references[referenceIndex]));\n        let reference = references[referenceIndex];\n        switch (reference.ActionReferenceType) {\n            case 'Member':\n            case 'Committee':\n            case 'Subcommittee':\n                reference.ReferenceText = value.label;\n                //If it is not created then __isNew__ will be false. Since it is not created then set the ID to whatever was selected\n                //The Creatable does not allow  creating an option if an option has not been selected yet, so if the value is new then use the existing reference ID\n                if (!value.__isNew__) {\n                    reference.ReferenceID = value.value;\n                }\n                break;\n            case 'LegislationText':\n                reference.ReferenceText = value.Description || value.label;\n                if (!value.__isNew__) {\n                    reference.ReferenceID = value.value;\n                } else {\n                    reference.ReferenceText = value.label\n                }\n                reference.autoselected = autoselected;\n                break;\n            case 'Time':\n                reference.ReferenceText = value.format('h:mm a');\n                break;\n            case 'Date and Time':\n                reference.ReferenceText = value.format(\"MMMM d, yyyy h:mm a\");\n                break;\n            case 'Text':\n                reference.ReferenceText = value;\n                break;\n            case 'HTML':\n                reference.ReferenceText = value;\n                break;\n            case 'LegislationEvent':\n                reference.ReferenceID = value.LegislationEventID;\n                reference.EventCode = value.EventCode;\n                reference.IsPassed = value.IsPassed;\n                break;\n            case 'Legislation':\n                reference.ReferenceText = value.label;\n                reference.ReferenceID = value.value;\n                break;\n            case 'Communication':\n                reference.ReferenceText = value.ReferenceNumber;\n                reference.CommunicationDate = value.CommunicationDate;\n                reference.CommunicationNumber = value.CommunicationNumber;\n                if (!value.__isNew__) {\n                    reference.ReferenceID = value.value;\n                }\n                reference.CommunicationSummaries = value.CommunicationSummaries\n                break;\n            default:\n                reference.ReferenceText = value;\n        }\n        this.props.handleChange(entryIndex, activityIndex, referenceIndex, reference, !billHistory && originalValue);\n    }\n\n    handleActionTypeChange(val) {\n        this.setState({\n            selectedActionType: val\n        })\n    }\n\n    addInput() {\n        const { entryIndex, activityIndex, references } = this.props;\n        const newInput = {\n            ReferenceID: null,\n            ReferenceText: '',\n            ActionReferenceTypeID: this.state.selectedActionType.ActionReferenceTypeID,\n            ActionReferenceType: this.state.selectedActionType.ActionReferenceType\n        }\n        this.props.handleChange(entryIndex, activityIndex, references.length, newInput);\n        this.setState({\n            selectedActionType: ''\n        });\n    }\n\n    render() {\n        const { entryIndex, activityIndex, references, actionTypes, style } = this.props;\n        const divStyle = {\n            display: 'inline-block',\n            margin: '0px 5px 3px 5px',\n            lineHeight: '0.8em'\n        }\n\n        const errorCheck = (referenceIndex) => {\n            return (\n                this.props.incompleteInputs && this.props.incompleteInputs.includes(referenceIndex) &&\n                <span className=\"fail\" style={{ fontSize: \"12px\" }}>You must enter a value.</span>\n            )\n        }\n\n        return (\n            <div style={{ ...style }}>\n                {references.map((reference, referenceIndex) => {\n                    switch (reference.ActionReferenceType) {\n                        case 'Text':\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <CustomInput\n                                        value={reference.ReferenceText}\n                                        onChange={(event) => this.handleChange(referenceIndex, event.target.value)}\n                                        textListLength={this.props.textList?.length ?? 0}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        case 'HTML':\n                            return (\n                                <div key={referenceIndex} style={{ ...divStyle, width: '100%' }}>\n                                    <Editor\n                                        value={reference.ReferenceText}\n                                        init={{\n                                            browser_spellcheck: true,\n                                            force_br_newlines: false,\n                                            force_p_newlines: false,\n                                            forced_root_block: '', //don't wrap votetally in minutes activities\n                                            plugins: 'link paste save lists preview searchreplace pagebreak code table',\n                                            toolbar: 'undo redo | bold italic strikethrough | alignleft aligncenter alignright',\n                                            skin: false,\n                                            valid_children: '+body[style]',\n                                            content_css: false,\n                                            content_style: 'table { border-collapse: collapse; border: 1px solid #FFFFFF }' + 'td { padding: 12px 0px }',\n                                        }}\n                                        onEditorChange={content => this.handleChange(referenceIndex, content)}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        case 'Member':\n                            let memberVal = null;\n                            const member = this.props.memberList.find(member => member.MemberID === reference.ReferenceID);\n                            if (member) {\n                                memberVal = {\n                                    label: reference.ReferenceText,\n                                    value: reference.ReferenceID\n                                };\n                            }\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <CustomCreatableSelect\n                                        options={this.props.newEvent && this.props.newEvent.EventCode ? getReferenceList(this.props.newEvent.EventCode, this.props.memberList || []) : this.props.memberList || []}\n                                        onChange={(event) => this.handleChange(referenceIndex, event)}\n                                        value={memberVal}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        case 'Committee':\n                            let committeeVal = null;\n                            const committee = this.props.committeeList.find(member => member.CommitteeID === reference.ReferenceID);\n                            if (committee) {\n                                committeeVal = {\n                                    label: reference.ReferenceText,\n                                    value: reference.ReferenceID\n                                };\n                            }\n                            let committeeList = this.props.committeeList ? this.props.committeeList.filter(c => !c.ParentCommitteeID) : [];\n                            let eventChamber = this.props.newEvent.EventCode[0];\n                            committeeList = committeeList.filter(x => x.ChamberCode == eventChamber)\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <CustomCreatableSelect\n                                        options={this.props.newEvent && this.props.newEvent.EventCode ? getReferenceList(this.props.newEvent.EventCode, committeeList) : committeeList}\n                                        onChange={(event) => this.handleChange(referenceIndex, event)}\n                                        value={committeeVal}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        case 'Subcommittee':\n                            let subCommitteeVal = null;\n                            const subCommittee = this.props.committeeList.find(member => member.CommitteeID === reference.ReferenceID);\n                            if (subCommittee) {\n                                subCommitteeVal = {\n                                    label: reference.ReferenceText,\n                                    value: reference.ReferenceID\n                                };\n                            }\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <CustomCreatableSelect\n                                        options={this.props.newEvent && this.props.newEvent.EventCode ? getReferenceList(this.props.newEvent.EventCode, this.props.committeeList ? this.props.committeeList.filter(c => c.ParentCommitteeID) : []) : this.props.committeeList ? this.props.committeeList.filter(c => c.ParentCommitteeID) : []}\n                                        onChange={(event) => this.handleChange(referenceIndex, event)}\n                                        value={subCommitteeVal}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        case 'LegislationText':\n                            const options = this.props.newEvent && this.props.newEvent.EventCode ? getReferenceList(this.props.newEvent.EventCode, this.props.textList || []) : this.props.textList || [];\n                            let textVal;\n                            //if we want to autoselect, do so only if the very first hierarchy/grouping has exactly one option; this is very likely the one they want to use\n                            if (this.props.autoselect && !reference.ReferenceText && !reference.ReferenceID && options.length && options[0].options && options[0].options.length === 1) {\n                                this.handleChange(referenceIndex, options[0].options[0], true);\n                            }\n                            textVal = {\n                                label: reference.ReferenceText !== null ? reference.ReferenceText : \"Select...\",\n                                value: reference.ReferenceID\n                            }\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <CustomCreatableSelect\n                                        options={options}\n                                        onChange={(event) => this.handleChange(referenceIndex, event)}\n                                        value={textVal}\n                                        getOptionLabel={opt => {\n                                            let newLabel = '';\n                                            if (opt.IsActive !== undefined) {\n                                                newLabel = `(${opt.IsActive ? \"active\" : \"inactive\"}) ${opt.label}`;\n                                            } else {\n                                                newLabel = opt.label;\n                                            }\n                                            newLabel += opt.LDNumber ? ` (${opt.LDNumber})` : '';\n                                            return newLabel;\n                                        }}\n                                        autoselected={reference.autoselected}\n                                        isNewEvent={this.props.isNewEvent}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        case 'Time':\n                            const time = reference.ReferenceText ? moment(reference.ReferenceText, 'h:mm a').isValid() ? moment(reference.ReferenceText, 'h:mm a') : null : null;\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <DatePicker\n                                        className='clock-date-picker'\n                                        showTimeSelect\n                                        showTimeSelectOnly\n                                        timeIntervals={15}\n                                        dateFormat=\"h:mm a\"\n                                        timeCaption=\"Time\"\n                                        selected={time}\n                                        onChange={(event) => this.handleChange(referenceIndex, event)}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        case 'Date and Time':\n                            const datetime = reference.ReferenceText ? moment(reference.ReferenceText).isValid() ? moment(reference.ReferenceText) : null : null;\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <DatePicker\n                                        className='clock-date-picker'\n                                        showTimeSelect\n                                        timeIntervals={15}\n                                        dateFormat=\"MMMM d, yyyy h:mm a\"\n                                        timeCaption=\"Time\"\n                                        selected={datetime}\n                                        onChange={(event) => this.handleChange(referenceIndex, event)}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        case 'LegislationEvent':\n                            return (\n                                <div key={referenceIndex} style={{ marginLeft: \"-5px\", marginTop: \"5px\" }}>\n                                    {this.props.newEvent && ((this.props.newEvent.ActionReferences && this.props.newEvent.ActionReferences[0] && this.props.newEvent.ActionReferences[0].ActionReferenceType === \"LegislationEvent\") || (this.props.newEvent.ActivityReferences && this.props.newEvent.ActivityReferences[0] && this.props.newEvent.ActivityReferences[0].ActionReferenceType === \"LegislationEvent\") || (this.props.newEvent.EventReferences && this.props.newEvent.EventReferences[0] && this.props.newEvent.EventReferences[0].ActionReferenceType === \"LegislationEvent\")) && this.props.eventList &&\n                                        <div style={divStyle}>\n                                            {this.props.eventList.length > 0 ?\n                                                <CustomCreatableSelect\n                                                    options={this.props.newEvent && this.props.newEvent.EventCode ? getReferenceList(this.props.newEvent.EventCode, this.props.eventList) : this.props.eventList}\n                                                    value={reference.ReferenceID && this.props.eventList.find(evt => evt.LegislationEventID === reference.ReferenceID) ? this.props.eventList.find(evt => evt.LegislationEventID === reference.ReferenceID) : \"\"}\n                                                    onChange={(event) => this.handleChange(referenceIndex, event)}\n                                                    getOptionValue={o => o.LegislationEventID}\n                                                    getOptionLabel={o => o.EventCode ? \"(\" + o.EventCode + \") \" + o.Description : \"\"}\n                                                />\n                                                :\n                                                <p>No eligible events.</p>\n                                            }\n                                        </div>\n                                    }\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            )\n                        case 'Communication':\n                            let communicationList = this.props.communicationList || [];\n                            let communicationVal = null;\n                            const communication = communicationList.find(comm => comm.CommunicationID === reference.ReferenceID);\n                            if (communication) {\n                                communicationVal = {\n                                    label: reference.ReferenceText,\n                                    value: reference.ReferenceID\n                                };\n                            }\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <CustomCreatableSelect\n                                        options={this.props.newEvent && this.props.newEvent.EventCode ? getReferenceList(this.props.newEvent.EventCode, communicationList) : communicationList}\n                                        onChange={(communication) => this.handleChange(referenceIndex, communication)}\n                                        value={communicationVal}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        case 'Legislation':\n                            let legislationVal = null;\n                            const legislation = this.props.legislationList ? this.props.legislationList.find(leg => leg.LegislationID === reference.ReferenceID) : null;\n                            if (legislation) {\n                                legislationVal = {\n                                    label: reference.ReferenceText,\n                                    value: reference.ReferenceID\n                                };\n                            }\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <CustomCreatableSelect\n                                        options={this.props.newEvent && this.props.newEvent.EventCode ? getReferenceList(this.props.newEvent.EventCode, this.props.legislationList || []) : this.props.legislationList || []}\n                                        onChange={(event) => this.handleChange(referenceIndex, event)}\n                                        value={legislationVal}\n                                        placeholder={this.props.fetchingSessionLegislation ? 'Loading bills...' : 'Select...'}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                        default:\n                            return (\n                                <div key={referenceIndex} style={divStyle}>\n                                    <CustomInput\n                                        value={reference.ReferenceText}\n                                        onChange={(event) => this.handleChange(referenceIndex, event.target.value)}\n                                    />\n                                    {errorCheck(referenceIndex)}\n                                </div>\n                            );\n                    }\n                })\n                }\n                {actionTypes && actionTypes.length > 0 && this.props.textList.length > 0 && (!this.props.newEvent?.ActionReferences?.length || this.props.newEvent.ActionReferences[0].ActionReferenceType !== \"LegislationEvent\") &&\n                    <div style={divStyle}>\n                        <label className=\"txt-greyed smaller-text\" style={{ opacity: this.state.selectedActionType ? 1 : 0 }}>Press enter to add</label>\n                        <Select\n                            onKeyDown={(e) => {\n                                //Enter can also be used to select an option. Make sure that the menu is closed before trying to add the input\n                                if (e.key === 'Enter' && !this.actionTypeDropdown.state.menuIsOpen) {\n                                    this.addInput();\n                                }\n                            }}\n                            placeholder=\"Add\"\n                            options={actionTypes}\n                            value={this.state.selectedActionType}\n                            onChange={this.handleActionTypeChange}\n                            styles={selectStyle()}\n                            ref={ref => this.actionTypeDropdown = ref}\n                        />\n                    </div>\n                }\n\n            </div>\n        );\n    }\n}\n\n//react-select default style makes the element too tall and the font too large\nconst selectStyle = () => {\n    const fontSize = '0.8em';\n    return {\n        container: styles => ({\n            ...styles,\n            minWidth: '150px'\n        }),\n        control: styles => ({\n            ...styles,\n            minHeight: '0px',\n            padding: '0.12em 0.6em !important',\n        }),\n        valueContainer: styles => ({\n            ...styles,\n            padding: 0,\n        }),\n        input: styles => ({\n            ...styles,\n            fontSize: fontSize,\n            lineHeight: 'normal',\n        }),\n        singleValue: styles => ({\n            ...styles,\n            fontSize: fontSize,\n        }),\n        placeholder: styles => ({\n            ...styles,\n            fontSize: fontSize\n        }),\n        option: styles => ({\n            ...styles,\n            fontSize: fontSize\n        }),\n        dropdownIndicator: styles => ({\n            ...styles,\n            padding: '0px 8px'\n        }),\n        menu: provided => ({\n            ...provided,\n            whiteSpace: 'nowrap',\n            width: 'auto'\n        })\n    };\n}\n\nexport default InputType;","import React, {useState} from 'react';\nimport tinymce from 'tinymce/tinymce';\nimport 'tinymce/themes/silver/theme';\nimport 'tinymce/icons/default'\nimport 'tinymce/plugins/paste/plugin';\nimport 'tinymce/plugins/link/plugin';\nimport 'tinymce/plugins/save/plugin';\nimport 'tinymce/plugins/lists/plugin';\nimport 'tinymce/plugins/code/plugin';\nimport 'tinymce/plugins/preview/plugin';\nimport 'tinymce/plugins/searchreplace/plugin';\nimport 'tinymce/plugins/pagebreak/plugin';\nimport 'tinymce/plugins/table/plugin';\nimport '../../../../stylesheets/tinymce/oxide/skin.min.css';\nimport { Editor } from '@tinymce/tinymce-react';\nimport ReactTable from 'react-table';\n\nconst CommentBox = props => {\n    const [selectedComment, selectComment] = useState(-1);\n    const [showView, toggleViews] = useState(true);\n    const handleChange = content => {\n        let comments = [...props.comments];\n        comments[selectedComment].MinutesSummary = content;\n        props.handleCommentBoxChange(comments);\n    }\n    const addComment = () => {\n        let comments = [...props.comments];\n        comments.push({MinutesSummary: ''});\n        props.handleCommentBoxChange(comments);\n        selectComment(props.comments.length);\n        toggleViews(false);\n    };\n    const getCommentPreview = (comment, index) => {\n        // Shows the first paragraph of the comment to the user in the grid so they don't need to open the comment to know what its content is.\n        // If a paragraph doesn't exist then the first element of the text is used\n        // If there aren't any elements, then just put comment number so its not just a blank row.\n        const container = document.createElement(\"DIV\");\n        container.innerHTML = comment.MinutesSummary;\n        const paragraphs = container.getElementsByTagName(\"P\")\n        if(paragraphs.length > 0 && paragraphs[0].innerText) {\n            return(<span>{paragraphs[0].innerText}</span>)\n        } else {\n            const firstElement = container.childNodes[0];\n            if(firstElement && firstElement.innerText) {\n                return(<span>{firstElement.innerText}</span>)\n            } else {\n                return <span>Comment {index + 1}</span>;\n            }\n        }\n    }\n    return(\n        <div onClick={() => props.toggleBox(false)} className=\"overlay center-content\">\n            <div className=\"full\">\n                <div onClick={e => e.stopPropagation()} className=\"dlas-forms user-forms advanced-search overlay-content animated-fade-in-up\">\n                    <ReactTable\n                        data={props.comments}\n                        showPageSizeOptions={false}\n                        showPagination={false}\n                        showPageJump={false}\n                        pageSize={props.comments.length}\n                        getTrProps={(_state, rowInfo) => {\n                            return {\n                                style: {\n                                    background: rowInfo && rowInfo.index === selectedComment ? '#89ff89' : '',\n                                    cursor: rowInfo ? 'pointer' : 'default',\n                                    display: showView ? 'inline-flex' : 'none'\n                                },\n                                onClick: () => {\n                                    selectComment(rowInfo.index);\n                                    toggleViews(false);\n                                }\n                            }\n                        }}\n                        noDataText=\"\"\n                        columns={[\n                            {\n                                id: \"checkbox\",\n                                className: \"checkbox-column\",\n                                Header: () => <button onClick={() => toggleViews(!showView)} className={`${showView ? 'arrow-up' : 'arrow-down'} white-chevron`}></button>,\n                                Cell: ({ index }) => <span className={index === selectedComment ? \"icon checkmark\" : \"\"}></span>,\n                                sortable: false,\n                                filterable: false,\n                                width: 45\n                            },\n                            {\n                                Cell: ({original, index}) => getCommentPreview(original, index),\n                                Footer: () => showView ? <button onClick={addComment} className=\"button\" type=\"button\">Add Comment</button> : null\n                            },\n                        ]}\n                        className=\"-striped -highlight\"\n                    />\n                    <div style={{display: showView ? 'none' : 'block'}}>\n                        <Editor\n                            value={props.comments[selectedComment] ? props.comments[selectedComment].MinutesSummary : ''}\n                            init={{\n                                browser_spellcheck: true,\n                                height: window.innerHeight / 1.5,\n                                plugins: 'link paste save lists preview searchreplace pagebreak code table',\n                                toolbar: 'undo redo | bold italic strikethrough | alignleft aligncenter alignright',\n                                skin: false,\n                                valid_children: '+body[style]',\n                                content_css: false,\n                                content_style: 'table { border-collapse: collapse; border: 1px solid #FFFFFF }' + 'td { padding: 12px 0px }',\n                            }}\n                            onEditorChange={content => handleChange(content)}\n                        />\n                    </div>\n                    <div className=\"flex-row\">\n                        <br />\n                        <div className=\"inline-list\">\n                            <button type=\"button\" onClick={() => props.toggleBox(false)} className=\"button secondary\">Cancel</button>\n                            <button type=\"button\" onClick={props.saveComment} className=\"button\">Save</button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    );\n};\n\nexport default CommentBox;","import React from \"react\";\nimport InputTypes from \"../input-types\";\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport Select from 'react-select'\nimport { calendarActionCreators } from \"../../../../stores/lis-calendar-store\";\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport CommentBox from './comment-box';\nimport renderHTML from 'react-render-html';\nimport { minutesActionCreators } from \"../../../../stores/lis-minutes-store\";\nimport { billActionCreators } from \"../../../../stores/lis-legislation-store\";\nimport ReactTooltip from \"react-tooltip\";\nimport moment from \"moment-timezone\";\n\nconst getItemStyle = (isDragging, draggableStyle, pendingDeletion) => ({\n    // some basic styles to make the items look a bit nicer\n    userSelect: 'none',\n    // change background colour if dragging\n    background: isDragging ? '#34495e' : 'white',\n    color: isDragging ? 'white' : '#34495e',\n    border: pendingDeletion ? 'red' : 'none',\n    // styles we need to apply on draggables\n    ...draggableStyle,\n});\n\nconst getListStyle = isDraggingOver => ({\n    background: isDraggingOver ? '#8b9fb3' : '#666666',\n    width: '100%',\n});\n\nclass NonLegislativeForm extends React.Component {\n\n    constructor(props) {\n        super(props)\n        this.state = {\n            selectedMotion: '',\n            insertEntry: [{ label: \"No Legislation\" }],\n            templateInputs: [],\n            references: [],\n            motionOptions: [],\n            selectedMotions: [],\n            newEntries: [],\n            templateInputs: [],\n            templatedEdited: false,\n            showMenu: -1,\n            showCommentBox: false,\n            commentBoxContent: [],\n            textList: [],\n            editing: false,\n            initialText: [],\n            checkedBills: [],\n            editingActivityDescription: {}\n        }\n\n        this.closeNewEntries = this.closeNewEntries.bind(this);\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.onEntryDragEnd = this.onEntryDragEnd.bind(this);\n        this.onActivityDragEnd = this.onActivityDragEnd.bind(this);\n        this.removeActivity = this.removeActivity.bind(this);\n        this.addBackActivity = this.addBackActivity.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.saveChange = this.saveChange.bind(this);\n        this.insertMotion = this.insertMotion.bind(this);\n        this.handleTemplateChange = this.handleTemplateChange.bind(this);\n        this.handleMotionChange = this.handleMotionChange.bind(this);\n        this.handleSelectedMotionDescriptionChange = this.handleSelectedMotionDescriptionChange.bind(this);\n        this.getCatActionList = this.getCatActionList.bind(this);\n        this.toggleMenu = this.toggleMenu.bind(this);\n        this.addEntry = this.addEntry.bind(this);\n        this.handleCommentBoxChange = this.handleCommentBoxChange.bind(this);\n        this.toggleCommentBox = this.toggleCommentBox.bind(this);\n        this.saveComment = this.saveComment.bind(this);\n        this.toggleShowDeleted = this.toggleShowDeleted.bind(this);\n        this.getTextList = this.getTextList.bind(this);\n        this.getNonLegislativeActionList = this.getNonLegislativeActionList.bind(this);\n        this.handleNewMotionChange = this.handleNewMotionChange.bind(this);\n        this.toggleSwitchCategory = this.toggleSwitchCategory.bind(this);\n        this.handleSwitchCategoryChange = this.handleSwitchCategoryChange.bind(this);\n        this.switchCategory = this.switchCategory.bind(this);\n        this.toggleSelectEntry = this.toggleSelectEntry.bind(this);\n        this.toggleEditActivityDescription = this.toggleEditActivityDescription.bind(this);\n\n        this.menuBoxRef = React.createRef();\n    }\n\n    closeNewEntries() {\n        this.setState({\n            newEntries: []\n        });\n    }\n\n    toggleEdit(index) {\n        let newEntries = [...this.state.newEntries];\n        let init = [];\n        if (this.state.newEntries[index]) {\n            newEntries[index] = null;\n        } else {\n            if (this.state.newEntries.length === 0) {\n                newEntries.length = this.props.formData.MinutesEntries.length;\n            }\n            //If the user has multiple edit entries open clicking the X on one doesn't kill the changes to another\n            newEntries[index] = JSON.parse(JSON.stringify(this.props.formData.MinutesEntries[index]));\n            // Test to see if there are zero minute activities. If so then create one.\n            if (!newEntries[index].MinutesActivities || newEntries[index].MinutesActivities.length === 0) {\n                newEntries[index].MinutesActivities = [];\n                const newActivity = {\n                    Description: newEntries[index].EntryText,\n                    ActivityReferences: [],\n                    InPreview: true\n                };\n                newEntries[index].MinutesActivities.push(newActivity);\n            }\n            //Test to see if the activities have zero activity references. If they have zero then add a blank text one\n            newEntries[index].MinutesActivities.forEach(act => {\n                if (act.EventCode) {\n                    const eventReference = this.state.references.find(evt => evt.EventCode === act.EventCode && evt.IsPassed === act.IsPassed);\n                    if (eventReference) {\n                        const actionReferences = eventReference.ActionReferences;\n                        if (actionReferences) {\n                            const missingActivitiyReferences = actionReferences.filter(ref => !act.ActivityReferences || !act.ActivityReferences.map(existingActivities => existingActivities.ActionReferenceType).includes(ref.ActionReferenceType));\n                            if (missingActivitiyReferences.length) {\n                                act.ActivityReferences = act.ActivityReferences ? act.ActivityReferences.concat(JSON.parse(JSON.stringify(missingActivitiyReferences))) : JSON.parse(JSON.stringify(missingActivitiyReferences));\n                            }\n                        }\n                    }\n                }\n\n                if (!act.ActivityReferences || act.ActivityReferences.length === 0) {\n                    const textType = this.props.actionTypes.find(type => type.ActionReferenceType === 'Text');\n                    if (textType) {\n                        //Sometimes ActivityReferences is undefined. Make a blank one so the push does not fail\n                        act.ActivityReferences = [];\n                        act.ActivityReferences.push({\n                            ActionReferenceTypeID: textType.ActionReferenceTypeID,\n                            ActionReferenceType: textType.ActionReferenceType,\n                            ReferenceText: act.Description\n                        });\n                    }\n                }\n                //Need something from act we can reference back to when displaying the initial activity text value as a label\n                init.push({ ReferenceText: act.Description, MinutesActivityID: act.MinutesActivityID })\n            });\n        }\n        let editingActivityDescription = { ...this.state.editingActivityDescription };\n        editingActivityDescription[index] = {};\n        this.setState({\n            newEntries: newEntries,\n            editing: !this.state.editing,\n            initialText: init,\n            editingActivityDescription\n        }, () => {\n            if (this.state.editing) {\n                newEntries[index].MinutesActivities.forEach((activity, activityIndex) => {\n                    if (activity.VoteTally !== undefined)\n                        this.handleActivityDescriptionChange(null, \"VoteTally\", index, activityIndex)\n                })\n            }\n        });\n    }\n\n    toggleEditActivityDescription(entryIndex, activityIndex) {\n        let editingActivityDescription = { ...this.state.editingActivityDescription };\n        if (!editingActivityDescription[entryIndex]) {\n            editingActivityDescription[entryIndex] = {};\n        }\n        editingActivityDescription[entryIndex][activityIndex] = !editingActivityDescription[entryIndex][activityIndex];\n        this.setState({ editingActivityDescription }, () => {\n            this.handleActivityDescriptionChange(null, \"Description\", entryIndex, activityIndex)\n            this.handleActivityDescriptionChange(null, \"VoteTally\", entryIndex, activityIndex)\n        });\n    }\n\n    handleActivityDescriptionChange(value, attr, entryIndex, activityIndex, save) {\n        //Update the input with new text. Save change to this components state so it doesn't update the parent just yet (in case the user clicks the X)\n        let entries = this.state.newEntries;\n        let activity = entries[entryIndex].MinutesActivities[activityIndex];\n\n        if (save) {\n            activity.Description = activity.tempDescription ?? activity.Description;\n            activity.VoteTally = activity.tempVoteTally ?? activity.VoteTally;\n        } else {\n            activity['temp' + attr] = value ?? activity[attr];\n        }\n\n        this.setState({ entries }, () => {\n            if (save) this.toggleEditActivityDescription(entryIndex, activityIndex);\n        });\n    }\n\n    onActivityDragEnd(result, entryIndex) {\n        if (!result.destination) {\n            return;\n        }\n        if (result.destination.index === result.source.index) {\n            return;\n        }\n        let entries = [...this.state.newEntries];\n        let activities = entries[entryIndex].MinutesActivities;\n        const [removed] = activities.splice(result.source.index, 1);\n        activities.splice(result.destination.index, 0, removed);\n        activities.forEach((element, index) => {\n            element.Sequence = index + 1\n        });\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    onEntryDragEnd(result) {\n        if (!result.destination) {\n            return;\n        }\n        if (result.destination.index === result.source.index) {\n            return;\n        }\n        let entries = [...this.props.formData.MinutesEntries];\n        const [removed] = entries.splice(result.source.index, 1);\n        entries.splice(result.destination.index, 0, removed);\n        entries.forEach((element, index) => {\n            element.Sequence = index + 1;\n        });\n        this.props.onMultipleEntryChange(entries, this.props.currentActivitySequence);\n        this.props.handleSaveEntry(entries);\n        // \n        this.setState({\n            newEntries: []\n        });\n    }\n\n    removeActivity(entryIndex, activityIndex) {\n        let entries = [...this.state.newEntries];\n        entries[entryIndex].MinutesActivities[activityIndex].DeletionDate = moment();\n        if (entries[entryIndex].MinutesSummaries) {\n            //if this is a \"COMMUNICATION FROM HOUSE\" entry, delete the entire entry so nothing (including the minutes summaries) appears for the public\n            entries[entryIndex].DeletionDate = moment();\n        }\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    addBackActivity(entryIndex, activityIndex) {\n        let entries = [...this.state.newEntries];\n        entries[entryIndex].MinutesActivities[activityIndex].DeletionDate = null;\n        entries[entryIndex].MinutesActivities[activityIndex].IsPublic = false;\n        if (entries[entryIndex].MinutesSummaries) {\n            //if this is a \"COMMUNICATION FROM HOUSE\" entry, re-add the entire entry so everything (including the minutes summaries) appears\n            entries[entryIndex].DeletionDate = null;\n            entries[entryIndex].IsPublic = false;\n        }\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    handleChange(entryIndex, activityIndex, referenceIndex, reference, previousValue) {\n        //Update the input with new text. Save change to this components state so it doesn't update the parent just yet (in case the user clicks the X)\n        let entries = this.state.newEntries;\n        let activity = entries[entryIndex].MinutesActivities[activityIndex];\n        activity.ActivityReferences[referenceIndex] = reference;\n        let desc = '';\n        activity.ActivityReferences.forEach(tInput => desc += tInput.ReferenceText);\n        activity.Description = desc;\n        if (this.props.formData.CategoryType === \"Chairmans Report\") {\n            // if they are editing a chairs report summary, use the entrytext attr, as it won't persist otherwise\n            entries[entryIndex].EntryText = desc;\n            entries[entryIndex].IsPublic = false;\n        }\n        activity.IsPublic = false;\n        entries[entryIndex].MinutesActivities[activityIndex] = activity;\n        //if they are selecting a communication, add minutessummaries for each communicationsummary on that communication\n        if (reference.ActionReferenceType === 'Communication') {\n            //set the communication data for the entry level\n            entries[entryIndex].CommunicationID = reference.ReferenceID;\n            entries[entryIndex].CommunicationDate = reference.CommunicationDate;\n            if (reference.CommunicationNumber) {\n                entries[entryIndex].CommunicationNumber = Number(reference.CommunicationNumber);\n            }\n            //set minutessummaries array if not already available\n            entries[entryIndex].MinutesSummaries = entries[entryIndex].MinutesSummaries || [];\n            //if they are changing from one communication to another, delete the summaries related to the old communication\n            if (previousValue && previousValue.ReferenceID) {\n                entries[entryIndex].MinutesSummaries = entries[entryIndex].MinutesSummaries.filter(ms => ms.ModificationDate);\n                entries[entryIndex].MinutesSummaries.filter(ms => ms.ReferenceID === previousValue.ReferenceID).forEach(ms => ms.DeletionDate = moment())\n            }\n            if (reference.CommunicationSummaries) {\n                reference.CommunicationSummaries.filter(cs => cs.MinutesSummary && cs.CommunicationID).forEach(commSummary => {\n                    entries[entryIndex].MinutesSummaries.push({ MinutesSummary: commSummary.MinutesSummary, ReferenceID: commSummary.CommunicationID })\n                })\n            }\n        }\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    saveChange(entryIndex) {\n        let entry = this.state.newEntries[entryIndex];\n        //save any changes to vote tallies\n        let promises = [];\n        entry.MinutesActivities.forEach((activity, activityIndex) => {\n            if (activity.VoteTally !== undefined && !activity.ActivityReferences.find(ar => ar.ActionReferenceType !== \"Text\")) {\n                promises.push(new Promise(res => {\n                    this.handleActivityDescriptionChange(null, \"VoteTally\", entryIndex, activityIndex, true);\n                    res();\n                }))\n            }\n        })\n        Promise.all(promises).then(() => {\n            //Send the index of the minute entry, the entire minute entries object (so we don't have to save the entire book),\n            //the value of the text input, and the sequence to show which category to update\n            this.props.onEntryChange(entryIndex, entry, this.props.currentActivitySequence);\n            this.props.handleSaveEntry(entry);\n            //Turn it back into a span\n            let newEntries = [...this.state.newEntries];\n            newEntries[entryIndex] = null;\n            let editingActivityDescription = { ...this.state.editingActivityDescription };\n            editingActivityDescription[entryIndex] = {};\n            this.setState({\n                newEntries: newEntries,\n                editing: false,\n                editingActivityDescription\n            });\n        });\n    }\n\n    insertMotion(entryIndex) {\n        //A new motion wants to be added so take all this data and sent it to the parent div to be added to the state\n        const { templatedEdited } = this.state;\n        let templateInputs = [...this.state.templateInputs];\n        let selectedMotions = [...this.state.selectedMotions];\n        const entries = [...this.props.formData.MinutesEntries];\n        const selectedMotion = selectedMotions[entryIndex] ? selectedMotions[entryIndex] : this.state.selectedMotion;\n        let entry = entryIndex >= 0 ? entries[entryIndex] : {};\n        //If it is a null then create a new one so the push doesn't fail\n        if (!entry.MinutesActivities) {\n            entry.MinutesActivities = [];\n        }\n        entry.Sequence = Math.max(...entries.map(e => e.Sequence || 0)) + 1;\n        let desc = selectedMotion.Description || selectedMotion.CalendarDescription;\n        //If the user has changed the value of the action references then use those for the description instead of the existing one.\n        let activityRefs = [];\n        if (templatedEdited || (templateInputs.length && !templateInputs.find(tInput => ![\"Text\", \"HTML\"].includes(tInput.ActionReferenceType)))) {\n            desc = '';\n            templateInputs.forEach((tInput, actIndex) => {\n                desc += tInput.ReferenceText;\n                activityRefs[actIndex] = {\n                    ActionReferenceTypeID: tInput.ActionReferenceTypeID,\n                    ActionReferenceType: tInput.ActionReferenceType,\n                    Sequence: tInput.Sequence,\n                    ReferenceText: tInput.ReferenceText,\n                    ReferenceID: tInput.ReferenceID\n                }\n                if (tInput.CommunicationSummaries) {\n                    tInput.CommunicationSummaries.filter(cs => cs.MinutesSummary && cs.CommunicationID).forEach(commSummary => {\n                        entry.MinutesSummaries = entry.MinutesSummaries || [];\n                        entry.MinutesSummaries.push({ MinutesSummary: commSummary.MinutesSummary, ReferenceID: commSummary.CommunicationID })\n                    })\n                }\n            });\n        } else {\n            const textType = this.props.actionTypes.find(type => type.ActionReferenceType === 'Text');\n            if (textType) {\n                activityRefs = [{\n                    ActionReferenceTypeID: textType.ActionReferenceTypeID,\n                    ActionReferenceType: textType.ActionReferenceType,\n                    ReferenceText: desc\n                }];\n            }\n        }\n        entry.MinutesActivities.push(Object.assign(selectedMotion, {\n            MinutesEntryID: entry.MinutesEntryID,\n            ActivityReferences: activityRefs,\n            Description: desc,\n            Sequence: Math.max(...entry.MinutesActivities.map(m => m.Sequence || 0)) + 1\n        }));\n        //User cannot add an activity to an entry while they are editing that entry\n        if (this.state.newEntries[entryIndex]) {\n            let newEntries = [...this.state.newEntries];\n            newEntries[entryIndex] = null;\n            this.setState({\n                newEntries: newEntries\n            })\n        }\n        this.props.onEntryChange(entryIndex, entry, this.props.currentActivitySequence);\n        //Set MinutesCategoryID if we're adding an order of business entry and entryText\n        if (!entry.MinutesCategoryID) {\n            entry.MinutesCategoryID = this.props.formData.MinutesCategoryID;\n            entry.EntryText = desc;\n        }\n        this.props.handleSaveEntry(entry);\n\n        selectedMotions[entryIndex] = null;\n        templateInputs = [];\n        this.setState({\n            selectedMotion: '',\n            selectedMotions: selectedMotions,\n            templateInputs: templateInputs,\n            showSwitchCategory: false,\n            selectedSwitchCategory: null,\n        });\n    }\n\n    handleTemplateChange(entryIndex, activityIndex, referenceIndex, reference, previousValue) {\n        let templateInputs = [...this.state.templateInputs];\n        templateInputs[referenceIndex] = reference;\n        //Used when adding the motion to know whether to use the existing description or concatenate together the action reference values\n        //If they have change a value it is save to say they want the the description to be the action references stringed together\n        if (!this.state.templatedEdited) {\n            this.setState({\n                templatedEdited: true\n            });\n        }\n        //if they are selecting a communication, add minutessummaries for each communicationsummary on that communication\n        if (reference.ActionReferenceType === 'Communication') {\n            //set the communication data for the entry level\n            templateInputs[entryIndex].CommunicationID = reference.ReferenceID;\n            templateInputs[entryIndex].CommunicationDate = reference.CommunicationDate;\n            if (reference.CommunicationNumber) {\n                templateInputs[entryIndex].CommunicationNumber = Number(reference.CommunicationNumber);\n            }\n            //set minutessummaries array if not already available\n            templateInputs[entryIndex].MinutesSummaries = templateInputs[entryIndex].MinutesSummaries || [];\n            //if they are changing from one communication to another, delete the summaries related to the old communication\n            if (previousValue && previousValue.ReferenceID) {\n                templateInputs[entryIndex].MinutesSummaries = templateInputs[entryIndex].MinutesSummaries.filter(ms => ms.ModificationDate);\n                templateInputs[entryIndex].MinutesSummaries.filter(ms => ms.ReferenceID === previousValue.ReferenceID).forEach(ms => ms.DeletionDate = moment())\n            }\n            if (reference.CommunicationSummaries) {\n                reference.CommunicationSummaries.filter(cs => cs.MinutesSummary && cs.CommunicationID).forEach(commSummary => {\n                    templateInputs[entryIndex].MinutesSummaries.push({ MinutesSummary: commSummary.MinutesSummary, ReferenceID: commSummary.CommunicationID })\n                })\n            }\n        }\n        this.setState({\n            templateInputs: templateInputs\n        });\n    }\n\n    handleMotionChange(entryIndex, val) {\n        let selectedMotions = [...this.state.selectedMotions];\n        let templateInputs = [...this.state.templateInputs];\n        selectedMotions[entryIndex] = val;\n        templateInputs[entryIndex] = val ? JSON.parse(JSON.stringify(val.ActionReferences)) : null;\n        this.setState({\n            selectedMotions: selectedMotions,\n            templateInputs: templateInputs,\n        }, () => {\n            if (val && val.ActionReferences && val.ActionReferences.find(ar => ar.ActionReferenceType === \"LegislationText\")) {\n                this.getTextList();\n            }\n        });\n    }\n\n\n    handleSelectedMotionDescriptionChange(e) {\n        let selectedMotion = { ...this.state.selectedMotion };\n        selectedMotion.Description = e.target.value;\n        this.setState({\n            selectedMotion\n        });\n    }\n\n    getTextList() {\n        const entries = this.props.formData.MinutesEntries;\n        entries.forEach(entry => {\n            if (entry.LegislationID && !this.state.textList.find(text => text.LegislationID === entry.LegislationID)) {\n                this.props.actions.getTextList('?legislationID=' + entry.LegislationID + '&sessionID=' + this.props.sessionId)\n                    .then(() => {\n                        let textList = [...this.props.bills.textList];\n                        textList.forEach(text => {\n                            text.label = text.DocumentCode;\n                            text.value = text.LegislationTextID;\n                        });\n                        this.setState(state => ({\n                            textList: state.textList.concat(textList)\n                        }));\n                    });\n            }\n        })\n    }\n\n    componentDidUpdate(prevProps) {\n        if (prevProps.currentActivitySequence !== this.props.currentActivitySequence) {\n            this.setState({\n                selectedMotions: [],\n                newEntries: [],\n                templateInputs: [],\n                templatedEdited: false,\n                showSwitchCategory: false,\n                selectedSwitchCategory: null,\n            });\n            this.getCatActionList();\n        }\n    }\n\n    componentDidMount() {\n        this.getCatActionList();\n        this.getNonLegislativeActionList();\n    }\n\n    getCatActionList() {\n        //Get the calendar action reference data\n        const catId = this.props.formData.CalendarCategoryTypeID;\n        const referenceParams = `?calendarCategoryTypeID=${catId}&chamberCode=S`;\n        this.props.actions.getReferences(referenceParams)\n            .then(() => {\n                let motionOptions = this.props.calendar.references;\n                motionOptions.forEach(reference => {\n                    reference.label = `${reference.EventCode} ${reference.Description}`;\n                    reference.value = reference.CalendarActionID;\n                });\n                this.setState({\n                    motionOptions: motionOptions\n                });\n            });\n    }\n\n    toggleMenu(entryIndex, e) {\n        if (e) {\n            //Do not hide the small motion form if a child of the form is focused\n            if (e.currentTarget.contains(e.relatedTarget)) {\n                return;\n            }\n        }\n        this.setState({\n            showMenu: entryIndex\n        }, () => {\n            if (this.menuBoxRef.current) {\n                this.menuBoxRef.current.focus();\n            }\n        });\n    }\n\n    addEntry(entryIndex, position) {\n        let entries = [...this.props.formData.MinutesEntries];\n        const newEntry = {\n            IsOOB: entries[entryIndex].IsOOB,\n            IsPublic: false,\n            MinutesCategoryID: entries[entryIndex].MinutesCategoryID\n        }\n        entries.splice(entryIndex + position, 0, newEntry);\n        entries.forEach((entry, idx) => {\n            entry.Sequence = idx + 1\n        });\n        this.props.handleSaveEntry(entries);\n        this.setState({\n            showMenu: -1,\n            newEntries: [],\n            selectedMotions: []\n        });\n    }\n\n    handleCommentBoxChange(content) {\n        this.setState({\n            commentBoxContent: content\n        });\n    }\n\n    toggleCommentBox(show) {\n        const entries = this.props.formData.MinutesEntries;\n        let commentBoxContent = [];\n        if (entries[show] && entries[show].MinutesSummaries) {\n            if (entries[show].MinutesSummaries.length !== 0) {\n                commentBoxContent = entries[show].MinutesSummaries;\n            }\n        }\n        this.setState({\n            showCommentBox: show,\n            commentBoxContent: commentBoxContent\n        });\n    }\n\n    saveComment() {\n        let entries = [...this.props.formData.MinutesEntries];\n        if (entries[this.state.showCommentBox]) {\n            let entry = entries[this.state.showCommentBox];\n            entry.MinutesSummaries = this.state.commentBoxContent;\n            this.props.handleSaveEntry(entry);\n            this.setState({\n                showCommentBox: false\n            });\n        }\n    }\n\n    toggleShowDeleted(entryIndex) {\n        let entries = [...this.state.newEntries];\n        entries[entryIndex].showDeleted = !entries[entryIndex].showDeleted;\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    getNonLegislativeActionList() {\n        //Get the non legislative action reference data\n        this.props.actions.getBillEventReferences(\"?isActive=true\").then(() => {\n            let references = [...this.props.bills.billEventRef].filter(ref => ref.AdministrativeAction);\n            references.forEach(ref => {\n                ref.label = `${ref.EventCode} ${ref.CalendarDescription}`;\n                ref.value = `${ref.EventCode}-${ref.IsPassed}`\n            });\n            this.setState({\n                references: references\n            });\n        });\n    }\n\n    handleNewMotionChange(value) {\n        this.setState({\n            selectedMotion: value,\n            templateInputs: value ? JSON.parse(JSON.stringify(value.ActionReferences)) : [],\n            templatedEdited: false\n        });\n    }\n\n    toggleSwitchCategory(entryIndex) {\n        this.setState({\n            showSwitchCategory: !this.state.showSwitchCategory\n        }, () => {\n            if (this.state.showSwitchCategory) {\n                const dropdownOptions = this.props.categories.filter(c => c.CalendarCategoryTypeID === this.props.formData.CalendarCategoryTypeID && c.MinutesCategoryID !== this.props.formData.MinutesCategoryID);\n                if (dropdownOptions.length === 1) {\n                    this.handleSwitchCategoryChange(dropdownOptions[0]);\n                }\n                this.toggleSelectEntry(entryIndex);\n                this.toggleMenu(-1);\n            } else {\n                this.setState({ checkedBills: [] })\n                this.handleSwitchCategoryChange(null);\n            }\n        });\n    }\n\n    handleSwitchCategoryChange(val) {\n        this.setState({\n            selectedSwitchCategory: val\n        });\n    }\n\n    switchCategory() {\n        if (this.state.checkedBills.length && this.state.selectedSwitchCategory) {\n            this.setState({ switchingCategories: true }, () => {\n                const origSequence = this.props.currentActivitySequence;\n                let entries = [...this.props.formData.MinutesEntries].filter((e, i) => this.state.checkedBills[i]);\n                this.props.bulkMoveEntry(entries, origSequence - 1, this.state.selectedSwitchCategory.MinutesCategoryID);\n                this.setState({ checkedBills: [], showSwitchCategory: false, selectedSwitchCategory: null, switchingCategories: false })\n            })\n        }\n    }\n\n    toggleSelectEntry(billIndex, e) {\n        let checkedBills = [...this.state.checkedBills];\n        let lastCheckedBill = this.state.lastCheckedBill;\n        if (e && e.nativeEvent.shiftKey && this.state.lastCheckedBill !== -1) {\n            checkedBills = checkedBills.fill(false);\n            for (let i = 0; i < Math.abs(billIndex - this.state.lastCheckedBill); i++) {\n                const index = this.state.lastCheckedBill + i * (billIndex - this.state.lastCheckedBill) / Math.abs(billIndex - this.state.lastCheckedBill);\n                checkedBills[index] = true;\n            }\n        } else {\n            lastCheckedBill = !checkedBills[billIndex] ? billIndex : this.state.lastCheckedBill;\n        }\n        checkedBills[billIndex] = !checkedBills[billIndex]\n        this.setState({\n            checkedBills: checkedBills,\n            lastCheckedBill: lastCheckedBill\n        });\n    }\n\n    render() {\n        const { selectedMotion, references } = this.state;\n        const fontSize = '0.8em';\n        const selectStyle = {\n            control: styles => ({\n                ...styles,\n                minHeight: '0px',\n                padding: '0.12em 0.6em !important',\n            }),\n            valueContainer: styles => ({\n                ...styles,\n                padding: 0,\n            }),\n            input: styles => ({\n                ...styles,\n                fontSize: fontSize,\n                lineHeight: 'normal',\n            }),\n            singleValue: styles => ({\n                ...styles,\n                fontSize: fontSize,\n            }),\n            placeholder: styles => ({\n                ...styles,\n                fontSize: fontSize\n            }),\n            option: styles => ({\n                ...styles,\n                fontSize: fontSize\n            }),\n            dropdownIndicator: styles => ({\n                ...styles,\n                padding: '5px'\n            }),\n        }\n        const showDeletedItemsCheckbox = (entry) => {\n            return !!entry.MinutesActivities.find(act => act.DeletionDate)\n        }\n        // Sometimes the deleted items are shown and other times they are not. If they are not shown then the first activity might not be the first activity on the screen.\n        // So this variable is used to figure out whether to show the hr or not that seperates activities.\n        const getIndexOfFirstActivity = entry => {\n            if (entry.showDeleted) {\n                return 0\n            } else {\n                return entry.MinutesActivities.findIndex(act => !act.DeletionDate);\n            }\n        }\n\n        return (\n            <div className=\"user-forms\">\n                <div className=\"dlas-forms tooltip-wrap\">\n                    <form>\n                        {this.props.formData.CalendarCategoryTypeID == 132 /* Order of Business */ &&\n                            <>\n                                <div className=\"multi-row eight-and-one no-margin\" style={{ marginBottom: \"20px\" }}>\n                                    <div className=\"inner-grid two\">\n                                        <div>\n                                            <label>Motion</label>\n                                            <Select\n                                                value={selectedMotion}\n                                                options={references}\n                                                onChange={this.handleNewMotionChange}\n                                                styles={selectStyle}\n                                                isClearable\n                                            />\n                                        </div>\n                                        <div>\n                                            <label>Description</label>\n                                            <input\n                                                value={this.state.templateInputs.length > 0 ? '' : selectedMotion?.Description || selectedMotion?.CalendarDescription || ''}\n                                                placeholder={selectedMotion ? this.state.templateInputs.length > 0 ? \"See below...\" : \"\" : \"Select motion...\"}\n                                                disabled={!selectedMotion || this.state.templateInputs.length > 0}\n                                                onChange={this.handleSelectedMotionDescriptionChange}\n                                            />\n                                        </div>\n                                    </div>\n                                    <div className=\"inner-grid two\">\n                                        <div>\n                                            <br />\n                                            <button type='button' disabled={!this.state.selectedMotion || this.props.categoryFormDisabled} className='button' onClick={() => this.insertMotion(-1)}>Add Motion</button>\n                                        </div>\n                                    </div>\n                                </div>\n                                {this.state.templateInputs.length > 0 &&\n                                    <div className=\"multi-row small-two-one-alt no-margin\">\n                                        <br />\n                                        <div>\n                                            <div>\n                                                <span className='small-text txt-greyed'>{renderHTML(this.state.templateInputs.map((tInput, i) => {\n                                                    if (!tInput.ReferenceText && tInput.ActionReferenceType !== \"Text\") {\n                                                        return `[${tInput.ActionReferenceType}]`\n                                                    }\n                                                    return tInput.ReferenceText\n                                                }).join(''))}</span>\n                                            </div>\n                                            <InputTypes\n                                                newEvent={this.state.selectedMotion}\n                                                memberList={this.props.memberList}\n                                                committeeList={this.props.committeeList}\n                                                communicationList={this.props.communicationList}\n                                                eventList={this.state.reconsiderationEvents}\n                                                handleChange={this.handleTemplateChange}\n                                                entryIndex={0}\n                                                activityIndex={0}\n                                                references={this.state.templateInputs}\n                                            />\n                                        </div>\n                                    </div>\n                                }\n                            </>\n                        }\n                    </form>\n                    {this.state.showCommentBox !== false &&\n                        <CommentBox\n                            toggleBox={this.toggleCommentBox}\n                            handleCommentBoxChange={this.handleCommentBoxChange}\n                            comments={this.state.commentBoxContent}\n                            saveComment={this.saveComment}\n                        />\n                    }\n                    {this.props.formData.MinutesEntries.length ?\n                        <div className=\"flex-row flex-end\" style={{ marginBottom: '5px' }}>\n                            {this.state.showSwitchCategory &&\n                                <div className=\"inner-grid\" style={{ gap: '5px', gridTemplateColumns: '20px 4fr .1fr' }}>\n                                    <div className=\"inner-grid align-center\">\n                                        <button onClick={this.toggleSwitchCategory} type=\"button\" className=\"icon delete\"></button>\n                                    </div>\n                                    <Select\n                                        value={this.state.selectedSwitchCategory}\n                                        options={this.props.categories.filter(c => c.CalendarCategoryTypeID === this.props.formData.CalendarCategoryTypeID && c.MinutesCategoryID !== this.props.formData.MinutesCategoryID)}\n                                        getOptionLabel={opt => this.props.getCategoryDescriptionText(opt)}\n                                        onChange={this.handleSwitchCategoryChange}\n                                        styles={selectStyle}\n                                    />\n                                    <button onClick={this.switchCategory} disabled={!this.state.checkedBills.length || this.state.switchingCategories || !this.state.selectedSwitchCategory} type=\"button\" className=\"button float-right\">{this.state.switchingCategories ? <div className=\"small-spinner\" /> : 'Switch'}</button>\n                                </div>\n                            }\n                        </div>\n                        : null\n                    }\n                    <div className={this.props.disableChanges ? 'dnd-disabled' : ''}>\n                        <DragDropContext onDragEnd={this.onEntryDragEnd}>\n                            <Droppable droppableId={`entries-droppable`}>\n                                {(provided, snapshot) =>\n                                    <div ref={provided.innerRef} style={getListStyle(snapshot.isDraggingOver)}>\n                                        {this.props.formData.MinutesEntries.map((entry, entryIndex) =>\n                                            <Draggable isDragDisabled={this.props.categoryFormDisabled} key={`${entry.MinutesEntryID}-${entry.Sequence}`} draggableId={`${entry.MinutesEntryID}-${entry.Sequence}`} index={entryIndex}>\n                                                {(provided, snapshot) =>\n                                                    <div {...this.state.newEntries[entryIndex] ? null : { ...provided.dragHandleProps }} ref={provided.innerRef} {...provided.draggableProps} className=\"section-content\">\n                                                        <div>\n                                                            {this.state.newEntries[entryIndex] ?\n                                                                <React.Fragment>\n                                                                    {showDeletedItemsCheckbox(this.state.newEntries[entryIndex]) &&\n                                                                        <div className=\"flex-row flex-vertical-center flex-start\">\n                                                                            <div className=\"toggle-switch\" onClick={() => this.toggleShowDeleted(entryIndex)}>\n                                                                                <input type=\"checkbox\" checked={this.state.newEntries[entryIndex].showDeleted} />\n                                                                                <span className=\"slider\"></span>\n                                                                            </div>\n                                                                            <label style={{ fontSize: \"12px\" }} className=\"checkbox-label\">Show Deleted</label>\n                                                                        </div>}\n                                                                    <div className=\"no-gap-grid two-col-sidebar\">\n                                                                        <DragDropContext onDragEnd={res => this.onActivityDragEnd(res, entryIndex)}>\n                                                                            <Droppable droppableId={`activities-${entryIndex}-droppable`}>\n                                                                                {(provided, snapshot) =>\n                                                                                    <div ref={provided.innerRef} style={getListStyle(snapshot.isDraggingOver)}>\n                                                                                        {this.state.newEntries[entryIndex].MinutesActivities && this.state.newEntries[entryIndex].MinutesActivities.map((activity, activityIndex) => {\n                                                                                            if (!this.state.newEntries[entryIndex].showDeleted && activity.DeletionDate) {\n                                                                                                return null;\n                                                                                            } else {\n                                                                                                const inputValue = (this.state.newEntries[entryIndex].MinutesActivities[activityIndex].Description || (this.state.newEntries[entryIndex].MinutesActivities[activityIndex].ActivityReferences && this.state.newEntries[entryIndex].MinutesActivities[activityIndex].ActivityReferences.map((tInput, i) => {\n                                                                                                    if (!tInput.ReferenceText && tInput.ActionReferenceType !== \"Text\") {\n                                                                                                        return `[${tInput.ActionReferenceType}]`\n                                                                                                    }\n                                                                                                    return tInput.ReferenceText\n                                                                                                }).join('')));\n                                                                                                return (<Draggable key={`${activity.MinutesActivityID}-${activity.Sequence}`} draggableId={`${activity.MinutesActivityID}-${activity.Sequence}`} index={activityIndex}>\n                                                                                                    {(provided2, snapshot) =>\n                                                                                                        <div\n                                                                                                            ref={provided2.innerRef}\n                                                                                                            {...provided2.draggableProps}\n                                                                                                            style={getItemStyle(\n                                                                                                                snapshot.isDragging,\n                                                                                                                provided2.draggableProps.style\n                                                                                                            )}>\n                                                                                                            {getIndexOfFirstActivity(this.state.newEntries[entryIndex]) !== activityIndex && <hr className=\"faded-line\" />}\n                                                                                                            <div className=\"no-gap-grid two-col-sidebar-backwards\">\n                                                                                                                <div {...provided2.dragHandleProps}>\n                                                                                                                    <button className=\"button draggable\">Drag and drop</button>\n                                                                                                                </div>\n                                                                                                                <div>\n                                                                                                                    <div className=\"no-gap-grid two-col-sidebar\">\n                                                                                                                        <div>\n                                                                                                                            <div style={{ display: 'flex', alignItems: 'center', gap: '5px' }}>\n                                                                                                                                <span\n                                                                                                                                    style={{ textDecoration: this.state.newEntries[entryIndex].MinutesActivities[activityIndex].DeletionDate ? 'line-through' : 'none' }}\n                                                                                                                                    className=\"small-text\">\n                                                                                                                                    {renderHTML(((this.state.newEntries[entryIndex].MinutesActivities[activityIndex].tempDescription ?? this.state.newEntries[entryIndex].MinutesActivities[activityIndex].Description) || this.state.newEntries[entryIndex].MinutesActivities[activityIndex].ActivityReferences.map(tInput => {\n                                                                                                                                        if (!tInput.ReferenceText && tInput.ActionReferenceType !== \"Text\") {\n                                                                                                                                            return `[${tInput.ActionReferenceType}]`\n                                                                                                                                        }\n                                                                                                                                        return tInput.ReferenceText\n                                                                                                                                    }).join('')) + ((this.state.newEntries[entryIndex].MinutesActivities[activityIndex].tempVoteTally ?? this.state.newEntries[entryIndex].MinutesActivities[activityIndex].VoteTally) ? ' ' + (this.state.newEntries[entryIndex].MinutesActivities[activityIndex].tempVoteTally ?? this.state.newEntries[entryIndex].MinutesActivities[activityIndex].VoteTally) : ''))}\n                                                                                                                                </span>\n                                                                                                                                {this.state.newEntries[entryIndex].MinutesActivities.find(ma => ma.ActivityReferences?.find(ar => ar.ActionReferenceType !== \"Text\")) && (!this.state.editingActivityDescription[entryIndex] || !this.state.editingActivityDescription[entryIndex][activityIndex]) && <a className={`icon edit`} onClick={() => this.toggleEditActivityDescription(entryIndex, activityIndex)} />}\n                                                                                                                            </div>\n                                                                                                                            <div style={{ display: 'flex', alignItems: 'center', gap: '5px' }}>\n                                                                                                                                {this.state.editingActivityDescription[entryIndex] && this.state.editingActivityDescription[entryIndex][activityIndex] &&\n                                                                                                                                    <>\n                                                                                                                                        <div style={{ width: '100%', display: 'flex', gap: '5px' }}>\n                                                                                                                                            <textarea style={{ width: this.state.newEntries[entryIndex].MinutesActivities[activityIndex].VoteTally !== undefined ? '75%' : '100%' }} value={this.state.newEntries[entryIndex].MinutesActivities[activityIndex].tempDescription ?? inputValue} onChange={(e) => this.handleActivityDescriptionChange(e.target.value, \"Description\", entryIndex, activityIndex)} />\n                                                                                                                                            {this.state.newEntries[entryIndex].MinutesActivities[activityIndex].VoteTally !== undefined && <EditVoteTally value={this.state.newEntries[entryIndex].MinutesActivities[activityIndex].tempVoteTally} onChange={(e) => this.handleActivityDescriptionChange(e.target.value, \"VoteTally\", entryIndex, activityIndex)} />}\n                                                                                                                                        </div>\n                                                                                                                                        <div style={{ display: 'flex', gap: '5px' }}>\n                                                                                                                                            <a className={`icon save`} onClick={() => this.handleActivityDescriptionChange(null, null, entryIndex, activityIndex, true)} />\n                                                                                                                                            <a className={`icon delete`} onClick={() => this.toggleEditActivityDescription(entryIndex, activityIndex)} />\n                                                                                                                                        </div>\n                                                                                                                                    </>\n                                                                                                                                }\n                                                                                                                            </div>\n                                                                                                                            <div style={{ position: 'relative', zIndex: '2' }}>\n                                                                                                                                {!this.state.newEntries[entryIndex].MinutesActivities[activityIndex].DeletionDate &&\n                                                                                                                                    <>\n                                                                                                                                        <InputTypes\n                                                                                                                                            style={{ display: \"inline-block\" }}\n                                                                                                                                            committeeList={this.props.committeeList}\n                                                                                                                                            communicationList={this.props.communicationList}\n                                                                                                                                            memberList={this.props.memberList}\n                                                                                                                                            actionTypes={this.props.actionTypes}\n                                                                                                                                            handleChange={this.handleChange}\n                                                                                                                                            entryIndex={entryIndex}\n                                                                                                                                            activityIndex={activityIndex}\n                                                                                                                                            references={this.state.newEntries[entryIndex].MinutesActivities[activityIndex].ActivityReferences || []}\n                                                                                                                                            textList={this.state.textList.filter(text => this.state.newEntries[entryIndex].LegislationID === text.LegislationID)}\n                                                                                                                                        />\n                                                                                                                                        {this.state.newEntries[entryIndex].MinutesActivities[activityIndex].VoteTally !== undefined && !this.state.newEntries[entryIndex].MinutesActivities.find(ma => ma.ActivityReferences?.find(ar => ar.ActionReferenceType !== \"Text\")) && <EditVoteTally value={this.state.newEntries[entryIndex].MinutesActivities[activityIndex].tempVoteTally} onChange={(e) => this.handleActivityDescriptionChange(e.target.value, \"VoteTally\", entryIndex, activityIndex)} />}\n                                                                                                                                    </>\n                                                                                                                                }\n                                                                                                                            </div>\n                                                                                                                        </div>\n                                                                                                                        <div>\n                                                                                                                            {!this.state.newEntries[entryIndex].MinutesActivities[activityIndex].DeletionDate ?\n                                                                                                                                <button onClick={() => this.removeActivity(entryIndex, activityIndex)} title={\"Delete\"} type=\"button\" className=\"button remove\"></button>\n                                                                                                                                :\n                                                                                                                                <button onClick={() => this.addBackActivity(entryIndex, activityIndex)} title={\"Re-add\"} type=\"button\" className=\"button add\"></button>\n                                                                                                                            }\n                                                                                                                        </div>\n                                                                                                                    </div>\n\n                                                                                                                </div>\n                                                                                                            </div>\n                                                                                                        </div>}\n                                                                                                </Draggable>)\n                                                                                            }\n                                                                                        })}\n                                                                                        {provided.placeholder}\n                                                                                    </div>\n                                                                                }\n                                                                            </Droppable>\n                                                                        </DragDropContext>\n                                                                        <div style={{ position: \"relative\" }}>\n                                                                            <div className=\"inline-list bill-grid-actions\" key={entry.MinutesEntryID}>\n                                                                                <button onClick={() => this.saveChange(entryIndex)} title={\"Save\"} type=\"button\" className=\"icon save\"></button>\n                                                                                <button onClick={() => this.toggleEdit(entryIndex)} title={\"Cancel\"} type=\"button\" className=\"icon delete\"></button>\n                                                                            </div>\n                                                                        </div>\n                                                                    </div>\n                                                                </React.Fragment>\n                                                                :\n                                                                <div className=\"flex-row flex-vertical-center\">\n                                                                    <div className=\"flex-row flex-vertical-center inline-list\">\n                                                                        <div>\n                                                                            <span className=\"icon menu\" onClick={(e) => this.toggleMenu(entryIndex)}></span>\n                                                                            {this.state.showMenu === entryIndex &&\n                                                                                <div style={{ marginLeft: '-25px', width: this.state.showSwitchCategory !== entryIndex ? 'auto' : '' }} className=\"info-box blue\" ref={this.menuBoxRef} onBlur={(e) => this.toggleMenu(-1, e)} contentEditable suppressContentEditableWarning={true}>\n                                                                                    <div contentEditable={false}>\n                                                                                        <div>\n                                                                                            <button type=\"button\" disabled={this.props.categoryFormDisabled} onClick={() => this.addEntry(entryIndex, 0)} className=\"button-link\">Add Entry Above</button>\n                                                                                        </div>\n                                                                                        <div>\n                                                                                            <button type=\"button\" disabled={this.props.categoryFormDisabled} onClick={() => this.addEntry(entryIndex, 1)} className=\"button-link\">Add Entry Below</button>\n                                                                                        </div>\n                                                                                        {this.props.categories.filter(c => c.CalendarCategoryTypeID === this.props.formData.CalendarCategoryTypeID && c.MinutesCategoryID !== this.props.formData.MinutesCategoryID).length ?\n                                                                                            <div>\n                                                                                                <button type=\"button\" disabled={this.props.categoryFormDisabled} onClick={() => this.toggleSwitchCategory(entryIndex)} className=\"button-link\">Switch Category</button>\n                                                                                            </div>\n                                                                                            : null\n                                                                                        }\n                                                                                    </div>\n                                                                                    {this.state.showSwitchCategory &&\n                                                                                        <input\n                                                                                            type=\"checkbox\"\n                                                                                            className=\"checkbox\"\n                                                                                            checked={this.state.checkedBills[entryIndex]}\n                                                                                            onChange={(e) => this.toggleSelectEntry(entryIndex, e)}\n                                                                                        />\n                                                                                    }\n                                                                                </div>\n                                                                            }\n                                                                        </div>\n                                                                        <div>\n                                                                            {!entry.MinutesActivities || entry.MinutesActivities.length === 0 &&\n                                                                                <React.Fragment>\n                                                                                    <span>\n                                                                                        {entry.EntryText ? entry.EntryText : (\n                                                                                            this.props.formData.CategoryType === \"Chairmans Report\" && (\n                                                                                                entry.MinutesSummaries && entry.MinutesSummaries.find(ms => ms.CommitteeName) ?\n                                                                                                    <>From {entry.MinutesSummaries.find(ms => ms.CommitteeName).CommitteeName}: <em>No chair's reports included</em></>\n                                                                                                    :\n                                                                                                    <em>No chair's reports included</em>\n                                                                                            )\n                                                                                        )\n                                                                                        }\n                                                                                    </span>\n                                                                                    {this.props.formData.CategoryType === \"Chairmans Report\" && <React.Fragment><i data-tip={`You may choose to include or exclude one or more chair's reports from this committee using the checkboxes and then\\nregenerating the summary using the button that will appear at the top of the category upon interacting with a checkbox.`}\n                                                                                        className={`icon notification`} style={{ marginLeft: '5px' }} />\n                                                                                        <ReactTooltip key={new Date()} />\n                                                                                    </React.Fragment>}\n                                                                                </React.Fragment>\n                                                                            }\n                                                                            {entry.MinutesActivities && entry.MinutesActivities.filter(a => !a.DeletionDate).map((activity, activityIndex) =>\n                                                                                <span key={activityIndex}>\n                                                                                    {activityIndex !== 0 && ', '}{renderHTML(activity.Description)}{activity.VoteTally ? ' ' + activity.VoteTally : null}\n                                                                                </span>\n                                                                            )}\n                                                                        </div>\n                                                                    </div>\n                                                                    <div>\n                                                                        <div className=\"flex-row flex-vertical-center inline-list\">\n                                                                            <button disabled={this.props.disableChanges || this.props.categoryFormDisabled} onClick={() => this.toggleCommentBox(entryIndex)} type=\"button\" className=\"button-link\">{entry.MinutesSummaries && entry.MinutesSummaries.length > 0 ? \"Edit\" : \"Add\"} Comment</button>\n                                                                            {(entry.EntryText || (entry.MinutesActivities && entry.MinutesActivities.length !== 0)) &&\n                                                                                <React.Fragment>\n                                                                                    {!this.state.editing &&\n                                                                                        <button disabled={this.props.disableChanges || this.props.categoryFormDisabled} onClick={() => this.toggleEdit(entryIndex)} type=\"button\" className=\"button-link\">Edit Motions</button>\n                                                                                    }\n                                                                                    <button disabled={this.props.disableChanges || this.props.categoryFormDisabled} type=\"button\" onClick={() => this.props.toggleMoveEntry(true, this.props.currentActivitySequence - 1, entryIndex)} className=\"button\">Move</button>\n                                                                                </React.Fragment>\n                                                                            }\n                                                                        </div>\n                                                                    </div>\n                                                                </div>\n                                                            }\n                                                        </div>\n                                                        <hr className=\"faded-line\" />\n                                                        {/* Hide motion form unless it's reading of the journal if the category is order of business, or if its a chairmans report category */}\n                                                        {(this.props.formData.CalendarCategoryTypeID !== 132 || entry.MinutesActivities.find(x => x.Description === \"Reading of the Journal\")) && this.props.formData.CategoryType !== 'Chairmans Report' &&\n                                                            <div className=\"multi-row one-small-small no-margin\">\n                                                                <div>\n                                                                    <label>{entry.LegislationNumber ? entry.LegislationNumber + \" Motion\" : \"Motion\"}</label>\n                                                                    <Select\n                                                                        options={this.props.formData.CalendarCategoryTypeID !== 132 ? this.state.motionOptions : this.state.motionOptions.filter(x => x.CalendarActionID === 2011)}\n                                                                        value={this.state.selectedMotions[entryIndex]}\n                                                                        onChange={val => this.handleMotionChange(entryIndex, val)}\n                                                                        styles={selectStyle}\n                                                                        isClearable\n                                                                    />\n                                                                </div>\n                                                                <div>\n                                                                    <br />\n                                                                    <button type='button' disabled={!this.state.selectedMotions[entryIndex] || this.props.categoryFormDisabled} className='button' onClick={() => this.insertMotion(entryIndex)}>Add Motion</button>\n                                                                </div>\n                                                            </div>\n                                                        }\n                                                        {this.state.templateInputs[entryIndex] && this.state.templateInputs[entryIndex].length > 0 &&\n                                                            <div>\n                                                                <br />\n                                                                <div>\n                                                                    <div>\n                                                                        <span className='txt-greyed'>\n                                                                            {this.state.templateInputs[entryIndex].map((tInput, tIndex) =>\n                                                                                <React.Fragment key={tIndex}>\n                                                                                    {tInput.ReferenceText ? tInput.ReferenceText : `[${tInput.ActionReferenceType}]`}\n                                                                                </React.Fragment>\n                                                                            )}\n                                                                        </span>\n                                                                    </div>\n                                                                    <InputTypes\n                                                                        memberList={this.props.memberList}\n                                                                        committeeList={this.props.committeeList}\n                                                                        communicationList={this.props.communicationList}\n                                                                        handleChange={this.handleTemplateChange}\n                                                                        entryIndex={entryIndex}\n                                                                        activityIndex={0}\n                                                                        references={this.state.templateInputs[entryIndex] || []}\n                                                                        textList={this.state.textList.filter(text => entry.LegislationID === text.LegislationID ? true : false)}\n                                                                    />\n                                                                </div>\n                                                            </div>\n                                                        }\n                                                        {this.props.formData.CategoryType !== 'Chairmans Report' && <br />}\n                                                        {this.state.templateInputs[entryIndex] ?\n                                                            this.state.templateInputs[entryIndex].MinutesSummaries && this.state.templateInputs[entryIndex].MinutesSummaries.filter(ms => !ms.DeletionDate).map((summary, summaryIndex) =>\n                                                                <div style={{ padding: '5px 0px', fontSize: '0.8em' }}>\n                                                                    {renderHTML(summary.MinutesSummary)}\n                                                                </div>\n                                                            )\n                                                            : this.state.newEntries[entryIndex] ?\n                                                                !this.state.newEntries[entryIndex].DeletionDate && this.state.newEntries[entryIndex].MinutesSummaries && this.state.newEntries[entryIndex].MinutesSummaries.filter(ms => !ms.DeletionDate).map((summary, summaryIndex) =>\n                                                                    <div style={{ padding: '5px 0px', fontSize: '0.8em' }}>\n                                                                        {renderHTML(summary.MinutesSummary)}\n                                                                    </div>\n                                                                )\n                                                                : !entry.DeletionDate && entry.MinutesSummaries && entry.MinutesSummaries.filter(ms => !ms.DeletionDate).map((summary, summaryIndex) =>\n                                                                    <React.Fragment key={summaryIndex}>\n                                                                        {this.props.formData.CategoryType === 'Chairmans Report' ?\n                                                                            <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                                                                <div className=\"toggle-switch\" onClick={() => this.props.toggleChairsReport(this.props.currentActivitySequence - 1, entryIndex, summaryIndex)}>\n                                                                                    <input type=\"checkbox\" checked={summary.IsActive} />\n                                                                                    <span className=\"slider\"></span>\n                                                                                </div>\n                                                                                <label className=\"checkbox-label no-background\">{summary.MinutesDate && moment(summary.MinutesDate).format(\"M/D/yyyy\") + (summary.MinutesNumber ? ' (' + summary.MinutesNumber + ')' : '') + ':'} {renderHTML(summary.MinutesSummary)}</label>\n                                                                            </div>\n                                                                            :\n                                                                            <div style={{ padding: '5px 0px', fontSize: '0.8em' }}>\n                                                                                {renderHTML(summary.MinutesSummary)}\n                                                                            </div>\n                                                                        }\n                                                                        <hr className=\"faded-line\" />\n                                                                    </React.Fragment>\n                                                                )}\n                                                    </div>}\n                                            </Draggable>\n                                        )}\n                                        {provided.placeholder}\n                                    </div>\n                                }\n                            </Droppable>\n                        </DragDropContext>\n                    </div>\n                </div>\n            </div >\n        );\n    }\n}\n\nconst EditVoteTally = props => <textarea style={{ width: '25%' }} value={props.value} onChange={props.onChange} />\n\nexport default connect(\n    (state) => {\n        const { calendar, minutes, bills } = state;\n        return {\n            calendar,\n            minutes,\n            bills\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, calendarActionCreators, minutesActionCreators, billActionCreators), dispatch)\n        }\n    },\n    null,\n    {\n        forwardRef: true\n    }\n)(NonLegislativeForm)","import React from \"react\";\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { voteActionCreators } from '../../../../stores/lis-votes-store';\nimport Select from 'react-select'\nimport { calendarActionCreators } from \"../../../../stores/lis-calendar-store\";\nimport { billActionCreators } from \"../../../../stores/lis-legislation-store\";\nimport InputTypes from \"../input-types\";\nimport { LargeListSelect } from '../../../../lis-shared/lis-layout/components/lis-forms-component';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport CommentBox from './comment-box';\nimport { minutesActionCreators } from \"../../../../stores/lis-minutes-store\";\nimport { Link } from 'react-router-dom';\nimport moment from \"moment\";\n\nconst getItemStyle = (isDragging, draggableStyle, pendingDeletion) => ({\n    // some basic styles to make the items look a bit nicer\n    userSelect: 'none',\n    // change background colour if dragging\n    background: isDragging ? '#34495e' : 'white',\n    color: isDragging ? 'white' : '#34495e',\n    border: pendingDeletion ? 'red' : 'none',\n    // styles we need to apply on draggables\n    ...draggableStyle,\n});\n\nconst getListStyle = isDraggingOver => ({\n    background: isDraggingOver ? '#8b9fb3' : '#666666',\n    width: '100%',\n});\n\nclass LegislativeForm extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            selectedMotion: '',\n            insertEntry: [],\n            newEntries: [],\n            references: [],\n            nonLegislativeActionReferences: [],\n            fullEventList: [],\n            votesToBeSaved: [],\n            savingVotes: [],\n            togglingEdit: {},\n            templateInputs: [],\n            templatedEdited: false,\n            smallMotionForm: -1,\n            textList: [],\n            reconsiderationEvents: [],\n            showMenu: -1,\n            selectedBillNumber: [],\n            showCommentBox: false,\n            commentBoxContent: [],\n            showAuxBillForm: false,\n            auxBill: '',\n            savingAuxBill: false,\n            savingNonLegAction: false,\n            checkedBills: [],\n            editingActivityDescription: {},\n            otherBillEventOptions: [],\n            otherEvent: \"\",\n            otherEventSelected: false\n        };\n        this.closeNewEntries = this.closeNewEntries.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.insertMotion = this.insertMotion.bind(this);\n        this.removeMotion = this.removeMotion.bind(this);\n        this.unSelectOtherEvent = this.unSelectOtherEvent.bind(this);\n        this.handleOtherEventChange = this.handleOtherEventChange.bind(this);\n        this.getOtherBillEventOptions = this.getOtherBillEventOptions.bind(this);\n        this.filterBillEventReferences = this.filterBillEventReferences.bind(this);\n        this.handleBillChange = this.handleBillChange.bind(this);\n        this.handleMotionChange = this.handleMotionChange.bind(this);\n        this.handleSelectedMotionDescriptionChange = this.handleSelectedMotionDescriptionChange.bind(this);\n        this.handleTemplateChange = this.handleTemplateChange.bind(this);\n        this.onActivityDragEnd = this.onActivityDragEnd.bind(this);\n        this.onEntryDragEnd = this.onEntryDragEnd.bind(this);\n        this.removeActivity = this.removeActivity.bind(this);\n        this.addBackActivity = this.addBackActivity.bind(this);\n        this.addAllEntries = this.addAllEntries.bind(this);\n        this.getCatActionList = this.getCatActionList.bind(this);\n        this.getNonLegislativeActionList = this.getNonLegislativeActionList.bind(this);\n        this.getTextList = this.getTextList.bind(this);\n        this.toggleSmallMotionForm = this.toggleSmallMotionForm.bind(this);\n        this.toggleMenu = this.toggleMenu.bind(this);\n        this.addEntry = this.addEntry.bind(this);\n        this.handleBillNumberChange = this.handleBillNumberChange.bind(this);\n        this.applyLegislationToEntry = this.applyLegislationToEntry.bind(this);\n        this.handleCommentBoxChange = this.handleCommentBoxChange.bind(this);\n        this.toggleCommentBox = this.toggleCommentBox.bind(this);\n        this.saveComment = this.saveComment.bind(this);\n        this.toggleShowDeleted = this.toggleShowDeleted.bind(this);\n        this.toggleAuxBillAdd = this.toggleAuxBillAdd.bind(this);\n        this.setAuxBill = this.setAuxBill.bind(this);\n        this.addAuxBill = this.addAuxBill.bind(this);\n        this.toggleSwitchCategory = this.toggleSwitchCategory.bind(this);\n        this.handleSwitchCategoryChange = this.handleSwitchCategoryChange.bind(this);\n        this.switchCategory = this.switchCategory.bind(this);\n        this.toggleSelectEntry = this.toggleSelectEntry.bind(this);\n        this.getReconsiderationEvents = this.getReconsiderationEvents.bind(this);\n        this.toggleEditActivityDescription = this.toggleEditActivityDescription.bind(this);\n        this.unSelectOtherEventEdit = this.unSelectOtherEventEdit.bind(this);\n        this.handleOtherActivityDescriptionChange = this.handleOtherActivityDescriptionChange.bind(this);\n\n        this.menuBoxRef = React.createRef();\n        this.motionRef = React.createRef();\n        this.motionDropdownRef = React.createRef();\n    }\n\n    closeNewEntries() {\n        this.setState({\n            newEntries: [],\n            smallMotionForm: -1\n        });\n    }\n\n    saveChange(entryIndex) {\n        let entry = this.state.newEntries[entryIndex];\n        //If this entry has a vote id then the vote description needs to be saved. So put a button on the form for the user to be able to do that\n        if (entry.MinutesActivities && entry.MinutesActivities.find(activity => activity.VoteID)) {\n            let votesToBeSaved = this.state.votesToBeSaved;\n            votesToBeSaved[entryIndex] = true;\n            this.setState({\n                votesToBeSaved: votesToBeSaved\n            });\n        }\n\n        let activitiesToBeSaved = [];\n\n        //Overwrite any activities with their new OtherEvent if present\n        entry.MinutesActivities.forEach((activity, activityIndex) => {\n            if (activity.OtherEvent) {\n                activity.DeletionDate = moment();\n\n                let otherEvent = { ...activity.OtherEvent }\n                otherEvent.MinutesEntryID = entry.MinutesEntryID;\n                otherEvent.InPreview = true;\n                otherEvent.IsPublic = false;\n                otherEvent.IsPassed = true;\n\n                activitiesToBeSaved.push(activity);\n                activitiesToBeSaved.push(otherEvent);\n            } else {\n                activitiesToBeSaved.push(activity)\n            }\n        })\n\n        entry.MinutesActivities = activitiesToBeSaved;\n\n        //save any changes to vote tallies\n        let promises = [];\n        entry.MinutesActivities.forEach((activity, activityIndex) => {\n            if (activity.VoteTally !== undefined && !activity.ActivityReferences.find(ar => ar.ActionReferenceType !== \"Text\")) {\n                promises.push(new Promise(res => {\n                    this.handleActivityDescriptionChange(null, \"VoteTally\", entryIndex, activityIndex, true);\n                    res();\n                }))\n            }\n        })\n        Promise.all(promises).then(() => {\n            //Send the index of the minute entry, the entire minute entries object (so we don't have to save the entire book),\n            //the value of the text input, and the sequence to show which category to update\n            this.props.onEntryChange(entryIndex, entry, this.props.currentActivitySequence);\n            this.props.handleSaveEntry(entry);\n            //Turn it back into a span\n            let newEntries = [...this.state.newEntries];\n            newEntries[entryIndex] = null;\n            let editingActivityDescription = { ...this.state.editingActivityDescription };\n            editingActivityDescription[entryIndex] = {};\n            this.setState({\n                newEntries: newEntries,\n                editingActivityDescription\n            });\n        });\n    }\n\n    handleChange(entryIndex, activityIndex, referenceIndex, reference, _, newMotion) {\n        //Update the input with new text. Save change to this components state so it doesn't update the parent just yet (in case the user clicks the X)\n        let entries = this.state.newEntries;\n        //activities are reversed in display, so reverse here in order to get the indexes aligned\n        let reversedActivities = entries[entryIndex].MinutesActivities.reverse();\n        let activity = reversedActivities[activityIndex];\n\n        if (newMotion && newMotion.value !== \"Other\") {\n            let engrossingActions = [\"S4600\", \"S4601\", \"S4602\", \"S4603\", \"S4604\", \"S4605\", \"S4606\"];\n\n            //Engrossing actions only ever need to say \"Engrossed\" instead of \"Engrossed by Senate\", etc.\n            activity.Description = engrossingActions.includes(newMotion.EventCode)\n                ? newMotion.ActionReferences[0].ReferenceText\n                : newMotion.Description || newMotion.CalendarDescription\n\n            activity.ActivityReferences = newMotion.ActionReferences;\n            activity.EventCode = newMotion.EventCode;\n            activity.CalendarActionID = newMotion.CalendarActionID;\n            activity.CalendarCategoryTypeID = newMotion.CalendarCategoryTypeID;\n\n            if (!activity.ActivityReferences?.length) {\n                const textType = this.props.actionTypes.find(type => type.ActionReferenceType === 'Text');\n                if (textType) {\n                    //Sometimes ActivityReferences is undefined. Make a blank one so the push does not fail\n                    activity.ActivityReferences = [];\n                    activity.ActivityReferences.push({\n                        ActionReferenceTypeID: textType.ActionReferenceTypeID,\n                        ActionReferenceType: textType.ActionReferenceType,\n                        ReferenceText: activity.Description\n                    });\n                }\n            }\n        } else if (newMotion && newMotion.value === \"Other\") {\n            if (this.state.otherBillEventOptions.length === 0) {\n                this.getOtherBillEventOptions();\n            }\n\n            activity.OtherMotionSelected = !activity.OtherMotionSelected ? true : false;\n\n            reversedActivities[activityIndex] = { ...activity };\n            const unreversedActivities = reversedActivities.reverse();\n            entries[entryIndex].MinutesActivities = unreversedActivities;\n\n            this.setState({\n                newEntries: entries\n            });\n\n            return;\n        } else {\n            activity.ActivityReferences[referenceIndex] = reference;\n            const memberListEvents = [\"H6013\", \"S6013\", \"H6113\", \"S6113\", \"H6213\", \"S6213\"];\n            activity.Description = activity.ActivityReferences.map((tInput, i) => {\n                //For events H6013/S6013/H6113/S6113/H6213/S6213 there are sometimes incomplete lists of members. This will prevent the UI from adding blank member dropdown values to the description\n                if (memberListEvents.includes(activity.EventCode) && !tInput.ReferenceText) {\n                    return;\n                }\n\n                if (!tInput.ReferenceText && !activity.ReconsiderationGrammar) {\n                    return `${tInput.ActionReferenceType}`\n                }\n                return activity.ActivityReferences.find(x => x.ActionReferenceType === \"LegislationEvent\") ? this.state.fullEventList.find(e => e.EventCode === activity.ActivityReferences?.find(x => x.ActionReferenceType === \"LegislationEvent\")?.EventCode && e.IsPassed === activity.ActivityReferences?.find(x => x.ActionReferenceType === \"LegislationEvent\")?.IsPassed)?.ReconsiderationDescription : tInput.ReferenceText + (memberListEvents.includes(activity.EventCode) && tInput.ActionReferenceType === \"Member\" && tInput.ReferenceText && activity.ActivityReferences[i + 1] && activity.ActivityReferences[i + 1].ActionReferenceType === \"Member\" && activity.ActivityReferences[i + 1].ReferenceText ? \", \" : \"\")\n            }).join('');\n        }\n        activity.IsPublic = false;\n        //reverse back to original\n        const unreversedActivities = reversedActivities.reverse();\n        entries[entryIndex].MinutesActivities = unreversedActivities;\n\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    handleOtherChange(entryIndex, activityIndex, referenceIndex, reference, _, newMotion) {\n        //Update the input with new text. Save change to this components state so it doesn't update the parent just yet (in case the user clicks the X)\n        let entries = this.state.newEntries;\n        //activities are reversed in display, so reverse here in order to get the indexes aligned\n        let reversedActivities = entries[entryIndex].MinutesActivities.reverse();\n        let activity = reversedActivities[activityIndex];\n        activity.OtherEvent = {};\n\n        if (newMotion) {\n            let engrossingActions = [\"S4600\", \"S4601\", \"S4602\", \"S4603\", \"S4604\", \"S4605\", \"S4606\"];\n\n            //Engrossing actions only ever need to say \"Engrossed\" instead of \"Engrossed by Senate\", etc.\n            activity.OtherEvent.Description = engrossingActions.includes(newMotion.EventCode)\n                ? newMotion.ActionReferences[0].ReferenceText\n                : newMotion.Description || newMotion.CalendarDescription\n\n            activity.OtherEvent.ActivityReferences = newMotion.ActionReferences;\n            activity.OtherEvent.EventCode = newMotion.EventCode;\n            activity.OtherEvent.CalendarActionID = newMotion.CalendarActionID;\n            activity.OtherEvent.CalendarCategoryTypeID = newMotion.CalendarCategoryTypeID;\n\n            if (!activity.OtherEvent.ActivityReferences?.length) {\n                const textType = this.props.actionTypes.find(type => type.ActionReferenceType === 'Text');\n                if (textType) {\n                    //Sometimes ActivityReferences is undefined. Make a blank one so the push does not fail\n                    activity.OtherEvent.ActivityReferences = [];\n                    activity.OtherEvent.ActivityReferences.push({\n                        ActionReferenceTypeID: textType.ActionReferenceTypeID,\n                        ActionReferenceType: textType.ActionReferenceType,\n                        ReferenceText: activity.OtherEvent.Description\n                    });\n                }\n            }\n        } else {\n            activity.OtherEvent.ActivityReferences[referenceIndex] = reference;\n            const memberListEvents = [\"H6013\", \"S6013\", \"H6113\", \"S6113\", \"H6213\", \"S6213\"];\n            activity.OtherEvent.Description = activity.OtherEvent.ActivityReferences.map((tInput, i) => {\n                //For events H6013/S6013/H6113/S6113/H6213/S6213 there are sometimes incomplete lists of members. This will prevent the UI from adding blank member dropdown values to the description\n                if (memberListEvents.includes(activity.OtherEvent.EventCode) && !tInput.ReferenceText) {\n                    return;\n                }\n\n                if (!tInput.ReferenceText && !activity.OtherEvent.ReconsiderationGrammar) {\n                    return `${tInput.ActionReferenceType}`\n                }\n                return activity.OtherEvent.ActivityReferences.find(x => x.ActionReferenceType === \"LegislationEvent\") ? this.state.fullEventList.find(e => e.EventCode === activity.OtherEvent.ActivityReferences?.find(x => x.ActionReferenceType === \"LegislationEvent\")?.EventCode && e.IsPassed === activity.OtherEvent.ActivityReferences?.find(x => x.ActionReferenceType === \"LegislationEvent\")?.IsPassed)?.ReconsiderationDescription : tInput.ReferenceText + (memberListEvents.includes(activity.OtherEvent.EventCode) && tInput.ActionReferenceType === \"Member\" && tInput.ReferenceText && activity.OtherEvent.ActivityReferences[i + 1] && activity.OtherEvent.ActivityReferences[i + 1].ActionReferenceType === \"Member\" && activity.OtherEvent.ActivityReferences[i + 1].ReferenceText ? \", \" : \"\")\n            }).join('');\n        }\n        activity.OtherEvent.IsPublic = false;\n        reversedActivities[activityIndex] = { ...activity };\n        //reverse back to original\n        const unreversedActivities = reversedActivities.reverse();\n        entries[entryIndex].MinutesActivities = unreversedActivities;\n\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    toggleOOB(entryIndex) {\n        // IsOOB key is used to tell whether a piece of legislation is out of block\n        let entry = this.props.formData.MinutesEntries[entryIndex];\n        entry.IsOOB = !entry.IsOOB;\n        this.props.onEntryChange(entryIndex, entry, this.props.currentActivitySequence);\n        this.props.handleSaveEntry(entry);\n        this.setState({\n            showMenu: -1\n        });\n    }\n\n    toggleSwitchCategory(entryIndex) {\n        this.setState({\n            showSwitchCategory: !this.state.showSwitchCategory\n        }, () => {\n            if (this.state.showSwitchCategory) {\n                const dropdownOptions = this.props.categories.filter(c => c.CalendarCategoryTypeID === this.props.formData.CalendarCategoryTypeID && c.MinutesCategoryID !== this.props.formData.MinutesCategoryID);\n                if (dropdownOptions.length === 1) {\n                    this.handleSwitchCategoryChange(dropdownOptions[0]);\n                }\n                this.toggleSelectEntry(entryIndex);\n                this.toggleMenu(-1);\n            } else {\n                this.setState({ checkedBills: [] })\n                this.handleSwitchCategoryChange(null);\n            }\n        });\n    }\n\n    handleSwitchCategoryChange(val) {\n        this.setState({\n            selectedSwitchCategory: val\n        });\n    }\n\n    switchCategory() {\n        if (this.state.checkedBills.length && this.state.selectedSwitchCategory) {\n            this.setState({ switchingCategories: true }, () => {\n                const origSequence = this.props.currentActivitySequence;\n                let entries = [...this.props.formData.MinutesEntries].filter((e, i) => this.state.checkedBills[i]);\n                this.props.bulkMoveEntry(entries, origSequence - 1, this.state.selectedSwitchCategory.MinutesCategoryID);\n                this.setState({ checkedBills: [], showSwitchCategory: false, selectedSwitchCategory: null, switchingCategories: false })\n            })\n        }\n    }\n\n    toggleSelectEntry(billIndex, e) {\n        let checkedBills = [...this.state.checkedBills];\n        let lastCheckedBill = this.state.lastCheckedBill;\n        if (e && e.nativeEvent.shiftKey && this.state.lastCheckedBill !== -1) {\n            checkedBills = checkedBills.fill(false);\n            for (let i = 0; i < Math.abs(billIndex - this.state.lastCheckedBill); i++) {\n                const index = this.state.lastCheckedBill + i * (billIndex - this.state.lastCheckedBill) / Math.abs(billIndex - this.state.lastCheckedBill);\n                checkedBills[index] = true;\n            }\n        } else {\n            lastCheckedBill = !checkedBills[billIndex] ? billIndex : this.state.lastCheckedBill;\n        }\n        checkedBills[billIndex] = !checkedBills[billIndex]\n        this.setState({\n            checkedBills: checkedBills,\n            lastCheckedBill: lastCheckedBill\n        });\n    }\n\n    getOtherBillEventOptions() {\n        this.props.actions.getBillEvents(\"\").then(() => {\n            let billEventReferences = [...this.props.bills.billEvents];\n            billEventReferences.forEach(ref => {\n                ref.label = ref.LegislationDescription || ref.CalendarDescription;\n                ref.value = `${ref.EventCode}-${ref.IsPassed}`\n            });\n            billEventReferences = this.filterBillEventReferences(billEventReferences);\n            this.setState({\n                otherBillEventOptions: [...billEventReferences.filter(x => {\n                    return x.EventCode[0] !== \"H\"\n                })]\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    unSelectOtherEvent() {\n        this.setState({\n            otherEventSelected: false,\n            templateInputs: [],\n            otherEvent: \"\"\n        })\n    }\n\n    unSelectOtherEventEdit(entryIndex, activityIndex) {\n        let newEntries = [...this.state.newEntries];\n        newEntries[entryIndex].MinutesActivities[activityIndex].OtherMotionSelected = false;\n        delete newEntries[entryIndex].MinutesActivities[activityIndex].OtherEvent;\n\n        this.setState({\n            newEntries: newEntries\n        })\n    }\n\n    handleOtherEventChange(value) {\n        let templateInputs = [];\n        if (value.ActionReferences && value.ActionReferences.length > 0) {\n            templateInputs = JSON.parse(JSON.stringify(value.ActionReferences));\n        }\n        this.setState({\n            otherEvent: value,\n            templateInputs: templateInputs,\n            templateEdited: false\n        });\n    }\n\n    filterBillEventReferences(billEventReferences) {\n        return billEventReferences.filter((value, index, self) =>\n            index === self.findIndex((t) => (\n                t.EventCode === value.EventCode && JSON.stringify(t.ActionReferences) === JSON.stringify(value.ActionReferences) && t.IsPassed === value.IsPassed\n            ))\n        )\n    }\n\n    handleBillChange(value) {\n        //Set the dropdown's value\n        value = value || []\n        this.setState({\n            insertEntry: value\n        }, () => {\n            if (this.motionRef?.current)\n                this.motionRef.current.focus();\n        });\n        if (value.length === 0) {\n            this.setState({\n                selectedMotion: '',\n                templateInputs: [],\n                templatedEdited: false\n            })\n        }\n    }\n\n    handleMotionChange(value) {\n        if (value && value.value !== \"Other\") {\n            this.setState({\n                selectedMotion: value,\n                templateInputs: value ? JSON.parse(JSON.stringify(value.ActionReferences)) : [],\n                templatedEdited: false\n            }, () => {\n                //If the user has selected an event with at least one ActionReferenceType of LegislationEvent then fetch possible events for reconsideration\n                if (this.state.selectedMotion?.ActionReferences && this.state.selectedMotion?.ActionReferences?.find(x => x.ActionReferenceType === \"LegislationEvent\")) {\n                    this.state.insertEntry.forEach(bill => {\n                        this.getReconsiderationEvents(this.state.selectedMotion.EventCode, bill);\n                    })\n                }\n            });\n        } else {\n            this.setState({\n                selectedMotion: value,\n                otherEventSelected: value ? true : false\n            })\n            if (this.state.otherBillEventOptions.length === 0) {\n                this.getOtherBillEventOptions();\n            }\n        }\n    }\n\n    handleSelectedMotionDescriptionChange(e) {\n        let selectedMotion = { ...this.state.selectedMotion };\n        selectedMotion.Description = e.target.value;\n        this.setState({\n            selectedMotion\n        });\n    }\n\n    insertMotion(openMotionEditor) {\n        //A new motion wants to be added so take all this data and send it to the parent div to be added to the state\n        const { insertEntry, templateInputs, templatedEdited } = this.state;\n        let selectedMotion = !this.state.otherEventSelected ? { ... this.state.selectedMotion } : { ... this.state.otherEvent };\n        let entries = [...this.props.formData.MinutesEntries];\n\n        insertEntry.forEach(bill => {\n            //Force all non legislative actions into their own entry by always setting the index to -1\n            let index = bill.label && bill.label === \"No Legislation\" ? -1 : entries.findIndex(entry => entry.MinutesEntryID === bill.MinutesEntryID);\n            let isNewEntry = false;\n            if (index === -1 && bill.label && bill.label === 'No Legislation') {\n                isNewEntry = true;\n                let minutesEntry = {\n                    IsPublic: false,\n                    MinutesActivities: [],\n                    MinutesCategoryID: this.props.formData.MinutesCategoryID,\n                    Sequence: entries.length ? Math.max(...entries.map(e => e.Sequence || 0)) + 1 : 1,\n                }\n                entries.push(minutesEntry);\n                index = entries.length - 1;\n            }\n            if (index !== -1) {\n                let entry = entries[index];\n                //If it is a null then create a new one so the push doesn't fail\n                if (!entry.MinutesActivities) {\n                    entry.MinutesActivities = [];\n                }\n                let desc = selectedMotion.Description || selectedMotion.CalendarDescription;\n                //If the user has changed the value of the action references then use those for the description instead of the existing one.\n                let activityRefs = [];\n                if (templatedEdited || (templateInputs.length && !templateInputs.find(tInput => ![\"Text\", \"HTML\"].includes(tInput.ActionReferenceType)))) {\n                    desc = '';\n                    const memberListEvents = [\"H6013\", \"S6013\", \"H6113\", \"S6113\", \"H6213\", \"S6213\"];\n                    templateInputs.forEach((tInput, actIndex) => {\n                        if (memberListEvents.includes(selectedMotion.EventCode) && !tInput.ReferenceText) {\n                            return;\n                        }\n                        if (!tInput.ReferenceText && !selectedMotion.ReconsiderationGrammar) {\n                            return `${tInput.ActionReferenceType}`\n                        }\n                        desc += templateInputs.find(x => x.ActionReferenceType === \"LegislationEvent\") ? this.state.fullEventList.find(e => e.EventCode === templateInputs.find(x => x.ActionReferenceType === \"LegislationEvent\")?.EventCode && e.IsPassed === templateInputs.find(x => x.ActionReferenceType === \"LegislationEvent\")?.IsPassed)?.ReconsiderationDescription : tInput.ReferenceText + (memberListEvents.includes(selectedMotion.EventCode) && tInput.ActionReferenceType === \"Member\" && tInput.ReferenceText && templateInputs[actIndex + 1] && templateInputs[actIndex + 1].ActionReferenceType === \"Member\" && templateInputs[actIndex + 1].ReferenceText ? \", \" : \"\");\n                        activityRefs[actIndex] = {\n                            ActionReferenceTypeID: tInput.ActionReferenceTypeID,\n                            ActionReferenceType: tInput.ActionReferenceType,\n                            Sequence: tInput.Sequence,\n                            ReferenceText: tInput.ReferenceText,\n                            ReferenceID: tInput.ReferenceID\n                        }\n                    });\n\n                } else {\n                    const textType = this.props.actionTypes.find(type => type.ActionReferenceType === 'Text');\n                    if (textType) {\n                        activityRefs = [{\n                            ActionReferenceTypeID: textType.ActionReferenceTypeID,\n                            ActionReferenceType: textType.ActionReferenceType,\n                            ReferenceText: selectedMotion.Description || selectedMotion.CalendarDescription\n                        }];\n                    }\n                }\n\n                let newActivity = Object.assign(selectedMotion, {\n                    ActivityReferences: activityRefs,\n                    Description: desc,\n                    Sequence: entry.MinutesActivities.length ? Math.max(...entry.MinutesActivities.map(m => m.Sequence || 0)) + 1 : 1\n                })\n\n                //Some [REDACTED] problem where we couldn't set the new activity MinutesEntryID to the parent entry's MinutesEntryID unless we mapped the object a second time\n                let theNewActivity = { ...newActivity };\n                theNewActivity.MinutesEntryID = entry ? entry.MinutesEntryID : entries[index].MinutesEntryID\n\n                entry.MinutesActivities.push(theNewActivity);\n\n                if (isNewEntry) {\n                    //now that this entry is actually going to be in the saved object, remove the temp obj, otherwise it will duplicate (in the UI only, but still not what we want)\n                    entries.splice(index, 1);\n                } else { //if it's not a new entry, call the onEntryChange prop\n                    this.props.onEntryChange(index, entry, this.props.currentActivitySequence);\n                }\n\n                this.props.handleSaveEntry(entry, () => {\n                    if (openMotionEditor === true) {\n                        this.toggleEdit(index)\n                    }\n                });\n            }\n        });\n        this.setState({\n            insertEntry: [],\n            selectedMotion: '',\n            smallMotionForm: -1,\n            showMenu: -1,\n            showSwitchCategory: false,\n            selectedSwitchCategory: null,\n            templateInputs: [],\n            otherEvent: '',\n            otherEventSelected: false\n        });\n    }\n\n    removeMotion(e) {\n        e.preventDefault();\n        //A motion wants to be removed so check each minute entry and remove the motion if it has it\n        const { insertEntry, selectedMotion } = this.state;\n        const entries = this.props.formData.MinutesEntries;\n        insertEntry.forEach(bill => {\n            let needToSave = false;\n            const index = entries.findIndex(entry => entry.MinutesEntryID === bill.MinutesEntryID);\n            if (index !== -1) {\n                let entry = JSON.parse(JSON.stringify(entries[index]));\n                if (!entry.MinutesActivities) {\n                    return;\n                }\n                entry.MinutesActivities.forEach(activity => {\n                    if (selectedMotion.CalendarActionID === activity.CalendarActionID && !activity.DeletionDate) {\n                        activity.DeletionDate = new Date();\n                        needToSave = true;\n                    }\n                });\n                if (needToSave) {\n                    //User cannot remove an entry's activity while they are editing that entry\n                    if (this.state.newEntries[index]) {\n                        let newEntries = [...this.state.newEntries];\n                        newEntries[index] = null;\n                        this.setState({\n                            newEntries: newEntries\n                        });\n                    }\n                    this.props.onEntryChange(index, entry, this.props.currentActivitySequence);\n                    this.props.handleSaveEntry(entry);\n                }\n            }\n        });\n        this.setState({\n            insertEntry: [],\n            selectedMotion: '',\n            templateInputs: [],\n            templatedEdited: false,\n        });\n    }\n\n    toggleEdit(index) {\n        let togglingEdit = { ...this.state.togglingEdit };\n        togglingEdit[index] = true;\n        this.setState({ togglingEdit }, () => {\n            let newEntries = [...this.state.newEntries];\n            let init = [];\n            let promises = [];\n            if (this.state.newEntries[index]) {\n                newEntries[index] = null;\n            } else {\n                if (this.state.newEntries.length === 0) {\n                    newEntries.length = this.props.formData.MinutesEntries.length;\n                }\n                //If the user has multiple edit entries open clicking the X on one doesn't kill the changes to another\n                newEntries[index] = JSON.parse(JSON.stringify(this.props.formData.MinutesEntries[index]));\n\n                //Test to see if the activities have zero activity references. If they have zero then add a blank text one\n                const references = newEntries[index].LegislationNumber ? [...this.state.references] : [...this.state.nonLegislativeActionReferences]\n                newEntries[index].MinutesActivities.forEach(act => {\n                    if (act.EventCode) {\n                        const eventReference = references.find(evt => evt.EventCode === act.EventCode && evt.IsPassed === act.IsPassed);\n                        if (eventReference) {\n                            const actionReferences = eventReference.ActionReferences;\n                            if (actionReferences) {\n                                const missingActivitiyReferences = actionReferences.filter(ref => !act.ActivityReferences || !act.ActivityReferences.map(existingActivities => existingActivities.ActionReferenceType).includes(ref.ActionReferenceType));\n                                if (missingActivitiyReferences.length) {\n                                    act.ActivityReferences = act.ActivityReferences ? act.ActivityReferences.concat(JSON.parse(JSON.stringify(missingActivitiyReferences))) : JSON.parse(JSON.stringify(missingActivitiyReferences));\n                                }\n                            }\n                        }\n                    }\n\n                    if (!act.ActivityReferences || act.ActivityReferences.length === 0) {\n                        const textType = this.props.actionTypes.find(type => type.ActionReferenceType === 'Text');\n                        if (textType) {\n                            //Sometimes ActivityReferences is undefined. Make a blank one so the push does not fail\n                            act.ActivityReferences = [];\n                            act.ActivityReferences.push({\n                                ActionReferenceTypeID: textType.ActionReferenceTypeID,\n                                ActionReferenceType: textType.ActionReferenceType,\n                                ReferenceText: act.Description\n                            });\n                        }\n                    }\n\n                    //If the user has selected an event with at least one ActionReferenceType of LegislationEvent then fetch possible events for reconsideration\n                    const eventReferenceIndex = act.ActivityReferences?.findIndex(x => x.ActionReferenceType === \"LegislationEvent\");\n                    if (eventReferenceIndex > -1) {\n                        promises.push(\n                            new Promise(res => {\n                                this.getReconsiderationEvents(act.EventCode, newEntries[index], (reconsiderationEvents) => {\n                                    if (act.ActivityReferences[eventReferenceIndex].ReferenceID) {\n                                        act.ActivityReferences[eventReferenceIndex].EventCode = act.ActivityReferences[eventReferenceIndex].EventCode || reconsiderationEvents.find(e => e.LegislationEventID === act.ActivityReferences[eventReferenceIndex].ReferenceID)?.EventCode;\n                                        act.ActivityReferences[eventReferenceIndex].IsPassed = act.ActivityReferences[eventReferenceIndex].IsPassed || reconsiderationEvents.find(e => e.LegislationEventID === act.ActivityReferences[eventReferenceIndex].ReferenceID)?.IsPassed;\n                                    }\n                                    res();\n                                })\n                            }));\n                    }\n                });\n            }\n            Promise.all(promises).then(() => {\n                togglingEdit[index] = false;\n                let editingActivityDescription = { ...this.state.editingActivityDescription };\n                editingActivityDescription[index] = {};\n                this.setState({\n                    newEntries: newEntries,\n                    togglingEdit,\n                    editingActivityDescription\n                }, () => {\n                    if (this.state.newEntries[index]) {\n                        newEntries[index].MinutesActivities.forEach((activity, activityIndex) => {\n                            if (activity.VoteTally !== undefined)\n                                this.handleActivityDescriptionChange(null, \"VoteTally\", index, activityIndex)\n                        })\n                    }\n                });\n            });\n        });\n    }\n\n    getReconsiderationEvents(params, bill, cb) {\n        params = '?ReconsiderationAction=' + params + '&LegislationID=' + bill.LegislationID;\n\n        this.props.actions.getLegislationEventsByLegislationId(params)\n            .then(() => {\n                this.setState({\n                    reconsiderationEvents: this.props.bills.legislationEventsById\n                }, () => {\n                    if (cb) cb([...this.state.reconsiderationEvents]);\n                });\n            })\n    }\n\n    toggleEditActivityDescription(entryIndex, activityIndex) {\n        let editingActivityDescription = { ...this.state.editingActivityDescription };\n        if (!editingActivityDescription[entryIndex]) {\n            editingActivityDescription[entryIndex] = {};\n        }\n        editingActivityDescription[entryIndex][activityIndex] = !editingActivityDescription[entryIndex][activityIndex];\n        this.setState({ editingActivityDescription }, () => {\n            this.handleActivityDescriptionChange(null, \"Description\", entryIndex, activityIndex)\n            this.handleActivityDescriptionChange(null, \"VoteTally\", entryIndex, activityIndex)\n        });\n    }\n\n    handleActivityDescriptionChange(value, attr, entryIndex, activityIndex, save) {\n        //Update the input with new text. Save change to this components state so it doesn't update the parent just yet (in case the user clicks the X)\n        let entries = this.state.newEntries;\n        //activities are reversed in display, so reverse here in order to get the indexes aligned\n        let reversedActivities = entries[entryIndex].MinutesActivities.reverse();\n        let activity = reversedActivities[activityIndex];\n\n        if (save) {\n            activity.Description = activity.tempDescription ?? activity.Description;\n            activity.VoteTally = activity.tempVoteTally ?? activity.VoteTally;\n        } else {\n            activity['temp' + attr] = value ?? activity[attr];\n        }\n\n        //reverse back to original\n        let unreversedActivities = reversedActivities.reverse();\n        entries[entryIndex].MinutesActivities = unreversedActivities;\n\n        this.setState({ entries }, () => {\n            if (save) this.toggleEditActivityDescription(entryIndex, activityIndex);\n        });\n    }\n\n    handleOtherActivityDescriptionChange(value, attr, entryIndex, activityIndex, save) {\n        //Update the input with new text. Save change to this components state so it doesn't update the parent just yet (in case the user clicks the X)\n        let entries = this.state.newEntries;\n        //activities are reversed in display, so reverse here in order to get the indexes aligned\n        let reversedActivities = entries[entryIndex].MinutesActivities.reverse();\n        let activity = reversedActivities[activityIndex].OtherEvent;\n\n        if (save) {\n            activity.Description = activity.tempDescription ?? activity.Description;\n            activity.VoteTally = activity.tempVoteTally ?? activity.VoteTally;\n        } else {\n            activity['temp' + attr] = value ?? activity[attr];\n        }\n\n        //reverse back to original\n        let unreversedActivities = reversedActivities.reverse();\n        entries[entryIndex].MinutesActivities = unreversedActivities;\n\n        this.setState({ entries }, () => {\n            if (save) this.toggleEditActivityDescription(entryIndex, activityIndex);\n        });\n    }\n\n    onActivityDragEnd(result, entryIndex) {\n        if (!result.destination) {\n            return;\n        }\n        if (result.destination.index === result.source.index) {\n            return;\n        }\n        let entries = [...this.state.newEntries];\n        //activities are reversed in display, so reverse here in order to get the indexes aligned\n        let reversedActivities = entries[entryIndex].MinutesActivities.reverse();\n        const [removed] = reversedActivities.splice(result.source.index, 1);\n        reversedActivities.splice(result.destination.index, 0, removed);\n        //reverse back to original\n        let unreversedActivities = reversedActivities.reverse();\n        unreversedActivities.forEach((element, index) => {\n            element.Sequence = index + 1\n        });\n        entries[entryIndex].MinutesActivities = unreversedActivities;\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    onEntryDragEnd(result) {\n        if (!result.destination) {\n            return;\n        }\n        if (result.destination.index === result.source.index) {\n            return;\n        }\n        let entries = [...this.props.formData.MinutesEntries];\n        const [removed] = entries.splice(result.source.index, 1);\n        entries.splice(result.destination.index, 0, removed);\n        entries.forEach((element, index) => {\n            element.Sequence = index + 1;\n        });\n        this.props.onMultipleEntryChange(entries, this.props.currentActivitySequence);\n        this.props.handleSaveEntry(entries);\n        // \n        this.setState({\n            newEntries: []\n        })\n    }\n\n    removeActivity(entryIndex, activityIndex) {\n        let entries = [...this.state.newEntries];\n        //activities are reversed in display, so reverse here in order to get the indexes aligned\n        let reversedActivities = entries[entryIndex].MinutesActivities.reverse()\n        reversedActivities[activityIndex].DeletionDate = new Date();\n        //reverse back to original\n        const unreversedActivities = reversedActivities.reverse();\n        entries[entryIndex].MinutesActivities = unreversedActivities;\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    addBackActivity(entryIndex, activityIndex) {\n        let entries = [...this.state.newEntries];\n        //activities are reversed in display, so reverse here in order to get the indexes aligned\n        let reversedActivities = entries[entryIndex].MinutesActivities.reverse()\n        reversedActivities[activityIndex].DeletionDate = null;\n        reversedActivities[activityIndex].IsPublic = false;\n        //reverse back to original\n        const unreversedActivities = reversedActivities.reverse();\n        entries[entryIndex].MinutesActivities = unreversedActivities;\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    addAllEntries(isOOB) {\n        const entries = this.props.formData.MinutesEntries;\n        // Filter out the ones that are already added so they aren't added twice\n        let insertEntry = this.state.insertEntry.filter(entry => Boolean(entry.IsOOB) !== isOOB);\n        let newInserEntries = insertEntry.concat(entries.filter(entry => Boolean(entry.IsOOB) === isOOB));\n        this.setState({\n            insertEntry: newInserEntries\n        });\n    }\n\n    handleTemplateChange(_entryIndex, _activityIndex, referenceIndex, reference) {\n        let templateInputs = [...this.state.templateInputs];\n        templateInputs[referenceIndex] = reference;\n        //Used when adding the motion to know whether to use the existing description or concatenate together the action reference values\n        //If they have change a value it is save to say they want the the description to be the action references stringed together\n        if (!this.state.templatedEdited) {\n            this.setState({\n                templatedEdited: true\n            });\n        }\n        this.setState({\n            templateInputs: templateInputs\n        });\n    }\n\n    componentDidUpdate(prevProps) {\n        if (prevProps.currentActivitySequence !== this.props.currentActivitySequence) {\n            this.setState({\n                insertEntry: [],\n                newEntries: [],\n                selectedMotion: '',\n                votesToBeSaved: [],\n                savingVotes: [],\n                togglingEdit: {},\n                templateInputs: [],\n                templatedEdited: false,\n                smallMotionForm: -1,\n                showMenu: -1,\n                showSwitchCategory: false,\n                selectedSwitchCategory: null,\n                textList: [],\n                checkedBills: []\n            });\n            this.getCatActionList();\n            this.getTextList();\n        } else if (prevProps.formData.MinutesEntries !== this.props.formData.MinutesEntries) {\n            let newEntries = [...this.state.newEntries];\n            this.props.formData.MinutesEntries.forEach((entry, entryIndex) => {\n                if (newEntries[entryIndex] && entry !== newEntries[entryIndex]) {\n                    newEntries[entryIndex] = entry;\n                }\n            });\n            this.setState({\n                newEntries: newEntries\n            });\n        }\n    }\n\n    componentDidMount() {\n        this.getCatActionList();\n        this.getNonLegislativeActionList();\n        this.getTextList();\n    }\n\n    getCatActionList() {\n        //Get the calendar action reference data\n        const catId = this.props.formData.CalendarCategoryTypeID;\n        const referenceParams = `?calendarCategoryTypeID=${catId}&chamberCode=S`;\n        this.props.actions.getReferences(referenceParams)\n            .then(() => {\n                let references = this.props.calendar.references;\n                references.forEach(reference => {\n                    reference.label = `${reference.EventCode} ${reference.Description}`;\n                    reference.value = `${reference.CalendarActionID}-${reference.IsPassed}`;\n                });\n\n                references.push({\n                    label: \"Other\",\n                    value: \"Other\"\n                })\n\n                this.setState({\n                    references: references\n                });\n            });\n    }\n\n    getNonLegislativeActionList() {\n        //Get the non legislative action reference data\n        this.props.actions.getBillEventReferences(\"?isActive=true\").then(() => {\n            let nonLegislativeActionReferences = [...this.props.bills.billEventRef].filter(ref => ref.AdministrativeAction);\n            nonLegislativeActionReferences.forEach(ref => {\n                ref.label = `${ref.EventCode} ${ref.CalendarDescription}`\n                ref.value = `${ref.EventCode}-${ref.IsPassed}`\n            });\n\n            this.setState({\n                nonLegislativeActionReferences: nonLegislativeActionReferences,\n                fullEventList: [...this.props.bills.billEventRef]\n            });\n        });\n    }\n\n    getTextList() {\n        const entries = this.props.formData.MinutesEntries;\n        entries.forEach(entry => {\n            if (entry.LegislationID && !this.state.textList.find(text => text.LegislationID === entry.LegislationID)) {\n                this.props.actions.getTextList('?legislationID=' + entry.LegislationID + '&sessionID=' + this.props.sessionId)\n                    .then(() => {\n                        let textList = [...this.props.bills.textList];\n                        textList.forEach(text => {\n                            text.label = text.DocumentCode;\n                            text.value = text.LegislationTextID;\n                        });\n                        this.setState(state => ({\n                            textList: state.textList.concat(textList)\n                        }));\n                    });\n            }\n        })\n    }\n\n    toggleSmallMotionForm(entryIndex, e) {\n        if (e) {\n            //Do not hide the small motion form if a child of the form is focused\n            if (e.currentTarget.contains(e.relatedTarget)) {\n                return\n            }\n        }\n        let insertEntry = [];\n        insertEntry = this.props.formData.MinutesEntries[entryIndex];\n        this.setState({\n            smallMotionForm: entryIndex,\n            insertEntry: insertEntry ? [insertEntry] : [],\n            selectedMotion: '',\n            templateInputs: [],\n            templatedEdited: false,\n            otherEventSelected: false\n        }, () => {\n            if (this.motionDropdownRef.current) {\n                this.motionDropdownRef.current.focus();\n            }\n        });\n    }\n\n    toggleMenu(entryIndex, e) {\n        if (e) {\n            //Do not hide the small motion form if a child of the form is focused\n            if (e.currentTarget.contains(e.relatedTarget)) {\n                return;\n            }\n        }\n        this.setState({\n            showMenu: entryIndex\n        }, () => {\n            if (this.menuBoxRef.current) {\n                this.menuBoxRef.current.focus();\n            }\n        });\n    }\n\n    addEntry(entryIndex, position, recess) {\n        let entries = [...this.props.formData.MinutesEntries];\n        let newEntry = {\n            IsOOB: entries[entryIndex].IsOOB,\n            IsPublic: false,\n            MinutesCategoryID: entries[entryIndex].MinutesCategoryID,\n        }\n        if (recess && this.state.references.find(ref => ref.Description === 'Recess')) {\n            newEntry.EntryText = \"Recess\";\n            newEntry.MinutesActivities = [{\n                MinutesActivityID: this.state.references.find(ref => ref.Description === 'Recess').MinutesActivityID,\n                Description: \"Recess\"\n            }];\n        }\n        entries.splice(entryIndex + position, 0, newEntry);\n        entries.forEach((entry, idx) => {\n            entry.Sequence = idx + 1\n        });\n        this.props.handleSaveEntry(entries);\n        this.setState({\n            showMenu: -1,\n            smallMotionForm: -1,\n            insertEntry: [],\n            newEntries: []\n        });\n    }\n\n    handleBillNumberChange(entryIndex, value) {\n        let selectedBillNumber = [...this.state.selectedBillNumber];\n        selectedBillNumber[entryIndex] = value\n        this.setState({\n            selectedBillNumber: selectedBillNumber\n        });\n    }\n\n    applyLegislationToEntry(entryIndex) {\n        let entries = [...this.props.formData.MinutesEntries];\n        let entry = entries[entryIndex];\n        entry.LegislationNumber = this.state.selectedBillNumber[entryIndex].LegislationNumber;\n        this.props.handleSaveEntry(entry);\n        this.setState({\n            showMenu: -1,\n            smallMotionForm: -1\n        });\n        this.props.actions.getTextList('?legislationNumber=' + this.state.selectedBillNumber[entryIndex].LegislationNumber + '&sessionID=' + this.props.sessionId)\n            .then(() => {\n                let textList = [...this.props.bills.textList];\n                textList.forEach(text => {\n                    text.label = text.DocumentCode;\n                    text.value = text.LegislationTextID;\n                });\n                this.setState(state => ({\n                    textList: state.textList.concat(textList)\n                }));\n            });\n\n    }\n\n    handleCommentBoxChange(content) {\n        this.setState({\n            commentBoxContent: content\n        });\n    }\n\n    toggleCommentBox(show) {\n        const entries = this.props.formData.MinutesEntries;\n        let commentBoxContent = [];\n        if (entries[show] && entries[show].MinutesSummaries) {\n            if (entries[show].MinutesSummaries.length !== 0) {\n                commentBoxContent = entries[show].MinutesSummaries;\n            }\n        }\n        this.setState({\n            showCommentBox: show,\n            commentBoxContent: commentBoxContent\n        });\n    }\n\n    saveComment() {\n        let entries = [...this.props.formData.MinutesEntries];\n        if (entries[this.state.showCommentBox]) {\n            let entry = entries[this.state.showCommentBox];\n            entry.MinutesSummaries = this.state.commentBoxContent;\n            this.props.handleSaveEntry(entry);\n            this.setState({\n                showCommentBox: false\n            });\n        }\n    }\n\n    toggleShowDeleted(entryIndex) {\n        let entries = [...this.state.newEntries];\n        entries[entryIndex].showDeleted = !entries[entryIndex].showDeleted;\n        this.setState({\n            newEntries: entries\n        });\n    }\n\n    toggleAuxBillAdd() {\n        this.setState({\n            showAuxBillForm: !this.state.showAuxBillForm,\n            auxBill: ''\n        })\n    }\n\n    setAuxBill(value) {\n        this.setState({\n            auxBill: value\n        })\n    }\n\n    addAuxBill() {\n        this.setState({\n            savingAuxBill: true\n        }, () => {\n            let minutesEntry = {\n                MinutesEntryCreate: [\n                    {\n                        IsPublic: false,\n                        LegislationChamberCode: this.state.auxBill.value[0],\n                        LegislationID: this.state.auxBill.LegislationID,\n                        LegislationNumber: this.state.auxBill.value,\n                        MinutesActivities: [],\n                        MinutesCategoryID: this.props.formData.MinutesEntries[0].MinutesCategoryID,\n                        Sequence: this.props.formData.MinutesEntries.length ? Math.max(...this.props.formData.MinutesEntries.map(me => me.Sequence || 0)) + 1 : 1,\n                    }\n                ],\n            }\n\n            this.props.actions.createEntries(minutesEntry)\n                .then(() => {\n                    this.toggleAuxBillAdd();\n                    this.setState({\n                        savingAuxBill: false\n                    })\n                })\n        })\n    }\n\n    onKeyUp(e) {\n        if (e.key === \"Enter\" && !this.state.otherEventSelected) {\n            this.insertMotion();\n        } else if (e.key === \"Enter\" && this.state.otherEventSelected && this.state.otherEvent !== \"\") {\n            this.insertMotion();\n        }\n    }\n\n    formInput(entry, entryIndex, provided = {}) {\n        const memberListEvents = [\"H6013\", \"S6013\", \"H6113\", \"S6113\", \"H6213\", \"S6213\"];\n\n        let inputValue = this.state.templateInputs.map((tInput, i) => {\n            //For events H6013/S6013/H6113/S6113/H6213/S6213 there are sometimes incomplete lists of members. This will prevent the UI from adding blank member dropdown values to the description\n            if (memberListEvents.includes(this.state.selectedMotion?.EventCode) && !tInput.ReferenceText) {\n                return;\n            }\n\n            if (!tInput.ReferenceText && !this.state.selectedMotion?.ReconsiderationGrammar) {\n                return `${tInput.ActionReferenceType}`\n            }\n            return this.state.templateInputs.find(x => x.ActionReferenceType === \"LegislationEvent\") ? this.state.fullEventList.find(e => e.EventCode === this.state.templateInputs.find(x => x.ActionReferenceType === \"LegislationEvent\")?.EventCode && e.IsPassed === this.state.templateInputs.find(x => x.ActionReferenceType === \"LegislationEvent\")?.IsPassed)?.ReconsiderationDescription : tInput.ReferenceText + (memberListEvents.includes(this.state.selectedMotion?.EventCode) && tInput.ActionReferenceType === \"Member\" && tInput.ReferenceText && this.state.templateInputs[i + 1] && this.state.templateInputs[i + 1].ActionReferenceType === \"Member\" && this.state.templateInputs[i + 1].ReferenceText ? \", \" : \"\")\n        }).join('');\n        const showDeletedItemsCheckbox = this.state.newEntries[entryIndex] ? !!this.state.newEntries[entryIndex].MinutesActivities.find(act => act.DeletionDate) : false\n        let reversedActivities = this.state.newEntries[entryIndex] ? [...this.state.newEntries[entryIndex].MinutesActivities].reverse() : []\n        // Sometimes the deleted items are shown and other times they are not. If they are not shown then the first activity might not be the first activity on the screen.\n        // So this variable is used to figure out whether to show the hr or not that seperates activities.\n        const firstActivityIndex = this.state.newEntries[entryIndex] ? reversedActivities.findIndex((act, actIndex) => {\n            if (this.state.newEntries[entryIndex].showDeleted) {\n                return true\n            } else {\n                return !act.DeletionDate;\n            }\n        }) : null\n\n        function extractText(summary) {\n            let doc = document.createElement('div')\n            doc.insertAdjacentHTML(\"afterbegin\", summary);\n            //Bail out and pass back the summary if there is no paragraph tag\n            return doc.getElementsByTagName(\"p\")[0] ? doc.getElementsByTagName(\"p\")[0].innerText : summary\n        }\n\n        return (\n            <div key={entryIndex}>\n                <div className=\"bill-grid\">\n                    <React.Fragment>\n                        <div className={`${this.state.showSwitchCategory ? 'inner-grid half align-center' : ''}`} style={this.state.showSwitchCategory ? { gap: '10px', justifyContent: 'center' } : { textAlign: 'center' }}>\n                            <span {...provided.dragHandleProps} className=\"icon menu\" onClick={(e) => this.toggleMenu(entryIndex)}></span>\n                            {this.state.showMenu === entryIndex &&\n                                <div style={{ textAlign: 'left', marginLeft: '-15px', width: this.state.showSwitchCategory !== entryIndex ? 'auto' : '' }} className=\"info-box blue\" ref={this.menuBoxRef} onBlur={(e) => this.toggleMenu(-1, e)} contentEditable suppressContentEditableWarning={true}>\n                                    <div contentEditable={false}>\n                                        <div>\n                                            <button type=\"button\" className=\"button-link\" disabled={this.props.categoryFormDisabled} onClick={() => this.toggleOOB(entryIndex)}>Place {entry.IsOOB ? \"In\" : \"Out of\"} Block</button>\n                                        </div>\n                                        <div>\n                                            <button type=\"button\" disabled={this.props.categoryFormDisabled} onClick={() => this.addEntry(entryIndex, 0)} className=\"button-link\">Add Entry Above</button>\n                                        </div>\n                                        <div>\n                                            <button type=\"button\" disabled={this.props.categoryFormDisabled} onClick={() => this.addEntry(entryIndex, 1)} className=\"button-link\">Add Entry Below</button>\n                                        </div>\n                                        {this.state.references.find(ref => ref.Description === 'Recess') &&\n                                            <div>\n                                                <button type=\"button\" disabled={this.props.categoryFormDisabled} onClick={() => this.addEntry(entryIndex, 1, true)} className=\"button-link\">Add Recess Below</button>\n                                            </div>\n                                        }\n                                        {this.props.categories.filter(c => c.CalendarCategoryTypeID === this.props.formData.CalendarCategoryTypeID && c.MinutesCategoryID !== this.props.formData.MinutesCategoryID).length ?\n                                            <div>\n                                                <button type=\"button\" disabled={this.props.categoryFormDisabled} onClick={() => this.toggleSwitchCategory(entryIndex)} className=\"button-link\">Switch Category</button>\n                                            </div>\n                                            : null\n                                        }\n                                        {!entry.LegislationNumber &&\n                                            <div>\n                                                <hr />\n                                                <span className=\"small-text\">Apply Legislation</span>\n                                                <LargeListSelect\n                                                    styles={legNumSelectStyle}\n                                                    options={this.props.sessionBills}\n                                                    value={this.state.selectedBillNumber[entryIndex]}\n                                                    onChange={val => this.handleBillNumberChange(entryIndex, val)}\n                                                />\n                                                <button type=\"button\" onClick={() => this.applyLegislationToEntry(entryIndex)} disabled={!this.state.selectedBillNumber[entryIndex] || this.props.categoryFormDisabled} className=\"button small-button\">Apply</button>\n                                            </div>\n                                        }\n                                    </div>\n                                </div>\n                            }\n                            {this.state.showSwitchCategory &&\n                                <input\n                                    type=\"checkbox\"\n                                    className=\"checkbox\"\n                                    checked={this.state.checkedBills[entryIndex]}\n                                    onChange={(e) => this.toggleSelectEntry(entryIndex, e)}\n                                />\n                            }\n                        </div>\n                        <div>\n                            <div className=\"flex-row flex-vertical-center\">\n                                {entry.LegislationNumber\n                                    ? <React.Fragment>\n                                        <Link to={`/bill-details/${this.props.sessionCode}/${entry.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\">{entry.LegislationNumber}</Link>\n                                        <span onClick={() => this.toggleSmallMotionForm(entryIndex)} className=\"icon add\"></span>\n                                    </React.Fragment>\n                                    : \"No Legislation\"\n                                }\n                            </div>\n                            {\n                                this.state.smallMotionForm === entryIndex &&\n                                /* The contentEditable is so that the element can be focused and the onBlur function is able to run */\n                                <div style={{ width: '900px' }} className=\"info-box blue\" onBlur={(e) => this.toggleSmallMotionForm(-1, e)} contentEditable suppressContentEditableWarning={true}>\n                                    <div contentEditable={false}>\n                                        <div onKeyUp={(e) => this.onKeyUp(e)}>\n                                            <Select\n                                                value={this.state.selectedMotion}\n                                                options={[...this.state.references].filter(r => !r.LegislationChamberCode || !entry.LegislationNumber || entry.LegislationChamberCode === r.LegislationChamberCode)}\n                                                onChange={this.handleMotionChange}\n                                                styles={selectStyle}\n                                                ref={this.motionDropdownRef}\n                                            />\n                                            {this.state.otherEventSelected &&\n                                                <>\n                                                    <button type=\"button\" className='icon delete' onClick={() => this.unSelectOtherEvent()}></button>\n\n                                                    <div className=\"inner-grid bill-history-event-controls\" style={{ marginTop: \"10px\" }}>\n                                                        <Select\n                                                            options={this.state.otherBillEventOptions}\n                                                            styles={selectStyle}\n                                                            value={this.state.otherEvent}\n                                                            getOptionLabel={opt => opt.EventCode ? \"(\" + opt.EventCode + \") \" + opt.label : opt.label}\n                                                            onChange={this.handleOtherEventChange}\n                                                            isDisabled={this.state.otherBillEventOptions.length === 0}\n                                                        />\n                                                    </div>\n                                                </>\n                                            }\n                                        </div>\n                                        <div>\n                                            <button type='button' disabled={!this.state.selectedMotion || this.props.categoryFormDisabled} className='button' onClick={() => this.insertMotion(!this.state.newEntries[entryIndex])}>Add Motion</button>\n                                        </div>\n                                        {this.state.templateInputs.length > 0 &&\n                                            <div className=\"multi-row one-small-small no-margin\">\n                                                <div>\n                                                    <div>\n                                                        <span className='small-text txt-greyed'>{inputValue}</span>\n                                                    </div>\n                                                    <InputTypes\n                                                        newEvent={this.state.selectedMotion}\n                                                        memberList={this.props.memberList}\n                                                        committeeList={this.props.committeeList}\n                                                        communicationList={this.props.communicationList}\n                                                        eventList={this.state.reconsiderationEvents}\n                                                        handleChange={this.handleTemplateChange}\n                                                        entryIndex={0}\n                                                        activityIndex={0}\n                                                        references={this.state.templateInputs}\n                                                        textList={this.state.textList.filter(text => this.state.insertEntry.find(bill => bill.LegislationID === text.LegislationID) ? true : false)}\n                                                    />\n                                                </div>\n                                            </div>\n                                        }\n                                    </div>\n                                </div>\n                            }\n                        </div >\n                        <div>\n                            {this.state.newEntries[entryIndex] ?\n                                <React.Fragment>\n                                    <DragDropContext onDragEnd={res => this.onActivityDragEnd(res, entryIndex)}>\n                                        <Droppable droppableId={`activities-${entryIndex}-droppable`}>\n                                            {(provided, snapshot) =>\n                                                <div\n                                                    ref={provided.innerRef}\n                                                    style={getListStyle(snapshot.isDraggingOver)}>\n                                                    {this.state.newEntries[entryIndex].MinutesActivities && reversedActivities.map((activity, activityIndex) => {\n                                                        if (!this.state.newEntries[entryIndex].showDeleted && activity.DeletionDate) {\n                                                            return null;\n                                                        } else {\n                                                            const inputValue = (reversedActivities[activityIndex].Description || (reversedActivities[activityIndex].ActivityReferences && reversedActivities[activityIndex].ActivityReferences.map((tInput, i) => {\n                                                                //For events H6013/S6013/H6113/S6113/H6213/S6213 there are sometimes incomplete lists of members. This will prevent the UI from adding blank member dropdown values to the description\n                                                                if (memberListEvents.includes(reversedActivities[activityIndex].EventCode) && !tInput.ReferenceText) {\n                                                                    return;\n                                                                }\n\n                                                                if (!tInput.ReferenceText && !reversedActivities[activityIndex].ReconsiderationGrammar) {\n                                                                    return `${tInput.ActionReferenceType}`\n                                                                }\n                                                                return reversedActivities[activityIndex].ActivityReferences.find(x => x.ActionReferenceType === \"LegislationEvent\") ? this.state.fullEventList.find(e => e.EventCode === reversedActivities[activityIndex].ActivityReferences.find(x => x.ActionReferenceType === \"LegislationEvent\")?.EventCode && e.IsPassed === reversedActivities[activityIndex].ActivityReferences.find(x => x.ActionReferenceType === \"LegislationEvent\")?.IsPassed)?.ReconsiderationDescription : tInput.ReferenceText + (memberListEvents.includes(reversedActivities[activityIndex].EventCode) && tInput.ActionReferenceType === \"Member\" && tInput.ReferenceText && reversedActivities[activityIndex].ActivityReferences[i + 1] && reversedActivities[activityIndex].ActivityReferences[i + 1].ActionReferenceType === \"Member\" && reversedActivities[activityIndex].ActivityReferences[i + 1].ReferenceText ? \", \" : \"\")\n                                                            }).join('')));\n                                                            return (\n                                                                <Draggable key={`${activity.MinutesActivityID}-${activity.MinutesActivityID}`} draggableId={`${activity.MinutesActivityID}-${activity.Sequence}`} index={activityIndex}>\n                                                                    {(provided, snapshot) =>\n                                                                        <div\n                                                                            ref={provided.innerRef}\n                                                                            {...provided.draggableProps}\n                                                                            style={getItemStyle(snapshot.isDragging, provided.draggableProps.style)}>\n                                                                            {activityIndex !== firstActivityIndex && <hr className=\"faded-line\" />}\n                                                                            <div className=\"no-gap-grid two-col-sidebar-backwards\">\n                                                                                <div {...provided.dragHandleProps}>\n                                                                                    <button className=\"button draggable\">Drag and drop</button>\n                                                                                </div>\n                                                                                <div>\n                                                                                    <div className=\"no-gap-grid two-col-sidebar\">\n                                                                                        <div>\n                                                                                            {entry.LegislationNumber && !activity.OtherMotionSelected &&\n                                                                                                <Select\n                                                                                                    value={[...this.state.references].find(r => r.EventCode === activity.EventCode && r.IsPassed === activity.IsPassed) ? [...this.state.references].find(r => r.EventCode === activity.EventCode && r.IsPassed === activity.IsPassed) : activity.Description ? { label: activity.Description } : { label: \"Select...\" }}\n                                                                                                    options={[...this.state.references].filter(r => !r.LegislationChamberCode || entry.LegislationNumber[0] === r.LegislationChamberCode)}\n                                                                                                    onChange={(motion) => this.handleChange(entryIndex, activityIndex, null, null, null, motion)}\n                                                                                                    styles={selectStyle}\n                                                                                                    isClearable\n                                                                                                />\n                                                                                            }\n                                                                                            {!activity.OtherMotionSelected &&\n                                                                                                <div style={{ display: 'flex', alignItems: 'center', gap: '5px' }}>\n                                                                                                    <span\n                                                                                                        style={{ textDecoration: reversedActivities[activityIndex].DeletionDate ? 'line-through' : 'none' }}\n                                                                                                        className=\"small-text\">\n                                                                                                        {((reversedActivities[activityIndex].tempDescription ?? reversedActivities[activityIndex].Description) || reversedActivities[activityIndex].ActivityReferences && reversedActivities[activityIndex].ActivityReferences.map((tInput, i) => {\n                                                                                                            //For events H6013/S6013/H6113/S6113/H6213/S6213 there are sometimes incomplete lists of members. This will prevent the UI from adding blank member dropdown values to the description\n                                                                                                            if (memberListEvents.includes(reversedActivities[activityIndex].EventCode) && !tInput.ReferenceText) {\n                                                                                                                return;\n                                                                                                            }\n\n                                                                                                            if (!tInput.ReferenceText && !reversedActivities[activityIndex].ReconsiderationGrammar) {\n                                                                                                                return `${tInput.ActionReferenceType}`\n                                                                                                            }\n                                                                                                            return reversedActivities[activityIndex].ActivityReferences.find(x => x.ActionReferenceType === \"LegislationEvent\") ? this.state.fullEventList.find(e => e.EventCode === reversedActivities[activityIndex].ActivityReferences.find(x => x.ActionReferenceType === \"LegislationEvent\")?.EventCode && e.IsPassed === reversedActivities[activityIndex].ActivityReferences.find(x => x.ActionReferenceType === \"LegislationEvent\")?.IsPassed)?.ReconsiderationDescription : tInput.ReferenceText + (memberListEvents.includes(reversedActivities[activityIndex].EventCode) && tInput.ActionReferenceType === \"Member\" && tInput.ReferenceText && reversedActivities[activityIndex].ActivityReferences[i + 1] && reversedActivities[activityIndex].ActivityReferences[i + 1].ActionReferenceType === \"Member\" && reversedActivities[activityIndex].ActivityReferences[i + 1].ReferenceText ? \", \" : \"\")\n                                                                                                        }).join('')) + ((reversedActivities[activityIndex].tempVoteTally ?? reversedActivities[activityIndex].VoteTally) ? ' ' + (reversedActivities[activityIndex].tempVoteTally ?? reversedActivities[activityIndex].VoteTally) : '')}\n                                                                                                    </span>\n                                                                                                    {(reversedActivities[activityIndex].ActivityReferences && reversedActivities[activityIndex].ActivityReferences.find(ar => ar.ActionReferenceType !== \"Text\")) && (!this.state.editingActivityDescription[entryIndex] || !this.state.editingActivityDescription[entryIndex][activityIndex]) && <a className={`icon edit`} onClick={() => this.toggleEditActivityDescription(entryIndex, activityIndex)} />}\n                                                                                                </div>\n                                                                                            }\n                                                                                            {!activity.OtherMotionSelected &&\n                                                                                                <div style={{ display: 'flex', alignItems: 'center', gap: '5px' }}>\n                                                                                                    {this.state.editingActivityDescription[entryIndex] && this.state.editingActivityDescription[entryIndex][activityIndex] &&\n                                                                                                        <>\n                                                                                                            <div style={{ width: '100%', display: 'flex', gap: '5px' }}>\n                                                                                                                <textarea style={{ width: '75%' }} value={reversedActivities[activityIndex].tempDescription ?? inputValue} onChange={(e) => this.handleActivityDescriptionChange(e.target.value, \"Description\", entryIndex, activityIndex)} />\n                                                                                                                {reversedActivities[activityIndex].VoteTally !== undefined && <EditVoteTally value={reversedActivities[activityIndex].tempVoteTally} onChange={(e) => this.handleActivityDescriptionChange(e.target.value, \"VoteTally\", entryIndex, activityIndex)} />}\n                                                                                                            </div>\n                                                                                                            <div style={{ display: 'flex', gap: '5px' }}>\n                                                                                                                {this.state.editingActivityDescription[entryIndex] && this.state.editingActivityDescription[entryIndex][activityIndex] &&\n                                                                                                                    <a className={`icon save`} onClick={() => this.handleActivityDescriptionChange(null, null, entryIndex, activityIndex, true)} />}\n                                                                                                                <a className={`icon ${this.state.editingActivityDescription[entryIndex] && this.state.editingActivityDescription[entryIndex][activityIndex] ? 'delete' : 'edit'}`} onClick={() => this.toggleEditActivityDescription(entryIndex, activityIndex)} />\n                                                                                                            </div>\n                                                                                                        </>\n                                                                                                    }\n                                                                                                </div>\n                                                                                            }\n                                                                                            {activity.OtherMotionSelected &&\n                                                                                                <>\n                                                                                                    <button type=\"button\" className='button danger' onClick={() => this.unSelectOtherEventEdit(entryIndex, activityIndex)}>Cancel Other Motion</button>\n\n                                                                                                    <div className=\"inner-grid bill-history-event-controls\" style={{ marginTop: \"10px\" }}>\n                                                                                                        <Select\n                                                                                                            options={this.state.otherBillEventOptions}\n                                                                                                            styles={selectStyle}\n                                                                                                            value={activity.OtherEvent ? this.state.otherBillEventOptions.find(x => x.EventCode === activity.OtherEvent.EventCode) : { label: \"Select...\", value: \"\" }}\n                                                                                                            getOptionLabel={opt => opt.EventCode ? \"(\" + opt.EventCode + \") \" + opt.label : opt.label}\n                                                                                                            onChange={(value) => this.handleOtherChange(entryIndex, activityIndex, undefined, undefined, undefined, value)}\n                                                                                                            isDisabled={this.state.otherBillEventOptions.length === 0}\n                                                                                                        />\n                                                                                                    </div>\n\n                                                                                                    {activity.OtherEvent !== undefined &&\n                                                                                                        <>\n                                                                                                            < InputTypes\n                                                                                                                style={{ display: \"inline-block\" }}\n                                                                                                                newEvent={reversedActivities[activityIndex].OtherEvent}\n                                                                                                                memberList={this.props.memberList}\n                                                                                                                committeeList={this.props.committeeList}\n                                                                                                                communicationList={this.props.communicationList}\n                                                                                                                eventList={this.state.reconsiderationEvents}\n                                                                                                                actionTypes={this.props.actionTypes}\n                                                                                                                handleChange={this.handleChange}\n                                                                                                                entryIndex={entryIndex}\n                                                                                                                activityIndex={activityIndex}\n                                                                                                                references={reversedActivities[activityIndex].OtherEvent.ActivityReferences || []}\n                                                                                                                textList={this.state.textList.filter(text => this.state.newEntries[entryIndex].LegislationID === text.LegislationID)}\n                                                                                                            />\n                                                                                                            {reversedActivities[activityIndex].OtherEvent.VoteTally !== undefined && reversedActivities[activityIndex].OtherEvent.ActivityReferences !== undefined && !reversedActivities[activityIndex].OtherEvent.ActivityReferences.find(ar => ar.ActionReferenceType !== \"Text\") && <EditVoteTally value={reversedActivities[activityIndex].OtherEvent.tempVoteTally ?? reversedActivities[activityIndex].OtherEvent.VoteTally} onChange={(e) => this.handleActivityDescriptionChange(e.target.value, \"VoteTally\", entryIndex, activityIndex)} />}\n                                                                                                        </>\n                                                                                                    }\n                                                                                                </>\n                                                                                            }\n                                                                                            <div>\n                                                                                                {!reversedActivities[activityIndex].DeletionDate && !activity.OtherMotionSelected &&\n                                                                                                    <>\n                                                                                                        <InputTypes\n                                                                                                            style={{ display: \"inline-block\" }}\n                                                                                                            newEvent={reversedActivities[activityIndex]}\n                                                                                                            memberList={this.props.memberList}\n                                                                                                            committeeList={this.props.committeeList}\n                                                                                                            communicationList={this.props.communicationList}\n                                                                                                            eventList={this.state.reconsiderationEvents}\n                                                                                                            actionTypes={this.props.actionTypes}\n                                                                                                            handleChange={this.handleChange}\n                                                                                                            entryIndex={entryIndex}\n                                                                                                            activityIndex={activityIndex}\n                                                                                                            references={reversedActivities[activityIndex].ActivityReferences || []}\n                                                                                                            textList={this.state.textList.filter(text => this.state.newEntries[entryIndex].LegislationID === text.LegislationID)}\n                                                                                                        />\n                                                                                                        {reversedActivities[activityIndex].VoteTally !== undefined && reversedActivities[activityIndex].ActivityReferences !== undefined && !reversedActivities[activityIndex].ActivityReferences.find(ar => ar.ActionReferenceType !== \"Text\") && <EditVoteTally value={reversedActivities[activityIndex].tempVoteTally ?? reversedActivities[activityIndex].VoteTally} onChange={(e) => this.handleOtherActivityDescriptionChange(e.target.value, \"VoteTally\", entryIndex, activityIndex)} />}\n                                                                                                    </>\n                                                                                                }\n                                                                                            </div>\n                                                                                        </div>\n                                                                                        <div>\n                                                                                            {!reversedActivities[activityIndex].DeletionDate ?\n                                                                                                <button onClick={() => this.removeActivity(entryIndex, activityIndex)} type=\"button\" className=\"button remove\"></button>\n                                                                                                :\n                                                                                                <button onClick={() => this.addBackActivity(entryIndex, activityIndex)} type=\"button\" className=\"button add\"></button>\n                                                                                            }\n\n                                                                                        </div>\n                                                                                    </div>\n                                                                                </div>\n                                                                            </div>\n                                                                        </div>}\n                                                                </Draggable>\n                                                            )\n                                                        }\n\n                                                    })}\n                                                    {provided.placeholder}\n                                                </div>\n                                            }\n                                        </Droppable></DragDropContext>\n                                </React.Fragment>\n                                :\n                                <React.Fragment>\n                                    {entry.MinutesActivities && entry.MinutesActivities.length > 0\n                                        ? entry.MinutesActivities.filter(a => !a.DeletionDate).map((activity, activityIndex) =>\n                                            <span key={activityIndex}>\n                                                {activityIndex !== 0 && ', '}{activity.Description}{activity.VoteTally ? ' ' + activity.VoteTally : ''}\n                                            </span>\n                                        )\n                                        //find way to insert summary into document and extract innertext to take substring of\n                                        : <span>{entry.MinutesSummaries && entry.MinutesSummaries[0] && entry.MinutesSummaries[0].MinutesSummary.length > 215 ? extractText(entry.MinutesSummaries[0].MinutesSummary).substr(0, 215) + \"...\" : entry.MinutesSummaries && entry.MinutesSummaries[0] && extractText(entry.MinutesSummaries[0].MinutesSummary)}</span>\n                                    }\n                                </React.Fragment>\n                            }\n\n                        </div>\n                        {\n                            this.state.newEntries[entryIndex] ? (\n                                <div style={{ position: \"relative\" }}>\n                                    <div className=\"bill-grid-actions\" key={entry.MinutesEntryID}>\n                                        <button onClick={() => this.saveChange(entryIndex)} type=\"button\" className=\"icon save\"></button>\n                                        <button onClick={() => this.toggleEdit(entryIndex)} type=\"button\" className=\"icon delete\"></button>\n                                    </div>\n                                    {showDeletedItemsCheckbox &&\n                                        <div style={!this.state.newEntries[entryIndex].MinutesActivities || !this.state.newEntries[entryIndex].MinutesActivities.filter(ma => !ma.DeletionDate).length ? { width: '105%' } : { width: '105%', position: 'absolute', bottom: '1px' }} className=\"flex-row flex-vertical-center flex-start\">\n                                            <div className=\"toggle-switch\" onClick={() => this.toggleShowDeleted(entryIndex)}>\n                                                <input type=\"checkbox\" checked={this.state.newEntries[entryIndex].showDeleted} />\n                                                <span className=\"slider\"></span>\n                                            </div>\n                                            <label style={{ fontSize: \"12px\" }} className=\"checkbox-label\">Show Deleted</label>\n                                        </div>}\n                                </div>\n                            ) : (\n                                <div className=\"bill-grid-actions\" key={entry.MinutesEntryID}>\n                                    {this.state.savingVotes[entryIndex] || this.state.togglingEdit[entryIndex] ? <span className=\"small-spinner\"></span> :\n                                        <React.Fragment>\n                                            <button onClick={() => this.toggleCommentBox(entryIndex)} type=\"button\" disabled={this.props.categoryFormDisabled} className=\"button-link\">{entry.MinutesSummaries && entry.MinutesSummaries.length > 0 ? \"Edit\" : \"Add\"} Comment</button>\n                                            {entry.MinutesActivities && entry.MinutesActivities.length > 0 && <button onClick={() => this.toggleEdit(entryIndex)} type=\"button\" className=\"button-link\" disabled={this.props.categoryFormDisabled}>Edit Motions</button>}\n                                        </React.Fragment>}\n                                </div>\n                            )\n                        }\n                    </React.Fragment >\n                </div >\n            </div >\n        );\n    }\n\n    render() {\n        const { insertEntry, selectedMotion, references, nonLegislativeActionReferences, showAuxBillForm } = this.state;\n        //Seperate the entries that are in block and out of block\n        //Use map instead of filter so that the index is preserved\n        const entries = this.props.formData.MinutesEntries;\n        const outOfBlockEntries = entries.map(entry => {\n            return entry.IsOOB ? entry : null\n        });\n        let inBlockEntries = entries.map(entry => {\n            return !entry.IsOOB ? entry : null\n        });\n        const billNumbers = [\n            {\n                options: [{ label: 'No Legislation' }]\n            },\n            {\n                button: <button type=\"button\" onClick={() => this.addAllEntries(false)} className=\"button small-button\">Select All In Block</button>,\n                options: inBlockEntries.filter(opt => opt && opt.LegislationNumber),\n            },\n            {\n                button: <button type=\"button\" onClick={() => this.addAllEntries(true)} className=\"button small-button\">Select All Out of Block</button>,\n                options: outOfBlockEntries.filter(opt => opt && opt.LegislationNumber),\n            }\n        ];\n        const auxOptions = this.props.sessionBills.filter(bill => {\n            //If the bill is not already in the minutes entries then add it to the aux list            \n            if (!this.props.formData.MinutesEntries.find(x => x.LegislationID === bill.LegislationID)) {\n                return bill;\n            }\n        })\n        const memberListEvents = [\"H6013\", \"S6013\", \"H6113\", \"S6113\", \"H6213\", \"S6213\"];\n\n        let inputValue = this.state.templateInputs.map((tInput, i) => {\n            //For events H6013/S6013/H6113/S6113/H6213/S6213 there are sometimes incomplete lists of members. This will prevent the UI from adding blank member dropdown values to the description\n            if (memberListEvents.includes(this.state.selectedMotion?.EventCode) && !tInput.ReferenceText) {\n                return;\n            }\n\n            if (!tInput.ReferenceText && !this.state.selectedMotion?.ReconsiderationGrammar) {\n                return `${tInput.ActionReferenceType}`\n            }\n            return this.state.templateInputs.find(x => x.ActionReferenceType === \"LegislationEvent\") ? this.state.fullEventList.find(e => e.EventCode === this.state.templateInputs.find(x => x.ActionReferenceType === \"LegislationEvent\")?.EventCode && e.IsPassed === this.state.templateInputs.find(x => x.ActionReferenceType === \"LegislationEvent\")?.IsPassed)?.ReconsiderationDescription : tInput.ReferenceText + (memberListEvents.includes(this.state.selectedMotion?.EventCode) && tInput.ActionReferenceType === \"Member\" && tInput.ReferenceText && this.state.templateInputs[i + 1] && this.state.templateInputs[i + 1].ActionReferenceType === \"Member\" && this.state.templateInputs[i + 1].ReferenceText ? \", \" : \"\")\n        }).join('');\n        return (\n            <div>\n                <div className=\"user-forms motion-form\">\n                    <div className=\"dlas-forms\">\n                        {this.state.showCommentBox !== false &&\n                            <CommentBox\n                                toggleBox={this.toggleCommentBox}\n                                handleCommentBoxChange={this.handleCommentBoxChange}\n                                comments={this.state.commentBoxContent}\n                                saveComment={this.saveComment}\n                            />\n                        }\n                        <div className=\"inner-grid one-and-eight\">\n                            <p className=\"small-header\">Motion</p>\n                            <div className=\"dlas-forms\">\n                                {showAuxBillForm\n                                    ? <div className=\"inner-grid\" style={{ gridTemplateColumns: \"25px 1fr 150px 150px\", marginTop: \"19px\" }}>\n                                        <a className=\"icon delete\" onClick={this.toggleAuxBillAdd} />\n                                        <span style={{ fontSize: \"14px\" }}>This form may be used to make any bill in the session available to add to this minutes category. Use with caution.</span>\n                                        <Select\n                                            options={auxOptions}\n                                            onChange={this.setAuxBill}\n                                            isSearchable={true}\n                                        />\n                                        <button type=\"button\" className=\"button\" onClick={this.addAuxBill} disabled={this.state.savingAuxBill || this.props.categoryFormDisabled}>Add Bill to List</button>\n                                    </div>\n                                    : <div className=\"inner-grid\" style={{ gridTemplateColumns: \"25px 8fr 225px\", marginTop: \"19px\" }}>\n                                        <a className=\"icon warning\" onClick={this.toggleAuxBillAdd} style={{ marginTop: \"19px\" }} />\n                                        <div />\n                                    </div>\n                                }\n                            </div>\n                        </div>\n                        <form>\n                            <div className=\"multi-row small-three-one-alt no-margin\">\n                                <div>\n                                    <label>Bill #</label>\n                                    <Select\n                                        value={insertEntry}\n                                        isMulti\n                                        onChange={this.handleBillChange}\n                                        options={billNumbers}\n                                        styles={selectStyle}\n                                        formatGroupLabel={data => <div>{data.button}</div>}\n                                        getOptionLabel={option => option.LegislationNumber || option.label || \"Entry\"}\n                                        getOptionValue={option => option.MinutesEntryID}\n                                        isDisabled={this.state.smallMotionForm !== -1}\n                                    />\n                                </div>\n                                <div onKeyUp={(e) => this.onKeyUp(e)}>\n                                    <label>Motion</label>\n                                    <Select\n                                        value={selectedMotion}\n                                        options={insertEntry && insertEntry.length && insertEntry.find(x => x.label === \"No Legislation\") ? nonLegislativeActionReferences : [...references].filter(r => !r.LegislationChamberCode || !insertEntry || insertEntry.find(b => b.LegislationChamberCode === r.LegislationChamberCode))}\n                                        isDisabled={this.state.otherEventSelected || insertEntry.length === 0 || this.state.smallMotionForm !== -1 || insertEntry.find(x => x.LegislationNumber === \"No Legislation\")}\n                                        onChange={(value) => this.handleMotionChange(value)}\n                                        styles={selectStyle}\n                                        isClearable\n                                        ref={this.motionRef}\n                                    />\n                                    {this.state.otherEventSelected &&\n                                        <>\n                                            <button type=\"button\" className='icon delete' onClick={() => this.unSelectOtherEvent()}></button>\n\n                                            <div className=\"inner-grid bill-history-event-controls\" style={{ marginTop: \"10px\" }}>\n                                                <Select\n                                                    options={this.state.otherBillEventOptions}\n                                                    styles={selectStyle}\n                                                    value={this.state.otherEvent}\n                                                    getOptionLabel={opt => opt.EventCode ? \"(\" + opt.EventCode + \") \" + opt.label : opt.label}\n                                                    onChange={this.handleOtherEventChange}\n                                                    isDisabled={this.state.otherBillEventOptions.length === 0}\n                                                />\n                                            </div>\n                                        </>\n                                    }\n                                </div>\n                                <div>\n                                    <label>Description</label>\n                                    <input\n                                        value={this.state.templateInputs.length > 0 ? '' : selectedMotion?.Description || selectedMotion?.CalendarDescription || ''}\n                                        placeholder={selectedMotion ? this.state.templateInputs.length > 0 ? \"See below...\" : \"\" : \"Select motion...\"}\n                                        disabled={!selectedMotion || this.state.templateInputs.length > 0}\n                                        onChange={this.handleSelectedMotionDescriptionChange}\n                                    />\n                                </div>\n                                <div className=\"inner-grid two\">\n                                    <div>\n                                        <br />\n                                        <button type='button' disabled={(!this.state.selectedMotion && !this.state.insertEntry.find(x => x.LegislationNumber === \"No Legislation\")) || this.state.smallMotionForm !== -1 || this.props.categoryFormDisabled} className='button' onClick={this.insertMotion}>Add Motion</button>\n                                    </div>\n                                    <div>\n                                        <br />\n                                        <button type='button' disabled={!this.state.selectedMotion || this.state.smallMotionForm !== -1 || this.props.categoryFormDisabled} onClick={this.removeMotion} className='button danger'>Remove Motion</button>\n                                    </div>\n                                </div>\n                            </div>\n                            {this.state.templateInputs.length > 0 &&\n                                <div className=\"multi-row small-two-one-alt no-margin\">\n                                    <br />\n                                    <div>\n                                        <div>\n                                            <span className='small-text txt-greyed'>{inputValue}</span>\n                                        </div>\n                                        <InputTypes\n                                            newEvent={this.state.selectedMotion}\n                                            memberList={this.props.memberList}\n                                            committeeList={this.props.committeeList}\n                                            communicationList={this.props.communicationList}\n                                            eventList={this.state.reconsiderationEvents}\n                                            handleChange={this.handleTemplateChange}\n                                            entryIndex={0}\n                                            activityIndex={0}\n                                            references={this.state.templateInputs}\n                                            textList={this.state.textList.filter(text => this.state.insertEntry.find(bill => bill.LegislationID === text.LegislationID) ? true : false)}\n                                        />\n                                    </div>\n                                </div>\n                            }\n                        </form>\n                    </div>\n                </div>\n                {entries.length ?\n                    <div className=\"flex-row flex-end\" style={{ marginBottom: '5px' }}>\n                        {this.state.showSwitchCategory &&\n                            <div className=\"inner-grid\" style={{ gap: '5px', gridTemplateColumns: '20px 4fr .1fr' }}>\n                                <div className=\"inner-grid align-center\">\n                                    <button onClick={this.toggleSwitchCategory} type=\"button\" className=\"icon delete\"></button>\n                                </div>\n                                <Select\n                                    value={this.state.selectedSwitchCategory}\n                                    options={this.props.categories.filter(c => c.CalendarCategoryTypeID === this.props.formData.CalendarCategoryTypeID && c.MinutesCategoryID !== this.props.formData.MinutesCategoryID)}\n                                    getOptionLabel={opt => this.props.getCategoryDescriptionText(opt)}\n                                    onChange={this.handleSwitchCategoryChange}\n                                    styles={selectStyle}\n                                />\n                                <button onClick={this.switchCategory} disabled={!this.state.checkedBills.length || this.state.switchingCategories || !this.state.selectedSwitchCategory} type=\"button\" className=\"button float-right\">{this.state.switchingCategories ? <div className=\"small-spinner\" /> : 'Switch'}</button>\n                            </div>\n                        }\n                    </div>\n                    : null\n                }\n                <div>\n                    <div className=\"bill-grid\">\n                        <div className=\"bill-grid-header\">\n                            <span></span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Bill #</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Bill Action</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>&nbsp;</span>\n                        </div>\n                    </div>\n                    <div>\n                        <DragDropContext onDragEnd={this.onEntryDragEnd}>\n                            <Droppable droppableId={`entries-droppable`}>\n                                {(provided, snapshot) =>\n                                    <div ref={provided.innerRef} style={getListStyle(snapshot.isDraggingOver)}>\n                                        {inBlockEntries.map((entry, entryIndex) => {\n                                            if (entry) {\n                                                return (\n                                                    <Draggable isDragDisabled={this.props.categoryFormDisabled} key={`${entry.MinutesEntryID}-${entry.Sequence}`} draggableId={`${entry.MinutesEntryID}-${entry.Sequence}`} index={entryIndex}>\n                                                        {(provided, snapshot) =>\n                                                            <div\n                                                                ref={provided.innerRef}\n                                                                {...provided.draggableProps}>\n                                                                {this.formInput(entry, entryIndex, provided)}\n                                                            </div>}\n                                                    </Draggable>\n                                                );\n                                            }\n                                        })}\n                                        {provided.placeholder}\n                                    </div>\n                                }\n                            </Droppable>\n                        </DragDropContext>\n                        {outOfBlockEntries.find(ent => ent !== null) &&\n                            <div className=\"bill-grid\" style={{ gridTemplateColumns: 'none' }}>\n                                <div className=\"bold\">\n                                    Out Of Block\n                                </div>\n                            </div>\n                        }\n                        {outOfBlockEntries.map((entry, entryIndex) => {\n                            if (entry) {\n                                return (this.formInput(entry, entryIndex));\n                            }\n                        })}\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nconst EditVoteTally = props => <textarea style={{ width: '25%' }} value={props.value} onChange={props.onChange} />\n\n//react-select default style makes the element too tall and the font too large\nconst fontSize = '0.8em'\nconst selectStyle = {\n    control: styles => ({\n        ...styles,\n        minHeight: '0px',\n        padding: '0.12em 0.6em !important',\n    }),\n    valueContainer: styles => ({\n        ...styles,\n        padding: 0,\n    }),\n    input: styles => ({\n        ...styles,\n        fontSize: fontSize,\n        lineHeight: 'normal',\n    }),\n    singleValue: styles => ({\n        ...styles,\n        fontSize: fontSize,\n    }),\n    placeholder: styles => ({\n        ...styles,\n        fontSize: fontSize\n    }),\n    option: styles => ({\n        ...styles,\n        fontSize: fontSize\n    }),\n}\nconst legNumSelectStyle = {\n    ...selectStyle,\n    dropdownIndicator: styles => ({\n        ...styles,\n        padding: 0,\n    }),\n    container: styles => ({\n        ...styles,\n        width: '100%'\n    }),\n    control: styles => ({\n        ...styles,\n        padding: 0,\n        minHeight: 'auto'\n    })\n\n}\n\nexport default connect(\n    (state) => {\n        const { calendar, votes, bills, minutes } = state;\n        return {\n            calendar,\n            votes,\n            bills,\n            minutes\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, voteActionCreators, calendarActionCreators, billActionCreators, minutesActionCreators), dispatch)\n        }\n    },\n    null,\n    {\n        forwardRef: true\n    }\n)(LegislativeForm)","import React from 'react';\n\nimport renderHTML from 'react-render-html';\n\nclass MinutesDetails extends React.Component {\n\n    render() {\n        const { categories, publicPage } = this.props;\n        return (\n            <div>\n                {categories.filter(c => c.MinutesEntries && c.MinutesEntries.length).map((category, index) => {\n                    //Used to grey out the categories that have no published entries\n                    const nonPublicEntries = category.MinutesEntries.find(entry => !entry.IsPublic);\n                    return (<div key={index} className={!publicPage && \"preview-entry\"}>\n                        {!publicPage &&\n                            <div className=\"entry-index\">\n                                <p>{index + 1}</p>\n                            </div>\n                        }\n                        <div className=\"entry-text\">\n                            <ul>\n                                {!category.CategoryDescription.toLowerCase().includes('communication') && category.CategoryDescription.toLowerCase() !== 'order of business' ?\n                                    category.CategoryText ?\n                                        category.CategoryText.split(/%+/).map((categoryTextPiece, idx) =>\n                                            categoryTextPiece.toLowerCase().includes(\"supplemental\") && index > 0 && categoryTextPiece === categories.filter(c => c.MinutesEntries && c.MinutesEntries.length)[index - 1]?.CategoryText?.split(/%+/)[idx] ? null : <li key={idx} className={`${(nonPublicEntries || category.MinutesEntries.length === 0) && !publicPage ? \"inactive \" : \"\"}category-heading`}>{categoryTextPiece}</li>\n                                        )\n                                        :\n                                        <React.Fragment>\n                                            {category.DisplayType && <li className={`${(nonPublicEntries || category.MinutesEntries.length === 0) && !publicPage ? \"inactive \" : \"\"}category-heading`}>{category.CategoryType}</li>}\n                                            <li className={`${(nonPublicEntries || category.MinutesEntries.length === 0) && !publicPage ? \"inactive \" : \"\"}category-heading`}>{category.CategoryDescription}</li>\n                                        </React.Fragment>\n                                    : null\n                                }\n                                {[...category.MinutesEntries].sort((a, b) => (a.IsOOB === b.IsOOB ? 0 : a.IsOOB ? 1 : -1) || a.Sequence - b.Sequence).filter(entry => !entry.DeletionDate).map((entry, i) => (\n                                    <React.Fragment key={i}>\n                                        <li className={!entry.IsPublic && !publicPage ? \"inactive\" : \"\"} key={i} style={!entry.EntryText ? entry.CommunicationID && category.CategoryType !== 'Chairmans Report' && !category.MinutesEntries[i - 1] ? {} : { padding: \"0px\" } : {}}>\n                                            {entry.MinutesActivities && entry.MinutesActivities.filter(activity => !activity.DeletionDate && (activity.InPreview || !entry.LegislationNumber)).length > 0 ?\n                                                <React.Fragment>\n                                                    {entry.MinutesActivities.filter(activity => !activity.DeletionDate && (activity.InPreview || !entry.LegislationNumber)).map((act, actIndex) =>\n                                                        <span key={actIndex} className={!act.IsPublic && !publicPage ? \"inactive\" : \"\"}>\n                                                            {actIndex === 0 ?\n                                                                <>\n                                                                    {(entry.LegislationNumber ? `${entry.LegislationNumber} - ` : '')}\n                                                                    {renderHTML(act.Description?.replace(/COMMUNICATION FROM (HOUSE|SENATE) \\((HN|SN)\\d{4,8}\\):/g, function (match, p1) {\n                                                                        return `<b>${match}</b>`;\n                                                                    }) || \"\")}\n                                                                    {(act.VoteTally ? ' ' + act.VoteTally : '')}</>\n                                                                :\n                                                                <>\n                                                                    {`, `}\n                                                                    {renderHTML(act.Description?.replace(/COMMUNICATION FROM (HOUSE|SENATE) \\((HN|SN)\\d{4,8}\\):/g, function (match, p1) {\n                                                                        return `<b>${match}</b>`;\n                                                                    }) || \"\")}\n                                                                    {act.VoteTally ? ' ' + act.VoteTally : ''}\n                                                                </>\n                                                            }\n                                                        </span>\n                                                    )}\n                                                </React.Fragment>\n                                                :\n                                                <React.Fragment>\n                                                    {(entry.LegislationNumber || category.CategoryType === \"Chairmans Report\" || category.CategoryType === \"Miscellaneous\") && entry.EntryText &&\n                                                        <React.Fragment>{entry.LegislationNumber ? entry.LegislationNumber + ' - ' : ''}{renderHTML(entry.EntryText)}</React.Fragment>\n                                                    }\n                                                </React.Fragment>\n                                            }\n                                        </li>\n                                        {!entry.EntryText && (!entry.MinutesActivities || entry.MinutesActivities.filter(activity => !activity.DeletionDate && (activity.InPreview || !entry.LegislationNumber)).length === 0) &&\n                                            <React.Fragment>{entry.MinutesSummaries && entry.MinutesSummaries.length > 0 && entry.LegislationNumber &&\n                                                <li className={!entry.IsPublic && !publicPage ? \"inactive\" : \"\"}>{entry.LegislationNumber}</li>}\n                                            </React.Fragment>\n                                        }\n                                        {category.CategoryType !== 'Chairmans Report' && entry.MinutesSummaries && entry.MinutesSummaries.map((summary, summaryIndex) =>\n                                            <li key={summaryIndex} className={!entry.IsPublic && !publicPage ? \"inactive\" : \"\"}>\n                                                {renderHTML(summary.MinutesSummary || '')}\n                                            </li>\n                                        )}\n                                    </React.Fragment>\n                                ))}\n                            </ul>\n                        </div>\n                    </div>);\n                })}\n            </div>\n        )\n    }\n}\n\nexport default MinutesDetails;\n","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst commListSuccess = 'COMM_LIST_SUCCESS';\nconst commListFailure = 'COMM_LIST_FAILURE';\n\nconst commGetSuccess = 'COMM_GET_SUCCESS';\nconst commGetFailure = 'COMM_GET_FAILURE';\n\nconst commSaveSuccess = 'COMM_SAVE_SUCCESS';\nconst commSaveFailure = 'COMM_SAVE_FAILURE';\n\nconst commFileSaveSuccess = 'COMM_FILE_SAVE_SUCCESS';\nconst commFileSaveFailure = 'COMM_FILE_SAVE_FAILURE';\n\nconst commCreateSuccess = 'COMM_CREATE_SUCCESS';\nconst commCreateFailure = 'COMM_CREATE_FAILURE';\n\nconst commCategoriesSuccess = \"COMM_CATEGORIES_SUCCESS\";\nconst commCategoriesFailure = \"COMM_CATEGORIES_FAILURE\";\n\nconst getCommunicationAssignmentsSuccess = \"GET_COMMUNICATION_MAPPINGS_SUCCESS\";\nconst getCommunicationAssignmentsFailure = \"GET_COMMUNICATION_MAPPINGS_FAILURE\";\n\nconst getCommunicationSummaryListSuccess = \"GET_COMMUNICATION_SUMMARY_LIST_SUCCESS\";\nconst getCommunicationSummaryListFailure = \"GET_COMMUNICATION_SUMMARY_LIST_FAILURE\";\n\nconst getAdminCommunicationAssignmentsSuccess = \"GET_ADMIN_COMMUNICATION_MAPPINGS_SUCCESS\";\nconst getAdminCommunicationAssignmentsFailure = \"GET_ADMIN_COMMUNICATION_MAPPINGS_FAILURE\";\n\nconst saveCommunicationAssignmentSuccess = \"SAVE_COMMUNICATION_MAPPING_SUCCESS\";\nconst saveCommunicationAssignmentFailure = \"SAVE_COMMUNICATION_MAPPING_FAILURE\";\n\nconst joinCommFileSuccess = \"JOIN_COMM_FILE_SUCCESS\";\nconst joinCommFileFailure = \"JOIN_COMM_FILE_FAILURE\";\n\nconst toggleChamber = \"COMM_TOGGLE_CHAMBER\";\n\nconst initialState = {\n    commList: [],\n    commListError: '',\n    commCreate: '',\n    commCreateError: '',\n    commGet: '',\n    commGetError: '',\n    commSave: '',\n    commSaveError: '',\n    commFileSave: '',\n    commFileSaveError: '',\n    commCategories: [],\n    commCategoriesError: '',\n    commChamber: '',\n    joinCommFile: '',\n    joinCommFileError: '',\n    communicationSummaryList: [],\n    communicationSummaryListError: '',\n    communicationAssignments: [],\n    getCommunicationAssignmentsError: '',\n    adminCommunicationAssignments: [],\n    getAdminCommunicationAssignmentsError: '',\n    communicationAssignmentSave: [],\n    saveCommunicationAssignmentsError: ''\n};\n\nexport const communicationsActionCreators = {\n\n    receiveCommList: (result) => ({\n        type: commListSuccess,\n        commList: result\n    }),\n\n    commListError: (message) => ({\n        type: commListFailure,\n        commList: [],\n        commListError: message\n    }),\n\n    getCommList: (params, partner) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/GetPartnerLegislationCommunicationsListAsync', 'GET', headers, '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/GetLegislationCommunicationsListAsync', 'GET', headers, '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.commListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(communicationsActionCreators.receiveCommList(result[1].CommunicationsList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.receiveCommList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCommSummaryList: (result) => ({\n        type: getCommunicationSummaryListSuccess,\n        communicationSummaryList: result\n    }),\n\n    commSummaryListError: (message) => ({\n        type: getCommunicationSummaryListFailure,\n        communicationSummaryList: [],\n        communicationSummaryListError: message\n    }),\n\n    getCommunicationSummaryList: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/GetPartnerLegislationCommunicationSummaryListAsync?', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.commSummaryListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(communicationsActionCreators.receiveCommSummaryList(result[1].CommunicationSummariesResponse))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.receiveCommSummaryList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCommGet: (result) => ({\n        type: commGetSuccess,\n        commGet: result\n    }),\n\n    commGetError: (message) => ({\n        type: commGetFailure,\n        commGetError: message\n    }),\n\n    getComm: (params, partner) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/GetPartnerLegislationCommunicationsByIDAsync', 'GET', headers, '', params);\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/GetLegislationCommunicationsByIDAsync', 'GET', headers, '', params);\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.commGetError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(communicationsActionCreators.receiveCommGet(result[1].CommunicationResponse[0]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.commGetError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCommCategories: (result) => ({\n        type: commCategoriesSuccess,\n        commCategories: result\n    }),\n\n    commCategoriesError: (message) => ({\n        type: commCategoriesFailure,\n        commCategoriesError: message\n    }),\n\n    getCommCategories: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/GetCommunicationCategoryReferencesAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.commCategoriesError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(communicationsActionCreators.receiveCommCategories(result[1].CommunicationCategoryTypesReference));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.commCategoriesError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCommunicationAssignments: (responseObj) => ({\n        type: getCommunicationAssignmentsSuccess,\n        communicationAssignments: responseObj.CommunicationAssignments\n    }),\n\n    getCommunicationAssignmentsError: error => ({\n        type: getCommunicationAssignmentsFailure,\n        getCommunicationAssignmentsError: error\n    }),\n\n    getCommunicationAssignments: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/GetCommunicationAssignmentsAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.getCommunicationAssignmentsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(communicationsActionCreators.receiveCommunicationAssignments(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.getCommunicationAssignmentsError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveAdminCommunicationAssignments: (responseObj) => ({\n        type: getAdminCommunicationAssignmentsSuccess,\n        adminCommunicationAssignments: responseObj.CommunicationAssignments\n    }),\n\n    getAdminCommunicationAssignmentsError: error => ({\n        type: getAdminCommunicationAssignmentsFailure,\n        getAdminCommunicationAssignmentsError: error\n    }),\n\n    getAdminCommunicationAssignments: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/GetAdminCommunicationAssignmentsAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.getAdminCommunicationAssignmentsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(communicationsActionCreators.receiveAdminCommunicationAssignments(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.getAdminCommunicationAssignmentsError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCommunicationAssignmentSave: (responseObj) => ({\n        type: saveCommunicationAssignmentSuccess,\n        communicationAssignmentSave: responseObj\n    }),\n\n    saveCommunicationAssignmentError: error => ({\n        type: saveCommunicationAssignmentFailure,\n        saveCommunicationAssignmentsError: error\n    }),\n\n    saveCommunicationAssignment: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/SaveCommunicationAssignmentAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.saveCommunicationAssignmentError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(communicationsActionCreators.receiveCommunicationAssignmentSave(JSON.parse(result[1].Message)))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.saveCommunicationAssignmentError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveCommSave: (result) => ({\n        type: commSaveSuccess,\n        commSave: result\n    }),\n\n    commSaveError: (message) => ({\n        type: commSaveFailure,\n        commSaveError: message\n    }),\n\n    saveComm: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/SaveLegislationCommunicationAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.saveCommError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        try {\n                            const saveCommunicationResponse = JSON.parse(result[1].Message);\n                            dispatch(communicationsActionCreators.receiveCommSave(saveCommunicationResponse[0]));\n                        } catch {\n                            // Message does not contain json. \n                            dispatch(communicationsActionCreators.receiveCommSave(result[1].Message));\n                        }\n                        // The save can go fine but the failure message can contain information about the minutes save failing\n                        if (result[1].FailureMessage) {\n                            return result[1].FailureMessage;\n                        }\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.saveCommError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCommFileSave: (result) => ({\n        type: commFileSaveSuccess,\n        commFileSave: result\n    }),\n\n    commFileSaveError: (message) => ({\n        type: commFileSaveFailure,\n        commFileSaveError: message\n    }),\n\n    saveCommFile: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_FILE_GEN_API_URL) + '/CommunicationFileGeneration/api/ProcessCommunicationFilesAsync', 'POST', headers, '', params, true)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.commFileSaveError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(communicationsActionCreators.receiveCommFileSave(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.commFileSaveError('No Content'));\n                        return Promise.reject('No Content')\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveJoinCommFile: (result) => ({\n        type: joinCommFileSuccess,\n        joinCommFile: result\n    }),\n\n    joinCommFileError: (message) => ({\n        type: joinCommFileFailure,\n        joinCommFileError: message\n    }),\n\n    joinCommFile: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_FILE_GEN_API_URL) + '/LegislationFileGeneration/api/JoinLegislationCommunicationsAsync', 'POST', headers, body, '', true)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.joinCommFileError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(communicationsActionCreators.receiveJoinCommFile(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.joinCommFileError('No Content'));\n                        return Promise.reject('No Content');\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCommCreate: (result) => ({\n        type: commCreateSuccess,\n        commCreate: result\n    }),\n\n    commCreateError: (message) => ({\n        type: commCreateFailure,\n        commCreateError: message\n    }),\n\n    createComm: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COMMUNICATIONS_API_URL) + '/LegislationCommunications/api/CreateLegislationCommunicationAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(communicationsActionCreators.commCreateError(result[1]));\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        const createCommunicationResponse = JSON.parse(result[1].Message);\n                        dispatch(communicationsActionCreators.receiveCommCreate(createCommunicationResponse[0]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(communicationsActionCreators.commCreateError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    toggleChamber: (value) => ({\n        type: toggleChamber,\n        commChamber: value\n    })\n}\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n\n    switch (action.type) {\n        case commListSuccess:\n            return Object.assign({}, state, {\n                commList: action.commList,\n                commListError: ''\n            })\n        case commListFailure:\n            return Object.assign({}, state, {\n                commListError: action.commListError\n            })\n        case getCommunicationSummaryListSuccess:\n            return Object.assign({}, state, {\n                communicationSummaryList: action.communicationSummaryList,\n                communicationSummaryListError: ''\n            })\n        case getCommunicationSummaryListFailure:\n            return Object.assign({}, state, {\n                communicationSummaryListError: action.communicationSummaryListError\n            })\n        case commGetSuccess:\n            return Object.assign({}, state, {\n                commGet: action.commGet,\n                commGetError: ''\n            })\n        case commGetFailure:\n            return Object.assign({}, state, {\n                commGetError: action.commGetError\n            })\n        case commCategoriesSuccess:\n            return Object.assign({}, state, {\n                commCategories: action.commCategories,\n                commCategoriesError: ''\n            })\n        case commCategoriesFailure:\n            return Object.assign({}, state, {\n                commCategoriesError: action.commCategoriesError\n            })\n        case getCommunicationAssignmentsFailure:\n            return Object.assign({}, state, {\n                getCommunicationAssignmentsError: action.getCommunicationAssignmentsError\n            });\n        case getCommunicationAssignmentsSuccess:\n            return Object.assign({}, state, {\n                communicationAssignments: action.communicationAssignments,\n                getCommunicationAssignmentsError: ''\n            });\n        case getAdminCommunicationAssignmentsFailure:\n            return Object.assign({}, state, {\n                getAdminCommunicationAssignmentsError: action.getAdminCommunicationAssignmentsError\n            });\n        case getAdminCommunicationAssignmentsSuccess:\n            return Object.assign({}, state, {\n                adminCommunicationAssignments: action.adminCommunicationAssignments,\n                getAdminCommunicationAssignmentsError: ''\n            });\n        case saveCommunicationAssignmentFailure:\n            return Object.assign({}, state, {\n                saveCommunicationAssignmentsError: action.saveCommunicationAssignmentsError\n            });\n        case saveCommunicationAssignmentSuccess:\n            return Object.assign({}, state, {\n                communicationAssignmentSave: action.communicationAssignmentSave,\n                saveCommunicationAssignmentsError: ''\n            });\n        case commSaveSuccess:\n            return Object.assign({}, state, {\n                commSave: action.commSave,\n                commSaveError: ''\n            })\n        case commSaveFailure:\n            return Object.assign({}, state, {\n                commSaveError: action.commSaveError\n            })\n        case commFileSaveSuccess:\n            return Object.assign({}, state, {\n                commFileSave: action.commFileSave,\n                commFileSaveError: ''\n            })\n        case commFileSaveFailure:\n            return Object.assign({}, state, {\n                commFileSaveError: action.commFileSaveError\n            })\n        case joinCommFileSuccess:\n            return Object.assign({}, state, {\n                joinCommFile: action.joinCommFile,\n                joinCommFileError: ''\n            })\n        case joinCommFileFailure:\n            return Object.assign({}, state, {\n                joinCommFileError: action.joinCommFileError\n            })\n        case commCreateSuccess:\n            return Object.assign({}, state, {\n                commCreate: action.commCreate,\n                commCreateError: ''\n            })\n        case commCreateFailure:\n            return Object.assign({}, state, {\n                commCreateError: action.commCreateError\n            })\n        case toggleChamber:\n            return Object.assign({}, state, {\n                commChamber: action.commChamber\n            })\n        default:\n            return state\n    }\n};","import React from \"react\";\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport { minutesActionCreators } from '../../../stores/lis-minutes-store';\nimport { calendarActionCreators } from '../../../stores/lis-calendar-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport * as signalR from \"@microsoft/signalr\";\nimport moment from 'moment-timezone'\nimport LoaderComponent from '../../../lis-shared/lis-layout/components/lis-loader-component';\nimport Misc from './forms/misc';\nimport NonLegislativeForm from './forms/non-legislative-form';\nimport LegislativeForm from './forms/legislative-form';\nimport MinutesDetails from '../../../lis-shared/lis-minutes/lis-minutes-details';\nimport { memberActionCreators } from \"../../../stores/lis-members-store\";\nimport Select from 'react-select';\nimport ReactTable from 'react-table';\nimport DatePicker from 'react-datepicker';\nimport { billActionCreators } from \"../../../stores/lis-legislation-store\";\nimport { committeeActionCreators } from \"../../../stores/lis-committee-store\";\nimport { sessionActionCreators } from \"../../../stores/lis-session-store\";\nimport { communicationsActionCreators } from \"../../../stores/lis-communications-store\";\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\n\nclass MinutesManagementForm extends React.Component {\n\n    constructor(props) {\n        super(props)\n        this.state = {\n            buildingCategoryConnection: true,\n            buildingEntryConnection: true,\n            activity: '',\n            minutesBook: {},\n            currentActivitySequence: 0,\n            isPendingChange: false,\n            lastSavedTime: '',\n            lastPublishedTime: '',\n            entryHubConnection: null,\n            categoryHubConnection: null,\n            isLoaded: false,\n            disableChanges: false,\n            //Fieldsets\n            indexFieldsetIsActive: true,\n            activityFieldsetIsActive: false,\n            previewFieldsetIsActive: false,\n            memberList: [],\n            committeeList: [],\n            communicationList: [],\n            actionTypes: [],\n            calendarCategories: [],\n            categoriesToMove: [],\n            selectedCategoryToMoveTo: -1,\n            sessionBills: [],\n            publishing: false,\n            committeeMinutesBooks: [],\n            chairReportCategoriesSetForRegeneration: [],\n            regeneratingCategories: [],\n            fetchedMinutesBookIDs: [],\n            categoryFormDisabled: {}\n        }\n\n        //Ref used to scroll down to activity section\n        this.activityRef = React.createRef();\n        this.entryFormRef = React.createRef();\n\n        this.getCategoryDescriptionText = this.getCategoryDescriptionText.bind(this);\n        this.entryChange = this.entryChange.bind(this);\n        this.multipleEntryChange = this.multipleEntryChange.bind(this);\n        this.toggleMoveEntry = this.toggleMoveEntry.bind(this);\n        this.moveEntry = this.moveEntry.bind(this);\n        this.bulkMoveEntry = this.bulkMoveEntry.bind(this);\n        this.handleSequenceChange = this.handleSequenceChange.bind(this);\n        this.saveCategory = this.saveCategory.bind(this);\n        this.saveEntry = this.saveEntry.bind(this);\n        this.publishAllEntries = this.publishAllEntries.bind(this);\n        this.saveMinutesBook = this.saveMinutesBook.bind(this);\n        this.showPreview = this.showPreview.bind(this);\n        this.showActivity = this.showActivity.bind(this);\n        this.createCategory = this.createCategory.bind(this);\n        this.duplicateChairmansCategory = this.duplicateChairmansCategory.bind(this);\n        this.receiveEntryByWebsocket = this.receiveEntryByWebsocket.bind(this);\n        this.receiveCategoryByWebsocket = this.receiveCategoryByWebsocket.bind(this);\n        this.toggleFetchChairs = this.toggleFetchChairs.bind(this);\n        this.handleChairsReportDateChange = this.handleChairsReportDateChange.bind(this);\n        this.fetchChairsReports = this.fetchChairsReports.bind(this);\n        this.toggleChairsReport = this.toggleChairsReport.bind(this);\n        this.regenerateChairsReportCategory = this.regenerateChairsReportCategory.bind(this);\n        this.toggleEditCategoryText = this.toggleEditCategoryText.bind(this);\n        this.setTempCategoryText = this.setTempCategoryText.bind(this);\n        this.toggleMinutesStatus = this.toggleMinutesStatus.bind(this);\n        this.getMinutes = this.getMinutes.bind(this);\n    }\n\n    toggleFieldsetCollapse(isActive) {\n        this.setState(state => ({\n            [isActive]: !state[isActive]\n        }));\n    }\n\n    //Some categories get the type pre-pended to the description while other do not\n    getCategoryDescriptionText(item) {\n        if (!item) return;\n\n        if (item.CategoryType === 'Motion') {\n            return item.CategoryDescription + \" to \" + item.MinutesEntries[0].value + \" by \" + item.MinutesEntries[1].value.label + item.MinutesEntries[2].value;\n        } else if (item.CategoryText) {\n            if (item.CategoryText.startsWith('%')) {\n                item.CategoryText = item.CategoryText.substr(1);\n            }\n            return item.CategoryText.replaceAll(/%+/g, \" - \")\n        } else {\n            return (item.DisplayType ? item.CategoryType + ' - ' : '') + item.CategoryDescription;\n        }\n    }\n\n    toggleEditCategoryText(save) {\n        this.setState({ editingCategoryText: !this.state.editingCategoryText }, () => {\n            if (save) {\n                let minutesBook = { ...this.state.minutesBook };\n                minutesBook.MinutesCategories[this.state.currentActivitySequence - 1].CategoryText = this.state.tempCategoryText.replaceAll(\" - \", \"%\");\n                this.saveCategory(minutesBook.MinutesCategories[this.state.currentActivitySequence - 1]);\n            } else if (this.state.editingCategoryText) {\n                this.setState({ tempCategoryText: this.getCategoryDescriptionText(this.state.minutesBook.MinutesCategories[this.state.currentActivitySequence - 1]) })\n            }\n        })\n    }\n\n    setTempCategoryText(val) {\n        this.setState({ tempCategoryText: val })\n    }\n\n    entryChange(index, entry, sequence) {\n        //Takes the sequence, which is always one more than the index, and change the values for that MinutesEntry\n        let newFormData = JSON.parse(JSON.stringify(this.state.minutesBook));\n        newFormData.MinutesCategories[sequence - 1].MinutesEntries[index] = entry;\n        this.setState({\n            minutesBook: newFormData,\n            isPendingChange: true\n        });\n    }\n\n    multipleEntryChange(entries, sequence) {\n        let newFormData = JSON.parse(JSON.stringify(this.state.minutesBook));\n        newFormData.MinutesCategories[sequence - 1].MinutesEntries = entries;\n        this.setState({\n            minutesBook: newFormData,\n            isPendingChange: true\n        });\n    }\n\n    toggleMoveEntry(open, categoryIndex, entryIndex) {\n        if (open) {\n            const currentCategory = this.state.minutesBook.MinutesCategories[categoryIndex];\n            const applicableCategories = this.state.minutesBook.MinutesCategories.filter(cat => cat.CategoryType === currentCategory.CategoryType && cat.MinutesCategoryID !== currentCategory.MinutesCategoryID);\n            this.setState({\n                movingCategorySource: categoryIndex,\n                movingEntrySource: entryIndex,\n                categoriesToMove: applicableCategories,\n                showMoveEntryDialog: open\n            });\n        } else {\n            this.setState({\n                showMoveEntryDialog: false,\n                categoriesToMove: [],\n                selectedCategoryToMoveTo: -1,\n                movingCategorySource: -1,\n                movingEntrySource: -1,\n            });\n        }\n    }\n\n    moveEntry(destinationCategoryIndex) {\n        let sourceCategory = { ...this.state.minutesBook.MinutesCategories[this.state.movingCategorySource] }\n        let sourceEntry = { ...sourceCategory.MinutesEntries[this.state.movingEntrySource] };\n        let destinationCategory = this.state.minutesBook.MinutesCategories.find(cat => cat.MinutesCategoryID === this.state.categoriesToMove[destinationCategoryIndex].MinutesCategoryID);\n        if (destinationCategory) {\n            let newEntry = {\n                ...sourceEntry,\n                MinutesCategoryID: destinationCategory.MinutesCategoryID,\n                Sequence: destinationCategory.MinutesEntries?.length ? Math.max(...destinationCategory.MinutesEntries.map(e => e.Sequence || 0)) + 1 : 1\n            };\n            this.saveEntry(newEntry);\n            this.showActivity(destinationCategory);\n            this.toggleMoveEntry(false);\n\n            //Remove the old entry from the state variable\n            let minutesBook = { ...this.state.minutesBook };\n            minutesBook.MinutesCategories[this.state.movingCategorySource].MinutesEntries.splice(this.state.movingEntrySource, 1);\n            this.setState({\n                minutesBook: minutesBook\n            });\n        }\n    }\n\n    bulkMoveEntry(entries, sourceCategoryIdx, destinationCategoryID) {\n        const destinationCategory = this.state.minutesBook.MinutesCategories.find(mc => mc.MinutesCategoryID === destinationCategoryID)\n        if (destinationCategory) {\n            let minutesBook = { ...this.state.minutesBook };\n            entries.forEach((entry, idx) => {\n                entry.MinutesCategoryID = destinationCategoryID;\n                entry.Sequence = destinationCategory.MinutesEntries && destinationCategory.MinutesEntries.length > 0 ? destinationCategory.MinutesEntries[destinationCategory.MinutesEntries.length - 1].Sequence + idx + 1 : 1;\n                //Remove the old entries from the state variable\n                const sourceEntryIdx = minutesBook.MinutesCategories[sourceCategoryIdx].MinutesEntries.findIndex(me => me.MinutesEntryID === entry.MinutesEntryID);\n                minutesBook.MinutesCategories[sourceCategoryIdx].MinutesEntries.splice(sourceEntryIdx, 1);\n            });\n            this.saveEntry(entries);\n\n            this.setState({\n                minutesBook: minutesBook\n            });\n        }\n    }\n\n    saveEntry(entry, callback) {\n        //Find any MinutesActivities' MinutesActions where there is no reference info and discard\n        let theEntry = {... entry};\n\n        for (let i = 0; i < theEntry.MinutesActivities.length; i++) {\n            theEntry.MinutesActivities[i].Description = theEntry.MinutesActivities[i].Description.replace(\"undefined\", \"\");\n            if(theEntry.MinutesActivities[i].ActivityReferences) {\n                for (let j = 0; j < theEntry.MinutesActivities[i].ActivityReferences.length; j++) {\n                    if (!theEntry.MinutesActivities[i].ActivityReferences[j].ActionReferenceTypeID) {\n                        theEntry.MinutesActivities[i].ActivityReferences.splice(j, 1);\n                    }\n                }\n            }\n        }\n\n        //Request model has to look like this\n        const entryObject = { MinutesEntrySave: Array.isArray(theEntry) ? theEntry : [theEntry] };\n        //Save by Websocket. Sends the jwt for auth purposes\n        const self = this;\n        this.state.entryHubConnection.invoke(\"SaveEntry\", entryObject, localStorage.getItem('LIS_ID_TOKEN'))\n            .then(() => {\n                if (callback) { callback(); }\n            }).catch(function (err) {\n                console.error(err.toString());\n                if (err.toString().toLowerCase().includes(\"connection closed\")) {\n                    self.props.actions.makeToast([{ message: \"Entry Connection Disconnected\", type: \"failure\" }])\n                }\n            });\n    }\n\n    publishAllEntries() {\n        this.setState({ publishing: true }, () => {\n            //make sure the minutes book itself is public\n            let promise = Promise.resolve();\n            if (!this.state.minutesBook.IsPublic) {\n                promise = this.saveMinutesBook(true);\n            }\n            let activitesForClerksCopy = [];\n\n            promise.then(() => {\n                if (!this.state.minutesBook.MinutesCategories || !this.state.minutesBook.MinutesCategories.length) {\n                    this.setState({ publishing: false })\n                } else {\n                    let promises = []\n\n                    this.state.minutesBook.MinutesCategories.forEach((category, categoryIdx) => {\n                        if (category.ReleaseToPreview) {\n                            this.setState({ publishing: true }, () => {\n                                category.MinutesEntries.forEach((entry, entryIdx) => {\n                                    let newEntry = JSON.parse(JSON.stringify(entry));\n                                    let publishEntry = false;\n\n                                    if (!newEntry.IsPublic) {\n                                        publishEntry = true;\n                                    }\n\n                                    newEntry.IsPublic = true;\n                                    newEntry.IsReleased = true;\n\n                                    if (newEntry.MinutesActivities) {\n                                        newEntry.MinutesActivities.forEach(activity => {\n                                            if (!activity.IsPublic && this.props.bills.billEventRef && this.props.bills.billEventRef.find(x => x.EventCode === activity.EventCode) && this.props.bills.billEventRef.find(x => x.EventCode === activity.EventCode).IsPassage === true) {\n                                                activitesForClerksCopy.push(activity.MinutesActivityID)\n                                            }\n\n                                            if (!activity.IsPublic) {\n                                                publishEntry = true;\n                                                activity.IsPublic = true;\n                                            }\n                                        });\n                                    }\n\n                                    if (publishEntry) {\n                                        promises.push(\n                                            this.saveEntry(newEntry, () => {\n                                                if (entryIdx === category.MinutesEntries.length - 1) {\n                                                    this.setState({ publishing: false })\n                                                }\n                                            })\n                                        )\n                                    }\n                                });\n                            })\n                        } else if (categoryIdx === this.state.minutesBook.MinutesCategories.length - 1) {\n                            this.setState({ publishing: false })\n                        }\n                    })\n\n                    Promise.all(promises).then(() => {\n                        if (activitesForClerksCopy.length > 0) {\n                            this.props.actions.genClerksCopy(activitesForClerksCopy);\n                        }\n                    })\n\n                    this.setState({ publishing: false })\n                }\n                // If a user is editing an activity then clicks publish the save will update the mod dates\n                // Meaning that once the user tries to save their activity it will fail because the mod dates are not correct\n                // So get rid of all edits\n                if (this.entryFormRef.current) {\n                    this.entryFormRef.current.closeNewEntries();\n                }\n                this.setState({\n                    lastPublishedTime: moment()\n                });\n            }).catch(() => {\n                this.setState({ publishing: false })\n            })\n        })\n    }\n\n    handleSequenceChange(categories) {\n        //The sequence change has been handled by the MinutesIndex class. So the new list of Minute Categories is sent here to modify the minutesBook\n        let minutesBook = this.state.minutesBook;\n        //Check and see if the currently opened activity has been affected by the sequence change. If so, then update the current activity state item \n        let newCategoryIndex = this.state.currentActivitySequence - 1;\n        if (categories[this.state.currentActivitySequence - 1] !== this.state.minutesBook.MinutesCategories[this.state.currentActivitySequence - 1]) {\n            newCategoryIndex = categories.findIndex(category => category === this.state.minutesBook.MinutesCategories[this.state.currentActivitySequence - 1])\n        }\n        minutesBook.MinutesCategories = categories;\n        //currentActivitySequence is 0 by default so we don't want to set currentActivitySequence to an undefined value. \n        //So make a check to see if the user has clicked on a category item yet. If not then leave it at zero\n        this.setState({\n            minutesBook: minutesBook,\n            currentActivitySequence: categories[newCategoryIndex] ? categories[newCategoryIndex].Sequence : 0\n        }, async function () {\n            await this.saveMinutesBook()\n        });\n    }\n\n    showPreview(index) {\n        let minutesBook = JSON.parse(JSON.stringify(this.state.minutesBook));\n        let category = minutesBook.MinutesCategories[index];\n        //flips the 'show' key. this will be used in the Preview class to dictate whether a section will be shown or not\n        const show = !category.ReleaseToPreview;\n        category.ReleaseToPreview = show;\n        this.setState({\n            minutesBook: minutesBook\n        }, () => {\n            this.saveCategory(category);\n        });\n    }\n\n    showActivity(category, e) {\n        //Check to see if the checkbox was clicked so the activity doesn't open on checkbox click\n        if (!e || e.target.type !== \"checkbox\") {\n            let minutesBook = JSON.parse(JSON.stringify(this.state.minutesBook));\n            category.ReleaseToPreview = true;\n            //Open the activity drawer\n            this.setState({\n                activityFieldsetIsActive: true,\n                currentActivitySequence: category.Sequence,\n                activity: category.CategoryType,\n                minutesBook: minutesBook,\n                editingCategoryText: false\n            }, () => {\n                //Get the size and position of the activity form and scroll down to it\n                const activityRect = this.activityRef.current.getBoundingClientRect();\n                const windowY = window.scrollY;\n                window.scrollTo({\n                    top: activityRect.top + windowY,\n                    behavior: 'smooth'\n                });\n\n                this.saveCategory(category);\n            });\n        }\n    }\n\n    saveCategory(category) {\n        let categoryFormDisabled = { ...this.state.categoryFormDisabled };\n        categoryFormDisabled[category.Sequence] = true;\n        this.setState({ categoryFormDisabled }, () => {\n            const self = this;\n            this.state.categoryHubConnection.invoke(\"SaveCategory\", category, localStorage.getItem('LIS_ID_TOKEN'))\n                .catch(function (err) {\n                    console.error(err.toString());\n                    categoryFormDisabled[category.Sequence] = false;\n                    self.setState({\n                        categoryFormDisabled\n                    })\n                    if (err.toString().toLowerCase().includes(\"connection closed\")) {\n                        self.props.actions.makeToast([{ message: \"Category Connection Disconnected\", type: \"failure\" }])\n                    }\n                });\n        })\n    }\n\n    async saveMinutesBook(publish) {\n        //Save the new sequence\n        let minutesBook = JSON.parse(JSON.stringify(this.state.minutesBook));\n        if (publish) { minutesBook.IsPublic = true; }\n        //Remove the minute entries so the request doesn't take as long\n        minutesBook.MinutesCategories.forEach(category => delete category.MinutesEntries);\n        delete minutesBook.MinutesFiles;\n        //Disable changes so the user doesn't try to save something else while this is being saved\n        this.setState({ disableChanges: true })\n        await this.props.actions.saveMinutesBook(minutesBook)\n            .then(() => {\n                let minutesBook = { ...this.state.minutesBook };\n                const newMinutesBook = this.props.minutes.minutesBookSave;\n                minutesBook.ModificationDate = newMinutesBook.ModificationDate;\n                minutesBook.MinutesCategories.forEach((category, index) => {\n                    category.ModificationDate = newMinutesBook.MinutesCategories[index].ModificationDate;\n                });\n                this.setState({\n                    minutesBook: minutesBook,\n                    disableChanges: false\n                })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n                this.props.actions.makeToast([{ message: 'Save Failed', type: \"failure\" }])\n            });\n    }\n\n    async createCategory(newCategory, callback) {\n        this.setState({\n            creatingCategory: true\n        });\n        //Save a blank entry to the category if there isn't one already\n        newCategory.MinutesEntries = newCategory.MinutesEntries && newCategory.MinutesEntries.length ? newCategory.MinutesEntries : [{\n            EntryText: '',\n            Sequence: 1\n        }];\n        //Add motion button clicked, create a blank motion onto the list of categories\n        newCategory.MinutesBookID = parseInt(this.props.match.params.minutesbookid, 10);\n        await this.props.actions.createCategory(newCategory)\n            .then(() => {\n                let categoryCreate = this.props.minutes.categoryCreate;\n                if (!categoryCreate) {\n                    throw 'Category Creation Failed';\n                }\n                if (callback) {\n                    callback(categoryCreate.MinutesCategoryID)\n                }\n                // Once the category is saved then scroll down to it\n                // The new category is added to the book by the websocket connection so we do not have to add it here\n                this.setState({\n                    activity: categoryCreate.CategoryType,\n                    activityFieldsetIsActive: true,\n                    currentActivitySequence: categoryCreate.Sequence,\n                    creatingCategory: false\n                }, () => {\n                    //Get the size and position of the activity form and scroll down to it\n                    const activityRect = this.activityRef.current.getBoundingClientRect();\n                    const windowY = window.scrollY;\n                    window.scrollTo({\n                        top: activityRect.top + windowY,\n                        behavior: 'smooth'\n                    });\n                });\n            })\n            .catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    creatingCategory: false,\n                    fetchingChairsReports: false\n                });\n                console.log(err)\n                this.props.actions.makeToast([{ message: 'Failed to Create', type: \"failure\" }])\n            });\n    }\n\n    async duplicateChairmansCategory(calendarCategoryTypeID) {\n        let minutesBook = { ...this.state.minutesBook };\n        let categoryToDuplicate = JSON.parse(JSON.stringify(minutesBook.MinutesCategories.find(mc => mc.CalendarCategoryTypeID === calendarCategoryTypeID)));\n        //set sequence\n        categoryToDuplicate.Sequence = minutesBook.MinutesCategories.length + 1;\n        //delete mod dates, IDs, etc\n        delete categoryToDuplicate.MinutesCategoryID;\n        delete categoryToDuplicate.ModificationDate;\n        categoryToDuplicate.MinutesEntries.forEach(entry => {\n            delete entry.MinutesEntryID;\n            delete entry.MinutesCategoryID;\n            delete entry.ModificationDate;\n            entry.MinutesSummaries.forEach(summary => {\n                delete summary.MinutesSummaryID;\n                delete summary.MinutesEntryID;\n                delete summary.ModificationDate;\n            })\n            entry.MinutesActivities.forEach(act => {\n                delete act.MinutesSummaryID;\n                delete act.MinutesEntryID;\n                delete act.ModificationDate;\n            })\n        })\n\n        await this.createCategory(categoryToDuplicate);\n    }\n\n    receiveEntryByWebsocket(result) {\n        let minutesBook = JSON.parse(JSON.stringify(this.state.minutesBook));\n        result.forEach(entryFromResult => {\n            let categoryIndex = -1;\n            let entryIndex = -1;\n            categoryIndex = minutesBook.MinutesCategories.findIndex(category => category.MinutesCategoryID === entryFromResult.MinutesCategoryID);\n            //If an object is not found in the array then don't continue. The entry is probably in another book.\n            if (categoryIndex !== -1) {\n                entryIndex = minutesBook.MinutesCategories[categoryIndex].MinutesEntries.findIndex(entry => entry.MinutesEntryID === entryFromResult.MinutesEntryID);\n                entryFromResult.MinutesActivities = entryFromResult.MinutesActivities || [];\n                if (entryIndex !== -1) {\n                    minutesBook.MinutesCategories[categoryIndex].MinutesEntries[entryIndex].MinutesActivities = minutesBook.MinutesCategories[categoryIndex].MinutesEntries[entryIndex].MinutesActivities || [];\n                    entryFromResult.MinutesActivities.forEach(act => {\n                        if (!act.Sequence && !minutesBook.MinutesCategories[categoryIndex].MinutesEntries[entryIndex].MinutesActivities.find(ma => ma.MinutesActivityID === act.MinutesActivityID)) {\n                            act.Sequence = minutesBook.MinutesCategories[categoryIndex].MinutesEntries[entryIndex].MinutesActivities.length ? Math.max(...minutesBook.MinutesCategories[categoryIndex].MinutesEntries[entryIndex].MinutesActivities.filter(ma => ma.MinutesActivityID).map(e => e.Sequence || 0)) + 1 : 1;\n                        }\n                    })\n                    minutesBook.MinutesCategories[categoryIndex].MinutesEntries[entryIndex] = entryFromResult;\n                    minutesBook.MinutesCategories[categoryIndex].MinutesEntries[entryIndex].MinutesActivities.sort((a, b) => a.Sequence - b.Sequence);\n                } else {\n                    let minuteEntries = minutesBook.MinutesCategories[categoryIndex].MinutesEntries || [];\n                    entryFromResult.Sequence = entryFromResult.Sequence || (minuteEntries.length ? Math.max(...minuteEntries.map(e => e.Sequence || 0)) + 1 : 1);\n                    minuteEntries.push(entryFromResult);\n                    minuteEntries.sort((a, b) => a.Sequence - b.Sequence);\n                }\n            }\n        })\n        this.setState({\n            minutesBook: minutesBook\n        });\n    }\n\n    receiveCategoryByWebsocket(result) {\n        //Sometimes we'll receive a category that hasn't been updated that has the wrong sequence values    \n        //Also sometimes we'll get null responses\n        if (result[0].MinutesEntries) {\n            result[0].MinutesEntries.sort((a, b) => a.Sequence - b.Sequence);\n        }\n\n        let categoryFormDisabled = { ...this.state.categoryFormDisabled };\n        let minutesBook = JSON.parse(JSON.stringify(this.state.minutesBook));\n        result.forEach(categoryFromResult => {\n            // If these are not equal then the message is for another book\n            if (categoryFromResult.MinutesBookID === minutesBook.MinutesBookID) {\n                let categoryIndex = -1;\n                //Sometimes these arrays can be undefined if they have no data. Make sure that they are arrays so they don't cause problems down the line.\n                categoryFromResult.MinutesEntries = categoryFromResult.MinutesEntries || [];\n                categoryFromResult.MinutesEntries.forEach(entry => entry.MinutesActivities = entry.MinutesActivities || []);\n\n                categoryIndex = minutesBook.MinutesCategories.findIndex(category => category.MinutesCategoryID === categoryFromResult.MinutesCategoryID);\n                if (categoryIndex !== -1) {\n                    categoryFormDisabled[minutesBook.MinutesCategories[categoryIndex].Sequence] = false;\n                    minutesBook.MinutesCategories[categoryIndex] = categoryFromResult;\n                } else {\n                    minutesBook.MinutesCategories.push(categoryFromResult);\n                    minutesBook.MinutesCategories.sort((a, b) => a.Sequence - b.Sequence);\n                }\n            }\n        })\n        this.setState({\n            minutesBook: minutesBook,\n            categoryFormDisabled\n        });\n    }\n\n    componentDidMount() {\n        this.getMinutes();\n\n        this.props.actions.getCalendarCategoriesReferences('?Chambercode=S', true)\n            .then(() => {\n                this.setState({\n                    calendarCategories: this.props.calendar.calendarCategoriesReferences\n                });\n            });\n\n        const getConnectionId = (conn, connectionName) => {\n            //This connection ID might be used later\n            conn.invoke('getConnectionId')\n                .then(connectionId => {\n                    console.log(`${connectionName}: ${connectionId}`);\n                    this.setState({\n                        [connectionName]: connectionId\n                    });\n                });\n        }\n        //When a WebSocket message comes across with this label then the minutesbook object needs to be updated with new values\n        const handleMessage = (message, functionToRun) => {\n            try {\n                //the Value key holds error info when a save has failed\n                if (message.StatusCode > 399) throw 'Server Error: ' + JSON.stringify(message);\n                //Some reason the Value key doesn't parse. So I do it again here\n                let result;\n                if (message.Value)\n                    result = JSON.parse(message.Value);\n                else\n                    result = message;\n                functionToRun(result)\n                this.setState({\n                    lastSaveErr: '',\n                    lastSavedTime: moment(),\n                    isPendingChange: false\n                });\n            } catch (err) {\n                console.log(err);\n                this.setState({\n                    lastSaveErr: err.toString(),\n                    isPendingChange: false\n                });\n            }\n        };\n\n        //A second function is used because the JSON will look different depending on whether the data was\n        //originally saved by Websocket or by HTTP\n        const handleMessageOriginatedFromWebsocket = (message, functionToRun) => {\n            try {\n                //the Value key holds error info when a save has failed\n                if (!message.Success) throw 'Server Error: ' + JSON.stringify(message);\n                //Some reason the Value key doesn't parse. So I do it again here\n                let result;\n                if (message.Message)\n                    result = JSON.parse(message.Message);\n                else\n                    result = message;\n                functionToRun(result)\n                this.setState({\n                    lastSaveErr: '',\n                    lastSavedTime: moment(),\n                    isPendingChange: false\n                });\n            } catch (err) {\n                console.log(err);\n                this.setState({\n                    lastSaveErr: 'Error: save failed',\n                    isPendingChange: false\n                });\n            }\n\n        };\n\n        let entryConnection = new signalR.HubConnectionBuilder()\n            .withUrl((API_URL || process.env.REACT_APP_MINUTES_ENTRY_API_URL) + '/MinuteEntries/entries')\n            .withAutomaticReconnect([0, 0, 10000])\n            .build();\n        //Will change to a more reasonable timeout later\n        entryConnection.serverTimeoutInMilliseconds = 5000000000;\n        this.setState({\n            entryHubConnection: entryConnection\n        }, () => {\n            this.startConn(this.state.entryHubConnection, \"Entry\", () => getConnectionId(this.state.entryHubConnection, 'entryConnectionId'));\n            this.state.entryHubConnection.on(\"ReceiveMinuteEntry\", message => handleMessage(message, this.receiveEntryByWebsocket));\n            this.state.entryHubConnection.on(\"ReceiveEntry\", message => handleMessage(message, this.receiveEntryByWebsocket));\n            this.state.entryHubConnection.on(\"Receive\", message => handleMessageOriginatedFromWebsocket(message, this.receiveEntryByWebsocket));\n        });\n\n        let categoryConnection = new signalR.HubConnectionBuilder()\n            .withUrl((API_URL || process.env.REACT_APP_MINUTES_API_URL) + '/MinutesBook/categories')\n            .withAutomaticReconnect([0, 0, 10000])\n            .build();\n        //Will change to a more reasonable timeout later\n        categoryConnection.serverTimeoutInMilliseconds = 5000000000;\n        this.setState({\n            categoryHubConnection: categoryConnection\n        }, () => {\n            this.startConn(this.state.categoryHubConnection, \"Category\", () => getConnectionId(this.state.categoryHubConnection, 'categoryConnectionId'));\n            this.state.categoryHubConnection.on(\"ReceiveCategory\", message => handleMessage(message, this.receiveCategoryByWebsocket));\n            this.state.categoryHubConnection.on(\"Receive\", message => handleMessageOriginatedFromWebsocket(message, this.receiveCategoryByWebsocket))\n        });\n\n        // These are the different form inputs that the user can pick from when picking a motion\n        this.props.actions.getActionTypes()\n            .then(() => {\n                let actionTypes = [...this.props.minutes.actionTypes];\n                actionTypes.forEach(type => {\n                    type.label = type.ActionReferenceType;\n                    type.value = type.ActionReferenceTypeID;\n                })\n                this.setState({\n                    actionTypes: actionTypes\n                });\n            });\n    }\n\n    getMinutes() {\n        this.props.actions.getMinutesBook('?minutesbookID=' + this.props.match.params.minutesbookid, true)\n            .then(() => {\n                let minutesBook = this.props.minutes.minutesBook;\n                if (minutesBook.MinutesCategories) {\n                    //Check if the Sequence for each category is linear\n                    const sequences = minutesBook.MinutesCategories.map(mc => mc.Sequence);\n                    if (minutesBook.MinutesCategories.length > 0 && (minutesBook.MinutesCategories[0].Sequence !== 1 || !sequences.every((seq, i) => i === sequences.length - 1 || seq + 1 === sequences[i + 1]))) {\n                        //Get the sequence right. Sometimes the result back from the server has a lot of skipped indices\n                        minutesBook.MinutesCategories.forEach((category, index) => {\n                            category.Sequence = index + 1;\n                        });\n                        this.setState({\n                            minutesBook: minutesBook,\n                            isLoaded: true,\n                            previewFieldsetIsActive: true\n                        }, //Save the new sequence so we don't have to do this process again for this minutesbook\n                            async () => { await this.saveMinutesBook(); });\n                    } else { //It is in order so display the book\n                        this.setState({\n                            minutesBook: minutesBook,\n                            isLoaded: true,\n                            previewFieldsetIsActive: true\n                        });\n                    }\n                    // set fetchedMinutesBookIDs for the chairs report logic (see the fetchChairsReports method)\n                    let fetchedMinutesBookIDs = [];\n                    minutesBook.MinutesCategories.forEach(category => {\n                        if (category.CategoryType === \"Chairmans Report\" && category.MinutesEntries) {\n                            category.MinutesEntries.forEach(entry => {\n                                if (entry.MinutesSummaries) {\n                                    fetchedMinutesBookIDs = fetchedMinutesBookIDs.concat(entry.MinutesSummaries.filter(ms => ms.ReferenceID).flatMap(ms => ms.ReferenceID));\n                                }\n                            })\n                        }\n                    })\n                    fetchedMinutesBookIDs = [...new Set(fetchedMinutesBookIDs)];\n                    this.setState({ fetchedMinutesBookIDs });\n                } else {\n                    this.setState({\n                        minutesBook: '',\n                        isLoaded: true,\n                        previewFieldsetIsActive: false\n                    });\n                    this.props.actions.makeToast([{ message: \"Loading Failed\", type: \"failure\" }])\n                }\n                // This is used to add members to the motion forms\n                this.props.actions.getMemberList('sessionID=' + minutesBook.SessionID + '&chamberCode=S').then(() => {\n                    let memberList = [...this.props.members.memberList];\n                    memberList.forEach(member => {\n                        member.label = member.PatronDisplayName;\n                        member.value = member.MemberID;\n                    });\n                    this.setState({\n                        memberList: memberList\n                    });\n                });\n                // Have to get the session info in order to get the effective date for the committee list\n                this.props.actions.getSessionById(minutesBook.SessionID)\n                    .then(() => {\n                        this.props.actions.getCommitteeList('sessionID=' + this.props.session.selectedSession.SessionID + \"&includeSubCommittees=true\").then(() => {\n                            let committeeList = this.props.committee.committeeList;\n                            committeeList.forEach(committee => {\n                                committee.label = committee.Name;\n                                committee.value = committee.CommitteeID;\n                            });\n                            this.setState({\n                                committeeList: committeeList\n                            });\n                        });\n                        //get communication summary list for communication action reference pickers\n                        this.props.actions.getCommunicationSummaryList('sessionID=' + this.props.session.selectedSession.SessionID + \"&communicationTypeID=1&chamberCode=H\").then(() => {\n                            let communicationList = this.props.communications.communicationSummaryList;\n                            //summaries that have already been selected/used will not be returned from this endpoint, but they need to be in the dropdown in order for that selected option to appear as selected, so add these manually to the list\n                            const usedCommunicationSummaries = [...this.state.minutesBook.MinutesCategories].filter(mc => mc.MinutesEntries && mc.MinutesEntries.find(me => me.MinutesActivities && me.MinutesActivities.find(ma => ma.ActivityReferences && ma.ActivityReferences.find(ar => ar.ActionReferenceType === \"Communication\" && ar.ReferenceID)))).flatMap(mc => mc.MinutesEntries.filter(me => me.MinutesActivities && me.MinutesActivities.find(ma => ma.ActivityReferences && ma.ActivityReferences.find(ar => ar.ActionReferenceType === \"Communication\" && ar.ReferenceID)))).flatMap(me => me.MinutesActivities.filter(ma => ma.ActivityReferences && ma.ActivityReferences.find(ar => ar.ActionReferenceType === \"Communication\" && ar.ReferenceID))).flatMap(ma => ma.ActivityReferences.filter(ar => ar.ActionReferenceType === \"Communication\" && ar.ReferenceID));\n                            usedCommunicationSummaries.forEach(usedCommunicationSummary => {\n                                if (!communicationList.find(communication => communication.CommunicationID === usedCommunicationSummary.ReferenceID)) {\n                                    const minutesEntry = [...this.state.minutesBook.MinutesCategories].find(mc => mc.MinutesEntries && mc.MinutesEntries.find(me => me.MinutesActivities && me.MinutesActivities.find(ma => ma.MinutesActivityID === usedCommunicationSummary.MinutesActivityID))).MinutesEntries.find(me => me.MinutesActivities && me.MinutesActivities.find(ma => ma.MinutesActivityID === usedCommunicationSummary.MinutesActivityID));\n                                    const communicationSummaries = minutesEntry.MinutesSummaries ? minutesEntry.MinutesSummaries.filter(ms => ms.ReferenceID === usedCommunicationSummary.ReferenceID).map(ms => ({ ...ms, CommunicationID: ms.ReferenceID })) : [];\n                                    communicationList.push({ ReferenceNumber: usedCommunicationSummary.ReferenceText, CommunicationID: usedCommunicationSummary.ReferenceID, CommunicationSummaries: communicationSummaries, CommunicationDate: minutesEntry.CommunicationDate, CommunicationNumber: minutesEntry.CommunicationNumber })\n                                    //sort list by CommunicationDate and CommunicationNumber, if not present then use the ReferenceNumber to determine the Date/Number\n                                    communicationList.sort((a, b) => a.CommunicationDate && b.CommunicationDate ?\n                                        moment(b.CommunicationDate).isAfter(moment(a.CommunicationDate), 'day') ? 1 :\n                                            moment(b.CommunicationDate).isBefore(moment(a.CommunicationDate), 'day') ? -1 :\n                                                Number(a.CommunicationNumber) - Number(b.CommunicationNumber)\n                                        : a.ReferenceNumber && b.ReferenceNumber && a.ReferenceNumber.length >= 7 && b.ReferenceNumber.length >= 7 ?\n                                            Number(b.ReferenceNumber.substring(b.ReferenceNumber.length - 4)) - Number(a.ReferenceNumber.substring(a.ReferenceNumber.length - 4))\n                                            : b.ReferenceNumber - a.ReferenceNumber)\n                                }\n                            })\n                            communicationList.forEach(communication => {\n                                communication.label = communication.ReferenceNumber;\n                                communication.value = communication.CommunicationID;\n                            });\n                            this.setState({\n                                communicationList: communicationList\n                            });\n                        });\n                    })\n                // Used to apply a legislation number to an entry\n                this.props.actions.getBillNumbers('?sessionID=' + minutesBook.SessionID).then(() => {\n                    let billNumbers = this.props.bills.billNumbers;\n                    billNumbers.forEach(bill => {\n                        bill.label = bill.LegislationNumber;\n                        bill.value = bill.LegislationNumber;\n                    })\n                    this.setState({\n                        sessionBills: billNumbers\n                    });\n                })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return\n                }\n                console.log(err);\n                this.setState({\n                    minutesBook: '',\n                    isLoaded: true,\n                });\n            });\n    }\n\n    startConn(conn, type, cb) {\n        conn\n            .start({ withCredentials: false })\n            .then(() => {\n                this.setState({\n                    ['building' + type + 'Connection']: false\n                })\n                conn.onreconnecting((e) => {\n                    if (e) console.log(e);\n                    this.props.actions.makeToast([{ message: type + \" Connection Reconnecting\", type: \"warning\" }])\n                    console.log(type + \" connection reconnecting\")\n                    this.setState({ ['reconnecting' + type]: true })\n                })\n                conn.onreconnected((e) => {\n                    if (e) console.log(e);\n                    this.props.actions.makeToast([{ message: type + \" Connection Reconnected\", type: \"success\" }])\n                    console.log(type + \" connection reconnected\")\n                    this.setState({ ['reconnecting' + type]: false })\n                })\n                conn.onclose((e) => {\n                    this.props.actions.makeToast([{ message: type + \" Connection Closed\", type: \"failure\" }])\n                    console.log(type + \" connection closed\", e ?? \"\");\n                    this.setState({ ['closed' + type]: true, ['reconnecting' + type]: false })\n                })\n                if (cb) cb();\n            }).catch(err => {\n                console.log('Error while establishing connection :( ' + err)\n                this.props.actions.makeToast([{ message: type + \" Connection Failed\", type: \"failure\" }])\n            });\n    }\n\n    toggleFetchChairs() {\n        this.setState({ fetchChairsReports: !this.state.fetchChairsReports })\n    }\n\n    handleChairsReportDateChange(date, key) {\n        if (date) {\n            if (key === \"START\") {\n                this.setState({\n                    chairsReportStartDate: moment(date).startOf('day'),\n                    chairsReportEndDate: this.state.chairsReportEndDate || moment(date).endOf('day')\n                })\n            } else {\n                this.setState({\n                    chairsReportEndDate: moment(date).endOf('day')\n                })\n            }\n        }\n    }\n\n    fetchChairsReports() {\n        this.setState({ fetchingChairsReports: true, disableChanges: true }, () => {\n            this.props.actions.getMinutesList('sessionID=' + this.state.minutesBook.SessionID + '&startDate=' + moment(this.state.chairsReportStartDate).format(\"MM/DD/yyyy\") + '&endDate=' + this.state.chairsReportEndDate.format(\"MM/DD/yyyy\"), false).then(() => {\n                if (this.props.minutes.minutesList) {\n                    const committeeMinutesBooks = this.props.minutes.minutesList.filter(c => c.ChamberCode === 'S' && c.CommitteeID && c.MinutesStatus && c.MinutesStatus.toLowerCase() === 'closed');\n                    if (committeeMinutesBooks.length) {\n                        //combine the minutes books from this date range with the minutes books already fetched from previous date ranges\n                        const committeeMinutesBookIDs = committeeMinutesBooks.map(c => c.MinutesBookID);\n                        const combinedMinutesBookIDs = committeeMinutesBookIDs.concat([...this.state.fetchedMinutesBookIDs]);\n                        const uniqueCombinedMinutesBookIDs = [...new Set(combinedMinutesBookIDs)];\n                        this.props.actions.getCommitteeMinutesSummary('?' + uniqueCombinedMinutesBookIDs.map((id, idx) => (idx ? '&' : '') + 'minutesBookIDs=' + id).join('')).then(async () => {\n                            this.setState({ fetchedMinutesBookIDs: uniqueCombinedMinutesBookIDs })\n                            let minutesBook = { ...this.state.minutesBook };\n                            minutesBook.MinutesCategories = minutesBook.MinutesCategories || [];\n                            let committeeMinutesSummary = this.props.minutes.committeeMinutesSummary;\n                            let totalIterations = 0;\n                            let newIterations = 0;\n                            let idx = 0;\n                            for (const category of committeeMinutesSummary) {\n                                if (minutesBook.MinutesCategories.find(mc => mc.CalendarCategoryTypeID === category.CalendarCategoryTypeID)) {\n                                    let matchingIterations = 0;\n                                    //update the existing categories that are of this same type\n                                    minutesBook.MinutesCategories.filter(mc => mc.CalendarCategoryTypeID === category.CalendarCategoryTypeID).forEach((existingMatchingCategory, matchingCategoryIdx) => {\n                                        const existingCategoryIndex = minutesBook.MinutesCategories.findIndex(mc => mc.MinutesCategoryID === existingMatchingCategory.MinutesCategoryID);\n                                        minutesBook.MinutesCategories[existingCategoryIndex].CategoryText = category.CategoryDescription;\n                                        minutesBook.MinutesCategories[existingCategoryIndex].CategoryDescription = category.CategoryDescription;\n                                        category.MinutesEntries.forEach(entry => {\n                                            //for each entry (i.e. cmte) of this category from the response, check if the entry (i.e. committee) already exists\n                                            const cmte = entry.MinutesSummaries && entry.MinutesSummaries.find(ms => ms.CommitteeID);\n                                            if (cmte) {\n                                                const existingMatchingEntryIndex = existingMatchingCategory.MinutesEntries.findIndex(me => me.MinutesSummaries && me.MinutesSummaries.find(ms => ms.CommitteeID && ms.CommitteeID === cmte.CommitteeID));\n                                                if (existingMatchingEntryIndex > -1) {\n                                                    //entry/cmte already exists - add new summaries/ignore existing ones, and update the entrytext regardless\n                                                    //iterate over each summary returned from the response, check to see if the summary's ReferenceID (minutes book) is already in this entry.\n                                                    //if it is, we already have this summary, so just update the MinutesSummary text attr since it may have new bills in it. If we don't have this summary at all, add it\n                                                    entry.MinutesSummaries.forEach(summary => {\n                                                        const existingMatchingSummaryIndex = existingMatchingCategory.MinutesEntries[existingMatchingEntryIndex].MinutesSummaries.findIndex(ms => ms.ReferenceID === summary.ReferenceID);\n                                                        if (existingMatchingSummaryIndex > -1) {\n                                                            minutesBook.MinutesCategories[existingCategoryIndex].MinutesEntries[existingMatchingEntryIndex].MinutesSummaries[existingMatchingSummaryIndex].MinutesSummary = summary.MinutesSummary\n                                                        } else {\n                                                            minutesBook.MinutesCategories[existingCategoryIndex].MinutesEntries[existingMatchingEntryIndex].MinutesSummaries.push(summary);\n                                                        }\n                                                    })\n                                                    minutesBook.MinutesCategories[existingCategoryIndex].MinutesEntries[existingMatchingEntryIndex].EntryText = entry.EntryText;\n                                                } else {\n                                                    //entry/cmte is new/doesn't already exist - add the new entry/cmte\n                                                    minutesBook.MinutesCategories[existingCategoryIndex].MinutesEntries.push(entry);\n                                                }\n                                            }\n                                        })\n                                        //save category with updated/new entries\n                                        this.state.categoryHubConnection.invoke(\"SaveCategory\", minutesBook.MinutesCategories[existingCategoryIndex], localStorage.getItem('LIS_ID_TOKEN'))\n                                            .then(() => {\n                                                //the EntryText of all the entries for each of these categories will now include even the excluded chairs reports again. Use the regenerate endpt since this will take that into account\n                                                this.regenerateChairsReportCategory(minutesBook.MinutesCategories[existingCategoryIndex].Sequence - 1, () => {\n                                                    matchingIterations++;\n                                                    if (matchingIterations === minutesBook.MinutesCategories.filter(mc => mc.CalendarCategoryTypeID === category.CalendarCategoryTypeID).length) {\n                                                        totalIterations++;\n                                                    }\n                                                    if (totalIterations === committeeMinutesSummary.length && matchingIterations === minutesBook.MinutesCategories.filter(mc => mc.CalendarCategoryTypeID === category.CalendarCategoryTypeID).length) {\n                                                        this.setState({ fetchingChairsReports: false, disableChanges: false })\n                                                    }\n                                                });\n                                            }).catch(function (err) {\n                                                console.error(err.toString());\n                                                if (idx === committeeMinutesSummary.length - 1) {\n                                                    this.setState({ fetchingChairsReports: false, disableChanges: false })\n                                                }\n                                            });\n                                    })\n                                } else {\n                                    //no existing categories are of this same type, create the category as new\n                                    newIterations++;\n                                    category.ReleaseToPreview = true;\n                                    category.CategoryText = category.CategoryDescription;\n                                    category.Sequence = minutesBook.MinutesCategories.length + newIterations;\n                                    await this.createCategory(category, () => {\n                                        if (idx === committeeMinutesSummary.length - 1) {\n                                            this.setState({ fetchingChairsReports: false, disableChanges: false })\n                                        }\n                                    });\n                                }\n                                idx++;\n                            }\n                        }).catch(err => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            console.log(err);\n                            this.setState({\n                                fetchingChairsReports: false,\n                                disableChanges: false\n                            })\n                            this.props.actions.makeToast([{ message: 'Failed to get chairs report summary', type: \"failure\" }])\n                        });\n                    } else {\n                        this.setState({ fetchingChairsReports: false, disableChanges: false })\n                    }\n                } else {\n                    this.setState({ fetchingChairsReports: false, disableChanges: false })\n                }\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n                this.setState({ fetchingChairsReports: false, disableChanges: false })\n                this.props.actions.makeToast([{ message: 'Failed to get Chairs Reports', type: \"failure\" }])\n            });\n        })\n    }\n\n    toggleChairsReport(activitySequence, entryIndex, summaryIndex) {\n        let minutesBook = { ...this.state.minutesBook };\n        minutesBook.MinutesCategories[activitySequence].MinutesEntries[entryIndex].MinutesSummaries[summaryIndex].IsActive = !minutesBook.MinutesCategories[activitySequence].MinutesEntries[entryIndex].MinutesSummaries[summaryIndex].IsActive\n\n        let chairReportCategoriesSetForRegeneration = [...this.state.chairReportCategoriesSetForRegeneration];\n        if (!chairReportCategoriesSetForRegeneration.find(c => c === minutesBook.MinutesCategories[activitySequence].MinutesCategoryID)) {\n            chairReportCategoriesSetForRegeneration.push(minutesBook.MinutesCategories[activitySequence].MinutesCategoryID);\n        }\n\n        this.setState({ minutesBook, chairReportCategoriesSetForRegeneration })\n    }\n\n    regenerateChairsReportCategory(activitySequence, callback) {\n        let minutesBook = { ...this.state.minutesBook };\n        let chairReportCategoriesSetForRegeneration = [...this.state.chairReportCategoriesSetForRegeneration];\n        let regeneratingCategories = [...this.state.regeneratingCategories];\n        regeneratingCategories.push(minutesBook.MinutesCategories[activitySequence].MinutesCategoryID);\n        this.setState({ regeneratingCategories }, () => {\n            const committeeMinutesBookIDs = minutesBook.MinutesCategories[activitySequence].MinutesEntries.flatMap(me => me.MinutesSummaries).filter(ms => ms?.IsActive && ms?.ReferenceID).map(ms => ms.ReferenceID);\n            if (committeeMinutesBookIDs.length) {\n                this.props.actions.getCommitteeMinutesSummary('?' + committeeMinutesBookIDs.map((id, idx) => (idx ? '&' : '') + 'minutesBookIDs=' + id).join('')).then(() => {\n                    let committeeMinutesSummary = this.props.minutes.committeeMinutesSummary.find(c => c.CalendarCategoryTypeID === minutesBook.MinutesCategories[activitySequence].CalendarCategoryTypeID);\n                    minutesBook.MinutesCategories[activitySequence].MinutesEntries.forEach((entry, idx) => {\n                        const associatedCommitteeMinutesEntry = committeeMinutesSummary.MinutesEntries.find(me => me.MinutesSummaries?.find(ms => ms.CommitteeID && entry.MinutesSummaries?.find(existingMs => existingMs?.IsActive && ms?.CommitteeID === existingMs?.CommitteeID)))\n                        if (associatedCommitteeMinutesEntry) {\n                            minutesBook.MinutesCategories[activitySequence].MinutesEntries[idx].EntryText = associatedCommitteeMinutesEntry.EntryText;\n                        } else {\n                            minutesBook.MinutesCategories[activitySequence].MinutesEntries[idx].EntryText = '';\n                        }\n                    })\n                    this.state.categoryHubConnection.invoke(\"SaveCategory\", minutesBook.MinutesCategories[activitySequence], localStorage.getItem('LIS_ID_TOKEN'))\n                        .catch(function (err) {\n                            console.error(err.toString());\n                        }).finally(() => {\n                            //refresh these since the method can be run multiple times at once\n                            chairReportCategoriesSetForRegeneration = [...this.state.chairReportCategoriesSetForRegeneration];\n                            regeneratingCategories = [...this.state.regeneratingCategories];\n                            chairReportCategoriesSetForRegeneration.splice(chairReportCategoriesSetForRegeneration.indexOf(minutesBook.MinutesCategories[activitySequence].MinutesCategoryID), 1);\n                            regeneratingCategories.splice(regeneratingCategories.indexOf(minutesBook.MinutesCategories[activitySequence].MinutesCategoryID), 1);\n                            this.setState({ regeneratingCategories, chairReportCategoriesSetForRegeneration })\n                            if (callback) {\n                                callback();\n                            }\n                        });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err);\n                    //refresh these since the method can be run multiple times at once\n                    chairReportCategoriesSetForRegeneration = [...this.state.chairReportCategoriesSetForRegeneration];\n                    regeneratingCategories = [...this.state.regeneratingCategories];\n                    chairReportCategoriesSetForRegeneration.splice(chairReportCategoriesSetForRegeneration.indexOf(minutesBook.MinutesCategories[activitySequence].MinutesCategoryID), 1);\n                    regeneratingCategories.splice(regeneratingCategories.indexOf(minutesBook.MinutesCategories[activitySequence].MinutesCategoryID), 1);\n                    this.setState({\n                        regeneratingCategories,\n                        chairReportCategoriesSetForRegeneration\n                    })\n                    this.props.actions.makeToast([{ message: 'Failed to get chairs report summary', type: \"failure\" }])\n                    if (callback)\n                        callback();\n                });\n            } else {\n                minutesBook.MinutesCategories[activitySequence].MinutesEntries.forEach(entry => {\n                    entry.EntryText = '';\n                })\n                //refresh these since the method can be run multiple times at once\n                chairReportCategoriesSetForRegeneration = [...this.state.chairReportCategoriesSetForRegeneration];\n                regeneratingCategories = [...this.state.regeneratingCategories];\n                chairReportCategoriesSetForRegeneration.splice(chairReportCategoriesSetForRegeneration.indexOf(minutesBook.MinutesCategories[activitySequence].MinutesCategoryID), 1);\n                regeneratingCategories.splice(regeneratingCategories.indexOf(minutesBook.MinutesCategories[activitySequence].MinutesCategoryID), 1);\n                this.setState({ regeneratingCategories, chairReportCategoriesSetForRegeneration })\n                if (callback)\n                    callback();\n            }\n        })\n    }\n\n    toggleMinutesStatus() {\n        let minutesBook = { ... this.state.minutesBook };\n\n        minutesBook.MinutesStatusId = minutesBook.MinutesStatusID === 4 ? 2 : 4;\n        delete minutesBook.MinutesCategories;\n        delete minutesBook.MinutesFiles;\n        delete minutesBook.MinutesCalendars;\n\n        this.props.actions.saveMinutesBook(minutesBook)\n            .then(() => {\n                this.getMinutes();\n            })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        if (this.state.isLoaded) {\n            return (\n                <div className=\"user-forms dlas-forms\">\n                    <h2>{moment(this.state.minutesBook.MinutesDate).format(\"LL\")}</h2>\n                    <div style={{ marginBottom: \"20px\" }}>\n                        <div style={{ height: '30px', display: \"grid\", gridTemplateColumns: \"275px 1fr 475px\" }}>\n                            <div style={{ float: \"left\", display: \"inline-flex\" }}>\n                                <button type=\"button\" className=\"button primary\" onClick={() => this.toggleMinutesStatus()}>{(this.state.minutesBook.MinutesStatusID === 4 ? \"Open\" : \"Close\") + \" Minutes\"}</button>\n                                <label style={{ marginLeft: \"10px\" }}>Minutes Status: <span className={this.state.minutesBook.MinutesStatusID === 4 ? \"fail\" : \"txt-green\"}>{this.state.minutesBook.MinutesStatusID === 4 ? \"Closed\" : \"Open\"}</span></label>\n                            </div>\n                            <div />\n                            {this.state.fetchChairsReports ?\n                                <div className=\"flex-vertical-center\" style={{ display: \"grid\", gridTemplateColumns: \"20px 200px 200px 80px\", height: \"30px\", alignItems: \"end\", marginTop: \"-20px\" }}>\n                                    <button className=\"icon delete\" style={{ flexShrink: '0', marginBottom: \"10px\" }} onClick={this.toggleFetchChairs} />\n                                    <div style={{ width: '165px' }}>\n                                        <label>Start Date</label>\n                                        <DatePicker\n                                            selected={this.state.chairsReportStartDate}\n                                            onChange={(val) => this.handleChairsReportDateChange(val, \"START\")}\n                                            className='event-date-picker'\n                                        />\n                                    </div>\n                                    <div style={{ width: '165px' }}>\n                                        <label>End Date</label>\n                                        <DatePicker\n                                            selected={this.state.chairsReportEndDate}\n                                            onChange={(val) => this.handleChairsReportDateChange(val, \"END\")}\n                                            className='event-date-picker'\n                                        />\n                                    </div>\n                                    <div style={{ display: 'flex', alignItems: 'end' }}>\n                                        <button className=\"button\" disabled={!this.state.chairsReportStartDate || !this.state.chairsReportEndDate || this.state.fetchingChairsReports || this.state.regeneratingCategories.length} onClick={this.fetchChairsReports}>{this.state.fetchingChairsReports ? <div className=\"small-spinner\" /> : 'Go'}</button>\n                                    </div>\n                                </div>\n                                :\n                                <button className=\"button\" style={{ width: \"200px\", marginLeft: \"275px\" }} onClick={this.toggleFetchChairs}>Fetch Chair's Reports</button>\n                            }\n                        </div>\n                    </div>\n                    {this.state.showMoveEntryDialog &&\n                        <div className='popup' onClick={() => this.toggleMoveEntry(false)}>\n                            <div className='popup-inner tall-content' onClick={e => e.stopPropagation()}>\n                                {this.state.categoriesToMove.length === 0 ?\n                                    <p>There are no categories where you can move this entry</p>\n                                    :\n                                    <p>Choose a category to move the entry to</p>\n                                }\n                                <div style={{ paddingBottom: '10px' }}>\n                                    <ReactTable\n                                        data={this.state.categoriesToMove}\n                                        getTrProps={(_state, rowInfo) => {\n                                            return {\n                                                style: {\n                                                    background: rowInfo && rowInfo.index === this.state.selectedCategoryToMoveTo ? '#89ff89' : '',\n                                                    cursor: rowInfo ? 'pointer' : 'default'\n                                                },\n                                                onClick: () => this.setState({ selectedCategoryToMoveTo: rowInfo.index })\n                                            }\n                                        }}\n                                        noDataText=\"\"\n                                        columns={[\n                                            {\n                                                id: \"checkbox\",\n                                                accessor: \"\",\n                                                className: \"checkbox-column\",\n                                                Cell: ({ index }) => {\n                                                    return <span className={index === this.state.selectedCategoryToMoveTo ? \"icon checkmark\" : \"\"}></span>;\n                                                },\n                                                sortable: false,\n                                                filterable: false,\n                                                width: 45\n                                            },\n                                            {\n                                                Header: \"Sequence\",\n                                                accessor: \"Sequence\",\n                                                width: 50\n                                            },\n                                            {\n                                                Header: \"Type\",\n                                                accessor: \"CategoryType\"\n                                            },\n                                            {\n                                                Header: \"Description\",\n                                                accessor: \"CategoryDescription\"\n                                            }\n                                        ]}\n                                        defaultPageSize={5}\n                                        className=\"-striped -highlight\"\n                                    />\n                                </div>\n                                <div className=\"flex-row\" sty>\n                                    <button className=\"button secondary\" onClick={() => this.toggleMoveEntry(false)}>Cancel</button>\n                                    {this.state.categoriesToMove.length > 0 &&\n                                        <button disabled={this.state.selectedCategoryToMoveTo === -1} onClick={() => this.moveEntry(this.state.selectedCategoryToMoveTo)} className=\"button\">Move</button>\n                                    }\n                                </div>\n                            </div>\n                        </div>\n                    }\n                    <fieldset className={this.state.indexFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                        <legend onClick={this.toggleFieldsetCollapse.bind(this, 'indexFieldsetIsActive')}>Index</legend>\n                        <div>\n                            <MinutesIndex\n                                categories={this.state.minutesBook.MinutesCategories ? this.state.minutesBook.MinutesCategories : []}\n                                onSequenceChange={this.handleSequenceChange}\n                                showPreview={this.showPreview}\n                                showActivity={this.showActivity}\n                                createCategory={this.createCategory}\n                                duplicateChairmansCategory={this.duplicateChairmansCategory}\n                                getCategoryDescriptionText={this.getCategoryDescriptionText}\n                                creatingCategory={this.state.creatingCategory}\n                                calendarCategories={this.state.calendarCategories}\n                                currentActivitySequence={this.state.currentActivitySequence}\n                                disableChanges={this.state.disableChanges || this.state.buildingCategoryConnection || this.state.buildingEntryConnection || this.state.reconnectingCategory || this.state.closedCategory}\n                                categoryFormDisabled={this.state.categoryFormDisabled} />\n                        </div>\n                    </fieldset>\n                    <fieldset ref={this.activityRef} className={this.state.activityFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                        <legend onClick={this.toggleFieldsetCollapse.bind(this, 'activityFieldsetIsActive')}>Activity</legend>\n                        <div className=\"flex-row\">\n                            <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>\n                                {!this.state.editingCategoryText ?\n                                    <>\n                                        <p className=\"small-header\">{this.state.currentActivitySequence !== 0 && this.getCategoryDescriptionText(this.state.minutesBook.MinutesCategories[this.state.currentActivitySequence - 1])}</p>\n                                        {this.state.currentActivitySequence !== 0 && !this.state.categoryFormDisabled[this.state.currentActivitySequence] && <a className=\"icon edit\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryText()} />}\n                                    </>\n                                    :\n                                    <>\n                                        <input style={{ width: '50%' }} value={this.state.tempCategoryText} onChange={(e) => this.setTempCategoryText(e.target.value)} />\n                                        <a className=\"icon save\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryText(true)} />\n                                        <a className=\"icon delete\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryText()} />\n                                    </>\n                                }\n                            </div>\n                            {this.state.currentActivitySequence && this.state.currentActivitySequence !== 0 && this.state.minutesBook.MinutesCategories && this.state.chairReportCategoriesSetForRegeneration.find(categoryID => categoryID === this.state.minutesBook.MinutesCategories[this.state.currentActivitySequence - 1].MinutesCategoryID) ?\n                                <div className=\"flex-row flex-vertical-center\">\n                                    <button disabled={this.state.fetchingChairsReports || this.state.regeneratingCategories.find(categoryID => categoryID === this.state.minutesBook.MinutesCategories[this.state.currentActivitySequence - 1].MinutesCategoryID)}\n                                        onClick={() => this.regenerateChairsReportCategory(this.state.currentActivitySequence - 1)}\n                                        type=\"button\" className=\"button\">{this.state.regeneratingCategories.find(categoryID => categoryID === this.state.minutesBook.MinutesCategories[this.state.currentActivitySequence - 1].MinutesCategoryID) ? <div className=\"small-spinner\" /> : \"Regenerate Summary\"}</button>\n                                </div>\n                                : null}\n                        </div>\n                        {this.state.currentActivitySequence && this.state.currentActivitySequence !== 0 ?\n                            <TypeSwitcher\n                                type={this.state.activity}\n                                ref={this.entryFormRef}\n                                onEntryChange={this.entryChange}\n                                onMultipleEntryChange={this.multipleEntryChange}\n                                currentActivitySequence={this.state.currentActivitySequence}\n                                handleSaveEntry={this.saveEntry}\n                                sessionId={this.state.minutesBook.SessionID}\n                                sessionCode={this.state.minutesBook.SessionCode}\n                                memberList={this.state.memberList}\n                                committeeList={this.state.committeeList}\n                                communicationList={this.state.communicationList}\n                                actionTypes={this.state.actionTypes}\n                                toggleMoveEntry={this.toggleMoveEntry}\n                                bulkMoveEntry={this.bulkMoveEntry}\n                                sessionBills={this.state.sessionBills}\n                                toggleChairsReport={this.toggleChairsReport}\n                                chairReportCategoriesSetForRegeneration={this.state.chairReportCategoriesSetForRegeneration}\n                                formData={this.state.minutesBook.MinutesCategories ? this.state.minutesBook.MinutesCategories[this.state.currentActivitySequence - 1] : {}}\n                                categories={this.state.minutesBook.MinutesCategories || []}\n                                getCategoryDescriptionText={this.getCategoryDescriptionText}\n                                createCategory={this.createCategory}\n                                disableChanges={this.state.disableChanges}\n                                categoryFormDisabled={this.state.categoryFormDisabled[this.state.currentActivitySequence] || this.state.reconnectingCategory || this.state.reconnectingEntry || this.state.closedCategory || this.state.closedEntry} />\n                            : null}\n                    </fieldset>\n                    <fieldset className={this.state.previewFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                        <legend onClick={this.toggleFieldsetCollapse.bind(this, 'previewFieldsetIsActive')}>Preview</legend>\n                        <Preview\n                            categories={this.state.minutesBook.MinutesCategories ? this.state.minutesBook.MinutesCategories : []}\n                            isPendingChange={this.state.isPendingChange}\n                            lastSaveErr={this.state.lastSaveErr}\n                            lastSavedTime={this.state.lastSavedTime}\n                            buildingCategoryConnection={this.state.buildingCategoryConnection}\n                            buildingEntryConnection={this.state.buildingEntryConnection}\n                            reconnectingCategory={this.state.reconnectingCategory}\n                            reconnectingEntry={this.state.reconnectingEntry}\n                            closedCategory={this.state.closedCategory}\n                            closedEntry={this.state.closedEntry}\n                            lastPublishedTime={this.state.lastPublishedTime}\n                            publishAllEntries={this.publishAllEntries}\n                            publishing={this.state.publishing} />\n                    </fieldset>\n                </div>\n\n            )\n        } else {\n            return (\n                <div className=\"user-forms dlas-forms\">\n                    <LoaderComponent className=\"center-spinner\" data={this.state.isLoaded} />\n                </div>\n            )\n        }\n    }\n}\n\nconst getItemStyle = (isDisabled, isDragging, draggableStyle, pendingDeletion) => ({\n    userSelect: 'none',\n    background: isDisabled ? '#c7c7c7' : isDragging ? '#34495e' : 'white',\n    color: isDisabled ? 'black' : isDragging ? 'white' : '#34495e',\n    border: pendingDeletion ? 'red' : 'none',\n    ...draggableStyle,\n});\n\nconst getListStyle = isDraggingOver => ({\n    background: isDraggingOver ? '#8b9fb3' : '#666666',\n    width: '100%',\n});\n\nclass MinutesIndex extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedCalendarCategory: ''\n        }\n\n        this.handleCalendarCategoryChange = this.handleCalendarCategoryChange.bind(this);\n        this.createCategory = this.createCategory.bind(this);\n    }\n    handleCalendarCategoryChange(value) {\n        this.setState({\n            selectedCalendarCategory: value\n        });\n    }\n\n    async createCategory() {\n        if (this.state.selectedCalendarCategory.CategoryType === \"Chairmans Report\" && this.props.categories.find(c => c.CalendarCategoryTypeID === this.state.selectedCalendarCategory.CalendarCategoryTypeID)) {\n            await this.props.duplicateChairmansCategory(this.state.selectedCalendarCategory.CalendarCategoryTypeID);\n            this.setState({\n                selectedCalendarCategory: ''\n            });\n        } else {\n            const newCategory = {\n                ...this.state.selectedCalendarCategory,\n                CategoryDescription: this.state.selectedCalendarCategory.Description,\n                ReleaseToPreview: true,\n                Sequence: this.props.categories.length + 1\n            };\n            this.setState({\n                selectedCalendarCategory: ''\n            });\n            await this.props.createCategory(newCategory);\n        }\n    }\n\n    onDragEnd(result) {\n        // dropped outside the list\n        if (!result.destination) {\n            return;\n        }\n        const items = (() => {\n            const list = Array.from(this.props.categories);\n            const [removed] = list.splice(result.source.index, 1);\n\n            list.splice(result.destination.index, 0, removed);\n            // Reorder the Sequence value too because the sequence value is used to show what order the preview is in\n            list.forEach(function (element, index) {\n                element.Sequence = index + 1\n            });\n            return list;\n        })();\n        //Send the new values up to the parent to be set in the parent's state\n        this.props.onSequenceChange(items);\n    }\n\n\n    render() {\n        if (this.props.categories) {\n            return (\n                <div className={this.props.disableChanges ? 'dnd-disabled' : ''}>\n                    <DragDropContext onDragEnd={this.onDragEnd.bind(this)}>\n                        <Droppable droppableId=\"droppable\">\n                            {(provided, snapshot) => (\n                                <table\n                                    className=\"dnd-grid-table minutes-categories-grid\"\n                                    ref={provided.innerRef}\n                                    style={getListStyle(snapshot.isDraggingOver)}\n                                >\n                                    <thead className=\"dnd-grid-header\" style={getListStyle(snapshot.isDraggingOver)}>\n                                        <tr>\n                                            <th scope=\"col\" id={'-grabber-column'}></th>\n                                            <th scope=\"col\" id={'-display-column'}>Display #</th>\n                                            <th scope=\"col\" id={'-display-column'}>Include</th>\n                                            <th scope=\"col\" id={'-display-column'}>Section</th>\n                                            <th scope=\"col\" id={'-actions-column'}>Actions</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody>\n                                        {this.props.categories.map((item, index) => (\n                                            <Draggable isDragDisabled={this.props.disableChanges || this.props.categoryFormDisabled[item.Sequence]} key={`${item.Sequence}-${item.MinutesCategoryID}`} draggableId={`${item.Sequence}-${item.MinutesCategoryID}`} index={index}>\n                                                {(provided, snapshot) => (\n                                                    <tr\n                                                        ref={provided.innerRef}\n                                                        {...provided.draggableProps}\n                                                        {...provided.dragHandleProps}\n                                                        className={this.props.categories[this.props.currentActivitySequence - 1] === item ? 'selected' : 'not-selected'}\n                                                        style={getItemStyle(\n                                                            this.props.disableChanges || this.props.categoryFormDisabled[item.Sequence],\n                                                            snapshot.isDragging,\n                                                            provided.draggableProps.style\n                                                        )} >\n                                                        <td><button id={item.MinutesCategoryID + '-grabber-button'} className=\"button draggable\">Drag and drop</button></td>\n                                                        <td>{index + 1}</td>\n                                                        <td><input type=\"checkbox\" disabled={this.props.disableChanges || this.props.categoryFormDisabled[item.Sequence]} checked={this.props.categories[index].ReleaseToPreview === true} onChange={() => this.props.showPreview(index)} /></td>\n                                                        <td className='category-desc' style={this.props.disableChanges || this.props.categoryFormDisabled[item.Sequence] ? { pointerEvents: 'none' } : {}} onClick={(e) => this.props.showActivity(this.props.categories[index], e)}>\n                                                            {this.renderCategoryDescription(item)}\n                                                        </td>\n                                                        <td>\n                                                            <button\n                                                                type=\"button\"\n                                                                style={this.props.disableChanges || this.props.categoryFormDisabled[item.Sequence] ? { pointerEvents: 'none' } : {}}\n                                                                onClick={(e) => this.props.showActivity(this.props.categories[index], e)}\n                                                                className={this.props.categories[this.props.currentActivitySequence - 1] === item\n                                                                    ? 'icon edit-alt'\n                                                                    : 'icon edit'}>\n                                                            </button>\n                                                        </td>\n                                                    </tr>\n                                                )}\n                                            </Draggable>\n                                        ))}\n                                        {provided.placeholder}\n                                        <tr style={getItemStyle(false)} >\n                                            <td></td>\n                                            <td></td>\n                                            <td></td>\n                                            <td className=\"category-desc\">\n                                                <div style={{ width: '80%' }}>\n                                                    <Select\n                                                        value={this.state.selectedCalendarCategory}\n                                                        onChange={this.handleCalendarCategoryChange}\n                                                        options={this.props.calendarCategories}\n                                                        getOptionLabel={option => (option.DisplayType ? option.CategoryType + ' - ' : '') + option.Description}\n                                                        getOptionValue={option => option.CalendarCategoryTypeID}\n                                                    />\n                                                </div>\n                                            </td>\n                                            <td><button disabled={this.props.creatingCategory || !this.state.selectedCalendarCategory} onClick={async () => await this.createCategory()} type=\"button\" className=\"button small-button\">{this.props.creatingCategory ? 'Adding' : 'Add'}</button></td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            )}\n                        </Droppable>\n                    </DragDropContext>\n                </div>\n            )\n        } else {\n            return (<div></div>)\n        }\n    }\n\n    //Some categories get the type pre-pended to the description while other do not\n    renderCategoryDescription(item) {\n        //The reason why buttons are in here is because the form saves when an input is blurred. The only way to blur something is to put focus on something else\n        // and td elements are not \"focus-able\", but buttons are.\n        return (<button type=\"button\">{this.props.getCategoryDescriptionText(item)}</button>);\n    }\n}\n\nclass Preview extends React.Component {\n    render() {\n        const previewLengthStyle = { height: '500px', overflowY: 'scroll', backgroundColor: 'white' }\n        const newPreviewArray = this.props.categories.filter(\n            entryObj => entryObj.ReleaseToPreview\n        );\n        return (\n            <React.Fragment>\n                <div className=\"floating-button-bar align-right inline-list\">\n                    {this.props.isPendingChange ?\n                        <span className=\"pending-label\">'Pending...'</span>\n                        :\n                        <React.Fragment>\n                            <div style={{ display: \"grid\", gridTemplateRows: \"1fr 1fr\" }}>\n                                <span className=\"last-saved-label\">{this.props.lastSavedTime ? 'Last saved at ' + this.props.lastSavedTime.format(\"HH:mm:ss\") : ''}</span>\n                                <span className=\"last-saved-label\">{this.props.lastPublishedTime && !this.props.lastSaveErr && 'Last published at ' + this.props.lastPublishedTime.format(\"HH:mm:ss\")}</span>\n                            </div>\n                            {this.props.lastSaveErr && <span className=\"pending-label\">{this.props.lastSaveErr}</span>}\n                            {this.props.buildingCategoryConnection ? <span className=\"pending-label\">Establishing category connection...</span> :\n                                this.props.buildingEntryConnection ? <span className=\"pending-label\">Establishing entry connection...</span> :\n                                    this.props.closedCategory ? <span className=\"pending-label\">Category connection closed</span> :\n                                        this.props.closedEntry ? <span className=\"pending-label\">Entry connection closed</span> :\n                                            this.props.reconnectingCategory ? <span className=\"pending-label\">Category connection reconnecting...</span> :\n                                                this.props.reconnectingEntry ? <span className=\"pending-label\">Entry connection reconnecting...</span> : \"\"}\n\n                        </React.Fragment>\n                    }\n                    <button type=\"button\" disabled={this.props.publishing || this.props.buildingCategoryConnection || this.props.buildingEntryConnection || this.props.reconnectingCategory || this.props.reconnectingEntry || this.props.closedCategory || this.props.closedEntry} className=\"button\" onClick={this.props.publishAllEntries}>Publish</button>\n                </div>\n                <div style={previewLengthStyle}>\n                    <MinutesDetails\n                        categories={newPreviewArray}\n                        publicPage={false}\n                    />\n                </div>\n            </React.Fragment>\n        )\n    }\n}\n\nconst TypeSwitcher = React.forwardRef((props, ref) => {\n    switch (props.type) {\n        case ('Order'):\n        case ('Communication'):\n        case ('General'):\n            //The following should be treated as a legislative category:\n            // - Unfinished Business (61, 62, 63)\n            // - For Immediate Consideration (151)\n            // - Bills in Conference (72)\n            // - Senate Bills with Governor's Recommendation (111)\n            // - House Bills with Governor's Recommendation (112)\n            // - Senate Bills Vetoed by Governor (109)\n            // - House Bills Vegoed by Governor (110)\n            if ([61, 62, 63, 151, 72, 109, 110, 111, 112].includes(props.formData.CalendarCategoryTypeID)) {\n                return (<div><LegislativeForm ref={ref} {...props} /></div>);\n            }\n        case ('Chairmans Report'):\n            return (<div><NonLegislativeForm ref={ref} {...props} /></div>);\n        case ('Regular Calendar'):\n        case ('Uncontested Calendar'):\n        case ('Notification'):\n            return (<div><LegislativeForm ref={ref} {...props} /></div>);\n        default:\n            return (<div><Misc ref={ref} {...props} /></div>);\n    }\n});\n\nexport default connect(\n    (state) => {\n        const { minutes, calendar, nav, members, committee, communications, bills, session } = state;\n        return {\n            minutes,\n            calendar,\n            nav,\n            members,\n            committee,\n            communications,\n            bills,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, minutesActionCreators, calendarActionCreators, navActionCreators, memberActionCreators, committeeActionCreators, communicationsActionCreators, billActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(MinutesManagementForm)","import React from 'react';\nimport { Route } from 'react-router';\nimport MinutesManagementGrid from './lis-minutes-grid';\nimport MinutesManagementForm from './lis-minutes-form';\n\nclass MinutesManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedSession: '',\n        };\n        this.handleSessionChange = this.handleSessionChange.bind(this);\n    }\n\n    handleSessionChange(value, callback) {\n        this.setState({\n            selectedSession: value\n        }, () => callback());\n    }\n\n    render() {\n        return (\n            <div>\n                <Route exact path={this.props.match.path} render={props => <MinutesManagementGrid\n                    {...props}\n                    selectedSession={this.state.selectedSession}\n                    handleSessionChange={this.handleSessionChange}\n                />} />\n                <Route path={`${this.props.match.path}/edit-minutes/:minutesbookid`} component={MinutesManagementForm} />\n            </div>\n        )\n    }\n}\n\nexport default MinutesManagement;","import React from 'react';\nimport DatePicker from 'react-datepicker';\nimport { LargeListSelect } from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport InputType from '../../lis-minutes-management/components/input-types';\nimport moment from 'moment-timezone';\n\nclass EventControls extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            eventDate: moment().utcOffset(0).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }),\n            eventSequence: '',\n            event: \"\",\n            otherEvent: \"\",\n            templateInputs: [],\n            templateEdited: false,\n            otherEventSelected: false\n        };\n\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.handleSequenceChange = this.handleSequenceChange.bind(this);\n        this.handleEventChange = this.handleEventChange.bind(this);\n        this.handleOtherEventChange = this.handleOtherEventChange.bind(this);\n        this.handleTemplateChange = this.handleTemplateChange.bind(this);\n        this.addEvent = this.addEvent.bind(this);\n        this.removeEvent = this.removeEvent.bind(this);\n        this.unSelectOtherEvent = this.unSelectOtherEvent.bind(this);\n    }\n\n    handleDateChange(val) {\n        let value = moment(val).set({ hour: 0, minute: 0, second: 0, millisecond: 0 });\n        this.setState({\n            eventDate: value\n        });\n    }\n\n    handleSequenceChange(val) {\n        if (val || val === '') {\n            val = val.trim(); // ' ' (i.e. space) gets treated as a number in isNaN (below), so trim here since '' does not\n            if (val && !isNaN(val)) {\n                val = Number(val)\n                this.setState({ eventSequence: val })\n            } else if (val === '') {\n                this.setState({ eventSequence: val })\n            }\n        }\n    }\n\n    handleEventChange(val) {\n        let templateInputs = [];\n        if (val.value != \"Other\") {\n            if (val.ActionReferences && val.ActionReferences.length > 0) {\n                templateInputs = JSON.parse(JSON.stringify(val.ActionReferences));\n            }\n            this.setState({\n                event: val,\n                templateInputs: templateInputs,\n                templateEdited: false\n            });\n        } else {\n            this.setState({\n                event: val,\n                otherEventSelected: true\n            })\n            if (this.props.otherBillEventOptions.length === 0) {\n                this.props.getOtherBillEventOptions();\n            }\n        }\n    }\n\n    handleOtherEventChange(val) {\n        let templateInputs = [];\n        if (val.ActionReferences && val.ActionReferences.length > 0) {\n            templateInputs = JSON.parse(JSON.stringify(val.ActionReferences));\n        }\n        this.setState({\n            otherEvent: val,\n            templateInputs: templateInputs,\n            templateEdited: false\n        });\n    }\n\n    handleTemplateChange(_a, _b, referenceIndex, reference) {\n        let templateInputs = [...this.state.templateInputs];\n        templateInputs[referenceIndex] = reference;\n        this.setState({\n            templateInputs: templateInputs,\n            templateEdited: true\n        });\n    }\n\n    addEvent() {\n        let eventObj = this.state.event.value != \"Other\" ? { ...this.state.event } : { ...this.state.otherEvent };\n        if (eventObj.ActionReferences && eventObj.ActionReferences.length > 0 && this.state.templateInputs.length > 0 && this.state.templateEdited) {\n            eventObj.EventReferences = this.state.templateInputs;\n            eventObj.Description = this.state.templateInputs.map(tInput => {\n                if (!tInput.ReferenceText) {\n                    return `${tInput.ActionReferenceType}`\n                }\n                return tInput.ReferenceText\n            }).join('');\n        } else {\n            eventObj.Description = eventObj.label;\n        }\n        let actorType = '';\n        switch (eventObj.EventCode ? eventObj.EventCode[0].toUpperCase() : eventObj.LegislationChamberCode) {\n            case 'H':\n                actorType = 'House';\n                break;\n            case 'S':\n                actorType = 'Senate';\n                break;\n            case 'C':\n                actorType = 'Conference';\n                break;\n            case 'G':\n                actorType = 'Governor';\n                break;\n        }\n        eventObj.ActorType = actorType;\n        this.props.addEvent(this.state.eventDate, this.state.eventSequence, eventObj);\n        //Reset the selectors after adding the event\n        this.unSelectOtherEvent();\n        this.setState({\n            eventAdded: true,\n            eventSequence: ''\n        });\n        setTimeout(() => {\n            this.setState({\n                eventAdded: false\n            })\n        }, 2000)\n    }\n\n    removeEvent() {\n        this.props.removeEvent(this.state.eventDate, this.state.event, this.state.eventSequence || null)\n        this.setState({\n            eventRemoved: true\n        });\n        setTimeout(() => {\n            this.setState({\n                eventRemoved: false\n            })\n        }, 2000)\n    }\n\n    unSelectOtherEvent() {\n        this.setState({\n            otherEventSelected: false,\n            event: \"\",\n            templateInputs: [],\n            templateEdited: false,\n            otherEvent: \"\"\n        })\n    }\n\n    render() {\n        const { billEventOptions, otherBillEventOptions } = this.props;\n        const fontSize = '0.8em';\n        const selectStyle = {\n            control: styles => ({\n                ...styles,\n                minHeight: '0px',\n                padding: '0.12em 0.6em !important',\n            }),\n            valueContainer: styles => ({\n                ...styles,\n                padding: 0,\n            }),\n            input: styles => ({\n                ...styles,\n                fontSize: fontSize,\n                lineHeight: 'normal',\n            }),\n            singleValue: styles => ({\n                ...styles,\n                fontSize: fontSize,\n            }),\n            placeholder: styles => ({\n                ...styles,\n                fontSize: fontSize\n            }),\n            option: styles => ({\n                ...styles,\n                fontSize: fontSize\n            }),\n            dropdownIndicator: styles => ({\n                ...styles,\n                padding: '4px'\n            }),\n        }\n        const buttonDisabled = !this.state.event\n            || !this.state.eventDate\n            || this.props.checkedBills.every(c => !c)\n            || this.state.eventAdded\n            || this.state.eventRemoved;\n        return (\n            <div>\n                <span style={{ fontSize: '12px' }}>* indicates required field</span>\n                <div className=\"extra-spacing dlas-forms inner-grid\" style={{ gridTemplateColumns: '1fr 0.5fr 3fr' }}>\n                    <div>\n                        <label>Event Date*</label>\n                        <DatePicker\n                            required\n                            selected={this.state.eventDate}\n                            onChange={this.handleDateChange}\n                            className='event-date-picker'\n                        />\n                    </div>\n                    <div>\n                        <label>Sequence</label>\n                        <input min={0} style={{ width: '80%' }} maxLength={3} value={this.state.eventSequence} onChange={(e) => this.handleSequenceChange(e.target.value)} />\n                    </div>\n                    <div style={{ width: '100%' }}>\n                        <label>Event*</label>\n                        <div className=\"inner-grid bill-history-event-controls\">\n                            <LargeListSelect\n                                required\n                                options={billEventOptions}\n                                styles={selectStyle}\n                                value={this.state.event}\n                                getOptionLabel={opt => opt.EventCode ? \"(\" + opt.EventCode + \") \" + opt.label : opt.label}\n                                onChange={this.handleEventChange}\n                                isDisabled={this.state.otherEventSelected}\n                            />\n                            {this.state.otherEventSelected &&\n                                <button type=\"button\" className='icon delete' onClick={() => this.unSelectOtherEvent()}></button>\n                            }\n                        </div>\n                        {this.state.otherEventSelected &&\n                            <div className=\"inner-grid bill-history-event-controls\" style={{ marginTop: \"10px\" }}>\n                                <LargeListSelect\n                                    options={otherBillEventOptions}\n                                    styles={selectStyle}\n                                    value={this.state.otherEvent}\n                                    getOptionLabel={opt => opt.EventCode ? \"(\" + opt.EventCode + \") \" + opt.label : opt.label}\n                                    onChange={this.handleOtherEventChange}\n                                />\n                            </div>\n                        }\n                    </div>\n                </div>\n                {this.state.templateInputs.length > 0 &&\n                    <div >\n                        <InputType\n                            memberList={this.props.patronList}\n                            comitteeList={this.props.committeeList}\n                            textList={this.props.textList}\n                            actionTypes={this.props.actionTypes}\n                            handleChange={this.handleTemplateChange}\n                            entryIndex={0}\n                            activityIndex={0}\n                            references={this.state.templateInputs}\n                        />\n                    </div>\n                }\n                <br />\n                <div>\n                    <div></div>\n                    <div className=\"align-right inline-list\">\n                        <button disabled={buttonDisabled} type=\"button\" className=\"button\" onClick={this.addEvent}>{this.state.eventAdded ? \"Event Added\" : \"Add Event\"}</button>\n                        <button disabled={buttonDisabled} type=\"button\" className=\"button danger\" onClick={this.removeEvent}>{this.state.eventRemoved ? \"Event Removed\" : \"Remove Event\"}</button>\n                    </div>\n                </div>\n                <br />\n                <hr className=\"faded-line\" />\n            </div>\n        )\n    }\n}\n\n\nexport default EventControls;\n","import React from 'react';\nimport Select from 'react-select';\nimport DatePicker from 'react-datepicker';\nimport { Link } from 'react-router-dom';\nimport { authActionCreators } from '../../stores/lis-auth-store';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\n\nconst singleStyles = {\n    menuList: (base, state) => ({\n        ...base,\n        paddingTop: '0px',\n    }),\n    group: (base, state) => ({\n        ...base,\n        paddingTop: '0px',\n    }),\n    groupHeading: (base, state) => ({\n        ...base,\n        paddingTop: '7px',\n        paddingBottom: '7px',\n        marginBottom: '0px',\n        position: 'sticky',\n        top: '0px',\n        backgroundColor: 'hsl(0,0%,100%)'\n    }),\n}\n\nclass BillCategories extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedPatron: '',\n            selectedCommittee: '',\n            selectedSubject: '',\n            selectedDate: null\n        };\n        this.handlePatronChange = this.handlePatronChange.bind(this);\n        this.handleCommitteeChange = this.handleCommitteeChange.bind(this);\n        this.handleSubjectChange = this.handleSubjectChange.bind(this);\n        this.handleDateChange = this.handleDateChange.bind(this);\n    }\n\n    handlePatronChange(val) {\n        this.setState({\n            selectedPatron: val\n        }, () => {\n            //The next step is done after the state change to make sure the user sees what member was selected before going to the advanced search page\n            const param = {\n                selectedPatron: this.state.selectedPatron.MemberID,\n                selectedSession: this.props.session.SessionID\n            };\n            const link = window.btoa(JSON.stringify(param));\n            this.props.history.push(this.props.history.location.pathname + '?q=' + link);\n        });\n    }\n\n    handleCommitteeChange(val) {\n        this.setState({\n            selectedCommittee: val\n        }, () => {\n            const param = {\n                selectedCommittee: this.state.selectedCommittee.CommitteeID,\n                selectedSession: this.props.session.SessionID,\n                selectedBillStatusCategory: this.props.statusCategoriesList.find(category => category.Name === \"In Committee\").LegislationCategoryID\n            };\n            const link = window.btoa(JSON.stringify(param));\n            this.props.history.push(this.props.history.location.pathname + '?q=' + link);\n        });\n    }\n\n    handleSubjectChange(val) {\n        this.setState({\n            selectedSubject: val\n        }, () => {\n            //The next step is done after the state change to make sure the user sees what member was selected before going to the advanced search page\n            const param = {\n                selectedSubject: this.state.selectedSubject.SubjectIndexID,\n                selectedSession: this.props.session.SessionID\n            }\n            const link = window.btoa(JSON.stringify(param));\n            this.props.history.push(this.props.history.location.pathname + '?q=' + link);\n        });\n    }\n\n    handleDateChange(val) {\n        this.setState({\n            selectedDate: val\n        }, () => {\n            const introDate = this.state.selectedDate.clone();\n            introDate.hour(0);\n            const param = {\n                introductionDate: introDate.format(),\n            };\n            const link = window.btoa(JSON.stringify(param));\n            this.props.history.push(this.props.history.location.pathname + '?q=' + link);\n        });\n    }\n\n    makeLink(statusCategoryName, currentStatus, honorExcludeFailed) {\n        let statusCategoryId;\n        //try to find a status category with the name provided, if there is one (if there isn't one, it returns all legislation)\n        if (statusCategoryName) {\n            const statusCategory = this.props.statusCategoriesList.find(category => category.Name.toLowerCase() === statusCategoryName.toLowerCase());\n            //if we do not find a status category, default to Id 99 - this makes it so no results are returned; clean, but also tells the user that something is wrong\n            statusCategoryId = statusCategory ? statusCategory.LegislationCategoryID : 99;\n        }\n\n        const params = {\n            selectedSession: this.props.session ? this.props.session.SessionID : '',\n            selectedBillStatusCategory: statusCategoryId,\n            currentStatus: currentStatus || false,\n            excludeFailed: honorExcludeFailed ? this.props.excludeFailed : false,\n            allLegislation: !statusCategoryName ? true : false,\n            //This is used so if the user clicks a link and goes back to the bill categories screen and clicks the same link another search will be made\n            //If this was omitted then the url wouldn't change and a new search wouldn't be made\n            uniqueSearch: Math.random(),\n        };\n        const json = JSON.stringify(params);\n        const query = window.btoa(json);\n        return this.props.history.location.pathname + '?q=' + query;\n    }\n\n    render() {\n        const { session } = this.props;\n        const sessionHeader = <h2 id=\"search-selections-header\">{session ? session.SessionYear + ' ' + session.DisplayName : ''}<span className=\"mobile-newline\">:</span> Bills by Category</h2>;\n        //The frequent link is a little different from the rest. MostFrequent needs to be true and there is not a status id\n        const frequentParams = {\n            selectedSession: session ? session.SessionID : '',\n            mostFrequent: true,\n            uniqueSearch: Math.random(),\n            excludeFailed: this.props.excludeFailed\n        }\n        const frequentJson = JSON.stringify(frequentParams);\n        const frequentQuery = window.btoa(frequentJson);\n        const frequentLink = this.props.history.location.pathname + '?q=' + frequentQuery;\n\n        return (\n            <div className=\"lis-search-categories\">\n                <div>\n                    {sessionHeader}\n                    <hr className=\"faded-line\" />\n                </div>\n                <div className=\"dlas-forms inner-grid four\" style={{ marginBottom: '1em' }}>\n                    <div>\n                        <label htmlFor=\"sr-member\" className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Bills by Member</label>\n                        <Select\n                            id=\"sr-member\"\n                            options={this.props.patronList}\n                            placeholder=\"Choose a Member\"\n                            value={this.state.selectedMember}\n                            onChange={this.handlePatronChange}\n                            className=\"grid-selector-dropdown\"\n                            classNamePrefix=\"grid-selector-dropdown\"\n                        />\n                    </div>\n                    <div>\n                        <label htmlFor=\"sr-committee\" className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Bills by Committee</label>\n                        <Select\n                            id=\"sr-committee\"\n                            styles={singleStyles}\n                            options={this.props.committeeList}\n                            placeholder=\"Choose a Committee\"\n                            value={this.state.selectedCommittee}\n                            onChange={this.handleCommitteeChange}\n                            className=\"grid-selector-dropdown\"\n                            classNamePrefix=\"grid-selector-dropdown\"\n                        />\n                    </div>\n                    <div>\n                        <label htmlFor=\"sr-subject\" className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Bills by Subject</label>\n                        <Select\n                            id=\"sr-subject\"\n                            options={this.props.subjectList}\n                            placeholder=\"Choose a Subject\"\n                            value={this.state.selectedSubject}\n                            onChange={this.handleSubjectChange}\n                            className=\"grid-selector-dropdown\"\n                            classNamePrefix=\"grid-selector-dropdown\"\n                        />\n                    </div>\n                    <div>\n                        <label htmlFor=\"sr-introduced\" className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Bills Introduced by Day</label>\n                        <DatePicker\n                            id=\"sr-introduced\"\n                            includeDates={this.props.introDateList}\n                            selected={this.state.selectedDate}\n                            onChange={this.handleDateChange}\n                        />\n                    </div>\n                </div>\n                <hr className=\"faded-line\" />\n                {\n                    this.props.isLoading ?\n                        <div className=\"spinner center-spinner\"></div>\n                        :\n                        <div>\n                            <div className=\"inner-grid four\">\n                                <div className=\"homepage-links\">\n                                    <h3 className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Introduced</h3>\n                                    <div>\n                                        <Link to={this.makeLink(\"\", false, true)}>All legislation</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={frequentLink}>Most frequently accessed</Link>\n                                    </div>\n                                </div>\n                                <div className=\"homepage-links\">\n                                    <h3 className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Passed</h3>\n                                    <div>\n                                        <Link to={this.makeLink(\"Passed House\", false, true)}>Passed the House</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Passed Senate\", false, true)}>Passed the Senate</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Passed\", false, true)}>Passed</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Enrolled\", false, true)}>Enrolled</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Signed by Speaker & President\", false, true)}>Signed by Speaker &amp; President</Link>\n                                    </div>\n                                </div>\n                                <div className=\"homepage-links\">\n                                    <h3 className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Sent to Conference</h3>\n                                    <div>\n                                        <Link to={this.makeLink(\"In Conference\", true, false)}>In Conference</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Conference Report Agreed to\", false, true)}>Conference Report Agreed to</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Failed in Conference\", false, false)}>Failed in Conference</Link>\n                                    </div>\n                                </div>\n                                <div className=\"homepage-links\">\n                                    <h3 className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Governor</h3>\n                                    <div>\n                                        <Link to={this.makeLink(\"Governor's Recommendations\", false, true)}>Governor's recommendations</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Governor's Recommendation Adopted\", false, true)}>Governor's recommendation adopted</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Approved or Enacted\", false, false)}>Approved or enacted</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Vetoed\", false, false)}>Vetoed</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Acts of Assembly chapters\", false, false)}>Acts of Assembly chapters</Link>\n                                    </div>\n                                </div>\n                            </div>\n                            <div className=\"inner-grid four\">\n                                <div className=\"homepage-links\">\n                                    <h3 className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Failed/Awaiting Action</h3>\n                                    <div>\n                                        <Link to={this.makeLink(\"Failed\", false, false)}>Failed</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Pending\", true, false)}>Pending</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Continued to next session\", true, true)}>Continued to next session</Link>\n                                    </div>\n                                    <div>\n                                        <Link to={this.makeLink(\"Continued from last session\", false, true)}>Continued from last session</Link>\n                                    </div>\n                                </div>\n                                <div className=\"homepage-links\">\n                                    <h3 className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Incorporated</h3>\n                                    <div>\n                                        <Link to={this.makeLink(\"Incorporated\", false, true)}>Incorporated</Link>\n                                    </div>\n                                </div>\n                                {this.props.location.includes('bill-search') && this.props.login.userClaims.roles.find((x) => x === \"Admin\") &&\n                                    <div className=\"homepage-links\">\n                                        <h3 className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Parallel</h3>\n                                        <div>\n                                            <Link to={this.makeLink(\"Parallel\", false, true)}>Parallel</Link>\n                                        </div>\n                                    </div>\n                                }\n                            </div>\n                        </div>\n                }\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { login } = state;\n        return {\n            login,\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators), dispatch)\n        }\n    }\n)(BillCategories)\n","import React from 'react';\nimport moment from 'moment-timezone';\nimport Select from 'react-select';\nimport DatePicker from 'react-datepicker';\nimport * as Fields from '../../lis-shared/lis-layout/components/lis-forms-component';\n\n// The parent component is in charge of gathering all the data for the form's dropdowns\n// The paren't state object is updated with the ID of whatever the user selects\n// Normally, the state object is updated with the entire object that the user selects.\n// But, to be able to make a query from another page either the whole object needs to be passed in the url\n// Or just the ID. Since it is easier to pass just the ID in the url to the advanced search page\n// the dropdowns find the object that has the ID that was passed.\n\n// As an example, a session ID of 47 is in the url.\n// So the dropdown selects its value by searching through the available sessions and finding the one that has an ID of 47\n\nconst singleStyles = {\n    menuList: (base, state) => ({\n        ...base,\n        paddingTop: '0px',\n    }),\n    group: (base, state) => ({\n        ...base,\n        paddingTop: '0px',\n    }),\n    groupHeading: (base, state) => ({\n        ...base,\n        paddingTop: '7px',\n        paddingBottom: '7px',\n        marginBottom: '0px',\n        position: 'sticky',\n        top: '0px',\n        backgroundColor: 'hsl(0,0%,100%)'\n    }),\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        minHeight: 0,\n        fontSize: '0.8em',\n    }),\n    dropdownIndicator: (base) => ({\n        ...base,\n        padding: '0px 8px'\n    }),\n    clearIndicator: (base) => ({\n        ...base,\n        padding: '0px 8px'\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    }\n}\n\nclass AdvancedSearchBoxComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            billStatusDateError: false,\n            showFindSection: false,\n            showCategorySection: false,\n            showTooltip: false\n        };\n\n        this.toggleFindSection = this.toggleFindSection.bind(this);\n        this.toggleCategorySection = this.toggleCategorySection.bind(this);\n        this.handleSubmit = this.handleSubmit.bind(this);\n        this.toggleTooltip = this.toggleTooltip.bind(this);\n        this.setOpenSection = this.setOpenSection.bind(this);\n    }\n\n    toggleFindSection() {\n        this.setState(state => ({\n            showFindSection: !state.showFindSection,\n            showCategorySection: !state.showCategorySection\n        }), () => {\n            this.props.toggleShowCategories(!this.props.showCategories)\n        });\n    }\n\n    toggleCategorySection() {\n        this.setState(state => ({\n            showCategorySection: !state.showCategorySection,\n            showFindSection: !state.showFindSection\n        }), () => {\n            this.props.toggleShowCategories(!this.props.showCategories)\n        });\n    }\n\n    toggleTooltip(state) {\n        let showTooltip = { ...this.state.showTooltip };\n\n        //Close all open tooltips\n        if (typeof showTooltip === \"object\") {\n            for (const x in showTooltip) {\n                if (x !== state)\n                    showTooltip[x] = false;\n            };\n        }\n\n        showTooltip[state] = showTooltip[state] ? false : true;\n\n        this.setState({\n            showTooltip: showTooltip\n        })\n    }\n\n    handleSubmit() {\n        if (this.props.failedToGetSessions) { return; }\n        // If the status start date and end date are just the session start and end date then just send the session ID. The database query is a little quicker with just the session ID\n        let { billStatusStartDate, billStatusEndDate } = this.props;\n        if (!this.props.currentStatus && this.props.selectedBillStatusCategory) {\n            if (this.props.selectedSession) {\n                const adjournmentEvent = this.props.selectedSession.SessionEvents.find(event => event.DisplayName === 'Adjournment');\n                if (this.props.selectedSession.SessionEvents.find(event => event.DisplayName === \"Session Start\") && moment(this.props.selectedSession.SessionEvents.find(event => event.DisplayName === \"Session Start\").ActualDate).isSame(billStatusStartDate) &&\n                    (adjournmentEvent ? moment(adjournmentEvent.ActualDate) : moment().endOf('day')).isSame(billStatusEndDate)) {\n                    billStatusStartDate = null;\n                    billStatusEndDate = null;\n                }\n            }\n        }\n        //Create an object to be encoded to base64 and stuck in the url\n        let queryObj = {\n            selectedBillNumbers: this.props.selectedBillNumbers,\n            selectedBillRangeBeginning: this.props.selectedBillRangeBeginning,\n            selectedBillRangeEnd: this.props.selectedBillRangeEnd,\n            selectedChapterNumber: this.props.selectedChapterNumber,\n            selectedKeywords: this.props.selectedKeywords,\n            selectedLocation: this.props.selectedLocation,\n            selectedSummaryVersion: this.props.selectedSummaryVersion,\n            selectedBillVersion: this.props.selectedBillVersion,\n            selectedSession: this.props.selectedSession.SessionID,\n            selectedBillStatusCategory: this.props.selectedBillStatusCategory,\n            billStatusStartDate: billStatusStartDate,\n            billStatusEndDate: billStatusEndDate,\n            selectedCommittee: this.props.selectedCommittee,\n            selectedSubcommittee: this.props.selectedSubcommittee,\n            selectedPatron: this.props.selectedPatron,\n            selectedSubject: this.props.selectedSubject,\n            selectedPatronType: this.props.selectedPatronType,\n            selectedChamber: this.props.selectedChamber,\n            selectedBillType: this.props.selectedBillType,\n            selectedBillEvent: this.props.selectedBillEvent,\n            billEventStartDate: this.props.billEventStartDate,\n            billEventEndDate: this.props.billEventEndDate,\n            billActionStartDate: this.props.billActionStartDate,\n            billActionEndDate: this.props.billActionEndDate,\n            keywordUseGlobalSessionSearch: this.props.keywordUseGlobalSessionSearch,\n            currentStatus: this.props.currentStatus,\n            excludeFailed: this.props.excludeFailed\n        }\n        this.props.handleSubmit(queryObj)\n    }\n\n    setOpenSection() {\n        //900px is when mobile layout is used (set in mobile.scss); collapse by default : false\n        this.setState({\n            showCategorySection: this.props.showCategories || this.props.searchParam.length === 0 ? window.innerWidth <= 900 ? false : true : false,\n            showFindSection: this.props.showCategories || this.props.searchParam.length === 0 ? false : window.innerWidth <= 900 ? false : true\n        })\n    }\n\n    componentDidMount() {\n        this.setOpenSection();\n    }\n\n    componentDidUpdate(prevProps) {\n        if (this.props.searchParam !== prevProps.searchParam) {\n            if (this.props.searchParam === \"\") {\n                this.setState({\n                    showCategorySection: true,\n                    showFindSection: false\n                })\n            } else {\n                this.setState({\n                    showCategorySection: false,\n                    showFindSection: true\n                })\n            }\n        }\n    }\n\n    render() {\n        const getSelectedCommitteeLabel = (val) => {\n            if (!val) return null;\n            let newCmte = { ...val } //don't modify existing committee values stored at state level & used in dropdown\n            if (newCmte && newCmte.label) {\n                newCmte.label = '(' + newCmte.ChamberCode + ') ' + newCmte.label;\n            }\n            return newCmte;\n        }\n        return (\n            <React.Fragment>\n                <div className={this.props.location.includes('bill-management') ? \"dlas-forms side-form advanced-search management\" : \"dlas-forms side-form advanced-search\"}>\n                    <div className=\"header flex-row flex-vertical-center\" style={!this.state.showCategorySection ? { marginBottom: \"20px\" } : {}}>\n                        <h3 className=\"center category-header\">View Bills By Category</h3>\n                        <button type=\"button\" aria-expanded={this.state.showCategorySection} onClick={this.toggleCategorySection} className={this.state.showCategorySection ? \"arrow-up white-chevron\" : \"arrow-down white-chevron\"}></button>\n                    </div>\n                    {this.state.showCategorySection &&\n                        <div style={{ marginBottom: \"20px\" }}>\n                            <div>\n                                <div onClick={() => { this.props.showCategories ? null : this.props.toggleShowCategories(!this.props.showCategories) }} className=\"side-form-group advanced-search-fieldset-header\" style={this.props.showCategories ? { cursor: 'pointer', backgroundColor: '#e0e0e0' } : { cursor: 'pointer' }}>\n                                    <span className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Bills by Category</span>\n                                    <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(\"billCategories\") }} className=\"button info\">Info</a>\n                                    {this.state.showTooltip[\"billCategories\"] &&\n                                        <div className=\"info-box search-tooltip\">\n                                            <p>This is a view where we provide easy to access, common categories of legislation.</p>\n                                        </div>\n                                    }\n                                </div>\n                            </div>\n                            <div>\n                                <div className=\"side-form-group advanced-search-fieldset-header\">\n                                    <label htmlFor=\"exclude-failed-button\" className={(this.props.location.includes('bill-search') ? \"txt-dark-blue \" : \"\") + `no-background${this.props.keywordUseGlobalSessionSearch ? ' txt-greyed' : ''}`} style={{ whiteSpace: \"no-wrap\", marginTop: '0px', fontSize: \"17px\" }}>Exclude Failed Legislation</label>\n                                    <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(\"excludeFailed\") }} className=\"button info\">Info</a>\n                                    {this.state.showTooltip[\"excludeFailed\"] &&\n                                        <div className=\"info-box search-tooltip\">\n                                            <p>{\"Turning this switch on will exclude all failed bills from your search results.\"}</p>\n                                            <p>{\"This option will not be honored for the following category searches:\"}\n                                                <ul>\n                                                    <li>In Conference</li>\n                                                    <li>Failed in Conference</li>\n                                                    <li>Approved or enacted</li>\n                                                    <li>Vetoed</li>\n                                                    <li>Acts of Assembly chapters</li>\n                                                    <li>Failed</li>\n                                                    <li>Pending</li>\n                                                </ul>\n                                            </p>\n                                            <p>{\"This option will be disabled if you are performing a keyword search across all sessions.\"}</p>\n                                        </div>\n                                    }\n                                    <div className=\"flex-row flex-vertical-center flex-start\" style={{ marginBottom: '3%' }}>\n                                        <div className=\"toggle-switch\" disabled={this.props.keywordUseGlobalSessionSearch} onClick={() => this.props.handleExcludeFailedChange()}>\n                                            <input id=\"exclude-failed-button\" checked={this.props.excludeFailed} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                            <span className=\"slider\"></span>\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    }\n                </div>\n                <div className={this.props.location.includes('bill-management') ? \"dlas-forms side-form advanced-search management\" : \"dlas-forms side-form advanced-search\"}>\n                    <div className=\"header flex-row flex-vertical-center\">\n                        <h3 className=\"center category-header\">Find a Bill</h3>\n                        <button type=\"button\" aria-expanded={this.state.showFindSection} onClick={this.toggleFindSection} className={this.state.showFindSection ? \"arrow-up white-chevron\" : \"arrow-down white-chevron\"}></button>\n                    </div>\n                    {this.state.showFindSection &&\n                        <div className=\"content\">\n                            <div>\n                                <div className=\"side-form-group advanced-search-fieldset-header\">\n                                    <label htmlFor=\"exclude-failed-button\" className={(this.props.location.includes('bill-search') ? \"txt-dark-blue \" : \"\") + `no-background${this.props.keywordUseGlobalSessionSearch ? ' txt-greyed' : ''}`} style={{ whiteSpace: \"no-wrap\", marginTop: '0px', fontSize: \"17px\" }}>Exclude Failed Legislation</label>\n                                    <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(\"excludeFailed\") }} className=\"button info\">Info</a>\n                                    {this.state.showTooltip[\"excludeFailed\"] &&\n                                        <div className=\"info-box search-tooltip\">\n                                            <p>{\"Turning this switch on will exclude all failed bills from your search results.\"}</p>\n                                            <p>{\"This option will be disabled if you are performing a keyword search across all sessions.\"}</p>\n                                        </div>\n                                    }\n                                    <div className=\"flex-row flex-vertical-center flex-start\" style={{ marginBottom: '3%' }}>\n                                        <div className=\"toggle-switch\" disabled={this.props.keywordUseGlobalSessionSearch} onClick={() => this.props.handleExcludeFailedChange()}>\n                                            <input id=\"exclude-failed-button\" checked={this.props.excludeFailed} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                            <span className=\"slider\"></span>\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                            <div style={{ cursor: 'pointer' }} onClick={() => this.props.toggleGroup(\"billFieldset\")} className=\"advanced-search-fieldset-header\">\n                                <span className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Bill Number</span>\n                                <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(\"billNumber\") }} className=\"button info\">Info</a>\n                                {this.state.showTooltip[\"billNumber\"] &&\n                                    <div className=\"info-box search-tooltip\">\n                                        <p>{\"Use > to search for all legislation with a number after the one entered (HB5> returns all house bills with a number after 5)\"}</p>\n                                        <p>{\"Use < to search for all legislation with a number before the one entered (HB5< returns all house bills with a number before 5)\"}</p>\n                                        <p>{\"Use a comma to search for a list of two or more bills (HB53, HB98)\"}</p>\n                                    </div>\n                                }\n                                <button aria-expanded={this.props.billFieldset} type=\"button\" className={this.props.billFieldset ? \"arrow-up\" : \"arrow-down\"}></button>\n                            </div>\n                            {this.props.billFieldset &&\n                                <fieldset>\n                                    <div>\n                                        <Fields.TextInput\n                                            type=\"text\"\n                                            id=\"se-bill-numbers\"\n                                            label=\"Bill Number(s)\"\n                                            onChange={(evt) => this.props.handleTextChange(evt, 'selectedBillNumbers')}\n                                            value={this.props.selectedBillNumbers}\n                                            placeholder=\"ex. hb1\"\n                                        />\n                                    </div>\n                                    <div className=\"multi-row two two-mobile no-margin\">\n                                        <div>\n                                            <Fields.TextInput\n                                                type=\"text\"\n                                                id=\"se-bill-range-start\"\n                                                label=\"Bill Range\"\n                                                onChange={(evt) => this.props.handleTextChange(evt, 'selectedBillRangeBeginning')}\n                                                value={this.props.selectedBillRangeBeginning}\n                                                placeholder=\"ex. hb1\"\n                                            />\n                                        </div>\n                                        <div>\n                                            <br />\n                                            <label htmlFor=\"se-bill-range-end\" className=\"screen-reader-only\">Bill range end</label>\n                                            <input\n                                                type=\"text\"\n                                                id=\"se-bill-range-end\"\n                                                onChange={(evt) => this.props.handleTextChange(evt, 'selectedBillRangeEnd')}\n                                                value={this.props.selectedBillRangeEnd}\n                                                placeholder=\"ex. hb10\"\n                                            />\n                                        </div>\n                                    </div>\n                                    <div>\n                                        <Fields.TextInput\n                                            type=\"text\"\n                                            id=\"se-chapter-numbers\"\n                                            label=\"Chapter Number\"\n                                            onChange={(evt) => this.props.handleTextChange(evt, 'selectedChapterNumber')}\n                                            value={this.props.selectedChapterNumber}\n                                            placeholder={\"ex. ch3\"}\n                                        />\n                                    </div>\n                                </fieldset>\n                            }\n                            <div style={{ cursor: 'pointer' }} onClick={() => this.props.toggleGroup(\"keywordFieldset\")} className=\"advanced-search-fieldset-header\">\n                                <span className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Keyword</span>\n                                <a onClick={(e) => { e.stopPropagation(e); this.props.toggleHelpModal() }} title=\"Search Help\" className=\"button info\">Info</a>\n                                <button aria-expanded={this.props.keywordFieldset} type=\"button\" className={this.props.keywordFieldset ? \"arrow-up\" : \"arrow-down\"}></button>\n                            </div>\n                            {this.props.keywordFieldset &&\n                                <fieldset>\n                                    {!this.props.billManagement &&\n                                        <React.Fragment>\n                                            <div className=\"multi-row two-max\" >\n                                                <div className=\"label-and-radio\">\n                                                    <label htmlFor=\"selected-session-button\" className={`label radio-label`}>{this.props.selectedSession ? this.props.selectedSession.SessionYear + \" \" + this.props.selectedSession.DisplayName : 'Selected Session'}</label>\n                                                    <input id=\"selected-session-button\" checked={this.props.keywordUseGlobalSessionSearch === false} onChange={() => this.props.handleRadioChange()} type=\"radio\" />\n                                                </div>\n                                                <div className=\"label-and-radio\">\n                                                    <label htmlFor=\"all-sessions-button\" className={`label radio-label`}>All Sessions</label>\n                                                    <input id=\"all-sessions-button\" checked={this.props.keywordUseGlobalSessionSearch === true} onChange={() => this.props.handleRadioChange()} type=\"radio\" />\n                                                </div>\n                                            </div>\n                                        </React.Fragment>\n                                    }\n                                    <div>\n                                        <label htmlFor=\"se-keywords\" className=\"screen-reader-only\">Keywords</label>\n                                        <Fields.TextInput\n                                            type=\"text\"\n                                            id=\"se-keywords\"\n                                            onChange={(evt) => this.props.handleTextChange(evt, 'selectedKeywords')}\n                                            value={this.props.selectedKeywords}\n                                            placeholder={this.props.selectedLocation === \"Caption\" ? \"A brief description of the bill\" : \"Keyword\"}\n                                        />\n                                    </div>\n                                    <div>\n                                        <div>\n                                            <label>Search within</label>\n                                        </div>\n                                        <div className=\"checkbox-container\">\n                                            <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                                <div className=\"toggle-switch\" onClick={() => this.props.handleSelectChange({ value: this.props.selectedLocation !== 'Caption' ? 'Caption' : '' }, 'selectedLocation')}>\n                                                    <input id=\"se-caption\" checked={this.props.selectedLocation === 'Caption'} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                    <span className=\"slider\"></span>\n                                                </div>\n                                                <label htmlFor=\"se-caption\" className=\"checkbox-label no-background\" style={{ whiteSpace: \"no-wrap\", marginTop: '0px' }}>Caption</label>\n                                            </div>\n                                            <hr className=\"faded-line\" />\n                                            <div className=\"checkbox\">\n                                                <div className=\"flex-row flex-vertical-center flex-start\">\n                                                    <div className=\"toggle-switch\" onClick={() => this.props.handleSelectChange({ value: this.props.selectedLocation !== 'Bill Text' ? 'Bill Text' : '' }, 'selectedLocation')}>\n                                                        <input id=\"se-bill-text\" checked={this.props.selectedLocation === 'Bill Text'} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                        <span className=\"slider\"></span>\n                                                    </div>\n                                                    <label htmlFor=\"se-bill-text\" className=\"checkbox-label no-background\" style={{ whiteSpace: \"no-wrap\", marginTop: '0px' }}>Bill Text</label>\n                                                </div>\n                                                <label htmlFor=\"sr-bill-text-type\" className=\"screen-reader-only\" >Bill text type</label>\n                                                <Select\n                                                    id=\"sr-bill-text-type\"\n                                                    isDisabled={this.props.selectedLocation !== 'Bill Text'}\n                                                    styles={singleStyles}\n                                                    options={this.props.billVersionList}\n                                                    value={this.props.billVersionList.find(ver => ver.value === this.props.selectedBillVersion)}\n                                                    onChange={opt => this.props.handleSelectChange(opt, 'selectedBillVersion')} />\n                                            </div>\n                                            <hr className=\"faded-line\" />\n                                            <div className=\"checkbox\">\n                                                <div className=\"flex-row flex-vertical-center flex-start\">\n                                                    <div className=\"toggle-switch\" onClick={() => this.props.handleSelectChange({ value: this.props.selectedLocation !== 'Summary' ? 'Summary' : '' }, 'selectedLocation')}>\n                                                        <input id=\"se-bill-summary\" checked={this.props.selectedLocation === 'Summary'} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                        <span className=\"slider\"></span>\n                                                    </div>\n                                                    <label htmlFor=\"se-bill-summary\" className=\"checkbox-label no-background\" style={{ whiteSpace: \"no-wrap\", marginTop: '0px' }}>Bill Summary</label>\n                                                </div>\n                                                <label htmlFor=\"sr-bill-summary-type\" className=\"screen-reader-only\" >Bill summary type</label>\n                                                <Select\n                                                    id=\"sr-bill-summary-type\"\n                                                    isDisabled={this.props.selectedLocation !== 'Summary'}\n                                                    styles={singleStyles}\n                                                    options={this.props.billSummaryList}\n                                                    value={this.props.billSummaryList.find(ver => ver.value === this.props.selectedSummaryVersion)}\n                                                    onChange={opt => this.props.handleSelectChange(opt, 'selectedSummaryVersion')} />\n                                            </div>\n                                        </div>\n                                    </div>\n                                </fieldset>\n                            }\n                            <div style={{ cursor: 'pointer' }} onClick={() => this.props.toggleGroup(\"statusFieldset\")} className=\" advanced-search-fieldset-header\">\n                                <span className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Legislation Status</span>\n                                <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(\"status\") }} className=\"button info\">Info</a>\n                                {this.state.showTooltip[\"status\"] &&\n                                    <div className=\"info-box search-tooltip\">\n                                        <p>Status - Where the bill is in the legislative process.</p>\n                                        <p>If you do not input dates or check currently, the search will be executed for that session.</p>\n                                    </div>\n                                }\n                                <button aria-expanded={this.props.statusFieldset} type=\"button\" className={this.props.statusFieldset ? \"arrow-up\" : \"arrow-down\"}></button>\n                            </div>\n                            {this.props.statusFieldset &&\n                                <fieldset>\n                                    <div>\n                                        <div className=\"inner-grid one-and-two two-mobile\">\n                                            <label htmlFor=\"se-bill-status-select\">Status</label><div className=\"flex-row flex-vertical-center flex-end\">\n                                                <div className=\"toggle-switch\" disabled={this.props.billStatusCategoryList.find(status => status.LegislationCategoryID === this.props.selectedBillStatusCategory)?.Name === \"Continued to next session\"} onClick={() => this.props.handleCurrentStatusChange()}>\n                                                    <input id=\"current-status-button\" checked={this.props.currentStatus} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                    <span className=\"slider\"></span>\n                                                </div>\n                                                <label htmlFor=\"current-status-button\" className=\"checkbox-label no-background\">{this.props.selectedSession && !this.props.selectedSession.IsActive ? 'Final Status' : 'Currently'}</label>\n                                            </div>\n                                        </div>\n                                        <Select\n                                            id=\"se-bill-status-select\"\n                                            isClearable\n                                            key={this.props.selectedBillStatusCategory}\n                                            styles={singleStyles}\n                                            options={this.props.billStatusCategoryList}\n                                            placeholder=\"All\"\n                                            onChange={(opt) => this.props.handleSelectChange(opt, 'selectedBillStatusCategory')}\n                                            value={this.props.billStatusCategoryList.find(status => status.LegislationCategoryID === this.props.selectedBillStatusCategory)}\n                                        />\n                                    </div>\n                                    <div className=\"inner-grid two two-mobile\">\n                                        <div>\n                                            <label htmlFor=\"se-bill-status-start-date\">Start Date</label>\n                                            <DatePicker\n                                                id=\"se-bill-status-start-date\"\n                                                selected={this.props.billStatusStartDate ? moment(this.props.billStatusStartDate) : null}\n                                                onChange={(opt) => {\n                                                    opt.startOf('day');\n                                                    this.props.handleDateChange(opt, 'billStatusStartDate')\n                                                }}\n                                                disabled={!this.props.selectedBillStatusCategory || this.props.currentStatus}\n                                            />\n                                        </div>\n                                        <div>\n                                            <label htmlFor=\"se-bill-status-end-date\">End Date</label>\n                                            <DatePicker\n                                                id=\"se-bill-status-end-date\"\n                                                selected={this.props.billStatusEndDate ? moment(this.props.billStatusEndDate) : null}\n                                                onChange={(opt) => {\n                                                    opt.endOf('day');\n                                                    this.props.handleDateChange(opt, 'billStatusEndDate')\n                                                }}\n                                                disabled={!this.props.selectedBillStatusCategory || this.props.currentStatus}\n                                            />\n                                        </div>\n                                    </div>\n                                    <div>\n                                        <label htmlFor=\"se-selected-chamber\">Originating Chamber</label>\n                                        <Select\n                                            styles={singleStyles}\n                                            id=\"se-selected-chamber\"\n                                            options={Fields.originatingChamberOptions}\n                                            onChange={this.props.chamberChange}\n                                            value={this.props.selectedChamber}\n                                            placeholder=\"Both\"\n                                            isClearable={true}\n                                        />\n                                    </div>\n                                </fieldset>\n                            }\n                            <div style={{ cursor: 'pointer' }} onClick={() => this.props.toggleGroup(\"committeesFieldset\")} className=\"advanced-search-fieldset-header\">\n                                <span className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Committees</span>\n                                {/* <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(\"committee\") }} className=\"button info\">Info</a>\n                                {this.state.showTooltip[\"committee\"] &&\n                                    <div className=\"info-box search-tooltip\">\n                                        <p></p>\n                                    </div>\n                                } */}\n                                <div />\n                                <button aria-expanded={this.props.committeesFieldset} type=\"button\" className={this.props.committeesFieldset ? \"arrow-up\" : \"arrow-down\"}></button>\n                            </div>\n                            {this.props.committeesFieldset &&\n                                <fieldset>\n                                    <div>\n                                        <label htmlFor=\"se-selected-committee\">Committees</label>\n                                        <Select\n                                            styles={singleStyles}\n                                            isClearable\n                                            key={this.props.selectedCommittee}\n                                            id=\"se-selected-committee\"\n                                            options={this.props.committeeList}\n                                            onChange={this.props.committeeChange}\n                                            value={getSelectedCommitteeLabel(this.props.committeeList.flatMap(x => x.options || x).find(committee => committee.CommitteeID == this.props.selectedCommittee))}\n                                        />\n                                    </div>\n                                    <div>\n                                        <label htmlFor=\"se-selected-subcommittee\">Subcommittees</label>\n                                        <Select\n                                            styles={singleStyles}\n                                            isClearable\n                                            key={this.props.selectedSubcommittee}\n                                            id=\"se-selected-subcommittee\"\n                                            isDisabled={!this.props.selectedCommittee}\n                                            options={this.props.subcommitteeList}\n                                            onChange={(opt) => this.props.handleSelectChange(opt, 'selectedSubcommittee')}\n                                            value={this.props.subcommitteeList.find(subcommittee => subcommittee.CommitteeID === this.props.selectedSubcommittee)}\n                                        />\n                                    </div>\n                                </fieldset>\n                            }\n                            <div style={{ cursor: 'pointer' }} onClick={() => this.props.toggleGroup(\"membersFieldset\")} className=\"advanced-search-fieldset-header\">\n                                <span className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Members</span>\n                                <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(\"members\") }} className=\"button info\">Info</a>\n                                {this.state.showTooltip[\"members\"] &&\n                                    <div className=\"info-box search-tooltip\">\n                                        <p>Chief Patron - The member(s) that originated the bill.</p>\n                                    </div>\n                                }\n                                <button aria-expanded={this.props.membersFieldset} type=\"button\" className={this.props.membersFieldset ? \"arrow-up\" : \"arrow-down\"}></button>\n                            </div>\n                            {this.props.membersFieldset &&\n                                <fieldset>\n                                    <div>\n                                        <label htmlFor=\"se-selected-patron\">Patrons</label>\n                                        <Select\n                                            styles={singleStyles}\n                                            id=\"se-selected-patron\"\n                                            isClearable\n                                            key={this.props.selectedPatron}\n                                            options={this.props.patronList}\n                                            placeholder=\"All\"\n                                            onChange={this.props.handlePatronChange}\n                                            value={this.props.patronList.find(patron => patron.MemberID === this.props.selectedPatron)}\n                                        />\n                                    </div>\n                                    <div>\n                                        <label htmlFor=\"se-selected-patron-type\">Patron Type</label>\n                                        <Select\n                                            isClearable\n                                            styles={singleStyles}\n                                            key={this.props.selectedPatronType}\n                                            id=\"se-selected-patron-type\"\n                                            isDisabled={!this.props.selectedPatron}\n                                            value={this.props.patronRoles.filter(role => this.props.selectedPatronType.includes(role.PatronTypeID))}\n                                            onChange={this.props.handlePatronTypeChange}\n                                            options={this.props.patronList.find(x => x.MemberID === this.props.selectedPatron) ? this.props.patronList.find(x => x.MemberID === this.props.selectedPatron).ChamberCode === \"S\" ? this.props.patronRoles.filter(x => x.PatronTypeID !== 5) : this.props.patronRoles.filter(x => x.PatronTypeID !== 3 && x.PatronTypeID !== 5) : []}\n                                            isSearchable={false}\n                                            isMulti={true}\n                                        />\n                                    </div>\n                                </fieldset>\n                            }\n                            <div style={{ cursor: 'pointer' }} onClick={() => this.props.toggleGroup(\"subjectFieldset\")} className=\"advanced-search-fieldset-header\">\n                                <span className={this.props.location.includes('bill-search') ? \"txt-dark-blue\" : \"\"}>Subject</span>\n                                <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(\"subject\") }} className=\"button info\">Info</a>\n                                {this.state.showTooltip[\"subject\"] &&\n                                    <div className=\"info-box search-tooltip\">\n                                        <p>Bills listed by subject.</p>\n                                    </div>\n                                }\n                                <button aria-expanded={this.props.subjectFieldset} type=\"button\" className={this.props.subjectFieldset ? \"arrow-up\" : \"arrow-down\"}></button>\n                            </div>\n                            {this.props.subjectFieldset &&\n                                <fieldset>\n                                    <div>\n                                        <label htmlFor=\"se-selected-subject\">Subjects</label>\n                                        <Select\n                                            styles={singleStyles}\n                                            id=\"se-selected-subject\"\n                                            isClearable\n                                            key={this.props.selectedSubject}\n                                            options={this.props.subjectList}\n                                            placeholder=\"All Subjects\"\n                                            onChange={(opt) => this.props.handleSelectChange(opt, 'selectedSubject')}\n                                            value={this.props.subjectList.find(subject => subject.SubjectIndexID === this.props.selectedSubject)}\n                                        />\n                                    </div>\n                                </fieldset>\n                            }\n                            <div style={{ padding: '10px' }} className=\"center flex-row\">\n                                <button id=\"se-clear-form\" className=\"button secondary\" type=\"button\" onClick={() => this.props.clearForm(true, true)}>\n                                    Clear\n                                </button>\n                                <button id=\"se-submit-form\" className=\"button\" type=\"button\"\n                                    disabled={\n                                        !this.props.showUpdateSearchButton &&\n                                        (!this.props.selectedChamber && !this.props.selectedBillEvent && !this.props.selectedBillType && !this.props.selectedCommittee && !this.props.selectedSubcommittee && !this.props.selectedPatron && !this.props.selectedSubject && !this.props.selectedKeywords && !this.props.selectedBillNumbers && !this.props.selectedBillRangeBeginning && !this.props.selectedBillRangeEnd && !this.props.selectedSubject && !this.props.selectedChapterNumber && !this.props.selectedBillStatusCategory)\n                                        || this.props.isFetching || this.props.failedToGetSessions}\n                                    title={!this.props.showUpdateSearchButton && !this.props.selectedChamber && !this.props.selectedBillEvent && !this.props.selectedBillType && !this.props.selectedCommittee && !this.props.selectedSubcommittee && !this.props.selectedPatron && !this.props.selectedSubject && !this.props.selectedKeywords && !this.props.selectedBillNumbers && !this.props.selectedBillRangeBeginning && !this.props.selectedBillRangeEnd && !this.props.selectedSubject && !this.props.selectedChapterNumber && !this.props.selectedBillStatusCategory && 'Please provide a parameter upon which to search.'}\n                                    onClick={() => this.handleSubmit()}>\n                                    Search\n                                </button>\n                            </div>\n                        </div>\n                    }\n                </div>\n            </React.Fragment>\n        )\n    }\n}\n\n\nexport default AdvancedSearchBoxComponent;\n","import React from 'react';\nimport moment from 'moment-timezone';\n\n\nclass SearchSelections extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n        };\n    };\n\n    render() {\n        return (\n            <div className=\"search-selections\">\n                <span className=\"txt-greyed small-text\">Your Search</span>\n                <div>\n                    <Selection\n                        value={this.props.selectedBillNumbers}\n                        name={\"selectedBillNumbers\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.selectedBillRangeBeginning}\n                        name={\"selectedBillRangeBeginning\"}\n                        title=\"Bill Range Start\"\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.selectedBillRangeEnd}\n                        name={\"selectedBillRangeEnd\"}\n                        title=\"Bill Range End\"\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.selectedChapterNumber}\n                        name={\"selectedChapterNumber\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.selectedKeywords}\n                        name={\"selectedKeywords\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.currentStatus && this.props.selectedBillStatusCategory ? this.props.selectedSession && !this.props.selectedSession.IsActive ? 'Final Status' : 'Current Status' : null}\n                        name={\"currentStatus\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.selectedBillStatusCategory ? this.props.selectedBillStatusCategory.label : null}\n                        name={\"selectedBillStatusCategory\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.billStatusStartDate ? moment(this.props.billStatusStartDate).format(\"MM/DD/YYYY\") : null}\n                        name={\"billStatusStartDate\"}\n                        title=\"Status Start Date\"\n                        clear={null}\n                    />\n                    <Selection\n                        value={this.props.billStatusEndDate ? moment(this.props.billStatusEndDate).format(\"MM/DD/YYYY\") : null}\n                        name={\"billStatusEndDate\"}\n                        title=\"Status End Date\"\n                        clear={null}\n                    />\n                    <Selection\n                        value={this.props.selectedCommittee ? this.props.selectedCommittee.label : null}\n                        name={\"selectedCommittee\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.selectedSubcommittee ? this.props.selectedSubcommittee.label : null}\n                        name={\"selectedSubcommittee\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.selectedPatron ? this.props.selectedPatron.label : null}\n                        name={\"selectedPatron\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    {this.props.selectedPatronType.map((type, typeIndex) =>\n                        <Selection\n                            key={typeIndex}\n                            index={typeIndex}\n                            value={type.label}\n                            name={\"selectedPatronType\"}\n                            clear={this.props.handleMultiSelectionClear}\n                        />\n                    )}\n                    <Selection\n                        value={this.props.selectedChamber ? this.props.selectedChamber.label : null}\n                        name={\"selectedChamber\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.selectedBillType ? this.props.selectedBillType.label : null}\n                        name={\"selectedBillType\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.selectedSubject ? this.props.selectedSubject.label : null}\n                        name={\"selectedSubject\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    <Selection\n                        value={this.props.excludeFailed ? \"Exclude Failed\" : null}\n                        name={\"excludeFailed\"}\n                        clear={this.props.handleSelectionClear}\n                    />\n                    {this.props.updateSearch &&\n                        <UpdateSearch\n                            updateSearch={this.props.updateSearch}\n                        />\n                    }\n                </div>\n                <hr className=\"faded-line\" />\n            </div>\n        )\n    }\n}\n\nconst Selection = props => {\n    const { title, value, name, index, clear } = props;\n    if (value) {\n        return (<div className=\"selection-bubble\">\n            <div className=\"flex-row\">\n                <span>{title ? `${title}: ${value.length > 100 ? value.substring(0, 100) + '...' : value}` : value.length > 100 ? value.substring(0, 100) + '...' : value}</span>\n                {clear && <button aria-label=\"remove item\" onClick={() => clear(name, index)} className=\"icon cross-blue\"></button>}\n            </div>\n        </div>);\n    } else {\n        return (false);\n    }\n\n}\n\nconst UpdateSearch = props => {\n    const { updateSearch } = props;\n    return (\n        <div className=\"selection-bubble button\">\n            <div className=\"flex-row\" onClick={() => updateSearch()}>\n                <button className=\"button small\">Update Search</button>\n            </div>\n        </div>);\n}\n\nexport default SearchSelections;\n","import React from 'react';\nimport ReactDOM from 'react-dom'\nimport moment from 'moment-timezone';\nimport { connect } from 'react-redux';\nimport DatePicker from 'react-datepicker';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport { LargeListSelect } from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport InputTypes from '../../../lis-admin/lis-minutes-management/components/input-types';\nimport { HubConnectionBuilder } from \"@microsoft/signalr\";\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { bindActionCreators } from 'redux';\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NEW_EVENT = \"NEW_EVENT\";\n\nconst selectStyle = () => {\n    const fontSize = '0.8em';\n    return {\n        container: styles => ({\n            ...styles,\n            minWidth: '90%'\n        }),\n        control: styles => ({\n            ...styles,\n            minHeight: '0px',\n            padding: '0.12em 0.6em !important',\n        }),\n        valueContainer: styles => ({\n            ...styles,\n            padding: 0,\n        }),\n        input: styles => ({\n            ...styles,\n            fontSize: fontSize,\n            lineHeight: 'normal',\n        }),\n        singleValue: styles => ({\n            ...styles,\n            fontSize: fontSize,\n        }),\n        placeholder: styles => ({\n            ...styles,\n            fontSize: fontSize\n        }),\n        option: styles => ({\n            ...styles,\n            fontSize: fontSize\n        }),\n        dropdownIndicator: styles => ({\n            ...styles,\n            padding: '0px 8px'\n        }),\n    };\n}\n\nconst getItemStyle = (isDragging, draggableStyle, historyItem) => ({\n    // some basic styles to make the items look a bit nicer\n    userSelect: 'none',\n    // change background colour if dragging\n    background: isDragging ? '#34495e' : 'white',\n    color: isDragging ? 'white' : '#34495e',\n    border: 'none',\n    background: historyItem.isNewlyAdded ? 'rgba(91, 178, 114, 0.8)' : historyItem.isNewlyDeleted ? 'rgba(255, 151, 151, 0.8)' : historyItem.dateChanged || historyItem.sequenceChanged || historyItem.descriptionChanged || historyItem.eventCodeChanged ? 'rgba(252, 250, 97, 0.8)' : 'white',\n    // styles we need to apply on draggables\n    ...draggableStyle,\n});\n\nconst getListStyle = (isDraggingOver) => ({\n    background: isDraggingOver ? '#8b9fb3' : '#9e9e9e',\n    width: '100%',\n});\n\nconst getDivStyle = (latestEvent, hideAllEvents) => ({\n    display: !latestEvent && hideAllEvents ? \"none\" : \"block\"\n})\n\nclass BillHistoryForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            organizedEvents: [],\n            newEventDate: moment().utcOffset(0).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }),\n            newEvent: '',\n            editingEvents: [],\n            currentInput: { eventGroupIndex: 0, itemIndex: 0, inputNumber: '' },\n            changeToBill: '',\n            templateInputs: [],\n            incompleteInputs: []\n        };\n        this.handleEventInputChange = this.handleEventInputChange.bind(this);\n        this.changeEvent = this.changeEvent.bind(this);\n        this.changeDate = this.changeDate.bind(this);\n        this.toggleEventGroup = this.toggleEventGroup.bind(this);\n        this.bulkToggleEventGroup = this.bulkToggleEventGroup.bind(this);\n        this.toggleEditDescription = this.toggleEditDescription.bind(this);\n        this.changeDescription = this.changeDescription.bind(this);\n        this.formDescription = this.formDescription.bind(this);\n        this.setDescription = this.setDescription.bind(this);\n        this.handleTemplateChange = this.handleTemplateChange.bind(this);\n        this.handleBillNumberChange = this.handleBillNumberChange.bind(this);\n        this.onDragEnd = this.onDragEnd.bind(this);\n        this.handleNewEventChange = this.handleNewEventChange.bind(this);\n        this.handleNewEventDateChange = this.handleNewEventDateChange.bind(this);\n        this.addEvent = this.addEvent.bind(this);\n        this.saveEvents = this.saveEvents.bind(this);\n        this.handleMovingFocus = this.handleMovingFocus.bind(this);\n        this.handleMovingFocusFromBillChanger = this.handleMovingFocusFromBillChanger.bind(this);\n        this.receiveEventByWebsocket = this.receiveEventByWebsocket.bind(this);\n        this.getSessionLegislation = this.getSessionLegislation.bind(this);\n\n        this._inputRefs = [];\n        this._containerRefs = [];\n        this._billSwitcherRef = React.createRef();\n        this._addEventRef = React.createRef();\n    }\n\n    static getConnectionId = (conn, functionToRun) => {\n        //This connection ID might be used later\n        conn.invoke('getConnectionId')\n            .then(connectionId => {\n                functionToRun(connectionId);\n            });\n    }\n\n    //When a WebSocket message comes across with this label then the event list needs to be updated with new values\n    static handleEvent = (message, functionToRun) => {\n        try {\n            if (message.statusCode > 399) throw 'Server Error: ' + JSON.stringify(message);\n            functionToRun(message)\n        } catch (err) {\n            console.log(err);\n        }\n    };\n\n    componentDidMount() {\n        if (this.props.switchedToBill) {\n            this.setState({ changeToBill: this.props.legislationNumber })\n        }\n        let organizedEvents = this.props.organizedEvents;\n        if (organizedEvents.length === 0 || this.props.switchedToBill) {\n            organizedEvents = BillHistoryForm.organizeEvents([...this.props.historyList]);\n            this.props.handleEventChange(organizedEvents);\n        }\n        //try to focus on the add event dropdown/input\n        if (this._addEventRef.current) {\n            var addEventNode = ReactDOM.findDOMNode(this._addEventRef.current);\n            if (addEventNode && addEventNode.getElementsByTagName('input').length) {\n                addEventNode.getElementsByTagName('input')[0].focus();\n            }\n        }\n        const numberOfEvents = organizedEvents.length;\n        //Hide all the events except the last day. This is most likely what the user will be editing\n        organizedEvents.forEach((evt, i) => {\n            if (i !== numberOfEvents - 1) {\n                evt.hidden = true;\n            } else {\n                evt.hidden = false;\n                if (this.props.isBillManagement) {\n                    //set the display sequence for all the events in this group that is going to be automatically displayed\n                    evt.events.forEach(e => {\n                        e.DisplaySequence = e.Sequence * 10;\n                    });\n                }\n            }\n        })\n\n        //Scroll to the bottom so they can see the events of the last day\n        if (!this.props.isBillManagement) {\n            window.scrollTo(0, document.body.scrollHeight);\n        }\n\n        if (!this.props.isBillManagement) {\n            let entryConnection = new HubConnectionBuilder() //in bill mgmt, use one central entryConnection from props rather than a separate connection for each bill\n                .withUrl((API_URL || process.env.REACT_APP_LEGISLATION_EVENT_API_URL) + '/LegislationEvent/events')\n                .build();\n            entryConnection.serverTimeoutInMilliseconds = 60000;\n\n            this.setState({\n                entryHubConnection: entryConnection\n            }, () => {\n                const self = this;\n                this.state.entryHubConnection\n                    .start({ withCredentials: false })\n                    .then(() => {\n                        BillHistoryForm.getConnectionId(this.state.entryHubConnection, (connectionId) => {\n                            console.log(`entryConnectionId: ${connectionId}`);\n                            this.setState({\n                                entryConnectionId: connectionId\n                            });\n                        });\n                    }).catch(err => {\n                        console.log('Error establishing connection' + err)\n                        this.props.actions.makeToast([{ message: \"History Connection Failed\", type: \"failure\" }])\n                    });\n                this.state.entryHubConnection.on(\"ReceiveEvent\", message => BillHistoryForm.handleEvent(message, this.receiveEventByWebsocket));\n            });\n        }\n    }\n\n    receiveEventByWebsocket(message) {\n        let historyList = [...this.props.historyList];\n\n        //If the LegislationID for the list of new events doesn't match the open bill then throw it out\n        if (this.props.billData.LegislationID !== message[0].LegislationID) {\n            return;\n        } else {\n            for (let i = 0; i < message.length; i++) {\n                //If we don't find an event from the websocket message in the already-loaded list of events then add it to the local history list\n                if (!historyList.find(x => x.LegislationEventID === message[i].LegislationEventID)) {\n                    historyList.push(message[i])\n                }\n            }\n\n            //Send the updated local history list to be reorganized and displayed\n            let organizedEvents = BillHistoryForm.organizeEvents(historyList);\n            this.props.handleEventChange(organizedEvents);\n        }\n    }\n\n    // Events can only be re-organized within the day that the event occured\n    // So each day's events needs to be moved into their own group so they can each have their own drag and drop interface\n    // Events can be moved to a different group by the user by selecting a different date for the event\n    static organizeEvents(events) {\n        let organizedEvents = [];\n        let previousDate = '';\n        let currentDate = '';\n        let eventSequence = 1;\n        let eventsInADay = [];\n        events.sort((a, b) => moment(a.EventDate).startOf('day').valueOf() - moment(b.EventDate).startOf('day').valueOf())\n        events.forEach(event => {\n            //first off, set originallyDeleted which is used to figure out if events are newly deleted or not and highlight in bill mgmt\n            event.originallyDeleted = Boolean(event.DeletionDate);\n            currentDate = moment(event.EventDate)\n            if (previousDate && !currentDate.isSame(previousDate, 'day')) {\n                organizedEvents.push({\n                    events: eventsInADay,\n                    date: previousDate\n                });\n                eventsInADay = [];\n                eventSequence = 1;\n            }\n            eventsInADay.push({ ...event, Sequence: eventSequence, origSequence: eventSequence });\n            eventSequence++;\n            previousDate = currentDate;\n        });\n        if (eventsInADay.length > 0) {\n            organizedEvents.push({\n                events: eventsInADay,\n                date: previousDate\n            });\n        }\n\n        return organizedEvents;\n    }\n\n    handleEventInputChange(inputValue, legislationEventID) {\n        let eventInputValue = { ...this.state.eventInputValue };\n        eventInputValue[legislationEventID.toString()] = inputValue;\n        this.setState({ eventInputValue });\n    }\n\n    changeEvent(val, eventGroupIndex, index) {\n        let organizedEvents = [...this.props.organizedEvents];\n        organizedEvents[eventGroupIndex].events[index].origEventCode = organizedEvents[eventGroupIndex].events[index].origEventCode ?? organizedEvents[eventGroupIndex].events[index].EventCode;\n        organizedEvents[eventGroupIndex].events[index].EventCode = val.EventCode;\n        organizedEvents[eventGroupIndex].events[index].IsPassed = val.IsPassed;\n        organizedEvents[eventGroupIndex].events[index].Description = val.LegislationDescription;\n        //The event type is referenced from the EventCode. Delete this so the correct event is set\n        delete organizedEvents[eventGroupIndex].events[index].LegislationEventTypeID;\n        organizedEvents[eventGroupIndex].events[index].hasChanged = true;\n        if (val.ActionReferences && val.ActionReferences.length > 0) {\n            organizedEvents[eventGroupIndex].events[index].EventReferences = [...val.ActionReferences];\n        }\n        this.props.handleEventChange(organizedEvents, () => {\n            this.saveEvents();\n\n            // When selecting a new event the container does not properly focus so it is done here.\n            if (this._containerRefs[eventGroupIndex] && this._containerRefs[eventGroupIndex][`${index}-${1}`]) {\n                // The timeout is because react-select messes with the focus after changing the event.\n                // It guarantees that react-select will finish its opertions before the focus is set.\n                setTimeout(() => this._containerRefs[eventGroupIndex][`${index}-${1}`].current.focus(), 10)\n            }\n\n        });\n        this.handleEventInputChange(null, organizedEvents[eventGroupIndex].events[index].LegislationEventID);\n    }\n\n    changeDate(val, eventGroupIndex, index) {\n        if (val === null) {\n            return;\n        }\n        let organizedEvents = [...this.props.organizedEvents];\n        let lEvent = {\n            ...organizedEvents[eventGroupIndex].events[index],\n            EventDate: val.format(\"LLLL\"),\n            origDate: organizedEvents[eventGroupIndex].events[index].origDate ?? organizedEvents[eventGroupIndex].events[index].EventDate,\n            hasChanged: true\n        };\n        let newEventGroupIndex = organizedEvents.findIndex(eventGroup => eventGroup.date.isSame(val, 'day'));\n        organizedEvents[eventGroupIndex].events.splice(index, 1);\n        if (newEventGroupIndex > -1) {\n            // If the selected date already has events that occured on that date then the event is moved into the existing group\n            lEvent.Sequence = organizedEvents[newEventGroupIndex].events.length + 1;\n            organizedEvents[newEventGroupIndex].events.push(lEvent)\n            //expand this new event day\n            organizedEvents[newEventGroupIndex].hidden = false;\n        } else {\n            // If the selected date does not have any events then a new event group needs to be created for this date\n            lEvent.Sequence = 1;\n            const newEventGroup = {\n                date: val,\n                events: [lEvent],\n                hidden: false\n            };\n            // Gotta find where it goes in the list of groups\n            organizedEvents.some((eventGroup, i) => {\n                if (eventGroup.date.isAfter(val, 'day')) {\n                    newEventGroupIndex = i;\n                    organizedEvents.splice(i, 0, newEventGroup)\n                    return true;\n                }\n                if (i === organizedEvents.length - 1) {\n                    newEventGroupIndex = i + 1;\n                    organizedEvents.push(newEventGroup);\n                }\n            });\n        }\n        //If the old day is now empty then remove it from the array\n        if (organizedEvents[eventGroupIndex].events.length === 0) {\n            organizedEvents.splice(eventGroupIndex, 1);\n            if (newEventGroupIndex > eventGroupIndex) {\n                newEventGroupIndex -= 1\n            }\n        }\n\n        // After setting the new events make sure that focus is applied to the container of the event's new position\n        this.props.handleEventChange(organizedEvents, () => {\n            this.saveEvents();\n            if (this._containerRefs[newEventGroupIndex] && this._containerRefs[newEventGroupIndex][`${organizedEvents[newEventGroupIndex].events.length - 1}-${0}`]) {\n                this._containerRefs[newEventGroupIndex][`${organizedEvents[newEventGroupIndex].events.length - 1}-${0}`].current.focus();\n            }\n        });\n\n        if (this.props.hideAllEvents) {\n            this.props.togglehideAllEvents(this.props.idx);\n        }\n\n        this.setState({\n            editingEvents: [],\n        });\n    }\n\n    toggleEventGroup(eventGroupIndex, expand) {\n        let organizedEvents = this.props.organizedEvents;\n        //if display sequences haven't already been set for this group of events, set it now\n        if (this.props.isBillManagement && organizedEvents[eventGroupIndex].events.find(e => !e.DisplaySequence)) {\n            organizedEvents[eventGroupIndex].events.forEach(evt => {\n                evt.DisplaySequence = evt.Sequence * 10;\n            })\n        }\n        organizedEvents[eventGroupIndex].hidden = expand !== undefined ? !expand : organizedEvents[eventGroupIndex].hidden === undefined ? false : !organizedEvents[eventGroupIndex].hidden;\n        this.forceUpdate();\n    }\n\n    bulkToggleEventGroup(expand) {\n        let organizedEvents = this.props.organizedEvents;\n        organizedEvents.forEach((eventGroup, idx) => {\n            this.toggleEventGroup(idx, expand)\n        })\n    }\n\n    toggleEditDescription(eventGroupIndex, index) {\n        let editingEvents = [...this.state.editingEvents];\n        if (editingEvents[eventGroupIndex] === undefined || editingEvents[eventGroupIndex] === null) {\n            editingEvents[eventGroupIndex] = [];\n        }\n        // Marking it as null will remove the event from 'edit description mode'\n        if (editingEvents[eventGroupIndex][index]) {\n            editingEvents[eventGroupIndex][index] = null;\n        } else {\n            const currentEvent = JSON.parse(JSON.stringify(this.props.organizedEvents[eventGroupIndex].events[index]));\n            const eventReference = this.props.billEvents.find(evt => evt.EventCode === currentEvent.EventCode && evt.IsPassed === currentEvent.IsPassed);\n            if (eventReference) {\n                const actionReferences = eventReference.ActionReferences;\n                if (actionReferences) {\n                    const missingActionReferences = actionReferences.filter(ref => !currentEvent.EventReferences.map(existingEvt => existingEvt.ActionReferenceType).includes(ref.ActionReferenceType));\n                    if (missingActionReferences.length) {\n                        currentEvent.EventReferences = currentEvent.EventReferences.concat(JSON.parse(JSON.stringify(missingActionReferences)));\n                    }\n                }\n            }\n            //If the user has selected an event with at least one ActionReferenceType of LegislationEvent then fetch possible events for reconsideration\n            if (currentEvent.EventReferences && currentEvent.EventReferences.find(x => x.ActionReferenceType === \"LegislationEvent\")) {\n                this.props.getReconsiderationEvents(currentEvent.EventCode)\n            } else if (currentEvent.EventReferences && currentEvent.EventReferences.find(x => x.ActionReferenceType === \"Legislation\") && this.props.billData && this.props.billData.SessionID) {\n                this.getSessionLegislation(this.props.billData.SessionID);\n            }\n            editingEvents[eventGroupIndex][index] = { ...currentEvent };\n        }\n        this.setState({\n            editingEvents: editingEvents\n        });\n    }\n\n    changeDescription(eventGroupIndex, eventIndex, referenceIndex, reference, descEdit) {\n        let editingEvents = [...this.state.editingEvents];\n        let event = editingEvents[eventGroupIndex][eventIndex];\n        event.origDescription = event.origDescription ?? event.Description;\n        //If the event has event references then concatinate them to get the event description\n        //If it doesn't then this function was ran by a text input so just set the value of 'reference' to the description\n        if (event.EventReferences && event.EventReferences.length > 0 && !descEdit) {\n            event.EventReferences[referenceIndex] = reference;\n            event.Description = this.formDescription(event, event.EventReferences);\n        } else {\n            event.Description = reference;\n        }\n        this.setState({\n            editingEvents: editingEvents\n        });\n    }\n\n    setDescription(eventGroupIndex, index) {\n        let organizedEvents = [...this.props.organizedEvents];\n        organizedEvents[eventGroupIndex].events[index] = this.state.editingEvents[eventGroupIndex][index];\n        organizedEvents[eventGroupIndex].events[index].hasChanged = true;\n        this.props.handleEventChange(organizedEvents, () => {\n            this.saveEvents();\n        });\n        this.toggleEditDescription(eventGroupIndex, index);\n    }\n\n    handleTemplateChange(_a, _b, referenceIndex, reference) {\n        let templateInputs = [...this.state.templateInputs];\n        templateInputs[referenceIndex] = reference;\n        this.setState({\n            templateInputs: templateInputs\n        });\n    }\n\n    handleBillNumberChange(e) {\n        this.setState({\n            changeToBill: e.target.value\n        });\n    }\n\n    onDragEnd(result, eventGroupIndex) {\n        if (!result.destination) {\n            return;\n        }\n        let organizedEvents = [...this.props.organizedEvents];\n        const [removed] = organizedEvents[eventGroupIndex].events.splice(result.source.index, 1);\n        organizedEvents[eventGroupIndex].events.splice(result.destination.index, 0, removed);\n        organizedEvents[eventGroupIndex].events.forEach((element, index) => {\n            element.Sequence = index + 1\n            if (this.props.isBillManagement) {\n                element.DisplaySequence = element.Sequence * 10;\n            }\n            element.hasChanged = true;\n        });\n        // Remove any events out of edit description mode\n        let editingEvents = [...this.state.editingEvents];\n        editingEvents[eventGroupIndex] = null;\n        this.setState({\n            editingEvents: editingEvents\n        });\n        this.props.handleEventChange(organizedEvents, () => {\n            this.saveEvents();\n        });\n    }\n\n    handleNewEventChange(val) {\n        let templateInputs = [];\n        if (val.ActionReferences && val.ActionReferences.length > 0) {\n            //Remove all object references to val\n            templateInputs = JSON.parse(JSON.stringify(val.ActionReferences));\n        }\n        this.setState({\n            newEvent: {\n                ...val,\n                value: `${val.EventCode}-${val.IsPassed}`\n            },\n            templateInputs: templateInputs\n        }, () => {\n            this.handleEventInputChange(null, NEW_EVENT);\n            //If the user has selected an event with at least one ActionReferenceType of LegislationEvent then fetch possible events for reconsideration\n            if (val.ActionReferences.find(x => x.ActionReferenceType === \"LegislationEvent\")) {\n                this.props.getReconsiderationEvents(val.EventCode)\n            } else if (val.ActionReferences.find(x => x.ActionReferenceType === \"Legislation\") && this.props.billData && this.props.billData.SessionID) {\n                this.getSessionLegislation(this.props.billData.SessionID);\n            }\n        });\n    }\n\n    handleNewEventDateChange(val) {\n        let value = moment(val).set({ hour: 0, minute: 0, second: 0, millisecond: 0 });\n        this.setState({\n            newEventDate: value\n        });\n    }\n\n    addEvent(e) {\n        e.preventDefault();\n\n        let incompleteInputs = [];\n        for (let i = 0; i < this.state.templateInputs.length; i++) {\n            if ((this.state.templateInputs[i].IsMandatory && !this.state.templateInputs[i].ReferenceText)\n                || (this.state.templateInputs[i].IsMandatory && this.state.templateInputs[i].ActionReferenceTypeID == 14 && !this.state.templateInputs[i].ReferenceID)) {\n                incompleteInputs.push(i);\n            }\n        }\n\n        this.setState({\n            incompleteInputs: incompleteInputs\n        })\n\n        if (incompleteInputs.length > 0) {\n            return;\n        }\n\n        const { newEvent, newEventDate } = this.state;\n        let organizedEvents = [...this.props.organizedEvents];\n        let actorType = '';\n        switch (newEvent.EventCode ? newEvent.EventCode[0].toUpperCase() : newEvent.LegislationChamberCode) {\n            case 'H':\n                actorType = 'House';\n                break;\n            case 'S':\n                actorType = 'Senate';\n                break;\n            case 'C':\n                actorType = 'Conference';\n                break;\n            case 'G':\n                actorType = 'Governor';\n                break;\n        }\n\n        let eventObj = {\n            ...newEvent,\n            ActorType: actorType,\n            IsPublic: true,\n            Description: newEvent.label,\n            LegislationID: this.props.billData.LegislationID,\n            EventDate: moment(newEventDate).utcOffset(0).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).toISOString(),\n            hasChanged: true,\n            hidden: false\n        };\n\n        if (newEvent.ActionReferences && newEvent.ActionReferences.length > 0 && this.state.templateInputs.length > 0) {\n            eventObj.EventReferences = this.state.templateInputs;\n            eventObj.Description = this.formDescription(eventObj);\n        }\n\n        //Check to see if there is are events with the same date already\n        let newEventGroupIndex = organizedEvents.findIndex(eventGroup => eventGroup.date.isSame(newEventDate, 'day'));\n        if (newEventGroupIndex > -1) {\n            // If the selected date already has events that occured on that date then the event is moved into the existing group\n            organizedEvents[newEventGroupIndex].events.push(eventObj);\n        } else {\n            // If the selected date does not have any events then a new event group needs to be created for this date\n            const newEventGroup = {\n                date: newEventDate,\n                events: [eventObj]\n            };\n            // Gotta find where it goes in the list of groups\n            if (organizedEvents.length === 0) {\n                newEventGroupIndex = 0;\n                organizedEvents.splice(0, 0, newEventGroup);\n            } else {\n                organizedEvents.some((eventGroup, i) => {\n                    if (eventGroup.date.isAfter(newEventDate, 'day')) {\n                        newEventGroupIndex = i\n                        organizedEvents.splice(i, 0, newEventGroup);\n                        return true;\n                    }\n                    if (i === organizedEvents.length - 1) {\n                        newEventGroupIndex = i + 1;\n                        organizedEvents.push(newEventGroup)\n                    }\n                });\n            }\n        }\n        this.setState({\n            newEvent: '',\n            templateInputs: []\n        });\n        // After adding the new event, auto-save the event\n        this.props.handleEventChange(organizedEvents, () => {\n            this.saveEvents();\n        })\n    }\n\n    formDescription(eventObj, eventReferences) {\n        const inputs = eventReferences || this.state.templateInputs\n        const memberListEvents = [\"H6013\", \"S6013\", \"H6113\", \"S6113\", \"H6213\", \"S6213\"];\n        const substitueRejectedEvents = [\"S5432\", \"S5433\", \"H5432\", \"H5433\"];\n        let overrideSet = false;\n\n        const description = inputs.map((tInput, i) => {\n            //For events H6013/S6013/H6113/S6113/H6213/S6213 there are sometimes incomplete lists of members. This will prevent the UI from adding blank member dropdown values to the description\n            if (memberListEvents.includes(eventObj.EventCode) && !tInput.ReferenceText) {\n                return;\n            }\n\n            //Drop in canned language for opposing chamber substitute or substitue with amendment rejected\n            if (substitueRejectedEvents.includes(eventObj.EventCode)) {\n                if (!overrideSet) {\n                    overrideSet = true;\n                    return eventObj.LegislationDescription ?? this.props.billEvents?.find(e => e.EventCode === eventObj.EventCode && e.IsPassed === eventObj.IsPassed)?.LegislationDescription;\n                } else {\n                    return \"\";\n                }\n            }\n\n            if (!tInput.ReferenceText && !eventObj.EventReferences[0].ReconsiderationGrammar) {\n                return `${tInput.ActionReferenceType}`\n            }\n\n            //Set the Description to the canned description if it's a reconsideration, otherwise just drop in the reference text\n            return eventObj.EventReferences.find(x => x.ActionReferenceType === \"LegislationEvent\") ? this.props.billEvents?.find(e => e.EventCode === eventObj.EventReferences?.find(x => x.ActionReferenceType === \"LegislationEvent\")?.EventCode && e.IsPassed === eventObj.EventReferences?.find(x => x.ActionReferenceType === \"LegislationEvent\")?.IsPassed)?.ReconsiderationDescription : (tInput.ReferenceText + (memberListEvents.includes(eventObj.EventCode) && tInput.ActionReferenceType === \"Member\" && tInput.ReferenceText && inputs[i + 1] && inputs[i + 1].ActionReferenceType === \"Member\" && inputs[i + 1].ReferenceText ? \", \" : \"\"))\n        }).join('')\n\n        return description;\n    }\n\n    deleteEvent(eventGroupIndex, index) {\n        let organizedEvents = [...this.props.organizedEvents];\n        let event = organizedEvents[eventGroupIndex].events[index];\n        event.hasChanged = true;\n        if (event.DeletionDate) {\n            delete event.DeletionDate\n        }\n        //if deleting an event that didn't already exist/hasn't been saved at all, just remove it entirely\n        else if (!event.LegislationEventID) {\n            //if there is only one event in this day, just remove the day\n            if (organizedEvents[eventGroupIndex].events.length === 1) {\n                const wasLastEventGroup = eventGroupIndex === organizedEvents.length - 1;\n                organizedEvents.splice(eventGroupIndex, 1);\n                //if it was the last event day that got removed, expand the now-last event day\n                if (wasLastEventGroup) {\n                    organizedEvents[organizedEvents.length - 1].hidden = false;\n                }\n            } else {\n                //There is more than just this event in the day, only remove this event from the group and move on\n                organizedEvents[eventGroupIndex].events.splice(index, 1);\n                //recalculate sequences of events\n                for (let idx = index; idx < organizedEvents[eventGroupIndex].events.length; idx++) {\n                    organizedEvents[eventGroupIndex].events[idx].Sequence--\n                }\n            }\n        } else {\n            //this event existed to begin with, we need to set the deletion date and save it\n            event.DeletionDate = moment().toISOString();\n        }\n        // After soft deleting the new event, auto-save the event\n        this.props.handleEventChange(organizedEvents, () => {\n            this.saveEvents(() => {\n                if (event.DeletionDate && [\"8500\", \"8501\", \"8503\"].includes(event.EventCode.match(/\\d+/)[0]) && event.ReferenceID && event.ReferenceNumber) {\n                    this.props.actions.deleteBlobFileStatement('?ownerID=' + event.ReferenceID + '&referenceNumber=' + event.ReferenceNumber).catch(() => {\n                        this.props.actions.makeToast([{ message: \"Failed to delete impact statement file\", type: \"failure\" }])\n                    })\n                }\n            });\n        })\n    }\n\n    saveEvents(callback) {\n        let eventsToSave = [];\n        let eventGroupsToSave = []\n        this.props.organizedEvents.forEach(eventGroup => {\n            eventGroup.events.forEach(event => {\n                // Do not save the events that have been deleted and lack a event id. These events to do not need to be created\n                // Do not  save events that have not been changed at all\n                if (!event.LegislationEventID && event.DeletionDate) {\n                    return\n                } else if (!event.hasChanged) {\n                    return\n                } else {\n                    eventsToSave.push(event);\n                    if (!eventGroupsToSave.find(group => group.date === eventGroup.date)) {\n                        eventGroupsToSave.push(eventGroup)\n                    }\n                }\n            })\n\n        });\n        this.setState({ isSaving: true });\n        this.props.saveEvents(eventsToSave, (success) => {\n            this.setState({ isSaving: false });\n            if (success) {\n                let orgEvents = BillHistoryForm.organizeEvents([...this.props.historyList]);\n                orgEvents.forEach(group => {\n                    if (eventGroupsToSave.find(g => g.date.isSame(group.date, 'day'))) { group.hidden = false; }\n                })\n                this.props.handleEventChange(orgEvents, () => {\n                    // Try to focus on the last input in the list\n                    const lastSavedEventGroup = eventGroupsToSave.length && this.props.organizedEvents.findIndex(group => group.date.isSame(eventGroupsToSave[eventGroupsToSave.length - 1].date, 'day')) > -1 ? this.props.organizedEvents.findIndex(group => group.date.isSame(eventGroupsToSave[eventGroupsToSave.length - 1].date, 'day')) : this.props.organizedEvents.length - 1;\n                    const savedEventsInLastSavedEventGroup = eventsToSave.filter(evt => moment(evt.EventDate).isSame(this.props.organizedEvents[lastSavedEventGroup].date, 'day'));\n                    const lastSavedEvent = savedEventsInLastSavedEventGroup[savedEventsInLastSavedEventGroup.length - 1];\n                    const lastSavedEventIndex = lastSavedEvent ? this.props.organizedEvents[lastSavedEventGroup].events.findIndex(evt => evt.LegislationEventID === lastSavedEvent.LegislationEventID || (evt.Sequence === lastSavedEvent.Sequence && evt.EventCode === lastSavedEvent.EventCode)) : this.props.organizedEvents[lastSavedEventGroup].length - 1\n                    if (this._containerRefs[lastSavedEventGroup]) {\n                        if (this._containerRefs[lastSavedEventGroup][`${lastSavedEventIndex}-${1}`]) {\n                            this._containerRefs[lastSavedEventGroup][`${lastSavedEventIndex}-${1}`].current.focus();\n                        }\n                    }\n                });\n            } else {\n                //refresh events using the list returned from the GET which was called after the save failed\n                let orgEvents = BillHistoryForm.organizeEvents([...this.props.historyList]);\n                orgEvents.forEach(group => {\n                    if (eventGroupsToSave.find(g => g.date.isSame(group.date, 'day'))) { group.hidden = false; }\n                })\n                this.props.handleEventChange(orgEvents, () => { })\n            }\n            if (callback) callback();\n        });\n    }\n\n    getSessionLegislation(sessionID) {\n        if (!this.state.sessionLegislation) {\n            this.setState({ fetchingSessionLegislation: true }, () => {\n                this.props.actions.getSessionBills('?sessionID= ' + sessionID).then(() => {\n                    let billList = [...this.props.bills.sessionBills];\n                    billList.forEach(bill => {\n                        const chiefPatrons = bill.Patrons && bill.Patrons.length && bill.Patrons.filter(p => p.PatronTypeID === 1);\n                        bill.label = chiefPatrons && chiefPatrons.length ? ' (' + bill.LegislationNumber + '-' + chiefPatrons[0].PatronDisplayName + ')' : bill.LegislationNumber;\n                        bill.value = bill.LegislationID\n                    });\n                    this.setState({\n                        sessionLegislation: billList,\n                        fetchingSessionLegislation: false\n                    })\n                }).catch(err => {\n                    if (err === \"Aborted\") {\n                        return;\n                    }\n                    console.error(err)\n                    this.setState({ fetchingSessionLegislation: false })\n                });\n            })\n        }\n    }\n\n    focusOnInputContainer(eventGroupIndex, index, inputNumber, e) {\n        e.stopPropagation();\n        if (e.key === 'Enter' || e.key === 'Escape') {\n            this._containerRefs[eventGroupIndex][`${index}-${inputNumber}`].current.focus();\n        }\n    }\n\n    checkForScrollUp = (node) => {\n        // Scroll up a bit more if the element is barely on screen\n        const conNodeRect = node.getBoundingClientRect();\n        if (conNodeRect.top < conNodeRect.height * 2) {\n            this.scrollToEvent(node);\n        }\n    }\n\n    checkForScrollDown = (node) => {\n        // Scroll down a bit more if the element is barely on screen\n        const conNodeRect = node.getBoundingClientRect();\n        if (conNodeRect.bottom > window.innerHeight - conNodeRect.height * 2) {\n            this.scrollToEvent(node);\n        }\n    }\n\n    handleMovingFocus(eventGroupIndex, eventIndex, inputNumber, e) {\n        const key = e.key;\n        e.preventDefault();\n        switch (key) {\n            case 'ArrowLeft':\n                if (this._containerRefs[eventGroupIndex] && this._containerRefs[eventGroupIndex][`${eventIndex}-${inputNumber - 1}`]) {\n                    this._containerRefs[eventGroupIndex][`${eventIndex}-${inputNumber - 1}`].current.focus()\n                }\n                break;\n            case 'ArrowRight':\n                if (this._containerRefs[eventGroupIndex] && this._containerRefs[eventGroupIndex][`${eventIndex}-${inputNumber + 1}`]) {\n                    this._containerRefs[eventGroupIndex][`${eventIndex}-${inputNumber + 1}`].current.focus()\n                }\n                break;\n            case 'ArrowDown':\n                if (this._containerRefs[eventGroupIndex] && this._containerRefs[eventGroupIndex][`${eventIndex + 1}-${inputNumber}`]) {\n                    const conNode = this._containerRefs[eventGroupIndex][`${eventIndex + 1}-${inputNumber}`].current;\n                    conNode.focus();\n                    this.checkForScrollDown(conNode);\n                } else if (this._containerRefs[eventGroupIndex + 1] && this._containerRefs[eventGroupIndex + 1][`${0}-${inputNumber}`]) {\n                    let organizedEvents = this.props.organizedEvents;\n                    organizedEvents[eventGroupIndex + 1].hidden = false;\n                    const conNode = this._containerRefs[eventGroupIndex + 1][`${0}-${inputNumber}`].current\n                    conNode.focus();\n                    this.checkForScrollDown(conNode);\n                } else if (this._billSwitcherRef.current) {\n                    this._billSwitcherRef.current.focus();\n                }\n                break;\n            case 'ArrowUp':\n                if (this._containerRefs[eventGroupIndex] && this._containerRefs[eventGroupIndex][`${eventIndex - 1}-${inputNumber}`]) {\n                    const conNode = this._containerRefs[eventGroupIndex][`${eventIndex - 1}-${inputNumber}`].current\n                    conNode.focus();\n                    this.checkForScrollUp(conNode);\n                } else if (this._containerRefs[eventGroupIndex - 1]) {\n                    const lastItemIndexInEventGroup = this.props.organizedEvents[eventGroupIndex - 1].events.length - 1\n                    if (this._containerRefs[eventGroupIndex - 1][`${lastItemIndexInEventGroup}-${inputNumber}`]) {\n                        let organizedEvents = this.props.organizedEvents;\n                        organizedEvents[eventGroupIndex - 1].hidden = false;\n                        const conNode = this._containerRefs[eventGroupIndex - 1][`${lastItemIndexInEventGroup}-${inputNumber}`].current\n                        conNode.focus();\n                        this.checkForScrollUp(conNode);\n                    }\n                }\n                break;\n            case 'Tab':\n                const changer = e.shiftKey ? -1 : 1\n                // First check if there is one to the right.\n                if (this._containerRefs[eventGroupIndex] && this._containerRefs[eventGroupIndex][`${eventIndex}-${inputNumber + changer}`]) {\n                    this._containerRefs[eventGroupIndex][`${eventIndex}-${inputNumber + changer}`].current.focus()\n                }\n                // If not, check if there is one underneath in the same group\n                else if (this._containerRefs[eventGroupIndex] && this._containerRefs[eventGroupIndex][`${eventIndex + changer}-${changer === 1 ? 0 : 1}`]) {\n                    const conNode = this._containerRefs[eventGroupIndex][`${eventIndex + changer}-${changer === 1 ? 0 : 1}`].current;\n                    conNode.focus();\n                    this.checkForScrollDown(conNode);\n                }\n                // Finally, check if there is one underneath in a different group\n                else if (this._containerRefs[eventGroupIndex + changer] && this._containerRefs[eventGroupIndex + changer][`${changer === 1 ? 0 : this.props.organizedEvents[eventGroupIndex + changer].events.length - 1}-${changer === 1 ? 0 : 1}`]) {\n                    let organizedEvents = this.props.organizedEvents;\n                    organizedEvents[eventGroupIndex + changer].hidden = false;\n                    const conNode = this._containerRefs[eventGroupIndex + changer][`${`${changer === 1 ? 0 : this.props.organizedEvents[eventGroupIndex + changer].events.length - 1}-${changer === 1 ? 0 : 1}`}`].current\n                    conNode.focus();\n                    this.checkForScrollDown(conNode);\n                }\n                // If none of these are the case then the user is at the very bottom and they need to focus on the bill switcher\n                else if (this._billSwitcherRef.current && changer === 1) {\n                    this._billSwitcherRef.current.focus();\n                }\n                break;\n            case 'Enter':\n                if (this._inputRefs[eventGroupIndex] && this._inputRefs[eventGroupIndex][`${eventIndex}-${inputNumber}`]) {\n                    // The ref doesn't have a click function so turn it into a node\n                    const inputNodeContainer = ReactDOM.findDOMNode(this._inputRefs[eventGroupIndex][`${eventIndex}-${inputNumber}`].current);\n                    const inputNode = inputNodeContainer.querySelector('input');\n                    if (inputNode) {\n                        inputNode.focus();\n                        inputNode.click();\n                    }\n                }\n                break;\n        }\n    }\n\n    handleMovingFocusFromBillChanger(e) {\n        const key = e.key;\n        if (key === 'ArrowUp' || e.key === 'Tab' && e.shiftKey) {\n            e.preventDefault();\n            const lastEventGroup = this.props.organizedEvents.length - 1;\n            // Focus on the last input ref\n            if (this._containerRefs[lastEventGroup]) {\n                const lastEvent = this.props.organizedEvents[lastEventGroup].events.length - 1;\n                if (this._containerRefs[lastEventGroup][`${lastEvent}-${1}`]) {\n                    this._containerRefs[lastEventGroup][`${lastEvent}-${1}`].current.focus();\n                }\n            }\n        } else if (key == 'Enter') {\n            e.preventDefault();\n            this.props.changeToNewBillHistoryForm(this.state.changeToBill);\n        }\n    }\n\n    scrollToEvent(node) {\n        const nodeRect = node.getBoundingClientRect();\n        const windowY = window.pageYOffset;\n        const windowHeight = window.innerHeight;\n        window.scrollTo({\n            top: nodeRect.top + windowY - windowHeight / 2,\n            behavior: 'smooth'\n        });\n    }\n\n    render() {\n        // Create a ref for every datepicker and dropdown in the form. This is so when hitting enter focus can be applied to the input\n        // Also create a ref for the parent element of the input. This is so the user can use arrow keys to move focus from container to container\n        // React acts out of the ordinary with a multi-dimensional array of refs, so a 1 dimensional array is used containing an object\n        let inputRefs = [];\n        let containerRefs = [];\n        this.props.organizedEvents.forEach((eventGroup, eventGroupIndex) => {\n            let inputs = {};\n            let containers = {};\n            eventGroup.events.forEach((_historyItem, index) => {\n                inputs[`${index}-0`] = React.createRef(),\n                    inputs[`${index}-1`] = React.createRef();\n                containers[`${index}-0`] = React.createRef(),\n                    containers[`${index}-1`] = React.createRef();\n            });\n            inputRefs[eventGroupIndex] = inputs;\n            containerRefs[eventGroupIndex] = containers;\n        });\n        this._inputRefs = inputRefs;\n        this._containerRefs = containerRefs;\n        return (\n            <React.Fragment>\n                {!this.props.isBillManagement && <button type=\"button\" className=\"button-link\" style={{ fontSize: '0.8em' }} onClick={this.props.toggleEditContent}>(Close)</button>}\n                <div className=\"dlas-forms history-event-form\" style={{ paddingBottom: !this.props.isBillManagement ? '100px' : '15px' }}>\n                    {!this.props.isBillManagement &&\n                        <div>\n                            <div>\n                                <label className=\"label\">Switch To Bill</label>\n                                <div>\n                                    <input\n                                        ref={this._billSwitcherRef}\n                                        onKeyDown={this.handleMovingFocusFromBillChanger}\n                                        type=\"text\"\n                                        placeholder=\"Bill Number\"\n                                        onChange={this.handleBillNumberChange}\n                                        value={this.state.changeToBill}\n                                    />\n                                </div>\n                            </div>\n                            <br />\n                            <AddEventForm\n                                addEventRef={this._addEventRef}\n                                newEvent={this.state.newEvent}\n                                handleNewEventChange={this.handleNewEventChange}\n                                handleEventInputChange={this.handleEventInputChange}\n                                eventInputValue={this.state.eventInputValue}\n                                newEventDate={this.state.newEventDate}\n                                handleNewEventDateChange={this.handleNewEventDateChange}\n                                billEvents={this.props.billEvents}\n                                addEvent={this.addEvent}\n                                isSaving={this.state.isSaving}\n                                memberList={this.state.newEvent && this.state.newEvent.EventCode.startsWith(\"H\") ? this.props.memberList.filter(m => m.ChamberCode === \"H\") : this.state.newEvent && this.state.newEvent.EventCode.startsWith(\"S\") ? this.props.memberList.filter(m => m.ChamberCode === \"S\") : this.props.memberList}\n                                committeeList={this.props.committeeList}\n                                legislationList={this.state.sessionLegislation}\n                                fetchingSessionLegislation={this.state.fetchingSessionLegislation}\n                                actionTypes={this.props.actionTypes}\n                                templateInputs={this.state.templateInputs}\n                                textList={this.props.versionsList}\n                                handleTemplateChange={this.handleTemplateChange}\n                                eventList={this.props.reconsiderationEvents}\n                                reconsiderationEvents={this.props.reconsiderationEvents}\n                                reconsiderationActionReference={this.state.newEvent && this.state.newEvent.ActionReferences.find(x => x.ActionReferenceType === \"LegislationEvent\") ? true : false}\n                                incompleteInputs={this.state.incompleteInputs}\n                            />\n                        </div>\n                    }\n                    <div style={{ marginBottom: \"10px\", display: 'flex', gap: '25px' }}>\n                        <div>\n                            <button onClick={() => this.props.idx !== undefined ? this.props.togglehideAllEvents(this.props.idx) : this.props.togglehideAllEvents()} type=\"button\" className={this.props.hideAllEvents ? \"arrow-up\" : \"arrow-down\"} />\n                            <label>{!this.props.hideAllEvents ? \"Hide All Event Days\" : \"Show All Event Days\"}</label>\n                        </div>\n                        {!this.props.hideAllEvents &&\n                            <div>\n                                <button onClick={() => this.bulkToggleEventGroup(Boolean(this.props.organizedEvents.find(eg => eg.hidden)))} type=\"button\" className={this.props.organizedEvents.find(eg => eg.hidden) ? \"arrow-up\" : \"arrow-down\"} />\n                                <label>{!this.props.organizedEvents.find(eg => eg.hidden) ? \"Collapse All Event Days\" : \"Expand All Event Days\"}</label>\n                            </div>\n                        }\n                    </div>\n                    {this.props.organizedEvents.map((eventGroup, eventGroupIndex) =>\n                        <div key={eventGroupIndex} id={this.props.idx !== undefined && eventGroupIndex === this.props.organizedEvents.length - 1 ? `last-${this.props.idx}` : null} style={getDivStyle(eventGroupIndex === this.props.organizedEvents.length - 1, this.props.hideAllEvents)} className=\"event-day\" >\n                            {eventGroup.events.length > 0 &&\n                                <React.Fragment>\n                                    <DragDropContext onDragEnd={result => this.onDragEnd(result, eventGroupIndex)}>\n                                        <Droppable droppableId=\"droppable\">\n                                            {(provided, snapshot) => (\n                                                <table\n                                                    className=\"dnd-grid-table bill-history-grid\"\n                                                    ref={provided.innerRef}\n                                                    style={getListStyle(snapshot.isDraggingOver)}\n                                                >\n                                                    <thead className=\"dnd-grid-header\" style={getListStyle(snapshot.isDraggingOver)}>\n                                                        <div className='inner-grid forty-six-and-one'>\n                                                            <div className=\"bill-history-grid-header-cell\"><button onClick={() => this.toggleEventGroup(eventGroupIndex)} type=\"button\" className={`${eventGroup.hidden || (eventGroup.hidden === undefined && eventGroupIndex !== this.props.organizedEvents.length - 1) ? \"arrow-down\" : \"arrow-up\"}`}></button></div>\n                                                            <div className=\"bill-history-grid-header-cell\">{moment(eventGroup.date).format('L')}</div>\n                                                        </div>\n                                                    </thead>\n                                                    <tbody style={{ display: !this.props.expandAllEvents && (eventGroup.hidden || (eventGroup.hidden === undefined && eventGroupIndex !== this.props.organizedEvents.length - 1)) ? 'none' : 'block' }}>\n                                                        {eventGroup.events.map((historyItem, index) => (\n                                                            // All of these values in the key are required to make it unique\n                                                            <Draggable isDragDisabled={this.state.isSaving} key={`${historyItem.EventCode}-${historyItem.IsPassed}-${historyItem.Sequence}`} draggableId={`${historyItem.EventCode}-${historyItem.IsPassed}-${historyItem.Sequence}`} index={index}>\n                                                                {(provided, snapshot) => (\n                                                                    <tr\n                                                                        className={!historyItem.isNewlyDeleted && historyItem.DeletionDate ? 'pending-delete' : ''}\n                                                                        ref={provided.innerRef}\n                                                                        {...provided.draggableProps}\n                                                                        {...provided.dragHandleProps}\n                                                                        style={getItemStyle(\n                                                                            snapshot.isDragging,\n                                                                            provided.draggableProps.style,\n                                                                            historyItem\n                                                                        )}\n                                                                    >\n                                                                        <td><button className=\"button draggable\">Drag and drop</button></td>\n                                                                        <td>{this.props.isBillManagement ? historyItem.DisplaySequence : index + 1}</td>\n                                                                        <td onKeyDown={e => this.handleMovingFocus(eventGroupIndex, index, 0, e)} ref={this._containerRefs[eventGroupIndex][`${index}-0`]} tabIndex=\"-1\">\n                                                                            <DatePicker\n                                                                                selected={moment(historyItem.EventDate)}\n                                                                                onChange={val => this.changeDate(val, eventGroupIndex, index)}\n                                                                                disabled={Boolean(historyItem.DeletionDate)}\n                                                                                ref={this._inputRefs[eventGroupIndex][`${index}-0`]}\n                                                                                onKeyDown={e => this.focusOnInputContainer(eventGroupIndex, index, 0, e)}\n                                                                            />\n                                                                        </td>\n                                                                        <td>{historyItem.ActorType}</td>\n                                                                        <td onKeyDown={e => this.handleMovingFocus(eventGroupIndex, index, 1, e)} ref={this._containerRefs[eventGroupIndex][`${index}-1`]} tabIndex=\"-1\">\n                                                                            {this.state.editingEvents[eventGroupIndex] && this.state.editingEvents[eventGroupIndex][index] !== null && this.state.editingEvents[eventGroupIndex][index] !== undefined ?\n                                                                                <React.Fragment>\n                                                                                    <div onKeyDown={e => e.stopPropagation()} style={{ minWidth: '90%' }}>\n                                                                                        {this.state.editingEvents[eventGroupIndex][index].EventReferences && this.state.editingEvents[eventGroupIndex][index].EventReferences.length > 0 ?\n                                                                                            <React.Fragment>\n                                                                                                <InputTypes\n                                                                                                    memberList={this.state.editingEvents[eventGroupIndex][index].EventCode.startsWith(\"H\") ? this.props.memberList.filter(m => m.ChamberCode === \"H\") : this.state.editingEvents[eventGroupIndex][index].EventCode.startsWith(\"S\") ? this.props.memberList.filter(m => m.ChamberCode === \"S\") : this.props.memberList}\n                                                                                                    committeeList={this.props.committeeList}\n                                                                                                    legislationList={this.state.sessionLegislation}\n                                                                                                    fetchingSessionLegislation={this.state.fetchingSessionLegislation}\n                                                                                                    actionTypes={this.props.actionTypes}\n                                                                                                    handleChange={this.changeDescription}\n                                                                                                    textList={this.props.versionsList}\n                                                                                                    entryIndex={eventGroupIndex}\n                                                                                                    activityIndex={index}\n                                                                                                    references={this.state.editingEvents[eventGroupIndex][index].EventReferences}\n                                                                                                    eventList={this.props.reconsiderationEvents}\n                                                                                                    newEvent={this.state.editingEvents[eventGroupIndex][index]}\n                                                                                                    autoselect\n                                                                                                    billHistory\n                                                                                                />\n                                                                                                <input\n                                                                                                    type=\"text\"\n                                                                                                    style={{ width: '100%' }}\n                                                                                                    value={this.state.editingEvents[eventGroupIndex][index].Description}\n                                                                                                    onChange={(e) => this.changeDescription(eventGroupIndex, index, 0, e.target.value, true)}\n                                                                                                />\n                                                                                            </React.Fragment>\n                                                                                            :\n                                                                                            <input\n                                                                                                type=\"text\"\n                                                                                                style={{ width: '100%' }}\n                                                                                                value={this.state.editingEvents[eventGroupIndex][index].Description}\n                                                                                                onChange={(e) => this.changeDescription(eventGroupIndex, index, 0, e.target.value)}\n                                                                                            />\n                                                                                        }\n                                                                                    </div>\n                                                                                    <div>\n                                                                                        <span style={{ marginLeft: '10px' }} className=\"icon save\" onClick={() => this.state.isSaving ? null : this.setDescription(eventGroupIndex, index)}></span>\n                                                                                        <span style={{ marginLeft: '10px' }} className=\"icon delete\" onClick={() => this.toggleEditDescription(eventGroupIndex, index)}></span>\n                                                                                    </div>\n                                                                                </React.Fragment>\n                                                                                :\n                                                                                <React.Fragment>\n                                                                                    <LargeListSelect\n                                                                                        options={this.props.billEvents}\n                                                                                        styles={selectStyle()}\n                                                                                        onChange={val => this.changeEvent(val, eventGroupIndex, index)}\n                                                                                        value={{\n                                                                                            ...historyItem,\n                                                                                            label: historyItem.Description,\n                                                                                            value: `${historyItem.EventCode}-${historyItem.IsPassed}`\n                                                                                        }}\n                                                                                        getOptionLabel={opt => `(${opt.EventCode}) ${opt.label}`}\n                                                                                        isDisabled={historyItem.DeletionDate}\n                                                                                        ref={this._inputRefs[eventGroupIndex][`${index}-1`]}\n                                                                                        onKeyDown={e => this.focusOnInputContainer(eventGroupIndex, index, 1, e)}\n                                                                                        inputValue={this.state.eventInputValue && this.state.eventInputValue[historyItem.LegislationEventID] ? this.state.eventInputValue[historyItem.LegislationEventID].toString() : ''}\n                                                                                        onInputChange={inputValue => this.handleEventInputChange(inputValue, historyItem.LegislationEventID)}\n                                                                                        onMenuClose={() => this.handleEventInputChange(this.state.eventInputValue ? this.state.eventInputValue[historyItem.LegislationEventID] : null, historyItem.LegislationEventID)} //hacky way to persist the input text after the user clicks away with the dropdown open                                                                    \n                                                                                    />\n                                                                                    <span style={{ marginLeft: '10px' }} onClick={() => this.state.isSaving ? null : this.toggleEditDescription(eventGroupIndex, index)} className=\"icon edit\" title=\"Change Description\"></span>\n                                                                                    {historyItem.MinutesActivityID && <span style={{ marginLeft: '10px', cursor: \"default\" }} className=\"icon paper\" title=\"Minutes Activity\"></span>}\n                                                                                </React.Fragment>\n                                                                            }\n                                                                        </td>\n                                                                        <td><button type=\"button\" disabled={this.state.isSaving} style={{ backgroundColor: 'transparent' }} onClick={() => this.deleteEvent(eventGroupIndex, index)} className={`button ${historyItem.DeletionDate ? 'add' : 'remove'}`}>{historyItem.DeletionDate ? 'Add' : 'Delete'}</button></td>\n                                                                    </tr>\n                                                                )}\n                                                            </Draggable>\n                                                        ))}\n                                                        {provided.placeholder}\n                                                    </tbody>\n                                                </table>\n                                            )}\n                                        </Droppable>\n                                    </DragDropContext>\n                                </React.Fragment>\n                            }\n                        </div>\n                    )}\n                    {!this.props.isBillManagement &&\n                        <div>\n                            <div className=\"floating-button-bar invisible-bar\" style={{ opacity: \".9\", zIndex: \"0\" }}>\n                                <div className=\"flex-row flex-vertical-center\" style={{ width: '100%' }}>\n                                    <div />\n                                    <div className=\"align-right inline-list\">\n                                        <button disabled={this.state.isSaving} type=\"button\" onClick={this.props.toggleEditContent} className=\"button secondary\">Close</button>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    }\n                </div>\n            </React.Fragment>)\n    }\n}\n\nfunction AddEventForm(props) {\n    return (\n        <React.Fragment>\n            <h4>Add History Event</h4>\n            <form onSubmit={(e) => props.addEvent(e)} className=\"inner-grid small-one-small\">\n                <DatePicker\n                    selected={props.newEventDate}\n                    onChange={props.handleNewEventDateChange}\n                />\n                <LargeListSelect\n                    ref={props.addEventRef}\n                    options={props.billEvents}\n                    styles={selectStyle()}\n                    value={props.newEvent}\n                    inputId={`add-new-event-react-create`}\n                    getOptionLabel={opt => `(${opt.EventCode}) ${opt.label}`}\n                    onChange={props.handleNewEventChange}\n                    inputValue={props.eventInputValue && props.eventInputValue[NEW_EVENT] ? props.eventInputValue[NEW_EVENT] : ''}\n                    onInputChange={inputValue => props.handleEventInputChange(inputValue, NEW_EVENT)}\n                    onMenuClose={() => props.handleEventInputChange(props.eventInputValue && props.eventInputValue[NEW_EVENT], NEW_EVENT)} //hacky way to persist the input text after the user clicks away with the dropdown open\n                />\n                <button className=\"button\" type=\"submit\" onClick={props.addEvent} disabled={props.isSaving || !props.newEvent || !props.newEventDate || (props.reconsiderationActionReference && (!props.reconsiderationEvents || props.reconsiderationEvents.length === 0))}>Add</button>\n            </form>\n            {props.templateInputs.length > 0 &&\n                <div >\n                    <InputTypes\n                        memberList={props.memberList}\n                        committeeList={props.committeeList}\n                        legislationList={props.legislationList}\n                        fetchingSessionLegislation={props.fetchingSessionLegislation}\n                        textList={props.textList}\n                        actionTypes={props.actionTypes}\n                        handleChange={props.handleTemplateChange}\n                        entryIndex={0}\n                        activityIndex={0}\n                        references={props.templateInputs}\n                        eventList={props.eventList}\n                        newEventDate={props.newEventDate}\n                        newEvent={props.newEvent}\n                        incompleteInputs={props.incompleteInputs}\n                        autoselect\n                        isNewEvent\n                    />\n                </div>\n            }\n            <br />\n        </React.Fragment>\n    )\n}\n\nconst HistoryForm = connect(\n    (state) => {\n        const { nav, bills } = state;\n        return {\n            nav,\n            bills,\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, billActionCreators), dispatch)\n        }\n    }\n)(BillHistoryForm)\n\nexport default HistoryForm;","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nimport moment from 'moment-timezone';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { authActionCreators } from '../../stores/lis-auth-store';\n\nclass LegislationProfiles extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showSection: window.innerWidth <= 900 ? false : true, //900px is when mobile layout is used (set in mobile.scss); collapse by default\n            name: '',\n            filteredWatchlists: [],\n            filteredWatchlistsValue: ''\n        };\n        this.toggleSection = this.toggleSection.bind(this);\n        this.handleTextChange = this.handleTextChange.bind(this);\n        this.createCollection = this.createCollection.bind(this);\n        this.filterWatchlist = this.filterWatchlist.bind(this);\n    }\n\n    toggleSection() {\n        this.setState(state => ({\n            showSection: !state.showSection\n        }));\n    }\n\n    handleTextChange(key, val) {\n        this.setState({\n            [key]: val\n        });\n    }\n\n    createCollection() {\n        let collection = {\n            Name: this.state.name,\n            Description: \"Created on \" + moment().format('MM/DD/YYYY HH:mm'),\n            WatchListLegislation: []\n        };\n        this.props.createCollection(collection);\n        this.setState({\n            name: ''\n        });\n    }\n\n    filterWatchlist(e) {\n        const val = e.target.value.toLowerCase();\n        this.setState({\n            // Map is used to preserve the original index\n            filteredWatchlists: this.props.collections.map(coll => {\n                if ((coll.Description && coll.Description.toLowerCase().includes(val)) || (coll.Name && coll.Name.toLowerCase().includes(val))) {\n                    return coll;\n                } else {\n                    return null;\n                }\n            }),\n            filteredWatchlistsValue: val\n        })\n    }\n\n    render() {\n        const watchlists = this.state.filteredWatchlistsValue ? this.state.filteredWatchlists : this.props.collections;\n        const selectedWatchlistIndex = this.props.collections[this.props.selectedCollectionIndex] ? watchlists.findIndex(w => w && w.WatchListID === this.props.collections[this.props.selectedCollectionIndex].WatchListID) : -1\n        return (\n            <div className={this.props.isBillManagement ? \"dlas-forms side-form advanced-search management\" : \"dlas-forms side-form advanced-search\"}>\n                <div className=\"header flex-row flex-vertical-center\">\n                    <h3 className=\"center category-header\">Lobbyist-in-a-Box</h3>\n                    <button onClick={this.toggleSection} type=\"button\" className={this.state.showSection ? \"arrow-up white-chevron\" : \"arrow-down white-chevron\"}></button>\n                </div>\n                {this.state.showSection &&\n                    <div className=\"content my-watchlist-content\">\n                        {this.props.isAuthor ?\n                            <div>\n                                <fieldset>\n                                    <div>\n                                        <label htmlFor=\"sr-watchlist-name\" className=\"txt-dark-blue small-text\">Create New Watchlist</label>\n                                        <div className=\"inner-grid three-and-one\">\n                                            {!this.props.isBillManagement &&\n                                                <>\n                                                    <input\n                                                        aria-label=\"Name\"\n                                                        id=\"sr-watchlist-name\"\n                                                        type=\"text\"\n                                                        placeholder=\"Name\"\n                                                        value={this.state.name}\n                                                        onChange={e => this.handleTextChange(\"name\", e.target.value)}\n                                                    />\n                                                    <button aria-label=\"create watchlist\" className=\"button\" disabled={this.props.collectionIsSaving || !this.state.name} onClick={this.createCollection} type=\"button\">Create</button>\n                                                    <hr className=\"faded-line\" />\n                                                </>\n                                            }\n                                        </div>\n                                        {watchlists.length ?\n                                            <div style={{ marginBottom: \"10px\", marginTop: \"-5px\" }}>\n                                                <label htmlFor=\"sr-watchlist-find\" className=\"screen-reader-only\">Find a watchlist</label>\n                                                <input\n                                                    id=\"sr-watchlist-find\"\n                                                    type=\"text\"\n                                                    placeholder=\"Find a watchlist\"\n                                                    value={this.state.filteredWatchlistsValue}\n                                                    onChange={this.filterWatchlist} />\n                                            </div>\n                                            : null\n                                        }\n                                    </div>\n                                    {this.props.error && <span className=\"small-text fail\">{this.props.error}</span>}\n                                    {this.props.isLoading ?\n                                        <div className=\"spinner center-spinner\"></div>\n                                        :\n                                        watchlists.length ?\n                                            <div className=\"checkbox-container watchlist-collection-list\">\n                                                {watchlists.map((list, listIndex) =>\n                                                    <React.Fragment key={listIndex}>\n                                                        {list &&\n                                                            <div role=\"button\" disabled={(list.IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\")))} onClick={() => !this.props.collectionIsSaving && this.props.selectCollection(this.props.selectedCollectionIndex === listIndex ? -1 : listIndex)} className=\"watchlist-collection-item\">\n                                                                <div className={this.props.selectedCollectionIndex === listIndex ? 'selected-collection' : ''}>\n                                                                    <div className=\"small-text\">{list.Name}{(list.IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\"))) ? \" (PAID)\" : \"\"}</div>\n                                                                    <div className=\"small-text txt-greyed\">Last Modified {list.ModificationDate ? moment(list.ModificationDate.replace(' +', '+')).format('MM/DD/YYYY hh:mm a') : moment().format('MM/DD/YYYY hh:mm a')}</div>\n                                                                </div>\n                                                                {listIndex !== watchlists.length - 1 && <hr className=\"faded-line\" />}\n                                                            </div>\n                                                        }\n                                                    </React.Fragment>\n                                                )}\n                                            </div> : null\n                                    }\n                                    <div className=\"homepage-links\" style={{ textAlign: \"center\", marginTop: watchlists.length ? '10px' : '0px' }}>\n                                        <Link to=\"/watchlists\">Your Lobbyist-in-a-Box Watchlists</Link>\n                                    </div>\n                                </fieldset>\n                            </div>\n                            :\n                            <div className=\"watchlist-login-wrapper homepage-links\">\n                                <Link style={{ marginLeft: \"auto\", marginRight: \"auto\", paddingTop: \"5px\", display: \"table\" }} to=\"/login?redirect=/bill-search\">Log in to View Watchlists</Link>\n                            </div>\n                        }\n                    </div>\n\n                }\n            </div>\n        )\n    }\n}\n\n\nexport default connect(\n    (state) => {\n        const { login } = state;\n        return {\n            login,\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators), dispatch)\n        }\n    }\n)(LegislationProfiles)\n","import React from 'react';\nimport CreatableSelect from 'react-select/creatable';\n\nconst MERGE = \"MERGE\";\nconst DELETE = \"DELETE\";\n\nclass CollectionControls extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showPopup: { DELETE: false, MERGE: false },\n            selectedWatchlists: [],\n            selectedMergeWatchlists: [],\n            editWatchlistName: false,\n            newName: '',\n            newDescription: ''\n        };\n        this.togglePopup = this.togglePopup.bind(this);\n        this.handleTextChange = this.handleTextChange.bind(this);\n        this.deleteCollection = this.deleteCollection.bind(this);\n        this.handleWatchlistChange = this.handleWatchlistChange.bind(this);\n        this.handleMergeWatchlistChange = this.handleMergeWatchlistChange.bind(this);\n        this.handleToggleCompositeView = this.handleToggleCompositeView.bind(this);\n        this.toggleEditWatchlistName = this.toggleEditWatchlistName.bind(this);\n        this.saveWatchlistName = this.saveWatchlistName.bind(this);\n        this.addToWatchlists = this.addToWatchlists.bind(this);\n    }\n\n\n    togglePopup(type) {\n        let showPopup = { ...this.state.showPopup };\n        showPopup[type] = !showPopup[type];\n        this.setState({\n            showPopup\n        });\n    }\n\n    handleTextChange(key, val) {\n        this.setState({\n            [key]: val\n        })\n    }\n\n    deleteCollection() {\n        let showPopup = { ...this.state.showPopup };\n        showPopup[DELETE] = !showPopup[DELETE];\n        this.setState({\n            showPopup\n        });\n        this.props.deleteCollection();\n    }\n\n    handleWatchlistChange(val) {\n        this.setState({\n            selectedWatchlists: val\n        });\n    }\n\n    handleMergeWatchlistChange(val) {\n        this.setState({\n            selectedMergeWatchlists: val\n        });\n    }\n\n    handleToggleCompositeView() {\n        this.props.handleToggleCompositeView()\n    }\n\n    toggleEditWatchlistName() {\n        this.setState(state => ({\n            editWatchlistName: !state.editWatchlistName,\n            newName: this.props.selectedCollection.Name || '',\n            newDescription: this.props.selectedCollection.Description || ''\n        }));\n    }\n\n    saveWatchlistName() {\n        let selectedCollection = { ...this.props.selectedCollection };\n        selectedCollection.Name = this.state.newName;\n        selectedCollection.Description = this.state.newDescription;\n        this.props.handleCollectionChange(selectedCollection);\n        this.setState({\n            editWatchlistName: false\n        });\n    }\n\n    addToWatchlists(merge) {\n        let watchlists = merge ? JSON.parse(JSON.stringify(this.state.selectedMergeWatchlists)) : JSON.parse(JSON.stringify(this.state.selectedWatchlists));\n        this.props.addToWatchlists(watchlists, merge, (saveResultCollections) => {\n            let showPopup = { ...this.state.showPopup };\n            if (!merge) {\n                // they are adding bills to one or more watchlist(s) - we need to update the selectedWatchlists state values because their mod dates have now changed\n                for (let i = 0; i < watchlists.length; i++) {\n                    const associatedWatchlist = saveResultCollections.find(c => c.WatchListID === watchlists[i].WatchListID);\n                    if (associatedWatchlist && associatedWatchlist.ModificationDate !== watchlists[i].ModificationDate) {\n                        watchlists[i] = associatedWatchlist\n                    };\n                }\n            } else {\n                // they are merging - we need to close the popup, and we also set the selectedMergeWatchlists state value to empty array because --\n                // there's no need to go through the above loop just to be able to keep the same watchlists selected considering they've already been merged and it's pointless to do it again\n                showPopup[MERGE] = !showPopup[MERGE];\n            }\n            this.setState({ selectedWatchlists: !merge ? watchlists : [], selectedMergeWatchlists: [], showPopup })\n        });\n    }\n\n    componentDidUpdate(prevProps) {\n        if (this.props.selectedCollection.WatchListID !== prevProps.selectedCollection.WatchListID) {\n            this.setState({\n                editWatchlistName: false\n            });\n        }\n    }\n\n    render() {\n        const { selectedCollection, selectedCollectionIndex, calendarHeader, collections, searchMade } = this.props;\n        const { selectedWatchlists, selectedMergeWatchlists } = this.state;\n        if (!selectedCollection && !calendarHeader && (this.props.isBillManagement || !searchMade)) {\n            return null;\n        }\n        const buttonDisabled = !selectedWatchlists || !selectedWatchlists.length || this.props.checkedBills.every(c => !c || this.props.collectionIsSaving);\n        const mergeButtonDisabled = !selectedMergeWatchlists || !selectedMergeWatchlists.length;\n        if (!selectedCollection && !calendarHeader) {\n            return (\n                <div className=\"dlas-forms collection-controls\" style={{ marginBottom: \"5px\" }}>\n                    <h4 style={{ margin: 0 }}>Add bills from search results to one or more watchlists</h4>\n                    <div className=\"inner-grid two\">\n                        <div>\n                            <label htmlFor=\"sr-watchlist-name-control\">Watchlist Name</label>\n                            <CreatableSelect\n                                id=\"sr-watchlist-name-control\"\n                                styles={selectStyle}\n                                options={collections}\n                                getOptionLabel={opt => opt.label || `${opt.Name} ${opt.Description && `- ${opt.Description}`}`}\n                                getOptionValue={opt => opt.value || opt.WatchListID}\n                                value={selectedWatchlists}\n                                onChange={this.handleWatchlistChange}\n                                createOptionPosition=\"first\"\n                                formatCreateLabel={input => <span>Create new: {input}</span>}\n                                isMulti\n                            />\n                        </div>\n                        <div className=\"inline-list\">\n                            <br />\n                            {this.props.collectionIsSaving ?\n                                <div><span className=\"small-spinner\"></span></div>\n                                :\n                                <React.Fragment>\n                                    <button disabled={buttonDisabled} style={{ marginLeft: \"0px\" }} className=\"button\" type=\"button\" onClick={() => this.addToWatchlists(false)}>Add</button>\n                                </React.Fragment>\n                            }\n                        </div>\n                    </div>\n                </div>\n            );\n        }\n        return (\n            <div>\n                {this.state.showPopup[DELETE] &&\n                    <div className='popup'>\n                        <div className='popup-inner'>\n                            <p>Are you sure you want to delete? Once a Watchlist is deleted it cannot be restored.</p>\n                            <div className=\"inline-list\">\n                                <button className=\"button danger\" disabled={this.props.collectionIsSaving} onClick={this.deleteCollection}>Yes</button>\n                                <button className=\"button secondary\" disabled={this.props.collectionIsSaving} onClick={() => this.togglePopup(DELETE)}>No</button>\n                            </div>\n                        </div>\n                    </div>\n                }\n                {this.state.showPopup[MERGE] &&\n                    <div className='popup'>\n                        <div className='popup-inner'>\n                            <p>Select the watchlist(s) into which you want to merge the current watchlist.</p>\n                            <div className=\"inner-grid\" style={{ gridTemplateColumns: '50% 50%' }}>\n                                <div>\n                                    <CreatableSelect\n                                        id=\"sr-watchlist-name-control\"\n                                        styles={selectStyle}\n                                        options={collections.filter(c => c.WatchListID !== selectedCollection.WatchListID)}\n                                        getOptionLabel={opt => opt.label || `${opt.Name}`}\n                                        getOptionValue={opt => opt.value || opt.WatchListID}\n                                        value={selectedMergeWatchlists}\n                                        onChange={this.handleMergeWatchlistChange}\n                                        createOptionPosition=\"first\"\n                                        formatCreateLabel={input => <span>Create new: {input}</span>}\n                                        isMulti\n                                    />\n                                </div>\n                                <div className=\"inline-list\">\n                                    {this.props.collectionIsSaving ?\n                                        <div><span className=\"small-spinner\"></span></div>\n                                        :\n                                        <React.Fragment>\n                                            <button disabled={mergeButtonDisabled} style={{ marginLeft: \"0px\" }} className=\"button\" type=\"button\" onClick={() => this.addToWatchlists(true)}>Merge</button>\n                                            <button className=\"button secondary\" onClick={() => this.togglePopup(MERGE)}>Cancel</button>\n                                        </React.Fragment>\n                                    }\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                }\n                <div className=\"collection-controls inner-grid\" style={{ gridTemplateColumns: 'auto max-content' }}>\n                    {this.state.editWatchlistName ?\n                        <div className=\"dlas-forms flex-row flex-start inline-list edit-watchlist-name\">\n                            <div className=\"label-above-input\">\n                                <label htmlFor=\"sr-selected-watchlist-name\" className=\"label\">Name {!this.state.newName && <span className=\"fail\">required</span>}</label>\n                                <input\n                                    id=\"sr-selected-watchlist-name\"\n                                    value={this.state.newName}\n                                    placeholder=\"Name\"\n                                    onChange={e => this.handleTextChange('newName', e.target.value)}\n                                />\n                            </div>\n                            <div className=\"label-above-input\">\n                                <label htmlFor=\"sr-selected-watchlist-desc\" className=\"label\">Description</label>\n                                <input\n                                    id=\"sr-selected-watchlist-desc\"\n                                    value={this.state.newDescription}\n                                    placeholder=\"Description\"\n                                    onChange={e => this.handleTextChange('newDescription', e.target.value)}\n                                />\n                            </div>\n                            {this.props.collectionIsSaving ?\n                                <div className=\"small-spinner\"></div>\n                                :\n                                <div className=\"inline-list save-or-delete\">\n                                    <button aria-label=\"save\" onClick={this.saveWatchlistName} disabled={!this.state.newName} type=\"button\" className=\"icon save\"></button>\n                                    <button aria-label=\"cancel\" onClick={this.toggleEditWatchlistName} type=\"button\" className=\"icon delete\"></button>\n                                </div>\n                            }\n                        </div>\n                        :\n                        <div className=\"watchlist-info\">\n                            <div className=\"inline-list\">\n                                <span className=\"name\">{selectedCollection ? selectedCollection.Name : calendarHeader ? calendarHeader.Name : ''}</span>\n                                {!this.props.isBillManagement && <div role=\"button\" aria-label=\"edit watchlist name and description\" className=\"icon edit\" onClick={() => !this.props.collectionIsSaving && this.toggleEditWatchlistName()}></div>}\n                            </div>\n                            <span className=\"description\">{selectedCollection ? selectedCollection.Description : calendarHeader ? calendarHeader.Description : ''}</span>\n                        </div>\n                    }\n                    <div className=\"close-or-delete-watchlist align-right inline-list\" style={this.state.editWatchlistName ? { display: 'none' } : {}}>\n                        <br />\n                        {!this.props.isBillManagement && !searchMade &&\n                            <React.Fragment>\n                                {this.props.billListLength ? <button type='button' disabled={this.props.collectionIsSaving} onClick={() => this.handleToggleCompositeView()} className='button primary'>Composite View</button> : null}\n                                <button type=\"button\" disabled={this.props.collectionIsSaving} onClick={() => this.togglePopup(MERGE)} className=\"button primary\">Merge</button>\n                                <button type=\"button\" disabled={this.props.collectionIsSaving} onClick={() => this.togglePopup(DELETE)} className=\"button danger\">Delete</button>\n                            </React.Fragment>\n                        }\n                        {searchMade && !calendarHeader ?\n                            <button type=\"button\" disabled={this.props.collectionIsSaving} onClick={() => this.props.selectCollection(selectedCollectionIndex, true)} className=\"button secondary\">Back to watchlist</button>\n                            :\n                            <button type=\"button\" disabled={this.props.collectionIsSaving} onClick={() => this.props.selectCollection(-1)} className=\"button secondary\" style={{ marginRight: '0px' }}>Close</button>\n                        }\n                    </div>\n                </div>\n                <br />\n            </div>\n        )\n    }\n}\n\nconst selectStyle = {\n    control: styles => ({\n        ...styles,\n        minHeight: '0px',\n        padding: '0.12em 0.6em !important',\n    }),\n    valueContainer: styles => ({\n        ...styles,\n        padding: 0,\n    }),\n    input: styles => ({\n        ...styles,\n        fontSize: '0.8em',\n        lineHeight: 'normal',\n    }),\n    singleValue: styles => ({\n        ...styles,\n        fontSize: '0.8em'\n    }),\n    placeholder: styles => ({\n        ...styles,\n        fontSize: '0.8em'\n    }),\n    option: styles => ({\n        ...styles,\n        fontSize: '0.8em'\n    }),\n    dropdownIndicator: styles => ({\n        ...styles,\n        padding: '1px'\n    }),\n}\n\nexport default CollectionControls;\n","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst getCollectionFailure = \"GET_COLLECTION_FAILURE\"\nconst getCollectionSuccess = \"GET_COLLECTION_SUCCESS\"\n\nconst getCollectionsFailure = \"GET_COLLECTIONS_FAILURE\"\nconst getCollectionsSuccess = \"GET_COLLECTIONS_SUCCESS\"\n\nconst saveCollectionsFailure = \"SAVE_COLLECTIONS_FAILURE\"\nconst saveCollectionsSuccess = \"SAVE_COLLECTIONS_SUCCESS\"\n\nconst getCriteriaTypesSuccess = \"GET_CRITERIA_TYPES_SUCCESS\"\nconst getCriteriaTypesFailure = \"GET_CRITERIA_TYPES_FAILURE\"\n\nconst notificationListSuccess = \"NOTIFICATIONS_LIST_SUCCESS\"\nconst notificationListFailure = \"NOTIFICATIONS_LIST_FAILURE\"\n\nconst messageListSuccess = \"MESSAGES_LIST_SUCCESS\"\nconst messageListFailure = \"MESSAGES_LIST_FAILURE\"\n\nconst adminMessageListSuccess = \"ADMIN_MESSAGES_LIST_SUCCESS\"\nconst adminMessageListFailure = \"ADMIN_MESSAGES_LIST_FAILURE\"\n\nconst createMessageSuccess = \"CREATE_MESSAGES_SUCCESS\"\nconst createMessageFailure = \"CREATE_MESSAGES_FAILURE\"\n\nconst saveMessageSuccess = \"SAVE_MESSAGES_SUCCESS\"\nconst saveMessageFailure = \"SAVE_MESSAGES_FAILURE\"\n\nconst initialState = {\n    collection: '',\n    collections: [],\n    collectionsError: '',\n    collectionSave: '',\n    collectionSaveError: '',\n    criteriaTypes: [],\n    criteriaTypesError: '',\n    notifications: [],\n    notificationsError: '',\n    messages: [],\n    messagesError: '',\n    adminMessages: [],\n    adminMessagesError: '',\n    messageCreate: [],\n    messageCreateError: '',\n    messageSave: [],\n    messageSaveError: ''\n};\n\nexport const collectionActionCreators = {\n\n    receiveCollection: resObj => ({\n        type: getCollectionSuccess,\n        collection: resObj\n    }),\n\n    collectionError: message => ({\n        type: getCollectionFailure,\n        collectionError: message\n    }),\n\n    getCollection: (params) => {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COLLECTION_API_URL) + '/LegislationCollections/api/GetLegislationCollectionByIdAsync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(collectionActionCreators.collectionError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(collectionActionCreators.receiveCollection(result[1].WatchLists))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(collectionActionCreators.receiveCollection([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCollections: resObj => ({\n        type: getCollectionsSuccess,\n        collections: resObj\n    }),\n\n    collectionsError: message => ({\n        type: getCollectionsFailure,\n        collectionsError: message\n    }),\n\n    getCollections: (params) => {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COLLECTION_API_URL) + '/LegislationCollections/api/GetLegislationCollectionsAsync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(collectionActionCreators.collectionsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(collectionActionCreators.receiveCollections(result[1].WatchLists.sort((a, b) => new Date(b.ModificationDate) - new Date(a.ModificationDate))))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(collectionActionCreators.receiveCollections([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCollectionSave: resObj => ({\n        type: saveCollectionsSuccess,\n        collectionSave: resObj\n    }),\n\n    collectionSaveError: message => ({\n        type: saveCollectionsFailure,\n        collectionSaveError: message\n    }),\n\n    saveCollections: (body, useCreate) => {\n        return dispatch => {\n            let request = '';\n            if (useCreate) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COLLECTION_API_URL) + '/LegislationCollections/api/CreateLegislationCollectionAsync', 'POST', '', body, '')\n            } else {\n                request = partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COLLECTION_API_URL) + '/LegislationCollections/api/SaveLegislationCollectionAsync', 'PUT', '', body, '')\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(collectionActionCreators.collectionSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(collectionActionCreators.receiveCollectionSave(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(collectionActionCreators.collectionSaveError('No Content'));\n                        Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCriteriaTypes: resObj => ({\n        type: getCriteriaTypesSuccess,\n        criteriaTypes: resObj\n    }),\n\n    criteriaTypesError: message => ({\n        type: getCriteriaTypesFailure,\n        criteriaTypesError: message\n    }),\n\n    getCriteriaTypes() {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_LEGISLATION_COLLECTION_API_URL) + '/LegislationCollections/api/GetCriteriaTypesAsync', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(collectionActionCreators.criteriaTypesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(collectionActionCreators.receiveCriteriaTypes(result[1].CriteriaTypes))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(collectionActionCreators.criteriaTypesError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveNotifications: resObj => ({\n        type: notificationListSuccess,\n        notifications: resObj\n    }),\n\n    notificationsError: message => ({\n        type: notificationListFailure,\n        notificationsError: message\n    }),\n\n    getNotifications(params) {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_NOTIFICATIONS_API_URL) + '/Notification/api/GetNotificationsAsync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(collectionActionCreators.notificationsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(collectionActionCreators.receiveNotifications(result[1].Notifications))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(collectionActionCreators.receiveNotifications([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveMessages: resObj => ({\n        type: messageListSuccess,\n        messages: resObj\n    }),\n\n    messagesError: message => ({\n        type: messageListFailure,\n        messagesError: message\n    }),\n\n    getMessages() {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_NOTIFICATIONS_API_URL) + '/Notification/api/GetPublicMessagesAsync', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(collectionActionCreators.messagesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(collectionActionCreators.receiveMessages(result[1].Messages))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(collectionActionCreators.receiveMessages([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveAdminMessages: resObj => ({\n        type: adminMessageListSuccess,\n        adminMessages: resObj\n    }),\n\n    adminMessagesError: message => ({\n        type: adminMessageListFailure,\n        adminMessagesError: message\n    }),\n\n    getAdminMessages() {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_NOTIFICATIONS_API_URL) + '/Notification/api/GetMessagesAsync', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(collectionActionCreators.adminMessagesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(collectionActionCreators.receiveAdminMessages(result[1].Messages))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(collectionActionCreators.receiveAdminMessages([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveMessageCreate: resObj => ({\n        type: createMessageSuccess,\n        messageCreate: resObj\n    }),\n\n    messageCreateError: message => ({\n        type: createMessageFailure,\n        messageCreateError: message\n    }),\n\n    createMessage(body) {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_NOTIFICATIONS_API_URL) + '/Notification/api/CreateMessageAsync', 'POST', '', body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(collectionActionCreators.messageCreateError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(collectionActionCreators.receiveMessageCreate(result[1].Messages))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(collectionActionCreators.receiveMessageCreate([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveMessageSave: resObj => ({\n        type: saveMessageSuccess,\n        messageSave: resObj\n    }),\n\n    messageSaveError: message => ({\n        type: saveMessageFailure,\n        messageSaveError: message\n    }),\n\n    saveMessage(body) {\n        return dispatch => {\n            return partnerRequest((API_URL || process.env.REACT_APP_NOTIFICATIONS_API_URL) + '/Notification/api/SaveMessageAsync', 'POST', '', body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(collectionActionCreators.messageSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(collectionActionCreators.receiveMessageSave(result[1].Messages))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(collectionActionCreators.receiveMessageSave([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    }\n\n};\n\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n\n    switch (action.type) {\n        case getCollectionSuccess:\n            return Object.assign({}, state, {\n                collection: action.collection,\n                collectionError: ''\n            });\n        case getCollectionFailure:\n            return Object.assign({}, state, {\n                collectionError: action.collectionError\n            });\n        case getCollectionsSuccess:\n            return Object.assign({}, state, {\n                collections: action.collections,\n                collectionsError: ''\n            });\n        case getCollectionsFailure:\n            return Object.assign({}, state, {\n                collectionsError: action.collectionError\n            });\n        case saveCollectionsSuccess:\n            return Object.assign({}, state, {\n                collectionSave: action.collectionSave,\n                collectionSaveError: ''\n            })\n        case saveCollectionsFailure:\n            return Object.assign({}, state, {\n                collectionSaveError: action.collectionSaveError\n            })\n        case getCriteriaTypesSuccess:\n            return Object.assign({}, state, {\n                criteriaTypes: action.criteriaTypes,\n                criteriaTypesError: ''\n            })\n        case getCriteriaTypesFailure:\n            return Object.assign({}, state, {\n                criteriaTypesError: action.criteriaTypesError\n            })\n        case notificationListSuccess:\n            return Object.assign({}, state, {\n                notifications: action.notifications,\n                notificationsError: ''\n            })\n        case notificationListFailure:\n            return Object.assign({}, state, {\n                notificationsError: action.notificationsError\n            })\n        case messageListSuccess:\n            return Object.assign({}, state, {\n                messages: action.messages,\n                messagesError: ''\n            })\n        case messageListFailure:\n            return Object.assign({}, state, {\n                messagesError: action.messagesError\n            })\n        case adminMessageListSuccess:\n            return Object.assign({}, state, {\n                adminMessages: action.adminMessages,\n                adminMessagesError: ''\n            })\n        case adminMessageListFailure:\n            return Object.assign({}, state, {\n                adminMessagesError: action.adminMessagesError\n            })\n        case createMessageSuccess:\n            return Object.assign({}, state, {\n                messageCreate: action.messageCreate,\n                messageCreateError: ''\n            })\n        case createMessageFailure:\n            return Object.assign({}, state, {\n                messageCreateError: action.messageCreateError\n            })\n        case saveMessageSuccess:\n            return Object.assign({}, state, {\n                messageSave: action.messageSave,\n                messageSaveError: ''\n            })\n        case saveMessageFailure:\n            return Object.assign({}, state, {\n                messageSaveError: action.messageSaveError\n            })\n        default:\n            return state\n    }\n};","import React, { useState } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport renderHTML from 'react-render-html';\nimport { Link } from 'react-router-dom';\nimport { billActionCreators } from '../../stores/lis-legislation-store';\nimport moment from 'moment-timezone';\nimport { voteActionCreators } from '../../stores/lis-votes-store';\nimport VersionList from '../lis-bills/lis-bill-version-list';\nimport { committeeActionCreators } from '../../stores/lis-committee-store';\n\nconst HistoryList = props => {\n    const [filterAmount, setFilterAmount] = useState(5);\n    const filteredBillHistory = props.billHistory.slice(Math.max(props.billHistory.length - (parseInt(filterAmount) || 0), 0))\n    const filterOptions = () => {\n        let options = []\n        // Allow the user to show a variable amount of bill history items\n        for (let i = 5; i < props.billHistory.length; i = i + 5) {\n            options.push(<option key={i} value={i}>Show Last {i}</option>)\n        }\n        return options;\n    }\n    return (\n        <div>\n            {props.billHistory.length > 5 &&\n                <div className=\"align-right\">\n                    <select value={filterAmount} onChange={e => setFilterAmount(e.target.value)}>\n                        {filterOptions()}\n                        <option value={props.billHistory.length}>Show All</option>\n                    </select>\n                </div>\n            }\n            <table className=\"line-table\">\n                <tbody>\n                    {filteredBillHistory.filter(item => !item.DeletionDate).map((item, hIndex) => (\n                        <tr key={hIndex} className='parent-tr bill-details-table-row'>\n                            <td className=\"left\">{moment(item.EventDate).format('l')}</td>\n                            <td className=\"left\">{item.ChamberCode === 'H' ? 'House' : 'Senate'}</td>\n                            <td className=\"left\">\n                                {item.Description}\n                                {item.VoteLinks && item.opened &&\n                                    <div className=\"link-row\">\n                                        {item.VoteLinks.map((link, vIndex) =>\n                                            <div key={vIndex}>\n                                                {link.VoteID ? link.IsPublic ? <Link to={`/vote-details/${props.bill.LegislationNumber}/${item.SessionCode}/${link.VoteNumber}`}>Vote</Link> : <span>Vote Detail Pending</span> : ''}\n                                                {link.CommitteeNumber ? <Link to={`/session-details/${item.SessionCode}/committee-information/${link.CommitteeNumber}/committee-details`}>{link.ParentCommitteeID ? 'Subcommittee' : 'Committee'}</Link> : ''}\n                                                {link.LegislationNumber && link.SessionCode ? <Link to={`/bill-details/${link.SessionCode}/${link.LegislationNumber}`}>Legislation</Link> : ''}\n                                            </div>\n                                        )}\n                                    </div>\n                                }\n                            </td>\n                            <td className=\"button-container\">\n                                {item.ReferenceID &&\n                                    <React.Fragment>\n                                        {item.isLoading ?\n                                            <span className=\"small-spinner\"></span>\n                                            :\n                                            <button aria-expanded={item.opened} className={item.opened ? 'arrow-up' : 'arrow-down'} onClick={() => props.toggleShowLinks(item)}></button>\n                                        }\n                                    </React.Fragment>\n                                }\n                            </td>\n                        </tr>\n                    ))}\n                </tbody>\n            </table>\n        </div>\n    );\n}\n\nclass BillInfoComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            bill: [],\n            billHistoryIsLoading: false,\n            showInfo: props.isBillManagement ? false : true,\n            billHistory: [],\n            showBillHistory: false,\n            showBillVersions: false,\n            newBillNote: '',\n            showBillNote: false\n        };\n        this.handleNoteChange = this.handleNoteChange.bind(this);\n        this.toggleShowInfo = this.toggleShowInfo.bind(this);\n        this.getHistory = this.getHistory.bind(this);\n        this.toggleShowLinks = this.toggleShowLinks.bind(this);\n        this.toggleVersions = this.toggleVersions.bind(this);\n        this.toggleBillNote = this.toggleBillNote.bind(this);\n        this.toggleBillNotesFromParent = this.toggleBillNotesFromParent.bind(this);\n        this.saveNote = this.saveNote.bind(this);\n    }\n\n    componentDidMount() {\n        if (this.props.selectedLocation === \"Bill Text\" && this.props.selectedKeywords)\n            this.props.toggleShowData(this.props.bill.LegislationID, true)\n    }\n\n    handleNoteChange(e) {\n        this.setState({\n            newBillNote: e.target.value\n        })\n    }\n\n\n    toggleShowInfo() {\n        this.setState(prevState => ({\n            showInfo: !prevState.showInfo\n        }));\n    }\n\n    getHistory() {\n        //Bill history is already loaded so just toggle the view\n        if (this.state.billHistory.length > 0) {\n            this.setState(state => ({\n                showBillHistory: !state.showBillHistory\n            }));\n            return;\n        }\n        this.setState({\n            billHistoryIsLoading: true\n        });\n        this.props.actions.getBillHistoryByBillID(\"?legislationID=\" + this.props.bill.LegislationID)\n            .then(() => {\n                let billHistory = [...this.props.bills.billHistory];\n                if (billHistory.length === 0) {\n                    throw 'No Bill History Found'\n                }\n                this.setState({\n                    billHistory: this.props.bills.billHistory,\n                    billHistoryIsLoading: false,\n                    showBillHistory: true\n                });\n            }).catch(err => {\n                if (err === \"Aborted\") {\n                    return;\n                }\n                this.setState({\n                    billHistoryMessage: err.toString(),\n                    billHistoryIsLoading: false\n                });\n            });\n    }\n\n    toggleShowLinks(vote) {\n        let billHistory = [...this.state.billHistory];\n        const historyIndex = billHistory.findIndex(item => item.LegislationEventID == vote.LegislationEventID);\n        billHistory[historyIndex].opened = !billHistory[historyIndex].opened;\n\n        if (vote.VoteLinks) {\n            this.setState({\n                billHistory: billHistory\n            });\n        } else {\n            billHistory[historyIndex].isLoading = true;\n            this.setState({ billHistory: billHistory });\n            let params = '?legislationEventID=' + vote.LegislationEventID;\n            this.props.actions.getVoteLink(params).then(() => {\n                let links = [...this.props.votes.voteLinkResponse];\n                let linkPromises = [];\n                links.forEach(link => {\n                    if (link.CommitteeID) {\n                        const cmtePromise = this.props.actions.getCommitteeById(\"?id=\" + link.CommitteeID + \"&sessionCode=\" + vote.SessionCode)\n                            .then(() => {\n                                link.CommitteeNumber = this.props.committee.committeeByIdData.CommitteeNumber;\n                            }).catch((err) => {\n                                console.error(err);\n                                // Don't care if it fails. That committee won't be visible\n                                return Promise.resolve();\n                            })\n                        linkPromises.push(cmtePromise);\n                    }\n                    // If there are any vote links of type 'Legislation' then the legislation ID needs to be turned into a legislation number to form the link\n                    if (link.ReferenceType === \"Legislation\") {\n                        const promise = this.props.actions.getBill(link.ReferenceID)\n                            .then(() => {\n                                link.LegislationNumber = this.props.bills.bill.LegislationNumber;\n                                link.SessionCode = link.SessionCode || vote.SessionCode;\n                                return Promise.resolve();\n                            }).catch(err => {\n                                console.error(err);\n                                // Don't care if it fails. That legislation won't be visible\n                                return Promise.resolve();\n                            });\n                        linkPromises.push(promise);\n                    }\n                });\n                Promise.all(linkPromises)\n                    .then(() => {\n                        billHistory[historyIndex].isLoading = false;\n                        billHistory[historyIndex].VoteLinks = this.props.votes.voteLinkResponse;\n                        this.setState({\n                            billHistory: billHistory\n                        });\n                    });\n            });\n        }\n    }\n\n    toggleVersions() {\n        this.setState({\n            showBillVersions: !this.state.showBillVersions\n        })\n    }\n\n    toggleBillNote() {\n        const { bill, selectedCollection } = this.props;\n        const collectionBillIndex = selectedCollection.WatchListLegislation.findIndex(cBill => bill.LegislationID === cBill.LegislationID && !cBill.DeletionDate);\n        this.setState(state => ({\n            newBillNote: selectedCollection.WatchListLegislation[collectionBillIndex].Note || '',\n            showBillNote: !state.showBillNote\n        }));\n    }\n\n    toggleBillNotesFromParent(show) {\n        // This function is called by the parent to show/hide all the notes in a watchlist.\n        const { bill, selectedCollection } = this.props;\n        const collectionBillIndex = selectedCollection.WatchListLegislation.findIndex(cBill => bill.LegislationID === cBill.LegislationID && !cBill.DeletionDate);\n        if (selectedCollection.WatchListLegislation[collectionBillIndex].Note) {\n            this.setState({\n                newBillNote: selectedCollection.WatchListLegislation[collectionBillIndex].Note || '',\n                showBillNote: show\n            });\n        }\n    }\n\n    saveNote() {\n        const bill = this.props.bill;\n        let selectedCollection = { ...this.props.selectedCollection };\n        const collectionBillIndex = selectedCollection.WatchListLegislation.findIndex(cBill => bill.LegislationID === cBill.LegislationID && !cBill.DeletionDate);\n        selectedCollection.WatchListLegislation[collectionBillIndex].Note = this.state.newBillNote;\n        this.props.handleCollectionChange(selectedCollection, () => {\n            this.setState({\n                showBillNote: false\n            });\n        });\n    }\n\n    render() {\n        const { bill, billIndex, selectedCollection, userCanUseCollections, checked, selectedKeywords, sessionCode, selectedLocation, session, displayCrossSession, newSession } = this.props;\n        const { showInfo, billHistoryIsLoading, billHistory, showBillHistory, billHistoryMessage, showBillVersions, showBillNote, newBillNote } = this.state;\n        let collectionBillIndex = -1;\n        if (selectedCollection && !this.props.isBillManagement && !this.props.searchMade) {\n            collectionBillIndex = selectedCollection.WatchListLegislation.findIndex(cBill => bill.LegislationID === cBill.LegislationID && !cBill.DeletionDate);\n        }\n        return (\n            <div className=\"flex-row flex-start bill-info\" style={{ paddingTop: '0.5em' }}>\n                <div className='parent-li se-bill-search-result'>\n                    <div className=\"toggle-row description legislation-search-results\" style={bill.eventsChanged ? { background: '#f1f1f1', fontStyle: 'italic' } : {}}>\n                        <div>\n                            {userCanUseCollections || this.props.isBillManagement ?\n                                <div className=\"collection-buttons\">\n                                    <label className=\"screen-reader-only\" htmlFor={`sr-select-bill${billIndex}`}>Select bill</label>\n                                    <input type=\"checkbox\"\n                                        id={`sr-select-bill${billIndex}`}\n                                        checked={checked || false}\n                                        onChange={this.props.handleBillCheckbox} />\n                                </div>\n                                :\n                                <div></div>\n                            }\n                            <div className=\"bill-result-link\">\n                                <Link to={`/bill-details/${sessionCode}/${bill.LegislationNumber}`} style={{ pointerEvents: sessionCode ? null : 'none' }} target=\"_blank\">{bill.LegislationNumber}</Link>\n                                {this.props.displayChapterNumber && bill.ChapterNumber &&\n                                    <div className=\"bill-additional-info\">\n                                        <p className={`${this.props.isBillManagement || userCanUseCollections ? 'margin-left' : ''}`}>({bill.ChapterNumber})</p>\n                                    </div>\n                                }\n                                {displayCrossSession &&\n                                    <div className=\"bill-additional-info\">\n                                        <p className={`${userCanUseCollections ? ' margin-left' : ''}`}>{session.SessionYear + \" \" + session.DisplayName}</p>\n                                    </div>\n                                }\n                                {collectionBillIndex !== -1 &&\n                                    <div\n                                        role=\"button\"\n                                        aria-label={!selectedCollection.WatchListLegislation[collectionBillIndex].Note ? \"Edit notes\" : 'Add notes'}\n                                        className={`icon bubble${!selectedCollection.WatchListLegislation[collectionBillIndex].Note ? \"-hollow\" : ''}`}\n                                        onClick={() => !this.props.collectionIsSaving && this.toggleBillNote()}\n                                        title={selectedCollection.WatchListLegislation[collectionBillIndex].Note ? \"Edit notes\" : \"Add notes\"}>\n                                    </div>\n                                }\n                            </div>\n                        </div>\n                        <span style={{ paddingRight: '25px' }}>{renderHTML(bill.Description || '')}</span>\n                        <div className=\"button-container\">\n                            <span>{bill.LegislationStatus}</span>\n                            <button aria-expanded={!!this.props.expanded} className={this.props.expanded ? 'arrow-up' : 'arrow-down'} onClick={() => this.props.toggleShowData(bill.LegislationID)}>More info</button>\n                        </div>\n                    </div>\n                    {(this.state[bill.LegislationID] || this.props.expanded) &&\n                        <div className=\"list-desc\">\n                            {!this.props.isBillManagement && (selectedLocation != \"Bill Text\" || !selectedKeywords) &&\n                                <div style={{ paddingBottom: showInfo ? '20px' : '0px', position: 'relative', overflow: 'hidden', height: showInfo ? 'auto' : '100px' }}>\n                                    {bill.Patrons &&\n                                        <span>Introduced by: {bill.Patrons.map((patron, patronIndex) => <React.Fragment key={patronIndex}>{patron.PatronDisplayName}{patronIndex !== bill.Patrons.length - 1 && \", \"}</React.Fragment>)}</span>\n                                    }\n                                    <div><strong>{bill.SummaryVersion}:</strong>{renderHTML(bill.LegislationSummary)}</div>\n                                    <div className=\"content-blocker\" style={showInfo ? { background: 'none' } : {}}>\n                                        <button onClick={this.toggleShowInfo} className=\"expander button-link\" type=\"button\">Show {showInfo ? \"Less\" : \"\"} Info</button>\n                                    </div>\n                                </div>\n                            }\n                            {this.props.children || null}\n                            {billHistoryIsLoading ?\n                                <div><span className=\"small-spinner\"></span></div>\n                                :\n                                bill.SearchText.length > 0 && (selectedLocation != \"Bill Text\" || !selectedKeywords) &&\n                                <div className=\"bill-search-bill-history\">\n                                    {billHistoryMessage &&\n                                        <div className=\"fail small-text\">{billHistoryMessage}</div>\n                                    }\n                                    {billHistory.length > 0 && showBillHistory &&\n                                        <div>\n                                            <HistoryList\n                                                billHistory={billHistory}\n                                                toggleShowLinks={this.toggleShowLinks}\n                                                bill={bill}\n                                            />\n                                        </div>\n                                    }\n                                    {!this.props.isBillManagement && <button onClick={this.getHistory} className=\"bill-history-button button-link\" type=\"button\">{showBillHistory ? 'Hide' : 'Show'} Latest History</button>}\n                                </div>\n                            }\n                            {bill.SearchText.length > 0 && selectedLocation === \"Bill Text\" && selectedKeywords &&\n                                <div>\n                                    <VersionList\n                                        version={bill.SearchText}\n                                        legislationNumber={bill.LegislationNumber}\n                                        legislationClass={bill.LegislationClass}\n                                        sessionCode={sessionCode}\n                                        selectedKeywords={selectedKeywords}\n                                        descriptionEditable={false}\n                                    />\n                                </div>\n                            }\n                        </div>\n                    }\n                    {showBillNote &&\n                        <div className=\"dlas-forms flex-row note-area-container\">\n                            <label className=\"screen-reader-only\" htmlFor={`sr-bill-note${billIndex}`}>Bill note</label>\n                            <textarea\n                                id={`sr-bill-note${billIndex}`}\n                                value={newBillNote}\n                                onChange={this.handleNoteChange}\n                                style={{ width: '90%', marginBottom: '5px', fontSize: '1em', resize: \"vertical\" }}\n                                placeholder={`${bill.LegislationNumber} Note`}\n                                className=\"note-area-input\"\n                            />\n                            {this.props.collectionIsSaving ?\n                                <div className=\"small-spinner\"></div>\n                                :\n                                <div className=\"inline-list\">\n                                    <button aria-label=\"save\" onClick={this.saveNote} type=\"button\" className=\"icon save\"></button>\n                                    <button aria-label=\"cancel\" onClick={this.toggleBillNote} type=\"button\" className=\"icon delete\"></button>\n                                </div>\n                            }\n                        </div>\n                    }\n                    {!newSession && <hr className=\"faded-line\" style={{ marginBlockEnd: '0px' }} />}\n                </div>\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { bills, votes, committee } = state;\n        return {\n            bills,\n            votes,\n            committee\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, voteActionCreators, committeeActionCreators), dispatch)\n        }\n    },\n    null,\n    {\n        forwardRef: true\n    }\n)(BillInfoComponent);","import React from 'react';\nimport renderHTML from 'react-render-html';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { patronActionCreators } from '../../../stores/lis-patron-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport moment from 'moment-timezone';\nimport queryString from 'query-string';\nimport '../../../stylesheets/lis-public-view/public-view.css';\nimport EventControls from './event-controls';\nimport BillCategories from '../../../lis-shared/lis-search/lis-search-categories';\nimport AdvancedSearchBox from '../../../lis-shared/lis-search/lis-advanced-search-box';\nimport SearchSelections from '../../../lis-shared/lis-search/lis-search-selections';\nimport BillHistoryForm from '../../../lis-public/components/lis-bill-details/lis-history-form';\nimport LegislationWatchlists from '../../../lis-shared/lis-search/lis-legislation-watchlists';\nimport CollectionControls from '../../../lis-shared/lis-search/lis-collection-controls'\nimport { cancelRequest } from '../../../services/request.service';\nimport { collectionActionCreators } from '../../../stores/lis-collection-store';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { minutesActionCreators } from '../../../stores/lis-minutes-store';\nimport BillInfoComponent from '../../../lis-shared/lis-search/lis-bill-info';\nimport { HubConnectionBuilder } from '@microsoft/signalr';\n\nconst BILL_COLLECTION_AUTHOR = \"LegislationCollections\";\nconst API_URL = window.env ? window.env.API_SERVER : '';\n\nclass BillManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showCategories: false,\n            billList: [],\n            billStatusCategoryList: [],\n            billStatusCategoryListIsLoading: true,\n            billEventOptions: [],\n            selectedBillEvent: '',\n            showOverlay: false,\n            selectedBill: '',\n            selectedKeywords: '',\n            selectedBillAction: '',\n            billEventStartDate: null,\n            billEventEndDate: null,\n            selectedBillSession: '',\n            selectedBillType: '',\n            previousSearch: '',\n            searchType: { value: 'all', label: 'All' },\n            selectedChamber: '',\n            patronList: [],\n            patronRoles: [],\n            selectedBillNumbers: '',\n            selectedBillRangeBeginning: '',\n            selectedBillRangeEnd: '',\n            selectedChapterNumber: '',\n            filteredPatronList: [],\n            selectedPatron: '',\n            selectedPatronType: [],\n            selectedBillStatusCategory: '',\n            sessionOptions: [],\n            billStatusStartDate: null,\n            billStatusEndDate: null,\n            committeeList: [],\n            fullCommitteeList: [],\n            groupedCommitteeList: [],\n            filteredCommitteeList: [],\n            selectedCommittee: '',\n            selectedSubcommittee: '',\n            subcommitteeList: [],\n            subjectList: [],\n            selectedSubject: '',\n            introDateList: [],\n            collections: [],\n            selectedCollection: '',\n            selectedCollectionIndex: -1,\n            checkedBills: [],\n            lastCheckedBill: -1,\n            selectAllBills: false,\n            billVersionList: [],\n            selectedBillVersion: 'All',\n            billSummaryList: [],\n            selectedSummaryVersion: 'All',\n            selectedLocation: 'Caption',\n            actionTypes: [],\n            otherBillEventOptions: [],\n            currentStatus: true,\n            legislationIDs: [],\n            showSidebar: true,\n            hideAllEvents: [true],\n            height: 1,\n            showModal: false,\n            introductionDate: null,\n            excludeFailed: false,\n            showUpdateSearchButton: false\n        };\n        this.searchOnEnterPress = this.searchOnEnterPress.bind(this);\n        this.toggleGroup = this.toggleGroup.bind(this);\n        this.toggleShowCategories = this.toggleShowCategories.bind(this);\n        this.clearForm = this.clearForm.bind(this);\n        this.handleSubmit = this.handleSubmit.bind(this);\n        this.handleSearch = this.handleSearch.bind(this);\n        this.getBillsResults = this.getBillsResults.bind(this);\n        this.chamberChange = this.chamberChange.bind(this);\n        this.sessionChange = this.sessionChange.bind(this);\n        this.committeeChange = this.committeeChange.bind(this);\n        this.handlePatronChange = this.handlePatronChange.bind(this);\n        this.handlePatronTypeChange = this.handlePatronTypeChange.bind(this);\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.handleSelectionClear = this.handleSelectionClear.bind(this);\n        this.handleMultiSelectionClear = this.handleMultiSelectionClear.bind(this);\n        this.getCollections = this.getCollections.bind(this);\n        this.selectCollection = this.selectCollection.bind(this);\n        this.handleBillCheckbox = this.handleBillCheckbox.bind(this);\n        this.handleEventChange = this.handleEventChange.bind(this);\n        this.addEvent = this.addEvent.bind(this);\n        this.removeEvent = this.removeEvent.bind(this);\n        this.saveForm = this.saveForm.bind(this);\n        this.getOtherBillEventOptions = this.getOtherBillEventOptions.bind(this);\n        this.handleCurrentStatusChange = this.handleCurrentStatusChange.bind(this);\n        this.toggleSidebar = this.toggleSidebar.bind(this);\n        this.toggleShowData = this.toggleShowData.bind(this);\n        this.togglehideAllEvents = this.togglehideAllEvents.bind(this);\n        this.toggleAllBills = this.toggleAllBills.bind(this);\n        this.handleEditedBills = this.handleEditedBills.bind(this);\n        this.getSessions = this.getSessions.bind(this);\n        this.executeSearch = this.executeSearch.bind(this);\n        this.toggleModal = this.toggleModal.bind(this);\n        this.handleExcludeFailedChange = this.handleExcludeFailedChange.bind(this);\n        this.toggleExpandAllLegislation = this.toggleExpandAllLegislation.bind(this);\n        this.receiveEventByWebsocket = this.receiveEventByWebsocket.bind(this);\n\n        // The div that sorrounds the page is in this component but the function that needs to run to be able to make a search is in the child component.\n        // This ref is used to call the child component's function.\n        this.searchBox = React.createRef();\n    }\n\n    componentDidMount() {\n        // IF A SEARCH QUERY EXISTS\n        let queryObj = '';\n        const parsed = queryString.parse(this.props.location.search);\n        if (parsed.q) {\n            const base64 = parsed.q;\n            const decodedSearch = window.atob(base64);\n            queryObj = JSON.parse(decodedSearch);\n            this.setState(state => ({\n                ...state,\n                ...queryObj\n            }), () => {\n                //If we haven't arrived here to edit history then go ahead with the search\n                if (queryObj.calendarCategoryTypeID) {\n                    this.setState({\n                        calendarHeader: {\n                            Name: 'Calendar on ' + moment(queryObj.calendarDate).format(\"MM/DD/YYYY\"),\n                            Description: queryObj.calendarCategoryDescription\n                        }\n                    })\n                    this.getSessions(queryObj);\n                } else {\n                    this.getSessions();\n                }\n            });\n        } else {\n            this.getSessions();\n        }\n\n        let entryConnection = new HubConnectionBuilder() //in bill mgmt, use one central entryConnection from props rather than a separate connection for each bill\n            .withUrl((API_URL || process.env.REACT_APP_LEGISLATION_EVENT_API_URL) + '/LegislationEvent/events')\n            .build();\n        entryConnection.serverTimeoutInMilliseconds = 60000;\n        this.setState({\n            entryHubConnection: entryConnection\n        }, () => {\n            this.state.entryHubConnection\n                .start({ withCredentials: false })\n                .then(() => {\n                    BillHistoryForm.getConnectionId(this.state.entryHubConnection, (connectionId) => {\n                        console.log(`entryConnectionId: ${connectionId}`);\n                        this.setState({\n                            entryConnectionId: connectionId\n                        })\n                    });\n                }).catch(err => {\n                    console.log('Error establishing connection' + err)\n                    this.props.actions.makeToast([{ message: \"Entry Connection Failed\", type: \"failure\" }])\n                });\n            this.state.entryHubConnection.on(\"ReceiveEvent\", message => BillHistoryForm.handleEvent(message, this.receiveEventByWebsocket));\n        });\n\n        this.getBillStatusCategoryOptions();\n        this.getBillVersionOptions();\n        this.getBillSummaryOptions();\n        this.getBillEventOptions(queryObj.calendarCategoryTypeID);\n        this.getPatronRoles();\n\n        this.props.actions.getActionTypes()\n            .then(() => {\n                let actionTypes = [...this.props.minutes.actionTypes];\n                actionTypes.forEach(type => {\n                    type.label = type.ActionReferenceType;\n                    type.value = type.ActionReferenceTypeID;\n                })\n                this.setState({\n                    actionTypes: actionTypes\n                });\n            });\n    }\n\n    receiveEventByWebsocket(message) {\n        let billList = [...this.state.billList];\n        message.forEach(msg => {\n            //If the LegislationID for the list of new events doesn't match any bills in the result set then keep it moving\n            const billIndex = billList.findIndex(b => b.LegislationID === msg.LegislationID);\n            if (billIndex > -1) {\n                let updated = false;\n                //If we don't find an event from the websocket message in the already-loaded list of events then add it to the local history list\n                if (!billList[billIndex].historyList?.find(x => x.LegislationEventID === msg.LegislationEventID)) {\n                    updated = true;\n                    billList[billIndex].historyList = billList[billIndex].historyList || [];\n                    billList[billIndex].historyList.push(msg)\n                }\n                if (updated) {\n                    //Send the updated local history list to be reorganized and displayed\n                    const organizedEvents = BillHistoryForm.organizeEvents(billList[billIndex].historyList);\n                    this.handleEventChange(billIndex, organizedEvents);\n                }\n            }\n        });\n\n        this.setState({ billList })\n    }\n\n    getSessions(queryObj) {\n        let sessions = ''\n        if (!this.state.sessionOptions.length) {\n            sessions = this.props.actions.getSessionList()\n                .then(() => {\n                    this.setState({\n                        sessionOptions: this.props.session.sessionList\n                    })\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err)\n                });\n        } else {\n            sessions = () => Promise.resolve();\n        }\n\n        Promise.all([sessions]).then(() => {\n            let selectedSession = '';\n            let defaultSession = '';\n            this.state.sessionOptions.forEach(session => {\n                if (queryObj && session.SessionID === queryObj.selectedSession) {\n                    selectedSession = session;\n                    this.props.actions.changeSession(session.SessionCode);\n                } else if (session.SessionCode === this.props.nav.session && !selectedSession) {\n                    selectedSession = session;\n                }\n                if (session.IsDefault) {\n                    defaultSession = session;\n                }\n            });\n            //Only set the session to default if the queryObj doesn't have a sessionID and the the session selector doesn't have a sessionID\n            if (!selectedSession) {\n                selectedSession = defaultSession;\n            }\n\n            if (selectedSession) {\n                const sessionStartObj = selectedSession.SessionEvents && selectedSession.SessionEvents.length && selectedSession.SessionEvents.find(date => date.DisplayName === \"Session Start\");\n                const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate).format(\"MM/DD/YYYY\") : '';\n                const dateParam = 'effectiveDate=' + encodeURIComponent(startDate);\n                const sessionParam = 'sessionID=' + selectedSession.SessionID;\n                this.getPatrons(sessionParam);\n                this.getSubjects(sessionParam);\n                this.getCommittees(dateParam);\n                this.getIntroDates(sessionParam)\n\n                this.setState({ selectedSession }, () => {\n                    if (this.props.login.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR)) {\n                        this.getCollections(\"?SessionID=\" + this.state.selectedSession.SessionID);\n                    }\n                    if (queryObj && !queryObj.sessionOnly) {\n                        this.handleSearch()\n                    } else {\n                        this.setState({ showCategories: true })\n                    }\n\n                    document.querySelector('body').addEventListener('keydown', this.searchOnEnterPress);\n                })\n            } else {\n                this.setState({ failedToGetSessions: true })\n            }\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    componentDidUpdate(prevProps, prevState) {\n        if (this.props.location.search !== prevProps.location.search) {\n            this.executeSearch();\n        }\n        if (this.props.nav.session !== prevProps.nav.session) {\n            if (!isNaN(parseInt(this.props.nav.session))) {\n                this.sessionChange(this.props.nav.session);\n            }\n        }\n\n        //get collections if user logs in/logged in user changes\n        if (this.props.login.userProfile.email && this.props.login.userProfile.email !== prevProps.login.userProfile.email) {\n            if (this.state.selectedSession.SessionID && this.props.login.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR)) {\n                this.getCollections(\"?SessionID=\" + this.state.selectedSession.SessionID);\n            } else if (this.state.collections && this.state.collections.length) {\n                this.setState({ collections: [] })\n            }\n        }\n\n        if (this.state.billList !== prevState.billList || this.state.showCategories !== prevState.showCategories) {\n            if (window.innerWidth > 900) { //breaks mobile otherwise, and the sidebar toggle isn't shown on mobile anyways\n                let height = document.getElementById('results-div');\n                if (height && (height.scrollHeight / 540) !== this.state.height) {\n                    this.setState({\n                        height: (height.scrollHeight / 540) >= 1 ? (height.scrollHeight / 540) : 1\n                    })\n                } else {\n                    this.setState({\n                        height: 1\n                    })\n                }\n            }\n        }\n    }\n\n    executeSearch() {\n        let queryObj = '';\n        const parsed = queryString.parse(this.props.location.search, { decode: false });\n        if (parsed.q) {\n            const base64 = parsed.q;\n            const decodedSearch = window.atob(base64);\n            queryObj = JSON.parse(decodedSearch);\n            //Remove any existing entries in the form and replace it with the content of the url\n            this.clearForm();\n            this.setState(state => ({\n                ...state,\n                ...queryObj\n            }), () => {\n                //If a member is already selected and there are no patron types selected then select them all by default\n                if (this.state.selectedPatron && this.state.selectedPatronType.length === 0) {\n                    const patronRoles = [];\n                    this.state.patronRoles.forEach(role => patronRoles.push(role.PatronTypeID));\n                    this.setState({\n                        selectedPatronType: patronRoles\n                    });\n                }\n                //If a committee is already selected and there is no legislation status category then select 'In Committee' as the status\n                if (this.state.selectedCommittee && !this.state.selectedBillStatusCategory) {\n                    const selectedBillStatusCategory = this.state.billStatusCategoryList.find(status => status.Name === 'In Committee');\n                    this.setState({\n                        selectedBillStatusCategory: selectedBillStatusCategory ? selectedBillStatusCategory.LegislationCategoryID : ''\n                    });\n                }\n                this.getSessions(queryObj);\n            });\n        } else if (!parsed.collection) {\n            //this means the user hit the back button from a query and there are no longer any params in the url,\n            //and the user should be back at the base search page with categories\n            this.clearForm(true);\n        }\n    }\n\n    componentWillUnmount() {\n        document.querySelector('body').removeEventListener('keydown', this.searchOnEnterPress);\n        cancelRequest();\n    }\n\n    searchOnEnterPress(event) {\n        if (event.key === 'Enter' && !this.state.isFetching) {\n            //Pressing enter while on a react-select will select an option. A search should not happen because of that.\n            //Also do not submit a search if they are entering a value in the quick-search input at the top right which sends the user to the public search\n            //otherwise, if they are on the categories page in bill mgmt, search using the quick-search, and then hit back button from the public bill search results, it will send them to the results page in bill mgmt rather than back to the categories page\n            if (!event.target.id.includes('react-select') && !event.target.className.includes('note-area') && !event.target.className.includes('event-date-picker') && event.target.id !== \"quick-search\") {\n                if (!this.state.selectedChamber && !this.state.selectedBillEvent && !this.state.selectedBillType && !this.state.selectedCommittee && !this.state.selectedSubcommittee && !this.state.selectedPatron && !this.state.selectedSubject && !this.state.selectedKeywords && !this.state.selectedBillNumbers && !this.state.selectedBillRangeBeginning && !this.state.selectedBillRangeEnd && !this.state.selectedSubject && !this.state.selectedChapterNumber && !this.state.selectedBillStatusCategory) {\n                    //there are not any search parameters provided, don't execute a search\n                    return;\n                }\n                this.searchBox.current.handleSubmit();\n            }\n        }\n    }\n\n    toggleShowCategories(val) {\n        this.setState({\n            showCategories: val\n        });\n    }\n\n    toggleGroup(groupName) {\n        this.setState(state => ({\n            [groupName]: !state[groupName]\n        }));\n    }\n\n    clearForm(clearUrl, clearBillData) {\n        this.setState({\n            selectedBillEvent: '',\n            selectedBill: '',\n            selectedKeywords: '',\n            selectedBillAction: '',\n            billEventStartDate: null,\n            billEventEndDate: null,\n            selectedBillSession: '',\n            selectedBillType: '',\n            selectedBillNumbers: '',\n            selectedBillRangeBeginning: '',\n            selectedBillRangeEnd: '',\n            selectedChapterNumber: '',\n            subcommitteeList: [],\n            selectedPatron: '',\n            selectedPatronType: '',\n            selectedChamber: '',\n            selectedBillStatusCategory: '',\n            billStatusStartDate: null,\n            billStatusEndDate: null,\n            selectedCommittee: '',\n            selectedSubcommittee: '',\n            selectedSubject: '',\n            isPending: null,\n            mostFrequent: null,\n            allLegislation: null,\n            selectedBillVersion: 'All',\n            selectedSummaryVersion: 'All',\n            selectedLocation: 'Caption',\n            displaySelectedLocation: \"Caption\",\n            introductionDate: null\n        }, () => {\n            if (clearUrl) {\n                this.props.history.push('/bill-management');\n                this.setState({ billList: [], showCategories: true })\n            }\n            if (clearBillData) {\n                this.setState({\n                    billList: []\n                })\n            }\n        });\n\n    }\n\n    handleSubmit(queryObj) {\n        let encodedSearch = window.btoa(JSON.stringify(queryObj));\n        //if it is the same search (i.e. same parameters) as the current one, updating the url won't work since it will be the same, just execute it manually\n        const parsed = queryString.parse(this.props.location.search, { decode: false });\n        if (parsed.q && parsed.q === encodedSearch) {\n            this.executeSearch();\n        } else {\n            this.props.history.push('/bill-management?q=' + encodedSearch + (this.state.selectedCollection ? '&collection=' + this.state.selectedCollection.WatchListID : ''));\n        }\n    }\n\n    handleSearch() {\n        if (this.state.failedToGetSessions) { return; }\n        //Format the selected options to be sent to the API\n        //Add bill range to list of bills\n        let selectedBillNumbers = this.state.selectedBillNumbers.trim();\n        if (this.state.selectedBillRangeBeginning && this.state.selectedBillRangeEnd) {\n            selectedBillNumbers = selectedBillNumbers ? selectedBillNumbers + ',' : selectedBillNumbers;\n            selectedBillNumbers += this.state.selectedBillRangeBeginning + '-' + this.state.selectedBillRangeEnd;\n        }\n\n        let keywordVersion = null;\n        switch (this.state.selectedLocation) {\n            case ('Bill Text'):\n                if (this.state.selectedBillVersion !== 'All') {\n                    keywordVersion = { KeywordLegislationVersionID: this.state.selectedBillVersion }\n                }\n                break;\n            case ('Summary'):\n                if (this.state.selectedSummaryVersion !== 'All') {\n                    keywordVersion = { KeywordSummaryVersionID: this.state.selectedSummaryVersion }\n                }\n                break;\n        }\n\n        // Build the param array with param names as the keys\n        const params = {\n            ChamberCode: this.state.selectedChamber ? this.state.selectedChamber.value : null,\n            CommitteeID: this.state.selectedSubcommittee || this.state.selectedCommittee || null,\n            PatronTypes: this.state.selectedPatronType || null,\n            LegislationNumbers: selectedBillNumbers ? [{ LegislationNumber: selectedBillNumbers.replaceAll(\" \", \"\") }] : null,\n            ChapterNumber: this.state.selectedChapterNumber,\n            SessionID: this.state.selectedSession.SessionID,\n            StartDate: this.state.billStatusStartDate ? moment(this.state.billStatusStartDate).format('MM/DD/YYYY') : null,\n            EndDate: this.state.billStatusEndDate ? moment(this.state.billStatusEndDate).format() : null,\n            KeywordExpression: this.state.selectedKeywords || null,\n            KeywordLocation: this.state.selectedLocation || null,\n            ...keywordVersion,\n            MemberID: this.state.selectedPatron,\n            SubjectIndexID: this.state.selectedSubject,\n            LegislationCategoryID: this.state.selectedBillStatusCategory,\n            LegislationEventTypeID: this.state.selectedBillEvent,\n            EventStartDate: this.state.billEventStartDate ? moment(this.state.billEventStartDate).format(\"MM/DD/YYYY\") : null,\n            EventEndDate: this.state.billEventEndDate ? moment(this.state.billEventEndDate).format(\"MM/DD/YYYY\") : null,\n            IsPending: this.state.isPending || null,\n            MostFrequent: this.state.mostFrequent || null,\n            AllLegislation: this.state.allLegislation || null,\n            CurrentStatus: this.state.currentStatus,\n            ExcludeFailed: this.state.excludeFailed,\n            LegislationIDs: this.state.legislationIDs,\n            IntroductionDate: this.state.introductionDate\n        }\n        //Open the fieldset if one of the form inputs is filled out\n        if (params.LegislationNumbers) {\n            this.setState({\n                billFieldset: true\n            });\n        }\n        if (params.KeywordExpression) {\n            this.setState({\n                keywordFieldset: true\n            });\n        }\n        if (params.LegislationCategoryID || params.ChamberCode) {\n            this.setState({\n                statusFieldset: true\n            });\n        }\n        if (params.EventStartDate || params.EventEndDate) {\n            this.setState({\n                activityFieldset: true\n            });\n        }\n        if (params.MemberID) {\n            this.setState({\n                membersFieldset: true\n            });\n        }\n        if (params.CommitteeID) {\n            this.setState({\n                committeesFieldset: true\n            });\n        }\n        if (params.SubjectIndexID) {\n            this.setState({\n                subjectFieldset: true\n            });\n        }\n\n        this.setState({\n            searchMade: true,\n            displaySelectedLocation: this.state.selectedLocation,\n            showUpdateSearchButton: false\n        });\n\n        this.getBillsResults(params);\n    }\n\n    getBillsResults(params) {\n\n        //if the user searches hb1-hb4 and expands all of these bills to see further info, and then search hb1-hb5, leave open their previously expanded bills for them;\n        //however, if the existing search (if there is one, i.e. this new one is not the first search they're making) is a bill text keyword search, which automatically expands all of them in order to show bill text matches,\n        //then close these in the new search results as there's a good chance they don't care for the expanded info regarding patrons/summary/etc\n        const closeBillInfo = this.state.params?.KeywordLocation === \"Bill Text\" && this.state.params?.KeywordExpression && (params?.KeywordLocation !== \"Bill Text\" || !params?.KeywordExpression);\n\n        this.setState({\n            isFetching: true,\n            showCategories: false\n        });\n\n        window.scrollTo(0, 0);\n\n        let getResultsPromise;\n        if (params.MostFrequent) {\n            getResultsPromise = this.props.actions.getMostFrequentBillList(\"?sessionID=\" + params.SessionID + \"&excludeFailed=\" + params.ExcludeFailed);\n        } else {\n            getResultsPromise = this.props.actions.getBillList(params)\n        }\n\n        getResultsPromise.then(() => {\n            let billList = !params.MostFrequent ? [...this.props.bills.billList] : [...this.props.bills.mostFrequentBillList];\n            let legislationIDs = \"\";\n\n            //Can't manage bills that are outside of the selected session\n            billList = billList.filter(x => x.SessionID === this.state.selectedSession.SessionID);\n            //Filter to only one result per bill per session since DB sometimes returns duplicates which messes up pagination\n            billList = billList.filter((item, pos) => billList.findIndex(i => i.LegislationNumber === item.LegislationNumber && i.SessionID === item.SessionID) === pos);\n            //If coming from the calendar, sort according to calendar order which is preserved in the query param\n            if (this.state.calendarCategoryTypeID && this.state.legislationIDs?.length) {\n                billList.sort((a, b) => this.state.legislationIDs.findIndex(l => l.LegislationID === a.LegislationID) - this.state.legislationIDs.findIndex(l => l.LegislationID === b.LegislationID))\n            }\n            let hideAllEvents = []\n            billList.forEach((bill, i) => {\n                legislationIDs = legislationIDs + \"legislationIDs=\" + bill.LegislationID;\n                legislationIDs = i + 1 !== this.props.bills.billList.length ? legislationIDs + \"&\" : legislationIDs;\n                // Remove all references to any previous organizedEvents, and set the hideAllEvents for this specific bill to true\n                hideAllEvents.push(true)\n                this.setState({\n                    [`organizedEvents${i}`]: '',\n                    hideAllEvents\n                })\n            });\n\n            if (legislationIDs) {\n                let promises =\n                    [this.props.actions.getBillHistoryByBillID(`?${legislationIDs}`, true),\n                    this.props.actions.getBillVersionsByBillID(`?${legislationIDs}`)];\n\n                Promise.all(promises).then(() => {\n                    billList.forEach((bill, i) => {\n                        bill.historyList = this.props.bills.billHistory.filter(x => x.LegislationID === bill.LegislationID);\n                        bill.versionsList = this.props.bills.billVersion.filter(x => x.LegislationID === bill.LegislationID).map(x => ({\n                            ...x,\n                            label: x.DocumentCode,\n                            value: x.LegislationTextID\n                        }));\n                    })\n                }).then(() => {\n                    this.setState({\n                        billList: billList,\n                        checkedBills: [],\n                        lastCheckedBill: -1,\n                        isFetching: false\n                    }, () => {\n                        if (closeBillInfo)\n                            [...this.state.billList].forEach(b => this.toggleShowData(b.LegislationID, false))\n                    });\n                });\n            } else {\n                this.setState({\n                    billList: [],\n                    checkedBills: [],\n                    lastCheckedBill: -1,\n                    isFetching: false\n                })\n            }\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            this.setState({\n                isFetching: false\n            });\n        })\n    }\n\n    getBillStatusCategoryOptions() {\n        // Get Bill Status references for bill status typeahead\n        this.props.actions.getBillStatusCategoryReferences().then(() => {\n            let billStatusReferences = [...this.props.bills.billStatusCategoryReferences];\n            billStatusReferences.forEach(ref => {\n                ref.label = ref.Name\n                ref.value = ref.LegislationCategoryID\n            });\n            if (this.state.selectedCommittee && !this.state.selectedBillStatusCategory) {\n                const selectedBillStatusCategory = billStatusReferences.find(status => status.Name === 'In Committee');\n                this.setState({\n                    selectedBillStatusCategory: selectedBillStatusCategory ? selectedBillStatusCategory.LegislationCategoryID : ''\n                });\n            }\n            this.setState({\n                billStatusCategoryList: billStatusReferences,\n                billStatusCategoryListIsLoading: false\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n            this.setState({ billStatusCategoryListIsLoading: false })\n        });\n    }\n\n    getBillVersionOptions() {\n        this.props.actions.getBillVersionRef().then(() => {\n            let topOfList = [{ Name: 'All Versions', LegislationVersionID: 'All' }];\n            let billVersionReferences = topOfList.concat(this.props.bills.billVersionRef);\n            billVersionReferences.forEach(ref => {\n                ref.label = ref.Name\n                ref.value = ref.LegislationVersionID\n            });\n            this.setState({\n                billVersionList: billVersionReferences,\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    getBillSummaryOptions() {\n        this.props.actions.getBillSummaryRef().then(() => {\n            let topOfList = [{ Name: 'All Summary Versions', SummaryVersionID: 'All' }];\n            let billSummaryReferences = topOfList.concat(this.props.bills.billSummaryRef);\n            billSummaryReferences.forEach(ref => {\n                ref.label = ref.Name\n                ref.value = ref.SummaryVersionID\n            });\n            this.setState({\n                billSummaryList: billSummaryReferences,\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    getBillEventOptions(calendarCategoryTypeID) {\n        if (calendarCategoryTypeID) {\n            this.props.actions.getBillEventReferences(\"?calendarCategoryTypeID=\" + calendarCategoryTypeID)\n                .then(() => {\n                    let billEventReferences = [...this.props.bills.billEventRef];\n                    billEventReferences.forEach(ref => {\n                        delete ref.LegislationChamberCode;\n                        ref.label = ref.LegislationDescription || ref.CalendarDescription;\n                        ref.value = `${ref.EventCode}-${ref.IsPassed}`\n                    });\n                    billEventReferences = this.filterBillEventReferences(billEventReferences);\n\n                    billEventReferences.push({\n                        label: \"Other\",\n                        value: \"Other\"\n                    })\n                    this.setState({\n                        billEventOptions: billEventReferences\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err)\n                });\n        } else {\n            this.props.actions.getBillEvents(\"\").then(() => {\n                let billEventReferences = [...this.props.bills.billEvents];\n                billEventReferences.forEach(ref => {\n                    delete ref.LegislationChamberCode;\n                    ref.label = ref.LegislationDescription || ref.CalendarDescription\n                    ref.value = `${ref.EventCode}-${ref.IsPassed}`\n                });\n                billEventReferences = this.filterBillEventReferences(billEventReferences);\n\n                this.setState({\n                    billEventOptions: billEventReferences\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n        }\n    }\n\n    getOtherBillEventOptions() {\n        this.props.actions.getBillEvents(\"\").then(() => {\n            let billEventReferences = [...this.props.bills.billEvents];\n            billEventReferences.forEach(ref => {\n                ref.label = ref.LegislationDescription || ref.CalendarDescription;\n                ref.value = `${ref.EventCode}-${ref.IsPassed}`\n            });\n            billEventReferences = this.filterBillEventReferences(billEventReferences);\n            this.setState({\n                otherBillEventOptions: billEventReferences\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    filterBillEventReferences(billEventReferences) {\n        return billEventReferences.filter((value, index, self) =>\n            index === self.findIndex((t) => (\n                t.EventCode === value.EventCode && JSON.stringify(t.ActionReferences) === JSON.stringify(value.ActionReferences) && t.IsPassed === value.IsPassed\n            ))\n        )\n    }\n\n    getPatrons(sessionParam) {\n        // Get Patrons list for typeahead\n        this.props.actions.getMemberList(sessionParam).then(() => {\n            let memberList = [...this.props.members.memberList];\n            memberList.forEach(patron => {\n                patron.label = patron.ListDisplayName + ' ' + '(' + patron.ChamberCode + ')';\n                patron.value = patron.MemberID;\n            });\n            const member = memberList.find(member => member.MemberID === this.state.selectedPatron);\n            let selectedPatronType = [];\n            if (member && this.state.selectedPatronType.length === 0) {\n                this.state.patronRoles.forEach(role => selectedPatronType.push(role.PatronTypeID));\n                this.setState({\n                    selectedPatronType: selectedPatronType\n                });\n            }\n            this.setState({\n                patronList: memberList,\n                filteredPatronList: memberList,\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    getSubjects(sessionParam) {\n        this.props.actions.getSubjectList('?' + sessionParam)\n            .then(() => {\n                this.setState({\n                    subjectList: this.props.bills.subjectList\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    getPatronRoles() {\n        this.props.actions.getPatronRoles()\n            .then(() => {\n                const patronRoles = [...this.props.patrons.patronRoles];\n                patronRoles.forEach(role => {\n                    role.label = role.Name;\n                    role.value = role.PatronTypeID;\n                });\n                this.setState({\n                    patronRoles: patronRoles,\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    getCommittees(sessionParam) {\n        this.props.actions.getCommitteeList(sessionParam + \"&includeSubCommittees=true\").then(() => {\n            let fullCommitteeList = this.props.committee.committeeList.filter(c => !c.ParentCommitteeID);\n            fullCommitteeList.forEach(committee => {\n                committee.label = committee.Name + ' ' + '(' + committee.ChamberCode + ')';\n                committee.value = committee.CommitteeID;\n            });\n            let committeeList = fullCommitteeList.filter(c => !c.ParentCommitteeID);\n            let groupedCommitteeList = [{ \"label\": \"House Committees\", \"ChamberCode\": \"H\", \"options\": committeeList.filter(c => c.ChamberCode === \"H\") }, { \"label\": \"Senate Committees\", \"ChamberCode\": \"S\", \"options\": committeeList.filter(c => c.ChamberCode === \"S\") }]\n            this.setState({\n                fullCommitteeList: fullCommitteeList,\n                committeeList: committeeList,\n                groupedCommitteeList: groupedCommitteeList,\n                filteredCommitteeList: groupedCommitteeList\n            });\n            //If a committee is already selected then that committee's subcommittees need to be retrieved\n            if (this.state.selectedCommittee) {\n                this.getSubcommittees(this.state.selectedCommittee);\n            }\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    getSubcommittees(id) {\n        this.props.actions.getCommitteeList(\"parentCommitteeID=\" + id)\n            .then(() => {\n                let committeeList = [...this.props.committee.committeeList];\n                committeeList.forEach(committee => {\n                    committee.label = '(' + committee.ChamberCode + ') ' + committee.Name;\n                    committee.value = committee.CommitteeID;\n                });\n                this.setState({\n                    subcommitteeList: committeeList\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    getIntroDates(sessionParam) {\n        this.props.actions.getIntroDateList('?' + sessionParam)\n            .then(() => {\n                let datesList = [];\n                this.props.bills.introDateList.forEach(date => datesList.push(moment(date.IntroductionDate)));\n                this.setState({\n                    introDateList: datesList\n                })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    sessionChange(code) {\n        const selectedSession = this.state.sessionOptions.find(session => session.SessionCode === code);\n        if (!selectedSession) {\n            return;\n        }\n        const sessionParam = 'sessionID=' + selectedSession.SessionID;\n        this.getPatrons(sessionParam);\n        this.getSubjects(sessionParam);\n        this.getCommittees(sessionParam);\n        this.getIntroDates(sessionParam);\n        this.getCollections(\"?SessionID=\" + selectedSession.SessionID);\n\n        const parsed = queryString.parse(this.props.location.search, { decode: false });\n        if (parsed.q) {\n            const base64 = parsed.q;\n            const decodedSearch = window.atob(base64);\n            let queryObj = JSON.parse(decodedSearch);\n            if (queryObj.selectedSession) {\n                queryObj.selectedSession = selectedSession.SessionID;\n                this.handleSubmit(queryObj);\n                return;\n            }\n        } else {\n            this.setState({ currentStatus: selectedSession.IsActive })\n        }\n\n        if (this.state.selectedBillStatusCategory) {\n            this.setState({\n                selectedPatron: '',\n                selectedPatronType: '',\n                selectedCommittee: '',\n                selectedSubcommittee: '',\n                selectedSubject: '',\n                selectedSession: selectedSession\n            }, () => {\n                this.handleSearch();\n            });\n        } else {\n            this.setState({\n                selectedPatron: '',\n                selectedPatronType: '',\n                selectedCommittee: '',\n                selectedSubcommittee: '',\n                selectedSubject: '',\n                selectedSession: selectedSession\n            }, () => {\n                const parsed = queryString.parse(this.props.location.search, { decode: false });\n                if (parsed.q) {\n                    this.handleSearch();\n                }\n            });\n        }\n    }\n\n    chamberChange(value) {\n        this.setState({\n            selectedChamber: value\n        });\n        if (value) {\n            const patronList = [...this.state.patronList];\n            const committeeList = [...this.state.groupedCommitteeList];\n            //Remove the patrons from the patronList that do not fit the current selected chamber\n            //Remove the committees from the committee list that do not fit the current selected chamber\n            let filteredPatronList = patronList.filter(patron => patron.ChamberCode === value.value);\n            let filteredCommitteeList = committeeList.filter(committee => committee.ChamberCode === value.value);\n            this.setState({\n                filteredPatronList: filteredPatronList,\n                filteredCommitteeList: filteredCommitteeList,\n            });\n        } else {\n            // 'all' has been selected so show all patrons/committees\n            this.setState({\n                filteredPatronList: this.state.patronList,\n                filteredCommitteeList: this.state.groupedCommitteeList,\n            });\n        }\n        // Reset all the values that are chamber specific\n        this.setState({\n            selectedPatron: '',\n            selectedPatronType: '',\n            selectedCommittee: '',\n            selectedSubcommittee: ''\n        });\n    }\n\n    committeeChange(opt) {\n        this.setState({\n            selectedCommittee: opt ? opt.value : null,\n            selectedSubcommittee: null\n        });\n        if (opt) {\n            if (!this.state.selectedBillStatusCategory) {\n                const selectedBillStatusCategory = this.state.billStatusCategoryList.find(status => status.Name === 'In Committee');\n                this.setState({\n                    selectedBillStatusCategory: selectedBillStatusCategory ? selectedBillStatusCategory.LegislationCategoryID : ''\n                });\n            }\n            this.getSubcommittees(opt.CommitteeID)\n        };\n    }\n\n    handlePatronChange(opt) {\n        let patronTypes = [];\n        if (opt) {\n            this.state.patronRoles.forEach(role => patronTypes.push(role.PatronTypeID));\n        }\n        this.setState({\n            selectedPatron: opt ? opt.value : null,\n            selectedPatronType: patronTypes\n        });\n    }\n\n    handlePatronTypeChange(options) {\n        let values = [];\n        if (options) {\n            options.forEach(opt => values.push(opt.value));\n        }\n        this.setState({\n            selectedPatronType: values\n        });\n    }\n\n    handleSelectChange = (opt, name) => {\n        this.setState({\n            [name]: opt ? opt.value : null\n        });\n        if (name === 'selectedBillStatusCategory') {\n            if (opt === null || (opt && [2, 3, 4, 6, 7, 11, 22, 16, 17, 21, 27].includes(opt.LegislationCategoryID))) {\n                this.setState({\n                    currentStatus: true,\n                    billStatusStartDate: null,\n                    billStatusEndDate: null\n                });\n            } else if ([1, 5, 23, 24, 18, 26, 29, 8, 9, 10, 19, 14, 20, 25, 13, 15, 28].includes(opt.LegislationCategoryID)) {\n                this.setState({\n                    currentStatus: false\n                });\n            }\n        }\n    }\n\n    handleDateChange = (val, name) => {\n        this.setState({\n            [name]: val\n        });\n    }\n\n    handleTextChange = (evt, name) => {\n        let value = evt.target.value;\n        if (['selectedChapterNumber', 'selectedBillRangeBeginning', 'selectedBillRangeEnd'].includes(name)) {\n            value = value.replace(/[^a-zA-Z0-9]/, \"\");\n        }\n        this.setState({ [name]: value });\n    }\n\n    handleSelectionClear(key) {\n        //Clearing some form inputs changes the value of other form inputs. Handle them here.\n        this.setState({ showUpdateSearchButton: true }, () => {\n            switch (key) {\n                case \"selectedBillStatusCategory\":\n                    this.handleSelectChange(null, \"selectedBillStatusCategory\");\n                    break;\n                case \"selectedPatron\":\n                    this.handlePatronChange(null);\n                    break;\n                case \"selectedCommittee\":\n                    this.committeeChange(null);\n                    break;\n                case \"selectedChamber\":\n                    this.chamberChange(null);\n                    break;\n                default:\n                    this.setState({\n                        [key]: ''\n                    });\n            }\n\n            if (!localStorage.getItem('searchModalDismissed')) {\n                this.toggleModal();\n                localStorage.setItem('searchModalDismissed', true);\n            }\n        })\n    }\n\n    handleMultiSelectionClear(key, index) {\n        let value = [...this.state[key]];\n        value.splice(index, 1);\n        this.setState({\n            [key]: value,\n            showUpdateSearchButton: true\n        })\n    }\n\n    handleCurrentStatusChange() {\n        this.setState({\n            currentStatus: !this.state.currentStatus\n        }, () => {\n            if (this.state.currentStatus) {\n                this.setState({\n                    billStatusStartDate: null,\n                    billStatusEndDate: null\n                })\n            }\n        })\n    }\n\n    getCollections(params) {\n        this.setState({\n            collectionIsLoading: true\n        });\n        this.props.actions.getCollections(params)\n            .then(() => {\n                const parsed = queryString.parse(this.props.location.search);\n                const collectionIndex = this.props.collection.collections.findIndex(coll => coll.WatchListID === parseInt(parsed.collection))\n                this.setState({\n                    collections: this.props.collection.collections,\n                    collectionIsLoading: false,\n                }, () => {\n                    if (collectionIndex !== -1) {\n                        this.selectCollection(collectionIndex)\n                    }\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return\n                }\n                this.setState({\n                    collectionIsLoading: false\n                });\n            });\n    }\n\n    selectCollection(collectionIndex) {\n        if (collectionIndex === this.state.selectedCollectionIndex) {\n            this.setState({\n                selectedCollectionIndex: -1,\n                selectedCollection: ''\n            })\n        } else {\n            if (this.state.collections[collectionIndex].IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\"))) {\n                alert(\"The watchlist you are trying to access is a paid watchlist. As a free user, you are no longer able to access this watchlist.\");\n                return;\n            }\n\n            let legNumbers = '';\n            this.state.collections[collectionIndex].WatchListLegislation.filter(leg => !leg.DeletionDate).forEach((leg, legIndex) => {\n                if (legIndex !== 0) {\n                    legNumbers += ', ';\n                }\n                legNumbers += leg.LegislationNumber;\n            });\n            // Don't make a search lacking any legislation\n            if (legNumbers) {\n                let queryObj = {\n                    selectedBillNumbers: legNumbers,\n                    selectedSession: this.state.selectedSession.SessionID\n                };\n                this.handleSubmit(queryObj);\n            } else {\n                // This watchlist does not have any legislation. Clear the form and clear the results.\n                this.clearForm(true);\n                this.setState({\n                    billList: []\n                });\n            }\n            this.setState({\n                selectedCollectionIndex: collectionIndex,\n                selectedCollection: this.state.collections[collectionIndex]\n            })\n        }\n    }\n\n    selectCollection(collectionIndex, returningFromSearch) {\n        if (collectionIndex === -1) {\n            this.setState({\n                selectedCollectionIndex: -1,\n                selectedCollection: '',\n                billList: [],\n                searchMade: true\n            })\n            this.props.history.push('/bill-management');\n            this.clearForm();\n        } else {\n            // Remove object references so the state does not mutate\n            const selectedCollection = JSON.parse(JSON.stringify(this.state.collections[collectionIndex] || ''))\n            if (selectedCollection.IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\"))) {\n                alert(\"The watchlist you are trying to access is a paid watchlist. As a free user, you are no longer able to access this watchlist.\");\n                return;\n            }\n            const parsed = queryString.parse(this.props.location.search, { decode: false });\n            let sessionOnly = false;\n            if (parsed.q) {\n                const base64 = parsed.q;\n                const decodedSearch = window.atob(base64);\n                const queryObj = JSON.parse(decodedSearch);\n                sessionOnly = queryObj.sessionOnly || false;\n            }\n            if (returningFromSearch || !parsed.q || sessionOnly)\n                this.props.history.push(`/bill-management?collection=${selectedCollection.WatchListID}`)\n            this.setState({\n                selectedCollectionIndex: collectionIndex,\n                selectedCollection: selectedCollection,\n                showCategories: false,\n                billList: parsed.q ? this.state.billList : [],\n                searchMade: parsed.q ? this.state.searchMade : false,\n            });\n            if (returningFromSearch || !parsed.q || sessionOnly) {\n                const bills = selectedCollection.WatchListLegislation.filter(l => !l.DeletionDate).map(l => l.LegislationID);\n                if (bills.length > 0) {\n                    let legislationIds = [];\n                    for (let i = 0; i < bills.length; i++) {\n                        legislationIds.push({ LegislationId: bills[i] });\n                    }\n\n                    const params = {\n                        LegislationIDs: legislationIds,\n                        SessionID: this.state.selectedSession.SessionID\n                    }\n                    this.getBillsResults(params);\n                }\n                this.clearForm();\n            }\n        }\n    }\n\n    handleBillCheckbox(billIndex, e) {\n        let checkedBills = [...this.state.checkedBills];\n        let lastCheckedBill = this.state.lastCheckedBill;\n        if (e.nativeEvent.shiftKey && this.state.lastCheckedBill !== -1) {\n            checkedBills = checkedBills.fill(false);\n            for (let i = 0; i < Math.abs(billIndex - this.state.lastCheckedBill); i++) {\n                const index = this.state.lastCheckedBill + i * (billIndex - this.state.lastCheckedBill) / Math.abs(billIndex - this.state.lastCheckedBill);\n                checkedBills[index] = true;\n            }\n        } else {\n            lastCheckedBill = !checkedBills[billIndex] ? billIndex : this.state.lastCheckedBill;\n        }\n        checkedBills[billIndex] = !checkedBills[billIndex]\n        this.setState({\n            checkedBills: checkedBills,\n            lastCheckedBill: lastCheckedBill\n        });\n    }\n\n    toggleAllBills() {\n        const opposite = !this.state.selectAllBills;\n        let checkedBills = [...this.state.checkedBills];\n        checkedBills = new Array(this.state.billList.length).fill(opposite);\n        this.setState({\n            selectAllBills: opposite,\n            checkedBills: checkedBills,\n            lastCheckedBill: -1\n        });\n    }\n\n    handleEventChange(billIndex, events) {\n        //The reason an array is not used here to contain all the organized events is because a bunch of components are calling this function at the same time.\n        //Using the same object to contain all the organized events would cause the components to be overwriting eachother's changes.\n        this.setState({\n            [`organizedEvents${billIndex}`]: events\n        }, () => {\n            this.handleEditedBills();\n        });\n    }\n\n    addEvent(eventDate, eventSequence, event) {\n        this.state.billList.forEach((bill, billIndex) => {\n            if (this.state.checkedBills[billIndex]) {\n                bill.eventsChanged = true;\n                let organizedEvents = this.state[`organizedEvents${billIndex}`] || BillHistoryForm.organizeEvents(bill.historyList || []);\n\n                let newEvent = {\n                    ...event,\n                    IsPublic: true,\n                    LegislationID: bill.LegislationID,\n                    EventDate: eventDate,\n                    hasChanged: true\n                };\n\n                //Check to see if there is are events with the same date already\n                const newEventGroupIndex = organizedEvents ? organizedEvents.findIndex(eventGroup => eventDate.toISOString().substring(0, 10) === moment(eventGroup.date).toISOString().substring(0, 10)) : -1;\n                if (newEventGroupIndex > -1) {\n                    //Make sure DisplaySequence is handled first\n                    if (organizedEvents[newEventGroupIndex].events.find(e => !e.DisplaySequence)) {\n                        for (let i = 0; i < organizedEvents[newEventGroupIndex].events.length; i++) {\n                            if (!organizedEvents[newEventGroupIndex].events[i].DisplaySequence) {\n                                if (i === 0) {\n                                    organizedEvents[newEventGroupIndex].events[i].DisplaySequence = 10;\n                                } else {\n                                    organizedEvents[newEventGroupIndex].events[i].DisplaySequence = organizedEvents[newEventGroupIndex].events[i - 1].DisplaySequence % 10 === 0 ? (organizedEvents[newEventGroupIndex].events[i - 1].DisplaySequence + 10) : (Math.round(organizedEvents[newEventGroupIndex].events[i - 1].DisplaySequence / 10) * 10);\n                                }\n                            }\n                        }\n                    }\n                    // If the selected date already has events that occured on that date then the event is moved into the existing group\n                    // If a display sequence (e.g. 30) is provided AND it is not the largest display sequence in that group, put it at the provided spot, otherwise put it last\n                    if (Number.isInteger(eventSequence) && Math.max.apply(null, organizedEvents[newEventGroupIndex].events.map(o => o.DisplaySequence)) > eventSequence) {\n                        newEvent.DisplaySequence = eventSequence;\n                        let insertIdx;\n                        organizedEvents[newEventGroupIndex].events.forEach((evt, i) => {\n                            if (evt.DisplaySequence >= eventSequence) {\n                                if (!Number.isInteger(insertIdx)) {\n                                    newEvent.Sequence = evt.Sequence;\n                                    insertIdx = i;\n                                }\n                                evt.Sequence++;\n                                evt.hasChanged = true;\n                            }\n                        })\n                        organizedEvents[newEventGroupIndex].events.splice(insertIdx || 0, 0, newEvent)\n                    } else {\n                        newEvent.Sequence = organizedEvents[newEventGroupIndex].events.length + 1;\n                        newEvent.DisplaySequence = eventSequence || (organizedEvents[newEventGroupIndex].events[organizedEvents[newEventGroupIndex].events.length - 1].DisplaySequence % 10 === 0 ? (organizedEvents[newEventGroupIndex].events[organizedEvents[newEventGroupIndex].events.length - 1].DisplaySequence + 10) : (Math.round(organizedEvents[newEventGroupIndex].events[organizedEvents[newEventGroupIndex].events.length - 1].DisplaySequence / 10) * 10));\n                        organizedEvents[newEventGroupIndex].events.push(newEvent)\n                    }\n                } else {\n                    // If the selected date does not have any events then a new event group needs to be created for this date\n                    newEvent.Sequence = 1;\n                    newEvent.DisplaySequence = 10;\n                    const newEventGroup = {\n                        date: eventDate,\n                        events: [newEvent]\n                    };\n                    // Gotta find where it goes in the list of groups\n                    organizedEvents.some((eventGroup, i) => {\n                        if (eventGroup.date.isAfter(eventDate, 'day')) {\n                            organizedEvents.splice(i, 0, newEventGroup)\n                            return true;\n                        }\n                        if (i === organizedEvents.length - 1) {\n                            organizedEvents.push(newEventGroup)\n                        }\n                    });\n                }\n                this.setState({\n                    [`organizedEvents${billIndex}`]: organizedEvents,\n                    [bill.LegislationID]: true\n                }, () => {\n                    this.handleEditedBills();\n                });\n            }\n        });\n    }\n\n    removeEvent(eventDate, event, displaySequence) {\n        this.state.billList.forEach((bill, billIndex) => {\n            if (this.state.checkedBills[billIndex]) {\n                let organizedEvents = this.state[`organizedEvents${billIndex}`] || BillHistoryForm.organizeEvents(bill.historyList || []);\n                organizedEvents.forEach((dateItem, dateItemIdx) => {\n                    if (moment(dateItem.date).isSame(eventDate, 'day')) {\n                        for (let i = 0; i < dateItem.events.length; i++) {\n                            let eventItem = dateItem.events[i];\n                            if (eventItem.EventCode === event.EventCode && !event.DeletionDate && (!displaySequence || displaySequence === eventItem.DisplaySequence)) {\n                                //if deleting an event that didn't already exist/hasn't been saved at all, just remove it entirely\n                                if (!eventItem.LegislationEventID) {\n                                    //if there is only one event in this day, just remove the day\n                                    if (dateItem.events.length === 1) {\n                                        const wasLastEventGroup = dateItemIdx === organizedEvents.length - 1;\n                                        organizedEvents.splice(dateItemIdx, 1);\n                                        //if it was the last event day that got removed, expand the now-last event day\n                                        if (wasLastEventGroup) {\n                                            organizedEvents[organizedEvents.length - 1].hidden = false;\n                                        }\n                                    } else {\n                                        //There is more than just this event in the day, only remove this event from the group and move on\n                                        dateItem.events.splice(i, 1);\n\n                                        //recalculate sequences of events\n                                        for (let idx = i; idx < dateItem.events.length; idx++) {\n                                            dateItem.events[idx].Sequence--\n                                        }\n\n                                        i--;\n                                    }\n                                } else {\n                                    //this event existed to begin with, we need to set the deletion date and save it\n                                    eventItem.DeletionDate = moment().toISOString();\n                                    eventItem.hasChanged = true;\n                                    this.setState({ [bill.LegislationID]: true })\n                                }\n                            }\n                        }\n                    }\n                });\n                this.setState({\n                    [`organizedEvents${billIndex}`]: organizedEvents\n                }, () => {\n                    this.handleEditedBills();\n                });\n            }\n        });\n    }\n\n    handleEditedBills() {\n        let bills = [...this.state.billList];\n        bills.forEach((bill, billIndex) => {\n            bill.eventsChanged = false;\n            if (this.state[`organizedEvents${billIndex}`]) {\n                this.state[`organizedEvents${billIndex}`].forEach(eventGroup => {\n                    //newly added events do not have legeventid; also encompasses initially deleted events that were un-deleted\n                    let newEvents = eventGroup.events.filter(event => !event.LegislationEventID || (event.hasChanged && !event.DeletionDate && event.originallyDeleted));\n                    if (newEvents.length) {\n                        //mark the bill as changed, and the events as newly added (how styling is handled)\n                        bill.eventsChanged = true;\n                        newEvents.forEach(evt => evt.isNewlyAdded = true);\n                    }\n\n                    //newly deleted events have a legeventid, deletion date, and hasChanged property without originallyDeleted\n                    let deletedEvents = eventGroup.events.filter(event => event.LegislationEventID && event.hasChanged && event.DeletionDate && !event.originallyDeleted);\n                    if (deletedEvents.length) {\n                        //mark the bill as changed, and the events as newly deleted (how styling is handled)\n                        bill.eventsChanged = true;\n                        deletedEvents.forEach(evt => evt.isNewlyDeleted = true);\n                    }\n\n                    //handle events that were initially deleted, then un-deleted, then re-deleted\n                    let reDeletedEvents = eventGroup.events.filter(event => event.LegislationEventID && event.hasChanged && event.DeletionDate && event.originallyDeleted);\n                    if (reDeletedEvents.length) {\n                        //do not mark the bill as changed - these were reverted; but do reset the events themselves\n                        reDeletedEvents.forEach(evt => evt.isNewlyAdded = false);\n                    }\n\n                    //for any events that are not deleted, mark as non deleted (important for resetting events that were deleted and then un-deleted)\n                    let nonDeletedEvents = eventGroup.events.filter(event => event.LegislationEventID && !event.DeletionDate);\n                    nonDeletedEvents.forEach(evt => evt.isNewlyDeleted = false);\n\n                    //date changed events\n                    let dateChangedEvents = eventGroup.events.filter(event => event.LegislationEventID && event.origDate && !moment(event.origDate).isSame(moment(event.EventDate)));\n                    if (dateChangedEvents.length) {\n                        //mark the bill as changed, and the events as 'dateChanged'\n                        bill.eventsChanged = true;\n                        dateChangedEvents.forEach(evt => evt.dateChanged = true);\n                    }\n\n                    //for any events that are non-date-changed, mark as such (important for resetting events that were changed and then reverted)\n                    let nonDateChangedEvents = eventGroup.events.filter(event => event.LegislationEventID && (!event.origDate || moment(event.origDate).isSame(event.EventDate)));\n                    nonDateChangedEvents.forEach(evt => evt.dateChanged = false);\n\n                    //sequence changed events\n                    let sequenceChangedEvents = eventGroup.events.filter(event => event.LegislationEventID && event.origSequence && event.Sequence !== event.origSequence)\n                    if (sequenceChangedEvents.length) {\n                        //mark the bill as changed, and the events as 'sequenceChanged'\n                        bill.eventsChanged = true;\n                        sequenceChangedEvents.forEach(evt => evt.sequenceChanged = true);\n                    }\n\n                    //for any events that are non-sequence-changed, mark as such (important for resetting events that were changed and then reverted)\n                    let nonSequenceChangedEvents = eventGroup.events.filter(event => event.LegislationEventID && (!event.origSequence || event.Sequence === event.origSequence));\n                    nonSequenceChangedEvents.forEach(evt => evt.sequenceChanged = false);\n\n                    //description changed events\n                    let descriptionChangedEvents = eventGroup.events.filter(event => event.LegislationEventID && event.origDescription && event.Description !== event.origDescription)\n                    if (descriptionChangedEvents.length) {\n                        //mark the bill as changed, and the events as 'descriptionChanged'\n                        bill.eventsChanged = true;\n                        descriptionChangedEvents.forEach(evt => evt.descriptionChanged = true);\n                    }\n\n                    //for any events that are non-description-changed, mark as such (important for resetting events that were changed and then reverted)\n                    let nonDescriptionChangedEvents = eventGroup.events.filter(event => event.LegislationEventID && (!event.origDescription || event.Description === event.origDescription));\n                    nonDescriptionChangedEvents.forEach(evt => evt.descriptionChanged = false);\n\n                    //event code changed events\n                    let eventCodeChangedEvents = eventGroup.events.filter(event => event.LegislationEventID && event.origEventCode && event.EventCode !== event.origEventCode)\n                    if (eventCodeChangedEvents.length) {\n                        //mark the bill as changed, and the events as 'eventCodeChanged'\n                        bill.eventsChanged = true;\n                        eventCodeChangedEvents.forEach(evt => evt.eventCodeChanged = true);\n                    }\n\n                    //for any events that are non-event-code-changed, mark as such (important for resetting events that were changed and then reverted)\n                    let nonEventCodeChangedEvents = eventGroup.events.filter(event => event.LegislationEventID && (!event.origEventCode || event.EventCode === event.origEventCode));\n                    nonEventCodeChangedEvents.forEach(evt => evt.eventCodeChanged = false);\n                })\n            }\n        });\n        this.setState({ billList: bills });\n    }\n\n    saveForm() {\n        let eventsToSave = [];\n        this.state.billList.forEach((_bill, billIndex) => {\n            if (this.state[`organizedEvents${billIndex}`]) {\n                this.state[`organizedEvents${billIndex}`].forEach(eventGroup => {\n                    eventGroup.events.forEach(event => {\n                        //Only save events that have been changed\n                        if (event.hasChanged) {\n                            //Do not save the events that have been deleted and lack a event id. These events to do not need to be created\n                            if (!event.LegislationEventID && event.DeletionDate) {\n                                return\n                            } else {\n                                eventsToSave.push(event);\n                            }\n                        }\n                    })\n                });\n            }\n        });\n        if (eventsToSave.length > 0) {\n            this.setState({\n                isSaving: true\n            });\n            this.props.actions.saveBillEvent({ LegislationEvents: eventsToSave })\n                .then(() => {\n                    this.props.actions.makeToast([{ message: \"Events Saved\", type: \"success\" }]);\n                    this.setState({\n                        historyIsLoaded: false,\n                        isSaving: false\n                    });\n                    // If there is a selected collection then do not do a search, just get those bills again\n                    if (this.state.selectedCollection) {\n                        this.selectCollection(this.state.selectedCollectionIndex)\n                    } else {\n                        this.handleSearch();\n                    }\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Events Save Failed\", type: \"failure\" }]);\n                    this.setState({\n                        isSaving: false\n                    });\n                });\n        }\n    }\n\n    toggleSidebar() {\n        this.setState({\n            showSidebar: !this.state.showSidebar\n        })\n    }\n\n    toggleShowData(billID, bool) {\n        if (bool === undefined) {\n            this.setState(prevState => ({\n                [billID]: !prevState[billID]\n            }));\n        } else {\n            //not just toggling, we're explicitly setting (e.g. if searching by keyword, and a bill has been expanded, if the keyword search location changes to bill text,\n            //don't just toggle all (which would reset that bill to false), set them all to true)\n            this.setState({\n                [billID]: bool\n            })\n        }\n    }\n\n    togglehideAllEvents(idx) {\n        let hideAllEvents = [...this.state.hideAllEvents]\n        const hide = !hideAllEvents[idx];\n        hideAllEvents[idx] = hide\n        this.setState({\n            hideAllEvents\n        }, () => {\n            if (!hide) {\n                const lastEventGroup = document.getElementById(\"last-\" + idx);\n                if (lastEventGroup) { lastEventGroup.scrollIntoView({ block: 'center' }); }\n            }\n        })\n    }\n\n    toggleModal() {\n        this.setState({\n            showModal: !this.state.showModal\n        })\n    }\n\n    handleExcludeFailedChange() {\n        this.setState({\n            excludeFailed: !this.state.excludeFailed,\n            showUpdateSearchButton: true\n        })\n    }\n\n    toggleExpandAllLegislation(expand) {\n        let billList = [...this.state.billList];\n        billList.forEach(bill => {\n            this.toggleShowData(bill.LegislationID, expand)\n        })\n    }\n\n    render() {\n        const { isFetching, sessionID, billList, showSidebar, height } = this.state;\n        const { errorMessage } = this.props.bills;\n\n        let toggleArrows = [];\n        for (let i = 1; i <= height; i++) {\n            let top = (i * 540).toString() + \"px\";\n            toggleArrows.push(<button key={i} type=\"button\" aria-expanded={showSidebar} onClick={this.toggleSidebar} className={showSidebar ? \"sidebar-button arrow-up white-chevron\" : \"sidebar-button arrow-down white-chevron\"} style={{ top: top }}></button>);\n        }\n\n        return (\n            <div id=\"results-div\">\n                {this.state.showModal &&\n                    <div className=\"schedule-modal\">\n                        <div className=\"schedule-modal-content\">\n                            <p>You will need to click the search button or press the enter key in order to update your search results after removing a search parameter.</p>\n                            <button className=\"button primary float-right\" onClick={() => this.toggleModal()}>Close</button>\n                            <br />\n                        </div>\n                    </div>\n                }\n                <h1>Bill Management</h1>\n                <br />\n                <div className={showSidebar ? \"inner-grid one-toggle-and-three\" : \"inner-grid toggle-and-three\"}>\n                    {showSidebar &&\n                        <div>\n                            <LegislationWatchlists\n                                collections={this.state.collections}\n                                isLoading={this.state.collectionIsLoading}\n                                error={this.props.collection.collectionError}\n                                selectedCollectionIndex={this.state.selectedCollectionIndex}\n                                selectCollection={this.selectCollection}\n                                createCollection={() => null}\n                                isCreatingCollection={this.state.isCreatingCollection}\n                                location={this.props.history.location.pathname}\n                                isBillManagement={true}\n                                isAuthor={true}\n                            />\n                            <br />\n                            <AdvancedSearchBox\n                                ref={this.searchBox}\n                                selectedBillNumbers={this.state.selectedBillNumbers}\n                                selectedBillRangeBeginning={this.state.selectedBillRangeBeginning}\n                                selectedBillRangeEnd={this.state.selectedBillRangeEnd}\n                                selectedChapterNumber={this.state.selectedChapterNumber}\n                                selectedKeywords={this.state.selectedKeywords}\n                                selectedBillEvent={this.state.selectedBillEvent}\n                                billEventOptions={this.state.billEventOptions}\n                                sessionOptions={this.state.sessionOptions}\n                                selectedSession={this.state.selectedSession}\n                                billStatusCategoryList={this.state.billStatusCategoryList}\n                                selectedBillStatusCategory={this.state.selectedBillStatusCategory}\n                                billStatusStartDate={this.state.billStatusStartDate}\n                                billStatusEndDate={this.state.billStatusEndDate}\n                                selectedCommittee={this.state.selectedCommittee}\n                                committeeList={this.state.filteredCommitteeList}\n                                subcommitteeList={this.state.subcommitteeList}\n                                selectedSubcommittee={this.state.selectedSubcommittee}\n                                patronList={this.state.filteredPatronList}\n                                patronRoles={this.state.patronRoles}\n                                selectedPatron={this.state.selectedPatron}\n                                selectedPatronType={this.state.selectedPatronType}\n                                selectedChamber={this.state.selectedChamber}\n                                selectedBillType={this.state.selectedBillType}\n                                billEventEndDate={this.state.billEventEndDate}\n                                billEventStartDate={this.state.billEventStartDate}\n                                resetUrl={this.resetUrl}\n                                handleSubmit={this.handleSubmit}\n                                handleTextChange={this.handleTextChange}\n                                handleSelectChange={this.handleSelectChange}\n                                handleDateChange={this.handleDateChange}\n                                committeeChange={this.committeeChange}\n                                chamberChange={this.chamberChange}\n                                sessionChange={this.sessionChange}\n                                clearForm={this.clearForm}\n                                isFetching={this.state.isFetching}\n                                handlePatronChange={this.handlePatronChange}\n                                handlePatronTypeChange={this.handlePatronTypeChange}\n                                subjectList={this.state.subjectList}\n                                selectedSubject={this.state.selectedSubject}\n                                toggleGroup={this.toggleGroup}\n                                billFieldset={this.state.billFieldset}\n                                keywordFieldset={this.state.keywordFieldset}\n                                statusFieldset={this.state.statusFieldset}\n                                activityFieldset={this.state.activityFieldset}\n                                membersFieldset={this.state.membersFieldset}\n                                committeesFieldset={this.state.committeesFieldset}\n                                subjectFieldset={this.state.subjectFieldset}\n                                showCategories={this.state.showCategories}\n                                toggleShowCategories={this.toggleShowCategories}\n                                location={this.props.history.location.pathname}\n                                billVersionList={this.state.billVersionList}\n                                selectedBillVersion={this.state.selectedBillVersion}\n                                billSummaryList={this.state.billSummaryList}\n                                selectedSummaryVersion={this.state.selectedSummaryVersion}\n                                selectedLocation={this.state.selectedLocation}\n                                billManagement={true}\n                                handleCurrentStatusChange={this.handleCurrentStatusChange}\n                                currentStatus={this.state.currentStatus}\n                                failedToGetSessions={this.state.failedToGetSessions}\n                                searchParam={this.props.history.location.search}\n                                handleExcludeFailedChange={this.handleExcludeFailedChange}\n                                excludeFailed={this.state.excludeFailed}\n                                showUpdateSearchButton={this.state.showUpdateSearchButton}\n                            />\n                        </div>\n                    }\n                    <div className={showSidebar ? \"management sidebar-toggle-open\" : \"management sidebar-toggle-closed\"} onClick={this.toggleSidebar}>\n                        {toggleArrows.map((a, i) => {\n                            return (a)\n                        })}\n                    </div>\n                    {this.state.failedToGetSessions ? <div className=\"center input-feedback\" style={{ fontSize: '1em' }}>Failed to retrieve sessions. Please refresh & try again.</div> : !this.state.selectedSession ? <div className=\"center-spinner spinner\">Loading...</div>\n                        :\n                        this.state.showCategories ?\n                            <BillCategories\n                                session={this.state.sessionOptions.find(session => session.SessionCode === this.props.nav.session)}\n                                patronList={this.state.patronList}\n                                committeeList={this.state.groupedCommitteeList}\n                                subjectList={this.state.subjectList}\n                                introDateList={this.state.introDateList}\n                                statusCategoriesList={this.state.billStatusCategoryList}\n                                isLoading={this.state.billStatusCategoryListIsLoading}\n                                history={this.props.history}\n                                location={this.props.history.location.pathname}\n                                selectedSession={this.state.selectedSession}\n                                excludeFailed={this.state.excludeFailed}\n                            />\n                            :\n                            <div className=\"public-list\">\n                                <CollectionControls\n                                    searchMade={this.state.searchMade}\n                                    collections={this.state.collections}\n                                    selectedCollection={this.state.selectedCollection}\n                                    selectedCollectionIndex={this.state.selectedCollectionIndex}\n                                    handleCollectionChange={() => null}\n                                    selectCollection={this.selectCollection}\n                                    collectionIsSaving={this.state.collectionIsSaving}\n                                    saveCollection={() => null}\n                                    deleteCollection={() => null}\n                                    calendarHeader={this.state.calendarHeader}\n                                    isBillManagement={true}\n                                />\n                                {this.state.searchMade &&\n                                    <SearchSelections\n                                        currentStatus={this.state.currentStatus}\n                                        selectedSession={this.state.selectedSession}\n                                        selectedBillNumbers={this.state.selectedBillNumbers}\n                                        selectedBillRangeBeginning={this.state.selectedBillRangeBeginning}\n                                        selectedBillRangeEnd={this.state.selectedBillRangeEnd}\n                                        selectedChapterNumber={this.state.selectedChapterNumber}\n                                        selectedKeywords={this.state.selectedKeywords}\n                                        selectedBillEvent={this.state.billEventOptions.find(opt => opt.value === this.state.selectedBillEvent)}\n                                        selectedBillStatusCategory={this.state.billStatusCategoryList.find(opt => opt.value === this.state.selectedBillStatusCategory)}\n                                        billStatusStartDate={this.state.billStatusStartDate}\n                                        billStatusEndDate={this.state.billStatusEndDate}\n                                        selectedCommittee={this.state.committeeList.find(opt => opt.value === this.state.selectedCommittee)}\n                                        selectedSubcommittee={this.state.subcommitteeList.find(opt => opt.value === this.state.selectedSubcommittee)}\n                                        selectedPatron={this.state.patronList.find(opt => opt.value === this.state.selectedPatron)}\n                                        selectedPatronType={this.state.patronRoles.filter(role => this.state.selectedPatronType.includes(role.PatronTypeID))}\n                                        selectedChamber={this.state.selectedChamber}\n                                        billEventEndDate={this.state.billEventEndDate}\n                                        billEventStartDate={this.state.billEventStartDate}\n                                        selectedSubject={this.state.subjectList.find(opt => opt.value === this.state.selectedSubject)}\n                                        excludeFailed={this.state.excludeFailed}\n                                        handleSelectionClear={this.handleSelectionClear}\n                                        handleMultiSelectionClear={this.handleMultiSelectionClear}\n                                        updateSearch={this.state.showUpdateSearchButton ? this.searchBox.current.handleSubmit : null}\n                                    />}\n                                <EventControls\n                                    billEventOptions={this.state.billEventOptions}\n                                    addEvent={this.addEvent}\n                                    removeEvent={this.removeEvent}\n                                    checkedBills={this.state.checkedBills}\n                                    patronList={this.state.patronList}\n                                    committeeList={this.state.fullCommitteeList}\n                                    actionTypes={this.state.actionTypes}\n                                    textList={this.state.billList.flatMap(bill => bill.versionsList ? [...bill.versionsList] : [])}\n                                    otherBillEventOptions={this.state.otherBillEventOptions}\n                                    getOtherBillEventOptions={this.getOtherBillEventOptions}\n                                />\n                                {!isFetching &&\n                                    <div className=\"flex-row search-results-title-section\">\n                                        {this.state.searchMade ?\n                                            <>\n                                                {this.state.allLegislation && <h2>All legislation</h2>}\n                                                {this.state.mostFrequent && <h2>Most frequently accessed bills</h2>}\n                                                {this.state.isPending && <h2>Pending bills</h2>}\n                                                {!this.state.isPending && !this.state.mostFrequent && !this.state.allLegislation && <h2 style={{ marginBottom: '0px' }}>{billList.length === 0 && \"No \"}Search Results</h2>}\n                                            </>\n                                            : <div></div>}\n                                    </div>\n                                }\n                                <div className=\"search-results\">\n                                    {isFetching ?\n                                        <div className=\"spinner\"></div>\n                                        :\n                                        <>\n                                            {errorMessage ?\n                                                <p className=\"message-error\">{errorMessage}</p>\n                                                :\n                                                null\n                                            }\n                                        </>\n                                    }\n                                    {!isFetching && !errorMessage &&\n                                        <ul className=\"slidedown-list\">\n                                            <div className=\"flex-row\">\n                                                <div />\n                                                <div>\n                                                    {billList.length ? <button className=\"button-link\" style={{ fontSize: '12px' }} onClick={() => this.toggleExpandAllLegislation(billList.find(bill => !this.state[bill.LegislationID]))}>{billList.find(bill => !this.state[bill.LegislationID]) ? \"Expand All Legislation\" : \"Collapse All Legislation\"}</button> : null}\n                                                </div>\n                                            </div>\n                                            <div className='flex-row'>\n                                                {billList.length ? <label htmlFor=\"sr-select-all\"\n                                                    className=\"txt-greyed\">\n                                                    <input id=\"sr-select-all\" checked={this.state.selectAllBills} onChange={this.toggleAllBills} type=\"checkbox\" style={{ verticalAlign: 'sub', marginRight: '10px' }} />\n                                                    Select all</label> : <label />}\n                                                {!errorMessage && <span id=\"search-result-count\" className=\"txt-greyed\">{billList.length} {this.state.searchMade ? \"Result\" : \"Item\"}{billList.length !== 1 && \"s\"}</span>}\n                                            </div>\n                                            <hr className=\"faded-line\" style={{ marginBlockEnd: \"0px\" }} />\n                                            {billList.map((bill, i) =>\n                                                <BillInfoComponent\n                                                    key={i}\n                                                    bill={bill}\n                                                    billIndex={i}\n                                                    checked={this.state.checkedBills[i]}\n                                                    expanded={this.state[bill.LegislationID]}\n                                                    toggleShowData={this.toggleShowData}\n                                                    selectedCollection={this.state.selectedCollection}\n                                                    handleCollectionChange={() => null}\n                                                    billEvents={this.state.billEventOptions}\n                                                    handleBillCheckbox={e => this.handleBillCheckbox(i, e)}\n                                                    sessionCode={this.state.sessionOptions.find(session => session.SessionID === bill.SessionID).SessionCode}\n                                                    isBillManagement={true}\n                                                    selectedLocation={this.state.displaySelectedLocation}\n                                                    selectedKeywords={this.state.selectedKeywords}\n                                                    displayChapterNumber={this.state.selectedChapterNumber || (this.state.selectedBillStatusCategory && this.state.billStatusCategoryList.find(it => it.Name.toLowerCase() === \"acts of assembly chapters\") && this.state.selectedBillStatusCategory === this.state.billStatusCategoryList.find(it => it.Name.toLowerCase() === \"acts of assembly chapters\").LegislationCategoryID)}\n                                                >\n                                                    <div style={{ fontSize: '16px' }}>\n                                                        <BillHistoryForm\n                                                            historyList={bill.historyList || []}\n                                                            organizedEvents={this.state[`organizedEvents${i}`] || []}\n                                                            handleEventChange={events => this.handleEventChange(i, events)}\n                                                            isBillManagement={true}\n                                                            billEvents={this.state.billEventOptions}\n                                                            billData={bill}\n                                                            idx={i}\n                                                            handleEditedBills={this.handleEditedBills}\n                                                            toggleEditContent={this.toggleEditContent}\n                                                            saveEvents={this.saveEvents}\n                                                            hideAllEvents={this.state.hideAllEvents[i]}\n                                                            togglehideAllEvents={this.togglehideAllEvents}\n                                                            versionsList={bill.versionsList}\n                                                            actionTypes={this.state.actionTypes}\n                                                            memberList={this.state.patronList}\n                                                            committeeList={this.state.fullCommitteeList}\n                                                        />\n                                                    </div>\n                                                </BillInfoComponent>\n                                            )}\n                                        </ul>\n                                    }\n                                </div>\n                            </div>\n                    }\n                </div>\n                {\n                    !this.state.showCategories &&\n                    <div className=\"floating-button-bar align-right invisible-bar\">\n                        <button type=\"button\" onClick={this.saveForm} disabled={!this.state.billList.find(b => b.eventsChanged) || this.state.isSaving} className=\"button\">{this.state.isSaving ? \"Saving...\" : \"Save\"}</button>\n                    </div>\n                }\n            </div>\n        )\n    }\n}\n\nconst PublicBillSearch = connect(\n    (state) => {\n        const { bills, session, members, committee, patrons, nav, collection, login, minutes } = state;\n        return {\n            bills,\n            session,\n            members,\n            committee,\n            patrons,\n            nav,\n            collection,\n            login,\n            minutes\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, committeeActionCreators, billActionCreators, sessionActionCreators, memberActionCreators, patronActionCreators, navActionCreators, collectionActionCreators, minutesActionCreators), dispatch)\n        }\n    }\n)(BillManagement)\n\nexport default PublicBillSearch;\n\n","import React from \"react\";\nimport ReactTable from \"react-table\";\nimport { Link } from 'react-router-dom';\nimport '../../../stylesheets/shared/react-table.css';\nimport moment from 'moment-timezone';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport DatePicker from \"react-datepicker\";\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { communicationsActionCreators } from '../../../stores/lis-communications-store';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { cancelRequest } from '../../../services/request.service';\n\nclass CommunicationsManagementGrid extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoaded: true,\n            selectedSession: [],\n            selectedChamber: '',\n            sessionOptions: [],\n            chamberOptions: [\n                { label: \"House\", value: \"H\" },\n                { label: \"Senate\", value: \"S\" }\n            ],\n            commDate: moment(),\n            commList: [],\n            showCreateSuccess: false,\n        };\n\n        this.handleChamberChange = this.handleChamberChange.bind(this);\n        this.handleSessionChange = this.handleSessionChange.bind(this);\n        this.loadCommsList = this.loadCommsList.bind(this);\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.createComm = this.createComm.bind(this);\n        this.deleteCommunication = this.deleteCommunication.bind(this);\n    }\n\n    handleChamberChange(value) {\n        this.setState({\n            selectedChamber: value\n        }, () => {\n            this.props.actions.toggleChamber(value);\n            this.loadCommsList()\n        });\n    }\n\n    handleSessionChange(value) {\n        this.setState({\n            selectedSession: value\n        }, () => { this.loadCommsList() });\n    }\n\n    loadCommsList() {\n        if (this.state.selectedChamber && this.state.selectedSession) {\n            this.setState({ isLoaded: false });\n            const commParams = '?sessionID=' + this.state.selectedSession.SessionID + '&chamberCode=' + this.state.selectedChamber.value + '&isPublic=false&communicationType=Floor';\n            this.props.actions.getCommList(commParams, true)\n                .then(() => {\n                    this.setState({\n                        isLoaded: true,\n                        commList: this.props.communications.commList\n                    });\n                });\n        }\n    }\n\n    handleDateChange(value) {\n        this.setState({\n            commDate: moment(value)\n        });\n    }\n\n    createComm() {\n        this.setState({ isAdding: true });\n\n        let createObj = {\n            CommunicationDate: this.state.commDate,\n            IsPublic: false,\n            ChamberCode: this.state.selectedChamber.value,\n            CommunicationType: 'Floor',\n            SessionID: this.state.selectedSession.SessionID,\n        };\n\n        this.props.actions.createComm({ CommunicationResponse: [createObj] })\n            .then(() => {\n                this.setState({ showCreateSuccess: true });\n                this.loadCommsList();\n                setTimeout(() => {\n                    this.setState({\n                        showCreateSuccess: false,\n                        createErrorMessage: '',\n                        isAdding: false\n                    })\n                }, 3000);\n                this.loadCommsList();\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    createErrorMessage: this.props.communications.commCreateError\n                });\n                setTimeout(() => {\n                    this.setState({\n                        showCreateSuccess: false,\n                        createErrorMessage: '',\n                        isAdding: false\n                    })\n                }, 3000);\n                this.loadCommsList();\n            })\n    }\n\n    deleteCommunication(rowIndex) {\n        this.setState({\n            communicationBeingDeleted: rowIndex\n        });\n        // Before being able to delete the communication we need to get the mod dates. So get the communication\n        this.props.actions.getComm('?communicationId=' + this.state.commList[rowIndex].CommunicationID, true)\n            .then(() => {\n                let communicationData = this.props.communications.commGet;\n                // Now that we have the communication data add a deletion date then save it\n                communicationData.DeletionDate = moment();\n                return this.props.actions.saveComm({ CommunicationResponse: [communicationData] })\n            }).then(() => {\n                this.setState({\n                    showDeleteSuccess: true,\n                    communicationBeingDeleted: -1\n                });\n                this.loadCommsList();\n                setTimeout(() => {\n                    this.setState({\n                        showDeleteSuccess: false\n                    })\n                }, 3000);\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    communicationBeingDeleted: -1,\n                    deleteFailureMessage: 'Communication failed to be deleted'\n                });\n                console.log(err)\n                setTimeout(() => {\n                    this.setState({\n                        deleteFailureMessage: '',\n                    });\n                }, 3000);\n            });\n    }\n\n    componentDidMount() {\n        //Get the list of active sessions for the session dropdown\n        this.props.actions.getSessionShallowList(\"IsActive=true\")\n            .then(() => {\n                let sessionList = [...this.props.session.sessionShallowList];\n                sessionList.forEach((session, index) => {\n                    session.label = session.SessionYear + ' ' + session.DisplayName;\n                    session.value = session.SessionID;\n                    if (session.IsDefault) {\n                        this.handleSessionChange(session);\n                    }\n                });\n                //set the default chamber to house or senate depending on the user's role\n                let selectedChamber = '';\n\n                //set the default chamber to house or senate depending on the user's role\n                let disableChamberSelector = false;\n\n                if (!this.props.login.userClaims.claims.find(x => x.RoleName === \"Admin\")) {\n                    //Find if the user is a house calendar editor, if so select house, otherwise select senate, and disable the chamber selector\n                    selectedChamber = this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseLegislationCommunicationsEditor\") ? this.state.chamberOptions.find(chamber => chamber.label === \"House\") : this.state.chamberOptions.find(chamber => chamber.label === \"Senate\");\n                    disableChamberSelector = true;\n                }\n\n                this.setState({\n                    sessionOptions: sessionList,\n                    selectedChamber: selectedChamber,\n                    disableChamberSelector: disableChamberSelector\n                }, () => {\n                    //Load the list of communicationsand put them in the grid\n                    this.loadCommsList();\n                });\n            });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        return (\n            <div>\n                <div className=\"header-half\">\n                    <h1>Communications Management</h1>\n                    {this.props.login.userClaims.claims.find(c => c.RoleName === \"Admin\") &&\n                        <div className=\"flex-row flex-vertical-center flex-end\">\n                            <a className=\"icon settings\" href=\"/configurations-management/communications\" />\n                        </div>\n                    }\n                </div>\n\n                <div className=\"toolbar minutes-toolbar dlas-forms\">\n                    <div>\n                        <Fields.Dropdown\n                            value={this.state.selectedChamber}\n                            options={this.state.chamberOptions}\n                            onChange={this.handleChamberChange}\n                            isDisabled={this.state.disableChamberSelector}\n                        />\n                    </div>\n                    <div>\n                        <Fields.Dropdown\n                            value={this.state.selectedSession}\n                            options={this.state.sessionOptions}\n                            onChange={this.handleSessionChange}\n                        />\n                    </div>\n                </div>\n                <ReactTable\n                    resizable={false}\n                    loading={!this.state.isLoaded}\n                    data={this.state.commList}\n                    ref={r => this.reactTable = r}\n                    columns={[\n                        {\n                            Header: \"Communications Date\",\n                            columns: [\n                                {\n                                    Header: (\n                                        <div className=\"dlas-forms datepicker-container\">\n                                            {!this.state.showCreateSuccess &&\n                                                <DatePicker\n                                                    id=\"commDate\"\n                                                    className=\"dnd-field\"\n                                                    selected={this.state.commDate}\n                                                    onChange={this.handleDateChange}\n                                                    placeholderText=\"Communications Date\"\n\n                                                />\n                                            }\n                                        </div>\n                                    ),\n                                    headerClassName: \"header-insert\",\n                                    accessor: \"CommunicationDate\",\n                                    sortable: false,\n                                    width: 200,\n                                    Cell: row => <span>{moment(row.value).format('L')}</span>\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"ID\",\n                            columns: [\n                                {\n                                    Header: (<div></div>),\n                                    headerClassName: \"header-insert\",\n                                    accessor: \"CommunicationNumber\",\n                                    sortable: false,\n                                    width: 140,\n                                    Cell: row => <span>{row.value}</span>\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Session\",\n                            columns: [\n                                {\n                                    Header: (\n                                        <div>\n                                            {this.state.showCreateSuccess &&\n                                                <span className=\"insert-message\">Communications created successfully!</span>\n                                            }\n                                            {this.state.createErrorMessage &&\n                                                <span className=\"insert-message fail\">{this.state.createErrorMessage}</span>\n                                            }\n                                            {!this.state.createErrorMessage && !this.state.showCreateSuccess &&\n                                                <span>{this.state.selectedSession.label}</span>\n                                            }\n                                            {this.state.showDeleteSuccess &&\n                                                <span className=\"insert-message\">Communication was deleted successfully!</span>\n                                            }\n                                            {this.state.deleteFailureMessage &&\n                                                <span className=\"insert-message fail\">{this.state.deleteFailureMessage}</span>\n                                            }\n                                        </div>\n                                    ),\n                                    headerClassName: \"header-insert-dropdown\",\n                                    accessor: \"SessionID\",\n                                    sortable: false,\n                                    Cell: row => <span>{this.state.selectedSession.label}</span>\n                                }\n                            ]\n                        },\n                        {\n                            Header: 'Actions',\n                            headerClassName: \"submit-action\",\n                            sortable: false,\n                            filterable: false,\n                            columns: [\n                                {\n                                    Header: () => this.state.isAdding ?\n                                        <span><button className=\"button\" onClick={this.createComm} disabled={true}>Adding...</button></span>\n                                        :\n                                        <span><button className=\"button\" onClick={this.createComm} disabled={!this.state.commDate || !this.state.selectedChamber || !this.state.selectedSession}>Create</button></span>\n                                    ,\n                                    headerClassName: \"header-action\",\n                                    accessor: \"action\",\n                                    sortable: false,\n                                    className: \"action-column\",\n                                    width: 90,\n                                    Cell: row => {\n                                        return (\n                                            <div className=\"committee-action-column-two\">\n                                                <Link to={`/communications-management/edit-communication/${row.original.CommunicationID}`} className=\"icon edit\"></Link>\n                                                {row.original.IsPublic ?\n                                                    <Link target=\"_blank\" to={`/session-details/${this.state.selectedSession.SessionCode}/communications/${row.original.ReferenceNumber}`} className=\"icon book\"></Link>\n                                                    :\n                                                    <span onClick={() => this.deleteCommunication(row.index)} className=\"icon delete\"></span>\n                                                }\n                                            </div>\n                                        )\n                                    }\n                                }\n                            ]\n                        }\n                    ]}\n                    defaultPageSize={15}\n                    pageSizeOptions={[5, 10, 15, 20, 25, 50, 100]}\n                    className=\"committee-table -striped -highlight\"\n                />\n            </div>\n        )\n\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { session, communications, login } = state;\n        return {\n            session,\n            communications,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, communicationsActionCreators, authActionCreators), dispatch)\n        }\n    }\n)(CommunicationsManagementGrid)","export default __webpack_public_path__ + \"static/media/houseclerk_paulnardo.489d8f4a.png\";","import React from 'react';\nimport moment from 'moment-timezone'\nimport { Link } from 'react-router-dom';\nimport houseSig from '../../images/houseclerk_paulnardo.png';\nimport senateSig from '../../images/senateclerk_susanclarkeschaar.png';\n\nimport renderHTML from 'react-render-html';\n\nconst Communication = props => {\n    //Only display the legislation that is marked as active\n    const onlyActive = props.comm.CommunicationLegislation.filter(leg => leg.IsActive);\n    const legList = onlyActive.map(leg => {\n        leg.ChamberCode = leg.ChamberCode ?? leg.LegislationNumber[0];\n        leg.Patrons?.sort((a, b) => a.ChamberCode !== b.ChamberCode ? a.ChamberCode !== leg.ChamberCode ? 1 : -1 : a.Sequence - b.Sequence || a.PatronTypeID - b.PatronTypeID || a.PatronDisplayName.localeCompare(b.PatronDisplayName));\n        const patronList = leg.Patrons?.map((patron, patronIndex) => {\n            let sameAsPrevious = patronIndex === 0 ? true : (!leg.Patrons[patronIndex - 1] && patron.ChamberCode === leg.ChamberCode && !leg.Patrons.find(p => p.ChamberCode !== leg.ChamberCode)) || (leg.Patrons[patronIndex - 1] && patron.ChamberCode === leg.Patrons[patronIndex - 1].ChamberCode);\n            let sameAsNext = leg.Patrons[patronIndex + 1] && patron.ChamberCode === leg.Patrons[patronIndex + 1].ChamberCode;\n            let patronDisplayName = patron.PatronDisplayName\n\n            return (\n                <React.Fragment key={patronIndex}>\n                    {patron.ChamberCode !== leg.ChamberCode\n                        ? patronIndex !== leg.Patrons.length - 1\n                            ? leg.ChamberCode === \"S\"\n                                ? !sameAsPrevious ? (patronIndex !== 0 ? \"; \" : \"\") + \"Delegates: \" + patronDisplayName + \", \" : sameAsNext ? patronDisplayName + \", \" : patronDisplayName\n                                : !sameAsPrevious ? (patronIndex !== 0 ? \"; \" : \"\") + \"Senators: \" + patronDisplayName + \", \" : sameAsNext ? patronDisplayName + \", \" : patronDisplayName\n                            : leg.ChamberCode === \"S\"\n                                ? !sameAsPrevious ? (patronIndex !== 0 ? \"; \" : \"\") + \"Delegate: \" + patronDisplayName : patronDisplayName\n                                : !sameAsPrevious ? (patronIndex !== 0 ? \"; \" : \"\") + \"Senator: \" + patronDisplayName : patronDisplayName\n                        : sameAsNext\n                            ? patronDisplayName + \", \" : patronDisplayName\n                    }\n                </React.Fragment>\n            )\n        })\n\n\n        let legNumber = leg.LegislationNumber;\n        //Add dots in between the characters because that is how they want it displayed\n        const billType = legNumber.slice(0, 2);\n        const numbers = legNumber.slice(2);\n        legNumber = billType.split('').map(char => {\n            char += '.'\n            // Senate Joint and House Joint Resolutions are displayed as 'H.J.R.' and 'S.J.R.' on this page rather than 'HJ' and 'SJ'\n            // If the bill has a 'J' in the bill number then it is a joint resolution\n            if (char === 'J.') {\n                char += 'R.'\n            }\n            return char;\n        }).join('');\n        legNumber += ' ' + numbers;\n\n        let billLink = '<strong><a className=\"bill-number\" target=\"_blank\" href=/bill-details/' + props.session.SessionCode + '/' + leg.LegislationNumber + '>' + legNumber + '</a></strong>';\n        let draftTitle = leg.DraftTitle;\n\n        if (draftTitle && draftTitle.indexOf(\"<p class=ldtitle>\") > -1) {\n            draftTitle = draftTitle.slice(0, 17) + billLink + \" \" + draftTitle.slice(17, draftTitle.length + 1)\n        }\n        else if (draftTitle && draftTitle.indexOf(\"<p class=ldtitle>\") == -1) {\n            draftTitle = \"<p class=ldtitle>\" + billLink + \" \" + draftTitle + \"</p>\"\n        }\n\n        const removeLDNum = (draftTitle) => draftTitle.replace(/<p class=ldrt>\\d+D<\\/p>/, \"\");\n\n        return (\n            <div key={leg.LegislationNumber}>\n                <div className=\"list-desc\">\n                    <div>\n                        <div className=\"comm-leg-wrapper\">\n                            {!draftTitle &&\n                                <strong>\n                                    <Link className=\"bill-number\" target=\"_blank\" to={`/bill-details/${props.session.SessionCode}/${leg.LegislationNumber}`}>{legNumber}</Link>\n                                </strong>\n                            }\n                            {draftTitle && draftTitle.indexOf(billLink) < 0 &&\n                                <strong>\n                                    <Link className=\"bill-number\" target=\"_blank\" to={`/bill-details/${props.session.SessionCode}/${leg.LegislationNumber}`}>{legNumber}</Link>\n                                    {\" \"}\n                                </strong>\n                            }\n                            {draftTitle &&\n                                renderHTML(removeLDNum(draftTitle))\n                            }\n                        </div>\n                    </div>\n                    <div>\n                        <p>{leg.EffectiveType === \"Emergency\" && \"EMERGENCY\"}</p>\n                    </div>\n                    <div>\n                        <p>{leg.Patrons?.length > 1 ? 'Patrons' : 'Patron'} - {patronList}</p>\n                    </div>\n                </div>\n            </div>\n        );\n    });\n    if (legList.length > 0) {\n        const categoryStyle = {\n            fontSize: '18px',\n            color: '#315981'\n        }\n        return (\n            <div>\n                <br />\n                {props.comm.Description ? <p style={categoryStyle}>{props.comm.Description}</p> :\n                    <React.Fragment>\n                        {legList.length === 1 ?\n                            <p style={categoryStyle}>{props.comm.CategoryDescription}</p>\n                            :\n                            <p style={categoryStyle}>{props.comm.PluralDescription}</p>\n                        }\n                    </React.Fragment>\n                }\n                {legList}\n            </div>\n        );\n    } else {\n        return false;\n    }\n}\n\nclass CommunicationsDetailsComponent extends React.Component {\n\n    render() {\n        const { session, communication, refNum, authoring } = this.props;\n        const chamberCode = communication.ChamberCode;\n        const referenceNumber = refNum || communication.ReferenceNumber;\n        const date = communication.CommunicationDate;\n        const categories = communication.CommunicationCategories || [];\n\n        const committeeHeader = \"In the \" + (chamberCode === \"S\" ? \"Senate\" : \"House of Delegates\");\n        const sessionHeader = session.SessionYear + \" \" + session.DisplayName;\n        const floatRightStyle = {\n            float: 'right'\n        };\n        return (\n            <div className=\"bill-theme public-details inner-grid\">\n                <div>\n                    <h2>{sessionHeader}</h2>\n                </div>\n                <hr />\n                <div className='details-page-data-container'>\n                    <div className=\"communication-header-container\">\n                        <p>{referenceNumber}</p>\n                        <div style={floatRightStyle}>\n                            <p className=\"float-right\">{committeeHeader}</p>\n                            <p>{moment(date).format(\"MMMM DD, YYYY\")}</p>\n                        </div>\n                    </div>\n                    <div>\n                        {categories.length > 0 && categories.map(comm => <Communication key={comm.CommunicationCategoryID} comm={comm} session={session} />)}\n                    </div>\n                    <br />\n                    <div className=\"list-desc\">\n                        <p>{communication.ShowSignatureNote ? communication.FooterSentence : <pre>&emsp;</pre>}</p>\n                    </div>\n                    <div className=\"list-desc align-right\">\n                        {authoring &&\n                            <div style={{ width: \"100%\", height: \"105px\" }}>\n                                {chamberCode === \"H\"\n                                    /* Get image sizes from images themselves and set height/width */\n                                    ? <img style={{ width: \"394px\", height: \"104px\", float: \"right\", WebkitPrintColorAdjust: \"exact\" }} src={houseSig} />\n                                    : <img style={{ width: \"393px\", height: \"86px\", float: \"right\", WebkitPrintColorAdjust: \"exact\" }} src={senateSig} />\n                                }\n                            </div>\n                        }\n                        <p>{communication.ClerkName}</p>\n                        <p>{communication.ClerkTitle}</p>\n                    </div>\n                </div>\n            </div>\n        )\n    }\n}\n\nexport default CommunicationsDetailsComponent;\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYkAAABWCAMAAAANHJrBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURf////7+/v39/c3NzXNzc5KSklxcXF9fX7Ozs/Pz8/Ly8q6urjY2NgAAACoqKnh4eExMTB0dHQEBAZCQkIODgwQEBL29vfX19YKCgtfX12BgYF5eXrm5ufz8/G9vb2ZmZu/v79nZ2fDw8JaWlgMDA2xsbOPj46ampjIyMnt7e+vr6yAgICEhIeXl5Y2NjTExMW5ubggICKKionV1dczMzCYmJnZ2dj8/P11dXZWVlfr6+iwsLK+vr2dnZ/Hx8c/PzxYWFkhISPf397W1tTQ0NDs7O8HBwcLCwtjY2Dg4OAICAkRERLGxsbu7u7i4uMfHxyUlJRUVFRsbGwoKChQUFICAgPv7+wcHB+Dg4EJCQtbW1hcXF9/f34aGhi8vL+rq6llZWUVFRR8fH/n5+WNjY2traxAQEO7u7rKysoeHhxMTE7+/v+3t7SgoKA4ODp+fnz4+PmJiYn19fdLS0k5OTufn58vLy56entPT0wYGBsPDw5GRkXp6ere3txo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ksfBPRaugXnSClZnKNx0D4OrICfT0SuqNYTTZ7/ucXAZpJiwfPOFJmmwGGn3OLgUh+gThVGJQvB7XfeycB0abqyV09eg3XAVcP7zEnCvg38CpI2/wnPD5XCPwj8D5v7khivBQ0CJeyzccMMNN9xwww033HARhPh/aRW3DFxTkQEAAAAASUVORK5CYII=\"","import React from \"react\";\nimport Select from 'react-select';\nimport ReactTooltip from 'react-tooltip';\nimport renderHTML from 'react-render-html';\nimport { Link } from 'react-router-dom';\nimport { Editor } from '@tinymce/tinymce-react';\nimport stripTags from \"striptags\";\n\nclass BillsGrid extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectAllActive: false,\n            selectAllInactive: false,\n            newDescriptions: [],\n            lastCheckedBills: [],\n            textHeight: []\n        };\n        this.toggleSelectAll = this.toggleSelectAll.bind(this);\n        this.toggleRow = this.toggleRow.bind(this);\n        this.toggleBill = this.toggleBill.bind(this);\n        this.toggleEditCategoryDescription = this.toggleEditCategoryDescription.bind(this);\n        this.handleDescriptionChange = this.handleDescriptionChange.bind(this);\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.handleTitleChange = this.handleTitleChange.bind(this);\n    }\n\n    componentDidMount() {\n        this.props.organizedComms.forEach((_, index) => {\n            this.getCommunicationCategoryHeight(index)\n        })\n    }\n\n    componentDidUpdate(prevProps) {\n        if (this.props.organizedComms.map(c => c.CategoryCode) !== prevProps.organizedComms.map(c => c.CategoryCode)) {\n            this.props.organizedComms.forEach((_, index) => {\n                this.getCommunicationCategoryHeight(index)\n            })\n        }\n    }\n\n    toggleSelectAll(categoryIndex) {\n        let organizedComms = [...this.props.organizedComms];\n        const opposite = !organizedComms[categoryIndex].selectAll;\n        organizedComms[categoryIndex].selectAll = opposite\n        organizedComms[categoryIndex].CommunicationLegislation.forEach(leg => leg.checked = opposite);\n        this.props.updateAgenda(organizedComms);\n\n        let lastCheckedBills = this.state.lastCheckedBills;\n        lastCheckedBills[categoryIndex] = -1;\n        this.setState({\n            lastCheckedBills: lastCheckedBills\n        });\n    }\n\n    toggleRow(categoryIndex, itemIndex, e) {\n        let organizedComms = [...this.props.organizedComms];\n        let lastCheckedBills = this.state.lastCheckedBills;\n        let lastCheckedBill = lastCheckedBills[categoryIndex];\n        if (e.nativeEvent.shiftKey && !isNaN(lastCheckedBill) && lastCheckedBill !== -1) {\n            organizedComms[categoryIndex].CommunicationLegislation.forEach(item => item.checked = false);\n            for (let i = 0; i < Math.abs(itemIndex - lastCheckedBill); i++) {\n                const index = lastCheckedBill + i * (itemIndex - lastCheckedBill) / Math.abs(itemIndex - lastCheckedBill);\n                organizedComms[categoryIndex].CommunicationLegislation[index].checked = true;\n            }\n        } else {\n            lastCheckedBill = itemIndex;\n        }\n        organizedComms[categoryIndex].CommunicationLegislation[itemIndex].checked = !organizedComms[categoryIndex].CommunicationLegislation[itemIndex].checked;\n        this.props.updateAgenda(organizedComms);\n\n        lastCheckedBills[categoryIndex] = lastCheckedBill;\n        this.setState({\n            lastCheckedBills: lastCheckedBills\n        });\n    }\n\n    toggleBill(categoryIndex, itemIndex) {\n        let organizedComms = [...this.props.organizedComms];\n        organizedComms[categoryIndex].CommunicationLegislation[itemIndex].IsActive = !organizedComms[categoryIndex].CommunicationLegislation[itemIndex].IsActive;\n        organizedComms[categoryIndex].CommunicationLegislation[itemIndex].checked = false;\n        this.props.updateAgenda(organizedComms, true);\n    }\n\n    toggleBillBulk(activate, categoryIndex) {\n        let organizedComms = [...this.props.organizedComms];\n        organizedComms[categoryIndex].selectAll = false;\n        organizedComms[categoryIndex].CommunicationLegislation.forEach(leg => {\n            if (leg.checked) {\n                leg.IsActive = activate;\n                leg.checked = false;\n            }\n        });\n        this.props.updateAgenda(organizedComms, true);\n    }\n\n    toggleEditCategoryDescription(categoryIndex, save) {\n        const categories = [...this.props.organizedComms];\n        let category = categories.filter(c => !c.DeletionDate)[categoryIndex];\n        category.editing = !category.editing;\n        if (save) {\n            category.Description = category.tempDescription;\n        } else {\n            category.tempDescription = category.Description || (category.CommunicationLegislation.filter(leg => leg.IsActive).length > 1 ? category.PluralDescription : category.CategoryDescription);\n        }\n        this.props.updateAgenda(categories, save);\n    }\n\n    handleDescriptionChange(categoryIndex, val) {\n        let organizedComms = [...this.props.organizedComms];\n        organizedComms[categoryIndex].tempDescription = val;\n        this.props.updateAgenda(organizedComms);\n    }\n\n    handleTitleChange(categoryIndex, itemIndex, value) {\n        let organizedComms = [...this.props.organizedComms];\n        organizedComms[categoryIndex].CommunicationLegislation[itemIndex].newDraftTitle = stripTags(value);\n        this.props.updateAgenda(organizedComms);\n    }\n\n    getCommunicationCategoryHeight(category) {\n        const el = document.getElementsByClassName(\"category-description-\" + category);\n        if (el && el.length) {\n            //setting the overflow to scroll is used to accommodate firefox \n            //from firefox documentation: \"When an element's content does not generate a vertical scrollbar, then its scrollHeight property is equal to its clientHeight property.\"\n            const initialOverflow = el[0].style.overflow;\n            el[0].style.overflow = \"scroll\";\n            el[0].style.height = el[0].scrollHeight + \"px\";\n            el[0].style.overflow = initialOverflow;\n        }\n    }\n\n    toggleEdit(categoryIndex, agendaIndex) {\n        let categories = [...this.props.organizedComms];\n        //This key is used to tell the DOM whether to display an input or a span\n        categories.filter(c => !c.DeletionDate)[categoryIndex].CommunicationLegislation[agendaIndex].isEditing = !categories.filter(c => !c.DeletionDate)[categoryIndex].CommunicationLegislation[agendaIndex].isEditing;\n        //Create a key called newDraftTitle that will hold the text that  the user types in\n        categories.filter(c => !c.DeletionDate)[categoryIndex].CommunicationLegislation[agendaIndex].newDraftTitle = categories.filter(c => !c.DeletionDate)[categoryIndex].CommunicationLegislation[agendaIndex].DraftTitle;\n        this.props.updateAgenda(categories);\n    }\n\n    handleChange(categoryIndex, agendaIndex, e) {\n        let textHeight = [...this.state.textHeight];\n\n        //Init the nested height value if undefined at the category or agenda index\n        if (!textHeight[categoryIndex]) {\n            textHeight[categoryIndex] = {};\n            textHeight[categoryIndex].CommunicationLegislation = [];\n            textHeight[categoryIndex].CommunicationLegislation[agendaIndex] = {};\n            textHeight[categoryIndex].CommunicationLegislation[agendaIndex].height = '70px';\n        } else if (!textHeight[categoryIndex].CommunicationLegislation[agendaIndex]) {\n            textHeight[categoryIndex].CommunicationLegislation[agendaIndex] = {};\n            textHeight[categoryIndex].CommunicationLegislation[agendaIndex].height = '70px';\n        }\n\n        let height = (Math.round(e.target.value.length / 95) * 20 + 40) || 70;\n\n        textHeight[categoryIndex].CommunicationLegislation[agendaIndex].height = height.toString() + \"px\";\n\n        let categories = [...this.props.organizedComms];\n\n        categories.filter(c => !c.DeletionDate)[categoryIndex].CommunicationLegislation[agendaIndex].newDraftTitle = e.target.value;\n\n        this.props.updateAgenda(categories);\n\n        this.setState({\n            textHeight: textHeight\n        })\n    }\n\n    saveChange(categoryIndex, agendaIndex) {\n        //Turn input back into span\n        let categories = [...this.props.organizedComms];\n        categories.filter(c => !c.DeletionDate)[categoryIndex].CommunicationLegislation[agendaIndex].isEditing = false;\n        //Set description to the text that the user has typed in. If new description is null then set it to the current description\n        categories.filter(c => !c.DeletionDate)[categoryIndex].CommunicationLegislation[agendaIndex].DraftTitle = categories.filter(c => !c.DeletionDate)[categoryIndex].CommunicationLegislation[agendaIndex].newDraftTitle;\n        this.props.updateAgenda(categories, true);\n    }\n\n    render() {\n        // The button will read 'Add' if the bill is not already part of a category. The button will read 'Move' if it is already part of a category.\n        const billButtonText = (index) => {\n            let billExists = false;\n            if (this.props.selectedBill[index]) {\n                this.props.organizedComms.some(category => {\n                    if (category.CommunicationLegislation.findIndex(bill => bill.LegislationID === this.props.selectedBill[index].LegislationID) >= 0) {\n                        billExists = true;\n                        return true;\n                    }\n                });\n                if (billExists) {\n                    return (\"Move\");\n                }\n            }\n            return (\"Add\");\n        }\n\n        const customFilter = (option, searchText) => {\n            // regex that matches all zeros and white space that is preceded by two letters (e.g. SC) and followed by a group of numbers.\n            // The purpose is to remove all leading zeros and white space from the user types in and the option label\n            try {\n                const regexp = new RegExp(\"(?<=[a-z]{2})[0\\s]+(?=[1-9][0-9]*)\", \"ig\")\n                const newLabel = option.label.toLowerCase().replace(regexp, \"\");\n                const newSearchText = searchText.toLowerCase().replace(regexp, \"\");\n                if (option.label.toLowerCase().includes(searchText.toLowerCase()) || newLabel.includes(newSearchText)) {\n                    return true;\n                }\n            }\n            catch (e) {\n                // Safari does not allow lookback regex (i.e. the '?<=' above), so we must handle it differently\n                // however, the below code will remove trailing zeros (i.e. searching 'HC11' will filter both 'HC0011' and 'HC1001'), so we want to at least try the above code first\n                if (e instanceof SyntaxError) {\n                    const regexp = new RegExp(\"(?![a-z]{2})[0\\s]+(?=[1-9][0-9]*)\", \"ig\")\n                    const newLabel = option.label.toLowerCase().replace(regexp, \"\");\n                    const newSearchText = searchText.toLowerCase().replace(regexp, \"\");\n                    if (option.label.toLowerCase().includes(searchText.toLowerCase()) || newLabel.includes(newSearchText)) {\n                        return true;\n                    }\n                } else {\n                    console.log(e.message)\n                }\n            }\n        };\n\n        const removeLDNum = (draftTitle) => draftTitle.replace(/<p class=ldrt>\\d+D<\\/p>/, \"\");\n\n        return (\n            <div className=\"drag-container\">\n                <div className=\"align-right grid-wrapper eight-and-one\" style={{ alignItems: 'end' }}>\n                    <Select\n                        className=\"grid-selector-dropdown inline-dropdown\"\n                        classNamePrefix=\"grid-selector-dropdown\"\n                        options={this.props.communicationCategories}\n                        value={this.props.selectedCategory}\n                        onChange={this.props.changeCategoryDropdown}\n                        styles={{ menu: provided => ({ ...provided, whiteSpace: 'nowrap', right: '0', zIndex: 3 }), option: provided => ({ ...provided, whiteSpace: 'pre-wrap', overflow: 'hidden', textOverflow: 'ellipsis', borderBottom: '1px solid #DDD' }) }}\n                        getOptionLabel={(option) => option.CategoryCode + \": \" + option.label}\n                        filterOption={customFilter}\n                    />\n                    <button type=\"button\" className=\"button m-left\" disabled={!this.props.selectedCategory} onClick={this.props.addCategory}>Add Category</button>\n                </div>\n                <div style={{ marginTop: 15 }}>\n                    <div className=\"bill-grid communications-category-grid\">\n                        <div className=\"bill-grid-header\">\n                            <span></span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Bill #</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Document Label</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Patron</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Draft Title</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Status</span>\n                        </div>\n                        <div className=\"bill-grid-header\">\n                            <span>Action</span>\n                        </div>\n                    </div>\n                    <div>\n                        {this.props.organizedComms.sort((a, b) => a.Sequence - b.Sequence).map((category, categoryIndex) =>\n                            <div>\n                                <form key={categoryIndex}>\n                                    <div className=\"bill-grid communications-category-grid communications-category-grid-header\">\n                                        <div>\n                                            <button onClick={() => this.props.toggleHideCategory(categoryIndex)} type=\"button\" className={`${this.props.hideCategories[categoryIndex] ? \"arrow-down\" : \"arrow-up\"}`}></button>\n                                            <input\n                                                type=\"checkbox\"\n                                                className=\"checkbox\"\n                                                checked={category.selectAll || ''}\n                                                onChange={() => this.toggleSelectAll(categoryIndex)}\n                                            />\n                                        </div>\n                                        <div>\n                                            <span>\n                                                {category.editing ?\n                                                    <React.Fragment>\n                                                        <textarea\n                                                            className={`category-description-${categoryIndex}`}\n                                                            style={{ width: '90%', fontSize: '0.9em' }}\n                                                            type=\"text\"\n                                                            onChange={(e) => this.handleDescriptionChange(categoryIndex, e.target.value)}\n                                                            value={category.tempDescription}\n                                                        />\n                                                        <a className=\"icon save\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryDescription(categoryIndex, true)} />\n                                                        <a className=\"icon delete\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryDescription(categoryIndex)} />\n                                                    </React.Fragment>\n                                                    :\n                                                    <React.Fragment>\n                                                        <b>{category.CategoryCode + \": \" + (category.Description ? category.Description : category.CommunicationLegislation.filter(leg => leg.IsActive).length > 1 ? category.PluralDescription : category.CategoryDescription)}</b>\n                                                        <a className=\"icon edit\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditCategoryDescription(categoryIndex)} />\n                                                    </React.Fragment>\n                                                }\n                                            </span>\n                                        </div>\n                                        <div>\n                                            <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(false, categoryIndex)}>Exclude Selected</button>\n                                        </div>\n                                        <div>\n                                            <button type=\"button\" className=\"button small-button\" onClick={() => this.toggleBillBulk(true, categoryIndex)}>Include Selected</button>\n                                        </div>\n                                        <div />\n                                        <div />\n                                    </div>\n                                    {!this.props.hideCategories[categoryIndex] && <div className=\"bill-grid communications-category-grid\">\n                                        <div></div>\n                                        <div>\n                                            <Select\n                                                className=\"grid-selector-dropdown\"\n                                                classNamePrefix=\"grid-selector-dropdown\"\n                                                options={this.props.billList}\n                                                onChange={(value) => this.props.changeBillDropdown(categoryIndex, value)}\n                                                value={this.props.selectedBill[categoryIndex]}\n                                                styles={{ menu: provided => ({ ...provided, zIndex: 3 }) }}\n                                                filterOption={(bill, inputValue) => {\n                                                    if (category.CommunicationLegislation.findIndex(agenda => agenda.LegislationID === bill.value) < 0) {\n                                                        return bill.label.toLowerCase().includes(inputValue.toLowerCase());\n                                                    } else { return false; }\n                                                }}\n                                            />\n                                        </div>\n                                        <div className=\"center\">\n                                            <button\n                                                className=\"button\"\n                                                type=\"button\"\n                                                disabled={!this.props.selectedBill[categoryIndex]}\n                                                onClick={() => this.props.addBill(categoryIndex)}>\n                                                {billButtonText(categoryIndex)}\n                                            </button>\n                                        </div>\n                                        <div></div>\n                                        <div></div>\n                                        <div></div>\n                                        <div></div>\n                                    </div>\n                                    }\n                                    {\n                                        !this.props.hideCategories[categoryIndex] && category.CommunicationLegislation.sort((a, b) => a.LegislationNumber.localeCompare(b.LegislationNumber, 'en', { numeric: true })).map((item, itemIndex) => {\n                                            const showNewIndicator = !item.CommunicationLegislationID && category.CommunicationCategoryID;\n                                            const existsInMultipleCategories = this.props.organizedComms.find(c => c.CommunicationCategoryTypeID !== category.CommunicationCategoryTypeID && c.CommunicationLegislation.find(a => a.LegislationNumber === item.LegislationNumber));\n                                            return (\n                                                <div style={!item.IsActive ? { color: '#8b8b8b' } : {}} className=\"bill-grid communications-category-grid\" key={itemIndex}>\n                                                    <React.Fragment>\n                                                        <div>\n                                                            <input\n                                                                type=\"checkbox\"\n                                                                className=\"checkbox\"\n                                                                checked={item.checked || ''}\n                                                                onChange={e => this.toggleRow(categoryIndex, itemIndex, e)} />\n                                                        </div>\n                                                        <div className=\"new-container\">\n                                                            {existsInMultipleCategories &&\n                                                                <React.Fragment>\n                                                                    <i data-tip=\"This legislation exists in multiple categories.\" className={`icon notification communication-authoring${showNewIndicator ? ' new' : ''}`} />\n                                                                    <ReactTooltip key={new Date()} />\n                                                                </React.Fragment>\n                                                            }\n                                                            <Link to={`/bill-details/${this.props.sessionCode}/${item.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\" style={!item.IsActive ? { color: 'inherit' } : {}}>{item.LegislationNumber}</Link>\n                                                            {showNewIndicator && <span className='corner-new'>NEW</span>}\n                                                            {!item.IsCandidate && <i data-tip=\"This legislation is not currently a candidate for this category.\" className={`icon notification non-candidate communication-authoring${showNewIndicator ? ' new' : ''}${existsInMultipleCategories ? ' duplicate' : ''}`} />}\n                                                            <ReactTooltip />\n                                                        </div>\n                                                        <div>\n                                                            <span>{item.DocumentCode}</span>\n                                                        </div>\n                                                        <div>\n                                                            <span>{item.Patrons && item.Patrons[0] && item.Patrons[0].PatronDisplayName}</span>\n                                                        </div>\n                                                        <div>\n                                                            <div className=\"flex-row\" style={{ display: 'flex' }}>\n                                                                <div className=\"flex-row flex-vertical-center\" style={{ width: \"100%\", display: \"inline-flex\" }}>\n                                                                    {item.isEditing ?\n                                                                        <Editor\n                                                                            init={{\n                                                                                inline: true,\n                                                                                toolbar: false,\n                                                                                menubar: false\n                                                                            }}\n                                                                            onEditorChange={(content) => this.handleTitleChange(categoryIndex, itemIndex, content)}\n                                                                            value={item.newDraftTitle}\n                                                                        />\n                                                                        :\n                                                                        <span>{renderHTML(item.Description ? item.Description : item.newDraftTitle ? removeLDNum(item.newDraftTitle) : item.DraftTitle ? removeLDNum(item.DraftTitle) : \"\")}</span>}\n                                                                </div>\n                                                                {(item.isEditing || (!item.Description && item.DraftTitle)) &&\n                                                                    <React.Fragment>\n                                                                        <div className=\"bill-grid-actions\">\n                                                                            {item.isEditing\n                                                                                ?\n                                                                                <div className=\"bill-grid-actions\" style={{ display: \"inline-flex\" }}>\n                                                                                    <button onClick={() => this.saveChange(categoryIndex, itemIndex)} type=\"button\" className=\"icon save float-right\"></button>\n                                                                                    <button onClick={() => this.toggleEdit(categoryIndex, itemIndex)} type=\"button\" className=\"icon delete float-right\"></button>\n                                                                                </div>\n                                                                                :\n                                                                                <div className=\"bill-grid-actions\">\n                                                                                    {/*Allow edit if the item IsActive*/}\n                                                                                    {item.IsActive &&\n                                                                                        <button onClick={() => this.toggleEdit(categoryIndex, itemIndex)} type=\"button\" className=\"icon edit float-right\"></button>\n                                                                                    }\n                                                                                </div>\n                                                                            }\n                                                                        </div>\n                                                                    </React.Fragment>\n                                                                }\n                                                            </div>\n                                                        </div>\n                                                        <div>\n                                                            <span className={item.IsActive ? 'message-success' : ''}>{item.IsActive ? 'Included' : 'Not Included'}</span>\n                                                        </div>\n                                                        <div className=\"communication-bill-grid-actions\">\n                                                            <div className=\"toggle-switch\" onClick={() => this.toggleBill(categoryIndex, itemIndex)}>\n                                                                <input id=\"sr-status-change\" checked={item.IsActive} type=\"checkbox\" />\n                                                                <span className=\"slider\"></span>\n                                                            </div>\n                                                        </div>\n                                                    </React.Fragment>\n                                                </div>\n                                            )\n                                        }\n                                        )\n                                    }\n                                </form>\n                            </div>\n                        )}\n                    </div>\n                </div>\n            </div >\n        );\n    }\n}\n\nexport default BillsGrid;","import React from 'react';\nimport ReactToPrint from \"react-to-print\";\nimport CommunicationsDetailsComponent from '../../../lis-shared/lis-communications/lis-communications-details';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { minutesActionCreators } from '../../../stores/lis-minutes-store';\nimport { communicationsActionCreators } from '../../../stores/lis-communications-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport BillsGrid from './lis-bills-grid';\nimport { cancelRequest } from '../../../services/request.service';\nimport DatePicker from 'react-datepicker';\nimport moment from 'moment-timezone';\nimport { personnelActionCreators } from '../../../stores/lis-personnel-store';\nimport { Prompt } from 'react-router';\nconst PUBLISH_COMM = true;\nconst SAVE_COMM = false;\nlet abortController = null;\n\nclass CommunicationsForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            communicationCategories: [],\n            organizedComms: [],\n            hideCategories: [],\n            commGet: '',\n            isLoaded: false,\n            errorMessage: '',\n            isSaving: false,\n            pendingSave: true,\n            showPreview: false,\n            selectedCategory: '',\n            selectedBill: [],\n            billList: [],\n            referenceNumber: '',\n            failedToJoinBills: [],\n            isDirty: false,\n            isDoubleSided: false\n        };\n\n        this.handleInputChange = this.handleInputChange.bind(this);\n        this.updateAgenda = this.updateAgenda.bind(this);\n        this.changeCategoryDropdown = this.changeCategoryDropdown.bind(this);\n        this.addCategory = this.addCategory.bind(this);\n        this.changeBillDropdown = this.changeBillDropdown.bind(this);\n        this.addBill = this.addBill.bind(this);\n\n        this.togglePreview = this.togglePreview.bind(this);\n        this.saveComm = this.saveComm.bind(this);\n        this.genCommDoc = this.genCommDoc.bind(this);\n        this.hasSelectedBills = this.hasSelectedBills.bind(this);\n        this.hasIncludedBills = this.hasIncludedBills.bind(this);\n        this.toggleShowSignatureNote = this.toggleShowSignatureNote.bind(this);\n        this.includeAll = this.includeAll.bind(this);\n        this.validateCommunicationNumber = this.validateCommunicationNumber.bind(this);\n        this.toggleHideCategory = this.toggleHideCategory.bind(this);\n        this.toggleIsDoubleSided = this.toggleIsDoubleSided.bind(this);\n    }\n\n    toggleHideCategory(catIndex) {\n        let hideCategories = this.state.hideCategories;\n        hideCategories[catIndex] = !hideCategories[catIndex]\n        this.setState({\n            hideCategories: hideCategories\n        });\n    }\n\n    handleInputChange(key, val) {\n        let commGet = { ...this.state.commGet };\n        commGet[key] = val;\n        this.setState({\n            commGet: commGet,\n            isDirty: true\n        }, () => {\n            this.validateCommunicationNumber();\n            //Update ref number with new comm date and comm number\n            const data = this.state.commGet;\n            let newReferenceNumber = data.ChamberCode + 'N';\n            newReferenceNumber += data.CommunicationNumber.toString();\n            let formattedDate = moment(data.CommunicationDate).format('MMDD');\n            newReferenceNumber += formattedDate;\n            this.setState({\n                referenceNumber: newReferenceNumber\n            });\n        });\n    }\n\n    updateAgenda(organizedComms, saveRequired) {\n        this.setState({\n            organizedComms: organizedComms,\n            isDirty: true,\n            pendingSave: saveRequired === undefined ? this.state.pendingSave : saveRequired\n        });\n    }\n\n    togglePreview() {\n        this.setState(state => ({\n            showPreview: !state.showPreview\n        }));\n    }\n\n    saveComm(publishing) {\n        if (!this.state.commGet.CommunicationNumber) {\n            return;\n        }\n        this.setState({ isSaving: true });\n        let commSave = { ...this.state.commGet };\n        commSave.CommunicationCategories = this.state.organizedComms;\n        commSave.ReferenceNumber = this.state.referenceNumber || commSave.ReferenceNumber;\n        //Set whether it should be published or not. The published value depends on what button the user clicked\n        commSave.IsPublic = publishing;\n        this.props.actions.saveComm({ CommunicationResponse: [commSave] })\n            .then(failureMessage => {\n                if (publishing) {\n                    const commId = this.props.communications.commSave.CommunicationID;\n                    this.props.actions.saveCommFile(\"?communicationID=\" + commId);\n                    //Communications cannot be edited once published so send the user back to the grid\n                    this.props.history.push('/communications-management');\n                } else {\n                    //If the form was not published then get the new mod dates and update the React state variables\n                    const commSave = { ...this.props.communications.commSave };\n\n                    commSave.FooterSentence = this.props.communications.commSave.ChamberCode === \"S\" ? \"IN WHICH ACTION IT REQUESTS THE CONCURRENCE OF THE HOUSE OF DELEGATES.\" : \"IN WHICH ACTION IT REQUESTS THE CONCURRENCE OF THE SENATE.\";\n                    commSave.ClerkTitle = this.props.communications.commSave.ChamberCode === \"H\" ? \"Clerk of the House of Delegates\" : \"Clerk of the Senate\";\n                    commSave.ClerkName = this.props.personnel.personnelOtherList ? this.props.personnel.personnelOtherList[0].FullName : \"\";\n\n                    this.setState({\n                        organizedComms: commSave.CommunicationCategories,\n                        commGet: commSave,\n                        isSaving: false,\n                        pendingSave: false,\n                        isDirty: false\n                    });\n                }\n                if (failureMessage && failureMessage.includes(\"Minutes\")) {\n                    this.props.actions.makeToast([{ message: `Communication ${publishing ? 'Published' : 'Saved'}`, type: \"success\" }, { message: \"Problem with Minutes Creation\", type: \"failure\" }])\n                } else {\n                    this.props.actions.makeToast([{ message: `Communication ${publishing ? 'Published' : 'Saved'}`, type: \"success\" }])\n                }\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n                this.setState({\n                    isSaving: false\n                });\n                this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n            });\n\n    }\n\n    validateCommunicationNumber() {\n        this.setState({ duplicateCommNumber: this.state.commNumbers.find(n => n === this.state.commGet.CommunicationNumber) });\n    }\n\n    changeCategoryDropdown(value) {\n        this.setState({\n            selectedCategory: value\n        });\n    }\n\n    addCategory() {\n        const selectedCategory = this.state.selectedCategory;\n        //Used to find the new index of the category so the hidden categories indices can be updated\n        const categoryFinder = new Date().getTime();\n        let organizedComms = [...this.state.organizedComms];\n        let newCommCategory = {\n            CommunicationLegislation: [],\n            IsLegislationCategory: selectedCategory.IsLegislationCategory,\n            CommunicationCategoryTypeID: selectedCategory.CommunicationCategoryTypeID,\n            CategoryCode: selectedCategory.CategoryCode,\n            CategoryDescription: selectedCategory.Description,\n            PluralDescription: selectedCategory.PluralDescription,\n            Sequence: selectedCategory.Sequence,\n            isNewCategory: categoryFinder\n        };\n        //push new category\n        organizedComms.push(newCommCategory);\n        //Sort the communication by sequence\n        organizedComms.sort((a, b) => a.Sequence - b.Sequence);\n        //Update the categories that are hidden since the array indices have changed\n        const newCategoryIndex = organizedComms.filter(c => !c.DeletionDate).findIndex(cat => cat.isNewCategory === categoryFinder);\n        if (newCategoryIndex !== -1) {\n            let hideCategories = this.state.hideCategories;\n            hideCategories.splice(newCategoryIndex, 0, false);\n            this.setState({\n                hideCategories: hideCategories\n            });\n        }\n        //Remove the selected category so the user doesn't accidently add it twice\n        this.setState({\n            selectedCategory: '',\n            organizedComms: organizedComms,\n            isDirty: true\n        });\n    }\n\n    changeBillDropdown(index, value) {\n        let selectedBill = [...this.state.selectedBill];\n        selectedBill[index] = value;\n        this.setState({\n            selectedBill: selectedBill\n        });\n    }\n\n    addBill(index) {\n        let organizedComms = [...this.state.organizedComms];\n        let newAgenda = {};\n        //Check whether to move the bill from another category or add the bill\n        let billExists = false;\n        if (this.state.selectedBill[index]) {\n            organizedComms.some((category, categoryIndex) => {\n                const duplicateBillIndex = category.CommunicationLegislation.findIndex(bill => bill.LegislationID === this.state.selectedBill[index].LegislationID);\n                if (duplicateBillIndex >= 0) {\n                    billExists = true;\n                    newAgenda = { ...organizedComms[categoryIndex].CommunicationLegislation[duplicateBillIndex] };\n                    newAgenda.CommunicationCategoryTypeID = organizedComms[index].CommunicationCategoryTypeID;\n                    newAgenda.CommunicationCategoryID = organizedComms[index].CommunicationCategoryID;\n                    newAgenda.IsActive = true;\n                    newAgenda.IsCandidate = false;\n                    organizedComms[categoryIndex].CommunicationLegislation.splice(duplicateBillIndex, 1);\n                    return true;\n                }\n            });\n            if (!billExists) {\n                newAgenda = {\n                    CommunicationCategoryTypeID: organizedComms[index].CommunicationCategoryTypeID,\n                    CommunicationCategoryID: organizedComms[index].CommunicationCategoryID,\n                    IsActive: true,\n                    LegislationID: this.state.selectedBill[index].LegislationID,\n                    LegislationNumber: this.state.selectedBill[index].LegislationNumber,\n                    Patrons: this.state.selectedBill[index].Patrons,\n                    Description: this.state.selectedBill[index].Description,\n                    IsCandidate: false\n                }\n            }\n            organizedComms[index].CommunicationLegislation.push(newAgenda);\n\n            //Remove object so the bill is no longer currently selected in the dropdown\n            let selectedBill = [...this.state.selectedBill];\n            selectedBill[index] = '';\n            this.setState({\n                selectedBill: selectedBill,\n                organizedComms: organizedComms,\n                isDirty: true\n            });\n        }\n    }\n\n    genCommDoc(printAllIncluded) {\n        let billsToGen = [];\n        this.state.organizedComms.forEach(category => {\n            const associatedCategory = this.state.communicationCategories.find(c => c.CategoryCode === category.CategoryCode);\n            category.CommunicationLegislation.forEach(item => {\n                //if user clicked \"Print all included\", push all items that are active (i.e. included)\n                //if user clicked \"Print selected\", push all items that are checked\n                if (printAllIncluded && item.IsActive) {\n                    billsToGen.push({\n                        billNum: item.LegislationNumber,\n                        LegislationTextID: item.LegislationTextID,\n                        LegislationID: item.LegislationID,\n                        CommunicationID: this.state.commGet.CommunicationID,\n                        SessionID: this.state.commGet.SessionID,\n                        AmendmentCount: associatedCategory ? associatedCategory.AmendmentCount : null,\n                        FirstChamberCount: associatedCategory ? associatedCategory.FirstChamberCount : null,\n                        SecondChamberCount: associatedCategory ? associatedCategory.SecondChamberCount : null\n                    })\n                }\n                else if (!printAllIncluded && item.checked) {\n                    billsToGen.push({\n                        billNum: item.LegislationNumber,\n                        LegislationTextID: item.LegislationTextID,\n                        LegislationID: item.LegislationID,\n                        CommunicationID: this.state.commGet.CommunicationID,\n                        SessionID: this.state.commGet.SessionID,\n                        AmendmentCount: associatedCategory ? associatedCategory.AmendmentCount : null,\n                        FirstChamberCount: associatedCategory ? associatedCategory.FirstChamberCount : null,\n                        SecondChamberCount: associatedCategory ? associatedCategory.SecondChamberCount : null\n                    });\n                }\n            });\n        });\n        this.setState({\n            gettingPdf: true,\n            failedToJoinBills: [],\n            pdfSrc: ''\n        });\n        this.props.actions.joinCommFile({ LegislationFiles: billsToGen, isDoubleSided: this.state.isDoubleSided })\n            .then(() => {\n                const res = this.props.communications.joinCommFile;\n                if (res.Pdf && res.Pdf.FileContents) {\n                    fetch(`data:application/pdf;base64,${res.Pdf.FileContents}`)\n                        .then(res => res.blob())\n                        .then(blob => {\n                            const urlObj = URL.createObjectURL(blob);\n                            this.setState({\n                                pdfSrc: urlObj\n                            });\n                        });\n                }\n                let failedBills = [];\n                res.JoinLegislation.forEach(leg => {\n                    if (!leg.Generated && !res.JoinLegislation.find(l => l.LegislationID === leg.LegislationID && l.Generated)) {\n                        const bill = billsToGen.find(bill => bill.LegislationTextID === leg.LegislationTextID || bill.LegislationID === leg.LegislationID)\n                        if (bill && !failedBills.includes(bill)) {\n                            failedBills.push(bill)\n                        }\n                    }\n                });\n\n                if (failedBills.length === billsToGen.length) {\n                    // Every single bill in the list does not have a clerk copy\n                    this.props.actions.makeToast([{ message: \"No selected bills have a clerk copy\", type: \"failure\", long: true }]);\n                    this.setState({\n                        gettingPdf: false\n                    });\n                } else {\n                    this.setState({\n                        failedToJoinBills: failedBills,\n                        showPdfWindow: true,\n                        gettingPdf: false\n                    });\n                }\n            }).catch(err => {\n                if (err === 'AbortError') {\n                    return;\n                }\n                this.setState({\n                    gettingPdf: false\n                });\n                console.log(err.toString());\n                this.props.actions.makeToast([{ message: \"Failed To Get Data\", type: \"failure\" }]);\n            })\n    }\n\n    hasSelectedBills() {\n        let hasSelectedBills = false;\n        this.state.organizedComms.forEach(category => {\n            category.CommunicationLegislation.forEach(item => {\n                if (item.checked) { hasSelectedBills = true; return }\n            })\n        })\n\n        return hasSelectedBills;\n    }\n\n    hasIncludedBills() {\n        let hasIncludedBills = false;\n        this.state.organizedComms.forEach(category => {\n            category.CommunicationLegislation.forEach(item => {\n                if (item.IsActive) { hasIncludedBills = true; return }\n            })\n        })\n\n        return hasIncludedBills;\n\n    }\n\n    includeAll() {\n        let organizedComms = [...this.state.organizedComms]\n        organizedComms.forEach(category => {\n            category.selectAll = false;\n            category.CommunicationLegislation.forEach(item => {\n                item.IsActive = true;\n                item.checked = false;\n            })\n        })\n\n        this.updateAgenda(organizedComms);\n    }\n\n    toggleShowSignatureNote() {\n        let commGet = { ...this.state.commGet };\n        commGet.ShowSignatureNote = !commGet.ShowSignatureNote;\n        this.setState({\n            commGet: commGet\n        })\n    }\n\n    toggleIsDoubleSided() {\n        this.setState({\n            isDoubleSided: !this.state.isDoubleSided\n        })\n    }\n\n    componentDidMount() {\n        //Get the list of bills for the form\n        const communicationsId = this.props.match.params.communicationid\n        this.props.actions.getComm('?communicationID=' + communicationsId, true)\n            .then(() => {\n                const commGet = { ...this.props.communications.commGet };\n                if (!commGet.CommunicationCategories) {\n                    throw 'No categories in communication';\n                }\n                let noSavedItems = true;\n                //bills are added to the communication by default so set IsActive to true for all of them\n                commGet.CommunicationCategories.forEach(category => {\n                    category.CommunicationLegislation.forEach(leg => {\n                        if (leg.IsActive === undefined) {\n                            leg.IsActive = true;\n                        }\n                        if (leg.CommunicationLegislationID) {\n                            noSavedItems = false;\n                        }\n                    })\n                });\n                // Get the list of communication categories\n                this.props.actions.getCommCategories('?chamberCode=' + commGet.ChamberCode)\n                    .then(() => {\n                        let catList = [...this.props.communications.commCategories];\n                        catList.forEach(cat => {\n                            cat.label = cat.Description;\n                            cat.value = cat.CommunicationCategoryTypeID;\n                        });\n                        this.setState({\n                            communicationCategories: catList\n                        });\n                    });\n                //Get the list of existing communications so we know communication numbers (to alert user in the event they change the number to a duplicate)\n                const commParams = '?sessionID=' + commGet.SessionID + '&chamberCode=' + commGet.ChamberCode + '&isPublic=false&communicationType=Floor';\n                this.props.actions.getCommList(commParams, true)\n                    .then(() => {\n                        const commNumbers = this.props.communications.commList.filter(comm => comm.CommunicationID !== commGet.CommunicationID && moment(comm.CommunicationDate).isSame(commGet.CommunicationDate, 'day')).map(comm => comm.CommunicationNumber);\n                        this.setState({\n                            commNumbers: commNumbers,\n                            duplicateCommNumber: commNumbers.find(n => n === commGet.CommunicationNumber)\n                        });\n                    });\n\n                //Get bills in the session for the bill dropdown\n                this.props.actions.getSessionBills('?sessionID=' + commGet.SessionID)\n                    .then(() => {\n                        let billList = [...this.props.bills.sessionBills];\n                        billList.forEach(bill => {\n                            bill.label = bill.LegislationNumber;\n                            bill.value = bill.LegislationID;\n                        });\n                        this.setState({\n                            billList: billList\n                        })\n                    });\n\n                this.props.actions.getRoleTypes()\n                    .then(() => {\n                        let roleType = this.props.personnel.roleTypes.find(x => x.Name.toLowerCase().includes(\"clerk\") && x.Name.toLowerCase().includes(this.props.communications.commGet.ChamberCode === \"H\" ? \"house\" : \"senate\"))\n                        let clerkRoleTypeID = roleType ? roleType.StaffRoleTypeID : 0;\n                        this.props.actions.getPersonnelList(\"staffroletypeid=\" + clerkRoleTypeID + \"&isPublic=true\")\n                            .then(() => {\n                                commGet.FooterSentence = this.props.communications.commGet.ChamberCode === \"S\" ? \"IN WHICH ACTION IT REQUESTS THE CONCURRENCE OF THE HOUSE OF DELEGATES.\" : \"IN WHICH ACTION IT REQUESTS THE CONCURRENCE OF THE SENATE.\";\n                                commGet.ClerkTitle = this.props.communications.commGet.ChamberCode === \"H\" ? \"Clerk of the House of Delegates\" : \"Clerk of the Senate\";\n                                commGet.ClerkName = this.props.personnel.personnelOtherList ? this.props.personnel.personnelOtherList[0].FullName : \"\";\n                            });\n                    })\n\n                commGet.ShowSignatureNote = [null, true].includes(commGet.ShowSignatureNote); // attr is returned as null on first creation and should default to true\n                this.setState({\n                    organizedComms: [...commGet.CommunicationCategories],\n                    commGet: commGet,\n                    isLoaded: true,\n                    pendingSave: noSavedItems\n                });\n\n                //Get the session data for use in the preview\n                this.props.actions.getSessionById(commGet.SessionID)\n                    .then(() => {\n                        this.setState({\n                            session: this.props.session.selectedSession\n                        });\n                    })\n            })\n            .catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isLoaded: true,\n                    errorMessage: err\n                });\n            });\n    }\n\n    componentWillUnmount() {\n        if (abortController)\n            abortController.abort();\n        cancelRequest();\n    }\n\n    render() {\n        if (this.state.showPreview) {\n            return (\n                <div>\n                    <div className=\"flex-row\">\n                        <h2>Communications Preview</h2>\n                        <ReactToPrint\n                            trigger={() => <a type=\"button\" className=\"button print\"> Print</a>}\n                            content={() => this.componentRef}\n                            pageStyle={\"break-inside: avoid\"}\n                        />\n                    </div>\n                    <div className=\"checkbox-container\">\n                        <div className=\"inner-grid two\">\n                            <div className=\"checkbox\">\n                                <label><input type=\"checkbox\" onChange={() => this.toggleShowSignatureNote()} checked={this.state.commGet.ShowSignatureNote} /> Show Clerk's Note</label>\n                            </div>\n                            <div />\n                        </div>\n                    </div>\n                    <div ref={el => (this.componentRef = el)}>\n                        <CommunicationsDetailsComponent\n                            session={this.state.session}\n                            communication={this.state.commGet}\n                            refNum={this.state.referenceNumber}\n                            authoring\n                        />\n                    </div>\n                    <div className=\"button-bar\">\n                        <div></div>\n                        <div className=\"align-right\">\n                            <button onClick={this.togglePreview} className=\"button secondary\">Edit</button>\n                            <button onClick={() => this.saveComm(PUBLISH_COMM)} disabled={this.state.isSaving} className=\"button\">{this.state.isSaving ? \"Publishing...\" : \"Publish\"}</button>\n                        </div>\n                    </div>\n                </div>\n            );\n        } else {\n            const allLegislation = this.state.organizedComms.flatMap(cat => cat.CommunicationLegislation ? cat.CommunicationLegislation.filter(cl => cl.IsActive).map(cl => cl.LegislationNumber) : []);\n            const hasDuplicates = Boolean(allLegislation.filter((leg, idx) => allLegislation.indexOf(leg) !== idx).length);\n            return (\n                <React.Fragment>\n                    <div>\n                        <Prompt\n                            when={this.state.isDirty}\n                            message={`You have unsaved changes. Are you sure you would like to leave?`}\n                        />\n                    </div>\n                    <div style={{ display: this.state.showPdfWindow ? 'block' : 'none', overflow: 'hidden' }} onClick={() => this.setState({ showPdfWindow: false })} className=\"overlay center-content\">\n                        <div className=\"full full-height\" style={{ maxWidth: '100vw', width: '95%' }}>\n                            <div onClick={e => e.stopPropagation()} className=\"dlas-forms user-forms overlay-content animated-fade-in-up full-height\">\n                                <div>\n                                    <button className=\"button print\" onClick={() => this.pdfRef ? this.pdfRef.contentWindow.print() : null}> Print</button>\n                                </div>\n                                {this.state.failedToJoinBills.length > 0 &&\n                                    <div className=\"small-text\">\n                                        <span>These bills do not have clerk copies and are not included in the PDF: </span>\n                                        <span>{this.state.failedToJoinBills.map((bill, i) => <React.Fragment key={i}>{i !== 0 && \", \"}{bill.billNum}</React.Fragment>)}</span>\n                                    </div>\n                                }\n                                <div className=\"center full-height\">\n                                    <iframe className=\"center\" style={{ width: '100%', height: '90%' }} ref={el => this.pdfRef = el} src={this.state.pdfSrc}></iframe>\n                                    <button style={{ position: 'absolute', bottom: '10px', right: '10px' }} type=\"button\" onClick={() => this.setState({ showPdfWindow: false })} className=\"button secondary\">Close</button>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                    {this.state.commGet ? <h1>{(this.state.commGet.ChamberCode === \"H\" ? \"House \" : \"Senate \") + \"Communication\"}</h1> : <h1>&nbsp;</h1>}\n                    <div className=\"user-forms\">\n                        {!this.state.isLoaded ?\n                            <div className=\"center-spinner spinner\">Fetching results...</div>\n                            :\n                            <div className=\"dlas-forms\">\n                                <span className=\"error-message\">{this.state.errorMessage}</span>\n                                <fieldset className=\"fieldset-collapse fieldset-open\" style={{ paddingBottom: '50px' }}>\n                                    <legend>Communication Information</legend>\n                                    <div className=\"multi-row four no-margin\">\n                                        <div>\n                                            <label>Communication Date</label>\n                                            <DatePicker\n                                                selected={moment(this.state.commGet.CommunicationDate)}\n                                                onChange={val => this.handleInputChange('CommunicationDate', val)}\n                                            />\n                                        </div>\n                                        <div>\n                                            <label>Communication ID</label>\n                                            <input\n                                                type=\"number\"\n                                                placeholder=\"Communication ID\"\n                                                value={this.state.commGet.CommunicationNumber}\n                                                onChange={e => this.handleInputChange('CommunicationNumber', parseInt(e.target.value))}\n                                            />\n                                            {this.state.duplicateCommNumber && <div className=\"input-feedback-warning\">Warning: Communication ID {this.state.commGet.CommunicationNumber} is already in use on another communication on this same communication date.</div>}\n                                            {!this.state.commGet.CommunicationNumber && <div className=\"input-feedback\">Communication ID is required.</div>}\n                                        </div>\n                                        <div />\n                                        <div>\n                                            <button type=\"button\" className=\"button m-left\" style={{ float: 'right' }} disabled={!this.state.organizedComms.map(comm => comm.CommunicationLegislation).find(leg => leg.find(it => !it.IsActive))} onClick={this.includeAll}>Include All</button>\n                                        </div>\n                                    </div>\n                                    <BillsGrid\n                                        organizedComms={this.state.organizedComms}\n                                        communicationCategories={this.state.communicationCategories}\n                                        updateAgenda={this.updateAgenda}\n                                        changeCategoryDropdown={this.changeCategoryDropdown}\n                                        changeCategoryPositionDropdown={this.changeCategoryPositionDropdown}\n                                        selectedCategory={this.state.selectedCategory}\n                                        addCategory={this.addCategory}\n                                        selectedBill={this.state.selectedBill}\n                                        changeBillDropdown={this.changeBillDropdown}\n                                        addBill={this.addBill}\n                                        billList={this.state.billList}\n                                        sessionCode={this.state.commGet.SessionCode}\n                                        hideCategories={this.state.hideCategories}\n                                        toggleHideCategory={this.toggleHideCategory}\n                                    />\n                                </fieldset>\n                                <div className=\"floating-button-bar\">\n                                    <div className=\"flex-row flex-vertical-center\" style={{ width: \"100%\" }}>\n                                        <div className=\"inline-list\">\n                                            <button disabled={this.state.pendingSave || this.state.gettingPdf || !this.hasSelectedBills()} title={this.state.pendingSave ? \"You must save the pending changes in order to print\" : this.hasSelectedBills() ? \"Print Selected\" : \"You must select one or more legislation\"} type=\"button\" className=\"button\" onClick={() => this.genCommDoc(false)}>{this.gettingPdf ? \"Getting Document...\" : \"Print Selected\"}</button>\n                                            <button disabled={this.state.pendingSave || this.state.gettingPdf || !this.hasIncludedBills()} title={this.state.pendingSave ? \"You must save the pending changes in order to print\" : this.hasIncludedBills() ? \"Print All Included\" : \"You must include one or more legislation\"} type=\"button\" className=\"button\" onClick={() => this.genCommDoc(true)}>{this.gettingPdf ? \"Getting Document...\" : \"Print All Included\"}</button>\n                                            <React.Fragment>\n                                                <div className=\"toggle-switch\" onClick={this.toggleIsDoubleSided}>\n                                                    <input id=\"is-double-sided-switch\" checked={this.state.isDoubleSided} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                    <span className=\"slider\"></span>\n                                                </div>\n                                                <label htmlFor=\"is-double-sided-switch\" className=\"checkbox-label no-background\" style={{ whiteSpace: \"no-wrap\", marginTop: '0px', fontSize: '14px' }}>Printing Double Sided?</label>\n                                            </React.Fragment>\n                                        </div>\n                                        <div className=\"inline-list\">\n                                            {hasDuplicates && <span style={{ fontSize: '15px' }}>Please remove all duplicate legislation included in multiple categories before saving</span>}\n                                            <button disabled={hasDuplicates || this.state.isSaving || !this.state.commGet.CommunicationNumber} onClick={() => this.saveComm(SAVE_COMM)} className=\"button\" type=\"submit\">{this.state.commGet.IsPublic ? \"Unpublish\" : this.state.isSaving ? \"Saving...\" : \"Save\"}</button>\n                                            <button disabled={hasDuplicates || this.state.pendingSave || !this.state.commGet.CommunicationNumber || this.state.commGet.IsPublic} onClick={this.togglePreview} className=\"button\" type=\"button\">Preview</button>\n                                            {!this.state.commGet.CommunicationNumber && <div className=\"input-feedback\">Communication ID is required.</div>}\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        }\n                    </div>\n                </React.Fragment>\n            )\n        }\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { bills, session, communications, minutes, nav, personnel } = state;\n        return {\n            bills,\n            session,\n            communications,\n            minutes,\n            nav,\n            personnel\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, sessionActionCreators, communicationsActionCreators, minutesActionCreators, navActionCreators, personnelActionCreators), dispatch)\n        }\n    }\n)(CommunicationsForm)","import React from 'react';\nimport { Route } from 'react-router';\nimport CommunicationsManagementGrid from './lis-communications-grid';\nimport CommunicationsForm from './lis-communications-form'\n\nclass CommunicationsManagement extends React.Component {\n\n    render() {\n\n        return (\n            <div>\n                <Route exact path={this.props.match.path} component={CommunicationsManagementGrid} />\n                <Route path={`${this.props.match.path}/edit-communication/:communicationid`} component={CommunicationsForm} />\n            </div>\n        )\n    }\n}\n\nexport default CommunicationsManagement;","import React from \"react\";\nimport ReactTable from \"react-table\";\nimport { Link } from 'react-router-dom';\nimport '../../../stylesheets/shared/react-table.css';\nimport moment from 'moment-timezone';\nimport DatePicker from \"react-datepicker\";\nimport Select from 'react-select';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { voteActionCreators } from '../../../stores/lis-votes-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport { authActionCreators } from \"../../../stores/lis-auth-store\";\n\nconst customStyles = {\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        minHeight: 0,\n        fontSize: '0.8em',\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    },\n    input: (base) => ({\n        ...base,\n        padding: '0px'\n    }),\n    dropdownIndicator: (base) => ({\n        ...base,\n        height: '29px',\n        padding: '6px'\n    }),\n    clearIndicator: (base) => ({\n        ...base,\n        height: '29px',\n        padding: '6px'\n    })\n}\n\nclass VoteGrid extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectAll: false,\n            showDeleteModal: false,\n            voteOriginOptions: [],\n            chamberOptions: [\n                { label: 'House', value: 'H' },\n                { label: 'Senate', value: 'S' }\n            ],\n            saving: false\n        };\n\n        this.getVoteTypeReferences = this.getVoteTypeReferences.bind(this);\n        this.toggleRow = this.toggleRow.bind(this);\n        this.toggleSelectAll = this.toggleSelectAll.bind(this);\n        this.saveVotes = this.saveVotes.bind(this);\n        this.toggleDeleteVoteModal = this.toggleDeleteVoteModal.bind(this);\n        this.deleteVote = this.deleteVote.bind(this);\n    }\n\n    toggleRow(index, voteIndex) {\n        let dateList = [...this.props.organizedVotes];\n        if (voteIndex !== undefined) {\n            dateList[index].Votes[voteIndex].checked = !dateList[index].Votes[voteIndex].checked;\n        } else {\n            dateList[index].checked = !dateList[index].checked;\n            dateList[index].Votes.forEach(vote => vote.checked = dateList[index].checked);\n        }\n        this.setState({\n            organizedVotes: dateList\n        });\n    }\n\n    toggleSelectAll() {\n        const opposite = !this.state.selectAll;\n        let dateList = [...this.props.organizedVotes];\n        dateList.forEach(date => {\n            date.checked = opposite;\n            date.Votes.forEach(vote => {\n                vote.checked = opposite\n            });\n        });\n        this.setState({\n            selectAll: opposite\n        });\n    }\n\n    saveVotes(publish, voteToDelete) {\n        this.setState({ saving: true }, () => {\n            let votesToSave = [];\n\n            if (!voteToDelete) {\n                const datesToIterate = [...this.props.organizedVotes].filter(date => date.Votes.find(v => v.checked));\n                let checkedVotes = 0;\n                let invalidFinalVotePublish = false;\n                datesToIterate.some(date => {\n                    date.Votes.some(vote => {\n                        // Select all votes that are checked and are not already published or not-published\n                        if (vote.checked) {\n                            checkedVotes++; //we use this when alerting the user if no checked votes were published/unpublished (based on the below logic)\n                            if (vote.IsPublic !== publish) {\n                                if (this.props.voteOrigin.label === \"Committee\" && publish && vote.FinalVote && date.Votes.find(v => !v.checked && !v.IsPublic && v.CommitteeID === vote.CommitteeID)) {\n                                    this.props.actions.makeToast([{ message: `Before publishing a final committee vote, you must publish all preceding votes from this committee${datesToIterate.length > 1 ? ' (' + moment(date.Date).format(\"L\") + ')' : ''}`, type: \"failure\", long: true }]);\n                                    invalidFinalVotePublish = true; //exit loop if we threw an error toast\n                                    return true;\n                                }\n                                \n                                let voteObj = { VoteID: vote.VoteID };\n\n                                if (this.props.chamber.value === \"S\" && this.props.voteOrigin.value === 1) {\n                                    voteObj.VoteLegislation = [vote.LegislationNumber];\n                                }\n\n                                if (vote.FinalVote) {\n                                    voteObj.LegislationNumber = vote.LegislationNumber;\n                                    voteObj.FinalVote = vote.FinalVote;\n                                    voteObj.ChamberCode = vote.ChamberCode;\n                                    voteObj.CommitteeID = vote.CommitteeID;\n                                    voteObj.VoteDate = vote.VoteDate;\n                                    voteObj.SessionID = vote.SessionID;\n                                    voteObj.CommitteeVotedOnLegislation = date.Votes.filter(v => v.LegislationNumber && (v.IsPublic || v.checked) && v.CommitteeID === vote.CommitteeID).map(v => { return { LegislationNumber: v.LegislationNumber, EventCode: v.EventCode } });\n                                }\n                                votesToSave.push(voteObj);\n                            }\n                        }\n                    });\n                    return invalidFinalVotePublish; //exit loop if we threw an error toast\n                });\n\n                if (invalidFinalVotePublish) {\n                    this.setState({ saving: false })\n                    return;\n                }\n                \n                if (votesToSave.length > 0) {\n                    this.props.actions.saveVoteBulk({ IsPublic: publish, VoteIDs: votesToSave })\n                        .then(async () => {\n                            // Create a file for all the votes, and create the chairman's report summarized on minutes if FinalVote\n                            let chairmansReportFailures = [];\n                            if (publish) {\n                                for (const vote of votesToSave) {\n                                    this.props.actions.voteFileGen('?voteID=' + vote.VoteID)\n                                        .then(() => {\n                                            if (this.props.votes.voteFileError) {\n                                                console.log(this.props.votes.voteFileError.toString());\n                                            }\n                                        });\n                                    if (this.props.voteOrigin.label === \"Committee\" && vote.FinalVote && vote.CommitteeID && vote.VoteDate) {\n                                        const success = await this.props.createChairmansReportSummarizedOnMinutes(vote.SessionID, vote.ChamberCode, vote.CommitteeID, moment(vote.VoteDate).utc().hour(0), vote.CommitteeVotedOnLegislation);\n                                        if (!success) { chairmansReportFailures.push(vote.LegislationNumber) }\n                                    }\n                                };\n                            }\n\n                            if (chairmansReportFailures.length) {\n                                const chairmansReportVotes = votesToSave.filter(v => v.FinalVote && v.CommitteeID && v.VoteDate);\n                                this.props.actions.makeToast([{ message: \"Vote Publish Successful, Chairman's Report Save Failed\" + (chairmansReportVotes.length > 1 ? \" For \" + chairmansReportVotes.join(', ') : ''), type: \"failure\", long: true }]);\n                            } else {\n                                this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n                            }\n                            this.props.getVotes();\n                            this.setState({ saving: false })\n                        }).catch(err => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            console.log(err.toString());\n                            this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                            this.setState({ saving: false })\n                            this.props.getVotes();\n                        });\n                } else if (checkedVotes === 0) {\n                    this.props.actions.makeToast([{ message: \"You have not selected any votes\", type: \"warning\" }]);\n                    this.setState({ saving: false })\n                } else {\n                    this.props.actions.makeToast([{ message: (checkedVotes === 1 ? \"This vote has\" : \"The selected votes have\") + (publish ? \" already been published\" : \" not yet been published\"), type: \"warning\", long: true }]);\n                    this.setState({ saving: false })\n                }\n            } else {\n                this.setState({\n                    deletingVote: true\n                }, () => {\n                    this.props.actions.getVoteDetails(\"?voteID=\" + this.state.voteToDelete.VoteID, true)\n                        .then(() => {\n                            votesToSave.push(\n                                this.props.votes.voteDetailsResponse[0]\n                            )\n                            votesToSave[0].DeletionDate = moment();\n\n                            this.props.actions.saveVote({ VoteList: votesToSave })\n                                .then(() => {\n                                    this.setState({\n                                        deletingVote: false,\n                                        showDeleteModal: false,\n                                        voteToDelete: undefined,\n                                        saving: false\n                                    }, () => {\n                                        this.props.actions.makeToast([{ message: \"Vote Deleted\", type: \"success\" }]);\n                                        this.props.getVotes();\n                                    })\n                                }).catch(err => {\n                                    if (err === 'Aborted') {\n                                        return;\n                                    }\n                                    console.log(err.toString());\n                                    this.props.actions.makeToast([{ message: \"Vote Delete Failed\", type: \"failure\" }]);\n                                    this.setState({ deletingVote: false, saving: false })\n                                    this.props.getVotes();\n                                });\n                        })\n                })\n            }\n        })\n    }\n\n    toggleDeleteVoteModal(voteToDelete) {\n        this.setState({\n            showDeleteModal: !this.state.showDeleteModal,\n            voteToDelete: voteToDelete\n        })\n    }\n\n    deleteVote() {\n        this.saveVotes(false, this.state.voteToDelete)\n    }\n\n    async getVoteTypeReferences() {\n        await this.props.actions.getVoteTypes()\n            .then(() => {\n                let voteOriginOptions = [];\n                this.props.votes.voteTypes.forEach(type => {\n                    type.label = type.Name;\n                    type.value = type.VoteTypeID;\n                    voteOriginOptions.push(type);\n                });\n                const voteOrigin = voteOriginOptions.find(o => o.Name === \"Floor\") ? voteOriginOptions.find(o => o.Name === \"Floor\") : null;\n                this.setState({\n                    voteOriginOptions: voteOriginOptions,\n                    voteOrigin: voteOrigin\n                }, () => {\n                    if (voteOrigin) {\n                        this.props.getVotes();\n                    }\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n            });\n    }\n\n    async getCommittees() {\n        await new Promise(res => {\n            this.setState({ fetchingCommittees: true }, async () =>\n                await this.props.actions.getCommitteeList('includeSubCommittees=true')\n                    .then(() => {\n                        this.props.committee.committeeList.forEach(cmte => {\n                            cmte.label = cmte.Name;\n                            cmte.value = cmte.CommitteeID\n                        })\n\n                        this.setState({ fetchingCommittees: false, committeeList: this.props.committee.committeeList })\n                        res();\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        console.log(err);\n                        this.setState({ fetchingCommittees: false })\n                    })\n            )\n        })\n    }\n\n    handleChange(key, value) {\n        this.props.handleChange(key, value, () => {\n            let organizedVotes = [...this.props.organizedVotes];\n            organizedVotes.forEach((date, idx) => {\n                if (date.show) this.props.showVotes(idx, false)\n            });\n            this.props.getVotes();\n        })\n    }\n\n    sortVotes(votes) {\n        let organizedVotes = [...this.props.organizedVotes];\n        let voteDay = organizedVotes.findIndex(x => moment(x.Date).isSame(votes.original.Date, \"days\"));\n\n        if (organizedVotes[voteDay].sortTimeDesc) {\n            organizedVotes[voteDay].Votes.sort((a, b) => a.FinalVote === b.FinalVote || this.props.voteOrigin.label === \"Floor\" ? moment(a.VoteDate).isBefore(b.VoteDate, \"seconds\") ? 1 : moment(a.VoteDate).isAfter(b.VoteDate, \"seconds\") ? -1 : 0 : a.FinalVote ? 1 : -1)\n        } else {\n            organizedVotes[voteDay].Votes.sort((a, b) => a.FinalVote === b.FinalVote || this.props.voteOrigin.label === \"Floor\" ? moment(a.VoteDate).isAfter(b.VoteDate, \"seconds\") ? 1 : moment(a.VoteDate).isBefore(b.VoteDate, \"seconds\") ? -1 : 0 : a.FinalVote ? 1 : -1)\n        }\n\n        organizedVotes[voteDay].sortTimeDesc = !organizedVotes[voteDay].sortTimeDesc;\n\n        this.setState({\n            organizedVotes\n        })\n    }\n\n    componentDidMount() {\n        //set the default chamber to house or senate depending on the user's role\n        let disableChamberSelector = false;\n        let selectedChamber = null;\n\n        if (!this.props.login.userClaims.claims.find(x => x.RoleName === \"Admin\")) {\n            //Find if the user is a house vote editor, if so select house, otherwise select senate, and disable the chamber selector\n            selectedChamber = this.props.login.userClaims.claims.find(x => x.Resource === \"Vote\" && x.Scope === \"House\") ? this.state.chamberOptions.find(chamber => chamber.label === \"House\") : this.props.login.userClaims.claims.find(x => x.Resource === \"Vote\" && x.Scope === \"Senate\") ? this.state.chamberOptions.find(chamber => chamber.label === \"Senate\") : null;\n            disableChamberSelector = true;\n            this.handleChange('chamber', selectedChamber);\n        }\n\n        this.setState({\n            disableChamberSelector: disableChamberSelector\n        });\n\n        Promise.all([this.getVoteTypeReferences(), this.getCommittees()]).then(() => {\n            this.props.getVotes();\n        })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { committeeList, fetchingCommittees, voteOriginOptions, chamberOptions, saving } = this.state;\n        const { startDate, endDate, committeeVal, chamber, voteOrigin, isLoaded, organizedVotes } = this.props;\n\n        const VoteActions = (vote) =>\n            <div className=\"vote-information-actions\">\n                {vote.IsPublic ?\n                    <Link to={`/vote-management/edit-vote/${vote.VoteID}`} className=\"icon edit\"></Link>\n                    :\n                    <React.Fragment>\n                        <Link to={`/vote-management/edit-vote/${vote.VoteID}`} className=\"icon edit\"></Link>\n                        <span className=\"icon flag\"></span>\n                    </React.Fragment>\n                }\n                <span onClick={() => this.toggleDeleteVoteModal(vote)} className=\"icon delete\"></span>\n                {vote.FinalVote && <span className=\"bold\">(Final Vote)</span>}\n                {vote.IsVoice && <span className=\"bold\">(Voice)</span>}\n            </div>\n\n        return (\n            <div>\n                {this.state.showDeleteModal &&\n                    <div className='schedule-modal'>\n                        <div className='schedule-modal-content'>\n                            <div className='grid-wrapper two'>\n                                <div className='inner-grid eight-one-and-one'>\n                                    <span>Are you sure you want to delete vote {this.state.voteToDelete.VoteNumber}?</span>\n                                    {this.state.deletingVote\n                                        ? <div className=\"small-spinner\"></div>\n                                        : <button className='button primary' onClick={() => this.deleteVote()}>Yes</button>\n                                    }\n                                    <button className='button secondary' onClick={() => this.toggleDeleteVoteModal()}>No</button>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                }\n                <div className=\"header-half\">\n                    <h1>Vote Management</h1>\n                </div>\n\n                <div className=\"toolbar dlas-forms\">\n                    <div className=\"flex-row\">\n                        <div style={{ display: 'grid', gridTemplateColumns: 'min-content min-content 120px 150px 350px', gap: '10px' }}>\n                            <div>\n                                <label className=\"label\" htmlFor=\"start-date\">Start Date</label>\n                                <DatePicker\n                                    name=\"start-date\"\n                                    selected={startDate}\n                                    onChange={value => this.props.handleDateChange('startDate', value, () => {\n                                        let organizedVotes = [...this.props.organizedVotes];\n                                        organizedVotes.forEach((date, idx) => {\n                                            if (date.show) this.props.showVotes(idx, false)\n                                        });\n                                        this.props.getVotes();\n                                    })}\n                                />\n                            </div>\n                            <div>\n                                <label className=\"label\" htmlFor=\"end-date\">End Date</label>\n                                <DatePicker\n                                    name=\"end-date\"\n                                    selected={endDate}\n                                    onChange={value => this.props.handleDateChange('endDate', value, () => {\n                                        let organizedVotes = [...this.props.organizedVotes];\n                                        organizedVotes.forEach((date, idx) => {\n                                            if (date.show) this.props.showVotes(idx, false)\n                                        });\n                                        this.props.getVotes();\n                                    })}\n                                />\n                            </div>\n                            <div>\n                                <label className=\"label\" htmlFor=\"chamber\">Chamber</label>\n                                <Select\n                                    styles={customStyles}\n                                    name=\"chamber\"\n                                    options={chamberOptions}\n                                    isDisabled={this.state.disableChamberSelector}\n                                    onChange={value => this.handleChange('chamber', value)}\n                                    value={chamber}\n                                    style={{ width: \"150px\" }}\n                                />\n                            </div>\n                            <div>\n                                <label className=\"label\" htmlFor=\"committee\">Vote Origin</label>\n                                <Select\n                                    styles={customStyles}\n                                    name=\"vote-origin\"\n                                    options={voteOriginOptions}\n                                    onChange={value => this.handleChange('voteOrigin', value)}\n                                    value={voteOrigin}\n                                    style={{ width: \"150px\" }}\n                                />\n                            </div>\n                            <div>\n                                {voteOrigin && voteOrigin.label !== \"Floor\" &&\n                                    <React.Fragment>\n                                        <label className=\"label\" htmlFor=\"committee\">Committee</label>\n                                        <Select\n                                            styles={customStyles}\n                                            name=\"committee\"\n                                            options={committeeList && chamber ? committeeList.filter(c => c.ChamberCode === chamber.value && (voteOrigin.label === \"Committee\" ? !c.ParentCommitteeID : c.ParentCommitteeID)) : []}\n                                            onChange={value => this.handleChange('committee', value)}\n                                            value={committeeVal}\n                                            isDisabled={!chamber}\n                                            placeholder={fetchingCommittees ? 'Getting Committees....' : 'Select...'}\n                                            style={{ width: \"350px\" }}\n                                            isClearable\n                                        />\n                                    </React.Fragment>}\n                            </div>\n\n                        </div>\n                    </div>\n                </div>\n                <br />\n                <div className=\"toolbar minutes-toolbar dlas-forms\">\n                    <button type=\"button\" disabled={saving || (voteOrigin && voteOrigin.label !== \"Floor\" && (!committeeVal || !committeeVal.label))} onClick={() => this.saveVotes(true)} className=\"button\">Publish</button>\n                    <button type=\"button\" disabled={saving || (voteOrigin && voteOrigin.label !== \"Floor\" && (!committeeVal || !committeeVal.label))} onClick={() => this.saveVotes(false)} className=\"button danger\">Unpublish</button>\n                </div>\n                <ReactTable\n                    resizable={false}\n                    loading={!isLoaded}\n                    data={organizedVotes}\n                    noDataText=\"No votes found\"\n                    ref={r => this.reactTable = r}\n                    columns={[\n                        {\n                            sortable: false,\n                            filterable: false,\n                            style: { textAlign: 'center' },\n                            width: 45,\n                            Header: x => {\n                                return (\n                                    <input\n                                        id={'cm-checkbox-selectall'}\n                                        type=\"checkbox\"\n                                        className=\"checkbox\"\n                                        checked={this.state.selectAll}\n                                        onChange={this.toggleSelectAll}\n                                    />\n                                );\n                            },\n                            Cell: ({ original, index }) => {\n                                return (\n                                    <input\n                                        id={'cm-checkbox-' + index}\n                                        type=\"checkbox\"\n                                        className=\"checkbox\"\n                                        checked={original.checked}\n                                        onChange={() => this.toggleRow(index)}\n                                    />\n                                );\n                            }\n                        },\n                        {\n                            Header: \"\",\n                            accessor: \"Date\",\n                            Cell: row => {\n                                if (row.original.show) {\n                                    return (\n                                        <div className=\"vote-date-container\">\n                                            <div className=\"vote-date\" onClick={() => this.props.showVotes(row.index)}>\n                                                <span>{moment(row.value).format('L')}</span>\n                                                <button className=\"arrow-up\">votes</button>\n                                            </div>\n                                            <div className={`vote-information${voteOrigin.label === \"Floor\" ? \"\" : \" committee\"}`}>\n                                                {voteOrigin.label === \"Floor\" ?\n                                                    <React.Fragment>\n                                                        <span className=\"vote-information-header\"></span>\n                                                        <span className=\"vote-information-header\">Legislation</span>\n                                                        <span className=\"vote-information-header\">Vote Number</span>\n                                                        <span className=\"vote-information-header\" onClick={() => this.sortVotes(row)} style={{ cursor: \"pointer\" }}>Vote Time</span>\n                                                        <span className=\"vote-information-header\"></span>\n                                                        {row.original.Votes.map((vote, voteIndex) =>\n                                                            <React.Fragment key={voteIndex}>\n                                                                <span><input type=\"checkbox\" checked={vote.checked} onChange={() => this.toggleRow(row.index, voteIndex)} /></span>\n                                                                {![\"block\", \"cancelled\"].includes(vote.LegislationNumber?.toLowerCase()) ? <Link to={`/bill-details/${vote.SessionCode}/${vote.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\">{vote.LegislationNumber}</Link> : <span>{vote.LegislationNumber}</span>}\n                                                                <span>{vote.VoteNumber}</span>\n                                                                <span>{moment(vote.VoteDate).format(\"LTS\")}</span>\n                                                                {VoteActions(vote)}\n                                                            </React.Fragment>\n                                                        )}\n                                                    </React.Fragment>\n                                                    :\n                                                    <React.Fragment>\n                                                        <span className=\"vote-information-header checkbox-container\"></span>\n                                                        <span className=\"vote-information-header\">Legislation</span>\n                                                        <span className=\"vote-information-header\">Action</span>\n                                                        <span className=\"vote-information-header\">Committee</span>\n                                                        <span className=\"vote-information-header\">Vote Tally</span>\n                                                        <span className=\"vote-information-header\"></span>\n                                                        {row.original.Votes.map((vote, voteIndex) =>\n                                                            <React.Fragment key={voteIndex}>\n                                                                <span title={\"Vote Number: \" + vote.VoteNumber} className=\"checkbox-container\"><input type=\"checkbox\" checked={vote.checked} onChange={() => this.toggleRow(row.index, voteIndex)} /></span>\n                                                                {vote.LegislationNumber?.toLowerCase() !== \"block\" ? <Link to={`/bill-details/${vote.SessionCode}/${vote.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\">{vote.LegislationNumber}</Link> : <span>{vote.LegislationNumber}</span>}\n                                                                <span title={\"Vote Number: \" + vote.VoteNumber}>{this.props.voteActions && this.props.voteActions.find(x => x.EventCode === vote.EventCode) ? this.props.voteActions.find(x => x.EventCode === vote.EventCode).Description : vote.EventCode}</span>\n                                                                <span title={vote.CommitteeName}>{vote.CommitteeName}</span>\n                                                                <span title={\"Vote Number: \" + vote.VoteNumber}>{vote.VoteTally}</span>\n                                                                {VoteActions(vote)}\n                                                            </React.Fragment>\n                                                        )}\n                                                    </React.Fragment>\n                                                }\n                                            </div>\n                                        </div>\n                                    );\n                                } else {\n                                    return (\n                                        <div style={{ cursor: 'pointer' }} onClick={() => this.props.showVotes(row.index)}>\n                                            <span>{moment(row.value).format('L')}</span>\n                                            <button style={{ float: 'right' }} className=\"arrow-down\">votes</button>\n                                        </div>\n                                    );\n                                }\n                            }\n                        }\n                    ]}\n                    defaultPageSize={15}\n                    pageSizeOptions={[5, 10, 15, 20, 25, 50, 100]}\n                    className=\"committee-table -striped -highlight\"\n                />\n            </div>)\n\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { votes, nav, committee, login } = state;\n        return {\n            votes,\n            nav,\n            committee,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, voteActionCreators, navActionCreators, committeeActionCreators, authActionCreators), dispatch)\n        }\n    }\n)(VoteGrid)","import React from 'react';\nimport ReactToPrint from \"react-to-print\";\nimport moment from 'moment-timezone';\nimport { Link } from 'react-router-dom';\n\nconst VoteDetails = props => {\n    const { sessionData, voteMembers, billData, voteData } = props;\n    const sessionHeader = sessionData ? sessionData.SessionYear + ' ' + sessionData.DisplayName : '';\n    const memberYeas = voteMembers.filter(nObj => nObj.ResponseCode === 'Y');\n    const memberNays = voteMembers.filter(nObj => nObj.ResponseCode === 'N');\n    const memberAbstentions = voteMembers.filter(nObj => nObj.ResponseCode === 'A');\n    const memberNoVote = voteMembers.filter(nObj => nObj.ResponseCode === 'X');\n    const voteStatements = voteMembers.filter(member => member.VoteStatement);\n    const voteActionDescription = voteData.ChamberCode === \"S\" ? \" Senate: \" + voteData.LegislationActionDescription : \" House of Delegates: \" + voteData.LegislationActionDescription\n    // Abstentions appear as rule 36 on senate floor tally sheets\n    let memberRule36 = [];\n    if (voteData.ChamberCode === \"S\" && voteData.VoteType === \"Floor\") {\n        memberRule36 = voteMembers.filter(nObj => nObj.ResponseCode === 'A');\n    } else {\n        memberRule36 = voteMembers.filter(nObj => nObj.ResponseCode === 'R');\n    }\n\n    let componentRef;\n    let removeRefFromPrint;\n    const displayTallySheet = props.voteFileUrl && !voteData.CommitteeID && voteData.ChamberCode !== \"H\";\n    const displayCommitteeLink = voteData.CommitteeID;\n    const linksGridColumns = displayTallySheet && displayCommitteeLink ? 'three' : (displayTallySheet || displayCommitteeLink) ? 'two' : 'one';\n    const linksGridTemplateColumns = linksGridColumns === 'three' ? 'auto min-content min-content' : linksGridColumns === 'two' ? 'auto min-content' : 'min-content';\n    const headerGridTemplateColumns = linksGridColumns === 'three' ? '7fr 3fr' : linksGridColumns === 'two' ? '7fr 2fr' : '7fr 1fr';\n    const mobileLinksPosition = linksGridColumns === 'three' ? 'justify-center' : 'justify-left';\n\n    return (\n        <div ref={el => (componentRef = el)} id=\"vote-details\" className=\"bill-theme public-details inner-grid\">\n            <div>\n                <h2 style={{ marginBottom: '10px' }}>{sessionHeader}</h2>\n            </div>\n            <div className={props.isPublic ? 'details-header' : ''} style={props.isPublic && { gridTemplateColumns: headerGridTemplateColumns }}>\n                {billData.length === 1 ?\n                    <div style={{ marginBottom: \"15px\" }}>\n                        <h3><span style={{ marginRight: '1em' }}>{billData[0].LegislationNumber}</span><span>{billData[0].Description}</span></h3>\n                    </div>\n                    :\n                    <div>\n                        <h3>Bills</h3>\n                        <p>{billData.map((bill, index) =>\n                            <React.Fragment key={index}>\n                                {bill.LegislationNumber}{index !== billData.length - 1 && \",\"}&nbsp;\n                            </React.Fragment>\n                        )}</p>\n                    </div>\n                }\n                {props.isPublic &&\n                    <div className={`remove-from-print inner-grid ${linksGridColumns} list-links ${mobileLinksPosition}`} style={{ display: 'grid', justifyContent: 'end', gridTemplateColumns: linksGridTemplateColumns }}>\n                        {displayTallySheet &&\n                            <a href={props.voteFileUrl.FileURL}>Tally Sheet PDF</a>\n                        }\n                        {displayCommitteeLink &&\n                            <Link to={`/session-details/${sessionData.SessionCode}/committee-information/${voteData.CommitteeNumber}/committee-details`}>{voteData.ParentCommitteeID ? 'Subcommittee' : 'Committee'}</Link>\n                        }\n                        <ReactToPrint\n                            trigger={() => <a type=\"button\" className=\"button print\"> Print</a>}\n                            content={() => {\n                                let printedContent = componentRef.cloneNode(true);\n                                //remove icons from printed document\n                                const removedContent = printedContent.getElementsByClassName('remove-from-print');\n                                for (const el of removedContent) {\n                                    el.innerHTML = ''\n                                }\n                                //set header to block instead of grid so it can span the width of printed document rather than be cut off short\n                                let header = printedContent.getElementsByClassName('details-header');\n                                if (header && header[0]) {\n                                    header = header[0];\n                                    header.style.display = 'block';\n                                    let billDescription = header.getElementsByTagName('div');\n                                    if (billDescription && billDescription[0]) {\n                                        billDescription[0].style['margin-bottom'] = '0px';\n                                    }\n                                }\n                                return printedContent\n                            }}\n                            pageStyle={\"break-inside: avoid\"}\n                        />\n                    </div>\n                }\n            </div >\n            <div>\n                <p><strong>{moment(voteData.VoteDate).format(\"MM/DD/YYYY\")} {voteActionDescription}</strong></p>\n            </div>\n            <div>\n                <div className=\"details-section\">\n                    {voteData.CommitteeID &&\n                        <p>{voteData.ParentCommitteeID ? \"Subcommittee: \" : \"Committee: \"} {voteData.ReferToCommitteeID !== undefined ? voteData.ReferToCommitteeName : voteData.CommitteeName}</p>\n                    }\n                    {voteData.ParentCommitteeID &&\n                        <p>Committee: {voteData.ParentCommitteeName}</p>\n                    }\n                </div>\n                <div className=\"details-section\">\n                    <h4>Votes</h4>\n                    <p>\n                        YEAS--\n                        {memberYeas.map((item, index) => (\n                            <span key={index}>{item.PatronDisplayName}{memberYeas.length === index + 1 ? '--' : ', '}</span>\n                        ))}\n                        {memberYeas.length}\n                    </p>\n                    <p>\n                        NAYS--\n                        {memberNays.map((item, index) => (\n                            <span key={index}>{item.PatronDisplayName}{memberNays.length === index + 1 ? '--' : ', '}</span>\n                        ))}\n                        {memberNays.length}\n                    </p>\n                    <p>\n                        {(voteData.VoteType === \"Floor\" && voteData.ChamberCode === \"S\") ? \"RULE 36--\" : \"ABSTENTIONS--\"}\n                        {memberAbstentions.map((item, index) => (\n                            <span key={index}>{item.PatronDisplayName}{memberAbstentions.length === index + 1 ? '--' : ', '}</span>\n                        ))}\n                        {memberAbstentions.length}\n                    </p>\n                    {voteData.VoteType === \"Committee\" && voteData.ChamberCode === \"S\" ? \"\"\n                        : <p>\n                            NOT VOTING--\n                            {memberNoVote.map((item, index) => (\n                                <span key={index}>{item.PatronDisplayName}{memberNoVote.length === index + 1 ? '--' : ', '}</span>\n                            ))}\n                            {memberNoVote.length}\n                        </p>\n                    }\n                </div>\n            </div>\n            <div id=\"vote-statements\">\n                {voteStatements.map((statement, statementIndex) =>\n                    <p key={statementIndex}>{statement.VoteStatement}</p>\n                )}\n            </div>\n            {voteData.VoteComment &&\n                <div id=\"vote-comments\">\n                    <p>{voteData.VoteComment}</p>\n                </div>\n            }\n        </div>\n    );\n}\n\nexport default VoteDetails\n","import React from \"react\";\nimport { Prompt } from \"react-router\";\nimport moment from 'moment-timezone';\nimport DatePicker from \"react-datepicker\";\nimport ReactToPrint from \"react-to-print\";\nimport VoteDetails from \"../../../lis-shared/lis-votes/lis-vote-details\";\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { voteActionCreators } from '../../../stores/lis-votes-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport Select from 'react-select';\nimport Popout from '../../../lis-shared/lis-layout/components/lis-popout-component';\nimport { sessionActionCreators } from \"../../../stores/lis-session-store\";\nimport { calendarActionCreators } from \"../../../stores/lis-calendar-store\";\nimport { cancelRequest } from '../../../services/request.service';\nimport { billActionCreators } from \"../../../stores/lis-legislation-store\";\nimport { committeeActionCreators } from \"../../../stores/lis-committee-store\";\n\nconst PassFailOptions = [{ label: \"Pass\", value: \"P\" }, { label: \"Fail\", value: \"F\" }];\n\nconst REFER_ACTIONS = [\"H0105\", \"H0106\", \"H0107\", \"H0108\", \"H0109\", \"H0114\", \"H0205\", \"H0206\", \"H0207\", \"H0208\", \"H0209\", \"H0214\", \"H0307\", \"H0407\", \"H0507\", \"H0607\", \"H0705\", \"H0706\", \"H0707\", \"H0708\", \"H0709\", \"H0714\", \"H0805\", \"H0806\", \"H0807\", \"H0808\", \"H0809\", \"H0814\", \"H0905\", \"H0906\", \"H0907\", \"H0908\", \"H0909\", \"H0914\", \"H1005\", \"H1006\", \"H1007\", \"H1008\", \"H1009\", \"H1014\", \"H1105\", \"H1106\", \"H1107\", \"H1108\", \"H1109\", \"H1114\", \"H1307\", \"H1405\", \"H1406\", \"H1407\", \"H1408\", \"H1409\", \"H1414\", \"H1505\", \"H1506\", \"H1507\", \"H1508\", \"H1509\", \"H1514\", \"H1707\", \"H1805\", \"H1806\", \"H1807\", \"H1808\", \"H1809\", \"H1814\", \"H1905\", \"H1906\", \"H1907\", \"H1908\", \"H1909\", \"H1914\", \"H2005\", \"H2006\", \"H2007\", \"H2008\", \"H2009\", \"H2014\", \"H2105\", \"H2106\", \"H2107\", \"H2108\", \"H2109\", \"H2114\", \"H2305\", \"H2306\", \"H2307\", \"H2308\", \"H2309\", \"H2314\", \"H2405\", \"H2406\", \"H2407\", \"H2408\", \"H2409\", \"H2414\", \"S0105\", \"S0106\", \"S0107\", \"S0108\", \"S0109\", \"S0110\", \"S0114\", \"S0205\", \"S0206\", \"S0207\", \"S0208\", \"S0209\", \"S0210\", \"S0214\", \"S0305\", \"S0306\", \"S0307\", \"S0308\", \"S0309\", \"S0310\", \"S0314\", \"S0405\", \"S0406\", \"S0407\", \"S0408\", \"S0409\", \"S0410\", \"S0414\", \"S0505\", \"S0506\", \"S0507\", \"S0508\", \"S0509\", \"S0510\", \"S0514\", \"S0607\", \"S0705\", \"S0706\", \"S0707\", \"S0708\", \"S0709\", \"S0710\", \"S0714\", \"S0805\", \"S0806\", \"S0807\", \"S0808\", \"S0809\", \"S0810\", \"S0814\", \"S0905\", \"S0906\", \"S0907\", \"S0908\", \"S0909\", \"S0910\", \"S0914\", \"S1005\", \"S1006\", \"S1007\", \"S1008\", \"S1009\", \"S1010\", \"S1014\", \"S1105\", \"S1106\", \"S1107\", \"S1108\", \"S1109\", \"S1110\", \"S1114\", \"S1205\", \"S1206\", \"S1207\", \"S1208\", \"S1209\", \"S1210\", \"S1214\", \"S1305\", \"S1306\", \"S1307\", \"S1308\", \"S1309\", \"S1310\", \"S1314\"];\nconst INCORPORATED_ACTIONS = [/* \"H0199\", \"H0299\", \"H0799\", \"H0899\", \"H0999\", \"H1099\", \"H1199\", \"H1499\", \"H1599\", \"H1899\", \"H2099\", \"H2199\", \"H2399\", \"H2499\", */ \"S0199\", \"S0299\", \"S0399\", \"S0499\", \"S0599\", \"S0699\", \"S0799\", \"S0899\", \"S0999\", \"S1099\", \"S1199\", \"S1299\", \"S1399\"];\n\nclass VoteForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            voteData: '',\n            message: '',\n            isPreviewing: false,\n            isLoaded: false,\n            changeVotes: false,\n            selectedVoteActionDescription: '',\n            voteActionList: [],\n            selectedCalendarCategoryType: '',\n            calendarCategoryTypeList: [],\n            pendingSave: false,\n            isDirty: false,\n            showWarning: false,\n            settingIsBlock: false,\n            billList: [],\n            committeeList: [],\n            sessionBills: [],\n            savedIncorporated: false\n        };\n\n        this.resetForm = this.resetForm.bind(this);\n        this.resetVoteMembers = this.resetVoteMembers.bind(this);\n        this.getVoteActionReferences = this.getVoteActionReferences.bind(this);\n        this.getCalendarCategoryTypes = this.getCalendarCategoryTypes.bind(this);\n        this.handleVoteActionDescriptionChange = this.handleVoteActionDescriptionChange.bind(this);\n        this.handleCalendarCategoryTypeChange = this.handleCalendarCategoryTypeChange.bind(this);\n        this.handleInputChange = this.handleInputChange.bind(this);\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.handleVoteChange = this.handleVoteChange.bind(this);\n        this.handleVoteLegislationChange = this.handleVoteLegislationChange.bind(this);\n        this.handleCommitteeChange = this.handleCommitteeChange.bind(this);\n        this.updateStatement = this.updateStatement.bind(this);\n        this.togglePreview = this.togglePreview.bind(this);\n        this.togglePortal = this.togglePortal.bind(this);\n        this.toggleTallySheetPDFPreview = this.toggleTallySheetPDFPreview.bind(this);\n        this.handleSave = this.handleSave.bind(this);\n        this.toggleChangeVotes = this.toggleChangeVotes.bind(this);\n        this.setVoteTally = this.setVoteTally.bind(this);\n        this.toggleWarning = this.toggleWarning.bind(this);\n        this.getVoteListForFinalVote = this.getVoteListForFinalVote.bind(this);\n        this.toggleEditVoteLegislation = this.toggleEditVoteLegislation.bind(this);\n        this.getCommittees = this.getCommittees.bind(this);\n        this.getBills = this.getBills.bind(this);\n        this.handleBillChange = this.handleBillChange.bind(this);\n        this.handleSenateCommitteeVoteLegislationChange = this.handleSenateCommitteeVoteLegislationChange.bind(this);\n\n        this.pdfRef = React.createRef();\n    }\n\n    resetForm() {\n        const originalVoteData = JSON.parse(JSON.stringify(this.props.votes.voteDetailsResponse[0]));\n        this.setState({\n            pendingSave: false,\n            voteData: originalVoteData,\n            selectedVoteActionDescription: this.state.voteActionList.find(x => x.EventCode === originalVoteData.EventCode),\n            selectedCalendarCategoryType: this.state.calendarCategoryTypeList.find(x => x.CalendarCategoryTypeID === originalVoteData.CalendarCategoryTypeID) || null,\n            isDirty: false\n        });\n    }\n\n    resetVoteMembers() {\n        let voteData = { ...this.state.voteData };\n        let originalVoteData = JSON.parse(JSON.stringify(this.props.votes.voteDetailsResponse[0]));\n        const originalVoteMembers = originalVoteData.VoteMember;\n        voteData.VoteMember = originalVoteMembers;\n        this.setState({\n            voteData,\n            isDirty: false\n        }, () => {\n            this.setVoteTally();\n        })\n    }\n\n    getVoteActionReferences(setSelectedValue) {\n        this.setState({ loadingVoteActionList: true }, () => {\n            this.props.actions.getVoteActionList(\"?\"\n                + (this.state.voteData.CalendarCategoryTypeID ? \"calendarCategoryTypeId=\" + this.state.voteData.CalendarCategoryTypeID + \"&\" : \"\")\n                + \"committeeID=\" + this.state.voteData.CommitteeID\n                + \"&voteTypeID=\" + this.state.voteData.VoteTypeID\n                + \"&chamberCode=\" + this.state.voteData.ChamberCode)\n                .then(() => {\n                    let voteActionList = [...this.props.votes.voteActionList];\n\n                    // if this is a committee vote, separate the vote action options between actions of this vote's committee and then all other committee's vote actions\n                    if (this.state.voteData.VoteType !== \"Floor\") {\n                        voteActionList = [\n                            {\n                                label: this.state.voteData.CommitteeName ? this.state.voteData.CommitteeName + \" Vote Actions\" : 'Vote Actions From This Committee',\n                                options: [...voteActionList.filter(v => v.EventCode.substr(1, 2) === this.state.voteData.EventCode.substr(1, 2))]\n                            },\n                            {\n                                label: 'Vote Actions From Other Committees',\n                                options: [...voteActionList.filter(v => v.EventCode.substr(1, 2) !== this.state.voteData.EventCode.substr(1, 2))]\n                            }\n                        ]\n                    }\n\n                    if (setSelectedValue) {\n                        let voteAction = voteActionList.flatMap(x => x.options || x).find(x => x.EventCode === this.state.voteData.EventCode) || null;\n                        let voteData = { ...this.state.voteData };\n                        if (voteAction) {\n                            voteData.VoteActionID = voteAction.VoteActionID;\n                            voteData.EventCode = voteAction.EventCode;\n                        } else if (voteData.EventCode && voteData.VoteActionDescription) {\n                            const voteObj = { EventCode: voteData.EventCode, Description: voteData.VoteActionDescription, ChamberCode: voteData.ChamberCode, VoteActionID: voteData.VoteActionID }\n                            if (this.state.voteData.VoteType !== \"Floor\") {\n                                voteActionList[0].options.push(voteObj);\n                            } else {\n                                voteActionList.push(voteObj)\n                            }\n                            voteAction = voteActionList.flatMap(x => x.options || x).find(x => x.EventCode === this.state.voteData.EventCode) || null;\n                        }\n                        this.setState({ selectedVoteActionDescription: voteAction, voteData })\n                    }\n                    this.setState({ voteActionList, loadingVoteActionList: false })\n                })\n        })\n    }\n\n    getCalendarCategoryTypes() {\n        this.props.actions.getCalendarCategoriesReferences('?Chambercode=' + this.state.voteData.ChamberCode)\n            .then(() => {\n                let calendarCategoryTypeList = this.props.calendar.calendarCategoriesReferences;\n                let selectedCalendarCategoryType = calendarCategoryTypeList.find(x => x.CalendarCategoryTypeID === this.state.voteData.CalendarCategoryTypeID);\n                if (!selectedCalendarCategoryType && this.state.voteData.CalendarCategoryTypeID && this.state.voteData.CategoryDescription) {\n                    calendarCategoryTypeList.push({ Description: this.state.voteData.CategoryDescription, CalendarCategoryTypeID: this.state.voteData.CalendarCategoryTypeID })\n                    selectedCalendarCategoryType = calendarCategoryTypeList.find(x => x.CalendarCategoryTypeID === this.state.voteData.CalendarCategoryTypeID);\n                }\n                this.setState({\n                    calendarCategoryTypeList,\n                    selectedCalendarCategoryType\n                });\n            });\n    }\n\n    handleVoteActionDescriptionChange(value) {\n        let voteData = { ...this.state.voteData };\n        voteData.VoteActionDescription = value.Description;\n        voteData.ChamberCode = value.ChamberCode;\n        voteData.EventCode = value.EventCode;\n        voteData.VoteActionID = value.VoteActionID;\n        voteData.Description = voteData.VoteActionDescription + \" \" + voteData.VoteTally;\n\n        this.setState({\n            pendingSave: true,\n            voteData: voteData,\n            selectedVoteActionDescription: this.state.voteActionList.find(x => x.EventCode === voteData.EventCode),\n            isDirty: true\n        });\n    }\n\n    handleCalendarCategoryTypeChange(value) {\n        let voteData = { ...this.state.voteData };\n        voteData.CalendarCategoryTypeID = value.CalendarCategoryTypeID;\n\n        this.setState({\n            pendingSave: true,\n            voteData: voteData,\n            selectedCalendarCategoryType: this.state.calendarCategoryTypeList.find(x => x.CalendarCategoryTypeID === value.CalendarCategoryTypeID),\n            isDirty: true\n        }, () => {\n            this.getVoteActionReferences(true);\n        });\n    }\n\n    handleInputChange(key, value) {\n        let voteData = { ...this.state.voteData };\n        voteData[key] = value;\n        let promise;\n        if (key === \"VoteTally\") {\n            voteData.Description = voteData.VoteActionDescription + \" \" + voteData.VoteTally\n        } else if (key === \"IsBlock\") {\n            if (voteData.VoteLegislation && voteData.VoteLegislation.filter(v => !v.DeletionDate).length > 1 && !value) {\n                return;\n            } else if (!this.state.billList || !this.state.billList.length) {\n                //Get bills in the session for the bill dropdown\n                promise = new Promise(res => {\n                    this.setState({ settingIsBlock: true }, () => {\n                        this.props.actions.getSessionBills('?sessionID= ' + voteData.SessionID).then(() => {\n                            let billList = [...this.props.bills.sessionBills];\n                            billList.forEach(bill => {\n                                bill.label = bill.LegislationNumber\n                                bill.value = bill.LegislationID\n                            });\n                            this.setState({\n                                billList: billList,\n                                settingIsBlock: false\n                            })\n                            res();\n                        })\n                    });\n                })\n            }\n        }\n        Promise.resolve(promise).then(() => {\n            this.setState({\n                pendingSave: true,\n                voteData: voteData,\n                isDirty: true\n            }, () => {\n                //if they are setting it to be the final vote, and we have not already checked to make sure this is valid based on other votes on this date, do so now\n                if (key === \"FinalVote\" && !this.state.committeeSameDayVoteList && this.state.voteData.FinalVote && this.state.voteData.VoteType === \"Committee\" && this.state.voteData.CommitteeID && !this.state.voteData.ParentCommitteeID) {\n                    this.getVoteListForFinalVote(this.state.voteData);\n                }\n            });\n        })\n    }\n\n    handleDateChange(val) {\n        let voteData = { ...this.state.voteData };\n        voteData.VoteDate = moment(val).utcOffset(-300).format(\"MM/DD/YYYY HH:mm:ss\")\n        this.setState({\n            pendingSave: true,\n            voteData: voteData,\n            isDirty: true\n        });\n    }\n\n    handleVoteChange(index, val) {\n        let voteData = { ...this.state.voteData };\n        voteData.VoteMember[index].ResponseCode = val;\n        this.setState({\n            pendingSave: true,\n            voteData: voteData,\n            isDirty: true\n        }, () => {\n            this.setVoteTally();\n        });\n    }\n\n    toggleEditVoteLegislation(undo) {\n        this.setState({ editingVoteLegislation: !this.state.editingVoteLegislation, showEditingVoteLegislationMessage: false }, () => {\n            let voteData = { ...this.state.voteData }\n            if (this.state.editingVoteLegislation) {\n                this.setState({ uneditedVoteLegislation: JSON.parse(JSON.stringify(voteData.VoteLegislation)) })\n            } else if (undo === true) {\n                voteData.VoteLegislation = this.state.uneditedVoteLegislation;\n                this.setState({ voteData });\n            }\n        })\n    }\n\n    handleVoteLegislationChange(_, behavior) {\n        let voteData = { ...this.state.voteData };\n        let voteLegislation = [...voteData.VoteLegislation];\n        if (behavior && behavior.action) {\n            switch (behavior.action) {\n                case 'select-option':\n                    const deletedLegIndex = voteLegislation.findIndex(vl => vl.DeletionDate && vl.LegislationID === behavior.option.LegislationID);\n                    if (deletedLegIndex >= 0) {\n                        voteLegislation[deletedLegIndex].DeletionDate = null;\n                    } else {\n                        voteLegislation.push({ LegislationNumber: behavior.option.LegislationNumber, LegislationID: behavior.option.LegislationID });\n                    }\n                    break;\n                case 'remove-value':\n                    const legIndex = voteLegislation.findIndex(vl => !vl.DeletionDate && vl.LegislationID === behavior.removedValue.LegislationID);\n                    voteLegislation[legIndex].DeletionDate = moment();\n                    break;\n                case 'clear':\n                    voteLegislation.filter(vl => !vl.DeletionDate).forEach(vl => vl.DeletionDate = moment())\n                    break;\n                default:\n                    break;\n            }\n        }\n\n        voteData.VoteLegislation = voteLegislation;\n        voteData.IsBlock = voteLegislation.filter(vl => !vl.DeletionDate).length > 1 ? true : voteData.IsBlock;\n        this.setState({\n            voteData\n        });\n    }\n\n    handleSenateCommitteeVoteLegislationChange(value) {\n        let voteData = { ...this.state.voteData };\n        voteData.LegislationNumber = value.LegislationNumber;\n        voteData.VoteLegislation[0].DeletionDate = moment().toISOString();\n        voteData.VoteLegislation.push(value);\n        voteData.IsBlock = false;\n        this.setState({\n            voteData\n        });\n    }\n\n    handleCommitteeChange(value) {\n        let voteData = { ...this.state.voteData };\n\n        if(!value) {\n            voteData.ReferToCommitteeID = undefined;\n            voteData.ReferToCommitteeNumber = undefined;\n            voteData.ReferToCommitteeName = undefined;\n        } else {\n            voteData.ReferToCommitteeID = value.value;\n        }\n\n        this.setState({\n            voteData: voteData\n        })\n    }\n\n    handleBillChange(value) {\n        let voteData = { ...this.state.voteData };\n\n        voteData.ReferenceID = value.LegislationID;\n        voteData.ReferenceNumber = value.label;\n\n        this.setState({\n            voteData: voteData\n        })\n    }\n\n    updateStatement(voteMembers) {\n        let voteData = { ...this.state.voteData };\n        voteData.VoteMember = voteMembers;\n        this.setState({\n            pendingSave: true,\n            voteData: voteData,\n            isDirty: true\n        });\n    }\n\n    setVoteTally() {\n        const yeaVotes = this.state.voteData.VoteMember.filter(vm => vm.ResponseCode === \"Y\").length.toString();\n        const nayVotes = this.state.voteData.VoteMember.filter(vm => vm.ResponseCode === \"N\").length.toString();\n        const abstainVotes = this.state.voteData.VoteMember.filter(vm => vm.ResponseCode === \"A\").length.toString();\n        this.handleInputChange('VoteTally', '(' + yeaVotes + '-Y ' + nayVotes + \"-N\" + (abstainVotes !== \"0\" ? \" \" + abstainVotes + \"-A\" : \"\") + \")\")\n    }\n\n    togglePreview() {\n        this.setState(state => ({\n            isPreviewing: !state.isPreviewing\n        }));\n    }\n\n    togglePortal() {\n        this.setState({\n            showPortal: !this.state.showPortal\n        }, () => {\n            if (this.state.showPortal) {\n                this.toggleTallySheetPDFPreview();\n            }\n        });\n    }\n\n    toggleTallySheetPDFPreview() {\n        this.setState({\n            gettingPdf: true\n        });\n        // This endpoint returns a pdf document and not json so the partnerRequest function will not work\n        // It doesn't need to be saved to the redux store because it will not be referenced after the user sees it. So it is called here within the component.\n        const API_URL = window.env ? window.env.API_SERVER : '';\n        const idToken = 'LIS_ID_TOKEN';\n        let signal = new window.AbortController().signal;\n        const config = {\n            headers: {\n                'content-type': \"application/json; charset=utf-8\",\n                Authorization: \"Bearer \" + localStorage.getItem(idToken),\n                'WebAPIKey': process.env.REACT_APP_API_KEY\n            },\n            method: \"GET\",\n            signal: signal\n        };\n        let params = `?voteId=${this.state.voteData.VoteID}` + `&IsNonLegislative=` + ((this.state.voteData.LegislationNumber || this.state.voteData.VoteLegislation.length > 0) ? false : true)\n        fetch((API_URL || process.env.REACT_APP_VOTE_FILE_GEN_URL) + '/VoteFileGeneration/api/PreviewTallySheetFileAsync' + params, config)\n            .then(response => {\n                if (response.status === 204) {\n                    throw 'No Content';\n                } else if (response.status > 399) {\n                    throw response;\n                } else {\n                    response.blob()\n                        .then(res => {\n                            if (this.pdfRef && this.pdfRef.current) {\n                                let pdfRef = this.pdfRef.current;\n                                pdfRef.setAttribute('src', URL.createObjectURL(res));\n                                pdfRef.onload = () => {\n                                    this.setState({\n                                        gettingPdf: false\n                                    });\n                                };\n                            }\n                        })\n                }\n            }).catch(err => {\n                if (err.name === 'AbortError') {\n                    return;\n                }\n                this.setState({\n                    gettingPdf: false\n                });\n                //This is a response and the text needs to be extracted\n                if (err.text) {\n                    err.text().then(err => console.log(err.toString()));\n                } else {\n                    console.log(err.toString())\n                }\n                this.props.actions.makeToast([{ message: \"Failed To Get Data\", type: \"failure\" }]);\n            })\n    }\n\n    toggleWarning() {\n        this.setState({\n            showWarning: !this.state.showWarning\n        })\n    }\n\n    handleSave(isPublishing) {\n        this.setState({ isSaving: true, showWarning: false }, () => {\n            let voteData = { ...this.state.voteData };\n            if (isPublishing) {\n                voteData.IsPublic = true;\n            }\n\n            this.props.actions.saveVote({ VoteList: [voteData] })\n                .then(async () => {\n                    if (this.props.votes.voteSaveError) {\n                        throw this.props.votes.voteSaveError;\n                    }\n                    if (this.props.votes.voteSave.length === 0) {\n                        throw 'No vote data returned'\n                    }\n                    this.setState({ pendingSave: false })\n                    const voteData = JSON.parse(JSON.stringify(this.props.votes.voteSave[0]));\n                    if (isPublishing) {\n                        //Call Vote File Generation and move the user back to the grid\n                        this.props.actions.voteFileGen('?voteID=' + voteData.VoteID)\n                            .then(() => {\n                                if (this.props.votes.voteFileError) {\n                                    console.log(this.props.votes.voteFileError.toString());\n                                }\n                            })\n                        if (voteData.FinalVote && voteData.VoteType === \"Committee\" && voteData.CommitteeID && !voteData.ParentCommitteeID && voteData.VoteDate) {\n                            let committeeSameDayVoteList = [...this.state.committeeSameDayVoteList];\n                            committeeSameDayVoteList = committeeSameDayVoteList.concat(voteData.VoteLegislation.filter(vl => !vl.DeletionDate).map(vl => { return { LegislationNumber: vl.LegislationNumber, EventCode: voteData.EventCode } }));\n                            const success = await this.props.createChairmansReportSummarizedOnMinutes(voteData.SessionID, voteData.ChamberCode, voteData.CommitteeID, moment(voteData.VoteDate).utc().hour(0), committeeSameDayVoteList);\n                            if (!success) {\n                                this.props.actions.makeToast([{ message: \"Vote Publish Successful, Chairman's Report Save Failed\", type: \"failure\", long: true }]);\n                            } else {\n                                this.props.actions.makeToast([{ message: \"Vote Published\", type: \"success\" }]);\n                            }\n                        } else {\n                            this.props.actions.makeToast([{ message: \"Vote Published\", type: \"success\" }]);\n                        }\n                        this.setState({ isDirty: false }, () => {\n                            this.props.history.push('/vote-management');\n                        });\n                    } else {\n                        this.props.actions.makeToast([{ message: \"Vote Saved\", type: \"success\" }]);\n                        this.setState({\n                            voteData: voteData,\n                            isSaving: false,\n                            isDirty: false,\n                            changeVotes: false,\n                            savedIncorporated: INCORPORATED_ACTIONS.includes(voteData.EventCode)\n                        });\n                    }\n                }).catch((err) => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err.toString());\n                    this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                    this.setState({\n                        isSaving: false\n                    });\n                });\n        });\n    }\n\n    toggleChangeVotes() {\n        this.setState({ changeVotes: !this.state.changeVotes }, () => {\n            if (!this.state.changeVotes) {\n                this.resetVoteMembers();\n            }\n        })\n    }\n\n    getCommittees(sessionId) {\n        this.props.actions.getCommitteeList(sessionId).then(() => {\n            let committeeList = [...this.props.committee.committeeList.filter(x => x.ChamberCode !== \"H\")];\n            committeeList.forEach(committee => {\n                committee.label = committee.Name;\n                committee.value = committee.CommitteeID;\n            });\n            this.setState({\n                committeeList: committeeList\n            });\n\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    getBills(sessionId) {\n        this.props.actions.getBillNumbers('?sessionID=' + sessionId).then(() => {\n            let billNumbers = this.props.bills.billNumbers;\n            billNumbers.forEach(bill => {\n                bill.label = bill.LegislationNumber;\n                bill.value = bill.LegislationNumber;\n            })\n            this.setState({\n                sessionBills: billNumbers\n            });\n        })\n    }\n\n    componentDidMount() {\n        const voteId = this.props.match.params.voteid;\n        this.props.actions.getVoteDetails('?voteID=' + voteId, true)\n            .then(() => {\n                if (this.props.votes.voteDetailsError) {\n                    throw this.props.votes.voteDetailsError;\n                }\n                if (this.props.votes.voteDetailsResponse.length === 0) {\n                    throw \"Cannot get vote data\";\n                }\n                const voteData = JSON.parse(JSON.stringify(this.props.votes.voteDetailsResponse[0]));\n\n                //Get bills in the session for the bill dropdown\n                this.props.actions.getSessionBills('?sessionID= ' + voteData.SessionID).then(() => {\n                    let billList = [...this.props.bills.sessionBills];\n                    billList.forEach(bill => {\n                        bill.label = bill.LegislationNumber\n                        bill.value = bill.LegislationID\n                    });\n                    this.setState({\n                        billList: billList,\n                    })\n\n                    // if this is a final vote, check other votes for this committee on this day to ensure whether or not this vote should be publishable\n                    if (voteData.FinalVote && voteData.VoteType === \"Committee\" && voteData.CommitteeID && !voteData.ParentCommitteeID) {\n                        this.getVoteListForFinalVote(voteData);\n                    } else {\n                        this.setState({\n                            isLoaded: true,\n                            voteData: voteData\n                        }, () => {\n                            this.getVoteActionReferences(true);\n                            if (voteData.VoteType === \"Floor\") {\n                                this.getCalendarCategoryTypes();\n                            }\n                        });\n                    }\n                    //Get the session data for use in the preview\n                    this.props.actions.getSessionById(this.props.votes.voteDetailsResponse[0].SessionID)\n\n                    this.getCommittees(this.props.votes.voteDetailsResponse[0].SessionID);\n                    this.getBills(this.props.votes.voteDetailsResponse[0].SessionID);\n                })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n                this.setState({\n                    message: err.toString(),\n                    isLoaded: true\n                });\n            });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    getVoteListForFinalVote(voteData) {\n        let voteParams = `?startDate=${moment(voteData.VoteDate).startOf('day').format('YYYY-MM-DDTHH:mm:ss')}&endDate=${moment(voteData.VoteDate).endOf('day').format('YYYY-MM-DDTHH:mm:ss')}`;\n        voteParams += '&chamberCode=' + voteData.ChamberCode;\n        voteParams += '&voteTypeID=' + voteData.VoteTypeID;\n        voteParams += '&committeeID=' + voteData.CommitteeID;\n        this.props.actions.getVoteList(voteParams)\n            .then(() => {\n                if (this.props.votes.voteListError) {\n                    throw this.props.votes.voteListError;\n                }\n                if (this.props.votes.voteList.length === 0) {\n                    throw 'No Votes in list'; // there should be at least one considering we already retrieved one\n                }\n                this.setState({\n                    isLoaded: true,\n                    voteData: voteData,\n                    preventPublish: this.props.votes.voteList.find(v => v.VoteID !== voteData.VoteID && v.CommitteeID === voteData.CommitteeID && !v.IsPublic), //don't allow publishing Final Votes before all preceding votes for that committee are published,\n                    committeeSameDayVoteList: this.props.votes.voteList.filter(v => v.VoteID !== voteData.VoteID && v.CommitteeID === voteData.CommitteeID).map(v => { return { LegislationNumber: v.LegislationNumber, EventCode: v.EventCode } })\n                }, () => {\n                    this.getVoteActionReferences(true);\n                });\n            })\n    }\n\n    render() {\n        const { voteData, isLoaded, isPreviewing, message, isSaving, pendingSave, preventPublish, selectedVoteActionDescription, voteActionList, selectedCalendarCategoryType, calendarCategoryTypeList, editingVoteLegislation } = this.state;\n\n        const customStyles = (multi) => ({\n            option: (base, state) => ({\n                ...base,\n                fontSize: '0.8em',\n            }),\n            control: (base) => ({\n                ...base,\n                padding: '1px',\n                margin: \"10px 0 0 0\",\n                minHeight: 0,\n                fontSize: '0.8em',\n                height: !multi && \"32px\",\n                zIndex: multi && '10'\n            }),\n            valueContainer: (base) => ({\n                ...base,\n                height: !multi && \"32px\"\n            }),\n            dropdownIndicator: (base) => ({\n                ...base,\n                paddingTop: \"0px\",\n                paddingBottom: \"0px\"\n            }),\n            input: (base) => ({\n                ...base,\n                margin: \"0px\",\n                position: multi ? \"relative\" : \"absolute\"\n            }),\n            singleValue: (base, state) => {\n                return { ...base, };\n            },\n            menu: (base) => ({\n                ...base,\n                position: 'absolute',\n                zIndex: '10'\n            })\n        })\n\n        if (message) {\n            return (\n                <div className=\"dlas-forms\">\n                    <span>{message}</span>\n                </div>);\n        }\n        if (!isLoaded) {\n            return (\n                <div className=\"user-forms\">\n                    <div className=\"center-spinner spinner\">Loading results...</div>\n                </div>);\n        }\n        if (isPreviewing) {\n            return (\n                <div>\n                    <div className=\"flex-row\">\n                        <h2>Vote Preview</h2>\n                        <ReactToPrint\n                            trigger={() => <a type=\"button\" className=\"button print\"> Print</a>}\n                            content={() => this.componentRef}\n                            pageStyle={\"break-inside: avoid\"}\n                        />\n                    </div>\n                    <div ref={el => (this.componentRef = el)}>\n                        <VoteDetails\n                            sessionData={this.props.session.selectedSession}\n                            billData={voteData.VoteLegislation ? voteData.VoteLegislation.filter(vl => !vl.DeletionDate) : []}\n                            voteMembers={voteData.VoteMember || []}\n                            voteData={voteData}\n                        />\n                    </div>\n                    <div className=\"button-bar\">\n                        <div></div>\n                        <div className=\"align-right\">\n                            <button onClick={this.togglePreview} type=\"button\" className=\"button secondary\">Edit</button>\n                            <button onClick={() => this.handleSave(true)} type=\"button\" disabled={isSaving || preventPublish} className=\"button\">Publish</button>\n                            {preventPublish && <p className=\"input-feedback\">You must publish all preceding votes for this commmittee before publishing this final vote</p>}\n                        </div>\n                    </div>\n                </div>\n            );\n        }\n\n        let showVoteTallyWarningMessage = false;\n        let voteTallyInDescription = voteData.Description.match(/\\(\\d+-Y\\s\\d+-N(\\s\\d+-A)?\\)/);\n        if (voteTallyInDescription) {\n            voteTallyInDescription = voteTallyInDescription[0];\n            showVoteTallyWarningMessage = voteTallyInDescription !== voteData.VoteTally;\n        }\n\n        return (\n            <div className=\"user-forms\">\n                <div>\n                    <Prompt\n                        when={this.state.isDirty}\n                        message={`You have unsaved changes. Are you sure you would like to leave?`}\n                    />\n                </div>\n                {this.state.showPortal &&\n                    <Popout togglePortal={this.togglePortal} windowTitle=\"Preview\">\n                        {this.state.gettingPdf &&\n                            <div className=\"center-spinner spinner\">You must save before seeing changes in this PDF preview</div>\n                        }\n                        <iframe style={{ display: this.state.gettingPdf ? 'none' : 'block', width: '100%', height: '100%' }} ref={this.pdfRef}></iframe>\n                    </Popout>\n                }\n                {this.state.showWarning &&\n                    <div className=\"schedule-modal\">\n                        <div className=\"schedule-modal-content\">\n                            <p>You are about to save a change to a vote. Are you sure about this?</p>\n                            <button className=\"button secondary float-right\" onClick={() => this.toggleWarning(false)}>No</button>\n                            <button className=\"button primary float-right\" onClick={() => this.handleSave()} style={{ marginRight: \"15px\" }}>Yes</button>\n                            <br />\n                        </div>\n                    </div>\n                }\n                <div className=\"dlas-forms\">\n                    <form className=\"vote-form\">\n                        <fieldset className=\"fieldset-collapse fieldset-open\">\n                            <legend>Vote Information</legend>\n                            <div className=\"inner-grid two\">\n                                <div className=\"multi-row three no margin\">\n                                    <div>\n                                        <label className=\"label\" htmlFor=\"sequence\">Vote Number</label>\n                                        <input\n                                            id=\"vote-number\"\n                                            type=\"text\"\n                                            placeholder=\"Vote Number\"\n                                            value={voteData.VoteNumber || ''}\n                                            onChange={(e) => this.handleInputChange('VoteNumber', e.target.value)}\n                                        />\n                                    </div>\n                                    <div>\n                                        <label className=\"label\" htmlFor=\"time\">Time of Vote</label>\n                                        <DatePicker\n                                            id=\"time\"\n                                            selected={moment(voteData.VoteDate)}\n                                            onChange={this.handleDateChange}\n                                            showTimeSelect\n                                            timeFormat=\"h:mm A\"\n                                            timeIntervals={1}\n                                            timeCaption=\"Time\"\n                                            dateFormat=\"MM/DD/YYYY h:mm A\"\n                                        />\n                                    </div>\n                                    <div>\n                                        <label className=\"label\" htmlFor=\"pass-fail\">Pass/Fail</label>\n                                        <Select\n                                            id=\"pass-fail\"\n                                            className=\"grid-selector-dropdown\"\n                                            styles={customStyles()}\n                                            options={PassFailOptions}\n                                            value={PassFailOptions.find(o => o.value === voteData.PassFail)}\n                                            onChange={(value) => this.handleInputChange(\"PassFail\", value.value)} />\n                                    </div>\n                                </div>\n                                <div className=\"multi-row two no margin\" style={{ gap: '15px', gridTemplateColumns: '80% 20%' }}>\n                                    <div style={{ display: 'grid', gridTemplateColumns: '1fr 100px' }}>\n                                        <div>\n                                            <div>\n                                                <label className=\"label\">Bills</label>\n                                                <a className={`icon ${editingVoteLegislation ? 'save' : 'edit'}`} style={{ marginLeft: '7px' }} onClick={this.toggleEditVoteLegislation} />\n                                                {editingVoteLegislation && <a className=\"icon delete\" style={{ marginLeft: '7px' }} onClick={() => this.toggleEditVoteLegislation(true)} />}\n                                            </div>\n                                            {voteData.VoteLegislation &&\n                                                (editingVoteLegislation ?\n                                                    (this.state.voteData.ChamberCode === \"S\" && this.state.voteData.VoteType === \"Committee\")\n                                                        ? <Select\n                                                            styles={customStyles(true)}\n                                                            options={this.state.billList.filter(bl => !voteData.VoteLegislation.filter(vl => !vl.DeletionDate).map(vl => vl.LegislationID).includes(bl.LegislationID))}\n                                                            value={voteData.VoteLegislation.filter(vl => !vl.DeletionDate)}\n                                                            getOptionLabel={vl => vl.LegislationNumber}\n                                                            onChange={this.handleSenateCommitteeVoteLegislationChange}\n                                                        />\n                                                        : <Select\n                                                            styles={customStyles(true)}\n                                                            options={this.state.billList.filter(bl => !voteData.VoteLegislation.filter(vl => !vl.DeletionDate).map(vl => vl.LegislationID).includes(bl.LegislationID))}\n                                                            value={voteData.VoteLegislation.filter(vl => !vl.DeletionDate)}\n                                                            getOptionLabel={vl => vl.LegislationNumber}\n                                                            onChange={this.handleVoteLegislationChange}\n                                                            isMulti /* Conditionals for isMulti don't work */\n                                                        />\n                                                    :\n                                                    <input\n                                                        type=\"text\"\n                                                        value={voteData.VoteLegislation.filter(vl => !vl.DeletionDate).map((leg, index) => leg.LegislationNumber).join(', ')}\n                                                        title={voteData.VoteLegislation.filter(vl => !vl.DeletionDate).map((leg, index) => leg.LegislationNumber).join(', ')}\n                                                        disabled\n                                                    />)\n                                            }\n                                        </div>\n                                        <div style={{ position: 'relative', left: \"20px\" }}>\n                                            <div className=\"flex-row\" style={{ justifyContent: 'flex-start', alignItems: 'center' }}>\n                                                <div style={{ textAlign: 'left', width: '60px' }}>\n                                                    <label htmlFor=\"reprint-button\" style={{ paddingLeft: '0px' }} className=\"checkbox-label label no-background\">Is Block</label>\n                                                    <div className=\"toggle-switch\" disabled={this.state.settingIsBlock || (voteData.IsBlock && voteData.VoteLegislation && voteData.VoteLegislation.filter(v => !v.DeletionDate).length > 1)} onClick={() => this.handleInputChange(\"IsBlock\", !voteData.IsBlock)}>\n                                                        <input id=\"reprint-button\" checked={voteData.IsBlock} type=\"checkbox\" />\n                                                        <span className=\"slider\"></span>\n                                                    </div>\n                                                </div>\n                                                {this.state.settingIsBlock && <div className=\"spinner small-spinner\" style={{ height: '0px' }} />}\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div className=\"published-status multi-row two\">\n                                        {voteData.VoteType === \"Committee\" && voteData.CommitteeID && !voteData.ParentCommitteeID && voteData.VoteDate &&\n                                            <div style={{ width: '102%', textAlign: 'left' }}>\n                                                <label htmlFor=\"reprint-button\" style={{ paddingLeft: '0px' }} className=\"checkbox-label label no-background\">Final Vote</label>\n                                                <div className=\"toggle-switch\" onClick={() => this.handleInputChange(\"FinalVote\", !voteData.FinalVote)}>\n                                                    <input id=\"reprint-button\" checked={voteData.FinalVote} type=\"checkbox\" />\n                                                    <span className=\"slider\"></span>\n                                                </div>\n                                            </div>\n                                        }\n                                        {voteData.IsPublic ? <p style={{ textAlign: 'right', marginTop: '0px' }}>Published</p> : <p style={{ marginTop: '0px' }} className=\"dirty\">Not Published</p>}\n                                    </div>\n                                </div>\n                            </div>\n                            <div className=\"multi-row three-two-and-one no margin\">\n                                <div>\n                                    <label className=\"label\" htmlFor=\"vote-act\">Vote Action</label>\n                                    <Select\n                                        id=\"vote-act\"\n                                        value={selectedVoteActionDescription}\n                                        options={voteActionList}\n                                        getOptionLabel={v => v.EventCode + \" - \" + v.Description}\n                                        getOptionValue={v => v.EventCode}\n                                        styles={customStyles()}\n                                        placeholder={this.state.loadingVoteActionList ? 'Loading...' : 'Select...'}\n                                        onChange={this.handleVoteActionDescriptionChange}\n                                    />\n                                </div>\n                                <div>\n                                    <label className=\"label\" htmlFor=\"ref-committee\">Committee Rereferred</label>\n                                    <Select\n                                        id=\"ref-committee\"\n                                        value={this.state.committeeList ? this.state.committeeList.find(x => x.value === this.state.voteData.ReferToCommitteeID) : { label: \"Loading...\" }}\n                                        options={this.state.committeeList}\n                                        styles={customStyles()}\n                                        placeholder={this.state.loadingVoteActionList ? 'Loading...' : 'Select...'}\n                                        onChange={this.handleCommitteeChange}\n                                        isDisabled={!REFER_ACTIONS.includes(this.state.voteData.EventCode)}\n                                        isClearable\n                                    />\n                                </div>\n                                <div>\n                                    <label className=\"label\" htmlFor=\"motion-code\">Vote Tally</label>\n                                    <input\n                                        id=\"vote-tally\"\n                                        className={showVoteTallyWarningMessage ? 'input-feedback-warning-background' : ''}\n                                        type=\"text\"\n                                        placeholder=\"Vote Tally\"\n                                        value={voteData.VoteTally}\n                                        disabled\n                                    />\n                                </div>\n                                {voteData.VoteType === \"Floor\" &&\n                                    <div>\n                                        <label className=\"label\" htmlFor=\"vote-act\">Calendar Category</label>\n                                        <Select\n                                            id=\"vote-act\"\n                                            value={selectedCalendarCategoryType}\n                                            options={calendarCategoryTypeList}\n                                            getOptionLabel={v => v.Description + (v.DisplayType ? ' (' + v.CategoryType + ')' : '')}\n                                            getOptionValue={v => v.CalendarCategoryTypeID}\n                                            styles={customStyles()}\n                                            onChange={this.handleCalendarCategoryTypeChange}\n                                        />\n                                    </div>\n                                }\n                            </div>\n                            <div className=\"multi-row three-and-one no margin\">\n                                <div>\n                                    <label className=\"label\" htmlFor=\"vote-desc\">Vote Description (Appears on the Tally Sheet)</label>\n                                    <input\n                                        style={showVoteTallyWarningMessage ? { marginBottom: '0px' } : {}}\n                                        className={showVoteTallyWarningMessage ? 'input-feedback-warning-background' : ''}\n                                        id=\"vote-desc\"\n                                        type=\"text\"\n                                        placeholder=\"Vote Description\"\n                                        value={voteData.Description}\n                                        onChange={(e) => this.handleInputChange(\"Description\", e.target.value)}\n                                    />\n                                    {showVoteTallyWarningMessage && <p className=\"input-feedback-warning\" style={{ marginTop: '2px' }}>{voteTallyInDescription} in the Vote Description does not match the Vote Tally {voteData.VoteTally}. This will not prevent you from saving.</p>}\n                                </div>\n                                <div>\n                                    <label className=\"label\" htmlFor=\"vote-leg\">Incorporating Legislation</label>\n                                    <Select\n                                        id=\"vote-leg\"\n                                        value={(this.state.billList && this.state.voteData.ReferenceID && INCORPORATED_ACTIONS.includes(this.state.voteData.EventCode) && this.state.billList.find(x => x.LegislationID === this.state.voteData.ReferenceID)) ? this.state.billList.find(x => x.LegislationID === this.state.voteData.ReferenceID) : { label: \"Select...\" }}\n                                        options={this.state.sessionBills}\n                                        styles={customStyles()}\n                                        onChange={this.handleBillChange}\n                                        isDisabled={!INCORPORATED_ACTIONS.includes(this.state.voteData.EventCode) || !this.state.voteData.VoteType === \"Committee\"}\n                                    />\n                                </div>\n                            </div>\n                            <div>\n                                <button type=\"button\" className=\"button\" onClick={this.toggleChangeVotes}>{!this.state.changeVotes ? 'Change Votes' : 'Cancel'}</button>\n                            </div>\n                            <VoteMembers\n                                voteMembers={this.state.voteData.VoteMember || []}\n                                handleVoteChange={this.handleVoteChange}\n                                changeVotes={this.state.changeVotes}\n                            />\n                            {voteData.VoteType === \"Floor\" &&\n                                <VoteStatements\n                                    members={voteData.VoteMember || []}\n                                    updateStatement={this.updateStatement}\n                                />\n                            }\n                            <div>\n                                <p className=\"title\">{\"Vote Comment\" + (this.state.voteData.ChamberCode === \"S\" ? \" (ex. Lt. Governor's vote in the event of a tie)\" : \"\")}</p>\n                                <input\n                                    style={{ width: \"100%\" }}\n                                    type=\"text\"\n                                    value={this.state.voteData.VoteComment}\n                                    placeholder=\"Vote Comment\"\n                                    onChange={(e) => this.handleInputChange(\"VoteComment\", e.target.value)}\n                                />\n                            </div>\n                        </fieldset>\n                        <div className=\"button-bar\">\n                            <div>\n                                <button type=\"button\" className=\"button\" onClick={this.resetForm}>Reset</button>\n                                {this.state.voteData.MinutesBookID && this.state.voteData.ChamberCode === \"S\" && this.state.voteData.VoteType === \"Committee\" &&\n                                    <>\n                                        <button style={{ marginLeft: \"295px\" }} type=\"button\" className=\"button primary\" onClick={() => this.props.history.push(\"/session-details/\" + this.state.voteData.SessionCode + \"/committee-information/\" + this.state.voteData.CommitteeNumber + \"/meetings/\" + this.state.voteData.MinutesBookID + \"/1\")}>Meeting View</button>\n                                        <button type=\"button\" className=\"button primary\" onClick={() => this.props.history.push(\"/session-details/\" + this.state.voteData.SessionCode + \"/committee-information/\" + this.state.voteData.CommitteeNumber + \"/meetings/\" + this.state.voteData.MinutesBookID + \"/2\")}>Chair's Report</button>\n                                        <button type=\"button\" className=\"button primary\" onClick={() => this.props.history.push(\"/session-details/\" + this.state.voteData.SessionCode + \"/committee-information/\" + this.state.voteData.CommitteeNumber + \"/meetings/\" + this.state.voteData.MinutesBookID + \"/3\")}>Vote Sheet</button>\n                                    </>\n                                }\n                            </div>\n                            <div className=\"align-right\" style={{display: \"inline-flex\", height: \"32px\"}}>\n                                {this.state.showEditingVoteLegislationMessage && <span style={{ fontSize: '15px' }}>Please finish updating the vote legislation</span>}\n                                {this.state.voteData.EventDeletionDate && <span className=\"txt fail\" style={{fontSize: \"15px\", whiteSpace: \"nowrap\"}}>Vote Event has been deleted</span>}\n                                <button disabled={isSaving\n                                    || (this.state.savedIncorporated && !this.state.isDirty)\n                                } onMouseEnter={() => { if (editingVoteLegislation) { this.setState({ showEditingVoteLegislationMessage: true }) } }} onClick={() => editingVoteLegislation ? null : this.state.changeVotes && this.state.isDirty ? this.toggleWarning() : this.handleSave(voteData.IsPublic)} type=\"button\" className=\"button\">{voteData.IsPublic ? \"Republish\" : \"Save\"}</button>\n                                {!voteData.IsPublic && <button disabled={pendingSave || isSaving} onClick={this.togglePreview} type=\"button\" className=\"button secondary\">Review</button>}\n                                {voteData.VoteType === \"Floor\" && voteData.ChamberCode === \"S\" && <button disabled={pendingSave || isSaving} onClick={this.togglePortal} type=\"button\" className=\"button secondary\">Preview Tally</button>}\n                            </div>\n                        </div>\n                    </form>\n                </div>\n            </div>);\n    }\n}\n\nconst VoteMembers = props => {\n    const responseStyle = (res) => {\n        switch (res) {\n            case 'Y':\n                return 'yea';\n            case 'N':\n                return 'nay';\n            case 'A':\n                return 'abs';\n            default:\n                return '';\n        }\n    }\n\n    let arrangedVoteMembers = [[]];\n    let voteColumns = 0;\n\n    props.voteMembers.map((member, index) => {\n        if (index % 10 > 0 || (voteColumns === 0 && arrangedVoteMembers[0].length === 0)) {\n            arrangedVoteMembers[voteColumns].push(member)\n        } else {\n            voteColumns++;\n            arrangedVoteMembers.push([member])\n        }\n    })\n\n    return (\n        <div className=\"no-gap-grid four vote-members\">\n            {arrangedVoteMembers.map((memberColumn, i) =>\n                <div key={\"column-\" + i} className=\"inner-grid ten-vert\">\n                    {memberColumn.map((memberVote, j) =>\n                        <div className=\"inner-grid two vote-member-container\" key={\"member-\" + j}>\n                            <span>{memberVote.PatronDisplayName}</span>\n                            <div>\n                                <select disabled={!props.changeVotes} onChange={(e) => props.handleVoteChange(parseInt(i.toString() + j.toString()), e.target.value)} className={\"vote-response \" + responseStyle(memberVote.ResponseCode)} value={memberVote.ResponseCode}>\n                                    <option value=\"Y\">Y</option>\n                                    <option value=\"N\">N</option>\n                                    <option value=\"A\">A</option>\n                                    <option value=\"X\">X</option>\n                                </select>\n                            </div>\n                        </div>\n                    )}\n                </div>\n            )}\n        </div>);\n}\n\nclass VoteStatements extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedMember: '',\n            editorContent: '',\n            newVoteStatement: []\n        }\n        this.toggleEditing = this.toggleEditing.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.handleMemberSelection = this.handleMemberSelection.bind(this);\n        this.saveChange = this.saveChange.bind(this);\n        this.addStatement = this.addStatement.bind(this);\n        this.exitEdit = this.exitEdit.bind(this);\n    }\n\n    handleMemberSelection(val) {\n        this.setState({\n            selectedMember: val\n        });\n    }\n\n    toggleEditing(statementIndex, memberId) {\n        let members = [...this.props.members];\n        const memberIndex = members.findIndex(member => member.MemberID === memberId);\n        members[memberIndex].isEditing = !members[memberIndex].isEditing;\n        this.state.newVoteStatement[statementIndex] = members[memberIndex].VoteStatement;\n        this.props.updateStatement(members);\n    }\n\n    exitEdit() {\n        this.setState({\n            selectedMember: \"\",\n            editorContent: \"\"\n        })\n    }\n\n    handleChange(statementIndex, val) {\n        let newVoteStatement = [...this.state.newVoteStatement];\n        newVoteStatement[statementIndex] = val\n        this.setState({\n            newVoteStatement: newVoteStatement\n        });\n    }\n\n    saveChange(statementIndex, memberId) {\n        let members = [...this.props.members];\n        const memberIndex = members.findIndex(member => member.MemberID === memberId);\n        members[memberIndex].VoteStatement = this.state.newVoteStatement[statementIndex];\n        members[memberIndex].isEditing = false;\n        this.props.updateStatement(members);\n    }\n\n    addStatement() {\n        let members = [...this.props.members];\n        const memberIndex = members.findIndex(member => member.MemberID === this.state.selectedMember.MemberID);\n        members[memberIndex].VoteStatement = this.state.editorContent;\n        this.props.updateStatement(members);\n        this.setState({\n            selectedMember: '',\n            editorContent: ''\n        });\n    }\n\n    removeStatement(memberId) {\n        let members = [...this.props.members];\n        const memberIndex = members.findIndex(member => member.MemberID === memberId);\n        members[memberIndex].VoteStatement = '';\n        this.props.updateStatement(members);\n    }\n\n    render() {\n        const { selectedMember, editorContent, newVoteStatement } = this.state;\n        let memberOptions = [];\n        this.props.members.forEach(member => {\n            if (!member.VoteStatement) {\n                member.label = member.PatronDisplayName;\n                member.value = member.MemberID;\n                memberOptions.push(member);\n            }\n        });\n        const voteStatements = this.props.members.filter(member => member.VoteStatement);\n        const customStyles = {\n            option: (base, state) => ({\n                ...base,\n                fontSize: '0.8em',\n            }),\n            control: (base) => ({\n                ...base,\n                padding: '1px',\n                margin: 0,\n                minHeight: 0,\n                fontSize: '0.8em',\n            }),\n            singleValue: (base, state) => {\n                return { ...base, };\n            }\n        }\n        return (\n            <div className=\"vote-statements\">\n                <p className=\"title\">Add a Vote Statement</p>\n\n                <div className=\"vote-statement-text no-gap-grid wide-middle\">\n                    <div className=\"vote-statement-header\">\n                        <span>Member</span>\n                    </div>\n                    <div className=\"vote-statement-header\">\n                        <span>Statement</span>\n                    </div>\n                    <div className=\"vote-statement-header\">\n                        <span></span>\n                    </div>\n                    {voteStatements.map((statement, index) =>\n                        <React.Fragment key={index}>\n                            <div className=\"vote-statement-content\">\n                                <span>{statement.PatronDisplayName}</span>\n                            </div>\n                            {statement.isEditing ?\n                                <React.Fragment>\n                                    <div className=\"vote-statement-content\">\n                                        <input\n                                            type=\"text\"\n                                            value={newVoteStatement[index]}\n                                            onChange={e => this.handleChange(index, e.target.value)}\n                                        />\n                                    </div>\n                                    <div>\n                                        <button onClick={() => this.saveChange(index, statement.MemberID)} type=\"button\" className=\"icon save\"></button>\n                                        <button onClick={() => this.toggleEditing(index, statement.MemberID)} type=\"button\" className=\"icon delete\"></button>\n                                    </div>\n                                </React.Fragment>\n                                :\n                                <React.Fragment>\n                                    <div className=\"vote-statement-content\">\n                                        <span>{statement.VoteStatement}</span>\n                                    </div>\n                                    <div>\n                                        <button onClick={() => this.toggleEditing(index, statement.MemberID)} type=\"button\" className=\"icon edit\"></button>\n                                        <button onClick={() => this.removeStatement(statement.MemberID)} type=\"button\" className=\"icon delete\"></button>\n                                    </div>\n                                </React.Fragment>\n                            }\n                        </React.Fragment>\n                    )}\n                    <div className=\"member-dropdown\">\n                        <Select\n                            className=\"grid-selector-dropdown\"\n                            styles={customStyles}\n                            options={memberOptions}\n                            value={selectedMember}\n                            onChange={this.handleMemberSelection}\n                        />\n                    </div>\n                    <div>\n                        {selectedMember ?\n                            <input\n                                type=\"text\"\n                                id=\"new-vote-statement-text\"\n                                value={editorContent}\n                                onChange={(e) => {\n                                    this.setState({\n                                        editorContent: e.target.value\n                                    });\n                                }}\n                            />\n                            :\n                            <span></span>\n                        }\n                    </div>\n                    <div>\n                        {selectedMember ?\n                            <React.Fragment>\n                                <button onClick={this.addStatement} type=\"button\" className=\"icon save\"></button>\n                                <button onClick={this.exitEdit} type=\"button\" className=\"icon delete\"></button>\n                            </React.Fragment>\n                            :\n                            <span></span>\n                        }\n                    </div>\n\n                </div>\n\n\n            </div>);\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { votes, nav, session, calendar, bills, committee } = state;\n        return {\n            votes,\n            nav,\n            session,\n            calendar,\n            bills,\n            committee\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, voteActionCreators, navActionCreators, sessionActionCreators, calendarActionCreators, billActionCreators, committeeActionCreators), dispatch)\n        }\n    }\n)(VoteForm)","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { Route } from 'react-router';\nimport VoteGrid from './lis-vote-grid';\nimport VoteForm from './lis-vote-form'\nimport moment from 'moment-timezone';\nimport { communicationsActionCreators } from '../../../stores/lis-communications-store';\nimport { minutesActionCreators } from '../../../stores/lis-minutes-store';\nimport { voteActionCreators } from '../../../stores/lis-votes-store';\n\nclass VoteManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            startDate: moment(),\n            endDate: moment(),\n            chamber: null,\n            committee: null,\n            voteOrigin: null,\n            organizedVotes: [],\n            isLoaded: true\n        };\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.getVotes = this.getVotes.bind(this);\n        this.showVotes = this.showVotes.bind(this);\n        this.createChairmansReportSummarizedOnMinutes = this.createChairmansReportSummarizedOnMinutes.bind(this);\n    }\n\n    handleDateChange(key, value, callback) {\n        this.setState({\n            [key]: value\n        }, () => callback());\n    }\n\n    handleChange(key, value, callback) {\n        this.setState({\n            [key]: value\n        }, () => {\n            if (key === 'voteOrigin' || key === 'chamber') {\n                this.setState({ committee: null }, () => {\n                    if (callback) {\n                        callback();\n                    }\n                })\n            } else {\n                if (callback) {\n                    callback();\n                }\n            }\n        });\n    }\n\n    showVotes(dateIndex, value) {\n        let organizedVotes = [...this.state.organizedVotes];\n        organizedVotes[dateIndex].show = typeof value === 'boolean' ? value : !organizedVotes[dateIndex].show;\n        this.setState({\n            organizedVotes: organizedVotes\n        });\n    }\n\n    async createChairmansReportSummarizedOnMinutes(sessionID, chamberCode, committeeID, commDate, votedLegislation) {\n        let success = false;\n        let createObj = {\n            CommunicationDate: commDate,\n            IsPublic: false,\n            ChamberCode: chamberCode,\n            CommunicationType: 'Committee',\n            CommitteeID: committeeID,\n            SessionID: sessionID,\n        };\n\n        await this.props.actions.createComm({ CommunicationResponse: [createObj] })\n            .then(async () => {\n                success = true; //as long as it got here, succeed because it may be valid/expected for below checks to not pass\n                let communication = this.props.communications.commCreate;\n                if (communication.CommunicationCategories && communication.CommunicationCategories.length) {\n                    const votedLegislationNumbers = votedLegislation.map(vl => vl.LegislationNumber);\n                    const commCategoriesWithVotedBills = communication.CommunicationCategories.filter(cat => cat.CommunicationLegislation && cat.CommunicationLegislation.map(cl => cl.LegislationNumber).some(cl => votedLegislationNumbers.includes(cl)));\n                    if (commCategoriesWithVotedBills.length) {\n                        commCategoriesWithVotedBills.forEach(cat => {\n                            cat.CommunicationLegislation.filter(cl => votedLegislationNumbers.includes(cl.LegislationNumber)).forEach(cl => {\n                                cl.IsActive = true;\n                                //set suffix of communication legislation (indicating presence of amendment or substitute) based on event code\n                                const vote = votedLegislation.find(vl => vl.LegislationNumber === cl.LegislationNumber);\n                                if (vote.EventCode) {\n                                    if (vote.EventCode.endsWith('06') || vote.EventCode.endsWith('07')) { //reported with amendment\n                                        cl.Suffix = 'A'\n                                    } else if (vote.EventCode.endsWith('08')) { //reported with substitute\n                                        cl.Suffix = 'S'\n                                    }\n                                }\n                            })\n                        })\n                        communication.IsPublic = true;\n                        await this.props.actions.saveComm({ CommunicationResponse: [communication] })\n                            .then(async () => {\n                                const commId = this.props.communications.commSave.CommunicationID;\n                                await this.props.actions.saveCommFile(\"?communicationID=\" + commId);\n                            })\n                    } else {\n                        console.log(\"No communication categories in created communication with voted on legislation\")\n                    }\n                } else {\n                    console.log(\"No communication categories in created communication\")\n                }\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n                success = false;\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n                success = false;\n            });\n        return success;\n    }\n\n    getVotes() {\n        const { startDate, endDate, chamber, committee, voteOrigin } = this.state;\n        if (startDate && endDate && chamber && voteOrigin) {\n            this.setState({ isLoaded: false });\n            let voteParams = `?startDate=${moment(startDate).startOf('day').format('YYYY-MM-DDTHH:mm:ss')}&endDate=${moment(endDate).endOf('day').format('YYYY-MM-DDTHH:mm:ss')}`;\n            voteParams += '&chamberCode=' + chamber.value;\n            voteParams += '&voteTypeID=' + voteOrigin.value;\n            if (voteOrigin.label !== \"Floor\" && committee && committee.CommitteeID > 0) {\n                voteParams += '&committeeID=' + committee.CommitteeID\n            }\n            this.props.actions.getVoteList(voteParams)\n                .then(() => {\n                    if (this.props.votes.voteListError) {\n                        throw this.props.votes.voteListError;\n                    }\n\n                    let voteList = [...this.props.votes.voteList];\n                    \n                    if(this.state.chamber.value !== \"S\" && this.state.voteOrigin.value !== 1) {\n                        voteList = voteList.filter(v => !v.IsVoice);\n                    }\n\n                    if (this.props.votes.voteList.length === 0) {\n                        throw 'No Votes in list';\n                    }\n                    // Turn the list of votes into a list of dates each containing a list of votes\n                    // This formatting is done so the votes can be listed in the table with a date as a container\n                    voteList.sort((a, b) => {\n                        return new Date(b.VoteDate) - new Date(a.VoteDate);\n                    });\n                    let organizedVotes = [];\n                    let voteArray = [];\n                    let previousVote = voteList[0];\n                    voteList.forEach((vote, index) => {\n                        if (moment(previousVote.VoteDate).format('L') !== moment(vote.VoteDate).format('L')) {\n                            //Add the list of legislation to the category\n                            let newDateContainer = {\n                                Votes:\n                                    chamber.value === \"H\" ? [...voteArray].sort((a, b) => {\n                                        if (a.LegislationNumber && b.LegislationNumber && (a.FinalVote === b.FinalVote || voteOrigin.label === \"Floor\")) {\n                                            let legislationKeyA = a.LegislationNumber.match(/\\d+/);\n                                            let legislationKeyB = b.LegislationNumber.match(/\\d+/);\n                                            return a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]) ||\n                                                a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]) ||\n                                                (legislationKeyA && legislationKeyA.length && legislationKeyB && legislationKeyB.length && parseInt(legislationKeyA[0]) - parseInt(legislationKeyB[0])) ||\n                                                new Date(a.VoteDate) - new Date(b.VoteDate)\n                                        } else if (a.FinalVote) {\n                                            return 1\n                                        } else {\n                                            return -1\n                                        }\n                                    })\n                                        :\n                                        [...voteArray].sort((a, b) => {\n                                            if (a.FinalVote === b.FinalVote || voteOrigin.label === \"Floor\") {\n                                                return a.VoteNumber.localeCompare(b.VoteNumber)\n                                            } else if (a.FinalVote) {\n                                                return 1\n                                            } else {\n                                                return -1\n                                            }\n                                        }),\n                                Date: previousVote.VoteDate,\n                                sortTimeDesc: false\n                            };\n                            organizedVotes.push(newDateContainer);\n                            //Empty out the leg array so we can use it for another category\n                            voteArray = [];\n                            //Add the first item to the next category\n                            voteArray.push(vote);\n                        } else {\n                            voteArray.push(vote);\n                        }\n                        //Set this variable so the next iteration will know what the vote date of the previous iteration was\n                        previousVote = vote;\n                    });\n                    //If the vote array still has elements then that means not every vote in the results have been added to a container\n                    //So, check to see if the vote array has elements and if so create another container\n                    if (voteArray.length > 0) {\n                        let newDateContainer = {\n                            Votes:\n                                chamber.value === \"H\" ? [...voteArray].sort((a, b) => {\n                                    if (a.FinalVote === b.FinalVote || voteOrigin.label === \"Floor\") {\n                                        let legislationKeyA = a.LegislationNumber?.match(/\\d+/) ?? \"\";\n                                        let legislationKeyB = b.LegislationNumber?.match(/\\d+/) ?? \"\";\n                                        return (a.LegislationNumber && b.LegislationNumber && a.LegislationNumber[0].localeCompare(b.LegislationNumber[0])) ||\n                                            (a.LegislationNumber && b.LegislationNumber && a.LegislationNumber[1].localeCompare(b.LegislationNumber[1])) ||\n                                            (legislationKeyA && legislationKeyA.length && legislationKeyB && legislationKeyB.length && parseInt(legislationKeyA[0]) - parseInt(legislationKeyB[0])) ||\n                                            new Date(a.VoteDate) - new Date(b.VoteDate)\n                                    } else if (a.FinalVote) {\n                                        return 1\n                                    } else {\n                                        return -1\n                                    }\n                                })\n                                    :\n                                    [...voteArray].sort((a, b) => {\n                                        if (a.FinalVote === b.FinalVote || voteOrigin.label === \"Floor\") {\n                                            return a.VoteNumber.localeCompare(b.VoteNumber)\n                                        } else if (a.FinalVote) {\n                                            return 1\n                                        } else {\n                                            return -1\n                                        }\n                                    }),\n                            Date: previousVote.VoteDate,\n                            sortTimeDesc: false\n                        };\n                        organizedVotes.push(newDateContainer);\n                    }\n\n                    const currentlyShownOrganizedVotes = [...this.state.organizedVotes].filter(date => date.show);\n                    currentlyShownOrganizedVotes.forEach(date => {\n                        const newOrganizedVoteDate = organizedVotes.find(newDate => newDate.Date === date.Date);\n                        if (newOrganizedVoteDate) {\n                            newOrganizedVoteDate.show = true;\n                        }\n                    });\n                    this.setState({\n                        isLoaded: true,\n                        organizedVotes: organizedVotes\n                    });\n                })\n                .catch((err) => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err);\n                    this.setState({\n                        isLoaded: true,\n                        organizedVotes: []\n                    });\n                });\n\n            this.props.actions.getVoteActionList(\"?voteTypeID=\" + this.state.voteOrigin.VoteTypeID + \"&chamberCode=\" + this.state.chamber.value)\n        }\n    }\n\n    render() {\n        const { startDate, endDate, voteOrigin, committee, chamber, organizedVotes, isLoaded } = this.state;\n        return (\n            <div>\n                <Route exact path={this.props.match.path} render={props => <VoteGrid\n                    {...props}\n                    startDate={startDate}\n                    endDate={endDate}\n                    voteOrigin={voteOrigin}\n                    committeeVal={committee}\n                    chamber={chamber}\n                    handleDateChange={this.handleDateChange}\n                    handleChange={this.handleChange}\n                    getVotes={this.getVotes}\n                    organizedVotes={organizedVotes}\n                    isLoaded={isLoaded}\n                    showVotes={this.showVotes}\n                    createChairmansReportSummarizedOnMinutes={this.createChairmansReportSummarizedOnMinutes}\n                    voteActions={this.props.votes.voteActionList}\n                />} />\n                <Route path={`${this.props.match.path}/edit-vote/:voteid`} render={props => <VoteForm\n                    {...props}\n                    createChairmansReportSummarizedOnMinutes={this.createChairmansReportSummarizedOnMinutes}\n                />} />\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { votes, communications, minutes } = state;\n        return {\n            votes,\n            communications,\n            minutes\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, voteActionCreators, communicationsActionCreators, minutesActionCreators), dispatch)\n        }\n    }\n)(VoteManagement)","import React from 'react';\nimport moment from 'moment-timezone'\nimport ReactToPrint from 'react-to-print';\n\nclass PrintRoomGrid extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            showRow: [],\n            printPreviewIndex: undefined\n        }\n        this.toggleRow = this.toggleRow.bind(this);\n        this.togglePrintView = this.togglePrintView.bind(this);\n\n        this.componentRef = React.createRef();\n    }\n\n    togglePrintView(value) {\n        this.setState({\n            printPreviewIndex: value\n        })\n    }\n\n    toggleRow(batchIndex) {\n        let showRow = [...this.state.showRow];\n        showRow[batchIndex] = !showRow[batchIndex];\n        this.setState({\n            showRow: showRow\n        });\n    }\n\n    componentDidMount() {\n        if (this.props.urlBatchId !== \"\" && this.props.textResults.length > 0 && this.state.urlBatchIndex === \"\") {\n            let index = this.props.textResults.findIndex(x => x.PrintBatchID == this.props.urlBatchId);\n            this.toggleRow(index)\n        }\n    }\n\n    render() {\n        const { showRow } = this.state;\n        const findMember = memberId => {\n            const patron = this.props.members.find(member => member.MemberID === memberId);\n            if (patron) {\n                return patron.PatronDisplayName;\n            } else {\n                return '';\n            }\n        }\n        const headerStyle = {\n            color: 'white',\n            backgroundColor: '#9e9e9e',\n            padding: '10px',\n            border: '1px solid #e0e0e0'\n        }\n\n        const headerStyleComplete = {\n            color: 'white',\n            backgroundColor: '#dc3545',\n            padding: '10px',\n            border: '1px solid #e0e0e0'\n        }\n\n        const filterTextResults = (textResults) => {\n            let filteredTextResults = [...textResults];\n\n            filteredTextResults = filteredTextResults.filter(x =>\n                this.props.showComplete\n                    ? true\n                    : !this.props.viewOnlyCompletedItems\n                        ? x.BatchItems.findIndex(y => y.PrintDate === undefined) > -1\n                            ? true\n                            : false\n                        : x.BatchItems.findIndex(y => y.PrintDate !== undefined) > -1\n                            ? true\n                            : false\n            )\n\n            filteredTextResults = filteredTextResults.filter(batch => batch.BatchItems.every(text => {\n                if (this.props.introStartDate && this.props.introEndDate) {\n                    let formattedStartDate = this.props.introStartDate.clone().hour(0);\n                    let formattedEndDate = this.props.introEndDate.clone().endOf('day');\n\n                    return moment(text.VersionDate).isBetween(formattedStartDate, formattedEndDate);\n                } else if (this.props.introStartDate) {\n                    let formattedStartDate = this.props.introStartDate.clone().hour(0);\n\n                    return moment(text.VersionDate).isSameOrAfter(formattedStartDate);\n                } else if (this.props.introEndDate) {\n                    let formattedEndDate = this.props.introEndDate.clone().endOf('day');\n\n                    return moment(text.VersionDate).isSameOrBefore(formattedEndDate);\n                } else {\n                    return true;\n                }\n            }));\n\n            return filteredTextResults ?? [];\n        }\n\n        const flattenBatches = (textResults) => {\n            let flatBillList = []\n\n            textResults.forEach(batch => {\n                batch.BatchItems.forEach(item => {\n                    if (item.PrintDate) {\n                        flatBillList.push({ documentCode: item.DocumentCode, printDate: item.PrintDate })\n                    }\n                })\n            });\n\n            return flatBillList.sort((a, b) => { return a.documentCode.localeCompare(b.documentCode) })\n        }\n\n        return this.props.viewCompletedByBill ?\n            <div className='view-by-completed-bills'>\n                {flattenBatches(this.props.textResults).map(x => {\n                    return <p>{x.documentCode + \" - \" + moment(x.printDate).format(\"M/D/YYYY h:mm:ss\")}</p>\n                })}\n            </div>\n            : !this.props.viewCompletedByBill\n                ? <div style={{ marginBottom: \"35px\" }}>\n                    {this.state.printPreviewIndex &&\n                        <div className=\"schedule-modal\">\n                            <div className=\"schedule-modal-content fit-content center-content\" style={{ maxHeight: \"fit-content\", marginTop: \"50px\" }}>\n                                <ReactToPrint\n                                    trigger={() => <button style={{ margin: \"0 0 0 10px\", float: \"right\" }} type=\"button\" className=\"button primary\">Print</button>}\n                                    content={() => this.componentRef}\n                                />\n                                <button style={{ float: \"right\" }} type=\"button\" className=\"button secondary\" onClick={() => this.togglePrintView(undefined)}>Close</button>\n                                {/* All styling is being applied inline due to issues with the bill room's computer (for whatever reason) not loading the styling into the browser print preview window. */}\n                                <div\n                                    ref={el => (this.componentRef = el)}\n                                    style={{\n                                        padding: \"20px 50px\",\n                                        lineHeight: \"2.5em\",\n                                        fontSize: \"16px\"\n                                    }}\n                                >\n                                    <h2 style={{ fontFamily: '\"Lato\", sans-serif', fontWeight: '400', color: '#34495e' }}>\n                                        {moment(this.props.textResults[this.state.printPreviewIndex].BatchDate).format(\"M/D/YYYY h:mm:ss A\")\n                                            + \" \"\n                                            + \"(BATCH \" + this.props.textResults[this.state.printPreviewIndex].BatchSequence + \")\"\n                                            + \" \"\n                                            + (this.props.textResults[this.state.printPreviewIndex].BatchDescription ? this.props.textResults[this.state.printPreviewIndex].BatchDescription : \"\")\n                                            + \" \"\n                                            + (this.props.textResults[this.state.printPreviewIndex].VendorBatch ? \"Vendor\" : \"Bill Room\")\n                                            + \" \"\n                                            + \"Total Pages: \" + this.props.textResults[this.state.printPreviewIndex].totalPageCount\n                                        }</h2>\n                                    <div\n                                        style={{\n                                            display: \"grid\",\n                                            gridTemplateColumns: \"100px 75px 100px 100px 1fr\",\n                                            gridGap: \"10px\",\n                                            textAlign: \"left\",\n                                            overflow: \"hidden\"\n                                        }}\n                                    >\n                                        <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                            Doc Code\n                                        </div>\n                                        <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                            Pages\n                                        </div>\n                                        <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                            Version Date\n                                        </div>\n                                        <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                            Complete?\n                                        </div>\n                                        <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                            Comment\n                                        </div>\n                                    </div>\n                                    {this.props.textResults[this.state.printPreviewIndex].BatchItems.map(item => {\n                                        return (\n                                            <div\n                                                style={{\n                                                    display: \"grid\",\n                                                    gridTemplateColumns: \"100px 75px 100px 100px 1fr\",\n                                                    gridGap: \"10px\",\n                                                    textAlign: \"left\",\n                                                    overflow: \"hidden\"\n                                                }}\n                                            >\n                                                <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                                    {item.DocumentCode}\n                                                </div>\n                                                <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                                    {item.PDFFile[0].PageCount}\n                                                </div>\n                                                <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                                    {moment(item.VersionDate).format(\"MM/DD/YYYY\")}\n                                                </div>\n                                                <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                                    {item.PrintDate ? \"Complete\" : \"Incomplete\"}\n                                                </div>\n                                                <div style={{ overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                                                    {item.Comment}\n                                                </div>\n                                            </div>\n                                        )\n                                    })}\n                                </div>\n                                <ReactToPrint\n                                    trigger={() => <button style={{ margin: \"-20px 0 0 10px\", float: \"right\" }} type=\"button\" className=\"button primary\">Print</button>}\n                                    content={() => this.componentRef}\n                                />\n                                <button style={{ marginTop: \"-20px\", float: \"right\" }} type=\"button\" className=\"button secondary\" onClick={() => this.togglePrintView(undefined)}>Close</button>\n                            </div>\n                        </div>\n                    }\n                    {filterTextResults(this.props.textResults).sort((a, b) => {\n                        return moment(a.BatchDate).isBefore(moment(b.BatchDate)) ? 1 : -1\n                    }).map((batch, batchIndex) => {\n                        let batchDate = moment.utc(batch.BatchDate).utcOffset(-300).format('M/D/YYYY h:mm:ss A');\n\n                        return <div key={batchIndex}>\n                            {batch.BatchItems.length > 0 &&\n                                <React.Fragment>\n                                    <div className=\"flex-row\" style={!batch.BatchItems.find(x => !x.pdfMarked) ? headerStyleComplete : headerStyle}>\n                                        <div>\n                                            <button\n                                                className={showRow[batchIndex] ? \"arrow-up\" : \"arrow-down\"}\n                                                onClick={() => this.toggleRow(batchIndex)}>\n                                            </button>\n                                            <span>{batchDate}</span>\n                                            <span style={{ marginLeft: '5px', fontWeight: \"bold\" }}>({\"BATCH \" + batch.BatchSequence})</span>\n                                            {batch.BatchDescription &&\n                                                <span> - {batch.BatchDescription}</span>\n                                            }\n                                            {batch.VendorBatch\n                                                ? <span> Vendor</span>\n                                                : <span> Bill Room</span>\n                                            }\n                                            <a type=\"button\" className=\"button print white\" onClick={() => {\n                                                let batchIndex = this.props.textResults.findIndex(x => x.PrintBatchID === batch.PrintBatchID);\n                                                this.togglePrintView(batchIndex);\n                                                this.toggleRow(batchIndex);\n                                            }}>Open Print View</a>\n                                        </div>\n                                        <div>\n                                            <span>Total pages: {batch.totalPageCount}</span>\n                                        </div>\n                                    </div>\n                                    {showRow[batchIndex] &&\n                                        <form>\n                                            <div className=\"bill-grid print-bill-grid print-room-bill-grid\">\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <input\n                                                        type=\"checkbox\"\n                                                        checked={batch.selectAll || ''}\n                                                        onChange={() => {\n                                                            let batchIndex = this.props.textResults.findIndex(x => x.PrintBatchID === batch.PrintBatchID);\n                                                            this.props.toggleSelectAll(batchIndex);\n                                                        }} />\n                                                </div>\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <span>Bill #</span>\n                                                </div>\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <span>Document</span>\n                                                </div>\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <span>Pages</span>\n                                                </div>\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <span>Date</span>\n                                                </div>\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <span>Patron</span>\n                                                </div>\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <span>Caption</span>\n                                                </div>\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <span>Status</span>\n                                                </div>\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <span>Comment</span>\n                                                </div>\n                                                <div className={!batch.BatchItems.find(x => !x.pdfMarked) ? \"bill-grid-header completed\" : \"bill-grid-header\"}>\n                                                    <span>View</span>\n                                                </div>\n                                            </div>\n                                            <div>\n                                                {batch.BatchItems.filter(x => {\n                                                    if (!this.props.viewOnlyCompletedItems) {\n                                                        return true\n                                                    } else {\n                                                        return x.PrintDate ? true : false\n                                                    }\n                                                }).map((text, textIndex) =>\n                                                    <div key={textIndex} className=\"bill-grid print-bill-grid print-room-bill-grid\">\n                                                        <div>\n                                                            <input\n                                                                type=\"checkbox\"\n                                                                checked={text.checked || ''}\n                                                                onChange={(e) => {\n                                                                    let batchIndex = this.props.textResults.findIndex(x => x.PrintBatchID === batch.PrintBatchID);\n                                                                    let textIndex = this.props.textResults[batchIndex].BatchItems.findIndex(x => x.BatchItemID === text.BatchItemID);\n                                                                    this.props.toggleText(batchIndex, textIndex, e);\n                                                                }} />\n                                                        </div>\n                                                        <div>\n                                                            <span><a\n                                                                className={text.pdfMarked && \"red\"}\n                                                                target=\"_blank\"\n                                                                href={text.PDFFile[0].FileURL}\n                                                                onClick={() => {\n                                                                    let batchIndex = this.props.textResults.findIndex(x => x.PrintBatchID === batch.PrintBatchID);\n                                                                    let textIndex = this.props.textResults[batchIndex].BatchItems.findIndex(x => x.BatchItemID === text.BatchItemID);\n                                                                    this.props.markPdf(batchIndex, textIndex)\n                                                                }}>\n                                                                {text.LegislationNumber}\n                                                            </a></span>\n                                                        </div>\n                                                        <div>\n                                                            {text.IsReprint && <div className=\"small-text message-error\">REPRINT</div>}\n                                                            <span>{text.DocumentCode}</span>\n                                                        </div>\n                                                        <div>\n                                                            <span>\n                                                                {text.PDFFile && text.PDFFile.length > 0 &&\n                                                                    <React.Fragment>{text.PDFFile[0].PageCount}</React.Fragment>\n                                                                }\n                                                            </span>\n                                                        </div>\n                                                        <div>\n                                                            <span>{moment(text.VersionDate).format('L')}</span>\n                                                        </div>\n                                                        <div>\n                                                            <span>{findMember(text.MemberID)}</span>\n                                                        </div>\n                                                        <div style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}>\n                                                            <span\n                                                                title={text.LegislationDescription || text.Description}\n                                                                style={{ whiteSpace: 'nowrap' }}>\n                                                                {text.LegislationDescription || text.Description}\n                                                            </span>\n                                                        </div>\n                                                        <div>\n                                                            <span>{text.PrintDate ? \"Complete\" : \"Incomplete\"}</span>\n                                                        </div>\n                                                        <div style={text.Comment && text.Comment.length > 12 ? { overflowX: \"scroll\" } : {}}>\n                                                            <span style={{ whiteSpace: \"nowrap\" }}>{text.Comment}</span>\n                                                        </div>\n                                                        <div>\n                                                            <div className=\"inner-grid three\" style={{ gridGap: \"0px\" }}>\n                                                                {text.PDFFile && text.PDFFile.length > 0 ?\n                                                                    <a target=\"_blank\"\n                                                                        href={text.IsPublic ? text.PDFFile[0].FileURL : text.SasURL}\n                                                                        onClick={() => {\n                                                                            let batchIndex = this.props.textResults.findIndex(x => x.PrintBatchID === batch.PrintBatchID);\n                                                                            let textIndex = this.props.textResults[batchIndex].BatchItems.findIndex(x => x.BatchItemID === text.BatchItemID);\n                                                                            this.props.markPdf(batchIndex, textIndex)\n                                                                        }}>\n                                                                        <span className={\"icon pdf\" + (text.pdfMarked ? \" red\" : \"\")}></span>\n                                                                    </a>\n                                                                    :\n                                                                    <br />\n                                                                }\n                                                                <div>\n                                                                    <span\n                                                                        onClick={(e) => this.props.togglePortal(this.props.showPortal, e, text.LegislationTextID)}\n                                                                        className=\"icon paper\"></span>\n                                                                </div>\n                                                                <div>\n                                                                    {text.IsPublic &&\n                                                                        <i className=\"icon book\" />\n                                                                    }\n                                                                </div>\n                                                            </div>\n                                                        </div>\n                                                    </div>\n                                                )}\n                                            </div>\n                                        </form>\n                                    }\n                                </React.Fragment>\n                            }\n                        </div>\n                    }\n                    )}\n                </div> : null\n    }\n}\nexport default PrintRoomGrid;","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { batch, connect } from 'react-redux';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport Popout from '../../../lis-shared/lis-layout/components/lis-popout-component';\nimport Select from 'react-select';\nimport DatePicker from 'react-datepicker';\nimport moment from 'moment-timezone'\nimport renderHTML from 'react-render-html';\nimport PrintRoomGrid from './lis-print-room-grid'\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport { printActionCreators } from '../../../stores/lis-print-store';\n\nconst versionOptions = [\n    { label: \"Introduced\", value: 1 },\n    { label: \"Substitute\", value: 5 },\n    { label: \"Engrossed\", value: 2 },\n    { label: \"Reengrossed\", value: 6 },\n    { label: \"Enrolled\", value: 3 },\n    { label: \"Reenrolled\", value: 7 },\n    { label: \"Chaptered\", value: 4 }\n]\n\nclass PrintManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            sessionOptions: [],\n            billRoomView: false,\n            selectedSession: '',\n            chamberOptions: [\n                { label: 'Both', value: 'Both' },\n                { label: 'House', value: 'H' },\n                { label: 'Senate', value: 'S' }\n            ],\n            selectedChamber: { label: 'Both', value: 'Both' },\n            introStartDate: '',\n            introEndDate: '',\n            search: '',\n            isLoaded: false,\n            isSearching: false,\n            textResults: [],\n            showPortal: false,\n            selectedBill: '',\n            isSaving: false,\n            versionOptions: versionOptions,\n            selectedVersion: { label: 'All', value: 'All' },\n            lastCheckedBills: [],\n            anyChecked: false,\n            urlBatchId: \"\",\n            viewCompletedByBill: false,\n            viewOnlyCompletedItems: false\n        }\n\n        this.handleChange = this.handleChange.bind(this);\n        this.handleSearch = this.handleSearch.bind(this);\n        this.handleFilter = this.handleFilter.bind(this);\n        this.toggleSelectAll = this.toggleSelectAll.bind(this);\n        this.toggleText = this.toggleText.bind(this);\n        this.togglePortal = this.togglePortal.bind(this);\n        this.handleCommentChange = this.handleCommentChange.bind(this);\n        this.handleReleaseToPrint = this.handleReleaseToPrint.bind(this);\n        this.handlePrintComplete = this.handlePrintComplete.bind(this);\n        this.handlePrintAllEnrolled = this.handlePrintAllEnrolled.bind(this);\n        this.toggleBillRoomView = this.toggleBillRoomView.bind(this);\n        this.toggleCommentEdit = this.toggleCommentEdit.bind(this);\n        this.markPdf = this.markPdf.bind(this);\n    }\n\n    handleChange(key, val) {\n        this.setState({\n            [key]: val\n        }, () => {\n            if (key === 'selectedSession' || key === 'selectedVersion') {\n                this.handleSearch();\n            } else {\n                this.handleFilter();\n            }\n        });\n    }\n\n    handleSearch() {\n        this.setState({\n            isSearching: true\n        });\n        // Get the list of members for this session so the patron for the legislation can be shown in the grid\n        this.props.actions.getMemberList('sessionID=' + this.state.selectedSession.SessionID)\n\n        let params = '?isReleased=' + this.state.billRoomView + '&sessionID=' + this.state.selectedSession.SessionID;\n        if (this.state.selectedVersion.value !== 'All') {\n            params += '&legislationVersionID=' + this.state.selectedVersion.value;\n        }\n        if (!this.state.showComplete) {\n            params += '&IsPrinted=false'\n        }\n        this.props.actions.getPrintDocuments(params)\n            .then(() => {\n                if (this.props.print.printDocuments.length === 0) {\n                    throw 'No Results Found';\n                }\n                let promises = [];\n                this.props.print.printDocuments.forEach(batch => {\n                    batch.BatchItems.forEach(text => {\n                        //Set URL for non-public enrolled PDFs\n                        if (!text.SasURL && text.LegislationVersionID === versionOptions.find(v => v.label === \"Enrolled\").value && !text.IsPublic) {\n                            promises.push(new Promise((res, rej) => {\n                                this.props.actions.getSasURL('?billNumber=' + text.LegislationNumber).then(() => {\n                                    text.SasURL = this.props.bills.sasURLLink;\n                                    res();\n                                }).catch(() => {\n                                    console.log(\"Failed to retrieve SasURL for bill \" + text.LegislationNumber);\n                                });\n                            }));\n                        }\n\n                        text.checked = false;\n                    })\n                })\n                Promise.all(promises).then(() => {\n                    // Filter out any entries if any of the filter options are set\n                    this.handleFilter()\n                    this.setState({\n                        isSearching: false,\n                        message: ''\n                    });\n                })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isSearching: false,\n                    message: err.toString()\n                });\n            });\n    }\n\n    handleFilter() {\n        // This is done so the redux state is not mutated by the filters\n        let printDocuments = JSON.parse(JSON.stringify(this.props.print.printDocuments));\n        const { search, introStartDate, introEndDate, selectedChamber, showComplete, showReprints } = this.state;\n\n        printDocuments.forEach(batch => {\n            if (showReprints) {\n                batch.BatchItems = batch.BatchItems.filter(text => text.IsReprint);\n            }\n            // Filter out based on the chambercode. The chambercode is not in the response so assume it using the first letter of the legislation number\n            if (selectedChamber.value !== 'Both') {\n                batch.BatchItems = batch.BatchItems.filter(text => {\n                    return text.LegislationNumber[0].toUpperCase() === selectedChamber.value;\n                });\n            }\n            // Check if the search field is blank before filtering\n            const formattedSearch = search.toLowerCase().replace(/ /g, '');\n            if (formattedSearch) {\n                batch.BatchItems = batch.BatchItems.filter(text => {\n                    if (text.LegislationNumber && text.LegislationNumber.toLowerCase().includes(formattedSearch)) {\n                        return true;\n                    }\n                    if (text.DocumentCode && text.DocumentCode.toLowerCase().includes(formattedSearch)) {\n                        return true;\n                    }\n                    if (text.LDNumber && text.LDNumber.toLowerCase().includes(formattedSearch)) {\n                        return true;\n                    }\n                    if (text.LegislationDescription && text.LegislationDescription.replace(/ /g, '').toLowerCase().includes(formattedSearch)) {\n                        return true;\n                    }\n                    const patron = this.props.members.memberList.find(member => member.MemberID === text.MemberID);\n                    if (patron) {\n                        if (patron.PatronDisplayName.toLowerCase().includes(formattedSearch)) {\n                            return true;\n                        }\n                    }\n                });\n            }\n            // Filter entries based on the draft date if the start date or end date are set\n            batch.BatchItems = batch.BatchItems.filter(text => {\n                let returnItem = true;\n                if (introStartDate) {\n                    let formattedStartDate = introStartDate.clone().hour(0);\n                    returnItem = moment(text.VersionDate).isSameOrAfter(formattedStartDate);\n                }\n                if (introEndDate) {\n                    let formattedEndDate = introEndDate.clone().endOf('day');\n                    returnItem = moment(text.VersionDate).isSameOrBefore(formattedEndDate);\n                }\n                if (introStartDate && introEndDate) {\n                    //Clone them to not mutate the state\n                    let formattedStartDate = introStartDate.clone().hour(0);\n                    let formattedEndDate = introEndDate.clone().endOf('day');\n                    // Add one day to the dates so that results at the outer limits are included as well\n                    returnItem = moment(text.VersionDate).isBetween(formattedStartDate, formattedEndDate);\n                }\n                return returnItem;\n            });\n\n            //This gets the page count\n            //This is done here because the bill room's page needs the page count and this is the only loop that runs regardless.\n            let totalPageCount = 0;\n            batch.BatchItems.forEach(text => {\n                if (text.PDFFile && text.PDFFile.length > 0) {\n                    if (!isNaN(text.PDFFile[0].PageCount)) {\n                        totalPageCount += text.PDFFile[0].PageCount\n                    }\n                }\n\n                text.checked = false;\n            });\n\n            if (this.state.textResults.length) {\n                const batchIndex = this.state.textResults.findIndex(c => c.BatchDate === batch.BatchDate);\n                if (batchIndex > -1) {\n                    this.state.textResults[batchIndex].BatchItems\n                        .forEach(x => {\n                            //If the current dataset has a checked bill that isn't in the new filtered set then add that bill back into the result set\n                            const billInNewFilteredDataset = batch.BatchItems.find(y => y.LegislationTextID === x.LegislationTextID);\n                            if (x.checked && !billInNewFilteredDataset) {\n                                batch.BatchItems.push(x)\n                            } else if (billInNewFilteredDataset) {\n                                billInNewFilteredDataset.checked = this.state.textResults[batchIndex].BatchItems.find(y => y.LegislationTextID === x.LegislationTextID).checked;\n                            }\n                        });\n                }\n            }\n\n            batch.totalPageCount = totalPageCount;\n        });\n\n        this.setState({\n            textResults: printDocuments\n        });\n    }\n\n    toggleSelectAll(batchIndex) {\n        let textResults = [...this.state.textResults];\n        const opposite = !textResults[batchIndex].selectAll;\n\n        textResults[batchIndex].selectAll = opposite;\n        textResults[batchIndex].BatchItems.forEach(text => text.checked = opposite);\n        this.setState({\n            textResults: textResults,\n            anyChecked: opposite\n        })\n    }\n\n    toggleText(batchIndex, textIndex, e) {\n        let textResults = [...this.state.textResults];\n        let lastCheckedBills = this.state.lastCheckedBills;\n        let lastCheckedBill = lastCheckedBills[batchIndex];\n        if (e.nativeEvent.shiftKey && !isNaN(lastCheckedBill) && lastCheckedBill !== -1) {\n            textResults[batchIndex].BatchItems.forEach(agenda => agenda.checked = false);\n            for (let i = 0; i < Math.abs(textIndex - lastCheckedBill); i++) {\n                const index = lastCheckedBill + i * (textIndex - lastCheckedBill) / Math.abs(textIndex - lastCheckedBill);\n                textResults[batchIndex].BatchItems[index].checked = true;\n            }\n        } else {\n            lastCheckedBill = textIndex;\n        }\n        textResults[batchIndex].BatchItems[textIndex].checked = !textResults[batchIndex].BatchItems[textIndex].checked;\n        lastCheckedBills[batchIndex] = lastCheckedBill;\n\n        this.setState({\n            textResults: textResults,\n            lastCheckedBills: lastCheckedBills\n        }, () => {\n            //If we unchecked one that doesn't meet filter requirements we need to take it out of the current dataset\n            if (!textResults[batchIndex].BatchItems[textIndex].checked) {\n                this.handleFilter();\n            }\n\n            let checked = false;\n\n            this.state.textResults.forEach((batch) => {\n                batch.BatchItems.forEach((item) => {\n                    if (item.checked) {\n                        checked = true;\n                    }\n                });\n            });\n\n            this.setState({\n                anyChecked: checked\n            })\n        })\n    }\n\n    togglePortal(showPortal, e, textId) {\n        if (e) {\n            e.stopPropagation();\n        }\n        this.setState({\n            showPortal: !showPortal,\n            selectedBill: { message: 'Loading...' }\n        });\n        if (textId) {\n            this.props.actions.getBillText('?legislationTextID=' + textId)\n                .then(() => {\n                    if (this.props.bills.billTextError) {\n                        throw this.props.bills.billTextError.toString()\n                    }\n                    // We are getting it by ID, so there should only be one\n                    if (this.props.bills.billText.length !== 1) {\n                        throw 'Draft text could not be found'\n                    }\n                    this.setState({\n                        selectedBill: this.props.bills.billText[0]\n                    });\n                }).catch(err => {\n                    this.setState({\n                        selectedBill: { message: err }\n                    })\n                })\n        }\n    }\n\n    handleCommentChange(batchIndex, textIndex, value) {\n        let textResults = [...this.state.textResults];\n        textResults[batchIndex].BatchItems[textIndex].Comment = value;\n\n        this.setState({\n            textResults: textResults\n        })\n    }\n\n    handleReleaseToPrint(vendorBatch) {\n        let isReleased = vendorBatch !== undefined ? true : false;\n        this.setState({\n            isSaving: true\n        }, () => {\n            let releaseDate = new Date();\n            let batchItemsToSave = [];\n            let itemsToRemove = [];\n            this.state.textResults.forEach((batch, batchIndex) => {\n                batch.BatchItems.forEach((item, itemIndex) => {\n                    if (item.checked) {\n                        batchItemsToSave.push(item);\n                        itemsToRemove.push({ batch: batchIndex, item: itemIndex })\n                    }\n                });\n            });\n            if (batchItemsToSave.length === 0) {\n                this.setState({\n                    isSaving: false\n                });\n                return;\n            }\n\n            //Need to decide here whether or not to call createPrintDocument or savePrintDocument based on whether or not we have a PrintBatchID\n            if (this.state.textResults[0].PrintBatchID) {\n                this.props.actions.savePrintDocument(\n                    {\n                        BatchDate: releaseDate,\n                        VendorBatch: vendorBatch,\n                        SessionID: this.state.selectedSession.SessionID,\n                        BatchItems: batchItemsToSave,\n                        IsReleased: isReleased,\n                        PrintBatchID: this.state.textResults[0].PrintBatchID,\n                        ModificationDate: this.state.textResults[0].ModificationDate\n                    })\n                    .then(() => {\n                        this.props.actions.makeToast([{ message: (batchItemsToSave.length + \" Item(s)\") + (isReleased ? \" Released to \" + (vendorBatch ? \"Vendor\" : \"Print\") : \" Saved\"), type: \"success\", long: true }]);\n                        this.handleSearch();\n                        this.setState({\n                            isSaving: false\n                        });\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                        console.log(this.props.print.printSaveError);\n                        this.setState({\n                            isSaving: false\n                        });\n                    });\n            } else {\n                this.props.actions.createPrintDocument(\n                    {\n                        BatchDate: releaseDate,\n                        VendorBatch: vendorBatch,\n                        SessionID: this.state.selectedSession.SessionID,\n                        BatchItems: batchItemsToSave,\n                        isReleased: isReleased,\n                    })\n                    .then(() => {\n                        this.props.actions.makeToast([{ message: (batchItemsToSave.length + \" Item(s)\") + (isReleased ? \" Released to \" + (vendorBatch ? \"Vendor\" : \"Print\") : \" Saved\"), type: \"success\", long: true }]);\n                        this.handleSearch();\n                        this.setState({\n                            isSaving: false\n                        });\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                        console.log(this.props.print.printCreateError);\n                        this.setState({\n                            isSaving: false\n                        });\n                    });\n            }\n        });\n    }\n\n    handlePrintComplete() {\n        const completeDate = new Date();\n        let completedItems = [];\n        this.state.textResults.forEach(batch => {\n            batch.BatchItems.forEach(item => {\n                if (item.checked) {\n                    completedItems.push({ BatchItemID: item.BatchItemID })\n                }\n            });\n        });\n        if (completedItems.length !== 0) {\n            this.setState({\n                isSaving: true\n            }, () => {\n                this.props.actions.completeBatchItem({\n                    PrintDate: completeDate,\n                    BatchItemIDs: completedItems,\n                })\n                    .then(() => {\n                        this.props.actions.makeToast([{ message: \"Save Success\", type: \"success\" }]);\n                        this.handleSearch();\n                        this.setState({\n                            isSaving: false\n                        });\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                        console.log(this.props.print.batchItemCompleteError);\n                        this.setState({\n                            isSaving: false\n                        });\n                    });\n            });\n        }\n    }\n\n    handlePrintAllEnrolled() {\n        this.setState({\n            isSaving: true\n        }, () => {\n            this.props.actions.printAllEnrolled(\"?SessionID=\" + this.state.selectedSession.SessionID)\n                .then(() => {\n                    this.props.actions.makeToast([{ message: \"Request Successful\", type: \"success\" }]);\n                    this.setState({\n                        isSaving: false\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Request Failed\", type: \"failure\" }]);\n                    console.log(this.props.print.batchItemCompleteError);\n                    this.setState({\n                        isSaving: false\n                    });\n                });\n        });\n    }\n\n    toggleBillRoomView() {\n        this.setState(state => ({\n            billRoomView: !state.billRoomView\n        }), () => this.handleSearch());\n    }\n\n    toggleCommentEdit(e, batchIndex, textIndex) {\n        e.preventDefault();\n        let textResults = [...this.state.textResults];\n        textResults[batchIndex].BatchItems[textIndex].Editing = !textResults[batchIndex].BatchItems[textIndex].Editing;\n\n        this.setState({\n            textResults: textResults\n        })\n    }\n\n    markPdf(batchIndex, textIndex) {\n        let textResults = [...this.state.textResults];\n        textResults[batchIndex].BatchItems[textIndex].pdfMarked = true;\n\n        this.setState({\n            textResults: textResults\n        })\n    }\n\n    componentDidMount() {\n        this.props.actions.getSessionList()\n            .then(() => {\n                const sessionList = [...this.props.session.sessionList];\n                let selectedSession = '';\n                sessionList.forEach(session => {\n                    session.label = session.SessionYear + \" \" + session.DisplayName\n                    session.value = session.SessionID;\n                    if (session.IsDefault) {\n                        selectedSession = session;\n                    }\n                });\n                sessionList.reverse();\n                this.setState({\n                    sessionOptions: sessionList,\n                    selectedSession: selectedSession,\n                    isLoaded: true\n                }, () => {\n                    if (this.props.location.search.substr(9, this.props.location.search.length)) {\n                        this.toggleBillRoomView();\n                        this.setState({\n                            urlBatchId: this.props.location.search.substr(9, this.props.location.search.length)\n                        })\n                    } else if (selectedSession) {\n                        this.handleSearch()\n                    }\n                });\n            })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { versionOptions, selectedVersion, sessionOptions,\n            selectedSession, chamberOptions, selectedChamber,\n            introStartDate, introEndDate, search,\n            textResults, showReprints, showComplete } = this.state;\n        const customStyles = {\n            container: base => ({\n                ...base,\n                lineHeight: 'normal',\n            }),\n            option: (base, state) => ({\n                ...base,\n                fontSize: '0.8em',\n            }),\n            control: (base) => ({\n                ...base,\n                padding: '1px',\n                margin: 0,\n                minHeight: 0,\n                fontSize: '0.8em',\n            }),\n            dropdownIndicator: base => ({\n                ...base,\n                padding: '0px 8px'\n            })\n        }\n        if (!this.state.isLoaded) {\n            return (<div className=\"center-spinner spinner\">Loading...</div>)\n        }\n        return (<div>\n            <div className=\"header-half\">\n                <h1>{this.state.billRoomView ? \"Bill Room Management\" : \"Print Management\"}</h1>\n                <p><button className=\"button\" onClick={this.toggleBillRoomView} type=\"button\">{this.state.billRoomView ? \"Print Management\" : \"Bill Room Management\"}</button></p>\n            </div>\n            {this.state.showPortal &&\n                <Popout togglePortal={this.togglePortal} windowTitle={this.state.selectedBill.LegislationNumber || ''}>\n                    <LegislationText\n                        text={this.state.selectedBill}\n                    />\n                </Popout>\n            }\n            <div className=\"user-forms dlas-forms\">\n                {this.state.billRoomView &&\n                    <React.Fragment>\n                        <div className=\"button-bar floating-button-bar\" style={{ paddingBottom: \"15px\", paddingRight: \"15px\" }}>\n                            <div />\n                            <div>\n                                <button\n                                    id=\"bill-room-submit\"\n                                    onClick={this.handlePrintComplete}\n                                    type=\"button\"\n                                    disabled={this.state.isSaving || !this.state.anyChecked}\n                                    className=\"button\">\n                                    {this.state.isSaving ? \"Saving...\" : \"Complete\"}\n                                </button>\n                                <button\n                                    id=\"bill-room-submit\"\n                                    onClick={this.handlePrintAllEnrolled}\n                                    type=\"button\"\n                                    disabled={this.state.isSaving}\n                                    className=\"button\">\n                                    {this.state.isSaving ? \"Saving...\" : \"Print All Enrolled Versions\"}\n                                </button>\n                            </div>\n                        </div>\n                    </React.Fragment>\n                }\n                <fieldset className=\"fieldset-collapse\">\n                    <div>\n                        <div className=\"inner-grid five align-end\">\n                            <div>\n                                <label htmlFor=\"version-dropdown\">Version Type</label>\n                                <Select\n                                    options={versionOptions}\n                                    value={selectedVersion}\n                                    id=\"version-dropdown\"\n                                    styles={customStyles}\n                                    onChange={(val) => this.handleChange(\"selectedVersion\", val)}\n                                />\n                            </div>\n                            <div className=\"advanced-search dlas-forms\">\n                                <div className=\"checkbox-container\">\n                                    <div className=\"checkbox flex-row flex-vertical-center flex-start\" style={{ width: '102%' }}>\n                                        <div className=\"toggle-switch\" onClick={() => this.handleChange(\"showReprints\", !showReprints)}>\n                                            <input id=\"reprint-button\" checked={showReprints} type=\"checkbox\" />\n                                            <span className=\"slider\"></span>\n                                        </div>\n                                        <label htmlFor=\"reprint-button\" className=\"checkbox-label no-background\">Show Only Reprinted Items</label>\n                                    </div>\n                                </div>\n                            </div>\n                            {this.state.billRoomView &&\n                                <>\n                                    <div className=\"advanced-search dlas-forms\">\n                                        <div className=\"checkbox-container\">\n                                            <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                                                <div className=\"toggle-switch\" onClick={() => this.handleChange(\"showComplete\", !showComplete)}>\n                                                    <input id=\"complete-button\" checked={showComplete} type=\"checkbox\" />\n                                                    <span className=\"slider\"></span>\n                                                </div>\n                                                <label htmlFor=\"complete-button\" className=\"checkbox-label no-background\">Include Completed Items</label>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <button className=\"button primary\" type=\"button\" onClick={() => this.setState({ viewCompletedByBill: !this.state.viewCompletedByBill, viewOnlyCompletedItems: false })} style={{ marginBottom: \"4px\" }}>{(this.state.viewCompletedByBill ? \"Hide\" : \"View\") + \" Completed Items By Bill\"}</button>\n                                    <button className=\"button primary\" type=\"button\" onClick={() => this.setState({ viewOnlyCompletedItems: !this.state.viewOnlyCompletedItems, viewCompletedByBill: false })} style={{ marginBottom: \"4px\" }}>{(this.state.viewOnlyCompletedItems ? \"Hide\" : \"View\") + \" Only Completed Items\"}</button>\n                                </>\n                            }\n                        </div>\n                        <div className=\"inner-grid six\">\n                            <div>\n                                <label htmlFor=\"session-dropdown\">Session</label>\n                                <Select\n                                    options={sessionOptions}\n                                    value={selectedSession}\n                                    id=\"session-dropdown\"\n                                    styles={customStyles}\n                                    onChange={(val) => this.handleChange(\"selectedSession\", val)}\n                                />\n                            </div>\n                            <div>\n                                <label htmlFor=\"chamber-dropdown\">Chamber</label>\n                                <Select\n                                    options={chamberOptions}\n                                    value={selectedChamber}\n                                    id=\"chamber-dropdown\"\n                                    styles={customStyles}\n                                    onChange={(val) => this.handleChange(\"selectedChamber\", val)}\n                                />\n                            </div>\n                            <div>\n                                <label htmlFor=\"intro-start-date\">Date</label>\n                                <DatePicker\n                                    selected={introStartDate || null}\n                                    isClearable\n                                    id=\"intro-start-date\"\n                                    placeholderText=\"Start Date\"\n                                    onChange={(val) => this.handleChange(\"introStartDate\", val)}\n                                />\n                            </div>\n                            <div>\n                                <br />\n                                <DatePicker\n                                    selected={introEndDate || null}\n                                    isClearable\n                                    id=\"intro-end-date\"\n                                    placeholderText=\"End Date\"\n                                    onChange={(val) => this.handleChange(\"introEndDate\", val)}\n                                />\n\n                            </div>\n                            <div>\n                                <label htmlFor=\"search-filter\">Search filter</label>\n                                <input\n                                    type=\"text\"\n                                    value={search}\n                                    id=\"search-filter\"\n                                    onChange={(e) => this.handleChange(\"search\", e.target.value)}\n                                />\n                            </div>\n                        </div>\n                        <br />\n                        <div className=\"inner-grid six\">\n                            {!this.state.billRoomView &&\n                                <React.Fragment>\n                                    <button\n                                        id=\"print-management-submit\"\n                                        onClick={() => this.handleReleaseToPrint(false)}\n                                        type=\"button\"\n                                        disabled={this.state.isSaving || !this.state.anyChecked}\n                                        className=\"button\">\n                                        {this.state.isSaving ? \"Saving...\" : \"Release To Print\"}\n                                    </button>\n                                    <button\n                                        id=\"print-management-submit-vendor\"\n                                        onClick={() => this.handleReleaseToPrint(true)}\n                                        type=\"button\"\n                                        disabled={this.state.isSaving || !this.state.anyChecked}\n                                        className=\"button\">\n                                        {this.state.isSaving ? \"Saving...\" : \"Release To Vendor\"}\n                                    </button>\n                                    <button\n                                        id=\"print-management-save-batch\"\n                                        onClick={() => this.handleReleaseToPrint(undefined)}\n                                        type=\"button\"\n                                        disabled={this.state.isSaving || !this.state.anyChecked}\n                                        className=\"button\">\n                                        {this.state.isSaving ? \"Saving...\" : \"Save Batch Without Releasing\"}\n                                    </button>\n                                </React.Fragment>\n                            }\n                        </div>\n                    </div>\n                </fieldset>\n                <div>\n                    {this.state.isSearching ?\n                        <div className=\"center-spinner spinner\">Searching...</div>\n                        :\n                        <React.Fragment>\n                            {this.state.message ?\n                                <div className=\"center\">{this.state.message}</div>\n                                :\n                                <React.Fragment>\n                                    {this.state.billRoomView ?\n                                        <PrintRoomGrid\n                                            textResults={textResults}\n                                            toggleSelectAll={this.toggleSelectAll}\n                                            toggleText={this.toggleText}\n                                            showBillText={this.showBillText}\n                                            togglePortal={this.togglePortal}\n                                            showPortal={this.state.showPortal}\n                                            members={this.props.members.memberList}\n                                            selectedSession={this.state.selectedSession}\n                                            urlBatchId={this.state.urlBatchId}\n                                            showComplete={this.state.showComplete}\n                                            introStartDate={this.state.introStartDate}\n                                            introEndDate={this.state.introEndDate}\n                                            markPdf={this.markPdf}\n                                            viewCompletedByBill={this.state.viewCompletedByBill}\n                                            viewOnlyCompletedItems={this.state.viewOnlyCompletedItems}\n                                        />\n                                        :\n                                        <BillGrid\n                                            textResults={textResults}\n                                            toggleSelectAll={this.toggleSelectAll}\n                                            toggleText={this.toggleText}\n                                            showBillText={this.showBillText}\n                                            togglePortal={this.togglePortal}\n                                            showPortal={this.state.showPortal}\n                                            members={this.props.members.memberList}\n                                            selectedSession={this.state.selectedSession}\n                                            handleCommentChange={this.handleCommentChange}\n                                            toggleCommentEdit={this.toggleCommentEdit}\n                                        />\n                                    }\n                                </React.Fragment>\n                            }\n                        </React.Fragment>\n                    }\n                </div>\n            </div>\n        </div>)\n    }\n}\n\nconst BillGrid = props => {\n    const findMember = memberId => {\n        const patron = props.members.find(member => member.MemberID === memberId);\n        if (patron) {\n            return patron.PatronDisplayName;\n        } else {\n            return '';\n        }\n    }\n    return (<div>\n        {props.textResults.map((batch, batchIndex) =>\n            <form key={batchIndex}>\n                <div className=\"bill-grid print-bill-grid\">\n                    <div className=\"bill-grid-header\">\n                        <input\n                            type=\"checkbox\"\n                            checked={batch.selectAll || ''}\n                            onChange={() => props.toggleSelectAll(batchIndex)} />\n                    </div>\n                    <div className=\"bill-grid-header\">\n                        <span>Bill #</span>\n                    </div>\n                    <div className=\"bill-grid-header\">\n                        <span>Pages</span>\n                    </div>\n                    <div className=\"bill-grid-header\">\n                        <span>Document</span>\n                    </div>\n                    <div className=\"bill-grid-header\">\n                        <span>Date</span>\n                    </div>\n                    <div className=\"bill-grid-header\">\n                        <span>Patron</span>\n                    </div>\n                    <div className=\"bill-grid-header\">\n                        <span>Caption</span>\n                    </div>\n                    <div className=\"bill-grid-header\">\n                        <span>LD#</span>\n                    </div>\n                    <div className=\"bill-grid-header\">\n                        <span>Comment</span>\n                    </div>\n                    <div className=\"bill-grid-header\">\n                        <span>View</span>\n                    </div>\n                </div>\n                <div>\n                    {batch.BatchItems\n                        .sort((a, b) => !a.checked && b.checked ? 1 : a.checked && !b.checked ? -1 : moment(a.VersionDate).isAfter(b.VersionDate, \"days\") ? 1 : moment(b.VersionDate).isAfter(a.VersionDate, \"days\") ? -1 : 0)\n                        .map((text, textIndex) =>\n                            <div key={textIndex} className=\"bill-grid print-bill-grid\">\n                                <div>\n                                    <input\n                                        type=\"checkbox\"\n                                        checked={text.checked || ''}\n                                        onChange={(e) => props.toggleText(batchIndex, textIndex, e)} />\n                                </div>\n                                <div>\n                                    <span><a\n                                        target=\"_blank\"\n                                        href={`/bill-details/${props.selectedSession.SessionCode}/${text.LegislationNumber}`}>\n                                        {text.LegislationNumber}\n                                    </a></span>\n                                </div>\n                                <div>\n                                    <span>{text.PDFFile[0] && text.PDFFile[0].PageCount}</span>\n                                </div>\n                                <div>\n                                    {text.IsReprint && <div className=\"small-text message-error\">REPRINT</div>}\n                                    <span>{text.DocumentCode}</span>\n                                </div>\n                                <div>\n                                    <span>{moment(text.VersionDate).format('L')}</span>\n                                </div>\n                                <div>\n                                    <span>{findMember(text.MemberID)}</span>\n                                </div>\n                                <div style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}>\n                                    <span\n                                        title={text.LegislationDescription || text.Description}\n                                        style={{ whiteSpace: 'nowrap' }}>\n                                        {text.LegislationDescription || text.Description}\n                                    </span>\n                                </div>\n                                <div>\n                                    <span>{text.LDNumber}</span>\n                                </div>\n                                <div style={{ display: \"grid\", gridTemplateColumns: \"1fr 25px\" }}>\n                                    <input\n                                        key={text.LegislationTextID}\n                                        onChange={(e) => props.handleCommentChange(batchIndex, textIndex, e.target.value)}\n                                        value={text.Comment}\n                                        disabled={!props.textResults[batchIndex].BatchItems[textIndex].Editing}\n                                    />\n                                    {props.textResults[batchIndex].BatchItems[textIndex].Editing\n                                        ? <button className=\"icon save\" onClick={(e) => props.toggleCommentEdit(e, batchIndex, textIndex)}></button>\n                                        : <button type=\"button\" className=\"icon edit\" onClick={(e) => props.toggleCommentEdit(e, batchIndex, textIndex)}></button>\n                                    }\n                                </div>\n                                <div>\n                                    <div className=\"inner-grid three\">\n                                        {text.SasURL || (text.PDFFile && text.PDFFile.length > 0) ?\n                                            <a target=\"_blank\" href={text.SasURL || text.PDFFile[0].FileURL}><span className=\"icon pdf\"></span></a>\n                                            :\n                                            <br />\n                                        }\n                                        <div>\n                                            <span\n                                                onClick={(e) => props.togglePortal(props.showPortal, e, text.LegislationTextID)}\n                                                className=\"icon paper\"></span>\n                                        </div>\n                                        <div>\n                                            {text.IsPublic &&\n                                                <i className=\"icon book\" />\n                                            }\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        )}\n                </div>\n            </form>\n        )}\n    </div>);\n}\n\nconst LegislationText = props => {\n    if (props.text.message) {\n        return (<p>{props.text.message}</p>)\n    }\n    return (\n        <div style={{ margin: '10px' }}>\n            {renderHTML(props.text.DraftText)}\n        </div>\n    );\n}\n\nexport default connect(\n    (state) => {\n        const { print, session, nav, bills, members } = state;\n        return {\n            nav,\n            print,\n            session,\n            bills,\n            members\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, printActionCreators, sessionActionCreators, billActionCreators, navActionCreators, memberActionCreators), dispatch)\n        }\n    }\n)(PrintManagement)","import React from \"react\";\nimport ReactToPrint from \"react-to-print\";\nimport DatePicker from \"react-datepicker\";\nimport Select from 'react-select';\nimport moment from 'moment-timezone';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { cancelRequest } from '../../../services/request.service';\nimport { reportActionCreators } from \"../../../stores/lis-report-store\";\nimport { sessionActionCreators } from \"../../../stores/lis-session-store\";\nimport renderHTML from \"react-render-html\";\nimport { Link } from 'react-router-dom';\nimport { billActionCreators } from \"../../../stores/lis-legislation-store\";\n\nclass ReportManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isSearching: false,\n            sessionList: [],\n            reportTypes: [],\n            selectedSession: '',\n            selectedReport: '',\n            selectedDate: null,\n            reportData: []\n        };\n        this.handleFormChange = this.handleFormChange.bind(this);\n        this.handleReportTypeChange = this.handleReportTypeChange.bind(this);\n        this.getReport = this.getReport.bind(this);\n        this.handleRadioChange = this.handleRadioChange.bind(this);\n    };\n\n    handleFormChange(key, val) {\n        this.setState({\n            [key]: val,\n            reportData: []\n        }, () => {\n            if (key === \"selectedSession\") {\n                this.props.actions.getIntroDateList('?sessionCode=' + val.SessionCode);\n                this.setState({\n                    selectedDate: null\n                })\n            }\n        });\n    }\n\n    handleReportTypeChange(val) {\n        this.setState({\n            selectedReport: val,\n            selectedDate: null,\n            reportData: []\n        });\n    }\n\n    getReport() {\n        const { selectedDate, selectedSession, selectedReport } = this.state;\n        this.setState({\n            isSearching: true\n        });\n        let params = `?sessionID=${selectedSession.SessionID}&reportID=${selectedReport.ReportID}`;\n        if (selectedDate) {\n            params += `&reportDate=${selectedDate.format('YYYY-MM-DD')}`\n        }\n        this.props.actions.getReport(params)\n            .then(() => {\n                let reportDataChamber = '';\n                let reportDataName = '';\n                if (selectedReport.ReportName.includes('Senate')) {\n                    reportDataChamber = 'SENATE OF VIRGINIA'\n                    reportDataName = selectedReport.ReportName.replace('Senate ', '');\n                }\n                if (selectedReport.ReportName.includes('House')) {\n                    reportDataChamber = 'HOUSE OF DELEGATES'\n                    reportDataName = selectedReport.ReportName.replace('House ', '');\n                }\n                const sessionStartObj = selectedSession.SessionEvents && selectedSession.SessionEvents.length && selectedSession.SessionEvents.find(date => date.DisplayName === \"Session Start\");\n                const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate).format(\"MM/DD/YYYY\") : '';\n                let reportData = this.props.report.report;\n                reportData.forEach((rpt, idx) => {\n                    rpt.showItem = idx === 0;\n                });\n                this.setState({\n                    isSearching: false,\n                    reportData: reportData,\n                    reportDataChamber: reportDataChamber,\n                    reportDataDate: startDate,\n                    reportDataName: reportDataName\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isSearching: false\n                });\n            })\n    }\n\n    handleRadioChange(item) {\n        let filteredReportData = [...this.state.reportData];\n        filteredReportData.forEach(reportItem => {\n            if (reportItem.Heading === item.Heading) {\n                reportItem.showItem = true;\n            } else {\n                reportItem.showItem = false;\n            }\n        });\n        this.setState({\n            reportData: filteredReportData\n        });\n    }\n\n    componentDidMount() {\n        this.props.actions.getSessionList()\n            .then(() => {\n                const sessionList = [...this.props.session.sessionList];\n                let selectedSession = '';\n                sessionList.forEach(session => {\n                    session.label = session.SessionYear + \" \" + session.DisplayName\n                    session.value = session.SessionID;\n                    if (session.IsDefault) {\n                        selectedSession = session;\n                    }\n                });\n                this.setState({\n                    sessionList: sessionList,\n                    selectedSession: selectedSession,\n                    sessionisLoaded: true\n                }, () => {\n                    this.props.actions.getIntroDateList('?sessionCode=' + this.state.selectedSession.SessionCode);\n                });\n            });\n        this.props.actions.getReportTypes()\n            .then(() => {\n                let reportTypes = [...this.props.report.reportTypes];\n\n                reportTypes.forEach(type => {\n                    type.label = type.ReportName;\n                    type.value = type.ReportID;\n                });\n                this.setState({\n                    reportTypes: reportTypes.filter(x => {\n                        if (this.props.login.userClaims.claims.find(x => x.RoleName === \"Admin\"))\n                            return true;\n\n                        if (this.props.login.userClaims.claims.find(x => x.RoleName === \"SenateReportFileGenerationEditor\"))\n                            if (x.ReportID == 2 || x.ReportID == 4)\n                                return true;\n\n                        if (this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseReportFileGenerationEditor\"))\n                            if (x.ReportID == 1 || x.ReportID == 3)\n                                return true;\n                    }),\n                    reportTypesAreLoaded: true\n                }, () => {\n                    if (this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseReportFileGenerationEditor\") && this.state.reportTypes.find(rt => rt.label === \"House Daily Rule Report\")) {\n                        this.handleReportTypeChange(this.state.reportTypes.find(rt => rt.label === \"House Daily Rule Report\"));\n                    } else if (this.props.login.userClaims.claims.find(x => x.RoleName === \"SenateReportFileGenerationEditor\") && this.state.reportTypes.find(rt => rt.label === \"Senate Daily Rule Report\")) {\n                        this.handleReportTypeChange(this.state.reportTypes.find(rt => rt.label === \"Senate Daily Rule Report\"));\n                    }\n                });\n            });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { reportTypes, sessionList, isSearching, selectedSession, selectedReport, selectedDate, reportData } = this.state;\n        if (!this.state.sessionisLoaded || !this.state.reportTypesAreLoaded) {\n            return (<div className=\"center-spinner spinner\">Loading...</div>)\n        }\n        // Get a list of distinct headers for the filter section.\n        let flags = new Set();\n        let uniqueHeaderItems = reportData.filter(item => {\n            if (flags.has(item.Heading)) {\n                return false;\n            }\n            flags.add(item.Heading);\n            return true;\n        })\n        const dateLabel = this.state.selectedReport.value === 3 && this.state.selectedSession.SessionCode === \"20251\"\n            ? \"January 13, 2025\" /* Date we started after the water crisis, Google it. --JGB */\n            : moment(this.state.selectedReport.ReportID === 1 || this.state.selectedReport.ReportID === 2\n                ? this.state.selectedDate\n                : this.state.reportDataDate).format('MMMM D, YYYY')\n\n        let dateList = [];\n        this.props.bills.introDateList?.forEach(x => dateList.push(moment(x.IntroductionDate)));\n\n        return (<div>\n            <div className=\"header-half\">\n                <h1>Rule Reports</h1>\n            </div>\n            <div className=\"user-forms dlas-forms\">\n                <fieldset className=\"fieldset-collapse\">\n                    <div>\n                        <div className=\"inner-grid five\">\n                            <div>\n                                <label>Report Type</label>\n                                <Select\n                                    options={reportTypes}\n                                    value={selectedReport}\n                                    styles={customStyles}\n                                    onChange={this.handleReportTypeChange}\n                                />\n                            </div>\n                            <div></div>\n                        </div>\n                        <div className=\"inner-grid five\">\n                            <div>\n                                <label>Session</label>\n                                <Select\n                                    options={sessionList}\n                                    value={selectedSession}\n                                    styles={customStyles}\n                                    onChange={(val) => this.handleFormChange('selectedSession', val)}\n                                />\n                            </div>\n                            {(selectedReport && selectedReport.ReportName.toLowerCase().includes('daily')) || (selectedReport && selectedReport.ReportName.toLowerCase().includes('prefile') && selectedReport.ReportName.toLowerCase().includes('house')) ?\n                                <div>\n                                    <label>Date</label>\n                                    {(selectedReport && selectedReport.ReportName.toLowerCase().includes('prefile') && selectedReport.ReportName.toLowerCase().includes('house'))\n                                        ?\n                                        <DatePicker\n                                            selected={selectedDate}\n                                            isClearable\n                                            placeholderText=\"Date\"\n                                            onChange={(val) => this.handleFormChange('selectedDate', val)}\n                                            includeDates={dateList || []}\n                                        />\n                                        :\n                                        <DatePicker\n                                            selected={selectedDate}\n                                            isClearable\n                                            placeholderText=\"Date\"\n                                            onChange={(val) => this.handleFormChange('selectedDate', val)}\n                                        />\n                                    }\n                                </div> : null\n                            }\n                        </div>\n                        <br />\n                    </div>\n                    <div className=\"inner-grid six\">\n                        <div>\n                            <label></label>\n                            <button\n                                type=\"button\"\n                                onClick={this.getReport}\n                                disabled={!selectedSession || !selectedReport || selectedReport.ReportID === 1 && !selectedDate || selectedReport.ReportID === 2 && !selectedDate}\n                                className=\"button\">\n                                Get Report</button>\n                        </div>\n                        <div></div>\n                    </div>\n                </fieldset>\n                <div>\n                    {isSearching ?\n                        <div className=\"center-spinner spinner\">Getting Records...</div>\n                        :\n                        <React.Fragment>\n                            <div className=\"center\">{this.props.report.reportError}</div>\n                            {reportData.length > 0 &&\n                                <React.Fragment>\n                                    <hr className='faded-line' />\n                                    <div className=\"advanced-search checkbox-container dlas-forms\">\n                                        <span>Include Section</span>\n                                        <br />\n                                        {uniqueHeaderItems.map((item, idx) =>\n                                            <div key={item.Heading} className=\"label-and-radio\">\n                                                <label htmlFor={idx}><input id={idx} checked={this.state.reportData.find(rpt => rpt.Heading === item.Heading).showItem} onChange={() => this.handleRadioChange(item)} type=\"radio\" /> {item.Heading}</label>\n                                            </div>\n                                        )}\n                                    </div>\n                                    <hr className='faded-line' />\n                                    <div className=\"align-right\">\n                                        <ReactToPrint\n                                            trigger={() => <a type=\"button\" className=\"button print\">Print</a>}\n                                            content={() => this.printRef}\n                                            pageStyle={\"break-inside: avoid\"}\n                                        />\n                                    </div>\n                                    <div ref={el => this.printRef = el} className=\"public-details details-section section-content\">\n                                        <p className=\"center\">{this.state.reportDataName !== \"Daily Rule Report\" && this.state.reportDataName}</p>\n                                        <p className=\"center\">\n                                            <strong>\n                                                {this.state.reportDataChamber}\n                                            </strong>\n                                        </p>\n                                        <p className=\"align-right\">{\"Printed \" + moment().format(\"MMMM D, YYYY\")}</p>\n                                        <p className=\"align-right\">{dateLabel}</p>\n                                        {reportData.map((reportItem, reportItemIndex) =>\n                                            <div key={reportItemIndex}>\n                                                {reportItem.showItem &&\n                                                    <React.Fragment>\n                                                        <p>{reportItem.Heading}</p>\n                                                        {reportItem.Legislation.filter(x => {\n                                                            if (selectedDate && selectedReport.ReportName.toLowerCase().includes('prefile') && selectedReport.ReportName.toLowerCase().includes('house')) {\n                                                                return moment(selectedDate).isSame(moment(x.IntroductionDate), \"day\")\n                                                            } else {\n                                                                return true;\n                                                            }\n                                                        }).map((bill, billIndex) => {\n                                                            bill.Patrons.sort((a, b) => a.ChamberCode !== b.ChamberCode ? a.ChamberCode !== bill.ChamberCode ? 1 : -1 : a.Sequence - b.Sequence);\n                                                            return (<div key={billIndex}>\n                                                                <p><b><Link to={`/bill-details/${selectedSession.SessionCode}/${bill.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\">{bill.LegislationNumber.substring(0, 1) + '.' + (bill.LegislationNumber.substring(1, 2) === 'J' ? 'J.R. ' : bill.LegislationNumber.substring(1, 2) + '. ') + bill.LegislationNumber.substring(2)}</Link></b> {bill.DraftTitle && renderHTML(bill.DraftTitle.replace(\"<p class=ldtitle>\", \"<span>\").replace(\"</p>\", \"</span>\"))}</p>\n                                                                <p className=\"align-right\">{bill.LDNumber}</p>\n                                                                {bill.EffectiveType === \"Emergency\" && <p>EMERGENCY</p>}\n                                                                {this.state.reportDataName !== \"Daily Rule Report\" && <p>(Prefiled {moment(bill.IntroductionDate).format('MMMM D, YYYY')})</p>}\n                                                                <p>{bill.Patrons.length > 1 ? \"Patrons--\" : \"Patron--\"}\n                                                                    {bill.Patrons.map((patron, patronIndex) => {\n                                                                        let patronString = '';\n                                                                        if (bill.Patrons[patronIndex + 1] && bill.Patrons[patronIndex + 1].ChamberCode !== bill.ChamberCode && bill.Patrons[patronIndex].ChamberCode === bill.ChamberCode) {\n                                                                            patronString = (patronIndex !== 0 ? \" and \" : \"\") + patron.PatronDisplayName + (bill.ChamberCode === \"H\" ? patronIndex + 2 === bill.Patrons.length ? \"; Senator: \" : \"; Senators: \" : patronIndex + 2 === bill.Patrons.length ? \"; Delegate: \" : \"; Delegates: \");\n                                                                        } else if (patronIndex + 1 === bill.Patrons.length && bill.Patrons.length > 1 && bill.Patrons[patronIndex].ChamberCode === bill.Patrons[patronIndex - 1].ChamberCode) {\n                                                                            patronString = \" and \" + patron.PatronDisplayName;\n                                                                        } else if (patronIndex != 0 && bill.Patrons[patronIndex - 1].ChamberCode === bill.Patrons[patronIndex].ChamberCode) {\n                                                                            patronString = \", \" + patron.PatronDisplayName;\n                                                                        } else {\n                                                                            patronString = patron.PatronDisplayName\n                                                                        }\n                                                                        return (<React.Fragment key={patronIndex}>{patronString}{patron.ByRequest ? ' (By Request)' : null}</React.Fragment>)\n                                                                    })}</p>\n                                                                {bill.ConsentRequired &&\n                                                                    <p>Unanimous consent to introduce</p>\n                                                                }\n                                                                {bill.GovernorsRequest &&\n                                                                    <p>Introduced at the request of Governor.</p>\n                                                                }\n                                                                {bill.CommitteeName\n                                                                    ? bill.CommitteeName === \"Judiciary\"\n                                                                        ? <p>Referred to Committee on the {bill.CommitteeName}</p>\n                                                                        : bill.CommitteeName === \"Courts of Justice\"\n                                                                            ? <p>Referred to Committee for {bill.CommitteeName}</p>\n                                                                            : <p>Referred to Committee on {bill.CommitteeName}</p>\n                                                                    :\n                                                                    !reportItem.Heading.includes(' laid on ')\n                                                                        ? <p>Committee Referral Pending</p>\n                                                                        : null\n                                                                }\n                                                                <br />\n                                                            </div>)\n                                                        }\n                                                        )}\n                                                    </React.Fragment>\n                                                }\n                                            </div>\n                                        )}\n                                    </div>\n                                </React.Fragment>\n                            }\n                        </React.Fragment>\n                    }\n                </div>\n            </div>\n        </div>)\n    }\n}\n\nconst customStyles = {\n    container: base => ({\n        ...base,\n        lineHeight: 'normal',\n    }),\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        minHeight: 0,\n        fontSize: '0.8em',\n    }),\n    dropdownIndicator: base => ({\n        ...base,\n        padding: '0px 8px'\n    })\n}\n\nexport default connect(\n    (state) => {\n        const { session, report, login, bills } = state;\n        return {\n            session,\n            report,\n            login,\n            bills\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, reportActionCreators, billActionCreators), dispatch)\n        }\n    }\n)(ReportManagement);","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport ReactTable from 'react-table'\n\nclass BillGridSection extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.state = {\n        }\n\n        this.onExpandedChange = this.onExpandedChange.bind(this);\n    }\n\n    getAmendmentDescription(legislationText) {\n        let descriptionAndDisposition = legislationText.Description;\n        // Versions that are held have the text disposition hidden to match the public version table\n        if (legislationText.TextDispositionID === 12) {\n            return legislationText.Description + \" Engrossed\"\n        }\n\n        if (legislationText.TextDisposition === \"Hold\") {\n            return descriptionAndDisposition;\n        } else if (legislationText.TextDisposition !== \"Posted\") {\n            descriptionAndDisposition = `${legislationText.Description} ${legislationText.TextDisposition || ''}`;\n        }\n        //If the IsReprint boolean is true and the service didn't append Reprint to the description already\n        if (legislationText.IsReprint && !descriptionAndDisposition.includes(\"(Reprint)\")) {\n            descriptionAndDisposition = descriptionAndDisposition + \" (Reprint)\";\n        }\n\n        if (legislationText.LDNumber) {\n            descriptionAndDisposition = descriptionAndDisposition + \" - \" + legislationText.LDNumber;\n        }\n\n        if (!legislationText.DocumentCode || legislationText.DocumentCode === \"\") {\n            return legislationText.Description;\n        }\n\n        return descriptionAndDisposition;\n    }\n\n    onExpandedChange(newExpanded) {\n        this.props.toggleExpandedBills(newExpanded, this.props.currentPage)\n    }\n\n    render() {\n        return (\n            <div>\n                <ReactTable\n                    resizable={false}\n                    data={this.props.billList}\n                    loading={!this.props.isLoaded}\n                    ref={r => this.reactTable = r}\n                    autoResetExpanded={false}\n                    freezeWhenExpanded={false}\n                    expanded={Object.keys(this.props.expandedBills).length > 0 ? this.props.expandedBills : undefined}\n                    onExpandedChange={newExpanded => this.onExpandedChange(newExpanded)}\n                    page={this.props.currentPage}\n                    pages={Math.ceil((this.props.billList ? this.props.billList.length : 0) / this.props.pageSize)}\n                    onPageChange={this.props.onPageChange}\n                    SubComponent={({ original, index }) => {\n                        return (\n                            <div style={{ fontSize: \"1.2em\" }}>\n                                <ul>\n                                    {original.Amendments.filter((x) => this.props.selectedChamber ? x.ChamberCode === this.props.selectedChamber : x).sort((a, b) => a.DocumentCode && a.DocumentCode.localeCompare(b.DocumentCode)).map((amendment, amendmentIndex) => {\n                                        return (\n                                            <div key={amendmentIndex}>\n                                                {amendment.IsPublic ?\n                                                    <Link to={`/bill-details/${original.SessionCode}/${original.LegislationNumber}/text/${amendment.DocumentCode}`} target=\"_blank\" rel=\"noreferrer\" className=\"icon book\" style={{ marginRight: '8px' }} />\n                                                    :\n                                                    <span className=\"icon flag\" style={{ marginRight: '8px' }} />\n                                                }\n                                                <button onClick={() => this.props.selectAmendment(index, amendment)} className=\"button-link\">{amendment.DocumentCode && amendment.DocumentCode + ' - '}{this.getAmendmentDescription(amendment)}</button>\n                                            </div>\n                                        )\n                                    }\n                                    )}\n                                </ul>\n                            </div>\n                        );\n                    }}\n                    columns={[\n                        {\n                            Header: 'Bill #',\n                            sortable: true,\n                            filterable: false,\n                            width: 90,\n                            accessor: \"\",\n                            Cell: ({ original, index }) => {\n                                if (original && original.SessionCode) {\n                                    return (<Link to={`/bill-details/${original.SessionCode}/${original.LegislationNumber}`} target=\"_blank\" rel=\"noreferrer\">{original.LegislationNumber}</Link >)\n                                } else {\n                                    return (<span>{original.LegislationNumber}</span>)\n                                }\n                            }\n                        },\n                        {\n                            Header: 'Patron',\n                            sortable: true,\n                            filterable: false,\n                            accessor: \"Patrons\",\n                            width: 90,\n                            Cell: row =>\n                                <span>{row.value && row.value.map((patron, index) => <React.Fragment key={index}>{patron.PatronDisplayName}{index !== row.value.length - 1 && \", \"}</React.Fragment>)}</span>\n                        },\n                        {\n                            Header: 'Caption',\n                            sortable: true,\n                            filterable: false,\n                            accessor: \"Description\",\n                            Cell: row => <span>{row.value}</span>\n                        },\n                        {\n                            Header: 'Actions',\n                            sortable: false,\n                            filterable: false,\n                            accessor: \"\",\n                            width: 145,\n                            expander: true,\n                            Expander: ({ isExpanded, index }) => {\n                                return (\n                                    <div className=\"committee-action-column\">\n                                        {this.props.billDataIsLoading === index ?\n                                            <div><span className=\"small-spinner\"></span></div>\n                                            :\n                                            <button className={`${isExpanded ? 'arrow-up' : 'arrow-down'}`} type=\"button\"></button>\n                                        }\n                                    </div>\n                                );\n                            }\n                        }\n                    ]}\n                    pageSize={this.props.pageSize}\n                    onPageSizeChange={this.props.onPageSizeChange}\n                    className=\"committee-table -striped -highlight react-table-hide-no-data\"\n                />\n            </div>\n        );\n    }\n}\n\nexport default BillGridSection;","import React from 'react';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\n\nclass SelectorSection extends React.Component {\n\n    render() {\n        return (\n            <div className=\"inner-grid four\">\n                <div>\n                    <Fields.Dropdown\n                        value={this.props.selectedSession}\n                        options={this.props.sessionOptions}\n                        id=\"sessionDropdown\"\n                        onChange={this.props.onSessionChange}\n                    />\n                </div>\n                <div>\n                    <Fields.Dropdown\n                        value={this.props.selectedChamber}\n                        options={this.props.chamberOptions}\n                        id=\"chamberDropdown\"\n                        onChange={this.props.onChamberChange}\n                        isDisabled={this.props.isDisabled || this.props.chamberIsDisabled}\n                    />\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default SelectorSection;","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { Prompt } from 'react-router';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport ReactToPrint from 'react-to-print';\nimport renderHTML from 'react-render-html';\n\nimport BillGridSection from './lis-bill-grid';\nimport SelectorSection from './lis-selectors';\nimport ReviewSection from '../../lis-version-management/components/lis-review';\n\nclass AmendmentManagement extends React.Component {\n\n    constructor(props) {\n        super(props);\n        this.state = {\n            billFieldsetIsActive: true,\n            reviewFieldsetIsActive: false,\n            sessionOptions: [],\n            selectedSession: '',\n            reviewContent: '',\n            isLoaded: true,\n            billList: [],\n            selectedAmendment: '',\n            isPreviewVisible: false,\n            processingFile: false,\n            billDataIsLoading: null,\n            billFilter: '',\n            sessionID: '',\n            selectedChamber: '',\n            chamberOptions: [],\n            expandedBills: {},\n            isDirty: false,\n            firstPass: true,\n            currentPage: 0,\n            pageSize: 5,\n            unpublished: false,\n            wasEmpty: false,\n            replaced: false\n        };\n\n        this.reviewRef = React.createRef();\n\n        this.togglePreview = this.togglePreview.bind(this);\n        this.toggleFieldsetCollapse = this.toggleFieldsetCollapse.bind(this);\n        this.handleSessionChange = this.handleSessionChange.bind(this);\n        this.handleChamberChange = this.handleChamberChange.bind(this);\n        this.selectAmendment = this.selectAmendment.bind(this);\n        this.filterBills = this.filterBills.bind(this);\n        this.handleEditorChange = this.handleEditorChange.bind(this);\n        this.handleSave = this.handleSave.bind(this);\n        this.toggleExpandedBills = this.toggleExpandedBills.bind(this);\n        this.onPageChange = this.onPageChange.bind(this);\n        this.onPageSizeChange = this.onPageSizeChange.bind(this);\n        this.getEDoc = this.getEDoc.bind(this);\n        this.appendEdoc = this.appendEdoc.bind(this);\n        this.setWasEmpty = this.setWasEmpty.bind(this);\n        this.setReplaced = this.setReplaced.bind(this);\n        this.filterToEDocReady = this.filterToEDocReady.bind(this);\n        this.isEDocReady = this.isEDocReady.bind(this);\n    }\n\n    toggleFieldsetCollapse(isActive) {\n        this.setState(state => ({\n            [isActive]: !state[isActive]\n        }));\n    }\n\n    togglePreview() {\n        this.setState(state => ({\n            isPreviewVisible: !state.isPreviewVisible\n        }));\n    }\n\n    setWasEmpty(val, callback) {\n        this.setState({ wasEmpty: val }, () => {\n            if (callback) {\n                callback();\n            }\n        })\n    }\n\n    setReplaced(val, callback) {\n        this.setState({ replaced: val }, () => {\n            if (callback) {\n                callback();\n            }\n        })\n    }\n\n    async handleSave(publish) {\n        this.setState({ isSaving: true });\n\n        let selectedAmendment = { ...this.state.selectedAmendment };\n        let amendmentsToSave = [];\n\n        //Try to find the draft title in the text and set it\n        let domContainer = document.createElement('div');\n        domContainer.innerHTML = this.state.reviewContent;\n        //The first element in the content with this class is the draft title\n        let draftLDTitle = domContainer.querySelector('.ldtitle');\n        if (draftLDTitle && draftLDTitle.innerHTML !== '') {\n            selectedAmendment.DraftTitle = draftLDTitle.innerHTML;\n        }\n\n        //Remove any tags TinyMCE may have added when pasting from Word (Borrowing DOM container)\n        domContainer.childNodes.forEach(node => {\n            if (node.nodeName !== \"#text\") {\n                node.removeAttribute('data-mce-fragment');\n                if (node.childNodes.length > 0) {\n                    node.childNodes.forEach(childNode => {\n                        if (childNode.nodeName !== \"#text\") {\n                            childNode.removeAttribute('data-mce-fragment');\n                        }\n                    })\n                }\n            }\n        });\n\n        selectedAmendment.DraftText = domContainer.innerHTML;\n        selectedAmendment.IsPublic = publish || false;\n\n        if (!selectedAmendment.LegislationTypeCode) {\n            selectedAmendment.LegislationTypeCode = this.state.billList.find(x => x.LegislationID === selectedAmendment.LegislationID).LegislationTypeCode\n        }\n\n        if (!selectedAmendment.LegislationChamberCode) {\n            selectedAmendment.LegislationChamberCode = selectedAmendment.ChamberCode;\n        }\n\n        //If we're publishing the engrossed collection of adopted/adopted in part amendments then mark all of those amendments inactive and add them to the save array\n        if (publish && Boolean(selectedAmendment.Description.match(/((Senate)|(House))\\s(Amendment)s?/)) && selectedAmendment.TextDispositionID === 12) {\n            let bill = this.state.billList.find(x => x.LegislationID === selectedAmendment.LegislationID);\n            for (let i = 0; i < bill.Amendments.length; i++) {\n                if (bill.Amendments[i].TextDispositionID !== 12) {\n                    if ((bill.Amendments[i].TextDispositionID === 6 || bill.Amendments[i].TextDispositionID === 7) && bill.Amendments[i].IsActive) {\n                        //Missing draft text can cause republish to fail\n                        if (!bill.Amendments[i].DraftText) {\n                            await this.props.actions.getBillText(\"?legislationTextID=\" + bill.Amendments[i].LegislationTextID, true)\n                                .then(() => {\n                                    bill.Amendments[i] = this.props.bills.billText[0]\n                                })\n                        }\n                        bill.Amendments[i].IsActive = false;\n\n                        amendmentsToSave.push(bill.Amendments[i])\n                    };\n                }\n            }\n        }\n\n        amendmentsToSave.push(selectedAmendment)\n\n        this.props.actions.saveBillText({ TextsList: amendmentsToSave.filter(x => x.LegislationVersionID === 8) })\n            .then(() => {\n                this.setState({ isSaving: false });\n                //In instances where we're publishing the engrossed version, other versions (like introduced) were present in the response\n                //Filter out anything that ins't an amendment so we don't fall into the exception throw\n                let billTextSave = [...this.props.bills.billTextSave.filter(x => x.LegislationVersionID === 8)];\n                if (!billTextSave.length) {\n                    throw 'The response does not contain a bill text';\n                }\n                //If only one bill text is returned, use that one, otherwise, use the engrossed one (if there is more than one bill text returned and there is not exactly one engrossed version, there is an issue)\n                if (billTextSave.length > 1) {\n                    billTextSave = billTextSave.filter(x => x.TextDisposition === \"Engrossed\");\n                }\n                if (billTextSave.length !== 1) {\n                    throw 'The response contains more than one bill text, but not exactly one engrossed version';\n                }\n                if (publish) {\n                    this.setState({\n                        isPreviewVisible: false,\n                        selectedAmendment: '',\n                        reviewContent: '',\n                        reviewFieldsetIsActive: false,\n                        billFieldsetIsActive: true,\n                        isDirty: false,\n                        firstPass: true\n                    });\n                    let filtered = this.state.filteredBillList.length != this.state.billList.length ? true : false\n                    let billList = filtered ? [...this.state.filteredBillList] : [...this.state.billList];\n                    const publishedBillIndex = billList.findIndex(b => b.LegislationID === billTextSave[0].LegislationID)\n                    this.handleSessionChange(this.state.selectedSession, publishedBillIndex);\n                    const legFileGenParams = \"?legislationID=\" + billTextSave[0].LegislationID\n                        + \"&legislationTextID=\" + billTextSave[0].LegislationTextID\n                        + \"&legislationVersionID=\" + billTextSave[0].LegislationVersionID\n                        + \"&sessionID=\" + this.state.selectedSession.SessionID;\n                    this.props.actions.genBillFile(legFileGenParams)\n                } else {\n                    this.setState({\n                        selectedAmendment: billTextSave[0],\n                        isDirty: false,\n                        firstPass: true\n                    });\n                }\n                this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err.toString());\n                this.props.actions.makeToast([{ message: \"Save Failed. You may need to refresh before attempting to save.\", type: \"failure\" }]);\n                this.setState({ isSaving: false });\n            });\n    }\n\n    handleEditorChange(content) {\n        this.setState({\n            reviewContent: content,\n            isDirty: this.state.firstPass ? false : true,\n            firstPass: false\n        });\n    }\n\n    handleSessionChange(val, publishedLegislationIndex) {\n        this.setState({\n            selectedSession: val,\n            isLoaded: false,\n            selectedBill: '',\n            amendmentFieldsetIsActive: false,\n            reviewFieldsetIsActive: false\n        });\n        let params = \"?sessionID=\" + val.SessionID;\n        if (this.state.selectedChamber !== \"\" && this.state.selectedChamber.value) {\n            params = params + \"&chamberCode=\" + this.state.selectedChamber.value;\n        }\n\n        this.props.actions.getLegislationAmendmentList(params)\n            .then(() => {\n                this.setState({\n                    billList: this.props.bills.legislationAmendmentList,\n                    isLoaded: true,\n                    sessionID: val.SessionID\n                }, () => {\n                    const callback = () => {\n                        if (!isNaN(publishedLegislationIndex) && publishedLegislationIndex > -1) {\n                            this.createEDoc(publishedLegislationIndex);\n                        }\n                        //create e doc for bills that were expanded; \n                        //if we are viewing bills ready for eDoc, then the bill just published will be removed so we also need to reset expandedBills state accordingly\n                        let newExpanded = { ...this.state.expandedBills };\n                        Object.entries(this.state.expandedBills).forEach((b, i) => {\n                            const idx = Number(b[0]);\n                            const expanded = b[1];\n                            if (this.state.eDocFiltered && !isNaN(publishedLegislationIndex) && publishedLegislationIndex > -1 && idx >= publishedLegislationIndex) {\n                                if (idx !== publishedLegislationIndex) { newExpanded[idx - 1] = expanded; }\n                                delete newExpanded[idx];\n                                if (expanded) {\n                                    this.createEDoc(idx - 1);\n                                }\n                            } else if (expanded) {\n                                this.createEDoc(idx);\n                            }\n                        })\n                        this.setState({ expandedBills: newExpanded });\n                    }\n                    if (this.state.billFilter) {\n                        this.filterBills({ target: { value: this.state.billFilter } }, (publishedLegislationIndex ? true : false), callback)\n                    } else {\n                        this.setState({\n                            filteredBillList: this.props.bills.legislationAmendmentList\n                        }, () => {\n                            callback();\n                        })\n                    }\n                    if (this.state.eDocFiltered) {\n                        this.filterToEDocReady()\n                    }\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isLoaded: true\n                });\n            });\n    }\n\n    handleChamberChange(val) {\n        this.setState({\n            selectedChamber: val,\n        });\n        if (this.state.sessionID) {\n            const params = \"?sessionID=\" + this.state.sessionID + \"&chamberCode=\" + val.value\n            this.setState({\n                isLoaded: false,\n                selectedBill: '',\n                amendmentFieldsetIsActive: false,\n                reviewFieldsetIsActive: false\n            }, () => {\n                this.props.actions.getLegislationAmendmentList(params)\n                    .then(() => {\n                        this.setState({\n                            billList: this.props.bills.legislationAmendmentList,\n                            isLoaded: true\n                        }, () => {\n                            if (this.state.billFilter) {\n                                this.filterBills({ target: { value: this.state.billFilter } })\n                            } else {\n                                this.setState({\n                                    filteredBillList: this.props.bills.legislationAmendmentList\n                                })\n                            }\n                            if (this.state.eDocFiltered) {\n                                this.filterToEDocReady()\n                            }\n                        });\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.setState({\n                            isLoaded: true\n                        });\n                    });\n            })\n        }\n    }\n\n    async appendEdoc(amendment, amendments) {\n        let draftText = amendment.DraftText;\n        let amendmentNumber = 1;\n        let amendmentTexts = [];\n        let amendmentItems = [];\n\n        for (let i = 0; i < amendments.length; i++) {\n            if (amendments[i].IsActive) {\n                let billTextParams = \"?legislationTextID=\" + amendments[i].LegislationTextID;\n                await this.props.actions.getBillText(billTextParams, true)\n                    .then(() => {\n                        amendmentTexts.push(this.props.bills.billText[0]);\n                    })\n            }\n        }\n\n        await amendmentTexts.forEach((amendmentText, i) => {\n            amendmentItems.push(...amendmentText.AmendmentItems)\n        })\n\n        await amendmentItems.sort((a, b) => {\n            return a.LineNumber - b.LineNumber\n        })\n\n        for (let k = 0; k < amendmentItems.length; k++) {\n            let thisDraftText = '';\n            //Sponsor\n            thisDraftText = thisDraftText + '<p class=\"' + amendmentItems[k].Sponsor.ClassName + '\">' + amendmentItems[k].Sponsor.Name + '</p>';\n            //Line\n            thisDraftText = thisDraftText + '<p class=\"' + amendmentItems[k].LineClassName + '\">' + (amendmentNumber) + \". \" + amendmentItems[k].Line + '</p>';\n            amendmentNumber++;\n            //Changes\n            if (amendmentItems[k].amendmentChanges) {\n                for (let l = 0; l < amendmentItems[k].amendmentChanges.length; l++) {\n                    for (let m = 0; m < amendmentItems[k].amendmentChanges[l].AmendmentActions.length; m++) {\n                        if (amendmentItems[k].amendmentChanges[l].AmendmentActions[m].text !== \"\") {\n                            thisDraftText = thisDraftText + '<p class=\"' + amendmentItems[k].amendmentChanges[l].ClassName + '\">' + amendmentItems[k].amendmentChanges[l].AmendmentActions[m].action + '</p>';\n                            thisDraftText = thisDraftText + '<p class=\"' + amendmentItems[k].amendmentChanges[l].AmendmentActions[m].TextClassName + '\">' + amendmentItems[k].amendmentChanges[l].AmendmentActions[m].text + '</p>';\n                        } else {\n                            thisDraftText = thisDraftText + '<p class=\"' + amendmentItems[k].amendmentChanges[l].ClassName + '\">' + amendmentItems[k].amendmentChanges[l].AmendmentActions[m].action + '</p>';\n                            for (let n = 0; n < amendmentItems[k].amendmentChanges[l].AmendmentActions[m].Lines.length; n++) {\n                                thisDraftText = thisDraftText + '<p class=\"' + amendmentItems[k].amendmentChanges[l].AmendmentActions[m].TextClassName + '\">' + amendmentItems[k].amendmentChanges[l].AmendmentActions[m].Lines[n] + '</p>';\n                            }\n                        }\n                    }\n                }\n            }\n\n            //We check to see if the exact amendment text already exists in the edoc. If it does then skip over it so as to not add it into the edoc a second time\n            if (draftText.replace(/(\\r\\n|\\n|\\r)/gm, \"\").indexOf(thisDraftText) === -1) {\n                draftText = draftText + thisDraftText;\n            }\n        }\n\n        amendment.DraftText = draftText;\n        amendment.AmendmentItems = amendmentItems\n\n        return amendment;\n    }\n\n    async getEDoc(billTextParams) {\n        await this.props.actions.getBillText(billTextParams, true)\n        return this.props.bills.billText[0];\n    }\n\n    async selectAmendment(billIndex, amendment) {\n        //If the amendment has a LegislationTextID then fetch it and start editing\n        if (amendment.LegislationTextID && amendment.TextDispositionID !== 12) {\n            let billTextParams = \"?legislationTextID=\" + amendment.LegislationTextID;\n            this.setState({\n                billDataIsLoading: billIndex\n            });\n            this.props.actions.getBillText(billTextParams, true)\n                .then(() => {\n                    if (this.props.bills.billText.length === 0) {\n                        throw 'No bill text found for this text ID';\n                    }\n                    if (this.props.bills.billText.length > 1) {\n                        throw 'There is more than one bill text for this text id';\n                    }\n                    const amendment = this.props.bills.billText[0];\n                    this.setState({\n                        wasEmpty: false,\n                        replaced: false,\n                        billDataIsLoading: null,\n                        selectedAmendment: amendment,\n                        reviewFieldsetIsActive: true,\n                        //billFieldsetIsActive: false,\n                        reviewContent: amendment.DraftText || '',\n                        isDirty: false,\n                        firstPass: true,\n                        unpublished: amendment.LegislationTextID && amendment.IsPublic ? false : true\n                    }, () => {\n                        this.reviewRef.current.scrollIntoView();\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err.toString());\n                    this.setState({\n                        billDataIsLoading: null\n                    });\n                    this.props.actions.makeToast([{ message: \"Failed to get Bill Text\", type: \"failure\" }]);\n                });\n        } else if (amendment.TextDispositionID === 12\n            && amendment.LegislationTextID //Else if we find an edoc that was previously saved and there is at least one adopted/adopted in part amendment that's still active we need to add it to the edoc\n            && (this.state.filteredBillList.length != this.state.billList.length\n                ? this.state.filteredBillList[billIndex].Amendments.find(x => x.IsActive && [7, 6].includes(x.TextDispositionID))\n                : this.state.billList[billIndex].Amendments.find(x => x.IsActive && [7, 6].includes(x.TextDispositionID)))) {\n\n            this.setState({\n                billDataIsLoading: true\n            })\n\n            let filtered = this.state.filteredBillList.length != this.state.billList.length;\n            let billList = filtered ? [...this.state.filteredBillList] : [...this.state.billList];\n            let amendments = billList[billIndex].Amendments.filter(x => x.IsActive && [7, 6].includes(x.TextDispositionID))\n\n            let billTextParams = \"?legislationTextID=\" + amendment.LegislationTextID;\n\n            //We have to go back across the wire a bunch to fetch the needed edoc draft text and amendment items to build the appended edoc\n            //If we didn't use async/await setting the state below outruns the building of the document\n            let eDocText = await this.getEDoc(billTextParams);\n            let appendedEDoc = await this.appendEdoc(eDocText, amendments);\n\n            amendment = appendedEDoc;\n\n            this.setState({\n                billDataIsLoading: null,\n                selectedAmendment: amendment,\n                reviewFieldsetIsActive: true,\n                reviewContent: amendment && amendment.DraftText || '',\n                isDirty: false,\n                firstPass: true,\n                wasEmpty: false,\n                replaced: false,\n                unpublished: amendment.LegislationTextID && amendment.IsPublic ? false : true\n            }, () => {\n                this.reviewRef.current.scrollIntoView();\n            });\n        } else {\n            let filtered = this.state.filteredBillList.length != this.state.billList.length;\n            let billList = filtered ? [...this.state.filteredBillList] : [...this.state.billList];\n            let billTextParams = \"?legislationID=\" + billList[billIndex].LegislationID;\n            let amendmentItems = [];\n\n            this.setState({\n                billDataIsLoading: billIndex\n            }, () => {\n                this.props.actions.getBillText(billTextParams, true)\n                    .then(() => {\n                        //If we don't have the LegislationTextID then this is an auto-generated document containing all adopted/adopted in part amendments\n                        //Build the document to be passed into the editor\n                        if (!amendment.LegislationTextID) {\n                            for (let i = 0; i < this.props.bills.billText.length; i++) {\n                                if (this.props.bills.billText[i].ChamberCode !== billList[billIndex].ChamberCode && (this.props.bills.billText[i].TextDispositionID === 6 || this.props.bills.billText[i].TextDispositionID === 7)) {\n                                    for (let j = 0; j < this.props.bills.billText[i].AmendmentItems.length; j++) {\n                                        amendmentItems.push(this.props.bills.billText[i].AmendmentItems[j]);\n                                    }\n                                }\n                            }\n\n                            let amendment = billList[billIndex].Amendments.find(x => !x.LegislationTextID);\n                            amendment.AmendmentItems = amendmentItems.sort((a, b) => a.LineNumber - b.LineNumber);\n\n                            //Build the doc\n                            let draftText = '<p class=\"textbl\">(' + billList[billIndex].LegislationNumber + ')</p> <p class=\"textbl\">AMENDMENT(S) PROPOSED BY THE ' + (billList[billIndex].ChamberCode === 'H' ? 'SENATE' : 'HOUSE') + '</p>';\n\n                            for (let k = 0; k < amendment.AmendmentItems.length; k++) {\n                                //Sponsor\n                                draftText = draftText + '<p class=\"' + amendment.AmendmentItems[k].Sponsor.ClassName + '\">' + amendment.AmendmentItems[k].Sponsor.Name + '</p>';\n                                //Line\n                                draftText = draftText + '<p class=\"' + amendment.AmendmentItems[k].LineClassName + '\">' + (k + 1) + \". \" + amendment.AmendmentItems[k].Line + '</p>';\n                                //Changes\n                                if (amendment.AmendmentItems[k] && amendment.AmendmentItems[k].amendmentChanges) {\n                                    for (let l = 0; l < amendment.AmendmentItems[k].amendmentChanges.length; l++) {\n                                        for (let m = 0; m < amendment.AmendmentItems[k].amendmentChanges[l].AmendmentActions.length; m++) {\n                                            if (amendment.AmendmentItems[k].amendmentChanges[l].AmendmentActions[m].text !== \"\") {\n                                                draftText = draftText + '<p class=\"' + amendment.AmendmentItems[k].amendmentChanges[l].ClassName + '\">' + amendment.AmendmentItems[k].amendmentChanges[l].AmendmentActions[m].action + '</p>';\n                                                draftText = draftText + '<p class=\"' + amendment.AmendmentItems[k].amendmentChanges[l].AmendmentActions[m].TextClassName + '\">' + amendment.AmendmentItems[k].amendmentChanges[l].AmendmentActions[m].text + '</p>';\n                                            } else {\n                                                draftText = draftText + '<p class=\"' + amendment.AmendmentItems[k].amendmentChanges[l].ClassName + '\">' + amendment.AmendmentItems[k].amendmentChanges[l].AmendmentActions[m].action + '</p>';\n                                                for (let n = 0; n < amendment.AmendmentItems[k].amendmentChanges[l].AmendmentActions[m].Lines.length; n++) {\n                                                    draftText = draftText + '<p class=\"' + amendment.AmendmentItems[k].amendmentChanges[l].AmendmentActions[m].TextClassName + '\">' + amendment.AmendmentItems[k].amendmentChanges[l].AmendmentActions[m].Lines[n] + '</p>';\n                                                }\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n\n                            amendment.DraftText = draftText;\n                            let amendments = this.props.bills.billText.filter(x => x.LegislationVersionID === 8);\n                            amendments.push(amendment);\n                            //Need to pick out the amendments specifically\n                            billList[billIndex].Amendments = amendments\n                            //Else if we are opening the edoc and there are previously unpublished adopted/adopted in part amendments present in the list then add them to the edoc\n                        } else {\n                            amendment = this.props.bills.billText.find(x => x.LegislationTextID === amendment.LegislationTextID)\n                            //We only want the amendments\n                            billList[billIndex].Amendments = this.props.bills.billText.filter(x => x.LegislationVersionID === 8);\n                        }\n\n                        if (filtered) {\n                            this.setState({\n                                filteredBillList: billList\n                            })\n                        } else {\n                            this.setState({\n                                billList: billList\n                            })\n                        }\n                        this.setState({\n                            billDataIsLoading: null,\n                            selectedAmendment: amendment,\n                            reviewFieldsetIsActive: true,\n                            //billFieldsetIsActive: false,\n                            reviewContent: amendment && amendment.DraftText || '',\n                            wasEmpty: false,\n                            replaced: false,\n                            isDirty: false,\n                            firstPass: true,\n                            unpublished: amendment.LegislationTextID && amendment.IsPublic ? false : true\n                        }, () => {\n                            this.reviewRef.current.scrollIntoView();\n                        });\n                    })\n            });\n\n            this.setState({\n                billDataIsLoading: false\n            })\n        }\n    }\n\n    filterBills(e, keepExpanded, callback) {\n        const val = e?.target?.value?.toUpperCase();\n        let filteredBillList = val ? this.state.billList.filter(bill => bill.LegislationNumber.toUpperCase().includes(val)) : this.state.billList;\n        const resultsChanged = filteredBillList.length !== this.state.billList.length;\n        this.setState({\n            filteredBillList: filteredBillList,\n            eDocFiltered: false,\n            billFilter: val\n        }, () => {\n            if (resultsChanged) {\n                //reset page to 0 since results have changed\n                this.onPageChange(0, keepExpanded);\n            }\n            if (callback)\n                callback();\n        });\n    }\n\n    toggleExpandedBills(newExpanded, pageIndex) {\n        let index, billIndex;\n        for (let key in newExpanded) {\n            //Find the key where the current expanded bills and the new expanded bills differs\n            if (newExpanded[key] && !this.state.expandedBills[key] || !newExpanded[key] && this.state.expandedBills[key]) {\n                index = key;\n                billIndex = parseInt(key) + (parseInt(pageIndex) * this.state.pageSize);\n            }\n        }\n\n        this.setState({\n            expandedBills: newExpanded\n        }, () => {\n            if (this.state.expandedBills[index]) {\n                this.createEDoc(billIndex);\n            }\n        })\n    }\n\n    filterToEDocReady() {\n        let billList = [...this.state.billList];\n\n        const filteredBillList = billList.filter((_, billIndex) => this.isEDocReady(billList, billIndex));\n        this.setState({ filteredBillList, eDocFiltered: true, billFilter: '' });\n    }\n\n    isEDocReady(billList, billIndex) {\n        //If we have not already created the new consolidated amendment\n        //And If, from the opposing chamber, there is any active Adopted In Part amendment OR there is at least one active Adopted amendment \n        //Then create the new consolidated amendment\n        const amendmentsFilteredByOpposingChamber = billList[billIndex]?.Amendments?.filter(x => x.ChamberCode !== billList[billIndex].ChamberCode);\n\n        return !amendmentsFilteredByOpposingChamber?.find(x => x.TextDispositionID === 12) &&\n            (amendmentsFilteredByOpposingChamber?.find(x => x.TextDispositionID === 7)\n                || amendmentsFilteredByOpposingChamber?.find(x => x.TextDispositionID === 6))\n    }\n\n    createEDoc(billIndex) {\n        let filtered = this.state.filteredBillList.length != this.state.billList.length ? true : false\n        let billList = filtered ? [...this.state.filteredBillList] : [...this.state.billList];\n\n        if (this.isEDocReady(billList, billIndex)) {\n            let eDoc = {\n                ChamberCode: billList[billIndex].ChamberCode === \"H\" ? \"S\" : \"H\", //Opposite of the bill's originating chamber\n                Description: (billList[billIndex].ChamberCode === \"H\" ? \"Senate\" : \"House\") + \" Amendments\", //Opposite of the bill's originating chamber\n                DocumentCode: null,\n                IsActive: true,\n                IsPublic: false,\n                LDNumber: null,\n                LegislationID: billList[billIndex].LegislationID,\n                LegislationTextID: null,\n                LegislationVersion: \"Amendment\",\n                LegislationVersionID: 8,\n                TextDisposition: \"Engrossed\",\n                TextDispositionID: 12,\n                VersionDate: \"\",\n                SessionCode: this.state.selectedSession.SessionCode,\n                SponsorType: billList[billIndex].ChamberCode === \"H\" ? \"Senate\" : \"House\", //Opposite of the bill's originating chamber\n            }\n            billList[billIndex].Amendments.push(eDoc)\n\n            if (filtered) {\n                this.setState({\n                    filteredBillList: billList\n                })\n            } else {\n                this.setState({\n                    billList: billList\n                });\n            }\n        }\n    }\n\n    componentDidMount() {\n        //Get the list of active sessions for the session dropdown\n        this.props.actions.getSessionShallowList(\"IsActive=true\")\n            .then(() => {\n                let sessionList = [...this.props.session.sessionShallowList];\n                sessionList.forEach(session => {\n                    session.label = session.SessionYear + ' ' + session.DisplayName;\n                    session.value = session.SessionID;\n                    //Set the last session in the list as the selected session\n                    if (session.IsDefault) {\n                        this.handleSessionChange(session);\n                    }\n                });\n                this.setState({\n                    sessionOptions: sessionList\n                });\n            });\n\n        //Find if user has access to house and/or senate and add option to chamber selector as applicable\n        let chamberOptions = [];\n\n        if (this.props.login.userClaims.claims.find(x => x.Resource === \"LegislationText\" && x.Scope == 'House')) {\n            chamberOptions.push({ label: \"House Amendment Activity\", value: \"H\" });\n        }\n        if (this.props.login.userClaims.claims.find(x => x.Resource === \"LegislationText\" && x.Scope == 'Senate')) {\n            chamberOptions.push({ label: \"Senate Amendment Activity\", value: \"S\" })\n        }\n\n        this.setState({\n            chamberOptions: chamberOptions,\n            disableChamberSelector: chamberOptions.length === 1\n        }, () => {\n            if (this.state.chamberOptions.length === 1) {\n                this.handleChamberChange(chamberOptions[0])\n            }\n        })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    onPageChange(pageIndex, keepExpanded) {\n        this.setState({\n            currentPage: pageIndex\n        }, () => {\n            //Reset the expanded bills so we don't have bills that weren't clicked on expanded as the user tabs through the pages of the table\n            if (!keepExpanded) {\n                this.toggleExpandedBills({}, this.state.currentPage)\n            }\n        })\n    }\n\n    onPageSizeChange(pageSize) {\n        this.setState({ pageSize: pageSize }, () => {\n            this.toggleExpandedBills({}, this.state.currentPage)\n        })\n    }\n\n    render() {\n        const { selectedAmendment } = this.state;\n        if (this.state.isPreviewVisible) {\n            return (\n                <div>\n                    <div className=\"flex-row align-center bottomline\">\n                        <h2>{this.state.selectedSession.SessionYear} {this.state.selectedSession.DisplayName} / {selectedAmendment.DocumentCode}</h2>\n                        <ReactToPrint\n                            trigger={() => <span><button type=\"button\" className=\"button print\">Print</button></span>}\n                            content={() => this.componentRef}\n                            pageStyle={\"break-inside: avoid\"}\n                        />\n                    </div>\n                    <div className=\"inner-grid two-col-sidebar\" ref={el => (this.componentRef = el)}>\n                        <div>\n                            {this.state.reviewContent ? renderHTML(this.state.reviewContent) : ''}\n                        </div>\n                    </div>\n                    <div className=\"button-bar\">\n                        <div></div>\n                        <div className=\"align-right\">\n                            <button disabled={this.state.isSaving} onClick={this.togglePreview} className=\"button secondary\">Edit</button>\n                            <button disabled={this.state.isSaving} onClick={() => this.handleSave(true)} className=\"button\">{this.state.isSaving ? \"Publishing...\" : \"Publish\"}</button>\n                        </div>\n                    </div>\n                </div>\n            );\n        } else {\n            return (\n                <div>\n                    <div>\n                        <Prompt\n                            when={this.state.isDirty}\n                            message={`You have unsaved changes. Are you sure you would like to leave?`}\n                        />\n                    </div>\n                    <h1>Amendment Management</h1>\n                    <div className=\"user-forms dlas-forms\">\n                        <fieldset className={this.state.billFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                            <legend onClick={this.toggleFieldsetCollapse.bind(this, 'billFieldsetIsActive')}>Bills {this.state.processingFile && <span> | <i>Creating file...</i></span>}</legend>\n                            <div>\n                                <SelectorSection\n                                    onSessionChange={this.handleSessionChange}\n                                    sessionOptions={this.state.sessionOptions}\n                                    selectedSession={this.state.selectedSession}\n\n                                    onChamberChange={this.handleChamberChange}\n                                    chamberOptions={this.state.chamberOptions}\n                                    selectedChamber={this.state.selectedChamber}\n                                    chamberIsDisabled={this.state.disableChamberSelector}\n\n                                    isDisabled={this.state.sessionID === \"\"}\n                                />\n                                <span className=\"insert-message small-text fail\">{this.props.bills.legislationAmendmentListError}</span>\n                                <div style={{ display: 'flex', gap: '10px' }}>\n                                    <input type=\"text\" disabled={!this.state.isLoaded || this.state.eDocFiltered} onChange={this.filterBills} value={this.state.billFilter} placeholder=\"Filter by bill number\" />\n                                    <button type=\"button\" className=\"button\" disabled={!this.state.isLoaded} onClick={() => !this.state.eDocFiltered ? this.filterToEDocReady() : this.filterBills()}>{!this.state.eDocFiltered ? 'Show Bills Ready For Second Chamber Engrossed Doc' : 'All Bills'}</button>\n                                </div>\n                                <BillGridSection\n                                    billList={this.state.filteredBillList && this.state.filteredBillList.sort((a, b) => {\n                                        let aPrefix = a.LegislationNumber.substr(0, 2);\n                                        let bPrefix = b.LegislationNumber.substr(0, 2);\n                                        let aNumber = parseInt(a.LegislationNumber.substr(2, a.LegislationNumber.length));\n                                        let bNumber = parseInt(b.LegislationNumber.substr(2, b.LegislationNumber.length));\n\n                                        return aPrefix > bPrefix ? 1 : aNumber > bNumber ? 1 : -1;\n                                    })}\n                                    selectAmendment={this.selectAmendment}\n                                    isLoaded={this.state.isLoaded}\n                                    billDataIsLoading={this.state.billDataIsLoading}\n                                    expandedBills={this.state.expandedBills}\n                                    toggleExpandedBills={this.toggleExpandedBills}\n                                    pageSize={this.state.pageSize}\n                                    currentPage={this.state.currentPage}\n                                    onPageChange={this.onPageChange}\n                                    onPageSizeChange={this.onPageSizeChange}\n                                    selectedChamber={this.state.selectedChamber.value}\n                                />\n                            </div>\n                        </fieldset>\n                        <fieldset ref={this.reviewRef} className={this.state.reviewFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                            <legend onClick={this.toggleFieldsetCollapse.bind(this, 'reviewFieldsetIsActive')}><span>Review </span>\n                                {selectedAmendment &&\n                                    <span>\n                                        | {selectedAmendment.DocumentCode}\n                                    </span>\n                                }</legend>\n                            <div>\n                                <ReviewSection\n                                    editorContent={this.state.reviewContent}\n                                    handleEditorChange={this.handleEditorChange}\n                                    sessionId={this.state.selectedSession.SessionID}\n                                    allowAmendmentActions={true}\n                                    userChamber={this.props.login.userClaims.roles.find((x) => x === \"Admin\") ? \"Admin\" : this.props.login.userClaims.roles.find((x) => x === \"HouseLegislationAuthor\") ? \"H\" : \"S\"}\n                                    billNumber={this.state.selectedAmendment ? this.state.selectedAmendment.LegislationNumber : ''}\n                                    location={this.props.location.pathname}\n                                    pasteAsText={false}\n                                    setWasEmpty={this.setWasEmpty}\n                                    wasEmpty={this.state.wasEmpty}\n                                    setReplaced={this.setReplaced}\n                                    replaced={this.state.replaced}\n                                />\n                                <div className=\"button-bar\">\n                                    <div />\n                                    <div className=\"align-right\">\n                                        <button type=\"button\" className=\"button\" disabled={this.state.isSaving || !this.state.selectedAmendment} onClick={() => this.handleSave(this.state.unpublished ? false : true)}>{this.state.isSaving ? !this.state.unpublished ? \"Republishing...\" : \"Saving...\" : !this.state.unpublished ? \"Republish\" : \"Save\"}</button>\n                                        {this.state.unpublished && <button type=\"button\" className=\"button\" disabled={!this.state.selectedAmendment || this.state.isSaving || this.state.isDirty} onClick={this.togglePreview}>Preview</button>}\n                                    </div>\n                                </div>\n                            </div>\n                        </fieldset>\n                    </div>\n                </div>\n            );\n        }\n    }\n}\nexport default connect(\n    (state) => {\n        const { bills, session, nav, login } = state;\n        return {\n            bills,\n            session,\n            nav,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, sessionActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(AmendmentManagement)","import React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport Popout from '../../../lis-shared/lis-layout/components/lis-popout-component';\n\nclass AdminDashboard extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            showPortal: false\n        }\n        this.togglePortal = this.togglePortal.bind(this);\n    }\n\n\n    togglePortal(state) {\n        this.setState({\n            showPortal: !state\n        });\n    }\n\n    render() {\n        return(\n            <div>\n                <h1>Dashboard</h1>\n                <p>This is the user dashboard view.</p>\n                <button onClick={() => this.togglePortal(this.state.showPortal)}>Test </button>\n                {this.state.showPortal &&\n                    <Popout togglePortal={this.togglePortal} windowTitle=\"test\">\n                        <p>Even though I render in a different window, I share state!</p>\n                    </Popout>\n                }\n            </div>\n        );\n    }\n}\n\n\nexport default connect(\n    (state) => {\n        const { committee } = state;\n        return {\n            committee\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, committeeActionCreators), dispatch)\n        }\n    }\n)(AdminDashboard)","import React, { useEffect, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { collectionActionCreators } from '../../../stores/lis-collection-store';\nimport queryString from 'query-string';\nimport moment from 'moment-timezone';\nimport Select from 'react-select';\nimport { voteActionCreators } from '../../../stores/lis-votes-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\n\nconst criteriaTypeWeights = {\n    \"Introduced\": 1,\n    \"Patron\": 2,\n    \"Keyword\": 3,\n    \"Committee\": 4,\n    \"Status Change\": 5,\n    \"Docket/Agenda\": 6,\n    \"New Version\": 7,\n    \"Impact Statements\": 8,\n}\n\nconst sortLegNumbers = (a, b) => {\n    if (a && !b) {\n        return 1;\n    }\n\n    if (!a && b) {\n        return -1;\n    }\n\n    //chamber, type, number\n    return a[0].localeCompare(b[0]) || a[1].localeCompare(b[1]) || parseInt(a.substr(2) - b.substr(2));\n}\n\nconst LegEvent = props => {\n    const { item, bill } = props;\n    const [showLinks, toggleLinks] = useState(false);\n    const [isLoading, toggleLoading] = useState(false);\n    const [voteLinks, setVoteLinks] = useState('');\n    const getVoteLinks = () => {\n        if (voteLinks) {\n            toggleLinks(!showLinks);\n        } else {\n            toggleLoading(true);\n            props.getVoteLinks(item, res => {\n                setVoteLinks(res);\n                toggleLoading(false);\n                toggleLinks(true);\n            })\n        }\n    }\n    const linkStyle = {\n        fontSize: '1em',\n        margin: '0 5px 0 0'\n    };\n    return <tr className='parent-tr slidedown-closed bill-details-table-row'>\n        <td className=\"left\">{moment(item.EventDate).format('l')}</td>\n        <td className=\"left\">{item.ChamberCode === 'H' && 'House'} {item.ChamberCode === \"S\" && \"Senate\"}</td>\n        <td className=\"left\">\n            {item.Description}\n            {voteLinks && showLinks &&\n                <div className=\"link-row\">\n                    {voteLinks.map((link, index) =>\n                        <div key={index}>\n                            {link.VoteID ? link.IsPublic ? <Link to={`/vote-details/${bill.LegislationNumber}/${bill.SessionCode}/${link.VoteNumber}`}>Vote</Link> : <span>Vote Detail Pending</span> : ''}\n                            {link.CommitteeID ? <Link to={`/session-details/${bill.SessionCode}/committee-information/${link.CommitteeNumber}/committee-details`}>{link.ParentCommitteeID ? 'Subcommittee' : 'Committee'}</Link> : ''}\n                            {link.LegislationNumber && (link.SessionCode || item.SessionCode) ? <Link to={`/bill-details/${link.SessionCode || item.SessionCode}/${link.LegislationNumber}`}>Legislation</Link> : ''}\n                        </div>\n                    )}\n                </div>\n            }\n        </td>\n        <td className=\"button-container\">\n            {item.ReferenceID &&\n                <React.Fragment>\n                    {isLoading ?\n                        <React.Fragment>\n                            <label className=\"arrow-down-label\"></label>\n                            <span className=\"small-spinner\"></span>\n                        </React.Fragment>\n                        :\n                        <React.Fragment>\n                            <button className={`${showLinks ? \"arrow-up\" : \"arrow-down\"}`} onClick={getVoteLinks}></button>\n                        </React.Fragment>\n                    }\n                </React.Fragment>\n            }\n        </td>\n    </tr>\n}\n\nconst BillInfo = props => {\n    const { reasonGrouping, bill, checked, isAdding, allBillsExpanded } = props;\n    const [showInfo, toggleInfo] = useState(false);\n\n    useEffect(() => {\n        toggleInfo(allBillsExpanded);\n    }, [allBillsExpanded])\n\n    return (\n        <div className=\"flex-row flex-start bill-theme\">\n            {!props.selectedCollection ? <div></div> :\n                <div className=\"collection-buttons\">\n                    {collectionBillIndex !== -1 ?\n                        <button type=\"button\" onClick={deleteBillFromCollection} className='button remove'></button>\n                        :\n                        <button type=\"button\" onClick={addBillToCollection} className='button add'></button>\n                    }\n                </div>\n            }\n            <div className='parent-li se-bill-search-result'>\n                <div className=\"small-gap-grid two-col-sidebar-alt\">\n                    <div className=\"description notification\">\n                        <input disabled={isAdding} checked={checked || false} onChange={props.handleCheckbox} type=\"checkbox\" />\n                        <div className=\"docket-agenda-link-container\">\n                            <Link to={`/bill-details/${bill.SessionCode}/${bill.LegislationNumber}`}>{bill.LegislationNumber}</Link>\n                            {reasonGrouping?.CriteriaType === \"Docket/Agenda\" && bill.CommitteeNumber && bill.CommitteeNumber.startsWith('H') && <a className=\"docket-agenda-link\" href={`https://virginiageneralassembly.gov/house/agendas/agendaDates.php?id=${bill.CommitteeNumber}&ses=${bill.SessionCode.substr(2)}`}>(Agenda)</a>}\n                            {reasonGrouping?.CriteriaType === \"Docket/Agenda\" && bill.CommitteeNumber && bill.CommitteeNumber.startsWith('S') && bill.ReferenceID && <Link className=\"docket-agenda-link\" to={`/session-details/${bill.SessionCode}/committee-information/${bill.CommitteeNumber}/dockets/${bill.ReferenceID}`}>(Docket)</Link>}\n                        </div>\n                        <h3 className=\"small-text\">{bill.LegislationDescription}</h3>\n                    </div>\n                    <div className=\"button-container\">\n                        <button className={showInfo ? 'arrow-up' : 'arrow-down'} onClick={() => toggleInfo(!showInfo)}>More info</button>\n                    </div>\n                    {showInfo &&\n                        <div>\n                            {bill.LegislationTextID && reasonGrouping?.CriteriaType === \"Keyword\" ?\n                                <button\n                                    className=\"button-link\"\n                                    onClick={() => props.pushWithKeywords(bill.SessionCode, bill.LegislationNumber, bill.DocumentCode, bill.WatchListID)}>\n                                    View Keyword Hits for {bill.DocumentCode}</button>\n                                : null}\n                            <table className=\"line-table\">\n                                <tbody>\n                                    {bill.LegislationEvents.map((item, index) =>\n                                        <LegEvent\n                                            key={index}\n                                            item={item}\n                                            bill={bill}\n                                            getVoteLinks={props.getVoteLinks}\n                                        />\n                                    )}\n                                </tbody>\n                            </table>\n                        </div>\n                    }\n                </div>\n                <hr className=\"faded-line\" />\n            </div>\n        </div >\n    );\n}\n\nclass NotificationManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoaded: false,\n            errorMessage: '',\n            notifications: [],\n            watchlists: [],\n            selectedWatchlists: [],\n            checkedBills: [],\n            isAdding: false,\n            expandLatestHistory: false\n        }\n\n        this.getWatchlists = this.getWatchlists.bind(this);\n        this.getVoteLinks = this.getVoteLinks.bind(this);\n        this.handleCheckbox = this.handleCheckbox.bind(this);\n        this.selectWatchlist = this.selectWatchlist.bind(this);\n        this.addBillsToWatchlist = this.addBillsToWatchlist.bind(this);\n        this.pushWithKeywords = this.pushWithKeywords.bind(this);\n        this.expandLatestHistory = this.expandLatestHistory.bind(this);\n\n        this.stickyHeader = React.createRef();\n        this.notificationsRef = React.createRef();\n    }\n\n    getVoteLinks(item, callback) {\n        const params = '?legislationEventID=' + item.LegislationEventID;\n        this.props.actions.getVoteLink(params).then(() => {\n            let links = [...this.props.votes.voteLinkResponse];\n            let linkPromises = [];\n            links.forEach(link => {\n                if (link.CommitteeID) {\n                    const cmtePromise = this.props.actions.getCommitteeById(\"?id=\" + link.CommitteeID + \"&sessionCode=\" + vote.SessionCode)\n                        .then(() => {\n                            link.CommitteeNumber = this.props.committee.committeeByIdData.CommitteeNumber;\n                        }).catch((err) => {\n                            console.error(err);\n                            // Don't care if it fails. That committee won't be visible\n                            return Promise.resolve();\n                        })\n                    linkPromises.push(cmtePromise);\n                }\n                // If there are any vote links of type 'Legislation' then the legislation ID needs to be turned into a legislation number to form the link\n                if (link.ReferenceType === \"Legislation\") {\n                    const promise = this.props.actions.getBill(link.ReferenceID)\n                        .then(() => {\n                            link.LegislationNumber = this.props.bills.bill.LegislationNumber;\n                            link.SessionCode = link.SessionCode || vote.SessionCode;\n                            return Promise.resolve();\n                        }).catch(err => {\n                            console.error(err);\n                            // Don't care if it fails. That legislation won't be visible\n                            return Promise.resolve();\n                        });\n                    linkPromises.push(promise);\n                }\n            });\n            Promise.all(linkPromises)\n                .then(() => {\n                    callback(this.props.votes.voteLinkResponse);\n                });\n\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.error(err);\n            callback(null);\n        });\n    }\n\n    handleCheckbox(notificationIDs, selectAll) {\n        let checkedBills = [...this.state.checkedBills];\n        notificationIDs.forEach(notificationID => {\n            let checkedBillIdx = checkedBills.findIndex(b => b.NotificationID === notificationID);\n            if (checkedBillIdx > -1) {\n                checkedBills[checkedBillIdx].checked = selectAll === true || !Boolean(checkedBills[checkedBillIdx].checked);\n            } else {\n                checkedBills.push({ NotificationID: notificationID, checked: true })\n            }\n        })\n        this.setState({\n            checkedBills: checkedBills\n        });\n    }\n\n    selectWatchlist(val) {\n        this.setState({\n            selectedWatchlists: val\n        });\n    }\n\n    addBillsToWatchlist() {\n        this.setState({\n            isAdding: true\n        });\n        let selectedWatchlists = [...this.state.selectedWatchlists];\n        selectedWatchlists.forEach(wl => wl.WatchListLegislation = wl.WatchListLegislation || []);\n        let billsFound = false;\n        let duplicate = false;\n        [...this.state.checkedBills].filter(c => c.checked).forEach((c) => {\n            const bill = this.state.notifications.flatMap(n => n.Committees).flatMap(c => c.Reasons).flatMap(r => r.Bills).find(b => b.NotificationID === c.NotificationID);\n            if (bill) {\n                selectedWatchlists.forEach(wl => {\n                    if (!wl.WatchListLegislation.find(b => b.LegislationID === bill.LegislationID && b.WatchListLegislationID && !b.DeletionDate)) {\n                        billsFound = true;\n                        wl.WatchListLegislation.push({\n                            LegislationID: bill.LegislationID,\n                            WatchListID: wl.WatchListID\n                        });\n                    } else {\n                        duplicate = true;\n                    }\n                });\n            }\n        })\n        if (!billsFound && !duplicate) {\n            this.setState({\n                isAdding: false\n            });\n            return;\n        } else if (!billsFound && duplicate) {\n            this.props.actions.makeToast([{ message: ([...this.state.checkedBills].filter(c => c.checked).length > 1 ? \"These bills already exist\" : \"This bill already exists\") + \" in \" + (selectedWatchlists.length > 1 ? \"these watchlists\" : \"this watchlist\"), type: \"failure\" }]);\n            this.setState({\n                isAdding: false\n            });\n            return;\n        }\n\n        this.props.actions.saveCollections({ WatchLists: selectedWatchlists })\n            .then(() => {\n                let selectedWatchlists = [...this.props.collection.collectionSave];\n                let watchlists = [...this.state.watchlists];\n                selectedWatchlists.forEach(wl => {\n                    const savedWatchlistIndex = watchlists.findIndex(w => w.WatchListID === wl.WatchListID);\n                    watchlists[savedWatchlistIndex] = wl;\n                    wl.WatchListLegislation = wl.WatchListLegislation || [];\n                })\n                this.setState({\n                    isAdding: false,\n                    selectedWatchlists: selectedWatchlists,\n                    watchlists: watchlists\n                });\n                this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    isAdding: false\n                });\n                console.error(err);\n                this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n            });\n    }\n\n    organizeNotifications(notifications) {\n        notifications.sort(a => a.CommitteeName === undefined ? -1 : 1);\n        notifications.sort((a, b) => a.WatchListID - b.WatchListID || (a.CriteriaType !== b.CriteriaType && criteriaTypeWeights[a.CriteriaType] && criteriaTypeWeights[b.CriteriaType] && criteriaTypeWeights[a.CriteriaType] - criteriaTypeWeights[b.CriteriaType]) || sortLegNumbers(a.LegislationNumber, b.LegislationNumber));\n        let organizedNotifications = new Notifications();\n        let committeesArr = new Committees();\n        let previousNotification = notifications[0];\n        notifications.forEach(notification => {\n            if (previousNotification.WatchListID !== notification.WatchListID) {\n                const newNotificationContainer = new Notification(\n                    [...committeesArr.NotificationGroupings],\n                    previousNotification.Name,\n                    previousNotification.Description,\n                    previousNotification.WatchListID\n                );\n                organizedNotifications.notifications.push(newNotificationContainer);\n                committeesArr = new Committees();\n                const objName = notification.CommitteeName || \"nonCommitteeBills\";\n                committeesArr.NotificationGroupings.push(new NotificationGrouping(objName, notification.CommitteeNumber, [new NotificationReason(notification.CriteriaType, notification.NotificationReason, [notification])]));\n            } else {\n                // Notification items are organized by watchlist but also organized by committee. The object name is the committee name which is used to display to the user what committee the notification comes from\n                const objName = notification.CommitteeName || \"nonCommitteeBills\";\n                if (!committeesArr.NotificationGroupings.find(cmte => cmte.CommitteeName === objName)) {\n                    committeesArr.NotificationGroupings.push(new NotificationGrouping(objName, notification.CommitteeNumber, []));\n                }\n                let reasonObjIdx = committeesArr.NotificationGroupings.find(group => group.CommitteeName === objName).Reasons.findIndex(legListing => legListing.CriteriaType === notification.CriteriaType);\n                if (reasonObjIdx < 0) {\n                    committeesArr.NotificationGroupings.find(cmte => cmte.CommitteeName === objName).Reasons.push(new NotificationReason(notification.CriteriaType, notification.NotificationReason, [notification]));\n                } else if (!committeesArr.NotificationGroupings.find(cmte => cmte.CommitteeName === objName).Reasons[reasonObjIdx].Bills.find(b => b.LegislationNumber === notification.LegislationNumber)) { //don't insert duplicate leg numbers\n                    committeesArr.NotificationGroupings.find(cmte => cmte.CommitteeName === objName).Reasons[reasonObjIdx].Bills.push(notification)\n                }\n            }\n            previousNotification = notification;\n        });\n        //If the object is not empty then that means not every element in the results have been added to a container\n        //So, check to see if the object has keys and if so create another container\n        if (committeesArr.NotificationGroupings.length > 0) {\n            const newNotificationContainer = new Notification(\n                [...committeesArr.NotificationGroupings],\n                previousNotification.Name,\n                previousNotification.Description,\n                previousNotification.WatchListID\n            );\n            organizedNotifications.notifications.push(newNotificationContainer);\n        }\n\n        return organizedNotifications.notifications;\n    }\n\n    pushWithKeywords(sessionCode, legislationNumber, documentCode, watchlistId) {\n        const selectedWatchlist = this.state.watchlists.find(w => w.WatchListID === watchlistId);\n        if (selectedWatchlist) {\n            const keywordsList = selectedWatchlist.NotificationCriterias.filter(c => c.CriteriaType === \"Keyword\");\n            // Need to seperate each criteria value into an array of words. That is the purpose of the join followed by the split\n            const keywordExpression = keywordsList.map(k => k.CriteriaValue).join(\" \");\n            const partsRegex = /(\\().*?(\\)+)|(\").*?(\"+)|(').*?('+)|['a-zA-Z*]*/g;\n            const keywordParts = keywordExpression.match(partsRegex);\n            let foundAnOperator = false;\n            for (const keywordPart of keywordParts) {\n                if (keywordPart && (keywordPart.toLowerCase() === \"and\" || keywordPart.toLowerCase() === \"or\")) { foundAnOperator = true; break; }\n            }\n\n            let sanitizedKeywords = [];\n            var chars = { \"(\": \"\", \")\": \"\", '\"': \"\" };\n            if (!foundAnOperator) {\n                //need to behave like API to keep it consistent:\n                //per API, no operators so just clean expression from single quote operators and treat it as single keyword\n                let phraseToInsert = keywordExpression.replace(/[()\"]/g, m => chars[m]);\n                if (phraseToInsert.startsWith(\"'\") && phraseToInsert.endsWith(\"'\")) { phraseToInsert = phraseToInsert.substr(1, phraseToInsert.length - 2) }\n                if (phraseToInsert) { sanitizedKeywords.push(phraseToInsert); }\n            } else {\n                for (const keywordPart of keywordParts) {\n                    if (keywordPart && keywordPart.toLowerCase() != \"and\" && keywordPart.toLowerCase() != \"or\") {\n                        let wordToInsert = keywordPart.replace(/[()\"]/g, m => chars[m]);\n                        if (wordToInsert.startsWith(\"'\") && wordToInsert.endsWith(\"'\")) { wordToInsert = wordToInsert.substr(1, wordToInsert.length - 2) }\n                        if (wordToInsert) { sanitizedKeywords.push(wordToInsert); }\n                    }\n                }\n            }\n            window.open(`/bill-details/${sessionCode}/${legislationNumber}/text/${documentCode}?keywords=${encodeURIComponent(sanitizedKeywords.join(\" \"))}`, '_blank');\n        }\n    }\n\n    componentDidMount() {\n        const parsed = queryString.parse(this.props.location.search, { decode: true });\n        if (parsed.date) {\n            this.props.actions.getNotifications(`?notificationDate=${encodeURIComponent(parsed.date)}`)\n                .then(() => {\n                    const organizedNotifications = this.organizeNotifications(this.props.collection.notifications)\n                    this.setState({\n                        notifications: organizedNotifications,\n                        isLoaded: true\n                    }, () => {\n                        if (this.stickyHeader.current && this.notificationsRef.current) {\n                            const scrollTop = this.notificationsRef.current.getBoundingClientRect().top;\n                            const self = this;\n                            window.onscroll = function () {\n                                if (window.scrollY >= scrollTop) {\n                                    self.stickyHeader.current?.classList?.add('background-color');\n                                } else {\n                                    self.stickyHeader.current?.classList?.remove('background-color');\n                                }\n                            }\n                        }\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.setState({\n                        errorMessage: err.toString(),\n                        isLoaded: true\n                    });\n                });\n            // Get the user's watchlists\n            if (!this.props.session.sessionList || !this.props.session.sessionList.length) {\n                this.props.actions.getSessionList()\n                    .then(() => {\n                        this.setState({\n                            sessionOptions: this.props.session.sessionList\n                        }, () => {\n                            this.getWatchlists();\n                        })\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        console.log(err)\n                    });\n            } else {\n                this.setState({\n                    sessionOptions: this.props.session.sessionList\n                }, () => {\n                    this.getWatchlists();\n                })\n            }\n        } else {\n            this.setState({ errorMessage: 'No date has been provided.', isLoaded: true })\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        if (prevProps.nav.session != this.props.nav.session && this.state.sessionOptions) {\n            this.getWatchlists();\n        }\n    }\n\n    getWatchlists() {\n        const selectedSession = this.state.sessionOptions.find(s => s.SessionCode === this.props.nav.session);\n        if (selectedSession) {\n            this.props.actions.getCollections(\"?SessionID=\" + selectedSession.SessionID)\n                .then(() => {\n                    this.setState({\n                        watchlists: this.props.collection.collections\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return\n                    }\n                });\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    expandLatestHistory() {\n        this.setState({ expandLatestHistory: !this.state.expandLatestHistory })\n    }\n\n    render() {\n        const { isLoaded, errorMessage, notifications, watchlists, selectedWatchlists, checkedBills, isAdding } = this.state;\n        return (<div>\n            {!isLoaded && !errorMessage &&\n                <div className=\"center-spinner spinner\"></div>\n            }\n            {isLoaded &&\n                <div>\n                    <h2>{Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) || Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\")) ? 'Watchlists - Notifications' : 'Watchlist - Notification'}</h2>\n                    {\n                        errorMessage ?\n                            <h4>{errorMessage}</h4>\n                            :\n                            !notifications.length ?\n                                <h4>You do not have any notifications for the provided date.</h4>\n                                :\n                                <>\n                                    <div className=\"sticky\" ref={this.stickyHeader}>\n                                        <div className=\"inner-grid two align-center padding\">\n                                            <div>\n                                                <button onClick={this.expandLatestHistory} type=\"button\" className=\"button mobile-w-100 mobile-mb-10\">{this.state.expandLatestHistory ? 'Hide' : 'Show'} Latest History</button>\n                                            </div>\n                                            <div className=\"inner-grid three-and-one\">\n                                                <Select\n                                                    options={watchlists}\n                                                    value={selectedWatchlists}\n                                                    onChange={this.selectWatchlist}\n                                                    isClearable\n                                                    isMulti\n                                                    getOptionLabel={opt => opt.Name}\n                                                    getOptionValue={opt => opt.WatchListID}\n                                                />\n                                                <button onClick={this.addBillsToWatchlist} disabled={!selectedWatchlists || !selectedWatchlists.length || checkedBills.every(b => !b) || isAdding} type=\"button\" className=\"button\">{isAdding ? \"Adding\" : \"Add\"} Bills To Watchlist(s)</button>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div ref={this.notificationsRef}>\n                                        {notifications.map((notification, notificationIndex) =>\n                                            <div key={notificationIndex}>\n                                                {notification.Name &&\n                                                    <Link className=\"notification-watchlist-name\" to={`/bill-search?collection=${notification.WatchListID}`}><h2>{notification.Name}{notification.Description ? <small> - {notification.Description}</small> : ''}</h2></Link>\n                                                }\n                                                <ul className=\"slidedown-list\">\n                                                    {notification.Committees.map((committeeGrouping, committeeGroupingIndex) =>\n                                                        <React.Fragment key={committeeGroupingIndex}>\n                                                            {committeeGrouping.CommitteeName !== \"nonCommitteeBills\" &&\n                                                                <h3>{committeeGrouping.CommitteeNumber ? '(' + committeeGrouping.CommitteeNumber[0] + ') ' : ''}{committeeGrouping.CommitteeName}</h3>\n                                                            }\n                                                            <div style={committeeGrouping.CommitteeName != \"nonCommitteeBills\" ? { paddingLeft: '1em' } : {}}>\n                                                                {committeeGrouping?.Reasons?.map((reasonGrouping, reasonGroupingIndex) => {\n                                                                    const selectAll = !reasonGrouping.Bills.map(b => b.NotificationID).find(n => !checkedBills.filter(c => c.checked).map(b => b.NotificationID).includes(n));\n                                                                    return (\n                                                                        <React.Fragment key={reasonGroupingIndex}>\n                                                                            {reasonGrouping.Reason &&\n                                                                                <h4>{reasonGrouping.Reason}</h4>\n                                                                            }\n                                                                            <div className=\"small-gap-grid two-col-sidebar-alt\" style={{ marginBottom: '5px' }}>\n                                                                                <div className=\"description notification\" style={{ alignItems: 'center' }}>\n                                                                                    <input disabled={isAdding} checked={selectAll} onChange={() => this.handleCheckbox(reasonGrouping.Bills.map(b => b.NotificationID), !selectAll)} type=\"checkbox\" />\n                                                                                    <span style={{ fontSize: '0.75em' }}>Select all</span>\n                                                                                </div>\n                                                                            </div>\n                                                                            {reasonGrouping.Bills.map(((bill, billIndex) =>\n                                                                                <BillInfo\n                                                                                    reasonGrouping={reasonGrouping}\n                                                                                    key={billIndex}\n                                                                                    bill={bill}\n                                                                                    checked={checkedBills.find(b => b.NotificationID === bill.NotificationID) && checkedBills.find(b => b.NotificationID === bill.NotificationID).checked}\n                                                                                    isAdding={isAdding}\n                                                                                    handleCheckbox={() => this.handleCheckbox([bill.NotificationID])}\n                                                                                    getVoteLinks={this.getVoteLinks}\n                                                                                    pushWithKeywords={this.pushWithKeywords}\n                                                                                    allBillsExpanded={this.state.expandLatestHistory}\n                                                                                />\n                                                                            ))}\n                                                                        </React.Fragment>\n                                                                    )\n                                                                }\n                                                                )}\n                                                            </div>\n                                                        </React.Fragment>\n                                                    )}\n                                                </ul>\n                                            </div>\n                                        )}\n                                    </div>\n                                </>\n                    }\n                </div>\n            }\n        </div>)\n    }\n}\n\nclass Notifications {\n    constructor(notifications) {\n        this.notifications = notifications || [];\n    }\n\n    notifications;\n}\n\nclass Notification {\n    constructor(committees, name, description, watchlistID) {\n        this.Committees = committees;\n        this.Name = name;\n        this.Description = description;\n        this.WatchListID = watchlistID;\n    }\n\n    Committees;\n    Name;\n    Description;\n    WatchListID;\n}\n\nclass Committees {\n    constructor(notificationGroupings) {\n        this.NotificationGroupings = notificationGroupings || [];\n    }\n\n    NotificationGroupings;\n}\n\nclass NotificationGrouping {\n    constructor(committee, committeeNumber, reasons) {\n        this.CommitteeName = committee;\n        this.CommitteeNumber = committeeNumber;\n        this.Reasons = reasons;\n    }\n\n    CommitteeName;\n    CommitteeNumber;\n    Reasons;\n}\n\nclass NotificationReason {\n    constructor(criteriaType, reason, bills) {\n        this.CriteriaType = criteriaType;\n        this.Reason = reason;\n        this.Bills = bills;\n    }\n\n    CriteriaType;\n    Reason;\n    Bills;\n}\n\nexport default connect(\n    (state) => {\n        const { collection, bills, votes, nav, session, login } = state;\n        return {\n            collection,\n            bills,\n            votes,\n            nav,\n            session,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, collectionActionCreators, voteActionCreators, navActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(NotificationManagement)","import { partnerRequest, publicRequest } from \"../services/request.service\";\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst docListSuccess = 'DOC_LIST_SUCCESS';\nconst docListFailure = 'DOC_LIST_FAILURE';\n\nconst docSuccess = 'DOC_SUCCESS';\nconst docFailure = 'DOC_FAILURE';\n\nconst keyRegistrationSuccess = \"KEY_REGISTRATION_SUCCESS\";\nconst keyRegistrationFailure = \"KEY_REGISTRATION_FAILURE\";\n\nconst confirmKeyRegistrationSuccess = \"CONFIRM_KEY_REGISTRATION_SUCCESS\";\nconst confirmKeyRegistrationFailure = \"CONFIRM_KEY_REGISTRATION_FAILURE\";\n\nconst savePartnerSuccess = \"SAVE_PARTNER_SUCCESS\";\nconst savePartnerFailure = \"SAVE_PARTNER_FAILURE\";\n\nconst partnerListSuccess = 'PARTNER_LIST_SUCCESS';\nconst partnerListFailure = 'PARTNER_LIST_FAILURE';\n\nconst getPartnerSuccess = 'GET_PARTNER_SUCCESS';\nconst getPartnerFailure = 'GET_PARTNER_FAILURE';\n\nconst getPartnerKeySuccess = 'GET_PARTNER_KEY_SUCCESS';\nconst getPartnerKeyFailure = 'GET_PARTNER_KEY_FAILURE';\n\nconst initialState = {\n    docList: [],\n    doc: '',\n    docListError: '',\n    docError: '',\n    savePartnerError: '',\n    keyRegistrationError: '',\n    partnerListError: '',\n    partnerError: '',\n    partnerKeyError: ''\n};\n\nexport const developersActionCreators = {\n\n    receiveDocList: (content) => ({\n        type: docListSuccess,\n        docList: content\n    }),\n\n    docListError: (message) => ({\n        type: docListFailure,\n        docListError: message\n    }),\n\n    getDocList: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            };\n\n            return publicRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/ReportFileGeneration/api/GetApiListAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(developersActionCreators.docListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(developersActionCreators.receiveDocList(result[1].ApiDocumentations))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(developersActionCreators.docListError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveDoc: (content) => ({\n        type: docSuccess,\n        doc: content\n    }),\n\n    docError: (message) => ({\n        type: docFailure,\n        docError: message\n    }),\n\n    getDoc: (params, partner) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            };\n\n            return partner ? partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/ReportFileGeneration/api/getpartnerapidocumentationasync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(developersActionCreators.docError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(developersActionCreators.receiveDoc(result[1].ApiDocumentations[0].Documentation))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(developersActionCreators.docError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n                : publicRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/ReportFileGeneration/api/getapidocumentationasync', 'GET', headers, '', params)\n                    .then(result => {\n                        if (result[0] === REQUEST_FAILURE) {\n                            dispatch(developersActionCreators.docError(result[1]))\n                            return Promise.reject(result[1])\n                        } else if (result[0] === REQUEST_SUCCESS) {\n                            dispatch(developersActionCreators.receiveDoc(result[1].ApiDocumentations[0].Documentation))\n                        } else if (result[0] === NO_CONTENT) {\n                            dispatch(developersActionCreators.docError('No Content'))\n                            return Promise.reject('No Content')\n                        } else if (result.name === 'AbortError') {\n                            return Promise.reject(\"Aborted\");\n                        }\n                    }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveKeyRegistration: (content) => ({\n        type: keyRegistrationSuccess\n    }),\n\n    keyRegistrationError: (message) => ({\n        type: keyRegistrationFailure,\n        keyRegistrationError: message\n    }),\n\n    submitKeyRegistration: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/PartnerAuthentication/api/RegisterPartnerAsync', 'POST', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(developersActionCreators.keyRegistrationError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(developersActionCreators.receiveKeyRegistration(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(developersActionCreators.keyRegistrationError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveConfirmKeyRegistration: (content) => ({\n        type: confirmKeyRegistrationSuccess\n    }),\n\n    confirmKeyRegistrationError: (message) => ({\n        type: confirmKeyRegistrationFailure,\n        confirmKeyRegistrationError: message\n    }),\n\n    submitConfirmKeyRegistration: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/PartnerAuthentication/api/CompletePartnerRegistrationAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(developersActionCreators.confirmKeyRegistrationError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(developersActionCreators.receiveConfirmKeyRegistration(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(developersActionCreators.confirmKeyRegistrationError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveSavePartner: (content) => ({\n        type: savePartnerSuccess\n    }),\n\n    savePartnerError: (message) => ({\n        type: savePartnerFailure,\n        savePartnerError: message\n    }),\n\n    savePartner: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/PartnerAuthentication/api/SavePartnerAsync', 'POST', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(developersActionCreators.savePartnerError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(developersActionCreators.receiveSavePartner(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(developersActionCreators.savePartnerError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receivePartnerList: (content) => ({\n        type: partnerListSuccess,\n        partnerList: content\n    }),\n\n    partnerListError: (message) => ({\n        type: partnerListFailure,\n        partnerListError: message\n    }),\n\n    getPartnerList: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/PartnerAuthentication/api/GetPartnersAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(developersActionCreators.partnerListError(result));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(developersActionCreators.receivePartnerList(result[1].PartnerList));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(developersActionCreators.receivePartnerList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receivePartner: (content) => ({\n        type: getPartnerSuccess,\n        partner: content\n    }),\n\n    getPartnerError: (message) => ({\n        type: getPartnerFailure,\n        partnerError: message\n    }),\n\n    getPartner: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/PartnerAuthentication/api/GetPartnerAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(developersActionCreators.getPartnerError(result));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(developersActionCreators.receivePartner(result[1].PartnerList[0]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(developersActionCreators.receivePartner([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receivePartnerKey: (content) => ({\n        type: getPartnerKeySuccess,\n        partnerKey: content\n    }),\n\n    getPartnerKeyError: (message) => ({\n        type: getPartnerKeyFailure,\n        partnerKeyError: message\n    }),\n\n    getPartnerKey: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_USER_API_URL) + '/PartnerAuthentication/api/CheckForPartnerKeyAsync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(developersActionCreators.getPartnerKeyError(result));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(developersActionCreators.receivePartnerKey(result[1]));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(developersActionCreators.receivePartnerKey([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n}\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n    switch (action.type) {\n        case docListSuccess:\n            return Object.assign({}, state, {\n                docList: action.docList,\n                docListError: ''\n            })\n        case docListFailure:\n            return Object.assign({}, state, {\n                docListError: action.docListError\n            })\n        case docSuccess:\n            return Object.assign({}, state, {\n                doc: action.doc,\n                docError: ''\n            })\n        case docFailure:\n            return Object.assign({}, state, {\n                docError: action.docError\n            })\n        case keyRegistrationSuccess:\n            return Object.assign({}, state, {\n                keyRegistrationError: ''\n            })\n        case keyRegistrationFailure:\n            return Object.assign({}, state, {\n                keyRegistrationError: action.keyRegistrationError\n            })\n        case confirmKeyRegistrationSuccess:\n            return Object.assign({}, state, {\n                confirmKeyRegistrationError: ''\n            })\n        case confirmKeyRegistrationFailure:\n            return Object.assign({}, state, {\n                confirmKeyRegistrationError: action.confirmKeyRegistrationError\n            })\n        case savePartnerSuccess:\n            return Object.assign({}, state, {\n                savePartnerError: ''\n            })\n        case savePartnerFailure:\n            return Object.assign({}, state, {\n                savePartnerError: action.savePartnerError\n            })\n        case partnerListSuccess:\n            return Object.assign({}, state, {\n                partnerList: action.partnerList,\n                partnerListError: ''\n            })\n        case partnerListFailure:\n            return Object.assign({}, state, {\n                partnerListError: action.partnerListError\n            })\n        case getPartnerSuccess:\n            return Object.assign({}, state, {\n                partner: action.partner,\n                partnerError: ''\n            })\n        case getPartnerFailure:\n            return Object.assign({}, state, {\n                partnerError: action.partnerError\n            })\n        case getPartnerKeySuccess:\n            return Object.assign({}, state, {\n                partnerKey: action.partnerKey,\n                partnerKeyError: ''\n            })\n        case getPartnerFailure:\n            return Object.assign({}, state, {\n                partnerKeyError: action.partnerKeyError\n            })\n        default:\n            return state\n    }\n};","import React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { developersActionCreators } from '../../../stores/lis-developers-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { Link } from 'react-router-dom';\nimport ReactTable from 'react-table';\n\nclass PartnerGridComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoaded: false,\n            partnerList: [],\n            filtered: [],\n            nameSearch: \"\",\n            orgSearch: \"\"\n        }\n\n        this.handleSearchChange = this.handleSearchChange.bind(this);\n        this.onFilteredChange = this.onFilteredChange.bind(this);\n    }\n\n    componentDidMount() {\n        this.props.actions.getPartnerList()\n            .then(() => {\n                this.setState({\n                    isLoaded: true,\n                    partnerList: this.props.developers.partnerList\n                })\n            })\n    }\n\n    handleSearchChange(state, value) {\n        this.setState({\n            [state]: value\n        }, () => {\n            let filtered = [...this.state.filtered];\n            if (filtered.find(x => x.id === state)) {\n                filtered.splice(filtered.indexOf(x => x.id === state), 1, { id: state, value: value })\n            } else {\n                filtered.push({ id: state, value: value })\n            }\n            this.onFilteredChange(filtered)\n        })\n    }\n\n    onFilteredChange(filtered) {\n        this.setState({ filtered });\n    }\n\n    render() {\n        const { partnerList, nameSearch, orgSearch } = this.state;\n\n        return (\n            <div>\n                <h1>Partner Management</h1>\n                <form className='dlas-forms'>\n                    <div className=\"inner-grid five\">\n                        <div>\n                            <label>Search by Name: </label>\n                            <input\n                                type=\"text\"\n                                value={nameSearch}\n                                onChange={(e) => this.handleSearchChange(\"nameSearch\", e.target.value)}\n                            />\n                        </div>\n                        <div>\n                            <label>Search by Organization: </label>\n                            <input\n                                type=\"text\"\n                                value={orgSearch}\n                                onChange={(e) => this.handleSearchChange(\"orgSearch\", e.target.value)}\n                            />\n                        </div>\n                    </div>\n                </form>\n                {<ReactTable\n                    loading={!this.state.isLoaded}\n                    data={partnerList}\n                    filtered={this.state.filtered}\n                    onFilteredChange={this.onFilteredChange.bind(this)}\n                    columns={[\n                        {\n                            Header: \"Partner Name\",\n                            accessor: \"ContactName\",\n                            id: \"nameSearch\",\n                            width: 250,\n                            filterMethod: (filter, row, column) => {\n                                // convert to lowercase before comparing\n                                let partnerName = row._original.ContactName.toLowerCase();\n                                let nameFilter = this.state.nameSearch.toLowerCase();\n                                if (partnerName.includes(nameFilter)) {\n                                    return true\n                                }\n                            }\n                        },\n                        {\n                            Header: \"Partner Email\",\n                            accessor: \"EmailAddress\",\n                            width: 250\n                        },\n                        {\n                            Header: \"Partner Organization\",\n                            accessor: \"OrganizationName\",\n                            id: \"orgSearch\",\n                            filterMethod: (filter, row, column) => {\n                                // convert to lowercase before comparing\n                                let partnerOrg = row._original.OrganizationName.toLowerCase();\n                                let orgFilter = this.state.orgSearch.toLowerCase();\n                                if (partnerOrg.includes(orgFilter)) {\n                                    return true\n                                }\n                            }\n                        },\n                        {\n                            Header: \"Is Active\",\n                            accessor: \"IsActive\",\n                            width: 80,\n                            Cell: row => (\n                                row.original.IsActive ? \"True\" : \"False\"\n                            )\n                        },\n                        {\n                            Header: \"Edit\",\n                            accessor: \"edit\",\n                            width: 40,\n                            Cell: row => {\n                                return (\n                                    <Link to={`/partner-management/edit-partner/${row.original.PartnerID}`} className=\"button edit\">Edit</Link>\n                                )\n                            }\n                        },\n                        {\n                            Header: \"All\",\n                            id: 'all',\n                            className: \"all-column\",\n                            headerClassName: \"all-header\",\n                            width: 0,\n                            resizable: false,\n                            sortable: false,\n                            Filter: () => { },\n                            getProps: () => {\n                                return {\n                                    style: { padding: \"0px\" }\n                                }\n                            },\n                            filterMethod: (filter, row, column) => {\n                                // convert to lowercase before comparing\n                                let partnerName = row.ContactName.toLowerCase();\n                                let partnerOrg = row.OrganizationName.toLowerCase();\n                                let nameFilter = this.state.nameSearch.toLowerCase();\n                                let orgFilter = this.state.orgSearch.toLowerCase();\n                                console.log(partnerName, partnerOrg, nameFilter, orgFilter)\n                                if (partnerName.includes(nameFilter) || partnerOrg.includes(orgFilter)) {\n                                    return true\n                                }\n                            },\n                        }\n                    ]}\n                    defaultPageSize={10}\n                    className=\"-striped -highlight\"\n                />}\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, developers } = state;\n        return {\n            nav,\n            developers\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, developersActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(PartnerGridComponent)","import React from \"react\";\nimport { connect } from 'react-redux';\nimport { withRouter } from \"react-router\";\nimport { bindActionCreators } from 'redux';\nimport { developersActionCreators } from \"../../../stores/lis-developers-store\";\nimport { navActionCreators } from \"../../../stores/lis-nav-store\";\n\nconst emailRegex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\nconst phoneRegex = /^[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$/im;\n\nclass PartnerForm extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            isSaving: false,\n            isLoading: true,\n            partner: {},\n            initIsActive: false\n        }\n\n        this.checkEmail = this.checkEmail.bind(this);\n        this.checkPhone = this.checkPhone.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.save = this.save.bind(this);\n    }\n\n    componentDidMount() {\n        //Fetch the partner by the ID\n        this.props.actions.getPartner(\"?partnerID=\" + this.props.match.params.partnerId)\n            .then(() => {\n                this.setState({\n                    partner: this.props.developers.partner,\n                    initIsActive: this.props.developers.partner.IsActive,\n                    isLoading: false\n                })\n            })\n    }\n\n    checkEmail() {\n        const email = this.state.partner.EmailAddress.toLowerCase();\n\n        if (!emailRegex.test(email)) {\n            this.setState({\n                emailError: 'Invalid email address'\n            }, () => {\n                this.props.actions.makeToast([{ message: this.state.emailError, type: \"failure\" }])\n            });\n            return true;\n        }\n        this.setState({\n            emailError: ''\n        });\n    }\n\n    checkPhone() {\n        if (!phoneRegex.test(this.state.partner.PhoneNumber)) {\n            this.setState({\n                phoneError: 'Invalid phone number'\n            }, () => {\n                this.props.actions.makeToast([{ message: this.state.phoneError, type: \"failure\" }])\n            });\n            return true;\n        }\n        this.setState({\n            phoneError: ''\n        });\n    }\n\n    handleChange(state, value) {\n        let partner = { ...this.state.partner };\n        partner[state] = value;\n        this.setState({\n            partner\n        });\n    }\n\n    save() {\n        this.setState({\n            isSaving: true\n        }, () => {\n            let error = false\n            error = this.checkEmail();\n            error = this.checkPhone();\n\n            if (!error) {\n                let params = \"\";\n\n                params = params + \"?PartnerID=\" + this.state.partner.PartnerID\n                params = params + \"&contactName=\" + this.state.partner.ContactName;\n                params = params + \"&organizationName=\" + this.state.partner.OrganizationName;\n                params = params + \"&phone=\" + this.state.partner.PhoneNumber;\n                params = params + \"&email=\" + this.state.partner.EmailAddress;\n                params = params + \"&identityId=\" + this.state.partner.IdentityID;\n                params = params + \"&isActive=\" + this.state.partner.IsActive;\n                params = params + \"&isActiveChanged=\" + (this.state.partner.IsActive !== this.state.initIsActive ? \"true\" : \"false\");\n\n                this.props.actions.savePartner(params)\n                    .then(() => {\n                        this.setState({\n                            isSaving: false\n                        }, () => {\n                            this.props.actions.makeToast([{ message: \"Partner Saved\", type: \"success\" }])\n                            this.props.history.push(\"/partner-management\")\n                        })\n                    })\n                    .catch((err) => {\n                        this.props.actions.makeToast([{ message: this.props.developers.savePartnerError, type: \"failure\" }])\n                    })\n            }\n        })\n    }\n\n    render() {\n        const { partner, isSaving, isLoading } = this.state;\n\n        return (\n            <div>\n                <form className=\"dlas-forms key-registration-form\">\n                    <h3>Manage Partner</h3>\n                    <div className=\"inner-grid short-one-three\">\n                        <label htmlFor=\"name\">Name*</label>\n                        <input\n                            id=\"name\"\n                            type=\"text\"\n                            value={partner.ContactName}\n                            onChange={(e) => this.handleChange(\"ContactName\", e.target.value)}\n                            disabled={isLoading || isSaving}\n                        />\n                    </div>\n                    <div className=\"inner-grid short-one-three\">\n                        <label htmlFor=\"organization\">Organization</label>\n                        <input\n                            id=\"organization\"\n                            type=\"text\"\n                            value={partner.OrganizationName}\n                            onChange={(e) => this.handleChange(\"OrganizationName\", e.target.value)}\n                            disabled={isLoading || isSaving}\n                        />\n                    </div>\n                    <div className=\"inner-grid short-one-three\">\n                        <label htmlFor=\"email\">Email*</label>\n                        <input\n                            id=\"email\"\n                            type=\"text\"\n                            value={partner.EmailAddress}\n                            onChange={(e) => this.handleChange(\"EmailAddress\", e.target.value)}\n                            disabled={isLoading || isSaving}\n                        />\n                    </div>\n                    <div className=\"inner-grid short-one-three\">\n                        <label htmlFor=\"phone\">Phone Number*</label>\n                        <input\n                            id=\"phone\"\n                            type=\"text\"\n                            value={partner.PhoneNumber}\n                            onChange={(e) => this.handleChange(\"PhoneNumber\", e.target.value)}\n                            disabled={isLoading || isSaving}\n                        />\n                    </div>\n                    <div className=\"inner-grid reverse-short-one-three\">\n                        <div className=\"checkbox flex-row flex-vertical-center flex-start\">\n                            <div className=\"toggle-switch\" onClick={() => this.handleChange(\"IsActive\", !partner.IsActive)}>\n                                <input id=\"is-active-button\" checked={partner.IsActive} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                <span className=\"slider\"></span>\n                            </div>\n                            <label htmlFor=\"is-active-button\" className=\"checkbox-label no-background\">Is Active?</label>\n                        </div>\n                        <div className=\"align-right\">\n                            <button onClick={() => this.save()} disabled={isSaving || isLoading || (!partner.ContactName || !partner.EmailAddress || !partner.PhoneNumber)} type=\"button\" className=\"button\">Submit</button>\n                        </div>\n                    </div>\n                </form>\n            </div>\n        )\n    }\n}\n\nconst PartnerFormWrapper = connect(\n    (state) => {\n        const { nav, developers } = state;\n        return {\n            nav,\n            developers\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, developersActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(PartnerForm)\n\nexport default withRouter(PartnerFormWrapper)","import React from 'react';\nimport { Route } from 'react-router';\nimport PartnerManagementGrid from './lis-partner-grid';\nimport PartnerManagementForm from './lis-partner-form';\n\nclass PartnerManagement extends React.Component {\n\n    render() {\n        return (\n            <div>\n                <Route exact path={this.props.match.path} component={PartnerManagementGrid} />\n                <Route exact path={`${this.props.match.path}/edit-partner/:partnerId`} component={PartnerManagementForm} />\n            </div>\n        )\n    }\n}\n\nexport default PartnerManagement;","import React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { userActionCreators } from '../../../stores/lis-user-store';\n\nclass UserManagement extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            newUser: false,\n            existingUser: false,\n            person: {\n                FirstName: \"\",\n                LastName: \"\",\n                EmailAddress: \"\"\n            },\n            searching: false,\n            saving: false\n        }\n\n        this.cancel = this.cancel.bind(this);\n        this.create = this.create.bind(this);\n        this.handleInputChange = this.handleInputChange.bind(this);\n        this.handleSubmit = this.handleSubmit.bind(this);\n        this.onSubmit = this.onSubmit.bind(this);\n        this.save = this.save.bind(this);\n    }\n\n    cancel() {\n        this.setState({\n            newUser: false,\n            existingUser: false,\n            person: {\n                EmailAddress: \"\",\n                FirstName: \"\",\n                LastName: \"\"\n            }\n        })\n    }\n\n    create() {\n        this.setState({\n            saving: true\n        }, () => {\n            let person = { ...this.state.person }\n\n            person.Name = this.state.person.FirstName.trim() + \" \" + this.state.person.LastName.trim();\n            delete person.FirstName;\n            delete person.LastName;\n\n            this.props.actions.createNewUser(person)\n                .then(() => {\n                    this.props.actions.getPerson(this.props.users.newUserCreate)\n                        .then(() => {\n                            let person = { ...this.props.users.person };\n                            if (!person.FirstName && !person.LastName) {\n                                let splitName = person.FullName.split(\" \");\n                                person.FirstName = splitName[0];\n                                person.LastName = splitName[1];\n                            }\n                            this.setState({\n                                person: person,\n                                newUser: false,\n                                existingUser: true,\n                                saving: false\n                            }, () => {\n                                this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n                            })\n                        })\n                })\n        })\n    }\n\n    handleInputChange(e, state) {\n        let person = { ...this.state.person };\n        person[state] = e.target.value;\n        this.setState({\n            person\n        })\n    }\n\n    handleSubmit() {\n        this.setState({\n            searching: true\n        }, () => {\n            this.props.actions.getUserByEmail(\"?emailAddress=\" + this.state.person.EmailAddress.trim())\n                .then(() => {\n                    if (this.props.users.userByEmail != \"\") {\n                        this.props.actions.getPerson(this.props.users.userByEmail.IdentityID)\n                            .then(() => {\n                                let person = { ...this.props.users.person };\n                                if (!person.FirstName && !person.LastName) {\n                                    let splitName = person.FullName.split(\" \");\n                                    person.FirstName = splitName[0];\n                                    person.LastName = splitName[1];\n                                }\n                                this.setState({\n                                    existingUser: true,\n                                    newUser: false,\n                                    person: person,\n                                    searching: false\n                                })\n                            })\n                    } else {\n                        this.setState({\n                            newUser: true,\n                            existingUser: false,\n                            searching: false\n                        })\n                    }\n                })\n        })\n    }\n\n    onSubmit(e) {\n        e.preventDefault();\n    }\n\n    save() {\n        this.setState({\n            saving: true\n        }, () => {\n            let person = { ...this.state.person };\n            person.FullName = (person.FirstName || \"\") + \" \" + (person.LastName || \"\");\n            this.props.actions.savePerson(this.state.person)\n                .then(() => {\n                    this.props.actions.getPerson(this.state.person.IdentityID)\n                        .then(() => {\n                            let person = { ...this.props.users.person };\n                            this.setState({\n                                person: person,\n                                saving: false\n                            }, () => {\n                                this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n                            })\n                        })\n                })\n        })\n    }\n\n    render() {\n        return (\n            <div>\n                <h2>User Management</h2>\n                <form className=\"dlas-forms\" onSubmit={this.onSubmit}>\n                    {!this.state.existingUser &&\n                        <React.Fragment>\n                            <label>Search for a user by email address</label>\n                            <div className=\"inner-grid three-one-and-two\">\n                                <input onChange={(e) => this.handleInputChange(e, \"EmailAddress\")} value={this.state.person.EmailAddress} />\n                                <button disabled={this.state.searching} className=\"button primary\" type=\"submit\" onClick={() => this.handleSubmit()}>{this.state.searching ? \"Searching...\" : \"Search\"}</button>\n                            </div>\n                        </React.Fragment>\n                    }\n                    {this.state.newUser &&\n                        <React.Fragment>\n                            <p>User not found. You may either search for a different email address, or enter a first name and last name then click create user to create a new user account for the provided email address.</p>\n                            <div className=\"inner-grid six\">\n                                <input\n                                    placeholder=\"First Name\"\n                                    onChange={(e) => this.handleInputChange(e, \"FirstName\")}\n                                    value={this.state.person.FirstName}\n                                />\n                                <input\n                                    placeholder=\"Last Name\"\n                                    onChange={(e) => this.handleInputChange(e, \"LastName\")}\n                                    value={this.state.person.LastName}\n                                />\n                                <button disabled={this.state.saving} className=\"button primary\" type=\"button\" onClick={() => this.create()}>{this.state.saving ? \"Saving...\" : \"Create User\"}</button>\n                            </div>\n                        </React.Fragment>\n                    }\n                    {this.state.existingUser &&\n                        <React.Fragment>\n                            <div className=\"multi-row sixth-even no-margin\">\n                                <div>\n                                    <label>Prefix</label>\n                                    <input type=\"text\"\n                                        placeholder=\"Prefix\"\n                                        value={this.state.person.Prefix}\n                                        onChange={(e) => this.handleInputChange(e, 'Prefix')}\n                                    />\n                                </div>\n                                <div>\n                                    <label>First Name</label>\n                                    <input type=\"text\"\n                                        placeholder=\"First Name\"\n                                        value={this.state.person.FirstName}\n                                        onChange={(e) => this.handleInputChange(e, 'FirstName')}\n                                    />\n                                </div>\n                                <div>\n                                    <label>Middle Name</label>\n                                    <input type=\"text\"\n                                        placeholder=\"Middle Name\"\n                                        value={this.state.person.MiddleName}\n                                        onChange={(e) => this.handleInputChange(e, 'MiddleName')}\n                                    />\n                                </div>\n                                <div>\n                                    <label>Nickname</label>\n                                    <input type=\"text\"\n                                        placeholder=\"Nickname\"\n                                        value={this.state.person.AlternateName}\n                                        onChange={(e) => this.handleInputChange(e, 'AlternateName')}\n                                    />\n                                </div>\n                                <div>\n                                    <label>Last Name</label>\n                                    <input type=\"text\"\n                                        placeholder=\"Last Name\"\n                                        value={this.state.person.LastName}\n                                        onChange={(e) => this.handleInputChange(e, 'LastName')}\n                                    />\n                                </div>\n                                <div>\n                                    <label>Suffix</label>\n                                    <input type=\"text\"\n                                        placeholder=\"Suffix\"\n                                        value={this.state.person.Suffix}\n                                        onChange={(e) => this.handleInputChange(e.target.value, 'Suffix')}\n                                    />\n                                </div>\n                            </div>\n                            <button className=\"button secondary float-right\" type=\"button\" onClick={() => this.cancel()}>Cancel</button>\n                            <button disabled={this.state.saving} style={{ marginRight: \"10px\" }} className=\"button primary float-right\" type=\"button\" onClick={() => this.save()}>{this.state.saving ? \"Saving...\" : \"Save\"}</button>\n                        </React.Fragment>\n                    }\n                </form>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, users } = state;\n        return {\n            nav,\n            users\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, userActionCreators), dispatch)\n        }\n    }\n)(UserManagement)","import React from 'react';\nimport Select from 'react-select';\nimport DatePicker from 'react-datepicker';\nimport '../../../stylesheets/lis-public-view/public-view.css';\nimport moment from 'moment-timezone';\n\nclass Search extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            search: '',\n            selectedMember: '',\n            selectedSubject: '',\n            selectedDate: null\n        };\n        this.handleMemberDropdownChange = this.handleMemberDropdownChange.bind(this);\n        this.handleSubjectDropdownChange = this.handleSubjectDropdownChange.bind(this);\n        this.handleDateChange = this.handleDateChange.bind(this);\n    }\n\n    handleMemberDropdownChange(val) {\n        this.setState({\n            selectedMember: val\n        }, () => {\n            //The next step is done after the state change to make sure the user sees what member was selected before going to the advanced search page\n            let param = {\n                selectedPatron: this.state.selectedMember.MemberID,\n                selectedSession: this.props.sessionList.find(s => s.SessionCode === this.props.session),\n                chamberCode: this.state.selectedMember.ChamberCode,\n                selectedPatronType: [1]\n            }\n\n            const link = window.btoa(JSON.stringify(param));\n            this.props.history.push('/bill-search?q=' + link);\n\n        });\n    }\n\n    handleSubjectDropdownChange(val) {\n        this.setState({\n            selectedSubject: val\n        }, () => {\n            //The next step is done after the state change to make sure the user sees what member was selected before going to the advanced search page\n            const param = {\n                selectedSubject: this.state.selectedSubject.SubjectIndexID,\n                selectedSession: this.props.sessionList.find(s => s.SessionCode === this.props.session),\n            }\n            const link = window.btoa(JSON.stringify(param));\n            this.props.history.push('/bill-search?q=' + link);\n        });\n    }\n\n    handleDateChange(val) {\n        this.setState({\n            selectedDate: val\n        }, () => {\n            const introDate = this.state.selectedDate.clone();\n            introDate.hour(0);\n            const param = {\n                introductionDate: introDate\n            };\n            const link = window.btoa(JSON.stringify(param));\n            this.props.history.push('/bill-search?q=' + link);\n        });\n    }\n\n    render() {\n        const customStyles = {\n            container: base => ({\n                ...base,\n                lineHeight: 'normal',\n            }),\n            option: (base, state) => ({\n                ...base,\n                fontSize: '0.8em',\n            }),\n            control: (base) => ({\n                ...base,\n                padding: '1px',\n                margin: 0,\n                minHeight: 0,\n                fontSize: '0.8em',\n            }),\n            dropdownIndicator: base => ({\n                ...base,\n                padding: '0px 8px'\n            }),\n            indicatorSeparator: (base) => ({\n                ...base,\n                display: \"none\"\n            })\n        };\n        const memberList = [...this.props.memberList]\n        memberList.forEach((member) => {\n            member.label = \"(\" + member.ChamberCode + \") \" + member.ListDisplayName;\n            member.value = member.MemberID;\n        });\n        let datesList = [];\n        this.props.datesList.forEach(date => datesList.push(moment(date.IntroductionDate)));\n        datesList.push(moment());\n        const openToDate = datesList[datesList.length - 1];\n        return (\n            <div className=\"dlas-forms home-search-section\">\n                <br />\n                <div id=\"search-selectors\">\n                    <div className=\"selector\">\n                        <div className=\"subject\">\n                            <label htmlFor=\"bills-by-subject\" className=\"search-option-label\">Bills by Subject</label>\n                        </div>\n                        <div>\n                            <Select\n                                id=\"bills-by-subject\"\n                                styles={customStyles}\n                                isDisabled={!this.props.isLoaded}\n                                options={this.props.subjectList}\n                                value={this.state.selectedSubject}\n                                onChange={this.handleSubjectDropdownChange}\n                            />\n                        </div>\n                    </div>\n                    <div className=\"selector\">\n                        <div className=\"member\">\n                            <label htmlFor=\"bills-by-member\" className=\"search-option-label\">Bills by Member</label>\n                        </div>\n                        <div>\n                            <Select\n                                id=\"bills-by-member\"\n                                styles={customStyles}\n                                isDisabled={!this.props.isLoaded}\n                                options={memberList}\n                                onChange={this.handleMemberDropdownChange}\n                                value={this.state.selectedMember}\n                            />\n                        </div>\n                    </div>\n                    <div className=\"selector\">\n                        <div className=\"introduced\">\n                            <label htmlFor=\"bills-by-date\" className=\"search-option-label\">Bills Introduced by Day</label>\n                        </div>\n                        <div>\n                            <DatePicker\n                                id=\"bills-by-date\"\n                                disabled={!this.props.isLoaded || !openToDate}\n                                selected={this.state.selectedDate}\n                                onChange={this.handleDateChange}\n                                includeDates={datesList}\n                                openToDate={openToDate}\n                            />\n                        </div>\n                    </div>\n                </div>\n                <hr />\n            </div>\n\n        )\n    }\n}\n\nexport default Search","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport '../../../stylesheets/lis-public-view/public-view.css';\n\nclass ResourcesComponent extends React.Component {\n    constructor(props) {\n        super(props)\n\n    }\n\n    render() {\n        const { session, isAuthenticated } = this.props;\n\n        return (\n            <div>\n                <h3 className=\"homepage-header\">Bills & Resolutions</h3>\n                <hr />\n                {!this.props.isLoaded ?\n                    <div className=\"center-spinner spinner small-height\" />\n                    :\n                    <div className=\"homepage-links\">\n                        <div className=\"homepage-content-group\">\n                            <span>{session.selectedSession.SessionYear + \" Session: \"}</span>\n                            <Link to=\"/bill-search\">Browse Bills by Category</Link>\n                        </div>\n                        <div className=\"homepage-content-group\">\n                            <span>Budget Bill: </span>\n                            <a href={\"http://budget.lis.virginia.gov/\"}>State Budget</a>\n                        </div>\n                        <div className=\"homepage-content-group\">\n                            <span>Bill Indexes: </span>\n                            <a href={\"https://index.lis.virginia.gov?ses=\" + session.selectedSession.SessionCode}>Cumulative Index</a>\n                        </div>\n                        <div style={{ marginTop: \"8px\", marginBottom: \"4px\" }}>\n                            <Link to={isAuthenticated ? \"/bill-search\" : \"/register-account\"}>LOBBYIST in a BOX</Link>\n                        </div>\n                    </div>\n                }\n                <h3 className=\"homepage-header\" style={{ marginTop: \"14px\" }}>Virginia Law</h3>\n                <hr />\n                <div className=\"homepage-links\">\n                    <div className=\"homepage-content-group\">\n                        <a href=\"https://law.lis.virginia.gov/vacode/\">Code of Virginia</a>\n                    </div>\n                    <div className=\"homepage-content-group\">\n                        <a href=\"https://law.lis.virginia.gov/admincode/\">Virginia Administrative Code</a>\n                    </div>\n                    <div className=\"homepage-content-group\">\n                        <a href=\"https://law.lis.virginia.gov/constitution/\">Constitution of Virginia</a>\n                    </div>\n                </div>\n                <h3 className=\"homepage-header\" style={{ marginTop: \"14px\" }}>Legislative Resources</h3>\n                <hr />\n                <div className=\"homepage-links\">\n                    <div className=\"homepage-content-group\">\n                        <a href=\"https://liaison.lis.virginia.gov/\">State Agency Legislative Liaisons</a>\n                    </div>\n                    <div className=\"homepage-content-group\">\n                        <a href=\"https://rga.lis.virginia.gov/\">Reports to the General Assembly</a>\n                    </div>\n                    <div className=\"homepage-content-group\">\n                        <a href=\"http://dls.virginia.gov/pubs_calendar.html\">Procedural Calendars</a>\n                    </div>\n                </div>\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, session } = state;\n        return {\n            nav,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(ResourcesComponent)","import React from 'react';\nimport '../../../stylesheets/lis-public-view/public-view.css';\nimport { Link } from 'react-router-dom';\nimport moment from 'moment-timezone';\nimport { withRouter } from 'react-router';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\nclass SessionInfo extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {};\n        this.handleSessionChange = this.handleSessionChange.bind(this);\n    }\n\n    handleSessionChange(value) {\n        if (window.env && window.env.HISTORICAL_DATA_REDIRECT && value && !value.IsDefault && value.LegacySessionID) {\n            this.setState({\n                historicalSessionRedirect: (redirect) => {\n                    if (redirect) {\n                        let a = document.createElement('a');\n                        a.target = '_blank';\n                        a.href = `https://legacylis.virginia.gov/cgi-bin/legp604.exe?ses=${value.SessionCode.substring(2)}&typ=lnk&val=${value.LegacySessionID}`;\n                        document.body.appendChild(a);\n                        a.click();\n                        document.body.removeChild(a);\n                    }\n                    this.setState({ historicalSessionRedirect: false })\n                }\n            })\n            return;\n        }\n        if (value && value.SessionCode) {\n            this.props.actions.changeSession(value.SessionCode);\n        }\n    }\n\n    render() {\n        const session = this.props.selectedSession;\n        const adjournment = session ? session.SessionEvents.find(event => event.DisplayName === \"Adjournment\") : null;\n        const reconvene = session ? session.SessionEvents.find(event => event.DisplayName === \"Reconvene\") : null;\n        const start = session ? session.SessionEvents.find(event => event.DisplayName === \"Session Start\") : null;\n\n        let activeSessions = [];\n        if (session.IsActive) {\n            activeSessions = this.props.sessionList.filter(s => s.IsActive && s.SessionID !== session.SessionID);\n        }\n        return (\n            <div>\n                {this.state.historicalSessionRedirect &&\n                    <div className=\"schedule-modal\">\n                        <div className=\"schedule-modal-content fit-content center-content\">\n                            <p>For historical data, please use <b>Legacy LIS</b>, available at <b><a href=\"https://legacylis.virginia.gov\" target=\"_blank\" rel=\"noreferrer\">https://legacylis.virginia.gov</a></b>.</p>\n                            <p>Click 'Go' to be taken to Legacy LIS, or 'Close' to remain here.</p>\n                            <div className=\"inline-list\">\n                                <button className=\"button primary float-right\" onClick={() => this.state.historicalSessionRedirect(true)}>Go</button>\n                                <button className=\"button secondary float-right\" onClick={() => this.state.historicalSessionRedirect(false)}>Close</button>\n                            </div>\n                            <br />\n                        </div>\n                    </div>\n                }\n                <h3 className=\"homepage-header\">{session.SessionYear} {session.SessionType === \"Special\" ? session.DisplayName : \"Session\"} Information</h3>\n                <hr />\n                {!this.props.isLoaded ?\n                    <div className=\"center-spinner spinner small-height\" />\n                    :\n                    <div className=\"homepage-links\">\n                        <div className=\"homepage-content-group\">\n                            <span>Session dates: {moment(start ? start.ActualDate : '').format('MMMM D, YYYY')}</span>\n                            {adjournment &&\n                                <span> - {moment(adjournment ? adjournment.ActualDate : '').format('MMMM D, YYYY')}</span>\n                            }\n                        </div>\n                        <div>\n                            {reconvene &&\n                                <React.Fragment>\n                                    <span>Reconvened: </span>\n                                    <span>{moment(reconvene.ActualDate).format('MMMM D, YYYY')}</span>\n                                </React.Fragment>\n                            }\n                        </div>\n                        <div>\n                            <div className=\"homepage-content-group\">\n                                <Link to={`/session-details/${session.SessionCode}/member-information`}>Delegates & Senators</Link>\n                            </div>\n                            <div className=\"homepage-content-group\">\n                                <Link to={`/session-details/${session.SessionCode}/committee-information`}>Standing Committees</Link>\n                            </div>\n                            <div className=\"homepage-content-group\">\n                                <Link to={`/session-details/${session.SessionCode}/calendar`}>Daily Floor Calendars</Link>\n                            </div>\n                            <div className=\"homepage-content-group\">\n                                <Link to={`/session-details/${session.SessionCode}/communications`}>Communications</Link>\n                            </div>\n                        </div>\n                        <div>\n                            <div className=\"homepage-content-group\">\n                                <span>Minutes: </span>\n                                {session.SessionYear < 2010\n                                    ? <Link to={`/session-details/${session.SessionCode}/minutes-list/house`}>House</Link>\n                                    : <a href={\"https://virginiageneralassembly.gov/house/minutes/list.php?ses=\" + session.SessionCode.toString().substr(2, 3)}>House</a>}\n                                <span style={{ margin: '0px 5px' }}>|</span>\n                                <Link to={`/session-details/${session.SessionCode}/minutes-list/senate`}>Senate</Link>\n                            </div>\n                            <div className=\"homepage-content-group\">\n                                <span>Video: </span>\n                                <span>\n                                    <a href=\"https://virginiageneralassembly.gov/house/chamber/chamberstream.php\">House</a>\n                                    <span style={{ margin: '0px 5px' }}>|</span>\n                                    <a href=\"https://virginia-senate.granicus.com/ViewPublisher.php?view_id=3\">Senate</a>\n                                </span>\n                            </div>\n                            <div>\n                                <div className=\"homepage-content-group\">\n                                    <span>Committee Statistics: </span>\n                                    <Link to={`/session-details/${session.SessionCode}/statistics/committee/h`}>House</Link>\n                                    <span> | </span>\n                                    <Link to={`/session-details/${session.SessionCode}/statistics/committee/s`}>Senate</Link>\n                                </div>\n                                <div className=\"homepage-content-group\">\n                                    <span>Session Statistics: </span>\n                                    <Link to={`/session-details/${session.SessionCode}/statistics/status`}>By Status</Link>\n                                </div>\n                            </div>\n\n                        </div>\n                    </div>\n                }\n                {this.props.isLoaded && activeSessions.length > 0 &&\n                    <div className=\"homepage-content-group\">\n                        <span className=\"homepage-links\">Concurrent Sessions:</span>\n                        <div className=\"homepage-links\">\n                            {activeSessions.map(activeSession =>\n                                <div key={activeSession.SessionID}>\n                                    <a style={{ cursor: 'pointer' }} href={void (0)} onClick={() => this.handleSessionChange(activeSession)}>{activeSession.SessionYear} {activeSession.DisplayName}</a>\n                                </div>\n                            )}\n                        </div>\n                    </div>\n                }\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav } = state;\n        return {\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators), dispatch)\n        }\n    }\n)(withRouter(SessionInfo))","import React from 'react';\nimport '../../../stylesheets/lis-public-view/public-view.css';\nimport { Link } from 'react-router-dom';\nimport moment from 'moment-timezone';\nimport renderHtml from 'react-render-html';\n\nconst tz = moment.tz.guess();\n\nconst TIME_REGEX = /[0-9]:[0-9]{2}\\s[AP]M/i;\n\nclass Schedule extends React.Component {\n\n    render() {\n        return (\n            <div>\n                <h3 className=\"homepage-header\">Upcoming Schedule{tz !== \"America/New_York\" && <small>*</small>}</h3>\n                <hr />\n                {!this.props.isLoaded ?\n                    <div className=\"center-spinner spinner small-height\" />\n                    :\n                    <>\n                        {this.props.schedule.length === 0 &&\n                            <div className=\"center\" style={{ fontFamily: \"Lato\" }}>\n                                <span>Nothing Scheduled</span>\n                            </div>\n                        }\n                        <div style={{ maxHeight: '370px', overflowY: 'auto' }}>\n                            {this.props.schedule.map((date, dateIndex) =>\n                                <div className=\"homepage-schedule-item\" key={dateIndex}>\n                                    <div className=\"homepage-schedule-date\">\n                                        <span>{moment(date.Date).format('MMMM D, YYYY')}</span>\n                                    </div>\n                                    {date.Times.map((time, timeIndex) => {\n                                        return <div>\n                                            {time.Items.length > 0 &&\n                                                <React.Fragment>\n                                                    <ul className=\"small-text\" key={timeIndex}>\n                                                        {time.Items.map((item, itemIndex) =>\n                                                            <li key={itemIndex}>\n                                                                <span className=\"schedule-time\">{TIME_REGEX.test(item.ScheduleTime) && item.ScheduleTime}</span>\n                                                                <div className='schedule-info'>\n                                                                    <div>\n                                                                        <span className=\"schedule-owner\">{item.OwnerName} {item.IsCancelled && <span className=\"fail\"> CANCELLED</span>}</span>\n                                                                    </div>\n                                                                    <div>\n                                                                        <span style={{ whiteSpace: 'pre-wrap' }}>{!TIME_REGEX.test(item.ScheduleTime) && item.ScheduleTime}</span>\n                                                                        <span style={{ whiteSpace: 'pre-wrap' }}>{item.Description && renderHtml(item.Description)}</span>\n                                                                    </div>\n                                                                </div>\n                                                            </li>\n                                                        )}\n                                                    </ul>\n                                                </React.Fragment>\n                                            }\n                                        </div>\n                                    }\n                                    )}\n                                </div>\n                            )}\n                        </div>\n                        <div className=\"homepage-links\">\n                            <Link to=\"/schedule\">Full Schedule</Link>\n                        </div>\n                        {tz !== \"America/New_York\" && <div><small><em>*Times are displayed in your local timezone ({moment().tz(tz).format(\"zz\")})</em></small></div>}\n                    </>\n                }\n            </div>\n        );\n    }\n}\n\nexport default Schedule;\n","import React from 'react';\nimport '../../../stylesheets/lis-public-view/public-view.css';\nimport moment from 'moment-timezone';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport DatePicker from 'react-datepicker';\nimport 'tinymce/themes/silver/theme';\nimport 'tinymce/icons/default'\nimport 'tinymce/plugins/paste/plugin';\nimport 'tinymce/plugins/link/plugin';\nimport 'tinymce/plugins/save/plugin';\nimport 'tinymce/plugins/lists/plugin';\nimport 'tinymce/plugins/code/plugin';\nimport 'tinymce/plugins/preview/plugin';\nimport 'tinymce/plugins/searchreplace/plugin';\nimport 'tinymce/plugins/pagebreak/plugin';\nimport 'tinymce/plugins/table/plugin';\nimport '../../../stylesheets/tinymce/oxide/skin.min.css';\nimport { Editor } from '@tinymce/tinymce-react';\nimport renderHTML from 'react-render-html';\nimport { collectionActionCreators } from '../../../stores/lis-collection-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\nconst defaultStyle = \"primary\";\nconst freshMessage = (style) => ({ IsActive: true, BulletinMessage: `<div class=\"alert alert-${style ?? 'primary'} mb-0\"><p></p></div>`, StartDate: moment(), EndDate: moment().add(1, 'day') });\n\nclass MessageOfTheDay extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            adminView: false,\n            editing: false,\n            previewing: false,\n            linking: false,\n            linkText: '',\n            linkUrl: '',\n            editMessage: freshMessage(defaultStyle),\n            style: defaultStyle,\n            showAll: false\n        }\n\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.selectStyle = this.selectStyle.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.toggleLink = this.toggleLink.bind(this);\n        this.handleLink = this.handleLink.bind(this);\n        this.toggleAdminView = this.toggleAdminView.bind(this);\n        this.togglePreview = this.togglePreview.bind(this);\n        this.saveMessage = this.saveMessage.bind(this);\n        this.toggleShowAll = this.toggleShowAll.bind(this);\n\n        this.newMessageRef = React.createRef();\n    }\n\n    toggleShowAll() {\n        this.setState({ showAll: !this.state.showAll })\n    }\n\n    toggleEdit(bulletinID) {\n        const messages = this.state.adminView ? [...this.props.adminMessages] : [...this.props.messages];\n        const editMessage = bulletinID ? messages.find(b => b.BulletinID === bulletinID) : freshMessage(defaultStyle);\n        let style = defaultStyle;\n        try {\n            if (bulletinID) {\n                const el = document.createElement('div');\n                el.innerHTML = editMessage.BulletinMessage;\n                const alert = el.querySelector('.alert');\n                const classes = alert.classList;\n                for (const c of classes) {\n                    switch (c) {\n                        case 'alert-default':\n                            style = \"default\";\n                            break;\n                        case 'alert-primary':\n                            style = \"primary\";\n                            break;\n                        case 'alert-info':\n                            style = \"info\";\n                            break;\n                        case 'alert-warning':\n                            style = \"warning\";\n                            break;\n                        case 'alert-danger':\n                            style = \"danger\";\n                            break;\n                        case 'alert-success':\n                            style = \"success\";\n                            break;\n                        default:\n                            break;\n                    }\n                }\n            }\n        } catch (e) {\n            console.error(e);\n        }\n        this.setState({\n            editMessage,\n            style,\n            editing: !this.state.editing,\n            previewing: false\n        })\n    }\n\n    toggleAdminView() {\n        if (!this.state.adminView) {\n            this.setState({ adminView: true }, () => {\n                this.props.getAdminMessages();\n            });\n        } else {\n            this.setState({ adminView: false })\n        }\n    }\n\n    togglePreview() {\n        this.setState({ previewing: !this.state.previewing })\n    }\n\n    selectStyle(style) {\n        this.setState({ style }, () => {\n            let editMessage = { ...this.state.editMessage };\n            const el = document.createElement('div');\n            el.innerHTML = editMessage.BulletinMessage;\n            const alert = el.querySelector('.alert');\n            alert.classList = `alert alert-${this.state.style} mb-0`;\n            editMessage.BulletinMessage = el.innerHTML;\n            this.setState({ editMessage })\n        })\n    }\n\n    handleChange(key, value) {\n        if (key === \"BulletinMessage\" && !value)\n            value = freshMessage(this.state.style).BulletinMessage;\n\n        let editMessage = { ...this.state.editMessage };\n        editMessage[key] = value;\n        this.setState({ editMessage })\n    }\n\n    handleBold = (e) => {\n        e.preventDefault();\n        document.execCommand('bold');\n    };\n\n    handleItalic = (e) => {\n        e.preventDefault();\n        document.execCommand('italic', false, null);\n    };\n\n    toggleLink = () => {\n        const selected = document.getSelection();\n        this.setState({ selected, linking: !this.state.linking, linkUrl: '', linkText: '' })\n    }\n\n    setLinkUrl = (e) => {\n        this.setState({ linkUrl: e.target.value })\n    }\n\n    setLinkText = (e) => {\n        this.setState({ linkText: e.target.value })\n    }\n\n    handleLink = () => {\n        let editMessage = { ...this.state.editMessage };\n        const el = document.createElement('div');\n        el.innerHTML = editMessage.BulletinMessage;\n        let alert = el.querySelector('.alert');\n        const anchor = document.createElement('a');\n        anchor.href = this.state.linkUrl;\n        anchor.textContent = this.state.linkText;\n        alert.appendChild(anchor);\n        this.handleChange('BulletinMessage', el.innerHTML);\n        this.toggleLink();\n    };\n\n    saveMessage() {\n        this.setState({ saving: true }, () => {\n            let message = { ...this.state.editMessage }\n            let apiCall = message.BulletinID ? this.props.actions.saveMessage : this.props.actions.createMessage;\n            apiCall(message).then(() => {\n                this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n                this.setState({ saving: false }, () => {\n                    this.toggleEdit();\n                    this.props.getAdminMessages();\n                    this.props.getMessages();\n                })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                this.setState({ saving: false })\n            })\n        })\n    }\n\n    render() {\n        const { editMessage } = this.state;\n\n        const filteredMessages = (this.state.adminView ? [...this.props.adminMessages] : [...this.props.messages]).filter(m => (this.state.adminView || moment.utc(m.StartDate).isBefore(moment())) && moment.utc(m.EndDate).isAfter(moment()));\n        const messagesToDisplay = this.state.adminView ? filteredMessages.slice(0, this.state.showAll ? undefined : 5) : filteredMessages;\n\n        return (\n            <div className=\"dlas-forms message-of-the-day\">\n                {!this.state.previewing && this.props.login.userClaims.roles.find((x) => x === \"Admin\") &&\n                    <div className=\"message-header\">\n                        <h3 className=\"homepage-header\">Message of the Day</h3>\n                        <a className={`icon ${this.state.editing ? 'delete' : 'add'}`} onClick={() => this.toggleEdit()} />\n                        {!this.state.editing && this.props.login.userClaims.roles.find((x) => x === \"Admin\") && <a className={`icon ${this.state.adminView ? 'button view' : ' search'}`} onClick={this.toggleAdminView} title={this.state.adminView ? \"View Public Messages\" : \"View All Messages As Admin\"} />}\n                    </div>\n                }\n                {!this.state.editing ?\n                    <div>\n                        {\n                            (this.props.login.userClaims.roles.find((x) => x === \"Admin\") && ((this.state.adminView && this.props.gettingAdminMessages) || (!this.state.adminView && this.props.gettingMessages))) ? <div className=\"spinner center-spinner small-spinner small-height\" />\n                                :\n                                (this.props.login.userClaims.roles.find((x) => x === \"Admin\") && !messagesToDisplay?.length) ?\n                                    <p style={{ margin: '0px' }}>No {this.state.adminView ? \"admin\" : \"public\"} messages.</p>\n                                    :\n                                    <MessageList showAll={this.state.adminView && filteredMessages.length > 5 ? this.state.showAll : true} admin={this.props.login.userClaims.roles.find((x) => x === \"Admin\")} toggleShowAll={this.state.adminView && filteredMessages.length > 5 ? this.toggleShowAll : null} messages={messagesToDisplay} toggleEdit={this.toggleEdit} />\n                        }\n                    </div>\n                    :\n                    <div>\n                        {!this.state.previewing ?\n                            <>\n                                <div className=\"date-pickers\">\n                                    <div>\n                                        <label>Start Date</label>\n                                        <DatePicker\n                                            id=\"motd-start-date\"\n                                            selected={moment.utc(editMessage.StartDate).local()}\n                                            onChange={(val) => this.handleChange('StartDate', val.utc())}\n                                            showTimeSelect\n                                            dateFormat=\"MM/DD/yyyy h:mm a\"\n                                            popperPlacement='bottom'\n                                        />\n                                    </div>\n                                    <div>\n                                        <label>End Date</label>\n                                        <DatePicker\n                                            id=\"motd-end-date\"\n                                            selected={moment.utc(editMessage.EndDate).local()}\n                                            onChange={(val) => this.handleChange('EndDate', val.utc())}\n                                            showTimeSelect\n                                            dateFormat=\"MM/DD/yyyy h:mm a\"\n                                            popperPlacement='bottom'\n                                        />\n                                    </div>\n                                </div>\n                                <div className=\"color-pickers\">\n                                    <div className={`color-picker alert-default${this.state.style === 'default' ? ' selected' : ''}`} onClick={() => this.selectStyle('default')} />\n                                    <div className={`color-picker alert-danger${this.state.style === 'danger' ? ' selected' : ''}`} onClick={() => this.selectStyle('danger')} />\n                                    <div className={`color-picker alert-warning${this.state.style === 'warning' ? ' selected' : ''}`} onClick={() => this.selectStyle('warning')} />\n                                    <div className={`color-picker alert-success${this.state.style === 'success' ? ' selected' : ''}`} onClick={() => this.selectStyle('success')} />\n                                    <div className={`color-picker alert-primary${this.state.style === 'primary' ? ' selected' : ''}`} onClick={() => this.selectStyle('primary')} />\n                                    <div className={`color-picker alert-info${this.state.style === 'info' ? ' selected' : ''}`} onClick={() => this.selectStyle('info')} />\n                                </div>\n                                <div style={{ margin: 'auto', width: '80%' }}>\n                                    <Editor\n                                        value={editMessage.BulletinMessage}\n                                        init={{\n                                            browser_spellcheck: true,\n                                            plugins: 'link paste save lists preview searchreplace pagebreak code copyheadstyle',\n                                            toolbar: 'undo redo | bold italic strikethrough link',\n                                            skin: false,\n                                            valid_children: '+body[style]',\n                                            content_css: false,\n                                            content_style: 'table { border-collapse: collapse; border: 1px solid #FFFFFF }' + 'td { padding: 12px 0px }' + 'a {color: #196090 !important; text-decoration: underline !important}',\n                                        }}\n                                        onEditorChange={content => this.handleChange('BulletinMessage', content)}\n                                    />\n                                </div>\n                            </>\n                            :\n                            <MessageList admin={false} messages={[editMessage]} />\n                        }\n                        <div className=\"inline-list align-right\" style={{ marginTop: '5px', maxWidth: this.state.previewing ? '75%' : '90%' }}>\n                            {!this.state.previewing &&\n                                <div className=\"checkbox flex-row flex-vertical-center flex-start\" style={{ display: 'inline-flex' }}>\n                                    <label htmlFor=\"report-current-status\" className=\"checkbox-label no-background\">Is Active</label>\n                                    <div className=\"toggle-switch\" onClick={() => this.handleChange(\"IsActive\", !editMessage.IsActive)}>\n                                        <input id=\"report-current-status\" checked={editMessage.IsActive} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                </div>\n                            }\n                            <button type=\"button\" className='button' disabled={this.state.saving} onClick={this.togglePreview}>{this.state.previewing ? \"Edit\" : \"Preview\"}</button>\n                            <button type=\"button\" className='button' disabled={this.state.saving} onClick={this.saveMessage}>Save</button>\n                        </div>\n                        {this.state.previewing && <br />}\n                        {this.state.editing && <hr />}\n                    </div>\n                }\n            </div>\n        );\n    }\n}\n\nconst MessageList = (props) => {\n    const { messages, admin, showAll, toggleEdit, toggleShowAll } = props;\n    return (\n        <div className=\"message-list\">\n            {admin && toggleShowAll &&\n                <div>\n                    <button onClick={toggleShowAll} className=\"expander button-link\" type=\"button\">Show {showAll ? \"Less\" : \"All\"}</button>\n                </div>\n            }\n            {messages.map((message, idx) =>\n                <div className=\"message-item\" key={idx}>\n                    {renderHTML(message.BulletinMessage)}\n                    {admin && <a className=\"icon edit\" style={{ marginLeft: '7px' }} onClick={() => toggleEdit(message.BulletinID)} />}\n                </div>\n            )}\n        </div>\n    )\n}\n\nexport default connect(\n    (state) => {\n        const { login, nav, collection } = state;\n        return {\n            login,\n            nav,\n            collection\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, navActionCreators, collectionActionCreators), dispatch)\n        }\n    }\n)(MessageOfTheDay)","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { scheduleActionCreators } from '../../../stores/lis-schedule-store';\nimport Search from './lis-public-home-search';\nimport Resources from './lis-public-home-resources';\nimport SessionInfo from './lis-public-home-session-info';\nimport Schedule from './lis-public-home-schedule';\nimport moment from 'moment-timezone';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport MessageOfTheDay from './lis-public-message-of-the-day';\nimport { collectionActionCreators } from '../../../stores/lis-collection-store';\n\nclass HomeComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            searchIsLoaded: true,\n            sessionInfoIsLoaded: this.props.nav.session && !isNaN(this.props.nav.session),\n            scheduleIsLoaded: false,\n            schedule: [],\n            gettingMessages: true,\n            gettingAdminMessages: true\n        };\n        this.setupPage = this.setupPage.bind(this);\n        this.getMessages = this.getMessages.bind(this);\n        this.getAdminMessages = this.getAdminMessages.bind(this);\n    }\n\n    setupPage(sessionCode) {\n        this.setState({\n            searchIsLoaded: false,\n            sessionInfoIsLoaded: false\n        });\n\n        //Get the session information\n        this.props.actions.getSessionByCode(sessionCode)\n            .then(() => {\n                this.setState({\n                    sessionInfoIsLoaded: true\n                });\n            })\n\n        // Get a list of members for the search\n        const getMembers = this.props.actions.getMemberList('sessionCode=' + sessionCode)\n            .then(() => {\n                return Promise.resolve();\n            });\n        const getSubjects = this.props.actions.getSubjectList('?sessionCode=' + sessionCode)\n            .then(() => {\n                return Promise.resolve();\n            })\n        const getDates = this.props.actions.getIntroDateList('?sessionCode=' + sessionCode)\n            .then(() => {\n                return Promise.resolve;\n            })\n        const getStatusCategories = this.props.actions.getBillStatusCategoryReferences()\n            .then(() => {\n                return Promise.resolve;\n            });\n        Promise.all([\n            getMembers,\n            getSubjects,\n            getDates,\n            getStatusCategories\n        ]).then(() => {\n            this.setState({\n                searchIsLoaded: true\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n        });\n    }\n\n    organizeSchedule(scheduleList) {\n        // Turn the list of schedule items into a list of dates each containing a list of schedule items\n        // This formatting is done so the schedule can be listed in the table with a date as a container\n        scheduleList.sort((a, b) => {\n            const dateComp = new Date(a.ScheduleDate) - new Date(b.ScheduleDate);\n            if (dateComp !== 0) {\n                return dateComp;\n            }\n\n            const timeA = moment(a.TimeDescription, \"h:mm A\");\n            const timeB = moment(b.TimeDescription, \"h:mm A\");\n            if (timeA.isValid() && timeB.isValid()) {\n                if (timeA.isBefore(timeB)) return -1;\n                if (timeA.isAfter(timeB)) return 1;\n            }\n            return 0;\n        });\n        let organizedSchedule = [];\n        let scheduleArray = [];\n        let previousSchedule = scheduleList[0];\n        scheduleList.forEach(schedule => {\n            const scheduleDateTime = this.getScheduleDateTime(schedule);\n            const previousScheduleDateTime = this.getScheduleDateTime(previousSchedule);\n\n            if(!schedule.DisplaySequence) {\n                schedule.DisplaySequence = 999;\n            }\n\n            if (!previousScheduleDateTime.isSame(scheduleDateTime, 'day')) {\n                //Add the list of legislation to the category\n                //Organize the times so that the hour/minute times are in their seperate containers, this is done to help with formatting\n                let newDateContainer = {\n                    Times: this.organizeTimes(scheduleArray),\n                    Date: previousScheduleDateTime.format(\"L\"),\n                };\n                organizedSchedule.push(newDateContainer);\n                //Empty out the leg array so we can use it for another category\n                scheduleArray = [];\n                //Add the first item to the next category\n                scheduleArray.push(schedule);\n            } else {\n                scheduleArray.push(schedule);\n            }\n            //Set this variable so the next iteration will know what the schedule date of the previous iteration was\n            previousSchedule = schedule;\n        });\n        //If the schedule array still has elements then that means not every schedule item in the results has been added to a container\n        //So, check to see if the schedule array has elements and if so create another container\n        if (scheduleArray.length > 0) {\n            let newDateContainer = {\n                Times: this.organizeTimes(scheduleArray),\n                Date: this.getScheduleDateTime(scheduleArray[0]).format(\"L\")\n            };\n            organizedSchedule.push(newDateContainer);\n        }\n\n        return organizedSchedule;\n    }\n\n    organizeTimes(itemsList) {\n        itemsList.sort((a, b) => {\n            return a.DisplaySequence < b.DisplaySequence ? -1 : a.DisplaySequence > b.DisplaySequence ? 1 : 0\n        })\n\n        let organizedTimes = [];\n        let items = [];\n        let time = \"\";\n\n        for (let i = 0; i < itemsList.length; i++) {\n            //If a ScheduleTime has been specified then use that, otherwise get the time from the ScheduleDate but do not display it in the list\n            let currentTime = \"\";\n\n            //If we've entered a new time then push the current time and sorted items into organizedTimes and reset variables\n            if (currentTime !== time) {\n                if (items.length > 0) {\n                    items.sort((a, b) => a.DisplaySequence - b.DisplaySequence);\n                    organizedTimes.push({\n                        Items: items,\n                        Time: time\n                    });\n                }\n\n                time = currentTime;\n                items = [itemsList[i]];\n            } else {\n                items.push(itemsList[i]);\n            }\n        }\n\n        //Sort and push the last time and sorted items\n        items.sort((a, b) => a.DisplaySequence - b.DisplaySequence);\n        organizedTimes.push({\n            Items: items,\n            Time: time\n        })\n\n        return organizedTimes;\n    }\n\n    getScheduleDateTime(schedule) {\n        const scheduleDate = moment(schedule.ScheduleDate);\n        const scheduleTime = moment(schedule.ScheduleTime, \"h:mm A\").isValid() && moment(schedule.ScheduleTime, \"h:mm A\");\n        return scheduleDate.hour(scheduleTime ? scheduleTime.hour() : scheduleDate.hour()).minute(scheduleTime ? scheduleTime.minute() : scheduleDate.minute()).second(scheduleTime ? scheduleTime.second() : scheduleDate.second()).tz('America/New_York', true).local();\n    }\n\n    componentDidMount() {\n        //if another portal has directed the user to this page with a session code url param, persist that session as the selected session\n        let session, getSessionPromise;\n        const sessionCodeParam = this.props.match.params.sessionCode\n        if (parseInt(sessionCodeParam) > 0) {\n            //if the sessionlist is already obtained, use that - otherwise, perform a GET\n            if (this.props.session.sessionList && this.props.session.sessionList.length) {\n                session = this.props.session.sessionList.find(session => session.SessionCode === sessionCodeParam);\n            } else {\n                getSessionPromise = this.props.actions.getSessionByCode(sessionCodeParam)\n                    .then(() => {\n                        session = this.props.session.selectedSession;\n                    })\n            }\n            Promise.all([getSessionPromise]).finally(() => {\n                if (session) {\n                    this.props.actions.changeSession(session.SessionCode)\n                    this.setupPage(session.SessionCode);\n                }\n            })\n        }\n\n        //otherwise, setup the page if another page has changed the value of the selected session\n        if (!session && this.props.session.selectedSession.SessionCode !== this.props.nav.session) {\n            const sessionCode = parseInt(this.props.nav.session, 10);\n            if (!isNaN(sessionCode)) {\n                this.setupPage(sessionCode);\n            }\n        }\n\n        //Get the schedule for the day\n        const startDate = moment().tz('America/New_York').format('MM/DD/YYYY')\n        let params = \"startDate=\" + startDate;\n        this.props.actions.getScheduleList(params)\n            .then(() => {\n                // Remove all the schedules that happened before the current hour - 2\n                const currentDay = moment();\n                const currentHour = currentDay.subtract(2, \"hours\");\n                //filter schedule to those that are after today, or are today but after the current hour\n                const schedule = this.props.schedule.scheduleList.filter(item => (item.ScheduleDate && moment(item.ScheduleDate).isValid() && moment(item.ScheduleDate).isAfter(moment(), 'day')) || (item.ScheduleTime && moment(item.ScheduleTime, \"h:mm A\").isValid() && moment(item.ScheduleTime, \"h:mm A\").tz('America/New_York', true).local().isSameOrAfter(moment().subtract(2, \"hours\"), 'hour')) || ((!item.ScheduleTime || !moment(item.ScheduleTime, \"h:mm A\").isValid()) && new Date(item.ScheduleDate).getTime() > currentHour))\n                //organize the schedule (set meetings in proper order), and then filter to display the next 3 meetings\n                let organizedSchedule = this.organizeSchedule(schedule);\n                let filteredOrganizedEvents = [];\n                organizedSchedule.forEach(day => {\n                    let times = day.Times;\n                    let thisDayMeetings = { Date: day.Date, Times: [] };\n                    times.forEach(time => {\n                        let timeObj = { Time: time.Time, Items: time.Items };\n                        thisDayMeetings.Times.push(timeObj);\n                    })\n                    filteredOrganizedEvents.push(thisDayMeetings);\n                })\n                this.setState({\n                    scheduleIsLoaded: true,\n                    schedule: filteredOrganizedEvents\n                });\n            });\n\n        this.getMessages();\n    }\n\n    componentDidUpdate(prevProps) {\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            const sessionCode = parseInt(this.props.nav.session, 10);\n            if (!isNaN(sessionCode)) {\n                this.setupPage(sessionCode);\n            }\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    getMessages() {\n        this.setState({ gettingMessages: true }, () => {\n            this.props.actions.getMessages().then(() => {\n                this.setState({ gettingMessages: false })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({ gettingMessages: false })\n            })\n        })\n    }\n\n    getAdminMessages() {\n        this.setState({ gettingAdminMessages: true }, () => {\n            this.props.actions.getAdminMessages().then(() => {\n                this.setState({ gettingAdminMessages: false })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.props.actions.makeToast([{ message: \"Failed to get admin messages\", type: \"failure\" }]);\n                this.setState({ gettingAdminMessages: false })\n            })\n        })\n    }\n\n    render() {\n        return (\n            <div className=\"homepage-wrapper\">\n                <MessageOfTheDay messages={[...this.props.collection.messages].reverse()} adminMessages={[...this.props.collection.adminMessages].reverse()} gettingMessages={this.state.gettingMessages} gettingAdminMessages={this.state.gettingAdminMessages} getMessages={this.getMessages} getAdminMessages={this.getAdminMessages} />\n                <Search\n                    memberList={this.props.members.memberList}\n                    subjectList={this.props.bills.subjectList}\n                    datesList={this.props.bills.introDateList}\n                    statusCategoriesList={this.props.bills.billStatusCategoryReferences}\n                    isLoaded={this.state.searchIsLoaded && this.state.sessionInfoIsLoaded}\n                    session={this.props.nav.session}\n                    selectedSession={this.props.session.selectedSession}\n                    sessionList={this.props.session.sessionList}\n                    history={this.props.history}\n                />\n                <div className=\"session-info grid-wrapper three\" style={{ minHeight: '422px', overflowWrap: 'anywhere' }}>\n                    <Resources\n                        isLoaded={this.state.sessionInfoIsLoaded}\n                        session={this.props.nav.session}\n                        selectedSession={this.props.session.selectedSession}\n                        isAuthenticated={this.props.login.isAuthenticated}\n                    />\n                    <div className=\"center-column\">\n                        <SessionInfo\n                            isLoaded={this.state.sessionInfoIsLoaded}\n                            selectedSession={this.props.session.selectedSession}\n                            sessionList={this.props.session.sessionList}\n                        />\n                    </div>\n                    <Schedule\n                        schedule={this.state.schedule}\n                        isLoaded={this.state.scheduleIsLoaded}\n                    />\n                </div>\n            </div>\n\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { bills, session, nav, schedule, members, login, collection } = state;\n        return {\n            bills,\n            session,\n            nav,\n            schedule,\n            members,\n            login,\n            collection\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, sessionActionCreators, navActionCreators, scheduleActionCreators, memberActionCreators, authActionCreators, collectionActionCreators), dispatch)\n        }\n    }\n)(HomeComponent)","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\n\nimport { cancelRequest } from '../../services/request.service';\n\nclass SessionInformationComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            data: []\n        };\n    }\n\n    //When component has mounted, make the call to list the sessions\n    componentDidMount() {\n        this.props.getSessionList().then(() =>\n            this.setState({\n                data: this.props.sessionList\n            })\n        )\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { data } = this.state;\n        const listSessions = data.map((session, i) =>\n            <li key={i}>\n                <Link to={`/session-details/${session.SessionID}`}>{session.SessionYear} {session.DisplayName}</Link>\n            </li>\n        );\n        return (\n            <div className=\"public-list inner-grid three-and-one\">\n                <div>\n                </div>\n                <div>\n                    <h3>Other Sessions</h3>\n                    <ul>\n                        {listSessions}\n                    </ul>\n                </div>\n            </div>\n            )\n    }\n}\n\nconst PublicSessionInformation = connect(\n    state => state.session,\n    dispatch => bindActionCreators(sessionActionCreators, dispatch)\n)(SessionInformationComponent)\n\nexport default PublicSessionInformation;\n","import React from 'react';\nimport moment from 'moment-timezone';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\nimport LoaderComponent from '../../../lis-shared/lis-layout/components/lis-loader-component';\nimport { cancelRequest } from '../../../services/request.service';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\n\nclass CommitteeListComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            activeKey: '',\n            listMembers: [],\n            houseCommitteesIsLoaded: false,\n            senateCommitteesIsLoaded: false,\n            sessionData: '',\n            houseCommittees: [],\n            senateCommittees: [],\n            conveneDate: moment().format(),\n            showSenateChamber: true,\n            showHouseChamber: true\n        };\n        this.getCommitteeLists = this.getCommitteeLists.bind(this);\n        this.toggleChamber = this.toggleChamber.bind(this);\n        this.toggleGetMembers = this.toggleGetMembers.bind(this);\n        this.setupPage = this.setupPage.bind(this);\n    }\n\n    getCommitteeLists(sessionID, chamberCode, listName) {\n        var params = 'sessionID=' + sessionID + '&' + 'chamberCode=' + chamberCode\n\n        this.props.actions.getCommitteeList(params).then(() =>\n            this.setState({\n                [listName]: this.props.committee.committeeList,\n                [listName + 'IsLoaded']: true\n            })\n        )\n    }\n\n    toggleChamber(chamber) {\n        this.setState(state => ({\n            [chamber]: !state[chamber]\n        }));\n    }\n\n    toggleGetMembers(committeeId) {\n        const sessionData = this.state.sessionData;\n        var params = 'sessionCode=' + sessionData.SessionCode + '&CommitteeID=' + committeeId;\n        if (this.state[committeeId]) {\n            this.setState(prevState => ({\n                [committeeId + 'isActive']: !prevState[committeeId + 'isActive']\n            }));\n            return;\n        }\n        this.props.actions.getMembersByCommittee(params).then(() => {\n            // The Chairman needs to be the at the top of the list\n            const chairmanIndex = this.props.members.membersByCommittee.findIndex(member => member.CommitteeRoleTitle === 'Chairman');\n            let membersByCommittee = [...this.props.members.membersByCommittee];\n            if (chairmanIndex !== -1) {\n                let chairman = membersByCommittee[chairmanIndex];\n                membersByCommittee.splice(chairmanIndex, 1);\n                membersByCommittee.unshift(chairman);\n            }\n            const sessionStartObj = sessionData.SessionEvents && sessionData.SessionEvents.length && sessionData.SessionEvents.find(date => date.DisplayName === \"Session Start\");\n            const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate) : '';\n            const adjournmentEvent = sessionData ? sessionData.SessionEvents.find(event => event.DisplayName === 'Adjournment') : '';\n            const endDate = adjournmentEvent ? moment(adjournmentEvent.ActualDate) : moment();\n            const memberString = membersByCommittee.map((member, memberIndex) => {\n                let detailString = '';\n                if (member.CommitteeRoleTitle === \"Chairman\") {\n                    detailString += '(' + member.CommitteeRoleTitle;\n                }\n                if (member.EffectiveBeginDate && moment(member.EffectiveBeginDate).isAfter(startDate)) {\n                    detailString = detailString ? detailString + ', ' : '(';\n                    detailString += 'Arrived: ' + moment(member.EffectiveBeginDate).format('MM/DD/YYYY');\n                }\n                if (member.EffectiveEndDate && moment(member.EffectiveEndDate).isBefore(endDate)) {\n                    detailString = detailString ? detailString + ', ' : '(';\n                    detailString += 'Left: ' + moment(member.EffectiveEndDate).format('MM/DD/YYYY');\n                }\n                if (detailString) {\n                    detailString = ' ' + detailString + ')';\n                };\n                return (<React.Fragment key={memberIndex}>\n                    <Link style={{ display: 'inline', margin: 0 }} to={`/session-details/${sessionData.SessionCode}/member-information/${member.MemberNumber}/member-details`}>{member.PatronDisplayName}</Link>\n                    {detailString}\n                    {memberIndex !== membersByCommittee.length - 1 && \", \"}\n                </React.Fragment>)\n            })\n            this.setState(prevState => ({\n                [committeeId]: memberString,\n                [committeeId + 'isActive']: !prevState[committeeId + 'isActive']\n            }));\n        });\n    }\n\n    //When component has mounted, make the call to list the committees\n    componentDidMount() {\n        if (parseInt(this.props.match.params.sessioncode, 10) > 0) {\n            //Update the session selector component, which will run componentDidUpdate and call setupPage on its own\n            const sessionCode = this.props.match.params.sessioncode\n            if (this.props.nav.session !== sessionCode) {\n                this.props.actions.changeSession(sessionCode)\n            } else {\n                this.setupPage(sessionCode);\n            }\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push('/session-details/' + this.props.nav.session + '/committee-information');\n            this.setupPage(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            const sessionCode = this.props.match.params.sessioncode;\n            if (!isNaN(sessionCode)) {\n                this.props.actions.changeSession(sessionCode);\n            }\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    setupPage(sessionCode) {\n        this.props.actions.getSessionByCode(sessionCode).then(() => {\n            const sessionStartObj = this.props.session.selectedSession.SessionEvents && this.props.session.selectedSession.SessionEvents.length && this.props.session.selectedSession.SessionEvents.find(date => date.DisplayName === \"Session Start\");\n            const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate) : '';\n            this.setState({\n                sessionData: this.props.session.selectedSession,\n                conveneDate: startDate\n            }, () => {\n                this.getCommitteeLists(this.state.sessionData.SessionID, 'H', 'houseCommittees')\n                this.getCommitteeLists(this.state.sessionData.SessionID, 'S', 'senateCommittees')\n            })\n        });\n    }\n\n    render() {\n        const { sessionData, houseCommittees, senateCommittees } = this.state;\n        const sessionHeader = sessionData ? sessionData.SessionYear + ' ' + sessionData.DisplayName : '';\n        const listCommittee = (committee, i) => {\n            const legislationObj = {\n                selectedSession: sessionData.SessionID,\n                selectedBillStatus: 2,\n                selectedCommittee: committee.CommitteeID,\n            };\n            const legislationLink = window.btoa(JSON.stringify(legislationObj));\n            return (<div key={i} className={this.state[committee.CommitteeID + 'isActive'] ? 'parent-li slidedown-open' : 'parent-li slidedown-closed'}>\n                <div className=\"toggle-row\">\n                    <Link to={`/session-details/${sessionData.SessionCode}/committee-information/${committee.CommitteeNumber}/committee-details`}>{committee.Name}</Link>\n                    <div className=\"button-container\">\n                        <button aria-expanded={!!this.state[committee.CommitteeID + 'isActive']} className=\"arrow-down\" onClick={() => this.toggleGetMembers(committee.CommitteeID, sessionData.SessionCode)}>Show members</button>\n                    </div>\n                </div>\n                {this.state[committee.CommitteeID + 'isActive'] &&\n                    <div className=\"list-desc\">\n                        Members: {this.state[committee.CommitteeID]}\n                    </div>\n                }\n                <div className=\"list-links\">\n                    <Link to={`/bill-search?q=${legislationLink}`}>Legislation</Link>\n                </div>\n            </div>)\n        }\n        const listHouseCommittees = houseCommittees.map(listCommittee);\n        const listSenateCommittees = senateCommittees.map(listCommittee);\n\n        return (\n            <div className=\"public-chamber-data\">\n                <div>\n                    <h2>{sessionHeader}</h2>\n                </div>\n                <div className=\"public-list inner-grid two\">\n                    <div>\n                        <h3 role=\"button\" onClick={() => this.toggleChamber(\"showHouseChamber\")} aria-expanded={this.state.showHouseChamber} className={`chamber-name ${this.state.showHouseChamber ? \"opened\" : \"\"}`}>House Committees</h3>\n                        <LoaderComponent data={this.state.houseCommitteesIsLoaded} />\n                        <ul className=\"slidedown-list\">\n                            {this.state.showHouseChamber &&\n                                <>\n                                    {listHouseCommittees}\n                                </>\n                            }\n                        </ul>\n                    </div>\n                    <div>\n                        <h3 role=\"button\" onClick={() => this.toggleChamber(\"showSenateChamber\")} aria-expanded={this.state.showSenateChamber} className={`chamber-name ${this.state.showHouseChamber ? \"opened\" : \"\"}`}>Senate Committees</h3>\n                        <LoaderComponent data={this.state.senateCommitteesIsLoaded} />\n                        <ul className=\"slidedown-list\">\n                            {this.state.showSenateChamber &&\n                                <>\n                                    {listSenateCommittees}\n                                </>\n                            }\n                        </ul>\n                    </div>\n                </div>\n            </div>\n        )\n    }\n}\n\nconst PublicCommitteeList = connect(\n    (state) => {\n        const { committee, members, session, nav } = state;\n        return {\n            committee,\n            members,\n            session,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, committeeActionCreators, memberActionCreators, sessionActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(CommitteeListComponent)\n\nexport default PublicCommitteeList;\n","import React from 'react';\nimport moment from 'moment-timezone';\nimport { Link, withRouter } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport renderHTML from 'react-render-html';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { calendarActionCreators } from '../../../stores/lis-calendar-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\nimport LoaderComponent from '../../../lis-shared/lis-layout/components/lis-loader-component'\nimport { minutesActionCreators } from '../../../stores/lis-minutes-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\n\nconst CURRENTLY_IN = 'Bills in subcommittee <em>today</em>';\nconst ASSIGNED_TO = 'Bills that have ever been in this subcommittee';\n\nfunction MinutesData(props) {\n    return (\n        <tr className=\"inner-grid one-and-three\">\n            <td className=\"no-gap-grid\" style={{ gridTemplateColumns: '150px 110px' }}>\n                <span>{moment(props.MinutesDate).format(\"MMMM D[,] YYYY\")} {props.MinutesNumber > 1 ? \"(\" + props.MinutesNumber + \")\" : \"\"}</span>\n                <div className=\"flex-row\">\n                    {(props.IsPublic || this.props.login.userClaims.scopes.find(x => x === \"Senate\")) ? <Link to={`/session-details/${props.sessionCode}/committee-information/${props.committeeNumber}/meetings/${props.MinutesBookID}/1`}>\n                        Meeting\n                    </Link> : <div />}\n                    {props.MinutesCalendars && props.MinutesCalendars.length > 0 ?\n                        <React.Fragment>{(props.IsPublic || this.props.login.userClaims.scopes.find(x => x === \"Senate\")) && \"|\"}\n                            <Link to={`/session-details/${props.sessionCode}/committee-information/${props.committeeNumber}/dockets/${props.MinutesCalendars[0].CalendarID}`}>\n                                Docket\n                            </Link>\n                        </React.Fragment> : null}\n                </div>\n            </td>\n        </tr >\n    )\n}\n\nfunction MinutesList(props) {\n    const listMinutes = props.minutes.map((minute, i) => {\n        return (\n            <MinutesData key={i} {...minute} sessionCode={props.sessionCode} committeeNumber={props.committeeNumber} />\n        )\n    });\n    return (<React.Fragment>{listMinutes}</React.Fragment>)\n}\n\nfunction DocketData(props) {\n    const { docket, formattedSessionCode, committeeNumber } = props;\n\n    if (!docket) {\n        return <div />;\n    }\n\n    let url = '';\n    if (docket.ChamberCode === \"H\") {\n        if (docket.ReferenceNumber) {\n            url = `https://virginiageneralassembly.gov/house/agendas/agendaItem.php?id=${docket.ReferenceNumber}&ses=${formattedSessionCode}`\n        } else {\n            url = `https://virginiageneralassembly.gov/house/agendas/agendaDates.php?id=${committeeNumber}&ses=${formattedSessionCode}`\n        }\n    } else {\n        url = `/session-details/` + docket.SessionCode + `/committee-information/` + committeeNumber + `/dockets/` + docket.DocketID;\n    }\n\n    return (\n        <tr className=\"inner-grid one-and-three\">\n            <td className=\"no-gap-grid\" style={{ gridTemplateColumns: '150px 110px' }}>\n                <span>{moment(docket.HouseAgendaDate ? docket.HouseAgendaDate : docket.DocketDate).format(\"MMMM D[,] YYYY\")}</span>\n                <Link to={url}>\n                    Docket</Link>\n            </td>\n        </tr>\n    )\n}\n\nfunction DocketList(props) {\n    let count = 1;\n    const listDockets = props.dockets.map((docket, i) => {\n        //Proceed with adding the docket if there is not a minutes on the same day as the docket\n        //Unless it's a past session in which case show the docket no matter what \n        if ((!props.maxSize || count < props.maxSize) && ((!props.sessionData.IsActive && i !== 0) || (i !== 0 && props.minutes && props.minutes.length > 0 && !props.minutes.find(y => moment(docket.DocketDate).isSame(y.MinutesDate, \"days\"))))) {\n            count++;\n            return (\n                <DocketData key={i} docket={docket} formattedSessionCode={props.formattedSessionCode} committeeNumber={props.committeeNumber} />\n            )\n        }\n    });\n    return (<React.Fragment>{listDockets}</React.Fragment>)\n}\n\nfunction SubCommittees(props) {\n    return (\n        <li>\n            {props.parentCommitteeNumber !== \"S05\"\n                ? <Link to={`/session-details/${props.sessionCode}/committee-information/${props.CommitteeNumber}/committee-details`}>{props.Name}</Link>\n                : props.Name === \"Capital Outlay & Transportation\"\n                    ? <a href='https://sfac.virginia.gov/subcommittees/capital-outlay-transport.shtml'>Capital Outlay & Transportation</a>\n                    : props.Name === \"Education\"\n                        ? <a href='https://sfac.virginia.gov/subcommittees/education.shtml'>Education</a>\n                        : <Link to={`/session-details/${props.sessionCode}/committee-information/${props.CommitteeNumber}/committee-details`}>{props.Name}</Link>\n            }\n        </li>\n    );\n}\n\nfunction SubCommitteesList(props) {\n    const listCommittees = props.committees.map((committee, i) => <SubCommittees key={i} sessionCode={props.sessionCode} parentCommitteeNumber={props.parentCommitteeNumber} {...committee} />);\n    return listCommittees;\n}\n\nclass CommitteeDetailsComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            committeeData: { Name: '' },\n            parentCommitteeData: {},\n            memberList: [],\n            subcommitteesList: [],\n            sessionData: '',\n            minutesList: [],\n            docketList: [],\n            showTooltip: {}\n        };\n        this.getCommitteeDetails = this.getCommitteeDetails.bind(this);\n        this.getCommitteeMembers = this.getCommitteeMembers.bind(this);\n        this.getSubcommittees = this.getSubcommittees.bind(this);\n        this.getMeetings = this.getMeetings.bind(this);\n        this.setupDoc = this.setupDoc.bind(this);\n        this.makeLink = this.makeLink.bind(this);\n        this.toggleTooltip = this.toggleTooltip.bind(this);\n    }\n\n    // When component has mounted:\n    // 1. Get session info, add to state\n    // 2. Get committee by ID\n    // 3. Get committee members\n    // 4. Get subcommittees (if any)\n    setupDoc(sessionCode) {\n        const committeeNumber = this.props.match.params.committeenumber\n        this.props.actions.getSessionByCode(sessionCode).then(() => {\n            const sessionData = this.props.session.selectedSession;\n            this.setState({\n                sessionData: sessionData,\n                committeeNumber: committeeNumber\n            }, () => {\n                this.getCommitteeDetails(committeeNumber, sessionData.SessionID);\n            });\n        });\n    }\n\n\n    componentDidUpdate(prevProps) {\n        //If the user clicks a link to a subcommittee then the setup function needs to run again\n        if (this.props.match.params.committeenumber !== prevProps.match.params.committeenumber) {\n            this.setupDoc(this.props.nav.session);\n        }\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push('/session-details/' + this.props.nav.session + '/committee-information/' + this.props.match.params.committeenumber + '/committee-details');\n            this.setupDoc(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            const sessionCode = this.props.match.params.sessioncode;\n            if (!isNaN(sessionCode)) {\n                this.props.actions.changeSession(sessionCode);\n            }\n        }\n    }\n\n    componentDidMount() {\n        window.scrollTo(0, 0);\n        const sessionCode = this.props.match.params.sessioncode;\n        //Update the session selector component, which will run componentDidUpdate and call setupDoc on its own\n        if (this.props.nav.session !== sessionCode) {\n            this.props.actions.changeSession(sessionCode)\n        } else {\n            this.setupDoc(sessionCode);\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    getCommitteeDetails(committeeNumber, sessionId) {\n        const sessionStartObj = this.props.session.selectedSession.SessionEvents && this.props.session.selectedSession.SessionEvents.length && this.props.session.selectedSession.SessionEvents.find(date => date.DisplayName === \"Session Start\");\n        const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate) : '';\n\n        this.props.actions.getCommitteeByNumber(\"?committeeNumber=\" + committeeNumber + \"&sessionId=\" + sessionId).then(() => {\n            this.setState({\n                committeeData: this.props.committee.committeeByNumberData,\n                detailsIsLoaded: true\n            });\n\n            //Attempt to get any meetings or dockets for the committee\n            this.getMeetings(this.state.sessionData, this.props.committee.committeeByNumberData.CommitteeID);\n            if (this.props.committee.committeeByNumberData.ChamberCode === \"S\")\n                this.getDockets(this.state.sessionData, this.props.committee.committeeByNumberData);\n\n            if (this.props.committee.committeeByNumberData.ParentCommitteeID) {\n                this.props.actions.getCommitteeById(\"?sessionId=\" + sessionId + \"&id=\" + this.props.committee.committeeByNumberData.ParentCommitteeID + \"&effectiveDate=\" + moment(this.props.session.selectedSession.StartDate).format(\"MM/DD/YYYY\")).then(() => {\n                    this.setState({\n                        parentCommitteeData: this.props.committee.committeeByIdData\n                    })\n                })\n            }\n\n            this.getCommitteeMembers(this.props.committee.committeeByNumberData.CommitteeID, sessionId);\n            this.getSubcommittees(this.props.committee.committeeByNumberData.CommitteeID, sessionId);\n        }\n        )\n    }\n\n\n    getCommitteeMembers(committeeID, sessionId) {\n        var params = 'sessionID=' + sessionId + '&' + 'CommitteeID=' + committeeID;\n        this.props.actions.getMembersByCommittee(params).then(() => {\n            // The Chairman needs to be the at the top of the list\n            const chairmanIndex = this.props.members.membersByCommittee.findIndex(member => member.CommitteeRoleTitle === 'Chairman');\n            let membersByCommittee = [...this.props.members.membersByCommittee];\n            if (chairmanIndex !== -1) {\n                let chairman = membersByCommittee[chairmanIndex];\n                membersByCommittee.splice(chairmanIndex, 1);\n                membersByCommittee.unshift(chairman);\n            }\n            this.setState({\n                memberList: membersByCommittee,\n                membersIsLoaded: true\n            });\n        });\n    }\n\n    getSubcommittees(parentID, sessionID) {\n        var params = 'sessionID=' + sessionID + '&' + 'parentCommitteeID=' + parentID;\n\n        this.props.actions.getCommitteeList(params).then(() =>\n            this.setState({\n                subcommitteesList: this.props.committee.committeeList,\n                subcommitteesIsLoaded: true\n            })\n        );\n    }\n\n    getMeetings(sessionData, committeeId) {\n        const meetingParam = \"sessionID=\" + sessionData.SessionID + \"&committeeID=\" + committeeId;\n        this.props.actions.getMinutesList(meetingParam, false)\n            .then(() => {\n                let minutesList = [...this.props.minutes.minutesList];\n                this.setState({\n                    minutesList: minutesList,\n                    minutesListIsLoaded: true\n                });\n            });\n    }\n\n    getDockets(sessionData, committeeData) {\n        const docketParams = \"?sessionID=\" + sessionData.SessionID + \"&chamberCode=\" + committeeData.ChamberCode + \"&committeeID=\" + committeeData.CommitteeID;\n        this.props.actions.getDocketList(docketParams, false)\n            .then(() => {\n                this.setState({\n                    docketList: this.props.calendar.docketList,\n                    docketListIsLoaded: true\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n                this.setState({\n                    docketListIsLoaded: true\n                });\n            });\n    }\n\n    makeLink(statusCategoryId, currentStatus) {\n        let params = {\n            selectedSession: this.state.sessionData ? this.state.sessionData.SessionID : '',\n            selectedBillStatusCategory: statusCategoryId,\n            selectedCommittee: this.state.committeeData.ParentCommitteeID || this.state.committeeData.CommitteeID,\n            selectedSubcommittee: this.state.committeeData.ParentCommitteeID ? this.state.committeeData.CommitteeID : '',\n            currentStatus: currentStatus ?? false\n        };\n\n        const json = JSON.stringify(params);\n        const query = window.btoa(json);\n        return '/bill-search?q=' + query;\n    }\n\n    toggleTooltip(text) {\n        let showTooltip = { ...this.state.showTooltip };\n\n        //Close all open tooltips\n        if (typeof showTooltip === \"object\") {\n            for (const x in showTooltip) {\n                if (x !== text)\n                    showTooltip[x] = false;\n            };\n        }\n\n        showTooltip[text] = showTooltip[text] ? false : true;\n\n        this.setState({\n            showTooltip: showTooltip\n        })\n    }\n\n    render() {\n        const { sessionData, committeeData, parentCommitteeData, memberList, subcommitteesList, minutesList, docketList } = this.state;\n        const formattedSessionCode = sessionData.SessionCode ? sessionData.SessionCode.substr(2) : '';\n        const sessionStartObj = sessionData && sessionData.SessionEvents && sessionData.SessionEvents.length ? sessionData.SessionEvents.find(date => date.DisplayName === \"Session Start\") : '';\n        const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate) : moment();\n        const closingEvent = sessionData && sessionData.SessionEvents && sessionData.SessionEvents.length ? sessionData.SessionEvents.find(event => event.DisplayName === 'Closing') : '';\n        const reconveneEvent = !closingEvent && sessionData && sessionData.SessionEvents && sessionData.SessionEvents.length ? sessionData.SessionEvents.find(event => event.DisplayName === 'Reconvene') : '';\n        const adjournmentEvent = !closingEvent && !reconveneEvent && sessionData && sessionData.SessionEvents && sessionData.SessionEvents.length ? sessionData.SessionEvents.find(event => event.DisplayName === 'Adjournment') : '';\n        const endDate = closingEvent ? moment(closingEvent.ActualDate) : reconveneEvent ? moment(reconveneEvent.ActualDate) : adjournmentEvent ? moment(adjournmentEvent.ActualDate) : moment();\n        //Find the first docket that doesn't have a minutes on the same day\n        const defaultDocket = docketList.find(x => !minutesList.find(y => moment(x.DocketDate).isSame(y.MinutesDate, \"days\")));\n\n        const committeeLabel = (!committeeData.ParentCommitteeID ? committeeData.ChamberCode === \"H\" ? \"House \" : \"Senate \" : \"Subcommittee: \") + committeeData.Name\n\n        const buildMembers = (memberList) => {\n            let members = [];\n            let changedMembers = [];\n            for (let i = 0; i < memberList.length; i++) {\n                if (memberList[i].RemoveDate && moment(memberList[i].RemoveDate).isBefore(endDate)) {\n                    memberList[i].Change = \"Left\"\n                    memberList[i].ChangeDate = memberList[i].RemoveDate;\n                    changedMembers.push(memberList[i])\n                } else if (memberList[i].AssignDate && moment(memberList[i].AssignDate).isAfter(startDate) && moment(memberList[i].AssignDate).isBefore(endDate)) {\n                    members.push(memberList[i])\n                    memberList[i].Change = \"Joined\"\n                    memberList[i].ChangeDate = memberList[i].AssignDate\n                    changedMembers.push(memberList[i])\n                } else {\n                    members.push(memberList[i])\n                }\n            }\n\n            changedMembers.sort((a, b) => (a.ChangeDate > b.ChangeDate) ? 1 : ((b.ChangeDate > a.ChangeDate) ? -1 : 0))\n\n            return <React.Fragment>\n                <p>\n                    {members.map((member, memberIndex) =>\n                        <React.Fragment key={memberIndex}>\n                            <Link style={{ display: 'inline' }} to={`/session-details/${sessionData.SessionCode}/member-information/${member.MemberNumber}/member-details`}>{member.PatronDisplayName}</Link>\n                            {member.CommitteeRoleTitle && member.CommitteeRoleTitle === \"Vice-Chair\"\n                                ? this.state.committeeData.ChamberCode === \"H\"\n                                    ? \" (Vice Chair)\"\n                                    : \" (Co-Chair)\"\n                                : member.CommitteeRoleTitle !== \"Member\" && member.CommitteeRoleTitle !== \"Ex-Officio\" && \" (\" + member.CommitteeRoleTitle + \")\"\n                            }\n                            {memberIndex !== members.length - 1 && \", \"}\n                        </React.Fragment>\n                    )}\n                </p>\n                <p className=\"committee-member-details\">\n                    {changedMembers.map((member, memberIndex) =>\n                        <React.Fragment key={memberIndex}>\n                            {member.Change === \"Joined\"\n                                ? moment(member.AssignDate).format('MM/DD/YYYY') + \" \" + member.PatronDisplayName + \" joined\\n\"\n                                : moment(member.RemoveDate).format('MM/DD/YYYY') + \" \" + member.PatronDisplayName + \" left\\n\"\n                            }\n                        </React.Fragment>\n                    )}\n                </p>\n            </React.Fragment>;\n        }\n\n        return (\n            <div className=\"committee-details-page generic-details-page public-details inner-grid\">\n                <div>\n                    <h2 style={{ marginBottom: \"7px\" }}>{sessionData.SessionYear} {sessionData.DisplayName}</h2>\n                </div>\n                {committeeData.ParentCommitteeID && <Link className=\"parent-committee-link\" to={`/session-details/${sessionData.SessionCode}/committee-information/${parentCommitteeData.CommitteeNumber}/committee-details`}><i className=\"icon button-left\" style={{ marginRight: \"2px\" }} />{(parentCommitteeData.ChamberCode === \"H\" ? \"House \" : \"Senate \") + parentCommitteeData.Name}</Link>}\n                <div className=\"details-header\">\n                    <h3 style={{ marginBottom: \"10px\" }}>{committeeLabel}</h3>\n                    <LoaderComponent data={this.state.detailsIsLoaded} />\n                </div>\n                <div className=\"details-section\">\n                    <h4 >Membership</h4>\n                    <LoaderComponent data={this.state.membersIsLoaded} />\n                    {memberList.length === 0 &&\n                        <p>No Members</p>\n                    }\n                    <React.Fragment>\n                        {buildMembers(memberList)}\n                    </React.Fragment>\n                </div>\n                {this.state.minutesListIsLoaded || this.state.docketListIsLoaded ?\n                    <React.Fragment>\n                        {committeeData.ChamberCode === \"H\" ?\n                            <div className={this.state['slideDockets'] ? 'parent-li slidedown-open' : 'parent-li slidedown-closed'}>\n                                {committeeData.ParentCommitteeID && <p>Committee chairs serve as ex officio members of House subcommittees.</p>}\n                                {docketList.length === 0 ?\n                                    this.state.sessionData && this.state.sessionData.IsActive &&\n                                    <div className=\"table-container description\">\n                                        <p style={{ marginBottom: \"0px\" }}>{committeeData.MeetingNote}</p>\n                                        <a target=\"_blank\" href={`https://virginiageneralassembly.gov/house/agendas/agendaDates.php?id=${committeeData.CommitteeNumber}&ses=${formattedSessionCode}`} >{committeeData.ParentCommitteeID ? \"Subcommittee Agendas\" : \"Committee Agendas\"}</a>\n                                    </div>\n                                    :\n                                    <React.Fragment>\n                                        <div className={this.state['slideDockets'] ? 'parent-li slidedown-open' : 'parent-li slidedown-closed'}>\n                                            <div className=\"toggle-row\">\n                                                <div className=\"table-container description\">\n                                                    <h4>Agendas</h4>\n                                                    <p>{committeeData.MeetingNote}</p>\n                                                </div>\n                                                {docketList.length > 3 &&\n                                                    <div className=\"button-container text-align-left\">\n                                                        <label aria-expanded={this.props.slideDockets} className=\"arrow-down-label\" onClick={this.props.toggleShowData.bind(this, 'slideDockets')}>All Agendas</label>\n                                                        <button aria-expanded={this.props.slideDockets} className=\"arrow-down\" onClick={this.props.toggleShowData.bind(this, 'slideDockets')}>All Agendas</button>\n                                                    </div>\n                                                }\n                                            </div>\n                                        </div>\n                                        {!this.state.sessionData.IsActive &&\n                                            <div>\n                                                <table className=\"line-table\">\n                                                    <tbody className=\"toggle-table\">\n                                                        {!this.props.slideDockets &&\n                                                            <DocketList dockets={docketList.slice(0, 3)} formattedSessionCode={formattedSessionCode} committeeNumber={committeeData.CommitteeNumber} />\n                                                        }\n                                                        {this.props.slideDockets && docketList.length > 3 &&\n                                                            <div className=\"list-desc\">\n                                                                <DocketList dockets={docketList} formattedSessionCode={formattedSessionCode} committeeNumber={committeeData.CommitteeNumber} />\n                                                            </div>\n                                                        }\n                                                    </tbody>\n                                                </table>\n                                            </div>\n                                        }\n                                    </React.Fragment>\n                                }\n                                <div className=\"details-section\">\n                                    {this.state.sessionData && this.state.sessionData.IsActive &&\n                                        <a rel=\"noreferrer\" target=\"_blank\" href={`https://virginiageneralassembly.gov/house/reports/reportsDates.php?id=${this.state.committeeData.CommitteeNumber}&ses=${formattedSessionCode}`} >{committeeData.ParentCommitteeID ? \"Subcommittee Reports\" : \"Committee Reports\"}</a>\n                                    }\n                                    {this.state.sessionData && this.state.sessionData.IsActive &&\n                                        <p><a rel=\"noreferrer\" target=\"_blank\" href={`https://hodspeak.house.virginia.gov/committees/${this.state.committeeData.CommitteeNumber}/bill_feedback?ses=${formattedSessionCode}`} >Comments on Bills</a></p>\n                                    }\n                                </div>\n                            </div>\n                            :\n                            <React.Fragment>\n                                <div className={this.state['slideDockets'] ? 'parent-li slidedown-open' : 'parent-li slidedown-closed'}>\n                                    {committeeData.ParentCommitteeID && <p>The Chair of the full Committee shall be an ex officio member of all subcommittees and entitled to vote, but shall not be counted as a member for purposes of a quorum. </p>}\n                                    <div className=\"toggle-row\">\n                                        <div className=\"table-container description\">\n                                            <h4>Meetings (Dockets, Votes, Reports)</h4>\n                                            <p>{this.state.committeeData.MeetingNote}</p>\n                                        </div>\n                                    </div>\n                                    {minutesList.length > 3 &&\n                                        <div className=\"button-container text-align-left\">\n                                            <label aria-expanded={this.props.slideDockets} className=\"arrow-down-label\" onClick={this.props.toggleShowData.bind(this, 'slideDockets')}>All Meetings</label>\n                                            <button aria-expanded={this.props.slideDockets} className=\"arrow-down\" onClick={this.props.toggleShowData.bind(this, 'slideDockets')}>All Meetings</button>\n                                        </div>\n                                    }\n                                    {this.state.committeeData.AgendaURL &&\n                                        <div className=\"table-container description\">\n                                            <p>\n                                                <a href={this.state.committeeData.AgendaURL} target=\"_blank\">Agendas</a>\n                                            </p>\n                                        </div>\n                                    }\n                                    {this.state.committeeData.CommitteeID === 26 && //Senate Finance\n                                        <div className=\"table-container description\">\n                                            <p>\n                                                <a href={\"http://sfac.virginia.gov/about.shtml\"} target=\"_blank\">Staff/Information</a>\n                                            </p>\n                                        </div>\n                                    }\n                                    {this.state.docketList.length > 0 && defaultDocket && !this.state.sessionData.IsActive &&\n                                        <div>\n                                            {/*don't show the 'All Meetings' button twice -- already shown if minutesList.length > 3*/\n                                                minutesList.length <= 3 &&\n                                                <div className=\"button-container text-align-left\">\n                                                    <label aria-expanded={this.props.slideDockets} className=\"arrow-down-label\" onClick={this.props.toggleShowData.bind(this, 'slideDockets')}>All Meetings</label>\n                                                    <button aria-expanded={this.props.slideDockets} className=\"arrow-down\" onClick={this.props.toggleShowData.bind(this, 'slideDockets')}>All Meetings</button>\n                                                </div>\n                                            }\n                                            <table className=\"line-table\">\n                                                <tbody className=\"toggle-table\">\n                                                    <DocketData\n                                                        docket={defaultDocket}\n                                                        formattedSessionCode={formattedSessionCode}\n                                                        committeeNumber={committeeData.CommitteeNumber}\n                                                    />\n                                                    {this.props.slideDockets && !this.state.sessionData.IsActive && docketList.length > 3 ?\n                                                        <div className=\"list-desc\">\n                                                            <DocketList sessionData={this.state.sessionData} minutes={minutesList} dockets={docketList} formattedSessionCode={formattedSessionCode} committeeNumber={committeeData.CommitteeNumber} />\n                                                        </div>\n                                                        :\n                                                        <div className=\"list-desc\">\n                                                            <DocketList sessionData={this.state.sessionData} maxSize={3} minutes={minutesList} dockets={docketList} formattedSessionCode={formattedSessionCode} committeeNumber={committeeData.CommitteeNumber} />\n                                                        </div>\n                                                    }\n                                                </tbody>\n                                            </table>\n                                        </div>\n                                    }\n                                </div>\n                                {minutesList.length > 0 &&\n                                    <div>\n                                        <table className=\"line-table\">\n                                            <tbody className=\"toggle-table\">\n                                                {this.props.slideDockets\n                                                    ? <div className=\"list-desc\">\n                                                        <MinutesList minutes={minutesList} sessionCode={sessionData.SessionCode} committeeNumber={committeeData.CommitteeNumber} />\n                                                    </div>\n                                                    : <MinutesList minutes={minutesList.slice(0, 3)} sessionCode={sessionData.SessionCode} committeeNumber={committeeData.CommitteeNumber} />}\n                                            </tbody>\n                                        </table>\n                                    </div>\n                                }\n                            </React.Fragment>\n                        }\n                    </React.Fragment>\n                    :\n                    <div aria-label=\"Loading\" className=\"spinner\"></div>\n                }\n                {committeeData.CommitteeFiles && committeeData.CommitteeFiles.length > 0 &&\n                    <div className=\"details-section\">\n                        <p>\n                            {committeeData.CommitteeFiles.map((link, linkIndex) =>\n                                <a key={linkIndex} target=\"_blank\" href={link.FileURL}>{link.Description}</a>\n                            )}\n                        </p>\n                    </div>\n                }\n                {committeeData.ParentCommitteeID ? (\n                    <div className=\"details-section\">\n                        <h4>Subcommittee Legislation</h4>\n                        <p>\n                            <Link to={this.makeLink(3, false)} style={{ display: 'inline-block' }}>Assigned-To</Link><a onClick={() => this.toggleTooltip(ASSIGNED_TO)} className=\"button info\" style={{ display: 'inline-block' }}>Info</a>\n                            {this.state.showTooltip[ASSIGNED_TO] &&\n                                <div className=\"info-box committee-tooltip\">\n                                    <p>{ASSIGNED_TO}</p>\n                                </div>\n                            }\n                            <br />\n                            <Link to={this.makeLink(null, true)} style={{ display: 'inline-block' }}>Currently In</Link><a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(CURRENTLY_IN) }} className=\"button info\" style={{ display: 'inline-block' }}>Info</a>\n                            {this.state.showTooltip[CURRENTLY_IN] &&\n                                <div className=\"info-box committee-tooltip\">\n                                    <p>{renderHTML(CURRENTLY_IN)}</p>\n                                </div>\n                            }\n                        </p>\n                    </div>\n                ) : (\n                    <div className=\"details-section\">\n                        <h4>Committee Legislation</h4>\n                        <p>\n                            <Link to={this.makeLink(3, false)}>Referred</Link>\n                            <Link to={this.makeLink(null, true)}>In Committee</Link>\n                            <Link to={this.makeLink(null, true)}>In sub-committee</Link>\n                            <Link to={this.makeLink(5, false)}>Reported Out</Link>\n                            <Link to={this.makeLink(11, true)}>Continued</Link>\n                            <Link to={this.makeLink(12, false)}>Failed</Link>\n                        </p>\n                    </div>\n                )}\n                {subcommitteesList.length > 0 &&\n                    <div className=\"details-section\">\n                        <h4>Subcommittees</h4>\n                        <LoaderComponent data={this.state.subcommitteesIsLoaded} />\n                        <p>\n                            <SubCommitteesList parentCommitteeNumber={this.state.committeeNumber} sessionCode={this.props.match.params.sessioncode} committees={subcommitteesList} />\n                        </p>\n                    </div>\n                }\n            </div>\n        )\n    }\n}\n\nconst PublicCommitteeDetails = withRouter(connect(\n    (state) => {\n        const { committee, session, nav, calendar, minutes, members, login } = state;\n        return {\n            committee,\n            session,\n            nav,\n            calendar,\n            minutes,\n            members,\n            login\n        };\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, committeeActionCreators, sessionActionCreators, navActionCreators, calendarActionCreators, minutesActionCreators, memberActionCreators), dispatch)\n        };\n    }\n)(CommitteeDetailsComponent));\n\nexport default PublicCommitteeDetails;\n","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { Link } from 'react-router-dom';\nimport ReactToPrint from 'react-to-print';\nimport moment from 'moment-timezone';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { connect } from 'react-redux';\nimport LoaderComponent from '../../../lis-shared/lis-layout/components/lis-loader-component'\nimport { minutesActionCreators } from '../../../stores/lis-minutes-store';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport { voteActionCreators } from '../../../stores/lis-votes-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport striptags from 'striptags';\n\nconst MEETING = 1;\nconst CHAIRMANS_REPORT = 2;\nconst VOTE_SHEET = 3;\n\nconst Entry = props => {\n    return (\n        <React.Fragment>\n            <div className=\"inner-grid two-col-sidebar-backwards\">\n                <div>\n                    <Link to={`/bill-details/${props.session.SessionCode}/${props.entry.LegislationNumber}`}>{props.entry.LegislationNumber}</Link>\n                </div>\n                <div>\n                    <b>{props.entry.LegislationDescription}</b>\n                    {props.entry.MinutesActivities && props.entry.MinutesActivities.filter(ma => !ma.DeletionDate).map((activity, index) =>\n                        <ul key={index} style={{ marginLeft: '1em' }}>\n                            {(activity.VoteIsPublic || props.senateUser) && <li>{activity.VoteID &&\n                                <Link to={`/vote-details/${props.entry.LegislationNumber}/${props.session.SessionCode}/${activity.VoteNumber}`}>{activity.Description}</Link>\n                            }</li>}\n                        </ul>\n                    )}\n                </div>\n            </div>\n            <br />\n        </React.Fragment>\n    );\n}\n\nclass PublicMeetingDetails extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            session: '',\n            minutesBook: '',\n            committee: '',\n            isLoaded: false,\n            subformIsLoaded: true,\n            view: parseInt(this.props.match.params.view),\n            chairmanReport: [],\n            voteSheet: []\n        }\n        this.setView = this.setView.bind(this);\n        this.toggleMeetingStatus = this.toggleMeetingStatus.bind(this);\n    }\n\n    setView(view) {\n        this.setState({ view, subformIsLoaded: false }, () => {\n            if (this.state.view === CHAIRMANS_REPORT && this.state.chairmanReport.length === 0) {\n                let chairmanReport = [...this.state.chairmanReport];\n                this.props.actions.getChairReport(this.state.minutesBook.MinutesBookID).then(() => {\n                    chairmanReport = this.props.minutes.chairReport.ChairmansCategory;\n                    this.setState({ chairmanReport, subformIsLoaded: true })\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.error(err);\n                    this.setState({ subformIsLoaded: true })\n                });\n            } else if (this.state.view === VOTE_SHEET && this.state.voteSheet.length === 0) {\n                let voteSheet = [...this.state.voteSheet];\n                this.state.minutesBook.MinutesCategories.forEach(category => {\n                    category.MinutesEntries.forEach(entry => {\n                        entry.MinutesActivities.filter(ma => !ma.DeletionDate).forEach(activity => {\n                            if (activity.VoteID) {\n                                voteSheet.push({\n                                    LegislationNumber: entry.LegislationNumber,\n                                    LegislationID: entry.LegislationID,\n                                    VoteID: activity.VoteID\n                                });\n                            }\n                        });\n                    });\n                });\n\n                if (voteSheet.length) {\n                    this.getVoteSheetData(voteSheet).then((res) => {\n                        this.setState({ voteSheet: res || [], subformIsLoaded: true })\n                    });\n                } else {\n                    this.setState({ voteSheet: [], subformIsLoaded: true })\n                }\n            } else {\n                this.setState({ subformIsLoaded: true })\n            }\n        });\n    }\n\n    getBillDetailData(voteSheet) {\n        return this.props.actions.getBillListByIds({ \"LegislationIds\": voteSheet.map(v => ({ LegislationID: v.LegislationID, SessionID: this.state.minutesBook.SessionID })) });\n    }\n\n    getVoteDetailData(voteSheet) {\n        return this.props.actions.getVoteDetails('?' + voteSheet.map((v, i) => 'voteIDs=' + v.VoteID + (i !== voteSheet.length - 1 ? '&' : '')).join(''), true);\n    }\n\n    async getVoteSheetData(voteSheet) {\n        return await Promise.all([this.getBillDetailData(voteSheet), this.getVoteDetailData(voteSheet)]).then(() => {\n            const voteData = this.props.votes.voteDetailsResponse;\n            voteData.forEach(vote => {\n                const voteIndex = voteSheet.findIndex(v => v.VoteID === vote.VoteID);\n                let voteDetails = voteSheet[voteIndex];\n\n                voteDetails = { ...vote, ...voteDetails };\n                voteDetails.memberYeas = vote.VoteMember.filter(nObj => nObj.ResponseCode === 'Y');\n                voteDetails.memberNays = vote.VoteMember.filter(nObj => nObj.ResponseCode === 'N');\n                voteDetails.memberAbstentions = vote.VoteMember.filter(nObj => nObj.ResponseCode === 'A');\n                voteDetails.memberNoVote = vote.VoteMember.filter(nObj => nObj.ResponseCode === 'X');\n                voteDetails.voteStatements = vote.VoteMember.filter(member => member.VoteStatement);\n                // Abstentions appear as rule 36 on senate floor tally sheets\n                if (vote.ChamberCode === \"S\" && vote.VoteType === \"Floor\") {\n                    voteDetails.memberRule36 = vote.VoteMember.filter(nObj => nObj.ResponseCode === 'A');\n                } else {\n                    voteDetails.memberRule36 = vote.VoteMember.filter(nObj => nObj.ResponseCode === 'R');\n                }\n                voteSheet[voteIndex] = voteDetails;\n            });\n\n            //if a vote didn't get returned in the request, fill out some of the data to prevent NREs\n            voteSheet.filter(v => !voteData.find(vote => vote.VoteID === v.VoteID)).forEach(voteDetails => {\n                voteDetails.memberYeas = [];\n                voteDetails.memberNays = [];\n                voteDetails.memberAbstentions = [];\n                voteDetails.memberNoVote = [];\n                voteDetails.voteStatements = [];\n                voteDetails.memberRule36 = [];\n            });\n\n            const billData = [...this.props.bills.billListByIds];\n            billData.forEach(bill => {\n                voteSheet.forEach((v, i) => {\n                    if (v.LegislationID === bill.LegislationID) {\n                        voteSheet[i] = { ...v, ...bill };\n\n                        if (!voteSheet[i].VoteMember && voteSheet.find(x => x.VoteID === v.VoteID && x.VoteMember && x.VoteMember.length > 0)) {\n                            voteSheet[i].VoteMember = voteSheet.find(x => x.VoteID === v.VoteID && x.VoteMember && x.VoteMember.length > 0).VoteMember;\n                            voteSheet[i].memberYeas = voteSheet.find(x => x.VoteID === v.VoteID && x.VoteMember && x.VoteMember.length > 0).memberYeas;\n                            voteSheet[i].memberNays = voteSheet.find(x => x.VoteID === v.VoteID && x.VoteMember && x.VoteMember.length > 0).memberNays;\n                            voteSheet[i].memberAbstentions = voteSheet.find(x => x.VoteID === v.VoteID && x.VoteMember && x.VoteMember.length > 0).memberAbstentions;\n                            voteSheet[i].memberNoVote = voteSheet.find(x => x.VoteID === v.VoteID && x.VoteMember && x.VoteMember.length > 0).memberNoVote;\n                            voteSheet[i].voteStatements = voteSheet.find(x => x.VoteID === v.VoteID && x.VoteMember && x.VoteMember.length > 0).voteStatements\n                            voteSheet[i].memberRule36 = voteSheet.find(x => x.VoteID === v.VoteID && x.VoteMember && x.VoteMember.length > 0).memberRule36;\n                            voteSheet[i].LegislationActionDescription = !voteSheet[i].LegislationActionDescription ? voteSheet.find(x => x.VoteID === v.VoteID).LegislationActionDescription : voteSheet[i].LegislationActionDescription;\n                        }\n                    }\n                });\n            });\n            return voteSheet;\n        }).catch(err => {\n            console.error(err)\n        });\n    }\n\n    toggleMeetingStatus() {\n        let minutes = { ...this.state.minutesBook }\n        if (minutes.MinutesStatusID === 4) {\n            minutes.MinutesStatusID = 2;\n        } else {\n            minutes.MinutesStatusID = 4\n        }\n\n        this.props.actions.saveMinutesBook(minutes)\n            .then(() => {\n                const minutesBookId = this.props.match.params.meetingid;\n                const committee = this.props.match.params.committeenumber;\n                this.getMinutesBook(minutesBookId, committee);\n            })\n    }\n\n    getMinutesBook(minutesBookId, committee) {\n        this.props.actions.getMinutesBook('?minutesbookID=' + minutesBookId, (this.props.login.userClaims.roles.find(role => role === \"SenateCommitteeReportReader\") ? true : false))\n            .then(() => {\n                if (this.props.minutes.minutesBook) {\n                    const minutesBook = { ...this.props.minutes.minutesBook }\n                    this.setState({\n                        minutesBook: minutesBook,\n                    }, () => {\n                        this.setView(this.state.view);\n                        this.props.actions.getSessionById(this.state.minutesBook.SessionID)\n                            .then(() => {\n                                this.setState({\n                                    session: this.props.session.selectedSession\n                                }, () => {\n                                    this.props.actions.getCommitteeByNumber(\"?committeeNumber=\" + committee + \"&effectiveDate=\" + moment(this.state.minutesBook.MinutesDate).format(\"MM/DD/YYYY\") + \"&sessionId=\" + this.props.session.selectedSession.SessionID)\n                                        .then(() => {\n                                            this.setState({\n                                                committee: this.props.committee.committeeByNumberData,\n                                                isLoaded: true\n                                            }, () => {\n                                                if (this.state.committee.ParentCommitteeID) {\n                                                    const sessionStartObj = this.props.session.selectedSession.SessionEvents && this.props.session.selectedSession.SessionEvents.length && this.props.session.selectedSession.SessionEvents.find(date => date.DisplayName === \"Session Start\");\n                                                    const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate).format(\"MM/DD/YYYY\") : '';\n                                                    this.props.actions.getCommitteeById(\"?id=\" + this.state.committee.ParentCommitteeID + \"&effectiveDate=\" + moment(startDate).format(\"MM/DD/YYYY\") + \"&sessionId=\" + this.props.session.selectedSession.SessionID)\n                                                        .then(() => {\n                                                            this.setState({\n                                                                parentCommittee: this.props.committee.committeeByIdData\n                                                            })\n                                                        })\n                                                }\n                                            });\n                                        });\n                                });\n                            });\n                    });\n                }\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n            });\n    }\n\n    componentDidMount() {\n        window.scrollTo(0, 0);\n        const minutesBookId = this.props.match.params.meetingid;\n        const committee = this.props.match.params.committeenumber;\n        this.getMinutesBook(minutesBookId, committee)\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        if (this.state.isLoaded) {\n            const { chairmanReport, voteSheet } = this.state;\n            // Chairman reports are a formatted minutes book that only contains entries that have been completed.\n            // The organization is how they were completed (e.g. Reported Without Amendment) followed by the list of bills that share the same completion type\n            // An example:\n            /* \n            REPORTED WITHOUT AMENDMENT:\n            SB44, SB112, SB186, SB238 \n            */\n            const sessionHeader = this.state.session.SessionYear + \" \" + this.state.session.DisplayName;\n            //Find the minutes calendar if it exists\n            let calendar = '';\n            if (this.state.minutesBook.MinutesCalendars && this.state.minutesBook.MinutesCalendars.length > 0) {\n                calendar = this.state.minutesBook.MinutesCalendars[0].CalendarID;\n            }\n            return (<div className='generic-details-page meetings-details-page'>\n                <div className=\"flex-row \">\n                    <br />\n                    <div style={{ display: \"grid\", gridTemplateColumns: \"1fr 8fr 1fr 1fr 1fr 1fr\", marginTop: \"10px\" }}>\n                        {this.props.login.userClaims.roles.find(role => role === \"SenateCommitteeReportReader\") ?\n                            <React.Fragment>\n                                <button type=\"button\" className=\"button primary\" onClick={() => this.toggleMeetingStatus()}>{(this.state.minutesBook.MinutesStatusID === 4 ? \"Open\" : \"Close\") + \" Meeting\"}</button>\n                                <label style={{ marginLeft: \"10px\" }}>Meeting Status: <span className={this.state.minutesBook.MinutesStatusID === 4 ? \"fail\" : \"txt-green\"}>{this.state.minutesBook.MinutesStatusID === 4 ? \"Closed\" : \"Open\"}</span></label>\n                                <button type=\"button\" className=\"button meetings-page-toggle\" aria-current={this.state.view === MEETING} onClick={() => this.setView(MEETING)}>Meeting View</button>\n                                <button type=\"button\" className=\"button meetings-page-toggle\" aria-current={this.state.view === CHAIRMANS_REPORT} onClick={() => this.setView(CHAIRMANS_REPORT)}>Chair's Report</button>\n                                {this.state.committee.ChamberCode === \"S\" && <button type=\"button\" className=\"button meetings-page-toggle\" aria-current={this.state.view === VOTE_SHEET} onClick={() => this.setView(VOTE_SHEET)}>Vote Sheet</button>}\n                            </React.Fragment>\n                            : <>\n                                <div />\n                                <div />\n                                <div />\n                                <div />\n                                <div />\n                            </>}\n                        <ReactToPrint\n                            trigger={() => <button type=\"button\" className=\"button print\"> Print</button>}\n                            content={() => this.componentRef}\n                        />\n                    </div>\n                </div>\n                {this.state.subformIsLoaded ?\n                    <div className=\"bill-theme public-details inner-grid\" ref={el => (this.componentRef = el)}>\n                        {this.state.view === MEETING &&\n                            <div>\n                                <div>\n                                    <h2>{sessionHeader}</h2>\n                                </div>\n                                <div>\n                                    <h3>{(\n                                        this.state.committee.ChamberCode === \"H\"\n                                            ? \"House Committee \"\n                                            : \"Senate Committee \") +\n                                        (this.state.parentCommittee\n                                            ? this.state.parentCommittee.Name === \"Judiciary\"\n                                                ? \"on the \" + this.state.parentCommittee.Name\n                                                : this.state.parentCommittee.Name === \"Courts of Justice\"\n                                                    ? \"for \" + this.state.parentCommittee.Name\n                                                    : \"on \" + this.state.parentCommittee.Name\n                                            : this.state.committee.Name\n                                                ? this.state.committee.Name === \"Judiciary\"\n                                                    ? \"on the \" + this.state.committee.Name\n                                                    : this.state.committee.Name === \"Courts of Justice\"\n                                                        ? \"for \" + this.state.committee.Name\n                                                        : \"on \" + this.state.committee.Name\n                                                : this.state.minutesBook.CommitteeName === \"Judiciary\"\n                                                    ? \"on the \" + this.state.minutesBook.CommitteeName\n                                                    : this.state.minutesBook.CommitteeName === \"Courts of Justice\"\n                                                        ? \"for \" + this.state.minutesBook.CommitteeName\n                                                        : \"on \" + this.state.minutesBook.CommitteeName\n                                        )\n                                    }</h3>\n                                    {this.state.parentCommittee &&\n                                        <h3>{\"Subcommittee on \" + this.state.committee.Name}</h3>\n                                    }\n                                </div>\n                                <hr />\n                                <div>\n                                    <div className=\"parent-li\">\n                                        <h4>\n                                            {moment(this.state.minutesBook.MinutesDate).format(\"MMMM D[,] YYYY\")}\n                                            {calendar && <Link to={`/session-details/${this.props.session.selectedSession.SessionCode}/committee-information/${this.state.committee.CommitteeNumber}/dockets/${calendar}`} style={{ marginLeft: \"1em\" }}>View Docket</Link>}\n                                        </h4>\n                                    </div>\n                                </div>\n                                <br />\n                                {this.state.minutesBook.MinutesCategories.map((category, catIndex) =>\n                                    <div key={catIndex}>\n                                        {category.MinutesEntries && category.MinutesEntries.map((entry, entIndex) =>\n                                            <Entry key={entIndex} entry={entry} session={this.state.session} senateUser={this.props.login.userClaims.scopes.find(x => x === \"Senate\") ? true : false} />\n                                        )}\n                                    </div>\n                                )}\n                            </div>\n                        }\n                        {this.state.view === CHAIRMANS_REPORT &&\n                            <React.Fragment>\n                                <br />\n                                <div>\n                                    <span style={{ float: \"right\", fontSize: '20px' }}>{moment(this.state.minutesBook.MinutesDate).format(\"MMMM D[,] YYYY\")}</span>\n                                </div>\n                                <div className=\"center\">\n                                    <span className=\"chair-report-header\">Chair's Report</span>\n                                </div>\n                                <div style={{ margin: \"15px 0 25px\", fontSize: '20px' }}>\n                                    <span>The committee on </span> <b>{this.state.committee ? this.state.committee.Name : this.state.minutesBook.CommitteeName}</b> <span>reports the following:</span>\n                                </div>\n                                <div>\n                                    {chairmanReport.sort((a, b) => a.Sequence - b.Sequence).map((action, actionIndex) =>\n                                        <div key={actionIndex}>\n                                            <div>\n                                                <p className=\"chair-report-category\">{action.CategoryDescription && action.CategoryDescription.endsWith(':') ? action.CategoryDescription.toUpperCase() : action.CategoryDescription && action.CategoryDescription.toUpperCase() + \":\"}</p>\n                                            </div>\n                                            <p className=\"chair-report-bills\">\n                                                {action.ChairmansLegislation.map((bill, billIndex) => {\n                                                    let formattedBill = !bill.ReferToCommitteeName && billIndex != action.ChairmansLegislation.length - 1 ? bill.LegislationNumber + \", \" : bill.LegislationNumber\n                                                    return (\n                                                        <React.Fragment>\n                                                            <b key={billIndex}>{formattedBill}{bill.ReferToCommitteeName && (\" to Committee \" + (bill.ReferToCommitteeName === \"Judiciary\" ? \"on the \" : bill.ReferToCommitteeName === \"Courts of Justice\" ? \"for \" : \"on \") + bill.ReferToCommitteeName)}</b>\n                                                            {bill.ReferToCommitteeName && <br />}\n                                                        </React.Fragment>\n                                                    )\n                                                })\n                                                }\n                                            </p>\n                                            <br />\n                                        </div>\n                                    )}\n                                </div>\n                            </React.Fragment>\n                        }\n                        {this.state.view === VOTE_SHEET &&\n                            <div id=\"vote-sheet-container\">\n                                {voteSheet.map((action, actionIndex) => {\n                                    let legNumber = action.LegislationNumber;\n                                    //Add dots in between the characters because that is how they want it displayed\n                                    const billType = legNumber.slice(0, 2);\n                                    const numbers = legNumber.slice(2);\n                                    legNumber = billType.split('').map(char => {\n                                        char += '.'\n                                        // Senate Joint and House Joint Resolutions are displayed as 'H.J.R.' and 'S.J.R.' on this page rather than 'HJ' and 'SJ'\n                                        // If the bill has a 'J' in the bill number then it is a joint resolution\n                                        if (char === 'J.') {\n                                            char += 'R.'\n                                        }\n                                        return char;\n                                    }).join('');\n                                    legNumber += ' ' + numbers;\n\n                                    return (\n                                        <div key={actionIndex}>\n                                            <br />\n                                            <div>\n                                                <p className=\"vote-sheet-header\">\n                                                    <span>{this.state.session.SessionYear} - {this.state.session.SessionCode.substring(4)}</span>\n                                                    <span>Senate of Virginia  - Committee Voting System</span>\n                                                    <span>{moment().format(\"MM/DD/YY HH:mm\")}</span>\n                                                </p>\n                                            </div>\n                                            <div>\n                                                <p>Committee on {this.state.committee ? this.state.committee.Name : this.state.minutesBook.CommitteeName}</p>\n                                            </div>\n                                            <div>\n                                                <p><b>{legNumber.toUpperCase()}</b><span className=\"ldtitle\">{striptags(action.LegislationTitle)}</span></p>\n                                            </div>\n                                            {action.Patrons &&\n                                                <p>{action.Patrons.length > 1 ? \"Patrons--\" : \"Patron--\"}\n                                                    {action.Patrons.map((patron, patronIndex) => {\n                                                        let patronString = '';\n                                                        if (action.Patrons[patronIndex + 1] && action.Patrons[patronIndex + 1].ChamberCode !== action.ChamberCode && action.Patrons[patronIndex].ChamberCode === action.ChamberCode) {\n                                                            patronString = (patronIndex !== 0 ? \" and \" : \"\") + patron.PatronDisplayName + (action.ChamberCode === \"H\" ? patronIndex + 2 === action.Patrons.length ? \"; Senator: \" : \"; Senators: \" : patronIndex + 2 === action.Patrons.length ? \"; Delegate: \" : \"; Delegates: \");\n                                                        } else if (patronIndex + 1 === action.Patrons.length && action.Patrons.length > 1 && action.Patrons[patronIndex].ChamberCode === action.Patrons[patronIndex - 1].ChamberCode) {\n                                                            patronString = \" and \" + patron.PatronDisplayName;\n                                                        } else if (patronIndex != 0 && action.Patrons[patronIndex - 1].ChamberCode === action.Patrons[patronIndex].ChamberCode) {\n                                                            patronString = \", \" + patron.PatronDisplayName;\n                                                        } else {\n                                                            patronString = patron.PatronDisplayName\n                                                        }\n                                                        return (<React.Fragment key={patronIndex}>{patronString}{patron.ByRequest ? ' (By Request)' : null}</React.Fragment>)\n                                                    })}\n                                                </p>\n                                            }\n                                            <p><b>{action.LegislationActionDescription}</b></p>\n                                            <p>\n                                                YEAS--\n                                                {action.memberYeas && action.memberYeas.map((item, index) => (\n                                                    <span key={index}>{item.PatronDisplayName}{action.memberYeas.length === index + 1 ? '--' : ', '}</span>\n                                                ))}\n                                                {action.memberYeas && action.memberYeas.length}.\n                                            </p>\n                                            <p>\n                                                NAYS--\n                                                {action.memberNays && action.memberNays.map((item, index) => (\n                                                    <span key={index}>{item.PatronDisplayName}{action.memberNays.length === index + 1 ? '--' : ', '}</span>\n                                                ))}\n                                                {action.memberNays && action.memberNays.length}.\n                                            </p>\n                                            <p>\n                                                {(action.VoteType === \"Floor\" && action.ChamberCode === \"S\") ? \"RULE 36--\" : \"ABSTENTIONS--\"}\n                                                {action.memberAbstentions && action.memberAbstentions.map((item, index) => (\n                                                    <span key={index}>{item.PatronDisplayName}{action.memberAbstentions.length === index + 1 ? '--' : ', '}</span>\n                                                ))}\n                                                {action.memberAbstentions && action.memberAbstentions.length}.\n                                            </p>\n                                            <p>(vote sequence: {action.VoteNumber}, {moment(action.VoteDate).format(\"MM/DD/YY HH.mm\")})</p>\n                                            <br />\n                                            <footer />\n                                        </div>\n                                    )\n                                })}\n                            </div>\n                        }\n                    </div>\n                    :\n                    <LoaderComponent data={this.state.subformIsLoaded} />\n                }\n            </div>\n            );\n        }\n        else {\n            return (<LoaderComponent data={this.state.isLoaded} />);\n        }\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { bills, committee, session, minutes, login, votes } = state;\n        return {\n            bills,\n            committee,\n            session,\n            minutes,\n            login,\n            votes\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, committeeActionCreators, sessionActionCreators, minutesActionCreators, authActionCreators, voteActionCreators), dispatch)\n        }\n    }\n)(PublicMeetingDetails)","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport DocketDetailsComponent from '../../../lis-shared/lis-dockets/lis-docket-details';\nimport ReactToPrint from 'react-to-print';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { calendarActionCreators } from '../../../stores/lis-calendar-store';\nimport { connect } from 'react-redux';\nimport { cancelRequest } from '../../../services/request.service';\nimport LoaderComponent from '../../../lis-shared/lis-layout/components/lis-loader-component'\nimport renderHTML from 'react-render-html';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\nclass PublicDocketDetails extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            data: '',\n            selectedSession: '',\n            categories: '',\n            hideClerk: false,\n            hideStaff: false,\n            hidePatron: false,\n            hideSummary: false,\n            hideTitle: false,\n            hideLDNumber: false,\n            hideCaption: false\n        }\n    }\n\n    componentDidMount() {\n        window.scrollTo(0, 0);\n        //Imporant to make sure that things load in the correct order. \n        //First I get the docket data, then I get the session data (for the printoff header), followed by the room references (to display the VoteRoomID's name)\n        const docketId = this.props.match.params.docketid;\n        let committeeNumber = this.props.match.params.committeenumber;\n        const chamberCode = this.props.match.url.includes(\"dockets\") ? \"S\" : \"H\"\n        const params = '?docketId=' + docketId\n        this.props.actions.getDocketById(params, false, chamberCode)\n            .then(() => {\n                if (this.props.calendar.docketByIdData) {\n                    const data = this.props.calendar.docketByIdData;\n                    // Just in case that the committee number is not in the url\n                    if (!committeeNumber) {\n                        this.props.history.push(`/session-details/${data.SessionCode}/committee-information/${data.CommitteeNumber}/dockets/${data.DocketID}`);\n                    }\n                    this.props.actions.getSessionById(data.SessionID)\n                        .then(() => {\n                            this.setState({\n                                selectedSession: this.props.session.selectedSession,\n                                sessionIsLoaded: true\n                            }, () => {\n                                const htmlFile = this.props.calendar.docketByIdData.DocketFiles.find(file => file.FileURL.toUpperCase().includes('.HTM'));\n                                if (htmlFile && !this.state.selectedSession.IsActive && !data.Schedules?.length) {\n                                    this.props.actions.getFile(htmlFile.FileURL)\n                                        .then(() => {\n                                            let html = this.props.nav.file;\n                                            if (html) {\n                                                html = html.replaceAll('href=\"#', 'href=\"' + window.location.pathname + \"#\")\n                                            }\n                                            this.setState({\n                                                docketFile: html,\n                                                dataIsLoaded: true\n                                            });\n                                        }).catch(err => {\n                                            if (err !== 'Aborted') {\n                                                this.setState({\n                                                    dataIsLoaded: true,\n                                                    message: \"Failed to get HTML file\"\n                                                });\n                                                console.error(err);\n                                            }\n                                        });\n                                } else {\n                                    const categories = data.DocketCategories || data.HouseAgendaCategories;\n\n                                    for (let i = 0; i < data.CalendarDisplay.length; i++) {\n                                        switch (data.CalendarDisplay[i].DisplayColumn) {\n                                            case (\"Staffs Name\"):\n                                                this.setState({\n                                                    hideClerk: !data.CalendarDisplay[i].IsDisplayed\n                                                });\n                                                break;\n                                            case (\"Clerk Name\"):\n                                                this.setState({\n                                                    hideStaff: !data.CalendarDisplay[i].IsDisplayed\n                                                });\n                                                break;\n                                            case (\"Chief Patron\"):\n                                                this.setState({\n                                                    hidePatron: !data.CalendarDisplay[i].IsDisplayed\n                                                });\n                                                break;\n                                            case (\"Summary\"):\n                                                this.setState({\n                                                    hideSummary: !data.CalendarDisplay[i].IsDisplayed\n                                                });\n                                                break;\n                                            case (\"Title\"):\n                                                this.setState({\n                                                    hideTitle: !data.CalendarDisplay[i].IsDisplayed\n                                                });\n                                                break;\n                                            case (\"LD Number\"):\n                                                this.setState({\n                                                    hideLDNumber: !data.CalendarDisplay[i].IsDisplayed\n                                                });\n                                                break;\n                                            case (\"Caption\"):\n                                                this.setState({\n                                                    hideCaption: !data.CalendarDisplay[i].IsDisplayed\n                                                });\n                                                break;\n                                            default:\n                                                break;\n                                        }\n                                    }\n                                    this.setState({\n                                        data: data,\n                                        categories: categories,\n                                        dataIsLoaded: true\n                                    });\n                                }\n                            });\n                        }).catch(err => {\n                            if (err !== 'Aborted') {\n                                this.setState({\n                                    dataIsLoaded: true,\n                                    message: \"Failed to get HTML file\"\n                                });\n                                console.error(err);\n                            }\n                        });\n                } else {\n                    this.setState({\n                        dataIsLoaded: true,\n                        message: \"No docket data found\"\n                    });\n                }\n            }).catch(err => {\n                if (err !== 'Aborted') {\n                    this.setState({\n                        dataIsLoaded: true,\n                        message: \"No docket data found\"\n                    });\n                    console.error(err);\n                }\n            });\n    }\n\n    removeZeros(doc) {\n        let dom = document.createElement('div');\n        dom.innerHTML = doc;\n\n        let all = document.getElementsByTagName(\"*\");\n\n        for (let i = 0; i < all.length; i++) {\n            let trimmedUrl = \"\"\n            //If it's an href with a bill or resolution number in it then slice off the end, remove the zeros, and append it back to the href\n            if (all[i].href && all[i].href != \"\" && all[i].href.match(/[H|S][B|J|R][0-9]{4}/)) {\n                trimmedUrl = all[i].href.slice(all[i].href.length - 7, all[i].href.length - 1)\n                trimmedUrl = trimmedUrl.slice(0, 2) + parseInt(trimmedUrl.slice(2))\n                all[i].href = all[i].href.slice(0, all[i].href.length - 7) + trimmedUrl + \"/\";\n            }\n        }\n\n        return doc;\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        if (this.state.message) {\n            return (<div className=\"center\">{this.state.message}</div>)\n        }\n        if (this.state.docketFile) {\n            return (\n                <div className='details-page-data-container'>\n                    {renderHTML(this.removeZeros(this.state.docketFile))}\n                </div>\n            );\n        }\n        if (this.state.dataIsLoaded && this.state.sessionIsLoaded) {\n            return (\n                <div className='generic-details-page docket-details-page'>\n                    <div className=\"flex-row\">\n                        <br />\n                        <ReactToPrint\n                            trigger={() => <button type=\"button\" className=\"button print\"> Print</button>}\n                            content={() => this.componentRef}\n                            pageStyle={\"break-inside: avoid\"}\n                        />\n                    </div>\n                    <div ref={el => (this.componentRef = el)}>\n                        <DocketDetailsComponent\n                            data={this.state.data}\n                            dockets={this.state.categories}\n                            session={this.state.selectedSession}\n                            hideClerk={this.state.hideClerk}\n                            hideStaff={this.state.hideStaff}\n                            hidePatron={this.state.hidePatron}\n                            hideSummary={this.state.hideSummary}\n                            hideTitle={this.state.hideTitle}\n                            hideLDNumber={this.state.hideLDNumber}\n                            hideCaption={this.state.hideCaption}\n                        />\n                    </div>\n                </div>\n            );\n        } else {\n            return (<LoaderComponent data={false} />)\n        }\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, session, calendar } = state;\n        return {\n            nav,\n            session,\n            calendar\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, sessionActionCreators, calendarActionCreators), dispatch)\n        }\n    }\n)(PublicDocketDetails)","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport PublicCommitteeList from './lis-public-committee-list';\nimport PublicCommitteeDetails from './lis-public-committee-details';\nimport PublicMeetingDetails from './lis-public-meeting-details';\nimport PublicDocketDetails from './lis-public-docket-details';\nimport { Route } from 'react-router';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\n\nclass CommitteeInformationComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            slideDockets: false,\n        }\n\n        this.toggleShowData = this.toggleShowData.bind(this);\n    }\n\n    toggleShowData(slide) {\n        this.setState(prevState => ({\n            [slide]: !prevState[slide]\n        }));\n    }\n\n    render() {\n        return             <div>\n        <Route exact path={this.props.match.path} render={props => <PublicCommitteeList {...props} />} />\n        <Route path='/session-details/:sessioncode/committee-information/:committeenumber/committee-details' render={props => <PublicCommitteeDetails {...props} slideDockets={this.state.slideDockets} toggleShowData={this.toggleShowData} />} />\n        <Route path='/session-details/:sessioncode/committee-information/:committeenumber/meetings/:meetingid/:view' component={PublicMeetingDetails} />\n        <Route path='/session-details/:sessioncode/committee-information/:committeenumber/dockets/:docketid' component={PublicDocketDetails} />\n        <Route path='/session-details/:sessioncode/committee-information/:committeenumber/agendas/:docketid' component={PublicDocketDetails} />\n    </div>\n\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { committee, members, session, nav } = state;\n        return {\n            committee,\n            members,\n            session,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, committeeActionCreators, memberActionCreators, sessionActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(CommitteeInformationComponent)\n\n","import React from 'react';\nimport moment from 'moment-timezone';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { memberActionCreators } from '../../stores/lis-members-store';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { patronActionCreators } from '../../stores/lis-patron-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { cancelRequest } from '../../services/request.service';\n\n\nclass MemberInfoComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {};\n        this.toggleShowData = this.toggleShowData.bind(this);\n    }\n\n    toggleShowData(memberID) {\n        this.setState(prevState => ({\n            [memberID]: !prevState[memberID]\n        }));\n    }\n\n    render() {\n        const { member, sessionData, patronRoles } = this.props;\n        const prefileEvent = sessionData ? sessionData.SessionEvents.find(event => event.DisplayName === 'Prefile Date') : '';\n        const closingEvent = sessionData ? sessionData.SessionEvents.find(event => event.DisplayName === 'Closing') : '';\n        const startDate = prefileEvent ? moment(prefileEvent.ActualDate) : '';\n        const endDate = closingEvent ? moment(closingEvent.ActualDate) : moment();\n        const memberDetails = (member, startDate, endDate) => {\n            let detailString = '';\n            if (member.ServiceEndDate && moment(member.ServiceEndDate).isAfter(startDate) && moment(member.ServiceEndDate).isBefore(endDate) && member.ServiceEndReason) {\n                detailString = detailString ? detailString + ', ' : '(';\n                detailString += member.ServiceEndReason;\n            }\n            if (detailString) detailString += ')';\n            if (member.MemberStatus === \"Elect\") detailString += \"(Elect)\";\n            return <React.Fragment>{detailString}</React.Fragment>;\n        }\n        const info = member.ContactInformation.map(contact => {\n            return (\n                <p>{contact.Address1}, {member.RoomNumber}<br />\n                    {contact.Address2}, {contact.City}, {contact.StateCode} {contact.ZipCode}<br />\n                    {contact.PhoneNumber}<br />\n                    {contact.EmailAddress &&\n                        <span>email: {contact.EmailAddress}</span>\n                    }\n                </p>\n            );\n        });\n        return (\n            <div className={this.state[member.MemberNumber] ? 'parent-li slidedown-open' : 'parent-li slidedown-closed'}>\n                <div className=\"toggle-row\">\n                    <div>\n                        <Link to={`/session-details/${sessionData.SessionCode}/member-information/${member.MemberNumber}/member-details`}>{member.MemberDisplayName}</Link>\n                        <span className=\"txt-greyed\">{memberDetails(member, startDate, endDate)}</span>\n                    </div>\n                    <div className=\"button-container\">\n                        <button aria-expanded={!!this.state[member.MemberNumber]} className=\"arrow-down\" onClick={this.toggleShowData.bind(this, member.MemberNumber)}>More info</button>\n                    </div>\n                </div>\n                {this.state[member.MemberNumber] &&\n                    <div className=\"list-desc\">\n                        <p>{member.PartyName} / {member.Chamber} - {member.DistrictName} District</p>\n                        {info}\n                    </div>\n                }\n                <div className=\"list-links\">\n                    {/* Search for member's legislation by all patron roles except Sponsor */}\n                    <Link to={'/bill-search/?q=' + window.btoa(JSON.stringify({ \n                        selectedPatron: member.MemberID,\n                        selectedSession: sessionData.SessionCode,\n                        chamberCode: member.ChamberCode,\n                        selectedPatronType: [1]\n                     }))} style={{ pointerEvents: patronRoles && patronRoles.length ? null : 'none' }}>Legislation</Link>\n                    <Link to={`/vote-search/${sessionData.SessionCode}/${member.MemberNumber}`}>Votes</Link>\n                </div>\n            </div>\n        )\n    }\n}\n\n\nclass MemberInformationComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            sessionData: [],\n            houseMembers: [],\n            senateMembers: [],\n            value: \"\",\n            showHouseChamber: true,\n            showSenateChamber: true\n        };\n        this.getMembersLists = this.getMembersLists.bind(this);\n        this.toggleChamber = this.toggleChamber.bind(this);\n        this.setupPage = this.setupPage.bind(this);\n    }\n\n    getMembersLists(sessionData, chamberCode, listName) {\n        var params = 'sessionID=' + sessionData.SessionID + '&chamberCode=' + chamberCode + '&contactTypeID=8'\n\n        this.props.actions.getMemberContact(params).then(() =>\n            this.setState({\n                [listName]: this.props.members.memberContactData,\n                [listName + 'IsLoaded']: true\n            })\n        )\n    }\n\n    toggleChamber(chamber) {\n        this.setState(state => ({\n            [chamber]: !state[chamber]\n        }));\n    }\n\n    componentDidMount() {\n        //Update the session selector component, which will run componentDidUpdate and call setupPage on its own\n        const sessionCode = this.props.match.params.sessioncode\n        if (sessionCode) {\n            if (this.props.nav.session !== sessionCode) {\n                this.props.actions.changeSession(sessionCode);\n            } else {\n                this.setupPage(sessionCode);\n            }\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push('/session-details/' + this.props.nav.session + '/member-information')\n            this.setupPage(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            if (this.props.match.params.sessioncode) {\n                this.props.actions.changeSession(this.props.match.params.sessioncode);\n            }\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    setupPage(sessionCode) {\n        this.setState({\n            houseMembersIsLoaded: false,\n            senateMembersIsLoaded: false\n        })\n        this.props.actions.getSessionByCode(sessionCode).then(() => {\n            this.setState({\n                sessionData: this.props.session.selectedSession\n            });\n            this.getMembersLists(this.props.session.selectedSession, 'H', 'houseMembers')\n            this.getMembersLists(this.props.session.selectedSession, 'S', 'senateMembers')\n        });\n\n        this.props.actions.getPatronRoles()\n            .then(() => {\n                const patronRoles = [...this.props.patrons.patronRoles];\n                this.setState({\n                    patronRoles: patronRoles\n                });\n            });\n    }\n\n    render() {\n        const { sessionData, houseMembers, senateMembers, patronRoles } = this.state;\n        const listHouseMembers = houseMembers.map((member, i) =>\n            <MemberInfoComponent key={i} member={member} sessionData={sessionData} patronRoles={patronRoles} />\n        );\n        const listSenateMembers = senateMembers.map((member, i) =>\n            <MemberInfoComponent key={i} member={member} sessionData={sessionData} patronRoles={patronRoles} />\n        );\n\n        return (\n            <div className=\"public-chamber-data\">\n                <div>\n                    <h2>{sessionData.SessionYear} {sessionData.DisplayName}</h2>\n                </div>\n                <div id=\"chamber-vote-leg-links\">\n                    {/*TODO: Temporarily removing these links for historical data per User Story 13242*/}\n                    {sessionData.IsActive &&\n                        <>\n                            <Link to={`/session-details/${sessionData.SessionCode}/member-legislation/S`}>Senate Member Legislation</Link>\n                            <br />\n                            <Link to={`/session-details/${sessionData.SessionCode}/member-legislation/H`}>House Member Legislation</Link>\n                            <br />\n                        </>\n                    }\n                    <Link to={`/vote-search/${sessionData.SessionCode}`}>Member Vote Search</Link>\n                    <br />\n                    <a rel=\"noreferrer\" target=\"_blank\" href=\"https://whosmy.virginiageneralassembly.gov\">Who's My Legislator?</a>\n                </div>\n                <div className=\"public-list inner-grid two\">\n                    <div>\n                        <h3 role=\"button\" onClick={() => this.toggleChamber(\"showHouseChamber\")} aria-expanded={this.state.showHouseChamber} className={`chamber-name ${this.state.showHouseChamber ? \"opened\" : \"\"}`}>House Members</h3>\n                        {this.state.houseMembersIsLoaded ?\n                            <ul className=\"slidedown-list\">\n                                {this.state.showHouseChamber &&\n                                    <>\n                                        {listHouseMembers}\n                                    </>\n                                }\n                            </ul>\n                            :\n                            <div className=\"spinner\">Fetching results...</div>\n                        }\n                    </div>\n                    <div>\n                        <h3 role=\"button\" onClick={() => this.toggleChamber(\"showSenateChamber\")} aria-expanded={this.state.showSenateChamber} className={`chamber-name ${this.state.showSenateChamber ? \"opened\" : \"\"}`}>Senate Members</h3>\n                        {this.state.senateMembersIsLoaded ?\n                            <ul className=\"slidedown-list\">\n                                {this.state.showSenateChamber &&\n                                    <>\n                                        {listSenateMembers}\n                                    </>\n                                }\n                            </ul>\n                            :\n                            <div className=\"spinner\">Fetching results...</div>\n                        }\n                    </div>\n                </div>\n            </div>\n        )\n    }\n}\n\nconst PublicMemberInformation = connect(\n    (state) => {\n        const { members, session, patrons, nav } = state;\n        return {\n            members,\n            session,\n            patrons,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, memberActionCreators, sessionActionCreators, patronActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(MemberInformationComponent)\n\nexport default PublicMemberInformation;\n","import React from 'react';\nimport moment from 'moment-timezone';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { memberActionCreators } from '../../stores/lis-members-store';\nimport { committeeActionCreators } from '../../stores/lis-committee-store';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { patronActionCreators } from '../../stores/lis-patron-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\n\nimport { cancelRequest } from '../../services/request.service';\nimport jwtDecode from 'jwt-decode';\n\nfunction Committees(props) {\n    //Person doesn't have to be a member of the committee's subcommmittees so this check must be made\n    let subcommittees = [];\n    if (props.subcommittees && props.subcommittees.length > 0) {\n        subcommittees = props.subcommittees.sort((a, b) => a.Name.localeCompare(b.Name)).map(subcomm => {\n            return (\n                <li key={subcomm.CommitteeID}>\n                    <Link style={{ marginLeft: '1.5em' }} to={`/session-details/${props.session}/committee-information/${subcomm.CommitteeNumber}/committee-details`}>{subcomm.Name}</Link>\n                </li>\n            )\n        })\n    }\n    return (\n        <span>\n            <Link to={`/session-details/${props.session}/committee-information/${props.CommitteeNumber}/committee-details`}>{props.Name}</Link>\n            {subcommittees && subcommittees}\n        </span>\n    );\n}\n\nfunction CommitteeAssignments(props) {\n    const listCommittees = props.committees.sort((a, b) => a.Name.localeCompare(b.Name)).map((committee, i) => <Committees key={i} session={props.session} {...committee} />);\n    if (listCommittees.length === 0) {\n        return (<p className=\"small-text\">None</p>)\n    }\n    return <ul style={{ marginTop: \"0px\" }}>{listCommittees}</ul>;\n}\n\nconst PatronRoles = props => {\n    let roleLinks = []\n    props.roles.forEach((role, roleIndex) => {\n        if (role.Name === \"Budget Amendment Requests\") {\n            const sessionCode = props.sessionData.SessionCode[props.sessionData.SessionCode.length - 1]\n            //Need to get rid of leading zeros for the link to work on the budget site\n            const memberNumber = props.memberData.MemberNumber;\n            // The first char is the chamber. Need to get rid of that so parseInt doesn't return NaN. It will be added back later to make the member number without the leading zeros\n            const memberChamber = memberNumber[0];\n            const memberNumberWithoutChamber = memberNumber.substr(1);\n            const formattedMemberNumber = memberChamber + String(parseInt(memberNumberWithoutChamber, 10));\n\n            const link = `https://budget.lis.virginia.gov/mbramendment/${props.sessionData.SessionYear}/${sessionCode}/${formattedMemberNumber}/`\n            roleLinks.push(<a key={roleIndex} target=\"_blank\" href={link}>{role.Name}</a>)\n        } else {\n            //Add the link to the object\n            const link = {\n                selectedPatronType: [role.PatronTypeID],\n                selectedPatron: props.memberData.MemberID,\n                selectedSession: props.sessionData.SessionID\n            }\n            //Convert to base64 so when the link is clicked the adv search page can interpret it\n            const b64Link = window.btoa(JSON.stringify(link))\n            roleLinks.push(<Link key={roleIndex} to={\"/bill-search/?q=\" + b64Link}>{role.Name}</Link>)\n        }\n    });\n    if (roleLinks.length === 0) {\n        return (<p>None</p>);\n    }\n    return (<p>{roleLinks}</p>);\n}\n\nclass MemberDetailsComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            sessionData: [],\n            memberCommittees: [],\n            memberNumber: '',\n            memberData: '',\n            patronRoles: [],\n            memberSessionContact: [],\n            memberDistrictContact: [],\n            memberConferenceBills: []\n        };\n        this.getMemberContact = this.getMemberContact.bind(this);\n        this.getMemberCommittees = this.getMemberCommittees.bind(this);\n        this.getPatronTypes = this.getPatronTypes.bind(this);\n        this.getMemberConferenceBills = this.getMemberConferenceBills.bind(this);\n        this.setupPage = this.setupPage.bind(this);\n    }\n\n    getMemberCommittees(memberID, effectiveDate) {\n        var params = 'effectiveDate=' + effectiveDate + '&MemberID=' + memberID\n\n        this.props.actions.getCommitteesByMember(params).then(() => {\n            let committees = this.props.committee.committeesByMember;\n            for (let i = 0; i < committees.length; i++) {\n                let comm = committees[i];\n                //Find the subcommittees by checking if they have a parent ID\n                if (comm.ParentCommitteeID) {\n                    //Find the parent based the parent ID\n                    let parent = committees.find(committee => comm.ParentCommitteeID === committee.CommitteeID);\n                    //Just in case something odd is happening and the person is only a member of the subcommittee (possible in api 1.0)\n                    if (parent) {\n                        if (!parent.subcommittees) parent.subcommittees = [];\n                        //Add the subcommittee as a child to the parent object\n                        parent.subcommittees.push(comm);\n                        //Remove the subcommittee from the list\n                        committees.splice(i, 1);\n                        //index is displaced because an element is deleted. This will put it back on track\n                        i--;\n                    }\n                }\n            }\n            this.setState({\n                memberCommittees: committees,\n                memberCommitteesIsLoaded: true\n            })\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return\n            }\n            this.setState({\n                memberCommitteesIsLoaded: true\n            })\n        })\n    }\n\n\n    getMemberContact(memberNumber, sessionData) {\n        const params = 'sessionID=' + sessionData.SessionID + '&memberNumber=' + memberNumber;\n        this.props.actions.getMemberContact(params).then(() => {\n            if (this.props.members.memberContactData[0]) {\n                const memberData = this.props.members.memberContactData[0];\n                const gaAddress = memberData.ContactInformation.filter(contact => contact.ContactType === 'GA');\n                const mailingAddress = memberData.ContactInformation.filter(contact => contact.ContactType === 'Mailing');\n                const sessionStartObj = sessionData.SessionEvents && sessionData.SessionEvents.length && sessionData.SessionEvents.find(date => date.DisplayName === \"Session Start\");\n                const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate).format('MM/DD/YYYY') : '';\n                this.setState({\n                    memberSessionContact: gaAddress,\n                    memberDistrictContact: mailingAddress,\n                    memberData: memberData,\n                    contactIsLoaded: true\n\n                });\n                this.getPatronTypes(memberData.MemberID, sessionData.SessionID);\n                this.getMemberCommittees(memberData.MemberID, startDate);\n                this.getMemberConferenceBills(memberData.MemberID, sessionData.SessionID)\n            } else {\n                throw 'Member data not found';\n            }\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            this.setState({\n                message: err,\n                contactIsLoaded: true,\n                memberConferenceBillsIsLoaded: true,\n                patronRolesIsLoaded: true,\n                memberCommitteesIsLoaded: true\n            });\n        });\n    }\n\n    getPatronTypes(memberId, sessionId) {\n        this.props.actions.getPatronTypes(`?memberID=${memberId}&sessionID=${sessionId}`)\n            .then(() => {\n                this.setState({\n                    patronRoles: this.props.patrons.patronTypes,\n                    patronRolesIsLoaded: true\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    patronRolesIsLoaded: true\n                });\n            });\n    }\n\n    getMemberConferenceBills(memberId, sessionId) {\n        const params = `?sessionID=${sessionId}&memberID=${memberId}`\n        this.props.actions.getMemberConferenceBills(params)\n            .then(() => {\n                this.setState({\n                    memberConferenceBills: this.props.members.memberConferenceBills,\n                    memberConferenceBillsIsLoaded: true\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    memberConferenceBillsIsLoaded: true\n                });\n            })\n    }\n\n    // When component has mounted:\n    // 1. Get session info, add to state\n    // 2. Get member by ID\n    // 3. Get committees\n    componentDidMount() {\n        window.scrollTo(0, 0);\n        //Update the session selector component, which will run componentDidUpdate and call setupDoc on its own\n        const sessionCode = this.props.match.params.sessioncode\n        if (sessionCode) {\n            if (this.props.nav.session !== sessionCode) {\n                this.props.actions.changeSession(sessionCode)\n            } else {\n                this.setupPage(sessionCode);\n            }\n        }\n    }\n\n    setupPage(sessionCode) {\n        const memberNumber = this.props.match.params.membernumber\n        this.props.actions.getSessionByCode(sessionCode).then(() => {\n            this.setState({\n                sessionData: this.props.session.selectedSession,\n                memberNumber: memberNumber\n            });\n            this.getMemberContact(memberNumber, this.props.session.selectedSession);\n            //If a signed in member is viewing their details page then provide a link to the member status report page.\n            const jwt = localStorage.getItem(\"LIS_ID_TOKEN\");\n            if (jwt) {\n                try {\n                    const parsedToken = jwtDecode(jwt);\n                    const mNumber = parsedToken.MemberNumber;\n                    if (mNumber === memberNumber) {\n                        this.setState({\n                            showMemberStatusPageLink: true\n                        })\n                    }\n                } catch (e) {\n                    if (Object.getPrototypeOf(e).toString() === 'InvalidTokenError') {\n                        //Token is malformed..nothing to do\n                    } else {\n                        console.error(e);\n                    }\n                }\n            }\n        });\n    }\n\n    componentDidUpdate(prevProps) {\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push('/session-details/' + this.props.nav.session + '/member-information/' + this.props.match.params.membernumber + \"/member-details\");\n            this.setupPage(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            if (this.props.match.params.sessioncode) {\n                this.props.actions.changeSession(this.props.match.params.sessioncode);\n            }\n        } else if (this.props.match.params.membernumber !== prevProps.match.params.membernumber) {\n            this.setupPage(this.props.nav.session);\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { sessionData, memberData, memberDistrictContact, memberSessionContact, memberCommittees, memberConferenceBillsIsLoaded, memberConferenceBills } = this.state;\n        const sessionContactInfo = sessionData && sessionData.IsActive && memberSessionContact.map((contact, contactIndex) =>\n            <React.Fragment key={contactIndex}>\n                <p>{contact.Address1}, Room {memberData.RoomNumber}<br />\n                    {contact.Address2}<br />\n                    {contact.City}, {contact.StateCode} {contact.ZipCode}<br />\n                    {contact.ContactType === \"GA\" ? memberData.GABPhoneNumber : contact.PhoneNumber}\n                    {memberData.GABEmailAddress && memberData.GABEmailAddress.length > 0 &&\n                        <React.Fragment>\n                            <h3 style={{ marginTop: \"8px\", paddingLeft: \"0px\" }}>Email Address</h3>\n                            <a href={`mailto:${memberData.GABEmailAddress}`}>{memberData.GABEmailAddress}</a>\n                        </React.Fragment>\n                    }\n                </p>\n            </React.Fragment>\n        );\n        //Decision was made to only display the specified contact mailing address here -JGB        \n        const districtContactInfo = sessionData && sessionData.IsActive && memberData && memberData.ContactInformation.map((contact, contactIndex) =>\n            contact.ContactType === \"Mailing\" &&\n            <React.Fragment key={contactIndex}>\n                <p>\n                    {contact.Address1}<br />\n                    {contact.Address2 && <>{contact.Address2}<br /></>}\n                    {contact.City}, {contact.StateCode} {contact.ZipCode}<br />\n                    {contact.PhoneNumber}\n                </p>\n            </React.Fragment>\n        );\n        return (\n            <div className=\"generic-details-page public-details inner-grid\">\n                <div>\n                    <h2 style={{ marginBottom: '10px' }}>{sessionData.SessionYear} {sessionData.DisplayName}</h2>\n                </div>\n                {this.state.message &&\n                    <p>{this.state.message}</p>\n                }\n                {(!this.state.message || this.state.message !== \"Member data not found\") &&\n                    <React.Fragment>\n                        {!this.state.contactIsLoaded\n                            ? <div aria-label=\"Loading\" className=\"spinner\"></div>\n                            : <div className=\"details-header\">\n                                <div>\n                                    <h3>{memberData.MemberDisplayName}<span style={{ marginLeft: \"0.5em\" }}>({memberData.PartyCode}) - {memberData.Chamber} District {memberData.DistrictID}</span></h3>\n                                    <div className=\"details-section\">\n                                        {this.state.showMemberStatusPageLink &&\n                                            <a href=\"http://efile.dlas.virginia.gov/frmMemberBD.aspx\">Patron status report</a>\n                                        }\n                                    </div>\n                                </div>\n                                <div className=\"list-links\" style={{ padding: '5px 10px' }}>\n                                    <Link to={`/vote-search/${sessionData.SessionCode}/${memberData.MemberNumber}`}>Votes</Link>\n                                </div>\n                            </div>\n                        }\n                        {!this.state.contactIsLoaded\n                            ? <div aria-label=\"Loading\" className=\"spinner\"></div>\n                            : sessionContactInfo.length > 0 && <div className=\"details-section\">\n                                <h4>In Session Address</h4>\n                                <React.Fragment>{sessionContactInfo}</React.Fragment>\n                            </div>\n                        }\n                        {!this.state.contactIsLoaded\n                            ? <div aria-label=\"Loading\" className=\"spinner\"></div>\n                            : districtContactInfo && districtContactInfo.find(c => c !== false) && <div className=\"details-section\">\n                                <h4>Mailing Address</h4>\n                                <React.Fragment>{districtContactInfo}</React.Fragment>\n                            </div>\n                        }\n                        {!this.state.memberCommitteesIsLoaded\n                            ? <div aria-label=\"Loading\" className=\"spinner\"></div>\n                            : <div className=\"details-section\">\n                                <h4>Committee Assignments</h4>\n                                <CommitteeAssignments session={sessionData.SessionCode} committees={memberCommittees} />\n                            </div>\n                        }\n                        {!this.state.patronRolesIsLoaded\n                            ? <div aria-label=\"Loading\" className=\"spinner\"></div>\n                            : <div className=\"details-section\">\n                                <h4>Sponsored Legislation</h4>\n                                <PatronRoles\n                                    roles={this.state.patronRoles}\n                                    memberData={this.state.memberData}\n                                    sessionData={sessionData}\n                                />\n                            </div>\n                        }\n                        {!memberConferenceBillsIsLoaded\n                            ? <div aria-label=\"Loading\" className=\"spinner\"></div>\n                            : <div className=\"details-section\" style={{ minHeight: '150px' }}>\n                                {memberConferenceBills.length !== 0 && <h4>Conference Assignments</h4>}\n                                {memberConferenceBills.map((bill, billIndex) =>\n                                    <div key={billIndex}>\n                                        {billIndex !== 0 && <hr className=\"faded-line\" />}\n                                        <Link to={`/bill-details/${sessionData.SessionCode}/${bill.LegislationNumber}`}>{bill.LegislationNumber} {bill.Description}</Link>\n                                    </div>\n                                )}\n                            </div>\n                        }\n                    </React.Fragment>\n                }\n            </div>\n        )\n    }\n}\n\nconst PublicMemberDetails = connect(\n    (state) => {\n        const { members, session, committee, patrons, nav } = state;\n        return {\n            members,\n            session,\n            committee,\n            patrons,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, memberActionCreators, sessionActionCreators, committeeActionCreators, patronActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(MemberDetailsComponent)\n\nexport default PublicMemberDetails;\n","import React from 'react';\nimport Select from 'react-select';\n\nconst WATCHLIST_LEGISLATION = \"WATCHLIST_LEGISLATION\";\nconst ALL_LEGISLATION = \"ALL_LEGISLATION\";\n\nclass WatchlistNotifications extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            hideNotifications: true,\n            newKeywords: [],\n            showTooltip: false\n        };\n        this.toggleNotifications = this.toggleNotifications.bind(this);\n        this.handleFrequenyChange = this.handleFrequenyChange.bind(this);\n        this.handleMemberChange = this.handleMemberChange.bind(this);\n        this.handleCommitteeChange = this.handleCommitteeChange.bind(this);\n        this.toggleEditKeywords = this.toggleEditKeywords.bind(this);\n        this.handleKeywordChange = this.handleKeywordChange.bind(this);\n        this.handleKeywordSave = this.handleKeywordSave.bind(this);\n        this.handleCheckboxChange = this.handleCheckboxChange.bind(this);\n        this.toggleTooltip = this.toggleTooltip.bind(this);\n    }\n\n    toggleNotifications() {\n        this.setState(state => ({\n            hideNotifications: !state.hideNotifications\n        }));\n    }\n\n    toggleTooltip(state) {\n        let showTooltip = { ...this.state.showTooltip };\n\n        //Close all open tooltips\n        if (typeof showTooltip === \"object\") {\n            for (const x in showTooltip) {\n                if (x !== state)\n                    showTooltip[x] = false;\n            };\n        }\n\n        showTooltip[state] = showTooltip[state] ? false : true;\n\n        this.setState({\n            showTooltip: showTooltip\n        })\n    }\n\n    handleFrequenyChange(e) {\n        const value = e.target.value;\n        let selectedCollection = { ...this.props.selectedCollection };\n        selectedCollection.Frequency = value;\n        delete selectedCollection.NotificationFrequencyID\n        this.props.handleCollectionChange(selectedCollection);\n    }\n\n    handleMemberChange(val) {\n        let selectedCollection = { ...this.props.selectedCollection };\n        const criteriaTypeObj = this.props.criteriaTypes.find(type => type.CriteriaType === 'Patron');\n        let newCriteria = [];\n        selectedCollection.NotificationCriterias.forEach(criteria => {\n            if (criteria.CriteriaType !== 'Patron') {\n                newCriteria.push(criteria);\n            } else {\n                const indexOfCriteriaInValue = val.findIndex(v => parseInt(criteria.CriteriaValue) === v.MemberID);\n                if (indexOfCriteriaInValue !== -1) {\n                    // This criteria is in value. Add it to the new criteria array and make sure it is active\n                    newCriteria.push({ ...criteria, IsActive: true });\n                    // Remove the value from the val array since it is already added\n                    val.splice(indexOfCriteriaInValue, 1);\n                } else {\n                    // This criteria is not part of val so make it inactive\n                    newCriteria.push({ ...criteria, IsActive: false });\n                }\n            }\n        });\n        // Anything left in val will be new criterias. Add them to the new criteria array\n        val.forEach(v => {\n            newCriteria.push({\n                CriteriaValue: v.MemberID,\n                CriteriaType: \"Patron\",\n                CriteriaTypeID: criteriaTypeObj ? criteriaTypeObj.CriteriaTypeID : null,\n                IsActive: true\n            });\n        });\n        selectedCollection.NotificationCriterias = newCriteria;\n        this.props.handleCollectionChange(selectedCollection);\n    }\n\n    handleCommitteeChange(val) {\n        let selectedCollection = { ...this.props.selectedCollection };\n        const criteriaTypeObj = this.props.criteriaTypes.find(type => type.CriteriaType === 'Committee');\n        let newCriteria = [];\n        selectedCollection.NotificationCriterias.forEach(criteria => {\n            if (criteria.CriteriaType !== 'Committee') {\n                newCriteria.push(criteria);\n            } else {\n                const indexOfCriteriaInValue = val.findIndex(v => parseInt(criteria.CriteriaValue) === v.CommitteeID);\n                if (indexOfCriteriaInValue !== -1) {\n                    // This criteria is in value. Add it to the new criteria array and make sure it is active\n                    newCriteria.push({ ...criteria, IsActive: true });\n                    // Remove the value from the val array since it is already added\n                    val.splice(indexOfCriteriaInValue, 1);\n                } else {\n                    // This criteria is not part of val so make it inactive\n                    newCriteria.push({ ...criteria, IsActive: false });\n                }\n            }\n        });\n        // Anything left in val will be new criterias. Add them to the new criteria array\n        val.forEach(v => {\n            newCriteria.push({\n                CriteriaValue: v.CommitteeID,\n                CriteriaType: \"Committee\",\n                CriteriaTypeID: criteriaTypeObj ? criteriaTypeObj.CriteriaTypeID : null,\n                IsActive: true\n            });\n        });\n        selectedCollection.NotificationCriterias = newCriteria;\n        this.props.handleCollectionChange(selectedCollection);\n    }\n\n    toggleEditKeywords() {\n        let keywordCriteria = this.props.selectedCollection.NotificationCriterias.filter(criteria => criteria.IsActive && criteria.CriteriaType === 'Keyword');\n        // Make sure there are at least one keyword so the input appears\n        if (keywordCriteria.length === 0) {\n            const criteriaTypeObj = this.props.criteriaTypes.find(type => type.CriteriaType === 'Keyword')\n            keywordCriteria.push({\n                CriteriaType: 'Keyword',\n                CriteriaTypeID: criteriaTypeObj ? criteriaTypeObj.CriteriaTypeID : null,\n                CriteriaValue: '',\n                IsActive: true\n            });\n        }\n        this.setState(state => ({\n            newKeywords: keywordCriteria,\n            showKeywordEditor: !state.showKeywordEditor\n        }));\n    }\n\n    handleKeywordChange(e, index) {\n        const val = e.target.value;\n        let newKeywords = [...this.state.newKeywords];\n        newKeywords[index].CriteriaValue = val\n        this.setState({\n            keywordCriteria: newKeywords\n        })\n    }\n\n    handleKeywordSave(isDelete) {\n        let selectedCollection = { ...this.props.selectedCollection };\n        let newKeywords = [...this.state.newKeywords];\n        selectedCollection.NotificationCriterias.forEach(criteria => {\n            if (criteria.CriteriaType === \"Keyword\") {\n                const criteriaToUseIndex = newKeywords.findIndex(kc => kc.CriteriaTypeID === criteria.CriteriaTypeID)\n                if (criteriaToUseIndex !== -1) {\n                    criteria.IsActive = true;\n                    criteria.CriteriaValue = newKeywords[criteriaToUseIndex].CriteriaValue;\n                    newKeywords.splice(criteriaToUseIndex, 1);\n                }\n                if (isDelete || !criteria.CriteriaValue || !criteria.CriteriaValue.trim()) {\n                    criteria.IsActive = false;\n                }\n            }\n        });\n        if (newKeywords.filter(nk => nk.IsActive).length > 0) {\n            // If there are some left over then these don't have IDs and need to be created\n            selectedCollection.NotificationCriterias = selectedCollection.NotificationCriterias.concat(newKeywords.filter(nk => nk.IsActive));\n        }\n        this.props.handleCollectionChange(selectedCollection, () => {\n            this.setState({\n                showKeywordEditor: false\n            })\n        });\n\n    }\n\n    handleCheckboxChange(criteriaType) {\n        let selectedCollection = { ...this.props.selectedCollection };\n        let criteriaIndices = [];\n        // Since notificaion criteria is an array the entire array needs to be checked to see if any of the criteria type exist\n        this.props.selectedCollection.NotificationCriterias.forEach((criteria, criteriaIndex) => {\n            if (criteria.CriteriaType === criteriaType) {\n                criteriaIndices.push(criteriaIndex);\n                // If it exists then it needs to be 'checked' or 'unchecked' by setting isActive\n                selectedCollection.NotificationCriterias[criteriaIndex].IsActive = !selectedCollection.NotificationCriterias[criteriaIndex].IsActive;\n            }\n        });\n        //If none were found then add one to make the box checked\n        if (criteriaIndices.length === 0) {\n            const criteriaTypeObj = this.props.criteriaTypes.find(type => type.CriteriaType === criteriaType)\n            selectedCollection.NotificationCriterias.push({\n                CriteriaType: criteriaType,\n                CriteriaTypeID: criteriaTypeObj ? criteriaTypeObj.CriteriaTypeID : null,\n                IsActive: true\n            });\n        }\n        this.props.handleCollectionChange(selectedCollection);\n    }\n\n    componentDidUpdate(prevProps) {\n        if (this.props.selectedCollection.WatchListID !== prevProps.selectedCollection.WatchListID) {\n            this.setState({\n                newKeywords: []\n            })\n        }\n    }\n\n    render() {\n        const { selectedCollection, memberList, committeeList, collectionIsSaving } = this.props;\n        const { hideNotifications, newKeywords, showKeywordEditor } = this.state;\n\n        if (!selectedCollection) {\n            return false;\n        }\n\n        const houseMembers = memberList.filter(member => member.ChamberCode === \"H\");\n        const senateMembers = memberList.filter(member => member.ChamberCode === \"S\");\n        const houseCommittees = committeeList.filter(committee => committee.ChamberCode === \"H\");\n        const senateCommittees = committeeList.filter(committee => committee.ChamberCode === \"S\");\n\n        const selectedHousePatrons = houseMembers.filter(member => selectedCollection.NotificationCriterias.find(criteria => criteria.IsActive && criteria.CriteriaType === \"Patron\" && parseInt(criteria.CriteriaValue) === member.MemberID))\n        const selectedSenatePatrons = senateMembers.filter(member => selectedCollection.NotificationCriterias.find(criteria => criteria.IsActive && criteria.CriteriaType === \"Patron\" && parseInt(criteria.CriteriaValue) === member.MemberID))\n        const selectedHouseCommittees = houseCommittees.flatMap(x => x.options || x).filter(committee => selectedCollection.NotificationCriterias.find(criteria => criteria.IsActive && criteria.CriteriaType === \"Committee\" && parseInt(criteria.CriteriaValue) === committee.CommitteeID))\n        const selectedSenateCommittees = senateCommittees.flatMap(x => x.options || x).filter(committee => selectedCollection.NotificationCriterias.find(criteria => criteria.IsActive && criteria.CriteriaType === \"Committee\" && parseInt(criteria.CriteriaValue) === committee.CommitteeID))\n\n        const getSelectedCommitteesLabel = (val) => {\n            let newCmte = JSON.parse(JSON.stringify(val)); //don't modify existing committee values stored at state level & used in dropdown\n            newCmte.forEach(cmte => {\n                cmte.label = '(' + cmte.ChamberCode + ') ' + cmte.label;\n            });\n            return newCmte;\n        }\n\n        let statusChangeCheck = false;\n        let docketCheck = false;\n        let versionCheck = false;\n        let impactStatementCheck = false;\n        let keywords = [];\n        let introducedCheck = false;\n        selectedCollection.NotificationCriterias.forEach(criteria => {\n            if (!criteria.IsActive) {\n                return;\n            }\n            switch (criteria.CriteriaType) {\n                case (\"Status Change\"):\n                    statusChangeCheck = true;\n                    break;\n                case (\"Docket/Agenda\"):\n                    docketCheck = true;\n                    break;\n                case (\"New Version\"):\n                    versionCheck = true;\n                    break;\n                case (\"Impact Statement\"):\n                    impactStatementCheck = true;\n                    break;\n                case (\"Keyword\"):\n                    keywords.push(criteria);\n                    break;\n                case (\"Introduced\"):\n                    introducedCheck = true;\n                    break;\n            }\n        });\n        return (\n            <div className=\"collection-notification-box dlas-forms user-forms\">\n                <div className=\"flex-row notification-first-section\">\n                    <span className=\"txt-lighter-blue\">Notifications</span>\n                    <button aria-expanded={!hideNotifications} onClick={this.toggleNotifications} className={`${hideNotifications ? \"arrow-down\" : \"arrow-up\"} light-blue-chevron`}></button>\n                </div>\n                {!hideNotifications &&\n                    <div>\n                        <div className=\"notification-section flex-row flex-start inline-list flex-vertical-center\">\n                            <div>Notification frequency</div>\n                            <div className=\"flex-vertical-center flex-row\">\n                                <label htmlFor=\"sr-frequency-hourly\">Hourly</label>\n                                <input id=\"sr-frequency-hourly\" disabled={collectionIsSaving} value=\"Hourly\" onChange={this.handleFrequenyChange} checked={selectedCollection.Frequency === \"Hourly\"} name=\"notifcation-frequency\" type=\"radio\" />\n                            </div>\n                            <div className=\"flex-vertical-center flex-row\">\n                                <label htmlFor=\"sr-frequency-daily\">Daily</label>\n                                <input id=\"sr-frequency-daily\" disabled={collectionIsSaving} value=\"Daily\" onChange={this.handleFrequenyChange} checked={selectedCollection.Frequency === \"Daily\"} name=\"notifcation-frequency\" type=\"radio\" />\n                            </div>\n                            <div className=\"flex-vertical-center flex-row\">\n                                <label htmlFor=\"sr-frequency-none\">None</label>\n                                <input id=\"sr-frequency-none\" disabled={collectionIsSaving} value=\"None\" onChange={this.handleFrequenyChange} checked={selectedCollection.Frequency === \"None\" || !selectedCollection.Frequency} name=\"notifcation-frequency\" type=\"radio\" />\n                            </div>\n                        </div>\n                        <hr className=\"faded-line full-width\" />\n                        <div className=\"no-gap-grid two\">\n                            <div className=\"notification-section\">\n                                <strong className=\"txt-lighter-blue\">My Watchlist Legislation</strong>\n                                <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(WATCHLIST_LEGISLATION) }} className=\"button info\">Info</a>\n                                {this.state.showTooltip[WATCHLIST_LEGISLATION] &&\n                                    <div className=\"info-box notification-tooltip\">\n                                        <p><b>Status Change</b>{\": Legislation receives one or more notable events that trigger a status change. Ex: In Committee, Passed, Failed, etc. -  this DOES NOT include notice of when a bill you are tracking is placed on a docket or agenda, has a new text version or has a new impact statement. - Use those options below to be notified for each.\"}</p>\n                                        <p><b>Placed on Docket/Agenda</b>{\": Legislation is placed on a Senate committee docket or House committee agenda.\"}</p>\n                                        <p><b>New text versions</b>{\": Legislation receives a new version such as Substitute, Engrossed, Enrolled, etc. *excludes amendments and Governor's text.\"}</p>\n                                        <p><b>Impact Statements</b>{\": Legislation receives a new impact statement.\"}</p>\n                                    </div>\n                                }\n                                <div className=\"flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleCheckboxChange(\"Status Change\")}>\n                                        <input id=\"sr-status-change\" disabled={collectionIsSaving} checked={statusChangeCheck} type=\"checkbox\" />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"sr-status-change\" className=\"checkbox-label\" >Notify me when a bill in this watchlist has any status change.</label>\n                                </div>\n                                <div className=\"flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleCheckboxChange(\"Docket/Agenda\")}>\n                                        <input id=\"sr-docket\" disabled={collectionIsSaving} checked={docketCheck} type=\"checkbox\" />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"sr-docket\" className=\"checkbox-label\">Notify me when a bill in this watchlist appears on a docket/agenda.</label>\n                                </div>\n                                <div className=\"flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleCheckboxChange(\"New Version\")}>\n                                        <input id=\"sr-new-version\" disabled={collectionIsSaving} checked={versionCheck} type=\"checkbox\" />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"sr-new-version\" className=\"checkbox-label\">Notify me when a bill in this watchlist has new text versions.</label>\n                                </div>\n\n                                <div className=\"flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleCheckboxChange(\"Impact Statement\")}>\n                                        <input id=\"sr-impact-statement\" disabled={collectionIsSaving} checked={impactStatementCheck} type=\"checkbox\" />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"sr-impact-statement\" className=\"checkbox-label\">Notify me when a bill in this watchlist has impact statements.</label>\n                                </div>\n                            </div>\n                            <div className=\"notification-section\">\n                                <strong className=\"txt-lighter-blue\">All Legislation</strong>\n                                <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip(ALL_LEGISLATION) }} className=\"button info\">Info</a>\n                                {this.state.showTooltip[ALL_LEGISLATION] &&\n                                    <div className=\"info-box notification-tooltip all-legislation\">\n                                        <p><b>Any new bill introduced</b>{\": All bills, joints, and resolutions introduced by House or Senate.\"}</p>\n                                        <p><b>Any bill offered by patron</b>{\": Legislation introduced by a particular patron as Chief Patron.\"}</p>\n                                        <p><b>Any bill with keyword phrase</b>{\": Legislation contains a particular keyword or keyword phrase in any version text available.\"}</p>\n                                        <p><b>Any bill referred to a committee</b>{\": Legislation referred, rereferred, and/or recommitted to a particular committee.\"}</p>\n                                    </div>\n                                }\n                                <div className=\"flex-row flex-vertical-center flex-start\">\n                                    <div className=\"toggle-switch\" onClick={() => this.handleCheckboxChange(\"Introduced\")}>\n                                        <input id=\"sr-introduced\" disabled={collectionIsSaving} checked={introducedCheck} type=\"checkbox\" />\n                                        <span className=\"slider\"></span>\n                                    </div>\n                                    <label htmlFor=\"sr-introduced\" className=\"checkbox-label\">Notify me when <strong>any</strong> new bill is introduced.</label>\n                                </div>\n                                <br />\n                                <div>\n                                    <label>Notify me when <strong>any</strong> new bill is offered by a patron.</label>\n                                    <div className=\"inner-grid\" style={{ gap: '5px' }}>\n                                        <Select\n                                            aria-label=\"House Members\"\n                                            id=\"sr-patron-house\"\n                                            isDisabled={collectionIsSaving}\n                                            placeholder=\"House Members\"\n                                            options={houseMembers}\n                                            value={selectedHousePatrons}\n                                            getOptionLabel={opt => opt.ListDisplayName}\n                                            //The senate patrons needs to be concatenated because the list is split in two to accomadate the design of two seperate dropdowns\n                                            onChange={val => this.handleMemberChange((val || []).concat(selectedSenatePatrons))}\n                                            styles={selectStyle}\n                                            isMulti />\n                                        <Select\n                                            aria-label=\"Senate Members\"\n                                            id=\"sr-patron-senate\"\n                                            isDisabled={collectionIsSaving}\n                                            placeholder=\"Senate Members\"\n                                            options={senateMembers}\n                                            value={selectedSenatePatrons}\n                                            onChange={val => this.handleMemberChange((val || []).concat(selectedHousePatrons))}\n                                            styles={selectStyle}\n                                            getOptionLabel={opt => opt.ListDisplayName}\n                                            isMulti />\n                                    </div>\n                                </div>\n                                <br />\n                                <div>\n                                    <label id=\"sr-keyword-label\">Notify me when <strong>any</strong> new introduced, engrossed, enrolled, chaptered, or substitute legislation is offered with a keyword phrase.</label>\n                                    {showKeywordEditor ?\n                                        <div className=\"flex-row flex-vertical-center\">\n                                            {newKeywords.map((keyword, keywordIndex) =>\n                                                <input\n                                                    aria-label=\"Enter phrase\"\n                                                    key={keywordIndex}\n                                                    disabled={collectionIsSaving}\n                                                    type=\"text\"\n                                                    value={keyword.CriteriaValue}\n                                                    onChange={e => this.handleKeywordChange(e, keywordIndex)}\n                                                    placeholder=\"Enter phrase\" />\n                                            )}\n                                            <div>\n                                                {collectionIsSaving ?\n                                                    <div className=\"small-spinner\"></div>\n                                                    :\n                                                    <div className=\"inline-list\">\n                                                        <span role=\"button\" aria-label=\"save\" onClick={() => this.handleKeywordSave(false)} className=\"icon save\"></span>\n                                                        <span role=\"button\" aria-label=\"cancel\" onClick={this.toggleEditKeywords} className=\"icon delete\"></span>\n                                                    </div>\n                                                }\n                                            </div>\n                                        </div>\n                                        :\n                                        <div>\n                                            {keywords.map((keyword, keywordIndex) =>\n                                                <div className=\"bold\" key={keywordIndex}>\n                                                    <span>{keyword.CriteriaValue}</span>\n                                                    <span role=\"button\" aria-label=\"delete\" onClick={() => this.handleKeywordSave(true)} style={{ marginLeft: '5px', verticalAlign: 'text-bottom' }} className=\"icon delete\"></span>\n                                                </div>\n                                            )}\n                                            <button onClick={() => !this.props.collectionIsSaving && this.toggleEditKeywords()} className=\"button-link\" type=\"button\">Edit keywords</button>\n                                        </div>\n                                    }\n                                </div>\n                                <br />\n                                <div>\n                                    <label>Notify me when <strong>any</strong> bill is referred to a committee.</label>\n                                    <div className=\"inner-grid\" style={{ gap: '5px' }}>\n                                        <Select\n                                            aria-label=\"House Committees\"\n                                            isDisabled={collectionIsSaving}\n                                            placeholder=\"House Committees\"\n                                            options={houseCommittees}\n                                            value={getSelectedCommitteesLabel(selectedHouseCommittees)}\n                                            onChange={val => this.handleCommitteeChange((val || []).concat(selectedSenateCommittees))}\n                                            styles={selectStyle}\n                                            isMulti />\n                                        <Select\n                                            aria-label=\"Senate Committees\"\n                                            isDisabled={collectionIsSaving}\n                                            placeholder=\"Senate Committees\"\n                                            options={senateCommittees}\n                                            value={getSelectedCommitteesLabel(selectedSenateCommittees)}\n                                            onChange={val => this.handleCommitteeChange((val || []).concat(selectedHouseCommittees))}\n                                            styles={selectStyle}\n                                            isMulti />\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    </div>}\n            </div>);\n    }\n\n}\n\nconst selectStyle = {\n    menuList: (base, state) => ({\n        ...base,\n        paddingTop: '0px',\n    }),\n    group: (base, state) => ({\n        ...base,\n        paddingTop: '0px',\n    }),\n    groupHeading: (base, state) => ({\n        ...base,\n        paddingTop: '7px',\n        paddingBottom: '7px',\n        marginBottom: '0px',\n        position: 'sticky',\n        top: '0px',\n        backgroundColor: 'hsl(0,0%,100%)'\n    }),\n    control: styles => ({\n        ...styles,\n        minHeight: '0px',\n        padding: '0.12em 0.6em !important',\n    }),\n    valueContainer: styles => ({\n        ...styles,\n        padding: 0,\n    }),\n    input: styles => ({\n        ...styles,\n        fontSize: '0.8em',\n        lineHeight: 'normal',\n    }),\n    singleValue: styles => ({\n        ...styles,\n        fontSize: '0.8em'\n    }),\n    placeholder: styles => ({\n        ...styles,\n        fontSize: '0.8em'\n    }),\n    option: styles => ({\n        ...styles,\n        fontSize: '0.8em'\n    }),\n    dropdownIndicator: styles => ({\n        ...styles,\n        padding: '1px'\n    }),\n}\n\nexport default WatchlistNotifications;","import React from 'react';\n\nconst HelpPage = () => {\n    return (\n        <div className=\"long-paragraph-text\">\n            <div>\n                <h2 className=\"txt-dark-blue\">Single Search Word</h2>\n                <p>Example using Single Word: distilled</p>\n                <p>A single search word is the simplest of all search statement constructions. For a document to qualify for the search, it must contain an occurrence of the exact character string specified as the search word. For example; the search word \"distilled\" only retrieves the documents that contain occurrences of the word \"distilled\". The words \"distill\" and \"distillery\", for example, do not qualify. </p>\n            </div>\n            <div>\n                <h2 className=\"txt-dark-blue\">Phrase Search</h2>\n                <p>Phrase example: 'state child fatality review team'</p>\n                <p>A search phrase is constructed of two or more search words. To perform a phrase search, surround the phrase with single or double quotes.</p>\n            </div>\n            <div>\n                <h2 className=\"txt-dark-blue\">Logic Conditions</h2>\n                <p>Search statements can be entered using any of three logic conditions: \"and\", \"or\", and \"and not\". Use of a logic condition requires two search statements. For example: \"A or B\", or \"A and (B or C)\". The logic conditions must be positioned between two search words or statements.</p>\n                <p>When you use \"and\" in your search statement (example: \"A and B\"), all documents that contain references of both A and B are displayed. Documents containing references of only A or only B will not qualify.</p>\n                <p>When you use \"or\" in your search statement (example: \"A or B\"), all documents with references of either A or B will display. Unlike \"and\" it is not necessary for both statements to be present in a document for it to qualify, but documents containing both \"A and B\" will also qualify.</p>\n                <p>When you use \"and not\" in your search statement (\"A and not B\"), documents must first contain references of A. Of the documents containing A, only those without references of B will qualify.</p>\n                <p>With \"and\" or \"or\" the order of the statements will not affect the outcome of the search. When using \"and not\", the results of the search depend on the order of the statements. Compound search statements (those with more than one logic condition) can also be read several ways.</p>\n                <p>Search statements are normally read from left to right. Simple statements such as the example \"A or B\" will not be misinterpreted. When additional logic conditions are added, the order and groupings of the statements may be defined with parentheses. </p>\n            </div>\n            <div>\n                <h2 className=\"txt-dark-blue\">Parentheses</h2>\n                <p>Parentheses can be used to affect the order in which the statement is read. The examples below show how the placement of the parentheses can change the intent of the statement:</p>\n                <p> 1 ==&gt; (A or B) and C:</p>\n                <p>This statement reads: Display all documents containing references of either A or B that also contain references of C.</p>\n                <p> 2 ==&gt; A or (B and C):</p>\n                <p>This statement is the same as the one above. Only the placement of the parentheses is changed. The statement reads: Display documents with either references of both B and C or the documents with references of A.</p>\n                <p>If additional parentheses are used, the statement contained in the deepest set of parentheses is resolved first. For example in \"D and (B or (A and C))\", \"A and C\" is resolved first, despite its rightmost position in the statement.</p>\n                <p>Logic conditions can be combined with any kind of search words or search phrases to create a search statement as broad or specific as you desire. </p>\n            </div>\n        </div>\n    );\n}\n\nexport default HelpPage;","import { useState } from 'react';\n\nconst QuickAdd = props => {\n    const [addBill, handleAddBillChange] = useState('')\n    const [isAddingBill, toggleIsAddingBill] = useState(false)\n    const quickAddBills = () => {\n        if (!addBill.replace(/\\s/g), \"\") {\n            return;\n        }\n        toggleIsAddingBill(true);\n        props.quickAddBills(addBill, err => {\n            toggleIsAddingBill(false);\n            if (!err) { handleAddBillChange('') };\n        });\n    }\n\n    return (\n        <>\n            <div className=\"quick-add-container\" style={{ marginRight: \"0px\" }}>\n                {props.quickAddErr &&\n                    <span className=\"small-text fail\" style={{ paddingRight: '5px' }}>{props.quickAddErr}</span>\n                }\n                <label className=\"screen-reader-only\" htmlFor=\"bill-quick-add\">Bill quick add</label>\n                <input\n                    id=\"bill-quick-add\"\n                    type=\"text\"\n                    onKeyDown={e => {\n                        if (e.key === \"Enter\") {\n                            e.stopPropagation();\n                            quickAddBills()\n                        }\n                    }}\n                    autoFocus={props.autoFocus}\n                    placeholder=\"Bill quick add\"\n                    value={addBill}\n                    onChange={e => handleAddBillChange(e.target.value)}\n                />\n                {isAddingBill ?\n                    <span className=\"small-spinner\"></span>\n                    :\n                    <button style={{ marginLeft: \"7px\" }} type=\"button\" disabled={props.collectionIsSaving} onClick={quickAddBills} id=\"bill-quick-add-button\" className=\"small-button button\">Add</button>\n                }\n            </div>\n        </>\n    );\n}\n\nexport default QuickAdd;\n","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { patronActionCreators } from '../../../stores/lis-patron-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport AdvancedSearchBox from '../../../lis-shared/lis-search/lis-advanced-search-box';\nimport moment from 'moment-timezone';\nimport queryString from 'query-string';\nimport '../../../stylesheets/lis-public-view/public-view.css';\nimport BillCategories from '../../../lis-shared/lis-search/lis-search-categories';\nimport SearchSelections from '../../../lis-shared/lis-search/lis-search-selections';\nimport LegislationWatchlists from '../../../lis-shared/lis-search/lis-legislation-watchlists';\nimport WatchlistNotifications from '../../../lis-shared/lis-search/lis-watchlist-notifications';\nimport CollectionControls from '../../../lis-shared/lis-search/lis-collection-controls'\nimport { cancelRequest } from '../../../services/request.service';\nimport { collectionActionCreators } from '../../../stores/lis-collection-store';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport ReportMaker from './lis-report-maker';\nimport BillInfoComponent from '../../../lis-shared/lis-search/lis-bill-info';\nimport SearchHelp from './lis-search-help';\nimport QuickAdd from './quick-add-bills';\nimport { reportActionCreators } from '../../../stores/lis-report-store';\n\nconst BILL_COLLECTION_AUTHOR = \"LegislationCollections\";\nconst PageSize = 50;\n\nconst sortLegislations = (a, b) => {\n    if (a.LegislationNumber[0] !== b.LegislationNumber[0]) {\n        return a.LegislationNumber[0].localeCompare(b.LegislationNumber[0]);\n    } else if (a.LegislationNumber[1] !== b.LegislationNumber[1]) {\n        return a.LegislationNumber[1].localeCompare(b.LegislationNumber[1]);\n    } else {\n        const aLegislationKey = a.LegislationNumber.substr(2);\n        const bLegislationKey = b.LegislationNumber.substr(2);\n        return parseInt(aLegislationKey - bLegislationKey);\n    }\n}\n\nconst validLegPrefixes = [\"HB\", \"SB\", \"HJ\", \"SJ\", \"HR\", \"SR\"];\n\nclass BillSearchComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showCategories: false,\n            billList: [],\n            billStatusCategoryList: [],\n            billStatusCategoryListIsLoading: true,\n            billEventOptions: [],\n            selectedBillEvent: '',\n            selectedBill: '',\n            selectedKeywords: '',\n            searchedKeywords: '',\n            selectedBillAction: '',\n            billEventStartDate: null,\n            billEventEndDate: null,\n            selectedBillSession: '',\n            selectedBillType: '',\n            previousSearch: '',\n            searchType: { value: 'all', label: 'All' },\n            selectedChamber: '',\n            patronList: [],\n            patronRoles: [],\n            selectedBillNumbers: '',\n            selectedBillRangeBeginning: '',\n            selectedBillRangeEnd: '',\n            selectedChapterNumber: '',\n            filteredPatronList: [],\n            selectedPatron: '',\n            selectedPatronType: [],\n            selectedBillStatusCategory: '',\n            sessionOptions: [],\n            billStatusStartDate: null,\n            billStatusEndDate: null,\n            committeeList: [],\n            groupedCommitteeList: [],\n            filteredCommitteeList: [],\n            selectedCommittee: '',\n            selectedSubcommittee: '',\n            subcommitteeList: [],\n            subjectList: [],\n            selectedSubject: '',\n            introDateList: [],\n            collections: [],\n            selectedCollection: '',\n            selectedCollectionIndex: -1,\n            billVersionList: [],\n            selectedBillVersion: 'All',\n            billSummaryList: [],\n            selectedSummaryVersion: 'All',\n            selectedLocation: 'Caption',\n            criteriaTypes: [],\n            checkedBills: [],\n            lastCheckedBill: -1,\n            showAllNotes: false,\n            selectAllBills: false,\n            collectionIsSaving: false,\n            keywordUseGlobalSessionSearch: false,\n            displayCrossSession: false,\n            currentStatus: true,\n            excludeFailed: false,\n            autoReport: false,\n            showSidebar: true,\n            height: 1,\n            showModal: false,\n            introductionDate: null,\n            showHelpModal: false,\n            showUpdateSearchButton: false,\n            compositeView: false\n        };\n        this.searchOnEnterPress = this.searchOnEnterPress.bind(this);\n        this.toggleGroup = this.toggleGroup.bind(this);\n        this.toggleShowCategories = this.toggleShowCategories.bind(this);\n        this.clearForm = this.clearForm.bind(this);\n        this.handleSubmit = this.handleSubmit.bind(this);\n        this.handleSearch = this.handleSearch.bind(this);\n        this.getBillsResults = this.getBillsResults.bind(this);\n        this.chamberChange = this.chamberChange.bind(this);\n        this.sessionChange = this.sessionChange.bind(this);\n        this.committeeChange = this.committeeChange.bind(this);\n        this.handlePatronChange = this.handlePatronChange.bind(this);\n        this.handlePatronTypeChange = this.handlePatronTypeChange.bind(this);\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.handleSelectionClear = this.handleSelectionClear.bind(this);\n        this.handleMultiSelectionClear = this.handleMultiSelectionClear.bind(this);\n        this.handleRadioChange = this.handleRadioChange.bind(this);\n        this.getCollections = this.getCollections.bind(this);\n        this.selectCollection = this.selectCollection.bind(this);\n        this.handleCollectionChange = this.handleCollectionChange.bind(this);\n        this.createCollection = this.createCollection.bind(this);\n        this.deleteCollection = this.deleteCollection.bind(this);\n        this.addToWatchlists = this.addToWatchlists.bind(this);\n        this.removeWatchlistBills = this.removeWatchlistBills.bind(this);\n        this.toggleReportMaker = this.toggleReportMaker.bind(this);\n        this.toggleAllBills = this.toggleAllBills.bind(this);\n        this.handleBillCheckbox = this.handleBillCheckbox.bind(this);\n        this.quickAddBills = this.quickAddBills.bind(this);\n        this.toggleAllNotes = this.toggleAllNotes.bind(this);\n        this.handleCurrentStatusChange = this.handleCurrentStatusChange.bind(this);\n        this.handleExcludeFailedChange = this.handleExcludeFailedChange.bind(this);\n        this.unload = this.unload.bind(this);\n        this.toggleSidebar = this.toggleSidebar.bind(this);\n        this.getSessions = this.getSessions.bind(this);\n        this.toggleShowData = this.toggleShowData.bind(this);\n        this.executeSearch = this.executeSearch.bind(this);\n        this.toggleModal = this.toggleModal.bind(this);\n        this.toggleHelpModal = this.toggleHelpModal.bind(this);\n        this.getReportTitle = this.getReportTitle.bind(this);\n        this.handleToggleCompositeView = this.handleToggleCompositeView.bind(this);\n\n        // The div that sorrounds the page is in this component but the function that needs to run to be able to make a search is in the child component.\n        // This ref is used to call the child component's function.\n        this.searchBox = React.createRef();\n        this._billResultRefs = [];\n    }\n\n    componentDidMount() {\n        // IF A SEARCH QUERY EXISTS\n        let queryObj = '';\n        const parsed = queryString.parse(this.props.location.search, { decode: false });\n        if (parsed.q) {\n            const base64 = parsed.q;\n            const decodedSearch = window.atob(base64);\n            queryObj = JSON.parse(decodedSearch);\n            this.setState(state => ({\n                ...state,\n                ...queryObj\n            }), () => {\n                if (!parsed.autoReport) {\n                    this.getSessions(queryObj);\n                } else {\n                    this.getSessions(null, parsed.autoReport == 1);\n                }\n            });\n        } else {\n            this.getSessions(null, parsed.autoReport == 1);\n        }\n        this.getBillStatusCategoryOptions();\n        this.getBillVersionOptions();\n        this.getBillSummaryOptions();\n        this.getBillEventOptions();\n        this.getPatronRoles();\n    }\n\n    componentDidUpdate(prevProps, prevState) {\n        if (this.props.location.search !== prevProps.location.search) {\n            this.executeSearch();\n        }\n        if (this.props.nav.session !== prevProps.nav.session) {\n            if (!isNaN(parseInt(this.props.nav.session))) {\n                this.sessionChange(this.props.nav.session);\n            }\n        }\n\n        //get collections if user logs in/logged in user changes\n        if (this.props.login.userProfile.email && this.props.login.userProfile.email !== prevProps.login.userProfile.email) {\n            if (this.state.selectedSession.SessionID && this.props.login.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR)) {\n                this.getCollections(\"?SessionID=\" + this.state.selectedSession.SessionID);\n            } else if (this.state.collections && this.state.collections.length) {\n                this.setState({ collections: [] })\n            }\n        }\n\n        if (this.state.billList !== prevState.billList || this.state.showCategories !== prevState.showCategories) {\n            if (window.innerWidth > 900) { //breaks mobile otherwise, and the sidebar toggle isn't shown on mobile anyways\n                let height = document.getElementById('results-div');\n                if (height && (height.scrollHeight / 540) !== this.state.height) {\n                    this.setState({\n                        height: (height.scrollHeight / 540) >= 1 ? (height.scrollHeight / 540) : 1\n                    })\n                } else {\n                    this.setState({\n                        height: 1\n                    })\n                }\n            }\n        }\n    }\n\n    executeSearch() {\n        let queryObj = '';\n        const parsed = queryString.parse(this.props.location.search, { decode: false });\n        if (parsed.q) {\n            const base64 = parsed.q;\n            const decodedSearch = window.atob(base64);\n            queryObj = JSON.parse(decodedSearch);\n            //Remove any existing entries in the form and replace it with the content of the url\n            this.clearForm();\n            this.setState(state => ({\n                ...state,\n                ...queryObj\n            }), () => {\n                //If a member is already selected and there are no patron types selected then select them all by default for senators and all but sponsor and incorporated for delegates \n                if (this.state.selectedPatron && this.state.selectedPatronType.length === 0) {\n                    const patronRoles = [];\n                    this.state.patronRoles.filter(x => x.PatronTypeID !== 3 && x.PatronTypeID !== 5).forEach(role => patronRoles.push(role.PatronTypeID));\n                    this.setState({\n                        selectedPatronType: patronRoles\n                    });\n                }\n                //If a committee is already selected and there is no legislation status then select 'In Committee' as the status\n                if (this.state.selectedCommittee && !this.state.selectedBillStatusCategory) {\n                    const selectedBillStatusCategory = this.state.billStatusCategoryList.find(status => status.Name === 'In Committee');\n                    this.setState({\n                        selectedBillStatusCategory: selectedBillStatusCategory ? selectedBillStatusCategory.LegislationCategoryID : ''\n                    });\n                }\n                this.getSessions(queryObj);\n            });\n        } else if (!parsed.collection) {\n            //this means the user hit the back button from a query and there are no longer any params in the url, \n            //and the user should be back at the base search page with categories\n            this.clearForm(true);\n        }\n    }\n\n    getSessions(queryObj, autoReport) {\n        let sessions = ''\n        if (!this.state.sessionOptions.length) {\n            sessions = this.props.actions.getSessionList()\n                .then(() => {\n                    this.setState({\n                        sessionOptions: this.props.session.sessionList\n                    })\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err)\n                });\n        } else {\n            sessions = () => Promise.resolve();\n        }\n\n        Promise.all([sessions]).then(() => {\n            let selectedSession = '';\n            let defaultSession = '';\n            this.state.sessionOptions.forEach(session => {\n                if (queryObj && session.SessionID === queryObj.selectedSession) {\n                    selectedSession = session;\n                    this.props.actions.changeSession(session.SessionCode);\n                } else if (session.SessionCode === this.props.nav.session && !selectedSession) {\n                    selectedSession = session;\n                }\n                if (session.IsDefault) {\n                    defaultSession = session;\n                }\n            });\n            //Only set the session to default if the queryObj doesn't have a sessionID and the the session selector doesn't have a sessionID\n            if (!selectedSession) {\n                selectedSession = defaultSession;\n            }\n\n            if (selectedSession) {\n                const sessionStartObj = selectedSession.SessionEvents && selectedSession.SessionEvents.length && selectedSession.SessionEvents.find(date => date.DisplayName === \"Session Start\");\n                const startDate = sessionStartObj ? moment(sessionStartObj.ActualDate).format(\"MM/DD/YYYY\") : '';\n                const dateParam = 'effectiveDate=' + encodeURIComponent(startDate);\n                const sessionParam = 'sessionID=' + selectedSession.SessionID;\n                this.getPatrons(sessionParam);\n                this.getSubjects(sessionParam);\n                this.getCommittees(sessionParam);\n                this.getIntroDates(sessionParam)\n\n                this.setState({ selectedSession }, () => {\n                    if (this.props.login.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR)) {\n                        this.getCollections(\"?SessionID=\" + this.state.selectedSession.SessionID);\n                        if (autoReport) {\n                            window.addEventListener(\"beforeunload\", this.unload);\n                            this.toggleReportMaker();\n                            this.setState({\n                                autoReport: true\n                            })\n                        }\n                    }\n                    if (queryObj && !queryObj.sessionOnly) {\n                        this.setState({ billList: [], fullLegislationList: [], skippedRecords: 0 }, () => {\n                            this.handleSearch()\n                        })\n                    } else {\n                        this.setState({ showCategories: true })\n                    }\n\n                    document.querySelector('body').addEventListener('keydown', this.searchOnEnterPress);\n                })\n            } else {\n                this.setState({ failedToGetSessions: true })\n            }\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    componentWillUnmount() {\n        document.querySelector('body').removeEventListener('keydown', this.searchOnEnterPress);\n        cancelRequest();\n        //Handle leaving the page when we arrived here from the Create Report button in the calendar        \n        if (this.state.autoReport && this.state.selectedCollection != '' && this.state.showReportMaker) {\n            window.removeEventListener(\"beforeunload\", this.unload);\n        }\n    }\n\n    searchOnEnterPress(event) {\n        if (event.key === 'Enter' && !this.state.isFetching) {\n            //Pressing enter while on a react-select will select an option. A search should not happen because of that.\n            if (!event.target.id.includes('react-select') && !event.target.className.includes('note-area') && !event.target.className.includes('quick-search') && event.target.id !== \"userId\" && event.target.id !== \"userPassword\" && event.target.id !== \"report-personal-message\") {\n                if (!this.state.selectedChamber && !this.state.selectedBillEvent && !this.state.selectedBillType && !this.state.selectedCommittee && !this.state.selectedSubcommittee && !this.state.selectedPatron && !this.state.selectedSubject && !this.state.selectedKeywords && !this.state.selectedBillNumbers && !this.state.selectedBillRangeBeginning && !this.state.selectedBillRangeEnd && !this.state.selectedSubject && !this.state.selectedChapterNumber && !this.state.selectedBillStatusCategory) {\n                    //there are not any search parameters provided, don't execute a search\n                    return;\n                }\n                this.searchBox.current.handleSubmit();\n            }\n        }\n    }\n\n    toggleShowCategories(val) {\n        this.setState({\n            showCategories: val\n        }, () => {\n            if (this.state.showCategories) {\n                this.props.history.push(\"/bill-search\");\n            }\n        });\n    }\n\n    toggleGroup(groupName) {\n        this.setState(state => ({\n            [groupName]: !state[groupName]\n        }));\n    }\n\n    toggleShowData(billID, bool) {\n        if (bool === undefined) {\n            this.setState(prevState => ({\n                [billID]: !prevState[billID]\n            }));\n        } else {\n            //not just toggling, we're explicitly setting (e.g. if searching by keyword, and a bill has been expanded, if the keyword search location changes to bill text,\n            //don't just toggle all (which would reset that bill to false), set them all to true)\n            this.setState({\n                [billID]: bool\n            })\n        }\n    }\n\n    clearForm(clearUrl, clearBillData) {\n        this.setState({\n            selectedBillEvent: '',\n            selectedBill: '',\n            selectedKeywords: '',\n            searchedKeywords: '',\n            selectedBillAction: '',\n            billEventStartDate: null,\n            billEventEndDate: null,\n            selectedBillSession: '',\n            selectedBillType: '',\n            selectedBillNumbers: '',\n            selectedBillRangeBeginning: '',\n            selectedBillRangeEnd: '',\n            selectedChapterNumber: '',\n            subcommitteeList: [],\n            selectedPatron: '',\n            selectedPatronType: '',\n            selectedChamber: '',\n            selectedBillStatusCategory: '',\n            billStatusStartDate: null,\n            billStatusEndDate: null,\n            selectedCommittee: '',\n            selectedSubcommittee: '',\n            selectedSubject: '',\n            isPending: null,\n            mostFrequent: null,\n            allLegislation: null,\n            excludeFailed: false,\n            selectedBillVersion: 'All',\n            selectedSummaryVersion: 'All',\n            selectedLocation: 'Caption',\n            displaySelectedLocation: \"Caption\",\n            introductionDate: null\n        }, () => {\n            if (clearUrl) {\n                this.props.history.push('/bill-search');\n                this.setState({ billList: [], fullLegislationList: [], skippedRecords: 0, showCategories: true })\n            }\n            if (clearBillData) {\n                this.setState({\n                    billList: []\n                })\n            }\n        });\n\n    }\n\n    handleSubmit(queryObj) {\n        let encodedSearch = window.btoa(JSON.stringify(queryObj));\n        //if it is the same search (i.e. same parameters) as the current one, updating the url won't work since it will be the same, just execute it manually\n        const parsed = queryString.parse(this.props.location.search, { decode: false });\n        if (parsed.q && parsed.q === encodedSearch) {\n            this.executeSearch();\n        } else {\n            this.props.history.push('/bill-search?q=' + encodedSearch + (this.state.selectedCollection ? '&collection=' + this.state.selectedCollection.WatchListID : ''));\n        }\n    }\n\n    handleSearch(skipIdsCall) {\n        if (this.state.failedToGetSessions) { return; }\n        //Format the selected options to be sent to the API\n        //Add bill range to list of bills\n        let selectedBillNumbers = this.state.selectedBillNumbers.trim();\n        if (this.state.selectedBillRangeBeginning && this.state.selectedBillRangeEnd) {\n            selectedBillNumbers = selectedBillNumbers ? selectedBillNumbers + ',' : selectedBillNumbers;\n            selectedBillNumbers += this.state.selectedBillRangeBeginning + '-' + this.state.selectedBillRangeEnd;\n        }\n        let keywordVersion = null;\n        switch (this.state.selectedLocation) {\n            case ('Bill Text'):\n                if (this.state.selectedBillVersion !== 'All') {\n                    keywordVersion = { KeywordLegislationVersionID: this.state.selectedBillVersion }\n                }\n                break;\n            case ('Summary'):\n                if (this.state.selectedSummaryVersion !== 'All') {\n                    keywordVersion = { KeywordSummaryVersionID: this.state.selectedSummaryVersion }\n                }\n                break;\n        }\n\n        // Build the param array with param names as the keys\n        const params = {\n            ChamberCode: this.state.selectedChamber ? this.state.selectedChamber.value : null,\n            CommitteeID: this.state.selectedSubcommittee || this.state.selectedCommittee || null,\n            PatronTypes: this.state.selectedPatronType || null,\n            LegislationNumbers: selectedBillNumbers ? [{ LegislationNumber: selectedBillNumbers.replaceAll(\" \", \"\") }] : null,\n            ChapterNumber: this.state.selectedChapterNumber,\n            SessionID: this.state.keywordUseGlobalSessionSearch ? null : this.state.selectedSession.SessionID,\n            StartDate: this.state.billStatusStartDate ? moment(this.state.billStatusStartDate).format('MM/DD/YYYY') : null,\n            EndDate: this.state.billStatusEndDate ? moment(this.state.billStatusEndDate).format() : null,\n            KeywordExpression: this.state.selectedKeywords || null,\n            KeywordLocation: this.state.selectedLocation || null,\n            ...keywordVersion,\n            MemberID: this.state.selectedPatron,\n            SubjectIndexID: this.state.selectedSubject,\n            LegislationCategoryID: this.state.selectedBillStatusCategory,\n            LegislationEventTypeID: this.state.selectedBillEvent,\n            EventStartDate: this.state.billEventStartDate ? moment(this.state.billEventStartDate).format(\"MM/DD/YYYY\") : null,\n            EventEndDate: this.state.billEventEndDate ? moment(this.state.billEventEndDate).format(\"MM/DD/YYYY\") : null,\n            IsPending: this.state.isPending || null,\n            MostFrequent: this.state.mostFrequent || null,\n            AllLegislation: this.state.allLegislation || null,\n            KeywordUseGlobalSessionSearch: this.state.keywordUseGlobalSessionSearch,\n            CurrentStatus: this.state.currentStatus,\n            ExcludeFailed: this.state.excludeFailed,\n            IntroductionDate: this.state.introductionDate\n        }\n        //Open the fieldset if one of the form inputs is filled out\n        if (params.LegislationNumbers) {\n            this.setState({\n                billFieldset: true\n            });\n        }\n        if (params.KeywordExpression) {\n            this.setState({\n                keywordFieldset: true\n            });\n        }\n        if (params.LegislationCategoryID || params.ChamberCode) {\n            this.setState({\n                statusFieldset: true\n            });\n        }\n        if (params.EventStartDate || params.EventEndDate) {\n            this.setState({\n                activityFieldset: true\n            });\n        }\n        if (params.MemberID) {\n            this.setState({\n                membersFieldset: true\n            });\n        }\n        if (params.CommitteeID) {\n            this.setState({\n                committeesFieldset: true\n            });\n        }\n        if (params.SubjectIndexID) {\n            this.setState({\n                subjectFieldset: true\n            });\n        }\n\n        this.setState({\n            searchMade: true,\n            displaySelectedLocation: this.state.selectedLocation,\n            showUpdateSearchButton: false\n        });\n\n        //use existing search params if the user has scrolled to the next page (i.e. ignore any possible changes to the params on the side)\n        this.getBillsResults(skipIdsCall && this.state.params ? this.state.params : params, skipIdsCall);\n    }\n\n    getBillsResults(params, skipIdsCall) {\n\n        //if the user searches hb1-hb4 and expands all of these bills to see further info, and then search hb1-hb5, leave open their previously expanded bills for them;\n        //however, if the existing search (if there is one, i.e. this new one is not the first search they're making) is a bill text keyword search, which automatically expands all of them in order to show bill text matches,\n        //then close these in the new search results as there's a good chance they don't care for the expanded info regarding patrons/summary/etc\n        const closeBillInfo = this.state.params?.KeywordLocation === \"Bill Text\" && this.state.params?.KeywordExpression && (params?.KeywordLocation !== \"Bill Text\" || !params?.KeywordExpression);\n\n        this.setState({\n            isFetching: true,\n            showCategories: false,\n            searchedKeywords: params.KeywordExpression //without this, if the user edits the keyword in the adv search box but does not submit, the existing bill version hit count links will nonetheless use the new value and not work\n        })\n\n        if (!this.state.skippedRecords) {\n            window.scrollTo(0, 0);\n        }\n\n        let getResultsPromise;\n        let hasResults = true;\n        let numSearchedIds;\n        if (params.MostFrequent) {\n            getResultsPromise = this.props.actions.getMostFrequentBillList(\"?sessionID=\" + params.SessionID + \"&excludeFailed=\" + params.ExcludeFailed);\n        } else {\n            //break this up into three calls: 1) get the legislation numbers (i.e. 'skinny list') of all results, 2) get the full list of objects with pagination, 3) get the hit counts if it's a billtext keyword search\n            //we need the skinny list to know all the legislation numbers for creating reports, but don't want to get all the data for each yet (i.e. paginate)\n            if (skipIdsCall) {\n                const paginatedLegislationIds = [...this.state.fullLegislationList].slice(this.state.skippedRecords, this.state.skippedRecords + PageSize);\n                getResultsPromise = this.props.actions.getBillListByIds({ \"LegislationIds\": paginatedLegislationIds });\n                numSearchedIds = this.state.numSearchedIds + paginatedLegislationIds.length;\n            } else {\n                getResultsPromise = this.props.actions.getLegislationIdsList(params).then(() => {\n                    let legislationIdsResponse = { ... this.props.bills.legislationIdsList };\n                    //Filter to only one result per bill per session since DB sometimes returns duplicates which messes up pagination\n                    legislationIdsResponse.LegislationIds = legislationIdsResponse.LegislationIds.filter((item, pos) => legislationIdsResponse.LegislationIds.findIndex(i => i.LegislationNumber === item.LegislationNumber && i.SessionID === item.SessionID) === pos);\n                    this.setState({ fullLegislationList: legislationIdsResponse.LegislationIds })\n                    const paginatedLegislationIds = [...legislationIdsResponse.LegislationIds].slice(0, PageSize);\n                    numSearchedIds = paginatedLegislationIds.length;\n                    if (paginatedLegislationIds.length) {\n                        return this.props.actions.getBillListByIds({ \"LegislationIds\": paginatedLegislationIds });\n                    } else {\n                        hasResults = false;\n                        return Promise.resolve();\n                    }\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.setState({\n                        isFetching: false\n                    });\n                })\n            }\n        }\n\n        getResultsPromise.then(() => {\n            let billList;\n            if (!params.MostFrequent && this.state.skippedRecords) {\n                billList = [...this.state.billList.concat(hasResults ? this.props.bills.billListByIds : [])];\n            } else if (!params.MostFrequent) {\n                billList = hasResults ? [...this.props.bills.billListByIds] : [];\n            } else {\n                billList = [...this.props.bills.mostFrequentBillList];\n            }\n            //Filter to only one result per bill per session since DB sometimes returns duplicates which messes up pagination\n            billList = billList.filter((item, pos) => billList.findIndex(i => i.LegislationNumber === item.LegislationNumber && i.SessionID === item.SessionID) === pos);\n            this.setState({\n                params: params,\n                billList: billList,\n                numSearchedIds,\n                totalResults: billList && billList.length ? params.MostFrequent ? billList.length : this.state.fullLegislationList.length : 0, //if we got IDs back but no full legislation object results, display '0 Results' since none are actually being shown. Example of this is when you search a bill number with cross session turned on\n                hasNextPage: numSearchedIds && this.state.fullLegislationList.length > numSearchedIds ? true : false,\n                isFetching: false,\n                checkedBills: !params.MostFrequent && this.state.skippedRecords ? this.state.checkedBills : [],\n                lastCheckedBill: !params.MostFrequent && this.state.skippedRecords ? this.state.lastCheckedBill : -1,\n                selectAllBills: false,\n                displayCrossSession: this.state.keywordUseGlobalSessionSearch\n            }, () => {\n                if (closeBillInfo)\n                    [...this.state.billList].forEach(b => this.toggleShowData(b.LegislationID, false))\n                const options = {\n                    root: null,\n                    rootMargin: \"0px\",\n                    threshold: 1.0\n                };\n\n                this.observer = new IntersectionObserver(\n                    this.handleObserver.bind(this),\n                    options\n                );\n                this.observer.observe(this.loadingRef);\n\n                //if bill text search, get hit counts\n                if (params.KeywordLocation === 'Bill Text' && params.KeywordExpression && hasResults) {\n                    const LOADING = 'LOADING';\n                    const legislationTextIDs = [...this.props.bills.billListByIds].map(bill => bill.SearchText && bill.SearchText.map(text => { text.countMatches = LOADING; return { \"LegislationTextID\": text.LegislationTextID } })).flat();\n                    let hitCountRequestBody = {\n                        \"Documents\": legislationTextIDs,\n                        \"Location\": \"Bill Text\",\n                        \"KeywordExpression\": params.KeywordExpression\n                    };\n\n                    this.props.actions.getLegislationTextsHitCounts(hitCountRequestBody).then(() => {\n                        const hitCounts = [...this.props.bills.legislationTextsHitCounts];\n                        billList = [...this.state.billList];\n                        hitCounts.forEach(hitCount => {\n                            const associatedBillSearchTextIndexes = billList.reduce((r, b, i) => r.concat(b.SearchText && b.SearchText.find(st => st.LegislationTextID === hitCount.LegislationTextID) ? i : []), []);\n                            associatedBillSearchTextIndexes.forEach(index => {\n                                billList[index].SearchText.find(st => st.LegislationTextID === hitCount.LegislationTextID).countMatches = hitCount.HitCount;\n                            })\n                        })\n                        billList.filter(bill => bill.SearchText && bill.SearchText.find(st => st.countMatches === LOADING)).forEach(bill => {\n                            bill.SearchText.filter(st => st.countMatches === LOADING).forEach(st => { st.countMatches = null })\n                        })\n\n                        this.setState({ billList })\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.setState({\n                            isFetching: false\n                        });\n                    })\n                }\n            })\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            this.setState({\n                isFetching: false\n            });\n        })\n    }\n\n    handleObserver(entities, observer) {\n        const y = entities[0].boundingClientRect.y;\n        if (!this.state.showCategories && this.state.billList.length && this.state.hasNextPage && !this.state.isFetching && this.state.prevY > y) {\n            this.setState({ skippedRecords: this.state.numSearchedIds }, () => {\n                if (!this.state.selectedCollection || this.state.searchMade) {\n                    this.handleSearch(true);\n                } else {\n                    const bills = [...this.state.selectedCollection.WatchListLegislation].filter(l => !l.DeletionDate).map(l => l.LegislationID);\n                    if (bills.length > 0) {\n                        let legislationIds = [];\n                        for (let i = 0; i < bills.length; i++) {\n                            legislationIds.push({ LegislationId: bills[i] });\n                        }\n\n                        const params = {\n                            LegislationIDs: legislationIds,\n                            SessionID: this.state.selectedSession.SessionID\n                        }\n\n                        this.setState({ searchMade: false }, () => {\n                            this.getBillsResults(params, true);\n                        })\n                    }\n                }\n            });\n        }\n        this.setState({ prevY: y });\n    }\n\n    getBillStatusCategoryOptions() {\n        // Get Bill Status references for bill status typeahead\n        this.props.actions.getBillStatusCategoryReferences().then(() => {\n            let billStatusReferences = [...this.props.bills.billStatusCategoryReferences];\n            billStatusReferences.forEach(ref => {\n                ref.label = ref.Name\n                ref.value = ref.LegislationCategoryID\n            });\n            if (this.state.selectedCommittee && !this.state.selectedBillStatusCategory) {\n                const selectedBillStatusCategory = billStatusReferences.find(status => status.Name === 'In Committee');\n                this.setState({\n                    selectedBillStatusCategory: selectedBillStatusCategory ? selectedBillStatusCategory.LegislationCategoryID : ''\n                });\n            }\n            this.setState({\n                billStatusCategoryList: billStatusReferences,\n                billStatusCategoryListIsLoading: false\n            });\n        });\n    }\n\n    getBillVersionOptions() {\n        this.props.actions.getBillVersionRef().then(() => {\n            let topOfList = [{ Name: 'All Versions', LegislationVersionID: 'All' }];\n            let billVersionReferences = topOfList.concat(this.props.bills.billVersionRef);\n            billVersionReferences.forEach(ref => {\n                ref.label = ref.Name\n                ref.value = ref.LegislationVersionID\n            });\n            this.setState({\n                billVersionList: billVersionReferences,\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n        });\n    }\n\n    getBillSummaryOptions() {\n        this.props.actions.getBillSummaryRef().then(() => {\n            let topOfList = [{ Name: 'All Summary Versions', SummaryVersionID: 'All' }];\n            let billSummaryReferences = topOfList.concat(this.props.bills.billSummaryRef);\n            billSummaryReferences.forEach(ref => {\n                ref.label = ref.Name\n                ref.value = ref.SummaryVersionID\n            });\n            this.setState({\n                billSummaryList: billSummaryReferences,\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n        });\n    }\n\n    getBillEventOptions() {\n        this.props.actions.getBillEventReferences(\"?isSearchable=true&isActive=true\").then(() => {\n            let billEventReferences = [...this.props.bills.billEventRef];\n            billEventReferences.forEach(ref => {\n                ref.label = ref.LegislationDescription\n                ref.value = `${ref.EventCode}-${ref.IsPassed}`\n            });\n            this.setState({\n                billEventOptions: billEventReferences\n            });\n        });\n    }\n\n    getPatrons(sessionParam) {\n        // Get Patrons list for typeahead\n        this.props.actions.getMemberList(sessionParam).then(() => {\n            let memberList = [...this.props.members.memberList];\n            memberList.forEach(patron => {\n                patron.label = patron.ListDisplayName + ' ' + '(' + patron.ChamberCode + ')';\n                patron.value = patron.MemberID;\n            });\n            const member = memberList.find(member => member.MemberID === this.state.selectedPatron);\n            let selectedPatronType = [];\n            if (member && this.state.selectedPatronType.length === 0) {\n                this.state.patronRoles.filter(x => x.PatronTypeID !== 3 && x.PatronTypeID !== 5).forEach(role => selectedPatronType.push(role.PatronTypeID));\n                this.setState({\n                    selectedPatronType: selectedPatronType\n                });\n            }\n            this.setState({\n                patronList: memberList,\n                filteredPatronList: memberList,\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    getSubjects(sessionParam) {\n        this.props.actions.getSubjectList('?' + sessionParam)\n            .then(() => {\n                this.setState({\n                    subjectList: this.props.bills.subjectList\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    getPatronRoles() {\n        this.props.actions.getPatronRoles()\n            .then(() => {\n                const patronRoles = [...this.props.patrons.patronRoles];\n                patronRoles.forEach(role => {\n                    role.label = role.Name;\n                    role.value = role.PatronTypeID;\n                });\n                this.setState({\n                    patronRoles: patronRoles,\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    getCommittees(sessionParam) {\n        this.props.actions.getCommitteeList(sessionParam).then(() => {\n            let committeeList = [...this.props.committee.committeeList];\n            committeeList.forEach(committee => {\n                committee.label = committee.Name;\n                committee.value = committee.CommitteeID;\n            });\n            let groupedCommitteeList = [{ \"label\": \"House Committees\", \"ChamberCode\": \"H\", \"options\": committeeList.filter(c => c.ChamberCode === \"H\") }, { \"label\": \"Senate Committees\", \"ChamberCode\": \"S\", \"options\": committeeList.filter(c => c.ChamberCode === \"S\") }]\n            this.setState({\n                committeeList: committeeList.map(c => ({ ...c, label: c.label + ' ' + '(' + c.ChamberCode + ')' })),\n                groupedCommitteeList: groupedCommitteeList,\n                filteredCommitteeList: groupedCommitteeList\n            });\n            //If a committee is already selected then that committee's subcommittees need to be retrieved\n            if (this.state.selectedCommittee) {\n                this.getSubcommittees(this.state.selectedCommittee);\n            }\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err)\n        });\n    }\n\n    getSubcommittees(id) {\n        this.props.actions.getCommitteeList(\"parentCommitteeID=\" + id)\n            .then(() => {\n                let committeeList = [...this.props.committee.committeeList];\n                committeeList.forEach(committee => {\n                    committee.label = '(' + committee.ChamberCode + ') ' + committee.Name;\n                    committee.value = committee.CommitteeID;\n                });\n                this.setState({\n                    subcommitteeList: committeeList\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    getIntroDates(sessionParam) {\n        this.props.actions.getIntroDateList('?' + sessionParam)\n            .then(() => {\n                let datesList = [];\n                this.props.bills.introDateList.forEach(date => datesList.push(moment(date.IntroductionDate)));\n                this.setState({\n                    introDateList: datesList\n                })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    sessionChange(code) {\n        const selectedSession = this.state.sessionOptions.find(session => session.SessionCode === code);\n        if (!selectedSession) {\n            return;\n        }\n        const sessionParam = 'sessionID=' + selectedSession.SessionID;\n        this.getPatrons(sessionParam);\n        this.getSubjects(sessionParam);\n        this.getCommittees(sessionParam);\n        this.getIntroDates(sessionParam);\n        this.getCollections(\"?SessionID=\" + selectedSession.SessionID);\n\n        const parsed = queryString.parse(this.props.location.search, { decode: false });\n        if (parsed.q) {\n            const base64 = parsed.q;\n            const decodedSearch = window.atob(base64);\n            let queryObj = JSON.parse(decodedSearch);\n            if (queryObj.selectedSession) {\n                queryObj.selectedSession = selectedSession.SessionID;\n                this.handleSubmit(queryObj);\n                return;\n            }\n        } else {\n            this.setState({ currentStatus: selectedSession.IsActive })\n        }\n\n        if (this.state.selectedBillStatusCategory) {\n            this.setState({\n                selectedPatron: '',\n                selectedPatronType: '',\n                selectedCommittee: '',\n                selectedSubcommittee: '',\n                selectedSubject: '',\n                selectedSession: selectedSession,\n                billList: [],\n                fullLegislationList: [],\n                skippedRecords: 0\n            }, () => {\n                this.handleSearch();\n            });\n        } else {\n            this.setState({\n                selectedPatron: '',\n                selectedPatronType: '',\n                selectedCommittee: '',\n                selectedSubcommittee: '',\n                selectedSubject: '',\n                selectedSession: selectedSession,\n                billList: [],\n                fullLegislationList: [],\n                skippedRecords: 0\n            }, () => {\n                const parsed = queryString.parse(this.props.location.search, { decode: false });\n                if (parsed.q) {\n                    this.handleSearch();\n                }\n            });\n        }\n    }\n\n    chamberChange(value) {\n        this.setState({\n            selectedChamber: value\n        });\n        if (value) {\n            const patronList = [...this.state.patronList];\n            const committeeList = [...this.state.groupedCommitteeList];\n            //Remove the patrons from the patronList that do not fit the current selected chamber\n            //Remove the committees from the committee list that do not fit the current selected chamber\n            let filteredPatronList = patronList.filter(patron => patron.ChamberCode === value.value);\n            let filteredCommitteeList = committeeList.filter(committee => committee.ChamberCode === value.value);\n            this.setState({\n                filteredPatronList: filteredPatronList,\n                filteredCommitteeList: filteredCommitteeList,\n            });\n        } else {\n            // 'all' has been selected so show all patrons/committees\n            this.setState({\n                filteredPatronList: this.state.patronList,\n                filteredCommitteeList: this.state.groupedCommitteeList,\n            });\n        }\n        // Reset all the values that are chamber specific\n        this.setState({\n            selectedPatron: '',\n            selectedPatronType: '',\n            selectedCommittee: '',\n            selectedSubcommittee: ''\n        });\n    }\n\n    committeeChange(opt) {\n        this.setState({\n            selectedCommittee: opt ? opt.value : null,\n            selectedSubcommittee: null\n        });\n        if (opt) {\n            if (!this.state.selectedBillStatusCategory) {\n                const selectedBillStatusCategory = this.state.billStatusCategoryList.find(status => status.Name === 'In Committee');\n                this.setState({\n                    selectedBillStatusCategory: selectedBillStatusCategory ? selectedBillStatusCategory.LegislationCategoryID : ''\n                });\n            }\n            this.getSubcommittees(opt.CommitteeID)\n        };\n    }\n\n    handlePatronChange(opt) {\n        let patronTypes = [];\n        if (opt) {\n            this.state.patronRoles.filter(x => x.PatronTypeID !== 3 && x.PatronTypeID !== 5).forEach(role => patronTypes.push(role.PatronTypeID));\n        }\n        this.setState({\n            selectedPatron: opt ? opt.value : null,\n            selectedPatronType: patronTypes\n        });\n    }\n\n    handlePatronTypeChange(options) {\n        let values = [];\n        if (options) {\n            options.forEach(opt => values.push(opt.value));\n        }\n        this.setState({\n            selectedPatronType: values\n        });\n    }\n\n    handleSelectChange = (opt, name) => {\n        this.setState({\n            [name]: opt ? opt.value : null\n        });\n        if (name === 'selectedBillStatusCategory') {\n            if (opt === null || (opt && [2, 3, 4, 6, 7, 11, 22, 16, 17, 21, 27].includes(opt.LegislationCategoryID))) {\n                this.setState({\n                    currentStatus: true,\n                    billStatusStartDate: null,\n                    billStatusEndDate: null\n                });\n            } else if ([1, 5, 23, 24, 18, 26, 29, 8, 9, 10, 19, 14, 20, 25, 13, 15, 28].includes(opt.LegislationCategoryID)) {\n                this.setState({\n                    currentStatus: false\n                });\n            }\n        }\n    }\n\n    handleDateChange = (val, name) => {\n        this.setState({\n            [name]: val\n        });\n    }\n\n    handleTextChange = (evt, name) => {\n        let value = evt.target.value;\n        if (['selectedChapterNumber', 'selectedBillRangeBeginning', 'selectedBillRangeEnd'].includes(name)) {\n            value = value.replace(/[^a-zA-Z0-9]/, \"\");\n        }\n        this.setState({ [name]: value });\n    }\n\n    handleSelectionClear(key) {\n        //Clearing some form inputs changes the value of other form inputs. Handle them here.\n        this.setState({ showUpdateSearchButton: true }, () => {\n            switch (key) {\n                case \"selectedBillStatusCategory\":\n                    this.handleSelectChange(null, \"selectedBillStatusCategory\");\n                    break;\n                case \"selectedPatron\":\n                    this.handlePatronChange(null);\n                    break;\n                case \"selectedCommittee\":\n                    this.committeeChange(null);\n                    break;\n                case \"selectedChamber\":\n                    this.chamberChange(null);\n                    break;\n                default:\n                    this.setState({\n                        [key]: ''\n                    });\n            }\n\n            if (!localStorage.getItem('searchModalDismissed')) {\n                this.toggleModal();\n                localStorage.setItem('searchModalDismissed', true);\n            }\n        })\n    }\n\n    handleMultiSelectionClear(key, index) {\n        let value = [...this.state[key]];\n        value.splice(index, 1);\n        this.setState({\n            [key]: value,\n            showUpdateSearchButton: true\n        })\n    }\n\n    handleRadioChange() {\n        if (window.env && window.env.HISTORICAL_DATA_REDIRECT && !this.state.keywordUseGlobalSessionSearch && !this.props.login.userClaims.roles.find(role => role === \"CrossSearch\")) {\n            this.setState({\n                historicalSessionRedirect: (redirect) => {\n                    if (redirect) {\n                        let a = document.createElement('a');\n                        a.target = '_blank';\n                        a.href = `https://legacylis.virginia.gov`;\n                        document.body.appendChild(a);\n                        a.click();\n                        document.body.removeChild(a);\n                    }\n                    this.setState({ historicalSessionRedirect: false })\n                }\n            })\n            return;\n        }\n        this.setState({\n            keywordUseGlobalSessionSearch: !this.state.keywordUseGlobalSessionSearch\n        }, () => {\n            if (this.state.keywordUseGlobalSessionSearch) {\n                this.setState({\n                    excludeFailed: false\n                })\n            }\n        })\n    }\n\n    handleCurrentStatusChange() {\n        this.setState({\n            currentStatus: !this.state.currentStatus\n        }, () => {\n            if (this.state.currentStatus) {\n                this.setState({\n                    billStatusStartDate: null,\n                    billStatusEndDate: null\n                })\n            }\n        })\n    }\n\n    handleExcludeFailedChange() {\n        this.setState({\n            excludeFailed: !this.state.excludeFailed,\n            showUpdateSearchButton: true\n        })\n    }\n\n    getCollections(params) {\n        this.setState({\n            collectionIsLoading: true\n        });\n        this.props.actions.getCollections(params)\n            .then(() => {\n                const parsed = queryString.parse(this.props.location.search);\n                const collectionIndex = this.props.collection.collections.findIndex(coll => coll.WatchListID === parseInt(parsed.collection))\n                this.setState({\n                    collections: this.props.collection.collections,\n                    collectionIsLoading: false,\n                }, () => {\n                    if (collectionIndex !== -1) {\n                        this.selectCollection(collectionIndex)\n                    }\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return\n                }\n                this.setState({\n                    collectionIsLoading: false\n                });\n            });\n        this.props.actions.getCriteriaTypes()\n            .then(() => {\n                this.setState({\n                    criteriaTypes: this.props.collection.criteriaTypes\n                })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    selectCollection(collectionIndex, returningFromSearch) {\n        if (collectionIndex === -1) {\n            this.setState({\n                selectedCollectionIndex: -1,\n                quickAddErr: '',\n                selectedCollection: '',\n                billList: [],\n                fullLegislationList: [],\n                skippedRecords: 0,\n                searchMade: true\n            })\n            this.props.history.push('/bill-search');\n            this.clearForm();\n        } else {\n            // Remove object references so the state does not mutate\n            const selectedCollection = JSON.parse(JSON.stringify(this.state.collections[collectionIndex] || ''))\n            if (selectedCollection.IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\"))) {\n                alert(\"The watchlist you are trying to access is a paid watchlist. As a free user, you are no longer able to access this watchlist.\");\n                return;\n            }\n            const parsed = queryString.parse(this.props.location.search, { decode: false });\n            let sessionOnly = false;\n            if (parsed.q) {\n                const base64 = parsed.q;\n                const decodedSearch = window.atob(base64);\n                const queryObj = JSON.parse(decodedSearch);\n                sessionOnly = queryObj.sessionOnly || false;\n            }\n            if (returningFromSearch || !parsed.q || sessionOnly)\n                this.props.history.push(`/bill-search?collection=${selectedCollection.WatchListID}`)\n            this.setState({\n                selectedCollectionIndex: collectionIndex,\n                selectedCollection: selectedCollection,\n                showCategories: false,\n                billList: !returningFromSearch && parsed.q ? this.state.billList : [],\n                fullLegislationList: !returningFromSearch && parsed.q ? this.state.fullLegislationList : [],\n                skippedRecords: !returningFromSearch && parsed.q ? this.state.skippedRecords : 0,\n                searchMade: !returningFromSearch && parsed.q ? this.state.searchMade : false,\n                showAllNotes: !returningFromSearch && parsed.q ? this.state.showAllNotes : false\n            });\n            if (returningFromSearch || !parsed.q || sessionOnly) {\n                const bills = selectedCollection.WatchListLegislation.filter(l => !l.DeletionDate).sort(sortLegislations).map(l => l.LegislationID);\n                if (bills.length > 0) {\n                    let legislationIds = [];\n                    for (let i = 0; i < bills.length; i++) {\n                        legislationIds.push({ LegislationId: bills[i] });\n                    }\n\n                    const params = {\n                        LegislationIDs: legislationIds,\n                        SessionID: this.state.selectedSession.SessionID\n                    }\n                    this.getBillsResults(params);\n                }\n                this.clearForm();\n            }\n        }\n    }\n\n    handleCollectionChange(collection, callback) {\n        if (this.state.collectionIsSaving) {\n            return\n        }\n        this.setState({\n            collectionIsSaving: true\n        });\n        this.props.actions.saveCollections({ WatchLists: [collection] })\n            .then(() => {\n                let collectionSave = [...this.props.collection.collectionSave][0];\n                // The api does not return WatchListLegislation or NotificationCriterias at all if it is empty. To stop it from being undefined it is set to a blank array.\n                collectionSave.WatchListLegislation = collectionSave.WatchListLegislation || [];\n                collectionSave.NotificationCriterias = collectionSave.NotificationCriterias || [];\n                let collections = [...this.state.collections];\n                const savedCollectionIndex = collections.findIndex(coll => coll.WatchListID === collectionSave.WatchListID);\n                collections[savedCollectionIndex] = collectionSave;\n                this.setState({\n                    collectionIsSaving: false,\n                    collections: collections,\n                    selectedCollection: collectionSave\n                }, () => {\n                    if (callback) {\n                        callback();\n                    }\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                if (callback) {\n                    callback(err);\n                }\n                this.setState({\n                    collectionIsSaving: false\n                });\n                let message;\n                if (err && JSON.parse(err)) {\n                    const errorMsg = JSON.parse(err).Name;\n                    message = errorMsg && errorMsg.includes('Public users are') ? errorMsg : 'Save Failed'\n                } else {\n                    message = \"Save Failed\";\n                }\n                this.props.actions.makeToast([{ message: message, type: \"failure\", long: message.includes('Public users are') }]);\n            });\n    }\n\n    createCollection(collection) {\n        this.setState({\n            collectionIsSaving: true\n        });\n        this.props.actions.saveCollections({ WatchLists: [collection] }, true)\n            .then(() => {\n                let collections = [...this.state.collections];\n                let selectedCollection = [...this.props.collection.collectionSave][0]\n                // The api does not return WatchListLegislation or NotificationCriterias at all if it is empty. To stop it from being undefined it is set to a blank array.\n                selectedCollection.WatchListLegislation = selectedCollection.WatchListLegislation || [];\n                selectedCollection.NotificationCriterias = selectedCollection.NotificationCriterias || [];\n                collections.unshift(selectedCollection);\n                this.setState({\n                    collections: collections,\n                    collectionIsSaving: false,\n                    showCategories: false\n                }, () => {\n                    this.selectCollection(0)\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    collectionIsSaving: false\n                });\n                let message;\n                if (err && JSON.parse(err)) {\n                    const errorMsg = JSON.parse(err).Name;\n                    message = errorMsg && errorMsg.includes('Public users are') ? errorMsg : 'Save Failed'\n                } else {\n                    message = \"Save Failed\";\n                }\n                this.props.actions.makeToast([{ message: message, type: \"failure\", long: message.includes('Public users are') }]);\n            });\n    }\n\n    deleteCollection() {\n        this.setState({\n            collectionIsSaving: true\n        });\n        let collection = { ...this.state.selectedCollection };\n        let selectedCollectionIndex = this.state.selectedCollectionIndex;\n        collection.DeletionDate = new Date();\n        this.props.actions.saveCollections({ WatchLists: [collection] })\n            .then(() => {\n                let collections = [...this.state.collections];\n                const idx = collections.findIndex(coll => coll.WatchListID === collection.WatchListID);\n                if (idx > -1)\n                    collections.splice(idx, 1);\n                else\n                    collections.splice(selectedCollectionIndex, 1);\n                this.setState({\n                    selectedCollection: '',\n                    selectedCollectionIndex: -1,\n                    collections: collections,\n                    collectionIsSaving: false,\n                    searchMade: true,\n                    billList: [],\n                    fullLegislationList: [],\n                    skippedRecords: 0\n                });\n\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                this.setState({\n                    collectionIsSaving: false,\n                });\n                this.props.actions.makeToast([{ message: \"Delete Failed\", type: \"failure\" }]);\n            });\n    }\n\n    addToWatchlists(watchlists, merge, callback) {\n        let billsToAdd = [];\n        if (merge) {\n            let selectedCollection = { ...this.state.selectedCollection };\n            if (selectedCollection) {\n                selectedCollection.WatchListLegislation.filter(l => !l.DeletionDate).forEach(leg => { billsToAdd.push(leg) })\n            } else {\n                return;\n            }\n        } else {\n            this.state.checkedBills.forEach((c, i) => {\n                if (c) {\n                    billsToAdd.push(this.state.billList[i])\n                }\n            });\n        }\n        let duplicatedBills = [];\n        watchlists.forEach(watchlist => {\n            billsToAdd.forEach(bill => {\n                if (watchlist.__isNew__) {\n                    watchlist.Name = watchlist.label;\n                    watchlist.Description = `Created on ${moment().format('MM/DD/YYYY')}`;\n                    watchlist.WatchListLegislation = [];\n                    delete watchlist.label;\n                    delete watchlist.__isNew__;\n                    delete watchlist.value;\n                }\n                // Make sure the bill isn't already a part of the watchlist\n                if (!watchlist.WatchListLegislation.find(leg => leg.LegislationID === bill.LegislationID) || watchlist.WatchListLegislation.find(leg => leg.LegislationID === bill.LegislationID).DeletionDate) {\n                    watchlist.WatchListLegislation.push({\n                        LegislationID: bill.LegislationID,\n                        LegislationNumber: bill.LegislationNumber,\n                        Sessions: [{ SessionID: bill.SessionID }],\n                        WatchListID: watchlist.WatchListID,\n                        Note: merge ? bill.Note : null\n                    });\n                } else if (merge && bill.Note && !watchlist.WatchListLegislation.find(leg => leg.LegislationID === bill.LegislationID).Note) { //merge note if there is not already one in the target watchlist for that bill\n                    const leg = watchlist.WatchListLegislation.find(leg => leg.LegislationID === bill.LegislationID);\n                    leg.Note = bill.Note;\n                } else {\n                    duplicatedBills.push({ \"Watchlist\": watchlist.Name, \"LegislationNumber\": bill.LegislationNumber });\n                }\n            });\n        })\n\n        this.setState({\n            collectionIsSaving: true\n        }, () => {\n            let collections = [...this.state.collections];\n            this.props.actions.saveCollections({ WatchLists: watchlists })\n                .then(() => {\n                    let watchlistSave = [...this.props.collection.collectionSave];\n                    let savedCollectionIndex;\n                    watchlistSave.forEach(res => {\n                        if (!collections.find(coll => coll.WatchListID === res.WatchListID)) {\n                            collections.unshift(res);\n                            savedCollectionIndex = 0;\n                        } else {\n                            savedCollectionIndex = collections.findIndex(coll => coll.WatchListID === res.WatchListID);\n                            collections[savedCollectionIndex] = res;\n                        }\n                        res.WatchListLegislation = res.WatchListLegislation || [];\n                        res.NotificationCriterias = res.NotificationCriterias || [];\n                    })\n\n                    this.setState({\n                        collectionIsSaving: false,\n                        collections: collections,\n                        selectedCollection: watchlists.length === 1 && !merge ? collections[savedCollectionIndex] : this.state.selectedCollection,\n                        selectedCollectionIndex: watchlists.length === 1 && !merge ? savedCollectionIndex : this.state.selectedCollectionIndex\n                    });\n                    if (duplicatedBills.length && !merge) {\n                        this.props.actions.makeToast([{ message: (new Set(duplicatedBills.map(b => b.LegislationNumber)).size === 1 ? (duplicatedBills[0].LegislationNumber + \" is \") : \"Multiple added bills were \") + \"already in \" + (watchlists.length === 1 ? \"this watchlist. \" : \"one or more of these watchlists. \") + (watchlists.length === 1 ? ((billsToAdd.length - duplicatedBills.length) + \" bills were added to your watchlist \" + watchlists[0].Name) : \"All other bills were added.\"), type: \"warning\", long: true }]);\n                    } else if (!merge) {\n                        this.props.actions.makeToast([{ message: (billsToAdd.length === 1 ? billsToAdd[0].LegislationNumber + \" was \" : billsToAdd.length + \" bills were \") + \"added to your watchlist\" + (watchlists.length > 1 ? \"s\" : (\" \" + watchlists[0].Name)), type: \"success\" }]);\n                    } else {\n                        this.props.actions.makeToast([{ message: \"Watchlists have successfully been merged\", type: \"success\" }]);\n                    }\n                    if (callback) {\n                        callback(collections)\n                    }\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err)\n                    this.setState({\n                        collectionIsSaving: false\n                    });\n                    let message;\n                    if (err && JSON.parse(err)) {\n                        const errorMsg = JSON.parse(err).Name;\n                        message = errorMsg && errorMsg.includes('Public users are') ? errorMsg : 'Save Failed'\n                    } else {\n                        message = \"Save Failed\";\n                    }\n                    this.props.actions.makeToast([{ message: message, type: \"failure\", long: message.includes('Public users are') }]);\n                })\n        });\n    }\n\n    removeWatchlistBills() {\n        let selectedCollection = { ...this.state.selectedCollection };\n        let billList = [...this.state.billList];\n        let fullLegislationList = [...this.state.fullLegislationList];\n        let removedBillCount = 0;\n        this.state.checkedBills.forEach((_cb, cbIndex) => {\n            if (_cb) { //sometimes the value will be undefined, don't use those\n                const legislationIndex = selectedCollection.WatchListLegislation.findIndex(leg => !leg.DeletionDate && leg.LegislationID === this.state.billList[cbIndex].LegislationID);\n                if (legislationIndex !== -1) {\n                    selectedCollection.WatchListLegislation[legislationIndex].DeletionDate = new Date().toISOString();\n                    billList.splice(cbIndex - removedBillCount, 1);\n                    fullLegislationList.splice(cbIndex - removedBillCount, 1);\n                    removedBillCount++; //need to know how many we've removed since the index for billList won't be accurate anymore the next time through\n                }\n            }\n        });\n        this.setState({\n            checkedBills: [],\n            billList: billList,\n            fullLegislationList: fullLegislationList,\n            totalResults: billList.length\n        });\n        this.handleCollectionChange(selectedCollection);\n    }\n\n    toggleReportMaker(autoReport) {\n        this.setState(state => ({\n            showReportMaker: !state.showReportMaker,\n        }), () => {\n            //Delete the watchlist if we arrived at this report from the interactive calendar Create Report button\n            //Should only be triggered by closing a report maker that was opened automatically\n            if (autoReport) {\n                this.deleteCollection();\n            }\n        });\n    }\n\n    toggleAllBills() {\n        const opposite = !this.state.selectAllBills;\n        let checkedBills = [...this.state.checkedBills];\n        checkedBills = new Array(this.state.billList.length).fill(opposite);\n        this.setState({\n            selectAllBills: opposite,\n            checkedBills: checkedBills,\n            lastCheckedBill: -1\n        });\n    }\n\n    handleBillCheckbox(billIndex, e) {\n        let checkedBills = [...this.state.checkedBills];\n        let lastCheckedBill = this.state.lastCheckedBill;\n        if (e.nativeEvent.shiftKey && this.state.lastCheckedBill !== -1) {\n            checkedBills = checkedBills.fill(false);\n            for (let i = 0; i < Math.abs(billIndex - this.state.lastCheckedBill); i++) {\n                const index = this.state.lastCheckedBill + i * (billIndex - this.state.lastCheckedBill) / Math.abs(billIndex - this.state.lastCheckedBill);\n                checkedBills[index] = true;\n            }\n        } else {\n            lastCheckedBill = !checkedBills[billIndex] ? billIndex : this.state.lastCheckedBill;\n        }\n        checkedBills[billIndex] = !checkedBills[billIndex]\n        this.setState({\n            checkedBills: checkedBills,\n            lastCheckedBill: lastCheckedBill\n        });\n    }\n\n    quickAddBills(billsToAdd, callback) {\n        let billsToSearchFor = \"\";\n        let duplicatedBills = [];\n        let ranges = [];\n        let exitFn = false;\n        this.setState({ quickAddErr: null });\n        if (this.state.selectedCollection.WatchListLegislation && this.state.selectedCollection.WatchListLegislation.filter(l => !l.DeletionDate).length > 0) {\n            const existingWatchListLegislation = [...new Set(this.state.selectedCollection.WatchListLegislation.filter(l => !l.DeletionDate).map(l => l.LegislationNumber.toUpperCase()))];\n            billsToSearchFor += existingWatchListLegislation.join(\", \");\n            let billsToAddArray = billsToAdd.split(\",\");\n            billsToAddArray.every(b => {\n                if (b.includes('-')) { //range (e.g. hb5-hb10)\n                    const rangeStartAndEnd = b.split('-'); // e.g. ['hb5', 'hb10']\n                    const rangeStart = rangeStartAndEnd[0]; // e.g. 'hb5'\n                    const rangeStartNumber = Number.parseInt(rangeStart.replace(/^\\D+/g, '')); // e.g. 5\n                    const rangeEnd = rangeStartAndEnd[1];\n                    const rangeEndNumber = Number.parseInt(rangeEnd.replace(/^\\D+/g, '')); // e.g. 10\n                    const prefix = rangeStart.replace(/\\d+/, \"\").trim().toUpperCase();\n\n                    if (!prefix || !validLegPrefixes.includes(prefix) || !rangeStartNumber || !rangeEndNumber || Number.isNaN(rangeStartNumber) || Number.isNaN(rangeEndNumber) || rangeStartNumber > rangeEndNumber) {\n                        this.setState({ quickAddErr: 'Invalid range. No bills added.' }); //return this message to the user\n                        callback(true);\n                        exitFn = true; //can't quit the outer function from within every(), forEach(), etc., so store as bool to use later\n                        return false; //exit the every()\n                    }\n                    for (let i = rangeStartNumber; i <= rangeEndNumber; i++) {\n                        const billNumber = prefix + i.toString().trim().toUpperCase();\n                        if (!existingWatchListLegislation.includes(billNumber)) {\n                            billsToSearchFor += \", \" + billNumber;\n                        } else {\n                            duplicatedBills.push(billNumber);\n                        }\n                    }\n                    ranges.push({ prefix: prefix, rangeStart: rangeStartNumber, rangeEnd: rangeEndNumber })\n                } else { //individual\n                    const billKey = Number.parseInt(b.replace(/^\\D+/g, '')); // e.g. 5\n                    if (!billKey) {\n                        this.setState({ quickAddErr: 'Invalid bill number: ' + b.trim() + ' (No bills added)' }); //return this message to the user\n                        callback(true);\n                        exitFn = true; //can't quit the outer function from within every(), forEach(), etc., so store as bool to use later\n                        return false; //exit the every()\n                    }\n\n                    const prefix = b.replace(/\\d+/, \"\").trim().toUpperCase();\n                    if (!validLegPrefixes.includes(prefix)) {\n                        this.setState({ quickAddErr: 'Invalid bill prefix: ' + prefix + ' (No bills added)' });\n                        callback(true);\n                        exitFn = true;\n                        return false;\n                    }\n\n                    if (!existingWatchListLegislation.includes(b.trim().toUpperCase())) {\n                        billsToSearchFor += \", \" + b.trim();\n                    } else {\n                        duplicatedBills.push(b.trim().toUpperCase())\n                    }\n                }\n                return true;\n            })\n        } else { //no legislation currently in the existing watchlist\n            if (billsToAdd.includes('-')) { //includes at least one range (e.g. hb5-hb10)\n                let billsToAddArray = billsToAdd.split(\",\");\n                billsToAddArray.every(b => {\n                    if (b.includes('-')) { //range (e.g. hb5-hb10)    \n                        const rangeStartAndEnd = b.split('-'); // e.g. ['hb5', 'hb10']\n                        const rangeStart = rangeStartAndEnd[0]; // e.g. 'hb5'\n                        const rangeStartNumber = Number.parseInt(rangeStart.replace(/^\\D+/g, '')); // e.g. 5\n                        const rangeEnd = rangeStartAndEnd[1];\n                        const rangeEndNumber = Number.parseInt(rangeEnd.replace(/^\\D+/g, '')); // e.g. 10\n                        const prefix = rangeStart.replace(/\\d+/, \"\").trim().toUpperCase();\n                        if (!prefix || !validLegPrefixes.includes(prefix) || !rangeStartNumber || !rangeEndNumber || Number.isNaN(rangeStartNumber) || Number.isNaN(rangeEndNumber) || rangeStartNumber > rangeEndNumber) {\n                            this.setState({ quickAddErr: 'Invalid range. No bills added.' }); //return this message to the user\n                            callback(true);\n                            exitFn = true; //can't quit the outer function from within every(), forEach(), etc., so store as bool to use later\n                            return false; //exit the every()\n                        }\n                        for (let i = rangeStartNumber; i <= rangeEndNumber; i++) {\n                            const billNumber = prefix + i.toString().trim().toUpperCase();\n                            if (billsToSearchFor.length) { billsToSearchFor += \", \" }\n                            billsToSearchFor += billNumber;\n                        }\n                        ranges.push({ prefix: prefix, rangeStart: rangeStartNumber, rangeEnd: rangeEndNumber })\n                    } else {\n                        billsToSearchFor += (billsToSearchFor.length ? \", \" : \"\") + b.trim();\n                    }\n                    return true;\n                })\n            } else {\n                let billsToAddArray = billsToAdd.split(\",\");\n                billsToAddArray.every(b => {\n\n                    const billKey = Number.parseInt(b.replace(/^\\D+/g, '')); // e.g. 5\n                    if (!billKey) {\n                        this.setState({ quickAddErr: 'Invalid bill number: ' + b.trim() + ' (No bills added)' }); //return this message to the user\n                        callback(true);\n                        exitFn = true; //can't quit the outer function from within every(), forEach(), etc., so store as bool to use later\n                        return false; //exit the every()\n                    }\n\n                    const prefix = b.replace(/\\d+/, \"\").trim().toUpperCase();\n                    if (!validLegPrefixes.includes(prefix)) {\n                        this.setState({ quickAddErr: 'Invalid bill prefix: ' + prefix + ' (No bills added)' });\n                        callback(true);\n                        exitFn = true;\n                        return false;\n                    }\n\n                    if (billsToSearchFor.length) { billsToSearchFor += \", \" }\n                    billsToSearchFor += b;\n                    return true;\n                })\n            }\n        }\n        if (exitFn) { return; }\n        const params = {\n            LegislationNumbers: [{\n                LegislationNumber: billsToSearchFor\n            }],\n            SessionID: this.state.selectedSession.SessionID\n        };\n        this.props.actions.getBillList(params).then(() => {\n            let billList = this.props.bills.billList;\n            //Filter to only one result per bill per session since DB sometimes returns duplicates\n            billList = billList.filter((item, pos) => billList.findIndex(i => i.LegislationNumber === item.LegislationNumber && i.SessionID === item.SessionID) === pos);\n            let watchlist = JSON.parse(JSON.stringify(this.state.selectedCollection));\n            //Check to see if some of the bills the user wanted to add don't exist\n            let missedBills = [];\n            // Match text that has two letters followed by numbers. There can be white space between them.\n            const foundBills = billsToSearchFor.match(/[a-zA-Z]{2}\\s*(?=[0-9])[0-9]*/ig) || [];\n\n            foundBills.forEach(fb => {\n                const noWhiteSpaceBill = fb.replace(/\\s/g, \"\").toUpperCase();\n                if (!billList.find(bill => bill.LegislationNumber.toUpperCase() === noWhiteSpaceBill)) { //desired bill is not in the bill search response\n                    //if the non-found bill was only requested within a range (e.g. hb120 within hb1-hb1000), then don't include it as a missed bill, because obviously not every number in a range will be expected\n                    const billKey = noWhiteSpaceBill.replace(/^\\D+/g, '');\n                    const billPrefix = noWhiteSpaceBill.replace(/\\d+/, \"\");\n                    if (!ranges.find(range => range.prefix === billPrefix && range.rangeStart <= billKey && range.rangeEnd >= billKey)) {\n                        missedBills.push(noWhiteSpaceBill);\n                    }\n                }\n            })\n\n            if (duplicatedBills.length) {\n                this.props.actions.makeToast([{ message: (duplicatedBills.length === 1 ? (duplicatedBills[0] + \" is \") : \"Multiple added bills were \") + \"already in this watchlist.\", type: \"warning\" }]);\n            }\n            let saveWatchlist = false;\n            billList.forEach(bill => {\n                // Make sure the bill isn't already a part of the watchlist\n                if (!watchlist.WatchListLegislation.find(leg => !leg.DeletionDate && leg.LegislationID === bill.LegislationID)) {\n                    saveWatchlist = true;\n                    watchlist.WatchListLegislation.push({\n                        LegislationID: bill.LegislationID,\n                        LegislationNumber: bill.LegislationNumber,\n                        Sessions: [{ SessionID: bill.SessionID }],\n                        WatchListID: watchlist.WatchListID\n                    });\n                }\n            });\n            if (saveWatchlist) {\n                this.handleCollectionChange(watchlist, (err => {\n                    if (!err) {\n                        this.setState({\n                            billList: billList,\n                            fullLegislationList: billList,\n                            totalResults: billList.length,\n                            checkedBills: [],\n                            lastCheckedBill: -1\n                        })\n                    }\n                }));\n            } else if (ranges.length) {\n                throw 'No bills found'\n            }\n            if (missedBills.length > 0) {\n                throw `${missedBills.length === 1 ? \"This bill\" : missedBills.length > 7 ? missedBills.length.toString() + \" bills\" : \"These bills\"} could not be added${missedBills.length <= 7 ? ': ' + missedBills.join(\", \") : \"\"}`\n            }\n            callback(false);\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return err;\n            }\n            this.setState({\n                isFetching: false\n            });\n            this.setState({ quickAddErr: err });\n            callback(true);\n        })\n    }\n\n    toggleAllNotes() {\n        const opposite = !this.state.showAllNotes;\n        this.setState({\n            showAllNotes: opposite\n        });\n        for (let i = 0; i < this._billResultRefs.length; i++) {\n            if (this._billResultRefs[i] && this._billResultRefs[i].current) {\n                this._billResultRefs[i].current.toggleBillNotesFromParent(opposite)\n            }\n        }\n    }\n\n    unload() {\n        //Delete the watchlist when the page is unloaded if the user leaves when the report maker is still open\n        this.deleteCollection();\n    }\n\n    toggleSidebar() {\n        this.setState({\n            showSidebar: !this.state.showSidebar\n        })\n    }\n\n    toggleModal() {\n        this.setState({\n            showModal: !this.state.showModal\n        })\n    }\n\n    toggleHelpModal() {\n        this.setState({\n            showHelpModal: !this.state.showHelpModal\n        })\n    }\n\n    getReportTitleObject() {\n        return { Name: this.getReportTitle() };\n    }\n\n    getReportTitle() {\n        if (this.state.selectedCollection) { return ''; }\n\n        let title = '';\n        if (this.state.allLegislation) {\n            title = \"All legislation\";\n        } else if (this.state.mostFrequent) {\n            title = \"Most frequently accessed bills\";\n        } else if (this.state.isPending) {\n            title = \"Pending bills\";\n        } else if (this.state.selectedBillStatusCategory && this.state.billStatusCategoryList.find(opt => opt.value === this.state.selectedBillStatusCategory)) {\n            title = this.state.billStatusCategoryList.find(opt => opt.value === this.state.selectedBillStatusCategory).label;\n            if (this.state.currentStatus) {\n                title += \" (Current Status)\";\n            }\n        }\n        return title;\n    }\n\n    handleToggleCompositeView() {\n        let billList = []\n        this.state.billList.forEach(x => {\n            billList.push({\n                LegislationNumber: x.LegislationNumber,\n                SessionID: x.SessionID\n            })\n        });\n        this.setState({ compositeView: !this.state.compositeView }, () => {\n            const jsonData = JSON.stringify({\n                showCatchline: true,\n                showCurrentStatus: false,\n                showTitle: false,\n                showChiefPatron: true,\n                showAllPatrons: false,\n                showSummary: false,\n                showNotes: true,\n                userCreated: this.props.login.userProfile.email || '',\n                selectedNotes: \"current\",\n                selectedCollection: this.state.selectedCollection && this.state.selectedCollection.Name && this.state.selectedCollection.WatchListID ? this.state.selectedCollection.WatchListID : '',\n                reportTitle: \"\",\n                showHistory: {\n                    all: false,\n                    recent: true,\n                    mostRecentAmount: \"1\",\n                    showVotes: false,\n                    Committee: true,\n                    Subcommittee: false\n                },\n                showHouseAmendments: false,\n                showSenateAmendments: false,\n                showConferenceAmendments: false,\n                showGovernorsRecommendations: false,\n                showStatus: {},\n                showCommitteeEvent: {},\n                showLdNumber: false,\n                showClerkNames: false,\n                showDlsStaffNames: false,\n                personalMessage: \"\",\n                billList: billList\n            });\n            this.props.actions.saveBillReportInformation(window.btoa(jsonData)).then(() => {\n                const billReportInformation = this.props.report.billReportInformation;\n                if (billReportInformation && billReportInformation.ReportNumber) {\n                    window.open('/bill-search-report/composite/' + billReportInformation.ReportNumber, '_blank');\n                } else {\n                    this.props.actions.makeToast([{ message: \"Composite View Generation Failed\", type: \"failure\" }]);\n                }\n                this.setState({ compositeView: false })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n                this.props.actions.makeToast([{ message: \"Composite View Generation Failed\", type: \"failure\" }]);\n                this.setState({\n                    compositeView: false\n                });\n            })\n        })\n    }\n\n    render() {\n        const { isFetching, sessionID, billList, showSidebar, height } = this.state;\n        const { errorMessage } = this.props.bills;\n\n        const userCanUseCollections = Boolean(this.props.login.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR));\n\n        const nextPageLoadingHeight = '100px';\n\n        let billResultRefs = [];\n        billList.forEach((_b) => billResultRefs.push(React.createRef()));\n        this._billResultRefs = billResultRefs;\n\n        let toggleArrows = [];\n        for (let i = 1; i <= height; i++) {\n            let top = (i * 540).toString() + \"px\";\n            toggleArrows.push(<button key={i} type=\"button\" aria-expanded={showSidebar} onClick={this.toggleSidebar} className={showSidebar ? \"sidebar-button arrow-up white-chevron\" : \"sidebar-button arrow-down white-chevron\"} style={{ top: top }}></button>);\n        }\n\n        return (\n            <div className=\"bill-theme bill-search-container\">\n                {this.state.historicalSessionRedirect &&\n                    <div className=\"schedule-modal\">\n                        <div className=\"schedule-modal-content fit-content center-content\">\n                            <p>For historical data, please use <b>Legacy LIS</b>, available at <b><a href=\"https://legacylis.virginia.gov\" target=\"_blank\" rel=\"noreferrer\">https://legacylis.virginia.gov</a></b>.</p>\n                            <p>Click 'Go' to be taken to Legacy LIS, or 'Close' to remain here.</p>\n                            <div className=\"inline-list\">\n                                <button className=\"button primary float-right\" onClick={() => this.state.historicalSessionRedirect(true)}>Go</button>\n                                <button className=\"button secondary float-right\" onClick={() => this.state.historicalSessionRedirect(false)}>Close</button>\n                            </div>\n                            <br />\n                        </div>\n                    </div>\n                }\n                {this.state.showModal &&\n                    <div className=\"schedule-modal\">\n                        <div className=\"schedule-modal-content\">\n                            <p>You will need to click the search button or press the enter key in order to update your search results after removing a search parameter.</p>\n                            <button className=\"button primary float-right\" onClick={() => this.toggleModal()}>Close</button>\n                            <br />\n                        </div>\n                    </div>\n                }\n                {this.state.showHelpModal &&\n                    <div className=\"schedule-modal\">\n                        <div className=\"schedule-modal-content seach-help-modal\">\n                            <a className=\"float-right\" style={{ cursor: \"pointer\" }} onClick={() => this.toggleHelpModal()}>X</a>\n                            <SearchHelp />\n                            <button className=\"button primary float-right\" onClick={() => this.toggleHelpModal()}>Close</button>\n                            <br />\n                        </div>\n                    </div>\n                }\n                {this.state.showReportMaker &&\n                    <ReportMaker\n                        toggleReportMaker={this.toggleReportMaker}\n                        billList={this.state.mostFrequent ? this.state.billList : this.state.fullLegislationList}\n                        collections={this.state.collections}\n                        selectedCollection={this.state.selectedCollection || this.getReportTitleObject()}\n                        autoReport={this.state.autoReport}\n                        reportTitle={this.getReportTitle()}\n                    />\n                }\n                <br />\n                <div className={showSidebar ? \"inner-grid one-toggle-and-three\" : \"inner-grid toggle-and-three\"}>\n                    {showSidebar &&\n                        <div>\n                            <LegislationWatchlists\n                                collections={this.state.collections}\n                                isLoading={this.state.collectionIsLoading}\n                                error={this.props.collection.collectionError}\n                                selectedCollectionIndex={this.state.selectedCollectionIndex}\n                                selectCollection={this.selectCollection}\n                                createCollection={this.createCollection}\n                                collectionIsSaving={this.state.collectionIsSaving}\n                                location={this.props.history.location.pathname}\n                                isAuthor={this.props.login.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR)}\n                            />\n                            <br />\n                            <AdvancedSearchBox\n                                ref={this.searchBox}\n                                selectedBillNumbers={this.state.selectedBillNumbers}\n                                selectedBillRangeBeginning={this.state.selectedBillRangeBeginning}\n                                selectedBillRangeEnd={this.state.selectedBillRangeEnd}\n                                selectedChapterNumber={this.state.selectedChapterNumber}\n                                selectedKeywords={this.state.selectedKeywords}\n                                selectedBillEvent={this.state.selectedBillEvent}\n                                billEventOptions={this.state.billEventOptions}\n                                sessionOptions={this.state.sessionOptions}\n                                selectedSession={this.state.selectedSession}\n                                billStatusCategoryList={this.state.billStatusCategoryList}\n                                selectedBillStatusCategory={this.state.selectedBillStatusCategory}\n                                billStatusStartDate={this.state.billStatusStartDate}\n                                billStatusEndDate={this.state.billStatusEndDate}\n                                selectedCommittee={this.state.selectedCommittee}\n                                committeeList={this.state.filteredCommitteeList}\n                                subcommitteeList={this.state.subcommitteeList}\n                                selectedSubcommittee={this.state.selectedSubcommittee}\n                                patronList={this.state.filteredPatronList}\n                                patronRoles={this.state.patronRoles}\n                                selectedPatron={this.state.selectedPatron}\n                                selectedPatronType={this.state.selectedPatronType}\n                                selectedChamber={this.state.selectedChamber}\n                                selectedBillType={this.state.selectedBillType}\n                                billEventEndDate={this.state.billEventEndDate}\n                                billEventStartDate={this.state.billEventStartDate}\n                                resetUrl={this.resetUrl}\n                                handleSubmit={this.handleSubmit}\n                                handleTextChange={this.handleTextChange}\n                                handleSelectChange={this.handleSelectChange}\n                                handleDateChange={this.handleDateChange}\n                                committeeChange={this.committeeChange}\n                                chamberChange={this.chamberChange}\n                                sessionChange={this.sessionChange}\n                                clearForm={this.clearForm}\n                                isFetching={this.state.isFetching}\n                                handlePatronChange={this.handlePatronChange}\n                                handlePatronTypeChange={this.handlePatronTypeChange}\n                                subjectList={this.state.subjectList}\n                                selectedSubject={this.state.selectedSubject}\n                                toggleGroup={this.toggleGroup}\n                                billFieldset={this.state.billFieldset}\n                                keywordFieldset={this.state.keywordFieldset}\n                                statusFieldset={this.state.statusFieldset}\n                                activityFieldset={this.state.activityFieldset}\n                                membersFieldset={this.state.membersFieldset}\n                                committeesFieldset={this.state.committeesFieldset}\n                                subjectFieldset={this.state.subjectFieldset}\n                                showCategories={this.state.showCategories}\n                                toggleShowCategories={this.toggleShowCategories}\n                                location={this.props.history.location.pathname}\n                                searchParam={this.props.history.location.search}\n                                billVersionList={this.state.billVersionList}\n                                selectedBillVersion={this.state.selectedBillVersion}\n                                billSummaryList={this.state.billSummaryList}\n                                selectedSummaryVersion={this.state.selectedSummaryVersion}\n                                selectedLocation={this.state.selectedLocation}\n                                keywordUseGlobalSessionSearch={this.state.keywordUseGlobalSessionSearch}\n                                handleRadioChange={this.handleRadioChange}\n                                handleCurrentStatusChange={this.handleCurrentStatusChange}\n                                currentStatus={this.state.currentStatus}\n                                handleExcludeFailedChange={this.handleExcludeFailedChange}\n                                excludeFailed={this.state.excludeFailed}\n                                toggleHelpModal={this.toggleHelpModal}\n                                failedToGetSessions={this.state.failedToGetSessions}\n                                showReportMaker={this.state.showReportMaker}\n                                showUpdateSearchButton={this.state.showUpdateSearchButton}\n                            />\n                        </div>\n                    }\n                    <div className={showSidebar ? \"sidebar-toggle-open\" : \"sidebar-toggle-closed\"} onClick={this.toggleSidebar}>\n                        {toggleArrows.map((a, i) => {\n                            return (a)\n                        })}\n                    </div>\n                    {this.state.failedToGetSessions ? <div className=\"center input-feedback\" style={{ fontSize: '1em' }}>Failed to retrieve sessions. Please refresh & try again.</div> : !this.state.selectedSession ? <div className=\"center-spinner spinner\">Loading...</div>\n                        :\n                        this.state.showCategories ?\n                            <BillCategories\n                                session={this.state.sessionOptions.find(session => session.SessionCode === this.props.nav.session)}\n                                patronList={this.state.patronList}\n                                committeeList={this.state.groupedCommitteeList}\n                                subjectList={this.state.subjectList}\n                                introDateList={this.state.introDateList}\n                                statusCategoriesList={this.state.billStatusCategoryList}\n                                isLoading={this.state.billStatusCategoryListIsLoading}\n                                history={this.props.history}\n                                location={this.props.history.location.pathname}\n                                selectedSession={this.state.selectedSession}\n                                excludeFailed={this.state.excludeFailed}\n                            />\n                            :\n                            <div id=\"results-div\">\n                                {userCanUseCollections &&\n                                    <React.Fragment>\n                                        <CollectionControls\n                                            searchMade={this.state.searchMade}\n                                            collections={this.state.collections}\n                                            selectedCollection={this.state.selectedCollection}\n                                            selectedCollectionIndex={this.state.selectedCollectionIndex}\n                                            handleCollectionChange={this.handleCollectionChange}\n                                            handleToggleCompositeView={this.handleToggleCompositeView}\n                                            selectCollection={this.selectCollection}\n                                            collectionIsSaving={this.state.collectionIsSaving}\n                                            deleteCollection={this.deleteCollection}\n                                            checkedBills={this.state.checkedBills}\n                                            addToWatchlists={this.addToWatchlists}\n                                            billListLength={this.state.billList.length}\n                                        />\n                                        {!this.state.searchMade &&\n                                            <WatchlistNotifications\n                                                selectedCollection={this.state.selectedCollection}\n                                                handleCollectionChange={this.handleCollectionChange}\n                                                memberList={this.state.patronList}\n                                                committeeList={this.state.groupedCommitteeList}\n                                                criteriaTypes={this.state.criteriaTypes}\n                                                collectionIsSaving={this.state.collectionIsSaving}\n                                            />\n                                        }\n                                    </React.Fragment>\n                                }\n                                {this.state.searchMade &&\n                                    <SearchSelections\n                                        currentStatus={this.state.currentStatus}\n                                        selectedSession={this.state.selectedSession}\n                                        selectedBillNumbers={this.state.selectedBillNumbers}\n                                        selectedBillRangeBeginning={this.state.selectedBillRangeBeginning}\n                                        selectedBillRangeEnd={this.state.selectedBillRangeEnd}\n                                        selectedChapterNumber={this.state.selectedChapterNumber}\n                                        selectedKeywords={this.state.searchedKeywords || this.state.selectedKeywords}\n                                        selectedBillEvent={this.state.billEventOptions.find(opt => opt.value === this.state.selectedBillEvent)}\n                                        selectedBillStatusCategory={this.state.billStatusCategoryList.find(opt => opt.value === this.state.selectedBillStatusCategory)}\n                                        billStatusStartDate={this.state.billStatusStartDate}\n                                        billStatusEndDate={this.state.billStatusEndDate}\n                                        selectedCommittee={this.state.committeeList.find(opt => opt.value === this.state.selectedCommittee)}\n                                        selectedSubcommittee={this.state.subcommitteeList.find(opt => opt.value === this.state.selectedSubcommittee)}\n                                        selectedPatron={this.state.patronList.find(opt => opt.value === this.state.selectedPatron)}\n                                        selectedPatronType={this.state.patronRoles.filter(role => this.state.selectedPatronType.includes(role.PatronTypeID))}\n                                        selectedChamber={this.state.selectedChamber}\n                                        billEventEndDate={this.state.billEventEndDate}\n                                        billEventStartDate={this.state.billEventStartDate}\n                                        selectedSubject={this.state.subjectList.find(opt => opt.value === this.state.selectedSubject)}\n                                        excludeFailed={this.state.excludeFailed}\n                                        handleSelectionClear={this.handleSelectionClear}\n                                        handleMultiSelectionClear={this.handleMultiSelectionClear}\n                                        updateSearch={this.state.showUpdateSearchButton ? this.searchBox.current.handleSubmit : null}\n                                    />}\n                                {!isFetching &&\n                                    <>\n                                        <div className=\"flex-row search-results-title-section\">\n                                            {this.state.searchMade ?\n                                                <>\n                                                    {this.state.allLegislation && <h2>All legislation</h2>}\n                                                    {this.state.mostFrequent && <h2>Most frequently accessed bills</h2>}\n                                                    {this.state.isPending && <h2>Pending bills</h2>}\n                                                    {!this.state.isPending && !this.state.mostFrequent && !this.state.allLegislation && <h2 style={{ marginTop: \"0px\", marginBottom: \"10px\" }}>{billList.length === 0 && \"No \"}Search Results</h2>}\n                                                </>\n                                                : <div></div>}\n                                            {!this.state.selectedCollection || this.state.searchMade ?\n                                                <div className=\"inline-list\">\n                                                    {billList.length > 0 &&\n                                                        <React.Fragment>\n                                                            <button onClick={() => this.toggleReportMaker()} id=\"create-report-button\" type=\"button\" className={`${this.state.selectedCollection ? 'set-right ' : ''}button small-button`} style={{ marginRight: '0px', marginTop: \"8px\" }}>Create Report</button>\n                                                        </React.Fragment>\n                                                    }\n                                                </div>\n                                                :\n                                                <div />\n                                            }\n                                        </div>\n                                        {this.state.selectedCollection &&\n                                            <div className=\"flex-row flex-vertical-center notes-and-controls\">\n                                                {this.state.searchMade ?\n                                                    <>\n                                                        <div>\n                                                            <button\n                                                                type=\"button\"\n                                                                disabled={this.state.checkedBills.every(b => b === false) || this.state.collectionIsSaving}\n                                                                className=\"button small-button\"\n                                                                onClick={() => this.addToWatchlists(JSON.parse(JSON.stringify([this.state.selectedCollection])))}>Add</button>\n                                                        </div>\n                                                    </>\n                                                    :\n                                                    <>\n                                                        <div className=\"inline-list\">\n                                                            <button aria-label=\"remove watchlist bills\" onClick={this.removeWatchlistBills} type=\"button\" disabled={this.state.checkedBills.every(b => b === false) || this.state.collectionIsSaving} className=\"button danger small-button\">Remove</button>\n                                                            <button aria-label=\"toggle all notes\" disabled={this.state.collectionIsSaving} className=\"button-link toggle-all-notes\" onClick={this.toggleAllNotes} type=\"button\">{this.state.showAllNotes ? \"Hide\" : \"Show\"} All Notes +/-</button>\n                                                        </div>\n                                                        <div className=\"inline-list\" style={{ marginRight: \"0px\", display: this.state.quickAddErr ? \"grid\" : null }}>\n                                                            <QuickAdd\n                                                                quickAddBills={this.quickAddBills}\n                                                                quickAddErr={this.state.quickAddErr}\n                                                                autoFocus={!this.state.skippedRecords}\n                                                                collectionIsSaving={this.state.collectionIsSaving}\n                                                            />\n                                                            {billList.length > 0 &&\n                                                                <div style={{ display: 'inline-flex', justifyContent: 'end', marginRight: '0px', marginTop: this.state.quickAddErr ? '5px' : null }}>\n                                                                    <button onClick={() => this.toggleReportMaker()} id=\"create-report-button\" type=\"button\" className={`${this.state.selectedCollection ? 'set-right ' : ''}button small-button`} style={{ marginRight: '0px' }}>Create Report</button>\n                                                                </div>\n                                                            }\n                                                        </div>\n                                                    </>\n                                                }\n                                            </div>\n                                        }\n                                    </>\n                                }\n                                <div className=\"public-list search-results\">\n                                    {isFetching && !this.state.skippedRecords ?\n                                        <div className=\"spinner\"></div>\n                                        :\n                                        <>\n                                            {errorMessage ?\n                                                <p className=\"message-error\">{errorMessage}</p>\n                                                :\n                                                null\n                                            }\n                                        </>\n                                    }\n                                    {(!isFetching || this.state.skippedRecords) && billList.length && !errorMessage ?\n                                        <ul className=\"slidedown-list\">\n                                            <div className='flex-row'>\n                                                {userCanUseCollections ?\n                                                    <label htmlFor=\"sr-select-all\"\n                                                        className=\"txt-greyed\">\n                                                        <input id=\"sr-select-all\" checked={this.state.selectAllBills} onChange={this.toggleAllBills} type=\"checkbox\" style={{ verticalAlign: 'sub', marginRight: '10px' }} />\n                                                        Select all</label>\n                                                    :\n                                                    <div></div>}\n                                                {!errorMessage && <span id=\"search-result-count\" className=\"txt-greyed\">{this.state.totalResults} {this.state.searchMade ? \"Result\" : \"Item\"}{this.state.totalResults !== 1 && \"s\"}</span>}\n                                            </div>\n                                            {!this.state.displayCrossSession && <hr className=\"faded-line\" />}\n                                            {billList.map((bill, i) =>\n                                                <React.Fragment>\n                                                    {this.state.displayCrossSession && i === 0 &&\n                                                        <div className=\"search-session-header\">\n                                                            <label>{this.state.sessionOptions.find(x => x.SessionID === bill.SessionID).SessionYear + \" \" + this.state.sessionOptions.find(x => x.SessionID === bill.SessionID).DisplayName}</label>\n                                                        </div>\n                                                    }\n\n                                                    {this.state.displayCrossSession && billList[i + 1] && billList[i].SessionID != billList[i + 1].SessionID || this.state.displayCrossSession && billList[i + 1] === undefined\n                                                        ?\n                                                        <React.Fragment>\n                                                            <BillInfoComponent\n                                                                key={i}\n                                                                ref={this._billResultRefs[i]}\n                                                                userCanUseCollections={userCanUseCollections}\n                                                                bill={bill}\n                                                                billIndex={i}\n                                                                sessionID={sessionID}\n                                                                toggleShowData={this.toggleShowData}\n                                                                expanded={this.state[bill.LegislationID]}\n                                                                sessionCode={this.state.sessionOptions.find(session => session.SessionID === bill.SessionID) && this.state.sessionOptions.find(session => session.SessionID === bill.SessionID).SessionCode}\n                                                                selectedCollection={this.state.selectedCollection}\n                                                                handleCollectionChange={this.handleCollectionChange}\n                                                                collectionIsSaving={this.state.collectionIsSaving}\n                                                                handleBillCheckbox={e => this.handleBillCheckbox(i, e)}\n                                                                checked={this.state.checkedBills[i]}\n                                                                selectedKeywords={this.state.searchedKeywords || this.state.selectedKeywords}\n                                                                selectedLocation={this.state.displaySelectedLocation}\n                                                                searchMade={this.state.searchMade}\n                                                                session={this.state.sessionOptions.find(x => x.SessionID === bill.SessionID)}\n                                                                displayCrossSession={this.state.displayCrossSession}\n                                                                newSession={true}\n                                                                displayChapterNumber={this.state.selectedChapterNumber || (this.state.selectedBillStatusCategory && this.state.billStatusCategoryList.find(it => it.Name.toLowerCase() === \"acts of assembly chapters\") && this.state.selectedBillStatusCategory === this.state.billStatusCategoryList.find(it => it.Name.toLowerCase() === \"acts of assembly chapters\").LegislationCategoryID)}\n                                                                compositeView={this.state.compositeView}\n                                                            />\n                                                            {billList[i + 1] &&\n                                                                <div className=\"search-session-header\">\n                                                                    <label>{this.state.sessionOptions.find(x => x.SessionID === billList[i + 1].SessionID).SessionYear + \" \" + this.state.sessionOptions.find(x => x.SessionID === billList[i + 1].SessionID).DisplayName}</label>\n                                                                </div>\n                                                            }\n                                                        </React.Fragment>\n                                                        :\n                                                        <BillInfoComponent\n                                                            key={i}\n                                                            ref={this._billResultRefs[i]}\n                                                            userCanUseCollections={userCanUseCollections}\n                                                            bill={bill}\n                                                            billIndex={i}\n                                                            sessionID={sessionID}\n                                                            sessionCode={this.state.sessionOptions.find(session => session.SessionID === bill.SessionID) && this.state.sessionOptions.find(session => session.SessionID === bill.SessionID).SessionCode}\n                                                            selectedCollection={this.state.selectedCollection}\n                                                            handleCollectionChange={this.handleCollectionChange}\n                                                            collectionIsSaving={this.state.collectionIsSaving}\n                                                            handleBillCheckbox={e => this.handleBillCheckbox(i, e)}\n                                                            checked={this.state.checkedBills[i]}\n                                                            selectedKeywords={this.state.searchedKeywords || this.state.selectedKeywords}\n                                                            toggleShowData={this.toggleShowData}\n                                                            expanded={this.state[bill.LegislationID]}\n                                                            selectedLocation={this.state.displaySelectedLocation}\n                                                            searchMade={this.state.searchMade}\n                                                            session={this.state.sessionOptions.find(x => x.SessionID === bill.SessionID)}\n                                                            displayCrossSession={this.state.displayCrossSession}\n                                                            displayChapterNumber={this.state.selectedChapterNumber || (this.state.selectedBillStatusCategory && this.state.billStatusCategoryList.find(it => it.Name.toLowerCase() === \"acts of assembly chapters\") && this.state.selectedBillStatusCategory === this.state.billStatusCategoryList.find(it => it.Name.toLowerCase() === \"acts of assembly chapters\").LegislationCategoryID)}\n                                                            compositeView={this.state.compositeView}\n                                                        />\n                                                    }\n                                                </React.Fragment>\n                                            )}\n                                        </ul>\n                                        : null\n                                    }\n                                </div>\n                            </div>\n                    }\n                </div>\n                <div\n                    ref={loadingRef => (this.loadingRef = loadingRef)}\n                    style={{ position: 'relative', bottom: !isFetching && this.state.hasNextPage ? ((window.innerHeight || document.documentElement.clientHeight) * .35) + 'px' : null }}\n                >\n                    {isFetching && this.state.skippedRecords ?\n                        <div className=\"spinner\" style={{ height: nextPageLoadingHeight, margin: 'auto' }}></div>\n                        :\n                        this.state.hasNextPage ?\n                            <div style={{ marginTop: nextPageLoadingHeight }} />\n                            : null\n                    }\n                </div>\n            </div>\n        )\n    }\n}\n\nconst PublicBillSearch = connect(\n    (state) => {\n        const { bills, session, members, committee, patrons, nav, collection, login, report } = state;\n        return {\n            bills,\n            session,\n            members,\n            committee,\n            patrons,\n            nav,\n            collection,\n            login,\n            report\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, committeeActionCreators, billActionCreators, sessionActionCreators, memberActionCreators, patronActionCreators, navActionCreators, collectionActionCreators, reportActionCreators), dispatch)\n        }\n    }\n)(BillSearchComponent)\n\nexport default PublicBillSearch;","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport {reportActionCreators} from '../../../stores/lis-report-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\n\nclass ShareReport extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            emailAddresses: '',\n            isSharing: false\n        };\n        this.handleEmailAddressChange = this.handleEmailAddressChange.bind(this);\n        this.sendReport = this.sendReport.bind(this);\n    }\n\n    \n    handleEmailAddressChange(e) {\n        this.setState({\n            emailAddresses: e.target.value\n        });\n    }\n\n    sendReport() {\n        this.setState({\n            isSharing: true\n        });\n        const url = encodeURIComponent(window.location.href);\n        const emailAddresses = encodeURIComponent(this.state.emailAddresses);\n        this.props.actions.shareReport(`?link=${url}&addresses=${emailAddresses}`)\n        .then(() => {\n            this.props.actions.makeToast([{ message: \"Share Successful\", type: \"success\" }]);\n            this.setState({\n                isSharing: false,\n                emailAddresses: ''\n            })\n        }).catch(err => {\n            if(err === \"Aborted\") {\n                return\n            }\n            this.setState({\n                isSharing: false\n            })\n            this.props.actions.makeToast([{ message: \"Share Failed\", type: \"failure\" }]);\n        })\n    }\n\n    render() {\n        return(<div onClick={!this.state.isSharing ? this.props.toggleShareForm : null} className=\"overlay center-content\">\n            <div className=\"full\">\n            <div onClick={e => e.stopPropagation()} className=\"dlas-forms user-forms advanced-search overlay-content animated-fade-in-up\">\n                <div>\n                    <label htmlFor=\"email-addresses-to-send-to\" className=\"label\">Share link to report. (Seperate email addresses by a comma)</label>\n                    <div className=\"inline-list\">\n                        <input id=\"email-addresses-to-send-to\" aria-label=\"Email addresses to send to\" style={{width: \"90%\"}}onChange={this.handleEmailAddressChange} value={this.state.emailAddresses} placeholder=\"Email addresses to send to\"/>\n                    </div>\n                </div>\n                <br />\n                <hr className=\"faded-line\" />\n                <div className=\"align-right inline-list\">\n                    {this.state.isSharing &&\n                        <div className=\"small-spinner\"></div>\n                    }\n                    <button type=\"button\" disabled={this.state.isSharing} className=\"button secondary\" onClick={this.props.toggleShareForm}>Close</button>\n                    <button type=\"button\" disabled={this.state.isSharing || !this.state.emailAddresses} className=\"button\" onClick={this.sendReport}>Share</button>\n                </div>\n            </div>\n            </div>\n        </div>);\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { report, nav } = state;\n        return {\n            report,\n            nav\n            \n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, reportActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(ShareReport);","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport renderHTML from 'react-render-html';\nimport moment from 'moment-timezone';\nimport { saveAs } from 'file-saver';\nimport { generateCsv } from '../../../services/csv.service';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport stripTags from \"striptags\";\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { patronActionCreators } from '../../../stores/lis-patron-store';\nimport { voteActionCreators } from '../../../stores/lis-votes-store';\nimport { collectionActionCreators } from '../../../stores/lis-collection-store';\nimport { reportActionCreators } from \"../../../stores/lis-report-store\";\nimport { personnelActionCreators } from '../../../stores/lis-personnel-store';\nimport { Link } from 'react-router-dom';\n\nimport ShareReport from './share-report'\n\nconst BILL_COLLECTION_AUTHOR = \"LegislationCollections\";\nconst STAFF = \"STAFF\";\nconst CLERKS = \"CLERKS\";\n\nconst MAX_BILL_HISTORY_CHUNK_SIZE = 125;\n\nconst weights = {\n    \"Committee\": 1,\n    \"Subcommittee\": 2,\n    \"recent\": 3,\n    \"all\": 4\n}\nconst sortBillHistoryTypes = (typeA, typeB) => {\n    return weights[typeA] - weights[typeB];\n}\n\nclass ReportMaker extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showCatchline: true,\n            showCurrentStatus: true,\n            showTitle: false,\n            showChiefPatron: false,\n            showAllPatrons: false,\n            showSummary: false,\n            showNotes: false,\n            selectedNotes: 'all',\n            showHistory: false,\n            showHouseAmendments: false,\n            showSenateAmendments: false,\n            showConferenceAmendments: false,\n            showGovernorsRecommendations: false,\n            showStatus: {},\n            showCommitteeEvent: {},\n            showLdNumber: false,\n            showClerkNames: false,\n            showDlsStaffNames: false,\n            billData: [],\n            billList: [],\n            collections: [],\n            committeeClerksAndStaff: [],\n            generatingBillNumbers: true,\n            generatingReport: true,\n            hbCount: 0,\n            hjCount: 0,\n            sbCount: 0,\n            sjCount: 0,\n            showTooltip: false,\n            compositeSortValue: \"LegislationNumberAsc\",\n            showNotes: true\n        };\n        this.getReportData = this.getReportData.bind(this);\n        this.makeHtml = this.makeHtml.bind(this);\n        this.makePrintout = this.makePrintout.bind(this);\n        this.makeSpreadsheet = this.makeSpreadsheet.bind(this);\n        this.toggleShareForm = this.toggleShareForm.bind(this);\n        this.toggleTooltip = this.toggleTooltip.bind(this);\n        this.getBillHistoryTypeLabel = this.getBillHistoryTypeLabel.bind(this);\n        this.toggleCompositeSort = this.toggleCompositeSort.bind(this);\n        this.toggleShowNotes = this.toggleShowNotes.bind(this);\n\n        this.reportData = React.createRef();\n        this.htmlRef = React.createRef();\n        this.printOutRef = React.createRef();\n    }\n\n    async getCommitteeClerksOrStaff(bill, sessionStartDate, role) {\n        if (role === STAFF) {\n            bill.loadingStaffNames = true;\n        } else {\n            bill.loadingClerkNames = true;\n        }\n        this.props.actions.getPersonnelList(\"staffroletypeid=\" + role === STAFF ? this.state.staffRoleTypeID : this.state.clerkRoleTypeID + \"&affiliationID=\" + bill.CommitteeID + \"&effectiveBeginDate=\" + sessionStartDate, true)\n            .then(() => {\n                let committeeClerksAndStaff = [...this.state.committeeClerksAndStaff];\n                let personnelList = role === STAFF ? this.props.personnel.personnelStaffList : this.props.personnel.personnelClerkList;\n                personnelList.forEach(p => {\n                    p.SessionID = bill.SessionID\n                })\n                committeeClerksAndStaff = committeeClerksAndStaff.concat(personnelList);\n                this.setState({ committeeClerksAndStaff })\n            })\n        if (role === STAFF) {\n            bill.loadingStaffNames = false;\n        } else {\n            bill.loadingClerkNames = false;\n        }\n    }\n\n    async getLdNumber(bill, versions) {\n        bill.loadingLdNumber = true;\n        if (!versions) {\n            const params = '?BillNumber=' + bill.LegislationNumber + '&sessionID=' + bill.SessionID;\n            await this.props.actions.getBillVersionByBillNumber(params).then(async () => {\n                versions = this.props.bills.billVersion || [];\n            })\n        }\n        const fullTextVersions = versions.filter(v => v.IsActive && [\"Engrossed\", \"Reengrossed\", \"Enrolled\", \"Reenrolled\", \"Chaptered\", \"Governor's Veto\", \"Introduced\", \"Substitute\"].includes(v.Version));\n        const latestFullTextVersion = fullTextVersions.length ? fullTextVersions.reduce(function (r, a) {\n            return r.DraftDate > a.DraftDate ? r : a;\n        }) : null;\n        bill.LdNumber = latestFullTextVersion ? latestFullTextVersion.LDNumber : null;\n        bill.loadingLdNumber = false;\n    }\n\n    async getAmendments(bill) {\n        bill.loadingAmendments = true;\n        const params = '?BillNumber=' + bill.LegislationNumber + '&sessionID=' + bill.SessionID;\n        await this.props.actions.getBillVersionByBillNumber(params).then(async () => {\n            if (this.state.showLdNumber) {\n                bill.LdNumber = this.getLdNumber(this.props.bills.billVersion || []);\n            }\n            bill.amendments = [];\n            const amendments = this.props.bills.billVersion.filter(version => {\n                if (version.Version.includes('Amendment') && ((this.state.showHouseAmendments && version.ChamberCode === 'H') || (this.state.showSenateAmendments && version.ChamberCode === 'S'))) {\n                    return true;\n                } else if (version.Version.includes('Conference') && this.state.showConferenceAmendments) {\n                    return true;\n                } else if (version.Version.includes('Recommendation') && this.state.showGovernorsRecommendations) {\n                    return true;\n                }\n                return false;\n            });\n            for (let i = 0; i < amendments.length; i++) {\n                await this.props.actions.getBillText('?isPublic=true&legislationTextID=' + amendments[i].LegislationTextID)\n                    .then(() => {\n                        if (this.props.bills.billText !== 0) {\n                            bill.amendments.push(this.props.bills.billText[0]);\n                        }\n                    })\n            }\n            bill.loadingAmendments = false;\n            return Promise.resolve();\n        }).catch(err => {\n            bill.loadingAmendments = false;\n            return Promise.reject(err);\n        });\n    }\n\n    async getBillHistory(bills) {\n        const { showHistory } = this.state;\n        let legislationIDs = \"\";\n        bills.forEach((bill, i) => {\n            bill.loadingHistory = true;\n            legislationIDs += `${i === 0 ? '?' : '&'}legislationIDs=${bill.LegislationID}`;\n        })\n        await this.props.actions.getBillHistoryByBillID(legislationIDs)\n            .then(async () => {\n                const allResults = this.props.bills.billHistory;\n                for (const bill of bills) {\n                    let results = allResults.filter(b => b.LegislationID === bill.LegislationID);\n\n                    let billHistory = {};\n                    if (showHistory.recent) {\n                        if (results.length > showHistory.mostRecentAmount) {\n                            billHistory.recent = results.slice(results.length - parseInt(showHistory.mostRecentAmount || 0));\n                        } else {\n                            billHistory.recent = results;\n                        }\n                    } else if (showHistory.all) {\n                        billHistory.all = results;\n                    }\n                    if (showHistory.Committee || showHistory.Subcommittee) {\n                        results.forEach(historyItem => {\n                            if (historyItem.CommitteeName && !historyItem.ParentCommitteeName && showHistory.Committee) {\n                                //Need to get the full list of committee events in composite view\n                                //so we can get the latest committee event for both chambers -JGB\n                                if (!this.props.match.path.includes(\"composite\")) {\n                                    billHistory.Committee = [historyItem];\n                                } else if (historyItem.Status === \"In Committee\") {\n                                    if (!billHistory.Committee) {\n                                        billHistory.Committee = [];\n                                    }\n                                    billHistory.Committee.push(historyItem);\n                                }\n                            } else if (historyItem.ParentCommitteeName && showHistory.Subcommittee) {\n                                billHistory.Subcommittee = [historyItem];\n                            }\n                        });\n                    }\n                    let committeeEvents = {};\n                    results.forEach(historyItem => {\n                        if (!committeeEvents.firstSenateCommitteeEvent && historyItem.ChamberCode === \"S\" && historyItem.Status === \"In Committee\") {\n                            committeeEvents.firstSenateCommitteeEvent = historyItem;\n                        }\n                        if (!committeeEvents.firstHouseCommitteeEvent && historyItem.ChamberCode === \"H\" && historyItem.Status === \"In Committee\") {\n                            committeeEvents.firstHouseCommitteeEvent = historyItem;\n                        }\n                        if (historyItem.ChamberCode === \"S\" && historyItem.Status === \"In Subcommittee\") {\n                            committeeEvents.lastSenateSubcommitteeEvent = historyItem;\n                        }\n                        if (historyItem.ChamberCode === \"H\" && historyItem.Status === \"In Subcommittee\") {\n                            committeeEvents.lastHouseSubcommitteeEvent = historyItem;\n                        }\n                    });\n                    bill.committeeEvents = committeeEvents;\n                    bill.billHistory = billHistory;\n                    bill.loadingHistory = false;\n                    if (showHistory.showVotes) {\n                        //Can't use a foreach function right here because async will not work since foreach takes a function.\n                        for (let i = 0; i < results.length; i++) {\n                            if (results[i].VoteID) {\n                                this.getVoteDetails(results, i);\n                            }\n                        }\n                    }\n                };\n                return Promise.resolve()\n            }).catch(err => { bills.map(bill => bill.loadingHistory = false); Promise.reject(err) });\n    }\n\n    async getVoteDetails(billHistory, i) {\n        billHistory[i].loadingVotes = true;\n        await this.props.actions.getVoteDetails('?voteID=' + billHistory[i].VoteID)\n            .then(() => {\n                const voteData = this.props.votes.voteDetailsResponse[0];\n                let voteDetails = {};\n                voteDetails.ChamberCode = voteData.ChamberCode;\n                voteDetails.VoteType = voteData.VoteType;\n                voteDetails.memberYeas = voteData.VoteMember.filter(nObj => nObj.ResponseCode === 'Y');\n                voteDetails.memberNays = voteData.VoteMember.filter(nObj => nObj.ResponseCode === 'N');\n                voteDetails.memberAbstentions = voteData.VoteMember.filter(nObj => nObj.ResponseCode === 'A');\n                voteDetails.memberNoVote = voteData.VoteMember.filter(nObj => nObj.ResponseCode === 'X');\n                voteDetails.voteStatements = voteData.VoteMember.filter(member => member.VoteStatement);\n                // Abstentions appear as rule 36 on senate floor tally sheets\n                if (voteData.ChamberCode === \"S\" && voteData.VoteType === \"Floor\") {\n                    voteDetails.memberRule36 = voteData.VoteMember.filter(nObj => nObj.ResponseCode === 'A');\n                } else {\n                    voteDetails.memberRule36 = voteData.VoteMember.filter(nObj => nObj.ResponseCode === 'R');\n                }\n                billHistory[i].voteDetails = voteDetails;\n                billHistory[i].loadingVotes = false;\n                return Promise.resolve()\n            }).catch(err => {\n                billHistory[i].loadingVotes = false;\n                return Promise.reject(err);\n            });\n    }\n\n    async getPatrons(bill) {\n        bill.loadingPatrons = true;\n        await this.props.actions.getPatronList(bill.LegislationID)\n            .then(() => {\n                bill.Patrons = this.props.patrons.patronList\n                bill.loadingPatrons = false;\n                return Promise.resolve\n            }).catch(err => { bill.loadingPatrons = false; Promise.reject(err) });\n    }\n\n    async getBillStatusHistory(bill) {\n        bill.loadingStatusHistory = true;\n        let body = { \"LegislationIDs\": [{ \"LegislationID\": bill.LegislationID }] }\n        await this.props.actions.getBillStatusHistory(body)\n            .then(() => {\n                bill.billStatuses = this.props.bills.legislationStatusHistory[0]\n                bill.loadingStatusHistory = false;\n                return Promise.resolve\n            }).catch(err => { bill.loadingStatusHistory = false; Promise.reject(err) });\n    }\n\n    async getWatchlists(params) {\n        await this.props.actions.getCollections(params)\n            .then(() => {\n                this.setState({\n                    collections: this.props.collection.collections\n                }, () => {\n                    return Promise.resolve()\n                })\n            }).catch(err => Promise.reject(err));\n    }\n\n    getReportData() {\n        const { showTitle, showChiefPatron, showAllPatrons, showNotes, userCreated, showHistory, showHouseAmendments, showSenateAmendments, showConferenceAmendments, showGovernorsRecommendations, showStatus, showCommitteeEvent, showLdNumber, showClerkNames, showDlsStaffNames, selectedCollection, billList } = this.state;\n        const params = {\n            LegislationNumbers: [{ LegislationNumber: billList.map(bill => bill.LegislationNumber).join() }],\n            SessionID: billList[0].SessionID\n        };\n        this.setState({\n            sbCount: billList.filter(bill => bill.LegislationNumber.includes('SB')).length,\n            sjCount: billList.filter(bill => bill.LegislationNumber.includes('SJ')).length,\n            hbCount: billList.filter(bill => bill.LegislationNumber.includes('HB')).length,\n            hjCount: billList.filter(bill => bill.LegislationNumber.includes('HJ')).length\n        });\n        this.props.actions.getBillList(params).then(() => {\n            this.setState({\n                generatingBillNumbers: false\n            })\n            let committeePromises = [];\n            let patronPromises = [];\n            let historyPromises = [];\n            let textPromises = [];\n            let statusHistoryPromises = [];\n            let billData = this.props.bills.billList;\n            //Filter to only one result per bill per session since DB sometimes returns duplicates\n            billData = billData.filter((item, pos) => billData.findIndex(i => i.LegislationNumber === item.LegislationNumber && i.SessionID === item.SessionID) === pos);\n            //The backend will return the requested bill numbers in alphanumeric order, regardless of the bill number order in the request\n            //With that in mind, if the report is created from within bill search, the list of bill numbers stored in the report & sent in the request above will be sorted alphanumerically, so the backend sort is the same and desired\n            //If coming from a calendar, however, the list of bill numbers will initially be sorted in calendar order, which is desired, but the api will return the bills alphanumerically\n            //That said, the initial bill number order (stored in the report object) is always the proper order, so we need to sort the response back to that\n            billData.sort((a, b) => billList.findIndex(l => l.LegislationNumber === a.LegislationNumber && l.SessionID === a.SessionID) - billList.findIndex(l => l.LegislationNumber === b.LegislationNumber && l.SessionID === b.SessionID))\n            let showStatusBool = false;\n            for (const key in showStatus) {\n                if (showStatus[key] === true && key !== \"showEmergency\") {\n                    showStatusBool = true;\n                }\n            }\n            let showCommitteeEventBool = false;\n            for (const key in showCommitteeEvent) {\n                if (showCommitteeEvent[key] === true) {\n                    showCommitteeEventBool = true;\n                }\n            }\n            this.setState({\n                billData,\n                gettingBillHistory: showHistory || showCommitteeEventBool ? true : false,\n                gettingBillStatusHistory: showStatusBool ? true : false,\n                gettingClerkNames: showClerkNames ? true : false,\n                gettingStaffNames: showDlsStaffNames ? true : false,\n                gettingPatrons: showAllPatrons ? true : false,\n                gettingVotes: showHistory && showHistory.showVotes ? true : false,\n                gettingLdNumbers: showLdNumber ? true : false,\n                gettingAmendments: showHouseAmendments || showSenateAmendments || showConferenceAmendments || showGovernorsRecommendations ? true : false\n            }, () => {\n                let watchlistPromise = null;\n                if (showNotes && this.props.login.userProfile.email === userCreated) {\n                    watchlistPromise = this.getWatchlists(\"?SessionID=\" + billList[0].SessionID);\n                } else {\n                    watchlistPromise = new Promise(resolve => resolve());\n                }\n                watchlistPromise.then(() => {\n                    if (showClerkNames || showDlsStaffNames) {\n                        this.props.actions.getRoleTypes()\n                            .then(() => {\n                                const clerkRoleType = this.props.personnel.roleTypes.find(x => x.Name.toLowerCase() === 'committee clerk')\n                                const clerkRoleTypeID = clerkRoleType ? clerkRoleType.StaffRoleTypeID : 0;\n                                const staffRoleType = this.props.personnel.roleTypes.find(x => x.Name.toLowerCase() === 'committee staff')\n                                const staffRoleTypeID = staffRoleType ? staffRoleType.StaffRoleTypeID : 0;\n                                this.setState({ clerkRoleTypeID, staffRoleTypeID }, () => {\n                                    this.props.actions.getSessionList().then(() => {\n                                        let committeesAndSessionsToSearch = [];\n                                        const sessionList = this.props.session.sessionList;\n                                        billData.forEach(b => {\n                                            if (b.CommitteeID && b.SessionID && !committeesAndSessionsToSearch.find(c => c.CommitteeID === b.CommitteeID && c.SessionID === b.SessionID)) {\n                                                committeesAndSessionsToSearch.push({ CommitteeID: b.CommitteeID, SessionID: b.SessionID });\n                                                if (showClerkNames) {\n                                                    committeePromises.push(this.getCommitteeClerksOrStaff(b, sessionList.find(sl => sl.SessionID === b.SessionID).SessionEvents.find(se => se.EventTypeID === 1).ActualDate, CLERKS));\n                                                }\n                                                if (showDlsStaffNames) {\n                                                    committeePromises.push(this.getCommitteeClerksOrStaff(b, sessionList.find(sl => sl.SessionID === b.SessionID).SessionEvents.find(se => se.EventTypeID === 1).ActualDate, STAFF));\n                                                }\n                                            }\n                                        })\n                                    })\n                                })\n                            })\n                    }\n                    let billHistoryChunks = [];\n                    billData.forEach(bill => {\n                        bill['Chief Patron'] = bill.Patrons;\n                        if (showAllPatrons) {\n                            patronPromises.push(this.getPatrons(bill));\n                        } else {\n                            patronPromises.push(() => Promise.resolve());\n                        }\n                        bill.Notes = [];\n                        if (showStatus.showEmergency) {\n                            bill.Emergency = bill.EffectiveType === 'Emergency' ? \"Y\" : \"N\"\n                        }\n                        if (showStatusBool) {\n                            statusHistoryPromises.push(this.getBillStatusHistory(bill));\n                        } else {\n                            statusHistoryPromises.push(() => Promise.resolve());\n                        }\n                        if (showNotes) {\n                            if (this.state.selectedNotes === 'all') {\n                                this.state.collections.forEach(coll => {\n                                    let note = coll.WatchListLegislation.find(leg => leg.LegislationID === bill.LegislationID && leg.Note);\n                                    if (note) {\n                                        bill.Notes.push({ ...note, ListName: coll.Name });\n                                    }\n                                });\n                            }\n                            if (this.state.selectedNotes === 'current') {\n                                this.state.collections.forEach(coll => {\n                                    if (coll.WatchListID === selectedCollection) {\n                                        let note = coll.WatchListLegislation.find(leg => leg.LegislationID === bill.LegislationID && leg.Note);\n                                        if (note) {\n                                            bill.Notes.push({ ...note, ListName: coll.Name });\n                                        }\n                                    }\n                                });\n                            }\n                        }\n                        if (showHistory || showCommitteeEventBool) {\n                            if (!billHistoryChunks[0] || billHistoryChunks[billHistoryChunks.length - 1].length >= MAX_BILL_HISTORY_CHUNK_SIZE) {\n                                billHistoryChunks.push([bill]);\n                            } else if (billHistoryChunks[billHistoryChunks.length - 1].length < MAX_BILL_HISTORY_CHUNK_SIZE) {\n                                billHistoryChunks[billHistoryChunks.length - 1].push(bill);\n                            }\n                        }\n                        if (showHouseAmendments || showSenateAmendments || showConferenceAmendments || showGovernorsRecommendations) {\n                            textPromises.push(this.getAmendments(bill));\n                        } else if (showLdNumber) {\n                            textPromises.push(this.getLdNumber(bill))\n                        } else {\n                            textPromises.push(() => Promise.resolve());\n                        }\n                        this.setState({ billData });\n                    });\n                    if (billHistoryChunks.length) {\n                        billHistoryChunks.forEach(chunk => historyPromises.push(this.getBillHistory(chunk)))\n                    } else {\n                        historyPromises.push(() => Promise.resolve());\n                    }\n                    Promise.all(committeePromises).then(() => this.setState({ gettingClerkNames: false, gettingStaffNames: false }));\n                    Promise.all(patronPromises).then(() => this.setState({ gettingPatrons: false }));\n                    Promise.all(historyPromises).then(() => this.setState({ gettingBillHistory: false, gettingVotes: false }));\n                    Promise.all(textPromises).then(() => this.setState({ gettingAmendments: false, gettingLdNumbers: false }));\n                    Promise.all(statusHistoryPromises).then(() => this.setState({ gettingBillStatusHistory: false }));\n\n                    Promise.all(committeePromises.concat(patronPromises).concat(historyPromises).concat(textPromises).concat(statusHistoryPromises)).then(() => {\n                        this.setState({ generatingReport: false })\n                    }).catch((e) => {\n                        console.log(e);\n                        this.setState({ generatingReport: false })\n                    })\n                });\n            });\n        }).catch(err => {\n            this.setState({\n                reportError: err.toString(),\n                generatingReport: false,\n                generatingBillNumbers: false\n            });\n        });\n    }\n\n    makePrintout() {\n        let printWindow = this.printOutRef.current;\n\n        const pageStyles = document.querySelectorAll(\"style, link[rel='stylesheet']\");\n        pageStyles.forEach(el => {\n            printWindow.contentDocument.head.appendChild(el.cloneNode(true));\n        });\n        const reportDataNode = ReactDOM.findDOMNode(this.reportData.current);\n        const contentData = reportDataNode.outerHTML;\n        printWindow.contentDocument.body.innerHTML = contentData;\n        printWindow.focus();\n        // timeout is because some browsers do not set the content of the document in time. Since there is no way to check when it is actually finished this 10 millisecond timeout should do the trick.\n        setTimeout(() => printWindow.contentWindow.print(), 10);\n    }\n\n    makeHtml() {\n        const htmlRefNode = ReactDOM.findDOMNode(this.htmlRef.current);\n        let x = htmlRefNode.querySelectorAll('a');\n        x.forEach(el => {\n            el.setAttribute('href', el.href);\n        })\n        let breaks = htmlRefNode.querySelectorAll('hr');\n        [...breaks].forEach(b => {\n            b.parentNode.removeChild(b);\n        });\n        const fileName = `Search Results ${moment().format(\"MM_DD_YYYY HH mm\")}.html`\n        saveAs(new Blob([htmlRefNode.innerHTML], { type: \"text/html\" }), fileName);\n    }\n\n    makeSpreadsheet() {\n        const { showCatchline, showCurrentStatus, showTitle, showChiefPatron, showAllPatrons, showSummary, showNotes, showHistory, showHouseAmendments, showSenateAmendments, showConferenceAmendments, showGovernorsRecommendations, showStatus, showCommitteeEvent, billData } = this.state;\n        let headers = [\"Billno\"];\n        let historyRows = [];\n        let historyHeaders = [\"Billno\", \"Date\", \"Description\"];\n        if ((showHistory.all || (showHistory.recent && showHistory.mostRecentAmount > 1)) && showHistory.showVotes) {\n            historyHeaders.push(\"YEAS\", \"NAYS\", \"NOT VOTING\", \"ABSTENTIONS\", \"RULE 36\");\n        }\n        billData.forEach(bill => {\n            //Billno needs to be in hyperlink format; to get the appropriate href attr, create a fake element and attach to the DOM and use the resulting href\n            let el = document.createElement(\"a\");\n            el.style.display = 'none';\n            el.href = `/bill-details/${bill[\"SessionCode\"]}/${bill[\"LegislationNumber\"]}`; //relative path; the following logic will turn it into the real/appropriate href (e.g. https://test.lis... or https://qa.lis...)\n            el.className = bill[\"LegislationNumber\"];\n            document.body.appendChild(el);\n            const href = document.getElementsByClassName(bill[\"LegislationNumber\"])[0];\n            document.body.removeChild(el);\n            const hyperlinkedBill = `=HYPERLINK(\"\"${href}` + `\"\",\"\"` + bill[\"LegislationNumber\"] + `\"\")`;\n            bill[\"Billno\"] = hyperlinkedBill;\n            if (showCatchline) {\n                headers.push(\"Catch line\");\n                bill[\"Catchline\"] = bill[\"Description\"];\n            }\n            if (showCurrentStatus)\n                headers.push(\"LegislationStatus\");\n            if (showTitle)\n                headers.push(\"LegislationTitle\");\n            if (showSummary) {\n                headers.push(\"LegislationSummary\");\n            }\n            if (showChiefPatron) {\n                let patrons = bill.Patrons ? bill.Patrons.filter(p => p.Name === 'Chief Patron').map(patron => patron.PatronDisplayName) : [];\n                patrons = patrons.join(', ');\n                const header = \"Chief Patron\";\n                headers.push(header);\n                bill[header.replaceAll(\" \", \"\")] = patrons;\n            }\n            if (showAllPatrons) {\n                let patrons = bill.Patrons ? bill.Patrons.map(patron => {\n                    let formattedName = patron.PatronDisplayName\n                    if (patron.Name === 'Chief Patron') {\n                        formattedName += ' ' + patron.DisplayName;\n                    }\n                    return formattedName;\n                }) : [];\n                patrons = patrons.join(', ');\n                const header = \"All Patrons\";\n                headers.push(header);\n                bill[header.replaceAll(\" \", \"\")] = patrons;\n            }\n            if (showStatus.showEmergency) {\n                headers.push(\"Emergency\");\n            }\n            if (showHistory) {\n                if (showHistory.Committee) {\n                    const header = this.getBillHistoryTypeLabel(\"Committee\");\n                    headers.push(header);\n                }\n                if (showHistory.Subcommittee) {\n                    const header = this.getBillHistoryTypeLabel(\"Subcommittee\");\n                    headers.push(header);\n                }\n                if (showHistory.recent && showHistory.mostRecentAmount < 2) {\n                    const header = this.getBillHistoryTypeLabel(\"recent\");\n                    headers.push(header);\n                }\n                Object.entries(bill.billHistory).sort(([typeA, itemsA], [typeB, itemsB]) => sortBillHistoryTypes(typeA, typeB)).map(([billHistoryType, billHistoryItems]) => {\n                    if (billHistoryType === 'all' || (billHistoryType === 'recent' && showHistory.mostRecentAmount > 1)) {\n                        billHistoryItems.map(historyItem => {\n                            let newRow = { ...historyItem, Billno: hyperlinkedBill, Date: moment(historyItem.EventDate).format('MM/DD/YYYY') }\n                            if (showHistory.showVotes) {\n                                if (historyItem.voteDetails) {\n                                    newRow.YEAS = historyItem.voteDetails.memberYeas.map(item => item.PatronDisplayName).join();\n                                    newRow.NAYS = historyItem.voteDetails.memberNays.map(item => item.PatronDisplayName).join();\n                                    newRow[\"NOTVOTING\"] = historyItem.voteDetails.memberNoVote.map(item => item.PatronDisplayName).join();\n                                    newRow.ABSTENTIONS = historyItem.voteDetails.memberAbstentions.map(item => item.PatronDisplayName).join();\n                                    newRow[\"RULE36\"] = historyItem.voteDetails.memberRule36.map(item => item.PatronDisplayName).join();\n                                }\n                            }\n                            historyRows.push(newRow)\n                        });\n                    } else {\n                        billHistoryItems.map(historyItem => {\n                            if (showHistory.showVotes) {\n                                if (historyItem.voteDetails) {\n                                    headers.push(\"YEAS\", \"NAYS\", \"NOT VOTING\", \"ABSTENTIONS\", \"RULE 36\");\n                                    bill.YEAS = historyItem.voteDetails.memberYeas.map(item => item.PatronDisplayName).join();\n                                    bill.NAYS = historyItem.voteDetails.memberNays.map(item => item.PatronDisplayName).join();\n                                    bill[\"NOTVOTING\"] = historyItem.voteDetails.memberNoVote.map(item => item.PatronDisplayName).join();\n                                    bill.ABSTENTIONS = historyItem.voteDetails.memberAbstentions.map(item => item.PatronDisplayName).join();\n                                    bill[\"RULE36\"] = historyItem.voteDetails.memberRule36.map(item => item.PatronDisplayName).join();\n                                }\n                            }\n                            const header = this.getBillHistoryTypeLabel(billHistoryType);\n                            bill[header.replaceAll(\" \", \"\")] = historyItem.Description;\n                        });\n                    }\n                });\n            }\n            if (bill.billStatuses) {\n                if (showStatus.showPassedHouse) {\n                    headers.push(\"Passed House\");\n                    bill[\"PassedHouse\"] = bill.billStatuses.PassedHouse;\n                }\n                if (showStatus.showPassedSenate) {\n                    headers.push(\"Passed Senate\");\n                    bill[\"PassedSenate\"] = bill.billStatuses.PassedSenate;\n                }\n                if (showStatus.showPassed) {\n                    headers.push(\"Passed\");\n                    bill[\"Passed\"] = bill.billStatuses.Passed;\n                }\n                if (showStatus.showFailed) {\n                    headers.push(\"Failed\");\n                    bill[\"Failed\"] = bill.billStatuses.Failed;\n                }\n                if (showStatus.showContinued) {\n                    headers.push(\"Continued\");\n                    bill[\"Continued\"] = bill.billStatuses.Continued;\n                }\n                if (showStatus.showApproved) {\n                    headers.push(\"Approved\");\n                    bill[\"Approved\"] = bill.billStatuses.Approved;\n                }\n                if (showStatus.showVetoed) {\n                    headers.push(\"Vetoed\");\n                    bill[\"Vetoed\"] = bill.billStatuses.Vetoed;\n                }\n            }\n\n            if (bill.committeeEvents) {\n                if (showCommitteeEvent.showFirstHouseCommittee) {\n                    headers.push(\"1st House com\")\n                    bill[\"1stHousecom\"] = bill.committeeEvents.firstHouseCommitteeEvent ? `${moment(bill.committeeEvents.firstHouseCommitteeEvent.EventDate).format(\"MM/DD/YY\")} ${bill.committeeEvents.firstHouseCommitteeEvent.ChamberCode} ${bill.committeeEvents.firstHouseCommitteeEvent.Description}` : \"\";\n                }\n                if (showCommitteeEvent.showFirstSenateCommittee) {\n                    headers.push(\"1st Senate com\")\n                    bill[\"1stSenatecom\"] = bill.committeeEvents.firstSenateCommitteeEvent ? `${moment(bill.committeeEvents.firstSenateCommitteeEvent.EventDate).format(\"MM/DD/YY\")} ${bill.committeeEvents.firstSenateCommitteeEvent.ChamberCode} ${bill.committeeEvents.firstSenateCommitteeEvent.Description}` : \"\";\n                }\n                if (showCommitteeEvent.showLastHouseSubcommittee) {\n                    headers.push(\"Last House Subcommittee Assigned\")\n                    bill[\"LastHouseSubcommitteeAssigned\"] = bill.committeeEvents.lastHouseSubcommitteeEvent ? bill.committeeEvents.lastHouseSubcommitteeEvent.Description : \"\";\n                }\n                if (showCommitteeEvent.showLastSenateSubcommittee) {\n                    headers.push(\"Last Senate Subcommittee Assigned\")\n                    bill[\"LastSenateSubcommitteeAssigned\"] = bill.committeeEvents.lastSenateSubcommitteeEvent ? bill.committeeEvents.lastSenateSubcommitteeEvent.Description : \"\";\n                }\n            }\n            if (showHouseAmendments || showSenateAmendments || showConferenceAmendments || showGovernorsRecommendations) {\n                bill.amendments.forEach(amendment => {\n                    const columnHeader = '\"' + amendment.Description + '\"';\n                    headers.push(columnHeader);\n                    bill[columnHeader.replaceAll(\" \", \"\")] = amendment.DraftText;\n                });\n            }\n            if (showNotes) {\n                bill.Notes.forEach((note, noteIndex) => {\n                    bill[`Note${noteIndex + 1}`] = note.Note;\n                    headers.push(`Note ${noteIndex + 1} `)\n                })\n            }\n\n            if (showSummary) {\n                bill[\"LegislationSummary\"] = stripTags(bill[\"LegislationSummary\"]);\n            }\n\n            if (showTitle) {\n                bill[\"LegislationTitle\"] = stripTags(bill[\"LegislationTitle\"]);\n            }\n\n        });\n        headers = headers.filter((val, i, self) => self.indexOf(val) === i);\n        let fileName = `Search Results ${moment().format(\"MM_DD_YYYY HH mm\")}.csv`\n        let historyFileName = `Bill History ${moment().format(\"MM_DD_YYYY HH mm\")}.csv`;\n        if (!showHistory || headers.length > 1) { //This is here so if the user just wants bill history a csv with just the leg numbers will not created.\n            saveAs(new Blob([generateCsv(headers.filter(x => !x.toLowerCase().includes(\"amendment\")), billData)], { type: \"data:text/csv;charset=utf-8,\" }), fileName);\n        }\n        //History will not fit well in a spreadsheet with the other data so another file is saved here.\n        if (showHistory.all || (showHistory.recent && showHistory.mostRecentAmount > 1)) {\n            saveAs(new Blob([generateCsv(historyHeaders, historyRows)], { type: \"data:text/csv;charset=utf-8,\" }), historyFileName);\n        }\n    }\n\n    toggleShareForm() {\n        this.setState(state => ({\n            showShareForm: !state.showShareForm\n        }));\n    }\n\n    toggleTooltip() {\n        this.setState({\n            showTooltip: !this.state.showTooltip\n        })\n    }\n\n    toggleCompositeSort(value) {\n        this.setState({\n            compositeSortValue: this.state.compositeSortValue === \"LegislationNumberAsc\" && value === \"LegislationNumberAsc\"\n                ? \"LegislationNumberDesc\"\n                : value === \"LegislationNumberAsc\"\n                    ? \"LegislationNumberAsc\"\n                    : this.state.compositeSortValue === \"EventDateAsc\"\n                        ? \"EventDateDesc\"\n                        : \"EventDateAsc\"\n        })\n    }\n\n    toggleShowNotes() {\n        this.setState({\n            showNotes: !this.state.showNotes\n        })\n    }\n\n    componentDidMount() {\n        const reportId = this.props.match.params.id;\n        if (reportId) {\n            this.props.actions.getBillReportInformation('?ReportNumber=' + reportId).then(() => {\n                const billReportInformation = this.props.report.billReportInformation;\n                if (billReportInformation && billReportInformation.BillInformation) {\n                    try {\n                        const json = JSON.parse(window.atob(billReportInformation.BillInformation));\n                        this.setState({\n                            ...json\n                        }, () => {\n                            if (this.state.billList.length > 0) {\n                                this.getReportData();\n                            }\n                            if (this.state.selectedCollection) {\n                                this.props.actions.getCollection(\"?WatchListID=\" + this.state.selectedCollection);\n                            }\n                        });\n                    } catch {\n                        console.error(\"Malformed url\");\n                        this.setState({ generatingReport: false });\n                    }\n                } else {\n                    console.log(\"Request succeeded, but no report information found.\");\n                    this.setState({ reportError: \"This report does not exist.\", generatingReport: false, generatingBillNumbers: false })\n                }\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n                this.setState({ reportError: \"This report does not exist.\", generatingReport: false, generatingBillNumbers: false })\n            })\n        } else {\n            console.log(\"No Report ID found to use.\");\n        }\n    }\n\n    getBillHistoryTypeLabel = (type) => {\n        switch (type) {\n            case 'all':\n                return `All Events`;\n            case 'recent':\n                return this.state.showHistory.mostRecentAmount > 1 ? `${this.state.showHistory.mostRecentAmount} Last Events` : 'Last Event';\n            case 'Committee':\n                return `Last Committee Event`;\n            case 'Subcommittee':\n                return `Last Subcommittee Event`;\n        }\n        return;\n    }\n\n    render() {\n        const { billData, reportError, generatingBillNumbers, generatingReport, gettingCommittees, gettingPatrons, gettingAmendments, gettingBillHistory, gettingVotes, gettingLdNumbers, gettingClerkNames, gettingStaffNames, showCatchline, showCurrentStatus, showTitle, showChiefPatron, showAllPatrons, showSummary, showNotes, showHistory, showHouseAmendments, showSenateAmendments, showConferenceAmendments, showGovernorsRecommendations, showStatus, showCommitteeEvent, showLdNumber, showClerkNames, showDlsStaffNames, sbCount, sjCount, hbCount, hjCount, userCreated } = this.state;\n        const sortBillsNumerically = (a, b, direction) => {\n            if (direction === \"asc\") {\n                return a.LegislationNumber.substring(0, 2).localeCompare(b.LegislationNumber.substring(0, 2)) === 0\n                    ? a.LegislationKey - b.LegislationKey\n                    : a.LegislationNumber.substring(0, 2).localeCompare(b.LegislationNumber.substring(0, 2)) > 0\n                        ? 1\n                        : -1\n            } else {\n                return a.LegislationNumber.substring(0, 2).localeCompare(b.LegislationNumber.substring(0, 2)) === 0\n                    ? b.LegislationKey - a.LegislationKey\n                    : a.LegislationNumber.substring(0, 2).localeCompare(b.LegislationNumber.substring(0, 2)) > 0\n                        ? -1\n                        : 1\n            }\n        }\n\n        if (generatingBillNumbers) {\n            return (\n                <div className=\"small-text\">\n                    {reportError && <div>{reportError}</div>}\n                    <div>Getting Bill Data <span className=\"small-spinner\"></span></div>\n                </div>)\n        }\n        const shareable = this.props.login.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR);\n        return (<div>\n            <div className=\"full\">\n                {this.state.showShareForm && !reportError &&\n                    <ShareReport\n                        toggleShareForm={this.toggleShareForm}\n                    />\n                }\n                <div className=\"advanced-search dlas-forms\">\n                    {!reportError &&\n                        <>\n                            <div className=\"flex-row\">\n                                <br />\n                                <div className=\"inline-list\" style={{ textAlign: 'right' }}>\n                                    {generatingReport &&\n                                        <div className=\"small-text center\">Getting Data <span className=\"small-spinner\"></span></div>\n                                    }\n                                    <React.Fragment>\n                                        {this.props.match.path.includes(\"composite\") && (this.props.login.userProfile.email === userCreated) &&\n                                            <button type=\"button\" className=\"button\" onClick={() => this.toggleShowNotes()}>{(this.state.showNotes ? \"Hide\" : \"Show\") + \" Notes\"}</button>\n                                        }\n                                        {shareable &&\n                                            <button disabled={generatingReport} onClick={this.toggleShareForm} type=\"button\" className=\"button\">Share</button>\n                                        }\n                                        <span aria-label=\"html\" title=\"html\" onClick={this.makeHtml} className={`icon paper${generatingReport ? ' disabled' : ''} `}></span>\n                                        <span aria-label=\"print\" title=\"print\" onClick={this.makePrintout} className={`icon print${generatingReport ? ' disabled' : ''} `}></span>\n                                        <span aria-label=\"spreadsheet\" title=\"spreadsheet\" onClick={this.makeSpreadsheet} className={`icon csv${generatingReport ? ' disabled' : ''} `}></span>\n                                        <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip() }} style={{ cursor: \"pointer\" }}>CSV Help</a>\n                                        {this.state.showTooltip &&\n                                            <div className={`info - box report - tooltip${shareable ? ' shareable' : ''} `}>\n                                                <p>If you have selected 'All Events' or 'X last events', then these events will be downloaded in a separate .csv file.</p>\n                                                <p>Amendment text is not included in .csv file downloads.</p>\n                                                <p>Some text selections in the .csv file may include HTML markup.</p>\n                                            </div>\n                                        }\n                                    </React.Fragment>\n                                </div>\n                            </div>\n                            <br />\n                        </>\n                    }\n                    <div ref={this.htmlRef}>\n                        {this.state.reportTitle || this.props.collection.collection != \"\" ?\n                            <div>\n                                <h2>{this.state.reportTitle || this.props.collection.collection[0].Name}</h2>\n                            </div>\n                            : null\n                        }\n                        <div className=\"small-text\">\n                            {reportError && <div>{reportError}</div>}\n                        </div>\n                        <div ref={this.reportData} className=\"report-container\">\n                            <span>{this.state.personalMessage}</span>\n                            {!this.props.match.path.includes(\"composite\")\n                                ? billData.map((bill, i) =>\n                                    <div key={i} style={{ pageBreakInside: 'avoid', display: 'block' }}>\n                                        <h3><Link className='report-link' to={`/bill-details/${bill.SessionCode}/${bill.LegislationNumber}`}>{bill.LegislationNumber.split(/(\\d+)/).join(\" \")}</Link > {showCatchline && ` - ${bill.Description}`\n                                        }</h3 >\n                                        {\n                                            showChiefPatron || showAllPatrons ?\n                                                (bill.loadingPatrons ?\n                                                    <div style={{ margin: '0.3em 0px' }}>Getting Patrons <span className=\"small-spinner\"></span></div>\n                                                    :\n                                                    <div>\n                                                        {showChiefPatron && bill['Chief Patron'] &&\n                                                            <p>Chief Patron{bill['Chief Patron'].length > 1 && \"s\"}: {bill['Chief Patron'].map((patron, patronIndex) => <React.Fragment key={patronIndex}>\n                                                                {patronIndex !== 0 && ', '}{patron.PatronDisplayName}\n                                                            </React.Fragment>)}</p>\n                                                        }\n                                                        {showAllPatrons &&\n                                                            <p>Patron{bill.Patrons.length > 1 && \"s\"}: {bill.Patrons.map((patron, patronIndex) => <React.Fragment key={patronIndex}>\n                                                                {patronIndex !== 0 && ', '}{patron.PatronDisplayName}\n                                                            </React.Fragment>)}</p>\n                                                        }\n                                                    </div>)\n                                                : null\n                                        }\n                                        {showCurrentStatus && <p>Status: {bill.LegislationStatus}</p>}\n                                        {showTitle && bill.LegislationTitle && renderHTML(bill.LegislationTitle)\n                                        }\n                                        {\n                                            showClerkNames && bill.CommitteeID && bill.SessionID &&\n                                                bill.loadingClerkNames || (!this.state.committeeClerksAndStaff.find(c => c.AffiliationID === bill.CommitteeID && c.SessionID === bill.SessionID && c.StaffRoleTypeID === this.state.clerkRoleTypeID) && gettingClerkNames) ?\n                                                <div style={{ margin: '0.3em 0px' }}>Getting clerk(s) of current committee <span className=\"small-spinner\"></span></div>\n                                                :\n                                                this.state.committeeClerksAndStaff.find(c => c.AffiliationID === bill.CommitteeID && c.SessionID === bill.SessionID && c.StaffRoleTypeID === this.state.clerkRoleTypeID) ?\n                                                    <div>\n                                                        <p>\n                                                            <span>Clerk{this.state.committeeClerksAndStaff.filter(c => c.AffiliationID === bill.CommitteeID && c.SessionID === bill.SessionID && c.StaffRoleTypeID === this.state.clerkRoleTypeID).length > 1 ? 's' : ''} of current committee:</span>&nbsp;\n                                                            {\n                                                                this.state.committeeClerksAndStaff.filter(c => c.AffiliationID === bill.CommitteeID && c.SessionID === bill.SessionID && c.StaffRoleTypeID === this.state.clerkRoleTypeID).map((m, i) =>\n                                                                    <span>{m.FullName}{i === this.state.committeeClerksAndStaff.filter(c => c.AffiliationID === bill.CommitteeID && c.SessionID === bill.SessionID && c.StaffRoleTypeID === this.state.clerkRoleTypeID).length - 1 ? '' : ', '}</span>\n                                                                )\n                                                            }\n                                                        </p>\n                                                    </div>\n                                                    : null\n                                        }\n                                        {\n                                            showDlsStaffNames && bill.CommitteeID && bill.SessionID &&\n                                                bill.loadingStaffNames || (!this.state.committeeClerksAndStaff.find(c => c.AffiliationID === bill.CommitteeID && c.SessionID === bill.SessionID && c.StaffRoleTypeID === this.state.staffRoleTypeID) && gettingStaffNames) ?\n                                                <div style={{ margin: '0.3em 0px' }}>Getting DLS staff of current committee <span className=\"small-spinner\"></span></div>\n                                                :\n                                                this.state.committeeClerksAndStaff.find(c => c.AffiliationID === bill.CommitteeID && c.SessionID === bill.SessionID && c.StaffRoleTypeID === this.state.staffRoleTypeID) ?\n                                                    <div>\n                                                        <p>\n                                                            <span>DLS staff of current committee:</span>&nbsp;\n                                                            {\n                                                                this.state.committeeClerksAndStaff.filter(c => c.AffiliationID === bill.CommitteeID && c.SessionID === bill.SessionID && c.StaffRoleTypeID === this.state.staffRoleTypeID).map((m, i) =>\n                                                                    <span>{m.FullName}{i === this.state.committeeClerksAndStaff.filter(c => c.AffiliationID === bill.CommitteeID && c.SessionID === bill.SessionID && c.StaffRoleTypeID === this.state.staffRoleTypeID).length - 1 ? '' : ', '}</span>\n                                                                )\n                                                            }\n                                                        </p>\n                                                    </div>\n                                                    : null\n                                        }\n                                        {\n                                            showNotes && bill.Notes && bill.Notes.length > 0 &&\n                                            <div>\n                                                <span>Notes</span>\n                                                {bill.Notes.map((note, noteIndex) =>\n                                                    <div key={noteIndex}>\n                                                        <span className=\"small-text\"><span className=\"bold\">{note.ListName}</span>: {note.Note}</span>\n                                                    </div>\n                                                )}\n                                                <br />\n                                            </div>\n                                        }\n                                        {\n                                            showLdNumber &&\n                                                bill.loadingLdNumber || (!bill.LdNumber && gettingLdNumbers) ?\n                                                <div style={{ margin: '0.3em 0px' }}>Getting LD Number of current version <span className=\"small-spinner\"></span></div>\n                                                :\n                                                bill.LdNumber ?\n                                                    <div>\n                                                        <p>LD Number of current version: {bill.LdNumber}</p>\n                                                    </div>\n                                                    : null\n                                        }\n                                        {\n                                            showSummary &&\n                                            <div>\n                                                <strong>{bill.SummaryVersion}:</strong>{renderHTML(bill.LegislationSummary)}\n                                            </div>\n                                        }\n                                        {\n                                            (showHouseAmendments || showSenateAmendments || showConferenceAmendments || showGovernorsRecommendations) && (\n                                                bill.loadingAmendments ?\n                                                    <div style={{ margin: '0.3em 0px' }}>Getting Amendment Text <span className=\"small-spinner\"></span></div>\n                                                    :\n                                                    bill.amendments && bill.amendments.length ?\n                                                        <div>\n                                                            {bill.amendments.map((amendment, amendmentIndex) =>\n                                                                <div key={amendmentIndex}>\n                                                                    <strong>{amendment.Description}</strong>\n                                                                    {renderHTML(amendment.DraftText)}\n                                                                </div>\n                                                            )}\n                                                        </div>\n                                                        : null\n                                            )\n                                        }\n                                        {\n                                            bill.billStatuses &&\n                                            <div className=\"inner-grid four small-text\">\n                                                {bill.loadingStatusHistory ?\n                                                    <div style={{ margin: '0.3em 0px' }}>Getting Amendment Text <span className=\"small-spinner\"></span></div>\n                                                    :\n                                                    <>\n                                                        {showStatus.showPassedHouse && <span>Passed House: {bill.billStatuses.PassedHouse}</span>}\n                                                        {showStatus.showPassedSenate && <span>Passed Senate: {bill.billStatuses.PassedSenate}</span>}\n                                                        {showStatus.showPassed && <span>Passed: {bill.billStatuses.Passed}</span>}\n                                                        {showStatus.showVetoed && <span>Vetoed: {bill.billStatuses.Vetoed}</span>}\n                                                        {showStatus.showApproved && <span>Approved: {bill.billStatuses.Approved}</span>}\n                                                        {showStatus.showFailed && <span>Failed: {bill.billStatuses.Failed}</span>}\n                                                        {showStatus.showContinued && <span>Continued: {bill.billStatuses.Continued}</span>}\n                                                        {showStatus.showEmergency && <span>Emergency: {bill.Emergency}</span>}\n                                                    </>\n                                                }\n                                            </div>\n                                        }\n                                        {\n                                            bill.committeeEvents &&\n                                            <div className=\"small-text\">\n                                                {showCommitteeEvent.showFirstHouseCommittee && bill.committeeEvents.firstHouseCommitteeEvent && <div>First House Committee Referred: {bill.committeeEvents.firstHouseCommitteeEvent.Description}</div>}\n                                                {showCommitteeEvent.showFirstSenateCommittee && bill.committeeEvents.firstSenateCommitteeEvent && <div>First Senate Committee Referred : {bill.committeeEvents.firstSenateCommitteeEvent.Description}</div>}\n                                                {showCommitteeEvent.showLastHouseSubcommittee && bill.committeeEvents.lastHouseSubcommitteeEvent && <div>Last House Subcommittee Assigned: {bill.committeeEvents.lastHouseSubcommitteeEvent.Description}</div>}\n                                                {showCommitteeEvent.showLastSenateSubcommittee && bill.committeeEvents.lastSenateSubcommitteeEvent && <div>Last Senate Subcommittee Assigned: {bill.committeeEvents.lastSenateSubcommitteeEvent.Description}</div>}\n                                            </div>\n                                        }\n                                        {\n                                            showHistory && (\n                                                bill.loadingHistory ?\n                                                    <div style={{ margin: '0.3em 0px' }}>{\"Getting Bill Events\" + (showHistory.showVotes ? \" and Vote Data\" : \"\")} <span className=\"small-spinner\"></span></div>\n                                                    :\n                                                    bill.billHistory &&\n                                                    //Move grid container div inti place of react fragment to create a new grid for each row instead of continuing to overfill the parent div\n                                                    <div>\n                                                        {Object.entries(bill.billHistory).map(([billHistoryType, billHistoryItems], billHistoryTypeIndex) =>\n                                                            <div key={billHistoryTypeIndex}>\n                                                                <p>{this.getBillHistoryTypeLabel(billHistoryType)}</p>\n                                                                <div style={{ display: \"grid\", gridTemplateColumns: \"90px 75px 1fr\" }} className=\"small-text\">\n                                                                    {billHistoryItems.map((billHistoryItem, billHistoryItemIndex) =>\n                                                                        <>\n                                                                            <div style={{ marginRight: \"12px\" }}>\n                                                                                {moment(billHistoryItem.EventDate).format('MM/DD/YYYY')}\n                                                                            </div>\n                                                                            <div style={{ marginRight: \"12px\" }}>\n                                                                                {billHistoryItem.ActorType}\n                                                                            </div>\n                                                                            <div style={{ marginRight: \"12px\" }}>\n                                                                                {billHistoryItem.Description}\n                                                                            </div>\n                                                                            {showHistory.showVotes && (\n                                                                                billHistoryItem.voteDetails ?\n                                                                                    <div style={{ gridColumn: '3 / 4' }}>\n                                                                                        <p>\n                                                                                            YEAS--\n                                                                                            {billHistoryItem.voteDetails.memberYeas.map((item, index) => (\n                                                                                                <span key={index}>{item.PatronDisplayName}{billHistoryItem.voteDetails.memberYeas.length === index + 1 ? '--' : ', '}</span>\n                                                                                            ))}\n                                                                                            {billHistoryItem.voteDetails.memberYeas.length}\n                                                                                        </p>\n                                                                                        <p>\n                                                                                            NAYS--\n                                                                                            {billHistoryItem.voteDetails.memberNays.map((item, index) => (\n                                                                                                <span key={index}>{item.PatronDisplayName}{billHistoryItem.voteDetails.memberNays.length === index + 1 ? '--' : ', '}</span>\n                                                                                            ))}\n                                                                                            {billHistoryItem.voteDetails.memberNays.length}\n                                                                                        </p>\n                                                                                        <p>\n                                                                                            {(billHistoryItem.voteDetails.VoteType === \"Floor\" && billHistoryItem.voteDetails.ChamberCode === \"S\") ? \"RULE 36--\" : \"ABSTENTIONS--\"}\n                                                                                            {billHistoryItem.voteDetails.memberAbstentions.map((item, index) => (\n                                                                                                <span key={index}>{item.PatronDisplayName}{billHistoryItem.voteDetails.memberAbstentions.length === index + 1 ? '--' : ', '}</span>\n                                                                                            ))}\n                                                                                            {billHistoryItem.voteDetails.memberAbstentions.length}\n                                                                                        </p>\n                                                                                        <p>\n                                                                                            NOT VOTING--\n                                                                                            {billHistoryItem.voteDetails.memberNoVote.map((item, index) => (\n                                                                                                <span key={index}>{item.PatronDisplayName}{billHistoryItem.voteDetails.memberNoVote.length === index + 1 ? '--' : ', '}</span>\n                                                                                            ))}\n                                                                                            {billHistoryItem.voteDetails.memberNoVote.length}\n                                                                                        </p>\n                                                                                        {(billHistoryItem.voteDetails.VoteType !== \"Floor\" && billHistoryItem.voteDetails.ChamberCode !== \"S\") &&\n                                                                                            <p>\n                                                                                                RULE 36--\n                                                                                                {billHistoryItem.voteDetails.memberRule36.map((item, index) => (\n                                                                                                    <span key={index}>{item.PatronDisplayName}{billHistoryItem.voteDetails.memberRule36.length === index + 1 ? '--' : ', '}</span>\n                                                                                                ))}\n                                                                                                {billHistoryItem.voteDetails.memberRule36.length}\n                                                                                            </p>\n                                                                                        }\n                                                                                    </div>\n                                                                                    :\n                                                                                    billHistoryItem.loadingVotes ?\n                                                                                        <div style={{ gridColumn: '3/4', margin: '0.3em 0px' }}>Getting Vote Data <span className=\"small-spinner\"></span></div>\n                                                                                        :\n                                                                                        null\n                                                                            )}\n                                                                        </>\n                                                                    )}\n                                                                </div>\n                                                            </div>\n                                                        )}\n                                                    </div>\n                                            )\n                                        }\n                                        <hr className=\"faded-line\" />\n                                    </div >\n                                )\n                                : <>\n                                    <div className='composite-view-header'>\n                                        <div className=\"composite-view-header-label\" onClick={() => this.toggleCompositeSort(\"LegislationNumberAsc\")}>Bill</div>\n                                        <div>Committee</div>\n                                        <div>Last Action</div>\n                                        <div className=\"composite-view-header-label\" onClick={() => this.toggleCompositeSort(\"EventDateAsc\")}>Date</div>\n                                    </div>\n                                    {billData.sort((a, b) => {\n                                        return this.state.compositeSortValue === \"LegislationNumberAsc\"\n                                            ? sortBillsNumerically(a, b, \"asc\")\n                                            : this.state.compositeSortValue === \"LegislationNumberDesc\"\n                                                ? sortBillsNumerically(a, b, \"desc\")\n                                                : this.state.compositeSortValue === \"EventDateAsc\"\n                                                    ? moment(b.billHistory.recent[0].EventDate).isAfter(a.billHistory.recent[0].EventDate) ? 1 : -1\n                                                    : moment(b.billHistory.recent[0].EventDate).isBefore(a.billHistory.recent[0].EventDate) ? 1 : -1\n                                    }).map((bill, i) =>\n                                        <>\n                                            <div className={'composite-view-wrapper ' + ((!this.state.showNotes || this.props.login.userProfile.email !== userCreated) && \"notes-hidden\")}>\n                                                <div className='composite-view-data'>\n                                                    <div><Link to={\"/bill-details/\" + bill.SessionCode + \"/\" + bill.LegislationNumber}>{bill.LegislationNumber}</Link>{\" - \" + (bill.Patrons.find(x => x.PatronTypeID === 1) ? (bill.Patrons.find(x => x.PatronTypeID === 1).PatronDisplayName + \" - \") : \"\") + bill.Description}</div>\n                                                    {bill.billHistory && bill.billHistory.Committee\n                                                        ? <div className='composite-view-committees'>\n                                                            <div>{bill.billHistory.Committee.find(x => x.ChamberCode === \"H\") ? \"(H) \" + (bill.billHistory.Committee.sort((a, b) => moment(a.EventDate).isBefore(b.EventDate) ? 1 : -1).find(x => x.ChamberCode === \"H\").ParentCommitteeName ?? bill.billHistory.Committee.sort((a, b) => moment(a.EventDate).isBefore(b.EventDate) ? 1 : -1).find(x => x.ChamberCode === \"H\").CommitteeName) : \"\"}</div>\n                                                            <div>{bill.billHistory.Committee.find(x => x.ChamberCode === \"S\") ? \"(S) \" + (bill.billHistory.Committee.sort((a, b) => moment(a.EventDate).isBefore(b.EventDate) ? 1 : -1).find(x => x.ChamberCode === \"S\").ParentCommitteeName ?? bill.billHistory.Committee.sort((a, b) => moment(a.EventDate).isBefore(b.EventDate) ? 1 : -1).find(x => x.ChamberCode === \"S\").CommitteeName) : \"\"}</div>\n                                                        </div>\n                                                        : <div className='composite-view-committees'>\n                                                            <div />\n                                                            <div />\n                                                        </div>\n                                                    }\n                                                    <div>\n                                                        {bill.billHistory\n                                                            ? (bill.billHistory.recent[0].ChamberCode ? \"(\" + bill.billHistory.recent[0].ChamberCode + \") \" : \"\") + bill.billHistory.recent[0].Description\n                                                            : \"\"}\n                                                    </div>\n                                                    <div>\n                                                        {bill.billHistory\n                                                            ? moment(bill.billHistory.recent[0].EventDate).format(\"MM/DD/YY\")\n                                                            : \"\"}\n                                                    </div>\n                                                </div>\n                                                {this.state.showNotes && userCreated === this.props.login.userProfile.email\n                                                    && <>\n                                                        {bill.Notes !== undefined && bill.Notes.length > 0\n                                                            ? <div className='composite-view-notes'>{\"Notes: \" + bill.Notes[0].Note}</div>\n                                                            : <div />\n                                                        }\n                                                    </>\n                                                }\n                                            </div>\n\n                                        </>\n                                    )}\n                                </>\n                            }\n\n\n                            {!reportError && <span><b>Counts:</b> {`HB: ${hbCount} HJ: ${hjCount} SB: ${sbCount} SJ: ${sjCount}`}</span>}\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <iframe ref={this.printOutRef} width=\"0\" height=\"0\" frameBorder=\"0\" src=\"about:blank\"></iframe>\n        </div >);\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { bills, session, members, committee, patrons, nav, login, votes, collection, report, personnel } = state;\n        return {\n            bills,\n            session,\n            members,\n            committee,\n            patrons,\n            nav,\n            login,\n            votes,\n            collection,\n            report,\n            personnel\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, committeeActionCreators, billActionCreators, sessionActionCreators, memberActionCreators, patronActionCreators, voteActionCreators, collectionActionCreators, reportActionCreators, personnelActionCreators), dispatch)\n        }\n    }\n)(ReportMaker);","import moment from 'moment-timezone';\n\nconst SearchTranslator = props => {\n    const sessionCode = parseInt(props.match.params.id);\n    const wordToTranslate = props.match.params.word;\n    const param = props.match.params.wordparam;\n    let url = '/bill-search';\n    if(isNaN(sessionCode) || !wordToTranslate) {\n        props.history.push(url);\n        return(null);\n    }\n\n    let billSearchParams = '';\n    switch(wordToTranslate.toUpperCase()) {\n        case(\"ALL\"):\n            billSearchParams = { selectedBillStatus: 1 }\n            break;\n        case(\"TOP\"):\n            billSearchParams = { mostFrequent: true }\n            break;\n        case(\"INT\"):\n            const date = moment(param);\n            if(param && date.isValid()) {\n                billSearchParams = {\n                    selectedBillStatus: 1,\n                    billStatusStartDate: date.startOf('day'),\n                    billStatusEndDate: date.endOf('day')\n                };  \n            }\n            break;\n        case(\"PSH\"):\n            billSearchParams = { selectedBillStatus: 4 }\n            break;\n        case(\"PSS\"):\n            billSearchParams = { selectedBillStatus: 5 }\n            break;\n        case(\"PAS\"):\n            billSearchParams = { selectedBillStatus: 6 }\n            break;\n        case(\"ENR\"):\n            billSearchParams = { selectedBillStatus: 14 }\n            break;\n        case(\"SGN\"):\n            billSearchParams = { selectedBillStatus: 21 }\n            break;\n        case(\"FAI\"):\n            billSearchParams = { selectedBillStatus: 9 }\n            break;\n        case(\"PND\"):\n            billSearchParams = { isPending: true }\n            break;\n        case(\"CAR\"):\n            billSearchParams = { selectedBillStatus: 10 }\n            break;\n        case(\"CIN\"):\n            billSearchParams = { selectedBillStatus: 16 }\n            break;\n        case(\"CRA\"):\n            billSearchParams = { selectedBillStatus: 31 }\n            break;\n        case(\"CRR\"):\n            billSearchParams = { selectedBillStatus: 32 }\n            break;\n        case(\"REC\"):\n            billSearchParams = { selectedBillStatus: 27 }\n            break;\n        case(\"GAS\"):\n            billSearchParams = { selectedBillStatus: 33 }\n            break;\n        case(\"APP\"):\n            billSearchParams = { selectedBillStatus: 8 }\n            break;\n        case(\"VET\"):\n            billSearchParams = { selectedBillStatus: 26 }\n            break;\n        case(\"CHP\"):\n            billSearchParams = { selectedBillStatus: 25 }\n            break;\n    }\n\n    if(billSearchParams) {\n        billSearchParams.selectedSession = sessionCode;\n        const b64Params = window.btoa(JSON.stringify(billSearchParams));\n        url += '?q=' + b64Params;\n    }\n    props.history.push(url);\n\n    return(null);\n}\n\nexport default SearchTranslator;","import moment from 'moment-timezone';\nimport React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { patronActionCreators } from '../../../stores/lis-patron-store';\n\nclass ShorthandUrlTranslator extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            params: [],\n            error: false\n        };\n\n        this.findPatronType = this.findPatronType.bind(this);\n    }\n\n    findPatronType(value) {\n        switch (value) {\n            case \"C\":\n                return this.props.patrons.patronRoles.find(x => x.Name === \"Chief Patron\").PatronTypeID\n            case \"F\":\n                return this.props.patrons.patronRoles.find(x => x.Name === \"Chief Co-Patron\").PatronTypeID\n            case \"S\":\n                return this.props.patrons.patronRoles.find(x => x.Name === \"Co-Patron\").PatronTypeID\n            case \"I\":\n                return this.props.patrons.patronRoles.find(x => x.Name === \"Incorporated Chief Co-Patron\").PatronTypeID\n            default:\n                return '';\n        }\n    }\n\n    componentDidMount() {\n        this.setState({\n            params: this.props.location.search.slice(1).split(\"&\")\n        }, () => {\n            if(!this.state.params || this.state.params.length === 0) {\n                this.setState({\n                    error: true\n                }, () => {\n                    return;\n                })                \n            }\n\n            this.props.actions.getSessionList()\n                .then(() => {\n                    //Get the default session if the user didn't pass in a session param\n                    let sessionParam = \"SessionID=\" + (this.state.params.findIndex(x => x.toLowerCase().includes(\"ses\")) >= 0\n                        ? this.props.session.sessionList.find(x => x.SessionCode === this.state.params[this.state.params.findIndex(x => x.toLowerCase().includes(\"ses\"))].split(\"=\")[1]).SessionID\n                        : this.props.session.sessionList.find(x => x.IsDefault).SessionID);\n\n                    this.props.actions.getCommitteeList(sessionParam + \"&includeSubCommittees=true\")\n                        .then(this.props.actions.getPatronRoles(sessionParam)\n                            .then(this.props.actions.getMemberList(sessionParam)\n                                .then(() => {                                    \n                                    let obj = {};\n                                    try {\n                                        for (let i = 0; i < this.state.params.length; i++) {\n                                            switch (this.state.params[i].split(\"=\")[0].toLowerCase()) {\n                                                case \"com\":\n                                                    obj.selectedCommittee = this.props.committee.committeeList.find(x => x.CommitteeNumber === this.state.params[i].split(\"=\")[1]).CommitteeID\n                                                    break;\n                                                case \"subcom\":\n                                                    obj.selectedSubcommittee = this.props.committee.committeeList.find(x => x.CommitteeNumber === this.state.params[i].split(\"=\")[1]).CommitteeID\n                                                    break;\n                                                case \"mem\":\n                                                    obj.selectedPatron = this.props.members.memberList.find(x => x.MemberNumber === this.state.params[i].split(\"=\")[1]).MemberID\n                                                    break;\n                                                case \"mempat\":\n                                                    if (!obj.selectedPatronType)\n                                                        obj.selectedPatronType = [];\n                                                    obj.selectedPatronType.push(this.findPatronType(this.state.params[i].split(\"=\")[1]))\n                                                    break;\n                                                case \"ses\":\n                                                    obj.selectedSession = this.props.session.sessionList.find(x => x.SessionCode === this.state.params[i].split(\"=\")[1]).SessionID\n                                                    break;\n                                                default:\n                                                    //Invalid param, do nothing\n                                                    break;\n                                            }\n                                        }\n\n                                        //If the user provided patron types with no patron throw an error\n                                        if (obj.selectedPatronType && !obj.selectedPatron) {\n                                            this.setState({\n                                                error: true\n                                            }, () => {\n                                                return;\n                                            })\n                                        }\n\n                                        //If the user provided a member without patron types then set the default patron types based on chamber\n                                        if (obj.selectedPatron && !obj.selectedPatronType && this.props.members.memberList.find(x => x.MemberID === obj.selectedPatron).ChamberCode === \"H\") {\n                                            obj.selectedPatronType = [1, 2, 4];\n                                        } else if (obj.selectedPatron && !obj.selectedPatronType) {\n                                            obj.selectedPatronType = [1, 2, 4, 5];\n                                        }\n\n                                        //If the user provided a subcommittee without a parent committee then set the parent committee for them\n                                        if (obj.selectedSubcommittee && !obj.selectedCommittee) {\n                                            obj.selectedCommittee = this.props.committee.committeeList.find(x => x.CommitteeID === (this.props.committee.committeeList.find(x => x.CommitteeID === obj.selectedSubcommittee).ParentCommitteeID)).CommitteeID\n                                        }\n\n                                        if (Object.keys(obj).length > 0) {\n                                            const b64Params = window.btoa(JSON.stringify(obj));\n                                            const url = '/bill-search/?q=' + b64Params;\n                                            this.props.history.push(url);\n                                        } else {\n                                            this.setState({\n                                                error: true\n                                            }, () => {\n                                                return;\n                                            })\n                                        }\n                                    } catch (e) {\n                                        console.log(e)\n                                        this.setState({\n                                            error: true\n                                        })\n                                    }\n                                })));\n\n                })\n        })\n    }\n\n    render() {\n        return (\n            <div>\n                {!this.state.error\n                    ? <div className=\"center-spinner spinner\">Loading...</div>\n                    : <p className='message-error'>There was an error converting your URL parameters into a bill search. Please check your parameters and try again.\n                        <br />\n                        <br />\n                        The following parameters can be used to write a search query:\n                        <br />\n                        <br />\n                        To search for a:\n                        <br />\n                        Member: mem=Member Number\n                        <br />\n                        Patron Type: mempat=Letter (C/F/S/I)\n                        <br />\n                        Committee: com=Committee Number\n                        <br />\n                        Subcommittee: subcom=Committee Number\n                        <br />\n                        Session: ses=Session Code\n                        <br />\n                        <br />\n                        The URLs are constructed as /q/?param=value&param2=value2&param3=value3\n                        <br />\n                        <br />\n                        For example:  lis.virginia.gov/q?ses=20221&mem=H0289&mempat=S&mempat=F will get legislation for Dawn Adams as a Co-Patron or Chief Co-Patron in the 2022 Regular Session.\n                        <br />\n                        <br />\n                        You may use multiple patron types. If you use multiple sessions, members, committees, or subcommittees the search will use the last one in the list. If you supply a patron type you must supply a patron.\n                    </p>\n                }\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, committee, members, patrons, session } = state;\n        return {\n            nav,\n            committee,\n            members,\n            patrons,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, committeeActionCreators, memberActionCreators, navActionCreators, patronActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(ShorthandUrlTranslator);","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst agencyListSuccess = 'AGENCY_LIST_SUCCESS';\nconst agencyListFailure = 'AGENCY_LIST_FAILURE';\n\nconst initialState = {\n    agencyList: [],\n    agencyListError: '',\n};\n\nexport const orgActionCreators = {\n\n    receiveAgencyList: (content) => ({\n        type: agencyListSuccess,\n        agencyList: content\n    }),\n\n    agencyListError: (message) => ({\n        type: agencyListFailure,\n        agencyListError: message\n    }),\n\n    getAgencyList: (params) => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_STATS_API_URL) + '/Organization/api/GetAgencyReferencesAsync', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(orgActionCreators.agencyListError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(orgActionCreators.receiveAgencyList(result[1].Agencies));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(orgActionCreators.receiveAgencyList([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n}\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n    switch (action.type) {\n        case agencyListSuccess:\n            return Object.assign({}, state, {\n                agencyList: action.agencyList,\n                agencyListError: ''\n            })\n        case agencyListFailure:\n            return Object.assign({}, state, {\n                agencyListError: action.agencyListError\n            })\n        default:\n            return state\n    }\n};","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport Select from 'react-select';\nimport moment from 'moment-timezone';\n\nclass ImpactStatementForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            fiscal: true,\n            selectedAgency: \"\",\n            uploadFile: \"\"\n        }\n\n        this.getImpactStatementDescription = this.getImpactStatementDescription.bind(this);\n        this.handleAgencyChange = this.handleAgencyChange.bind(this);\n        this.handleFileChange = this.handleFileChange.bind(this);\n        this.submit = this.submit.bind(this);\n    }\n\n    handleRadioChange() {\n        this.setState({\n            fiscal: !this.state.fiscal\n        })\n    }\n\n    handleAgencyChange(value) {\n        this.setState({\n            selectedAgency: value\n        })\n    }\n\n    handleFileChange(e) {\n        this.setState({\n            uploadFile: e.target.files[0]\n        })\n    }\n\n    getImpactStatementDescription() {\n        if (!this.state.selectedAgency) { return \"\" }\n        let description;\n        if (!this.state.fiscal) {\n            description = \"Racial and ethnic impact statement\";\n        } else if (this.state.selectedAgency.Abbreviation !== \"JLARC\") {\n            description = \"Impact statement\";\n        } else {\n            description = \"Fiscal impact review\";\n        }\n\n        description += \" from \" + this.state.selectedAgency.Abbreviation + \" (\" + this.props.match.params.billnumber + \")\";\n        return description;\n    }\n\n    submit() {\n        this.props.submit(this.getImpactStatementDescription(), this.state.selectedAgency, this.state.uploadFile);\n    }\n\n    render() {\n        let description = this.getImpactStatementDescription();\n        if (description) {\n            description = description.substr(0, description.indexOf(\"(\"))\n        }\n        return (\n            <div className=\"dlas-forms\">\n                <p>{\"Impact Statement for \" + moment(this.props.statementDate).format(\"MM/DD/YYYY\") + \" - \" + this.props.statementDescription}</p>\n                <div className=\"grid-wrapper one-two-small-small\">\n                    <div style={{ whiteSpace: 'nowrap' }}>\n                        <div style={{ display: \"inline-flex\", alignItems: 'center', marginRight: '0.5em' }}>\n                            <label htmlFor=\"selected-type-button\" className={`label radio-label`} style={{ whiteSpace: \"no-wrap\", width: 'auto' }}>Fiscal</label>\n                            <input id=\"selected-type-button\" checked={this.state.fiscal === true} onChange={() => this.handleRadioChange()} type=\"radio\" />\n                        </div>\n                        <div style={{ display: \"inline-flex\", alignItems: 'center' }}>\n                            <label htmlFor=\"all-sessions-button\" className={`label radio-label`} style={{ whiteSpace: \"no-wrap\", width: 'auto' }}>Racial and Ethnic</label>\n                            <input id=\"all-sessions-button\" checked={this.state.fiscal === false} onChange={() => this.handleRadioChange()} type=\"radio\" />\n                        </div>\n                    </div>\n                    <Select\n                        options={this.props.agencyOptions}\n                        onChange={this.handleAgencyChange}\n                        value={this.state.selectedAgency}\n                        isSearchable\n                    />\n                    <button type=\"button\" className=\"button small-button file-button\">\n                        <input type=\"file\" accept=\".pdf\" onChange={this.handleFileChange} />\n                        {this.state.uploadFile ? this.state.uploadFile.name : \"Attach Impact Statement\"}\n                    </button>\n                </div>\n                <br />\n                <div>\n                    <p style={{ position: 'absolute' }}>{description ? \"Description: \" + description : \"\"}</p>\n                    <div className=\"align-right\">\n                        <button type=\"button\" className=\"button secondary\" style={{ marginRight: \"15px\" }} onClick={() => this.props.toggleStatementForm()}>Cancel</button>\n                        <button type=\"button\" className=\"button default\" disabled={this.state.uploadFile === \"\" || this.state.selectedAgency === \"\" || this.props.isSubmitting} onClick={() => this.submit()}>Upload</button>\n                    </div>\n                </div>\n            </div>\n        )\n    }\n}\n\nexport default withRouter(ImpactStatementForm);\n","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { collectionActionCreators } from '../../../stores/lis-collection-store';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\n\nclass CollectionNotes extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            notes: [],\n            expanded: false\n        };\n\n        this.toggleExpandNotes = this.toggleExpandNotes.bind(this);\n    }\n\n    componentDidMount() {\n        this.props.actions.getCollections(\"?SessionID=\" + this.props.sessionId)\n            .then(() => {\n                const legId = this.props.billData.LegislationID;\n                let notes = [];\n                this.props.collection.collections.forEach(collection => {\n                    const legislationInCollection = collection.WatchListLegislation.find(leg => leg.LegislationID === legId);\n                    if (legislationInCollection && legislationInCollection.Note) {\n                        notes.push({\n                            ...legislationInCollection,\n                            Name: collection.Name,\n                            Description: collection.Description\n                        });\n                    }\n                });\n                this.setState({\n                    notes: notes\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return\n                }\n            });\n    }\n\n    toggleExpandNotes() {\n        this.setState({\n            expanded: !this.state.expanded\n        })\n    }\n\n    render() {\n        if (this.state.notes.length === 0) {\n            return (<div></div>);\n        }\n        return (<div>\n            <h4>Your Notes</h4>\n            {this.state.notes.map((note, noteIndex) =>\n                <div key={noteIndex} className='note-wrapper'>\n                    <span className=\"small-text\"><span className=\"bold\">{note.Name}</span>: {note.Note.length < 345 || this.state.expanded ? note.Note : note.Note.substring(0, 345) + \"...\"}</span>\n                </div>\n            )}\n            {this.state.notes.find(x => x.Note.length > 400) && <button className='button small-button note-button' type=\"button\" onClick={() => this.toggleExpandNotes()}>{(this.state.expanded ? \"Collapse\" : \"Expand\") + \" Notes\"}</button>}\n        </div>)\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { collection, login } = state;\n        return {\n            collection,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, collectionActionCreators), dispatch)\n        }\n    }\n)(CollectionNotes)","import React from 'react';\nimport moment from 'moment-timezone';\nimport renderHTML from 'react-render-html';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport ReactToPrint from \"react-to-print\";\nimport CreatableSelect from 'react-select/creatable';\nimport { billActionCreators } from '../../../stores/lis-legislation-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { patronActionCreators } from '../../../stores/lis-patron-store';\nimport { voteActionCreators } from '../../../stores/lis-votes-store';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { committeeActionCreators } from '../../../stores/lis-committee-store';\nimport { orgActionCreators } from '../../../stores/lis-org-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport '../../../stylesheets/lis-public-view/public-view.css';\nimport LoaderComponent from '../../../lis-shared/lis-layout/components/lis-loader-component';\nimport BillHistoryForm from './lis-history-form';\nimport ImpactStatementForm from './lis-impact-statements';\nimport CollectionNotes from './collection-notes';\nimport queryString from 'query-string';\nimport { minutesActionCreators } from '../../../stores/lis-minutes-store';\nimport { memberActionCreators } from '../../../stores/lis-members-store';\nimport VersionList from '../../../lis-shared/lis-bills/lis-bill-version-list';\nimport { Editor } from '@tinymce/tinymce-react';\nimport { collectionActionCreators } from '../../../stores/lis-collection-store';\n\nconst BILL_EVENT_VIEWER = \"LegislationEvent\";\nconst BILL_EVENT_AUTHOR = \"LegislationEventHistory\";\nconst BILL_COLLECTION_AUTHOR = \"LegislationCollections\";\nconst BILL_AUTHOR = \"Legislation\";\nconst VERSION_AUTHOR = \"LegislationText\";\nconst PATRON_AUTHOR = \"LegislationPatron\";\n\nconst SUMMARY = \"summary\";\nconst DESCRIPTION = \"description\";\n\nconst isStatic = window.location.pathname.includes('static');\n\nconst selectStyle = {\n    control: styles => ({\n        ...styles,\n        minHeight: '0px',\n        padding: '0.12em 0.6em !important',\n    }),\n    valueContainer: styles => ({\n        ...styles,\n        padding: 0,\n    }),\n    input: styles => ({\n        ...styles,\n        fontSize: '0.8em',\n        lineHeight: 'normal',\n    }),\n    singleValue: styles => ({\n        ...styles,\n        fontSize: '0.8em'\n    }),\n    placeholder: styles => ({\n        ...styles,\n        fontSize: '0.8em'\n    }),\n    option: styles => ({\n        ...styles,\n        fontSize: '0.8em'\n    }),\n    dropdownIndicator: styles => ({\n        ...styles,\n        padding: '1px'\n    }),\n}\n\nfunction PatronName(props) {\n    return (\n        <Link to={`/session-details/${props.session.SessionCode}/member-information/${props.MemberNumber}/member-details`}>{props.MemberDisplayName}{props.ByRequest && props.DisplayName ? ' ' + props.DisplayName.replace(')', ', By Request)') : props.DisplayName ? ' ' + props.DisplayName : props.ByRequest ? ' (By Request)' : null}</Link>\n    );\n}\n\nfunction PatronList(props) {\n    var patronsLength = props.patrons.length;\n    const listPatrons = props.patrons.map((patrons, i) => {\n        if (props.list) {\n            return <li><PatronName session={props.session} key={i} {...patrons} /></li>\n        } else if (patronsLength === i + 1) {\n            return <PatronName session={props.session} key={i} {...patrons} />\n        } else {\n            return <span key={i}><PatronName session={props.session} {...patrons} />, </span>\n        }\n    });\n    return props.list ? <ul className=\"list-two no-list-style\">{listPatrons}</ul> : <span>{listPatrons}</span>;\n}\n\nclass BillDetailsComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            billData: '',\n            historyList: [],\n            summariesList: [],\n            housePatronsList: [],\n            senatePatronsList: [],\n            versionsList: [],\n            chiefPatronsList: [],\n            sessionData: '',\n            toolTip: false,\n            editingHistory: false,\n            billEvents: [],\n            organizedEvents: [],\n            actionTypes: [],\n            memberList: [],\n            committeeList: [],\n            editing: {},\n            description: \"\",\n            saving: {},\n            displayStatementForm: false,\n            statementSubmitting: false,\n            statementLegislationTextID: '',\n            statementDate: '',\n            statementDescription: '',\n            agencyOptions: [],\n            statementDocumentcode: '',\n            reconsiderationEvents: [],\n            hideAllEvents: true,\n            patronList: [],\n            collections: [],\n            collectionIsLoading: false,\n            showPopup: false,\n            watchlists: [],\n            selectedWatchlists: [],\n            showWatchlistForm: false\n        };\n        this.setupPage = this.setupPage.bind(this);\n        this.getBillDetails = this.getBillDetails.bind(this);\n        this.getPatrons = this.getPatrons.bind(this);\n        this.getBillVersion = this.getBillVersion.bind(this);\n        this.toggleShowLinks = this.toggleShowLinks.bind(this);\n        this.toggleEditContent = this.toggleEditContent.bind(this);\n        this.handleEventChange = this.handleEventChange.bind(this);\n        this.saveEvents = this.saveEvents.bind(this);\n        this.changeToNewBillHistoryForm = this.changeToNewBillHistoryForm.bind(this);\n        this.saveDescription = this.saveDescription.bind(this);\n        this.saveSummary = this.saveSummary.bind(this);\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.toggleStatementForm = this.toggleStatementForm.bind(this);\n        this.submitImpactStatement = this.submitImpactStatement.bind(this);\n        this.closeStatementForm = this.closeStatementForm.bind(this);\n        this.getReconsiderationEvents = this.getReconsiderationEvents.bind(this);\n        this.togglehideAllEvents = this.togglehideAllEvents.bind(this);\n        this.checkForDuplicates = this.checkForDuplicates.bind(this);\n        this.togglePatronModal = this.togglePatronModal.bind(this);\n        this.handleWatchlistChange = this.handleWatchlistChange.bind(this);\n        this.handleAddToWatchlists = this.handleAddToWatchlists.bind(this);\n        this.addToWatchlists = this.addToWatchlists.bind(this);\n        this.getCollections = this.getCollections.bind(this);\n        this.toggleWatchlistForm = this.toggleWatchlistForm.bind(this);\n        this.handleToggleDescriptionEdit = this.handleToggleDescriptionEdit.bind(this);\n        this.handleDescriptionChange = this.handleDescriptionChange.bind(this);\n        this.saveVersionDescription = this.saveVersionDescription.bind(this);\n    }\n\n    componentDidMount() {\n        window.scrollTo(0, 0);\n\n        const sessionCode = this.props.match ? this.props.match.params.sessionCode : this.props.selectedBillSession;\n        let legislationNumber = this.props.match ? this.props.match.params.billnumber : this.props.selectedBill;\n\n        //if legislation number is zero-padded (such as from a calendar), remove the zero-padding\n        const legislationNumberDigitsWithZeroPadding = legislationNumber.match(/\\d+/); //e.g. 0259\n        if (legislationNumberDigitsWithZeroPadding) {\n            const legislationNumberDigitsWithOutZeroPadding = parseInt(legislationNumberDigitsWithZeroPadding[0]); //turns 0259 into 259\n            legislationNumber = legislationNumber.replace(/\\d+/, legislationNumberDigitsWithOutZeroPadding); //turns HB0259 into HB259\n        }\n\n        this.setupPage(sessionCode, legislationNumber);\n    }\n\n    componentDidUpdate(prevProps) {\n        const sessionCode = this.props.match ? this.props.match.params.sessionCode : this.props.selectedBillSession;\n        const legislationNumber = this.props.match ? this.props.match.params.billnumber : this.props.selectedBill;\n        const previousSessionCode = prevProps.match ? prevProps.match.params.sessionCode : prevProps.selectedBillSession;\n        const previousLegislationNumber = prevProps.match ? prevProps.match.params.billnumber : prevProps.selectedBill;\n        if (previousSessionCode !== sessionCode || previousLegislationNumber !== legislationNumber) {\n            this.setState({\n                historyIsLoaded: false,\n                summaryIsLoaded: false,\n                versionsIsLoaded: false,\n                patronIsLoaded: false,\n                billDataIsLoaded: false\n            }, () => {\n                this.setupPage(sessionCode, legislationNumber);\n            })\n        } else if (JSON.stringify(prevProps.login.userClaims.resources) !== JSON.stringify(this.props.login.userClaims.resources)) {\n            this.setState({\n                historyIsLoaded: false\n            }, () => {\n                if (!this.props.login.userClaims.resources.find(resource => resource === BILL_AUTHOR)) {\n                    this.setState({ editing: {} })\n                }\n                this.setupPage(sessionCode, legislationNumber);\n            })\n        }\n\n        if (!this.state.switchedToBill && prevProps.location.search !== this.props.location.search) {\n            const parsed = queryString.parse(this.props.location.search);\n            if (parsed.openBillHistory) {\n                this.setState({\n                    switchedToBill: true\n                });\n            }\n        }\n\n    }\n\n    setupPage(sessionCode, legislationNumber) {\n        this.props.actions.getSessionByCode(sessionCode).then(() => {\n            if (this.props.session.selectedSession) {\n                this.setState({\n                    sessionData: this.props.session.selectedSession,\n                    conveneDate: this.props.session.selectedSession.SessionStart,\n                    legislationNumber: legislationNumber\n                }, () => {\n                    this.getBillDetails(legislationNumber, sessionCode);\n                    this.getBillSummary(legislationNumber, sessionCode);\n                    this.getBillVersion(legislationNumber, sessionCode);\n\n                    if (this.props.login.isAuthenticated) {\n                        this.getCollections(\"?SessionID=\" + this.state.sessionData.SessionID);\n                    }\n                });\n                this.props.actions.getCommitteeList('sessionID=' + this.props.session.selectedSession.SessionID + \"&includeSubCommittees=true\").then(() => {\n                    let committeeList = this.props.committee.committeeList;\n                    committeeList.forEach(committee => {\n                        committee.label = committee.Name;\n                        committee.value = committee.CommitteeID;\n                        committee.abbrev = committee.Abbreviation;\n                    });\n                    this.setState({\n                        committeeList: committeeList\n                    });\n                });\n            }\n        }).catch(err => {\n            if (err === \"Aborted\") {\n                return;\n            }\n            this.setState({\n                billDataIsLoaded: true,\n                patronIsLoaded: true,\n                historyIsLoaded: true,\n                billData: ''\n            });\n        });\n        //This is if a user is signed in with the correct roles they can edit the events\n        const chamberCode = legislationNumber[0];\n        this.props.actions.getBillEvents('?LegislationChamberCode=' + chamberCode)\n            .then(() => {\n                let billEvents = [...this.props.bills.billEvents];\n                billEvents.forEach(evt => {\n                    evt.label = evt.LegislationDescription;\n                    evt.value = `${evt.LegislationEventTypeID}-${evt.IsPassed}`\n                });\n                this.setState({\n                    billEvents: billEvents\n                });\n            });\n        this.props.actions.getMemberList('sessionCode=' + sessionCode).then(() => {\n            let memberList = [...this.props.members.memberList];\n            memberList.forEach(member => {\n                member.label = member.PatronDisplayName;\n                member.value = member.MemberID;\n            });\n            this.setState({\n                memberList: memberList\n            });\n        });\n        this.props.actions.getActionTypes()\n            .then(() => {\n                let actionTypes = [...this.props.minutes.actionTypes];\n                actionTypes.forEach(type => {\n                    type.label = type.ActionReferenceType;\n                    type.value = type.ActionReferenceTypeID;\n                })\n                this.setState({\n                    actionTypes: actionTypes\n                });\n            });\n        this.props.actions.getAgencyList().then(() => {\n            let agencies = [...this.props.organizations.agencyList]\n            agencies.forEach((agency, i) => {\n                agency.label = agency.AgencyName + \" (\" + agency.Abbreviation + \")\";\n                agency.value = agency.AgencyNumber\n            })\n            this.setState({\n                agencyOptions: agencies\n            })\n        })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    // RETRIEVE PATRONS FOR A BILL\n    getPatrons(billID, chamberCode) {\n        this.props.actions.getPatronList(billID).then(() => {\n            let senatePatronsList = this.props.patrons.senatePatronsList;\n            let housePatronsList = this.props.patrons.housePatronsList;\n            let chiefPatronsList = this.props.patrons.chiefPatronsList;\n            let patronList = this.props.patrons.patronList;\n            let originalPatronList = this.props.patrons.patronList;\n            if (chamberCode === 'H' && chiefPatronsList && chiefPatronsList.length > 1) {\n                for (let i = 1; i < chiefPatronsList.length; i++) {\n                    if (chiefPatronsList[i].ChamberCode === 'S') {\n                        senatePatronsList.unshift(chiefPatronsList[i]);\n                    } else {\n                        housePatronsList.unshift(chiefPatronsList[i]);\n                    }\n                    chiefPatronsList.splice(i, 1);\n                    i--;\n                }\n            }\n\n            housePatronsList.sort((a, b) => { return a.Sequence > b.Sequence ? 1 : b.Sequence > a.Sequence ? -1 : a.PatronDisplayName > b.PatronDisplayName ? 1 : -1 });\n            senatePatronsList.sort((a, b) => { return a.Sequence > b.Sequence ? 1 : b.Sequence > a.Sequence ? -1 : a.PatronDisplayName > b.PatronDisplayName ? 1 : -1 });\n\n            this.setState({\n                senatePatronsList,\n                housePatronsList,\n                chiefPatronsList,\n                patronList,\n                originalPatronList,\n                patronIsLoaded: true\n            }, () => {\n                if (this.props.location.state && this.props.location.state.expandPatrons && chiefPatronsList.length + housePatronsList.length + senatePatronsList.length > 1) {\n                    this.toggleShowData('slidePatron');\n                }\n            })\n        }\n        )\n    }\n\n    // RETRIEVE BILL SUMMARIES\n    getBillSummary(billNumber, sessionCode) {\n        const params = '?sessionCode=' + sessionCode + '&legislationNumber=' + billNumber;\n        this.props.actions.getBillSummary(params).then(() => {\n            this.setState({\n                summariesList: this.props.bills.billSummary.sort((a, b) => { return b.SummaryVersionID - a.SummaryVersionID }),\n                summaryIsLoaded: true\n            });\n        });\n    }\n\n    // RETRIEVE BILL VERSIONS\n    getBillVersion(billNumber, sessionCode) {\n        const partner = this.props.login.userClaims.resources.find(resource => resource === VERSION_AUTHOR)\n        var params = '?isPublic=' + !partner + '&legislationNumber=' + billNumber + '&sessionCode=' + sessionCode;\n        this.props.actions.getBillText(params, partner).then(() =>\n            this.setState({\n                versionsList: [...this.props.bills.billText].filter(v => !v.SessionCode || v.SessionCode === sessionCode),\n                versionsIsLoaded: true\n            }, () => {\n                if (this.props.login.userClaims.scopes.findIndex(x => x === \"House\") > -1 || this.props.login.userClaims.scopes.findIndex(x => x === \"Senate\") > -1 || this.props.login.userClaims.roles.findIndex(x => x === \"DLSStaff\") > -1) {\n                    this.setState({\n                        slideVersions: true\n                    })\n                }\n            })\n        );\n    }\n\n    // RETRIEVE THE BILL HISTORY (BILL EVENTS)\n    getBillHistory(legislationID, sessionCode) {\n        let partner = false;\n        let partnerEditor = false;\n        //Only use the partner endpoint if the user looking at the bill text is authorized to edit it or is supposed to see non-public events\n        if (this.props.login.userClaims.claims.find(claim => claim.RoleName === BILL_EVENT_AUTHOR)) {\n            partner = true;\n            partnerEditor = true;\n        } else if (this.props.login.userClaims.resources.find(resource => resource === BILL_EVENT_VIEWER)) {\n            partner = true;\n        }\n\n        let params = '?legislationID=' + legislationID + \"&sessionCode=\" + sessionCode;\n        this.props.actions.getBillHistoryByBillID(params, partner)\n            .then(() => {\n                this.setState({\n                    historyList: this.props.bills.billHistory,\n                    historyIsLoaded: true\n                }, () => {\n                    if (partnerEditor) {\n                        const parsed = queryString.parse(this.props.location.search);\n                        if (parsed.openBillHistory) {\n                            this.setState({\n                                switchedToBill: true,\n                                editingHistory: true\n                            });\n                        }\n                    } else {\n                        this.setState({\n                            editingHistory: false\n                        })\n                    }\n                })\n            });\n    }\n\n    getReconsiderationEvents(params) {\n        params = '?ReconsiderationAction=' + params + '&LegislationID=' + this.state.billData.LegislationID;\n\n        this.props.actions.getLegislationEventsByLegislationId(params)\n            .then(() => {\n                this.setState({\n                    reconsiderationEvents: this.props.bills.legislationEventsById\n                });\n            })\n    }\n\n    // RETRIEVE THE BILL DETAILS\n    getBillDetails(billId, sessionCode) {\n        const params = {\n            SessionCode: sessionCode,\n            LegislationNumbers: [{ LegislationNumber: billId }],\n        };\n\n        this.props.actions.getBillList(params).then(() => {\n            if (this.props.bills.billList[0]) {\n                this.setState({\n                    billData: this.props.bills.billList[0],\n                    billDataIsLoaded: true,\n                }, () => {\n                    this.getPatrons(this.state.billData.LegislationID, this.state.billData.ChamberCode);\n                    this.getBillHistory(this.state.billData.LegislationID, this.state.billData.SessionCode);\n                });\n            } else {\n                //The bill cannot be found. Everything has stopped loading so set them to true. A message will be displayed to the user that the bill was not found\n                this.setState({\n                    billDataIsLoaded: true,\n                    patronIsLoaded: true,\n                    historyIsLoaded: true,\n                    billData: ''\n                });\n            }\n        });\n    }\n\n    // TOGGLE SHOW 'ALL' SLIDEDOWNS\n    toggleShowData(slide) {\n        this.setState(prevState => ({\n            [slide]: !prevState[slide]\n        }));\n    }\n\n    // TOGGLE THE INFO TOOLTIP\n    toggleShowTooltip() {\n        this.setState(state => ({\n            toolTip: !state.toolTip\n        }));\n    }\n\n    // TOGGLE THE 'ALL HISTORY' ARROW\n    toggleShowLinks(vote, sessionCode) {\n        let historyList = [...this.state.historyList];\n        const historyIndex = historyList.findIndex(item => item.LegislationEventID == vote.LegislationEventID);\n\n        historyList[historyIndex].opened = !historyList[historyIndex].opened;\n        if (vote.VoteLinks) {\n            this.setState({\n                historyList: historyList\n            });\n        } else {\n            historyList[historyIndex].isLoading = true;\n            this.setState({ historyList: historyList });\n            let params = '?legislationEventID=' + vote.LegislationEventID;\n            this.props.actions.getVoteLink(params).then(() => {\n                let links = [...this.props.votes.voteLinkResponse];\n                let linkPromises = [];\n                links.forEach(link => {\n                    if (link.CommitteeID) {\n                        const cmtePromise = this.props.actions.getCommitteeById(\"?id=\" + link.CommitteeID + \"&sessionCode=\" + vote.SessionCode)\n                            .then(() => {\n                                link.CommitteeNumber = this.props.committee.committeeByIdData.CommitteeNumber;\n                            }).catch((err) => {\n                                console.error(err);\n                                // Don't care if it fails. That committee won't be visible\n                                return Promise.resolve();\n                            })\n                        linkPromises.push(cmtePromise);\n                    }\n                    // If there are any vote links of type 'Legislation' then the legislation ID needs to be turned into a legislation number to form the link\n                    if (link.ReferenceType === \"Legislation\") {\n                        const promise = this.props.actions.getBill(link.ReferenceID)\n                            .then(() => {\n                                link.LegislationNumber = this.props.bills.bill.LegislationNumber;\n                                link.SessionCode = link.SessionCode || vote.SessionCode;\n                                return Promise.resolve();\n                            }).catch(err => {\n                                console.error(err);\n                                // Don't care if it fails. That legislation won't be visible\n                                return Promise.resolve();\n                            });\n                        linkPromises.push(promise);\n                    }\n                });\n                Promise.all(linkPromises)\n                    .then(() => {\n                        historyList[historyIndex].isLoading = false;\n                        historyList[historyIndex].VoteLinks = this.props.votes.voteLinkResponse;\n                        this.setState({\n                            historyList: historyList\n                        });\n                    });\n            });\n        }\n    }\n\n    toggleEditContent() {\n        this.setState(state => ({\n            editingHistory: !state.editingHistory\n        }), () => {\n            //some browsers do not support the :has() css selector, which is how we remove (i.e. set display: none) the footer-wrapper when editing events.\n            //in these instances, we rely on the below js to accomplish the same.\n            const footer = document.getElementsByClassName(\"footer-wrapper\");\n            if (footer && footer[0]) {\n                const unsupportedBrowser = (this.state.editingHistory && window.getComputedStyle(footer[0]).display === 'block') || (!this.state.editingHistory && footer[0].style.display === 'none');\n                if (unsupportedBrowser) {\n                    if (this.state.editingHistory) {\n                        footer[0].style.display = 'none';\n                    } else {\n                        footer[0].style.display = '';\n                    }\n                }\n            }\n        });\n    }\n\n    toggleStatementForm(statementDate, statementDescription, documentCode) {\n        if (!this.state.displayStatementForm) {\n            this.setState({\n                displayStatementForm: true,\n                statementDate: statementDate,\n                statementDescription: statementDescription,\n                statementDocumentcode: documentCode\n            });\n        } else {\n            this.setState({\n                displayStatementForm: false,\n                statementDate: \"\",\n                statementDescription: \"\",\n                statementDocumentcode: \"\"\n            });\n        }\n    }\n\n    closeStatementForm() {\n        this.setState({\n            displayStatementForm: false\n        }, () => {\n            //Refresh the page to show the new impact statement in the version list\n            const sessionCode = this.props.match ? this.props.match.params.sessionCode : this.props.selectedBillSession;\n            const legislationNumber = this.props.match ? this.props.match.params.billnumber : this.props.selectedBill;\n            this.setupPage(sessionCode, legislationNumber);\n        })\n    }\n\n    handleEventChange(organizedEvents, callback) {\n        this.setState({\n            organizedEvents: organizedEvents\n        }, () => {\n            if (callback) {\n                callback();\n            }\n        });\n    }\n\n    saveEvents(eventsToSave, callback) {\n        if (eventsToSave.length > 0) {\n            this.props.actions.saveBillEvent({ LegislationEvents: eventsToSave })\n                .then(() => {\n                    this.props.actions.makeToast([{ message: \"Events Saved\", type: \"success\" }]);\n                    this.props.actions.getBillHistoryByBillID('?legislationID=' + this.state.billData.LegislationID + \"&sessionCode=\" + this.state.billData.SessionCode, true)\n                        .then(() => {\n                            this.setState({\n                                historyList: this.props.bills.billHistory,\n                            }, () => callback(true))\n                        });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    let msg;\n                    if (err) {\n                        try {\n                            const errJson = JSON.parse(err);\n                            if (errJson && errJson.Name) {\n                                msg = errJson.Name\n                            }\n                        } catch (e) { /*do nothing*/ }\n                    }\n                    this.props.actions.makeToast([{ message: msg && msg.toLowerCase().includes(\"unable to delete referral\") ? msg : \"Events Save Failed\", type: \"failure\" }]);\n                    this.props.actions.getBillHistoryByBillID('?legislationID=' + this.state.billData.LegislationID + \"&sessionCode=\" + this.state.billData.SessionCode, true)\n                        .then(() => {\n                            this.setState({\n                                historyList: this.props.bills.billHistory,\n                            }, () => callback(false))\n                        });\n                })\n        } else {\n            // If there  are no events to save then just show the save succesful banner after a second to give the illusion something happened.\n            setTimeout(() => {\n                this.props.actions.makeToast([{ message: \"Events Saved\", type: \"success\" }]);\n                callback(false)\n            }, 1000)\n        }\n    }\n\n    changeToNewBillHistoryForm(billNum) {\n        this.props.history.push(`/bill-details/${this.state.sessionData.SessionCode}/${billNum}/?openBillHistory=true`)\n    }\n\n    saveDescription() {\n        let saving = { ...this.state.saving };\n        saving[DESCRIPTION] = true;\n        this.setState({\n            saving\n        }, () => {\n            //Partner get bill request to get the mod date\n            this.props.actions.getBill(this.state.billData.LegislationID, true)\n                .then(() => {\n                    let modifiedBillData = { ...this.props.bills.bill };\n                    modifiedBillData.Description = this.state.description;\n\n                    this.props.actions.saveBill({ LegislationList: [modifiedBillData] })\n                        .then(() => {\n                            this.props.actions.makeToast([{ message: \"Description Saved\", type: \"success\" }]);\n                            let newBillData = { ...this.state.billData }\n                            newBillData.Description = this.state.description;\n                            let editing = { ...this.state.editing };\n                            editing[DESCRIPTION] = false;\n                            saving[DESCRIPTION] = false;\n                            this.setState({\n                                editing,\n                                saving,\n                                billData: newBillData\n                            });\n                        }).catch(err => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            this.props.actions.makeToast([{ message: \"Description Save Failed\", type: \"failure\" }]);\n                            let editing = { ...this.state.editing };\n                            editing[DESCRIPTION] = false;\n                            saving[DESCRIPTION] = false;\n                            this.setState({\n                                editing: editing,\n                                saving: saving\n                            });\n                        });\n                })\n        })\n    }\n\n    saveSummary(index, deletion) {\n        let saving = { ...this.state.saving };\n        if (!saving[SUMMARY]) {\n            saving[SUMMARY] = {};\n        }\n        saving[SUMMARY][index] = true;\n        this.setState({\n            saving\n        }, () => {\n            let summariesList = [...this.state.summariesList];\n            //Partner get summary request to get the mod date\n            this.props.actions.getBillSummary('/' + summariesList[index].LegislationSummaryID, true)\n                .then(() => {\n                    let modifiedSummaryData = [...this.props.bills.billSummary];\n                    if (deletion) {\n                        //Turn IsActive and IsPublic is false, and that will prevent the DB from turning one or the other true in the future\n                        modifiedSummaryData[0].IsActive = false;\n                        modifiedSummaryData[0].IsPublic = false;\n                    } else {\n                        modifiedSummaryData[0].Summary = this.state.summary[index];\n                    }\n                    this.props.actions.saveBillSummary({ SummaryList: modifiedSummaryData })\n                        .then(() => {\n                            this.props.actions.makeToast([{ message: \"Summary \" + (deletion ? \"Removed\" : \"Saved\"), type: \"success\" }]);\n                            let editing = { ...this.state.editing };\n                            let summary = { ...this.state.summary };\n                            if (deletion) {\n                                //remove from the UI and reset the editing/saving/summary values to avoid indexing problems\n                                this.toggleDeleteSummaryModal();\n                                summariesList.splice(index, 1);\n                                saving = {};\n                                editing = {};\n                                summary = {};\n                            } else {\n                                summariesList[index] = this.props.bills.billSummarySave[0];\n                                saving[SUMMARY][index] = false;\n                                if (editing[SUMMARY] && editing[SUMMARY][index]) {\n                                    editing[SUMMARY][index] = false;\n                                }\n                            }\n                            this.setState({\n                                summariesList,\n                                summary,\n                                editing,\n                                saving\n                            });\n                        }).catch(err => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            console.error(err)\n                            this.props.actions.makeToast([{ message: \"Summary Save Failed\", type: \"failure\" }]);\n                            let editing = { ...this.state.editing };\n                            let saving = { ...this.state.saving };\n                            let summary = { ...this.state.summary };\n                            editing = {};\n                            saving = {};\n                            summary = {};\n                            this.setState({\n                                summary,\n                                editing: editing,\n                                saving: saving\n                            });\n                        });\n                })\n        })\n    }\n\n    toggleEdit(key, value, index) {\n        let editing = { ...this.state.editing };\n        if (key === SUMMARY) {\n            if (!editing[key]) {\n                editing[key] = {};\n            }\n            editing[key][index] = !editing[key][index];\n            let keyState = { ...this.state[key] };\n            keyState[index] = value;\n            this.setState({\n                editing,\n                [key]: keyState\n            })\n        } else {\n            editing[key] = !editing[key];\n            this.setState({\n                editing,\n                [key]: value\n            })\n        }\n    }\n\n    handleChange(key, e, index) {\n        if (key === SUMMARY) {\n            let keyState = { ...this.state[key] };\n            keyState[index] = e;\n            this.setState({\n                [key]: keyState\n            })\n        } else {\n            this.setState({\n                [key]: e.target.value\n            })\n        }\n    }\n\n    handleWatchlistChange(val) {\n        this.setState({\n            selectedWatchlists: val\n        });\n    }\n\n    handleAddToWatchlists() {\n        let watchlists = JSON.parse(JSON.stringify(this.state.selectedWatchlists));\n        this.addToWatchlists(watchlists, (saveResultCollections) => {\n            let showPopup = { ...this.state.showPopup };\n\n            // they are adding bills to one or more watchlist(s) - we need to update the selectedWatchlists state values because their mod dates have now changed\n            for (let i = 0; i < watchlists.length; i++) {\n                const associatedWatchlist = saveResultCollections.find(c => c.WatchListID === watchlists[i].WatchListID);\n                if (associatedWatchlist && associatedWatchlist.ModificationDate !== watchlists[i].ModificationDate) {\n                    watchlists[i] = associatedWatchlist\n                };\n            }\n\n            this.setState({ selectedWatchlists: [] ? watchlists : [], selectedMergeWatchlists: [], showPopup })\n        });\n    }\n\n    addToWatchlists(watchlists) {\n        let duplicatedBills = [];\n        watchlists.forEach(watchlist => {\n            //Replace each instance of bill with the bill details in state here\n            if (watchlist.__isNew__) {\n                watchlist.Name = watchlist.label;\n                watchlist.Description = `Created on ${moment().format('MM/DD/YYYY')}`;\n                watchlist.WatchListLegislation = [];\n                delete watchlist.label;\n                delete watchlist.__isNew__;\n                delete watchlist.value;\n            }\n            // Make sure the bill isn't already a part of the watchlist\n            if (!watchlist.WatchListLegislation.find(leg => leg.LegislationID === this.state.billData.LegislationID) || watchlist.WatchListLegislation.find(leg => leg.LegislationID === this.state.billData.LegislationID).DeletionDate) {\n                watchlist.WatchListLegislation.push({\n                    LegislationID: this.state.billData.LegislationID,\n                    LegislationNumber: this.state.billData.LegislationNumber,\n                    Sessions: [{ SessionID: this.state.billData.SessionID }],\n                    WatchListID: watchlist.WatchListID,\n                    Note: null\n                });\n            } else {\n                duplicatedBills.push({ \"Watchlist\": watchlist.Name, \"LegislationNumber\": this.state.billData.LegislationNumber });\n            }\n        })\n\n        this.setState({\n            collectionIsSaving: true\n        }, () => {\n            this.props.actions.saveCollections({ WatchLists: watchlists })\n                .then(() => {\n                    this.setState({\n                        collectionIsSaving: false,\n                        showWatchlistForm: false,\n                        selectedWatchlists: []\n                    });\n\n                    this.getCollections(\"?SessionID=\" + this.state.billData.SessionID)\n\n                    if (duplicatedBills.length) {\n                        this.props.actions.makeToast([{ message: duplicatedBills[0].LegislationNumber + \" is already in \" + (watchlists.length === 1 ? \"this watchlist. \" : \"one or more of these watchlists. \"), type: \"warning\", long: true }]);\n                    } else {\n                        this.props.actions.makeToast([{ message: this.state.billData.LegislationNumber + \" was added to your watchlist\" + (watchlists.length > 1 ? \"s\" : (\" \" + watchlists[0].Name)), type: \"success\" }]);\n                    }\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err)\n                    this.setState({\n                        collectionIsSaving: false\n                    });\n                    let message;\n                    if (err && JSON.parse(err)) {\n                        const errorMsg = JSON.parse(err).Name;\n                        message = errorMsg && errorMsg.includes('Public users are') ? errorMsg : 'Save Failed'\n                    } else {\n                        message = \"Save Failed\";\n                    }\n                    this.props.actions.makeToast([{ message: message, type: \"failure\", long: message.includes('Public users are') }]);\n                })\n        });\n    }\n\n    getCollections(params) {\n        this.setState({\n            collectionIsLoading: true\n        });\n        this.props.actions.getCollections(params)\n            .then(() => {\n                const parsed = queryString.parse(this.props.location.search);\n                const collectionIndex = this.props.collection.collections.findIndex(coll => coll.WatchListID === parseInt(parsed.collection))\n                this.setState({\n                    collectionIsLoading: false,\n                }, () => {\n                    if (collectionIndex !== -1) {\n                        this.selectCollection(collectionIndex)\n                    }\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return\n                }\n                this.setState({\n                    collectionIsLoading: false\n                });\n            });\n    }\n\n    toggleWatchlistForm() {\n        this.setState({\n            showWatchlistForm: !this.state.showWatchlistForm\n        })\n    }\n\n    async submitImpactStatement(description, agency, file) {\n        let params = \"?legislationNumber=\" + this.props.match.params.billnumber\n            + \"&sessionCode=\" + this.props.match.params.sessionCode\n            + \"&referenceNumber=\" + this.state.statementDocumentcode + \"F\" + agency.AgencyNumber\n            + \"&description=\" + description\n\n        this.setState({\n            statementSubmitting: true\n        }, () => {\n            this.props.actions.uploadImpactStatement(params, file)\n                .then(() => {\n                    this.setState({\n                        statementSubmitting: false\n                    }, () => {\n                        this.closeStatementForm();\n                    })\n                    this.props.actions.makeToast([{ message: \"Impact Statement Upload Successful\", type: \"success\" }]);\n                })\n                .catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.setState({\n                        statementSubmitting: false\n                    });\n                    this.props.actions.makeToast([{ message: \"Impact Statement Upload Failed\", type: \"failure\" }]);\n                })\n        })\n    }\n\n    togglehideAllEvents() {\n        this.setState({\n            hideAllEvents: !this.state.hideAllEvents\n        })\n    }\n\n    checkForDuplicates(summary) {\n        let results = summary.match(/[H|S][B|J|R][\\s|&nbsp;]+[0-9]+/g);\n        if (results) {\n            //.trim() and .replace(\" \", \"\") both didn't work, even after being run through .toString(). I'm just glad this works. - JGB\n            results.forEach((match) => {\n                let breaklessMatch = match.replace('&nbsp;', ' ')\n                let billNum = breaklessMatch.slice(0, 2) + breaklessMatch.slice(3);\n                let link = `<a href=\"/bill-details/` + this.state.billData.SessionCode + `/` + billNum + `\">` + breaklessMatch + `</a>`;\n                summary = summary.replace(match, link);\n            });\n            return summary\n        } else {\n            return summary\n        }\n    }\n\n    toggleDeleteSummaryModal(summary, summaryIndex) {\n        this.setState({\n            showDeleteModal: !this.state.showDeleteModal,\n            summaryToDelete: { ...summary, index: summaryIndex }\n        })\n    }\n\n    togglePatronModal() {\n        this.props.history.push({\n            pathname: `/bill-details/${this.state.billData.SessionCode}/${this.state.billData.LegislationNumber}/text/${this.state.versionsList.find(v => v.LegislationVersion === \"Introduced\")?.DocumentCode}`,\n            state: { patronUpdate: true }\n        })\n    }\n\n    handleToggleDescriptionEdit(index) {\n        let versionsList = this.state['slideVersions'] ? [...this.state.versionsList] : [...this.state.versionsList.filter(version => version.IsActive === true || (version.TextDisposition === \"Offered\" && version.CommitteeID !== undefined))];\n        if (versionsList.length > 0) {\n            if (versionsList[index].editing === undefined) {\n                versionsList[index].editing = true;\n                versionsList[index].tempDescription = versionsList[index].Description;\n            } else {\n                versionsList[index].editing = !versionsList[index].editing;\n            }\n            this.setState({\n                versionsList\n            })\n        }\n    }\n\n    handleDescriptionChange(value, index) {\n        let versionsList = this.state['slideVersions'] ? [...this.state.versionsList] : [...versionsList.filter(version => version.IsActive === true || (version.TextDisposition === \"Offered\" && version.CommitteeID !== undefined))];\n        versionsList[index].tempDescription = value;\n        this.setState({\n            versionsList\n        })\n    }\n\n    saveVersionDescription(index) {\n        let bill = this.state['slideVersions'] ? { ... this.state.versionsList[index] } : { ...versionsList.filter(version => version.IsActive === true || (version.TextDisposition === \"Offered\" && version.CommitteeID !== undefined))[index] };\n        bill.Description = bill.tempDescription;\n        this.props.actions.saveBillText({ TextsList: [bill] })\n            .then(() => {\n                this.getBillVersion(this.props.match.params.billnumber, this.props.match.params.sessionCode);\n            });\n    }\n\n    render() {\n        const { sessionData, summariesList, historyList, billData, senatePatronsList, housePatronsList, chiefPatronsList, versionsList, editing, description, saving, patronList } = this.state;\n        // Show the active and offered versions when drawer is collapsed. If there are no active or offered versions then just display the last item\n        let activeVersions = versionsList.filter(version => version.IsActive === true || (version.TextDisposition === \"Offered\" && version.CommitteeID !== undefined) || (version.TextDisposition === \"Recommended\"));\n        if (activeVersions.length === 0) {\n            activeVersions = [versionsList[versionsList.length - 1]];\n        }\n        let billSummary = '';\n        if (summariesList.length > 0) {\n            billSummary = summariesList[0];\n        }\n        const sessionHeader = sessionData && !isStatic ? sessionData.SessionYear + ' ' + sessionData.DisplayName : '';\n        const billHeader = billData && !isStatic ? <React.Fragment>\n            <span style={{ marginRight: '1em' }}>{billData.LegislationNumber}</ span>\n            <span></span>\n            <span>{renderHTML(billData.Description || '')}</span>\n            {this.props.login.userClaims.resources.find(resource => resource === BILL_AUTHOR) && <a className=\"icon edit\" style={{ marginLeft: \"5px\" }} onClick={() => this.toggleEdit(DESCRIPTION, this.state.billData.Description)}></a>}\n        </React.Fragment> : '';\n\n        const billHeaderEditor = <div className=\"bill-description-editor\">\n            <span>{billData.LegislationNumber}</ span>\n            <input value={description} onChange={(e) => this.handleChange(DESCRIPTION, e)} disabled={saving[DESCRIPTION]} />\n            {saving[DESCRIPTION]\n                ? <div className=\"small-spinner\"></div>\n                : <React.Fragment><a className=\"icon save\" onClick={() => this.saveDescription()}></a>\n                    <a className=\"icon delete\" onClick={() => this.toggleEdit(DESCRIPTION)}></a></React.Fragment>\n            }\n        </div>;\n\n        const formatSummaryVersion = (billSummary) => (\n            billSummary.SummaryVersion.toLowerCase().split(\"\").map((x, i) => { return billSummary.SummaryVersion[i - 1] === \" \" || i === 0 ? x.toUpperCase() : x })\n        )\n\n        const billSummaryEditor = index => <div className=\"bill-summary-editor\">\n            <Editor\n                disabled={saving[SUMMARY] && saving[SUMMARY][index]}\n                value={this.state.summary[index]}\n                init={{\n                    browser_spellcheck: true,\n                    height: 350,\n                    plugins: 'link paste save lists preview searchreplace pagebreak code table',\n                    toolbar: 'undo redo | bold italic strikethrough | alignleft aligncenter alignright',\n                    skin: false,\n                    valid_children: '+body[style]',\n                    content_css: false,\n                    content_style: 'table { border-collapse: collapse; border: 1px solid #FFFFFF }' + 'td { padding: 12px 0px }',\n                    formats: {\n                        sumtext: {\n                            block: 'p', attributes: { class: 'sumtext' }\n                        }\n                    },\n                    style_formats: [\n                        { title: \"Sumtext\", format: \"sumtext\" },\n                    ],\n                }}\n                onEditorChange={content => this.handleChange(SUMMARY, content, index)}\n            />\n            {saving[SUMMARY] && saving[SUMMARY][index]\n                ? <div className=\"small-spinner\"></div>\n                : <React.Fragment><a className=\"icon save\" onClick={() => this.saveSummary(index)}></a>\n                    <a className=\"icon delete\" onClick={() => this.toggleEdit(SUMMARY, null, index)}></a></React.Fragment>\n            }\n        </div>;\n\n        if (!this.state.billDataIsLoaded) {\n            return (\n                <div><LoaderComponent className=\"center-spinner\" data={false} /></div>\n            )\n        } else if (!billData) {\n            //Bill Data has been loaded but if it is empty then there have been zero results returned from the server\n            return (<p>Bill data could not be found</p>)\n        }\n        return (\n            <div id=\"bill-details\" className=\"bill-theme public-details inner-grid\" ref={el => (this.componentRef = el)}>\n                {this.state.showDeleteModal &&\n                    <div className='schedule-modal'>\n                        <div className='schedule-modal-content'>\n                            <div className='grid-wrapper'>\n                                <div className='inner-grid eight-one-and-one'>\n                                    <span>Are you sure you want to delete this summary ({formatSummaryVersion(this.state.summaryToDelete)})?</span>\n                                    {saving[SUMMARY] && saving[SUMMARY][this.state.summaryToDelete.index]\n                                        ? <div className=\"small-spinner\"></div>\n                                        : <button className='button primary' onClick={() => this.saveSummary(this.state.summaryToDelete.index, true)}>Yes</button>\n                                    }\n                                    <button className='button secondary' onClick={() => this.toggleDeleteSummaryModal()}>No</button>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                }\n                {!isStatic &&\n                    <div>\n                        <h2 style={{ marginBottom: \"10px\" }}>{sessionHeader}</h2>\n                    </div>\n                }\n                {!isStatic &&\n                    <div className=\"details-header bill-details-header\">\n                        <h3>{!editing[DESCRIPTION] ? billHeader : billHeaderEditor}</h3>\n                        {!this.state.displayStatementForm &&\n                            <div style={{ padding: \"10px 10px 0px 10px\" }} className={`flex-row ${!this.state.editingHistory && this.props.login.userClaims.claims.find(claim => claim.RoleName === BILL_EVENT_AUTHOR) ? 'space-around' : 'flex-end'}`}>\n                                {!this.state.editingHistory && this.props.login.userClaims.claims.find(claim => claim.RoleName === BILL_EVENT_AUTHOR) &&\n                                    <button type=\"button\" className=\"button-link remove-from-print\" style={{ fontSize: '0.8em' }} onClick={this.toggleEditContent}>Edit History</button>\n                                }\n                                <ReactToPrint\n                                    trigger={() => <a type=\"button\" className=\"button print remove-from-print\"> Print</a>}\n                                    content={() => {\n                                        let printedContent = this.componentRef.cloneNode(true);\n                                        //remove icons from printed document\n                                        const removedContent = printedContent.getElementsByClassName('remove-from-print');\n                                        for (const el of removedContent) {\n                                            el.innerHTML = ''\n                                        }\n                                        return printedContent\n                                    }}\n                                    pageStyle={\"break-inside: avoid\"}\n                                />\n                            </div>\n                        }\n                    </div>\n                }\n                <div>\n                    <div style={this.state.editingHistory || this.state.displayStatementForm ? { display: 'none' } : { display: 'block' }}>\n                        {this.props.login.isAuthenticated && <div className=\"dlas-forms collection-controls\" style={{ marginBottom: \"5px\" }}>\n                            <a style={{ fontSize: \"14px\", cursor: \"pointer\" }} onClick={() => this.toggleWatchlistForm()}>{this.state.showWatchlistForm ? \"Hide watchlist form\" : \"Add bill to watchlist\"}</a>\n                            {this.state.showWatchlistForm &&\n                                <div className=\"inner-grid two\">\n                                    <div>\n                                        <label htmlFor=\"sr-watchlist-name-control\">Watchlist Name</label>\n                                        <CreatableSelect\n                                            id=\"sr-watchlist-name-control\"\n                                            styles={selectStyle}\n                                            options={this.props.collection.collections}\n                                            getOptionLabel={opt => opt.label || `${opt.Name} ${opt.Description && `- ${opt.Description}`}`}\n                                            getOptionValue={opt => opt.value || opt.WatchListID}\n                                            value={this.state.selectedWatchlists}\n                                            onChange={this.handleWatchlistChange}\n                                            createOptionPosition=\"first\"\n                                            formatCreateLabel={input => <span>Create new: {input}</span>}\n                                            isMulti\n                                        />\n                                    </div>\n                                    <div className=\"inline-list\">\n                                        <br />\n                                        {this.props.collectionIsSaving ?\n                                            <div><span className=\"small-spinner\"></span></div>\n                                            :\n                                            <React.Fragment>\n                                                <button disabled={(this.state.selectedWatchlists && this.state.selectedWatchlists.length < 1 ? true : false) || !this.state.selectedWatchlists} style={{ marginLeft: \"0px\" }} className=\"button\" type=\"button\" onClick={() => this.handleAddToWatchlists(false)}>Add</button>\n                                            </React.Fragment>\n                                        }\n                                    </div>\n                                </div>}\n                        </div>}\n                        {!isStatic &&\n                            <div style={{ marginTop: \"-3px\" }} className=\"list-desc\">\n                                <p>Status: {billData.LegislationStatus}</p>\n                            </div>\n                        }\n                        {this.props.login.userClaims.resources.find(resource => resource === BILL_COLLECTION_AUTHOR) && billData && !isStatic &&\n                            <CollectionNotes\n                                billData={billData}\n                                sessionId={this.props.session.selectedSession.SessionID}\n                            />\n                        }\n                        <div style={{ marginBottom: \"0px\" }} className={this.state['slidePatron'] ? 'parent-li slidedown-open' : 'parent-li slidedown-closed'}>\n                            <div className=\"toggle-row\">\n                                <div className=\"description\" style={{ display: 'flex', gap: '5px', alignItems: 'center' }}>\n                                    <h4>{chiefPatronsList.length + housePatronsList.length + senatePatronsList.length > 1 ? \"Patrons\" : \"Patron\"}</h4>\n                                    {versionsList.find(v => v.LegislationVersion === \"Introduced\") && this.props.login.userClaims.claims.find(claim => claim.RoleName === \"Admin\" || (claim.Resource === PATRON_AUTHOR && claim.Scope === (this.state.billData.ChamberCode === \"H\" ? \"House\" : \"Senate\"))) &&\n                                        <button className=\"button small-button\" onClick={this.togglePatronModal}>Update Patrons</button>\n                                    }\n                                </div>\n                                {chiefPatronsList.length + housePatronsList.length + senatePatronsList.length > 1 &&\n                                    <div className=\"button-container\">\n                                        <label id=\"sr-patrons-drawer-label\" className=\"arrow-down-label\" onClick={this.toggleShowData.bind(this, 'slidePatron')}>All Patrons</label>\n                                        <button aria-labelledby=\"sr-patrons-drawer-label\" aria-expanded={!!this.state['slidePatron']} className=\"arrow-down\" onClick={this.toggleShowData.bind(this, 'slidePatron')}>More info</button>\n                                    </div>\n                                }\n                            </div>\n                        </div>\n                        {!this.state.patronIsLoaded ? <LoaderComponent data={false} /> :\n                            <div style={{ marginBottom: \"10px\" }}>\n                                <div className=\"list-desc\">\n                                    <p style={this.state['slidePatron'] ? { marginBottom: \"0px\" } : { marginBottom: \"20px\" }}>Introduced by: <PatronList session={sessionData} patrons={chiefPatronsList} /></p>\n                                </div>\n                                {this.state['slidePatron'] &&\n                                    <div className=\"patrons-list list-desc\">\n                                        {this.state.billData.ChamberCode === \"H\"\n                                            ?\n                                            <React.Fragment>\n                                                {housePatronsList.length > 0 && <div><span>House: </span><PatronList session={sessionData} patrons={housePatronsList} list /></div>}\n                                                {senatePatronsList.length > 0 && <div><span>Senate: </span><PatronList session={sessionData} patrons={senatePatronsList} list /></div>}\n                                            </React.Fragment>\n                                            :\n                                            <React.Fragment>\n                                                {senatePatronsList.length > 0 && <div><span>Senate: </span><PatronList session={sessionData} patrons={senatePatronsList} list /></div>}\n                                                {housePatronsList.length > 0 && <div><span>House: </span><PatronList session={sessionData} patrons={housePatronsList} list /></div>}\n                                            </React.Fragment>\n                                        }\n                                    </div>\n                                }\n                            </div>\n                        }\n                        {summariesList.length > 1 &&\n                            <div className={this.state['slideSummaries'] ? 'parent-li slidedown-open' : 'parent-li slidedown-closed'}>\n                                <div className=\"toggle-row\">\n                                    <br />\n                                    <div className=\"button-container\">\n                                        <label id=\"sr-summaries-drawer-label\" className=\"arrow-down-label\" onClick={this.toggleShowData.bind(this, 'slideSummaries')}>All Summaries</label>\n                                        <button aria-labelledby=\"sr-summaries-drawer-label\" aria-expanded={!!this.state['slideSummaries']} className=\"arrow-down\" onClick={this.toggleShowData.bind(this, 'slideSummaries')}>More info</button>\n                                    </div>\n                                </div>\n                            </div>\n                        }\n                        {!this.state.summaryIsLoaded ? <LoaderComponent data={false} /> :\n                            <div className=\"bill-details-summary\">\n                                <div className=\"list-desc\">\n                                    <div style={{ display: 'flex', alignItems: 'center' }}>\n                                        <h4 style={{ paddingLeft: '0px' }}>{formatSummaryVersion(billSummary)}</h4>\n                                        {(!editing[SUMMARY] || !editing[SUMMARY][0]) && this.props.login.userClaims.resources.find(resource => resource === BILL_AUTHOR) &&\n                                            <React.Fragment>\n                                                <a className=\"icon edit\" style={{ margin: \"0px 7px\" }} onClick={() => this.toggleEdit(SUMMARY, billSummary.Summary ? this.checkForDuplicates(billSummary.Summary) : '', 0)}></a>\n                                                <a className=\"icon delete\" onClick={() => this.toggleDeleteSummaryModal(billSummary, 0)}></a>\n                                            </React.Fragment>\n                                        }\n                                    </div>\n                                    <div className='summary-wrapper'>\n                                        {!editing[SUMMARY] || !editing[SUMMARY][0]\n                                            ? renderHTML(this.checkForDuplicates(billSummary.Summary) || '')\n                                            : billSummaryEditor(0)\n                                        }\n                                    </div>\n                                </div>\n                                {this.state['slideSummaries'] &&\n                                    <div className=\"list-desc\" style={{ marginTop: \"10px\" }}>\n                                        <span>\n                                            {\n                                                summariesList.map((summaries, i) => {\n                                                    if (i > 0) {\n                                                        return (\n                                                            <div>\n                                                                <div key={i} style={{ display: 'flex' }}> <p><strong>{summaries.SummaryVersion}</strong></p>\n                                                                    {(!editing[SUMMARY] || !editing[SUMMARY][i]) && this.props.login.userClaims.resources.find(resource => resource === BILL_AUTHOR) &&\n                                                                        <React.Fragment>\n                                                                            <a className=\"icon edit\" style={{ margin: \"0px 7px\" }} onClick={() => this.toggleEdit(SUMMARY, summaries.Summary ? this.checkForDuplicates(summaries.Summary) : '', i)}></a>\n                                                                            <a className=\"icon delete\" onClick={() => this.toggleDeleteSummaryModal(summaries, i)}></a>\n                                                                        </React.Fragment>\n                                                                    }\n                                                                </div>\n                                                                {!editing[SUMMARY] || !editing[SUMMARY][i] ?\n                                                                    renderHTML(summaries.Summary ? this.checkForDuplicates(summaries.Summary) : '')\n                                                                    :\n                                                                    billSummaryEditor(i)\n                                                                }\n                                                            </div>\n                                                        )\n                                                    } else {\n                                                        return false;\n                                                    }\n\n                                                })\n                                            }\n                                        </span>\n                                    </div>\n                                }\n                            </div>\n                        }\n                        <div>\n                            <div style={{ marginBottom: \"0px\" }} className={this.state['slideVersions'] ? 'parent-li slidedown-open' : 'parent-li slidedown-closed'}>\n                                <div className=\"toggle-row\">\n                                    <div className=\"table-container description\">\n                                        <h4>Bill Versions</h4>\n                                        <button onClick={this.toggleShowTooltip.bind(this)} className=\"button info\">Info</button>\n                                        {this.state.toolTip &&\n                                            <div className=\"info-box\">\n                                                <ol>\n                                                    <li> Introduced - A bill that has been introduced and referred to a committee. </li>\n                                                    <li> Engrossed - A stage in the legislative process when a bill passes the second reading in the house of origin. If amended, the engrossed version of the legislation is printed incorporating all amendments that are agreed to. If not amended, the introduced version of the legislation becomes the engrossed bill, and if an amendment in the nature of a substitute is agreed to, the substitute becomes the engrossed bill.</li>\n                                                    <li> Enrolled - Legislation which has passed both the Senate and the House of Delegates. It has been signed by the President of the Senate and the Speaker of the House and it has been sent to the Governor, but not yet signed. If signed by the Governor, the bill becomes a law and a Chapter of the Acts of Assembly.</li>\n                                                    <li> Chaptered - A bill passed and signed into law by the Governor. The term also applies to constitutional amendments passed by the General Assembly and to bills passed notwithstanding the Governor’s objections or amendments.</li>\n                                                    <li> Substitute - The redrafting of legislation that incorporates proposed changes in a new version. </li>\n                                                </ol>\n                                            </div>\n                                        }\n                                    </div>\n                                    {versionsList.length > 1 && versionsList.find(version => !version.IsActive) &&\n                                        <div className=\"button-container\">\n                                            <label id=\"sr-versions-drawer-label\" className=\"arrow-down-label\" onClick={this.toggleShowData.bind(this, 'slideVersions')}>{this.state.slideVersions ? \"Hide All Versions\" : \"Show All Versions\"}</label>\n                                            <button aria-labelledby=\"sr-versions-drawer-label\" aria-expanded={!!this.state['slideVersions']} className=\"arrow-down\" onClick={this.toggleShowData.bind(this, 'slideVersions')}>More info</button>\n                                        </div>\n                                    }\n                                </div>\n                                {this.props.login.userClaims.resources.find(resource => resource === VERSION_AUTHOR) &&\n                                    <Link to={`/bill-details/${sessionData.SessionCode}/${billData.LegislationNumber}/text/new-amendment`} className=\"button small-button remove-from-print\">Create Amendment</Link>\n                                }\n                            </div>\n                            <table className=\"line-table\">\n                                {!this.state.versionsIsLoaded ? (<LoaderComponent data={false} />) : (\n                                    <React.Fragment>\n                                        {versionsList.length > 0 &&\n                                            <div>\n                                                {this.state['slideVersions'] ?\n                                                    <VersionList userClaims={this.props.login.userClaims} descriptionEditable={true} handleDescriptionChange={this.handleDescriptionChange} handleToggleDescriptionEdit={this.handleToggleDescriptionEdit} saveDescription={this.saveVersionDescription} version={versionsList} toggleStatementForm={this.toggleStatementForm} legislationClass={billData.LegislationClass} />\n                                                    :\n                                                    <VersionList userClaims={this.props.login.userClaims} descriptionEditable={true} handleDescriptionChange={this.handleDescriptionChange} handleToggleDescriptionEdit={this.handleToggleDescriptionEdit} saveDescription={this.saveVersionDescription} version={activeVersions} toggleStatementForm={this.toggleStatementForm} legislationClass={billData.LegislationClass} />\n                                                }\n                                            </div>\n                                        }\n                                    </React.Fragment>\n                                )}\n                            </table>\n                        </div>\n                    </div>\n                    <div>\n                        {!this.state.displayStatementForm &&\n                            <React.Fragment>\n                                <h4 style={{ display: 'inline-block', marginRight: '8px' }}>History</h4>\n                                {!this.state.editingHistory && this.props.login.userClaims.claims.find(claim => claim.RoleName === BILL_EVENT_AUTHOR) &&\n                                    <button type=\"button\" className=\"button-link\" style={{ fontSize: '0.8em' }} onClick={this.toggleEditContent}>(Edit)</button>\n                                }\n                            </React.Fragment>}\n                        {this.state.editingHistory && this.state.historyIsLoaded ?\n                            <BillHistoryForm\n                                switchedToBill={this.state.switchedToBill}\n                                legislationNumber={this.state.legislationNumber}\n                                historyList={historyList}\n                                organizedEvents={this.state.organizedEvents}\n                                handleEventChange={this.handleEventChange}\n                                billEvents={this.state.billEvents}\n                                billData={this.state.billData}\n                                toggleEditContent={this.toggleEditContent}\n                                saveEvents={this.saveEvents}\n                                hideAllEvents={this.state.hideAllEvents}\n                                togglehideAllEvents={this.togglehideAllEvents}\n                                changeToNewBillHistoryForm={this.changeToNewBillHistoryForm}\n                                actionTypes={this.state.actionTypes}\n                                memberList={this.state.memberList}\n                                committeeList={this.state.committeeList}\n                                versionsList={this.state.versionsList.map(text => ({\n                                    ...text,\n                                    label: text.DocumentCode + \" \" + text.Description,\n                                    value: text.LegislationTextID\n                                }))}\n                                reconsiderationEvents={this.state.reconsiderationEvents}\n                                getReconsiderationEvents={this.getReconsiderationEvents}\n                            />\n                            :\n                            <React.Fragment>\n                                {!this.state.historyIsLoaded ? <LoaderComponent data={false} /> :\n                                    !this.state.displayStatementForm &&\n                                    <React.Fragment>\n                                        <table className=\"line-table\">\n                                            <tbody>\n                                                {historyList.filter(item => !item.DeletionDate).map((item, index) => (\n                                                    <tr key={index} className={`parent-tr ${item.opened ? 'slidedown-open' : 'slidedown-closed'} bill-details-table-row${item.IsPublic ? '' : ' not-public'}`}>\n                                                        <td className=\"left\">{moment(item.EventDate).format('l')}</td>\n                                                        <td className=\"left\">{item.ActorType}</td>\n                                                        <td className=\"left\">\n                                                            {item.Description}\n                                                            {item.VoteLinks && item.opened &&\n                                                                <div className=\"link-row\">\n                                                                    {item.VoteLinks.map((link, index) =>\n                                                                        <div key={index}>\n                                                                            {link.VoteID && item.VoteTally !== \"(Voice Vote)\" ? link.IsPublic ? <Link to={`/vote-details/${this.state.billData.LegislationNumber}/${item.SessionCode}/${link.VoteNumber}`}>Vote</Link> : <span>Vote Detail Pending</span> : ''}\n                                                                            {link.CommitteeNumber ? <Link to={`/session-details/${item.SessionCode}/committee-information/${link.CommitteeNumber}/committee-details`}>{link.ParentCommitteeID ? 'Subcommittee' : 'Committee'}</Link> : ''}\n                                                                            {link.LegislationNumber && link.SessionCode ? <Link to={`/bill-details/${link.SessionCode}/${link.LegislationNumber}`}>Legislation</Link> : ''}\n                                                                        </div>\n                                                                    )}\n                                                                </div>\n                                                            }\n                                                        </td>\n                                                        <td className=\"button-container\">\n                                                            {item.ReferenceType && item.ReferenceType.toLowerCase() === \"committee\" ||\n                                                                item.ReferenceType && item.ReferenceType.toLowerCase() === \"subcommittee\" ||\n                                                                item.ReferenceType && item.ReferenceType.toLowerCase() === \"legislation\" ||\n                                                                item.VoteID && item.ReferenceType && item.ReferenceType.toLowerCase() === \"vote\" && item.VoteTally !== \"(Voice Vote)\"\n                                                                ? <React.Fragment>\n                                                                    {item.isLoading ?\n                                                                        <span className=\"small-spinner\"></span>\n                                                                        :\n                                                                        <button className=\"arrow-down\" onClick={() => this.toggleShowLinks(item)}>Show links</button>\n                                                                    }\n                                                                </React.Fragment>\n                                                                : null\n                                                            }\n                                                        </td>\n                                                    </tr>\n                                                ))}\n                                            </tbody>\n                                        </table>\n                                    </React.Fragment>\n                                }\n                            </React.Fragment>\n                        }\n                    </div>\n                    <div>\n                        {this.state.displayStatementForm &&\n                            <ImpactStatementForm\n                                submit={this.submitImpactStatement}\n                                isSubmitting={this.state.statementSubmitting}\n                                toggleStatementForm={this.toggleStatementForm}\n                                statementDate={this.state.statementDate}\n                                statementDescription={this.state.statementDescription}\n                                agencyOptions={this.state.agencyOptions}\n                            />\n                        }\n                    </div>\n                </div>\n            </div>\n        )\n    }\n}\n\nconst PublicBillDetails = connect(\n    (state) => {\n        const { bills, session, patrons, votes, login, nav, minutes, members, committee, organizations, collection } = state;\n        return {\n            bills,\n            session,\n            patrons,\n            votes,\n            login,\n            nav,\n            minutes,\n            members,\n            committee,\n            organizations,\n            collection\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, voteActionCreators, billActionCreators, sessionActionCreators, patronActionCreators, authActionCreators, navActionCreators, minutesActionCreators, memberActionCreators, committeeActionCreators, orgActionCreators, collectionActionCreators), dispatch)\n        }\n    }\n)(BillDetailsComponent)\n\nexport default PublicBillDetails;\n","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { billActionCreators } from '../../stores/lis-legislation-store';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { voteActionCreators } from '../../stores/lis-votes-store';\nimport VoteDetails from '../../lis-shared/lis-votes/lis-vote-details';\n\nimport LoaderComponent from '../../lis-shared/lis-layout/components/lis-loader-component';\nimport { cancelRequest } from '../../services/request.service';\n\nclass VoteDetailsComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            voteData: []\n        };\n    }\n\n    componentDidMount() {\n        const legislationNumber = this.props.match.params.billnumber;\n        const voteNumber = this.props.match.params.votenumber;\n        const sessionCode = this.props.match.params.sessioncode;\n        const params = '?legislationNumber=' + legislationNumber + '&sessionCode=' + sessionCode + '&voteNumber=' + voteNumber;\n\n        // GET VOTE DETAILS DATA\n        this.props.actions.getVoteDetails(params).then(() => {\n            this.setState({ voteDataIsLoaded: true });\n            if (this.props.votes.voteDetailsError) {\n                throw this.props.votes.voteDetailsError;\n            }\n            if (this.props.votes.voteDetailsResponse.length === 0) {\n                throw \"Cannot get vote data\";\n            }\n            const pdfFile = this.props.votes.voteDetailsResponse[0].VoteFiles.find(file => file.FileURL.toUpperCase().includes(\".PDF\"));\n            this.setState({\n                voteData: this.props.votes.voteDetailsResponse[0],\n                voteFileUrl: pdfFile || ''\n            });\n            this.props.actions.getSessionById(this.props.votes.voteDetailsResponse[0].SessionID)\n                .then(() => this.setState({ isLoaded: true }));\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.log(err.toString());\n            this.setState({\n                isLoaded: true,\n                message: err.toString()\n            });\n        });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { voteData } = this.state;\n        if (this.state.message) {\n            return (<p>{this.state.message}</p>);\n        }\n        if (!this.state.isLoaded) {\n            return (\n                <div><LoaderComponent className=\"center-spinner\" data={false} /></div>\n            )\n        }\n        return (\n            <div className=\"bill-theme public-details inner-grid\">\n                <div>\n                    <div>\n                        <VoteDetails\n                            sessionData={this.props.session.selectedSession}\n                            billData={voteData.VoteLegislation ? voteData.VoteLegislation.filter(vl => !vl.DeletionDate) : []}\n                            voteMembers={voteData.VoteMember || []}\n                            voteData={voteData}\n                            voteFileUrl={this.state.voteFileUrl}\n                            componentRef={this.componentRef}\n                            isPublic\n                        />\n                    </div>\n                </div>\n            </div>\n        )\n    }\n}\n\nconst PublicVoteDetails = connect(\n    (state) => {\n        const { bills, session, votes } = state;\n        return {\n            bills,\n            session,\n            votes\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, voteActionCreators, billActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(VoteDetailsComponent)\n\nexport default PublicVoteDetails;\n","import React from \"react\";\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { navActionCreators } from \"../../stores/lis-nav-store\";\nimport { sessionActionCreators } from '../../stores/lis-session-store';\n\nconst csv_info = [\n    {\n        csv_name: \"Amendments\",\n    },\n    {\n        csv_name: \"Bills\",\n        csv_file: \"BILLS.CSV\"\n    },\n    {\n        csv_name: \"CiBillSubjects\",\n        csv_file: \"CIBillSubjects.csv\"\n    },\n    {\n        csv_name: \"CiParentChildSubjects\",\n        csv_file: \"CIParentChildSubjects.csv\"\n    },\n    {\n        csv_name: \"CommitteeMembers\",\n    },\n    {\n        csv_name: \"Committees\",\n    },\n    {\n        csv_name: \"Docket\",\n        csv_file: \"DOCKET.CSV\"\n    },\n    {\n        csv_name: \"FiscalImpactStatements\",\n    },\n    {\n        csv_name: \"History\",\n        csv_file: \"HISTORY.CSV\"\n    },\n    {\n        csv_name: \"Members\",\n    },\n    {\n        csv_name: \"Section\",\n        csv_file: \"SECTION.csv\"\n    },\n    {\n        csv_name: \"Sponsors\",\n    },\n    {\n        csv_name: \"SubCommitteeMembers\",\n    },\n    {\n        csv_name: \"SubCommittees\",\n        csv_file: \"SubCommittees.csv\"\n    },\n    {\n        csv_name: \"Subdocket\",\n        csv_file: \"SUBDOCKET.CSV\"\n    },\n    {\n        csv_name: \"Summaries\",\n    },\n    {\n        csv_name: \"Vote\",\n        csv_file: \"VOTE.CSV\"\n    },\n    {\n        csv_name: \"VoteStatements\",\n    }\n]\n\nclass PublicDataFiles extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            sessionCode: null,\n            loadingSessions: true,\n            sessionOptions: []\n        }\n    }\n\n    componentDidMount() {\n        this.props.actions.getSessionList()\n            .then(() => {\n                this.setState({\n                    sessionOptions: this.props.session.sessionList,\n                    loadingSessions: false\n                }, () => {\n                    if (this.state.sessionOptions && this.state.sessionOptions.length) {\n                        if (this.props.match.params.sessionCode && this.state.sessionOptions.find(s => s.SessionCode === this.props.match.params.sessionCode)) {\n                            const session = this.state.sessionOptions.find(s => s.SessionCode === this.props.match.params.sessionCode)\n                            this.props.actions.changeSession(session.SessionCode);\n                            this.setSession(this.props.match.params.sessionCode);\n                        } else if (this.props.nav.session) {\n                            this.setSession(this.props.nav.session)\n                        } else if (this.state.sessionOptions.find(s => s.IsDefault)) {\n                            this.setSession(this.state.sessionOptions.find(s => s.IsDefault).SessionCode);\n                        } else {\n                            //shouldn't happen, means no session was provided in the url and there is no default session set\n                            this.setSession(this.state.sessionOptions[this.state.sessionOptions.length - 1].SessionCode);\n                        }\n                    }\n                })\n            }).catch(err => {\n                this.setState({ loadingSessions: false })\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    componentDidUpdate(prevProps) {\n        if (this.props.nav.session !== prevProps.nav.session) {\n            if (this.state.sessionOptions && this.state.sessionOptions.length && !isNaN(parseInt(this.props.nav.session))) {\n                const session = this.state.sessionOptions.find(s => s.SessionCode === this.props.nav.session);\n                if (session) {\n                    if (this.props.match.params.sessionCode) {\n                        //update url since it has a sessionCode in it\n                        this.props.history.push('/data-files/' + session.SessionCode);\n                    } else {\n                        this.setSession(session.SessionCode);\n                    }\n                }\n            }\n        }\n    }\n\n    setSession(sessionCode) {\n        this.setState({ sessionCode })\n    }\n\n    render() {\n        const { sessionCode, loadingSessions } = this.state;\n\n        return (\n            <div className='generic-details-page public-data-files-page'>\n                <div className=\"dlas-forms\">\n                    <div className=\"public-details\">\n                        <h2>CSV File Download</h2>\n                    </div>\n                    <div>\n                        <p>Users having the desire and ability to do their own bill tracking have csv files available for download using this page. These csv files are suitable for spreadsheet or database input. Location of these files is {window.env?.STORAGE_ACCOUNT_DOMAIN}/[session_code]/[csv_filename].csv.</p>\n                        <p>For questions or assistance with csv files, please contact our Help Desk at <a href=\"tel:8047869631\">(804) 786-9631</a>, or <a href=\"mailto:LIS@dlas.virginia.gov\">LIS@dlas.virginia.gov</a>.</p>\n                    </div>\n                    <div className=\"csv-desc\">\n                        <h3>BILLS.CSV</h3>\n                        <p>The <strong>bills.csv</strong> file contains one row per bill. This file is updated hourly during session and reflects a 'snapshot' status of all bills. This is a comma separated values file with the following columns:</p>\n                        <ol className=\"data-files-list list-three\">\n                            <li>Bill_id</li>\n                            <li>Bill_description</li>\n                            <li>Patron_id</li>\n                            <li>Patron_name</li>\n                            <li>Last_house_committee_id</li>\n                            <li>Last_house_action</li>\n                            <li>Last_house_action_date</li>\n                            <li>Last_senate_committee_id</li>\n                            <li>Last_senate_action</li>\n                            <li>Last_senate_action_date</li>\n                            <li>Last_conference_action</li>\n                            <li>Last_conference_action_date</li>\n                            <li>Last_governor_action</li>\n                            <li>Last_governor_action_date</li>\n                            <li>Emergency</li>\n                            <li>Passed_house</li>\n                            <li>Passed_senate</li>\n                            <li>Passed</li>\n                            <li>Failed</li>\n                            <li>Carried_over</li>\n                            <li>Approved</li>\n                            <li>Vetoed</li>\n                            <li>Full_text_doc1</li>\n                            <li>Full_text_date1</li>\n                            <li>Full_text_doc2</li>\n                            <li>Full_text_date2</li>\n                            <li>Full_text_doc3</li>\n                            <li>Full_text_date3</li>\n                            <li>Full_text_doc4</li>\n                            <li>Full_text_date4</li>\n                            <li>Full_text_doc5</li>\n                            <li>Full_text_date5</li>\n                            <li>Full_text_doc6</li>\n                            <li>Full_text_date6</li>\n                            <li>Last_house_actid</li>\n                            <li>Last_senate_actid</li>\n                            <li>Last_conference_act</li>\n                            <li>Last_governor_actid</li>\n                            <li>Chapter_id</li>\n                            <li>Introduction_date</li>\n                            <li>Last_actid</li>\n                        </ol>\n                    </div>\n                    <div className=\"csv-desc\">\n                        <h3>HISTORY.CSV</h3>\n                        <p>The <strong>history.csv</strong> file contains one row for each history \"action\" related to a given bill. It is updated once a day, overnight.\n                            This is a comma separated values file with the following columns:</p>\n                        <ol className=\"data-files-list\">\n                            <li>Bill_id</li>\n                            <li>History_date</li>\n                            <li>History_description</li>\n                        </ol>\n                    </div>\n                    {sessionCode ?\n                        <div className=\"csv-desc\">\n                            <h3>{sessionCode.substr(0, 4)} CSV FILES FOR DOWNLOAD</h3>\n                            <p>Below are links to all the files that are available for download. All these files, except the history.csv (as explained above) are updated once an hour during session.</p>\n                            <ul className=\"data-files-list list-two no-list-style\">\n                                {\n                                    csv_info.map((csv, idx) =>\n                                        <li key={idx}><a target=\"_blank\" rel=\"noreferrer\" href={`${window.env?.STORAGE_ACCOUNT_DOMAIN}/lisfiles/${sessionCode}/${csv.csv_file ? csv.csv_file : (csv.csv_name + '.csv')}`}>{csv.csv_name}.csv</a></li>\n                                    )\n                                }\n                            </ul>\n                        </div>\n                        :\n                        loadingSessions ?\n                            <div className=\"small-spinner\" />\n                            :\n                            <p>Error retrieving sessions.</p>\n                    }\n                </div>\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, session } = state;\n        return {\n            nav,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(PublicDataFiles)","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { communicationsActionCreators } from '../../stores/lis-communications-store';\nimport moment from 'moment-timezone';\n\nimport { cancelRequest } from '../../services/request.service';\nimport { Link } from 'react-router-dom';\n\nclass PublicCommunicationsList extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            session: '',\n            senateIsLoaded: false,\n            houseIsLoaded: false,\n            senateCommList: [],\n            houseCommList: [],\n            showHouseChamber: true,\n            showSenateChamber: true\n        };\n        this.toggleChamber = this.toggleChamber.bind(this);\n    }\n\n    toggleChamber(chamber) {\n        this.setState(state => ({\n            [chamber]: !state[chamber]\n        }));\n    }\n\n    //When component has mounted, make the call to get session by code\n    componentDidMount() {\n        const sessionCode = this.props.match.params.sessioncode\n        if (parseInt(sessionCode) > 0) {\n            //Update the session selector component, which will run componentDidUpdate and call setupPage on its own\n            if (this.props.nav.session !== sessionCode) {\n                this.props.actions.changeSession(sessionCode)\n            } else {\n                this.setupPage(sessionCode);\n            }\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push(\"/session-details/\" + this.props.nav.session + \"/communications\");\n            this.setupPage(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            const sessionCode = this.props.match.params.sessioncode;\n            if (!isNaN(sessionCode)) {\n                this.props.actions.changeSession(sessionCode);\n            }\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    setupPage(sessionCode) {\n        this.setState({\n            senateIsLoaded: false,\n            houseIsLoaded: false\n        });\n        const createCommList = commList => {\n            commList.forEach(comm => {\n                const jsonFile = comm.CommunicationFiles.find(file => file.FileURL.includes('JSON'))\n                if (jsonFile && jsonFile.IsGenerated) {\n                    comm.jsonFile = jsonFile\n                }\n            });\n            return commList;\n        }\n        //Get the session information\n        this.props.actions.getSessionByCode(sessionCode)\n            .then(() => {\n                this.setState({\n                    session: this.props.session.selectedSession,\n                });\n            });\n        //Get the list for the Senate\n        this.props.actions.getCommList('?sessionCode=' + sessionCode + '&chamberCode=S&communicationType=Floor')\n            .then(() => {\n                this.setState({\n                    senateCommList: createCommList([...this.props.communications.commList]),\n                    senateIsLoaded: true\n                });\n            });\n        //Get the list for the House\n        this.props.actions.getCommList('?sessionCode=' + sessionCode + '&chamberCode=H&communicationType=Floor')\n            .then(() => {\n                this.setState({\n                    houseCommList: createCommList([...this.props.communications.commList]),\n                    houseIsLoaded: true\n                });\n            });\n    }\n\n    render() {\n        const { senateCommList, houseCommList, senateIsLoaded, houseIsLoaded, session } = this.state;\n        const sessionHeader = session ? session.SessionYear + \" \" + session.DisplayName : '';\n        return (\n            <div className=\"public-chamber-data\">\n                <div>\n                    <h2>{sessionHeader}</h2>\n                </div>\n                <div className=\"public-list inner-grid two\">\n                    <div>\n                        <h3 role=\"button\" onClick={() => this.toggleChamber(\"showHouseChamber\")} aria-expanded={this.state.showHouseChamber} className={`chamber-name ${this.state.showHouseChamber ? \"opened\" : \"\"}`}>House Communications</h3>\n                        {houseIsLoaded ?\n                            <table className=\"line-table\">\n                                {this.state.showHouseChamber &&\n                                    <tbody className=\"toggle-table\">\n                                        <div className=\"list-desc\">\n                                            {houseCommList.map(comm =>\n                                                <tr key={comm.CommunicationID} className=\"inner-grid two alternating-color-list\">\n                                                    <td>\n                                                        <Link to={`/session-details/${this.state.session.SessionCode}/communications/${comm.ReferenceNumber}`}>\n                                                            <span className=\"button paper\">Communication</span>\n                                                            {moment(comm.CommunicationDate).format(\"MMMM D, YYYY\")} {comm.CommunicationNumber > 1 && `(${comm.CommunicationNumber})`}\n                                                        </Link>\n                                                    </td>\n                                                </tr>\n                                            )}\n                                        </div>\n                                    </tbody>\n                                }\n                            </table>\n                            :\n                            <div className=\"center-spinner spinner\"></div>\n                        }\n                    </div>\n\n                    <div>\n                        <h3 role=\"button\" onClick={() => this.toggleChamber(\"showSenateChamber\")} aria-expanded={this.state.showSenateChamber} className={`chamber-name ${this.state.showSenateChamber ? \"opened\" : \"\"}`}>Senate Communications</h3>\n                        {senateIsLoaded ?\n                            <table className=\"line-table\">\n                                {this.state.showSenateChamber &&\n                                    <tbody className=\"toggle-table\">\n                                        <div className=\"list-desc\">\n                                            {senateCommList.map(comm =>\n                                                <tr key={comm.CommunicationID} className=\"inner-grid two alternating-color-list\">\n                                                    <td>\n                                                        <Link to={`/session-details/${this.state.session.SessionCode}/communications/${comm.ReferenceNumber}`}>\n                                                            <span className=\"button paper\">Communication</span>\n                                                            {moment(comm.CommunicationDate).format(\"MMMM D, YYYY\")} {comm.CommunicationNumber > 1 && `(${comm.CommunicationNumber})`}\n                                                        </Link>\n                                                    </td>\n                                                </tr>\n                                            )}\n                                        </div>\n                                    </tbody>\n                                }\n                            </table>\n                            :\n                            <div className=\"center-spinner spinner\"></div>\n                        }\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { session, nav, communications } = state;\n        return {\n            session,\n            nav,\n            communications\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, navActionCreators, communicationsActionCreators), dispatch)\n        }\n    }\n)(PublicCommunicationsList)\n","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom'\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { calendarActionCreators } from '../../stores/lis-calendar-store';\nimport moment from 'moment-timezone';\nimport { cancelRequest } from '../../services/request.service';\n\n\nclass PublicCalendarList extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            session: '',\n            senateIsLoaded: false,\n            houseIsLoaded: false,\n            senateCalendarList: [],\n            houseCalendarList: [],\n            showHouseChamber: true,\n            showSenateChamber: true\n        };\n\n        this.toggleChamber = this.toggleChamber.bind(this);\n    }\n\n    toggleChamber(chamber) {\n        this.setState(state => ({\n            [chamber]: !state[chamber]\n        }));\n    }\n\n    //When component has mounted, make the call to get session by code\n    componentDidMount() {\n        //Update the session selector component, which will run componentDidUpdate and call setupPage on its own\n        const sessionCode = this.props.match.params.sessioncode\n        if (this.props.nav.session !== sessionCode) {\n            this.props.actions.changeSession(sessionCode)\n        } else {\n            this.setupPage(sessionCode);\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push(\"/session-details/\" + this.props.nav.session + \"/calendar\");\n            this.setupPage(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            const sessionCode = this.props.match.params.sessioncode;\n            if (!isNaN(sessionCode)) {\n                this.props.actions.changeSession(sessionCode);\n            }\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    setupPage(sessionCode) {\n        this.setState({\n            senateIsLoaded: false,\n            houseIsLoaded: false\n        });\n        //Get the session information\n        this.props.actions.getSessionByCode(sessionCode)\n            .then(() => {\n                if (this.props.session.selectedSession) {\n                    this.setState({\n                        session: this.props.session.selectedSession\n                    });\n                }\n            });\n        //Get the list for the Senate\n        this.props.actions.getCalendarList('?sessionCode=' + sessionCode + '&chamberCode=S')\n            .then(() => {\n                this.setState({\n                    senateCalendarList: this.props.calendar.calendarList,\n                    senateIsLoaded: true\n                });\n            });\n        //Get the list for the House\n        this.props.actions.getCalendarList('?sessionCode=' + sessionCode + '&chamberCode=H')\n            .then(() => {\n                this.setState({\n                    houseCalendarList: this.props.calendar.calendarList,\n                    houseIsLoaded: true\n                });\n            });\n    }\n\n    render() {\n        const { senateCalendarList, houseCalendarList, senateIsLoaded, houseIsLoaded, session } = this.state;\n        const sessionHeader = session ? session.SessionYear + \" \" + session.DisplayName : '';\n        return (\n            <div className=\"public-chamber-data\">\n                <div>\n                    <h2>{sessionHeader}</h2>\n                </div>\n                <div className=\"public-list inner-grid two\">\n                    <div>\n                        <h3 role=\"button\" onClick={() => this.toggleChamber(\"showHouseChamber\")} aria-expanded={this.state.showHouseChamber} className={`chamber-name ${this.state.showHouseChamber ? \"opened\" : \"\"}`}>House Calendar</h3>\n                        {houseIsLoaded ?\n                            <table className=\"line-table\">\n                                {this.state.showHouseChamber &&\n                                    <tbody className=\"toggle-table\">\n                                        <div className=\"list-desc\">\n                                            {houseCalendarList.map(calendar =>\n                                                <tr key={calendar.CalendarID} className=\"inner-grid two alternating-color-list\">\n                                                    <td>\n                                                        <Link to={`/session-details/${session.SessionCode}/calendar/${calendar.ReferenceNumber}`}>\n                                                            {moment(calendar.CalendarDate).format(\"MMMM D, YYYY\") + \" \" + (calendar.CalendarNumber > 1 ? \"(sup. \" + (calendar.CalendarNumber - 1) + \")\" : \"\")}\n                                                        </Link>\n                                                    </td>\n                                                </tr>\n                                            )}\n                                        </div>\n                                    </tbody>\n                                }\n                            </table>\n                            :\n                            <div aria-label=\"Loading\" className=\"center-spinner spinner\"></div>\n                        }\n                    </div>\n                    <div>\n                        <h3 role=\"button\" onClick={() => this.toggleChamber(\"showSenateChamber\")} aria-expanded={this.state.showSenateChamber} className={`chamber-name ${this.state.showSenateChamber ? \"opened\" : \"\"}`}>Senate Calendar</h3>\n                        {senateIsLoaded ?\n                            <table className=\"line-table\">\n                                {this.state.showSenateChamber &&\n                                    <tbody className=\"toggle-table\">\n                                        <div className=\"list-desc\">\n                                            {senateCalendarList.map(calendar =>\n                                                <tr key={calendar.CalendarID} className=\"inner-grid two alternating-color-list\">\n                                                    <td>\n                                                        <Link to={`/session-details/${session.SessionCode}/calendar/${calendar.ReferenceNumber}`}>\n                                                            {moment(calendar.CalendarDate).format(\"MMMM D, YYYY\") + \" \" + (calendar.CalendarNumber > 1 ? \"(sup. \" + (calendar.CalendarNumber - 1) + \")\" : \"\")}\n                                                        </Link>\n                                                    </td>\n                                                </tr>\n                                            )}\n                                        </div>\n                                    </tbody>\n                                }\n                            </table>\n                            :\n                            <div aria-label=\"Loading\" className=\"center-spinner spinner\"></div>\n                        }\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { session, nav, calendar } = state;\n        return {\n            session,\n            nav,\n            calendar\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, navActionCreators, calendarActionCreators), dispatch)\n        }\n    }\n)(PublicCalendarList)\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport CalendarDetailsComponent from '../../lis-shared/lis-calendar/lis-calendar-details';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { calendarActionCreators } from '../../stores/lis-calendar-store';\nimport { authActionCreators } from '../../stores/lis-auth-store';\nimport { cancelRequest } from '../../services/request.service';\nimport renderHTML from 'react-render-html';\nimport { HubConnectionBuilder } from \"@microsoft/signalr\";\n\nimport moment from 'moment-timezone';\n\nimport { collectionActionCreators } from '../../stores/lis-collection-store';\nimport { billActionCreators } from '../../stores/lis-legislation-store';\nimport { communicationsActionCreators } from '../../stores/lis-communications-store';\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst lisDocDomain = window.env?.STORAGE_ACCOUNT_DOMAIN;\n\nclass PublicCalendarDetails extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoaded: false,\n            showAll: false,\n            calendar: '',\n            creatingCollection: null,\n            createdCollections: [],\n            currentItemHubConnection: '',\n            commonCurrentItemOptions: [\n                { label: \"Clear current item\", value: 0 },\n                { label: \"At Ease\", value: 1 },\n                { label: \"In Recess\", value: 2 },\n                { label: \"Adjourned\", value: 3 },\n                { label: \"Morning Hour\", value: 4 },\n                { label: \"Closing Statements\", value: 5 },\n                { label: \"Point of Personal Privilege\", value: 6 },\n                { label: \"Taking up Budget Bill\", value: 7 },\n                { label: \"Electing Judges\", value: 8 },\n                { label: \"Governor Addressing Joint Session\", value: 9 },\n                { label: \"Taking up Memorial Resolutions\", value: 10 },\n                { label: \"Taking up Commending Resolutions\", value: 11 },\n                { label: \"Other Business\", value: 12 }\n            ],\n            failedToJoinBills: [],\n            showPdfWindow: false\n        };\n\n        this.receiveCurrentItem = this.receiveCurrentItem.bind(this);\n        this.setCurrentItem = this.setCurrentItem.bind(this);\n        this.toggleAgenda = this.toggleAgenda.bind(this);\n        this.createWatchlist = this.createWatchlist.bind(this);\n        this.editHistory = this.editHistory.bind(this);\n        this.removeZeros = this.removeZeros.bind(this);\n        this.generateClerksCopy = this.generateClerksCopy.bind(this);\n    }\n\n    componentDidMount() {\n        window.scrollTo(0, 0);\n        this.props.actions.getCalendarCategoriesReferences();\n        const getCalendar = this.props.actions.getCalendarById(`?ReferenceNumber=${this.props.match.params.calendarid}&SessionCode=${this.props.match.params.sessioncode}`)\n            .then(() => {\n                this.props.actions.getSessionById(this.props.calendar.calendarGet.SessionID);\n                // If the calendar has zero categories then it is probably legacy data.\n                // The exception is that Pro Forma calendars have zero bills on them.                \n                // OR If the CalendarCategory at index 0 is the default calendar category template with no CalendarCategoryID from the DB\n                if (this.props.calendar.calendarGet.CalendarCategories.length === 0 && !this.props.calendar.calendarGet.IsProforma || this.props.calendar.calendarGet.CalendarCategories[0] && this.props.calendar.calendarGet.CalendarCategories[0].CalendarCategoryID === undefined) {\n                    const htmlFile = this.props.calendar.calendarGet.CalendarFiles.find(file => file.FileURL.toUpperCase().includes('.HTM'));\n                    if (htmlFile) {\n                        return this.props.actions.getFile(htmlFile.FileURL)\n                            .then(() => {\n                                let html = this.props.nav.file;\n                                if (html) {\n                                    html = html.replaceAll('href=\"#', 'href=\"' + window.location.pathname + \"#\")\n                                }\n                                this.setState({\n                                    calendarFile: html,\n                                    isLoaded: true\n                                });\n                                return Promise.resolve();\n                            }).catch(err => {\n                                if (err !== 'Aborted') {\n                                    throw err.toString();\n                                }\n                                return Promise.reject(err);\n                            });\n                    } else {\n                        return Promise.resolve();\n                    }\n                } else {\n                    return Promise.resolve()\n                }\n            }).catch(err => {\n                return Promise.reject(err);\n            });\n        Promise.all([\n            getCalendar\n        ])\n            .then(() => {\n                const calendarGet = this.props.calendar.calendarGet\n                this.setState({\n                    isLoaded: true,\n                    calendar: calendarGet\n                })\n                // Connect to websocket for calendar current item\n                let currentItemConnection = new HubConnectionBuilder()\n                    .withUrl((API_URL || process.env.REACT_APP_CALENDAR_API_URL) + '/Calendar/currentitem')\n                    .build();\n                //Will change to a more reasonable timeout later\n                currentItemConnection.serverTimeoutInMilliseconds = 5000000000;\n                this.setState({\n                    currentItemHubConnection: currentItemConnection\n                }, () => {\n                    this.state.currentItemHubConnection\n                        .start({ withCredentials: false })\n                        .then(() => {\n                            this.state.currentItemHubConnection.invoke('GetCalendarCurrentItem', calendarGet.CalendarID)\n                                .then((message) => {\n                                    const currentItem = message.stronglyTypedObject;\n                                    if (currentItem) {\n                                        this.setState({\n                                            currentCategoryItem: currentItem[0].calendarCategoryID,\n                                            currentAgendaItem: currentItem[0].agendaID,\n                                            currentProceduralMotion: currentItem[0].proceduralMotion\n                                        })\n\n                                    }\n                                })\n                        })\n                        .catch(err => {\n                            console.log('Error while establishing connection :( ' + err)\n                        });\n                    this.state.currentItemHubConnection.on(\"Receive\", message => this.receiveCurrentItem(message));\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n                this.setState({\n                    isLoaded: true,\n                    message: err.toString()\n                });\n            });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    receiveCurrentItem(message) {\n        try {\n            const currentItem = JSON.parse(message.message);\n            this.setState({\n                currentCategoryItem: currentItem[0].CalendarCategoryID,\n                currentAgendaItem: currentItem[0].AgendaID,\n                currentProceduralMotion: currentItem[0].ProceduralMotion\n            })\n        } catch {\n            console.error(`Message malformed: ${message}`);\n        }\n    }\n\n    setCurrentItem(e, categoryId, agendaId, proceduralMotion) {\n        if (e) {\n            e.stopPropagation();\n        }\n        if (proceduralMotion === 'Clear current item') {\n            // This is so the user has ability to set clear out the current item and display nothing.\n            proceduralMotion = '';\n        }\n        const params = {\n            CalendarID: this.state.calendar.CalendarID,\n            CalendarCategoryID: categoryId || null,\n            AgendaID: agendaId || null,\n            ProceduralMotion: proceduralMotion || ''\n        }\n        this.setState({\n            isSavingCalendarCurrentItem: true\n        });\n        this.props.actions.saveCalendarCurrentItem(params)\n            .then(() => {\n                this.setState({\n                    isSavingCalendarCurrentItem: false\n                });\n            })\n            .catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.error(err);\n                this.props.actions.makeToast([{ message: \"Failed To Set Current Item\", type: \"failure\" }]);\n            });\n    }\n\n    toggleAgenda(catIndex, agendaIndex) {\n        let calendar = { ...this.state.calendar };\n        let agenda = calendar.CalendarCategories[catIndex].Agendas[agendaIndex];\n        agenda.show = !agenda.show;\n        if (agenda.IsActive && agenda.LegislationNumber && !agenda.Versions) {\n            agenda.Versions = []\n            this.props.actions.getBillVersionByBillNumber('?BillNumber=' + calendar.CalendarCategories[catIndex].Agendas[agendaIndex].LegislationNumber + '&SessionID=' + calendar.SessionID)\n                .then(() => {\n                    // Get the calendar data again just in case the user toggled the agenda items\n                    calendar = { ...this.state.calendar };\n                    let versions = this.props.bills.billVersion.filter(ver => moment(ver.DraftDate).startOf('day').isSameOrBefore(calendar.CalendarDate))\n                    // Most recent versions first\n                    versions = versions.sort((a, b) => moment(a.DraftDate).isSameOrBefore(b.DraftDate))\n                    calendar.CalendarCategories[catIndex].Agendas[agendaIndex].Versions = versions\n                    this.setState({\n                        calendar: calendar\n                    });\n                }).catch(err => {\n                    if (err === \"Aborted\") {\n                        return\n                    }\n                    calendar = { ...this.state.calendar };\n                    calendar.CalendarCategories[catIndex].Agendas[agendaIndex].Versions = \"fail\";\n                    this.setState({\n                        calendar: calendar\n                    });\n                })\n        }\n        this.setState({\n            calendar: calendar\n        });\n    }\n\n    createWatchlist(e, catIndex, callback) {\n        e.stopPropagation();\n        const category = this.state.calendar.CalendarCategories[catIndex];\n        let collection = {\n            Name: `Calendar on ${moment(this.state.calendar.CalendarDate).format('MM/DD/YY')}`,\n            Description: category.Description,\n            WatchListLegislation: []\n        };\n        category.Agendas.forEach(agenda => {\n            if (agenda.LegislationID && agenda.IsActive) {\n                collection.WatchListLegislation.push({ LegislationID: agenda.LegislationID });\n            }\n        });\n        if (collection.WatchListLegislation.length > 0) {\n            this.setState({\n                creatingCollection: catIndex\n            });\n            this.props.actions.saveCollections({ WatchLists: [collection] }, true)\n                .then(() => {\n                    let createdCollections = [...this.state.createdCollections];\n                    createdCollections[catIndex] = [...this.props.collection.collectionSave][0]\n                    this.setState({\n                        creatingCollection: null,\n                        createdCollections: createdCollections\n                    });\n                    if (callback) {\n                        callback(this.props.collection.collectionSave);\n                    }\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.setState({\n                        creatingCollection: null\n                    });\n                    this.props.actions.makeToast([{ message: \"Failed To Create Watchlist\", type: \"failure\" }]);\n                });\n        }\n    }\n\n    editHistory(e, catIndex, displayDescription) {\n        //User wants to be able to click a button on the calendar and immediately be able to edit the bills in a category.\n        //Loop the category agendas, build a string of legislationIDs, put it in the query object, and ship it to bill management\n        const category = this.state.calendar.CalendarCategories[catIndex];\n\n        let legislationIds = [];\n        for (let i = 0; i < category.Agendas.length; i++) {\n            if (category.Agendas[i].IsActive && !category.Agendas[i].IsHidden)\n                legislationIds.push({ LegislationID: category.Agendas[i].LegislationID })\n        }\n\n        const queryString = JSON.stringify({ legislationIDs: legislationIds, selectedSession: this.state.calendar.SessionID, calendarDate: this.state.calendar.CalendarDate, calendarCategoryTypeID: category.CalendarCategoryTypeID, calendarCategoryDescription: displayDescription })\n        const link = \"/bill-management?q=\" + window.btoa(queryString)\n        this.props.history.push(link);\n    }\n\n    removeZeros(doc) {\n        let dom = document.createElement('div');\n        dom.innerHTML = doc;\n\n        let all = document.getElementsByTagName(\"*\");\n\n        for (let i = 0; i < all.length; i++) {\n            let trimmedUrl = \"\"\n            //If it's an href with a bill or resolution number in it then slice off the end, remove the zeros, and append it back to the href\n            if (all[i].href && all[i].href != \"\" && all[i].href.match(/[H|S][B|J|R][0-9]{4}/)) {\n                trimmedUrl = all[i].href.slice(all[i].href.length - 7, all[i].href.length - 1)\n                trimmedUrl = trimmedUrl.slice(0, 2) + parseInt(trimmedUrl.slice(2))\n                all[i].href = all[i].href.slice(0, all[i].href.length - 7) + trimmedUrl + \"/\";\n            }\n        }\n\n        return doc;\n    }\n\n    generateClerksCopy(category) {\n        let LegislationFiles = [];\n\n        category.Agendas.filter(x => x.IsActive).forEach((x, i) => {\n            LegislationFiles.push({\n                LegislationID: x.LegislationID,\n                LegislationNumber: x.LegislationNumber,\n                SessionID: this.state.calendar.SessionID,\n                AmendmentCount: 1,\n                FirstChamberCount: 1,\n                SecondChamberCount: 1\n            })\n        })\n\n        this.props.actions.joinCommFile({ LegislationFiles })\n            .then(() => {\n                const res = this.props.communications.joinCommFile;\n                if (res.Pdf.FileContents) {\n                    fetch(`data:application/pdf;base64,${res.Pdf.FileContents}`)\n                        .then(res => res.blob())\n                        .then(blob => {\n                            const urlObj = URL.createObjectURL(blob);\n                            this.setState({\n                                pdfSrc: urlObj\n                            });\n                        });\n                } else {\n                    this.setState({\n                        pdfSrc: ''\n                    })\n                }\n                let failedBills = [];\n                res.JoinLegislation.forEach(leg => {\n                    if (!leg.Generated) {\n                        const bill = LegislationFiles.find(bill => bill.LegislationID === leg.LegislationID)\n                        if (bill && !failedBills.includes(bill)) {\n                            failedBills.push(bill)\n                        }\n                    }\n                });\n\n                if (failedBills.length === LegislationFiles.length) {\n                    // Every single bill in the list does not have a clerk copy\n                    this.props.actions.makeToast([{ message: LegislationFiles.length === 1 ? LegislationFiles[0].LegislationNumber + \" does not have a clerk copy\" : \"No selected bills have a clerk copy\", type: \"failure\", long: true }]);\n                    this.setState({\n                        gettingPdf: false\n                    });\n                } else {\n                    this.setState({\n                        failedToJoinBills: failedBills,\n                        showPdfWindow: true,\n                        gettingPdf: false\n                    });\n                }\n            }).catch(err => {\n                if (err === 'AbortError') {\n                    return;\n                }\n                this.setState({\n                    pdfSrc: '',\n                    gettingPdf: false\n                });\n                console.log(err.toString());\n                this.props.actions.makeToast([{ message: \"Failed To Get Data\", type: \"failure\" }]);\n            })\n    }\n\n    render() {\n        const { selectedSession } = this.props.session;\n        const { isLoaded, message, calendar } = this.state;\n        if (!isLoaded) {\n            return (<div className=\"center-spinner spinner\">Loading...</div>)\n        }\n        if (message) {\n            return (<div className=\"center\">{message}</div>)\n        }\n        if (this.state.calendarFile) {\n\n            //Find and display the PDF link if we're displaying a pre-generated calendar file\n            let calendarFileUrl = '';\n            const pdfFile = this.props.calendar.calendarGet.CalendarFiles.find(file => file.FileURL.toUpperCase().includes('PDF'));\n            if (pdfFile) {\n                const url = new URL(pdfFile.FileURL);\n                calendarFileUrl = lisDocDomain + (url.pathname[0] === '/' ? url.pathname : '/' + url.pathname);\n            }\n\n            return (\n                <div className='details-page-data-container'>\n                    {calendarFileUrl != \"\" &&\n                        <a target=\"_blank\" href={calendarFileUrl} className=\"float-right\">\n                            <span title=\"PDF\" aria-label=\"PDF\" className=\"icon pdf\"></span>\n                        </a>\n                    }\n                    {renderHTML(this.removeZeros(this.state.calendarFile))}\n                </div>\n            );\n        }\n\n        //This calendarTime logic is also set in lis-calendar-form, if changed here, change there as well\n        const calendarTime = moment.utc(calendar.CalendarDate).isSame(moment.utc(calendar.CalendarDate).hour(0), \"minute\")\n            || moment.utc(calendar.CalendarDate).isSame(moment.utc(calendar.CalendarDate).hour(12), \"minute\")\n            ? calendar.ReferenceNumber !== \"HC10402\" ? \"12 noon\" : \"\"\n            : moment.utc(calendar.CalendarDate).format(\"h:mm a\");\n\n        return (<div className='generic-details-page calendar-details-page'>\n            <div style={{ display: this.state.showPdfWindow ? 'block' : 'none', overflow: 'hidden' }} onClick={() => this.setState({ showPdfWindow: false })} className=\"overlay center-content\">\n                <div className=\"full full-height\" style={{ maxWidth: '100vw', width: '95%' }}>\n                    <div onClick={e => e.stopPropagation()} className=\"dlas-forms user-forms overlay-content animated-fade-in-up full-height\">\n                        <div>\n                            <button className=\"button print\" onClick={() => this.pdfRef ? this.pdfRef.contentWindow.print() : null}> Print</button>\n                        </div>\n                        {this.state.failedToJoinBills.length > 0 &&\n                            <div className=\"small-text\">\n                                <span>These bills do not have clerk copies and are not included in the PDF: </span>\n                                <span>{this.state.failedToJoinBills.map((bill, i) => <React.Fragment key={i}>{i !== 0 && \", \"}{bill.billNum}</React.Fragment>)}</span>\n                            </div>\n                        }\n                        <div className=\"center full-height\">\n                            <iframe className=\"center\" style={{ width: '100%', height: '90%' }} ref={el => this.pdfRef = el} src={this.state.pdfSrc}></iframe>\n                            <button style={{ position: 'absolute', bottom: '10px', right: '10px' }} type=\"button\" onClick={() => this.setState({ showPdfWindow: false, pdfSrc: \"\" })} className=\"button secondary\">Close</button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <CalendarDetailsComponent\n                calendar={calendar}\n                calendarTime={calendarTime}\n                session={selectedSession}\n                sessionList={this.props.session.sessionList}\n                comments={calendar.CalendarComments || []}\n                creatingCollection={this.state.creatingCollection}\n                userClaims={this.props.login.userClaims}\n                createdCollections={this.state.createdCollections}\n                editHistory={this.editHistory}\n                createWatchlist={this.createWatchlist}\n                toggleAgenda={this.toggleAgenda}\n                setCurrentItem={this.setCurrentItem}\n                currentCategoryItem={this.state.currentCategoryItem}\n                currentAgendaItem={this.state.currentAgendaItem}\n                currentProceduralMotion={this.state.currentProceduralMotion}\n                commonCurrentItemOptions={this.state.commonCurrentItemOptions}\n                isSavingCalendarCurrentItem={this.state.isSavingCalendarCurrentItem}\n                generateClerksCopy={this.generateClerksCopy}\n                calendarCategoryReferences={this.props.calendar.calendarCategoriesReferences}\n            />\n        </div>);\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { session, nav, calendar, bills, login, collection, communications } = state;\n        return {\n            session,\n            nav,\n            calendar,\n            bills,\n            login,\n            collection,\n            communications\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, navActionCreators, calendarActionCreators, billActionCreators, authActionCreators, collectionActionCreators, communicationsActionCreators), dispatch)\n        }\n    }\n)(PublicCalendarDetails)\n","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { Link } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { minutesActionCreators } from '../../stores/lis-minutes-store';\nimport { cancelRequest } from '../../services/request.service';\nimport moment from 'moment-timezone';\n\n\nclass PublicMinutesList extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            session: '',\n            senateIsLoaded: false,\n            houseIsLoaded: false,\n            senateMinutesList: [],\n            houseMinutesList: [],\n            showHouseChamber: true,\n            showSenateChamber: true\n        };\n\n        this.toggleChamber = this.toggleChamber.bind(this);\n    }\n\n    toggleChamber(chamber) {\n        this.setState(state => ({\n            [chamber]: !state[chamber]\n        }));\n    }\n\n    //When component has mounted, make the call to get session by code\n    componentDidMount() {\n        const sessionCode = this.props.match.params.sessioncode\n        if (parseInt(sessionCode) > 0) {\n            //Update the session selector component, which will run componentDidUpdate and call setupPage on its own\n            if (this.props.nav.session !== sessionCode) {\n                this.props.actions.changeSession(sessionCode)\n            } else {\n                this.setupPage(sessionCode);\n            }\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push(\"/session-details/\" + this.props.nav.session + \"/minutes-list/\" + this.props.match.params.chamber);\n            this.setupPage(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            const sessionCode = this.props.match.params.sessioncode;\n            if (!isNaN(sessionCode)) {\n                this.props.actions.changeSession(sessionCode);\n            }\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    setupPage(sessionCode) {\n        this.setState({\n            senateIsLoaded: false,\n            houseIsLoaded: false\n        }, () => {\n            //Get the session information\n            this.props.actions.getSessionByCode(sessionCode)\n                .then(() => {\n                    this.setState({\n                        session: this.props.session.selectedSession,\n                    });\n                });\n            if (this.props.match.params.chamber === \"house\") {\n                //Get the list for the House\n                this.props.actions.getMinutesList('sessionCode=' + sessionCode + '&chamberCode=H')\n                    .then(() => {\n                        this.setState({\n                            houseMinutesList: [...this.props.minutes.minutesList].filter(m => !m.CommitteeID),\n                            houseIsLoaded: true\n                        });\n                    });\n            } else {\n                //Get the list for the Senate\n                this.props.actions.getMinutesList('sessionCode=' + sessionCode + '&chamberCode=S')\n                    .then(() => {\n                        this.setState({\n                            senateMinutesList: [...this.props.minutes.minutesList].filter(m => !m.CommitteeID),\n                            senateIsLoaded: true\n                        });\n                    });\n            }\n        });\n    }\n\n    render() {\n        const { senateMinutesList, houseMinutesList, senateIsLoaded, houseIsLoaded, session } = this.state;\n        const sessionHeader = (session ? session.SessionYear + \" \" + session.DisplayName : '') + (this.props.match.params.chamber === \"house\" ? \" House\" : \" Senate\") + \" Minutes\";\n        return (\n            <div className=\"public-chamber-data\">\n                <div>\n                    <h2>{sessionHeader}</h2>\n                </div>\n                <div className=\"public-list\">\n                    {this.props.match.params.chamber === \"house\" ?\n                        session && session.SessionYear < 2010 ?\n                            <div>\n                                {houseIsLoaded ?\n                                    <table className=\"line-table\">\n                                        <tbody className=\"toggle-table\">\n                                            {houseMinutesList.map(minutes =>\n                                                <tr key={minutes.MinutesBookID} className=\"inner-grid two alternating-color-list\">\n                                                    <td>\n                                                        {minutes.MinutesFiles && minutes.MinutesFiles.length > 0 ?\n                                                            <a target=\"_blank\" href={minutes.MinutesFiles[0].FileURL}>\n                                                                <span className=\"button paper\">Minutes</span>\n                                                                {moment(minutes.MinutesDate).format(\"MM/DD/YYYY\")} {minutes.MinutesNumber > 1 && `(${minutes.MinutesNumber})`}\n                                                            </a>\n                                                            :\n                                                            <div>\n                                                                <span className=\"button paper\">Minutes</span>\n                                                                {moment(minutes.MinutesDate).format(\"MM/DD/YYYY\")} {minutes.MinutesunicatilonNumber > 1 && `(${minutes.MinutesNumber})`}\n                                                            </div>\n                                                        }\n                                                    </td>\n                                                </tr>\n                                            )}\n                                        </tbody>\n                                    </table>\n                                    :\n                                    <div aria-label=\"Loading\" className=\"center-spinner spinner\"></div>\n                                }\n                            </div>\n                            :\n                            <a href={\"https://virginiageneralassembly.gov/house/minutes/list.php?ses=\" + (session && session.SessionCode.toString().substr(2, 3))}>House Minutes</a>\n                        :\n                        <div>\n                            {senateIsLoaded ?\n                                <table className=\"line-table\">\n                                    <tbody className=\"toggle-table\">\n                                        {senateMinutesList.map(minutes =>\n                                            <tr key={minutes.MinutesBookID} className=\"inner-grid two alternating-color-list\">\n                                                <td>\n                                                    <Link to={`../minutes/${minutes.MinutesBookID}`}>\n                                                        <span className=\"button paper\">Minutes</span>\n                                                        {moment(minutes.MinutesDate).format(\"MM/DD/YYYY\")} {minutes.MinutesNumber > 1 && `(${minutes.MinutesNumber})`}\n                                                    </Link>\n                                                </td>\n                                            </tr>\n                                        )}\n                                    </tbody>\n                                </table>\n                                :\n                                <div aria-label=\"Loading\" className=\"center-spinner spinner\"></div>\n                            }\n                        </div>\n                    }\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { session, nav, minutes } = state;\n        return {\n            session,\n            nav,\n            minutes\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, navActionCreators, minutesActionCreators), dispatch)\n        }\n    }\n)(PublicMinutesList)\n","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport ReactToPrint from 'react-to-print';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { minutesActionCreators } from '../../stores/lis-minutes-store';\nimport { personnelActionCreators } from '../../stores/lis-personnel-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { cancelRequest } from '../../services/request.service';\nimport moment from 'moment-timezone';\n\nimport MinutesDetails from '../../lis-shared/lis-minutes/lis-minutes-details';\nimport renderHTML from 'react-render-html';\n\nclass PublicMinutesDetails extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoaded: false\n        };\n    }\n\n    //When component has mounted, make the call to get session by ID\n    componentDidMount() {\n        const sessionCode = parseInt(this.props.match.params.sessioncode);\n        const minutesId = parseInt(this.props.match.params.minutesid)\n        const error = (msg) => {\n            this.setState({\n                message: msg || \"Failed to get minutes\",\n                isLoaded: true\n            });\n        }\n\n        if (parseInt(sessionCode) > 0 && minutesId > 0) {\n            this.props.actions.getSessionByCode(sessionCode)\n                .then(() => {\n                    this.props.actions.getMinutesBook('?minutesbookID=' + minutesId)\n                        .then(() => {\n                            const minutesBook = this.props.minutes.minutesBook;\n                            if (minutesBook.MinutesCategories.length === 0 && minutesBook.MinutesFiles.find(file => file.FileURL.toUpperCase().includes('.HTM'))) {\n                                //If there are no categories  then it is assumed that this minutes book is legacy. Get the file if it exists\n                                const htmlFile = minutesBook.MinutesFiles.find(file => file.FileURL.toUpperCase().includes('.HTM'));\n                                if (htmlFile) {\n                                    this.props.actions.getFile(htmlFile.FileURL)\n                                        .then(() => {\n                                            this.setState({\n                                                minutesFile: this.props.nav.file,\n                                                isLoaded: true\n                                            });\n                                        }).catch(err => {\n                                            if (err !== 'Aborted') {\n                                                throw err.toString();\n                                            }\n                                        });\n                                }\n                            } else {\n                                this.props.actions.getRoleTypes()\n                                    .then(() => {\n                                        // not going to serve the file itself, so we need to get the appropriate names for the header\n                                        // wait until both async calls are done before setting isLoaded to true \n                                        const ltGovPromise = new Promise((res, rej) => {\n                                            const ltGovRoleType = this.props.personnel.roleTypes.find(x => x.Name.toLowerCase().includes(\"president\"));\n                                            const ltGovParams = \"isPublic=true&staffRoleTypeID=\" + ltGovRoleType.StaffRoleTypeID + \"&effectiveBeginDate=\" + minutesBook.MinutesDate;\n                                            this.props.actions.getPersonnelList(ltGovParams, true)\n                                                .then(() => {\n                                                    const ltGov = this.props.personnel.personnelOtherList[0];\n                                                    if (ltGov) {\n                                                        this.setState({\n                                                            ltGov\n                                                        })\n                                                    } else {\n                                                        throw 'Failed to get President of the Senate';\n                                                    }\n                                                    res();\n                                                }).catch(err => rej(err));\n                                        });\n                                        const clerkOfSenatePromise = new Promise((res, rej) => {\n                                            const clerkOfSenateRoleType = this.props.personnel.roleTypes.find(x => x.Name.toLowerCase().includes(\"clerk\") && x.Name.toLowerCase().includes(\"senate\"))\n                                            const clerkOfSenateParams = \"isPublic=true&staffRoleTypeID=\" + clerkOfSenateRoleType.StaffRoleTypeID + \"&effectiveBeginDate=\" + minutesBook.MinutesDate;\n                                            this.props.actions.getPersonnelList(clerkOfSenateParams, true)\n                                                .then(() => {\n                                                    const clerkofTheSenate = this.props.personnel.personnelOtherList[0];\n                                                    if (clerkofTheSenate) {\n                                                        this.setState({\n                                                            clerkofTheSenate\n                                                        })\n                                                    } else {\n                                                        throw 'Failed to get Clerk of the Senate';\n                                                    }\n                                                    res();\n                                                }).catch(err => rej(err));\n                                        })\n                                        Promise.all([ltGovPromise, clerkOfSenatePromise]).then(() => {\n                                            this.setState({ isLoaded: true })\n                                        }).catch(err => {\n                                            if (err === 'Aborted')\n                                                return;\n                                            console.log(err)\n                                            error('Failed to get header personnel information');\n                                        })\n                                    }).catch(err => {\n                                        if (err === 'Aborted')\n                                            return;\n                                        error('Failed to get header personnel information');\n                                    });\n                            }\n                        }).catch(err => {\n                            if (err === 'Aborted')\n                                return;\n                            error();\n                        });\n                });\n        } else {\n            error();\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { isLoaded, message, ltGov, clerkofTheSenate } = this.state;\n\n        const session = this.props.session.selectedSession;\n        const sessionHeader = session ? session.SessionYear + \" \" + session.DisplayName : '';\n\n        const minutesBook = this.props.minutes.minutesBook;\n        const categories = minutesBook.MinutesCategories;\n        let categoriesToShow = [];\n        if (categories) {\n            categoriesToShow = categories.filter(category => category.ReleaseToPreview);\n        }\n\n        if (message) {\n            return (<p>{message}</p>);\n        }\n        if (!isLoaded) {\n            return (<div className=\"center-spinner spinner\">Loading...</div>);\n        }\n        return (\n            <div className='generic-details-page minutes-details-page'>\n                <div className=\"flex-row\">\n                    <div>\n                        <h2>{sessionHeader}</h2>\n                    </div>\n                    <div>\n                        {minutesBook.MinutesFiles && minutesBook.MinutesFiles.length > 0 &&\n                            <a className=\"download-link\" href={minutesBook.MinutesFiles[0].FileURL} target=\"_blank\" style={{ marginRight: \"5px\" }}><i className=\"icon file\" /> View HTML</a>\n                        }\n                        <ReactToPrint\n                            trigger={() => <button type=\"button\" className=\"button print\"> Print</button>}\n                            content={() => this.componentRef}\n                            pageStyle={\"break-inside: avoid\"}\n                        />\n                    </div>\n                </div>\n                <div className=\"details-page-data-container\" ref={el => (this.componentRef = el)}>\n                    {this.state.minutesFile ?\n                        <div>{renderHTML(this.state.minutesFile)}</div>\n                        :\n                        <React.Fragment>\n                            <div className=\"entry-text\">\n                                <ul className=\"first-entry\">\n                                    <li>Minute Book</li>\n                                    <li>{sessionHeader}</li>\n                                    <li>Senate of Virginia</li>\n                                    <li>{ltGov.FullName.toUpperCase()}, PRESIDENT OF THE SENATE</li>\n                                    <li>{clerkofTheSenate.FullName.toUpperCase()}, CLERK</li>\n                                    <li>{moment(minutesBook.MinutesDate).format('dddd, MMMM DD, YYYY')}</li>\n                                </ul>\n                            </div>\n                            <MinutesDetails\n                                categories={categoriesToShow}\n                                publicPage={true}\n                            />\n                        </React.Fragment>\n                    }\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { session, minutes, personnel, nav } = state;\n        return {\n            session,\n            minutes,\n            personnel,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, minutesActionCreators, personnelActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(PublicMinutesDetails)\n","import React from 'react';\nimport Select from 'react-select';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\n\nconst RESET = 'RESET';\n\nconst getItemStyle = (isDragging, draggableStyle, isHeader) => ({\n    userSelect: \"none\",\n    padding: '5px',\n    border: '1px solid #CCC',\n    margin: '0',\n    fontSize: isHeader ? '.95em' : '.9em',\n    background: isDragging ? \"#CCC\" : \"#FFF\",\n    ...draggableStyle\n});\n\nconst getListStyle = isDraggingOver => ({\n    background: isDraggingOver ? \"#f5f5f5\" : \"#f5f5f5\",\n    padding: '0'\n});\n\nconst selectStyles = {\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        minHeight: 0,\n        fontSize: '0.8em',\n    }),\n    dropdownIndicator: (base) => ({\n        ...base,\n        padding: '0px 8px'\n    }),\n    clearIndicator: (base) => ({\n        ...base,\n        padding: '0px 8px'\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    },\n    menu: (base) => ({\n        ...base,\n        boxShadow: 'none'\n    }),\n    menuList: (base) => ({\n        ...base,\n        background: 'white',\n        border: '1px solid gray',\n        borderRadius: '5px'\n    })\n};\n\nexport default class UpdatePatronageModal extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showPatronTypeChangeWarning: {}\n        }\n\n        this.handlePatronTypeChange = this.handlePatronTypeChange.bind(this);\n        this.cancel = this.cancel.bind(this);\n    }\n\n    handlePatronTypeChange(row, val, confirm) {\n        const patronDisplayName = row.PatronDisplayName;\n        if (val && val.Name === \"Chief Co-Patron\" && this.props.patronList.filter(p => !p.RemoveDate && p.Name === \"Chief Co-Patron\").length === 4) {\n            this.setState({\n                showPatronTypeChangeWarning: {\n                    ...this.state.showPatronTypeChangeWarning,\n                    [patronDisplayName]: !confirm\n                }\n            })\n            if (!confirm) {\n                return;\n            }\n        } else if (val === RESET) {\n            this.setState({\n                showPatronTypeChangeWarning: {\n                    ...this.state.showPatronTypeChangeWarning,\n                    [patronDisplayName]: false\n                }\n            })\n            return;\n        }\n        this.props.handlePatronChange(row, 'PatronType', val)\n    }\n\n    cancel() {\n        this.props.history.goBack();\n    }\n\n    render() {\n        const { billText, patronList, memberList, patronTypes, newPatron } = this.props;\n        const { showPatronTypeChangeWarning } = this.state;\n        const showConfirmButton = newPatron?.length && !newPatron.find(p => !p.MemberID) && !newPatron.find(p => !memberList.find(m => m.MemberID === p.MemberID)) && !newPatron.find(p => !patronTypes.find(pt => pt.Name === p.Name)) && [...newPatron].filter(p => p.Name === \"Chief Co-Patron\").concat(patronList.filter(p => !p.RemoveDate && p.Name === \"Chief Co-Patron\")).length > 4;\n        return (\n            <div>\n                <div style={{ margin: '10px' }}>\n                    <div style={{ marginBottom: '10px' }}>\n                        <h2 style={{ marginBottom: '0px' }}>Update Patrons ({billText.LegislationNumber})</h2>\n                    </div>\n                    <div style={{ marginBottom: '10px' }}>\n                        <div style={{ display: 'grid', gap: '10px', gridTemplateColumns: 'max-content 350px 180px 100px', alignItems: 'center' }}>\n                            <span style={{ fontSize: '.85em' }}>New Patron(s): </span>\n                            <Select\n                                isMulti\n                                options={memberList ? memberList.filter(m => !patronList.map(p => p.MemberID).includes(m.MemberID)) : []}\n                                onChange={(val, behavior) => this.props.handleNewPatronChange('Patron', val, behavior)}\n                                getOptionValue={(opt) => opt.MemberID}\n                                getOptionLabel={(opt) => memberList.find(m => m.MemberID === opt.MemberID)?.label}\n                                value={[...newPatron].filter(p => p.MemberID)}\n                                styles={selectStyles}\n                            />\n                            <Select\n                                options={patronTypes ? patronTypes.filter(pt => pt.Name !== \"Incorporated Chief Co-Patron\" || !newPatron.filter(p => p.ChamberCode !== \"S\")?.length) : []}\n                                getOptionLabel={opt => opt.Name}\n                                getOptionValue={opt => opt.PatronTypeID}\n                                onChange={(val) => this.props.handleNewPatronChange('PatronType', val)}\n                                value={newPatron[0].Name ? patronTypes.find(pt => pt.Name === newPatron[0].Name) : null}\n                                styles={selectStyles}\n                            />\n                            {!showConfirmButton &&\n                                <button disabled={!newPatron?.length || !newPatron[0].Name || !newPatron[0].MemberID || newPatron.find(p => !memberList.find(m => m.MemberID === p.MemberID)) || newPatron.find(p => !patronTypes.find(pt => pt.Name === p.Name))} className=\"button primary\" onClick={this.props.addNewPatron}>Add</button>\n                            }\n                        </div>\n                        {showConfirmButton &&\n                            <div style={{ display: 'flex', gap: '8px' }}>\n                                <span className=\"input-feedback-warning\" style={{ fontSize: '13px', margin: 'auto 0px' }}>Caution: There can only be a maximum of 4 Chief Co-Patrons, which this legislation will now exceed. Continue anyway?</span>\n                                <button className=\"button primary\" onClick={this.props.addNewPatron}>Yes</button>\n                                <button className=\"button secondary\" onClick={() => this.props.handleNewPatronChange('PatronType', null)}>No</button>\n                            </div>\n                        }\n                    </div>\n                    <div style={getItemStyle(false, null, true)} className='inner-grid toggle-and-small-one-med-half-half-small'>\n                        <div />\n                        <div>#</div>\n                        <div>Display Name</div>\n                        <div style={{ margin: 'auto' }}>Patron Type</div>\n                        <div style={{ margin: 'auto' }}>By Request</div>\n                        <div style={{ margin: 'auto' }}>Is Introducing</div>\n                        <div style={{ margin: 'auto' }}>Actions</div>\n                    </div>\n                    <DragDropContext onDragEnd={result => this.props.onDragEnd(result)}>\n                        <Droppable droppableId={\"hp\"} index={0}>\n                            {(provided, snapshot) => (\n                                <div\n                                    {...provided.droppableProps}\n                                    ref={provided.innerRef}\n                                    style={getListStyle(snapshot.isDraggingOver)}\n                                >\n                                    {patronList.map((row, j) => (\n                                        <Draggable isDragDisabled={Boolean(row.RemoveDate)} key={row.MemberID + \"-\" + row.LegislationID} draggableId={row.MemberID.toString()} index={j}>\n                                            {(provided, snapshot) => (\n                                                <div\n                                                    ref={provided.innerRef}\n                                                    {...provided.draggableProps}\n                                                    {...provided.dragHandleProps}\n                                                    style={getItemStyle(\n                                                        snapshot.isDragging,\n                                                        provided.draggableProps.style\n                                                    )}\n                                                >\n                                                    <div style={{ alignItems: 'center', color: row.RemoveDate ? '#8b8b8b' : '' }} className='inner-grid toggle-and-small-one-med-half-half-small'>\n                                                        <div><button className=\"button draggable\">Drag and drop</button></div>\n                                                        <div>{!row.RemoveDate ? row.Sequence : \"\"}</div>\n                                                        <div>{row.PatronDisplayName + \" (\" + row.ChamberCode + \")\"}</div>\n                                                        <div>\n                                                            <Select\n                                                                options={patronTypes ? patronTypes.filter(pt => pt.Name !== \"Incorporated Chief Co-Patron\" || row.Name === \"Incorporated Chief Co-Patron\" || row.ChamberCode === \"S\") : []}\n                                                                getOptionLabel={opt => opt.Name}\n                                                                getOptionValue={opt => opt.PatronTypeID}\n                                                                onChange={(val) => this.handlePatronTypeChange(row, val)}\n                                                                value={patronTypes.find(p => p.Name === row.Name)}\n                                                                isDisabled={row.RemoveDate}\n                                                                styles={selectStyles}\n                                                            />\n                                                        </div>\n                                                        <div style={{ margin: 'auto' }} disabled={row.RemoveDate} onClick={(val) => this.props.handlePatronChange(row, 'ByRequest')} className=\"toggle-switch\">\n                                                            <input id=\"sr-status-change\" checked={row.ByRequest} type=\"checkbox\" />\n                                                            <span className=\"slider\"></span>\n                                                        </div>\n                                                        <div style={{ margin: 'auto' }} disabled={row.RemoveDate} onClick={() => this.props.handlePatronChange(row, 'IsIntroducing')} className=\"toggle-switch\">\n                                                            <input id=\"sr-status-change\" checked={row.IsIntroducing} type=\"checkbox\" />\n                                                            <span className=\"slider\"></span>\n                                                        </div>\n                                                        <div style={{ margin: 'auto', display: 'flex' }}><button onClick={() => this.props.togglePatron(row)} className={`icon ${row.RemoveDate ? 'add' : 'delete'}`} type=\"button\" /></div>\n                                                    </div>\n                                                    {showPatronTypeChangeWarning[row.PatronDisplayName] &&\n                                                        <div style={{ display: 'flex', gap: '8px' }}>\n                                                            <span className=\"input-feedback-warning\" style={{ fontSize: '13px', margin: 'auto 0px' }}>Caution: There can only be a maximum of 4 Chief Co-Patrons, which this legislation already has. Continue anyway?</span>\n                                                            <button className=\"button primary\" onClick={() => this.handlePatronTypeChange(row, patronTypes.find(p => p.Name === \"Chief Co-Patron\"), true)}>Yes</button>\n                                                            <button className=\"button secondary\" onClick={() => this.handlePatronTypeChange(row, RESET)}>No</button>\n                                                        </div>\n                                                    }\n                                                </div>\n                                            )}\n                                        </Draggable>\n                                    ))}\n                                    {provided.placeholder}\n                                </div>\n                            )}\n                        </Droppable>\n                    </DragDropContext>\n                </div>\n                <div className=\"inline-list align-right\" style={{ paddingBottom: '55px' }}>\n                    {!this.props.savingPatrons && <button className=\"button secondary\" onClick={this.cancel}>Cancel</button>}\n                    <button disabled={this.props.savingPatrons || showConfirmButton || Object.keys(showPatronTypeChangeWarning).find(key => showPatronTypeChangeWarning[key] === true)} className=\"button primary\" onClick={this.props.updatePatrons}>{this.props.savingPatrons ? <div className=\"small-spinner\" /> : 'Update'}</button>\n                </div>\n            </div>\n        )\n    }\n}","import { createElement } from \"react\";\n\nconst getJsx = (jsonObject) => {\n    // Do sanity checks. Make sure that the the param is actually an object\n    if (typeof jsonObject !== 'object' || jsonObject === null) {\n        console.error(\"object sent to be turned into jsx is not an object\")\n        return null;\n    }\n    return mapJson(jsonObject);\n\n}\n\n\nconst mapJson = (object) => {\n    if (typeof object === \"string\") {\n        return object;\n    }\n    let attributeObject = {};\n    if (object[\"Attributes\"]) {\n        for (var key in object[\"Attributes\"]) {\n            if (object[\"Attributes\"].hasOwnProperty(key)) {\n                switch (key) {\n                    case (\"Id\"):\n                        attributeObject.id = object[\"Attributes\"][key];\n                        break;\n                    case (\"Class\"):\n                        attributeObject.className = object[\"Attributes\"][key];\n                        break;\n                    case (\"Style\"):\n                        attributeObject.style = processStyle(object[\"Attributes\"][key]);\n                        break;\n                    case (\"Url\"):\n                        attributeObject.href = object[\"Attributes\"].Url;\n                        break;\n                    case (\"cellspacing\"):\n                        attributeObject['cellSpacing'] = object[\"Attributes\"][key];\n                        break;\n                    case (\"cellpadding\"):\n                        attributeObject['cellPadding'] = object[\"Attributes\"][key];\n                        break;\n                    case (\"border\"):\n                    case (\"align\"):\n                        attributeObject[key] = object[\"Attributes\"][key];\n                        break;\n                }\n            }\n        }\n    }\n\n    let newElements = [];\n    if (object[\"Content\"]) {\n        let nestedElements = [];\n        for (const c of object[\"Content\"]) {\n            nestedElements.push(mapJson(c));\n        }\n        newElements.push(createElement(object[\"TagName\"], { ...attributeObject }, nestedElements));\n    } else {\n        newElements.push(createElement(object[\"TagName\"], { ...attributeObject }));\n    }\n    return newElements\n}\n\n// turns the inline style string into an object that jsx can understand.\nconst processStyle = cssText => {\n    const rule = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\n    let style = {}\n    const properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\n    for (const [property, value] of properties) {\n        const objectName = property.toLowerCase().replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\n        if (value) {\n            const urlChecker = value.replace(/url\\s*\\(/g, \"\").replace(/\\)\\s*$/g, \"\");\n            try {\n                new URL(urlChecker);\n                // a url does not need to be in a jsx attribute. Throw them out for safety's sake.\n                continue;\n            } catch {\n                // This is not a url. Carry on\n            }\n        }\n        style[objectName] = value;\n    }\n    return style;\n}\n\n\nexport default getJsx;","import React from 'react';\nimport renderHTML from 'react-render-html';\nimport { Link, Prompt } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport ReactToPrint from \"react-to-print\";\nimport DatePicker from \"react-datepicker\";\nimport Select from 'react-select';\nimport { billActionCreators } from '../../stores/lis-legislation-store';\nimport { authActionCreators } from '../../stores/lis-auth-store';\nimport { patronActionCreators } from '../../stores/lis-patron-store';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { cancelRequest } from '../../services/request.service';\nimport UpdatePatronageModal from '../../lis-admin/lis-update-patronage-modal';\nimport ReviewSection from '../../lis-admin/lis-version-management/components/lis-review';\nimport Mark from 'mark.js';\nimport queryString from 'query-string';\nimport moment from 'moment-timezone';\nimport getJsx from '../../services/json-to-jsx';\nimport getHtml from '../../services/json-to-html';\nimport { memberActionCreators } from '../../stores/lis-members-store';\n\nconst VERSION_AUTHOR = \"LegislationText\";\nconst PATRON_AUTHOR = \"LegislationPatron\";\nconst NEXT = \"NEXT\";\nconst PREVIOUS = \"PREVIOUS\";\n\nconst inlineStyles = [\n    { class: \"enactstm\", value: 'font-family:times,TimesNewRoman,Times New Roman;font-weight:bold;text-align:justify;text-indent:15px;' },\n    { class: \"enactcls\", value: 'font-family:times,TimesNewRoman,Times New Roman;font-weight:bold;text-align:justify;' },\n    { class: \"section\", value: 'font-family:times,TimesNewRoman,Times New Roman;text-align:justify;margin-bottom:1px;text-indent:15px;' },\n    { class: \"ldtitle\", value: 'font-family:times,TimesNewRoman,Times New Roman;font-style:italic;text-align:justify;text-indent:-15px;margin-left:15px;' },\n    { class: \"center\", value: 'font-family:times,TimesNewRoman,Times New Roman;font-weight:bold;text-align:center;' }\n]\n\nfunction PatronDisplayInfo(patron) {\n    var s = patron.PatronDisplayName.trim();\n    if (patron.ByRequest) {\n        s += \" (By Request)\";\n    }\n    return s;\n}\n\nclass FullText extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            message: '',\n            isLoaded: false,\n            isEditing: false,\n            isSaving: false,\n            billText: '',\n            draftTextCopy: '',\n            chamberOptions: [\n                { label: \"Senate\", value: \"S\" },\n                { label: \"House\", value: \"H\" }\n            ],\n            sponsorOptions: [],\n            highlight: this.props.location.pathname.endsWith('/hilite'),\n            amendmentSelections: {},\n            memberOptions: [],\n            houseMemberOptions: [],\n            senateMemberOptions: [],\n            committeeOptions: [],\n            housePatronsList: [],\n            senatePatronsList: [],\n            patronList: [],\n            originalPatronList: [],\n            versionsList: [],\n            chiefPatronsList: [],\n            showPatronModal: false,\n            showTooltip: false,\n            isDirty: false,\n            initialPass: false,\n            patronTypes: [],\n            newPatron: [{}],\n            wasEmpty: false,\n            replaced: false,\n            markHelpIndex: null,\n            subcommitteeOptions: []\n        };\n\n        this.handleEditorChange = this.handleEditorChange.bind(this);\n        this.toggleEditContent = this.toggleEditContent.bind(this);\n        this.createNewAmendment = this.createNewAmendment.bind(this);\n        this.saveText = this.saveText.bind(this);\n        this.handleBillDispositionChange = this.handleBillDispositionChange.bind(this);\n        this.toggleHighlight = this.toggleHighlight.bind(this);\n        this.highlightText = this.highlightText.bind(this);\n        this.membersCallback = this.membersCallback.bind(this);\n        this.committeesCallback = this.committeesCallback.bind(this);\n        this.handleParamChange = this.handleParamChange.bind(this);\n        this.handleIsActiveChange = this.handleIsActiveChange.bind(this);\n        this.handleIsPublicChange = this.handleIsPublicChange.bind(this);\n        this.toggleTooltip = this.toggleTooltip.bind(this);\n        this.getData = this.getData.bind(this);\n        this.isLdIncluded = this.isLdIncluded.bind(this);\n        this.getJsonHeadersRequestString = this.getJsonHeadersRequestString.bind(this);\n        this.toggleReprint = this.toggleReprint.bind(this);\n        this.downloadWordFile = this.downloadWordFile.bind(this);\n        this.togglePatronModal = this.togglePatronModal.bind(this);\n        this.updatePatrons = this.updatePatrons.bind(this);\n        this.savePatrons = this.savePatrons.bind(this);\n        this.onDragEnd = this.onDragEnd.bind(this);\n        this.togglePatron = this.togglePatron.bind(this);\n        this.handlePatronChange = this.handlePatronChange.bind(this);\n        this.handleNewPatronChange = this.handleNewPatronChange.bind(this);\n        this.addNewPatron = this.addNewPatron.bind(this);\n        this.handleVersionDateChange = this.handleVersionDateChange.bind(this);\n        this.applyPassageDates = this.applyPassageDates.bind(this);\n        this.triggerDownload = this.triggerDownload.bind(this);\n        this.passageCheck = this.passageCheck.bind(this);\n        this.setWasEmpty = this.setWasEmpty.bind(this);\n        this.setReplaced = this.setReplaced.bind(this);\n        this.resetPatrons = this.resetPatrons.bind(this);\n        this.navToKeywordHit = this.navToKeywordHit.bind(this);\n\n        this.dispositionRef = React.createRef();\n        this.sponsorRef = React.createRef();\n        this.memberRef = React.createRef();\n        this.committeeRef = React.createRef();\n    }\n\n    setWasEmpty(val, callback) {\n        this.setState({ wasEmpty: val }, () => {\n            if (callback) {\n                callback();\n            }\n        })\n    }\n\n    setReplaced(val, callback) {\n        this.setState({ replaced: val }, () => {\n            if (callback) {\n                callback();\n            }\n        })\n    }\n\n    handleEditorChange(value) {\n        this.setState({\n            draftTextCopy: value,\n            initialPass: true,\n            isDirty: this.state.billText.LegislationVersionID === 8 ? true : this.state.initialPass ? true : false\n        });\n    }\n\n    toggleReprint() {\n        let billText = { ...this.state.billText };\n        billText.IsReprint = !billText.IsReprint;\n        this.setState({ billText })\n    }\n\n    toggleEditContent(cb) {\n        this.setState({ gettingEditData: !this.state.isEditing }, () => {\n            let draftTextCopy, jsonPromise;\n            let headerError = false;\n            const billText = this.state.billText;\n            if (!this.state.isEditing && ['Introduced', 'Engrossed', 'Enrolled', 'Chaptered', 'Reenrolled'].includes(billText.LegislationVersion)) {\n\n                const jsonHeadersRequestString = this.getJsonHeadersRequestString(billText.LegislationTextID, billText.SessionID, this.state.selectedSession.SessionCode);\n\n                jsonPromise = this.props.actions.getJsonHeaders(jsonHeadersRequestString)\n                    .then(() => {\n                        if (this.props.bills.jsonHeaders) {\n                            let headers = getHtml(this.props.bills.jsonHeaders);\n\n                            let newDraftText;\n                            if (billText.LegislationVersion !== \"Introduced\") {\n                                draftTextCopy = headers + billText.DraftText;\n\n                                //Remove ldtitle from document if the header is present in the header and the header also contains the ldtitle\n                                let doc = document.createElement('div');\n                                doc.insertAdjacentHTML(\"afterbegin\", draftTextCopy);\n                                let header = doc.getElementsByTagName('div');\n\n                                if (header[0] != undefined) {\n                                    //Store the header somewhere while we find and iterate over paragraphs in the rest of the doc\n                                    let headerContainer = header[0].innerHTML;\n                                    let headerParagraphs = header[0].getElementsByTagName('p');\n\n                                    for (let i = 0; i < headerParagraphs.length; i++) {\n                                        if (['ldtitle', 'ld', 'patronLine', 'patctr'].includes(headerParagraphs[i].classList[0])) {\n                                            //Temporarily remove header                              \n                                            header[0].innerHTML = \"\";\n\n                                            //We found the ldtitle or patronage in the header, so iterate over the paragraphs to find any duplicate ldtitles or patronages and eliminate them\n                                            let docParagraphs = doc.getElementsByTagName('p');\n\n                                            for (let j = 0; j < docParagraphs.length; j++) {\n                                                if (['section', 'enactstm'].includes(docParagraphs[j].classList[0])) {\n                                                    break; //reached the actal body of the text, don't remove any more\n                                                } else if (['ldtitle', 'ld', 'patronLine', 'patctr', 'center'].includes(docParagraphs[j].classList[0])) {\n                                                    doc.removeChild(docParagraphs[j])\n                                                    j--\n                                                }\n                                            }\n                                        }\n                                    }\n                                    //Reattach the header\n                                    header[0].innerHTML = headerContainer;\n\n                                    newDraftText = doc.innerHTML;\n                                }\n                            } else {\n                                //if it's introduced, let's remove the existing headers if there are any before attaching the new headers\n                                draftTextCopy = billText.DraftText;\n\n                                let doc = document.createElement('div');\n                                doc.insertAdjacentHTML(\"afterbegin\", draftTextCopy);\n                                let content = doc.getElementsByTagName('p');\n\n                                //the below array defines where the actual draft text (i.e. not header information) begins, so that we know the point up to which we can remove elements (i.e. the point up to which we can assume the elements are headers)\n                                //they need to be in this priority order since sometimes there can be more than one, and we need to know which one will be the actual beginning of the draft text\n                                //e.g. hb1 in 2022 has the ldtitle class within the header itself as well as the enactstm class starting off the actual draft text, in which case the enactstm needs to be the point at which we stop removing elements, not the ldtitle element\n                                const beginningOfTextParagraphClassesInPriorityOrder = ['enactstm', 'ldtitle', 'ld'];\n\n                                //find the index of the element that marks the beginning of the draft text, and the point up to which we should assume everything is header information and remove all elements\n                                let beginningOfTextParagraphIndex = -1;\n                                let loopIdx = 0;\n                                do {\n                                    beginningOfTextParagraphIndex = [...content].findIndex(p => p.classList && p.classList[0] === beginningOfTextParagraphClassesInPriorityOrder[loopIdx]);\n                                    loopIdx++;\n                                } while (loopIdx < beginningOfTextParagraphClassesInPriorityOrder.length && beginningOfTextParagraphIndex === -1);\n\n                                //if we didn't find any start per the logic above, the index will still be -1, and this loop will not run and hence no elements will be removed\n                                //if we did find a starting index for the actual draft text, loop through the lines up to that point and remove the elements (i.e. header pieces)\n                                //Added a carveout to prevent removal of sections including \"Whereas\" that sometimes appear above the enactment statement\n                                let indexTracker = 0;\n                                for (let i = 0; i < beginningOfTextParagraphIndex; i++) {\n                                    //remove existing header (index 0 below rather than the variable 'i' since we are removing indexes of variable 'content' as we loop) \n                                    if (!content[indexTracker].innerHTML.includes(\"Whereas\") && content[indexTracker].classList[0] === \"section\") {\n                                        doc.removeChild(content[indexTracker]);\n                                    } else {\n                                        indexTracker++;\n                                    }\n                                }\n\n                                //Sometimes we end up with stray ldtitles at the top of the text. Remove that.\n                                if (content[0].className === \"ldtitle\") {\n                                    doc.removeChild(content[0])\n                                }\n\n                                newDraftText = doc.innerHTML;\n                            }\n\n                            //update draftTextCopy and now attach the new headers for introduced versions\n                            if (newDraftText != undefined) {\n                                draftTextCopy = (billText.LegislationVersion === \"Introduced\" ? headers : \"\") + newDraftText\n                            }\n                        }\n                    }).catch(e => {\n                        console.log(e)\n                        draftTextCopy = `<p class=\"message-error\">${typeof e === 'object' && !Array.isArray ? JSON.parse(e).Name || \"Unknown Error\" : e}</p>`;\n                        headerError = true;\n                    })\n            } else {\n                draftTextCopy = billText.DraftText\n            }\n\n            Promise.all([jsonPromise])\n                .finally(() => {\n                    this.setState(state => ({\n                        headerError,\n                        gettingEditData: false,\n                        isEditing: !state.isEditing,\n                        draftTextCopy\n                    }), () => {\n                        if (cb) cb();\n                    });\n                })\n        })\n    }\n\n    getJsonHeadersRequestString(legislationTextId, sessionID, sessionCode) {\n        //note we pass in a continuedToSessionCode all the time, even if it's not a continued bill and the sessionID/continuedToSessionCode represent the same session - in this case, it still works as expected so it's fine to pass both in\n        let jsonHeadersRequestString = \"?legislationTextID=\" + legislationTextId + \"&sessionID=\" + sessionID + \"&continuedToSessionCode=\" + sessionCode + \"&onlyHeader=true\";\n\n        return jsonHeadersRequestString\n    }\n\n    createNewAmendment() {\n        this.setState(state => ({\n            billText: {\n                ...state.billText,\n                VersionDate: new Date(),\n            }\n        }), () => {\n            this.saveText()\n        });\n    }\n\n    saveText(cb) {\n        if (!this.validateData()) {\n            return;\n        }\n        this.setState({ isSaving: true });\n        let billText = { ...this.state.billText };\n        //Try to find the draft title in the text and set it\n        let searchForLDTitleContainer = document.createElement('div');\n        searchForLDTitleContainer.innerHTML = this.state.draftTextCopy;\n        //The first element in the content with this class is the draft title\n        let draftLDTitle = searchForLDTitleContainer.querySelector('.ldtitle');\n        if (draftLDTitle && draftLDTitle.innerHTML !== '') {\n            billText.DraftTitle = draftLDTitle.innerHTML;\n            billText.EditTitle = draftLDTitle.innerHTML;\n        }\n\n        //Remove any tags TinyMCE may have added when pasting from Word (Borrow ldtitle container doc)\n        //Also remove any stranded spans with class \"bracket\"\n        searchForLDTitleContainer.childNodes.forEach(node => {\n            if (node.nodeName !== \"#text\") {\n                node.removeAttribute('data-mce-fragment');\n                if (node.childNodes.length > 0) {\n                    node.childNodes.forEach(childNode => {\n                        if (childNode.nodeName !== \"#text\") {\n                            childNode.removeAttribute('data-mce-fragment');\n                        }\n                        if (childNode.classList && childNode.classList.contains(\"bracket\") && ![\"[\", \"]\"].includes(childNode.innerText.trim())) {\n                            childNode.classList.remove(\"bracket\")\n                        }\n                        if (childNode.childNodes.length > 0) {\n                            childNode.childNodes.forEach(grandchildNode => {\n                                if (grandchildNode.nodeName !== \"#text\") {\n                                    grandchildNode.removeAttribute('data-mce-fragment');\n                                }\n                                if (grandchildNode.classList && grandchildNode.classList.contains(\"bracket\") && ![\"[\", \"]\"].includes(grandchildNode.innerText.trim())) {\n                                    grandchildNode.classList.remove(\"bracket\")\n                                }\n                                if (grandchildNode.childNodes.length > 0) {\n                                    grandchildNode.childNodes.forEach(greatGrandchildNode => {\n                                        if (greatGrandchildNode.nodeName !== \"#text\") {\n                                            greatGrandchildNode.removeAttribute('data-mce-fragment');\n                                        }\n                                        if (greatGrandchildNode.classList && greatGrandchildNode.classList.contains(\"bracket\") && ![\"[\", \"]\"].includes(greatGrandchildNode.innerText.trim())) {\n                                            greatGrandchildNode.classList.remove(\"bracket\")\n                                        }\n                                    })\n                                }\n                            })\n                        }\n\n                    })\n                }\n            }\n        });\n\n        billText.DraftText = searchForLDTitleContainer.innerHTML;\n\n        //Clear DocumentCode on amendment create. Setting this is handled in the DB\n        if (window.location.pathname.includes('new-amendment')) {\n            billText.DocumentCode = null;\n        }\n\n        if ([\"Chaptered\", \"Gov Recommendation\", \"Veto Explanation\"].includes(billText.LegislationVersion)) {\n            delete billText.ChamberCode;\n        } else if ([\"Introduced\", \"Reengrossed\", \"Engrossed\", \"Reenrolled\", \"Enrolled\"].includes(billText.LegislationVersion)) {\n            billText.ChamberCode = this.props.match.params.billnumber[0].toUpperCase();\n        } else if (billText.Sponsor && billText.Sponsor.toLowerCase() === \"member\" && billText.Patrons && billText.Patrons[0]) {\n            billText.ChamberCode = this.state.memberOptions.find(x => x.value.MemberID === billText.Patrons[0].MemberID).value.ChamberCode\n        } else if (billText.Sponsor && billText.Sponsor.toLowerCase() === \"committee\" && billText.CommitteeID) {\n            billText.ChamberCode = this.state.committeeOptions.find(x => x.value.CommitteeID === billText.CommitteeID) ? this.state.committeeOptions.find(x => x.value.CommitteeID === billText.CommitteeID).value.ChamberCode : billText.ChamberCode = this.state.subcommitteeOptions.find(x => x.value.CommitteeID === billText.CommitteeID).value.ChamberCode;\n        }\n\n        let jsonPromise = Promise.resolve();\n        if (JSON.stringify(this.state.patronList) !== JSON.stringify(this.state.originalPatronList)) {\n            jsonPromise = this.props.actions.savePatrons({ patrons: this.state.patronList });\n        }\n\n        delete billText.DraftTextFromJson;\n\n        if (this.state.billData) {\n            billText.LegislationClassID = this.state.billData.LegislationClassID;\n            billText.LegislationClass = this.state.billData.LegislationClass;\n        }\n\n        jsonPromise.then(() => {\n            this.props.actions.saveBillText({ TextsList: [billText] })\n                .then(() => {\n                    if (window.location.pathname.includes('new-amendment')) {\n                        if (this.state.billText.ChamberCode === \"H\" && this.state.selectedSponsor.value == \"Member\") {\n                            this.props.actions.saveIhodAmendment('?jvisa=7C936b138d2b6c3766Eb1cD5F84C6lRhG3JwWgvUWW&'\n                                + 'session=' + this.props.session.selectedSession.SessionCode\n                                + '&bill_num=' + this.state.billText.LegislationNumber\n                                + '&mem_key=' + this.state.selectedMember.value.MemberNumber\n                                + '&file_name=' + this.state.billText.LegislationNumber + '-' + this.state.selectedMember.value.MemberNumber + '.htm'\n                                + '&ld_num=' + this.props.bills.billTextSave[0].DocumentCode)\n                        }\n\n                        if (this.props.bills.billTextSave[0]) {\n                            billText.LegislationTextID = this.props.bills.billTextSave[0].LegislationTextID;\n                            billText.LegislationVersionID = this.props.bills.billTextSave[0].LegislationVersionID;\n                        }\n                    }\n\n                    let documentCodeChanged = false;\n                    if (this.props.bills.billTextSave[0]) {\n                        //Use document code that was constructed and returned from database\n                        documentCodeChanged = billText.DocumentCode !== this.props.bills.billTextSave[0].DocumentCode;\n                        billText.DocumentCode = this.props.bills.billTextSave[0].DocumentCode;\n                    }\n\n                    //Create the new pdf version of the bill \n                    const legFileGenParams = \"?legislationID=\" + billText.LegislationID\n                        + \"&legislationTextID=\" + billText.LegislationTextID\n                        + \"&legislationVersionID=\" + billText.LegislationVersionID\n                        + \"&sessionID=\" + this.state.selectedSession.SessionID;\n                    this.props.actions.genBillFile(legFileGenParams)\n                        .then(() => {\n                            this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n                            this.setState({\n                                isEditing: false,\n                                isSaving: false,\n                                isDirty: false,\n                                initialPass: 0\n                            });\n                            if (window.location.pathname.includes('new-amendment') || (billText.TextDisposition !== \"Removed\" && documentCodeChanged)) {\n                                const sessionCode = this.props.match.params.sessionCode;\n                                this.props.history.push(`/bill-details/${sessionCode}/${billText.LegislationNumber}/text/${billText.DocumentCode}`)\n                            } else if (billText.TextDisposition === \"Removed\") {\n                                const sessionCode = this.props.match.params.sessionCode;\n                                this.props.history.push(`/bill-details/${sessionCode}/${billText.LegislationNumber}`);\n                                return;\n                            }\n                            if (cb)\n                                cb();\n                            else\n                                this.getData();\n                        })\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.error(err)\n                    this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                    this.setState({\n                        isSaving: false\n                    });\n                });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            console.error(err)\n            this.props.actions.makeToast([{ message: \"Failed to update patrons\", type: \"failure\" }]);\n            this.setState({\n                isSaving: false\n            });\n        })\n    }\n\n    validateData() {\n        let valid = true;\n        const billText = this.state.billText;\n        let focused = false;\n\n        if (!billText.TextDisposition && !billText.TextDispositionID && billText.LegislationVersion !== \"Introduced\") {\n            this.setState({ textDispositionError: \"Please select a text disposition.\" });\n            console.error(\"No text disposition provided.\");\n            this.dispositionRef?.current?.focus();\n            focused = true;\n            valid = false;\n        }\n        if ([\"Amendment\", \"Substitute\"].includes(billText.LegislationVersion) && !billText.Sponsor) {\n            this.setState({ sponsorError: \"Please select a sponsor.\" });\n            console.error(\"No sponsor provided.\");\n            if (!focused) { this.sponsorRef?.current?.focus(); focused = true; }\n            valid = false;\n        }\n        if (billText.Sponsor && billText.Sponsor.toLowerCase() === \"member\" && !billText.Patrons) {\n            this.setState({ memberError: \"Please select a member.\" });\n            console.error(\"No member provided.\");\n            if (!focused) { this.memberRef?.current?.focus(); focused = true; }\n            valid = false;\n        }\n        if (billText.Sponsor && billText.Sponsor.toLowerCase() === \"committee\" && !billText.CommitteeID) {\n            this.setState({ committeeError: \"Please select a committee.\" });\n            console.error(\"No committee provided.\");\n            if (!focused) { this.committeeRef?.current?.focus(); focused = true; }\n            valid = false;\n        }\n        if (!this.state.draftTextCopy) {\n            this.setState({ draftTextError: \"Please provide draft text.\" });\n            console.error(\"No draft text provided.\");\n            valid = false;\n        }\n\n        if (valid) {\n            this.setState({\n                textDispositionError: \"\",\n                sponsorError: \"\",\n                memberError: \"\",\n                committeeError: \"\",\n                draftTextError: \"\"\n            })\n        }\n\n        return valid;\n    }\n\n    handleBillDispositionChange(val) {\n        this.setState(state => ({\n            billText: {\n                ...state.billText,\n                TextDisposition: val ? val.Name : null,\n                TextDispositionID: val ? val.TextDispositionID : null\n            }\n        }));\n    }\n\n    toggleHighlight() {\n        this.setState({\n            highlight: !this.state.highlight\n        })\n    }\n\n    highlightText(keywordsFromQueryString) {\n        var markInstance = new Mark(document.querySelector(\".mark-context\"));\n        if (this.props.location.state && this.props.location.state.selectedKeywords) {\n            this.props.location.state.selectedKeywords.forEach(keyword => {\n                const asteriskSearch = keyword.endsWith(\"*\");\n                const options = {\n                    separateWordSearch: false, //If phrase searching, only mark instances of the entire phrase together; i.e. 'availability of funds' do not mark every individual instance of 'availability' 'of' and 'funds'\n                    accuracy: {\n                        ///\"partially\": When searching for \"lor\" only \"lor\" inside \"lorem\" will be marked\n                        ///\"complementary\": When searching for \"lor\" the whole word \"lorem\" will be marked\n                        ///\"exactly\": When searching for \"lor\" only those exact words with a word boundary will be marked. In this example nothing inside \"lorem\".\n                        value: asteriskSearch ? \"complementary\" : \"exactly\", //When searching for \"of\" only those exact words with a word boundary will be marked. In this example nothing inside \"offered\".\n                        limiters: [\",\", \".\", \"?\", \"!\", \"-\", \";\", \"\\\"\", \"'\", \"`\", \"%\", \"$\", \"@\", \"*\", \"(\", \")\", \"[\", \"]\", \"/\"] //highlight also the above 'exact' words that are also followed by punctuation marks; without this 'availability of funds.' (ending with period) will not be marked when searching 'availability of funds' (no period)\n                    }\n                };\n                const mark = asteriskSearch ? keyword.substring(0, keyword.length - 1) : keyword;\n                markInstance.mark(mark, options);\n                if (document.getElementsByTagName(\"mark\").length) {\n                    this.setState({ showMarkHelp: true, showNextMarkHelp: \"Scroll to First\" });\n                }\n            });\n        }\n        if (keywordsFromQueryString) {\n            const selectedKeywords = keywordsFromQueryString.split(\" \");\n            selectedKeywords.forEach(keyword => markInstance.mark(keyword))\n            // Remove keywords from url\n            this.props.history.push(this.props.location.pathname);\n        }\n    };\n\n    navToKeywordHit(dir) {\n        const currentIdx = this.state.markHelpIndex ?? -1;\n        const elements = [...document.getElementsByTagName(\"mark\")];\n        const numElements = elements.length;\n        let scrollElement;\n        if (numElements > 0) {\n            if (dir === NEXT && currentIdx + 1 <= numElements) {\n                scrollElement = elements[currentIdx + 1];\n            } else if (dir === PREVIOUS && currentIdx >= 1) {\n                scrollElement = elements[currentIdx - 1];\n            }\n\n            if (scrollElement) {\n                scrollElement.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n                const newIndex = dir === NEXT ? currentIdx + 1 : currentIdx - 1;\n                this.setState({ markHelpIndex: newIndex, showNextMarkHelp: newIndex !== numElements - 1 ? \"Next\" : false });\n            }\n        }\n    }\n\n    membersCallback(memberList) {\n        let members = [];\n        let houseMembers = [];\n        let senateMembers = [];\n\n        memberList.map((member) => {\n            members.push({ text: member.MemberDisplayName, value: member })\n\n            if (member.ChamberCode === \"H\") {\n                houseMembers.push({ text: member.MemberDisplayName, value: member })\n            } else {\n                senateMembers.push({ text: member.MemberDisplayName, value: member })\n            }\n        })\n\n        this.setState({\n            memberOptions: members,\n            houseMemberOptions: houseMembers,\n            senateMemberOptions: senateMembers,\n            selectedMember: this.state.billText.Patrons && this.state.billText.Patrons.length > 0 ? members.find(x => x.value.MemberID === this.state.billText.Patrons[0].MemberID) : undefined\n        })\n    }\n\n    committeesCallback(committeeList) {\n        let committeeOptions = [];\n        let subcommitteeOptions = [];\n\n        committeeList.map((committee, i) => {\n            if (committee.ParentCommitteeID) {\n                subcommitteeOptions.push({ text: committee.Name + \" (\" + committee.ChamberCode + \")\", value: committee })\n            } else {\n                committeeOptions.push({ text: committee.Name + \" (\" + committee.ChamberCode + \")\", value: committee })\n            }\n        })\n\n        this.setState({\n            committeeOptions: committeeOptions,\n            subcommitteeOptions: subcommitteeOptions,\n            selectedCommittee: this.state.billText.CommitteeID ? committeeOptions.find(x => x.value.CommitteeID === this.state.billText.CommitteeID) : undefined\n        })\n    }\n\n    handleParamChange(value, state, init) {\n        //Always reset description if a description param is changed\n        let billText = { ...this.state.billText };\n        billText.Description = null;\n\n        //If the sponsor is changed reset the selected member and committee in case those have been set previously\n        if (state === \"selectedSponsor\") {\n            billText.Sponsor = value.value;\n            delete billText.SponsorTypeID;\n            delete billText.Patrons;\n            delete billText.CommitteeID;\n            delete billText.CommitteeName;\n\n            this.setState(state => ({\n                selectedMember: undefined,\n                selectedCommittee: undefined\n            }));\n        }\n\n        if (state === \"selectedMember\") {\n            billText.Patrons = [value.value];\n        }\n\n        if (state === \"selectedCommittee\") {\n            billText.CommitteeName = value.value.Name\n            billText.CommitteeID = value.value.CommitteeID\n        }\n\n        this.setState({\n            [state]: value,\n            billText: billText,\n            isDirty: init ? false : true\n        })\n    }\n\n    handleIsActiveChange() {\n        let billText = { ...this.state.billText };\n        billText.IsActive = !billText.IsActive;\n        this.setState({ billText });\n    }\n\n    handleIsPublicChange() {\n        let billText = { ...this.state.billText };\n        billText.IsPublic = !billText.IsPublic;\n        this.setState({ billText });\n    }\n\n    toggleTooltip() {\n        this.setState({\n            showTooltip: !this.state.showTooltip\n        })\n    }\n\n    isLdIncluded(draftText, LDNumber) {\n        //Discovers if the LD number is present in the file's DraftTextJSON or the text's DraftText, and sets a state value to hide displaying a duplicate LD Number if true\n        if (typeof draftText === \"string\") {\n            const ldRegex = new RegExp(`<p class=['\"]?(ld|ldtitle)['\"]?>${LDNumber}<\\/p>`);\n            if (ldRegex.test(draftText)) {\n                this.setState({\n                    hideLDNumber: true\n                })\n            }\n        } else {\n            for (let i = 0; i < draftText.Content.length; i++) {\n                if (draftText.Content[i].Content && draftText.Content[i].Content.includes(LDNumber))\n                    this.setState({\n                        hideLDNumber: true\n                    })\n            }\n        }\n    }\n\n    getData() {\n        this.setState({\n            isLoaded: false\n        });\n        const documentNumber = this.props.match.params.documentcode;\n        const billNumber = this.props.match.params.billnumber;\n        const sessionCode = parseInt(this.props.match.params.sessionCode, 10);\n        if (sessionCode > 0 && documentNumber && billNumber) {\n            let partner = false;\n            //Only use the partner endpoint if the user looking at the bill text is authorized to edit it\n            if (this.props.login.userClaims.resources.find(resource => resource === VERSION_AUTHOR)) {\n                partner = true;\n                this.props.actions.getLegislationDispositions()\n                    .catch(err => {\n                        if (err === 'Aborted') {\n                            return\n                        }\n                    });\n            }\n            this.setState({\n                sponsorOptions: this.props.login.userClaims.roles.find(x => x === \"Admin\") && !window.location.pathname.includes('new-amendment') ? [{ value: \"Committee\", label: \"Committee\" }, { value: \"Member\", label: \"Member\" }, { value: \"Conference\", label: \"Conference\" }, { value: \"Governor\", label: \"Governor\" }] : [{ value: \"Committee\", label: \"Committee\" }, { value: \"Member\", label: \"Member\" }]\n            })\n            //Get the session information for the header using the session in the url\n            this.props.actions.getSessionByCode(sessionCode).then(() => {\n                this.setState({ selectedSession: this.props.session.selectedSession })\n                const params = {\n                    SessionCode: sessionCode,\n                    LegislationNumbers: [{ LegislationNumber: billNumber }],\n                };\n                if (window.location.pathname.includes('new-amendment')) {\n                    // This is a new amendment\n                    // Get the bill information for creation of a new amendment\n                    this.props.actions.getBillList(params).then(() => {\n                        if (this.props.bills.billList[0]) {\n                            this.setState({\n                                isLoaded: true,\n                                isEditing: true,\n                                billText: {\n                                    LegislationVersionID: 8,\n                                    LegislationVersion: \"Amendment\",\n                                    LegislationID: this.props.bills.billList[0].LegislationID,\n                                    LegislationNumber: this.props.bills.billList[0].LegislationNumber,\n                                    ChamberCode: this.props.bills.billList[0].ChamberCode,\n                                    Description: \"Amendment\",\n                                    DLSPrepared: false,\n                                    SessionCode: this.props.session.selectedSession.SessionCode,\n                                    SessionYear: this.props.session.selectedSession.SessionYear,\n                                    IsActive: true,\n                                    IsPublic: false,\n                                    TextDisposition: this.props.bills.legislationDispositions[this.props.bills.legislationDispositions.findIndex(dispo => dispo.Name === \"Offered\")].Name,\n                                    TextDispositionID: this.props.bills.legislationDispositions[this.props.bills.legislationDispositions.findIndex(dispo => dispo.Name === \"Offered\")].TextDispositionID\n                                },\n                            });\n\n                            //default to member as sponsor\n                            this.handleParamChange(this.state.sponsorOptions.find(x => x.value === \"Member\"), \"selectedSponsor\", true);\n                        } else {\n                            throw \"Bill data not found\"\n                        }\n                    }).catch(err => {\n                        if (err === \"Aborted\") {\n                            return;\n                        }\n                        this.setState({\n                            message: err.toString(),\n                            isLoaded: true\n                        })\n                    });\n                } else {\n                    this.props.actions.getBillText(`?isPublic=${!partner}&sessionCode=${sessionCode}&documentNumber=${documentNumber}`, partner)\n                        .then(() => {\n                            //Make sure the text is actually there\n                            if (this.props.bills.billText.length !== 1 || !this.props.bills.billText[0].DraftText) {\n                                throw (\"Legislation text not found\")\n                            }\n                            let billText = this.props.bills.billText[0];\n                            //Get the session information for the header dates in tinymce using the text's session\n                            this.props.actions.getSessionById(billText.SessionID, false).then(() => {\n                                this.setState({ versionSession: this.props.session.selectedSession })\n                                const params = {\n                                    SessionCode: sessionCode,\n                                    LegislationNumbers: [{ LegislationNumber: billNumber }],\n                                };\n\n                                if (billText && [\"Introduced\", \"Enrolled\", \"Chaptered\", \"Substitute\"].includes(billText.LegislationVersion)) {\n                                    if (this.props.login.userClaims.resources.includes(\"LegislationText\")) {\n                                        this.props.actions.getBillManagementList(\"?LegislationID=\" + billText.LegislationID + \"&LegislationVersionID=\" + billText.LegislationVersionID + \"&SessionID=\" + billText.SessionID + \"&IsComplete=true\").then(() => {\n                                            if (this.props.bills.billManagementList[0]) {\n                                                this.setState({ billData: this.props.bills.billManagementList[0] }, () => {\n                                                    this.getPatronTypes(this.state.billData.ChamberCode);\n                                                    this.getMemberList(this.state.billData.SessionID);\n                                                    this.getPatrons(this.state.billData.LegislationID, this.state.billData.ChamberCode);\n                                                })\n                                            } else {\n                                                throw \"Bill data not found\"\n                                            }\n                                        }).catch(err => {\n                                            if (err === \"Aborted\") {\n                                                return;\n                                            }\n                                            this.setState({\n                                                message: err.toString(),\n                                                isLoaded: true\n                                            })\n                                        });\n                                    } else {\n                                        this.props.actions.getBillList(params).then(() => {\n                                            if (this.props.bills.billList[0]) {\n                                                this.setState({ billData: this.props.bills.billList[0] }, () => {\n                                                    this.getPatronTypes(this.state.billData.ChamberCode);\n                                                    this.getMemberList(this.state.billData.SessionID);\n                                                    this.getPatrons(this.state.billData.LegislationID, this.state.billData.ChamberCode);\n                                                })\n                                            } else {\n                                                throw \"Bill data not found\"\n                                            }\n                                        }).catch(err => {\n                                            if (err === \"Aborted\") {\n                                                return;\n                                            }\n                                            this.setState({\n                                                message: err.toString(),\n                                                isLoaded: true\n                                            })\n                                        });\n                                    }\n                                }\n                                billText.originalTextDisposition = billText.TextDisposition;\n                                // Try to get the json file. This contains some extra info like prefiled date\n                                let jsonPromise;\n                                if (billText.JSONFile && billText.JSONFile.length > 0) {\n                                    jsonPromise = this.props.actions.getFile(billText.JSONFile[0].FileURL)\n                                        .then(() => {\n                                            const file = JSON.parse(this.props.nav.file);\n                                            billText.OfferedDate = file.OfferedDate;\n                                            billText.PrefileDate = file.PrefileDate;\n                                            billText.ReferredCommittee = file.ReferredCommittee;\n                                            billText.Chamber = file.Chamber.toUpperCase();\n                                            billText.LegislationType = file.LegislationType.toUpperCase();\n                                            if (file.DraftTextJSON) {\n                                                billText.DraftTextFromJson = getJsx(file.DraftTextJSON);\n                                                this.isLdIncluded(file.DraftTextJSON, billText.LDNumber);\n                                            } else {\n                                                this.isLdIncluded(billText.DraftText, billText.LDNumber)\n                                            }\n                                            billText.jsonFileFound = true;\n                                        })\n                                } else {\n                                    this.isLdIncluded(billText.DraftText, billText.LDNumber)\n                                }\n                                Promise.all([jsonPromise])\n                                    .finally(() => {\n                                        this.setState({\n                                            isLoaded: true,\n                                            billText: billText,\n                                            selectedSponsor: billText.Sponsor ? this.state.sponsorOptions.find(x => x.value === billText.Sponsor) : \"\"\n                                        }, () => {\n                                            const parsed = queryString.parse(this.props.location.search)\n                                            if (this.props.location.state || parsed.keywords) {\n                                                this.highlightText(parsed.keywords);\n                                            }\n                                            if (billText.LegislationVersion === \"Introduced\" && this.props.location.state && this.props.location.state.patronUpdate && this.props.login.userClaims.claims.find(claim => claim.RoleName === \"Admin\" || (claim.Resource === PATRON_AUTHOR && claim.Scope === (billNumber[0]?.toUpperCase() === \"H\" ? \"House\" : \"Senate\")))) {\n                                                this.toggleEditContent(this.togglePatronModal)\n                                            }\n\n                                        })\n                                    })\n                            }).catch(err => {\n                                if (err === \"Aborted\") {\n                                    return;\n                                }\n                                this.setState({\n                                    message: err.toString(),\n                                    isLoaded: true\n                                })\n                            });\n                        }).catch(err => {\n                            if (err === 'Aborted') {\n                                return;\n                            }\n                            this.setState({\n                                message: err.toString(),\n                                isLoaded: true\n                            })\n                        });\n                }\n            }).catch(err => {\n                if (err === \"Aborted\") {\n                    return;\n                }\n                this.setState({\n                    message: err.toString(),\n                    isLoaded: true\n                })\n            });\n        } else {\n            this.setState({\n                message: \"Failed to get session or version\"\n            });\n        }\n    }\n\n    applyPassageDates(housePassage, senatePassage) {\n        let passageDates = \"\";\n        //Add the passage dates if they exist in the data but aren't in the DraftText yet - add both chambers for joint resolutions, or just the originating chamber for normal resolutions\n        if (this.state.billText.ChamberCode === \"H\") {\n            passageDates = this.state.billData.HousePassageDate && this.state.billData.HousePassageDate != \"\" && !housePassage ? passageDates + \"<p class='house-passage' style='text-align: center; margin: 0'>Agreed to by the House of Delegates, \" + moment(this.state.billData.HousePassageDate).format(\"LL\") + \"</p>\" : passageDates;\n            if (this.state.billData.LegislationTypeCode === \"J\") {\n                passageDates = this.state.billData.SenatePassageDate && this.state.billData.SenatePassageDate != \"\" && !senatePassage ? passageDates + \"<p class='senate-passage' style='text-align: center; margin: 0'>Agreed to by the Senate, \" + moment(this.state.billData.SenatePassageDate).format(\"LL\") + \"</p><p></p>\" : passageDates;\n            } else {\n                passageDates = passageDates + \"<p></p>\";\n            }\n        } else {\n            passageDates = this.state.billData.SenatePassageDate && this.state.billData.SenatePassageDate != \"\" && !senatePassage ? passageDates + \"<p class='senate-passage' style='text-align: center; margin: 0'>Agreed to by the Senate, \" + moment(this.state.billData.SenatePassageDate).format(\"LL\") + \"</p>\" : passageDates;\n            if (this.state.billData.LegislationTypeCode === \"J\") {\n                passageDates = this.state.billData.HousePassageDate && this.state.billData.HousePassageDate != \"\" && !housePassage ? passageDates + \"<p class='house-passage' style='text-align: center; margin: 0'>Agreed to by the House of Delegates, \" + moment(this.state.billData.HousePassageDate).format(\"LL\") + \"</p><p></p>\" : passageDates;\n            } else {\n                passageDates = passageDates + \"<p></p>\";\n            }\n        }\n\n        return passageDates;\n    }\n\n    triggerDownload(filename, htmlDoc) {\n        let downloadLink = document.createElement('a');\n        downloadLink.setAttribute('href', 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(`<html>` + htmlDoc.innerHTML + `</html>`));\n        downloadLink.setAttribute('download', filename);\n\n        downloadLink.style.display = 'none';\n        document.body.appendChild(downloadLink);\n        downloadLink.click();\n\n        document.body.removeChild(downloadLink);\n    }\n\n    passageCheck(docParagraphs) {\n        let housePassage = false;\n        let senatePassage = false;\n\n        for (let i = 0; i < docParagraphs.length; i++) {\n            if (docParagraphs[i].innerText.includes(\"Agreed to by the House\")) {\n                housePassage = true;\n            }\n\n            if (docParagraphs[i].innerText.includes(\"Agreed to by the Senate\")) {\n                senatePassage = true;\n            }\n        }\n\n        return { housePassage: housePassage, senatePassage: senatePassage };\n    }\n\n    downloadWordFile() {\n        const filename = this.state.billText.DocumentCode + \".doc\";\n        let htmlDoc = document.createElement('div');\n        let passageDates = '';\n\n        //Substitute declarations        \n        let doc = document.createElement('div');\n        doc.insertAdjacentHTML(\"afterbegin\", this.state.billText.DraftText);\n        let docParagraphs = doc.getElementsByTagName('p');\n        let prevClass = \"\";\n\n        if (this.state.billText.LegislationVersion !== \"Substitute\") {\n            let params = '?legislationTextID=' + this.state.billText.LegislationTextID +\n                '&sessionID=' + this.state.billText.SessionID +\n                '&LegislationVersionID=' + this.state.billText.LegislationVersionID +\n                '&onlyHeader=' + false +\n                \"&isPresentationCopy=\" + true;\n            if ([\"Introduced\"].includes(this.state.billText.LegislationVersion)) {\n                params += '&overrideLegislationVersion=Enrolled';\n            }\n            this.props.actions.getHtmlFilePreview(params)\n                .then(() => {\n                    const html = `<html>\n                    <head><meta charset=\"UTF-8\"></head>\n                    <body>${this.props.bills.htmlFilePreview}</body>\n                </html>`;\n\n                    htmlDoc.insertAdjacentHTML(\"afterbegin\", html);\n                    let passage = this.passageCheck(htmlDoc.getElementsByTagName(\"p\"))\n                    passageDates = this.applyPassageDates(passage.housePassage, passage.senatePassage);\n\n                    let ldtitle = htmlDoc.querySelector(\".ldtitle\");\n                    if (ldtitle) {\n                        ldtitle.insertAdjacentHTML(\"afterend\", passageDates);\n                    }\n\n                    this.triggerDownload(filename, htmlDoc);\n                })\n        } else if (this.state.billData.LegislationTypeCode === \"B\") {\n            let passage = this.passageCheck(docParagraphs);\n            passageDates = this.applyPassageDates(passage.housePassage, passage.senatePassage);\n\n            for (let j = 0; j < docParagraphs.length; j++) {\n                if (j == 2) {\n                    let insertText = this.props.session.sessionList.find(x => x.SessionID === this.state.billData.SessionID).SessionType === \"Regular\"\n                        ? this.props.session.sessionList.find(x => x.SessionID === this.state.billData.SessionID).SessionYear\n                        + \" \"\n                        + this.props.session.sessionList.find(x => x.SessionID === this.state.billData.SessionID).SessionType\n                        + \" Session\"\n                        : this.props.session.sessionList.find(x => x.SessionID === this.state.billData.SessionID).SessionYear + \" \" + this.props.session.sessionList.find(x => x.SessionID === this.state.billData.SessionID).DisplayName\n                    htmlDoc.insertAdjacentHTML(\"beforeend\", \"<p style='\" + inlineStyles.find(x => x.class == \"center\").value + \"'>\" + insertText + \"</p>\");\n                    htmlDoc.insertAdjacentHTML(\"beforeend\", \"<p style='\" + inlineStyles.find(x => x.class == \"center\").value + \"'>Virginia Acts of Assembly - Chapter</p>\");\n                }\n                if (!['pro', 'patronLine', 'patctr', 'ld', 'textctr', \"center\"].includes(docParagraphs[j].className)) {\n                    //If we're after the session, billno, etc. and the next paragraph is the enacting statement then add ldtitle and passage dates then proceed\n                    if (prevClass === \"center\" && docParagraphs[j].className === \"enactstm\") {\n                        htmlDoc.insertAdjacentHTML(\"beforeend\", \"<p style='\" + inlineStyles.find(x => x.class == \"ldtitle\").value + \"'>\" + this.state.billText.DraftTitle + \"</p>\");\n                        htmlDoc.insertAdjacentHTML(\"beforeend\", passageDates);\n                    }\n\n                    //Insert every remaining paragraph unless it's a center following a pro because that indicates a line wrap of the pro containing the introduced date\n                    if (!(docParagraphs[j].className === \"center\" && docParagraphs[j - 1] && docParagraphs[j - 1].className === \"pro\") && !docParagraphs[j].innerText.includes(\"SUBSTITUTE\")) {\n                        docParagraphs[j].style = inlineStyles.find(x => x.class === docParagraphs[j].className) ? inlineStyles.find(x => x.class === docParagraphs[j].className).value : \"\";\n                        htmlDoc.insertAdjacentHTML(\"beforeend\", docParagraphs[j].outerHTML);\n                    }\n\n                    prevClass = docParagraphs[j].className;\n                }\n            }\n\n            let ldtitle = htmlDoc.querySelector(\".ldtitle\");\n            if (ldtitle) {\n                ldtitle.insertAdjacentHTML(\"afterend\", passageDates);\n            }\n            this.triggerDownload(filename, htmlDoc);\n        } else {\n            let passage = this.passageCheck(docParagraphs)\n            passageDates = this.applyPassageDates(passage.housePassage, passage.senatePassage);\n\n            for (let j = 0; j < docParagraphs.length; j++) {\n                if (!['pro', 'patronLine', 'patctr', 'textbl', 'ld', 'textctr'].includes(docParagraphs[j].className)) {\n                    //If we're after the session, billno, etc. and the next paragraph is the enacting statement then add ldtitle and passage dates then proceed\n                    if (prevClass === \"center\" && docParagraphs[j].className === \"enactstm\") {\n                        htmlDoc.insertAdjacentHTML(\"beforeend\", \"<p style='\" + inlineStyles.find(x => x.class == \"ldtitle\").value + \"'>\" + this.state.billText.DraftTitle + \"</p>\");\n                        htmlDoc.insertAdjacentHTML(\"beforeend\", passageDates);\n                    }\n\n                    //Insert every remaining paragraph unless it's a center following a pro because that indicates a line wrap of the pro containing the introduced date\n                    if (!(docParagraphs[j].className === \"center\" && docParagraphs[j - 1] && docParagraphs[j - 1].className === \"pro\") && !docParagraphs[j].innerText.includes(\"SUBSTITUTE\")) {\n                        docParagraphs[j].style = inlineStyles.find(x => x.class === docParagraphs[j].className) ? inlineStyles.find(x => x.class === docParagraphs[j].className).value : \"\";\n                        htmlDoc.insertAdjacentHTML(\"beforeend\", docParagraphs[j].outerHTML);\n                    }\n\n                    prevClass = docParagraphs[j].className;\n                }\n            }\n\n            let ldtitle = htmlDoc.querySelector(\".ldtitle\");\n            if (ldtitle) {\n                ldtitle.insertAdjacentHTML(\"afterend\", passageDates);\n            }\n            this.triggerDownload(filename, htmlDoc);\n        }\n    }\n\n    // RETRIEVE PATRON TYPES\n    getPatronTypes(chamberCode) {\n        this.props.actions.getPatronRoles()\n            .then(() => {\n                let patronTypes = [...this.props.patrons.patronRoles];\n                patronTypes = patronTypes.filter(pt => ['Chief Patron', 'Chief Co-Patron', 'Co-Patron'].includes(pt.Name) || (chamberCode === 'S' && pt.Name === 'Incorporated Chief Co-Patron'))\n                patronTypes.sort((a, b) => a.PatronTypeID - b.PatronTypeID);\n                this.setState({\n                    patronTypes\n                }, () => {\n                    if (this.state.patronTypes.find(pt => pt.Name === \"Co-Patron\") && (!this.state.newPatron?.length || !this.state.newPatron[this.state.newPatron.length - 1].Name)) {\n                        this.handleNewPatronChange('PatronType', this.state.patronTypes.find(pt => pt.Name === \"Co-Patron\"));\n                    }\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err)\n            });\n    }\n\n    // RETRIEVE PATRONS FOR A BILL\n    getPatrons(billID, chamberCode) {\n        this.props.actions.getPatronList(billID).then(() => {\n            let senatePatronsList = this.props.patrons.senatePatronsList;\n            let housePatronsList = this.props.patrons.housePatronsList;\n            let chiefPatronsList = this.props.patrons.chiefPatronsList;\n            let patronList = this.props.patrons.patronList;\n            let originalPatronList = this.props.patrons.patronList;\n            if (chamberCode === 'H' && chiefPatronsList && chiefPatronsList.length > 1) {\n                for (let i = 1; i < chiefPatronsList.length; i++) {\n                    if (chiefPatronsList[i].ChamberCode === 'S') {\n                        senatePatronsList.unshift(chiefPatronsList[i]);\n                    } else {\n                        housePatronsList.unshift(chiefPatronsList[i]);\n                    }\n                    chiefPatronsList.splice(i, 1);\n                    i--;\n                }\n            }\n\n            patronList.sort((a, b) =>\n                Number(Boolean(a.RemoveDate)) - Number(Boolean(b.RemoveDate))\n                || (a.PatronTypeID === 1 && b.PatronTypeID === 2\n                    ? -1\n                    : a.PatronTypeID === 1 && b.PatronTypeID === 3\n                        ? -1\n                        : a.PatronTypeID === 1 && b.PatronTypeID === 4\n                            ? -1\n                            : a.PatronTypeID === 2 && b.PatronTypeID === 1\n                                ? 1\n                                : a.PatronTypeID === 2 && b.PatronTypeID === 3\n                                    ? 1\n                                    : a.PatronTypeID === 2 && b.PatronTypeID === 4\n                                        ? -1\n                                        : a.PatronTypeID === 3 && b.PatronTypeID === 1\n                                            ? 1\n                                            : a.PatronTypeID === 3 && b.PatronTypeID === 2\n                                                ? -1\n                                                : a.PatronTypeID === 3 && b.PatronTypeID === 4\n                                                    ? -1\n                                                    : a.PatronTypeID === 4 && b.PatronTypeID !== 4\n                                                        ? 1\n                                                        : 0\n                ) //https://i.imgur.com/rwYykLz.png\n                || a.PatronDisplayName.localeCompare(b.PatronDisplayName)\n                || a.Sequence - b.Sequence\n            )\n\n            housePatronsList.sort((a, b) => Number(Boolean(a.RemoveDate)) - Number(Boolean(b.RemoveDate)) || a.PatronTypeID - b.PatronTypeID || a.Sequence - b.Sequence || a.PatronDisplayName.localeCompare(b.PatronDisplayName));\n            senatePatronsList.sort((a, b) => Number(Boolean(a.RemoveDate)) - Number(Boolean(b.RemoveDate)) || a.PatronTypeID - b.PatronTypeID || a.Sequence - b.Sequence || a.PatronDisplayName.localeCompare(b.PatronDisplayName));\n\n            this.setState({\n                senatePatronsList,\n                housePatronsList,\n                chiefPatronsList,\n                patronList,\n                originalPatronList,\n                patronIsLoaded: true\n            })\n        })\n    }\n\n    // RETRIEVE MEMBER LIST FOR THE BILL'S SESSION\n    getMemberList(sessionID) {\n        let params = 'isPublic=false&sessionID=' + sessionID;\n        this.props.actions.getMemberList(params)\n            .then(() => {\n                let memberList = [...this.props.members.memberList];\n                memberList.forEach(patron => {\n                    patron.label = patron.PatronDisplayName + ' ' + '(' + patron.ChamberCode + ')';\n                    patron.value = patron.MemberID;\n                });\n                memberList.sort((a, b) => a.ChamberCode !== b.ChamberCode && a.ChamberCode === this.state.billData.ChamberCode ? -1 : 0)\n                this.setState({\n                    memberList\n                });\n            });\n    }\n\n    togglePatronModal() {\n        this.setState({\n            showPatronModal: !this.state.showPatronModal\n        }, () => {\n            if (this.state.showPatronModal) {\n                //set the patrons prior to edit (different than originalPatronList in the event that they update multiple times) in order to reset in case they cancel\n                this.setState({ patronListBeforeEdit: this.state.patronList })\n            }\n        })\n    }\n\n    updatePatrons() {\n        this.setState({ savingPatrons: true }, () => {\n            //Make call to save the patrons -- even if this is the same list as original, because they may have changed it and now are reverting\n            this.savePatrons(() => {\n                this.saveText(() => {\n                    this.setState({ savingPatrons: false }, () => {\n                        this.props.history.push({\n                            pathname: `/bill-details/${this.state.billText.SessionCode}/${this.state.billText.LegislationNumber}`,\n                            state: { expandPatrons: true }\n                        })\n                    })\n                });\n            });\n        })\n    }\n\n    savePatrons(cb) {\n        let draftTextCopy = this.state.draftTextCopy;\n        let doc = document.createElement('div');\n        doc.insertAdjacentHTML(\"afterbegin\", draftTextCopy);\n        let currentPatronLineElement = doc.querySelector('.patctr, .patalt, .patronLine, .billpatron');\n        if (currentPatronLineElement) {\n            const currChamber = this.state.billData.ChamberCode;\n            let patronInfo = \"\";\n            let patronsSameChamber = true;\n            let multiplePatrons = false;\n            const patrons = [...this.state.patronList].filter(p => !p.RemoveDate);\n            patrons.forEach((p) => {\n                if (patronsSameChamber && p.ChamberCode != currChamber) {\n                    patronsSameChamber = false;\n                }\n            });\n            let patronList = null;\n            let i = 0;\n            if (patronsSameChamber) {\n                i = 0;\n                patronList = patrons.sort((a, b) => a.PatronTypeID - b.PatronTypeID || a.Sequence - b.Sequence || a.PatronDisplayName.localeCompare(b.PatronDisplayName))\n                patronList.forEach(patron => {\n                    //check and see if this patron is on the other chamber\n                    if (patronsSameChamber && patron.ChamberCode != currChamber) {\n                        patronsSameChamber = false;\n                    }\n                    if (i != 0 && i == patronList.length - 1) {\n                        patronInfo += \" and \";\n                        multiplePatrons = true;\n                    }\n                    else if (i > 0) {\n                        patronInfo += \", \";\n                        multiplePatrons = true;\n                    }\n                    i++;\n                    patronInfo += PatronDisplayInfo(patron);\n                })\n            }\n            else {\n                //current chamber patron info\n                i = 0;\n                patronList = patrons.filter(p => p.ChamberCode === currChamber).sort((a, b) => a.PatronTypeID - b.PatronTypeID || a.Sequence - b.Sequence || a.PatronDisplayName.localeCompare(b.PatronDisplayName))\n                patronList.forEach(patron => {\n                    if (i != 0 && i == patronList.length - 1) {\n                        patronInfo += \" and \";\n                        multiplePatrons = true;\n                    }\n                    else if (i > 0) {\n                        patronInfo += \", \";\n                        multiplePatrons = true;\n                    }\n                    i++;\n                    patronInfo += PatronDisplayInfo(patron);\n                })\n                patronInfo += \"; \";\n                if (currChamber == \"S\") {\n                    patronInfo += \"Delegate\";\n                }\n                else {\n                    patronInfo += \"Senator\";\n                }\n                //other chamber patron info\n                i = 0;\n                patronList = patrons.filter(p => p.ChamberCode !== currChamber).sort((a, b) => a.PatronTypeID - b.PatronTypeID || a.Sequence - b.Sequence || a.PatronDisplayName.localeCompare(b.PatronDisplayName))\n                if (patronList.length > 1) {\n                    patronInfo += \"s: \"; //multiple from the other chamber; append \"s\"\n                } else {\n                    patronInfo += \": \"; //just one from the other chamber; don't append \"s\"\n                }\n                patronList.forEach(patron => {\n                    if (i !== 0 && i === patronList.length - 1) {\n                        patronInfo += \" and \";\n                        multiplePatrons = true;\n                    }\n                    else if (i > 0) {\n                        patronInfo += \", \";\n                        multiplePatrons = true;\n                    }\n                    i++;\n                    patronInfo += PatronDisplayInfo(patron);\n                })\n            }\n            const patronagePrefix = multiplePatrons ? \"Patrons- \" : \"Patron- \";\n            const newPatronLine = patronagePrefix + patronInfo;\n            currentPatronLineElement.textContent = newPatronLine;\n            this.setState({ draftTextCopy: doc.innerHTML }, () => {\n                if (cb) cb();\n            })\n        } else {\n            //There's no patron line in the introduced text, so we couldn't update it. But the patrons themselves will still be resequenced\n            this.props.actions.makeToast([{ message: \"Could not find patron line to update within draft text\", type: \"failure\", long: true }]);\n        }\n    }\n\n    onDragEnd(result) {\n        if (!result.destination) {\n            return;\n        }\n\n        let patronList = JSON.parse(JSON.stringify(this.state.patronList));\n        if (patronList[result.source.index].PatronTypeID !== patronList[result.destination.index].PatronTypeID) {\n            this.props.actions.makeToast([{ message: \"You may only reorder patrons of the same patron type\", type: \"warning\", long: true }]);\n            return;\n        }\n        if (patronList.findIndex(a => a.RemoveDate) > -1 && result.destination.index >= patronList.findIndex(a => a.RemoveDate)) {\n            alert(\"You cannot set active patrons after removed patrons.\");\n            return;\n        }\n        let [removed] = patronList.splice(result.source.index, 1);\n\n        patronList.splice(result.destination.index, 0, removed);\n\n        patronList.sort((a, b) =>\n            Number(Boolean(a.RemoveDate)) - Number(Boolean(b.RemoveDate))\n            || (a.PatronTypeID === 1 && b.PatronTypeID === 2\n                ? -1\n                : a.PatronTypeID === 1 && b.PatronTypeID === 3\n                    ? -1\n                    : a.PatronTypeID === 1 && b.PatronTypeID === 4\n                        ? -1\n                        : a.PatronTypeID === 2 && b.PatronTypeID === 1\n                            ? 1\n                            : a.PatronTypeID === 2 && b.PatronTypeID === 3\n                                ? 1\n                                : a.PatronTypeID === 2 && b.PatronTypeID === 4\n                                    ? -1\n                                    : a.PatronTypeID === 3 && b.PatronTypeID === 1\n                                        ? 1\n                                        : a.PatronTypeID === 3 && b.PatronTypeID === 2\n                                            ? -1\n                                            : a.PatronTypeID === 3 && b.PatronTypeID === 4\n                                                ? -1\n                                                : a.PatronTypeID === 4 && b.PatronTypeID !== 4\n                                                    ? 1\n                                                    : 0\n            ) //https://i.imgur.com/rwYykLz.png\n            || a.PatronDisplayName.localeCompare(b.PatronDisplayName)\n            || a.Sequence - b.Sequence\n        )\n\n        patronList.forEach((x, index) => {\n            x.Sequence = index + 1\n        });\n\n        this.setState({\n            patronList\n        })\n    }\n\n    togglePatron(patron) {\n        let patronList = JSON.parse(JSON.stringify(this.state.patronList));\n        let associatedPatron = patronList.find(p => p.MemberID === patron.MemberID);\n        if (associatedPatron) {\n            if (associatedPatron.RemoveDate) {\n                const sequence = this.calculatePatronSequence(associatedPatron);\n                for (let i = 0; i < patronList.length; i++) {\n                    const p = patronList[i];\n                    if (p.PatronDisplayName === associatedPatron.PatronDisplayName) {\n                        patronList.splice(i, 1);\n                        i--;\n                        continue;\n                    }\n                    if (!p.RemoveDate && p.Sequence >= sequence) {\n                        p.Sequence = i + 2;\n                    } else if (!p.RemoveDate && p.Sequence < sequence) {\n                        p.Sequence = i + 1;\n                    } else {\n                        continue;\n                    }\n                };\n                associatedPatron.Sequence = sequence;\n                patronList.push(associatedPatron);\n                associatedPatron.RemoveDate = null;\n            } else {\n                associatedPatron.RemoveDate = moment().format(\"L\");\n                associatedPatron.ByRequest = false;\n                associatedPatron.IsIntroducing = false;\n                patronList.forEach(p => {\n                    if (!p.RemoveDate && p.Sequence > associatedPatron.Sequence) {\n                        p.Sequence--;\n                    }\n                });\n                associatedPatron.Sequence = null;\n            }\n        }\n        patronList.sort((a, b) => Number(Boolean(a.RemoveDate)) - Number(Boolean(b.RemoveDate)) || a.PatronTypeID - b.PatronTypeID || a.Sequence - b.Sequence || a.PatronDisplayName.localeCompare(b.PatronDisplayName))\n\n        if (!patronList.find(x => !x.RemoveDate && x.PatronTypeID === 1)) {\n            this.props.actions.makeToast([{ message: \"There must be a Chief Patron.\", type: \"failure\" }])\n            return;\n        }\n\n        this.setState({ patronList });\n    }\n\n    handlePatronChange(patron, state, val) {\n        let patronList = JSON.parse(JSON.stringify(this.state.patronList));\n        let associatedPatron = patronList.find(p => p.MemberID === patron.MemberID);\n        if (associatedPatron) {\n            if (state === 'PatronType') {\n                associatedPatron.PatronTypeID = val ? val.PatronTypeID : null;\n                associatedPatron.DisplayName = val ? val.DisplayName : null;\n                associatedPatron.Name = val ? val.Name : null;\n            } else if (state === 'IsIntroducing' || state === 'ByRequest') {\n                associatedPatron[state] = !associatedPatron[state];\n            } else {\n                associatedPatron[state] = val;\n            }\n        }\n\n        if (!patronList.find(x => !x.RemoveDate && x.PatronTypeID === 1)) {\n            this.props.actions.makeToast([{ message: \"There must be a Chief Patron.\", type: \"failure\" }])\n            return;\n        }\n\n        if (associatedPatron) {\n            const sequence = this.calculatePatronSequence(associatedPatron);\n            for (let i = 0; i < patronList.length; i++) {\n                const p = patronList[i];\n                if (p.PatronDisplayName === associatedPatron.PatronDisplayName) {\n                    patronList.splice(i, 1);\n                    i--;\n                    continue;\n                }\n                if (!p.RemoveDate && (p.Sequence > sequence || (sequence < associatedPatron.Sequence && p.Sequence === sequence))) {\n                    p.Sequence = i + 2;\n                } else if (!p.RemoveDate && (p.Sequence < sequence || (sequence > associatedPatron.Sequence && p.Sequence === sequence))) {\n                    p.Sequence = i + 1;\n                } else {\n                    continue;\n                }\n            };\n            associatedPatron.Sequence = sequence;\n            patronList.push(associatedPatron);\n        }\n\n        patronList.sort((a, b) => Number(Boolean(a.RemoveDate)) - Number(Boolean(b.RemoveDate)) || a.PatronTypeID - b.PatronTypeID || a.Sequence - b.Sequence || a.PatronDisplayName.localeCompare(b.PatronDisplayName))\n\n        this.setState({ patronList });\n    }\n\n    handleNewPatronChange(state, val, behavior) {\n        let newPatron = [...this.state.newPatron];\n        if (state === 'Patron') {\n            if (behavior && behavior.action) {\n                switch (behavior.action) {\n                    case 'select-option':\n                        let addedPatron = behavior.option;\n                        if (addedPatron.ChamberCode === 'H' && addedPatron.Name === \"Incorporated Chief Co-Patron\") {\n                            addedPatron.Name = null;\n                            addedPatron.DisplayName = null;\n                            addedPatron.PatronTypeID = null;\n                        }\n                        newPatron.push({\n                            ByRequest: false,\n                            IsIntroducing: false,\n                            PatronDisplayName: addedPatron.PatronDisplayName,\n                            MemberID: addedPatron.MemberID,\n                            ChamberCode: addedPatron.ChamberCode,\n                            LegislationID: this.state.billData.LegislationID,\n                            DisplayName: newPatron[0].DisplayName,\n                            Name: newPatron[0].Name,\n                            PatronTypeID: newPatron[0].PatronTypeID\n                        })\n                        newPatron = newPatron.filter(p => p.MemberID);\n                        break;\n                    case 'remove-value':\n                        const removedPatron = behavior.removedValue;\n                        const index = newPatron.findIndex(p => p.MemberID === removedPatron.MemberID);\n                        newPatron.splice(index, 1);\n                        if (!newPatron.length) {\n                            this.resetPatrons(removedPatron.Name);\n                            return;\n                        }\n                        break;\n                    case 'clear':\n                        this.resetPatrons(newPatron[0].Name);\n                        return;\n                }\n            }\n        } else if (state === 'PatronType') {\n            newPatron.forEach(p => {\n                p.PatronTypeID = val ? val.PatronTypeID : null;\n                p.DisplayName = val ? val.DisplayName : null;\n                p.Name = val ? val.Name : null;\n            })\n        }\n\n        this.setState({ newPatron });\n    }\n\n    resetPatrons(keepPatronType) {\n        this.setState({ newPatron: [{}] }, () => {\n            if (this.state.patronTypes.find(pt => pt.Name === \"Co-Patron\")) {\n                this.handleNewPatronChange('PatronType', this.state.patronTypes.find(pt => pt.Name === (keepPatronType || \"Co-Patron\")));\n            }\n        })\n    }\n\n    addNewPatron() {\n        let newPatron = [...this.state.newPatron];\n        let patronList = JSON.parse(JSON.stringify(this.state.patronList));\n\n        newPatron.forEach(patron => {\n            patron.PatronDate = moment().format(\"L\");\n\n            const sequence = this.calculatePatronSequence(patron);\n            for (let i = 0; i < patronList.length; i++) {\n                const p = patronList[i];\n                if (!p.RemoveDate && p.Sequence >= sequence) {\n                    p.Sequence = i + 2;\n                } else if (!p.RemoveDate && p.Sequence < sequence) {\n                    p.Sequence = i + 1;\n                } else {\n                    continue;\n                }\n            };\n            patron.Sequence = sequence;\n            patronList.push(patron);\n        });\n        patronList.sort((a, b) =>\n            Number(Boolean(a.RemoveDate)) - Number(Boolean(b.RemoveDate))\n            || (a.PatronTypeID === 1 && b.PatronTypeID === 2\n                ? -1\n                : a.PatronTypeID === 1 && b.PatronTypeID === 3\n                    ? -1\n                    : a.PatronTypeID === 1 && b.PatronTypeID === 4\n                        ? -1\n                        : a.PatronTypeID === 2 && b.PatronTypeID === 1\n                            ? 1\n                            : a.PatronTypeID === 2 && b.PatronTypeID === 3\n                                ? 1\n                                : a.PatronTypeID === 2 && b.PatronTypeID === 4\n                                    ? -1\n                                    : a.PatronTypeID === 3 && b.PatronTypeID === 1\n                                        ? 1\n                                        : a.PatronTypeID === 3 && b.PatronTypeID === 2\n                                            ? -1\n                                            : a.PatronTypeID === 3 && b.PatronTypeID === 4\n                                                ? -1\n                                                : a.PatronTypeID === 4 && b.PatronTypeID !== 4\n                                                    ? 1\n                                                    : 0\n            ) //https://i.imgur.com/rwYykLz.png\n            || a.PatronDisplayName.localeCompare(b.PatronDisplayName)\n            || a.Sequence - b.Sequence\n        )\n\n        for (let i = 0; i < patronList.length; i++) {\n            let patron = { ...patronList[i] };\n            patron.Sequence = i + 1;\n            patronList.splice(i, 1, patron);\n        }\n\n        this.setState({ patronList }, () => {\n            this.resetPatrons();\n        });\n    }\n\n    calculatePatronSequence(patron) {\n        let patronList = JSON.parse(JSON.stringify(this.state.patronList));\n        const currentSeq = patron.Sequence;\n\n        //look first by chamber, if none found, then go out of chamber\n        let existingPatronOfSameType = patronList.findLast(p => p.PatronDisplayName !== patron.PatronDisplayName && !p.RemoveDate && p.PatronTypeID === patron.PatronTypeID && p.ChamberCode === patron.ChamberCode);\n        if (!existingPatronOfSameType) {\n            existingPatronOfSameType = patronList.findLast(p => p.PatronDisplayName !== patron.PatronDisplayName && !p.RemoveDate && p.PatronTypeID === patron.PatronTypeID);\n        }\n        if (existingPatronOfSameType && existingPatronOfSameType.Sequence) {\n            return currentSeq && existingPatronOfSameType.Sequence > currentSeq ? existingPatronOfSameType.Sequence : existingPatronOfSameType.Sequence + 1;\n        } else {\n            const existingPatronOfHigherPriority = patronList.findLast(p => p.PatronDisplayName !== patron.PatronDisplayName && !p.RemoveDate && p.PatronTypeID < patron.PatronTypeID);\n            if (existingPatronOfHigherPriority && existingPatronOfHigherPriority.Sequence) {\n                return currentSeq && existingPatronOfHigherPriority.Sequence > currentSeq ? existingPatronOfHigherPriority.Sequence : existingPatronOfHigherPriority.Sequence + 1;\n            } else {\n                return 1;\n            }\n        }\n    }\n\n    handleVersionDateChange(value) {\n        let billText = { ...this.state.billText };\n        billText.VersionDate = moment(value).startOf('day');\n\n        let draftTextCopy = this.state.draftTextCopy;\n        draftTextCopy = draftTextCopy.replace(/<p class=\"center\">\\s*on.+<\\/p>/, '<p class=\"center\">on ' + value.format(\"LL\") + ')</p>');\n\n        this.setState({ billText, draftTextCopy })\n    }\n\n    componentDidMount() {\n        window.scrollTo(0, 0);\n        this.getData();\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { message, isLoaded, isEditing, draftTextCopy, billText, highlight, senatePatronsList, housePatronsList, chiefPatronsList, patronList, selectedSession, versionSession } = this.state;\n        const session = selectedSession;\n        const sessionHeader = session ? session.SessionYear + \" \" + session.DisplayName : '';\n        const getPatronText = patronArray => {\n            const senators = patronArray.filter(p => p.ChamberCode === \"S\");\n            const delegates = patronArray.filter(p => p.ChamberCode === \"H\");\n            let finishedText = \"\";\n            if (billText.ChamberCode === \"S\") {\n                finishedText = senators.map(m => m.PatronDisplayName).join();\n                if (delegates.length > 0) {\n                    finishedText += \"; \" + (delegates.length === 1 ? \"Delegate: \" : \"Delegates: \");\n                    finishedText += delegates.map(m => m.PatronDisplayName).join();\n                }\n            }\n            if (billText.ChamberCode === \"H\") {\n                finishedText = delegates.map(m => m.PatronDisplayName).join();\n                if (senators.length > 0) {\n                    finishedText += \"; \" + (senators.length === 1 ? \"Senator: \" : \"Senators: \");\n                    finishedText += senators.map(m => m.PatronDisplayName).join();\n\n                }\n            }\n            return finishedText;\n\n        }\n        if (message) {\n            return (<p>{message}</p>);\n        }\n        const fetchingPatronage = (this.props.location.state && this.props.location.state.patronUpdate && (!this.state.patronTypes || !this.state.memberList || !this.state.patronIsLoaded));\n        if (!isLoaded || fetchingPatronage) {\n            return (<div className=\"center-spinner spinner\">{fetchingPatronage ? 'Loading...' : 'Loading Results...'}</div>)\n        }\n        if (isEditing || this.state.gettingEditData) {\n            const disableSponsor = !this.props.login.userClaims.roles.find(x => x === \"Admin\") && !window.location.pathname.includes('new-amendment');\n\n            return (\n                this.state.gettingEditData ?\n                    <div className=\"center-spinner spinner\">{this.props.location.state && this.props.location.state.patronUpdate ? 'Loading...' : 'Loading Results...'}</div>\n                    :\n                    <div className=\"dlas-forms\">\n                        {this.state.showPatronModal &&\n                            <UpdatePatronageModal history={this.props.history} billText={this.state.billText} savingPatrons={this.state.savingPatrons} newPatron={this.state.newPatron} onDragEnd={this.onDragEnd} patronTypes={this.state.patronTypes} handlePatronChange={this.handlePatronChange} handleNewPatronChange={this.handleNewPatronChange} addNewPatron={this.addNewPatron} togglePatron={this.togglePatron} patronList={patronList} memberList={this.state.memberList} updatePatrons={this.updatePatrons} />\n                        }\n                        <div className={this.state.showPatronModal ? 'd-none' : ''}>\n                            <div>\n                                <h2>{sessionHeader} {this.state.billText.OnReconvene && \" - Reconvened\"}</h2>\n                                <h3><Link to={`/bill-details/${selectedSession.SessionCode}/${this.props.match.params.billnumber}`}>{this.props.match.params.billnumber}</Link></h3>\n                                {!window.location.pathname.includes('new-amendment') &&\n                                    <button type=\"button\" className=\"button-link\" onClick={() => this.toggleEditContent()}>Cancel</button>\n                                }\n                                <div className={`inner-grid ${billText.LegislationVersion === \"Substitute\" ? 'half-one-one-one-half' : 'four'}`}>\n                                    {billText.LegislationVersion === \"Substitute\" &&\n                                        <div>\n                                            <label className=\"label small-text\">Proposed On</label>\n                                            <DatePicker\n                                                name=\"proposed-on\"\n                                                id=\"version-date-datepicker\"\n                                                selected={billText.VersionDate ? moment(billText.VersionDate) : null}\n                                                onChange={this.handleVersionDateChange}\n                                            />\n                                        </div>\n                                    }\n                                    <div>\n                                        <label className=\"label small-text\">Text Disposition</label>\n                                        <Select\n                                            options={this.props.bills.legislationDispositions ? this.props.bills.legislationDispositions.filter(d => ![\"Amendment\", \"Substitute\"].includes(billText.LegislationVersion) || ![\"Offered\", \"Reported\"].includes(billText.originalTextDisposition) ? d.Name !== \"Removed\" : true) : []}\n                                            getOptionLabel={opt => opt.Name}\n                                            getOptionValue={opt => opt.TextDispositionID}\n                                            isClearable={true}\n                                            onChange={this.handleBillDispositionChange}\n                                            ref={this.dispositionRef}\n                                            value={this.props.bills.legislationDispositions.find(dispo => dispo.Name === billText.TextDisposition)}\n                                            isDisabled={!this.props.login.userClaims.roles.find(x => x === \"Admin\")}\n                                        />\n                                        {this.state.textDispositionError && !billText.TextDisposition && <span className=\"input-feedback\" style={{ fontSize: '12px' }}>{this.state.textDispositionError}</span>}\n                                    </div>\n                                    {[\"Amendment\", \"Substitute\"].includes(billText.LegislationVersion) &&\n                                        <>\n                                            <div>\n                                                <label className=\"label small-text\">Sponsor</label>\n                                                <Select\n                                                    isDisabled={disableSponsor}\n                                                    options={this.state.sponsorOptions}\n                                                    onChange={(e) => this.handleParamChange(e, \"selectedSponsor\")}\n                                                    getOptionLabel={(option) => option.label}\n                                                    value={this.state.selectedSponsor}\n                                                    ref={this.sponsorRef}\n                                                    placeholder={\"Select...\"}\n                                                />\n                                                {this.state.sponsorError && !billText.Sponsor && <span className=\"input-feedback\" style={{ fontSize: '12px' }}>{this.state.sponsorError}</span>}\n                                            </div>\n                                            {this.state.selectedSponsor &&\n                                                this.state.selectedSponsor.value &&\n                                                this.state.selectedSponsor.value === \"Member\" &&\n                                                <div>\n                                                    <label className=\"label small-text\">Member</label>\n                                                    <Select\n                                                        options={this.props.login.userClaims.roles.find(x => x === \"Admin\")\n                                                            ? this.state.memberOptions\n                                                            : this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseLegislationTextAuthor\")\n                                                                ? this.state.houseMemberOptions\n                                                                : this.state.senateMemberOptions\n                                                        }\n                                                        isDisabled={disableSponsor}\n                                                        onChange={(e) => this.handleParamChange(e, \"selectedMember\")}\n                                                        getOptionLabel={(option) => option.text}\n                                                        value={this.state.selectedMember}\n                                                        ref={this.memberRef}\n                                                        placeholder={\"Select...\"}\n                                                    />\n                                                    {this.state.memberError && !billText.Patrons && <span className=\"input-feedback\" style={{ fontSize: '12px' }}>{this.state.memberError}</span>}\n                                                </div>}\n                                            {this.state.selectedSponsor &&\n                                                this.state.selectedSponsor.value === \"Committee\" &&\n                                                <div>\n                                                    <label className=\"label small-text\">Committee</label>\n                                                    <Select\n                                                        options={this.props.login.userClaims.roles.find(x => x === \"Admin\")\n                                                            ? this.state.committeeOptions\n                                                            : this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseLegislationTextAuthor\")\n                                                                ? this.state.committeeOptions.filter(x => x.value.ChamberCode === \"H\")\n                                                                : this.state.committeeOptions.filter(x => x.value.ChamberCode === \"S\")\n                                                        }\n                                                        isDisabled={disableSponsor}\n                                                        onChange={(e) => this.handleParamChange(e, \"selectedCommittee\")}\n                                                        getOptionLabel={(option) => option.text}\n                                                        value={this.state.selectedCommittee}\n                                                        ref={this.committeeRef}\n                                                        placeholder={\"Select...\"}\n                                                    />\n                                                    {this.state.committeeError && !billText.CommitteeName && <span className=\"input-feedback\" style={{ fontSize: '12px' }}>{this.state.committeeError}</span>}\n                                                </div>}\n                                        </>\n                                    }\n                                    {(this.props.login.userClaims.roles.find(x => x === \"Admin\") || billText.LegislationVersion === \"Amendment\") && /*admin can change IsActive/IsPublic on any version, other users of this page (LegislationText resource) can only change this on amendments*/\n                                        <div className=\"inner-grid two\">\n                                            <div>\n                                                <label className=\"label small-text\">Is Viable</label>\n                                                <a onClick={(e) => { e.stopPropagation(e); this.toggleTooltip() }} className=\"button info\">Info</a>\n                                                {this.state.showTooltip &&\n                                                    <div className=\"info-box red-edit-tooltip\">\n                                                        <p>Caution, only change this for reconsiderations.</p>\n                                                    </div>\n                                                }\n                                                <div onClick={this.handleIsActiveChange} className=\"toggle-switch\" style={{ display: 'block' }}>\n                                                    <input id=\"sr-status-change\" checked={billText.IsActive} type=\"checkbox\" />\n                                                    <span className=\"slider\"></span>\n                                                </div>\n                                            </div>\n                                            <div>\n                                                <label className=\"label small-text\">Is Public</label>\n                                                <div onClick={this.handleIsPublicChange} className=\"toggle-switch\" style={{ display: 'block' }}>\n                                                    <input id=\"sr-status-change\" checked={billText.IsPublic} type=\"checkbox\" />\n                                                    <span className=\"slider\"></span>\n                                                </div>\n                                            </div>\n                                        </div>\n                                    }\n                                </div>\n                            </div>\n                            <br />\n                            <Prompt\n                                when={this.state.isDirty}\n                                message={`You have unsaved changes. Are you sure you would like to leave?`}\n                            />\n                            <ReviewSection\n                                editorContent={draftTextCopy}\n                                handleEditorChange={this.handleEditorChange}\n                                sessionId={session.SessionID}\n                                height={1000}\n                                membersCallback={this.membersCallback}\n                                committeesCallback={this.committeesCallback}\n                                allowAmendmentActions={![\"Amendment\", \"Gov Recommendation\"].includes(this.state.billText.LegislationVersion) && !window.location.pathname.includes('new-amendment') ? false : true}\n                                overrideRemoveCreateAmendmentButton={this.state.billText.LegislationVersion === \"Gov Recommendation\"}\n                                userChamber={this.props.login.userClaims.roles.find((x) => x === \"Admin\") ? \"Admin\" : this.props.login.userClaims.roles.find((x) => x === \"HouseLegislationAuthor\") ? \"H\" : \"S\"}\n                                billNumber={this.props.match.params.billnumber}\n                                selectedSponsor={this.state.selectedSponsor}\n                                selectedMember={this.state.selectedMember}\n                                selectedCommittee={this.state.selectedCommittee}\n                                setWasEmpty={this.setWasEmpty}\n                                wasEmpty={this.state.wasEmpty}\n                                setReplaced={this.setReplaced}\n                                replaced={this.state.replaced}\n                            />\n                            {this.state.draftTextError && !draftTextCopy && <span className=\"input-feedback\" style={{ fontSize: '15px' }}>{this.state.draftTextError}</span>}\n                            <div className=\"button-bar\">\n                                <div>\n                                    {!window.location.pathname.includes('new-amendment') &&\n                                        <button disabled={this.state.isSaving} type=\"button\" onClick={() => this.toggleEditContent()} className=\"button secondary\">Cancel</button>\n                                    }\n                                </div>\n                                <div className=\"align-right\">\n                                    {window.location.pathname.includes('new-amendment') ?\n                                        <button disabled={this.state.isSaving} type=\"button\" onClick={this.createNewAmendment} className=\"button\">{this.state.isSaving ? \"Creating...\" : \"Create\"}</button>\n                                        :\n                                        <div className=\"flex-row flex-vertical-center flex-end\">\n                                            {![\"Amendment\", \"Gov Recommendation\", \"Veto Explanation\", \"Conference Report\"].includes(billText.LegislationVersion) &&\n                                                <React.Fragment>\n                                                    <div className=\"toggle-switch\" onClick={this.toggleReprint}>\n                                                        <input id=\"official-reprint-button\" checked={this.state.billText.IsReprint} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                                        <span className=\"slider\"></span>\n                                                    </div>\n                                                    <label htmlFor=\"official-reprint-button\" className=\"checkbox-label no-background\" style={{ whiteSpace: \"no-wrap\", marginTop: '0px', fontSize: '14px' }}>Mark As Official Reprint</label>\n                                                </React.Fragment>\n                                            }\n                                            <button disabled={this.state.isSaving || this.state.headerError} type=\"button\" onClick={() => this.saveText()} className=\"button\">{this.state.isSaving ? \"Saving...\" : this.props.bills.billText && this.props.bills.billText.length && this.props.bills.billText[0].IsPublic && billText.IsPublic ? \"Republish\" : billText.IsPublic ? \"Publish\" : \"Save\"}</button>\n                                        </div>\n                                    }\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n            );\n        }\n        const MarkHelpBar = (\n            <div className=\"floating-button-bar inline-list mark-help\">\n                {this.state.markHelpIndex > 0 && <button className=\"button\" type=\"button\" onClick={() => this.navToKeywordHit(PREVIOUS)}>Previous Keyword Hit</button>}\n                {this.state.showNextMarkHelp && <button className=\"button\" type=\"button\" onClick={() => this.navToKeywordHit(NEXT)}>{this.state.showNextMarkHelp} Keyword Hit</button>}\n            </div>\n        )\n\n        return (\n            <div>\n                <div className=\"flex-row\">\n                    <div>\n                        <h2>{sessionHeader} {this.state.billText.OnReconvene && \" - Reconvened\"}</h2>\n                        <h3><Link to={`/bill-details/${selectedSession.SessionCode}/${billText.LegislationNumber}`}>{billText.LegislationNumber}</Link></h3>\n                        {billText.CommitteeID && <h3><Link to={`/session-details/${selectedSession.SessionCode}/committee-information/${billText.CommitteeNumber}/committee-details`}>{billText.CommitteeName}</Link></h3>}\n                        {this.props.login.userClaims.resources.find(resource => resource === VERSION_AUTHOR) &&\n                            <button type=\"button\" className=\"button-link red-edit\" onClick={() => this.toggleEditContent()}>Edit</button>\n                        }\n                        <br />\n                        {billText && billText.LegislationNumber && ![\"Conference Report\", \"Amendment\", \"Gov Recommendation\"].includes(billText.LegislationVersion) && (billText.LegislationNumber.includes(\"HB\") || billText.LegislationNumber.includes(\"SB\")) ?\n                            <div className=\"flex-row flex-vertical-center flex-start\">\n                                <div className=\"toggle-switch\" onClick={() => this.toggleHighlight()}>\n                                    <input id=\"highlight-checkbox\" checked={highlight} type=\"checkbox\" style={{ width: \"auto\" }} />\n                                    <span className=\"slider\"></span>\n                                </div>\n                                <label htmlFor=\"highlight-checkbox\" className=\"checkbox-label no-background\">Highlight Proposed Changes</label>\n                            </div>\n                            :\n                            null\n                        }\n                    </div>\n                    <div>\n                        {this.props.login.userClaims.resources.includes(\"LegislationText\")\n                            && (([\"Introduced\", \"Enrolled\"].includes(this.state.billText.LegislationVersion) && this.state.billData && [\"J\", \"R\"].includes(this.state.billData.LegislationTypeCode))\n                                || (this.state.billText.LegislationVersion === \"Chaptered\" && this.state.billData && this.state.billData.LegislationTypeCode === \"B\")\n                                || (this.state.billText.LegislationVersion === \"Substitute\" && this.state.billData)) &&\n                            <button type=\"button\" onClick={this.downloadWordFile} className=\"button-link with-icon\"><span className=\"icon word\"></span>Presentation Copy</button>\n                        }\n                        {billText && billText.PDFFile && billText.PDFFile[0].FileURL &&\n                            <a href={billText.PDFFile[0].FileURL} target=\"_blank\" rel=\"noreferrer\" className=\"button pdf\"> PDF</a>\n                        }\n                        <ReactToPrint\n                            trigger={() => <button type=\"button\" className=\"button print\"> Print</button>}\n                            content={() => this.componentRef}\n                            pageStyle={\"break-inside: avoid\"}\n                        />\n                    </div>\n                </div>\n                <br />\n                <div ref={el => (this.componentRef = el)}>\n                    {!this.state.hideLDNumber && [\"Introduced\", \"Engrossed\", \"Reengrossed\"].includes(billText.LegislationVersion) &&\n                        <div>\n                            {billText.LDNumber}\n                        </div>\n                    }\n                    {/* The draft text from json contains everything. Including the header. So just show that if it exists */}\n                    {billText.DraftTextFromJson ?\n                        <div className={highlight === true ? \"highlight mark-context\" : \"mark-context\"}>\n                            {this.state.showMarkHelp && MarkHelpBar}\n                            {billText.DraftTextFromJson}\n                        </div>\n                        :\n                        <>\n                            {billText.jsonFileFound &&\n                                <div className=\"center\">\n                                    <strong>{billText.Chamber} {billText.LegislationType} NO. {billText.LegislationNumber.replace(/\\D/g, '')}</strong>\n                                    <div>{billText.PrefileDate && <>Offered {moment(billText.OfferedDate).format(\"MMMM D, YYYY\")}</>}</div>\n                                    <div>{billText.OfferedDate && <>Prefiled {moment(billText.PrefileDate).format(\"MMMM D, YYYY\")}</>}</div>\n                                    <div>{billText.DraftTitle ? renderHTML(billText.DraftTitle) : ''}</div>\n                                    <hr />\n                                    <div>Patron&mdash;{getPatronText(billText.Patrons)}</div>\n                                    <hr />\n                                    <div>{billText.ReferredCommittee\n                                        && billText.ReferredCommittee === \"Judiciary\"\n                                        ? <>Referred to Committee on the {billText.ReferredCommittee}</>\n                                        : billText.ReferredCommittee === \"Courts of Justice\"\n                                            ? <>Referred to Committee for {billText.ReferredCommittee}</>\n                                            : <>Referred to Committee on {billText.ReferredCommittee}</>\n                                    }</div>\n                                    <hr />\n                                </div>\n                            }\n                            <div className={highlight === true ? \"highlight mark-context\" : \"mark-context\"}>\n                                {this.state.showMarkHelp && MarkHelpBar}\n                                {billText ? renderHTML(billText.DraftText || '') : ''}\n                            </div>\n                        </>\n                    }\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { bills, session, login, patrons, members, nav } = state;\n        return {\n            bills,\n            session,\n            login,\n            patrons,\n            members,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators, patronActionCreators, sessionActionCreators, authActionCreators, memberActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(FullText)\n","export const Button = ({\n    icons,\n    input,\n    children,\n    disabled,\n    className,\n    style,\n    onClick,\n    ...props\n}) => {\n    return (\n        <button {...props} onClick={onClick} disabled={disabled} style={icons?.length ? { gridTemplateColumns: 'min-content' + icons.map(_ => ' min-content').join(''), ...style } : style} className={`${icons?.length ? 'button-icon-text-container ' : ''}${className}`}>\n            {input}\n            {icons?.map((icon, idx) => <div {...icon.props} key={idx} className={`icon ${icon.name}`}>{icon.children}</div>)}\n            <div className=\"button-text\">{children}</div>\n        </button>\n    );\n};\n","import React from 'react';\nimport { Prompt } from 'react-router';\nimport Select from 'react-select';\nimport DatePicker from 'react-datepicker';\nimport moment from 'moment-timezone';\nimport { Button } from '../lis-custom-components/lis-custom-components';\nimport { scheduleActionCreators } from '../../stores/lis-schedule-store';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { navActionCreators } from '../../stores/lis-nav-store';\n\nconst hyperlinkInstructions = \"INSERT HYPERLINK TEXT\";\n\nconst customStyles = {\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        height: \"32px\",\n        minHeight: \"32px\",\n        fontSize: '0.8em',\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    },\n    dropdownIndicator: base => ({\n        ...base,\n        padding: '0px 8px'\n    })\n}\n\nconst chamberList = [\n    { label: \"House\", value: 0 },\n    { label: \"Senate\", value: 1 }\n]\n\nclass MeetingsForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            displaySequence: 0,\n            committee: { label: \"Select...\" },\n            scheduleID: \"\",\n            scheduleType: { label: \"Select...\" },\n            meetingDateTime: \"\",\n            timeDescription: \"\",\n            location: { label: \"Select...\" },\n            description: \"\",\n            ownerName: \"\",\n            chamber: { label: \"Select...\" },\n            isCancelled: false,\n            isPublic: true,\n            onCalendar: false,\n            scheduleTypeOptions: [],\n            remarks: \"\",\n            scheduleFiles: []\n        }\n\n        this.handleFileChange = this.handleFileChange.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.highlightFileAnchorTag = this.highlightFileAnchorTag.bind(this);\n        this.saveSchedule = this.saveSchedule.bind(this);\n    }\n\n    componentDidMount() {\n        let scheduleTypeOptions = [...this.props.scheduleTypeList];\n        scheduleTypeOptions.splice(5, 1);\n        this.setState({\n            scheduleTypeOptions: scheduleTypeOptions\n        })\n    }\n\n    static getDerivedStateFromProps(nextProps, prevState) {\n        if (nextProps.meeting.ScheduleID !== prevState.scheduleID) {\n            return {\n                displaySequence: nextProps.meeting.DisplaySequence ? nextProps.meeting.DisplaySequence : nextProps.organizedSchedule.find(x => moment(x.Date).isSame(nextProps.meeting.meetingDateTime, \"day\")) ? (Math.max(...nextProps.organizedSchedule.find(x => moment(x.Date).isSame(nextProps.meeting.meetingDateTime, \"day\")).Times[0].Items.map(x => x.DisplaySequence)) + 1) : 1,\n                committee: nextProps.meeting.OwnerID ? nextProps.committeeList.find(x => x.CommitteeID === nextProps.meeting.OwnerID) : { label: \"Select...\" },\n                ownerName: nextProps.meeting.OwnerName ? nextProps.meeting.OwnerName : \"\",\n                scheduleID: nextProps.meeting.ScheduleID ? nextProps.meeting.ScheduleID : 0,\n                scheduleType: nextProps.meeting.ScheduleTypeID ? nextProps.scheduleTypeList.find(x => x.ScheduleTypeID === nextProps.meeting.ScheduleTypeID) : { label: \"Select...\" },\n                location: nextProps.meeting.VoteRoomID ? nextProps.locationList.find(x => x.VoteRoomID === nextProps.meeting.VoteRoomID) : { label: \"Select...\" },\n                meetingDateTime: nextProps.meeting.ScheduleDate ? moment(nextProps.meeting.ScheduleDate).format(\"MM-DD-YYYY HH:mm\") : moment().set({ hour: 12, minute: 0, second: 0, millisecond: 0 }).format(\"MM-DD-YYYY hh:mm\"),\n                timeDescription: nextProps.meeting.ScheduleTime ? nextProps.meeting.ScheduleTime : \"\",\n                description: nextProps.meeting.Description ? nextProps.meeting.Description : \"\",\n                textHeight: (Math.round((nextProps.meeting.Description ? nextProps.meeting.Description : \"\").length / 95) * 20 + 40).toString() + 'px',\n                chamber: nextProps.meeting.ScheduleTypeID === 2 ? chamberList.find(x => x.label === nextProps.meeting.OwnerName) : { label: \"Select...\" },\n                isCancelled: nextProps.meeting.IsCancelled ? nextProps.meeting.IsCancelled : false,\n                isPublic: nextProps.meeting.IsPublic === true ? true : false,\n                onCalendar: nextProps.meeting.OnCalendar !== undefined ? nextProps.meeting.OnCalendar : false,\n                remarks: nextProps.meeting.Comments ? nextProps.meeting.Comments : \"\",\n                scheduleFiles: nextProps.meeting.ScheduleFiles || []\n            }\n        } else { return null; }\n    }\n\n    handleChange(state, value, callback) {\n        if (state === 'timeDescription') {\n            value = moment(value, \"H:mm\").tz('America/New_York').format(\"h:mm A\");\n        } else if (state === 'meetingDateTime') {\n            value = moment(value).tz('America/New_York');\n        }\n        this.setState({\n            [state]: value\n        }, () => {\n            this.props.setFormIsDirty(true);\n            if (value && value.ParentCommitteeID && value.ChamberCode === \"S\") {\n                this.props.getSubcommitteeMembers(\"?CommitteeID=\" + this.state.committee.CommitteeID + \"&EffectiveDate=\" + this.state.meetingDateTime)\n                    .then(() => {\n                        this.setState({\n                            remarks: this.props.subcommitteeMembers\n                        })\n                    })\n            } else {\n                if (state === 'description') {\n                    let textHeight = (Math.round((this.state.description ?? '').length / 95) * 20 + 40).toString() + 'px';\n                    this.setState({ textHeight });\n                }\n                if (callback) callback();\n            }\n        })\n    }\n\n    highlightFileAnchorTag() {\n        const field = document.getElementById('description');\n        if (field) {\n            const start = this.state.description.lastIndexOf(hyperlinkInstructions);\n            if (start > -1) {\n                const end = start + hyperlinkInstructions.length;\n                if (field.createTextRange) {\n                    var selRange = field.createTextRange();\n                    selRange.collapse(true);\n                    selRange.moveStart('character', start);\n                    selRange.moveEnd('character', end);\n                    selRange.select();\n                } else if (field.setSelectionRange) {\n                    field.setSelectionRange(start, end);\n                } else if (field.selectionStart) {\n                    field.selectionStart = start;\n                    field.selectionEnd = end;\n                }\n                field.focus();\n            }\n        }\n    }\n\n    saveSchedule() {\n        let params = {\n            DisplaySequence: this.state.displaySequence,\n            OwnerID: this.state.scheduleType.value !== 6 ? this.state.committee ? this.state.committee.CommitteeID : null : this.props.meeting.OwnerID, //If the meeting is a docket pass back the original OwnerID\n            OwnerName: this.state.scheduleType.value === 1 ? this.state.committee ? this.state.committee.Name : null : this.state.scheduleType.value === 2 ? this.state.chamber ? this.state.chamber.label : null : this.state.scheduleType.value === 6 ? this.props.meeting ? this.props.meeting.OwnerName : null : this.state.ownerName, //Pass back the original OwnerName if it's a docket meeting\n            ScheduleID: this.state.scheduleID,\n            ScheduleTypeID: this.state.scheduleType.value,\n            VoteRoomID: this.state.location ? this.state.location.VoteRoomID : undefined,\n            RoomDescription: this.state.location ? this.state.location.Description : undefined,\n            ScheduleDate: moment(this.state.meetingDateTime).format(\"MM/DD/YYYY HH:mm\"),\n            ScheduleTime: this.state.timeDescription !== \"Invalid date\" ? this.state.timeDescription : \"\",\n            Description: this.state.description,\n            IsCancelled: this.state.isCancelled,\n            IsPublic: this.state.isPublic,\n            OnCalendar: this.state.onCalendar,\n            ModificationDate: this.props.meeting.ModificationDate ? this.props.meeting.ModificationDate : '',\n            Comments: this.state.remarks\n        }\n\n        if (this.state.scheduleID === 0) {\n            this.props.createMeeting(params)\n        } else {\n            params = {\n                Schedules: [\n                    params\n                ]\n            }\n            this.props.saveMeetings(params)\n        }\n    }\n\n    handleFileChange(e, originalFile, isDelete) {\n        this.props.handleFileChange(e, originalFile, isDelete, (scheduleFiles, update, originalFileIdx, fileURL) => {\n            if (!isDelete && !update && (!originalFileIdx || originalFileIdx === -1)) {\n                this.handleChange(\"description\", this.state.description + `<a href='${fileURL}' target='_blank' rel='noopener noreferrer'>${hyperlinkInstructions}</a>`, () => {\n                    this.highlightFileAnchorTag();\n                })\n            } else if (update && originalFileIdx > -1) {\n                scheduleFiles[originalFileIdx]['change-success'] = true;\n                this.setState({ scheduleFiles });\n            }\n        })\n    }\n\n    getScheduleDateTime() {\n        const scheduleDate = moment(this.state.meetingDateTime);\n        const scheduleTime = moment(this.state.timeDescription, \"h:mm A\").isValid() && moment(this.state.timeDescription, \"h:mm A\");\n        return scheduleDate.hour(scheduleTime ? scheduleTime.hour() : scheduleDate.hour()).minute(scheduleTime ? scheduleTime.minute() : scheduleDate.minute()).second(scheduleTime ? scheduleTime.second() : scheduleDate.second()).tz('America/New_York', true).local();\n    }\n\n    render() {\n        const { committeeDropDownOptions, locationList, scheduleTypeList, isSaving, toggleEditMeeting } = this.props;\n        //custom filter for the committee dropdown so that subcommittees will be displayed if you filter by the parent committee name\n        const filterOption = (option, inputValue) => {\n            inputValue = inputValue.toUpperCase();\n            // check if this option label includes the inputValue, or if this option is a subcommittee whose parent committee's label contains the inputValue\n            const match = option.label.toUpperCase().includes(inputValue) || (option.data.ParentCommitteeID && committeeDropDownOptions.find(cmte => cmte.CommitteeID === option.data.ParentCommitteeID && cmte.label.toUpperCase().includes(inputValue)));\n            return match;\n        };\n\n        const formatURL = (url) => {\n            url = url.replace(\"https://\", \"\");\n            if (url.length >= 40) {\n                return url.substring(0, 11) + \"...\" + url.substring(28);\n            }\n            return url;\n        }\n\n        return (\n            <div className=\"dlas-forms meetings-form\">\n                <div>\n                    <Prompt\n                        when={this.props.isDirty}\n                        message={`You have unsaved changes. Are you sure you would like to leave?`}\n                    />\n                </div>\n                <div className=\"inner-grid seven-and-one\">\n                    {this.state.scheduleID === 0 ? <h3>Create an Event</h3> : <h3>Edit Event</h3>}\n                    <div className=\"checkbox flex-row flex-vertical-center flex-start\" style={{ paddingTop: \"5%\" }}>\n                        {this.props.userClaims && this.props.userClaims.roles.find(x => x === \"SenateScheduleAuthor\") &&\n                            <React.Fragment>\n                                <div className=\"toggle-switch\" onClick={() => this.handleChange(\"onCalendar\", !this.state.onCalendar)}>\n                                    <input id=\"is-public-button\" checked={this.state.onCalendar} type=\"checkbox\" style={{ width: \"inherit\" }} />\n                                    <span className=\"slider\"></span>\n                                </div>\n                                <label htmlFor=\"is-public-button\" className=\"checkbox-label no-background\" style={{ whiteSpace: \"nowrap\" }}>On Calendar?</label>\n                            </React.Fragment>\n                        }\n                        <div className=\"toggle-switch\" onClick={() => this.handleChange(\"isPublic\", !this.state.isPublic)}>\n                            <input id=\"is-public-button\" checked={this.state.isPublic} type=\"checkbox\" style={{ width: \"inherit\" }} />\n                            <span className=\"slider\"></span>\n                        </div>\n                        <label htmlFor=\"is-public-button\" className=\"checkbox-label no-background\" style={{ whiteSpace: \"nowrap\" }}>Is Public?</label>\n                    </div>\n                </div>\n                <div className=\"grid-wrapper third\">\n                    <div>\n                        <label htmlFor=\"meeting-datetime\">Date</label>\n                        <DatePicker\n                            id=\"meeting-datetime\"\n                            className=\"width-100\"\n                            selected={this.getScheduleDateTime()}\n                            onChange={(value => { this.handleChange(\"meetingDateTime\", value) })}\n                            dateFormat=\"MM/DD/YYYY\"\n                        />\n                    </div>\n                    <div>\n                        <label htmlFor=\"time-description\">Time</label>\n                        <div>\n                            <input\n                                type='time'\n                                id=\"time-description\"\n                                autoComplete='off'\n                                value={!this.state.timeDescription ? '' : moment(this.state.timeDescription, \"h:mm A\").tz('America/New_York', true).local().format(\"HH:mm\")}\n                                style={{ minWidth: '125px', maxHeight: '32px', fontFamily: 'arial' }}\n                                onChange={(e) => { this.handleChange(\"timeDescription\", e ? e.target.value : \"\") }}\n                            />\n                        </div>\n                    </div>\n                    <div>\n                        <label htmlFor=\"meeting-location\">Location</label>\n                        <Select\n                            id=\"meeting-location\"\n                            options={locationList}\n                            value={this.state.location}\n                            onChange={(value) => { this.handleChange(\"location\", value) }}\n                            styles={customStyles}\n                            isClearable\n                        />\n                    </div>\n                </div>\n                <div className=\"grid-wrapper meetings-form-two-and-one\">\n                    <React.Fragment>\n                        {this.state.scheduleType && this.state.scheduleType.value === 1 || this.state.scheduleType && this.state.scheduleType.value === 6\n                            ?\n                            <div>\n                                <label htmlFor=\"committee-subcommittee\">Committee/Subcommittee</label>\n                                {this.state.scheduleType.value === 6\n                                    ?\n                                    <div style={{ display: \"block\" }}>\n                                        <label>{this.state.ownerName}</label>\n                                    </div>\n                                    :\n                                    <Select\n                                        id=\"committee-subcommittee\"\n                                        options={committeeDropDownOptions}\n                                        value={this.state.committee}\n                                        onChange={(value) => { this.handleChange(\"committee\", value) }}\n                                        filterOption={filterOption}\n                                        styles={customStyles}\n                                    />\n                                }\n                            </div>\n                            : this.state.scheduleType && this.state.scheduleType.value === 2\n                                ?\n                                <div>\n                                    <label htmlFor=\"meeting-chamber\">Chamber</label>\n                                    <Select\n                                        id=\"meeting-chamber\"\n                                        value={this.state.chamber}\n                                        options={this.props.userClaims.claims.find(x => x.RoleName === \"Admin\")\n                                            ? chamberList\n                                            : this.props.userClaims.claims.find(x => x.RoleName === \"HouseScheduleEditor\")\n                                                ? chamberList.filter(x => x.label === \"House\")\n                                                : chamberList.filter(x => x.label === \"Senate\")\n                                        }\n                                        onChange={(value) => { this.handleChange(\"chamber\", value) }}\n                                        styles={customStyles}\n                                    />\n                                </div>\n                                :\n                                <div>\n                                    <label htmlFor=\"meeting-owner\">Meeting Owner</label>\n                                    <input\n                                        id=\"meeting-owner\"\n                                        className=\"width-100\"\n                                        type=\"text\"\n                                        onChange={(e) => { this.handleChange(\"ownerName\", e.target.value) }}\n                                        value={this.state.ownerName}\n                                    />\n                                </div>\n                        }\n                    </React.Fragment>\n                    <div>\n                        <label htmlFor=\"schedule-Type\">Meeting Type</label>\n                        <Select\n                            id=\"schedule-type\"\n                            options={this.state.scheduleTypeOptions}\n                            value={this.state.scheduleType}\n                            onChange={(value) => { this.handleChange(\"scheduleType\", value) }}\n                            styles={customStyles}\n                            isDisabled={this.state.scheduleType.value === 6}\n                        />\n                    </div>\n                </div>\n                <div className=\"grid-wrapper\">\n                    <label htmlFor=\"description\">Description{this.state.scheduleID ? <Button type=\"button\" className=\"button file-button slide\" style={{ marginLeft: '5px' }} icons={[{ name: 'add' }]} input={<input type=\"file\" accept=\".pdf\" onChange={this.handleFileChange} />}>\n                        {\"  Add PDF\"}\n                    </Button> : null}\n                        {this.state.scheduleFiles?.map((f, i) =>\n                            <Button key={i} type=\"button\" className={`button file-button secondary${f['change-success'] ? ' change-success' : ''}`}\n                                style={{ marginLeft: '5px', cursor: 'default' }}\n                                icons={[\n                                    { name: 'delete', props: { style: { cursor: 'pointer' }, onClick: (e) => this.handleFileChange(e, f, true) } },\n                                    { name: 'replace', children: <input type=\"file\" accept=\".pdf\" style={{ position: 'relative', cursor: 'pointer' }} onChange={(e) => this.handleFileChange(e, f)} /> }\n                                ]}>\n                                <a href={f.FileURL} target='_blank' rel='noopener noreferrer'>{formatURL(f.FileURL)}</a>\n                            </Button>)}\n                    </label>\n                    <textarea\n                        id=\"description\"\n                        style={{ height: this.state.textHeight || '40px' }}\n                        value={this.state.description}\n                        onChange={(e) => { this.handleChange(\"description\", e.target.value) }}\n                        type=\"text\"\n                    />\n                </div>\n                {((this.state.committee && this.state.committee.ChamberCode === \"S\") || (this.state.chamber && this.state.chamber.value === 1) || this.state.scheduleType.ScheduleTypeID === 6) &&\n                    <div className=\"grid-wrapper\">\n                        <label htmlFor=\"remarks\">Remarks</label>\n                        <textarea\n                            id=\"remarks\"\n                            value={this.state.remarks}\n                            onChange={(e) => { this.handleChange(\"remarks\", e.target.value) }}\n                            type=\"text\"\n                        />\n                    </div>\n                }\n                <button className=\"button float-right row-spacer-margin\" type=\"button\" onClick={() => { this.saveSchedule() }} disabled={isSaving}>{!isSaving ? \"Save\" : \"Saving...\"}</button>\n                <button style={{ marginRight: \"10px\" }} className=\"button float-right row-spacer-margin secondary\" type=\"button\" onClick={() => toggleEditMeeting()}>Cancel</button>\n            </div>\n        )\n    }\n}\n\nexport default MeetingsForm;","import React from 'react';\nimport DatePicker from 'react-datepicker';\nimport moment from 'moment-timezone';\n\nclass MeetingsCalendarPreview extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            date: moment()\n        }\n\n        this.setDate = this.setDate.bind(this);\n        this.submit = this.submit.bind(this);\n    }\n\n    setDate(value) {\n        this.setState({\n            date: value || ''\n        })\n    }\n\n    submit() {\n        this.props.getPreview(this.state.date);\n    }\n\n    render() {\n\n        return (\n            <div className=\"dlas-forms\">\n                <h3>Meetings Calendar Preview</h3>\n                <p>You may use this form to generate a preview PDF of all meetings scheduled to appear on the calendar.</p>\n                <div className=\"grid-wrapper meetings-preview\">\n                    <div>\n                        <label>Start Date</label>\n                        <DatePicker\n                            selected={this.state.date ? moment(this.state.date) : null}\n                            onChange={(value) => this.setDate(value)}\n                            dateFormat=\"MM/DD/YYYY\"\n                        />\n                    </div>\n                    <button\n                        type=\"button\"\n                        className=\"button\"\n                        style={{ height: \"32px\", marginTop: \"22px\" }}\n                        disabled={this.state.date === \"\" || this.props.gettingPreview}\n                        onClick={() => this.submit()}\n                    >\n                        Submit\n                    </button>\n                    <div />\n                    <button\n                        type=\"button\"\n                        className=\"button float-right\"\n                        style={{ marginRight: \"10px\", height: \"32px\", marginTop: \"22px\" }}\n                        onClick={() => this.props.toggleMeetingsCalendarPreview()}\n                    >Return to Schedule Management</button>\n                </div>\n                {this.props.gettingPreview ?\n                    <div aria-label=\"Loading\" className=\"center-spinner spinner\"></div>\n                    :\n                    this.props.pdfSrc != \"\" &&\n                    <div>\n                        <div className=\"center full-height\">\n                            <iframe className=\"center\" style={{ width: '100%', height: '1080px', marginTop: \"20px\" }} ref={el => this.pdfRef = el} src={this.props.pdfSrc}></iframe>\n                        </div>\n                    </div>\n                }\n            </div>\n        )\n    }\n}\n\nexport default MeetingsCalendarPreview;","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { committeeActionCreators } from '../../stores/lis-committee-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { scheduleActionCreators } from '../../stores/lis-schedule-store';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport MeetingsForm from '../../lis-shared/lis-meetings/lis-meetings-form-component';\nimport MeetingsCalendarPreview from '../../lis-shared/lis-meetings/lis-meetings-calendar-preview';\n\nimport moment from 'moment-timezone';\nimport DatePicker from 'react-datepicker';\nimport Select from 'react-select';\nimport { cancelRequest } from '../../services/request.service';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport renderHTML from 'react-render-html';\nimport { generateCsv } from '../../services/csv.service';\n\nconst tz = moment.tz.guess();\n\nconst getItemStyle = (isDragging, draggableStyle) => ({\n    userSelect: \"none\",\n    padding: '0',\n    background: isDragging ? \"white\" : \"white\",\n    borderBottom: '1px solid #b3b3b3',\n    ...draggableStyle\n});\n\nconst reorder = (list, startIndex, endIndex) => {\n    const result = Array.from(list);\n    const removed = result.splice(startIndex, 1);\n    result.splice(endIndex, 0, removed[0]);\n\n    return result;\n};\n\nconst SCHEDULE_EDITOR = \"Schedule\";\nconst SENATE_SCHEDULE = \"SenateScheduleAuthor\";\n\nconst TIME_REGEX = /[0-9]:[0-9]{2}\\s[AP]M/i;\n\nclass PublicSchedule extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            organizedSchedule: [],\n            currentDayIndex: 0,\n            locationOptions: [],\n            showAllDates: true,\n            isEditing: false,\n            meeting: {},\n            committeeList: [],\n            fullCommitteeList: [],\n            partner: false,\n            isSaving: false,\n            scheduleTypeList: [],\n            startDate: moment().tz('America/New_York'),\n            endDate: null,\n            keyword: '',\n            location: [],\n            calendarList: [],\n            calendarDisabled: true,\n            displayScheduleModal: false,\n            displayMeetingsCalendarPreview: false,\n            pdfSrc: \"\",\n            gettingPreview: false,\n            isDirty: false,\n            showConfirmation: false\n        }\n\n        this.toggleAllDates = this.toggleAllDates.bind(this);\n        this.toggleEditMeeting = this.toggleEditMeeting.bind(this);\n        this.changeDay = this.changeDay.bind(this);\n        this.getCommittees = this.getCommittees.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.handleSearch = this.handleSearch.bind(this);\n        this.handleReset = this.handleReset.bind(this);\n        this.openMeeting = this.openMeeting.bind(this);\n        this.saveMeetings = this.saveMeetings.bind(this);\n        this.createMeeting = this.createMeeting.bind(this);\n        this.toggleCancelMeeting = this.toggleCancelMeeting.bind(this);\n        this.deleteMeeting = this.deleteMeeting.bind(this);\n        this.onDragEnd = this.onDragEnd.bind(this);\n        this.openScheduleModal = this.openScheduleModal.bind(this);\n        this.closeScheduleModal = this.closeScheduleModal.bind(this);\n        this.toggleMeetingsCalendarPreview = this.toggleMeetingsCalendarPreview.bind(this);\n        this.getPreview = this.getPreview.bind(this);\n        this.setFormIsDirty = this.setFormIsDirty.bind(this);\n        this.closeConfirmation = this.closeConfirmation.bind(this);\n        this.handleFileChange = this.handleFileChange.bind(this);\n    }\n\n    changeDay(amount) {\n        let currentDayIndex = this.state.currentDayIndex += amount;\n        this.setState({\n            currentDayIndex: currentDayIndex\n        });\n    }\n\n    toggleAllDates() {\n        this.setState(state => ({\n            showAllDates: !state.showAllDates\n        }));\n    }\n\n    toggleEditMeeting(confirmed) {\n        if (this.state.isDirty && !confirmed) {\n            this.setState({\n                showConfirmation: true\n            })\n        } else {\n            this.setState(state => ({\n                isEditing: !state.isEditing,\n                meeting: { ScheduleID: 0 },\n                isDirty: false,\n                showConfirmation: false\n            }))\n        }\n    }\n\n    getCommittees(sessionParam) {\n        this.props.actions.getCommitteeList(sessionParam + \"&includeSubCommittees=true\").then(() => {\n            let committeeList = [...this.props.committee.committeeList];\n            committeeList.forEach(committee => {\n                committee.label = committee.Name;\n                committee.value = committee.CommitteeID;\n            });\n\n            //create a hierarchical list of committees (groups of committees, each of which contains the parent committee and its subcommittees) for the committee dropdown\n            const committeeDropDownOptions = JSON.parse(JSON.stringify(committeeList)).filter(cmte => !cmte.ParentCommitteeID).map(cmte => {\n                //add the chamber designator to the group header if necessary\n                cmte.label = cmte.label += (this.props.login.userClaims.claims.find(x => x.RoleName === \"Admin\") || (this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseScheduleEditor\") && this.props.login.userClaims.claims.find(x => x.RoleName === \"SenateScheduleEditor\")) ? (' ' + '(' + cmte.ChamberCode + ')') : \"\");\n                //since the header for each group of committees will already contain the chamber code if necessary, the individual options therein do not need it\n                const parentCmteOption = { ...cmte, label: cmte.label && (cmte.label.endsWith(' (H)') || cmte.label.endsWith(' (S)')) ? cmte.label.substr(0, cmte.label.length - 4) : cmte.label }\n                cmte.options = [parentCmteOption].concat([...committeeList].filter(sub => sub.ParentCommitteeID === cmte.CommitteeID));\n\n                return cmte;\n            })\n\n            this.setState({\n                fullCommitteeList: committeeList,\n                committeeList: committeeList.filter(committee => {\n                    if (this.props.login.userClaims.claims.find(x => x.RoleName === \"Admin\")) {\n                        return true;\n                    } else if (committee.ChamberCode === \"H\" && this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseScheduleEditor\") ||\n                        committee.ChamberCode === \"S\" && this.props.login.userClaims.claims.find(x => x.RoleName === \"SenateScheduleEditor\")) {\n                        return true;\n                    }\n                    return false;\n                }),\n                committeeDropDownOptions: committeeDropDownOptions.filter(committee => {\n                    if (this.props.login.userClaims.claims.find(x => x.RoleName === \"Admin\")) {\n                        return true;\n                    } else if (committee.ChamberCode === \"H\" && this.props.login.userClaims.claims.find(x => x.RoleName === \"HouseScheduleEditor\") ||\n                        committee.ChamberCode === \"S\" && this.props.login.userClaims.claims.find(x => x.RoleName === \"SenateScheduleEditor\")) {\n                        return true;\n                    }\n                    return false;\n                }),\n            });\n        });\n    }\n\n    handleChange(value, state) {\n        this.setState({\n            [state]: value\n        })\n    }\n\n    handleSearch(preserveIndex) {\n        const startDate = moment(this.state.startDate).hour(0).minute(0).second(0).format('MM/DD/YYYY HH:mm:ss');\n        const endDate = this.state.endDate ? moment(this.state.endDate).hour(23).minute(59).second(59).format('MM/DD/YYYY HH:mm:ss') : null;\n        const voteRooms = this.state.location.length > 0 ? this.state.location : null;\n\n        let keyword = this.state.keyword;\n\n        this.setState({\n            isLoaded: false,\n            isEditing: false\n        }, () => {\n            let params = \"startDate=\" + startDate;\n            if (endDate) {\n                params += \"&endDate=\" + endDate;\n            }\n\n            this.props.actions.getScheduleList(params, this.state.partner)\n                .then(() => {\n                    if (this.props.schedule.scheduleListError) {\n                        throw this.props.schedule.scheduleListError;\n                    }\n                    let scheduleList = this.props.schedule.scheduleList\n                    // Filter out the results that are not part of the search\n                    if (keyword) {\n                        //Get rid of white space and make sure its all in lowercase so elements that are close to the search are included as well\n                        keyword = keyword.replace(/\\s/g, '');\n                        keyword = keyword.toLowerCase();\n                        scheduleList = scheduleList.filter(item => {\n                            const roomDescription = item.RoomDescription ? item.RoomDescription.replace(/\\s/g, '') : '';\n                            const description = item.Description ? item.Description.replace(/\\s/g, '') : '';\n                            const comments = item.Comments ? item.Comments.replace(/\\s/g, '') : '';\n                            const time = item.ScheduleTime ? item.ScheduleTime.replace(/\\s/g, '') : '';\n                            const ownerName = item.OwnerName ? item.OwnerName.replace(/\\s/g, '') : '';\n                            if (roomDescription.toLowerCase().includes(keyword) ||\n                                description.toLowerCase().includes(keyword) ||\n                                comments.toLowerCase().includes(keyword) ||\n                                time.toLowerCase().includes(keyword) ||\n                                ownerName.toLowerCase().includes(keyword)) {\n                                return item;\n                            }\n                        });\n                    }\n                    if (voteRooms) {\n                        scheduleList = scheduleList.filter(item => {\n                            if (voteRooms.find(room => room.VoteRoomID === item.VoteRoomID)) {\n                                return (item);\n                            }\n                        });\n                    }\n                    if (scheduleList.length === 0) {\n                        this.setState({\n                            isLoaded: true\n                        })\n                    }\n                    const organizedSchedule = this.organizeSchedule(scheduleList)\n                    this.setState({\n                        isLoaded: true,\n                        organizedSchedule: organizedSchedule,\n                        currentDayIndex: preserveIndex ? this.state.currentDayIndex : 0,\n                        scheduleError: null,\n                        calendarList: scheduleList\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.setState({\n                        isLoaded: true,\n                        scheduleError: err\n                    });\n                });\n        });\n    }\n\n    handleReset() {\n        this.setState({\n            location: [],\n            keyword: '',\n            startDate: moment().tz('America/New_York'),\n            endDate: null\n        }, () => {\n            this.handleSearch();\n        })\n    }\n\n    organizeSchedule(scheduleList) {\n        // Turn the list of schedule items into a list of dates each containing a list of schedule items\n        // This formatting is done so the schedule can be listed in the table with a date as a container\n        scheduleList.sort((a, b) => {\n            const dateComp = new Date(a.ScheduleDate) - new Date(b.ScheduleDate);\n            if (dateComp !== 0) {\n                return dateComp;\n            }\n\n            const timeA = moment(a.TimeDescription, \"h:mm A\");\n            const timeB = moment(b.TimeDescription, \"h:mm A\");\n            if (timeA.isValid() && timeB.isValid()) {\n                if (timeA.isBefore(timeB)) return -1;\n                if (timeA.isAfter(timeB)) return 1;\n            }\n            return 0;\n        });\n        let organizedSchedule = [];\n        let scheduleArray = [];\n        let previousSchedule = scheduleList[0];\n        scheduleList.forEach(schedule => {\n            const scheduleDateTime = this.getScheduleDateTime(schedule);\n            const previousScheduleDateTime = this.getScheduleDateTime(previousSchedule);\n\n            if (!schedule.DisplaySequence) {\n                schedule.DisplaySequence = 999;\n            }\n\n            if (!previousScheduleDateTime.isSame(scheduleDateTime, 'day')) {\n                //Add the list of legislation to the category\n                //Organize the times so that the hour/minute times are in their seperate containers, this is done to help with formatting\n                let newDateContainer = {\n                    Times: this.organizeTimes(scheduleArray),\n                    Date: previousScheduleDateTime.format(\"L\"),\n                };\n                organizedSchedule.push(newDateContainer);\n                //Empty out the leg array so we can use it for another category\n                scheduleArray = [];\n                //Add the first item to the next category\n                scheduleArray.push(schedule);\n            } else {\n                scheduleArray.push(schedule);\n            }\n            //Set this variable so the next iteration will know what the schedule date of the previous iteration was\n            previousSchedule = schedule;\n        });\n        //If the schedule array still has elements then that means not every schedule item in the results has been added to a container\n        //So, check to see if the schedule array has elements and if so create another container\n        if (scheduleArray.length > 0) {\n            let newDateContainer = {\n                Times: this.organizeTimes(scheduleArray),\n                Date: this.getScheduleDateTime(scheduleArray[0]).format(\"L\")\n            };\n            organizedSchedule.push(newDateContainer);\n        }\n\n        return organizedSchedule;\n    }\n\n    organizeTimes(itemsList) {\n        itemsList.sort((a, b) => {\n            return a.DisplaySequence < b.DisplaySequence ? -1 : a.DisplaySequence > b.DisplaySequence ? 1 : 0\n        })\n\n        let organizedTimes = [];\n        let items = [];\n        let time = \"\";\n\n        for (let i = 0; i < itemsList.length; i++) {\n            //If a ScheduleTime has been specified then use that, otherwise get the time from the ScheduleDate but do not display it in the list\n            let currentTime = \"\";\n\n            //If we've entered a new time then push the current time and sorted items into organizedTimes and reset variables\n            if (currentTime !== time) {\n                if (items.length > 0) {\n                    items.sort((a, b) => a.DisplaySequence - b.DisplaySequence);\n                    organizedTimes.push({\n                        Items: items,\n                        Time: time\n                    });\n                }\n\n                time = currentTime;\n                items = [itemsList[i]];\n            } else {\n                items.push(itemsList[i]);\n            }\n        }\n\n        //Sort and push the last time and sorted items\n        items.sort((a, b) => a.DisplaySequence - b.DisplaySequence);\n        organizedTimes.push({\n            Items: items,\n            Time: time\n        })\n\n        return organizedTimes;\n    }\n\n    getScheduleDateTime(schedule) {\n        const scheduleDate = moment(schedule.ScheduleDate);\n        const scheduleTime = moment(schedule.ScheduleTime, \"h:mm A\").isValid() && moment(schedule.ScheduleTime, \"h:mm A\");\n        return scheduleDate.hour(scheduleTime ? scheduleTime.hour() : scheduleDate.hour()).minute(scheduleTime ? scheduleTime.minute() : scheduleDate.minute()).second(scheduleTime ? scheduleTime.second() : scheduleDate.second()).tz('America/New_York', true).local();\n    }\n\n    openMeeting(meeting) {\n        this.setState({\n            meeting: meeting,\n            isEditing: true,\n            isDirty: false\n        }, () => {\n            window.scrollTo({\n                top: 0,\n                behavior: 'smooth'\n            })\n        })\n    }\n\n    saveMeetings(meetings, callback) {\n        this.setState({\n            isSaving: true\n        }, () => {\n            this.props.actions.saveSchedule(meetings)\n                .then((result) => {\n                    this.props.actions.makeToast([{ message: \"Schedule Saved\", type: \"success\" }]);\n                    this.setState({\n                        isSaving: false,\n                        showPopup: false,\n                        isDirty: false\n                    }, () => {\n                        //Refresh the data\n                        this.handleSearch(true);\n                        if (callback)\n                            callback();\n                    })\n                })\n                .catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                    this.setState({\n                        isSaving: false,\n                    });\n                });\n        })\n    }\n\n    createMeeting(meeting) {\n        this.setState({\n            isSaving: true\n        }, () => {\n            this.props.actions.createSchedule(meeting)\n                .then((response) => {\n                    this.props.actions.makeToast([{ message: \"Schedule Saved\", type: \"success\" }]);\n                    this.setState({\n                        isSaving: false,\n                        isEditing: false,\n                        isDirty: false\n                    }, () => {\n                        this.handleSearch();\n                    })\n                })\n                .catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                    this.setState({\n                        isSaving: false,\n                    });\n                });\n        })\n    }\n\n    toggleCancelMeeting(meeting) {\n        meeting.IsCancelled = !meeting.IsCancelled\n        let params = {\n            Schedules: [\n                meeting\n            ]\n        };\n        this.saveMeetings(params);\n    }\n\n    deleteMeeting(meeting, onFail) {\n        let promises = [];\n        meeting.ScheduleFiles?.forEach(scheduleFile => {\n            promises.push(this.handleFileChange(null, scheduleFile, true, null, meeting));\n        });\n        Promise.all(promises).then(() => {\n            meeting.DeletionDate = moment();\n            let params = {\n                Schedules: [\n                    meeting\n                ]\n            };\n            this.saveMeetings(params);\n        }).catch(() => {\n            if (onFail) onFail();\n        })\n    }\n\n    async handleFileChange(e, originalFile, isDelete, callback, deleteMeeting) {\n        if (isDelete || e.target.files[0]) {\n            let meeting = deleteMeeting ?? { ...this.state.meeting };\n            let originalFileIdx = -1;\n            let params = '?scheduleID=' + meeting.ScheduleID;\n            if (isDelete) params += \"&IsDeleted=true\";\n            if (originalFile) params += \"&FileURL=\" + originalFile.FileURL + \"&FileID=\" + originalFile.FileID;\n            await this.props.actions.uploadMeetingPdf(params, isDelete ? null : e.target.files[0]).then(() => {\n                const res = this.props.schedule.uploadMeetingPdf;\n                let update = false;\n                if (originalFile) {\n                    originalFileIdx = meeting.ScheduleFiles.findIndex(f => f.FileURL === originalFile.FileURL);\n                    if (originalFileIdx > -1) {\n                        if (isDelete) {\n                            meeting.ScheduleFiles.splice(originalFileIdx, 1);\n                        } else {\n                            meeting.ScheduleFiles[originalFileIdx] = res;\n                            update = true;\n                        }\n                    } else if (!isDelete) {\n                        meeting.ScheduleFiles.push(res);\n                    }\n                } else if (!isDelete) {\n                    meeting.ScheduleFiles.push(res);\n                }\n                this.setState({\n                    meeting: deleteMeeting ? this.state.meeting : meeting\n                }, () => {\n                    if (callback) callback(meeting.ScheduleFiles, update, originalFileIdx, res.FileURL)\n                })\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n                this.props.actions.makeToast([{ message: isDelete ? \"PDF Delete Failed\" : \"PDF Upload Failed\", type: \"failure\" }]);\n                return Promise.reject();\n            })\n        }\n    }\n\n    onDragEnd(date, result) {\n        if (!result.destination) {\n            return;\n        }\n\n        //Exit if there is no change\n        if (result.destination.index === result.source.index) {\n            return;\n        }\n\n        let scheduleDate = JSON.parse(JSON.stringify(this.state.organizedSchedule.find(x => x.Date === date)));\n        let flatMappedSchedules = scheduleDate.Times.flatMap(t => t.Items);\n        let [removed] = flatMappedSchedules.splice(result.source.index, 1);\n        flatMappedSchedules.splice(result.destination.index, 0, removed);\n\n        //Exit if meetings have been moved out of timely order\n        /* let outOfOrder;\n        flatMappedSchedules.filter(i => i.ScheduleTime && moment(i.ScheduleTime, \"h:mm A\").isValid()).map(i => i.ScheduleTime).every((time, idx, arr) => {\n            const returnValue = !idx || moment(arr[idx - 1], \"h:mm A\").isSameOrBefore(moment(time, \"h:mm A\"));\n            if (!returnValue) {\n                outOfOrder = arr[idx - 1] + ' cannot be sequenced before ' + time;\n            }\n            return returnValue;\n        })\n        if (outOfOrder) {\n            this.props.actions.makeToast([{ message: outOfOrder, type: \"failure\" }]);\n            return;\n        } */\n\n        // Reorder the DisplaySequence value too!\n        flatMappedSchedules.forEach((element, index) => {\n            element.DisplaySequence = index + 1\n        });\n\n        const organizedDate = this.organizeSchedule(flatMappedSchedules);\n        const scheduleDateItems = organizedDate[0].Times.flatMap(t => t.Items);\n\n        let params = {\n            Schedules: scheduleDateItems\n        }\n\n        this.setState({\n            isSavingDrag: date\n        }, () => {\n            this.saveMeetings(params, () => {\n                this.setState({ isSavingDrag: false })\n            });\n        })\n    }\n\n    fetchCsv(showDates) {\n        let rows = [];\n        let meetingDate, meetingTime, lastDate, lastTime;\n\n        showDates.forEach(date => {\n            date.Times.forEach(time => {\n                time.Items.forEach(item => {\n                    //Leave Date and/or Time blank if previous meeting takes place at the same date and/or time\n                    let dateDate = moment(date.Date).format(\"MM/DD/YYYY\");\n                    meetingDate = !lastDate || !moment(dateDate).isSame(lastDate, 'day') ? dateDate : \"\";\n                    meetingTime = time.Time !== lastTime ? time.Time : \"\";\n\n                    rows.push({ Date: meetingDate, Time: item.IsCancelled ? \"Cancelled\" : moment(meetingTime, \"h:mm A\").isValid() ? moment(meetingTime, \"h:mm A\").tz('America/New_York', true).local().format(\"h:mm A\") : meetingTime, Meeting: item.OwnerName, Location: item.RoomDescription, Description: item.Description });\n\n                    lastDate = this.getScheduleDateTime(item).format(\"MM/DD/YYYY\");\n                    lastTime = item.ScheduleTime;\n                })\n            });\n        })\n\n        let fileName = showDates.length > 1 ? showDates[0].Date + \"-\" + showDates[showDates.length - 1].Date + \"_Schedule.csv\" : showDates[0].Date + \"_Schedule.csv\"\n\n        saveAs(new Blob([generateCsv([\"Date\", \"Time\", \"Meeting\", \"Location\", \"Description\"], rows)], { type: \"data:text/csv;charset=utf-8,\" }), fileName);\n    }\n\n    openScheduleModal() {\n        this.setState({\n            displayScheduleModal: true\n        })\n    }\n\n    closeScheduleModal() {\n        this.setState({\n            displayScheduleModal: false\n        })\n    }\n\n    toggleMeetingsCalendarPreview() {\n        this.setState({\n            displayMeetingsCalendarPreview: !this.state.displayMeetingsCalendarPreview\n        })\n    }\n\n    getPreview(date) {\n        this.setState({ gettingPreview: true }, () => {\n            this.props.actions.getMeetingsCalendarPreview(\"?startDate=\" + moment(date).format(\"MM/DD/YYYY\"))\n                .then(() => {\n                    if (this.props.schedule.meetingsCalendarPreview !== \"\") {\n                        this.props.schedule.meetingsCalendarPreview.body.getReader().read().then(({ value }) => {\n                            const blob = new Blob([value], { type: \"application/pdf\" });\n                            const urlObj = URL.createObjectURL(blob);\n                            this.setState({\n                                pdfSrc: urlObj,\n                                gettingPreview: false\n                            });\n                        }).catch(() => {\n                            this.setState({ gettingPreview: false })\n                        })\n                    } else {\n                        this.setState({ gettingPreview: false })\n                    }\n                }).catch(() => {\n                    this.setState({ gettingPreview: false })\n                })\n        })\n    }\n\n    componentDidMount() {\n        this.setState({\n            partner: Boolean(this.props.login.userClaims.resources.find(resource => resource === SCHEDULE_EDITOR))\n        })\n\n        this.props.actions.getScheduleTypeList().then(() => {\n            this.setState({\n                scheduleTypeList: Array.from(this.props.schedule.scheduleTypeList, obj => {\n                    const rObj = {\n                        ...obj,\n                        value: obj.ScheduleTypeID,\n                        label: obj.ScheduleType\n                    };\n                    return rObj;\n                })\n            })\n        })\n\n        this.props.actions.getMeetingRoomReferences('').then(() => {\n            const meetingRoomsList = Array.from(this.props.schedule.meetingRoomReferences, obj => {\n                const rObj = {\n                    ...obj,\n                    value: obj.VoteRoomID,\n                    label: obj.Description + ' ' + (obj.RoomNumber || '')\n                };\n                return rObj;\n            });\n            this.setState({\n                locationOptions: meetingRoomsList\n            });\n        })\n\n        this.props.actions.getSessionList()\n            .then(() => {\n                let selectedSession = '';\n                this.props.session.sessionList.forEach(session => {\n                    if (session.SessionCode === this.props.nav.session) {\n                        selectedSession = session;\n                    }\n                });\n\n                if (!selectedSession) {\n                    selectedSession = this.props.session.sessionList.find(s => s.IsDefault);\n                }\n\n                this.setState({\n                    sessionOptions: this.props.session.sessionList,\n                    selectedSession: selectedSession.SessionID\n                });\n                const sessionParam = \"sessionID=\" + selectedSession.SessionID;\n\n                this.getCommittees(sessionParam);\n            });\n\n        this.handleSearch();\n    }\n\n    setFormIsDirty(value) {\n        this.setState({\n            isDirty: value\n        })\n    }\n\n    closeConfirmation() {\n        this.setState({\n            showConfirmation: false\n        })\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    componentDidUpdate(prevProps) {\n        if (JSON.stringify(prevProps.login.userClaims.resources) !== JSON.stringify(this.props.login.userClaims.resources)) {\n            //Disable/Remove management controls if user logs out or otherwise loses Schedule role\n            const isPartner = Boolean(this.props.login.userClaims.resources.find(resource => resource === SCHEDULE_EDITOR));\n            this.setState({ partner: isPartner }, () => {\n                this.handleSearch();\n            })\n        }\n    }\n\n    render() {\n        const { isLoaded, organizedSchedule, currentDayIndex, locationOptions, showAllDates, committeeList, scheduleTypeList, meeting, isEditing, partner, isSaving, isSavingDrag, startDate, endDate, keyword, location, displayScheduleModal, displayMeetingsCalendarPreview } = this.state\n        //If the option to show all is selected then this array will contain every date. If the option to show one then this array will only contain one item\n        const showDates = showAllDates ? organizedSchedule : [organizedSchedule[currentDayIndex]];\n        return (\n            <div id=\"schedule-page\">\n                {this.state.showConfirmation &&\n                    <div className=\"schedule-modal\">\n                        <div className=\"schedule-modal-content\">\n                            <p>You have unsaved changes. Are you sure you want to close the form?</p>\n                            <button className=\"button secondary float-right\" onClick={() => this.closeConfirmation()}>No</button>\n                            <button className=\"button primary float-right\" onClick={() => this.toggleEditMeeting(true)} style={{ marginRight: \"10px\" }}>Yes</button>\n                            <br />\n                        </div>\n                    </div>\n                }\n                {displayMeetingsCalendarPreview ?\n                    <MeetingsCalendarPreview\n                        toggleMeetingsCalendarPreview={this.toggleMeetingsCalendarPreview}\n                        pdfSrc={this.state.pdfSrc}\n                        getPreview={this.getPreview}\n                        gettingPreview={this.state.gettingPreview}\n                    />\n                    :\n                    <React.Fragment>\n                        <br />\n                        {displayScheduleModal &&\n                            <ScheduleModal\n                                closeScheduleModal={this.closeScheduleModal}\n                            />\n                        }\n                        <div id=\"schedule-table\">\n                            <div className=\"inner-grid one-and-three no-margin\">\n                                <EventFinder\n                                    organizedSchedule={organizedSchedule}\n                                    handleChange={this.handleChange}\n                                    handleSearch={this.handleSearch}\n                                    handleReset={this.handleReset}\n                                    locationOptions={locationOptions}\n                                    isLoaded={isLoaded}\n                                    startDate={startDate}\n                                    endDate={endDate}\n                                    keyword={keyword}\n                                    location={location}\n                                />\n                                {isLoaded ?\n                                    <div>\n                                        <div className=\"section-side-padding\">\n                                            <div className=\"header-half\">\n                                                <div style={{ display: \"grid\" }}>\n                                                    <h2 style={{ marginBlockStart: '0px', marginBlockEnd: '0px' }}>Schedule of Events</h2>\n                                                    {tz !== \"America/New_York\" && <div><small><em>Times are displayed in your local timezone ({moment().tz(tz).format(\"zz\")})</em></small></div>}\n                                                </div>\n                                                <div className=\"align-right meeting-actions\">\n                                                    {this.props.login.userClaims.resources.find(resource => resource === SCHEDULE_EDITOR) &&\n                                                        <button\n                                                            type=\"button\"\n                                                            className=\"button\"\n                                                            style={{ marginRight: \"10px\", width: \"188px\", padding: \"8px 5px\" }}\n                                                            onClick={this.toggleMeetingsCalendarPreview}\n                                                        >Meeting Calendar Preview</button>\n                                                    }\n                                                    {partner &&\n                                                        <button\n                                                            type=\"button\"\n                                                            className=\"button\"\n                                                            style={{ marginRight: \"10px\" }}\n                                                            onClick={this.toggleEditMeeting}\n                                                        >Add Meeting</button>\n                                                    }\n                                                    <button className=\"button-link\" onClick={this.toggleAllDates}>{showAllDates ? \"Show Day\" : \"Show All\"}</button>\n                                                    {showDates[0] != undefined &&\n                                                        <React.Fragment>\n                                                            <a target=\"_blank\" onClick={() => this.fetchCsv(showDates)} style={{ marginLeft: \"10px\" }}>\n                                                                <span title=\"Download events as a spreadsheet\" aria-label=\"Download events as a spreadsheet\" role=\"button\" className=\"icon csv\"></span>\n                                                            </a>\n                                                            <button title=\"Add selected events to your calendar\" role=\"button\" aria-label=\"Add selected events to your calendar\" className=\"icon calendar\" /* target=\"_blank\" */ style={{ marginLeft: \"10px\" }} onClick={() => this.openScheduleModal()} />\n                                                        </React.Fragment>\n                                                    }\n                                                </div>\n                                            </div>\n                                        </div>\n                                        {isEditing && partner &&\n                                            <MeetingsForm\n                                                meeting={meeting}\n                                                committeeList={committeeList}\n                                                committeeDropDownOptions={this.state.committeeDropDownOptions || []}\n                                                locationList={locationOptions}\n                                                scheduleTypeList={scheduleTypeList}\n                                                isSaving={isSaving}\n                                                saveMeetings={this.saveMeetings}\n                                                createMeeting={this.createMeeting}\n                                                toggleEditMeeting={this.toggleEditMeeting}\n                                                userClaims={this.props.login.userClaims}\n                                                getSubcommitteeMembers={this.props.actions.getSubcommitteeMembers}\n                                                subcommitteeMembers={this.props.schedule.subcommitteeMembers}\n                                                setFormIsDirty={this.setFormIsDirty}\n                                                isDirty={this.state.isDirty}\n                                                handleFileChange={this.handleFileChange}\n                                                organizedSchedule={this.state.organizedSchedule}\n                                            />}\n                                        {this.state.scheduleError ?\n                                            <div className=\"center\">\n                                                <p>{this.state.scheduleError}</p>\n                                            </div>\n                                            :\n                                            <div className=\"schedule-content-wrapper\">\n                                                {showDates[0] != undefined\n                                                    ? showDates.map((currentDay, keyIndex) =>\n                                                        <div key={keyIndex}>\n                                                            <div className=\"day-wrapper\">\n                                                                {!showAllDates &&\n                                                                    <React.Fragment>\n                                                                        <div style={{ float: 'left' }}>\n                                                                            {organizedSchedule[currentDayIndex - 1] &&\n                                                                                <button aria-label=\"Previous day\" title=\"Previous day\" type=\"button\" onClick={() => this.changeDay(-1)} className=\"icon button-left\"></button>\n                                                                            }\n                                                                        </div>\n                                                                        <div style={{ float: 'right' }}>\n                                                                            {organizedSchedule[currentDayIndex + 1] &&\n                                                                                <button aria-label=\"Next day\" title=\"Next day\" type=\"button\" onClick={() => this.changeDay(1)} className=\"icon button-right\"></button>\n                                                                            }\n                                                                        </div>\n                                                                    </React.Fragment>\n                                                                }\n                                                                <div className=\"center mobile-left\">\n                                                                    <h4>{moment(currentDay.Date).format('dddd, MMMM Do, YYYY')}</h4>\n                                                                </div>\n                                                            </div>\n                                                            <div className=\"section-side-padding\">\n                                                                <div className=\"side-form\">\n                                                                    {partner ?\n                                                                        <PartnerSchedule\n                                                                            currentDay={currentDay}\n                                                                            session={this.props.nav.session}\n                                                                            openMeeting={this.openMeeting}\n                                                                            deleteMeeting={this.deleteMeeting}\n                                                                            toggleCancelMeeting={this.toggleCancelMeeting}\n                                                                            onDragEnd={this.onDragEnd}\n                                                                            isSaving={isSaving}\n                                                                            isSavingDrag={isSavingDrag}\n                                                                            calendarList={this.state.calendarList}\n                                                                            fullCommitteeList={this.state.fullCommitteeList}\n                                                                        />\n                                                                        :\n                                                                        <Schedule\n                                                                            currentDay={currentDay}\n                                                                            session={this.props.nav.session}\n                                                                            calendarList={this.state.calendarList}\n                                                                            fullCommitteeList={this.state.fullCommitteeList}\n                                                                        />\n                                                                    }\n                                                                </div>\n                                                            </div>\n                                                        </div>\n                                                    )\n                                                    :\n                                                    <p style={{ textAlign: \"center\" }}>Nothing Scheduled</p>\n                                                }\n                                            </div>\n                                        }\n                                    </div>\n                                    :\n                                    <div className=\"center-spinner spinner\">Loading...</div>\n                                }\n                            </div>\n                        </div>\n                    </React.Fragment>\n                }\n            </div>\n\n        );\n    }\n}\n\nclass EventFinder extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showSection: window.innerWidth <= 900 ? false : true //900px is when mobile layout is used (set in mobile.scss); collapse by default\n        };\n        this.toggleSection = this.toggleSection.bind(this);\n        this.searchOnEnterPress = this.searchOnEnterPress.bind(this);\n    }\n\n    searchOnEnterPress(event) {\n        if (event.key === 'Enter' && this.props.isLoaded) {\n            //Pressing enter while on a react-select will select an option. A search should not happen because of that.\n            if (!event.target.id.includes('react-select') && !event.target.className.includes('quick-search') && !event.target.id.includes('description')) {\n                this.props.handleSearch();\n            }\n        }\n    }\n\n    componentDidMount() {\n        document.querySelector('body').addEventListener('keydown', this.searchOnEnterPress);\n    }\n\n    componentWillUnmount() {\n        document.querySelector('body').removeEventListener('keydown', this.searchOnEnterPress);\n    }\n\n    toggleSection() {\n        this.setState(state => ({\n            showSection: !state.showSection\n        }));\n    }\n\n    render() {\n        const { locationOptions, handleChange, handleSearch, handleReset, startDate, endDate, keyword, location } = this.props;\n\n        const customStyles = {\n            option: (base, state) => ({\n                ...base,\n                fontSize: '0.8em',\n            }),\n            control: (base) => ({\n                ...base,\n                padding: '1px',\n                margin: 0,\n                minHeight: 0,\n                fontSize: '0.8em',\n            }),\n            singleValue: (base, state) => {\n                return { ...base, };\n            },\n            dropdownIndicator: base => ({\n                ...base,\n                padding: '0px 8px'\n            })\n        }\n\n        return (\n            <div className=\"section-side-padding\" style={{ paddingBottom: '0' }}>\n                <div className=\"dlas-forms side-form event-finder\">\n                    <div className=\"header flex-row flex-vertical-center\">\n                        <h3 className=\"center\" style={{ margin: 'auto' }}>Find an Event</h3>\n                        <button onClick={this.toggleSection} type=\"button\" className={this.state.showSection ? \"arrow-up white-chevron\" : \"arrow-down white-chevron\"}></button>\n                    </div>\n                    {this.state.showSection &&\n                        <div className=\"content\">\n                            <div>\n                                <div>\n                                    <label htmlFor=\"start-date-datepicker\">Start Date</label>\n                                    <DatePicker\n                                        selected={startDate}\n                                        onChange={(val) => handleChange(val, \"startDate\")}\n                                        id=\"start-date-datepicker\"\n                                    />\n                                </div>\n                                <div>\n                                    <label htmlFor=\"end-date-datepicker\">End Date</label>\n                                    <DatePicker\n                                        isClearable\n                                        selected={endDate}\n                                        onChange={(val) => handleChange(val, \"endDate\")}\n                                        id=\"end-date-datepicker\"\n                                        todayButton=\"Today\"\n                                    />\n                                </div>\n                            </div>\n                            <div>\n                                <div>\n                                    <label htmlFor=\"keyword-input\">Keyword</label>\n                                    <div>\n                                        <input\n                                            type=\"text\"\n                                            id=\"keyword-input\"\n                                            value={keyword}\n                                            onChange={(e) => handleChange(e.target.value, \"keyword\")}\n                                        />\n                                    </div>\n                                </div>\n                                <div>\n                                    <label htmlFor=\"location-dropdown\">Location</label>\n                                    <Select\n                                        id=\"location-dropdown\"\n                                        value={location}\n                                        options={locationOptions}\n                                        isMulti\n                                        onChange={(val) => handleChange(val || [], \"location\")}\n                                        styles={customStyles}\n                                    />\n                                </div>\n                            </div>\n                            <br />\n                            <div className=\"center flex-row\">\n                                <button onClick={handleReset} type=\"button\" className=\"button secondary\">Clear</button>\n                                <button onClick={handleSearch} type=\"button\" className=\"button\">Search</button>\n                            </div>\n                        </div>\n                    }\n                </div>\n            </div>);\n    }\n}\n\nclass PartnerSchedule extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showPopup: false,\n            selectedMeeting: {}\n        }\n\n        this.togglePopup = this.togglePopup.bind(this)\n    }\n\n    togglePopup(selectedMeeting) {\n        this.setState({\n            showPopup: !this.state.showPopup,\n            selectedMeeting: selectedMeeting\n        });\n    }\n\n    render() {\n        const { session, currentDay, openMeeting, deleteMeeting, toggleCancelMeeting, onDragEnd, isSaving, isSavingDrag, calendarList, fullCommitteeList } = this.props;\n        return (\n            <React.Fragment>\n                {this.state.showPopup &&\n                    <div className='popup'>\n                        <div className='popup-inner'>\n                            <p>Are you sure you want to delete this meeting?</p>\n                            <div className=\"inline-list\">\n                                <button className=\"button danger\" disabled={isSaving} onClick={() => { deleteMeeting(this.state.selectedMeeting, () => { this.togglePopup({}) }) }}>Yes</button>\n                                <button className=\"button\" disabled={isSaving} onClick={() => { this.togglePopup({}) }}>No</button>\n                            </div>\n                        </div>\n                    </div>}\n                <DragDropContext onDragEnd={result => onDragEnd(currentDay.Date, result)}>\n                    <Droppable droppableId={currentDay.Date} index={currentDay.Date}>\n                        {(provided) => (\n                            <div\n                                {...provided.droppableProps}\n                                ref={provided.innerRef}\n                            >\n                                {isSavingDrag && isSavingDrag.toString() === currentDay.Date.toString() ? <div className=\"spinner\" /> :\n                                    currentDay.Times.map((time, timeIndex) =>\n                                        time.Items.map((item, itemIndex) =>\n                                            !item.DeletionDate &&\n                                            <Draggable key={!timeIndex ? itemIndex : currentDay.Times.filter((t, idx) => idx < timeIndex).flatMap(t => t.Items).length + itemIndex} draggableId={item.ScheduleID.toString() || (currentDay.Date + '|' + time + '|' + itemIndex)} index={!timeIndex ? itemIndex : currentDay.Times.filter((t, idx) => idx < timeIndex).flatMap(t => t.Items).length + itemIndex}>\n                                                {(provided, snapshot) =>\n                                                    <div\n                                                        ref={provided.innerRef}\n                                                        {...provided.draggableProps}\n                                                        {...provided.dragHandleProps}\n                                                        style={getItemStyle(\n                                                            snapshot.isDragging,\n                                                            provided.draggableProps.style\n                                                        )}\n                                                        className=\"inner-grid no-grid-column-gap two-col-sidebar-backwards schedule-event\"\n                                                    >\n                                                        <div className=\"time-wrapper\">\n                                                            <span className=\"txt-greyed\">{TIME_REGEX.test(item.ScheduleTime) && item.ScheduleTime}</span>\n                                                        </div>\n                                                        <div className=\"items-wrapper\">\n                                                            <div className=\"schedule-event-grid\">\n                                                                <div>\n                                                                    <button id={\"schedule-dnd-\" + item.ScheduleID} className=\"button draggable\">Drag and drop</button>\n                                                                </div>\n                                                                <div>\n                                                                    {item.IsCancelled && <div><b className=\"fail\">CANCELLED</b></div>}\n                                                                    {item.OwnerName && <div><span className=\"schedule-title\">{item.OwnerName}</span></div>}\n                                                                    <span>\n                                                                        {item.RoomDescription && <React.Fragment>{item.RoomDescription + ' ' + (item.RoomNumber || '')}</React.Fragment>}\n                                                                        {item.RoomDescription && item.OwnerID !== undefined && <span className='mobile-newline'>&nbsp;|&nbsp;</span>}\n                                                                        {(item.ScheduleType === \"Committee\" || item.ScheduleType === \"Docket\") && item.OwnerID !== undefined &&\n                                                                            <Link to={`/session-details/${session}/committee-information/${item.CommitteeNumber}/committee-details`} target=\"_blank\">{fullCommitteeList.find(x => x.CommitteeID === item.OwnerID) && fullCommitteeList.find(x => x.CommitteeID === item.OwnerID).ParentCommitteeID !== null ? \"Subcommittee Info\" : \"Committee Info\"}</Link>\n                                                                        }\n                                                                        {item.LinkURL !== undefined && item.LinkURL !== \"\" &&\n                                                                            <React.Fragment>\n                                                                                {(item.ScheduleType === \"Committee\" || item.ScheduleType === \"Docket\") && item.OwnerID !== undefined\n                                                                                    ? <React.Fragment> | <Link to={item.LinkURL.substr(item.LinkURL.indexOf(\".gov\") + 4, item.LinkURL.length + 1)} target=\"_blank\">Docket Info</Link></React.Fragment>\n                                                                                    : <Link to={item.LinkURL.substr(item.LinkURL.indexOf(\".gov\") + 4, item.LinkURL.length + 1)} target=\"_blank\">Docket Info</Link>\n                                                                                }\n                                                                            </React.Fragment>\n                                                                        }\n                                                                    </span>\n                                                                    {!TIME_REGEX.test(item.ScheduleTime) &&\n                                                                        <div style={{ overflowWrap: 'anywhere', whiteSpace: 'pre-wrap' }}>\n                                                                            <span>{item.ScheduleTime}</span>\n                                                                        </div>}\n                                                                    {item.Description &&\n                                                                        <div style={{ overflowWrap: 'anywhere', whiteSpace: 'pre-wrap' }}>\n                                                                            <span>{renderHTML(item.Description)}</span>\n                                                                        </div>}\n                                                                </div>\n                                                                <div className=\"schedule-management-controls\">\n                                                                    <a className=\"icon edit\" onClick={() => openMeeting(item)} />\n                                                                    <React.Fragment>{item.IsCancelled ? <a className=\"icon blue-checkmark\" onClick={() => toggleCancelMeeting(item)} /> : <a className=\"icon blocked\" onClick={() => toggleCancelMeeting(item)} />} </React.Fragment>\n                                                                    <a className=\"icon bin\" onClick={() => this.togglePopup(item)} />\n                                                                </div>\n                                                            </div>\n                                                        </div>\n                                                    </div>\n                                                }\n                                            </Draggable>\n                                        )\n                                    )}\n                                {provided.placeholder}\n                            </div>\n                        )}\n                    </Droppable>\n                </DragDropContext>\n            </React.Fragment>\n        );\n    }\n}\n\nclass Schedule extends React.Component {\n\n    render() {\n        const { session, currentDay, calendarList, fullCommitteeList } = this.props;\n        return (\n            <div className=\"meeting-day\">\n                {currentDay.Times.map((time, timeIndex) =>\n                    time.Items.find(x => x.IsPublic === true) && /* If there is any public meeting in the time display it, otherwise don't show the time. */\n                    <React.Fragment key={timeIndex}>\n                        {time.Items.map((item, itemIndex) =>\n                            item.IsPublic &&\n                            <div className=\"inner-grid no-grid-column-gap two-col-sidebar-backwards-alt-2 schedule-event\">\n                                <div className=\"public-time-wrapper\">\n                                    <span className=\"txt-greyed\">{item.ScheduleTime}</span>\n                                </div>\n                                <div>\n                                    <div className=\"inner-grid no-grid-column-gap schedule-checkbox-and-content\">\n                                        <div key={itemIndex} className=\"public-schedule-event\">\n                                            {item.IsCancelled && <div><b className=\"fail\">CANCELLED</b></div>}\n                                            <div>\n                                                {item.OwnerName && <div><span className=\"schedule-title\">{item.OwnerName}</span></div>}\n                                                <span>\n                                                    {item.RoomDescription && <React.Fragment>{item.RoomDescription + ' ' + (item.RoomNumber || '')}</React.Fragment>}\n                                                    {item.RoomDescription && item.OwnerID !== undefined && <span className='mobile-newline'>&nbsp;|&nbsp;</span>}\n                                                    {(item.ScheduleType === \"Committee\" || item.ScheduleType === \"Docket\") && item.OwnerID !== undefined &&\n                                                        <Link to={`/session-details/${session}/committee-information/${item.CommitteeNumber}/committee-details`} target=\"_blank\">{fullCommitteeList.find(x => x.CommitteeID === item.OwnerID) && fullCommitteeList.find(x => x.CommitteeID === item.OwnerID).ParentCommitteeID !== null ? \"Subcommittee Info\" : \"Committee Info\"}</Link>\n                                                    }\n                                                    {item.LinkURL !== undefined && item.LinkURL !== \"\" &&\n                                                        <React.Fragment>\n                                                            {(item.ScheduleType === \"Committee\" || item.ScheduleType === \"Docket\") && item.OwnerID !== undefined\n                                                                ? <React.Fragment> | <Link to={item.LinkURL.substr(item.LinkURL.indexOf(\".gov\") + 4, item.LinkURL.length + 1)} target=\"_blank\">Docket Info</Link></React.Fragment>\n                                                                : <Link to={item.LinkURL.substr(item.LinkURL.indexOf(\".gov\") + 4, item.LinkURL.length + 1)} target=\"_blank\">Docket Info</Link>\n                                                            }\n                                                        </React.Fragment>\n                                                    }\n                                                </span>\n                                            </div>\n                                            {item.Description && <div style={{ overflowWrap: 'anywhere', whiteSpace: 'pre-wrap' }}><span>{renderHTML(item.Description)}</span></div>}\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        )}\n                    </React.Fragment>\n                )\n                }\n            </div>\n\n\n        );\n    }\n}\n\nclass ScheduleModal extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showInstructions: false\n        }\n\n        this.close = this.close.bind(this);\n        this.toggleInstructions = this.toggleInstructions.bind(this)\n    }\n\n    close() {\n        this.props.closeScheduleModal();\n    }\n\n    toggleInstructions() {\n        this.setState({\n            showInstructions: !this.state.showInstructions\n        })\n    }\n\n    render() {\n        const icsLink = window.env?.APP_ENV?.toLowerCase() === \"production\" ? \"lis.blob.core.windows.net/cdn/meetings.ics\" : \"liscdn.blob.core.windows.net/cdn/meetings.ics\";\n        return (\n            <div className=\"schedule-modal\">\n                <div id=\"calendar-instructions\" className=\"schedule-modal-content\">\n                    <p>Add a new calendar in your calendar program that automatically reflects additions and updates to the website calendar.</p>\n                    <span>Download: </span><br />\n                    <a href={\"webcal://\" + icsLink}>webcal://{icsLink}</a>\n                    <br />\n                    <a href={\"https://\" + icsLink}>https://{icsLink}</a>\n                    <br />\n                    <br />\n                    {this.state.showInstructions\n                        ? <button type=\"button\" className=\"button-link\" onClick={() => this.toggleInstructions()}>Hide</button>\n                        : <button type=\"button\" className=\"button-link\" onClick={() => this.toggleInstructions()}>Show Instructions</button>\n                    }\n                    {this.state.showInstructions &&\n                        <div className=\"calendar-instructions\">\n                            <p>In most cases, just selecting the webcal link will add a new calendar in your calendar application and subscribe to updates.</p>\n                            <p>To subscribe in Google Calendar or Mozilla Thunderbird - Lightning Calendar, copy the link and paste it into the appropriate address or location field in the calendar application.</p>\n\n                            <p>For specific instructions, see:</p>\n                            <ul>\n                                <li>For specific Outlook instructions, see Office Support: <a href=\"https://support.office.com/en-sg/article/View-and-subscribe-to-Internet-Calendars-7cd5d35a-4a90-4d70-a2f7-f6fadd7e2d9an\">View and subscribe to Internet calendars.</a></li>\n                                <li>Google Calendar Help: <a href=\"https://support.google.com/calendar/answer/37100?hl=en\">Subscribe to public calendars using the calendar address.</a></li>\n                                <li>Mozilla Support: <a href=\"https://support.mozilla.org/en-US/kb/adding-a-holiday-calendar\">Adding a holiday [or other] calendar.</a></li>\n                                <li>On an Android device, you may not be able to subscribe by clicking the webcal link. Subscribe in Google Calendar, and then sync your calendars using a calendar app on your device.</li>\n                            </ul>\n\n                            <p>To unsubscribe, in your calendar program, delete the calendar.</p>\n                            <p>If you use more than one calendar program (for example, Google Calendar and Outlook), you can control which program a browser opens when you subscribe via an iCalendar URL.</p>\n                            <p>In your browser, follow instructions for how to set which programs handle specific file types and protocols.</p>\n                            <p>For the .ics file and/or webcal protocol handler, set the calendar program you prefer.</p>\n\n                            <p>Tip: In Lightning, you may need to use the https:// link, as opposed to webcal://.</p>\n                            <p>Tip: You can set different .ics and webcal handlers in each browser you use.</p>\n                            <p>Tip: On the iPhone or iPad, to unsubscribe go to your device Settings. In Mail, Contacts, and Calendars, under Subscribed Calendars, delete the calendar account.</p>\n                        </div>\n                    }\n                    <div>\n                        <br />\n                        <button className=\"button secondary\" type=\"button\" onClick={() => this.close()}>Close</button>\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { committee, nav, schedule, session, login } = state;\n        return {\n            committee,\n            nav,\n            schedule,\n            session,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, committeeActionCreators, sessionActionCreators, scheduleActionCreators), dispatch)\n        }\n    }\n)(PublicSchedule)","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { voteActionCreators } from '../../stores/lis-votes-store';\n\nimport Select from 'react-select';\nimport { memberActionCreators } from '../../stores/lis-members-store';\nimport moment from 'moment-timezone';\nimport { cancelRequest } from '../../services/request.service';\n\nclass PublicVoteSearch extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            memberOptions: [],\n            sessionOptions: [],\n            voteTypeOptions: [\n                { label: 'All', value: 'All' },\n            ],\n            selectedMembers: '',\n            selectedSession: '',\n            selectedVoteType: { label: 'All', value: 'All' },\n            searchSelectedMember: '',\n            searchSelectedSession: '',\n            searchSelectedVoteType: '',\n        };\n\n        this.getMembers = this.getMembers.bind(this);\n        this.handleDropdownChange = this.handleDropdownChange.bind(this);\n        this.handleSearch = this.handleSearch.bind(this);\n    }\n\n    componentDidMount() {\n        // Get the session list for the session dropdown\n        this.props.actions.getSessionList()\n            .then(() => {\n                if (this.props.session.sessionListError) {\n                    throw this.props.session.sessionListError.toString();\n                }\n                let selectedSession = '';\n                let sessionList = [...this.props.session.sessionList];\n                sessionList.forEach(session => {\n                    session.value = session.SessionID;\n                    session.label = session.SessionYear + ' ' + session.DisplayName;\n                    if (session.SessionCode === this.props.match.params.sessioncode) {\n                        selectedSession = session;\n                    }\n                });\n                this.setState({\n                    selectedSession: selectedSession,\n                    sessionOptions: sessionList.reverse(),\n                }, () => {\n                    if (selectedSession) {\n                        // Get the list of members for the member dropdown\n                        // Use the selected session's start date\n                        this.getMembers(selectedSession.SessionID);\n                    } else {\n                        this.setState({\n                            isLoaded: true\n                        })\n                    }\n                });\n\n\n            });\n\n        // Get the list of vote type options for the vote type dropdown\n        this.props.actions.getVoteTypes()\n            .then(() => {\n                let voteTypeOptions = this.state.voteTypeOptions;\n                this.props.votes.voteTypes.forEach(type => {\n                    type.label = type.Name;\n                    type.value = type.VoteTypeID;\n                    voteTypeOptions.push(type);\n                });\n                this.setState({\n                    voteTypeOptions: voteTypeOptions\n                });\n            });\n\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    getMembers(sessionId) {\n        this.props.actions.getMemberList('sessionID=' + sessionId)\n            .then(() => {\n                if (this.props.members.memberListError) {\n                    throw this.props.members.memberListError.toString();\n                }\n                let memberList = [...this.props.members.memberList];\n                let selectedMember = '';\n                memberList.forEach(member => {\n                    member.label = `(${member.ChamberCode}) ${member.ListDisplayName}`;\n                    member.value = member.MemberID;\n                    if (member.MemberNumber === this.props.match.params.membernumber) {\n                        selectedMember = member;\n                    }\n                });\n                this.setState({\n                    memberOptions: memberList,\n                    selectedMember: selectedMember,\n                    isLoaded: true\n                }, () => {\n                    // Do a search if there is a selected member and session\n                    if (selectedMember) {\n                        this.handleSearch();\n                    }\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n                this.setState({\n                    message: err,\n                    isLoaded: true\n                });\n            });\n    }\n\n    handleDropdownChange(val, key) {\n        if (window.env && window.env.HISTORICAL_DATA_REDIRECT && key === 'selectedSession' && val && !val.IsDefault && val.LegacySessionID) {\n            this.setState({\n                historicalSessionRedirect: (redirect) => {\n                    if (redirect) {\n                        let a = document.createElement('a');\n                        a.target = '_blank';\n                        a.href = `https://legacylis.virginia.gov`;\n                        document.body.appendChild(a);\n                        a.click();\n                        document.body.removeChild(a);\n                    }\n                    this.setState({ historicalSessionRedirect: false })\n                }\n            })\n            return;\n        }\n        this.setState({\n            [key]: val\n        });\n        if (key === 'selectedSession') {\n            this.props.history.push(`/vote-search/${val.SessionCode}`);\n            this.getMembers(val.SessionID);\n            this.setState({\n                selectedMember: ''\n            })\n        }\n        if (key === 'selectedMember') {\n            this.props.history.push(`/vote-search/${this.state.selectedSession.SessionCode}/${val.MemberNumber}`);\n        }\n    }\n\n    handleSearch(e) {\n        if (this.state.selectedMember && this.state.selectedSession) {\n            let params = `?memberId=${this.state.selectedMember.MemberID}&sessionId=${this.state.selectedSession.SessionID}`\n            if (this.state.selectedVoteType && this.state.selectedVoteType.value !== 'All') {\n                params += `&voteTypeId=${this.state.selectedVoteType.VoteTypeID}`;\n            }\n            this.setState({\n                isSearching: true\n            });\n            this.props.actions.getMemberVotes(params)\n                .then(() => {\n                    if (this.props.members.memberVotesError) {\n                        throw this.props.members.memberVotesError.toString();\n                    }\n                    this.setState({\n                        isSearching: false,\n                        searchSelectedMember: this.state.selectedMember,\n                        searchSelectedSession: this.state.selectedSession,\n                        searchSelectedVoteType: this.state.selectedVoteType,\n                        memberVotes: this.props.members.memberVotes\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err);\n                    this.setState({\n                        message: err,\n                        isSearching: false\n                    })\n                });\n        }\n        if (e) {\n            e.preventDefault();\n        }\n    }\n\n    render() {\n        const customStyles = {\n            container: base => ({\n                ...base,\n                lineHeight: 'normal',\n            }),\n            option: (base, state) => ({\n                ...base,\n                fontSize: '0.8em',\n            }),\n            control: (base) => ({\n                ...base,\n                padding: '1px',\n                margin: 0,\n                minHeight: 0,\n                fontSize: '0.8em',\n            }),\n            singleValue: (base, state) => {\n                return { ...base, };\n            },\n            dropdownIndicator: base => ({\n                ...base,\n                padding: '0px 8px'\n            })\n        }\n        const { isSearching, memberOptions, sessionOptions, voteTypeOptions, selectedMember, selectedSession, selectedVoteType } = this.state;\n        if (this.state.message) {\n            return (<div className=\"center\">{this.state.message}</div>)\n        }\n        if (!this.state.isLoaded) {\n            return (<div className=\"center-spinner spinner\">Loading...</div>)\n        }\n        return (\n            <div>\n                {this.state.historicalSessionRedirect &&\n                    <div className=\"schedule-modal\">\n                        <div className=\"schedule-modal-content fit-content center-content\">\n                            <p>For historical data, please use <b>Legacy LIS</b>, available at <b><a href=\"https://legacylis.virginia.gov\" target=\"_blank\" rel=\"noreferrer\">https://legacylis.virginia.gov</a></b>.</p>\n                            <p>Click 'Go' to be taken to Legacy LIS, or 'Close' to remain here.</p>\n                            <div className=\"inline-list\">\n                                <button className=\"button primary float-right\" onClick={() => this.state.historicalSessionRedirect(true)}>Go</button>\n                                <button className=\"button secondary float-right\" onClick={() => this.state.historicalSessionRedirect(false)}>Close</button>\n                            </div>\n                            <br />\n                        </div>\n                    </div>\n                }\n                <div className=\"dlas-forms side-form\">\n                    <div className=\"header\">\n                        <h3 className=\"center\">Find a Member's Votes</h3>\n                    </div>\n                    <form>\n                        <div className=\"inner-grid four\" style={{ backgroundColor: '#f3f5f5', padding: '1em' }}>\n                            <div>\n                                <label htmlFor=\"session-dropdown\">Session</label>\n                                <Select\n                                    id=\"session-dropdown\"\n                                    styles={customStyles}\n                                    options={sessionOptions}\n                                    value={selectedSession}\n                                    onChange={val => this.handleDropdownChange(val, 'selectedSession')}\n                                />\n                            </div>\n                            <div>\n                                <label htmlFor=\"member-dropdown\">Member</label>\n                                <Select\n                                    id=\"member-dropdown\"\n                                    styles={customStyles}\n                                    options={memberOptions}\n                                    value={selectedMember}\n                                    onChange={val => this.handleDropdownChange(val, 'selectedMember')}\n                                />\n                            </div>\n                            <div>\n                                <label htmlFor=\"vote-type-dropdown\">Vote Type</label>\n                                <Select\n                                    id=\"vote-type-dropdown\"\n                                    styles={customStyles}\n                                    options={voteTypeOptions}\n                                    value={selectedVoteType}\n                                    onChange={val => this.handleDropdownChange(val, 'selectedVoteType')}\n                                />\n                            </div>\n                            <div>\n                                <br />\n                                <div>\n                                    <button\n                                        disabled={!selectedMember || !selectedSession || !selectedVoteType || isSearching}\n                                        onClick={this.handleSearch}\n                                        type=\"submit\"\n                                        className=\"button\">Search</button>\n                                </div>\n                            </div>\n                        </div>\n                    </form>\n                </div>\n                <br />\n                {isSearching ?\n                    <div className=\"center-spinner spinner\">Searching...</div>\n                    :\n                    <React.Fragment>\n                        {this.state.memberVotes &&\n                            <VoteSearchResults\n                                memberVotes={this.state.memberVotes}\n                                selectedMember={this.state.searchSelectedMember}\n                                selectedSession={this.state.searchSelectedSession}\n                                selectedVoteType={this.state.searchSelectedVoteType} />\n                        }\n                    </React.Fragment>\n                }\n            </div>);\n    }\n}\n\nclass VoteSearchResults extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            showVotes: [],\n            hideAll: true\n        }\n        this.showVotes = this.showVotes.bind(this);\n        this.toggleShow = this.toggleShow.bind(this);\n    }\n\n    showVotes(dateIndex) {\n        let showVotes = [...this.state.showVotes];\n        showVotes[dateIndex] = !showVotes[dateIndex];\n        this.setState({\n            showVotes: showVotes\n        });\n    }\n\n    toggleShow() {\n        // Votes are hidden by default. Toggle the value of hideAll and set all the values of showVotes to the current value of hideAll\n        // So if hideAll is true, then set all of showVotes to true and switch hideAll to false\n        const opposite = !this.state.hideAll\n        let showVotes = [...this.state.showVotes];\n        this.props.memberVotes.VoteResult.forEach((v, index) => {\n            showVotes[index] = this.state.hideAll;\n        });\n        this.setState({\n            hideAll: opposite,\n            showVotes: showVotes\n        })\n    }\n\n    organizeVotes(voteList) {\n        // The votes need to be organized by date\n        let organizedVotes = [];\n        if (voteList) {\n            voteList.sort((a, b) => {\n                return new Date(b.VoteDate) - new Date(a.VoteDate);\n            });\n            let voteArray = [];\n            let previousVote = voteList[0];\n            voteList.forEach(vote => {\n                if (moment(previousVote.VoteDate).format('L') !== moment(vote.VoteDate).format('L')) {\n                    let newDateContainer = {\n                        Votes: voteArray,\n                        Date: previousVote.VoteDate,\n                    };\n                    organizedVotes.push(newDateContainer);\n                    voteArray = [];\n                    voteArray.push(vote);\n                } else {\n                    voteArray.push(vote);\n                }\n                previousVote = vote;\n            });\n            if (voteArray.length > 0) {\n                let newDateContainer = {\n                    Votes: voteArray,\n                    Date: previousVote.VoteDate,\n                };\n                organizedVotes.push(newDateContainer);\n            }\n        }\n        return organizedVotes;\n    }\n\n    shouldComponentUpdate(nextProps, nextState) {\n        if (nextProps.memberVotes !== this.props.memberVotes) {\n            return true;\n        }\n        if (nextState !== this.state) {\n            return true;\n        }\n        return false;\n    }\n\n    render() {\n        const { memberVotes, selectedMember, selectedSession, selectedVoteType } = this.props;\n        let memberName = '';\n        if (selectedMember.ChamberCode === 'S') {\n            memberName = \"Senator \";\n        }\n        if (selectedMember.ChamberCode === 'H') {\n            memberName = \"Delegate \";\n        }\n        memberName += memberVotes.MemberDisplayName;\n        const organizedVotes = this.organizeVotes(memberVotes.VoteResult)\n\n        return (\n            <div id=\"vote-search\">\n                <div className=\"header-half\">\n                    <h2>{memberName}</h2>\n                    <p>{`${selectedSession.label}: ${selectedVoteType.label} Votes`}</p>\n                </div>\n                <div className=\"collapsible-table\">\n                    <div className=\"vote-search\">\n                        {organizedVotes.length === 0 ?\n                            <span className=\"center\">No Votes Found</span>\n                            :\n                            <React.Fragment>\n                                <div className=\"flex-row\">\n                                    <div></div>\n                                    {this.state.hideAll ?\n                                        <button onClick={this.toggleShow} type=\"button\" className=\"button-link\">Show All +/-</button>\n                                        :\n                                        <button onClick={this.toggleShow} type=\"button\" className=\"button-link\">Hide All +/-</button>\n                                    }\n                                </div>\n                                <hr />\n                                <div className=\"vote-search-date-item inner-grid two-col-sidebar-backwards\">\n                                    <div className=\"date-column-header\">\n                                        <span className=\"txt-greyed\">Date</span>\n                                    </div>\n                                    <div className=\"section-row inner-grid vote-search-grid-header\">\n                                        <span className=\"txt-greyed\">Bill #</span>\n                                        <span className=\"txt-greyed\">Bill Title</span>\n                                        <span className=\"txt-greyed\">Vote</span>\n                                        <span className=\"txt-greyed\">Type</span>\n                                        <span className=\"txt-greyed\">Action</span>\n                                        <span className=\"txt-greyed center\">Vote Statement</span>\n                                    </div>\n                                </div>\n                            </React.Fragment>\n                        }\n                        {organizedVotes.map((date, dateIndex) =>\n                            <React.Fragment key={dateIndex}>\n                                <hr />\n                                {this.state.showVotes[dateIndex] ?\n                                    <div className=\"vote-search-date-item flex-row\" style={{ backgroundColor: '#f3f5f5', cursor: 'pointer' }} onClick={() => this.showVotes(dateIndex)}>\n                                        <span style={{ fontWeight: 800 }} className=\"txt-greyed\">{moment(date.Date).format(\"MM/DD/YYYY\")}</span>\n                                        <button aria-expanded={true} className=\"arrow-up\">Hide bills</button>\n                                    </div>\n                                    :\n                                    <div className=\"vote-search-date-item flex-row\" style={{ cursor: 'pointer' }} onClick={() => this.showVotes(dateIndex)}>\n                                        <span style={{ fontWeight: 800 }} className=\"txt-greyed\">{moment(date.Date).format(\"MM/DD/YYYY\")}</span>\n                                        <button aria-expanded={false} className=\"arrow-down\">Show bills</button>\n                                    </div>\n                                }\n                                <div className=\"inner-grid two-col-sidebar-backwards\">\n                                    <div className=\"date-column-header\"></div>\n                                    {this.state.showVotes[dateIndex] ?\n                                        <div>\n                                            {date.Votes.map((vote, voteIndex) =>\n                                                <React.Fragment key={voteIndex}>\n                                                    <div className=\"inner-grid section-row vote-search-grid\">\n                                                        <span>{vote.LegislationNumber ? <Link to={`/bill-details/${selectedSession.SessionCode}/${vote.LegislationNumber}`}>{vote.LegislationNumber}</Link> : \"\"}</span>\n                                                        <span title={vote.LegislationNumber ? vote.LegislationDescription : \"\"}>{vote.LegislationNumber ? vote.LegislationDescription : vote.ClassificationName}</span>\n                                                        <span>{vote.ResponseCode}</span>\n                                                        <span>{vote.VoteType}</span>\n                                                        <Link to={`/vote-details/${vote.LegislationNumber ? vote.LegislationNumber : 0}/${selectedSession.SessionCode}/${vote.VoteNumber}`} title={vote.VoteDescription}>{vote.VoteDescription}</Link>\n                                                        <span>{vote.VoteStatement && <Link to={`/vote-details/${vote.LegislationNumber ? vote.LegislationNumber : 0}/${selectedSession.SessionCode}/${vote.VoteNumber}`}>Vote Statement</Link>}</span>\n                                                    </div>\n                                                    {voteIndex !== date.Votes.length - 1 && <hr />}\n                                                </React.Fragment>\n                                            )}\n                                        </div>\n                                        :\n                                        <div></div>\n                                    }\n                                </div>\n                            </React.Fragment>\n                        )}\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { members, session, votes } = state;\n        return {\n            members,\n            session,\n            votes\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, voteActionCreators, memberActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(PublicVoteSearch)\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport Select from 'react-select';\nimport { memberActionCreators } from '../../stores/lis-members-store';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\n\nimport { cancelRequest } from '../../services/request.service';\n\nclass PublicMemberLegislation extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoaded: false,\n            chamberOptions: [\n                { label: 'Delegates', value: 'H' },\n                { label: 'Senators', value: 'S' }\n            ],\n            hideBills: [],\n            collapseAll: false,\n            showPrefileOnly: false\n        };\n\n        this.setupDoc = this.setupDoc.bind(this);\n        this.handleChamberChange = this.handleChamberChange.bind(this);\n        this.toggleAll = this.toggleAll.bind(this);\n        this.toggleRow = this.toggleRow.bind(this);\n        this.toggleShowPrefile = this.toggleShowPrefile.bind(this);\n    }\n\n    setupDoc(sessionCode) {\n        this.setState({\n            isLoaded: false\n        });\n        this.props.actions.getSessionByCode(sessionCode).then(() => {\n            let chamberCode = this.props.match.params.chambercode;\n            const sessionData = this.props.session.selectedSession;\n            this.props.actions.getMemberLegislation('sessionID=' + sessionData.SessionID + '&chamberCode=' + chamberCode)\n                .then(() => {\n                    if (this.props.members.memberLegislationError) {\n                        throw this.props.members.memberLegislationError;\n                    }\n                    if (this.props.members.memberLegislation.length === 0) {\n                        throw 'No Legislation Found';\n                    }\n                    this.setState({\n                        isLoaded: true,\n                        hideBills: new Array(this.props.members.memberLegislation.length).fill(true),\n                        collapseAll: true\n                    });\n                })\n                .catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.setState({\n                        isLoaded: true,\n                        message: err.toString()\n                    });\n                    console.log(err.toString());\n                });\n        });\n    }\n\n    handleChamberChange(value) {\n        this.props.history.push('/session-details/' + this.props.nav.session + '/member-legislation/' + value.value);\n    }\n\n    toggleAll() {\n        const opposite = !this.state.collapseAll;\n        let hideBills = [...this.state.hideBills];\n        hideBills.fill(opposite);\n        this.setState({\n            collapseAll: opposite,\n            hideBills: hideBills\n        });\n    }\n\n    toggleRow(index) {\n        let hideBills = [...this.state.hideBills];\n        hideBills[index] = !hideBills[index];\n        this.setState({\n            hideBills: hideBills\n        });\n    }\n\n    toggleShowPrefile() {\n        this.setState(state => ({\n            showPrefileOnly: !state.showPrefileOnly\n        }));\n    }\n\n    componentDidUpdate(prevProps) {\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push('/session-details/' + this.props.nav.session + '/member-legislation/' + this.props.match.params.chambercode);\n            this.setupDoc(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            if (this.props.match.params.sessioncode) {\n                this.props.actions.changeSession(this.props.match.params.sessioncode);\n            }\n        } else if (this.props.match.params.chambercode !== prevProps.match.params.chambercode) {\n            this.setupDoc(this.props.nav.session);\n        }\n    }\n\n    componentDidMount() {\n        //Update the session selector component, which will run componentDidUpdate and call setupDoc on its own\n        const sessionCode = this.props.match.params.sessioncode\n        if (sessionCode) {\n            if (this.props.nav.session !== sessionCode) {\n                this.props.actions.changeSession(sessionCode)\n            } else {\n                this.setupDoc(sessionCode);\n            }\n        }\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { isLoaded, message, chamberOptions, hideBills, collapseAll } = this.state;\n        const chamberCode = this.props.match.params.chambercode;\n        if (message) {\n            return (<div className=\"center\">{message}</div>)\n        }\n        const filteredMembers = this.props.members.memberLegislation.filter(member => member.ChamberCode === chamberCode)\n        return (\n            <div>\n                <br />\n                <div className=\"toolbar minutes-toolbar dlas-forms flex-row\">\n                    <label htmlFor=\"chamber-dropdown\" className=\"screen-reader-only\">Chamber</label>\n                    <Select\n                        value={chamberOptions.find(chamber => chamber.value === this.props.match.params.chambercode)}\n                        options={chamberOptions}\n                        id=\"chamber-dropdown\"\n                        onChange={this.handleChamberChange}\n                        isDisabled={!isLoaded}\n                    />\n                    <div className=\"checkbox\">\n                        <input id=\"sr-only-prefile\" style={{ verticalAlign: 'bottom' }} onChange={this.toggleShowPrefile} type=\"checkbox\" checked={this.state.showPrefileOnly} />\n                        <label htmlFor=\"sr-only-prefile\">Only Show Prefile</label>\n                    </div>\n                </div>\n                <br />\n                {isLoaded ?\n                    <div className=\"collapsible-table\">\n                        <div className=\"flex-row\">\n                            <div></div>\n                            <button type=\"button\" onClick={this.toggleAll} className=\"button-link\">{collapseAll ? \"Show Bills\" : \"Hide Bills\"} +/-</button>\n                        </div>\n                        {filteredMembers.map((member, memberIndex) => {\n                            const totalBills = member.Legislation.filter(leg => leg.LegislationClass === \"Legislation\").length;\n                            const prefiledBills = member.Legislation.filter(leg => leg.IsPrefile && leg.LegislationClass === \"Legislation\").length;\n                            const nonPrefiledBills = member.Legislation.filter(leg => !leg.IsPrefile && leg.LegislationClass === \"Legislation\").length;\n                            const memberBills = this.state.showPrefileOnly ? member.Legislation.filter(leg => leg.IsPrefile) : member.Legislation;\n                            return (<div key={memberIndex}>\n                                <div className={(!hideBills[memberIndex] ? \"opened \" : '') + \"flex-row section-header\"}>\n                                    <div>\n                                        <span>\n                                            <Link to={`/session-details/${this.props.nav.session}/member-information/${member.MemberNumber}/member-details`}>\n                                                {member.MemberDisplayName}\n                                            </Link>\n                                        </span>\n                                    </div>\n                                    <div>\n                                        <div className=\"extra-info\">\n                                            <span>Prefiled: {prefiledBills}/Not Prefiled: {nonPrefiledBills}/Total: {totalBills}</span>\n                                            <button aria-expanded={!!hideBills[memberIndex]} onClick={() => this.toggleRow(memberIndex)} className={hideBills[memberIndex] ? \"arrow-down\" : \"arrow-up\"}>Show bills</button>\n                                        </div>\n                                    </div>\n                                </div>\n                                {!hideBills[memberIndex] ?\n                                    <div className=\"section-body\">\n                                        {memberBills.map((leg, legIndex) =>\n                                            <div key={legIndex} className=\"section-row inner-grid small-two-one\">\n                                                <Link to={`/bill-details/${leg.SessionCode}/${leg.LegislationNumber}`}>{leg.LegislationNumber}</Link>\n                                                <span>{leg.Description}</span>\n                                                <span style={{ textAlign: 'right' }} className=\"txt-greyed\">{leg.IsPrefile ? \"Prefiled\" : \"Not Prefiled\"}</span>\n                                            </div>\n                                        )}\n                                    </div>\n                                    :\n                                    <div className=\"section-body\">\n                                        <div className=\"section-row\"></div>\n                                    </div>\n                                }\n                            </div>)\n                        })}\n                    </div>\n                    :\n                    <div className=\"center-spinner spinner\">Loading...</div>\n                }\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { members, session, nav } = state;\n        return {\n            members,\n            session,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, memberActionCreators, sessionActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(PublicMemberLegislation)\n","import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { Link } from 'react-router-dom';\nimport ReactToPrint from \"react-to-print\";\nimport { connect } from 'react-redux';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { communicationsActionCreators } from '../../stores/lis-communications-store';\nimport { cancelRequest } from '../../services/request.service';\n\nimport renderHTML from 'react-render-html';\nimport CommunicationsDetailsComponent from '../../lis-shared/lis-communications/lis-communications-details';\n\nclass PublicCommunicationDetails extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoaded: false,\n            communication: '',\n            communicationFile: '',\n            clerkInfo: {}\n        };\n    }\n\n    componentDidMount() {\n        window.scrollTo(0, 0);\n        const params = `?referenceNumber=${this.props.match.params.commid}&sessionCode=${this.props.match.params.sessioncode}`;\n        this.props.actions.getComm(params)\n        .then(() => {\n            this.props.actions.getSessionById(this.props.communications.commGet.SessionID);\n            const commGet = this.props.communications.commGet;\n            if(commGet.CommunicationCategories.length === 0) {\n                //If the communication does not have any categories then it is assumed that this is a legacy file and the data needs to be retrieved from file storage.\n                const htmlFile = commGet.CommunicationFiles.find(file => file.FileURL.toUpperCase().includes('.HTM'));\n                if(htmlFile) {\n                    this.props.actions.getFile(htmlFile.FileURL)\n                    .then(() => {\n                        this.setState({\n                            communicationFile: this.props.nav.file,\n                            isLoaded: true\n                        });\n                    }).catch(err => {\n                        if(err !== 'Aborted') {\n                            throw err.toString();\n                        }\n                    });\n                }\n            }\n            // Attempt to retrieve the json file in blob storage to get the signatures\n            const jsonFile = commGet.CommunicationFiles.find(file => file.FileURL.toUpperCase().includes('.JSON'));\n            if(jsonFile) {\n                this.props.actions.getFile(jsonFile.FileURL)\n                .then(() => {\n                    const json = JSON.parse(this.props.nav.file);\n                    this.setState({\n                        clerkInfo: {\n                            ClerkName: json.ClerkName,\n                            ClerkTitle: json.ClerkTitle,\n                            FooterSentence: json.FooterSentence\n                        }\n                    });\n                })\n                \n            }\n            this.setState({\n                communication: commGet,\n                isLoaded: true\n            });\n        }).catch(err => {\n            if(err === 'Aborted') {\n                return;\n            }\n            this.setState({\n                message: 'communication not found: ' + err.toString(),\n                isLoaded: true\n            });\n        });\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        const { selectedSession } = this.props.session;\n        const { isLoaded, message, clerkInfo } = this.state;\n        let communication = {\n            ...this.state.communication,\n            ClerkName: clerkInfo.ClerkName,\n            ClerkTitle: clerkInfo.ClerkTitle,\n            FooterSentence: clerkInfo.FooterSentence\n        }\n        if (!isLoaded) {\n            return (<div className=\"center-spinner spinner\">Loading...</div>)\n        }\n        if (message) {\n            return (<div className=\"center\">{message}</div>)\n        }\n        return (\n            <div className='generic-details-page'>\n                <div>\n                    <ReactToPrint\n                        trigger={() => <button type=\"button\" className=\"button print float-right\"> Print</button>}\n                        content={() => this.componentRef}\n                        pageStyle={\"break-inside: avoid\"}                        \n                    />\n                </div>\n                <div ref={el => (this.componentRef = el)}>\n                    {this.state.communicationFile ?\n                        <div className='details-page-data-container'>{renderHTML(this.state.communicationFile)}</div>\n                        :\n                        <CommunicationsDetailsComponent\n                            session={selectedSession}\n                            communication={communication}\n                        />\n                    }\n                </div>\n            </div>);\n    }\n}\n\n\nexport default connect(\n    (state) => {\n        const { session, nav, communications } = state;\n        return {\n            session,\n            nav,\n            communications\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, navActionCreators, communicationsActionCreators), dispatch)\n        }\n    }\n)(PublicCommunicationDetails)\n","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst chamberStatsSuccess = 'CHAMBER_STATS_SUCCESS';\nconst chamberStatsFailure = 'CHAMBER_STATS_FAILURE';\n\nconst committeeStatsSuccess = 'COMMITTEE_STATS_SUCCESS';\nconst committeeStatsFailure = 'COMMITTEE_STATS_FAILURE';\n\nconst initialState = {\n    stat: [],\n    statsError: '',\n    committeeStats: [],\n    committeeStatsError: ''\n};\n\nexport const statActionCreators = {\n\n    receiveChamberStats: (content) => ({\n        type: chamberStatsSuccess,\n        chamberStats: content\n    }),\n\n    chamberStatsError: (message) => ({\n        type: chamberStatsFailure,\n        chamberStatsError: message\n    }),\n\n    getChamberStats: (params) => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_STATS_API_URL) + '/Statistics/api/getchamberstatisticsasync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(statActionCreators.chamberStatsError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(statActionCreators.receiveChamberStats(result[1].ChamberStatistics));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(statActionCreators.receiveChamberStats([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    receiveCommitteeStats: (content) => ({\n        type: committeeStatsSuccess,\n        committeeStats: content\n    }),\n\n    committeeStatsError: (message) => ({\n        type: committeeStatsFailure,\n        committeeStatsError: message\n    }),\n\n    getCommitteeStats: (params) => {\n        return dispatch => {\n            return publicRequest((API_URL || process.env.REACT_APP_STATS_API_URL) + '/Statistics/api/getcommitteestatisticsasync', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(statActionCreators.committeeStatsError(result[1]));\n                        return Promise.reject(result[1]);\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(statActionCreators.receiveCommitteeStats(result[1].CommitteeStatistics));\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(statActionCreators.receiveCommitteeStats([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    }\n};\n\n\nexport const reducer = (state, action) => {\n\n    state = state || initialState;\n    switch (action.type) {\n        case chamberStatsSuccess:\n            return Object.assign({}, state, {\n                chamberStats: action.chamberStats,\n                chamberStatsError: ''\n            })\n        case chamberStatsFailure:\n            return Object.assign({}, state, {\n                chamberStatsError: action.statsError\n            })\n        case committeeStatsSuccess:\n            return Object.assign({}, state, {\n                committeeStats: action.committeeStats,\n                committeeStatsError: ''\n            })\n        case committeeStatsFailure:\n            return Object.assign({}, state, {\n                committeeStatsError: action.statsError\n            })\n        default:\n            return state\n    }\n};","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { statActionCreators } from '../../stores/lis-statistics-store';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\n\n\nclass CommitteeStatDetails extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoading: true,\n            stats: [],\n            sessionData: '',\n            totals: ''\n        };\n\n        this.setupPage = this.setupPage.bind(this);\n    }\n\n    setupPage(sessionCode) {\n        this.setState({\n            isLoading: true\n        });\n        this.props.actions.getSessionByCode(sessionCode).then(() => {\n            this.setState({\n                sessionData: this.props.session.selectedSession\n            }, () => {\n                this.props.actions.getCommitteeStats('?sessionId=' + this.state.sessionData.SessionID + '&chambercode=' + this.props.match.params.chambercode)\n                    .then(() => {\n                        let totals = {\n                            ContinuedFromTotal: 0,\n                            HReferredTotal: 0,\n                            SReferredTotal: 0,\n                            HInCommitteeTotal: 0,\n                            SInCommitteeTotal: 0,\n                            HInSubCommitteeTotal: 0,\n                            SInSubCommitteeTotal: 0,\n                            HReportedTotal: 0,\n                            SReportedTotal: 0,\n                            HIncorporatedTotal: 0,\n                            SIncorporatedTotal: 0,\n                            HFailedTotal: 0,\n                            SFailedTotal: 0,\n                            ContinuedToTotal: 0\n                        }\n                        this.props.stats.committeeStats.sort((a, b) => a.CommitteeName.localeCompare(b.CommitteeName))\n                        this.props.stats.committeeStats.forEach(stat => {\n                            totals.ContinuedFromTotal += stat.HContinuedFrom += stat.SContinuedFrom || 0;\n                            totals.HReferredTotal += stat.HReferred || 0;\n                            totals.SReferredTotal += stat.SReferred || 0;\n                            totals.HInCommitteeTotal += stat.HInCommittee || 0;\n                            totals.SInCommitteeTotal += stat.SInCommittee || 0;\n                            totals.HInSubCommitteeTotal += stat.HInSubCommittee || 0;\n                            totals.SInSubCommitteeTotal += stat.SInSubCommittee || 0;\n                            totals.HReportedTotal += stat.HReported || 0;\n                            totals.SReportedTotal += stat.SReported || 0;\n                            totals.HIncorporatedTotal += stat.HIncorporated || 0;\n                            totals.SIncorporatedTotal += stat.SIncorporated || 0;\n                            totals.HFailedTotal += stat.HFailed || 0;\n                            totals.SFailedTotal += stat.SFailed || 0;\n                            totals.ContinuedToTotal += stat.HContinued += stat.SContinued || 0;\n                        });\n                        this.setState({\n                            stats: this.props.stats.committeeStats,\n                            totals: totals,\n                            isLoading: false\n                        });\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.setState({\n                            isLoading: false,\n                            message: this.props.stats.committeeStatsError\n                        })\n                    });\n            });\n        });\n    }\n\n    componentDidMount() {\n        if (this.props.match.params.sessioncode) {\n            //Update the session selector component, which will run componentDidUpdate and call setupPage on its own\n            if (this.props.nav.session !== this.props.match.params.sessioncode) {\n                this.props.actions.changeSession(this.props.match.params.sessioncode)\n            } else {\n                this.setupPage(this.props.match.params.sessioncode);\n            }\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        if (this.props.match.params.chambercode !== prevProps.match.params.chambercode) {\n            this.setupPage(this.props.match.params.sessioncode);\n        }\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push('/session-details/' + this.props.nav.session + '/statistics/committee/' + this.props.match.params.chambercode)\n            this.setupPage(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            if (this.props.match.params.sessioncode) {\n                this.props.actions.changeSession(this.props.match.params.sessioncode);\n            }\n        }\n    }\n\n    render() {\n        if (this.state.isLoading) {\n            return (<div aria-label=\"Loading\" className=\"center-spinner spinner\"></div>)\n        }\n        if (this.state.message) {\n            return (<div className=\"center\">{this.state.message}</div>)\n        }\n        return (\n            <div>\n                <br />\n                <div className=\"full\">\n                    <table className=\"statistics-table\">\n                        <caption>\n                            <h1>\n                                {this.state.sessionData && <span className=\"statistics-header\">{this.state.sessionData.SessionYear} {this.state.sessionData.DisplayName}</span>}\n                                <span className=\"statistics-header\">{this.props.match.params.chambercode.toLowerCase() === \"s\" ? \" Senate\" : \" House\"} Committee Statistics</span>\n                            </h1>\n                            {this.props.match.params.chambercode.toLowerCase() === \"s\" &&\n                                <Link to={`/session-details/${this.props.match.params.sessioncode}/statistics/committee/h`}>House Committee Statistics</Link>\n                            }\n                            {this.props.match.params.chambercode.toLowerCase() === \"h\" &&\n                                <Link to={`/session-details/${this.props.match.params.sessioncode}/statistics/committee/s`}>Senate Committee Statistics</Link>\n                            }\n                            <span> | </span>\n                            <Link to={`/session-details/${this.props.match.params.sessioncode}/statistics/status`}>Session Statistics</Link>\n                        </caption>\n                        <tbody>\n                            <tr>\n                                <th colSpan=\"1\" rowSpan=\"2\"></th>\n                                {this.state.totals.ContinuedFromTotal > 0 && <th rowSpan=\"2\">Continued From {this.state.sessionData.SessionYear - 1}</th>}\n                                <th colSpan=\"2\">Referred</th>\n                                <th colSpan=\"2\">In Committee</th>\n                                <th colSpan=\"2\">In Subcommittee</th>\n                                <th colSpan=\"2\">Reported</th>\n                                <th colSpan=\"2\">Incorporated</th>\n                                <th colSpan=\"2\">Failed</th>\n                                {this.state.totals.ContinuedToTotal > 0 && <th rowSpan=\"2\">Continued To {this.state.sessionData.SessionYear + 1}</th>}\n                            </tr>\n                            <tr>\n                                <th>H</th>\n                                <th>S</th>\n                                <th>H</th>\n                                <th>S</th>\n                                <th>H</th>\n                                <th>S</th>\n                                <th>H</th>\n                                <th>S</th>\n                                <th>H</th>\n                                <th>S</th>\n                                <th>H</th>\n                                <th>S</th>\n                            </tr>\n                            {this.state.stats.map((stat, statIndex) =>\n                                <tr key={statIndex}>\n                                    <td className=\"homepage-links\"><Link to={`/session-details/${this.props.match.params.sessioncode}/committee-information/${stat.CommitteeNumber}/committee-details`}>{stat.CommitteeName}</Link></td>\n                                    {this.state.totals.ContinuedFromTotal > 0 && <td>{stat.HContinuedFrom + stat.SContinuedFrom}</td>}\n                                    <td>{stat.HReferred}</td>\n                                    <td>{stat.SReferred}</td>\n                                    <td>{stat.HInCommittee}</td>\n                                    <td>{stat.SInCommittee}</td>\n                                    <td>{stat.HInSubCommittee}</td>\n                                    <td>{stat.SInSubCommittee}</td>\n                                    <td>{stat.HReported}</td>\n                                    <td>{stat.SReported}</td>\n                                    <td>{stat.HIncorporated}</td>\n                                    <td>{stat.SIncorporated}</td>\n                                    <td>{stat.HFailed}</td>\n                                    <td>{stat.SFailed}</td>\n                                    {this.state.totals.ContinuedToTotal > 0 && <td>{stat.HContinued + stat.SContinued}</td>}\n                                </tr>\n                            )}\n                            <tr>\n                                <td>Total for all {this.props.match.params.chambercode.toLowerCase() === \"s\" && \"Senate\"}{this.props.match.params.chambercode.toLowerCase() === \"h\" && \"House\"} Committees</td>\n                                {this.state.totals.ContinuedFromTotal > 0 && <td>{this.state.totals.ContinuedFromTotal}</td>}\n                                <td>{this.state.totals.HReferredTotal}</td>\n                                <td>{this.state.totals.SReferredTotal}</td>\n                                <td>{this.state.totals.HInCommitteeTotal}</td>\n                                <td>{this.state.totals.SInCommitteeTotal}</td>\n                                <td>{this.state.totals.HInSubCommitteeTotal}</td>\n                                <td>{this.state.totals.SInSubCommitteeTotal}</td>\n                                <td>{this.state.totals.HReportedTotal}</td>\n                                <td>{this.state.totals.SReportedTotal}</td>\n                                <td>{this.state.totals.HIncorporatedTotal}</td>\n                                <td>{this.state.totals.SIncorporatedTotal}</td>\n                                <td>{this.state.totals.HFailedTotal}</td>\n                                <td>{this.state.totals.SFailedTotal}</td>\n                                {this.state.totals.ContinuedToTotal > 0 && <td>{this.state.totals.ContinuedToTotal}</td>}\n                            </tr>\n                        </tbody>\n                    </table>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { stats, nav, session } = state;\n        return {\n            stats,\n            nav,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, statActionCreators, navActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(CommitteeStatDetails)\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport { statActionCreators } from '../../stores/lis-statistics-store';\nimport { sessionActionCreators } from '../../stores/lis-session-store';\nimport { billActionCreators } from '../../stores/lis-legislation-store';\n\nclass SessionStatDetails extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isLoading: true,\n            stats: [],\n            sessionData: '',\n            totals: '',\n            billStatusCategoryList: []\n        };\n\n        this.setupPage = this.setupPage.bind(this);\n    }\n\n    setupPage(sessionCode) {\n        this.setState({\n            isLoading: true\n        }, () => {\n            this.props.actions.getBillStatusCategoryReferences()\n                .then(() => {\n                    let billStatusReferences = [...this.props.bills.billStatusCategoryReferences]\n                    billStatusReferences.forEach(ref => {\n                        ref.label = ref.Name\n                        ref.value = ref.LegislationCategoryID\n                    });\n                    this.setState({\n                        billStatusCategoryList: billStatusReferences,\n                    }, () => {\n                        this.props.actions.getSessionByCode(sessionCode).then(() => {\n                            this.setState({\n                                sessionData: this.props.session.selectedSession\n                            }, () => {\n                                this.props.actions.getChamberStats('?sessionId=' + this.state.sessionData.SessionID)\n                                    .then(() => {\n                                        let totals = {\n                                            ContinuedFromTotal: 0,\n                                            IntroducedTotal: 0,\n                                            InCommitteeTotal: 0,\n                                            PassedHouseTotal: 0,\n                                            PassedSenateTotal: 0,\n                                            PassedTotal: 0,\n                                            IncorporatedTotal: 0,\n                                            FailedTotal: 0,\n                                            PendingTotal: 0,\n                                            ApprovedTotal: 0,\n                                            VetoTotal: 0,\n                                            ContinuedToTotal: 0\n                                        }\n                                        this.props.stats.chamberStats.forEach(stat => {\n                                            totals.ContinuedFromTotal += stat.ContinuedFromLastSession || 0,\n                                                totals.IntroducedTotal += stat.Introduced || 0,\n                                                totals.InCommitteeTotal += stat.InCommittee || 0,\n                                                totals.PassedHouseTotal += stat.PassedHouse || 0,\n                                                totals.PassedSenateTotal += stat.PassedSenate || 0,\n                                                totals.PassedTotal += stat.Passed || 0,\n                                                totals.IncorporatedTotal += stat.Incorporated || 0,\n                                                totals.FailedTotal += stat.Failed || 0,\n                                                totals.PendingTotal += stat.Pending || 0,\n                                                totals.ApprovedTotal += stat.Approved || 0,\n                                                totals.VetoTotal += stat.Veto || 0,\n                                                totals.ContinuedToTotal += stat.ContinuedToNextSession || 0\n                                        })\n                                        this.setState({\n                                            stats: this.props.stats.chamberStats,\n                                            isLoading: false,\n                                            totals: totals\n                                        });\n                                    }).catch(err => {\n                                        if (err === 'Aborted') {\n                                            return;\n                                        }\n                                        this.setState({\n                                            isLoading: false,\n                                            message: this.props.stats.chamberStatsError\n                                        })\n                                    });\n                            });\n\n                        });\n                    });\n                })\n        });\n    }\n\n    componentDidMount() {\n        if (this.props.match.params.sessioncode) {\n            //Update the session selector component\n            if (this.props.nav.session !== this.props.match.params.sessioncode) {\n                this.props.actions.changeSession(this.props.match.params.sessioncode)\n            }\n            this.setupPage(this.props.match.params.sessioncode);\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        // Setup the page if the global selected session changes. Change the URL to reflect the session change\n        if (prevProps.nav.session !== this.props.nav.session) {\n            this.props.history.push('/session-details/' + this.props.nav.session + '/statistics/status/')\n            this.setupPage(this.props.nav.session);\n        } else if (this.props.nav.session !== this.props.match.params.sessioncode) {\n            // If the url changes then update the global selected session with whatever the url is\n            if (this.props.match.params.sessioncode) {\n                this.props.actions.changeSession(this.props.match.params.sessioncode);\n            }\n        }\n    }\n\n    render() {\n        if (this.state.isLoading) {\n            return (<div aria-label=\"Loading\" className=\"center-spinner spinner\"></div>)\n        }\n\n        const makeLink = (statusCategoryName, currentStatus) => {\n            let statusCategoryId;\n            if (statusCategoryName) {\n                const statusCategory = this.state.billStatusCategoryList.find(category => category.Name.toLowerCase() === statusCategoryName.toLowerCase());\n                statusCategoryId = statusCategory ? statusCategory.LegislationCategoryID : 99;\n            }\n\n            const params = {\n                selectedSession: this.props.session ? this.props.session.SessionID : '',\n                selectedBillStatusCategory: statusCategoryId,\n                currentStatus: currentStatus || false,\n                allLegislation: !statusCategoryName ? true : false,\n                uniqueSearch: Math.random()\n            };\n\n            const json = JSON.stringify(params);\n            const query = window.btoa(json);\n\n            return '/bill-search?q=' + query;\n        };\n\n        const sessionHeader = this.state.sessionData ? this.state.sessionData.SessionYear + ' ' + this.state.sessionData.DisplayName + ' Statistics' : '';\n\n        return (\n            <div>\n                {!this.state.isLoading ?\n                    <React.Fragment>\n                        <br />\n                        <table className=\"statistics-table\">\n                            <caption>\n                                <h1>{sessionHeader}</h1>\n                                <Link to={`/session-details/${this.props.match.params.sessioncode}/statistics/committee/h`}>House Committee Statistics</Link>\n                                <span> | </span>\n                                <Link to={`/session-details/${this.props.match.params.sessioncode}/statistics/committee/s`}>Senate Committee Statistics</Link>\n                            </caption>\n                            <tbody>\n                                <tr className=\"homepage-links\">\n                                    <th>Type</th>\n                                    {this.state.totals.ContinuedFromTotal > 0 && <th><Link to={makeLink(\"Continued from last session\", false)}>Continued from Last Session</Link></th>}\n                                    <th><Link to={makeLink(\"Introduced\", false)}>Introduced</Link></th>\n                                    <th><Link to={makeLink(\"Passed House\", false)}>Passed House</Link></th>\n                                    <th><Link to={makeLink(\"Passed Senate\", false)}>Passed Senate</Link></th>\n                                    <th><Link to={makeLink(\"Passed\", false)}>Passed</Link></th>\n                                    <th><Link to={makeLink(\"Incorporated\", false)}>Incorporated</Link></th>\n                                    <th><Link to={makeLink(\"Failed\", false)}>Failed</Link></th>\n                                    <th><Link to={makeLink(\"Pending\", true)}>Pending</Link></th>\n                                    <th><Link to={makeLink(\"Approved or Enacted\", false)}>Approved</Link></th>\n                                    <th><Link to={makeLink(\"Vetoed\", false)}>Vetoed</Link></th>\n                                    {this.state.totals.ContinuedToTotal > 0 && <th><Link to={makeLink(\"Continued to next session\", true)}>Continued to Next Session</Link></th>}\n                                </tr>\n                                {this.state.stats.map(stat =>\n                                    <tr>\n                                        <td>{stat.ChamberCode}.{stat.LegislationTypeCode}{stat.LegislationTypeCode === \"J\" && \".R\"}</td>\n                                        {this.state.totals.ContinuedFromTotal > 0 && <td>{stat.ContinuedFromLastSession}</td>}\n                                        <td>{stat.Introduced}</td>\n                                        <td>{stat.PassedHouse}</td>\n                                        <td>{stat.PassedSenate}</td>\n                                        <td>{stat.Passed}</td>\n                                        <td>{stat.Incorporated}</td>\n                                        <td>{stat.Failed}</td>\n                                        <td>{stat.Pending}</td>\n                                        <td>{stat.Approved}</td>\n                                        <td>{stat.Veto}</td>\n                                        {this.state.totals.ContinuedToTotal > 0 && <td>{stat.ContinuedToNextSession}</td>}\n                                    </tr>\n                                )}\n                                <tr>\n                                    <td>Totals</td>\n                                    {this.state.totals.ContinuedFromTotal > 0 && <td>{this.state.totals.ContinuedFromTotal}</td>}\n                                    <td>{this.state.totals.IntroducedTotal}</td>\n                                    <td>{this.state.totals.PassedHouseTotal}</td>\n                                    <td>{this.state.totals.PassedSenateTotal}</td>\n                                    <td>{this.state.totals.PassedTotal}</td>\n                                    <td>{this.state.totals.IncorporatedTotal}</td>\n                                    <td>{this.state.totals.FailedTotal}</td>\n                                    <td>{this.state.totals.PendingTotal}</td>\n                                    <td>{this.state.totals.ApprovedTotal}</td>\n                                    <td>{this.state.totals.VetoTotal}</td>\n                                    {this.state.totals.ContinuedToTotal > 0 && <td>{this.state.totals.ContinuedToTotal}</td>}\n                                </tr>\n                            </tbody>\n                        </table>\n                    </React.Fragment>\n                    : <div aria-label=\"Loading\" className=\"center-spinner spinner\" />\n                }\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { stats, nav, session, bills } = state;\n        return {\n            stats,\n            nav,\n            session,\n            bills\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, statActionCreators, navActionCreators, sessionActionCreators, billActionCreators), dispatch)\n        }\n    }\n)(SessionStatDetails)\n","import React from \"react\";\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { navActionCreators } from \"../../stores/lis-nav-store\";\nimport { Link } from \"react-router-dom\";\n\nclass Unauthorized extends React.Component {\n    render() {\n        return (\n            <div className=\"center\">\n                <h2>You do not have permission to view this page.</h2>\n                <Link to=\"/home\">Home</Link>\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav } = state;\n        return {\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators), dispatch)\n        }\n    }\n)(Unauthorized)","import React from \"react\";\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { navActionCreators } from \"../../stores/lis-nav-store\";\nimport { Link } from \"react-router-dom\";\nimport renderHTML from 'react-render-html';\nimport { collectionActionCreators } from \"../../stores/lis-collection-store\";\nimport moment from \"moment-timezone\";\nimport { sessionActionCreators } from \"../../stores/lis-session-store\";\nimport { authActionCreators } from \"../../stores/lis-auth-store\";\n\nclass WatchlistsComponent extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.state = {\n            sessionOptions: [],\n            watchlists: [],\n            filteredWatchlists: [],\n            filteredWatchlistsValue: \"\",\n            nameSort: false,\n            descSort: false,\n            dateSort: false,\n            billNumberSort: false,\n            viewCrossReferenceList: false,\n            expandedWatchlists: [],\n            legislationList: [],\n            expandedBills: [],\n            filteredBills: [],\n            filteredBillsValue: \"\",\n            expandAllWatchlists: false,\n            expandAllBills: false,\n            loadingCollections: true,\n            showPopup: false\n        }\n\n        this.getWatchlists = this.getWatchlists.bind(this);\n        this.filterWatchlist = this.filterWatchlist.bind(this);\n        this.filterBills = this.filterBills.bind(this);\n        this.sortByName = this.sortByName.bind(this);\n        this.sortByDesc = this.sortByDesc.bind(this);\n        this.sortByDate = this.sortByDate.bind(this);\n        this.sortByBillNumber = this.sortByBillNumber.bind(this);\n        this.toggleBillList = this.toggleBillList.bind(this);\n        this.toggleCrossReferenceList = this.toggleCrossReferenceList.bind(this);\n        this.toggleWatchlistList = this.toggleWatchlistList.bind(this);\n        this.toggleWatchlist = this.toggleWatchlist.bind(this);\n        this.togglePopup = this.togglePopup.bind(this);\n        this.deleteWatchlists = this.deleteWatchlists.bind(this);\n        this.updateCrossReferenceList = this.updateCrossReferenceList.bind(this);\n    }\n\n    componentDidMount() {\n        if (!this.props.session.sessionList || !this.props.session.sessionList.length) {\n            this.props.actions.getSessionList()\n                .then(() => {\n                    this.setState({\n                        sessionOptions: this.props.session.sessionList\n                    }, () => {\n                        this.getWatchlists();\n                    })\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err)\n                });\n        } else {\n            this.setState({\n                sessionOptions: this.props.session.sessionList\n            }, () => {\n                this.getWatchlists();\n            })\n        }\n    }\n\n    componentDidUpdate(prevProps) {\n        if (prevProps.nav.session != this.props.nav.session) {\n            this.setState({ loadingCollections: true }, () => {\n                this.getWatchlists();\n            })\n        }\n    }\n\n    getWatchlists() {\n        if (this.props.nav.session) {\n            const selectedSession = this.state.sessionOptions.find(s => s.SessionCode === this.props.nav.session);\n            if (selectedSession) {\n                this.props.actions.getCollections(\"?SessionID=\" + selectedSession.SessionID)\n                    .then(() => {\n                        this.setState({\n                            watchlists: this.props.collection.collections,\n                            filteredWatchlists: this.props.collection.collections,\n                            filteredWatchlistsValue: \"\"\n                        }, () => {\n                            this.updateCrossReferenceList();\n                        })\n                    })\n            }\n        }\n    }\n\n    updateCrossReferenceList() {\n        let legislationList = [];\n        for (let i = 0; i < this.state.watchlists.filter(w => !w.DeletionDate).length; i++) {\n            for (let j = 0; j < this.state.watchlists.filter(w => !w.DeletionDate)[i].WatchListLegislation.length; j++) {\n                let legislationIndex = legislationList.findIndex(x => x.LegislationNumber === this.state.watchlists.filter(w => !w.DeletionDate)[i].WatchListLegislation[j].LegislationNumber);\n                if (legislationIndex >= 0) {\n                    legislationList[legislationIndex].watchlists.push(this.state.watchlists.filter(w => !w.DeletionDate)[i]);\n                } else {\n                    let newLegislation = JSON.parse(JSON.stringify(this.state.watchlists.filter(w => !w.DeletionDate)[i].WatchListLegislation[j]));\n                    newLegislation.watchlists = [this.state.watchlists.filter(w => !w.DeletionDate)[i]];\n                    legislationList.push(newLegislation);\n                }\n            }\n        }\n\n        this.setState({\n            legislationList: legislationList,\n            loadingCollections: false\n        })\n    }\n\n    filterWatchlist(e) {\n        const val = e.target.value.toLowerCase();\n        this.setState({\n            // Map is used to preserve the original index\n            filteredWatchlists: this.state.watchlists.map(coll => {\n                if ((coll.Description && coll.Description.toLowerCase().includes(val)) || (coll.Name && coll.Name.toLowerCase().includes(val))) {\n                    return coll;\n                }\n            }),\n            filteredWatchlistsValue: val\n        })\n    }\n\n    filterBills(e) {\n        const val = e.target.value.toLowerCase();\n        this.setState({\n            // Map is used to preserve the original index\n            filteredBills: this.state.legislationList.map(b => {\n                if ((b.LegislationNumber && b.LegislationNumber.toLowerCase().includes(val)) || (b.Description && renderHTML(b.Description.toLowerCase()).includes(val))) {\n                    return b;\n                }\n            }),\n            filteredBillsValue: val\n        })\n    }\n\n    sortByName() {\n        this.setState({\n            filteredWatchlists: this.state.filteredWatchlists.sort((a, b) => !this.state.nameSort ? a.Name?.localeCompare(b.Name) : b.Name?.localeCompare(a.Name)),\n            nameSort: !this.state.nameSort,\n            descSort: false,\n            dateSort: false\n        })\n    }\n\n    sortByDesc() {\n        this.setState({\n            filteredWatchlists: this.state.filteredWatchlists.sort((a, b) => !this.state.descSort ? a.Description?.localeCompare(b.Description) : b.Description?.localeCompare(a.Description)),\n            descSort: !this.state.descSort,\n            nameSort: false,\n            dateSort: false\n        })\n    }\n\n    sortByDate() {\n        this.setState({\n            filteredWatchlists: this.state.filteredWatchlists.sort((a, b) => moment(a.ModificationDate).isBefore(b.ModificationDate) ? this.state.dateSort ? -1 : 1 : this.state.dateSort ? 1 : -1),\n            dateSort: !this.state.dateSort,\n            nameSort: false,\n            descSort: false\n        })\n    }\n\n    sortByBillNumber() {\n        this.setState({\n            filteredBills: this.state.filteredBills.sort((a, b) => a.LegislationNumber > b.LegislationNumber ? this.state.billNumberSort ? -1 : 1 : this.state.billNumberSort ? 1 : -1),\n            legislationList: this.state.legislationList.sort((a, b) => a.LegislationNumber > b.LegislationNumber ? this.state.billNumberSort ? -1 : 1 : this.state.billNumberSort ? 1 : -1),\n            billNumberSort: !this.state.billNumberSort\n        })\n    }\n\n    toggleBillList(watchListIDsParam, toggleAll) {\n        let watchListIDs;\n\n        if (!Array.isArray(watchListIDsParam)) {\n            watchListIDs = [watchListIDsParam];\n        } else {\n            watchListIDs = watchListIDsParam;\n        }\n\n        let expandedWatchlists = [...this.state.expandedWatchlists];\n\n        for (let i = 0; i < watchListIDs.length; i++) {\n            if (!expandedWatchlists.find(x => x.WatchListID === watchListIDs[i])) {\n                let watchlist = this.state.filteredWatchlists.find(x => x && x.WatchListID === watchListIDs[i]);\n                watchlist.expanded = true;\n                expandedWatchlists.push(watchlist);\n            } else {\n                expandedWatchlists.find(x => x.WatchListID === watchListIDs[i]).expanded = toggleAll !== undefined ? toggleAll : !expandedWatchlists.find(x => x.WatchListID === watchListIDs[i]).expanded;\n            }\n        }\n\n        this.setState({\n            expandedWatchlists: expandedWatchlists\n        })\n    }\n\n    toggleCrossReferenceList() {\n        this.setState({\n            viewCrossReferenceList: !this.state.viewCrossReferenceList\n        })\n    }\n\n    toggleWatchlist(watchlistIndex) {\n        let watchlists = this.state.filteredWatchlistsValue.length > 0 ? this.state.filteredWatchlists.filter(x => x != undefined) : this.state.watchlists;\n        watchlists[watchlistIndex].checked = !watchlists[watchlistIndex].checked;\n\n        this.setState({ [this.state.filteredWatchlistsValue.length ? 'filteredWatchlistsValue' : 'watchlists']: watchlists })\n    }\n\n    togglePopup() {\n        this.setState({\n            showPopup: !this.state.showPopup\n        });\n    }\n\n    deleteWatchlists() {\n        let watchlists = this.state.filteredWatchlistsValue.length > 0 ? this.state.filteredWatchlists.filter(x => x != undefined) : this.state.watchlists;\n        let watchlistsToDelete = watchlists.filter(w => w.checked);\n        if (watchlistsToDelete.length) {\n            this.setState({ deletingWatchlists: true }, () => {\n                watchlistsToDelete.forEach(wl => wl.DeletionDate = moment());\n                this.props.actions.saveCollections({ WatchLists: watchlistsToDelete })\n                    .then(() => {\n                        watchlists = watchlists.filter(wl => !wl.checked && !wl.DeletionDate);\n                        this.props.actions.makeToast([{ message: \"Delete Successful\", type: \"success\" }]);\n                        this.setState({\n                            [this.state.filteredWatchlistsValue.length ? 'filteredWatchlistsValue' : 'watchlists']: watchlists,\n                            deletingWatchlists: false,\n                        }, () => {\n                            this.togglePopup();\n                            this.updateCrossReferenceList();\n                        });\n                    }).catch(err => {\n                        if (err === 'Aborted') {\n                            return;\n                        }\n                        this.setState({\n                            deletingWatchlists: false\n                        });\n                        this.props.actions.makeToast([{ message: \"Delete Failed\", type: \"failure\" }]);\n                    });\n            })\n        }\n    }\n\n    toggleWatchlistList(legislationNumbersParam, toggleAll) {\n        let legislationNumbers;\n\n        if (!Array.isArray(legislationNumbersParam)) {\n            legislationNumbers = [legislationNumbersParam];\n        } else {\n            legislationNumbers = legislationNumbersParam;\n        }\n\n        let expandedBills = [...this.state.expandedBills];\n\n        for (let i = 0; i < legislationNumbers.length; i++) {\n            if (!expandedBills.find(x => x.LegislationNumber === legislationNumbers[i])) {\n                let bill = this.state.legislationList.find(x => x.LegislationNumber === legislationNumbers[i]);\n                bill.expanded = true;\n                expandedBills.push(bill);\n            } else {\n                expandedBills.find(x => x.LegislationNumber === legislationNumbers[i]).expanded = toggleAll !== undefined ? toggleAll : !expandedBills.find(x => x.LegislationNumber === legislationNumbers[i]).expanded;\n            }\n        }\n\n        this.setState({\n            expandedBills: expandedBills\n        })\n    }\n\n    toggleExpandAll(crossRefList) {\n        if (crossRefList) {\n            let legNumbers = [];\n            this.state.legislationList.forEach(x => {\n                if (x.watchlists.length > 0) {\n                    legNumbers.push(x.LegislationNumber)\n                }\n            })\n            this.setState({\n                expandAllBills: !this.state.expandAllBills\n            }, () => {\n                this.toggleWatchlistList(legNumbers, this.state.expandAllBills)\n            })\n        } else {\n            let watchlists = [];\n            this.state.filteredWatchlists.forEach(x => {\n                if (x && x.WatchListLegislation.length > 0) {\n                    watchlists.push(x.WatchListID);\n                }\n            })\n            this.setState({\n                expandAllWatchlists: !this.state.expandAllWatchlists\n            }, () => {\n                this.toggleBillList(watchlists, this.state.expandAllWatchlists)\n            })\n        }\n    }\n\n    render() {\n        let watchlists = this.state.filteredWatchlistsValue.length > 0 ? this.state.filteredWatchlists.filter(x => x != undefined) : this.state.watchlists;\n        let bills = this.state.filteredBillsValue.length > 0 ? this.state.filteredBills.filter(x => x != undefined) : this.state.legislationList;\n        let sessionCode = this.props.nav.session;\n\n        const { isProfilePage } = this.props;\n\n        return (\n            <div className=\"homepage-links\">\n                {this.state.showPopup &&\n                    <div className='popup'>\n                        <div className='popup-inner'>\n                            <p style={{ fontSize: '16px' }}>Are you sure you want to delete? Once a Watchlist is deleted it cannot be restored.</p>\n                            <div className=\"inline-list\">\n                                <button className=\"button danger\" disabled={this.state.deletingWatchlists} onClick={this.deleteWatchlists}>Yes</button>\n                                <button className=\"button secondary\" disabled={this.state.deletingWatchlists} onClick={this.togglePopup}>No</button>\n                            </div>\n                        </div>\n                    </div>\n                }\n                {!isProfilePage && <h2>{this.state.viewCrossReferenceList ? \"Your Lobbyist-in-a-Box Watchlists: Bill Cross Reference\" : \"Your Lobbyist-in-a-Box Watchlists\"}</h2>}\n                {this.state.loadingCollections ? <div className=\"spinner\" /> :\n                    <React.Fragment>\n                        <div className=\"dlas-forms\">\n                            {!this.state.viewCrossReferenceList\n                                ? <React.Fragment>\n                                    <label htmlFor=\"sr-watchlist-find\" className=\"screen-reader-only\">Find a watchlist by name</label>\n                                    <input\n                                        id=\"sr-watchlist-find\"\n                                        type=\"text\"\n                                        placeholder=\"Find a watchlist\"\n                                        value={this.state.filteredWatchlistsValue}\n                                        onChange={this.filterWatchlist}\n                                    />\n                                </React.Fragment>\n                                : <React.Fragment>\n                                    <label htmlFor=\"sr-bill-find\" className=\"screen-reader-only\">Find a bill by bill number or description</label>\n                                    <input\n                                        id=\"sr-bill-find\"\n                                        type=\"text\"\n                                        placeholder=\"Find a bill\"\n                                        value={this.state.filteredBillsValue}\n                                        onChange={this.filterBills}\n                                    />\n                                </React.Fragment>\n                            }\n                            {this.state.legislationList.length > 0 && <button className=\"button primary float-right\" type=\"button\" onClick={() => this.toggleCrossReferenceList()}>{this.state.viewCrossReferenceList ? \"View Watchlists\" : \"View Bill Cross Reference List\"}</button>}\n                        </div>\n                        <br />\n                        <div className=\"flex-row\">\n                            {!this.state.viewCrossReferenceList ? <button className=\"button primary float-right\" type=\"button\" disabled={!watchlists.find(w => w.checked) || this.state.deletingWatchlists} onClick={this.togglePopup}>{this.state.deletingWatchlists ? watchlists.filter(w => w.checked).length > 1 ? \"Deleting Watchlists\" : \"Deleting Watchlist\" : watchlists.filter(w => w.checked).length > 1 ? \"Delete Watchlists\" : \"Delete Watchlist\"}</button> : <span />}\n                            {<button className=\"button primary float-right\" type=\"button\" onClick={() => this.toggleExpandAll(this.state.viewCrossReferenceList ? true : false)}>{this.state.viewCrossReferenceList ? this.state.expandAllBills ? \"Collapse All\" : \"Expand All\" : this.state.expandAllWatchlists ? \"Collapse All\" : \"Expand All\"}</button>}\n                        </div>\n                        <br />\n                        <div className=\"quick-table\">\n                            {this.state.viewCrossReferenceList\n                                ?\n                                <div className=\"inner-grid small-one-util table-headers\">\n                                    <label onClick={() => this.sortByBillNumber()} style={{ cursor: \"pointer\" }}>Bill Number</label>\n                                    <label>Bill Description</label>\n                                    <label>Show Watchlists</label>\n                                </div>\n                                :\n                                <div className=\"inner-grid one-two-one table-headers\">\n                                    <label />\n                                    <label onClick={() => this.sortByName()} style={{ cursor: \"pointer\" }}>Watchlist Name</label>\n                                    <label onClick={() => this.sortByDesc()} style={{ cursor: \"pointer\" }}>Description</label>\n                                    <label onClick={() => this.sortByDate()} style={{ cursor: \"pointer\" }}>Last Modified</label>\n                                    <label>Show Bills</label>\n                                </div>\n                            }\n                            {!this.state.viewCrossReferenceList ?\n                                <div className=\"table-body\">\n                                    {watchlists.map((w, i) => {\n                                        return (\n                                            <div className=\"table-row\" key={i}>\n                                                {w && <div className=\"inner-grid one-two-one\">\n                                                    <input id=\"sr-select-all\" disabled={this.state.deletingWatchlists || (w.IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\")))} checked={w.checked} onChange={() => this.toggleWatchlist(i)} type=\"checkbox\" style={{ verticalAlign: 'sub' }} />\n                                                    {(w.IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\"))) ? <span className=\"txt-greyed\">{w.Name} (PAID)</span> : <Link to={`/bill-search?collection=${w.WatchListID}`}>{w.Name}</Link>}\n                                                    <label className={(w.IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\"))) ? \"txt-greyed\" : \"\"}>{w.Description}</label>\n                                                    <label className={(w.IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\"))) ? \"txt-greyed\" : \"\"}>{moment(w.ModificationDate).format(\"MM/DD/YYYY hh:mm A\")}</label>\n                                                    {(w.IsPaid && !Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) && !Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\"))) ? null : w.WatchListLegislation.length > 0 && <button style={{ marginLeft: \"20px\" }} type=\"button\" className={(this.state.expandedWatchlists.find(x => x.WatchListID === w.WatchListID) == undefined || !this.state.expandedWatchlists.find(x => x.WatchListID === w.WatchListID).expanded ? \"arrow-down\" : \"arrow-up\") + \" float-right\"} onClick={() => this.toggleBillList(w.WatchListID)}></button>}\n                                                </div>\n                                                }\n                                                {this.state.expandedWatchlists.find(x => x.WatchListID === w.WatchListID) != undefined && this.state.expandedWatchlists.find(x => x.WatchListID === w.WatchListID).expanded &&\n                                                    <ul>\n                                                        {w.WatchListLegislation.map((l, i) => {\n                                                            return (\n                                                                <li className=\"inner-grid two-col-sidebar-tiny-backwards\" style={{ marginBottom: '5px' }}>\n                                                                    <a target=\"_blank\" key={i} className=\"watchlist-ref-link\" style={{ textAlign: 'right' }} href={\"/bill-details/\" + sessionCode + \"/\" + l.LegislationNumber}>{l.LegislationNumber}</a>\n                                                                    <span>{l.Description}</span>\n                                                                </li>\n                                                            )\n                                                        })}\n                                                    </ul>\n                                                }\n                                            </div>\n                                        )\n                                    })}\n                                </div>\n                                :\n                                <div className=\"table-body\">\n                                    {bills.map((l, i) => {\n                                        return (\n                                            <div className=\"table-row\" key={i}>\n                                                <div className=\"inner-grid small-one-util\" key={i}>\n                                                    {<Link to={\"/bill-details/\" + sessionCode + \"/\" + l.LegislationNumber}>{l.LegislationNumber}</Link>}\n                                                    <label>{renderHTML(l.Description)}</label>\n                                                    {l.watchlists.length > 0 && <button style={{ marginLeft: \"40px\" }} type=\"button\" className={(this.state.expandedBills.find(x => x.LegislationNumber === l.LegislationNumber) != undefined && !this.state.expandedBills.find(x => x.LegislationNumber === l.LegislationNumber).expanded ? \"arrow-down\" : \"arrow-up\") + \" float-right\"} onClick={() => this.toggleWatchlistList(l.LegislationNumber)}></button>}\n                                                </div>\n                                                {this.state.expandedBills.find(x => x.LegislationNumber === l.LegislationNumber) != undefined && this.state.expandedBills.find(x => x.LegislationNumber === l.LegislationNumber).expanded &&\n                                                    <ul>\n                                                        {l.watchlists.map((w, i) => {\n                                                            return (\n                                                                <li>\n                                                                    <a target=\"_blank\" key={i} className=\"watchlist-ref-link\" href={\"/bill-search?collection=\" + w.WatchListID}>{w.Name}</a> - <span>{w.Description}</span>\n                                                                </li>\n                                                            )\n                                                        })}\n                                                    </ul>\n                                                }\n                                            </div>\n                                        )\n                                    })}\n                                </div>\n                            }\n                        </div>\n                        <br />\n                        {!isProfilePage && <Link to={\"/bill-search\"}>Return to Bill Search</Link>}\n                    </React.Fragment>}\n            </div >\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { login, nav, collection, session } = state;\n        return {\n            login,\n            nav,\n            collection,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, navActionCreators, collectionActionCreators, sessionActionCreators), dispatch)\n        }\n    }\n)(WatchlistsComponent)","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { authActionCreators } from '../../../stores/lis-auth-store';\nimport { developersActionCreators } from '../../../stores/lis-developers-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport WatchlistsComponent from '../../../lis-public/components/lis-watchlists';\n\nclass ProfileForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            apiKeys: [],\n            apiKeyIsLoading: true\n        };\n\n        this.getApiKeys = this.getApiKeys.bind(this);\n        this.handleCopy = this.handleCopy.bind(this);\n    }\n\n    componentDidMount() {\n        this.getApiKeys();\n    }\n\n    getApiKeys() {\n        this.setState({ apiKeyIsLoading: true })\n        this.props.actions.getPartnerKey()\n            .then(() => {\n                this.setState({\n                    apiKeys: this.props.developers.partnerKey,\n                    apiKeyIsLoading: false\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return\n                }\n                this.setState({\n                    apiKeyIsLoading: false\n                });\n            });\n    }\n\n    handleCopy(key, element) {\n        navigator.clipboard.writeText(key);\n        element.disabled = true;\n        const delay = ms => new Promise(res => setTimeout(res, ms));\n        element.textContent = 'Copied to clipboard!'\n        delay(3000).then(() => {\n            element.textContent = \"Copy\"\n            element.disabled = false;\n        });\n    }\n\n    render() {\n        const { userProfile } = this.props.login;\n        let email = userProfile.email || \"\";\n        if (email.includes(\"#\")) {\n            email = email.replace(/#([^#]*)$/, '@$1');\n            email = email.replace(\"@dlasva.onmicrosoft.com\", '');\n        }\n        const canCreateMultipleWatchlists = Boolean(this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) ||  Boolean(this.props.login.userClaims.resources.find(resource => resource === \"PaidLegislationCollectionsAuthor\" || resource === \"All\"));\n\n        return (\n            <div className=\"dlas-forms\">\n                <div className=\"public-details\">\n                    <div>\n                        <h2>My Profile</h2>\n                    </div>\n                    <div>\n                        <h3>Name</h3>\n                        <p>{userProfile.name}</p>\n                        <br />\n                        <h3>Email</h3>\n                        <p>{email}</p>\n                        <br />\n                        <h3>{canCreateMultipleWatchlists ? \"Watchlists\" : \"Watchlist\"}</h3>\n                        {\n                            <WatchlistsComponent isProfilePage />\n                        }\n                        <br />\n                        <h3>{this.state.apiKeys.length > 1 ? 'API Keys' : 'API Key'}</h3>\n                        {this.state.apiKeyIsLoading ?\n                            <div className=\"spinner\"></div>\n                            :\n                            this.state.apiKeys.length > 0 ?\n                                this.state.apiKeys.map((key, idx) =>\n                                    <div key={idx}>\n                                        <span style={{ fontSize: '14px', marginRight: '5px' }}>{key.APIKey}</span>\n                                        <button className=\"button\" type=\"button\" style={{ padding: '3px 5px' }} onClick={(e) => this.handleCopy(key.APIKey, e.target)}>Copy</button>\n                                    </div>\n                                )\n                                :\n                                <p>Your email ({`${email}`}) is not currently associated with an API key. Learn more about API keys <a target=\"blank\" rel=\"noreferrer\" style={{ fontSize: '14px' }} href={'/developers'}>here</a>.</p>\n                        }\n                    </div>\n                    <br />\n                    <div>\n                        <h3>Account Settings</h3>\n                        <Link to={'/change-password'} style={{ fontSize: '14px', textDecoration: \"none\" }}>Change Password</Link>\n                    </div>\n                </div>\n            </div>\n        );\n\n    }\n};\n\nexport default connect(\n    (state) => {\n        const { login, developers, session, nav } = state;\n        return {\n            login,\n            developers,\n            session,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, developersActionCreators, sessionActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(ProfileForm);\n\n\n\n\n\n","import React from \"react\";\n\nclass PrivacyComponent extends React.Component {\n    render() {\n        return (\n            <div>\n\n                <p className=\"bold\">Virginia Division of Legislative Automated Systems</p>\n\n                <p className=\"bold\">Internet Privacy Policy Statement and Disclaimer</p>\n                <p>(Last updated on September 3, 2024)</p>\n\n                <p className=\"bold\">Privacy Information</p>\n                <p>It is the policy of the Commonwealth of Virginia that personal information about citizens will be collected only to the extent necessary to provide the service or benefit desired; that only appropriate information will be collected; that the citizen shall understand the reason the information is collected and be able to examine their personal record which is maintained by the Virginia Division of Legislative Automated Systems (DLAS).</p>\n\n                <p>This document explains how DLAS gathers information on its web site (http://lis.virginia.gov), and with whom and under what conditions the agency shares this information. The following is intended to explain the agency's current Internet privacy practices but shall not be construed as a contractual promise. DLAS reserves the right to amend its Internet Privacy Policy Statement at any time without notice.</p>\n\n                <p className=\"bold\">Information Collection</p>\n                <p>Virginia law requires that state bodies not collect personal information about citizens unless it is required to provide services for the citizen. When personal information is collected, it must be protected from unauthorized access, use or disclosure, and DLAS is required to provide a prescribed procedure by which you may learn the purpose for which information has been recorded and how the agency will use and disseminate it.</p>\n\n                <p className=\"bold\">In General</p>\n                <p>DLAS does not capture personal information about any visitor to its site without their permission. When you browse the agency's site without logging on to any of the interactive online services, you do so anonymously. Personal information, such as your name, address, phone number, or e-mail address, is not collected as you browse. Information, such as your domain name, Internet Protocol number, browser type, and date and time of your visit, is collected, but not tied to your personal identity. DLAS uses this information to track the number of customers who visit the site and identify the most popular pages so that the agency can improve site content and accessibility.</p>\n\n                <p className=\"bold\">Online Transactions</p>\n                <p>Though personal information may be required either by law or in order for DLAS to provide a requested service, in doing so the agency is subject to the requirements for administering information systems as established in the Government Data Collection and Dissemination Practices Act, Chapter 38 of Title 2.2 of the Code of Virginia. A different agency or entity, whose practices are not under the control of DLAS, may regulate pages that appear after you click on a link. When you log on to one of the agency's current online services, such as “Lobbyist in a Box”, personal information that you submit is captured to enable you to conduct business with DLAS. In addition, the agency collects the following information about your visit: Internet Protocol address, browser type, the name of the domain from which you access the Internet, and the date and time of your visit. This additional information allows the agency to track the number of customers who visit our site and identify the most popular pages so that it can improve site content and accessibility. The personal information you provide is required to enable you to complete various transactions with the agency online and for DLAS to deliver the requested services. Once registered with DLAS, you are eligible to request additional services that may require you to provide additional personal information. DLAS only collects, retains and uses personal information when it believes it is essential, and allowed by law, to conduct business and provide products and services. Should you not desire to provide the requested personal information, DLAS will not be able to provide you with online services.</p>\n\n                <p>Personal information that you provide to the agency is safeguarded according to the laws of the Commonwealth of Virginia. Information that you provide on the online surveys is used to improve the online services that the agency offers and to determine your level of satisfaction with the DLAS site and services. This information is not stored with any other records DLAS may have of your transactions with the agency.</p>\n\n                <p className=\"bold\">Contacting Us</p>\n                <p>When visiting the site, DLAS encourages you to contact us if you have any questions, comments, or concerns, or would like a return call. DLAS will request your name, the subject of your question or comment, and your e-mail address or telephone number. This information is used solely to respond to your inquiry. If you would like the agency to mail you materials, DLAS will request your mailing address so that it may provide the appropriate materials. Personal information that you provide to the DLAS is safeguarded according to the laws of the Commonwealth of Virginia.</p>\n\n                <p className=\"bold\">Information Access</p>\n                <p>Any personal information that is collected and retained by DLAS is maintained in compliance with the Government Data Collection and Dissemination Practices Act, Chapter 38 of Title 2.2 of the Code of Virginia. The agency does not share, sell or trade e-mail addresses, information collected on surveys or any other information about its online customers to any entity except as provided for or required by Chapter 38 of Title 2.2 of the Code of Virginia, the Virginia Freedom of Information Act, or other law. Under FOIA, any records in DLAS’ possession at the time of a Freedom of Information Request might be subject to being inspected by or disclosed to members of the public. If necessary, DLAS may disclose user information if it has reason to believe that disclosing such information is necessary to identify, contact, or bring legal action against an individual who attempts, even unintentionally, to unauthorized access to DLAS information or to disrupt our web site.</p>\n\n                <p className=\"bold\">Use of \"Cookies\"</p>\n                <p>In certain applications, user information is stored as \"cookies,\" which are then sent back and stored on your hard drive. Cookies allow the agency to save the information that you input while progressing through an online transaction. If your browser is not configured to accept cookies, you will still be able to access the information on the web site, but you may not be able to complete many of the online transactions. No user information is gathered through cookies except for that needed to run the specific application.</p>\n\n                <p className=\"bold\">Security</p>\n                <p>DLAS maintains security standards and procedures regarding unauthorized access to customer information to prevent unauthorized removal or alteration of data. When you browse public areas of the DLAS web site, none of your personal information is captured or stored by the agency. DLAS protects its records in accordance with its obligations as defined by applicable Virginia statues, including, but not limited to, the Government Data Collection and Dissemination Practices Act, the Virginia Freedom of Information Act, and by any applicable U.S. federal laws.</p>\n\n                <p className=\"bold\">Information Accuracy and Your Rights</p>\n                <p>DLAS has established procedures to ensure that information is as accurate and current as is practical to enable us to conduct business with you. Although the agency strives to do things right the first time, it also responds to requests to correct inaccurate information in a timely manner. You have the right to review the record that DLAS maintains about you in order to verify its accuracy. You may do this by contacting the individual listed below. If you find errors in your personal record, or desire that the agency purge your data from its records, you must contact the individual listed below. DLAS employee access to personally identifiable information is restricted to only those employees who need access in order to perform their assigned duties.</p>\n\n                <p className=\"bold\">Contact Us</p>\n                <p>DLAS welcomes your comments and invites you to contact us if you have any questions or concerns:\n                    <br />Virginia Division of Legislative Automated Systems\n                    <br />Old City Hall\n                    <br />1001 East Broad Street, Suite 210\n                    <br />Richmond, VA 23219\n                    <br />email: <a href=\"mailto:LIS@dlas.virginia.gov\">LIS@dlas.virginia.gov</a>\n                </p>\n\n                <p className=\"bold\">Disclaimer</p>\n\n                <p>The Virginia Division of Legislative Automated Systems (DLAS) provides links to web sites that are not controlled, maintained, or regulated by DLAS or any organization affiliated with DLAS, and as such DLAS is NOT responsible for the content of those web sites. Use of information obtained from those web sites is voluntary, and reliance on that information should only be undertaken after an independent review of its accuracy. Reference at those web sites to any specific commercial product, process, or service by trade name, trademark, or otherwise DOES NOT constitute or imply endorsement, recommendation, or preference by DLAS. The agency tries to screen all sites included on its web site, but cannot control the content they possess. Any inappropriate information or links they have on their site that pertains to DLAS, or related activities, should be reported to DLAS and can be emailed to <a href=\"mailto:LIS@dlas.virginia.gov\">LIS@dlas.virginia.gov</a>.</p>\n\n            </div>\n        )\n    }\n}\n\nexport default PrivacyComponent","import React from \"react\";\nimport { Link } from \"react-router-dom\"\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { developersActionCreators } from \"../../../stores/lis-developers-store\";\n\nclass DevsPortal extends React.Component {\n  constructor(props) {\n    super(props)\n    this.state = {\n      docList: ''\n    }\n  }\n\n  componentDidMount() {\n    this.props.actions.getDocList(\"?IsPartner=false\");\n  }\n\n  render() {\n    return (\n      <div>\n        <div className=\"alert alert-warning\"><p>API usage is authorized and validated for 2025 session data only. The General Assembly has not authorized the usage of data from sessions prior to 2025 to be extracted with this API toolset. If you require data prior to the 2025 session, please use <a href=\"https://legacylis.virginia.gov\">legacylis.virginia.gov</a> via CSV download. Once the General Assembly has authorized the data for use, you will be notified.</p></div>\n        <h1>LIS Developers Portal</h1>\n        <p>If you are a developer interested in obtaining data from LIS you may register for your own LIS API key.  An LIS API key will give you access to more than 40 APIs. To register for your own API key click the link below.</p>\n        <Link to=\"/apiregistration\" className=\"doc-link\">Complete LIS API Key Registration here.</Link>\n        <p>Below are links to the API documentation. We believe you will find the documentation transparent and convenient. To view the terms of service, <Link to=\"/tos\" className=\"doc-link\">click here</Link>. To view the documentation in Postman, <a href=\"https://documenter.getpostman.com/view/6722140/2sA3e4B9hg\" className=\"doc-link\">click here</a>.</p>\n        <h3>Available LIS API Services</h3>\n        {this.props.developers.docList.length > 0 && this.props.developers.docList.map((b, i) => {\n          return (\n            <React.Fragment key={i}><Link to={{ pathname: \"/developers/\" + b.ApiName }} className=\"doc-link\">{b.ApiName}</Link><br /></React.Fragment>\n          )\n        })}\n      </div>\n    )\n  }\n}\n\nexport default connect(\n  (state) => {\n    const { developers } = state;\n    return {\n      developers\n    }\n  },\n  (dispatch) => {\n    return {\n      actions: bindActionCreators(Object.assign({}, developersActionCreators), dispatch)\n    }\n  }\n)(DevsPortal)","import React from \"react\";\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { RedocStandalone } from \"redoc\";\nimport { developersActionCreators } from \"../../../stores/lis-developers-store\";\nimport { navActionCreators } from \"../../../stores/lis-nav-store\";\n\nclass DocumentComponent extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.backToList = this.backToList.bind(this);\n    }\n\n    componentDidMount() {\n        this.props.actions.getDoc(\"?ApiName=\" + this.props.match.params.docName, false);\n    }\n\n    backToList() {\n        window.location.href = \"/developers\"\n    }\n\n    render() {\n        return (\n            <div style={{ marginTop: \"20px\" }}>\n                <a onClick={this.backToList} style={{ cursor: \"pointer\" }}>Back to List</a>\n                {this.props.developers.doc != '' ?\n                    <RedocStandalone\n                        spec={JSON.parse(this.props.developers.doc)}\n                        options={{\n                            nativeScrollbars: false,\n                            theme: {\n                                colors: {\n                                    primary: {\n                                        main: \"#34495e\"\n                                    },\n                                    http: {\n                                        get: \"#4BCA81\"\n                                    },\n                                    responses: {\n                                        error: {\n                                            color: \"#fb4f4f\"\n                                        },\n                                        success: {\n                                            color: \"#4BCA81\"\n                                        }\n                                    },\n                                    success: {\n                                        main: \"#4BCA81\"\n                                    },\n                                    error: {\n                                        main: \"#fb4f4f\"\n                                    }\n                                },\n                                typography: {\n                                    fontFamily: \"Lato\",\n                                    fontWeight: \"400\",\n                                    fontSize: \"14px\",\n                                    lineHeight: \"1.4\",\n                                    color: \"#333\",\n                                    code: {\n                                        fontSize: \"13px\",\n                                        fontFamily: \"consolas\"\n                                    },\n                                    headings: {\n                                        fontFamily: \"Lato\",\n                                        fontWeight: \"400\",\n                                        color: \"#34495e\"\n                                    },\n                                    links: {\n                                        color: \"#3498db\",\n                                        visited: \"#3498db\",\n                                        hover: \"#196090\"\n                                    },\n                                    optimizeSpeed: true\n                                },\n                                sidebar: {\n                                    backgroundColor: \"#F1F1F1\"\n                                },\n                                rightPanel: {\n                                    backgroundColor: \"#34495e\"\n                                },\n                                spacing: {\n                                    sectionHorizontal: 8,\n                                    sectionVertical: 4\n                                }\n                            },\n                            lazyRendering: true\n                        }}\n                    />\n                    :\n                    <div><span className=\"small-spinner\"></span></div>\n                }\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { developers, nav } = state;\n        return {\n            developers,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, developersActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(DocumentComponent)","import React from \"react\";\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { developersActionCreators } from \"../../../stores/lis-developers-store\";\nimport { navActionCreators } from \"../../../stores/lis-nav-store\";\n\nconst emailRegex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\nclass KeyRegistration extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            email: \"\",\n            isSubmitting: false,\n            emailError: ''\n        }\n\n        this.checkEmail = this.checkEmail.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.submit = this.submit.bind(this);\n    }\n\n    checkEmail() {\n        const email = this.state.email.toLowerCase();\n\n        if (!emailRegex.test(email)) {\n            this.setState({\n                emailError: 'A valid email is required'\n            }, () => {\n                this.props.actions.makeToast([{ message: this.state.emailError, type: \"failure\" }])\n            });\n            return true;\n        }\n        this.setState({\n            emailError: ''\n        });\n    }\n\n    handleChange(state, value) {\n        this.setState({\n            [state]: value\n        })\n    }\n\n    submit() {\n        this.setState({\n            isSubmitting: true\n        }, () => {\n            let error = false\n            error = this.checkEmail();\n\n            if (!error) {\n                let params = \"\";\n\n                params = params + \"?emailAddress=\" + encodeURIComponent(this.state.email);\n\n                this.props.actions.submitKeyRegistration(params)\n                    .then(() => {\n                        //No need to reset isSubmitting because the user will be redirected\n                        this.props.actions.makeToast([{ message: \"Your registration was successful. You will receive a confirmation email shortly.\", type: \"success\", long: true }])\n                        //Give the user time to read the toast, then forward to the homepage\n                        setTimeout(() => { window.location.href = \"/home\"; }, 5000);\n                    })\n                    .catch(() => {\n                        this.props.actions.makeToast([{ message: this.props.developers.keyRegistrationError, type: \"failure\" }])\n                    })\n            } else {\n                this.setState({\n                    isSubmitting: false\n                })\n            }\n        })\n    }\n\n    render() {\n        const { email, isSubmitting } = this.state;\n\n        return (\n            <div>\n                <div className=\"alert alert-warning\"><p>API usage is authorized and validated for 2025 session data only. The General Assembly has not authorized the usage of data from sessions prior to 2025 to be extracted with this API toolset. If you require data prior to the 2025 session, please use <a href=\"https://legacylis.virginia.gov\">legacylis.virginia.gov</a> via CSV download. Once the General Assembly has authorized the data for use, you will be notified.</p></div>\n                <form className=\"dlas-forms key-registration-form\">\n                    <h3>LIS API Key Registration</h3>\n                    <p>Enter your email address here and submit the form. You will receive an email containing a link that you can use to complete your API key registration.</p>\n                    <div className=\"inner-grid short-one-three\">\n                        <label htmlFor=\"email\">Email</label>\n                        <input\n                            id=\"email\"\n                            type=\"text\"\n                            value={email}\n                            onChange={(e) => this.handleChange(\"email\", e.target.value)}\n                        />\n                    </div>\n                    <div className=\"inner-grid reverse-short-one-three\">\n                        <div />\n                        <div className=\"align-right\">\n                            <button onClick={this.submit} disabled={isSubmitting || !email} type=\"button\" className=\"button\">Submit</button>\n                        </div>\n                    </div>\n                </form>\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, developers } = state;\n        return {\n            nav,\n            developers\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, developersActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(KeyRegistration)","import React from \"react\";\nimport moment from 'moment-timezone';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { developersActionCreators } from \"../../../stores/lis-developers-store\";\nimport { navActionCreators } from \"../../../stores/lis-nav-store\";\n\nconst phoneRegex = /^[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$/im;\nconst urlRegex = /((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[\\+~%\\/.\\w-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[\\w]*))?)/\n\nclass KeyConfirmation extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n            isSubmitting: false,\n            phoneError: '',\n            urlError: '',\n            name: '',\n            organization: '',\n            phone: '',\n            url: '',\n            agree: false\n        }\n\n        this.checkPhone = this.checkPhone.bind(this);\n        this.checkUrl = this.checkUrl.bind(this);\n        this.handleChange = this.handleChange.bind(this);\n        this.submit = this.submit.bind(this);\n    }\n\n    checkPhone() {\n        if (!phoneRegex.test(this.state.phone)) {\n            this.setState({\n                phoneError: 'Invalid Phone Number'\n            }, () => {\n                this.props.actions.makeToast([{ message: this.state.phoneError, type: \"failure\" }])\n            });\n            return true;\n        }\n        this.setState({\n            phoneError: ''\n        });\n    }\n\n    checkUrl() {\n        if (!urlRegex.test(this.state.url)) {\n            this.setState({\n                urlError: 'Invalid URL'\n            }, () => {\n                this.props.actions.makeToast([{ message: this.state.urlError, type: \"failure\" }])\n            });\n            return true;\n        }\n        this.setState({\n            urlError: ''\n        });\n    }\n\n    handleChange(state, value) {\n        this.setState({\n            [state]: value\n        })\n    }\n\n    submit() {\n        this.setState({\n            isSubmitting: true\n        }, () => {\n            let error = false\n            if (this.state.phone.length > 0) {\n                error = this.checkPhone();\n            }\n            if (this.state.url.length > 0) {\n                error = this.checkUrl();\n            }\n\n            if (!error && this.state.name.length > 0 && this.state.phone.length > 0) {\n                let body= {};\n\n                body.ContactName = this.state.name;\n                body.OrganizationName = this.state.organization;\n                body.Phone = this.state.phone;\n                body.Url = this.state.url;\n                body.HashedWord = this.props.match.params.params.split(\"/\")[0]\n                body.EulaDate = moment(new Date()).format('MM/DD/YYYY')\n\n                this.props.actions.submitConfirmKeyRegistration(body)\n                    .then(() => {\n                        //Don't need to reset isSubmitting because the user will be redirected\n                        this.props.actions.makeToast([{ message: \"Your registration is now complete. You will receive an email with more details shortly.\", type: \"success\", long: true }])\n                        //Give the user time to read the toast, then forward to the homepage\n                        setTimeout(() => { window.location.href = \"/home\"; }, 5000);\n                    })\n                    .catch(() => {\n                        this.setState({\n                            isSubmitting: false\n                        }, () => {\n                            this.props.actions.makeToast([{ message: this.props.developers.keyRegistrationError, type: \"failure\" }])\n                        })\n                    })\n            } else {\n                this.setState({\n                    isSubmitting: false\n                })\n            }\n        })\n    }\n\n    render() {\n        const { name, organization, phone, url, isSubmitting, agree } = this.state;\n\n        return (\n            <div>\n                <form className=\"dlas-forms key-registration-form\">\n                    <h3>Complete LIS API Key Registration</h3>\n                    <div className=\"inner-grid short-one-three\">\n                        <label htmlFor=\"name\">Name*</label>\n                        <input\n                            id=\"name\"\n                            type=\"text\"\n                            value={name}\n                            onChange={(e) => this.handleChange(\"name\", e.target.value)}\n                        />\n                    </div>\n                    <div className=\"inner-grid short-one-three\">\n                        <label htmlFor=\"organization\">Organization</label>\n                        <input\n                            id=\"organization\"\n                            type=\"text\"\n                            value={organization}\n                            onChange={(e) => this.handleChange(\"organization\", e.target.value)}\n                        />\n                    </div>\n                    <div className=\"inner-grid short-one-three\">\n                        <label htmlFor=\"url\">Organization URL</label>\n                        <input\n                            id=\"url\"\n                            type=\"text\"\n                            value={url}\n                            onChange={(e) => this.handleChange(\"url\", e.target.value)}\n                        />\n                    </div>\n                    <div className=\"inner-grid short-one-three\">\n                        <label htmlFor=\"phone\">Phone Number*</label>\n                        <input\n                            id=\"phone\"\n                            type=\"text\"\n                            value={phone}\n                            onChange={(e) => this.handleChange(\"phone\", e.target.value)}\n                        />\n                    </div>\n                    <div className=\"inner-grid reverse-short-one-three\">\n                        <div>\n                            <label>By checking this box you agree to the <a href=\"/tos\" className=\"doc-link\">terms of service</a>.</label>\n                            <input\n                                type=\"checkbox\"\n                                checked={agree}\n                                onClick={(e) => this.handleChange(\"agree\", !agree)}\n                            />\n                        </div>\n                        <div className=\"align-right\">\n                            <button onClick={this.submit} disabled={isSubmitting || (!name || !phone || !agree)} type=\"button\" className=\"button\">Submit</button>\n                        </div>\n                    </div>\n                </form>\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, developers } = state;\n        return {\n            nav,\n            developers\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, developersActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(KeyConfirmation)","import React from \"react\";\n\nclass TermsOfService extends React.Component {\n    constructor(props) {\n        super(props)\n\n    }\n\n    render() {\n        return (\n            <div>\n                <h1>LIS API Terms of Service</h1>\n                <p>These Terms of Service (“Terms”) apply when you use any of its APIs (collectively, the “Services”) that links or refers to the Terms. These terms are a legal contract between you and the Division of Legislative Automated Systems (“DLAS,” “we” or “us”) so it is important that you review them carefully before using the Services. Your use of the Services indicates that you agree to follow and be bound by the Terms. If you do not agree to the Terms, do not access or use the Services.</p>\n                <h3>1. General</h3>\n                <p>We may change the Terms or modify any features of the Services at any time at our sole discretion. The most current version of the Terms can be viewed by clicking on the “Terms of Service” link at the top of the “For Developers” page. If you continue to use the Services after changes are posted you will be deemed to have accepted the change.</p>\n                <h3>2. Compliance With Applicable Laws</h3>\n                <p>As a condition of your access to and use of the Services, you agree that you will not use the Services for any purpose that is unlawful or prohibited by these Terms and that you will comply with all applicable laws and any conditions or restrictions imposed by these terms. The Services are offered for your personal and non-commercial use only, and you are prohibited from using, and are expressly not granted the right to use, the Services for any other purpose.</p>\n                <h3>3. Privacy</h3>\n                <p>By using the Services, you indicate that you understand the information collection, use, and disclosure practices described in the Privacy Policy.</p>\n                <h3>4. Prohibited Conduct</h3>\n                <p>You may not access or use, or attempt to access or use, the Services to take any action that could harm us or any third party, interfere with the operation of the Services, or use the Services in a manner that violates any laws. For example, and without limitation, you may not:</p>\n                <ul>\n                    <li>Make use of the contents of the Services in any manner that constitutes an infringement of our rights or the rights of other users or third parties.</li>\n                    <li>Access parts of the Services to which you are not authorized, or attempt to circumvent any restrictions imposed on your use or access of the Services.</li>\n                    <li>Take any action that imposes an unreasonable or disproportionately large load on our network or infrastructure.</li>\n                    <li>Use any device, software, or routine to interfere or attempt to interfere with the proper working of the Services or any activity conducted on the Services.</li>\n                    <li>Attempt to decipher, decompile, disassemble, or reverse-engineer any of the software comprising or in any way making up a part of the Services.</li>\n                    <li>Engage in any other conduct that restricts or inhibits any other person from using the Services.</li>\n                    <li>Take any action that violates or threatens our system or network security.</li>\n                </ul>\n                <p>Violations of these Terms may result in civil or criminal liability. We may investigate violations of these Terms and we may also work with law enforcement authorities to prosecute users who violate the Terms.</p>\n                <h3>5. Registration and Security</h3>\n                <p>To register for Services, you will create login credentials by providing an email address to us and by selecting a password. You also provide us certain information during the registration process. Each login is for a single user only. You are not allowed to share or disclose your login credentials with any other user or person. We may cancel or suspend your access to the Services if you share your credentials.</p>\n                <p>You will be responsible for all usage and activity on your account, including use of the account by any third party authorized by you to use your login credentials, and for all charges for any goods or services. You are also responsible for all statements made or materials posted under your account, including liability for harm caused by such statements or materials. You may not transfer, sell, or otherwise assign your rights or obligations under these Terms.</p>\n                <p>You must meet the minimum age of digital consent in your country (13 years old in the United States of America) to use the Services. Any fraudulent, abusive, or otherwise illegal activity may be grounds for termination of your account, at our sole discretion, and we may refer you to appropriate law enforcement agencies.</p>\n                <p>DLAS maintains security standards and procedures regarding unauthorized access to customer information to prevent unauthorized removal or alteration of data. DLAS protects its records in accordance with its obligations as defined by applicable Virginia statutes, including, but not limited to, the Government Data Collection and Dissemination Practices Act, the Virginia Freedom of Information Act, and by any applicable U.S. federal laws.</p>\n                <h3>6. Charges for Services</h3>\n                <p>We may charge for access to portions of the Services or to the Services as a whole, and we reserve the right at any time to change the amount we charge for such access or subscriptions that include authorization to access the Services. In such an event, we will notify you in advance, and give you an opportunity to subscribe (or un-subscribe) to the Service(s). More information about any such subscriptions can be found on the appropriate locations of the Services. You shall pay all applicable taxes relating to use of the services, and recognize that any fees to third parties that may be required for you to receive the service (such as mobile data plans and text-message charges) are not included in the cost of the services.</p>\n                <h3>7. Third-Party Content and Links to Third-Party Websites</h3>\n                <p>The Services may contain links to websites that are not controlled, maintained, or regulated by DLAS or any organization affiliated with DLAS, and as such DLAS is NOT responsible for the content of those websites (“Linked Sites”). Use of information obtained from those web sites is voluntary, and reliance on that information should only be undertaken after an independent review of its accuracy. Reference at those web sites to any specific commercial product, process, or service by trade name, trademark, or otherwise DOES NOT constitute or imply endorsement, recommendation, or preference by DLAS. The agency tries to screen all sites included on its web site, but cannot control the content they possess.</p>\n                <h3>8. Disclaimer of Warranty and Limitation of Liability</h3>\n                <p>DLAS attempts to maintain the highest accuracy of content on its website. However, DLAS makes no claims, promises or guarantees about the accuracy, completeness, or adequacy of the contents of the Services and expressly disclaims all liability, whether direct or indirect, for any loss or damage arising out of use, reference to, or reliance on any information presented on or by the Services.</p>\n                <p>DLAS makes no warranty, representations, express or implied (a) that the information provided through the Services will be free from error, omission, interruption, defect or delay in operation, or from technical inaccuracies or typographical errors, (b) that the services will be available at any particular time or location (c) that defects or errors in the services will be corrected, or (d) that the content on the services are free of viruses or other harmful components. Any information on the Services is subject to change without notice, and DLAS disclaims all responsibility for the Services. We reserve the right to correct any errors or omissions in the Services. We also reserve the right to change, suspend or discontinue the availability of any Services at any time with or without notice. We provide the Services and associated documentation \"as is\" and you use them at your own risk. Further, there is no warranty that the Services will meet your needs or requirements or the needs or requirements of any other person.</p>\n                <h3>9. Termination</h3>\n                <p>DLAS may terminate this agreement for any reason at any time. DLAS reserves the right, in its sole discretion, to restrict, suspend, or terminate your access to and use of the Service, with or without prior notice. Otherwise applicable sections of the Terms shall survive termination. In addition to any termination rights, we reserve the right to enforce and prosecute any violations of these Terms.</p>\n            </div>\n        )\n    }\n}\n\nexport default TermsOfService;","import React from \"react\";\nimport { Link } from \"react-router-dom\"\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { developersActionCreators } from \"../../../stores/lis-developers-store\";\n\nclass AdminDevsPortal extends React.Component {\n  constructor(props) {\n    super(props)\n    this.state = {\n      docList: ''\n    }\n  }\n\n  componentDidMount() {\n    this.props.actions.getDocList(\"?IsPartner=true\");\n  }\n\n  render() {\n    return (\n      <div>\n        <h1>LIS Admin Developers Portal</h1>        \n        {this.props.developers.docList.length > 0 && this.props.developers.docList.map((b, i) => {\n          return (\n            <React.Fragment key={i}><Link to={{ pathname: \"/admin-developers/\" + b.ApiName }} className=\"doc-link\">{b.ApiName}</Link><br /></React.Fragment>\n          )\n        })}\n      </div>\n    )\n  }\n}\n\nexport default connect(\n  (state) => {\n    const { developers } = state;\n    return {\n      developers\n    }\n  },\n  (dispatch) => {\n    return {\n      actions: bindActionCreators(Object.assign({}, developersActionCreators), dispatch)\n    }\n  }\n)(AdminDevsPortal)","import React from \"react\";\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { RedocStandalone } from \"redoc\";\n\nimport { developersActionCreators } from \"../../../stores/lis-developers-store\";\nimport { navActionCreators } from \"../../../stores/lis-nav-store\";\n\nclass AdminDocumentComponent extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.backToList = this.backToList.bind(this);\n    }\n\n    componentDidMount() {    \n        this.props.actions.getDoc(\"?ApiName=\" + this.props.match.params.docName, true);\n    }\n\n    backToList() {\n        window.location.href = \"/admin-developers\"\n    }\n\n    render() {\n        return (\n            <div style={{ marginTop: \"20px\" }}>\n                <a onClick={this.backToList} style={{cursor: \"pointer\"}}>Back to List</a>\n                {this.props.developers.doc != '' ?\n                    <RedocStandalone\n                        spec={JSON.parse(this.props.developers.doc)}\n                        options={{\n                            nativeScrollbars: false,\n                            theme: {\n                                colors: {\n                                    primary: {\n                                        main: \"#34495e\"\n                                    },\n                                    http: {\n                                        get: \"#4BCA81\"\n                                    },\n                                    responses: {\n                                        error: {\n                                            color: \"#fb4f4f\"\n                                        },\n                                        success: {\n                                            color: \"#4BCA81\"\n                                        }\n                                    },\n                                    success: {\n                                        main: \"#4BCA81\"\n                                    },\n                                    error: {\n                                        main: \"#fb4f4f\"\n                                    }\n                                },\n                                typography: {\n                                    fontFamily: \"Lato\",\n                                    fontWeight: \"400\",\n                                    fontSize: \"14px\",\n                                    lineHeight: \"1.4\",\n                                    color: \"#333\",\n                                    code: {\n                                        fontSize: \"13px\",\n                                        fontFamily: \"consolas\"\n                                    },\n                                    headings: {\n                                        fontFamily: \"Lato\",\n                                        fontWeight: \"400\",\n                                        color: \"#34495e\"\n                                    },\n                                    links: {\n                                        color: \"#3498db\",\n                                        visited: \"#3498db\",\n                                        hover: \"#196090\"\n                                    },\n                                    optimizeSpeed: true\n                                },\n                                sidebar: {\n                                    backgroundColor: \"#F1F1F1\"\n                                },\n                                rightPanel: {\n                                    backgroundColor: \"#34495e\"\n                                },\n                                spacing: {\n                                    sectionHorizontal: 8,\n                                    sectionVertical: 4\n                                }\n                            },\n                            lazyRendering: true\n                        }}\n                    />\n                    :\n                    <div><span className=\"small-spinner\"></span></div>\n                }\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { developers, nav } = state;\n        return {\n            developers,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, developersActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(AdminDocumentComponent)","import React from 'react';\nimport { Route } from 'react-router';\nimport AdminDevsPortal from './lis-admin-developers-portal';\nimport AdminDocumentComponent from './lis-admin-document';\n\nclass AdminDocs extends React.Component {\n\n    render() {       \n\n        return (\n            <div>                \n                <Route exact path={`${this.props.match.path}`} component={AdminDevsPortal} />\n                <Route exact path={`${this.props.match.path}/:docName`} component={AdminDocumentComponent} />\n            </div>\n        )\n    }\n}\n\nexport default AdminDocs;","import React from \"react\"\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { Link, withRouter } from 'react-router-dom';\nimport { navActionCreators } from '../../stores/lis-nav-store';\nimport moment from 'moment-timezone';\n\nclass Footer extends React.Component {\n    render() {\n        return (\n            <div className={this.props.location.pathname === \"/\" || this.props.location.pathname.includes(\"/home\") ? \"footer-wrapper home\" : \"footer-wrapper\"} >\n                <div className=\"footer\">\n                    <div>\n                        <Link to=\"/home\">LIS Home</Link>\n                        <a href=\"mailto:LIS@dlas.virginia.gov\">Website Feedback</a>\n                        {this.props.login && this.props.login.userClaims.roles.find(x => x === \"Admin\"/* \"APIDocumentation\" */) ? <a href=\"/admin-developers\">For Developers</a> : <a href=\"/developers\">For Developers</a>}\n                        <Link to=\"/privacy\">Privacy Policy</Link>\n                        <Link to=\"/data-files\">Data Files</Link>\n                    </div>\n                    <div>\n                        <span>{\"© Copyright Commonwealth of Virginia \" + moment().format(\"YYYY\") + \". All rights reserved. Site developed by the \"}<a href=\"http://dlas.virginia.gov/\">Division of Legislative Automated Systems (DLAS)</a></span>\n                    </div>\n                </div>\n            </div>\n        )\n    }\n}\n\nconst FooterWrapper = connect(\n    (state) => {\n        const { nav, login } = state;\n        return {\n            nav,\n            login\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators), dispatch)\n        }\n    }\n)(Footer)\n\nexport default withRouter(FooterWrapper)","import React from 'react';\nimport ReactTable from 'react-table';\n\nclass ConfigurationsTable extends React.Component {\n\n    getTdProps = (state, rowInfo, instance) => {\n        if (rowInfo) {\n            //if we're showing differences for this row, get the associated admin assignment so we can compare accordingly\n            let associatedAdminAssignment;\n            const { uniqueIdentifier } = this.props;\n            if (instance.id && this.props.adminAssignments && this.props.showDifferences && this.props.showDifferences[rowInfo.original[uniqueIdentifier]]) {\n                associatedAdminAssignment = this.props.adminAssignments.find(aca => aca[uniqueIdentifier] === rowInfo.original[uniqueIdentifier]);\n            }\n\n            //If this is the CategoryCode column, we need to set the value for filtering to include the chamber in case they want to say \"BRREF (H)\" for example\n            //otherwise, if they entered \"BRREF (H)\" as a filter, it will not return any rows since they are all techincally just \"BRREF\" whether H or S\n            let originalValue = rowInfo.original[instance.id];\n            let associatedAdminValue = associatedAdminAssignment && associatedAdminAssignment[instance.id] !== undefined ? associatedAdminAssignment[instance.id] : undefined;\n            if (instance.id === \"CategoryCode\" && this.props.categories && this.props.uniqueCategoryIdentifier) {\n                const associatedRowCategoryCodeHasMultipleChambers = this.props.categories.filter(c => c.CategoryCode === rowInfo.original.CategoryCode);\n                if (associatedRowCategoryCodeHasMultipleChambers.length > 1) {\n                    originalValue += \" (\" + associatedRowCategoryCodeHasMultipleChambers.find(c => c[this.props.uniqueCategoryIdentifier] === rowInfo.original[this.props.uniqueCategoryIdentifier]).ChamberCode + \")\"\n                }\n\n                //if we have an associated admin assignment (which also means we are displaying both and comparing), then and only then also do the same logic as above for the associated admin value\n                if (associatedAdminAssignment) {\n                    const associatedRowAdminCategoryCodeHasMultipleChambers = this.props.categories.filter(c => c.CategoryCode === associatedAdminAssignment.CategoryCode);\n                    if (associatedRowAdminCategoryCodeHasMultipleChambers.length > 1) {\n                        associatedAdminValue += \" (\" + associatedRowAdminCategoryCodeHasMultipleChambers.find(c => c[this.props.uniqueCategoryIdentifier] === associatedAdminAssignment[this.props.uniqueCategoryIdentifier]).ChamberCode + \")\"\n                    }\n                }\n            }\n            return {\n                style: {\n                    //if it's new, always keep it to the same color; otherwise, if we're comparing against the associated admin assignment, show red or green based on equality comparison result\n                    'backgroundColor': rowInfo.original.new ? 'rgba(0,0,0,.025)' : this.props.showDifferences[rowInfo.original[uniqueIdentifier]] && instance.id ? associatedAdminValue !== originalValue ? '#ff9797' : 'rgba(91, 178, 114, 0.5)' : '',\n                    //set the bottom border a little larger for the 'new' top row to make it appear differently than the rest of the rows\n                    'borderBottomWidth': rowInfo.original.new ? '2px' : '1px',\n                }\n            }\n        }\n        return {};\n    }\n\n    render() {\n        const { isLoaded, header, assignments, newAssignment, columns, sort, categories, uniqueCategoryIdentifier } = this.props;\n        return (\n            <div>\n                <h3 className=\"no-margin-top margin-bottom-twentyfive\">{header}</h3>\n                <div>\n                    <ReactTable\n                        loading={!isLoaded}\n                        resizable={false}\n                        filterable={true}\n                        data={newAssignment ? [newAssignment, ...assignments] : assignments}\n                        columns={columns}\n                        getTdProps={this.getTdProps}\n                        getTheadProps={() => ({\n                            style: { position: 'sticky', top: '0px', zIndex: 5 }\n                        })}\n                        getTheadFilterThProps={(finalState, rowInfo, column, instance) => {\n                            if (column.Header !== finalState.columns[finalState.columns.length - 1].Header)\n                                return ({ style: { borderRight: '1px solid #fff' } })\n                            else\n                                return {}\n                        }}\n                        getTheadThProps={(finalState, rowInfo, column, instance) => sort ? ({\n                            onClick: () => sort(column)\n                        }) : () => null}\n                        defaultFilterMethod={(filter, row, column) => {\n                            const id = filter.pivotId || filter.id\n                            //always show the insertable/new assignment row\n                            const isNewRow = newAssignment && row._original && row._original.new;\n                            //allow filtering by chamber of category code if present\n                            let rowValue = row[id];\n                            if (id === \"CategoryCode\" && row._original && categories && uniqueCategoryIdentifier) {\n                                const associatedRowCategoryCodeHasMultipleChambers = categories.filter(c => c.CategoryCode === row._original.CategoryCode);\n                                if (associatedRowCategoryCodeHasMultipleChambers.length > 1) {\n                                    rowValue += \" (\" + associatedRowCategoryCodeHasMultipleChambers.find(c => c[uniqueCategoryIdentifier] === row._original[uniqueCategoryIdentifier]).ChamberCode + \")\"\n                                }\n                            }\n                            return rowValue !== undefined ? isNewRow || String(rowValue).toLowerCase().includes(filter.value.toLowerCase()) : false\n                        }}\n                        defaultPageSize={20}\n                        className=\"-striped -highlight overflow-visible\"\n                        style={{ overflow: 'visible' }}\n                    />\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default ConfigurationsTable\n\n\n\n\n\n\n\n","import React from 'react';\nimport ReactTooltip from 'react-tooltip';\nimport Select from 'react-select';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { calendarActionCreators } from \"../../stores/lis-calendar-store\";\nimport { navActionCreators } from \"../../stores/lis-nav-store\";\nimport ConfigurationsTable from './lis-configurations-table';\nimport { billActionCreators } from '../../stores/lis-legislation-store';\n\nconst EVENT = 0;\nconst CHAMBER = 1;\nconst TYPE = 2;\nconst CLASS = 3;\nconst PASSED = 4;\nconst UNCONTESTED = 5;\nconst CATEGORY = 6;\n\nconst uniqueIdentifier = \"CalendarAssignmentID\";\nconst uniqueCategoryIdentifier = \"CalendarCategoryTypeID\";\nconst categoryChamberIdentifier = \"calendarCategoryChamber\";\n\nconst requiredFields = [\"EventCode\", \"LegislationChamberCode\", \"LegislationTypeCode\", \"CategoryCode\"];\n\nconst newAssignmentFreshValues = {\n    CategoryCode: null,\n    EventCode: null,\n    p_LegislationDescription: null,\n    LegislationClass: null,\n    LegislationTypeCode: null,\n    LegislationChamberCode: null,\n    IsPassed: null,\n    IsUncontested: null,\n    [categoryChamberIdentifier]: null,\n    new: true\n};\n\nclass CalendarConfigurations extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            assignments: [],\n            adminAssignments: [],\n            categories: [],\n            legislationClassOptions: [],\n            loadedCategories: false,\n            loadedAssignments: false,\n            loadedAdminAssignments: false,\n            loadedLegislationClassOptions: false,\n            categoriesError: false,\n            assignmentsError: false,\n            legislationClassOptionsError: false,\n            adminAssignmentsError: false,\n            newAssignment: newAssignmentFreshValues,\n            duplicates: [],\n            showDifferences: {},\n            saving: {},\n            editing: {},\n            showAllDifferences: false,\n            filteringMismatches: false,\n            assignmentMismatches: []\n        };\n\n        this.getCategories = this.getCategories.bind(this);\n        this.getAssignments = this.getAssignments.bind(this);\n        this.getAdminAssignments = this.getAdminAssignments.bind(this);\n        this.getLegislationClasses = this.getLegislationClasses.bind(this);\n        this.handleAssignmentChange = this.handleAssignmentChange.bind(this);\n        this.sort = this.sort.bind(this);\n        this.handleSave = this.handleSave.bind(this);\n        this.showDifferences = this.showDifferences.bind(this);\n        this.buttonText = this.buttonText.bind(this);\n        this.checkDuplicates = this.checkDuplicates.bind(this);\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.getUneditedAssignment = this.getUneditedAssignment.bind(this);\n        this.toggleDifferences = this.toggleDifferences.bind(this);\n        this.findDifferences = this.findDifferences.bind(this);\n    }\n\n    componentDidMount() {\n        this.getCategories();\n        this.getAssignments();\n        this.getAdminAssignments();\n        this.getLegislationClasses();\n    }\n\n    getCategories() {\n        this.setState({ loadedCategories: false }, () => {\n            this.props.actions.getCalendarCategoriesReferences('')\n                .then(() => {\n                    this.setState({\n                        loadedCategories: true,\n                        categories: [...this.props.calendar.calendarCategoriesReferences].sort((a, b) => a.ChamberCode.localeCompare(b.ChamberCode) || a.CategoryCode.localeCompare(b.CategoryCode))\n                    });\n                }).catch(err => {\n                    if (err === \"Aborted\") {\n                        return;\n                    }\n                    console.error(err);\n                    this.setState({ loadedCategories: true, categories: [], categoriesError: true })\n                });\n        });\n    }\n\n    getAssignments() {\n        this.setState({ loadedAssignments: false }, () => {\n            this.props.actions.getCalendarAssignments().then(() => {\n                let assignments = JSON.parse(JSON.stringify(this.props.calendar.calendarAssignments));\n                assignments.sort((a, b) => a.CategoryCode.localeCompare(b.CategoryCode))\n\n                this.setState({\n                    loadedAssignments: true,\n                    assignments\n                })\n            }).catch(err => {\n                if (err === \"Aborted\") {\n                    return;\n                }\n                console.error(err);\n                this.setState({ loadedAssignments: true, assignments: [], assignmentsError: true })\n            })\n        });\n    }\n\n    getAdminAssignments() {\n        this.setState({ loadedAdminAssignments: false }, () => {\n            this.props.actions.getAdminCalendarAssignments().then(() => {\n                let adminAssignments = JSON.parse(JSON.stringify(this.props.calendar.adminCalendarAssignments));\n\n                this.setState({\n                    loadedAdminAssignments: true,\n                    adminAssignments\n                })\n            }).catch(err => {\n                if (err === \"Aborted\") {\n                    return;\n                }\n                console.error(err);\n                this.setState({ loadedAdminAssignments: true, adminAssignments: [], adminAssignmentsError: true })\n            })\n        });\n    }\n\n    getLegislationClasses() {\n        this.setState({ loadedLegislationClassOptions: false }, () => {\n            this.props.actions.getLegislationClasses().then(() => {\n                let legislationClassOptions = [...this.props.bills.legislationClasses];\n                legislationClassOptions.forEach(legClass => {\n                    legClass.label = legClass.LegislationClass;\n                    legClass.value = legClass.LegislationClassID;\n                });\n\n                this.setState({ loadedLegislationClassOptions: true, legislationClassOptions });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n                this.setState({ loadedLegislationClassOptions: true, legislationClassOptions: [], legislationClassOptionsError: true })\n            });\n        })\n    }\n\n    handleAssignmentChange(uid, key, value) {\n        let assignments = [...this.state.assignments];\n        let assignment;\n        if (uid) {\n            assignment = assignments.find(ca => ca[uniqueIdentifier] === uid);\n        } else {\n            assignment = { ...this.state.newAssignment }\n        }\n        switch (key) {\n            case EVENT:\n                assignment.EventCode = value.label;\n                break;\n            case CHAMBER:\n                assignment.LegislationChamberCode = value ? value.label : null;\n                break;\n            case TYPE:\n                assignment.LegislationTypeCode = value.label;\n                break;\n            case PASSED:\n                assignment.IsPassed = value.label;\n                break;\n            case CLASS:\n                assignment.LegislationClass = value ? value.LegislationClass : null;\n                assignment.LegislationClassID = value ? value.LegislationClassID : null;\n                break;\n            case UNCONTESTED:\n                assignment.IsUncontested = value.label;\n                break;\n            case CATEGORY:\n                assignment[uniqueCategoryIdentifier] = value[uniqueCategoryIdentifier];\n                assignment.CategoryCode = value.CategoryCode;\n                assignment[categoryChamberIdentifier] = value.ChamberCode;\n                break;\n        }\n\n        let duplicates = [...this.state.duplicates];\n        //if there is an event code and legislationchambercode selected, this is enough to show the user the associated legislationdescription\n        if (assignment.EventCode && assignment.LegislationChamberCode !== null) {\n            const referenceEvent = [...this.props.billEventOptions].find(b => b.EventCode === assignment.EventCode && b.LegislationChamberCode === assignment.LegislationChamberCode && (assignment.IsPassed === null || assignment.IsPassed === b.IsPassed));\n            assignment.p_LegislationDescription = referenceEvent ? referenceEvent.LegislationDescription : null;\n\n            //if they have chosen an option for every required field (except category code), check to see if this is a duplicate entry, in which case prevent saving\n            if (requiredFields.every(val => assignment[val] !== null) && this.checkDuplicates(assignment)) {\n                duplicates.push({ uid: assignment[uniqueIdentifier] })\n            } else {\n                //there isn't a duplicate or there isn't enough values yet to determine; remove it from the duplicates if it's there\n                duplicates = duplicates.filter(d => d.uid !== assignment[uniqueIdentifier])\n            }\n        } else {\n            //there isn't enough info to determine the legislation description of the event, so set to null\n            assignment.p_LegislationDescription = null\n            //can't determine if there's a duplicate since we don't have enough values; remove it from the list of duplicates if it's there\n            duplicates = duplicates.filter(d => d.uid !== assignment[uniqueIdentifier])\n        }\n\n        if (uid) {\n            this.setState({ assignments, duplicates })\n        } else {\n            this.setState({ newAssignment: assignment, duplicates })\n        }\n    }\n\n    checkDuplicates(editedAssignment) {\n        const assignments = [...this.state.assignments];\n        if (!editedAssignment[categoryChamberIdentifier]) {\n            //assign the categoryChamberIdentifier if it hasn't been yet\n            editedAssignment[categoryChamberIdentifier] = this.state.categories.find(c => c[uniqueCategoryIdentifier] === editedAssignment[uniqueCategoryIdentifier]).ChamberCode;\n        }\n\n        //legislation class is not required, but we must include it in our logic for duplicates\n        return assignments.find(a => a[uniqueIdentifier] !== editedAssignment[uniqueIdentifier] &&\n            ((!a.LegislationClass || !editedAssignment.LegislationClass || a.LegislationClass === editedAssignment.LegislationClass) &&\n                (!a.LegislationType || !editedAssignment.LegislationType || a.LegislationType === editedAssignment.LegislationType) &&\n                ((!a.IsPassed && !editedAssignment.IsPassed) || a.IsPassed === editedAssignment.IsPassed) &&\n                ((!a.IsUncontested && !editedAssignment.IsUncontested) || a.IsUncontested === editedAssignment.IsUncontested) &&\n                requiredFields.every(val => (val === \"CategoryCode\" && editedAssignment[categoryChamberIdentifier] === this.state.categories.find(c => c[uniqueCategoryIdentifier] === a[uniqueCategoryIdentifier]).ChamberCode) || (val !== \"CategoryCode\" && a[val] === editedAssignment[val]))))\n    }\n\n    sort(column) {\n        if (column.sortable === false) { return; }\n        let assignments = [...this.state.assignments];\n        assignments = this.props.sort(assignments, column);\n        this.setState({ assignments })\n    }\n\n    handleSave(assignment) {\n        let saving = { ...this.state.saving };\n        saving[assignment[uniqueIdentifier]] = true;\n        this.setState({ saving }, () => {\n            const preSaveEventControlID = assignment.EventControlID;\n            //nullify EventControlID and let DB resolve it based on other values, but if it fails then we need to put it back for comparison checks in the table between admin/new\n            assignment.EventControlID = null;\n            this.props.actions.saveCalendarAssignment(assignment)\n                .then(() => {\n                    this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n\n                    //though the api is saving to both the current env and the admin db, the response is the one from the current env db. Update the assignments state value with this response\n                    const assignmentSave = JSON.parse(JSON.stringify(this.props.calendar.calendarAssignmentSave))[0];\n                    let assignments = [...this.state.assignments];\n                    const existingAssignmentIndex = assignments.findIndex(ca => ca[uniqueIdentifier] === assignmentSave[uniqueIdentifier]);\n                    if (existingAssignmentIndex > -1) {\n                        assignments[existingAssignmentIndex] = assignmentSave;\n                    } else {\n                        assignments.splice(0, 0, assignmentSave);\n                    }\n\n                    //reset editing and saving values\n                    let editing = { ...this.state.editing };\n                    editing[assignment[uniqueIdentifier]] = false;\n                    saving[assignment[uniqueIdentifier]] = false;\n                    this.setState({\n                        assignments,\n                        saving,\n                        editing,\n                        newAssignment: assignment.new ? newAssignmentFreshValues : this.state.newAssignment\n                    }, () => {\n                        this.getAdminAssignments(); //don't just assume the admin db save worked; refresh the admin assignments\n                    })\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                    console.log(err);\n\n                    //reset EventControlID since it was removed\n                    let assignments = [...this.state.assignments];\n                    const associatedAssignment = assignments.find(a => a[uniqueIdentifier] === assignment[uniqueIdentifier]);\n                    if (associatedAssignment) {\n                        assignment.EventControlID = preSaveEventControlID;\n                    }\n                    //reset the saving state value but keep in edit mode by not resetting the editing state value\n                    saving[assignment[uniqueIdentifier]] = false;\n                    this.setState({ assignments, saving });\n                })\n        })\n    }\n\n    showDifferences(assignment) {\n        let showDifferences = { ...this.state.showDifferences };\n        showDifferences[assignment[uniqueIdentifier]] = !showDifferences[assignment[uniqueIdentifier]];\n        this.setState({ showDifferences });\n    }\n\n    getAssociatedAdminAssignmentWithoutModDate = (assignment) => {\n        const associatedAdminAssignment = this.state.adminAssignments.find(aca => aca[uniqueIdentifier] === assignment[uniqueIdentifier]);\n        if (!associatedAdminAssignment) { return false; }\n        //remove the categoryChamberIdentifier and ModificationDate from the object so we can compare objects between the current env and the admin db\n        const { ModificationDate, [categoryChamberIdentifier]: value, ...associatedAdminAssignmentWithoutModificationDate } = associatedAdminAssignment;\n        return associatedAdminAssignmentWithoutModificationDate;\n    }\n\n    toggleEdit(original) {\n        let editing = { ...this.state.editing };\n        editing[original[uniqueIdentifier]] = !editing[original[uniqueIdentifier]];\n\n        //if they're exiting edit mode for this row, reset the values to what they were before going into edit mode, and re-check duplicates\n        let assignments = [...this.state.assignments];\n        let duplicates = [...this.state.duplicates];\n        if (!editing[original[uniqueIdentifier]]) {\n            const assignmentIndex = assignments.findIndex(c => c[uniqueIdentifier] === original[uniqueIdentifier]);\n            const uneditedAssignment = JSON.parse(JSON.stringify(this.getUneditedAssignment(original)));\n            assignments[assignmentIndex] = uneditedAssignment;\n\n            if (!this.checkDuplicates(assignments[assignmentIndex])) {\n                duplicates = duplicates.filter(d => d.uid !== assignments[assignmentIndex][uniqueIdentifier])\n            }\n        }\n\n        this.setState({ editing, assignments, duplicates });\n    }\n\n    buttonText = (pendingSave, original) => {\n        if (pendingSave || original[uniqueIdentifier]) {\n            return this.state.saving[original[uniqueIdentifier]] ? \"Saving\" : \"Save\";\n        } else {\n            return \"Insert\";\n        }\n    }\n\n    getUneditedAssignment(assignment) {\n        //if we've saved the assignment, that's the latest/unedited version; otherwise, the Get should be the latest/unedited version\n        return [...this.props.calendar.calendarAssignmentSave] && [...this.props.calendar.calendarAssignmentSave].find(cas => cas[uniqueIdentifier] === assignment[uniqueIdentifier]) ? [...this.props.calendar.calendarAssignmentSave].find(cas => cas[uniqueIdentifier] === assignment[uniqueIdentifier]) : [...this.props.calendar.calendarAssignments].find(ca => ca[uniqueIdentifier] === assignment[uniqueIdentifier]);\n    }\n\n    toggleDifferences() {\n        this.setState({\n            showAllDifferences: !this.state.showAllDifferences\n        }, () => {\n            if (this.state.showAllDifferences) {\n                this.findDifferences();\n            }\n        })\n    }\n\n    findDifferences() {\n        this.setState({ filteringMismatches: true }, () => {\n            const assignmentMismatches = this.props.findDifferences([...this.state.assignments], uniqueIdentifier, categoryChamberIdentifier, this.getAssociatedAdminAssignmentWithoutModDate)\n            this.setState({ assignmentMismatches, filteringMismatches: false })\n        })\n    }\n\n    render() {\n        const { loadedAssignments, loadedAdminAssignments, loadedCategories, loadedLegislationClassOptions,\n            assignments, adminAssignments, newAssignment, categories, legislationClassOptions,\n            duplicates, showDifferences, showAllDifferences, assignmentMismatches, filteringMismatches,\n            categoriesError, assignmentsError, legislationClassOptionsError, adminAssignmentsError,\n            saving, editing } = this.state;\n        const { billEventOptions, billEventOptionsError, loadedBillEventOptions, customStyles } = this.props;\n\n        const isLoaded = loadedAssignments && loadedAdminAssignments && loadedCategories && loadedBillEventOptions && loadedLegislationClassOptions;\n\n        const columns =\n            [\n                {\n                    Header: \"Category Code\",\n                    accessor: \"CategoryCode\",\n                    width: 125,\n                    Placeholder: \"Filter...\",\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignmentWithoutModDate = this.getAssociatedAdminAssignmentWithoutModDate(original);\n                        const { ModificationDate, [categoryChamberIdentifier]: value, ...originalWithoutModificationDate } = original;\n                        const differentInAdminDB = associatedAdminAssignmentWithoutModDate && JSON.stringify(associatedAdminAssignmentWithoutModDate) !== JSON.stringify(originalWithoutModificationDate);\n                        const doesNotExistInAdminDB = original[uniqueIdentifier] && !associatedAdminAssignmentWithoutModDate;\n                        const showTooltip = differentInAdminDB || doesNotExistInAdminDB || showDifferences[original[uniqueIdentifier]]\n                        const tooltip = showTooltip && (\n                            <React.Fragment>\n                                {differentInAdminDB && <i data-tip={`This assignment is different in the admin database.${showDifferences[original[uniqueIdentifier]] ? \" The assignment in the admin database is displayed on the bottom below.\" : \"\"} Click ${showDifferences[original[uniqueIdentifier]] ? 'again to hide the admin assignment' : 'to show the admin assignment below the currently displayed assignment'}.`} className=\"icon notification calendar-assignment\" onClick={() => this.showDifferences(original)} />}\n                                {doesNotExistInAdminDB && <i data-tip=\"This assignment does not exist in the admin database.\" className=\"icon notification calendar-assignment\" />}\n                                {!differentInAdminDB && !doesNotExistInAdminDB && showDifferences[original[uniqueIdentifier]] && <i data-tip=\"This assignment is no longer different than in the admin database. Click again to hide the admin assignment.\" className=\"icon notification calendar-assignment\" onClick={() => this.showDifferences(original)} />}\n                                {showTooltip && <ReactTooltip key={new Date()} />} {/*unique key is needed because otherwise, if the user hovers over a tooltip on one page of the table, if they hover over another on a different page, it will not work*/}\n                            </React.Fragment>\n                        )\n\n                        let originalCategoryDisplayCode = original.CategoryCode;\n                        if (categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier]) && categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier]).ChamberCode) {\n                            originalCategoryDisplayCode += \" (\" + categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier]).ChamberCode + \")\";\n                        }\n                        let associatedAdminCategoryDisplayCode = associatedAdminAssignmentWithoutModDate.CategoryCode;\n                        if (categories.find(c => c[uniqueCategoryIdentifier] === associatedAdminAssignmentWithoutModDate[uniqueCategoryIdentifier]) && categories.find(c => c[uniqueCategoryIdentifier] === associatedAdminAssignmentWithoutModDate[uniqueCategoryIdentifier]).ChamberCode) {\n                            associatedAdminCategoryDisplayCode += \" (\" + categories.find(c => c[uniqueCategoryIdentifier] === associatedAdminAssignmentWithoutModDate[uniqueCategoryIdentifier]).ChamberCode + \")\";\n                        }\n\n                        return (\n                            <React.Fragment>\n                                {original[uniqueIdentifier] && isLoaded &&\n                                    <div className={`calendar-assignment icons${showTooltip ? ' double' : ''}`}>\n                                        {<button className={`icon ${editing && editing[original[uniqueIdentifier]] ? 'delete' : 'edit'}`} onClick={() => this.toggleEdit(original)} />}\n                                        {tooltip}\n                                    </div>\n                                }\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={categories}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], CATEGORY, val)}\n                                        getOptionLabel={opt => (opt.ChamberCode ? \"(\" + opt.ChamberCode + \") \" : \"\") + opt.CategoryCode + \" - \" + opt.Description}\n                                        getOptionValue={opt => opt[uniqueCategoryIdentifier]}\n                                        value={categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier])}\n                                        styles={customStyles(true)}\n                                    />\n                                    :\n                                    <span title={categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier]) ? categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier]).Description : ''}>{String(originalCategoryDisplayCode || '')}</span>\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        <span title={categories.find(c => c[uniqueCategoryIdentifier] === associatedAdminAssignmentWithoutModDate[uniqueCategoryIdentifier]) ? categories.find(c => c[uniqueCategoryIdentifier] === associatedAdminAssignmentWithoutModDate[uniqueCategoryIdentifier]).Description : ''}>{String(associatedAdminCategoryDisplayCode || '')}</span>\n                                    </React.Fragment>\n                                }\n                            </React.Fragment>\n                        )\n                    },\n                    style: { textAlign: 'center', overflow: 'visible' }\n                },\n                {\n                    Header: \"Event\",\n                    accessor: \"EventCode\",\n                    width: 90,\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Placeholder: \"Filter...\",\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignmentWithoutModDate = this.getAssociatedAdminAssignmentWithoutModDate(original);\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={[...billEventOptions].filter((value, index, self) =>\n                                            index === self.findIndex((t) => (\n                                                t.EventCode === value.EventCode\n                                            ))\n                                        )}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], EVENT, val)}\n                                        value={billEventOptions.find(b => b.label === original.EventCode)}\n                                        styles={customStyles(false)}\n                                    />\n                                    :\n                                    String(original.EventCode)\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignmentWithoutModDate.EventCode || '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Event Description\",\n                    accessor: \"p_LegislationDescription\",\n                    filter: 'includesValue',\n                    Placeholder: \"Filter...\",\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        return (\n                            <React.Fragment>\n                                <span title={String(original.p_LegislationDescription || '')}>{String(original.p_LegislationDescription || '')}</span>\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        <br />\n                                        <span title={String(associatedAdminAssignment.p_LegislationDescription || '')}>{String(associatedAdminAssignment.p_LegislationDescription || '')}</span>\n                                    </React.Fragment>\n                                }\n                            </React.Fragment>\n                        )\n                    }\n                },\n                {\n                    Header: \"Leg Chamber\",\n                    accessor: \"LegislationChamberCode\",\n                    Placeholder: \"Filter...\",\n                    width: 100,\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        const options = [{ label: \"H\" }, { label: \"S\" }];\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={options}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], CHAMBER, val)}\n                                        getOptionValue={opt => opt.label}\n                                        value={options.find(b => b.label === original.LegislationChamberCode)}\n                                        styles={customStyles(false)}\n                                    />\n                                    :\n                                    String(original.LegislationChamberCode || '')\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignment.LegislationChamberCode || '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Leg Type\",\n                    accessor: \"LegislationTypeCode\",\n                    Placeholder: \"Filter...\",\n                    width: 80,\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Cell: ({ original }) => {\n                        const options = [{ label: \"B\" }, { label: \"J\" }, { label: \"R\" }]\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={options}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], TYPE, val)}\n                                        getOptionValue={opt => opt.label}\n                                        value={options.find(b => b.label === original.LegislationTypeCode)}\n                                        styles={customStyles(false)}\n                                    />\n                                    :\n                                    String(original.LegislationTypeCode || '')\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignment.LegislationTypeCode || '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Leg Class\",\n                    accessor: \"LegislationClass\",\n                    Placeholder: \"Filter...\",\n                    width: 160,\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={legislationClassOptions}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], CLASS, val)}\n                                        value={legislationClassOptions.find(b => b.LegislationClassID === original.LegislationClassID)}\n                                        styles={customStyles(false)}\n                                        isClearable\n                                    />\n                                    :\n                                    String(original.LegislationClass || '')\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignment.LegislationClass || '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Passed\",\n                    id: \"IsPassed\",\n                    accessor: cm => cm.IsPassed && cm.IsPassed.toString(),\n                    Placeholder: \"Filter...\",\n                    width: 75,\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        const options = [{ label: true }, { label: false }];\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={options}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], PASSED, val)}\n                                        getOptionLabel={opt => opt.label.toString()}\n                                        getOptionValue={opt => opt.label.toString()}\n                                        value={options.find(b => b.label === original.IsPassed)}\n                                        styles={customStyles(false)}\n                                    />\n                                    :\n                                    String(original.IsPassed !== undefined ? original.IsPassed : '')\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignment.IsPassed !== undefined ? associatedAdminAssignment.IsPassed : '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Uncontested\",\n                    id: \"IsUncontested\",\n                    Placeholder: \"Filter...\",\n                    accessor: cm => cm.IsUncontested && cm.IsUncontested.toString(),\n                    width: 110,\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        const options = [{ label: true }, { label: false }];\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={options}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], UNCONTESTED, val)}\n                                        getOptionLabel={opt => opt.label.toString()}\n                                        getOptionValue={opt => opt.label.toString()}\n                                        value={options.find(b => b.label === original.IsUncontested)}\n                                        styles={customStyles(false)}\n                                    />\n                                    :\n                                    String(original.IsUncontested !== undefined ? original.IsUncontested : '')\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignment.IsUncontested !== undefined ? associatedAdminAssignment.IsUncontested : '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Actions\",\n                    width: 100,\n                    sortable: false,\n                    filterable: false,\n                    Cell: ({ original }) => {\n                        if (duplicates.find(d => d.uid === original[uniqueIdentifier])) {\n                            return <span className=\"input-feedback\" style={{ fontWeight: 'bold', fontSize: '90%' }}>DUPLICATE</span>\n                        } else {\n                            const requiredFieldsNotCompleted = requiredFields.some(val => original[val] === null);\n                            //to compare between unedited and current, remove the categoryChamberIdentifier since the unedited will not have it\n                            //to compare between current and admin, remove the ModificationDate and categoryChamberIdentifier\n                            const uneditedAssignment = original[uniqueIdentifier] && this.getUneditedAssignment(original);\n                            const key = 'ModificationDate';\n                            //get unedited without category chamber identifier in order to use later to compare between unedited and current\n                            const { [categoryChamberIdentifier]: value, ...uneditedWithoutCategoryChamberIdentifier } = uneditedAssignment || {};\n                            //now get associated admin assignment without category chamber identifier and mod date in order to use later to compare between current and admin\n                            const associatedAdminAssignmentWithoutModDate = this.getAssociatedAdminAssignmentWithoutModDate(original);\n                            //now get current assignment without category chamber identifier in order to use later to compare between unedited and current\n                            const { [categoryChamberIdentifier]: value3, ...originalWithoutCategoryChamberIdentifier } = original;\n                            //now get current assignment without category chamber identifier and mod date in order to use later to compare between current and admin\n                            const { [key]: value4, ...originalWithoutCategoryChamberIdentifierAndModificationDate } = originalWithoutCategoryChamberIdentifier;\n                            //check if it's different or inexistent in admin db\n                            const differentOrNonExistentInAdminDB = original[uniqueIdentifier] && this.props.isDifferentOrNonExistentInAdminDB(originalWithoutCategoryChamberIdentifierAndModificationDate, associatedAdminAssignmentWithoutModDate)\n                            //if it's different from admin or different from the unedited version, set it as saveable\n                            const pendingSave = original[uniqueIdentifier] && (differentOrNonExistentInAdminDB || (uneditedWithoutCategoryChamberIdentifier && JSON.stringify(uneditedWithoutCategoryChamberIdentifier) !== JSON.stringify(originalWithoutCategoryChamberIdentifier)));\n                            return (\n                                <button className=\"button\"\n                                    disabled={!saving || Object.values(saving).indexOf(true) > -1 || requiredFieldsNotCompleted || (original[uniqueIdentifier] && !pendingSave)}\n                                    onClick={() => this.handleSave(original)}>{this.buttonText(pendingSave, original)}</button>\n                            )\n                        }\n                    },\n                    style: { textAlign: 'center' }\n                }\n            ]\n\n        return (\n            <div>\n                <div>\n                    {(billEventOptionsError || categoriesError || assignmentsError || adminAssignmentsError || legislationClassOptionsError) ?\n                        <React.Fragment>\n                            {billEventOptionsError && <p>Error loading legislation event options</p>}\n                            {categoriesError && <p>Error loading calendar category options</p>}\n                            {legislationClassOptionsError && <p>Error loading legislation class options</p>}\n                            {assignmentsError && <p>Error loading calendar assignments</p>}\n                            {adminAssignmentsError && <p>Error loading admin calendar assignments</p>}\n                        </React.Fragment>\n                        :\n                        <React.Fragment>\n                            <button className=\"button\" style={{ float: 'right' }} disabled={!isLoaded || filteringMismatches} onClick={this.toggleDifferences}>{showAllDifferences ? 'Show All' : 'Show Admin Mismatches'}</button>\n                            <ConfigurationsTable header={\"Calendar Assignments\"} assignments={showAllDifferences ? [...assignments].filter(ca => assignmentMismatches.includes(ca[uniqueIdentifier])) : assignments} adminAssignments={adminAssignments} newAssignment={newAssignment} categories={categories} uniqueCategoryIdentifier={uniqueCategoryIdentifier} isLoaded={isLoaded} columns={columns} sort={this.sort} showDifferences={showDifferences} uniqueIdentifier={uniqueIdentifier} />\n                        </React.Fragment>\n                    }\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, bills, calendar } = state;\n        return {\n            nav,\n            bills,\n            calendar\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, billActionCreators, calendarActionCreators), dispatch)\n        }\n    }\n)(CalendarConfigurations)\n\n\n\n\n\n\n\n","import React from 'react';\nimport ReactTooltip from 'react-tooltip';\nimport Select from 'react-select';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { communicationsActionCreators } from \"../../stores/lis-communications-store\";\nimport { navActionCreators } from \"../../stores/lis-nav-store\";\nimport ConfigurationsTable from './lis-configurations-table';\nimport { billActionCreators } from '../../stores/lis-legislation-store';\n\nconst EVENT = 0;\nconst CHAMBER = 1;\nconst TYPE = 2;\nconst PASSED = 3;\nconst CATEGORY = 4;\nconst UNCONTESTED = 5;\n\nconst uniqueIdentifier = \"CommunicationAssignmentID\";\nconst uniqueCategoryIdentifier = \"CommunicationCategoryTypeID\";\nconst categoryChamberIdentifier = \"communicationCategoryChamber\";\n\nconst requiredFields = [\"EventCode\", \"LegislationChamberCode\", \"LegislationTypeCode\", \"CategoryCode\"];\n\nconst newAssignmentFreshValues = {\n    CategoryCode: null,\n    EventCode: null,\n    p_LegislationDescription: null,\n    LegislationTypeCode: null,\n    LegislationChamberCode: null,\n    IsPassed: null,\n    [categoryChamberIdentifier]: null,\n    new: true\n};\n\nclass CommunicationsConfigurations extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            assignments: [],\n            adminAssignments: [],\n            categories: [],\n            loadedCategories: false,\n            loadedAssignments: false,\n            loadedAdminAssignments: false,\n            categoriesError: false,\n            assignmentsError: false,\n            adminAssignmentsError: false,\n            newAssignment: newAssignmentFreshValues,\n            duplicates: [],\n            showDifferences: {},\n            saving: {},\n            editing: {},\n            showAllDifferences: false,\n            filteringMismatches: false,\n            assignmentMismatches: []\n        };\n\n        this.getCategories = this.getCategories.bind(this);\n        this.getAssignments = this.getAssignments.bind(this);\n        this.getAdminAssignments = this.getAdminAssignments.bind(this);\n        this.handleAssignmentChange = this.handleAssignmentChange.bind(this);\n        this.sort = this.sort.bind(this);\n        this.handleSave = this.handleSave.bind(this);\n        this.showDifferences = this.showDifferences.bind(this);\n        this.buttonText = this.buttonText.bind(this);\n        this.toggleEdit = this.toggleEdit.bind(this);\n        this.checkDuplicates = this.checkDuplicates.bind(this);\n        this.getUneditedAssignment = this.getUneditedAssignment.bind(this);\n        this.toggleDifferences = this.toggleDifferences.bind(this);\n        this.findDifferences = this.findDifferences.bind(this);\n    }\n\n    componentDidMount() {\n        this.getCategories();\n        this.getAssignments();\n        this.getAdminAssignments();\n    }\n\n    getCategories() {\n        this.setState({ loadedCategories: false }, () => {\n            this.props.actions.getCommCategories('')\n                .then(() => {\n                    this.setState({\n                        loadedCategories: true,\n                        categories: [...this.props.communications.commCategories].sort((a, b) => a.ChamberCode.localeCompare(b.ChamberCode) || a.CategoryCode.localeCompare(b.CategoryCode))\n                    });\n                }).catch(err => {\n                    if (err === \"Aborted\") {\n                        return;\n                    }\n                    console.error(err);\n                    this.setState({ loadedCategories: true, categories: [], categoriesError: true })\n                });\n        });\n    }\n\n    getAssignments() {\n        this.setState({ loadedAssignments: false }, () => {\n            this.props.actions.getCommunicationAssignments().then(() => {\n                let assignments = JSON.parse(JSON.stringify(this.props.communications.communicationAssignments));\n                assignments.sort((a, b) => a.CategoryCode.localeCompare(b.CategoryCode))\n\n                this.setState({\n                    loadedAssignments: true,\n                    assignments\n                })\n            }).catch(err => {\n                if (err === \"Aborted\") {\n                    return;\n                }\n                console.error(err);\n                this.setState({ loadedAssignments: true, assignments: [], assignmentsError: true })\n            })\n        });\n    }\n\n    getAdminAssignments() {\n        this.setState({ loadedAdminAssignments: false }, () => {\n            this.props.actions.getAdminCommunicationAssignments().then(() => {\n                let adminAssignments = JSON.parse(JSON.stringify(this.props.communications.adminCommunicationAssignments));\n\n                this.setState({\n                    loadedAdminAssignments: true,\n                    adminAssignments\n                })\n            }).catch(err => {\n                if (err === \"Aborted\") {\n                    return;\n                }\n                console.error(err);\n                this.setState({ loadedAdminAssignments: true, adminAssignments: [], adminAssignmentsError: true })\n            })\n        });\n    }\n\n    handleAssignmentChange(uid, key, value) {\n        let assignments = [...this.state.assignments];\n        let assignment;\n        if (uid) {\n            assignment = assignments.find(c => c[uniqueIdentifier] === uid);\n        } else {\n            assignment = { ...this.state.newAssignment };\n        }\n\n        switch (key) {\n            case EVENT:\n                assignment.EventCode = value.label;\n                break;\n            case CHAMBER:\n                assignment.LegislationChamberCode = value ? value.label : null;\n                break;\n            case TYPE:\n                assignment.LegislationTypeCode = value.label;\n                break;\n            case PASSED:\n                assignment.IsPassed = value.label;\n                break;\n            case UNCONTESTED:\n                assignment.IsUncontested = value.label;\n                break;\n            case CATEGORY:\n                assignment[uniqueCategoryIdentifier] = value[uniqueCategoryIdentifier];\n                assignment.CategoryCode = value.CategoryCode;\n                assignment[categoryChamberIdentifier] = value.ChamberCode;\n                break;\n        }\n\n        let duplicates = [...this.state.duplicates];\n        //if there is an event code and legislationchambercode selected, this is enough to show the user the associated legislationdescription\n        if (assignment.EventCode && assignment.LegislationChamberCode !== null) {\n            const referenceEvent = [...this.props.billEventOptions].find(b => b.EventCode === assignment.EventCode && b.LegislationChamberCode === assignment.LegislationChamberCode && (assignment.IsPassed === null || assignment.IsPassed === b.IsPassed));\n            assignment.p_LegislationDescription = referenceEvent ? referenceEvent.LegislationDescription : null;\n\n            //if they have chosen an option for every required field (except category code), check to see if this is a duplicate entry, in which case prevent saving\n            if (requiredFields.every(val => assignment[val] !== null) && this.checkDuplicates(assignment)) {\n                duplicates.push({ uid: assignment[uniqueIdentifier] })\n            } else {\n                //there isn't a duplicate or there isn't enough values yet to determine; remove it from the duplicates if it's there\n                duplicates = duplicates.filter(d => d.uid !== assignment[uniqueIdentifier])\n            }\n        } else {\n            //there isn't enough info to determine the legislation description of the event, so set to null\n            assignment.p_LegislationDescription = null\n            //can't determine if there's a duplicate since we don't have enough values; remove it from the list of duplicates if it's there\n            duplicates = duplicates.filter(d => d.uid !== assignment[uniqueIdentifier])\n        }\n\n        if (uid) {\n            this.setState({ assignments, duplicates })\n        } else {\n            this.setState({ newAssignment: assignment, duplicates })\n        }\n    }\n\n    checkDuplicates(editedAssignment) {\n        const assignments = [...this.state.assignments];\n        if (!editedAssignment[categoryChamberIdentifier]) {\n            //assign the categoryChamberIdentifier if it hasn't been yet\n            const refCategory = this.state.categories.find(c => c[uniqueCategoryIdentifier] === editedAssignment[uniqueCategoryIdentifier]);\n            editedAssignment[categoryChamberIdentifier] = refCategory ? refCategory.ChamberCode : null;\n        }\n        return assignments.find(a => a[uniqueIdentifier] !== editedAssignment[uniqueIdentifier] &&\n            (!a.LegislationTypeCode || !editedAssignment.LegislationTypeCode || a.LegislationTypeCode === editedAssignment.LegislationTypeCode) &&\n            ((!a.IsPassed && !editedAssignment.IsPassed) || a.IsPassed === editedAssignment.IsPassed) &&\n            requiredFields.every(val => (val === \"CategoryCode\" && (!this.state.categories.find(c => c[uniqueCategoryIdentifier] === a[uniqueCategoryIdentifier]) || editedAssignment[categoryChamberIdentifier] === this.state.categories.find(c => c[uniqueCategoryIdentifier] === a[uniqueCategoryIdentifier]).ChamberCode)) || (val !== \"CategoryCode\" && a[val] === editedAssignment[val])))\n    }\n\n    sort(column) {\n        if (column.sortable === false) { return; }\n        let assignments = [...this.state.assignments];\n        assignments = this.props.sort(assignments, column);\n        this.setState({ assignments })\n    }\n\n    handleSave(assignment) {\n        let saving = { ...this.state.saving };\n        saving[assignment[uniqueIdentifier]] = true;\n        this.setState({ saving }, () => {\n            //nullify EventControlID and let DB resolve it based on other values, but if it fails then we need to put it back for comparison checks in the table between admin/new\n            const preSaveEventControlID = assignment.EventControlID;\n            assignment.EventControlID = null;\n            this.props.actions.saveCommunicationAssignment(assignment)\n                .then(() => {\n                    this.props.actions.makeToast([{ message: \"Save Successful\", type: \"success\" }]);\n\n                    //though the api is saving to both the current env and the admin db, the response is the one from the current env db. Update the assignments state value with this response\n                    const assignmentSave = JSON.parse(JSON.stringify(this.props.communications.communicationAssignmentSave))[0];\n                    let assignments = [...this.state.assignments];\n                    const existingAssignmentIndex = assignments.findIndex(ca => ca[uniqueIdentifier] === assignmentSave[uniqueIdentifier]);\n                    if (existingAssignmentIndex > -1) {\n                        assignments[existingAssignmentIndex] = assignmentSave;\n                    } else {\n                        assignments.splice(0, 0, assignmentSave);\n                    }\n\n                    //reset editing and saving values\n                    let editing = { ...this.state.editing };\n                    editing[assignment[uniqueIdentifier]] = false;\n                    saving[assignment[uniqueIdentifier]] = false;\n                    this.setState({\n                        assignments,\n                        saving,\n                        editing,\n                        newAssignment: assignment.new ? newAssignmentFreshValues : this.state.newAssignment\n                    }, () => {\n                        this.getAdminAssignments(); //don't just assume the admin db save worked; refresh the admin assignments\n                    })\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    this.props.actions.makeToast([{ message: \"Save Failed\", type: \"failure\" }]);\n                    console.log(err);\n\n                    //reset EventControlID since it was removed\n                    let assignments = [...this.state.assignments];\n                    const associatedAssignment = assignments.find(a => a[uniqueIdentifier] === assignment[uniqueIdentifier]);\n                    if (associatedAssignment) {\n                        assignment.EventControlID = preSaveEventControlID;\n                    }\n\n                    //reset the saving state value but keep in edit mode by not resetting the editing state value\n                    saving[assignment[uniqueIdentifier]] = false;\n                    this.setState({ assignments, saving });\n                })\n        })\n    }\n\n    showDifferences(assignment) {\n        let showDifferences = { ...this.state.showDifferences };\n        showDifferences[assignment[uniqueIdentifier]] = !showDifferences[assignment[uniqueIdentifier]];\n        this.setState({ showDifferences });\n    }\n\n    getAssociatedAdminAssignmentWithoutModDate = (assignment) => {\n        const associatedAdminAssignment = this.state.adminAssignments.find(aca => aca[uniqueIdentifier] === assignment[uniqueIdentifier]);\n        if (!associatedAdminAssignment) { return false; }\n        //remove the categoryChamberIdentifier and ModificationDate from the object so we can compare objects between the current env and the admin db\n        const { ModificationDate, [categoryChamberIdentifier]: value, ...associatedAdminAssignmentWithoutModificationDate } = associatedAdminAssignment || {};\n        return associatedAdminAssignmentWithoutModificationDate;\n    }\n\n    toggleEdit(original) {\n        let editing = { ...this.state.editing };\n        editing[original[uniqueIdentifier]] = !editing[original[uniqueIdentifier]];\n\n        //if they're exiting edit mode for this row, reset the values to what they were before going into edit mode, and re-check duplicates\n        let assignments = [...this.state.assignments];\n        let duplicates = [...this.state.duplicates];\n        if (!editing[original[uniqueIdentifier]]) {\n            const assignmentIndex = assignments.findIndex(c => c[uniqueIdentifier] === original[uniqueIdentifier]);\n            const uneditedAssignment = JSON.parse(JSON.stringify(this.getUneditedAssignment(original)));\n            assignments[assignmentIndex] = uneditedAssignment;\n\n            if (!this.checkDuplicates(assignments[assignmentIndex])) {\n                duplicates = duplicates.filter(d => d.uid !== assignments[assignmentIndex][uniqueIdentifier])\n            }\n        }\n\n        this.setState({ editing, assignments, duplicates });\n    }\n\n    buttonText = (pendingSave, original) => {\n        if (pendingSave || original[uniqueIdentifier]) {\n            return this.state.saving[original[uniqueIdentifier]] ? \"Saving\" : \"Save\";\n        } else {\n            return \"Insert\";\n        }\n    }\n\n    getUneditedAssignment(assignment) {\n        //if we've saved the assignment, that's the latest/unedited version; otherwise, the Get should be the latest/unedited version\n        return [...this.props.communications.communicationAssignmentSave] && [...this.props.communications.communicationAssignmentSave].find(cas => cas[uniqueIdentifier] === assignment[uniqueIdentifier]) ? [...this.props.communications.communicationAssignmentSave].find(cas => cas[uniqueIdentifier] === assignment[uniqueIdentifier]) : [...this.props.communications.communicationAssignments].find(ca => ca[uniqueIdentifier] === assignment[uniqueIdentifier]);\n    }\n\n    toggleDifferences() {\n        this.setState({\n            showAllDifferences: !this.state.showAllDifferences\n        }, () => {\n            if (this.state.showAllDifferences) {\n                this.findDifferences();\n            }\n        })\n    }\n\n    findDifferences() {\n        this.setState({ filteringMismatches: true }, () => {\n            const assignmentMismatches = this.props.findDifferences([...this.state.assignments], uniqueIdentifier, categoryChamberIdentifier, this.getAssociatedAdminAssignmentWithoutModDate)\n            this.setState({ assignmentMismatches, filteringMismatches: false })\n        })\n    }\n\n    render() {\n        const { loadedAssignments, loadedAdminAssignments, loadedCategories,\n            assignments, adminAssignments, newAssignment, categories,\n            duplicates, showDifferences, showAllDifferences, assignmentMismatches, filteringMismatches,\n            categoriesError, assignmentsError, adminAssignmentsError,\n            saving, editing } = this.state;\n        const { billEventOptions, billEventOptionsError, loadedBillEventOptions, customStyles } = this.props;\n\n        const isLoaded = loadedAssignments && loadedAdminAssignments && loadedCategories && loadedBillEventOptions;\n\n        const columns =\n            [\n                {\n                    Header: \"Category Code\",\n                    accessor: \"CategoryCode\",\n                    width: 140,\n                    Placeholder: \"Filter...\",\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignmentWithoutModDate = this.getAssociatedAdminAssignmentWithoutModDate(original);\n                        const { ModificationDate, [categoryChamberIdentifier]: value, ...originalWithoutModificationDate } = original;\n                        const differentInAdminDB = associatedAdminAssignmentWithoutModDate && JSON.stringify(associatedAdminAssignmentWithoutModDate) !== JSON.stringify(originalWithoutModificationDate);\n                        const doesNotExistInAdminDB = original[uniqueIdentifier] && !associatedAdminAssignmentWithoutModDate;\n                        const showTooltip = differentInAdminDB || doesNotExistInAdminDB || showDifferences[original[uniqueIdentifier]]\n                        const tooltip = showTooltip && (\n                            <React.Fragment>\n                                {differentInAdminDB && <i data-tip={`This assignment is different in the admin database.${showDifferences[original[uniqueIdentifier]] ? \" The assignment in the admin database is displayed on the bottom below.\" : \"\"} Click ${showDifferences[original[uniqueIdentifier]] ? 'again to hide the admin assignment' : 'to show the admin assignment below the currently displayed assignment'}.`} className=\"icon notification communication-assignment\" onClick={() => this.showDifferences(original)} />}\n                                {doesNotExistInAdminDB && <i data-tip=\"This assignment does not exist in the admin database.\" className=\"icon notification communication-assignment\" />}\n                                {!differentInAdminDB && !doesNotExistInAdminDB && showDifferences[original[uniqueIdentifier]] && <i data-tip=\"This assignment is no longer different than in the admin database. Click again to hide the admin assignment.\" className=\"icon notification communication-assignment\" onClick={() => this.showDifferences(original)} />}\n                                {showTooltip && <ReactTooltip key={new Date()} />} {/*unique key is needed because otherwise, if the user hovers over a tooltip on one page of the table, if they hover over another on a different page, it will not work*/}\n                            </React.Fragment>\n                        )\n\n                        let originalCategoryDisplayCode = original.CategoryCode;\n                        if (categories.filter(c => c.CategoryCode === original.CategoryCode).length > 1) {\n                            const refCategory = categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier]);\n                            if (refCategory) {\n                                originalCategoryDisplayCode += \" (\" + refCategory.ChamberCode + \")\";\n                            }\n                        }\n                        let associatedAdminCategoryDisplayCode = associatedAdminAssignmentWithoutModDate.CategoryCode;\n                        if (categories.filter(c => c.CategoryCode === associatedAdminAssignmentWithoutModDate.CategoryCode).length > 1) {\n                            const refCategory = categories.find(c => c[uniqueCategoryIdentifier] === associatedAdminAssignmentWithoutModDate[uniqueCategoryIdentifier]);\n                            if (refCategory) {\n                                associatedAdminCategoryDisplayCode += \" (\" + refCategory.ChamberCode + \")\";\n                            }\n                        }\n\n                        return (\n                            <React.Fragment>\n                                {original[uniqueIdentifier] && isLoaded &&\n                                    <div className={`communication-assignment icons${showTooltip ? ' double' : ''}`}>\n                                        {<button className={`icon ${editing && editing[original[uniqueIdentifier]] ? 'delete' : 'edit'}`} onClick={() => this.toggleEdit(original)} />}\n                                        {tooltip}\n                                    </div>\n                                }\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={categories}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], CATEGORY, val)}\n                                        getOptionLabel={opt => opt.CategoryCode + (opt.ChamberCode && categories.filter(c => c.CategoryCode === opt.CategoryCode).length > 1 ? \" (\" + opt.ChamberCode + \")\" : \"\") + \" - \" + opt.Description}\n                                        getOptionValue={opt => opt[uniqueCategoryIdentifier]}\n                                        value={categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier])}\n                                        styles={customStyles(true)}\n                                    />\n                                    :\n                                    <span title={categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier]) ? categories.find(c => c[uniqueCategoryIdentifier] === original[uniqueCategoryIdentifier]).Description : ''}>{String(originalCategoryDisplayCode || '')}</span>\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        <span title={categories.find(c => c[uniqueCategoryIdentifier] === associatedAdminAssignmentWithoutModDate[uniqueCategoryIdentifier]) ? categories.find(c => c[uniqueCategoryIdentifier] === associatedAdminAssignmentWithoutModDate[uniqueCategoryIdentifier]).Description : ''}>{String(associatedAdminCategoryDisplayCode || '')}</span>\n                                    </React.Fragment>\n                                }\n                            </React.Fragment>\n                        )\n                    },\n                    style: { textAlign: 'center', overflow: 'visible' }\n                },\n                {\n                    Header: \"Event\",\n                    accessor: \"EventCode\",\n                    width: 120,\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Placeholder: \"Filter...\",\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={[...billEventOptions].filter((value, index, self) =>\n                                            index === self.findIndex((t) => (\n                                                t.EventCode === value.EventCode\n                                            ))\n                                        )}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], EVENT, val)}\n                                        value={billEventOptions.find(b => b.label === original.EventCode)}\n                                        styles={customStyles(false)}\n                                    />\n                                    :\n                                    String(original.EventCode)\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignment.EventCode || '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Event Description\",\n                    accessor: \"p_LegislationDescription\",\n                    filter: 'includesValue',\n                    Placeholder: \"Filter...\",\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        return (\n                            <React.Fragment>\n                                <span title={String(original.p_LegislationDescription || '')}>{String(original.p_LegislationDescription || '')}</span>\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        <br />\n                                        <span title={String(associatedAdminAssignment.p_LegislationDescription || '')}>{String(associatedAdminAssignment.p_LegislationDescription || '')}</span>\n                                    </React.Fragment>\n                                }\n                            </React.Fragment>\n                        )\n                    }\n                },\n                {\n                    Header: \"Leg Chamber\",\n                    accessor: \"LegislationChamberCode\",\n                    width: 100,\n                    Placeholder: \"Filter...\",\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        const options = [{ label: \"H\" }, { label: \"S\" }];\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={options}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], CHAMBER, val)}\n                                        getOptionValue={opt => opt.label}\n                                        value={options.find(b => b.label === original.LegislationChamberCode)}\n                                        styles={customStyles(false)}\n                                    />\n                                    :\n                                    String(original.LegislationChamberCode || '')\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignment.LegislationChamberCode || '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Leg Type\",\n                    accessor: \"LegislationTypeCode\",\n                    width: 100,\n                    Placeholder: \"Filter...\",\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        const options = [{ label: \"B\" }, { label: \"J\" }, { label: \"R\" }]\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={options}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], TYPE, val)}\n                                        getOptionValue={opt => opt.label}\n                                        value={options.find(b => b.label === original.LegislationTypeCode)}\n                                        styles={customStyles(false)}\n                                    />\n                                    :\n                                    String(original.LegislationTypeCode || '')\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignment.LegislationTypeCode || '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Passed\",\n                    id: \"IsPassed\",\n                    accessor: cm => cm.IsPassed && cm.IsPassed.toString(),\n                    width: 100,\n                    Placeholder: \"Filter...\",\n                    style: { textAlign: 'center', overflow: 'visible' },\n                    Cell: ({ original }) => {\n                        const associatedAdminAssignment = showDifferences[original[uniqueIdentifier]] && adminAssignments.find(aca => aca[uniqueIdentifier] === original[uniqueIdentifier]);\n                        const options = [{ label: true }, { label: false }];\n                        return (\n                            <div>\n                                {!original[uniqueIdentifier] || (editing && editing[original[uniqueIdentifier]]) ?\n                                    <Select\n                                        options={options}\n                                        onChange={(val) => this.handleAssignmentChange(original[uniqueIdentifier], PASSED, val)}\n                                        getOptionLabel={opt => opt.label.toString()}\n                                        getOptionValue={opt => opt.label.toString()}\n                                        value={options.find(b => b.label === original.IsPassed)}\n                                        styles={customStyles(false)}\n                                    />\n                                    :\n                                    String(original.IsPassed !== undefined ? original.IsPassed : '')\n                                }\n                                {showDifferences[original[uniqueIdentifier]] &&\n                                    <React.Fragment>\n                                        {!editing || !editing[original[uniqueIdentifier]] && <br />}\n                                        {String(associatedAdminAssignment.IsPassed !== undefined ? associatedAdminAssignment.IsPassed : '')}\n                                    </React.Fragment>\n                                }\n                            </div>\n                        )\n                    }\n                },\n                {\n                    Header: \"Actions\",\n                    width: 110,\n                    sortable: false,\n                    filterable: false,\n                    Cell: ({ original }) => {\n                        if (duplicates.find(d => d.uid === original[uniqueIdentifier])) {\n                            return <span className=\"input-feedback\" style={{ fontWeight: 'bold', fontSize: '90%' }}>DUPLICATE</span>\n                        } else {\n                            const requiredFieldsNotCompleted = requiredFields.some(val => original[val] === null);\n                            //to compare between unedited and current, remove the categoryChamberIdentifier since the unedited will not have it\n                            //to compare between current and admin, remove the ModificationDate and categoryChamberIdentifier\n                            const uneditedAssignment = original[uniqueIdentifier] && this.getUneditedAssignment(original);\n                            const key = 'ModificationDate';\n                            //get unedited without category chamber identifier in order to use later to compare between unedited and current\n                            const { [categoryChamberIdentifier]: value, ...uneditedWithoutCategoryChamberIdentifier } = uneditedAssignment || {};\n                            //now get associated admin assignment without category chamber identifier and mod date in order to use later to compare between current and admin\n                            const associatedAdminAssignmentWithoutModDate = this.getAssociatedAdminAssignmentWithoutModDate(original);\n                            //now get current assignment without category chamber identifier in order to use later to compare between unedited and current\n                            const { [categoryChamberIdentifier]: value3, ...originalWithoutCategoryChamberIdentifier } = original;\n                            //now get current assignment without category chamber identifier and mod date in order to use later to compare between current and admin\n                            const { [key]: value4, ...originalWithoutCategoryChamberIdentifierAndModificationDate } = originalWithoutCategoryChamberIdentifier;\n                            //check if it's different or inexistent in admin db\n                            const differentOrNonExistentInAdminDB = original[uniqueIdentifier] && this.props.isDifferentOrNonExistentInAdminDB(originalWithoutCategoryChamberIdentifierAndModificationDate, associatedAdminAssignmentWithoutModDate)\n                            //if it's different from admin or different from the unedited version, set it as saveable\n                            const pendingSave = original[uniqueIdentifier] && (differentOrNonExistentInAdminDB || (uneditedWithoutCategoryChamberIdentifier && JSON.stringify(uneditedWithoutCategoryChamberIdentifier) !== JSON.stringify(originalWithoutCategoryChamberIdentifier)));\n                            return (\n                                <button className=\"button\"\n                                    disabled={!saving || Object.values(saving).indexOf(true) > -1 || requiredFieldsNotCompleted || (original[uniqueIdentifier] && !pendingSave)}\n                                    onClick={() => this.handleSave(original)}>{this.buttonText(pendingSave, original)}</button>\n                            )\n                        }\n                    },\n                    style: { textAlign: 'center' }\n                }\n            ]\n\n        return (\n            <div>\n                <div>\n                    {(billEventOptionsError || categoriesError || assignmentsError || adminAssignmentsError) ?\n                        <React.Fragment>\n                            {billEventOptionsError && <p>Error loading legislation event options</p>}\n                            {categoriesError && <p>Error loading communication category options</p>}\n                            {assignmentsError && <p>Error loading communication assignments</p>}\n                            {adminAssignmentsError && <p>Error loading admin communication assignments</p>}\n                        </React.Fragment>\n                        :\n                        <React.Fragment>\n                            <button className=\"button\" style={{ float: 'right' }} disabled={!isLoaded || filteringMismatches} onClick={this.toggleDifferences}>{showAllDifferences ? 'Show All' : 'Show Admin Mismatches'}</button>\n                            <ConfigurationsTable header={\"Communication Assignments\"} assignments={showAllDifferences ? [...assignments].filter(ca => assignmentMismatches.includes(ca[uniqueIdentifier])) : assignments} adminAssignments={adminAssignments} newAssignment={newAssignment} categories={categories} uniqueCategoryIdentifier={uniqueCategoryIdentifier} isLoaded={isLoaded} columns={columns} sort={this.sort} showDifferences={showDifferences} uniqueIdentifier={uniqueIdentifier} />\n                        </React.Fragment>\n                    }\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { nav, bills, communications } = state;\n        return {\n            nav,\n            bills,\n            communications\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, navActionCreators, billActionCreators, communicationsActionCreators), dispatch)\n        }\n    }\n)(CommunicationsConfigurations)\n\n\n\n\n\n\n\n","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nclass ConfigurationsGrid extends React.Component {\n    render() {\n        return (\n            <div>\n                <div className=\"configurations configurations-icon-links\">\n                    <div className=\"grid-wrapper three\">\n                        <div className=\"configurations\">\n                            <Link className=\"configurations info-link calendar\" to=\"/configurations-management/calendar\"></Link>\n                            <Link to=\"/configurations-management/calendar\">Calendar</Link>\n                        </div>\n                        <div className=\"configurations\">\n                            <Link className=\"configurations info-link communications\" to=\"/configurations-management/communications\"></Link>\n                            <Link to=\"/configurations-management/communications\">Communications</Link>\n                        </div>\n                        <div className=\"configurations\">\n                            <a className=\"configurations info-link category-action\"></a>\n                            <a>Category Action<br/>(Coming Soon)</a>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default ConfigurationsGrid","import React from 'react';\nimport { Route } from 'react-router';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport CalendarConfigurations from './lis-calendar-configurations';\nimport CommunicationsConfigurations from './lis-communications-configurations';\nimport ConfigurationsGrid from './lis-configurations-grid';\nimport { billActionCreators } from '../../stores/lis-legislation-store';\nimport { Link } from 'react-router-dom';\n\nconst customStyles = (categoryColumn) => ({\n    option: (base, state) => ({\n        ...base,\n        fontSize: '0.8em',\n    }),\n    control: (base) => ({\n        ...base,\n        padding: '1px',\n        margin: 0,\n        minHeight: 0,\n        fontSize: '0.8em',\n    }),\n    singleValue: (base, state) => {\n        return { ...base, };\n    },\n    valueContainer: base => ({\n        ...base,\n        padding: '2px 4px'\n    }),\n    dropdownIndicator: base => ({\n        ...base,\n        padding: '2px'\n    }),\n    clearIndicator: base => ({\n        ...base,\n        padding: '0px',\n    }),\n    menu: base => ({\n        ...base,\n        width: categoryColumn ? 'auto' : '100%',\n        maxWidth: '600px',\n        textAlign: categoryColumn ? 'left' : 'center'\n    })\n})\n\nconst isAscending = (arr, header) => {\n    return arr.every(function (x, i) {\n        return i === 0 || [null, undefined].includes(x[header]) || [null, undefined].includes(arr[i - 1][header]) || x[header].toString().toLowerCase() >= arr[i - 1][header].toString().toLowerCase();\n    });\n}\n\nclass ConfigurationsManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            billEventOptions: [],\n            loadedBillEventOptions: false,\n            billEventOptionsError: false\n        };\n\n        this.getEventReferences = this.getEventReferences.bind(this);\n        this.sort = this.sort.bind(this);\n    }\n\n    componentDidMount() {\n        this.getEventReferences();\n    }\n\n    getEventReferences() {\n        this.setState({ loadedBillEventOptions: false }, () => {\n            this.props.actions.getBillEventReferences(\"?isActive=true\")\n                .then(() => {\n                    let billEventReferences = [...this.props.bills.billEventRef];\n\n                    billEventReferences.forEach(ref => {\n                        ref.label = ref.EventCode\n                        ref.value = ref.EventCode\n                    });\n\n                    this.setState({\n                        loadedBillEventOptions: true,\n                        billEventOptions: billEventReferences\n                    });\n                }).catch(err => {\n                    if (err === 'Aborted') {\n                        return;\n                    }\n                    console.log(err);\n                    this.setState({ loadedBillEventOptions: true, billEventOptions: [], billEventOptionsError: true })\n                });\n        })\n    }\n\n    sort(assignments, column) {\n        const currentlyAsc = isAscending(assignments, column.id);\n        assignments.sort((first, second) => {\n            let a = first[column.id]\n            let b = second[column.id]\n            // force null and undefined to the bottom\n            a = a === null || a === undefined ? Infinity : a\n            if (a === Infinity) { return 1 }\n            b = b === null || b === undefined ? Infinity : b\n            if (b === Infinity) { return -1 }\n            // force any string values to lowercase\n            a = typeof a === 'string' ? a.toLowerCase() : a\n            b = typeof b === 'string' ? b.toLowerCase() : b\n            // Return either 1 or -1 to indicate a sort priority\n            if (a > b) {\n                return currentlyAsc ? -1 : 1;\n            }\n            if (a < b) {\n                return currentlyAsc ? 1 : -1;\n            }\n            //secondarily sort by category code ascending\n            if (first['CategoryCode'] && second['CategoryCode']) {\n                if (first['CategoryCode'].toLowerCase() > second['CategoryCode'].toLowerCase()) {\n                    return 1;\n                }\n                if (second['CategoryCode'].toLowerCase() > first['CategoryCode'].toLowerCase()) {\n                    return -1;\n                }\n            }\n            //tertiarily sort by event code ascending\n            if (first['EventCode'] && second['EventCode']) {\n                if (first['EventCode'].toLowerCase() > second['EventCode'].toLowerCase()) {\n                    return 1;\n                }\n                if (second['EventCode'].toLowerCase() > first['EventCode'].toLowerCase()) {\n                    return -1;\n                }\n            }\n            // returning 0 or undefined will use any subsequent column sorting methods or the row index as a tiebreaker\n            return 0\n        })\n        return assignments;\n    }\n\n    findDifferences(assignments, uniqueIdentifier, categoryChamberIdentifier, getAssociatedAdminAssignmentFn) {\n        let assignmentMismatches = [];\n        assignments.forEach(assignment => {\n            const associatedAdminAssignment = getAssociatedAdminAssignmentFn(assignment);\n            if (!associatedAdminAssignment) {\n                assignmentMismatches.push(assignment[uniqueIdentifier]);\n                return;\n            }\n            const { ModificationDate, [categoryChamberIdentifier]: value, ...originalWithoutCategoryChamberAndModificationDate } = assignment;\n            if (this.isDifferentOrNonExistentInAdminDB(originalWithoutCategoryChamberAndModificationDate, associatedAdminAssignment)) {\n                assignmentMismatches.push(assignment[uniqueIdentifier]);\n            }\n        });\n        return assignmentMismatches;\n    }\n\n    isDifferentOrNonExistentInAdminDB(current, admin) {\n        return (!admin || JSON.stringify(admin) !== JSON.stringify(current));\n    }\n\n    render() {\n        const { loadedBillEventOptions, billEventOptions, billEventOptionsError } = this.state;\n        return (\n            <div style={{ paddingBottom: '40px' }}>\n                <div>\n                    <h1 className=\"no-margin-bottom\">{this.props.location.pathname.endsWith('/configurations-management') ? \"Configurations Management\" : <Link className=\"no-margin-bottom\" style={{ textDecoration: 'none' }} to=\"/configurations-management\">Configurations Management</Link>}</h1>\n                </div>\n                <Route exact path={this.props.match.path} render={props => <ConfigurationsGrid\n                    {...props}\n                />} />\n                <Route path={\"/configurations-management/calendar\"} render={props => <CalendarConfigurations\n                    {...props}\n                    loadedBillEventOptions={loadedBillEventOptions}\n                    billEventOptions={billEventOptions}\n                    billEventOptionsError={billEventOptionsError}\n                    customStyles={customStyles}\n                    isAscending={isAscending}\n                    sort={this.sort}\n                    findDifferences={this.findDifferences}\n                    isDifferentOrNonExistentInAdminDB={this.isDifferentOrNonExistentInAdminDB}\n                />} />\n                <Route path={\"/configurations-management/communications\"} render={props => <CommunicationsConfigurations\n                    {...props}\n                    loadedBillEventOptions={loadedBillEventOptions}\n                    billEventOptions={billEventOptions}\n                    billEventOptionsError={billEventOptionsError}\n                    customStyles={customStyles}\n                    isAscending={isAscending}\n                    sort={this.sort}\n                    findDifferences={this.findDifferences}\n                    isDifferentOrNonExistentInAdminDB={this.isDifferentOrNonExistentInAdminDB}\n                />} />\n            </div>\n        )\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { bills } = state;\n        return {\n            bills\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, billActionCreators), dispatch)\n        }\n    }\n)(ConfigurationsManagement)\n\n","import React from \"react\";\nimport ReactTable from \"react-table\";\nimport { Link } from 'react-router-dom';\nimport '../../../stylesheets/shared/react-table.css';\nimport moment from 'moment-timezone';\nimport * as Fields from '../../../lis-shared/lis-layout/components/lis-forms-component';\nimport DatePicker from \"react-datepicker\";\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { journalActionCreators } from '../../../stores/lis-journal-store';\nimport { sessionActionCreators } from '../../../stores/lis-session-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport { navActionCreators } from \"../../../stores/lis-nav-store\";\n\nclass JournalGridComponent extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            journalDate: moment(),\n            journalList: [],\n            isLoaded: false,\n            selected: {},\n            sessionList: [],\n            sessionDropdown: [],\n            selectedSessionToolbar: '',\n            selectedSessionGrid: '',\n            filtered: [{ id: 'all', value: 'true' }],\n            filterAll: 'true',\n        };\n        this.handleDateChange = this.handleDateChange.bind(this);\n        this.handleSendCategory = this.handleSendCategory.bind(this);\n        this.handleDeleteJournal = this.handleDeleteJournal.bind(this);\n    };\n\n    //When component has mounted, make the call to the list users API\n    componentDidMount() {\n        let selectedSession = this.props.selectedSession;\n        let defaultSession = '';\n        this.props.actions.getSessionList().then(() => {\n            let sessionList = [...this.props.session.sessionList].reverse();\n            sessionList.forEach(session => {\n                session.label = session.SessionYear + ' ' + session.DisplayName;\n                session.value = session.SessionID;\n                if (session.IsDefault) {\n                    selectedSession = selectedSession || session;\n                    defaultSession = session;\n                }\n            });\n            this.setState({\n                sessionDropdown: sessionList,\n                sessionList: sessionList,\n                selectedSessionGrid: defaultSession\n            });\n            this.props.handleSessionChange(selectedSession, () => this.getJournalData());\n        });\n\n        this.props.actions.getJournalCategories();\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    getJournalData() {\n        if (!this.props.selectedSession) {\n            return\n        }\n        const params = 'sessionID=' + this.props.selectedSession.SessionID;\n        this.setState({\n            isLoaded: false\n        });\n        this.props.actions.getJournals(params).then(() => {\n            const journalList = this.props.journal.journalList;\n            this.setState({\n                isLoaded: true,\n                journalDate: journalList.find(j => moment(j.JournalDate).isSame(moment(), 'day')) ? null : this.state.journalDate || moment(),\n                journalList,\n            });\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            this.setState({\n                isLoaded: true,\n                message: err.toString()\n            });\n        });\n    }\n\n    handleDateChange(date) {\n        this.setState({\n            journalDate: moment(date)\n        });\n    }\n\n    handleDropDownChange = (value, state) => {\n        this.setState({\n            [state]: value\n        })\n    }\n\n    handleSessionSelectChange = value => {\n        this.props.handleSessionChange(value, () => this.getJournalData())\n    }\n\n    handleCategoryChange = value => {\n        this.props.handleCategoryChange(value);\n    }\n\n    onFilteredChange(filtered) {\n        if (filtered.length > 1 && this.state.filterAll.length) {\n            // NOTE: this removes any FILTER ALL filter\n            const filterAll = '';\n            this.setState({ filtered: filtered.filter((item) => item.id !== 'all'), filterAll })\n        }\n        else\n            this.setState({ filtered });\n    }\n\n    getTrProps = (state, rowInfo, instance) => {\n        if (rowInfo) {\n            return {\n                style: {\n                    background: rowInfo.original.IsDefault ? 'rgb(202, 225, 241)' : null,\n                }\n            }\n        }\n        return {};\n    }\n\n    sendCreateDetails() {\n        this.setState({\n            isSaving: true\n        });\n        this.props.actions.buildJournal('?sessionID=' + this.state.selectedSessionGrid.SessionID + '&JournalDay=' + moment(this.state.journalDate).format(\"MM/DD/yyyy\")).then(() => {\n            this.setState({\n                showCreateSuccess: true,\n                isSaving: false\n            })\n            setTimeout(function () {\n                this.setState({ showCreateSuccess: false });\n            }.bind(this), 5000);\n            this.props.handleSessionChange(this.state.selectedSessionGrid, () => this.getJournalData())\n        }).catch(err => {\n            if (err === 'Aborted') {\n                return;\n            }\n            this.setState({\n                showCreateFailure: true,\n                isSaving: false\n            });\n            setTimeout(function () {\n                this.setState({ showCreateFailure: false });\n            }.bind(this), 5000);\n        });\n    }\n\n    handleSendCategory() {\n        let params = \"journalCategoryType=\" + this.props.selectedCategory.label + \"&sessionId=\" + this.props.selectedSession.SessionID\n        this.props.actions.getCategoryData(params)\n            .then(() => {\n                let downloadLink = document.createElement('a');\n                let url = window.URL.createObjectURL(new Blob([this.props.journal.categoryData]))\n                downloadLink.setAttribute('href', url);\n                downloadLink.setAttribute('download', this.props.selectedSession.label + \"-\" + this.props.selectedCategory.label + \".mml\");\n\n                downloadLink.style.display = 'none';\n                document.body.appendChild(downloadLink);\n                downloadLink.click();\n\n                document.body.removeChild(downloadLink);\n            })\n    }\n\n    handleDeleteJournal(journalId) {\n        this.props.actions.deleteJournal(journalId)\n            .then(() => {\n                if (this.props.journal.journalDeleteError.length === 0) {\n                    this.props.actions.makeToast([{ message: \"Journal Day Deleted\", type: \"success\" }]);\n                    this.getJournalData();\n                } else {\n                    this.props.actions.makeToast([{ message: \"Journal Day Delete Failed\", type: \"failure\" }]);\n                }\n            })\n    }\n\n    render() {\n        return (\n            <div>\n                <div className=\"header-half\">\n                    <h1>Journal Management</h1>\n                </div>\n                <div className=\"toolbar journal-toolbar dlas-forms\">\n                    <div>\n                        <Fields.Dropdown\n                            value={this.props.selectedSession}\n                            options={this.state.sessionDropdown}\n                            id=\"sessionDropdown\"\n                            onChange={this.handleSessionSelectChange}\n                        />\n                    </div>\n                    <div>\n                        <Fields.Dropdown\n                            value={this.props.selectedCategory}\n                            options={this.props.journal.journalCategoryList}\n                            id=\"category-dropdown\"\n                            onChange={this.handleCategoryChange}\n                        />\n                    </div>\n                    <button className=\"button primary\" onClick={() => this.handleSendCategory()}>Generate Category</button>\n                </div>\n                {this.state.message &&\n                    <span className=\"fail small-text\">{this.state.message}</span>\n                }\n                <ReactTable\n                    resizable={false}\n                    loading={!this.state.isLoaded}\n                    data={this.state.journalList}\n                    ref={r => this.reactTable = r}\n                    defaultFilterMethod={(filter, row) =>\n                        String(row[filter.id]) === filter.value}\n                    noDataText={this.props.journal.journalMessage}\n                    onFilteredChange={this.onFilteredChange.bind(this)}\n                    columns={[\n                        {\n                            Header: \"Journal Date\",\n                            accessor: \"JournalDate\",\n                            sortable: false,\n                            filterAll: true,\n                            width: 250,\n                            columns: [\n                                {\n                                    Header: (\n                                        <div className=\"dlas-forms datepicker-container\">\n                                            {!this.state.showCreateSuccess && !this.state.showCreateFailure &&\n                                                <DatePicker\n                                                    id=\"journalDate\"\n                                                    className=\"dnd-field\"\n                                                    selected={this.state.journalDate}\n                                                    onChange={this.handleDateChange}\n                                                    excludeDates={this.state.journalList.map(j => j.JournalDate)}\n                                                    placeholderText=\"Journal Date\"\n                                                />\n                                            }\n                                        </div>\n                                    ),\n                                    headerClassName: \"header-insert\",\n                                    accessor: \"JournalDate\",\n                                    sortable: false,\n                                    filterAll: true,\n                                    width: 200,\n                                    Cell: row => {\n                                        return (\n                                            <span id={'cm-datecell-' + row.index}>{moment(row.original.JournalDate).format('L')}</span>\n                                        )\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Session\",\n                            columns: [\n                                {\n                                    Header: (\n                                        <div>\n                                            {!this.state.showCreateSuccess && !this.state.showCreateFailure &&\n                                                <Fields.Dropdown\n                                                    value={this.state.selectedSessionGrid}\n                                                    options={this.state.sessionList}\n                                                    className=\"grid-selector-dropdown\"\n                                                    classNamePrefix=\"grid-selector-dropdown\"\n                                                    id=\"sessionDropdown\"\n                                                    onChange={(value) => { this.handleDropDownChange(value, 'selectedSessionGrid') }} />\n                                            }\n                                            {this.state.showCreateSuccess &&\n                                                <span className=\"insert-message\">Journal created successfully</span>\n                                            }\n                                            {this.state.showCreateFailure &&\n                                                <span className=\"insert-message fail\">Journal creation failed</span>\n                                            }\n                                        </div>\n                                    ),\n                                    headerClassName: \"header-insert-dropdown\",\n                                    accessor: \"SessionName\",\n                                    sortable: false,\n                                    filterAll: true,\n                                    Cell: row => {\n                                        return <span id={'mm-session-' + row.index}>{row.value}</span>\n                                    }\n                                }\n                            ]\n                        },\n                        {\n                            Header: \"Actions\",\n                            headerClassName: \"submit-action\",\n                            columns: [\n\n                                {\n                                    Header: (<span><button id=\"submit-new-journal\" onClick={this.sendCreateDetails.bind(this)} disabled={!this.state.journalDate || this.state.isSaving} className=\"button\">Create</button></span>),\n                                    headerClassName: \"header-action\",\n                                    accessor: \"action\",\n                                    sortable: false,\n                                    className: \"action-column\",\n                                    width: 100,\n                                    Cell: row => {\n                                        return (\n                                            <div className=\"grid-wrapper two\">\n                                                <Link id={'cm-edit-' + row.index} to={`/journal-management/edit-journal/${row.original.JournalID}`} className=\"button edit\">Edit</Link>\n                                                <span className=\"icon delete no-repeat\" onClick={() => this.handleDeleteJournal(row.original.JournalID)} />\n                                            </div>\n                                        )\n                                    }\n                                },\n                            ]\n                        }\n                    ]}\n                    defaultSorted={[\n                        {\n                            id: \"Name\",\n                            desc: false\n                        }\n                    ]}\n                    defaultPageSize={15}\n                    pageSizeOptions={[5, 10, 15, 20, 25, 50, 100]}\n                    className=\"committee-table -striped -highlight\"\n                />\n                <br />\n\n            </div>\n        );\n    }\n}\n\nconst JournalManagementGrid = connect(\n    (state) => {\n        const { journal, session } = state;\n        return {\n            journal,\n            session\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, sessionActionCreators, journalActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(JournalGridComponent)\n\n\nexport default JournalManagementGrid;","import React from 'react';\n\nclass JournalDetails extends React.Component {\n\n    render() {\n        const { categories } = this.props;\n        return (\n            <div>\n                {categories.filter(c => c.JournalEntries && c.JournalEntries.length).map((category, index) => {\n                    return (<div key={index} className=\"preview-entry\">\n                        <div className=\"entry-index\">\n                            <p>{index + 1}</p>\n                        </div>\n                        <div className=\"entry-text\">\n                            <ul>\n                                <li className={`category-heading`}>{category.CategoryDescription}</li>\n                                {category.JournalEntries.sort((a, b) => a.Sequence - b.Sequence).map((entry, i) => (\n                                    <li key={i}>\n                                        {entry.EntryText}\n                                    </li>\n                                ))}\n                            </ul>\n                        </div>\n                    </div>);\n                })}\n            </div>\n        )\n    }\n}\n\nexport default JournalDetails;\n","import React from \"react\";\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport { journalActionCreators } from \"../../../stores/lis-journal-store\";\n\nconst getListStyle = isDraggingOver => ({\n    background: isDraggingOver ? '#8b9fb3' : '#666666',\n    width: '100%',\n});\n\nclass JournalVote extends React.Component {\n    constructor(props) {\n        super(props)\n        this.state = {\n        };\n        this.onEntryDragEnd = this.onEntryDragEnd.bind(this);\n        this.toggleMenu = this.toggleMenu.bind(this);\n        this.formInput = this.formInput.bind(this);\n\n        this.infoBoxRef = React.createRef();\n        this.menuBoxRef = React.createRef();\n    }\n\n    onEntryDragEnd(result) {\n        if (!result.destination) {\n            return;\n        }\n        if (result.destination.index === result.source.index) {\n            return;\n        }\n        let entries = [...this.props.formData.JournalEntries];\n        const [removed] = entries.splice(result.source.index, 1);\n        entries.splice(result.destination.index, 0, removed);\n        entries.forEach((element, index) => {\n            element.Sequence = index + 1;\n        });\n        this.props.onMultipleEntryChange(entries, this.props.currentActivitySequence);\n    }\n\n    toggleMenu(entryIndex, e) {\n        if (e) {\n            //Do not hide the small motion form if a child of the form is focused\n            if (e.currentTarget.contains(e.relatedTarget)) {\n                return;\n            }\n        }\n        this.setState({\n            showMenu: entryIndex\n        }, () => {\n            if (this.menuBoxRef.current) {\n                this.menuBoxRef.current.focus();\n            }\n        });\n    }\n\n    formInput(entry, entryIndex, provided = {}) {\n        return (\n            <div key={entryIndex}>\n                <div className=\"journal-grid\">\n                    <div style={{ textAlign: 'center' }}>\n                        <span {...provided.dragHandleProps} className=\"icon menu\" onClick={(e) => this.toggleMenu(entryIndex)}></span>\n                        {this.state.showMenu === entryIndex &&\n                            <div style={{ textAlign: 'left', marginLeft: '-15px', width: 'auto' }} className=\"info-box blue\" ref={this.menuBoxRef} onBlur={(e) => this.toggleMenu(-1, e)} contentEditable suppressContentEditableWarning={true}>\n                                <div contentEditable={false}>\n                                </div>\n                            </div>\n                        }\n                    </div>\n                    <div>\n                        <span>{entry.EntryText}</span>\n                    </div>\n                </div>\n            </div>\n        );\n    }\n\n    render() {\n        const entries = this.props.formData.JournalEntries;\n        return (\n            <div>\n                <div className=\"journal-entry-grid\">\n                    <div>\n                        <span></span>\n                    </div>\n                    <div>\n                        <span>{this.props.formData.CategoryDescription}</span>\n                    </div>\n                </div>\n                <div>\n                    <DragDropContext onDragEnd={this.onEntryDragEnd}>\n                        <Droppable droppableId={`entries-droppable`}>\n                            {(provided, snapshot) =>\n                                <div ref={provided.innerRef} style={getListStyle(snapshot.isDraggingOver)}>\n                                    {entries.map((entry, entryIndex) => {\n                                        if (entry) {\n                                            return (\n                                                <Draggable key={`${entry.JournalEntryID}-${entry.Sequence}`} draggableId={`${entry.JournalEntryID}-${entry.Sequence}`} index={entryIndex}>\n                                                    {(provided, snapshot) =>\n                                                        <div\n                                                            ref={provided.innerRef}\n                                                            {...provided.draggableProps}>\n                                                            {this.formInput(entry, entryIndex, provided)}\n                                                        </div>}\n                                                </Draggable>\n                                            );\n                                        }\n                                    })}\n                                    {provided.placeholder}\n                                </div>\n                            }\n                        </Droppable>\n                    </DragDropContext>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default connect(\n    (state) => {\n        const { journal } = state;\n        return {\n            journal\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, journalActionCreators), dispatch)\n        }\n    },\n    null,\n    {\n        forwardRef: true\n    }\n)(JournalVote)","import React from \"react\";\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { Prompt } from 'react-router';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport { navActionCreators } from '../../../stores/lis-nav-store';\nimport { cancelRequest } from '../../../services/request.service';\nimport moment from 'moment-timezone'\nimport LoaderComponent from '../../../lis-shared/lis-layout/components/lis-loader-component';\nimport JournalDetails from './lis-journal-details';\nimport ReactTable from 'react-table';\nimport { journalActionCreators } from \"../../../stores/lis-journal-store\";\nimport JournalVote from \"../forms/journal-vote\";\n\nclass JournalManagementForm extends React.Component {\n\n    constructor(props) {\n        super(props)\n        this.state = {\n            activity: '',\n            journal: {},\n            currentActivitySequence: 0,\n            isLoaded: false,\n            disableChanges: false,\n            //Fieldsets\n            indexFieldsetIsActive: true,\n            activityFieldsetIsActive: false,\n            previewFieldsetIsActive: false,\n            categoriesToMove: [],\n            selectedCategoryToMoveTo: -1,\n            saving: false,\n            isDirty: false\n        }\n\n        //Ref used to scroll down to activity section\n        this.activityRef = React.createRef();\n        this.entryFormRef = React.createRef();\n\n        this.entryChange = this.entryChange.bind(this);\n        this.multipleEntryChange = this.multipleEntryChange.bind(this);\n        this.toggleMoveEntry = this.toggleMoveEntry.bind(this);\n        this.moveEntry = this.moveEntry.bind(this);\n        this.handleSequenceChange = this.handleSequenceChange.bind(this);\n        this.saveJournal = this.saveJournal.bind(this);\n        this.generateMml = this.generateMml.bind(this);\n        this.showActivity = this.showActivity.bind(this);\n    }\n\n    toggleFieldsetCollapse(isActive) {\n        this.setState(state => ({\n            [isActive]: !state[isActive]\n        }));\n    }\n\n    entryChange(index, entry, sequence) {\n        //Takes the sequence, which is always one more than the index, and change the values for that JournalEntry\n        let newFormData = JSON.parse(JSON.stringify(this.state.journal));\n        newFormData.JournalCategories[sequence - 1].JournalEntries[index] = entry;\n        this.setState({\n            journal: newFormData,\n            isDirty: true\n        });\n    }\n\n    multipleEntryChange(entries, sequence) {\n        let newFormData = JSON.parse(JSON.stringify(this.state.journal));\n        newFormData.JournalCategories[sequence - 1].JournalEntries = entries;\n        this.setState({\n            journal: newFormData,\n            isDirty: true\n        });\n    }\n\n    toggleMoveEntry(open, categoryIndex, entryIndex) {\n        if (open) {\n            const currentCategory = this.state.journal.JournalCategories[categoryIndex];\n            const applicableCategories = this.state.journal.JournalCategories.filter(cat => cat.CategoryType === currentCategory.CategoryType && cat.JournalCategoryID !== currentCategory.JournalCategoryID);\n            this.setState({\n                movingCategorySource: categoryIndex,\n                movingEntrySource: entryIndex,\n                categoriesToMove: applicableCategories,\n                showMoveEntryDialog: open\n            });\n        } else {\n            this.setState({\n                showMoveEntryDialog: false,\n                categoriesToMove: [],\n                selectedCategoryToMoveTo: -1,\n                movingCategorySource: -1,\n                movingEntrySource: -1,\n            });\n        }\n    }\n\n    moveEntry(destinationCategoryIndex) {\n        let sourceCategory = { ...this.state.journal.JournalCategories[this.state.movingCategorySource] }\n        let sourceEntry = { ...sourceCategory.JournalEntries[this.state.movingEntrySource] };\n        let destinationCategory = this.state.journal.JournalCategories.find(cat => cat.JournalCategoryID === this.state.categoriesToMove[destinationCategoryIndex].JournalCategoryID);\n        if (destinationCategory) {\n            let newEntry = {\n                ...sourceEntry,\n                JournalCategoryID: destinationCategory.JournalCategoryID,\n                Sequence: destinationCategory.JournalEntries && destinationCategory.JournalEntries.length > 0 ? destinationCategory.JournalEntries[destinationCategory.JournalEntries.length - 1].Sequence + 1 : 1\n            };\n            this.saveEntry(newEntry);\n            this.showActivity(destinationCategory);\n            this.toggleMoveEntry(false);\n\n            //Remove the old entry from the state variable\n            let journal = { ...this.state.journal };\n            journal.JournalCategories[this.state.movingCategorySource].JournalEntries.splice(this.state.movingEntrySource, 1);\n            this.setState({\n                journal: journal,\n                isDirty: true\n            });\n        }\n    }\n\n    handleSequenceChange(categories) {\n        //The sequence change has been handled by the JournalIndex class. So the new list of Journal Categories is sent here to modify the journal\n        let journal = this.state.journal;\n        //Check and see if the currently opened activity has been affected by the sequence change. If so, then update the current activity state item \n        let newCategoryIndex = this.state.currentActivitySequence - 1;\n        if (categories[this.state.currentActivitySequence - 1] !== this.state.journal.JournalCategories[this.state.currentActivitySequence - 1]) {\n            newCategoryIndex = categories.findIndex(category => category === this.state.journal.JournalCategories[this.state.currentActivitySequence - 1])\n        }\n        journal.JournalCategories = categories;\n        //currentActivitySequence is 0 by default so we don't want to set currentActivitySequence to an undefined value. \n        //So make a check to see if the user has clicked on a category item yet. If not then leave it at zero\n        this.setState({\n            journal: journal,\n            isDirty: true,\n            currentActivitySequence: categories[newCategoryIndex] ? categories[newCategoryIndex].Sequence : 0\n        });\n    }\n\n    showActivity(category, e) {\n        let journal = JSON.parse(JSON.stringify(this.state.journal));\n        //Open the activity drawer\n        this.setState({\n            activityFieldsetIsActive: true,\n            currentActivitySequence: category.Sequence,\n            activity: category,\n            journal: journal\n        }, () => {\n            //Get the size and position of the activity form and scroll down to it\n            const activityRect = this.activityRef.current.getBoundingClientRect();\n            const windowY = window.scrollY;\n            window.scrollTo({\n                top: activityRect.top + windowY,\n                behavior: 'smooth'\n            });\n\n        });\n    }\n\n    saveJournal() {\n        let journal = JSON.parse(JSON.stringify(this.state.journal));\n        //Disable changes so the user doesn't try to save something else while this is being saved\n        this.setState({ disableChanges: true })\n        this.props.actions.saveJournal({ journals: [journal] })\n            .then(() => {\n                const newJournal = this.props.journal.journalSave;\n                this.setState({\n                    journal: newJournal,\n                    disableChanges: false,\n                    saving: false,\n                    isDirty: false\n                }, () => {\n                    this.props.actions.makeToast([{ message: 'Save Success', type: \"success\" }])\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n                this.setState({ saving: false })\n                this.props.actions.makeToast([{ message: 'Save Failed', type: \"failure\" }])\n            });\n    }\n\n    generateMml() {\n        this.setState({ generatingMml: true, disableChanges: true })\n        this.props.actions.generateJournal('?sessionID=' + this.state.journal.SessionID + '&journalDay=' + this.state.journal.JournalDate)\n            .then(() => {\n                this.setState({\n                    disableChanges: false,\n                    generatingMml: false\n                }, () => {\n                    const blob = new Blob([this.props.journal.journalGeneration], { type: 'text/html' });\n                    const filename = `Journal ${moment(this.state.journal.JournalDate).format(\"MM/DD/yyyy\")}.mml`;\n                    const url = URL.createObjectURL(blob);\n\n                    const link = document.createElement('a');\n                    link.href = url;\n                    link.download = filename;\n                    document.body.appendChild(link);\n                    link.click();\n\n                    // Clean up\n                    document.body.removeChild(link);\n                    URL.revokeObjectURL(url);\n                    this.props.actions.makeToast([{ message: 'Generation Success', type: \"success\" }])\n                });\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return;\n                }\n                console.log(err);\n                this.setState({ generatingMml: false })\n                this.props.actions.makeToast([{ message: 'Generation Failed', type: \"failure\" }])\n            });\n    }\n\n    componentDidMount() {\n        this.props.actions.getJournalById('journalID=' + this.props.match.params.journalid, true)\n            .then(() => {\n                if (!this.props.journal.journalById || !this.props.journal.journalById.length) { throw 'No Journals found' }\n                let journal = this.props.journal.journalById[0];\n                if (journal.JournalCategories) {\n                    //Check if the Sequence for each category is linear\n                    const sequences = journal.JournalCategories.map(mc => mc.Sequence);\n                    if (journal.JournalCategories.length > 0 && (journal.JournalCategories[0].Sequence !== 1 || !sequences.every((seq, i) => i === sequences.length - 1 || seq + 1 === sequences[i + 1]))) {\n                        //Get the sequence right. Sometimes the result back from the server has a lot of skipped indices\n                        journal.JournalCategories.forEach((category, index) => {\n                            category.Sequence = index + 1;\n                        });\n                        this.setState({\n                            journal: journal,\n                            isLoaded: true,\n                            previewFieldsetIsActive: true\n                        }, //Save the new sequence so we don't have to do this process again for this journal\n                            () => { this.saveJournal(); });\n                    } else { //It is in order so display the journal\n                        this.setState({\n                            journal: journal,\n                            isLoaded: true,\n                            previewFieldsetIsActive: true\n                        });\n                    }\n                } else {\n                    this.setState({\n                        journal: '',\n                        isLoaded: true,\n                        previewFieldsetIsActive: false\n                    });\n                    this.props.actions.makeToast([{ message: \"Loading Failed\", type: \"failure\" }])\n                }\n            }).catch(err => {\n                if (err === 'Aborted') {\n                    return\n                }\n                console.log(err);\n                this.setState({\n                    journal: '',\n                    isLoaded: true,\n                });\n            });\n\n    }\n\n    componentWillUnmount() {\n        cancelRequest();\n    }\n\n    render() {\n        if (this.state.isLoaded) {\n            return (\n                <div className=\"user-forms dlas-forms\">\n                    <div>\n                        <Prompt\n                            when={this.state.isDirty}\n                            message={`You have unsaved changes. Are you sure you would like to leave?`}\n                        />\n                    </div>\n                    <h2>{moment(this.state.journal.JournalDate).format(\"LL\")}</h2>\n                    {this.state.showMoveEntryDialog &&\n                        <div className='popup' onClick={() => this.toggleMoveEntry(false)}>\n                            <div className='popup-inner tall-content' onClick={e => e.stopPropagation()}>\n                                {this.state.categoriesToMove.length === 0 ?\n                                    <p>There are no categories where you can move this entry</p>\n                                    :\n                                    <p>Choose a category to move the entry to</p>\n                                }\n                                <div style={{ paddingBottom: '10px' }}>\n                                    <ReactTable\n                                        data={this.state.categoriesToMove}\n                                        getTrProps={(_state, rowInfo) => {\n                                            return {\n                                                style: {\n                                                    background: rowInfo && rowInfo.index === this.state.selectedCategoryToMoveTo ? '#89ff89' : '',\n                                                    cursor: rowInfo ? 'pointer' : 'default'\n                                                },\n                                                onClick: () => this.setState({ selectedCategoryToMoveTo: rowInfo.index })\n                                            }\n                                        }}\n                                        noDataText=\"\"\n                                        columns={[\n                                            {\n                                                id: \"checkbox\",\n                                                accessor: \"\",\n                                                className: \"checkbox-column\",\n                                                Cell: ({ index }) => {\n                                                    return <span className={index === this.state.selectedCategoryToMoveTo ? \"icon checkmark\" : \"\"}></span>;\n                                                },\n                                                sortable: false,\n                                                filterable: false,\n                                                width: 45\n                                            },\n                                            {\n                                                Header: \"Sequence\",\n                                                accessor: \"Sequence\",\n                                                width: 50\n                                            },\n                                            {\n                                                Header: \"Type\",\n                                                accessor: \"CategoryType\"\n                                            },\n                                            {\n                                                Header: \"Description\",\n                                                accessor: \"CategoryDescription\"\n                                            }\n                                        ]}\n                                        defaultPageSize={5}\n                                        className=\"-striped -highlight\"\n                                    />\n                                </div>\n                                <div className=\"flex-row\" sty>\n                                    <button className=\"button secondary\" onClick={() => this.toggleMoveEntry(false)}>Cancel</button>\n                                    {this.state.categoriesToMove.length > 0 &&\n                                        <button disabled={this.state.selectedCategoryToMoveTo === -1} onClick={() => this.moveEntry(this.state.selectedCategoryToMoveTo)} className=\"button\">Move</button>\n                                    }\n                                </div>\n                            </div>\n                        </div>\n                    }\n                    <fieldset className={this.state.indexFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                        <legend onClick={this.toggleFieldsetCollapse.bind(this, 'indexFieldsetIsActive')}>Index</legend>\n                        <div>\n                            <JournalIndex\n                                categories={this.state.journal.JournalCategories ? this.state.journal.JournalCategories : []}\n                                onSequenceChange={this.handleSequenceChange}\n                                showActivity={this.showActivity}\n                                currentActivitySequence={this.state.currentActivitySequence}\n                                disableChanges={this.state.disableChanges} />\n                        </div>\n                    </fieldset>\n                    <fieldset ref={this.activityRef} className={this.state.activityFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                        <legend onClick={this.toggleFieldsetCollapse.bind(this, 'activityFieldsetIsActive')}>Activity</legend>\n                        {this.state.currentActivitySequence && this.state.currentActivitySequence !== 0 ?\n                            <TypeSwitcher\n                                type={this.state.activity}\n                                ref={this.entryFormRef}\n                                onEntryChange={this.entryChange}\n                                onMultipleEntryChange={this.multipleEntryChange}\n                                currentActivitySequence={this.state.currentActivitySequence}\n                                toggleMoveEntry={this.toggleMoveEntry}\n                                formData={this.state.journal.JournalCategories ? this.state.journal.JournalCategories[this.state.currentActivitySequence - 1] : {}} />\n                            : null}\n                    </fieldset>\n                    <fieldset className={this.state.previewFieldsetIsActive ? 'fieldset-collapse fieldset-open' : 'fieldset-collapse fieldset-closed'} >\n                        <legend onClick={this.toggleFieldsetCollapse.bind(this, 'previewFieldsetIsActive')}>Preview</legend>\n                        <Preview\n                            categories={this.state.journal.JournalCategories ? this.state.journal.JournalCategories : []}\n                            save={this.saveJournal}\n                            saving={this.state.saving}\n                            generateMml={this.generateMml}\n                            generatingMml={this.state.generatingMml}\n                            isDirty={this.state.isDirty}\n                        />\n                    </fieldset>\n                </div>\n\n            )\n        } else {\n            return (\n                <div className=\"user-forms dlas-forms\">\n                    <LoaderComponent className=\"center-spinner\" data={this.state.isLoaded} />\n                </div>\n            )\n        }\n    }\n}\n\nconst getItemStyle = (isDisabled, isDragging, draggableStyle, pendingDeletion) => ({\n    userSelect: 'none',\n    background: isDisabled ? '#c7c7c7' : isDragging ? '#34495e' : 'white',\n    color: isDisabled ? 'black' : isDragging ? 'white' : '#34495e',\n    border: pendingDeletion ? 'red' : 'none',\n    ...draggableStyle,\n});\n\nconst getListStyle = isDraggingOver => ({\n    background: isDraggingOver ? '#8b9fb3' : '#666666',\n    width: '100%',\n});\n\nclass JournalIndex extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n        }\n    }\n\n    onDragEnd(result) {\n        // dropped outside the list\n        if (!result.destination) {\n            return;\n        }\n        const items = (() => {\n            const list = Array.from(this.props.categories);\n            const [removed] = list.splice(result.source.index, 1);\n\n            list.splice(result.destination.index, 0, removed);\n            // Reorder the Sequence value too because the sequence value is used to show what order the preview is in\n            list.forEach(function (element, index) {\n                element.Sequence = index + 1\n            });\n            return list;\n        })();\n        //Send the new values up to the parent to be set in the parent's state\n        this.props.onSequenceChange(items);\n    }\n\n\n    render() {\n        if (this.props.categories) {\n            return (\n                <div className={this.props.disableChanges ? 'dnd-disabled' : ''}>\n                    <DragDropContext onDragEnd={this.onDragEnd.bind(this)}>\n                        <Droppable droppableId=\"droppable\">\n                            {(provided, snapshot) => (\n                                <table\n                                    className=\"dnd-grid-table journal-categories-grid\"\n                                    ref={provided.innerRef}\n                                    style={getListStyle(snapshot.isDraggingOver)}\n                                >\n                                    <thead className=\"dnd-grid-header\" style={getListStyle(snapshot.isDraggingOver)}>\n                                        <tr>\n                                            <th scope=\"col\" id={'-grabber-column'}></th>\n                                            <th scope=\"col\" id={'-display-column'}>Display #</th>\n                                            <th scope=\"col\" id={'-display-column'}>Section</th>\n                                            <th scope=\"col\" id={'-actions-column'}>Actions</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody>\n                                        {this.props.categories.map((item, index) => (\n                                            <Draggable key={`${item.Sequence}-${item.JournalCategoryID}`} draggableId={`${item.Sequence}-${item.JournalCategoryID}`} index={index}>\n                                                {(provided, snapshot) => (\n                                                    <tr\n                                                        ref={provided.innerRef}\n                                                        {...provided.draggableProps}\n                                                        {...provided.dragHandleProps}\n                                                        className={this.props.categories[this.props.currentActivitySequence - 1] === item ? 'selected' : 'not-selected'}\n                                                        style={getItemStyle(\n                                                            this.props.disableChanges,\n                                                            snapshot.isDragging,\n                                                            provided.draggableProps.style\n                                                        )} >\n                                                        <td><button id={item.JournalCategoryID + '-grabber-button'} className=\"button draggable\">Drag and drop</button></td>\n                                                        <td>{index + 1}</td>\n                                                        <td className='category-desc' onClick={(e) => this.props.showActivity(this.props.categories[index], e)}>\n                                                            {<button type=\"button\">{item.CategoryDescription}</button>}\n                                                        </td>\n                                                        <td>\n                                                            <button\n                                                                type=\"button\"\n                                                                onClick={(e) => this.props.showActivity(this.props.categories[index], e)}\n                                                                className={this.props.categories[this.props.currentActivitySequence - 1] === item\n                                                                    ? 'icon edit-alt'\n                                                                    : 'icon edit'}>\n                                                            </button>\n                                                        </td>\n                                                    </tr>\n                                                )}\n                                            </Draggable>\n                                        ))}\n                                        {provided.placeholder}\n                                    </tbody>\n                                </table>\n                            )}\n                        </Droppable>\n                    </DragDropContext>\n                </div>\n            )\n        } else {\n            return (<div></div>)\n        }\n    }\n\n}\n\nclass Preview extends React.Component {\n    render() {\n        const previewLengthStyle = { height: '500px', overflowY: 'scroll', backgroundColor: 'white' }\n        return (\n            <React.Fragment>\n                <div style={{ display: 'flex', gap: '5px', justifyContent: 'flex-end' }}>\n                    <button type=\"button\" disabled={this.props.isDirty || this.props.generatingMml} className=\"button\" onClick={this.props.generateMml}>Generate MML</button>\n                    <button type=\"button\" disabled={this.props.saving || this.props.generatingMml} className=\"button\" onClick={this.props.save}>Save</button>\n                </div>\n                <div style={previewLengthStyle}>\n                    <JournalDetails\n                        categories={this.props.categories}\n                    />\n                </div>\n            </React.Fragment>\n        )\n    }\n}\n\nconst TypeSwitcher = React.forwardRef((props, ref) => {\n    switch (props.ObjectName) {\n        case 'Vote':\n        default:\n            return <JournalVote {...props} />\n    }\n});\n\nexport default connect(\n    (state) => {\n        const { journal, nav } = state;\n        return {\n            journal,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, journalActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(JournalManagementForm)","import React from 'react';\nimport { Route } from 'react-router';\nimport JournalManagementGrid from './lis-journal-grid';\nimport JournalManagementForm from './lis-journal-form';\n\nclass JournalManagement extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            selectedSession: '',\n            selectedCategory: ''\n        };\n        this.handleCategoryChange = this.handleCategoryChange.bind(this);\n        this.handleSessionChange = this.handleSessionChange.bind(this);\n    }\n\n    handleCategoryChange(value) {\n        this.setState({\n            selectedCategory: value\n        })\n    }\n\n    handleSessionChange(value, callback) {\n        this.setState({\n            selectedSession: value\n        }, () => callback());\n    }\n\n    render() {\n        return (\n            <div>\n                <Route exact path={this.props.match.path} render={props => <JournalManagementGrid\n                    {...props}\n                    selectedCategory={this.state.selectedCategory}\n                    selectedSession={this.state.selectedSession}\n                    handleSessionChange={this.handleSessionChange}\n                    handleCategoryChange={this.handleCategoryChange}\n                />} />\n                <Route path={`${this.props.match.path}/edit-journal/:journalid`} component={JournalManagementForm} />\n            </div>\n        )\n    }\n}\n\nexport default JournalManagement;","import React, { Component } from 'react';\nimport { Route, Redirect, withRouter } from 'react-router';\nimport queryString from 'query-string';\nimport { AuthenticatedTemplate, useMsal } from \"@azure/msal-react\";\nimport { loginRequest } from \"./authConfig\";\n\nimport Layout from './lis-shared/lis-layout/components/lis-layout-component';\nimport Login from './lis-shared/lis-login/components/lis-login-form';\nimport CreateAccount from './lis-shared/lis-login/components/lis-create-account-form';\nimport RegisterAccount from './lis-shared/lis-login/components/lis-register-account-form';\nimport ForgotPassword from './lis-shared/lis-login/components/lis-forgot-password-form';\nimport ChangePassword from './lis-shared/lis-login/components/lis-change-password-form';\n\nimport MemberManagement from './lis-admin/lis-member-management/components/lis-member-management';\nimport SessionManagement from './lis-admin/lis-session-management/components/lis-session-management';\nimport CommitteeManagement from './lis-admin/lis-committee-management/components/lis-committee-management';\nimport DocketManagement from './lis-admin/lis-docket-management/components/lis-docket-management';\nimport CalendarManagement from './lis-admin/lis-calendar-management/components/lis-calendar-management';\nimport MinutesManagement from './lis-admin/lis-minutes-management/components/lis-minutes-management';\nimport VersionManagement from './lis-admin/lis-version-management/components/lis-version-management';\nimport BillManagement from './lis-admin/lis-bill-management/components/lis-bill-management';\nimport CommunicationsManagement from './lis-admin/lis-communications-management/components/lis-communications-management';\nimport VoteManagement from './lis-admin/lis-vote-management/components/lis-vote-management';\nimport PrintManagement from './lis-admin/lis-print-management/components/lis-print-management';\nimport ReportManagement from './lis-admin/lis-report-management/components/lis-report-management';\nimport AmendmentManagement from './lis-admin/lis-amendment-management/components/lis-amendment-management';\nimport AdminDashboard from './lis-admin/lis-admin-dashboard/components/lis-admin-dashboard';\nimport NotificationManagement from './lis-admin/lis-notifications-management/components/lis-notification-management';\nimport PartnerManagement from './lis-admin/lis-partner-management/components/lis-partner-management';\nimport UserManagement from './lis-admin/lis-user-management/components/lis-user-management';\n\nimport Home from './lis-public/components/lis-home/lis-public-home';\nimport PublicSessionInformation from './lis-public/components/lis-public-session-list';\nimport PublicCommitteeInformation from './lis-public/components/lis-committee/lis-public-committee-information';\nimport PublicMemberInformation from './lis-public/components/lis-public-members-list';\nimport PublicMemberDetails from './lis-public/components/lis-public-member-details';\nimport PublicBillSearch from './lis-public/components/lis-bill-search/lis-public-bill-search';\nimport SearchReportPage from './lis-public/components/lis-bill-search/lis-report-bill-search';\nimport SearchTranslator from './lis-public/components/lis-bill-search/search-translator';\nimport ShorthandUrlTranslator from './lis-public/components/lis-bill-search/shorthand-url-translator';\nimport SearchHelp from './lis-public/components/lis-bill-search/lis-search-help';\nimport PublicBillDetails from './lis-public/components/lis-bill-details/lis-public-bill-details';\nimport PublicVoteDetails from './lis-public/components/lis-public-vote-details';\nimport PublicDataFiles from './lis-public/components/lis-public-data-files';\nimport PublicCommunicationsList from './lis-public/components/lis-public-communications';\nimport PublicCalendarList from './lis-public/components/lis-public-calendar-list';\nimport PublicCalendarDetails from './lis-public/components/lis-public-calendar-details';\nimport PublicMinutesList from './lis-public/components/lis-public-minutes';\nimport PublicMinutesDetails from './lis-public/components/lis-public-minutes-details';\nimport FullText from './lis-public/components/lis-public-full-text';\nimport PublicSchedule from './lis-public/components/lis-public-schedule';\nimport PublicVoteSearch from './lis-public/components/lis-public-vote-search';\nimport PublicMemberLegislation from './lis-public/components/lis-public-member-legislation';\nimport PublicCommunicationDetails from './lis-public/components/lis-public-communication-details';\nimport CommitteeStatDetails from './lis-public/components/lis-committee-statistics';\nimport SessionStatDetails from './lis-public/components/lis-session-statistics';\nimport Unauthorized from './lis-public/components/lis-unauthorized';\nimport ProfileForm from './lis-shared/lis-profile/components/lis-profile-form';\nimport PrivacyComponent from './lis-public/components/lis-privacy';\nimport WatchlistsComponent from './lis-public/components/lis-watchlists';\n\nimport DevsPortal from './lis-developers/public/components/lis-developers-portal';\nimport DocumentComponent from './lis-developers/public/components/lis-document';\nimport KeyRegistration from './lis-developers/public/components/lis-api-key-registration';\nimport KeyConfirmation from './lis-developers/public/components/lis-api-key-confirmation';\nimport TermsOfService from './lis-developers/public/components/lis-terms-of-service';\n\nimport AdminDocs from './lis-developers/admin/components/lis-admin-docs';\n\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { authActionCreators } from './stores/lis-auth-store';\nimport { navActionCreators } from './stores/lis-nav-store';\nimport IdleTimer from 'react-idle-timer'\nimport { parse } from 'query-string';\nimport jwtDecode from 'jwt-decode';\n\nimport Footer from './lis-public/components/lis-footer';\nimport ConfigurationsManagement from './lis-admin/lis-configurations/lis-configurations-management';\nimport JournalManagement from './lis-admin/lis-journal-management/components/lis-journal-management';\nimport moment from 'moment-timezone';\n\nconst idToken = 'LIS_ID_TOKEN';\nconst refreshToken = 'LIS_REFRESH_TOKEN';\nconst refreshTokenExpiration = 'LIS_REFRESH_TOKEN_EXPIRATION';\nconst graphToken = 'GRAPH_ID_TOKEN';\nconst claimsObject = 'LIS_CLAIMS';\n\n// Private route component for auth-only paths. If authstatus == true, show the component.\n// Will eventually need to add on to it for Admin-only paths\nconst PrivateRoute = ({ authstatus, hasPermission, checkingToken, component: Component, ...rest }) => {\n    const redirect = '?redirect=' + window.location.pathname + encodeURIComponent(window.location.search);\n    return (<Route {...rest} render={(props) => (\n        authstatus && hasPermission\n            ? <Component {...props} />\n            : checkingToken ? <div className=\"center-spinner spinner\" />\n                : !authstatus ? <Redirect to={'/login' + redirect} />\n                    : <Redirect to=\"/unauthorized\" />\n    )} />)\n}\n\nclass LISApp extends Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isIdle: false,\n            popupMessage: '',\n            counter: null,\n            resources: 0,\n            permissions: null,\n            houseToken: \"\",\n            checkingToken: true\n        };\n        this.idleTimer = null\n        this.onActive = this.onActive.bind(this)\n        this.onIdle = this.onIdle.bind(this)\n        this.checkPermissions = this.checkPermissions.bind(this);\n        this.setHouseToken = this.setHouseToken.bind(this);\n    };\n\n    checkPermissions() {\n        //determine permissions for specific pages in case of direct url navigation from a logged in user who does not have specific permissions\n        let permissions = [];\n        this.setState({ resources: this.props.login.userClaims.resources.length })\n        for (let i = 0; i < this.props.login.userClaims.resources.length; i++) {\n            switch (this.props.login.userClaims.resources[i]) {\n                case \"All\":\n                    permissions.push(\n                        { canAccessMemberMgmt: true },\n                        { canAccessSessionMgmt: true },\n                        { canAccessCommitteeMgmt: true },\n                        { canAccessMinutesMgmt: true },\n                        { canAccessDocketMgmt: true },\n                        { canAccessBillMgmt: true },\n                        { canAccessVersionMgmt: true },\n                        { canAccessAmendmentMgmt: true },\n                        { canAccessCommMgmt: true },\n                        { canAccessCalendarMgmt: true },\n                        { canAccessConfigurationsMgmt: true },\n                        { canAccessJournalMgmt: true },\n                        { canAccessVoteMgmt: true },\n                        { canAccessPrintMgmt: true },\n                        { canAccessReportMgmt: true },\n                        { canAccessMeetingsMgmt: true },\n                        { canAccessWatchlists: true },\n                        { canAccessPartnerMgmt: true },\n                        { canAccessUserMgmt: true },\n                        { canAccessDocs: true },\n                        { canAccessBds: true },\n                        { canAccessSenateLinks: true },\n                        { canAccessPatronStatusReport: true }\n                    );\n                    this.setState({ permissions })\n                    return; //If the user is admin allow access to all links and exit\n                case \"Session\":\n                    permissions.push({ canAccessSessionMgmt: true })\n                    break;\n                case \"Committee\":\n                    permissions.push({ canAccessCommitteeMgmt: true })\n                    break;\n                case \"Subcommittee\":\n                    permissions.push({ canAccessCommitteeMgmt: true })\n                    break;\n                case \"MinutesBook\":\n                    permissions.push({ canAccessMinutesMgmt: true })\n                    break;\n                case \"Docket\":\n                    permissions.push({ canAccessDocketMgmt: true })\n                    break;\n                case \"Agenda\":\n                    permissions.push({ canAccessDocketMgmt: true })\n                    break;\n                case \"LegislationEvent\":\n                    permissions.push({ canAccessBillMgmt: true })\n                    break;\n                case \"LegislationText\":\n                    permissions.push({ canAccessVersionMgmt: true, canAccessAmendmentMgmt: true })\n                    break;\n                case \"LegislationCommunications\":\n                    permissions.push({ canAccessCommMgmt: true })\n                    break;\n                case \"Calendar\":\n                    permissions.push({ canAccessCalendarMgmt: true })\n                    break;\n                case \"Vote\":\n                    permissions.push({ canAccessVoteMgmt: true })\n                    break;\n                case \"Schedule\":\n                    permissions.push({ canAccessMeetingsMgmt: true })\n                    break;\n                case \"PrintDocuments\":\n                    permissions.push({ canAccessPrintMgmt: true })\n                    break;\n                case \"JournalFileGeneration\":\n                    permissions.push({ canAccessJournalMgmt: true })\n                    break;\n                //Roles unaccounted for in navbar list items                \n                case \"AdvancedLegislationSearch\":\n                    break;\n                case \"CalendarFileGeneration\":\n                    break;\n                case \"CommunicationFileGeneration\":\n                    break;\n                case \"CommitteeLegislationReferral\":\n                    break;\n                case \"CommitteesByMemberSearch\":\n                    break;\n                case \"Communication\":\n                    break;\n                case \"Contact\":\n                    break;\n                case \"Groups\":\n                    break;\n                case \"GroupsRoles\":\n                    break;\n                case \"LegislationByCommitteeSearch\":\n                    break;\n                case \"LegislationByMember\":\n                    break;\n                case \"LegislationFileGeneration\":\n                    break;\n                case \"LegislationPatron\":\n                    break;\n                case \"LegislationSummary\":\n                    break;\n                case \"LegislationVersion\":\n                    break;\n                case \"Member\":\n                    permissions.push({ canAccessMemberMgmt: true })\n                    break;\n                case \"MembersByCommittee\":\n                    break;\n                case \"MembersSearch\":\n                    break;\n                case \"MinuteEntries\":\n                    break;\n                case \"Organization\":\n                    break;\n                case \"PatronTypeByRole\":\n                    break;\n                case \"PartnerAuthentication\":\n                    break;\n                case \"Person\":\n                    permissions.push({ canAccessUserMgmt: true })\n                    break;\n                case \"Personnel\":\n                    permissions.push({ canAccessUserMgmt: true })\n                    break;\n                case \"Roles\":\n                    break;\n                case \"User\":\n                    break;\n                case \"VoteFileGeneration\":\n                    break;\n                case \"LegislationCollections\":\n                    if (this.props.login.userClaims.claims.find(claim => claim.Scope === \"Paid\" && claim.Resource === \"LegislationCollections\" && claim.RoleName === \"PaidLegislationCollectionsAuthor\")) permissions.push({ canAccessWatchlists: true })\n                    break;\n                case \"ReportFileGeneration\":\n                    permissions.push({ canAccessReportMgmt: true })\n                    break;\n                case \"APIDocumentation\":\n                    permissions.push({ canAccessDocs: true })\n                    break;\n                case \"BDSDrafter\":\n                    permissions.push({ canAccessBds: true })\n                    break;\n                case \"SenateLinks\":\n                    permissions.push({ canAccessSenateLinks: true })\n                    break;\n                default:\n                    console.log(\"Resource unaccounted for: \", this.props.login.userClaims.resources[i]);\n                    break;\n            }\n        }\n\n        //If a signed in member, then provide a link to the member status report page.\n        const jwt = localStorage.getItem(idToken);\n        if (jwt) {\n            try {\n                const parsedToken = jwtDecode(jwt);\n                const mNumber = parsedToken.MemberNumber;\n                if (mNumber) {\n                    permissions.push({ canAccessPatronStatusReport: true })\n                }\n            } catch (e) {\n                if (Object.getPrototypeOf(e).toString() === 'InvalidTokenError') {\n                    //Token is malformed..nothing to do\n                } else {\n                    console.error(e);\n                }\n            }\n        }\n\n        this.setState({ permissions })\n    }\n\n    componentDidMount() {\n        let tokenExp = localStorage.getItem(refreshTokenExpiration);\n        if (tokenExp !== null && tokenExp !== 'undefined') {\n            if (tokenExp < new Date().getTime()) {\n                localStorage.removeItem(idToken);\n                localStorage.removeItem(refreshToken);\n                localStorage.removeItem(refreshTokenExpiration);\n                localStorage.removeItem(graphToken);\n                localStorage.removeItem(claimsObject);\n                this.setState({ checkingToken: false })\n            } else {\n                if (this.props.login.isTokenExpired) {\n                    if (localStorage.getItem(idToken)) {\n                        this.props.actions.refreshAccessToken().finally(() => {\n                            this.setState({ checkingToken: false })\n                        })\n                    } else {\n                        this.setState({ checkingToken: false })\n                    }\n                } else {\n                    this.setState({ checkingToken: false })\n                }\n            }\n        } else {\n            this.setState({ checkingToken: false })\n        }\n        this.checkPermissions();\n    }\n\n    componentDidUpdate(prevProps) {\n        if ((this.props.login.initiateRedirect !== prevProps.login.initiateRedirect) && this.props.login.initiateRedirect === true) {\n            const parsed = parse(window.location.search);\n            // If there is a redirect then send the user there, if not then just refresh the current page, which is easier then trying to figure out what endpoint need to be re-run to get partner information\n            if (parsed.redirect) {\n                this.props.history.push(parsed.redirect);\n            } else if (window.location.pathname === \"/login\") {\n                this.props.history.push(\"/\");\n            } else if (!window.location.pathname === \"/change-password\") { // we are manually logging in users after they successfully change their password, prevent an undesired refresh as a result of changing props\n                window.location.reload();\n            }\n        }\n\n        //If user permissions have changed\n        if (this.props.login.userClaims.resources.length !== this.state.resources) {\n            this.checkPermissions();\n        }\n    }\n\n    onActive(e) {\n        console.log('user is active', e)\n        console.log('time elapsed', this.idleTimer.getElapsedTime())\n        this.setState({\n            isIdle: false\n        });\n    }\n\n    onIdle(e) {\n        console.log('user is idle', e)\n        console.log('last active', this.idleTimer.getLastActiveTime())\n        if (this.props.login.isAuthenticated) {\n            this.setState({\n                isIdle: true,\n                popupMessage: 'It looks like you have been away and you are about to time out. Need more time?'\n            });\n        }\n    }\n\n    setHouseToken(houseToken, expirationDate) {\n        this.setState({\n            houseToken\n        }, () => {\n            //Find the refresh token in the mess MSAL drops into local storage because they won't give me a function to get it properly -JGB\n            let keys = Object.keys(localStorage);\n            let refreshToken = \"\";\n            keys.forEach((k, i) => {\n                let value = localStorage.getItem(k);\n                if (typeof value === \"object\") {\n                    let currentItem = JSON.parse(value);\n                    if (currentItem[\"credentialType\"] === \"RefreshToken\") {\n                        refreshToken = currentItem[\"secret\"];\n                    }\n                }\n            })\n            this.props.actions.houseLogin(this.state.houseToken, refreshToken, expirationDate);\n        })\n    }\n\n    render() {\n        const { isAuthenticated } = this.props.login;\n        const { permissions, checkingToken } = this.state;\n\n        // IHOD wants to display the bill details page in an iframe without the site header\n        if (window.location.pathname.includes(\"static/bill-details\")) {\n            return (\n                <div>\n                    <Route path=\"/static/bill-details/:sessionCode/:billnumber\" component={PublicBillDetails} />\n                </div>\n            )\n        }\n\n        return (\n            permissions &&\n            <IdleTimer\n                ref={ref => { this.idleTimer = ref }}\n                element={document}\n                onActive={this.onActive}\n                onIdle={this.onIdle}\n                //2 hours\n                timeout={60000 * 120}\n            >\n                <div ref={(divElement) => { this.divElement = divElement; }} className={this.divElement && this.divElement.offsetHeight > window.innerHeight ? \"overheight\" : \"\"} id=\"height-checker\">\n                    <Layout isIdle={this.state.isIdle} popupMessage={this.state.popupMessage} location={this.props.location} permissions={permissions} >\n                        <Route exact path='/' component={Home} />\n                        <Route exact path='/home' component={Home} />\n                        <Route exact path='/home/:sessionCode' component={Home} />\n                        <Route exact path=\"/bill-search\" component={PublicBillSearch} />\n                        <Route exact path=\"/bill-search-report/:id\" component={SearchReportPage} />\n                        <Route exact path=\"/bill-search-report/composite/:id\" component={SearchReportPage} />\n                        <Route exact path={[\"/bill-search/:id/:word\", \"/bill-search/:id/:word/:wordparam\"]} component={SearchTranslator} />\n                        <Route exact path=\"/q\" component={ShorthandUrlTranslator} />\n                        <Route exact path=\"/q/:params\" component={ShorthandUrlTranslator} />\n                        <Route exact path='/search-help' component={SearchHelp} />\n                        <Route exact path='/bill-details/:sessionCode/:billnumber' component={!this.props.nav.showOverlay && PublicBillDetails} />\n                        <Route exact path='/bill-details/:sessionCode/:billnumber/text/:documentcode' component={FullText} />\n                        <Route exact path='/bill-details/:sessionCode/:billnumber/text/:documentcode/hilite' component={FullText} />\n                        <Route exact path='/vote-details/:billnumber/:sessioncode/:votenumber' component={PublicVoteDetails} />\n                        <Route exact path='/data-files' component={PublicDataFiles} />\n                        <Route exact path='/data-files/:sessionCode' component={PublicDataFiles} />\n                        <Route exact path='/schedule' component={PublicSchedule} />\n                        <Route exact path='/session-information' component={PublicSessionInformation} />\n                        <Route exact path='/session-details/:sessioncode/communications' component={PublicCommunicationsList} />\n                        <Route exact path='/session-details/:sessioncode/communications/:commid' component={PublicCommunicationDetails} />\n                        <Route exact path='/session-details/:sessioncode/calendar' component={PublicCalendarList} />\n                        <Route exact path='/session-details/:sessioncode/calendar/:calendarid' component={PublicCalendarDetails} />\n                        <Route exact path='/session-details/:sessioncode/minutes-list/:chamber' component={PublicMinutesList} />\n                        <Route exact path='/session-details/:sessioncode/minutes/:minutesid' component={PublicMinutesDetails} />\n                        <Route path='/session-details/:sessioncode/committee-information' component={PublicCommitteeInformation} />\n                        <Route path={['/vote-search/:sessioncode/:membernumber', '/vote-search/:sessioncode']} component={PublicVoteSearch} />\n                        <Route exact path='/session-details/:sessioncode/member-information' component={PublicMemberInformation} />\n                        <Route exact path='/session-details/:sessioncode/member-information/:membernumber/member-details' component={PublicMemberDetails} />\n                        <Route exact path='/session-details/:sessioncode/member-legislation/:chambercode' component={PublicMemberLegislation} />\n                        <Route exact path='/session-details/:sessioncode/statistics/committee/:chambercode' component={CommitteeStatDetails} />\n                        <Route exact path='/session-details/:sessioncode/statistics/status/' component={SessionStatDetails} />\n                        <Route exact path='/watchlists' component={WatchlistsComponent} />\n\n                        <Route exact path='/register-account' component={RegisterAccount} />\n                        <Route exact path='/registration/:registerhash' component={CreateAccount} />\n                        <Route exact path='/forgot-password' component={ForgotPassword} />\n                        <Route exact path={'/passwordreset/:resethash'} component={ChangePassword} />\n\n                        <Route exact path='/login' component={Login} authstatus={isAuthenticated} />\n\n                        <Route exact path='/developers' component={DevsPortal} />\n                        <Route exact path='/developers/:docName' component={DocumentComponent} />\n                        <Route exact path='/apiregistration' component={KeyRegistration} />\n                        <Route exact path='/apiregistration/:params' component={KeyConfirmation} />\n                        <Route exact path='/tos' component={TermsOfService} />\n\n                        <Route exact path='/unauthorized' component={Unauthorized} />\n\n                        <Route exact path='/privacy' component={PrivacyComponent} />\n\n                        <PrivateRoute path='/member-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessMemberMgmt))} component={MemberManagement} />\n                        <PrivateRoute path='/session-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessSessionMgmt))} component={SessionManagement} />\n                        <PrivateRoute path='/committee-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessCommitteeMgmt))} component={CommitteeManagement} />\n                        <PrivateRoute path='/docket-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessDocketMgmt))} component={DocketManagement} />\n                        <PrivateRoute path='/calendar-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessCalendarMgmt))} component={CalendarManagement} />\n                        <PrivateRoute path='/configurations-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessConfigurationsMgmt))} component={ConfigurationsManagement} />\n                        <PrivateRoute path='/minutes-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessMinutesMgmt))} component={MinutesManagement} />\n                        <PrivateRoute path='/communications-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessCommMgmt))} component={CommunicationsManagement} />\n                        <PrivateRoute path='/version-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessVersionMgmt))} component={VersionManagement} />\n                        <PrivateRoute path='/bill-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessBillMgmt))} component={BillManagement} />\n                        <PrivateRoute path='/vote-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessVoteMgmt))} component={VoteManagement} />\n                        <PrivateRoute path='/print-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessPrintMgmt))} component={PrintManagement} />\n                        <PrivateRoute path='/report-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessReportMgmt))} component={ReportManagement} />\n                        <PrivateRoute path='/amendment-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessAmendmentMgmt))} component={AmendmentManagement} />\n                        <PrivateRoute path='/partner-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessPartnerMgmt))} component={PartnerManagement} />\n                        <PrivateRoute path='/user-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessMemberMgmt))} component={UserManagement} />\n                        <PrivateRoute path='/journal-management' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessJournalMgmt))} component={JournalManagement} />\n                        <PrivateRoute path='/dashboard' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={true} component={AdminDashboard} />\n                        <PrivateRoute path='/notifications' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={true} component={NotificationManagement} />\n                        <PrivateRoute path='/profile' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={true} component={ProfileForm} />\n                        <PrivateRoute path='/change-password' checkingToken={checkingToken} authstatus={isAuthenticated || (this.props.location.search && queryString.parse(this.props.location.search).emailaddress)} hasPermission={true} component={ChangePassword} />\n                        <PrivateRoute path='/admin-developers' checkingToken={checkingToken} authstatus={isAuthenticated} hasPermission={Boolean(permissions.find(p => p.canAccessDocs))} component={AdminDocs} />\n                    </Layout>\n                </div>\n\n                {!this.props.location.pathname.includes(\"management\") &&\n                    <Footer />\n                }\n\n                <AuthenticatedTemplate>\n                    <ProfileContent\n                        setHouseToken={this.setHouseToken}\n                        houseToken={this.state.houseToken}\n                        isAuthenticated={this.props.login.isAuthenticated}\n                    />\n                </AuthenticatedTemplate>\n\n            </IdleTimer>\n        );\n    }\n}\n\nfunction ProfileContent(props) {\n    const { instance, accounts } = useMsal();\n\n    function RequestAccessToken() {\n        const request = {\n            ...loginRequest,\n            account: accounts[0]\n        };\n\n        instance.acquireTokenSilent(request).then((response) => {\n            props.setHouseToken(response.accessToken, response.expiresOn);\n            return true;\n        }).catch((e) => {\n            console.log(e)\n        });\n    }\n\n    if (props.houseToken === \"\" && !props.isAuthenticated) {\n        RequestAccessToken();\n    }\n\n    return (\n        null\n    );\n};\n\n// Connect is wrapped by withRouter. \n// This is the only way history.push and Redirect will work when also using Connect. \nconst App = withRouter(connect(\n    (state) => {\n        const { login, nav } = state;\n        return {\n            login,\n            nav\n        }\n    },\n    (dispatch) => {\n        return {\n            actions: bindActionCreators(Object.assign({}, authActionCreators, navActionCreators), dispatch)\n        }\n    }\n)(LISApp))\n\nexport default App;","// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nconst isLocalhost = Boolean(\n  window.location.hostname === 'localhost' ||\n    // [::1] is the IPv6 localhost address.\n    window.location.hostname === '[::1]' ||\n    // 127.0.0.1/8 is considered localhost for IPv4.\n    window.location.hostname.match(\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n    )\n);\n\nexport default function register() {\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n    // The URL constructor is available in all browsers that support SW.\n    const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\n    if (publicUrl.origin !== window.location.origin) {\n      // Our service worker won't work if PUBLIC_URL is on a different origin\n      // from what our page is served on. This might happen if a CDN is used to\n      // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\n      return;\n    }\n\n    window.addEventListener('load', () => {\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n      if (isLocalhost) {\n        // This is running on localhost. Lets check if a service worker still exists or not.\n        checkValidServiceWorker(swUrl);\n      } else {\n        // Is not local host. Just register service worker\n        registerValidSW(swUrl);\n      }\n    });\n  }\n}\n\nfunction registerValidSW(swUrl) {\n  navigator.serviceWorker\n    .register(swUrl)\n    .then(registration => {\n      registration.onupdatefound = () => {\n        const installingWorker = registration.installing;\n        installingWorker.onstatechange = () => {\n          if (installingWorker.state === 'installed') {\n            if (navigator.serviceWorker.controller) {\n              // At this point, the old content will have been purged and\n              // the fresh content will have been added to the cache.\n              // It's the perfect time to display a \"New content is\n              // available; please refresh.\" message in your web app.\n                console.log('New content is available; please refresh.');\n                // delete browser cache and hard reload\n                window.location.reload(true);\n            } else {\n              // At this point, everything has been precached.\n              // It's the perfect time to display a\n              // \"Content is cached for offline use.\" message.\n              console.log('Content is cached for offline use.');\n            }\n          }\n        };\n      };\n    })\n    .catch(error => {\n      console.error('Error during service worker registration:', error);\n    });\n}\n\nfunction checkValidServiceWorker(swUrl) {\n  // Check if the service worker can be found. If it can't reload the page.\n  fetch(swUrl)\n    .then(response => {\n      // Ensure service worker exists, and that we really are getting a JS file.\n      if (\n        response.status === 404 ||\n        response.headers.get('content-type').indexOf('javascript') === -1\n      ) {\n        // No service worker found. Probably a different app. Reload the page.\n        navigator.serviceWorker.ready.then(registration => {\n          registration.unregister().then(() => {\n            window.location.reload();\n          });\n        });\n      } else {\n        // Service worker found. Proceed as normal.\n        registerValidSW(swUrl);\n      }\n    })\n    .catch(() => {\n      console.log(\n        'No internet connection found. App is running in offline mode.'\n      );\n    });\n}\n\nexport function unregister() {\n  if ('serviceWorker' in navigator) {\n    navigator.serviceWorker.ready.then(registration => {\n      registration.unregister();\n    });\n  }\n}\n","import { applyMiddleware, compose, createStore } from 'redux';\nimport thunk from 'redux-thunk';\nimport { routerMiddleware } from 'connected-react-router'\nimport { createBrowserHistory } from 'history'\nimport createRootReducer from './reducers'\n\nexport const history = createBrowserHistory();\nconst reactRouterMiddleware = routerMiddleware(history);\n\nconst middleWares = [\n    thunk,\n    reactRouterMiddleware\n]\n\nexport default function configureStore(preloadedState) {\n    const store = createStore(\n        createRootReducer(history), // root reducer with router state\n        preloadedState,\n        compose(applyMiddleware(...middleWares))\n    )\n\n    return store\n}","\nimport './stylesheets/shared/global.css';\nimport './stylesheets/lis-public-view/public-view.css';\nimport './stylesheets/shared/mobile.css';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { ConnectedRouter } from 'connected-react-router'\nimport App from './App';\nimport registerServiceWorker from './registerServiceWorker';\nimport configureStore, { history } from './configureStore';\nimport { ApplicationInsights } from '@microsoft/applicationinsights-web'\nimport { PublicClientApplication } from \"@azure/msal-browser\";\nimport { MsalProvider } from \"@azure/msal-react\";\nimport { msalConfig } from \"./authConfig\";\n\nconst msalInstance = new PublicClientApplication(msalConfig);\n\nconst store = configureStore();\nconst rootElement = document.getElementById('root');\n\n//Setup the app to use Azure Application Insights.\nlet iKey = '';\nif (window.env.API_SERVER === 'QA') {\n    iKey = 'df7a0319-ce88-47d1-9283-fdf1153bff55';\n} else if (window.env.API_SERVER === 'Test') {\n    iKey = '0c3c8e03-65f5-4a51-8f94-21301445bf6d';\n}\n\nif (iKey) {\n    const appInsights = new ApplicationInsights({\n        config: {\n            instrumentationKey: iKey\n        }\n    });\n    appInsights.loadAppInsights();\n}\n\nwindow.store = store;\nReactDOM.render(\n    <Provider store={store}>\n        <ConnectedRouter history={history}>\n            <MsalProvider instance={msalInstance}>\n                <App />\n            </MsalProvider>\n        </ConnectedRouter>\n    </Provider>,\n    rootElement);\n\nregisterServiceWorker();\n","import * as Login from './stores/lis-auth-store';\nimport * as Users from './stores/lis-user-store';\nimport * as Session from './stores/lis-session-store';\nimport * as Committee from './stores/lis-committee-store';\nimport * as Calendar from './stores/lis-calendar-store';\nimport * as Minutes from './stores/lis-minutes-store';\nimport * as Members from './stores/lis-members-store';\nimport * as Bills from './stores/lis-legislation-store';\nimport * as Communications from './stores/lis-communications-store';\nimport * as Patrons from './stores/lis-patron-store';\nimport * as Personnel from './stores/lis-personnel-store';\nimport * as Votes from './stores/lis-votes-store';\nimport * as Print from './stores/lis-print-store';\nimport * as Schedule from './stores/lis-schedule-store';\nimport * as Report from './stores/lis-report-store';\nimport * as Collection from './stores/lis-collection-store';\nimport * as Stat from './stores/lis-statistics-store';\nimport * as Nav from './stores/lis-nav-store';\nimport * as Org from './stores/lis-org-store';\nimport * as Dev from './stores/lis-developers-store';\nimport * as Journal from './stores/lis-journal-store';\nimport { combineReducers } from 'redux';\nimport { connectRouter } from 'connected-react-router';\n\nexport default (history) => combineReducers({\n    router: connectRouter(history),\n    login: Login.reducer,\n    users: Users.reducer,\n    session: Session.reducer,\n    committee: Committee.reducer,\n    calendar: Calendar.reducer,\n    members: Members.reducer,\n    bills: Bills.reducer,\n    nav: Nav.reducer,\n    patrons: Patrons.reducer,\n    minutes: Minutes.reducer,\n    personnel: Personnel.reducer,\n    votes: Votes.reducer,\n    communications: Communications.reducer,\n    schedule: Schedule.reducer,\n    print: Print.reducer,\n    report: Report.reducer,\n    collection: Collection.reducer,\n    stats: Stat.reducer,\n    organizations: Org.reducer,\n    developers: Dev.reducer,\n    journal: Journal.reducer\n});","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst committeeListRequest = \"GET_COMMITTEE_LIST_REQUEST\";\nconst committeeListSuccess = \"GET_COMMITTEE_LIST_SUCCESS\";\nconst committeeListFailure = \"GET_COMMITTEE_LIST_FAILURE\";\n\nconst createCommitteeRequest = \"CREATE_COMMITTEE_REQUEST\";\nconst createCommitteeSuccess = \"CREATE_COMMITTEE_SUCCESS\";\nconst createCommitteeFailure = \"CREATE_COMMITTEE_FAILURE\";\n\nconst saveCommitteeRequest = \"SAVE_COMMITTEE_REQUEST\";\nconst saveCommitteeSuccess = \"SAVE_COMMITTEE_SUCCESS\";\nconst saveCommitteeFailure = \"SAVE_COMMITTEE_FAILURE\";\n\nconst partnerCommitteeListRequest = \"GET_PARTNER_COMMITTEE_LIST_REQUEST\";\nconst partnerCommitteeListSuccess = \"GET_PARTNER_COMMITTEE_LIST_SUCCESS\";\nconst partnerCommitteeListFailure = \"GET_PARTNER_COMMITTEE_LIST_FAILURE\";\n\nconst partnerCommitteesRequest = \"GET_PARTNER_COMMITTEES_REQUEST\";\nconst partnerCommitteesSuccess = \"GET_PARTNER_COMMITTEES_SUCCESS\";\nconst partnerCommitteesFailure = \"GET_PARTNER_COMMITTEES_FAILURE\";\n\nconst committeeByIdRequest = \"GET_COMMITTEE_BY_ID_REQUEST\";\nconst committeeByIdSuccess = \"GET_COMMITTEE_BY_ID_SUCCESS\";\nconst committeeByIdFailure = \"GET_COMMITTEE_BY_ID_FAILURE\";\n\nconst committeeByNumberRequest = \"GET_COMMITTEE_BY_NUMBER_REQUEST\";\nconst committeeByNumberSuccess = \"GET_COMMITTEE_BY_NUMBER_SUCCESS\";\nconst committeeByNumberFailure = \"GET_COMMITTEE_BY_NUMBER_FAILURE\";\n\nconst committeePartnerByIdRequest = \"GET_PARTNER_COMMITTEE_BY_ID_REQUEST\";\nconst committeePartnerByIdSuccess = \"GET_PARTNER_COMMITTEE_BY_ID_SUCCESS\";\nconst committeePartnerByIdFailure = \"GET_PARTNER_COMMITTEE_BY_ID_FAILURE\";\n\nconst committeesByMemberRequest = \"GET_COMMITTEES_BY_MEMBER_REQUEST\";\nconst committeesByMemberSuccess = \"GET_COMMITTEES_BY_MEMBER_SUCCESS\";\nconst committeesByMemberFailure = \"GET_COMMITTEES_BY_MEMBER_FAILURE\";\n\nconst toggleChamber = \"COMMITTEES_TOGGLE_CHAMBER\";\n\nconst initialState = {\n    committeeList: [],\n    savedCommittee: '',\n    partnerCommitteeList: [],\n    partnerCommitteeListError: 'Could not retrieve subcommittees.',\n    partnerCommittees: [],\n    membersList: '',\n    committeeByIdData: [],\n    committeeByNumberData: [],\n    committeesByMember: [],\n    createdCommittee: '',\n    partnerCommitteeByIdData: {},\n    createCommitteeMessage: '',\n    saveCommitteeError: '',\n    committeeChamber: ''\n};\n\n\n\nexport const committeeActionCreators = {\n\n    // SAVE AN EXISTING COMMITTEE\n    saveCommitteeRequest: () => ({\n        type: saveCommitteeRequest,\n        isFetching: true\n    }),\n\n    receiveSaveCommittee: (responseObj) => ({\n        type: saveCommitteeSuccess,\n        isFetching: false,\n        savedCommittee: responseObj\n    }),\n\n    saveCommitteeError: saveCommitteeError => ({\n        type: saveCommitteeFailure,\n        isFetching: false,\n        saveCommitteeError: saveCommitteeError\n    }),\n\n    saveCommittee: (body) => {\n        return dispatch => {\n            dispatch(committeeActionCreators.saveCommitteeRequest());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_COMMITTEE_API_URL) + '/Committee/api/saveCommitteeAsync', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(committeeActionCreators.saveCommitteeError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(committeeActionCreators.receiveSaveCommittee(result[1][0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(committeeActionCreators.saveCommitteeError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    // CREATE A NEW COMMITTEE\n    createCommitteeRequest: () => ({\n        type: createCommitteeRequest,\n        isFetching: true\n    }),\n\n    receiveCreateCommittee: (responseObj) => ({\n        type: createCommitteeSuccess,\n        isFetching: false,\n        createdCommittee: responseObj,\n    }),\n\n    createCommitteeError: message => ({\n        type: createCommitteeFailure,\n        isFetching: false,\n        createCommitteeMessage: message\n    }),\n\n    createNewCommittee: (body) => {\n        return dispatch => {\n            dispatch(committeeActionCreators.createCommitteeRequest());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_COMMITTEE_API_URL) + '/Committee/api/createCommitteeAsync', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(committeeActionCreators.createCommitteeError('Fail ' + result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(committeeActionCreators.receiveCreateCommittee(result[1]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(committeeActionCreators.createCommitteeError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    // GET PARTNER COMMITTEE LIST FOR COMMITTEE MANAGEMENT SUBCOMMITTEES\n    requestPartnerCommitteeList: () => ({\n        type: partnerCommitteeListRequest,\n        isFetching: true\n    }),\n\n    receivePartnerCommitteeList: responseObj => ({\n        type: partnerCommitteeListSuccess,\n        isFetching: false,\n        partnerCommitteeList: responseObj\n    }),\n\n    partnerCommitteeListError: message => ({\n        type: partnerCommitteeListFailure,\n        isFetching: false,\n        partnerCommitteeListError: message\n    }),\n\n    getPartnerCommitteeList: (params) => {\n        return dispatch => {\n            dispatch(committeeActionCreators.requestPartnerCommitteeList());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_COMMITTEE_API_URL) + '/Committee/api/GetPartnerCommitteeListAsync?', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === 1) {\n                        dispatch(committeeActionCreators.partnerCommitteeListError('Could not retrieve subcommittees.'))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === 0) {\n                        // Dispatch the success action\n                        dispatch(committeeActionCreators.receivePartnerCommitteeList(result[1].Committees))\n                    } else if (result[0] === 2) {\n                        dispatch(committeeActionCreators.receivePartnerCommitteeList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    // GET PARTNER COMMITTEES FOR COMMITTEE MANAGEMENT GRID\n    requestPartnerCommittees: () => ({\n        type: partnerCommitteesRequest,\n        isFetching: true\n    }),\n\n    receivePartnerCommittees: responseObj => ({\n        type: partnerCommitteesSuccess,\n        isFetching: false,\n        partnerCommittees: responseObj\n    }),\n\n    partnerCommitteesError: message => ({\n        type: partnerCommitteesFailure,\n        isFetching: false,\n        partnerCommitteesError: message\n    }),\n\n    getPartnerCommittees: (params) => {\n        return dispatch => {\n            dispatch(committeeActionCreators.requestPartnerCommittees());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_COMMITTEE_API_URL) + '/Committee/api/GetPartnerCommitteesAsync?', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(committeeActionCreators.partnerCommitteesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(committeeActionCreators.receivePartnerCommittees(result[1].Committees))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(committeeActionCreators.partnerCommitteesError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    requestCommitteesByMember: () => ({\n        type: committeesByMemberRequest,\n        isFetching: true\n    }),\n\n    receiveCommitteesByMember: responseObj => ({\n        type: committeesByMemberSuccess,\n        isFetching: false,\n        committeesByMember: responseObj\n    }),\n\n    committeesByMemberError: message => ({\n        type: committeesByMemberFailure,\n        isFetching: false,\n        message\n    }),\n\n    // GET ALL COMMITTEES BY MEMBER ID\n    getCommitteesByMember: (params) => {\n        return dispatch => {\n            dispatch(committeeActionCreators.requestCommitteesByMember());\n\n            return publicRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/GetCommitteesListAsync/?', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(committeeActionCreators.committeesByMemberError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(committeeActionCreators.receiveCommitteesByMember(result[1].Committees))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(committeeActionCreators.receiveCommitteesByMember([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    requestCommitteeList: () => ({\n        type: committeeListRequest,\n        isFetching: true\n    }),\n\n    receiveCommitteeList: responseObj => ({\n        type: committeeListSuccess,\n        isFetching: false,\n        committeeList: responseObj\n    }),\n\n    committeeListError: message => ({\n        type: committeeListFailure,\n        isFetching: false,\n        committeeList: [],\n        message\n    }),\n\n    // Get all committees for a session start date & chamber\n    getCommitteeList: (params) => {\n        //Common params:\n        //effectiveDate (must be URI encoded ISO date string),\n        //chamberCode, \n        //parentCommitteeID\n\n        return dispatch => {\n            dispatch(committeeActionCreators.requestCommitteeList());\n\n            return publicRequest((API_URL || process.env.REACT_APP_COMMITTEE_API_URL) + '/Committee/api/GetCommitteeListAsync?', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(committeeActionCreators.committeeListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(committeeActionCreators.receiveCommitteeList(result[1].Committees))\n                        return (result[1])\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(committeeActionCreators.receiveCommitteeList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // GET COMMITTEE BY ID FOR PUBLIC VIEWS\n    requestCommitteeById: () => ({\n        type: committeeByIdRequest,\n        isFetching: true\n    }),\n\n    receiveCommitteeById: responseObj => ({\n        type: committeeByIdSuccess,\n        isFetching: false,\n        committeeByIdData: responseObj\n    }),\n\n    committeeByIdError: message => ({\n        type: committeeByIdFailure,\n        isFetching: false,\n        message\n    }),\n\n    // GET COMMITTEE DETAILS BY COMMITTEE ID\n    getCommitteeById: (params) => {\n\n        return dispatch => {\n            dispatch(committeeActionCreators.requestCommitteeById());\n\n            return publicRequest((API_URL || process.env.REACT_APP_COMMITTEE_API_URL) + '/Committee/api/getCommitteeByIdAsync/', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(committeeActionCreators.committeeByIdError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(committeeActionCreators.receiveCommitteeById(result[1].Committees[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(committeeActionCreators.committeeByIdError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // GET COMMITTEE BY NUMBER FOR PUBLIC VIEWS\n    requestCommitteeByNumber: () => ({\n        type: committeeByNumberRequest,\n        isFetching: true\n    }),\n\n    receiveCommitteeByNumber: responseObj => ({\n        type: committeeByNumberSuccess,\n        isFetching: false,\n        committeeByNumberData: responseObj\n    }),\n\n    committeeByNumberError: message => ({\n        type: committeeByNumberFailure,\n        isFetching: false,\n        message\n    }),\n\n    // GET COMMITTEE DETAILS BY COMMITTEE NUMBER\n    getCommitteeByNumber: (params) => {\n\n        return dispatch => {\n            dispatch(committeeActionCreators.requestCommitteeByNumber());\n\n            return publicRequest((API_URL || process.env.REACT_APP_COMMITTEE_API_URL) + '/Committee/api/GetCommitteesAsync/', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(committeeActionCreators.committeeByNumberError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(committeeActionCreators.receiveCommitteeByNumber(result[1].Committees[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(committeeActionCreators.committeeByNumberError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // GET COMMITTEE BY ID FOR COMMITTEE MANAGEMENT (W/ PARTNER AUTH)\n    requestPartnerCommitteeById: () => ({\n        type: committeePartnerByIdRequest,\n        isFetching: true\n    }),\n\n    receivePartnerCommitteeById: responseObj => ({\n        type: committeePartnerByIdSuccess,\n        isFetching: false,\n        partnerCommitteeByIdData: responseObj\n    }),\n\n    committeePartnerByIdError: message => ({\n        type: committeePartnerByIdFailure,\n        isFetching: false,\n        message\n    }),\n\n    getPartnerCommitteeById: (params) => {\n\n        return dispatch => {\n            dispatch(committeeActionCreators.requestPartnerCommitteeById());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_COMMITTEE_API_URL) + '/Committee/api/GetPartnerCommitteeByIdAsync/', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(committeeActionCreators.committeePartnerByIdError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(committeeActionCreators.receivePartnerCommitteeById(result[1].Committees[0]))\n                        return result[1].Committees[0];\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(committeeActionCreators.committeePartnerByIdError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    toggleChamber: (value) => ({\n        type: toggleChamber,\n        committeeChamber: value\n    })\n};\n\nexport const reducer = (state, action) => {\n    state = state || initialState;\n\n    switch (action.type) {\n        case createCommitteeRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case createCommitteeSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                createdCommittee: action.createdCommittee,\n                createCommitteeMessage: ''\n            });\n        case createCommitteeFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                createCommitteeMessage: action.createCommitteeMessage\n            });\n        case partnerCommitteeListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case partnerCommitteeListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                partnerCommitteeList: action.partnerCommitteeList,\n                partnerCommitteeListError: ''\n            });\n        case partnerCommitteeListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                partnerCommitteeListError: action.partnerCommitteeListError\n            });\n        case partnerCommitteesRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case partnerCommitteesSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                partnerCommittees: action.partnerCommittees,\n                partnerCommitteesError: ''\n            });\n        case partnerCommitteesFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                partnerCommitteesError: action.partnerCommitteesError\n            });\n        case committeesByMemberRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case committeesByMemberSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                committeesByMember: action.committeesByMember,\n                errorMessage: ''\n            });\n        case committeesByMemberFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case committeeListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case committeeListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                committeeList: action.committeeList,\n                errorMessage: ''\n            });\n        case committeeListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case committeeByIdRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case committeeByIdSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                committeeByIdData: action.committeeByIdData,\n                errorMessage: ''\n            });\n        case committeeByIdFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case committeeByNumberRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case committeeByNumberSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                committeeByNumberData: action.committeeByNumberData,\n                errorMessage: ''\n            });\n        case committeeByNumberFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case committeePartnerByIdRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case committeePartnerByIdSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                partnerCommitteeByIdData: action.partnerCommitteeByIdData,\n                errorMessage: ''\n            });\n        case committeePartnerByIdFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case saveCommitteeRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case saveCommitteeSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                savedCommittee: action.savedCommittee,\n                saveCommitteeError: ''\n            });\n        case saveCommitteeFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                saveCommitteeError: action.saveCommitteeError\n            });\n        case toggleChamber:\n            return Object.assign({}, state, {\n                committeeChamber: action.committeeChamber\n            });\n        default:\n            return state;\n    }\n};\n","import { partnerRequest, publicRequest } from '../services/request.service'\n\nconst API_URL = window.env ? window.env.API_SERVER : '';\nconst NO_CONTENT = 2;\nconst REQUEST_FAILURE = 1;\nconst REQUEST_SUCCESS = 0;\n\nconst districtListSuccess = \"GET_DISTRICTS_SUCCESS\";\nconst districtListFailure = \"GET_DISTRICTS_FAILURE\";\n\nconst memberStatusesSuccess = \"GET_STATUSES_SUCCESS\";\nconst memberStatusesFailure = \"GET_STATUSES_FAILURE\";\n\nconst partyCodeListSuccess = \"GET_PARTIES_SUCCESS\";\nconst partyCodeListFailure = \"GET_PARTIES_FAILURE\";\n\nconst memberNumbersRequest = \"GET_ALL_MEMBERS_REQUEST\";\nconst memberNumbersSuccess = \"GET_ALL_MEMBERS_SUCCESS\";\nconst memberNumbersFailure = \"GET_ALL_MEMBERS_FAILURE\";\n\nconst memberListRequest = \"GET_MEMBER_LIST_REQUEST\";\nconst memberListSuccess = \"GET_MEMBER_LIST_SUCCESS\";\nconst memberListFailure = \"GET_MEMBER_LIST_FAILURE\";\n\nconst memberContactRequest = \"GET_MEMBER_CONTACT_REQUEST\";\nconst memberContactSuccess = \"GET_MEMBER_CONTACT_SUCCESS\";\nconst memberContactFailure = \"GET_MEMBER_CONTACT_FAILURE\";\n\nconst memberListContactRequest = \"GET_MEMBER_LIST_CONTACT_REQUEST\";\nconst memberListContactSuccess = \"GET_MEMBER_LIST_CONTACT_SUCCESS\";\nconst memberListContactFailure = \"GET_MEMBER_LIST_CONTACT_FAILURE\";\n\nconst memberByIdSuccess = \"GET_MEMBER_BY_ID_SUCCESS\";\nconst memberByIdFailure = \"GET_MEMBER_BY_ID_FAILURE\";\n\nconst membersByCommitteeRequest = \"GET_MEMBERS_BY_COMMITTEE_REQUEST\";\nconst membersByCommitteeSuccess = \"GET_MEMBERS_BY_COMMITTEE_SUCCESS\";\nconst membersByCommitteeFailure = \"GET_MEMBERS_BY_COMMITTEE_FAILURE\";\n\nconst committeeMemberRolesRequest = \"GET_COMMITTEE_MEMBER_ROLES_REQUEST\";\nconst committeeMemberRolesSuccess = \"GET_COMMITTEE_MEMBER_ROLES_SUCCESS\";\nconst committeeMemberRolesFailure = \"GET_COMMITTEE_MEMBER_ROLES_FAILURE\";\n\nconst memberCommitteeSaveSuccess = 'MEMBER_COMMITTEE_SAVE_SUCCESS';\nconst memberCommitteeSaveFailure = 'MEMBER_COMMITTEE_SAVE_FAILURE';\n\nconst memberCreateSuccess = 'MEMBER_CREATE_SUCCESS';\nconst memberCreateFailure = 'MEMBER_CREATE_FAILURE';\n\nconst memberSaveSuccess = 'MEMBER_SAVE_SUCCESS';\nconst memberSaveFailure = 'MEMBER_SAVE_FAILURE';\n\nconst memberLegislationSuccess = 'MEMBER_LEGISLATION_SUCCESS';\nconst memberLegislationFailure = 'MEMBER_LEGISLATION_FAILURE';\n\nconst memberVotesSuccess = 'MEMBER_VOTES_SUCCESS';\nconst memberVotesFailure = 'MEMBER_VOTES_FAILURE';\n\nconst memberConferenceBillsSuccess = 'MEMBER_CONFERENCE_BILLS_SUCCESS';\nconst memberConferenceBillsFailure = 'MEMBER_CONFERENCE_BILLS_FAILURE';\n\nconst initialState = {\n    districtList: [],\n    districtListError: '',\n    memberStatuses: [],\n    memberStatusesError: '',\n    partyCodeList: [],\n    partyCodeListError: '',\n    memberList: [],\n    memberData: [],\n    memberContactData: [],\n    memberListContactData: [],\n    committeeHouseRoles: [],\n    committeeSenateRoles: [],\n    membersByCommittee: [],\n    membersByCommitteeError: '',\n    member: '',\n    memberError: '',\n    memberCommitteeSave: '',\n    memberCommitteeSaveError: '',\n    memberCreate: '',\n    memberCreateError: '',\n    memberSave: '',\n    memberSaveError: null,\n    memberLegislation: [],\n    memberLegislationError: '',\n    memberVotes: '',\n    memberVotesError: '',\n    memberConferenceBills: [],\n    memberConferenceBillsError: '',\n    memberListContactError: ''\n};\n\nexport const memberActionCreators = {\n\n    receiveDistricts: (responseObj) => ({\n        type: districtListSuccess,\n        districtList: responseObj\n    }),\n\n    districtListError: message => ({\n        type: districtListFailure,\n        districtListError: message\n    }),\n\n    getDistricts: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/getdistrictreferencesasync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.districtListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(memberActionCreators.receiveDistricts(result[1].Districts))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.districtListError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n\n    },\n\n    receivePartyCodeList: (responseObj) => ({\n        type: partyCodeListSuccess,\n        partyCodeList: responseObj\n    }),\n\n    partyCodeListError: message => ({\n        type: partyCodeListFailure,\n        partyCodeListError: message\n    }),\n\n    getPartyCodeList: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/getpartyreferencesasync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.partyCodeListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(memberActionCreators.receivePartyCodeList(result[1].Parties))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.partyCodeListError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n\n    },\n\n    receiveMemberStatuses: (responseObj) => ({\n        type: memberStatusesSuccess,\n        memberStatuses: responseObj\n    }),\n\n    memberStatusesError: message => ({\n        type: memberStatusesFailure,\n        memberStatusesError: message\n    }),\n\n    getMemberStatuses: () => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/getmemberstatustypereferencesasync', 'GET', headers, '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberStatusesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(memberActionCreators.receiveMemberStatuses(result[1].MemberStatuses))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.memberStatusesError('No Content'))\n                        throw 'No Content'\n                    }\n                }).catch(err => console.log(err))\n        }\n\n    },\n\n    // GET MEMBERS BY COMMITTEE ID - PARTNER AUTH\n    requestMembersByCommittee: () => ({\n        type: membersByCommitteeRequest,\n        isFetching: true\n    }),\n\n    receiveMembersByCommittee: (responseObj) => ({\n        type: membersByCommitteeSuccess,\n        isFetching: false,\n        membersByCommittee: responseObj\n    }),\n\n    membersByCommitteeError: message => ({\n        type: membersByCommitteeFailure,\n        isFetching: false,\n        membersByCommitteeError: message\n    }),\n\n    getMembersByCommittee: (params, partner) => {\n        return dispatch => {\n            dispatch(memberActionCreators.requestMembersByCommittee());\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_MEMBERS_BY_COMMITTEE_API_URL) + '/MembersByCommittee/api/getPartnerMembersByCommitteeAsync?', 'GET', headers, '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_MEMBERS_BY_COMMITTEE_API_URL) + '/MembersByCommittee/api/GetCommitteeMembersListAsync?', 'GET', headers, '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.membersByCommitteeError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(memberActionCreators.receiveMembersByCommittee(result[1].MemberList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.receiveMembersByCommittee([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n\n    },\n\n    // GET COMMITTEE MEMBER ROLES - USED ON COMM MGMT FORM DROPDOWN\n    requestCommitteeMemberRoles: () => ({\n        type: committeeMemberRolesRequest,\n        isFetching: true\n    }),\n\n    receiveCommitteeMemberRoles: (houseRoles, senateRoles) => ({\n        type: committeeMemberRolesSuccess,\n        isFetching: false,\n        committeeHouseRoles: houseRoles,\n        committeeSenateRoles: senateRoles\n    }),\n\n    committteeMemberRolesError: message => ({\n        type: committeeMemberRolesFailure,\n        isFetching: false,\n        message\n    }),\n\n    getCommitteeMemberRoles: () => {\n        return dispatch => {\n            dispatch(memberActionCreators.requestCommitteeMemberRoles());\n\n            return publicRequest((API_URL || process.env.REACT_APP_MEMBERS_BY_COMMITTEE_API_URL) + '/MembersByCommittee/api/getCommitteeRolesAsync/', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.committeeMemberRolesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        let members = result[1];\n                        var committeeMembersArray = members.CommitteeRoles;\n                        var committeeMemberSenateRoles = [];\n                        var committeeMemberHouseRoles = [];\n                        committeeMembersArray.forEach(function (element) {\n                            var elemObj = { label: element.Title, value: element.CommitteeRoleID }\n                            if (element.ChamberCode === 'H') {\n                                committeeMemberHouseRoles.push(elemObj)\n                            } else {\n                                committeeMemberSenateRoles.push(elemObj)\n                            }\n                        })\n                        dispatch(memberActionCreators.receiveCommitteeMemberRoles(committeeMemberHouseRoles, committeeMemberSenateRoles))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.committeeMemberRolesError('No Content'))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    // GET MEMBER SHALLOW LIST\n    requestMemberNumbers: () => ({\n        type: memberNumbersRequest,\n        isFetching: true\n    }),\n\n    receiveMemberNumbers: responseObj => ({\n        type: memberNumbersSuccess,\n        isFetching: false,\n        memberNumbers: responseObj\n    }),\n\n    memberNumbersError: message => ({\n        type: memberNumbersFailure,\n        isFetching: false,\n        memberNumbers: [],\n        memberNumbersError: message\n    }),\n\n    getMemberNumbers: () => {\n        return dispatch => {\n            dispatch(memberActionCreators.requestMemberNumbers());\n\n            return publicRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/GetMemberNumberListAsync', 'GET', '', '', '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberNumbersError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(memberActionCreators.receiveMemberNumbers(result[1].MemberNumberList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.receiveMemberNumbers([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n\n        }\n    },\n\n    // GET MEMBER SHALLOW LIST\n    requestMemberList: () => ({\n        type: memberListRequest,\n        isFetching: true\n    }),\n\n    receiveMemberList: responseObj => ({\n        type: memberListSuccess,\n        isFetching: false,\n        memberList: responseObj\n    }),\n\n    memberListError: message => ({\n        type: memberListFailure,\n        isFetching: false,\n        memberList: [],\n        memberListError: message\n    }),\n\n    getMemberList: (params) => {\n        return dispatch => {\n            dispatch(memberActionCreators.requestMemberList());\n\n            return publicRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/GetMemberListAsync/?', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberListError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(memberActionCreators.receiveMemberList(result[1].ShallowMembers))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.receiveMemberList([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n\n        }\n    },\n\n    receiveMember: responseObj => ({\n        type: memberByIdSuccess,\n        member: responseObj\n    }),\n\n    memberError: message => ({\n        type: memberByIdFailure,\n        memberError: message\n    }),\n\n    getMember: (params, partner) => {\n        return dispatch => {\n            let request = '';\n            if (partner) {\n                request = partnerRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/GetPartnerMemberByIdAsync/', 'GET', '', '', params)\n            } else {\n                request = publicRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/GetMemberByIdAsync/', 'GET', '', '', params)\n            }\n            return request\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(memberActionCreators.receiveMember(result[1].Members[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.memberError('Member not found'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err));\n        }\n    },\n\n    // GET MEMBER CONTACT INFO - USED ON MEMBER DETAILS PAGE\n    requestMemberContact: () => ({\n        type: memberContactRequest,\n        isFetching: true\n    }),\n\n    receiveMemberContact: responseObj => ({\n        type: memberContactSuccess,\n        isFetching: false,\n        memberContactData: responseObj\n    }),\n\n    memberContactError: message => ({\n        type: memberContactFailure,\n        isFetching: false,\n        message\n    }),\n\n    getMemberContact: (params) => {\n        return dispatch => {\n            dispatch(memberActionCreators.requestMemberContact());\n\n            return publicRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/GetMembersContactInformationListAsync/?', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberContactError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(memberActionCreators.receiveMemberContact(result[1].MemberContactInformationList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.receiveMemberContact([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    // GET MEMBER CONTACT INFO - USED ON MEMBER MANAGEMENT GRID\n    requestMemberListContact: () => ({\n        type: memberListContactRequest,\n        isFetching: true\n    }),\n\n    receiveMemberListContact: responseObj => ({\n        type: memberListContactSuccess,\n        isFetching: false,\n        memberListContactData: responseObj\n    }),\n\n    memberListContactError: message => ({\n        type: memberListContactFailure,\n        isFetching: false,\n        message\n    }),\n\n    getMemberListContact: (params) => {\n        return dispatch => {\n            dispatch(memberActionCreators.requestMemberContact());\n\n            return partnerRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/GetPartnerMembersContactInformationListAsync/?', 'GET', '', '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberListContactError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(memberActionCreators.receiveMemberListContact(result[1].MemberContactInformationList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.receiveMemberListContact([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveMemberCommitteeSave: (message) => ({\n        type: memberCommitteeSaveSuccess,\n        memberCommitteeSave: message\n    }),\n\n    memberCommitteeSaveError: (message) => ({\n        type: memberCommitteeSaveFailure,\n        memberCommitteeSaveError: message\n    }),\n\n    saveMemberCommittee: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MEMBERS_BY_COMMITTEE_API_URL) + '/MembersByCommittee/api/SaveMembersByCommitteeAsync/', 'PUT', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberCommitteeSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(memberActionCreators.receiveMemberCommitteeSave(result[1]))\n                        return Promise.resolve(result[1])\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.memberCommitteeSaveError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveMemberCreate: (resObj) => ({\n        type: memberCreateSuccess,\n        memberCreate: resObj\n    }),\n\n    memberCreateError: (message) => ({\n        type: memberCreateFailure,\n        memberCreateError: message\n    }),\n\n    createMember: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/creatememberasync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberCreateError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(memberActionCreators.receiveMemberCreate(result[1][0]))\n                        return Promise.resolve(result[1])\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.memberCreateError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveMemberSave: (resObj) => ({\n        type: memberSaveSuccess,\n        memberSave: resObj\n    }),\n\n    memberSaveError: (message) => ({\n        type: memberSaveFailure,\n        memberSaveError: message\n    }),\n\n    saveMember: (body) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return partnerRequest((API_URL || process.env.REACT_APP_MEMBERS_API_URL) + '/Member/api/savememberasync/', 'POST', headers, body, '')\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberSaveError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        dispatch(memberActionCreators.receiveMemberSave(result[1][0]))\n                        return Promise.resolve(result[1])\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.memberSaveError('No Content'))\n                        return Promise.reject('No Content')\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n    },\n\n    receiveMemberLegislation: (responseObj) => ({\n        type: memberLegislationSuccess,\n        memberLegislation: responseObj\n    }),\n\n    memberLegislationError: message => ({\n        type: memberLegislationFailure,\n        memberLegislationError: message\n    }),\n\n    getMemberLegislation: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_PATRON_SERVICE) + '/LegislationPatron/api/GetLegislationPatronListAsync?', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberLegislationError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(memberActionCreators.receiveMemberLegislation(result[1].PatronLegislation))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.receiveMemberLegislation([]))\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n\n    },\n\n    receiveMemberVotes: (responseObj) => ({\n        type: memberVotesSuccess,\n        memberVotes: responseObj\n    }),\n\n    memberVotesError: message => ({\n        type: memberVotesFailure,\n        memberVotesError: message\n    }),\n\n    getMemberVotes: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_MEMBER_VOTE_SEARCH_SERVICE) + '/MemberVoteSearch/api/GetMemberVoteListAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberVotesError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(memberActionCreators.receiveMemberVotes(result[1].MemberVoteList[0]))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.receiveMemberVotes([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n\n    },\n\n    receiveMemberConferenceBills: (responseObj) => ({\n        type: memberConferenceBillsSuccess,\n        memberConferenceBills: responseObj\n    }),\n\n    memberConferenceBillsError: message => ({\n        type: memberConferenceBillsFailure,\n        memberConferenceBillsError: message\n    }),\n\n    getMemberConferenceBills: (params) => {\n        return dispatch => {\n            let headers = {\n                'content-type': \"application/json; charset=utf-8\"\n            }\n            return publicRequest((API_URL || process.env.REACT_APP_LEGISLATION_API_URL) + '/Legislation/api/GetConferenceLegislationListAsync', 'GET', headers, '', params)\n                .then(result => {\n                    if (result[0] === REQUEST_FAILURE) {\n                        dispatch(memberActionCreators.memberConferenceBillsError(result[1]))\n                        return Promise.reject(result[1])\n                    } else if (result[0] === REQUEST_SUCCESS) {\n                        // Dispatch the success action\n                        dispatch(memberActionCreators.receiveMemberConferenceBills(result[1].ConferenceLegislationList))\n                    } else if (result[0] === NO_CONTENT) {\n                        dispatch(memberActionCreators.receiveMemberConferenceBills([]));\n                    } else if (result.name === 'AbortError') {\n                        return Promise.reject(\"Aborted\");\n                    }\n                }).catch(err => Promise.reject(err))\n        }\n\n    }\n};\n\nexport const reducer = (state, action) => {\n    state = state || initialState;\n\n    switch (action.type) {\n        case districtListSuccess:\n            return Object.assign({}, state, {\n                districtList: action.districtList,\n                districtListError: ''\n            });\n        case districtListFailure:\n            return Object.assign({}, state, {\n                districtListError: action.districtListError\n            });\n        case memberStatusesSuccess:\n            return Object.assign({}, state, {\n                memberStatuses: action.memberStatuses,\n                memberStatusesError: ''\n            });\n        case memberStatusesFailure:\n            return Object.assign({}, state, {\n                memberStatusesError: action.memberStatusesError\n            });\n        case partyCodeListSuccess:\n            return Object.assign({}, state, {\n                partyCodeList: action.partyCodeList,\n                partyCodeListError: ''\n            });\n        case partyCodeListFailure:\n            return Object.assign({}, state, {\n                partyCodeListError: action.partyCodeListError\n            });\n        case membersByCommitteeRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case membersByCommitteeSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                membersByCommittee: action.membersByCommittee,\n                errorMessage: ''\n            });\n        case membersByCommitteeFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case committeeMemberRolesRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case committeeMemberRolesSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                committeeSenateRoles: action.committeeSenateRoles,\n                committeeHouseRoles: action.committeeHouseRoles,\n                errorMessage: ''\n            });\n        case committeeMemberRolesFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case memberNumbersRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case memberNumbersSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                memberNumbers: action.memberNumbers,\n                errorMessage: ''\n            });\n        case memberNumbersFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                memberNumbersError: action.memberNumbersError\n            });\n        case memberListRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case memberListSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                memberList: action.memberList,\n                errorMessage: ''\n            });\n        case memberListFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                memberListError: action.memberListError\n            });\n        case memberByIdSuccess:\n            return Object.assign({}, state, {\n                member: action.member,\n                memberError: ''\n            });\n        case memberByIdFailure:\n            return Object.assign({}, state, {\n                memberError: action.memberError\n            });\n        case memberContactRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case memberContactSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                memberContactData: action.memberContactData,\n                errorMessage: ''\n            });\n        case memberContactFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                errorMessage: action.message\n            });\n        case memberListContactRequest:\n            return Object.assign({}, state, {\n                isFetching: true\n            });\n        case memberListContactSuccess:\n            return Object.assign({}, state, {\n                isFetching: false,\n                memberListContactData: action.memberListContactData,\n                memberListContactError: ''\n            });\n        case memberListContactFailure:\n            return Object.assign({}, state, {\n                isFetching: false,\n                memberListContactError: action.message\n            });\n        case memberCommitteeSaveSuccess:\n            return Object.assign({}, state, {\n                memberCommitteeSave: action.memberCommitteeSave,\n                memberCommitteeSaveError: ''\n            })\n        case memberCommitteeSaveFailure:\n            return Object.assign({}, state, {\n                memberCommitteeSaveError: action.memberCommitteeSaveError\n            })\n        case memberCreateSuccess:\n            return Object.assign({}, state, {\n                memberCreate: action.memberCreate,\n                memberCreateError: ''\n            })\n        case memberCreateFailure:\n            return Object.assign({}, state, {\n                memberCreateError: action.memberCreateError\n            })\n        case memberSaveSuccess:\n            return Object.assign({}, state, {\n                memberSave: action.memberSave,\n                memberSaveError: null\n            })\n        case memberSaveFailure:\n            return Object.assign({}, state, {\n                memberSaveError: action.memberSaveError\n            })\n        case memberLegislationSuccess:\n            return Object.assign({}, state, {\n                memberLegislation: action.memberLegislation,\n                memberLegislationError: ''\n            })\n        case memberLegislationFailure:\n            return Object.assign({}, state, {\n                memberLegislationError: action.memberLegislationError\n            })\n        case memberVotesSuccess:\n            return Object.assign({}, state, {\n                memberVotes: action.memberVotes,\n                memberVotesError: ''\n            })\n        case memberVotesFailure:\n            return Object.assign({}, state, {\n                memberVotesError: action.memberVotesError\n            })\n        case memberConferenceBillsSuccess:\n            return Object.assign({}, state, {\n                memberConferenceBills: action.memberConferenceBills,\n                memberConferenceBillsError: ''\n            })\n        case memberConferenceBillsFailure:\n            return Object.assign({}, state, {\n                memberConferenceBillsError: action.memberConferenceBillsError\n            })\n        default:\n            return state;\n    }\n};\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport tinymce from 'tinymce/tinymce';\n\nfunction copyStyles(sourceDoc, targetDoc) {\n    Array.from(sourceDoc.styleSheets).forEach(styleSheet => {\n        if (styleSheet.cssRules) { // true for inline styles\n            const newStyleEl = sourceDoc.createElement('style');\n\n            Array.from(styleSheet.cssRules).forEach(cssRule => {\n                newStyleEl.appendChild(sourceDoc.createTextNode(cssRule.cssText));\n            });\n\n            targetDoc.head.appendChild(newStyleEl);\n        } else if (styleSheet.href) { // true for stylesheets loaded from a URL\n            const newLinkEl = sourceDoc.createElement('link');\n\n            newLinkEl.rel = 'stylesheet';\n            newLinkEl.href = styleSheet.href;\n            targetDoc.head.appendChild(newLinkEl);\n        }\n    });\n}\n\nclass Popout extends React.Component {\n    constructor(props) {\n        super(props);\n\n        this.containerEl = document.createElement('div'); \n        \n        // open a new browser window and store a reference to it\n        const width = this.props.windowWidth || 900;\n        const height = this.props.windowHeight || 500;\n        this.externalWindow = window.open('', '', `width=${width},height=${height},left=200,top=200`);\n\n        // append the container <div> (that has props.children appended to it) to the body of the new window\n        this.externalWindow.document.body.appendChild(this.containerEl);\n\n        this.externalWindow.document.title = this.props.windowTitle;\n        copyStyles(document, this.externalWindow.document);\n\n    }\n\n    componentDidMount() {\n        // update the state in the parent component if the user closes the new window\n        this.externalWindow.addEventListener('beforeunload', () => {\n            this.props.togglePortal(true);\n        });\n    }\n\n    \n    componentWillUnmount() {\n        this.externalWindow.close();\n    }\n\n    render() {\n        return ReactDOM.createPortal(this.props.children, this.containerEl);\n    }\n}\n\nexport default Popout;"],"sourceRoot":""}