@gen-epix/ui-client-casedb 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +287 -0
- package/README.md +101 -0
- package/dist/@types/mui.d.ts +12 -0
- package/dist/@types/ui-casedb.d.ts +3 -0
- package/dist/@types/vite-env.d.ts +3 -0
- package/dist/_chunks/AddCasesToEventDialog.js +246 -0
- package/dist/_chunks/AddCasesToEventDialog.js.map +1 -0
- package/dist/_chunks/CaseContentForm.js +43 -0
- package/dist/_chunks/CaseContentForm.js.map +1 -0
- package/dist/_chunks/CaseDbDownloadUtil.js +2307 -0
- package/dist/_chunks/CaseDbDownloadUtil.js.map +1 -0
- package/dist/_chunks/CaseInfoDialog.js +509 -0
- package/dist/_chunks/CaseInfoDialog.js.map +1 -0
- package/dist/_chunks/CaseSetInfoDialog.js +479 -0
- package/dist/_chunks/CaseSetInfoDialog.js.map +1 -0
- package/dist/_chunks/CaseTypeInfoDialog.js +470 -0
- package/dist/_chunks/CaseTypeInfoDialog.js.map +1 -0
- package/dist/_chunks/CasesAlreadyInCaseSetWarning.js +123 -0
- package/dist/_chunks/CasesAlreadyInCaseSetWarning.js.map +1 -0
- package/dist/_chunks/CollectionIcon.js +18 -0
- package/dist/_chunks/CollectionIcon.js.map +1 -0
- package/dist/_chunks/CompletCaseTypeLoader.js +53 -0
- package/dist/_chunks/CompletCaseTypeLoader.js.map +1 -0
- package/dist/_chunks/CreateEventDialogSuccessNotificationMessage.js +18 -0
- package/dist/_chunks/CreateEventDialogSuccessNotificationMessage.js.map +1 -0
- package/dist/_chunks/CustomTabPanel.js +21 -0
- package/dist/_chunks/CustomTabPanel.js.map +1 -0
- package/dist/_chunks/Dashboard.js +2582 -0
- package/dist/_chunks/Dashboard.js.map +1 -0
- package/dist/_chunks/DashboardStoreLoader.js +67 -0
- package/dist/_chunks/DashboardStoreLoader.js.map +1 -0
- package/dist/_chunks/DataCollectionAccessInfo.js +66 -0
- package/dist/_chunks/DataCollectionAccessInfo.js.map +1 -0
- package/dist/_chunks/EpiCurveUtil.js +378 -0
- package/dist/_chunks/EpiCurveUtil.js.map +1 -0
- package/dist/_chunks/EpiCurveWidget.js +570 -0
- package/dist/_chunks/EpiCurveWidget.js.map +1 -0
- package/dist/_chunks/FilterUtil.js +1537 -0
- package/dist/_chunks/FilterUtil.js.map +1 -0
- package/dist/_chunks/FindSimilarCasesDialog.js +439 -0
- package/dist/_chunks/FindSimilarCasesDialog.js.map +1 -0
- package/dist/_chunks/FindSimilarCasesUtil.js +100 -0
- package/dist/_chunks/FindSimilarCasesUtil.js.map +1 -0
- package/dist/_chunks/HomePageTrends.js +276 -0
- package/dist/_chunks/HomePageTrends.js.map +1 -0
- package/dist/_chunks/LegendaItem.js +325 -0
- package/dist/_chunks/LegendaItem.js.map +1 -0
- package/dist/_chunks/LineListWidget.js +702 -0
- package/dist/_chunks/LineListWidget.js.map +1 -0
- package/dist/_chunks/PanelSeparator.js +1676 -0
- package/dist/_chunks/PanelSeparator.js.map +1 -0
- package/dist/_chunks/Upload.js +1506 -0
- package/dist/_chunks/Upload.js.map +1 -0
- package/dist/_chunks/UploadUtil.js +1976 -0
- package/dist/_chunks/UploadUtil.js.map +1 -0
- package/dist/_chunks/UserRightsDialog.js +152 -0
- package/dist/_chunks/UserRightsDialog.js.map +1 -0
- package/dist/_chunks/_MapCache.js +274 -0
- package/dist/_chunks/_MapCache.js.map +1 -0
- package/dist/_chunks/_Set.js +9 -0
- package/dist/_chunks/_Set.js.map +1 -0
- package/dist/_chunks/_arrayIncludesWith.js +42 -0
- package/dist/_chunks/_arrayIncludesWith.js.map +1 -0
- package/dist/_chunks/_baseClone.js +262 -0
- package/dist/_chunks/_baseClone.js.map +1 -0
- package/dist/_chunks/_baseFlatten.js +26 -0
- package/dist/_chunks/_baseFlatten.js.map +1 -0
- package/dist/_chunks/_baseGet.js +246 -0
- package/dist/_chunks/_baseGet.js.map +1 -0
- package/dist/_chunks/_baseIteratee.js +246 -0
- package/dist/_chunks/_baseIteratee.js.map +1 -0
- package/dist/_chunks/_cacheHas.js +29 -0
- package/dist/_chunks/_cacheHas.js.map +1 -0
- package/dist/_chunks/_defineProperty.js +15 -0
- package/dist/_chunks/_defineProperty.js.map +1 -0
- package/dist/_chunks/_setToArray.js +15 -0
- package/dist/_chunks/_setToArray.js.map +1 -0
- package/dist/_chunks/_setToString.js +64 -0
- package/dist/_chunks/_setToString.js.map +1 -0
- package/dist/_chunks/chunk-KS7C4IRE.js +1327 -0
- package/dist/_chunks/chunk-KS7C4IRE.js.map +1 -0
- package/dist/_chunks/cloneDeep.js +119 -0
- package/dist/_chunks/cloneDeep.js.map +1 -0
- package/dist/_chunks/dashboardStore.js +743 -0
- package/dist/_chunks/dashboardStore.js.map +1 -0
- package/dist/_chunks/eachYearOfInterval.js +104 -0
- package/dist/_chunks/eachYearOfInterval.js.map +1 -0
- package/dist/_chunks/esm.js +46335 -0
- package/dist/_chunks/esm.js.map +1 -0
- package/dist/_chunks/format.js +504 -0
- package/dist/_chunks/format.js.map +1 -0
- package/dist/_chunks/hasIn.js +34 -0
- package/dist/_chunks/hasIn.js.map +1 -0
- package/dist/_chunks/index.esm.js +1342 -0
- package/dist/_chunks/index.esm.js.map +1 -0
- package/dist/_chunks/index.module.js +72 -0
- package/dist/_chunks/index.module.js.map +1 -0
- package/dist/_chunks/intersection.js +58 -0
- package/dist/_chunks/intersection.js.map +1 -0
- package/dist/_chunks/isArguments.js +27 -0
- package/dist/_chunks/isArguments.js.map +1 -0
- package/dist/_chunks/isArray.js +9 -0
- package/dist/_chunks/isArray.js.map +1 -0
- package/dist/_chunks/isArrayLike.js +30 -0
- package/dist/_chunks/isArrayLike.js.map +1 -0
- package/dist/_chunks/isObjectLike.js +18 -0
- package/dist/_chunks/isObjectLike.js.map +1 -0
- package/dist/_chunks/isValid.js +14 -0
- package/dist/_chunks/isValid.js.map +1 -0
- package/dist/_chunks/last.js +13 -0
- package/dist/_chunks/last.js.map +1 -0
- package/dist/_chunks/noop.js +10 -0
- package/dist/_chunks/noop.js.map +1 -0
- package/dist/_chunks/omit.js +81 -0
- package/dist/_chunks/omit.js.map +1 -0
- package/dist/_chunks/parseISO.js +117 -0
- package/dist/_chunks/parseISO.js.map +1 -0
- package/dist/_chunks/protectedTokens.js +630 -0
- package/dist/_chunks/protectedTokens.js.map +1 -0
- package/dist/_chunks/react.js +11 -0
- package/dist/_chunks/react.js.map +1 -0
- package/dist/_chunks/round.js +64 -0
- package/dist/_chunks/round.js.map +1 -0
- package/dist/_chunks/shallow.js +31 -0
- package/dist/_chunks/shallow.js.map +1 -0
- package/dist/_chunks/sync.js +3796 -0
- package/dist/_chunks/sync.js.map +1 -0
- package/dist/_chunks/toDate.js +18 -0
- package/dist/_chunks/toDate.js.map +1 -0
- package/dist/_chunks/toString.js +31 -0
- package/dist/_chunks/toString.js.map +1 -0
- package/dist/_chunks/useUnit.js +30 -0
- package/dist/_chunks/useUnit.js.map +1 -0
- package/dist/_chunks/userProfileStoreContext.js +7 -0
- package/dist/_chunks/userProfileStoreContext.js.map +1 -0
- package/dist/_chunks/vanilla.js +20 -0
- package/dist/_chunks/vanilla.js.map +1 -0
- package/dist/_chunks/yup.js +73 -0
- package/dist/_chunks/yup.js.map +1 -0
- package/dist/classes/errors/UploadError.d.ts +5 -0
- package/dist/classes/errors/index.d.ts +1 -0
- package/dist/classes/errors/index.js +11 -0
- package/dist/classes/errors/index.js.map +1 -0
- package/dist/classes/filters/SelectionFilter.d.ts +11 -0
- package/dist/classes/filters/TreeFilter.d.ts +11 -0
- package/dist/classes/services/DataService/DataService.d.ts +13 -0
- package/dist/classes/services/DataService/index.d.ts +1 -0
- package/dist/classes/services/DataService/index.js +83 -0
- package/dist/classes/services/DataService/index.js.map +1 -0
- package/dist/classes/services/EventBusService/EventBusService.d.ts +49 -0
- package/dist/classes/services/EventBusService/index.d.ts +1 -0
- package/dist/classes/services/EventBusService/index.js +16 -0
- package/dist/classes/services/EventBusService/index.js.map +1 -0
- package/dist/classes/services/LineListService/LineListCaseSetMembersService/LineListCaseSetMembersService.d.ts +9 -0
- package/dist/classes/services/LineListService/LineListCaseSetMembersService/index.d.ts +1 -0
- package/dist/classes/services/LineListService/LineListCaseSetMembersService/index.js +27 -0
- package/dist/classes/services/LineListService/LineListCaseSetMembersService/index.js.map +1 -0
- package/dist/classes/services/LineListService/LineListIsOwnCaseService/LineListIsOwnCaseService.d.ts +9 -0
- package/dist/classes/services/LineListService/LineListIsOwnCaseService/index.d.ts +1 -0
- package/dist/classes/services/LineListService/LineListIsOwnCaseService/index.js +30 -0
- package/dist/classes/services/LineListService/LineListIsOwnCaseService/index.js.map +1 -0
- package/dist/classes/services/LineListService/LineListServiceAbstract/LineListServiceAbstract.d.ts +11 -0
- package/dist/classes/services/LineListService/LineListServiceAbstract/index.d.ts +1 -0
- package/dist/classes/services/LineListService/LineListServiceAbstract/index.js +55 -0
- package/dist/classes/services/LineListService/LineListServiceAbstract/index.js.map +1 -0
- package/dist/components/app/CaseDbApp/CaseDbApp.d.ts +1 -0
- package/dist/components/app/CaseDbApp/index.d.ts +1 -0
- package/dist/components/app/CaseDbApp/index.js +14 -0
- package/dist/components/app/CaseDbApp/index.js.map +1 -0
- package/dist/components/form/fields/ArrangementEditor/ArrangementEditor.d.ts +17 -0
- package/dist/components/form/fields/ArrangementEditor/index.d.ts +1 -0
- package/dist/components/form/fields/ArrangementEditor/index.js +130 -0
- package/dist/components/form/fields/ArrangementEditor/index.js.map +1 -0
- package/dist/components/ui/AddCasesToEventDialog/AddCasesToEventDialog.d.ts +10 -0
- package/dist/components/ui/AddCasesToEventDialog/AddCasesToEventDialogSuccessNotificationMessage.d.ts +6 -0
- package/dist/components/ui/AddCasesToEventDialog/index.d.ts +1 -0
- package/dist/components/ui/AddCasesToEventDialog/index.js +2 -0
- package/dist/components/ui/CaseContentForm/CaseContentForm.d.ts +10 -0
- package/dist/components/ui/CaseContentForm/index.d.ts +1 -0
- package/dist/components/ui/CaseContentForm/index.js +2 -0
- package/dist/components/ui/CaseContentFormDialog/CaseContentFormDialog.d.ts +9 -0
- package/dist/components/ui/CaseContentFormDialog/index.d.ts +1 -0
- package/dist/components/ui/CaseContentFormDialog/index.js +57 -0
- package/dist/components/ui/CaseContentFormDialog/index.js.map +1 -0
- package/dist/components/ui/CaseInfoDialog/CaseCaseSetInfo.d.ts +6 -0
- package/dist/components/ui/CaseInfoDialog/CaseContent.d.ts +6 -0
- package/dist/components/ui/CaseInfoDialog/CaseInfoDialog.d.ts +15 -0
- package/dist/components/ui/CaseInfoDialog/CaseInfoForm.d.ts +10 -0
- package/dist/components/ui/CaseInfoDialog/CaseSharingForm.d.ts +9 -0
- package/dist/components/ui/CaseInfoDialog/CaseSharingInfo.d.ts +3 -0
- package/dist/components/ui/CaseInfoDialog/ReadOnlyCaseContent.d.ts +6 -0
- package/dist/components/ui/CaseInfoDialog/index.d.ts +1 -0
- package/dist/components/ui/CaseInfoDialog/index.js +2 -0
- package/dist/components/ui/CaseSetInfoDialog/CaseSetContent.d.ts +6 -0
- package/dist/components/ui/CaseSetInfoDialog/CaseSetDescription.d.ts +6 -0
- package/dist/components/ui/CaseSetInfoDialog/CaseSetForm.d.ts +8 -0
- package/dist/components/ui/CaseSetInfoDialog/CaseSetInfoDialog.d.ts +10 -0
- package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingForm.d.ts +10 -0
- package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingInfo.d.ts +3 -0
- package/dist/components/ui/CaseSetInfoDialog/index.d.ts +1 -0
- package/dist/components/ui/CaseSetInfoDialog/index.js +2 -0
- package/dist/components/ui/CaseSummary/CaseSummary.d.ts +5 -0
- package/dist/components/ui/CaseSummary/index.d.ts +1 -0
- package/dist/components/ui/CaseSummary/index.js +92 -0
- package/dist/components/ui/CaseSummary/index.js.map +1 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoAccessRights.d.ts +5 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoColAccessRights.d.ts +4 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoData.d.ts +5 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialog.d.ts +7 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialogContent.d.ts +3 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialogWithLoader.d.ts +8 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoRegions.d.ts +5 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoTrees.d.ts +5 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoValues.d.ts +5 -0
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoVariableDetails.d.ts +6 -0
- package/dist/components/ui/CaseTypeInfoDialog/index.d.ts +10 -0
- package/dist/components/ui/CaseTypeInfoDialog/index.js +2 -0
- package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarning.d.ts +5 -0
- package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarningCaseSetLink.d.ts +5 -0
- package/dist/components/ui/CasesAlreadyInCaseSetWarning/index.d.ts +1 -0
- package/dist/components/ui/CasesAlreadyInCaseSetWarning/index.js +2 -0
- package/dist/components/ui/CompletCaseTypeLoader/CompletCaseTypeLoader.d.ts +7 -0
- package/dist/components/ui/CompletCaseTypeLoader/index.d.ts +1 -0
- package/dist/components/ui/CompletCaseTypeLoader/index.js +2 -0
- package/dist/components/ui/CompletCaseTypeLoader/withEpiCompleteCaseTypeLoader.d.ts +4 -0
- package/dist/components/ui/ContextMenu/ContextMenu.d.ts +20 -0
- package/dist/components/ui/ContextMenu/index.d.ts +1 -0
- package/dist/components/ui/ContextMenu/index.js +96 -0
- package/dist/components/ui/ContextMenu/index.js.map +1 -0
- package/dist/components/ui/CreateEventDialog/CreateEventDialog.d.ts +10 -0
- package/dist/components/ui/CreateEventDialog/CreateEventDialogSuccessNotificationMessage.d.ts +6 -0
- package/dist/components/ui/CreateEventDialog/index.d.ts +1 -0
- package/dist/components/ui/CreateEventDialog/index.js +278 -0
- package/dist/components/ui/CreateEventDialog/index.js.map +1 -0
- package/dist/components/ui/CustomTabPanel/CustomTabPanel.d.ts +6 -0
- package/dist/components/ui/CustomTabPanel/index.d.ts +1 -0
- package/dist/components/ui/CustomTabPanel/index.js +2 -0
- package/dist/components/ui/Dashboard/Dashboard.d.ts +1 -0
- package/dist/components/ui/Dashboard/DashboardContent.d.ts +6 -0
- package/dist/components/ui/Dashboard/DashboardDownloadSidebarItem.d.ts +6 -0
- package/dist/components/ui/Dashboard/DashboardGeneralSettingsForm.d.ts +1 -0
- package/dist/components/ui/Dashboard/DashboardLayoutRenderer.d.ts +9 -0
- package/dist/components/ui/Dashboard/DashboardLayoutSettingsForm.d.ts +4 -0
- package/dist/components/ui/Dashboard/DashboardSearch.d.ts +1 -0
- package/dist/components/ui/Dashboard/DashboardSearchSettings.d.ts +10 -0
- package/dist/components/ui/Dashboard/DashboardSettingsSidebarItem.d.ts +8 -0
- package/dist/components/ui/Dashboard/DashboardWidget.d.ts +12 -0
- package/dist/components/ui/Dashboard/DashboardWidgetPlaceHolder.d.ts +1 -0
- package/dist/components/ui/Dashboard/DashboardWidgetSettingsForm.d.ts +4 -0
- package/dist/components/ui/Dashboard/DashboardZoneContext.d.ts +1 -0
- package/dist/components/ui/Dashboard/context/DashboardContext.d.ts +12 -0
- package/dist/components/ui/Dashboard/context/DashboardContextProvider.d.ts +6 -0
- package/dist/components/ui/Dashboard/index.d.ts +2 -0
- package/dist/components/ui/Dashboard/index.js +2 -0
- package/dist/components/ui/DashboardEditCases/DashboardEditCases.d.ts +6 -0
- package/dist/components/ui/DashboardEditCases/index.d.ts +1 -0
- package/dist/components/ui/DashboardEditCases/index.js +70 -0
- package/dist/components/ui/DashboardEditCases/index.js.map +1 -0
- package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoader.d.ts +7 -0
- package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoaderContent.d.ts +8 -0
- package/dist/components/ui/DashboardStoreLoader/index.d.ts +2 -0
- package/dist/components/ui/DashboardStoreLoader/index.js +2 -0
- package/dist/components/ui/DashboardStoreLoader/withEpiDashboardStore.d.ts +4 -0
- package/dist/components/ui/DataCollectionAccessInfo/DataCollectionAccessInfo.d.ts +1 -0
- package/dist/components/ui/DataCollectionAccessInfo/index.d.ts +1 -0
- package/dist/components/ui/DataCollectionAccessInfo/index.js +2 -0
- package/dist/components/ui/EpiCurveWidget/EpiCurveBarChart.d.ts +21 -0
- package/dist/components/ui/EpiCurveWidget/EpiCurveStackedAreaChart.d.ts +22 -0
- package/dist/components/ui/EpiCurveWidget/EpiCurveWidget.d.ts +2 -0
- package/dist/components/ui/EpiCurveWidget/index.d.ts +1 -0
- package/dist/components/ui/EpiCurveWidget/index.js +2 -0
- package/dist/components/ui/FileSelector/FileSelector.d.ts +7 -0
- package/dist/components/ui/FileSelector/index.d.ts +1 -0
- package/dist/components/ui/FileSelector/index.js +206 -0
- package/dist/components/ui/FileSelector/index.js.map +1 -0
- package/dist/components/ui/FindSimilarCasesDialog/FindSimilarCasesDialog.d.ts +11 -0
- package/dist/components/ui/FindSimilarCasesDialog/FindSimilarCasesDialogDateRangeChart.d.ts +11 -0
- package/dist/components/ui/FindSimilarCasesDialog/index.d.ts +1 -0
- package/dist/components/ui/FindSimilarCasesDialog/index.js +2 -0
- package/dist/components/ui/Grouping/Grouping.d.ts +1 -0
- package/dist/components/ui/Grouping/index.d.ts +1 -0
- package/dist/components/ui/Grouping/index.js +102 -0
- package/dist/components/ui/Grouping/index.js.map +1 -0
- package/dist/components/ui/HistogramWidget/HistogramWidget.d.ts +1 -0
- package/dist/components/ui/HistogramWidget/index.d.ts +1 -0
- package/dist/components/ui/HistogramWidget/index.js +333 -0
- package/dist/components/ui/HistogramWidget/index.js.map +1 -0
- package/dist/components/ui/HomePageTrends/HomePageTrendCard.d.ts +9 -0
- package/dist/components/ui/HomePageTrends/HomePageTrends.d.ts +4 -0
- package/dist/components/ui/HomePageTrends/index.d.ts +1 -0
- package/dist/components/ui/HomePageTrends/index.js +2 -0
- package/dist/components/ui/LegendaItem/LegendaItem.d.ts +10 -0
- package/dist/components/ui/LegendaItem/index.d.ts +1 -0
- package/dist/components/ui/LegendaItem/index.js +2 -0
- package/dist/components/ui/LineListWidget/LineListWidget.d.ts +1 -0
- package/dist/components/ui/LineListWidget/LineListWidgetIsInEventCell.d.ts +6 -0
- package/dist/components/ui/LineListWidget/LineListWidgetIsOwnCaseCell.d.ts +6 -0
- package/dist/components/ui/LineListWidget/LineListWidgetPrimaryMenu.d.ts +5 -0
- package/dist/components/ui/LineListWidget/LineListWidgetSecondaryMenu.d.ts +1 -0
- package/dist/components/ui/LineListWidget/LineListWidgetTitle.d.ts +1 -0
- package/dist/components/ui/LineListWidget/index.d.ts +1 -0
- package/dist/components/ui/LineListWidget/index.js +2 -0
- package/dist/components/ui/LineListWidget/useEpiLineListWidgetEmitDownloadOptions.d.ts +1 -0
- package/dist/components/ui/MapWidget/MapWidget.d.ts +1 -0
- package/dist/components/ui/MapWidget/index.d.ts +1 -0
- package/dist/components/ui/MapWidget/index.js +302 -0
- package/dist/components/ui/MapWidget/index.js.map +1 -0
- package/dist/components/ui/PanelSeparator/PanelSeparatorHorizontal.d.ts +2 -0
- package/dist/components/ui/PanelSeparator/PanelSeparatorVertical.d.ts +2 -0
- package/dist/components/ui/PanelSeparator/index.d.ts +2 -0
- package/dist/components/ui/PanelSeparator/index.js +2 -0
- package/dist/components/ui/RemoveCasesFromEventDialog/RemoveCasesFromEventDialog.d.ts +10 -0
- package/dist/components/ui/RemoveCasesFromEventDialog/index.d.ts +1 -0
- package/dist/components/ui/RemoveCasesFromEventDialog/index.js +111 -0
- package/dist/components/ui/RemoveCasesFromEventDialog/index.js.map +1 -0
- package/dist/components/ui/RemoveFindSimilarCasesResultDialog/RemoveFindSimilarCasesResultDialog.d.ts +9 -0
- package/dist/components/ui/SequenceDownloadDialog/SequenceDownloadDialog.d.ts +10 -0
- package/dist/components/ui/SequenceDownloadDialog/index.d.ts +1 -0
- package/dist/components/ui/SequenceDownloadDialog/index.js +89 -0
- package/dist/components/ui/SequenceDownloadDialog/index.js.map +1 -0
- package/dist/components/ui/TreeDescription/TreeDescription.d.ts +5 -0
- package/dist/components/ui/TreeDescription/index.d.ts +1 -0
- package/dist/components/ui/TreeDescription/index.js +40 -0
- package/dist/components/ui/TreeDescription/index.js.map +1 -0
- package/dist/components/ui/TreeWidget/TreeWidget.d.ts +1 -0
- package/dist/components/ui/TreeWidget/index.d.ts +1 -0
- package/dist/components/ui/TreeWidget/index.js +404 -0
- package/dist/components/ui/TreeWidget/index.js.map +1 -0
- package/dist/components/ui/Upload/Upload.d.ts +1 -0
- package/dist/components/ui/Upload/UploadCaseResultTable.d.ts +18 -0
- package/dist/components/ui/Upload/UploadCreateCases.d.ts +1 -0
- package/dist/components/ui/Upload/UploadEditColumnValuesDialog.d.ts +12 -0
- package/dist/components/ui/Upload/UploadMapColumns.d.ts +1 -0
- package/dist/components/ui/Upload/UploadMapSequences.d.ts +1 -0
- package/dist/components/ui/Upload/UploadNavigation.d.ts +10 -0
- package/dist/components/ui/Upload/UploadPreview.d.ts +4 -0
- package/dist/components/ui/Upload/UploadPreviewNavigation.d.ts +5 -0
- package/dist/components/ui/Upload/UploadSelectFile.d.ts +1 -0
- package/dist/components/ui/Upload/UploadSelectSequenceFiles.d.ts +1 -0
- package/dist/components/ui/Upload/index.d.ts +1 -0
- package/dist/components/ui/Upload/index.js +2 -0
- package/dist/components/ui/UserRightsDialog/UserRightsDialog.d.ts +9 -0
- package/dist/components/ui/UserRightsDialog/UserRightsDialogCaseAccessPolicy.d.ts +5 -0
- package/dist/components/ui/UserRightsDialog/index.d.ts +1 -0
- package/dist/components/ui/UserRightsDialog/index.js +2 -0
- package/dist/components/ui/UsersEffectiveRightsDetailsDialog/UsersEffectiveRightsDetailsDialog.d.ts +13 -0
- package/dist/components/ui/UsersEffectiveRightsDetailsDialog/index.d.ts +1 -0
- package/dist/components/ui/UsersEffectiveRightsDetailsDialog/index.js +373 -0
- package/dist/components/ui/UsersEffectiveRightsDetailsDialog/index.js.map +1 -0
- package/dist/components/ui/Warning/Warning.d.ts +4 -0
- package/dist/components/ui/Warning/index.d.ts +1 -0
- package/dist/components/ui/Warning/index.js +29 -0
- package/dist/components/ui/Warning/index.js.map +1 -0
- package/dist/components/ui/WidgetHeaderIconButton/WidgetHeaderIconButton.d.ts +5 -0
- package/dist/components/ui/WidgetHeaderIconButton/index.d.ts +1 -0
- package/dist/components/ui/WidgetHeaderIconButton/index.js +24 -0
- package/dist/components/ui/WidgetHeaderIconButton/index.js.map +1 -0
- package/dist/components/ui/WidgetMenu/WidgetMenu.d.ts +6 -0
- package/dist/components/ui/WidgetMenu/index.d.ts +1 -0
- package/dist/components/ui/WidgetMenu/index.js +26 -0
- package/dist/components/ui/WidgetMenu/index.js.map +1 -0
- package/dist/components/ui/WidgetUnavailable/WidgetUnavailable.d.ts +6 -0
- package/dist/components/ui/WidgetUnavailable/index.d.ts +1 -0
- package/dist/components/ui/WidgetUnavailable/index.js +18 -0
- package/dist/components/ui/WidgetUnavailable/index.js.map +1 -0
- package/dist/constants/dashboard.d.ts +9 -0
- package/dist/constants/dashboard.js +14 -0
- package/dist/constants/dashboard.js.map +1 -0
- package/dist/constants/query.d.ts +62 -0
- package/dist/constants/query.js +163 -0
- package/dist/constants/query.js.map +1 -0
- package/dist/context/caseAbac/CaseAbacContext.d.ts +14 -0
- package/dist/context/caseAbac/CaseAbacContextProvider.d.ts +6 -0
- package/dist/context/caseAbac/index.d.ts +3 -0
- package/dist/context/caseAbac/useCaseAbacContext.d.ts +2 -0
- package/dist/context/caseTypeAbac/CaseTypeAbacContext.d.ts +14 -0
- package/dist/context/caseTypeAbac/CaseTypeAbacContextProvider.d.ts +6 -0
- package/dist/context/caseTypeAbac/index.d.ts +3 -0
- package/dist/context/caseTypeAbac/useCaseTypeAbacContext.d.ts +2 -0
- package/dist/dataHooks/useAssemblyProtocolsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useAssemblyProtocolsQuery/index.js +21 -0
- package/dist/dataHooks/useAssemblyProtocolsQuery/index.js.map +1 -0
- package/dist/dataHooks/useAssemblyProtocolsQuery/useAssemblyProtocolsQuery.d.ts +6 -0
- package/dist/dataHooks/useCaseRightsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseRightsQuery/index.js +17 -0
- package/dist/dataHooks/useCaseRightsQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseRightsQuery/useCaseRightsQuery.d.ts +3 -0
- package/dist/dataHooks/useCaseSetCategoriesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseSetCategoriesQuery/index.js +22 -0
- package/dist/dataHooks/useCaseSetCategoriesQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseSetCategoriesQuery/useCaseSetCategoriesQuery.d.ts +6 -0
- package/dist/dataHooks/useCaseSetRightsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseSetRightsQuery/index.js +13 -0
- package/dist/dataHooks/useCaseSetRightsQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseSetRightsQuery/useCaseSetRightsQuery.d.ts +3 -0
- package/dist/dataHooks/useCaseSetStatsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseSetStatsQuery/index.js +19 -0
- package/dist/dataHooks/useCaseSetStatsQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseSetStatsQuery/useCaseSetStatsQuery.d.ts +5 -0
- package/dist/dataHooks/useCaseSetStatusesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseSetStatusesQuery/index.js +22 -0
- package/dist/dataHooks/useCaseSetStatusesQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseSetStatusesQuery/useCaseSetStatusesQuery.d.ts +6 -0
- package/dist/dataHooks/useCaseSetsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseSetsQuery/index.js +22 -0
- package/dist/dataHooks/useCaseSetsQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseSetsQuery/useCaseSetsQuery.d.ts +6 -0
- package/dist/dataHooks/useCaseTypeSetCategoriesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseTypeSetCategoriesQuery/index.js +22 -0
- package/dist/dataHooks/useCaseTypeSetCategoriesQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseTypeSetCategoriesQuery/useCaseTypeSetCategoriesQuery.d.ts +6 -0
- package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/index.js +21 -0
- package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/useCaseTypeSetCategoryPurposeQuery.d.ts +4 -0
- package/dist/dataHooks/useCaseTypeSetMembersQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseTypeSetMembersQuery/index.js +13 -0
- package/dist/dataHooks/useCaseTypeSetMembersQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseTypeSetMembersQuery/useCaseTypeSetMembersQuery.d.ts +3 -0
- package/dist/dataHooks/useCaseTypeSetsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseTypeSetsQuery/index.js +25 -0
- package/dist/dataHooks/useCaseTypeSetsQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseTypeSetsQuery/useCaseTypeSetsQuery.d.ts +7 -0
- package/dist/dataHooks/useCaseTypeStatsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseTypeStatsQuery/index.js +13 -0
- package/dist/dataHooks/useCaseTypeStatsQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseTypeStatsQuery/useCaseTypeStatsQuery.d.ts +3 -0
- package/dist/dataHooks/useCaseTypesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useCaseTypesQuery/index.js +24 -0
- package/dist/dataHooks/useCaseTypesQuery/index.js.map +1 -0
- package/dist/dataHooks/useCaseTypesQuery/useCaseTypesQuery.d.ts +9 -0
- package/dist/dataHooks/useColSetMembersQuery/index.d.ts +1 -0
- package/dist/dataHooks/useColSetMembersQuery/index.js +13 -0
- package/dist/dataHooks/useColSetMembersQuery/index.js.map +1 -0
- package/dist/dataHooks/useColSetMembersQuery/useColSetMembersQuery.d.ts +3 -0
- package/dist/dataHooks/useColSetsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useColSetsQuery/index.js +21 -0
- package/dist/dataHooks/useColSetsQuery/index.js.map +1 -0
- package/dist/dataHooks/useColSetsQuery/useColSetsQuery.d.ts +6 -0
- package/dist/dataHooks/useColTypesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useColTypesQuery/index.js +51 -0
- package/dist/dataHooks/useColTypesQuery/index.js.map +1 -0
- package/dist/dataHooks/useColTypesQuery/useColTypesQuery.d.ts +4 -0
- package/dist/dataHooks/useColsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useColsQuery/index.js +27 -0
- package/dist/dataHooks/useColsQuery/index.js.map +1 -0
- package/dist/dataHooks/useColsQuery/useColsQuery.d.ts +7 -0
- package/dist/dataHooks/useConceptQuery/index.d.ts +1 -0
- package/dist/dataHooks/useConceptQuery/index.js +26 -0
- package/dist/dataHooks/useConceptQuery/index.js.map +1 -0
- package/dist/dataHooks/useConceptQuery/useConceptQuery.d.ts +7 -0
- package/dist/dataHooks/useConceptRelationTypeQuery/index.d.ts +1 -0
- package/dist/dataHooks/useConceptRelationTypeQuery/index.js +15 -0
- package/dist/dataHooks/useConceptRelationTypeQuery/index.js.map +1 -0
- package/dist/dataHooks/useConceptRelationTypeQuery/useConceptRelationTypeQuery.d.ts +4 -0
- package/dist/dataHooks/useConceptSetTypeQuery/index.d.ts +1 -0
- package/dist/dataHooks/useConceptSetTypeQuery/index.js +22 -0
- package/dist/dataHooks/useConceptSetTypeQuery/index.js.map +1 -0
- package/dist/dataHooks/useConceptSetTypeQuery/useConceptSetTypeQuery.d.ts +4 -0
- package/dist/dataHooks/useConceptSetsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useConceptSetsQuery/index.js +21 -0
- package/dist/dataHooks/useConceptSetsQuery/index.js.map +1 -0
- package/dist/dataHooks/useConceptSetsQuery/useConceptSetsQuery.d.ts +6 -0
- package/dist/dataHooks/useDataCollectionSetMembersQuery/index.d.ts +1 -0
- package/dist/dataHooks/useDataCollectionSetMembersQuery/index.js +13 -0
- package/dist/dataHooks/useDataCollectionSetMembersQuery/index.js.map +1 -0
- package/dist/dataHooks/useDataCollectionSetMembersQuery/useDataCollectionSetMembersQuery.d.ts +3 -0
- package/dist/dataHooks/useDataCollectionsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useDataCollectionsQuery/index.js +22 -0
- package/dist/dataHooks/useDataCollectionsQuery/index.js.map +1 -0
- package/dist/dataHooks/useDataCollectionsQuery/useDataCollectionsQuery.d.ts +6 -0
- package/dist/dataHooks/useDimTypesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useDimTypesQuery/index.js +26 -0
- package/dist/dataHooks/useDimTypesQuery/index.js.map +1 -0
- package/dist/dataHooks/useDimTypesQuery/useDimTypesQuery.d.ts +4 -0
- package/dist/dataHooks/useDimsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useDimsQuery/index.js +26 -0
- package/dist/dataHooks/useDimsQuery/index.js.map +1 -0
- package/dist/dataHooks/useDimsQuery/useDimsQuery.d.ts +7 -0
- package/dist/dataHooks/useDiseasesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useDiseasesQuery/index.js +21 -0
- package/dist/dataHooks/useDiseasesQuery/index.js.map +1 -0
- package/dist/dataHooks/useDiseasesQuery/useDiseasesQuery.d.ts +6 -0
- package/dist/dataHooks/useEtiologicalAgentsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useEtiologicalAgentsQuery/index.js +21 -0
- package/dist/dataHooks/useEtiologicalAgentsQuery/index.js.map +1 -0
- package/dist/dataHooks/useEtiologicalAgentsQuery/useEtiologicalAgentsQuery.d.ts +6 -0
- package/dist/dataHooks/useGeneticDistanceProtocolsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useGeneticDistanceProtocolsQuery/index.js +18 -0
- package/dist/dataHooks/useGeneticDistanceProtocolsQuery/index.js.map +1 -0
- package/dist/dataHooks/useGeneticDistanceProtocolsQuery/useGeneticDistanceProtocolsQuery.d.ts +5 -0
- package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/index.js +14 -0
- package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/index.js.map +1 -0
- package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/useOrganizationAccessCasePoliciesQuery.d.ts +3 -0
- package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/index.js +14 -0
- package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/index.js.map +1 -0
- package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/useOrganizationShareCasePoliciesQuery.d.ts +3 -0
- package/dist/dataHooks/useRefColsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useRefColsQuery/index.js +22 -0
- package/dist/dataHooks/useRefColsQuery/index.js.map +1 -0
- package/dist/dataHooks/useRefColsQuery/useRefColsQuery.d.ts +6 -0
- package/dist/dataHooks/useRefColsValidationRulesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useRefColsValidationRulesQuery/index.js +13 -0
- package/dist/dataHooks/useRefColsValidationRulesQuery/index.js.map +1 -0
- package/dist/dataHooks/useRefColsValidationRulesQuery/useRefColsValidationRulesQuery.d.ts +3 -0
- package/dist/dataHooks/useRefDimsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useRefDimsQuery/index.js +22 -0
- package/dist/dataHooks/useRefDimsQuery/index.js.map +1 -0
- package/dist/dataHooks/useRefDimsQuery/useRefDimsQuery.d.ts +6 -0
- package/dist/dataHooks/useRegionQuery/index.d.ts +1 -0
- package/dist/dataHooks/useRegionQuery/index.js +25 -0
- package/dist/dataHooks/useRegionQuery/index.js.map +1 -0
- package/dist/dataHooks/useRegionQuery/useRegionQuery.d.ts +7 -0
- package/dist/dataHooks/useRegionRelationTypeQuery/index.d.ts +1 -0
- package/dist/dataHooks/useRegionRelationTypeQuery/index.js +20 -0
- package/dist/dataHooks/useRegionRelationTypeQuery/index.js.map +1 -0
- package/dist/dataHooks/useRegionRelationTypeQuery/useRegionRelationTypeQuery.d.ts +4 -0
- package/dist/dataHooks/useRegionSetsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useRegionSetsQuery/index.js +21 -0
- package/dist/dataHooks/useRegionSetsQuery/index.js.map +1 -0
- package/dist/dataHooks/useRegionSetsQuery/useRegionSetsQuery.d.ts +6 -0
- package/dist/dataHooks/useSequencingProtocolsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useSequencingProtocolsQuery/index.js +21 -0
- package/dist/dataHooks/useSequencingProtocolsQuery/index.js.map +1 -0
- package/dist/dataHooks/useSequencingProtocolsQuery/useSequencingProtocolsQuery.d.ts +6 -0
- package/dist/dataHooks/useTreeAlgorithmCodesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useTreeAlgorithmCodesQuery/index.js +42 -0
- package/dist/dataHooks/useTreeAlgorithmCodesQuery/index.js.map +1 -0
- package/dist/dataHooks/useTreeAlgorithmCodesQuery/useTreeAlgorithmCodesQuery.d.ts +4 -0
- package/dist/dataHooks/useUnitQuery/index.d.ts +1 -0
- package/dist/dataHooks/useUnitQuery/index.js +2 -0
- package/dist/dataHooks/useUnitQuery/useUnit.d.ts +4 -0
- package/dist/dataHooks/useUserAccessCasePoliciesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useUserAccessCasePoliciesQuery/index.js +14 -0
- package/dist/dataHooks/useUserAccessCasePoliciesQuery/index.js.map +1 -0
- package/dist/dataHooks/useUserAccessCasePoliciesQuery/useUserAccessCasePoliciesQuery.d.ts +3 -0
- package/dist/dataHooks/useUserEffectiveRightsQuery/index.d.ts +1 -0
- package/dist/dataHooks/useUserEffectiveRightsQuery/index.js +83 -0
- package/dist/dataHooks/useUserEffectiveRightsQuery/index.js.map +1 -0
- package/dist/dataHooks/useUserEffectiveRightsQuery/useUserEffectiveRightsQuery.d.ts +16 -0
- package/dist/dataHooks/useUserShareCasePoliciesQuery/index.d.ts +1 -0
- package/dist/dataHooks/useUserShareCasePoliciesQuery/index.js +14 -0
- package/dist/dataHooks/useUserShareCasePoliciesQuery/index.js.map +1 -0
- package/dist/dataHooks/useUserShareCasePoliciesQuery/useUserShareCasePoliciesQuery.d.ts +3 -0
- package/dist/hooks/useOrganizationCasePolicyNameFactory/index.d.ts +1 -0
- package/dist/hooks/useOrganizationCasePolicyNameFactory/index.js +25 -0
- package/dist/hooks/useOrganizationCasePolicyNameFactory/index.js.map +1 -0
- package/dist/hooks/useOrganizationCasePolicyNameFactory/useOrganizationCasePolicyNameFactory.d.ts +3 -0
- package/dist/hooks/useUserCasePolicyNameFactory/index.d.ts +1 -0
- package/dist/hooks/useUserCasePolicyNameFactory/index.js +28 -0
- package/dist/hooks/useUserCasePolicyNameFactory/index.js.map +1 -0
- package/dist/hooks/useUserCasePolicyNameFactory/useUserCasePolicyNameFactory.d.ts +3 -0
- package/dist/locale/en.json +676 -0
- package/dist/locale/nl.json +676 -0
- package/dist/models/caseAccess.d.ts +15 -0
- package/dist/models/caseAccess.js +0 -0
- package/dist/models/caseDb.d.ts +96 -0
- package/dist/models/caseDb.js +8 -0
- package/dist/models/caseDb.js.map +1 -0
- package/dist/models/config.d.ts +70 -0
- package/dist/models/config.js +0 -0
- package/dist/models/dashboard.d.ts +91 -0
- package/dist/models/dashboard.js +10 -0
- package/dist/models/dashboard.js.map +1 -0
- package/dist/models/stratification.d.ts +40 -0
- package/dist/models/stratification.js +12 -0
- package/dist/models/stratification.js.map +1 -0
- package/dist/models/theme.d.ts +17 -0
- package/dist/models/theme.js +0 -0
- package/dist/models/upload.d.ts +51 -0
- package/dist/models/upload.js +8 -0
- package/dist/models/upload.js.map +1 -0
- package/dist/pages/CaseDbUsersAdminPage/CaseDbUsersAdminPage.d.ts +1 -0
- package/dist/pages/CaseDbUsersAdminPage/index.d.ts +1 -0
- package/dist/pages/CaseDbUsersAdminPage/index.js +67 -0
- package/dist/pages/CaseDbUsersAdminPage/index.js.map +1 -0
- package/dist/pages/CaseSetCategoryAdminPage/CaseSetCategoryAdminPage.d.ts +1 -0
- package/dist/pages/CaseSetCategoryAdminPage/index.d.ts +1 -0
- package/dist/pages/CaseSetCategoryAdminPage/index.js +69 -0
- package/dist/pages/CaseSetCategoryAdminPage/index.js.map +1 -0
- package/dist/pages/CaseSetStatusAdminPage/CaseSetStatusAdminPage.d.ts +1 -0
- package/dist/pages/CaseSetStatusAdminPage/index.d.ts +1 -0
- package/dist/pages/CaseSetStatusAdminPage/index.js +69 -0
- package/dist/pages/CaseSetStatusAdminPage/index.js.map +1 -0
- package/dist/pages/CaseTypeSetCategoriesAdminPage/CaseTypeSetCategoriesAdminPage.d.ts +1 -0
- package/dist/pages/CaseTypeSetCategoriesAdminPage/index.d.ts +1 -0
- package/dist/pages/CaseTypeSetCategoriesAdminPage/index.js +92 -0
- package/dist/pages/CaseTypeSetCategoriesAdminPage/index.js.map +1 -0
- package/dist/pages/CaseTypeSetsAdminPage/CaseTypeSetsAdminPage.d.ts +1 -0
- package/dist/pages/CaseTypeSetsAdminPage/index.d.ts +1 -0
- package/dist/pages/CaseTypeSetsAdminPage/index.js +148 -0
- package/dist/pages/CaseTypeSetsAdminPage/index.js.map +1 -0
- package/dist/pages/CaseTypesAdminPage/CaseTypesAdminPage.d.ts +1 -0
- package/dist/pages/CaseTypesAdminPage/index.d.ts +1 -0
- package/dist/pages/CaseTypesAdminPage/index.js +288 -0
- package/dist/pages/CaseTypesAdminPage/index.js.map +1 -0
- package/dist/pages/CasesDetailPage/CasesDetailPage.d.ts +1 -0
- package/dist/pages/CasesDetailPage/index.d.ts +1 -0
- package/dist/pages/CasesDetailPage/index.js +41 -0
- package/dist/pages/CasesDetailPage/index.js.map +1 -0
- package/dist/pages/CasesPage/CasesPage.d.ts +1 -0
- package/dist/pages/CasesPage/index.d.ts +1 -0
- package/dist/pages/CasesPage/index.js +229 -0
- package/dist/pages/CasesPage/index.js.map +1 -0
- package/dist/pages/ColSetsAdminPage/ColSetsAdminPage.d.ts +1 -0
- package/dist/pages/ColSetsAdminPage/index.d.ts +1 -0
- package/dist/pages/ColSetsAdminPage/index.js +109 -0
- package/dist/pages/ColSetsAdminPage/index.js.map +1 -0
- package/dist/pages/ColsAdminPage/ColsAdminPage.d.ts +1 -0
- package/dist/pages/ColsAdminPage/index.d.ts +1 -0
- package/dist/pages/ColsAdminPage/index.js +315 -0
- package/dist/pages/ColsAdminPage/index.js.map +1 -0
- package/dist/pages/ConceptRelationsAdminPage/ConceptRelationsAdminPage.d.ts +1 -0
- package/dist/pages/ConceptRelationsAdminPage/index.d.ts +1 -0
- package/dist/pages/ConceptRelationsAdminPage/index.js +103 -0
- package/dist/pages/ConceptRelationsAdminPage/index.js.map +1 -0
- package/dist/pages/ConceptSetsAdminPage/ConceptSetsAdminPage.d.ts +1 -0
- package/dist/pages/ConceptSetsAdminPage/index.d.ts +1 -0
- package/dist/pages/ConceptSetsAdminPage/index.js +112 -0
- package/dist/pages/ConceptSetsAdminPage/index.js.map +1 -0
- package/dist/pages/ConceptsAdminPage/ConceptsAdminPage.d.ts +1 -0
- package/dist/pages/ConceptsAdminPage/index.d.ts +1 -0
- package/dist/pages/ConceptsAdminPage/index.js +94 -0
- package/dist/pages/ConceptsAdminPage/index.js.map +1 -0
- package/dist/pages/DataCollectionSetsAdminPage/DataCollectionSetsAdminPage.d.ts +1 -0
- package/dist/pages/DataCollectionSetsAdminPage/index.d.ts +1 -0
- package/dist/pages/DataCollectionSetsAdminPage/index.js +99 -0
- package/dist/pages/DataCollectionSetsAdminPage/index.js.map +1 -0
- package/dist/pages/DataCollectionVisualizationPage/DataCollectionVisualizationPage.d.ts +1 -0
- package/dist/pages/DataCollectionVisualizationPage/index.d.ts +1 -0
- package/dist/pages/DataCollectionVisualizationPage/index.js +494 -0
- package/dist/pages/DataCollectionVisualizationPage/index.js.map +1 -0
- package/dist/pages/DataCollectionsAdminPage/DataCollectionsAdminPage.d.ts +1 -0
- package/dist/pages/DataCollectionsAdminPage/index.d.ts +1 -0
- package/dist/pages/DataCollectionsAdminPage/index.js +54 -0
- package/dist/pages/DataCollectionsAdminPage/index.js.map +1 -0
- package/dist/pages/DimsAdminPage/DimsAdminPage.d.ts +1 -0
- package/dist/pages/DimsAdminPage/index.d.ts +1 -0
- package/dist/pages/DimsAdminPage/index.js +146 -0
- package/dist/pages/DimsAdminPage/index.js.map +1 -0
- package/dist/pages/DiseasesAdminPage/DiseasesAdminPage.d.ts +1 -0
- package/dist/pages/DiseasesAdminPage/index.d.ts +1 -0
- package/dist/pages/DiseasesAdminPage/index.js +57 -0
- package/dist/pages/DiseasesAdminPage/index.js.map +1 -0
- package/dist/pages/EtiologicalAgentsAdminPage/EtiologicalAgentsAdminPage.d.ts +1 -0
- package/dist/pages/EtiologicalAgentsAdminPage/index.d.ts +1 -0
- package/dist/pages/EtiologicalAgentsAdminPage/index.js +54 -0
- package/dist/pages/EtiologicalAgentsAdminPage/index.js.map +1 -0
- package/dist/pages/EtiologiesAdminPage/EtiologiesAdminPage.d.ts +1 -0
- package/dist/pages/EtiologiesAdminPage/index.d.ts +1 -0
- package/dist/pages/EtiologiesAdminPage/index.js +76 -0
- package/dist/pages/EtiologiesAdminPage/index.js.map +1 -0
- package/dist/pages/EventsDetailPage/EventsDetailPage.d.ts +1 -0
- package/dist/pages/EventsDetailPage/index.d.ts +1 -0
- package/dist/pages/EventsDetailPage/index.js +56 -0
- package/dist/pages/EventsDetailPage/index.js.map +1 -0
- package/dist/pages/EventsPage/EventsPage.d.ts +1 -0
- package/dist/pages/EventsPage/index.d.ts +1 -0
- package/dist/pages/EventsPage/index.js +221 -0
- package/dist/pages/EventsPage/index.js.map +1 -0
- package/dist/pages/HomePage/HomePage.d.ts +1 -0
- package/dist/pages/HomePage/index.d.ts +1 -0
- package/dist/pages/HomePage/index.js +35 -0
- package/dist/pages/HomePage/index.js.map +1 -0
- package/dist/pages/OrganizationAccessCasePoliciesAdminPage/OrganizationAccessCasePoliciesAdminPage.d.ts +1 -0
- package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.d.ts +1 -0
- package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.js +216 -0
- package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.js.map +1 -0
- package/dist/pages/OrganizationShareCasePoliciesAdminPage/OrganizationShareCasePoliciesAdminPage.d.ts +1 -0
- package/dist/pages/OrganizationShareCasePoliciesAdminPage/index.d.ts +1 -0
- package/dist/pages/OrganizationShareCasePoliciesAdminPage/index.js +170 -0
- package/dist/pages/OrganizationShareCasePoliciesAdminPage/index.js.map +1 -0
- package/dist/pages/RefColsAdminPage/RefColsAdminPage.d.ts +1 -0
- package/dist/pages/RefColsAdminPage/index.d.ts +1 -0
- package/dist/pages/RefColsAdminPage/index.js +302 -0
- package/dist/pages/RefColsAdminPage/index.js.map +1 -0
- package/dist/pages/RefDimsAdminPage/RefDimsAdminPage.d.ts +1 -0
- package/dist/pages/RefDimsAdminPage/index.d.ts +1 -0
- package/dist/pages/RefDimsAdminPage/index.js +110 -0
- package/dist/pages/RefDimsAdminPage/index.js.map +1 -0
- package/dist/pages/RegionRelationsAdminPage/RegionRelationsAdminPage.d.ts +1 -0
- package/dist/pages/RegionRelationsAdminPage/index.d.ts +1 -0
- package/dist/pages/RegionRelationsAdminPage/index.js +102 -0
- package/dist/pages/RegionRelationsAdminPage/index.js.map +1 -0
- package/dist/pages/RegionSetShapesAdminPage/RegionSetShapesAdminPage.d.ts +1 -0
- package/dist/pages/RegionSetShapesAdminPage/index.d.ts +1 -0
- package/dist/pages/RegionSetShapesAdminPage/index.js +73 -0
- package/dist/pages/RegionSetShapesAdminPage/index.js.map +1 -0
- package/dist/pages/RegionSetsAdminPage/RegionSetsAdminPage.d.ts +1 -0
- package/dist/pages/RegionSetsAdminPage/index.d.ts +1 -0
- package/dist/pages/RegionSetsAdminPage/index.js +101 -0
- package/dist/pages/RegionSetsAdminPage/index.js.map +1 -0
- package/dist/pages/RegionsAdminPage/RegionsAdminPage.d.ts +1 -0
- package/dist/pages/RegionsAdminPage/index.d.ts +1 -0
- package/dist/pages/RegionsAdminPage/index.js +99 -0
- package/dist/pages/RegionsAdminPage/index.js.map +1 -0
- package/dist/pages/TrendsPage/TrendsPage.d.ts +1 -0
- package/dist/pages/TrendsPage/index.d.ts +1 -0
- package/dist/pages/TrendsPage/index.js +17 -0
- package/dist/pages/TrendsPage/index.js.map +1 -0
- package/dist/pages/UploadPage/UploadPage.d.ts +1 -0
- package/dist/pages/UploadPage/index.d.ts +1 -0
- package/dist/pages/UploadPage/index.js +31 -0
- package/dist/pages/UploadPage/index.js.map +1 -0
- package/dist/pages/UserAccessCasePoliciesAdminPage/UserAccessCasePoliciesAdminPage.d.ts +1 -0
- package/dist/pages/UserAccessCasePoliciesAdminPage/index.d.ts +1 -0
- package/dist/pages/UserAccessCasePoliciesAdminPage/index.js +206 -0
- package/dist/pages/UserAccessCasePoliciesAdminPage/index.js.map +1 -0
- package/dist/pages/UserEffectiveRightsAdminPage/UserEffectiveRightsAdminPage.d.ts +1 -0
- package/dist/pages/UserEffectiveRightsAdminPage/index.d.ts +1 -0
- package/dist/pages/UserEffectiveRightsAdminPage/index.js +246 -0
- package/dist/pages/UserEffectiveRightsAdminPage/index.js.map +1 -0
- package/dist/pages/UserEffectiveRightsTesterAdminPage/UserEffectiveRightsTesterAdminPage.d.ts +1 -0
- package/dist/pages/UserEffectiveRightsTesterAdminPage/index.d.ts +1 -0
- package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js +195 -0
- package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js.map +1 -0
- package/dist/pages/UserShareCasePoliciesAdminPage/UserShareCasePoliciesAdminPage.d.ts +1 -0
- package/dist/pages/UserShareCasePoliciesAdminPage/index.d.ts +1 -0
- package/dist/pages/UserShareCasePoliciesAdminPage/index.js +169 -0
- package/dist/pages/UserShareCasePoliciesAdminPage/index.js.map +1 -0
- package/dist/routes/adminRoutes.d.ts +6 -0
- package/dist/routes/index.d.ts +2 -0
- package/dist/routes/index.js +1110 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/routes.d.ts +6 -0
- package/dist/setup/setup.d.ts +1 -0
- package/dist/setup/setup.js +28 -0
- package/dist/setup/setup.js.map +1 -0
- package/dist/stores/dashboardStore/dashboardStore.d.ts +80 -0
- package/dist/stores/dashboardStore/dashboardStoreContext.d.ts +3 -0
- package/dist/stores/dashboardStore/index.d.ts +2 -0
- package/dist/stores/dashboardStore/index.js +2 -0
- package/dist/stores/uploadStore/index.d.ts +2 -0
- package/dist/stores/uploadStore/index.js +185 -0
- package/dist/stores/uploadStore/index.js.map +1 -0
- package/dist/stores/uploadStore/uploadStore.d.ts +80 -0
- package/dist/stores/uploadStore/uploadStoreContext.d.ts +3 -0
- package/dist/stores/userProfileStore/index.d.ts +1 -0
- package/dist/stores/userProfileStore/index.js +81 -0
- package/dist/stores/userProfileStore/index.js.map +1 -0
- package/dist/stores/userProfileStore/userProfileStore.d.ts +38 -0
- package/dist/stores/userProfileStore/userProfileStoreContext.d.ts +3 -0
- package/dist/theme/demoTheme/demoTheme.d.ts +3 -0
- package/dist/theme/demoTheme/index.d.ts +1 -0
- package/dist/theme/demoTheme/index.js +20 -0
- package/dist/theme/demoTheme/index.js.map +1 -0
- package/dist/utils/AbacUtil/AbacUtil.d.ts +7 -0
- package/dist/utils/AbacUtil/index.d.ts +1 -0
- package/dist/utils/AbacUtil/index.js +31 -0
- package/dist/utils/AbacUtil/index.js.map +1 -0
- package/dist/utils/CaseDbDataUtil/CaseDbDataUtil.d.ts +31 -0
- package/dist/utils/CaseDbDataUtil/index.d.ts +1 -0
- package/dist/utils/CaseDbDataUtil/index.js +43 -0
- package/dist/utils/CaseDbDataUtil/index.js.map +1 -0
- package/dist/utils/CaseDbDownloadUtil/CaseDbDownloadUtil.d.ts +17 -0
- package/dist/utils/CaseDbDownloadUtil/index.d.ts +1 -0
- package/dist/utils/CaseDbDownloadUtil/index.js +2 -0
- package/dist/utils/CaseDbStandardConfigUtil/CaseDbStandardConfigUtil.d.ts +7 -0
- package/dist/utils/CaseDbStandardConfigUtil/index.d.ts +1 -0
- package/dist/utils/CaseDbStandardConfigUtil/index.js +4778 -0
- package/dist/utils/CaseDbStandardConfigUtil/index.js.map +1 -0
- package/dist/utils/CaseDbTableUtil/CaseDbTableUtil.d.ts +6 -0
- package/dist/utils/CaseDbTableUtil/index.d.ts +1 -0
- package/dist/utils/CaseDbTableUtil/index.js +41 -0
- package/dist/utils/CaseDbTableUtil/index.js.map +1 -0
- package/dist/utils/CaseSelectionUtil/CaseSelectionUtil.d.ts +8 -0
- package/dist/utils/CaseSelectionUtil/index.d.ts +1 -0
- package/dist/utils/CaseSelectionUtil/index.js +29 -0
- package/dist/utils/CaseSelectionUtil/index.js.map +1 -0
- package/dist/utils/CaseSetUtil/CaseSetUtil.d.ts +4 -0
- package/dist/utils/CaseSetUtil/index.d.ts +1 -0
- package/dist/utils/CaseSetUtil/index.js +13 -0
- package/dist/utils/CaseSetUtil/index.js.map +1 -0
- package/dist/utils/CaseTypeFormUtil/CaseTypeFormUtil.d.ts +20 -0
- package/dist/utils/CaseTypeFormUtil/index.d.ts +1 -0
- package/dist/utils/CaseTypeFormUtil/index.js +199 -0
- package/dist/utils/CaseTypeFormUtil/index.js.map +1 -0
- package/dist/utils/CaseTypeUtil/CaseTypeUtil.d.ts +39 -0
- package/dist/utils/CaseTypeUtil/index.d.ts +1 -0
- package/dist/utils/CaseTypeUtil/index.js +135 -0
- package/dist/utils/CaseTypeUtil/index.js.map +1 -0
- package/dist/utils/CaseUtil/CaseUtil.d.ts +18 -0
- package/dist/utils/CaseUtil/index.d.ts +1 -0
- package/dist/utils/CaseUtil/index.js +138 -0
- package/dist/utils/CaseUtil/index.js.map +1 -0
- package/dist/utils/DashboardUtil/DashboardUtil.d.ts +29 -0
- package/dist/utils/DashboardUtil/index.d.ts +1 -0
- package/dist/utils/DashboardUtil/index.js +152 -0
- package/dist/utils/DashboardUtil/index.js.map +1 -0
- package/dist/utils/DataSetUtil/DataSetUtil.d.ts +17 -0
- package/dist/utils/DataSetUtil/index.d.ts +1 -0
- package/dist/utils/DataSetUtil/index.js +43 -0
- package/dist/utils/DataSetUtil/index.js.map +1 -0
- package/dist/utils/EffectiveRightsUtil/EffectiveRightsUtil.d.ts +29 -0
- package/dist/utils/EffectiveRightsUtil/index.d.ts +1 -0
- package/dist/utils/EffectiveRightsUtil/index.js +118 -0
- package/dist/utils/EffectiveRightsUtil/index.js.map +1 -0
- package/dist/utils/EpiCurveUtil/EpiCurveUtil.d.ts +96 -0
- package/dist/utils/EpiCurveUtil/index.d.ts +1 -0
- package/dist/utils/EpiCurveUtil/index.js +2 -0
- package/dist/utils/FileUtil/FileUtil.d.ts +5 -0
- package/dist/utils/FileUtil/index.d.ts +1 -0
- package/dist/utils/FileUtil/index.js +15 -0
- package/dist/utils/FileUtil/index.js.map +1 -0
- package/dist/utils/FilterUtil/FilterUtil.d.ts +11 -0
- package/dist/utils/FilterUtil/index.d.ts +1 -0
- package/dist/utils/FilterUtil/index.js +2 -0
- package/dist/utils/FindSimilarCasesUtil/FindSimilarCasesUtil.d.ts +7 -0
- package/dist/utils/FindSimilarCasesUtil/index.d.ts +1 -0
- package/dist/utils/FindSimilarCasesUtil/index.js +2 -0
- package/dist/utils/HistogramUtil/HistogramUtil.d.ts +78 -0
- package/dist/utils/HistogramUtil/index.d.ts +1 -0
- package/dist/utils/HistogramUtil/index.js +145 -0
- package/dist/utils/HistogramUtil/index.js.map +1 -0
- package/dist/utils/MapUtil/MapUtil.d.ts +38 -0
- package/dist/utils/MapUtil/index.d.ts +1 -0
- package/dist/utils/MapUtil/index.js +210 -0
- package/dist/utils/MapUtil/index.js.map +1 -0
- package/dist/utils/StratificationUtil/StratificationUtil.d.ts +25 -0
- package/dist/utils/StratificationUtil/index.d.ts +1 -0
- package/dist/utils/StratificationUtil/index.js +198 -0
- package/dist/utils/StratificationUtil/index.js.map +1 -0
- package/dist/utils/TreeWidgetUtil/TreeWidgetUtil.d.ts +7 -0
- package/dist/utils/TreeWidgetUtil/index.d.ts +1 -0
- package/dist/utils/TreeWidgetUtil/index.js +35 -0
- package/dist/utils/TreeWidgetUtil/index.js.map +1 -0
- package/dist/utils/UploadUtil/UploadUtil.d.ts +106 -0
- package/dist/utils/UploadUtil/index.d.ts +1 -0
- package/dist/utils/UploadUtil/index.js +2 -0
- package/package.json +784 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadUtil.js","names":["_createForOfIteratorHelperLoose","_unsupportedIterableToArray","_arrayLikeToArray","_typeof","ownKeys","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","_createForOfIteratorHelperLoose","_unsupportedIterableToArray","_arrayLikeToArray","isDateFormat","parseCellValue","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arrayLikeToArray","parseCellValue","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arrayLikeToArray","_createForOfIteratorHelperLoose","_unsupportedIterableToArray","_arrayLikeToArray","_createForOfIteratorHelperLoose","_unsupportedIterableToArray","_arrayLikeToArray","_createForOfIteratorHelperLoose","_unsupportedIterableToArray","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","_arrayLikeToArray","parseSheet","convertSheetToData2dArray","_createForOfIteratorHelperLoose","_unsupportedIterableToArray","_arrayLikeToArray","parseSheet","xml","_typeof","_toPropertyKey","_toPrimitive","_typeof","ownKeys","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","xml"],"sources":["../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xml/xmlBrowser.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/zip/unzipFromArrayBuffer.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/export/convertValuesFromUint8ArraysToStrings.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/export/filterZipArchiveEntry.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/export/unpackXlsxFileBrowser.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xml/dom.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xml/xlsx.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseSpreadsheetInfo.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseFilePaths.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseStyles.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseSharedStrings.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseExcelDate.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/isDateFormat.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/isDateFormatStyle.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseCellValue.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseCellCoordinates.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseCell.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseCells.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseSheetDimensions.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/reconstructSheetDimensionsFromSheetCells.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/dropEmptyRows.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/dropEmptyColumns.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/convertCellsToData2dArray.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseSheet.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/xlsx/parseSpreadsheetContents.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/export/readXlsxFileBrowser.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/parseSheetData/InvalidError.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/parseSheetData/types/Number.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/parseSheetData/types/String.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/parseSheetData/types/Boolean.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/parseSheetData/types/Date.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/parseSheetData/parseSheetData.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/export/parseSheet.js","../../../../node_modules/.pnpm/read-excel-file@9.2.0/node_modules/read-excel-file/modules/export/readSheetBrowser.js","../../src/utils/UploadUtil/UploadUtil.ts"],"sourcesContent":["export default {\n createDocument: function createDocument(content) {\n // if (!content) {\n // \tthrow new Error('No *.xml content')\n // }\n // A weird bug: it won't parse XML unless it's trimmed.\n // https://github.com/catamphetamine/read-excel-file/issues/21\n return new DOMParser().parseFromString(content.trim(), 'text/xml');\n }\n};\n//# sourceMappingURL=xmlBrowser.js.map","// `fflate` readme is too complicated:\n// https://github.com/101arrowz/fflate/issues/251\n// I just used whatever approach seemed to work.\n//\n// It was a choice between \"syncrhonous\" (blocking) unzip via `unzipSync()`\n// and \"asynchronous\" (non-blocking) unzip via `unzip()`.\n//\n// In the readme they say that using \"asynchronous\" API will cause the compression or decompression\n// run in a separate thread by using Web (or Node) Workers, so it won't block the main thread.\n// Yet, they also say that there is an initial overhead to using workers of about 50ms for each\n// asynchronous function. For small (under about 50kB) payloads, they say that the \"asynchronous\" API\n// will be much slower compared to the \"synchronous\" one. However, when compressing larger files\n// or multiple files at once, the \"synchronous\" API causes the main thread to hang for too long,\n// and the \"asynchronous\" API is an order of magnitude better.\n//\nimport { unzip } from 'fflate';\n\n/**\r\n * Reads `*.zip` file contents. Ignores anything besides `.xml` or `.xml.rels` files.\r\n * @param {ArrayBuffer} input\r\n * @return {Promise<Record<string,Uint8Array>>} Resolves to an object holding `*.zip` file entries.\r\n */\nexport default function unzipFromArrayBuffer(input, options) {\n return unzipFromArrayBufferUsingFunction(input, options, unzipAsync, true);\n}\n\n/**\r\n * Reads `*.zip` file contents. Ignores anything besides `.xml` or `.xml.rels` files.\r\n * @param {ArrayBuffer} input\r\n * @param {(ArrayBuffer) => Record<string, Uint8Array> | Promise<Record<string, Uint8Array>>} unzip\r\n * @param {boolean} isAsync — Should be `true` when `unzip()` returns a `Promise`, `false` otherwise.\r\n * @return {Promise<Record<string,Uint8Array>>|Record<string,Uint8Array>} Resolves to an object holding `*.zip` file entries.\r\n */\nexport function unzipFromArrayBufferUsingFunction(input) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _filter = _ref.filter;\n var unzip = arguments.length > 2 ? arguments[2] : undefined;\n var isAsync = arguments.length > 3 ? arguments[3] : undefined;\n // Read the `.zip` archive.\n // `result` is either `object` or `Promise<object>`\n return unzip(new Uint8Array(input), {\n // Ignore certain types of files.\n filter: function filter(file) {\n if (_filter) {\n return _filter({\n path: file.name\n });\n }\n return true;\n }\n });\n}\nfunction unzipAsync(archive) {\n return new Promise(function (resolve, reject) {\n // `unzip()` will resort to \"synchronous\" decompression in two edge cases:\n // * When the archive size is less than `512KB`.\n // * When the data is barely compressed, i.e. the compression ratio is less than 20% reduction in size.\n unzip(archive, function (error, files) {\n if (error) {\n reject(error);\n } else {\n resolve(files);\n }\n });\n });\n}\n//# sourceMappingURL=unzipFromArrayBuffer.js.map","import { strFromU8 } from 'fflate';\n\n/**\r\n * @param {Record<string,Uint8Array} entries\r\n * @returns {Record<string,string>}\r\n */\nexport default function convertValuesFromUint8ArraysToStrings(entries) {\n var convertedEntries = {};\n for (var _i = 0, _Object$keys = Object.keys(entries); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n convertedEntries[key] = strFromU8(entries[key]);\n }\n return convertedEntries;\n}\n//# sourceMappingURL=convertValuesFromUint8ArraysToStrings.js.map","// An `.xlsx` `.zip` archive could contain all kinds of files,\n// such as `.bin` printer settings or `.png` images, etc.\n//\n// Because `read-excel-file` doesn't support returning any of those types of data,\n// there's no need to read those files from the `.xlsx` `.zip` archive,\n// optimizing the unpacking process a little bit.\n//\nexport default function filterZipArchiveEntry(_ref) {\n var path = _ref.path;\n return path.endsWith('.xml') || path.endsWith('.xml.rels');\n}\n//# sourceMappingURL=filterZipArchiveEntry.js.map","// Uses an \"async\" function of the unzipper function\n// just because it feels more correct to use it over the \"sync\" one\n// because it isn't supposed to ever freeze the \"main thread\" (GUI).\n//\n// import unzipFromArrayBufferSync from '../zip/unzipFromArrayBufferSync.js'\nimport unzipFromArrayBuffer from '../zip/unzipFromArrayBuffer.js';\nimport convertValuesFromUint8ArraysToStrings from './convertValuesFromUint8ArraysToStrings.js';\nimport filterZipArchiveEntry from './filterZipArchiveEntry.js';\n\n/**\r\n * Unpacks `*.xlsx` file contents.\r\n * An `.xlsx` file is really just a `.zip` archive with `.xml` files inside.\r\n * @param {(File|Blob|ArrayBuffer)} input\r\n * @return {Promise<Record<string,string>} Resolves to an object holding `*.xlsx` file entries.\r\n */\nexport default function unpackXlsxFile(input) {\n if (input instanceof File || input instanceof Blob) {\n return input.arrayBuffer().then(getResultFromArrayBuffer);\n }\n return Promise.resolve(input).then(getResultFromArrayBuffer);\n}\nfunction getResultFromArrayBuffer(arrayBuffer) {\n return unzipFromArrayBuffer(arrayBuffer, {\n filter: filterZipArchiveEntry\n }).then(convertValuesFromUint8ArraysToStrings);\n}\n\n// function getResultFromArrayBufferSync(arrayBuffer) {\n// const result = unzipFromArrayBufferSync(arrayBuffer, { filter: filterZipArchiveEntry })\n// \treturn convertValuesFromUint8ArraysToStrings(result)\n// }\n//# sourceMappingURL=unpackXlsxFileBrowser.js.map","export function findChild(node, tagName) {\n var i = 0;\n while (i < node.childNodes.length) {\n var childNode = node.childNodes[i];\n // `nodeType: 1` means \"Element\".\n // https://www.w3schools.com/xml/prop_element_nodetype.asp\n if (childNode.nodeType === 1 && getTagName(childNode) === tagName) {\n return childNode;\n }\n i++;\n }\n}\nexport function findChildren(node, tagName) {\n var results = [];\n var i = 0;\n while (i < node.childNodes.length) {\n var childNode = node.childNodes[i];\n // `nodeType: 1` means \"Element\".\n // https://www.w3schools.com/xml/prop_element_nodetype.asp\n if (childNode.nodeType === 1 && getTagName(childNode) === tagName) {\n results.push(childNode);\n }\n i++;\n }\n return results;\n}\nexport function forEach(node, tagName, func) {\n // if (typeof tagName === 'function') {\n // \tfunc = tagName\n // \ttagName = undefined\n // }\n var i = 0;\n while (i < node.childNodes.length) {\n var childNode = node.childNodes[i];\n if (tagName) {\n // `nodeType: 1` means \"Element\".\n // https://www.w3schools.com/xml/prop_element_nodetype.asp\n if (childNode.nodeType === 1 && getTagName(childNode) === tagName) {\n func(childNode, i);\n }\n } else {\n func(childNode, i);\n }\n i++;\n }\n}\nexport function map(node, tagName, func) {\n var results = [];\n forEach(node, tagName, function (node, i) {\n results.push(func(node, i));\n });\n return results;\n}\nvar NAMESPACE_REG_EXP = /.+\\:/;\nexport function getTagName(element) {\n // For some weird reason, if an element is declared as,\n // for example, `<x:sheets/>`, then its `.tagName` will be\n // \"x:sheets\" instead of just \"sheets\".\n // https://gitlab.com/catamphetamine/read-excel-file/-/issues/25\n // Its not clear how to tell it to ignore any namespaces\n // when getting `.tagName`, so just replacing anything\n // before a colon, if any.\n return element.tagName.replace(NAMESPACE_REG_EXP, '');\n}\nexport function isElement(node) {\n // `nodeType: 1` means \"Element\".\n // https://www.w3schools.com/xml/prop_element_nodetype.asp\n return node.nodeType === 1;\n}\nexport function getFirstElementChild(element) {\n var i = 0;\n while (i < element.childNodes.length) {\n if (isElement(element.childNodes[i])) {\n return element.childNodes[i];\n }\n i++;\n }\n}\n\n// This function is only used for occasional debug messages.\nexport function getOuterXml(node) {\n // `nodeType: 1` means \"Element\".\n // https://www.w3schools.com/xml/prop_element_nodetype.asp\n if (node.nodeType !== 1) {\n return node.textContent;\n }\n var xml = '<' + getTagName(node);\n var j = 0;\n while (j < node.attributes.length) {\n xml += ' ' + node.attributes[j].name + '=' + '\"' + node.attributes[j].value + '\"';\n j++;\n }\n xml += '>';\n var i = 0;\n while (i < node.childNodes.length) {\n xml += getOuterXml(node.childNodes[i]);\n i++;\n }\n xml += '</' + getTagName(node) + '>';\n return xml;\n}\n//# sourceMappingURL=dom.js.map","import { findChild, findChildren, forEach, map, getFirstElementChild, getTagName } from './dom.js';\n\n// Returns an array of cells,\n// each element being an XML DOM element representing a cell.\nexport function getCellElements(document) {\n var worksheet = document.documentElement;\n var sheetData = findChild(worksheet, 'sheetData');\n var cells = [];\n forEach(sheetData, 'row', function (row) {\n forEach(row, 'c', function (cell) {\n cells.push(cell);\n });\n });\n return cells;\n}\nexport function getMergedCellCoordinates(document) {\n var worksheet = document.documentElement;\n var mergedCells = findChild(worksheet, 'mergeCells');\n var mergedCellsInfo = [];\n if (mergedCells) {\n forEach(mergedCells, 'mergeCell', function (mergedCell) {\n mergedCellsInfo.push(mergedCell.getAttribute('ref'));\n });\n }\n return mergedCellsInfo;\n}\nexport function getCellValueElement(document, element) {\n return findChild(element, 'v');\n}\nexport function getCellInlineStringValue(document, element) {\n // It seems as if in some weirdly-output \"*.xlsx\" files\n // there're non-element nodes of some weird nature.\n // https://gitlab.com/catamphetamine/read-excel-file/-/issues/109\n // This code filters out such weird non-element nodes.\n var firstElementChild = getFirstElementChild(element);\n if (firstElementChild && getTagName(firstElementChild) === 'is') {\n var firstElementChildFirstElementChild = getFirstElementChild(firstElementChild);\n if (firstElementChildFirstElementChild && getTagName(firstElementChildFirstElementChild) === 't') {\n return firstElementChildFirstElementChild.textContent;\n }\n }\n}\nexport function getDimensions(document) {\n var worksheet = document.documentElement;\n var dimensions = findChild(worksheet, 'dimension');\n if (dimensions) {\n return dimensions.getAttribute('ref');\n }\n}\nexport function getBaseStyles(document) {\n var styleSheet = document.documentElement;\n var cellStyleXfs = findChild(styleSheet, 'cellStyleXfs');\n if (cellStyleXfs) {\n return findChildren(cellStyleXfs, 'xf');\n }\n return [];\n}\nexport function getCellStyles(document) {\n var styleSheet = document.documentElement;\n var cellXfs = findChild(styleSheet, 'cellXfs');\n if (!cellXfs) {\n return [];\n }\n return findChildren(cellXfs, 'xf');\n}\nexport function getNumberFormats(document) {\n var styleSheet = document.documentElement;\n var numberFormats = [];\n var numFmts = findChild(styleSheet, 'numFmts');\n if (numFmts) {\n return findChildren(numFmts, 'numFmt');\n }\n return [];\n}\nexport function getSharedStrings(document) {\n // An `<si/>` element can contain a `<t/>` (simplest case) or a set of `<r/>` (\"rich formatting\") elements having `<t/>`.\n // https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.sharedstringitem?redirectedfrom=MSDN&view=openxml-2.8.1\n // http://www.datypic.com/sc/ooxml/e-ssml_si-1.html\n\n var sst = document.documentElement;\n return map(sst, 'si', function (string) {\n var t = findChild(string, 't');\n if (t) {\n return t.textContent;\n }\n var value = '';\n forEach(string, 'r', function (r) {\n value += findChild(r, 't').textContent;\n });\n return value;\n });\n}\nexport function getWorkbookProperties(document) {\n var workbook = document.documentElement;\n return findChild(workbook, 'workbookPr');\n}\nexport function getRelationships(document) {\n var relationships = document.documentElement;\n return findChildren(relationships, 'Relationship');\n}\nexport function getSheets(document) {\n var workbook = document.documentElement;\n var sheets = findChild(workbook, 'sheets');\n return findChildren(sheets, 'sheet');\n}\n//# sourceMappingURL=xlsx.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { getWorkbookProperties, getSheets } from '../xml/xlsx.js';\n\n// I guess `xl/workbook.xml` file should always be present inside the *.xlsx archive.\nexport default function parseSpreadsheetInfo(content, xml) {\n var book = xml.createDocument(content);\n\n // Read `<workbookPr/>` element to detect whether dates are 1900-based or 1904-based.\n // https://support.microsoft.com/en-gb/help/214330/differences-between-the-1900-and-the-1904-date-system-in-excel\n // http://webapp.docx4java.org/OnlineDemo/ecma376/SpreadsheetML/workbookPr.html\n var workbookProperties = getWorkbookProperties(book);\n var epoch1904 = Boolean(workbookProperties) && workbookProperties.getAttribute('date1904') === '1';\n\n // Example of `<sheets/>` element:\n //\n // <sheets>\n // <sheet\n // xmlns:ns=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\n // name=\"Sheet1\"\n // sheetId=\"1\"\n // ns:id=\"rId3\"/>\n // </sheets>\n\n var sheets = [];\n for (var _iterator = _createForOfIteratorHelperLoose(getSheets(book)), _step; !(_step = _iterator()).done;) {\n var sheet = _step.value;\n if (sheet.getAttribute('name')) {\n sheets.push({\n id: sheet.getAttribute('sheetId'),\n name: sheet.getAttribute('name'),\n relationId: sheet.getAttribute('r:id')\n });\n }\n }\n return {\n epoch1904: epoch1904,\n sheets: sheets\n };\n}\n//# sourceMappingURL=parseSpreadsheetInfo.js.map","import { getRelationships } from '../xml/xlsx.js';\n\n/**\r\n * Returns sheet file paths.\r\n * Seems that the correct place to look for the `sheetId` -> `filename` mapping\r\n * is `xl/_rels/workbook.xml.rels` file.\r\n * https://github.com/tidyverse/readxl/issues/104\r\n * @param {string} content — `xl/_rels/workbook.xml.rels` file contents.\r\n * @param {object} xml\r\n * @return {object}\r\n */\nexport default function parseFilePaths(content, xml) {\n // Example:\n // <Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n // ...\n // <Relationship\n // Id=\"rId3\"\n // Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\"\n // Target=\"worksheets/sheet1.xml\"/>\n // </Relationships>\n var document = xml.createDocument(content);\n var filePaths = {\n sheets: {},\n sharedStrings: undefined,\n styles: undefined\n };\n var addFilePathInfo = function addFilePathInfo(relationship) {\n var filePath = relationship.getAttribute('Target');\n var fileType = relationship.getAttribute('Type');\n switch (fileType) {\n case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles':\n filePaths.styles = getFilePath(filePath);\n break;\n case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings':\n filePaths.sharedStrings = getFilePath(filePath);\n break;\n case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet':\n filePaths.sheets[relationship.getAttribute('Id')] = getFilePath(filePath);\n break;\n }\n };\n getRelationships(document).forEach(addFilePathInfo);\n\n // Seems like \"sharedStrings.xml\" is not required to exist.\n // For example, when the spreadsheet doesn't contain any strings.\n // https://github.com/catamphetamine/read-excel-file/issues/85\n // if (!filePaths.sharedStrings) {\n // throw new Error('\"sharedStrings.xml\" file not found in the *.xlsx file')\n // }\n\n return filePaths;\n}\nfunction getFilePath(path) {\n // Normally, `path` is a relative path inside the ZIP archive,\n // like \"worksheets/sheet1.xml\", or \"sharedStrings.xml\", or \"styles.xml\".\n // There has been one weird case when file path was an absolute path,\n // like \"/xl/worksheets/sheet1.xml\" (specifically for sheets):\n // https://github.com/catamphetamine/read-excel-file/pull/95\n // Other libraries (like `xlsx`) and software (like Google Docs)\n // seem to support such absolute file paths, so this library does too.\n if (path[0] === '/') {\n return path.slice('/'.length);\n }\n // // Seems like a path could also be a URL.\n // // http://officeopenxml.com/anatomyofOOXML-xlsx.php\n // if (/^[a-z]+\\:\\/\\//.test(path)) {\n // return path\n // }\n return 'xl/' + path;\n}\n//# sourceMappingURL=parseFilePaths.js.map","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getBaseStyles, getCellStyles, getNumberFormats } from '../xml/xlsx.js';\n\n// http://officeopenxml.com/SSstyles.php\n// Returns an array of cell styles.\n// A cell style index is its ID.\nexport default function parseStyles(content, xml) {\n if (!content) {\n return {};\n }\n\n // https://social.msdn.microsoft.com/Forums/sqlserver/en-US/708978af-b598-45c4-a598-d3518a5a09f0/howwhen-is-cellstylexfs-vs-cellxfs-applied-to-a-cell?forum=os_binaryfile\n // https://www.office-forums.com/threads/cellxfs-cellstylexfs.2163519/\n var doc = xml.createDocument(content);\n var baseStyles = getBaseStyles(doc).map(parseCellStyle);\n var numberFormats = getNumberFormats(doc).map(parseNumberFormatStyle).reduce(function (formats, format) {\n // Format ID is a numeric index.\n // There're some standard \"built-in\" formats (in Excel) up to about `100`.\n formats[format.id] = format;\n return formats;\n }, []);\n var getCellStyle = function getCellStyle(xf) {\n if (xf.hasAttribute('xfId')) {\n return _objectSpread(_objectSpread({}, baseStyles[xf.xfId]), parseCellStyle(xf, numberFormats));\n }\n return parseCellStyle(xf, numberFormats);\n };\n return getCellStyles(doc).map(getCellStyle);\n}\nfunction parseNumberFormatStyle(numFmt) {\n return {\n id: numFmt.getAttribute('numFmtId'),\n template: numFmt.getAttribute('formatCode')\n };\n}\n\n// http://www.datypic.com/sc/ooxml/e-ssml_xf-2.html\nfunction parseCellStyle(xf, numFmts) {\n var style = {};\n if (xf.hasAttribute('numFmtId')) {\n var numberFormatId = xf.getAttribute('numFmtId');\n // Built-in number formats don't have a `<numFmt/>` element in `styles.xml`.\n // https://hexdocs.pm/xlsxir/number_styles.html\n if (numFmts[numberFormatId]) {\n style.numberFormat = numFmts[numberFormatId];\n } else {\n style.numberFormat = {\n id: numberFormatId\n };\n }\n }\n return style;\n}\n//# sourceMappingURL=parseStyles.js.map","import { getSharedStrings } from '../xml/xlsx.js';\nexport default function parseSharedStrings(content, xml) {\n if (!content) {\n return [];\n }\n return getSharedStrings(xml.createDocument(content));\n}\n//# sourceMappingURL=parseSharedStrings.js.map","// Parses an Excel Date (represented by a \"serial\" floating-point number)\n// into a javascript `Date` in UTC+0 timezone (with time is set to 00:00).\n//\n// https://www.pcworld.com/article/3063622/software/mastering-excel-date-time-serial-numbers-networkdays-datevalue-and-more.html\n// \"If you need to calculate dates in your spreadsheets,\n// Excel uses its own unique system, which it calls Serial Numbers\".\n//\nexport default function parseExcelDate(excelSerialDate, options) {\n // Windows operating system uses floating-point numbers to represent dates,\n // where the number represents the count of days elapsed since January 0th, 1900.\n //\n // This also means that there're 2 aspects associated with this choice:\n //\n // * January 1st, 1900, 00:00 is represented by `1` rather than `0`, which looks a bit weird.\n // * 1900 is a special year because it's a \"one in a 100 years\" occasion when it's not a leap year.\n //\n // To work around those two aspects, Mac OS chose another baseline — January 1st, 1900.\n // Although, that only postponed the second issue because 2100 is going to be the next \"speciaL\" year\n // which is not going to be a \"leap\" one.\n //\n // Older versions of Excel on Mac OS used year 1904 as the default baseline for numeric dates.\n // Since 2011, Microsoft Excel on Mac OS uses year 1900 as the default baseline for cross-platform consistency.\n // https://support.microsoft.com/en-us/office/date-systems-in-excel-e7fe7167-48a9-4b96-bb53-5612a800b487\n //\n // So the 1904 baseline is now deprecated, although still available to be configured manually.\n // So it still might be encountered in Excel files created on MacOS.\n // In that case, the Excel file contains a special flag — `<workbook><workbookPr date1904=\"1\"/>...` —\n // that tells the application which baseline is being used for numeric date timestamps.\n //\n if (options && options.epoch1904) {\n // Convert the numeric date timestamp from 1904 baseline to 1900 baseline.\n excelSerialDate += (1904 - 1900) * DAYS_IN_YEAR + JANUARY_0TH_1900_DAY + ERRONEOUS_FEBRUARY_29_1990_DAY;\n }\n var daysBeforeUnixEpoch = JANUARY_0TH_1900_DAY + ERRONEOUS_FEBRUARY_29_1990_DAY + (1970 - 1900) * DAYS_IN_YEAR + NUMBER_OF_LEAP_YEARS_BETWEEN_1900_AND_1970;\n return new Date(Math.floor((excelSerialDate - daysBeforeUnixEpoch) * DAY));\n}\n\n// \"Excel serial date\" is just a (fractional) count of days passed since `00/01/1900`.\n//\n// In contrast, \"Unix timestamps\" use `01/01/1970` as the baseline for numeric dates.\n//\n// In order to convert one into another, it should calculate the count of days elapsed\n// since `00/01/1900` (Excel epoch) till `01/01/1970` (Unix epoch), or the count of days\n// between year `1900` and year `1970`, plus one day.\n//\n// It also should account for the number of \"leap years\" between year `1900` and year `1970`,\n// which is 17 of them. https://kalender-365.de/leap-years.php\n//\n// \"One year has the length of 365 days, 5 hours, 48 minutes and 45 seconds.\n// These are 365.2421875 days. This is hard to calculate with, so for practical reasons\n// a normal year has been given 365 days and a leap year 366 days. In leap years,\n// February 29th is added as leap day, which doesn't exist in a normal year.\n// A leap year is every 4 years, but not every 100 years, then again every 400 years.\n// So the year 1900 wasn't a leap year, but 2000 was\".\n//\n// And also, Excel has a historical bug when it incorrectly assumes year `1900` to be a leap year,\n// and, as a result, all Excel serial dates starting from March 1st, 1900 lag 1 day behind\n// and require an additional 1 day to be added to them in order to be converted to a proper timestamp.\n//\n// https://learn.microsoft.com/en-us/answers/questions/5249322/why-does-microsoft-excel-considers-29-02-1900-to-b?forum=msoffice-all&referrer=answers#:~:text=This%20made%20it%20easier%20for,other%20programs%20that%20use%20dates.\n//\n// \"When Lotus 1-2-3 was first released, the program assumed that the year 1900 was a leap year,\n// even though it actually was not a leap year. This made it easier for the program to handle\n// leap years and caused no harm to almost all date calculations in Lotus 1-2-3.\n//\n// When Microsoft Multiplan and Microsoft Excel were released, they also assumed that 1900\n// was a leap year. This assumption allowed Microsoft Multiplan and Microsoft Excel to use\n// the same serial date system used by Lotus 1-2-3 and provide greater compatibility with Lotus 1-2-3.\n// Treating 1900 as a leap year also made it easier for users to move worksheets from one program\n// to the other\".\n//\n// So the historical bug is basically that Excel thinks that February 29th, 1900 existed\n// while in reality it didn't. That's why it's actually 1 day off for any date after that one.\n//\nvar NUMBER_OF_LEAP_YEARS_BETWEEN_1900_AND_1970 = 17;\nvar JANUARY_0TH_1900_DAY = 1;\nvar ERRONEOUS_FEBRUARY_29_1990_DAY = 1;\n\n// An approximate count of seconds in a day is:\n// 24 hours * 60 minutes in an hour * 60 seconds in a minute\n//\n// It is approximate because a minute could be longer than 60 seconds, due to \"leap seconds\".\n//\n// Still, javascript `Date`, and UNIX time in general, intentionally\n// drop the concept of \"leap seconds\" in order to make things simpler.\n// So this approximation is valid and doesn't result in any bugs.\n// https://stackoverflow.com/questions/53019726/where-are-the-leap-seconds-in-javascript\n//\n// \"The JavaScript Date object specifically adheres to the concept of Unix Time\n// (albeit with higher precision). This is part of the POSIX specification,\n// and thus is sometimes called \"POSIX Time\". It does not count leap seconds,\n// but rather assumes every day had exactly 86,400 seconds. You can read about\n// this in section 20.3.1.1 of the current ECMAScript specification, which states:\n//\n// \"Time is measured in ECMAScript in milliseconds since 01 January, 1970 UTC.\n// In time values leap seconds are ignored. It is assumed that there are exactly\n// 86,400,000 milliseconds per day.\"\n//\n// The reason is that the unpredictable nature of leap seconds makes them very\n// difficult to work with in APIs. One can't generally pass timestamps around\n// that need leap seconds tables to be interpreted correctly, and expect that\n// one system will interpret them the same as another. For example, a timestamp\n// `1483228826` that accounts for \"leap seconds\" should've been interpreted as\n// \"2017-01-01T00:00:00Z\", but if the receiver doesn't account for \"leap seconds\",\n// they would interpret it as \"2017-01-01T00:00:26Z\" (e.g. POSIX-based systems like Linux),\n// So \"leap seconds\" aren't really portable.\n// Even on systems that have full frequently-updated \"leap second\" tables,\n// there's no telling what adjustments those tables will contain in the future\n// (i.e. beyond the 6-month IERS announcement period) because \"leap seconds\" can't be\n// determined by a fixed mathematical formula or something like that. Instead,\n// scientists introduce them as needed based on the observed Earth's rotation around the sun.\n//\n// \"Because the Earth's rotational speed varies in response to climatic and geological events,\n// UTC leap seconds are irregularly spaced and not precisely predictable. The decision to insert\n// a leap second is made by the International Earth Rotation and Reference Systems Service (IERS),\n// typically about six months in advance, to ensure that the difference between UTC and UT1\n// does not exceed ±0.9 seconds.\"\n//\n// One example is year `1900` which is \"every fourth year\" but it still is not a \"leap year\".\n//\n// To reiterate: to support leap seconds in a programming language, the implementation\n// must go out of its way to do so, and must make tradeoffs that are not always acceptable.\n// Though there are exceptions, the general position is to not support them - not because\n// of any subversion or active countermeasures, but because supporting them properly is much,\n// much harder.\n//\n// https://en.wikipedia.org/wiki/Unix_time#Leap_seconds\n// https://en.wikipedia.org/wiki/Leap_year\n// https://en.wikipedia.org/wiki/Leap_second\n//\nvar DAY = 24 * 60 * 60 * 1000;\nvar DAYS_IN_YEAR = 365;\n//# sourceMappingURL=parseExcelDate.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n// On some date formats, there's a \"[$-...]\" prefix that locks the locale\n// to be a specific one when formatting a date using this format.\n//\n// https://stackoverflow.com/questions/4730152/what-indicates-an-office-open-xml-cell-contains-a-date-time-value\n//\n// Format examples:\n//\n// * \"[$-404]e/m/d\"\n// * \"[$-414]mmmm\\ yyyy;@\"\n// * \"[$-ru-RU]dd.mm.yyyy;@\"\n// * \"[$-x-sysdate]dddd, mmmm dd, yyyy\"\n//\nvar DATE_FORMAT_SPECIFIC_LOCALE_PREFIX = /^\\[\\$-[^\\]]+\\]/;\n\n// On some date formats, there's a \";@\" suffix.\n// It instructs the spreadsheet editor application to display any non-numeric\n// value as is instead of hiding it or something like that.\n//\n// For example, if one inputs \"Some text\" instead of a date in such cell,\n// it will still show \"Some text\" instead of an empty cell, even though\n// the value is strictly-speaking invalid.\n//\n// Specifically, \";\" means \"anything before this applies only to a numeric value,\n// while anything after it applies to a text value\". And a follow-up \"@\" means\n// \"for a text value, just output it as is\".\n//\n// It's not really clear why would anyone add such a feature to a format.\n// Perhaps it feels more \"user-friendly\" towards a non-\"tech-savvy\" user\n// of a spreadsheet editor application.\n//\n// Format examples:\n//\n// * \"m/d/yyyy;@\"\n// * \"[$-414]mmmm\\ yyyy;@\"\n//\nvar DATE_FORMAT_ALLOW_ANY_OTHER_TEXT_SUFFIX = /;@$/;\nvar CACHE = {};\nexport default function isDateFormatCached(template) {\n if (template in CACHE) {\n return CACHE[template];\n }\n var result = isDateFormat(template);\n CACHE[template] = result;\n return result;\n}\nfunction isDateFormat(template) {\n // Date format tokens could be in upper case or in lower case.\n // There seems to be no single standard.\n // So the template is lowercased first.\n template = template.toLowerCase();\n\n // On some date formats, there's an \"[$-...]\" prefix.\n // It forces a specific locale to be used when formatting a date.\n template = template.replace(DATE_FORMAT_SPECIFIC_LOCALE_PREFIX, '');\n\n // On some date formats, there's an \";@\" suffix.\n // It's not clear why would anyone need it in a date format template.\n // Still, because it occurs there, it should be stripped.\n template = template.replace(DATE_FORMAT_ALLOW_ANY_OTHER_TEXT_SUFFIX, '');\n\n // Extract all alphabetic parts from what's left from the template string.\n // Example: \"mm/dd/yyyy\" → [\"mm\", \"dd\", \"yyyy\"]\n var tokens = template.split(/\\W+/);\n\n // If no alphabetic parts are present in what's left from the template string\n // then it could be any kind of template such as a generic numeric template\n // such as \"$#,##0.00\" currency template or \"0.0%\" percentage template.\n if (tokens.length < 0) {\n return false;\n }\n for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {\n var token = _step.value;\n // If a non-date-format-specific alphabetic substring is found,\n // this might not necessarily be a date format.\n if (DATE_TEMPLATE_TOKENS.indexOf(token) < 0) {\n return false;\n }\n }\n return true;\n}\n\n// These tokens could be in upper case or in lower case.\n// There seems to be no single standard, so using lower case.\nvar DATE_TEMPLATE_TOKENS = [\n// Seconds (min two digits). Example: \"05\".\n'ss',\n// Minutes (min two digits). Example: \"05\". Could also be \"Months\". Weird.\n'mm',\n// Hours. Example: \"1\".\n'h',\n// Hours (min two digits). Example: \"01\".\n'hh',\n// \"AM\" part of \"AM/PM\". Lowercased just in case.\n'am',\n// \"PM\" part of \"AM/PM\". Lowercased just in case.\n'pm',\n// Day. Example: \"1\"\n'd',\n// Day (min two digits). Example: \"01\"\n'dd',\n// Month (numeric). Example: \"1\".\n'm',\n// Month (numeric, min two digits). Example: \"01\". Could also be \"Minutes\". Weird.\n'mm',\n// Month (shortened month name). Example: \"Jan\".\n'mmm',\n// Month (full month name). Example: \"January\".\n'mmmm',\n// Two-digit year. Example: \"20\".\n'yy',\n// Full year. Example: \"2020\".\n'yyyy',\n// I don't have any idea what \"e\" means.\n// It's used in \"built-in\" XLSX formats:\n// * 27 '[$-404]e/m/d';\n// * 36 '[$-404]e/m/d';\n// * 50 '[$-404]e/m/d';\n// * 57 '[$-404]e/m/d';\n'e'];\n//# sourceMappingURL=isDateFormat.js.map","// XLSX does have \"d\" type for dates, but it's not commonly used.\n// Instead, it prefers using \"n\" type for storing dates as timestamps.\n//\n// Whether a numeric value is a number or a date timestamp, it sometimes could be\n// detected by looking at the value \"format\" and seeing if it's a date-specific one.\n\nimport isDateFormat from './isDateFormat.js';\nexport default function isDateFormatStyle(styleId, styles, options) {\n if (styleId) {\n var style = styles[styleId];\n if (!style) {\n throw new Error(\"Cell style not found: \".concat(styleId));\n }\n if (!style.numberFormat) {\n return false;\n }\n if (\n // Whether it's a \"number format\" that's conventionally used for storing date timestamps.\n BUILT_IN_DATE_FORMAT_IDS.indexOf(Number(style.numberFormat.id)) >= 0 ||\n // Whether it's a \"number format\" that uses a \"formatting template\"\n // that the developer is certain is a date formatting template.\n options.dateFormat && style.numberFormat.template === options.dateFormat ||\n // Whether the \"smart formatting template\" feature is not disabled\n // and it has detected that it's a date formatting template by looking at it.\n options.smartDateParser !== false && style.numberFormat.template && isDateFormat(style.numberFormat.template)) {\n return true;\n }\n }\n}\n\n// Built-in formats have ID < 164.\n// Some of those formats are intended to use when displaying dates.\n//\n// Depending on the \"locale\" used by the spreadsheet viewing application,\n// different built-in format IDs might correspond to different templates.\n// https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.numberingformat?view=openxml-2.8.1\n//\n// Here's a list of \"locale\"-independent built-in format IDs that're known to represent dates.\n//\nvar LOCALE_INDEPENDENT_BUILT_IN_DATE_FORMAT_IDS = [14,\n// mm-dd-yy\n15,\n// d-mmm-yy\n16,\n// d-mmm\n17,\n// mmm-yy\n18,\n// h:mm AM/PM\n19,\n// h:mm:ss AM/PM\n20,\n// h:mm\n21,\n// h:mm:ss\n22,\n// m/d/yy h:mm\n45,\n// mm:ss\n46,\n// [h]:mm:ss\n47 // mmss.0\n];\n\n// \"zh-tw\" OR \"zh-cn\" locales.\n// Language glyphs (aka \"hieroglyphs\") are not replaced with their respective unicode values here.\nvar MAINLAND_CHINESE_OR_TAIWANESE_LOCALE_BUILT_IN_DATE_FORMAT_IDS = [27,\n// [$-404]e/m/d OR yyyy\"年\"m\"月\"\n28,\n// [$-404]e\"年\"m\"月\"d\"日\" OR m\"月\"d\"日\"\n29,\n// [$-404]e\"年\"m\"月\"d\"日\" OR m\"月\"d\"日\"\n30,\n// m/d/yy OR m-d-yy\n31,\n// yyyy\"年\"m\"月\"d\"日\" OR yyyy\"年\"m\"月\"d\"日\"\n32,\n// hh\"時\"mm\"分\" OR h\"时\"mm\"分\"\n33,\n// hh\"時\"mm\"分\"ss\"秒\" OR h\"时\"mm\"分\"ss\"秒\"\n34,\n// 上午/下午hh\"時\"mm\"分\" OR 上午/下午h\"时\"mm\"分\"\n35,\n// 上午/下午hh\"時\"mm\"分\"ss\"秒\" OR 上午/下午h\"时\"mm\"分\"ss\"秒\"\n36,\n// [$-404]e/m/d OR yyyy\"年\"m\"月\"\n50,\n// [$-404]e/m/d OR yyyy\"年\"m\"月\"\n51,\n// [$-404]e\"年\"m\"月\"d\"日\" OR m\"月\"d\"日\"\n52,\n// 上午/下午hh\"時\"mm\"分\" OR yyyy\"年\"m\"月\"\n53,\n// 上午/下午hh\"時\"mm\"分\"ss\"秒\" OR m\"月\"d\"日\"\n54,\n// [$-404]e\"年\"m\"月\"d\"日\" OR m\"月\"d\"日\"\n55,\n// 上午/下午hh\"時\"mm\"分\" OR 上午/下午h\"时\"mm\"分\"\n56,\n// 上午/下午hh\"時\"mm\"分\"ss\"秒\" OR 上午/下午h\"时\"mm\"分\"ss\"秒\"\n57,\n// [$-404]e/m/d OR yyyy\"年\"m\"月\"\n58 // [$-404]e\"年\"m\"月\"d\"日\" OR m\"月\"d\"日\"\n];\n\n// \"ja-jp\" OR \"ko-kr\" locales.\n// Language glyphs (aka \"hieroglyphs\") are not replaced with their respective unicode values here.\nvar JAPANESE_OR_KOREAN_LOCALE_BUILT_IN_DATE_FORMAT_IDS = [27,\n// [$-411]ge.m.d OR yyyy\"年\" mm\"月\" dd\"日\"\n28,\n// [$-411]ggge\"年\"m\"月\"d\"日\" OR mm-dd\n29,\n// [$-411]ggge\"年\"m\"月\"d\"日\" OR mm-dd\n30,\n// m/d/yy OR mm-dd-yy\n31,\n// yyyy\"年\"m\"月\"d\"日\" OR yyyy\"년\" mm\"월\" dd\"일\"\n32,\n// h\"時\"mm\"分\" OR h\"시\" mm\"분\"\n33,\n// h\"時\"mm\"分\"ss\"秒\" OR h\"시\" mm\"분\" ss\"초\"\n34,\n// yyyy\"年\"m\"月\" OR yyyy-mm-dd\n35,\n// m\"月\"d\"日\" OR yyyy-mm-dd\n36,\n// [$-411]ge.m.d OR yyyy\"年\" mm\"月\" dd\"日\"\n50,\n// [$-411]ge.m.d OR yyyy\"年\" mm\"月\" dd\"日\"\n51,\n// [$-411]ggge\"年\"m\"月\"d\"日\" OR mm-dd\n52,\n// yyyy\"年\"m\"月\" OR yyyy-mm-dd\n53,\n// m\"月\"d\"日\" OR yyyy-mm-dd\n54,\n// [$-411]ggge\"年\"m\"月\"d\"日\" OR mm-dd\n55,\n// yyyy\"年\"m\"月\" OR yyyy-mm-dd\n56,\n// m\"月\"d\"日\" OR yyyy-mm-dd\n57,\n// [$-411]ge.m.d OR yyyy\"年\" mm\"月\" dd\"日\"\n58 // [$-411]ggge\"年\"m\"月\"d\"日\" OR mm-dd\n];\n\n// \"th-th\" locale.\n// Language glyphs (aka \"hieroglyphs\") are not replaced with their respective unicode values here.\nvar THAI_LOCALE_BUILT_IN_DATE_FORMAT_IDS = [71,\n// ว/ด/ปปปป\n72,\n// ว-ดดด-ปป\n73,\n// ว-ดดด\n74,\n// ดดด-ปป\n75,\n// ช:นน\n76,\n// ช:นน:ทท\n77,\n// ว/ด/ปปปป ช:นน\n78,\n// นน:ทท\n79,\n// [ช]:นน:ทท\n80,\n// นน:ทท.0\n81 // d/m/bb\n];\n\n// Start with language-agnostic date format IDs.\nvar BUILT_IN_DATE_FORMAT_IDS = LOCALE_INDEPENDENT_BUILT_IN_DATE_FORMAT_IDS.concat(\n// Add Mainland Chinese or Taiwanese date format IDs that haven't already been added.\nMAINLAND_CHINESE_OR_TAIWANESE_LOCALE_BUILT_IN_DATE_FORMAT_IDS).concat(\n// Add Japanese or Korean date format IDs that haven't already been added.\nJAPANESE_OR_KOREAN_LOCALE_BUILT_IN_DATE_FORMAT_IDS.filter(function (numberFormatId) {\n return MAINLAND_CHINESE_OR_TAIWANESE_LOCALE_BUILT_IN_DATE_FORMAT_IDS.indexOf(numberFormatId) < 0;\n})).concat(\n// Add Thai date format IDs that haven't already been added.\nTHAI_LOCALE_BUILT_IN_DATE_FORMAT_IDS.filter(function (numberFormatId) {\n return MAINLAND_CHINESE_OR_TAIWANESE_LOCALE_BUILT_IN_DATE_FORMAT_IDS.indexOf(numberFormatId) < 0;\n}).filter(function (numberFormatId) {\n return JAPANESE_OR_KOREAN_LOCALE_BUILT_IN_DATE_FORMAT_IDS.indexOf(numberFormatId) < 0;\n}));\n//# sourceMappingURL=isDateFormatStyle.js.map","import parseExcelDate from './parseExcelDate.js';\nimport isDateFormatStyle from './isDateFormatStyle.js';\n\n// Parses a string `value` of a cell.\nexport default function parseCellValue(value, type, _ref) {\n var getInlineStringValue = _ref.getInlineStringValue,\n getInlineStringXml = _ref.getInlineStringXml,\n getStyleId = _ref.getStyleId,\n styles = _ref.styles,\n sharedStrings = _ref.sharedStrings,\n epoch1904 = _ref.epoch1904,\n options = _ref.options;\n if (!type) {\n // Default cell type is \"n\" (numeric).\n // http://www.datypic.com/sc/ooxml/t-ssml_CT_Cell.html\n type = 'n';\n }\n\n // Available Excel cell types:\n // https://github.com/SheetJS/sheetjs/blob/19620da30be2a7d7b9801938a0b9b1fd3c4c4b00/docbits/52_datatype.md\n //\n // Some other document (seems to be old):\n // http://webapp.docx4java.org/OnlineDemo/ecma376/SpreadsheetML/ST_CellType.html\n //\n switch (type) {\n // XLSX tends to store all strings as \"shared\" (indexed) ones\n // using \"s\" cell type (for saving on strage space).\n // \"str\" cell type is then generally only used for storing\n // formula-pre-calculated cell values.\n case 'str':\n value = parseString(value, options);\n break;\n\n // Sometimes, XLSX stores strings as \"inline\" strings rather than \"shared\" (indexed) ones.\n // Perhaps the specification doesn't force it to use one or another.\n // Example: `<sheetData><row r=\"1\"><c r=\"A1\" s=\"1\" t=\"inlineStr\"><is><t>Test 123</t></is></c></row></sheetData>`.\n case 'inlineStr':\n value = getInlineStringValue();\n if (value === undefined) {\n throw new Error(\"Unsupported \\\"inline string\\\" cell value structure: \".concat(getInlineStringXml()));\n }\n value = parseString(value, options);\n break;\n\n // XLSX tends to store string values as \"shared\" (indexed) ones.\n // \"Shared\" strings is a way for an Excel editor to reduce\n // the file size by storing \"commonly used\" strings in a dictionary\n // and then referring to such strings by their index in that dictionary.\n // Example: `<sheetData><row r=\"1\"><c r=\"A1\" s=\"1\" t=\"s\"><v>0</v></c></row></sheetData>`.\n case 's':\n // If a cell has no value then there's no `<c/>` element for it.\n // If a `<c/>` element exists then it's not empty.\n // The `<v/>`alue is a key in the \"shared strings\" dictionary of the\n // XLSX file, so look it up in the `sharedStrings` dictionary by the numeric key.\n var sharedStringIndex = Number(value);\n if (isNaN(sharedStringIndex)) {\n throw new Error(\"Invalid \\\"shared\\\" string index: \".concat(value));\n }\n if (sharedStringIndex >= sharedStrings.length) {\n throw new Error(\"An out-of-bounds \\\"shared\\\" string index: \".concat(value));\n }\n value = sharedStrings[sharedStringIndex];\n value = parseString(value, options);\n break;\n\n // Boolean (TRUE/FALSE) values are stored as either \"1\" or \"0\"\n // in cells of type \"b\".\n case 'b':\n if (value === '1') {\n value = true;\n } else if (value === '0') {\n value = false;\n } else {\n throw new Error(\"Unsupported \\\"boolean\\\" cell value: \".concat(value));\n }\n break;\n\n // XLSX specification seems to support cells of type \"z\":\n // blank \"stub\" cells that should be ignored by data processing utilities.\n case 'z':\n value = undefined;\n break;\n\n // XLSX specification also defines cells of type \"e\" containing a numeric \"error\" code.\n // It's not clear what that means though.\n // They also wrote: \"and `w` property stores its common name\".\n // It's unclear what they meant by that.\n case 'e':\n value = decodeError(value);\n break;\n\n // XLSX supports date cells of type \"d\", though seems like it (almost?) never\n // uses it for storing dates, preferring \"n\" numeric timestamp cells instead.\n // The value of a \"d\" cell is supposedly a string in \"ISO 8601\" format.\n // I haven't seen an XLSX file having such cells.\n // Example: `<sheetData><row r=\"1\"><c r=\"A1\" s=\"1\" t=\"d\"><v>2021-06-10T00:47:45.700Z</v></c></row></sheetData>`.\n case 'd':\n if (value === undefined) {\n break;\n }\n var parsedDate = new Date(value);\n if (isNaN(parsedDate.valueOf())) {\n throw new Error(\"Unsupported \\\"date\\\" cell value: \".concat(value));\n }\n value = parsedDate;\n break;\n\n // Numeric cells have type \"n\".\n case 'n':\n if (value === undefined) {\n break;\n }\n // XLSX does have \"d\" type for dates, but it's not commonly used.\n // Instead, it prefers using \"n\" type for storing dates as timestamps.\n var styleId = getStyleId();\n if (styleId && isDateFormatStyle(styleId, styles, options)) {\n // Parse the number from string.\n value = parseNumberDefault(value);\n // Parse the number as a date timestamp.\n value = parseExcelDate(value, {\n epoch1904: epoch1904\n });\n } else {\n // Parse the number from string.\n // Supports custom parsing function to work around javascript number encoding precision issues.\n // https://gitlab.com/catamphetamine/read-excel-file/-/issues/85\n var parseNumber = options.parseNumber || parseNumberDefault;\n value = parseNumber(value);\n }\n break;\n default:\n throw new TypeError(\"Cell type not supported: \".concat(type));\n }\n\n // Convert empty values to `null`.\n if (value === undefined) {\n value = null;\n }\n return value;\n}\n\n// Decodes numeric error code to a string code.\n// https://github.com/SheetJS/sheetjs/blob/19620da30be2a7d7b9801938a0b9b1fd3c4c4b00/docbits/52_datatype.md\nfunction decodeError(errorCode) {\n // While the error values are determined by the application,\n // the following are some example error values that could be used:\n switch (errorCode) {\n case 0x00:\n return '#NULL!';\n case 0x07:\n return '#DIV/0!';\n case 0x0F:\n return '#VALUE!';\n case 0x17:\n return '#REF!';\n case 0x1D:\n return '#NAME?';\n case 0x24:\n return '#NUM!';\n case 0x2A:\n return '#N/A';\n case 0x2B:\n return '#GETTING_DATA';\n default:\n // Such error code doesn't exist. I made it up.\n return \"#ERROR_\".concat(errorCode);\n }\n}\nfunction parseString(value, options) {\n // In some weird cases, a developer might want to disable\n // the automatic trimming of all strings.\n // For example, leading spaces might express a tree-like hierarchy.\n // https://github.com/catamphetamine/read-excel-file/pull/106#issuecomment-1136062917\n if (options.trim !== false) {\n value = value.trim();\n }\n if (value === '') {\n value = undefined;\n }\n return value;\n}\n\n// Parses a number from string.\n// Throws an error if the number couldn't be parsed.\n// When parsing floating-point number, is affected by\n// the javascript number encoding precision issues:\n// https://www.youtube.com/watch?v=2gIxbTn7GSc\n// https://www.avioconsulting.com/blog/overcoming-javascript-numeric-precision-issues\nfunction parseNumberDefault(stringifiedNumber) {\n var parsedNumber = Number(stringifiedNumber);\n if (isNaN(parsedNumber)) {\n throw new Error(\"Invalid \\\"numeric\\\" cell value: \".concat(stringifiedNumber));\n }\n return parsedNumber;\n}\n//# sourceMappingURL=parseCellValue.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nexport default function parseCellCoordinates(coordinatesString) {\n // Coordinate examples: \"AA2091\", \"R988\", \"B1\".\n var _coordinatesString$sp = coordinatesString.split(/(\\d+)/),\n _coordinatesString$sp2 = _slicedToArray(_coordinatesString$sp, 2),\n column = _coordinatesString$sp2[0],\n row = _coordinatesString$sp2[1];\n return [\n // Row.\n Number(row),\n // Column.\n // It's not clear why would `column` ever be non-trimmed,\n // but if it was added here then perhaps it could hypothetically happen, or smth.\n getColumnNumberFromColumnLetters(column.trim())];\n}\n\n// Maps \"A1\"-like coordinates to `{ row, column }` numeric coordinates.\nvar LETTERS = [\"\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\n\n// Converts a letter coordinate to a digit coordinate.\n// Examples: \"A\" -> 1, \"B\" -> 2, \"Z\" -> 26, \"AA\" -> 27, etc.\nfunction getColumnNumberFromColumnLetters(columnLetters) {\n // `for ... of ...` would require Babel polyfill for iterating a string.\n var n = 0;\n var i = 0;\n while (i < columnLetters.length) {\n n *= 26;\n n += LETTERS.indexOf(columnLetters[i]);\n i++;\n }\n return n;\n}\n//# sourceMappingURL=parseCellCoordinates.js.map","import parseCellValue from './parseCellValue.js';\nimport parseCellCoordinates from './parseCellCoordinates.js';\nimport { getCellValueElement, getCellInlineStringValue } from '../xml/xlsx.js';\nimport { getOuterXml } from '../xml/dom.js';\n\n// Example of a `<c/>`ell element:\n//\n// <c>\n// <f>string</f> — formula.\n// <v>string</v> — formula pre-computed value.\n// <is>\n// <t>string</t> — an `inlineStr` string (rather than a \"common string\" from a dictionary).\n// <r>\n// <rPr>\n// ...\n// </rPr>\n// <t>string</t>\n// </r>\n// <rPh sb=\"1\" eb=\"1\">\n// <t>string</t>\n// </rPh>\n// <phoneticPr fontId=\"1\"/>\n// </is>\n// <extLst>\n// <ext>\n// <!--any element-->\n// </ext>\n// </extLst>\n// </c>\n//\nexport default function parseCell(element, sheetDocument, sharedStrings, styles, epoch1904, options) {\n var coordinates = parseCellCoordinates(element.getAttribute('r'));\n var valueElement = getCellValueElement(sheetDocument, element);\n\n // When the value element doesn't exist, it would be returned as `undefined`\n // when using `xpath` and as `null` when using `DOMParser`.\n // So here it uses `value && ...` syntax instead of `if (value !== undefined) { ... }`\n // for compatibility with both `xpath` and `DOMParser`.\n var value = valueElement && valueElement.textContent;\n var type = element.getAttribute('t');\n return {\n row: coordinates[0],\n column: coordinates[1],\n value: parseCellValue(value, type, {\n getInlineStringValue: function getInlineStringValue() {\n return getCellInlineStringValue(sheetDocument, element);\n },\n getInlineStringXml: function getInlineStringXml() {\n return getOuterXml(element);\n },\n getStyleId: function getStyleId() {\n return element.getAttribute('s');\n },\n styles: styles,\n sharedStrings: sharedStrings,\n epoch1904: epoch1904,\n options: options\n })\n };\n}\n//# sourceMappingURL=parseCell.js.map","import { getCellElements } from '../xml/xlsx.js';\nimport parseCell from './parseCell.js';\nexport default function parseCells(sheetDocument, sharedStrings, styles, epoch1904, options) {\n var cells = getCellElements(sheetDocument);\n if (cells.length === 0) {\n return [];\n }\n\n // It seems like the idea of parsing \"merged cells\" was abandoned without being finished.\n // Here, it seems to just get to the stage of parsing merged cell coordinates.\n // Perhaps it's because it's not clear how would the package return merged cell results.\n // I.e. should it just duplicate the value in each one of the merged cells?\n // Or should it keep the existing behavior of only returning the value of the top-most left-most cell\n // and then return `null` for the other ones?\n // Perhaps the latter (existing) approach was found to be the most sensible.\n //\n // const mergedCells = getMergedCellCoordinates(sheetDocument)\n // for (const mergedCell of mergedCells) {\n // const [from, to] = mergedCell.split(':').map(parseCellCoordinates)\n // console.log('Merged Cell.', 'From:', from, 'To:', to)\n // }\n\n return cells.map(function (element) {\n return parseCell(element, sheetDocument, sharedStrings, styles, epoch1904, options);\n });\n}\n//# sourceMappingURL=parseCells.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nimport parseCellCoordinates from './parseCellCoordinates.js';\nimport { getDimensions } from '../xml/xlsx.js';\n\n// `dimensions` defines the spreadsheet area containing all non-empty cells.\n// https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.sheetdimension?view=openxml-2.8.1\nexport default function parseSheetDimensions(sheetDocument) {\n var dimensions = getDimensions(sheetDocument);\n if (dimensions) {\n dimensions = dimensions.split(':').map(parseCellCoordinates).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n row = _ref2[0],\n column = _ref2[1];\n return {\n row: row,\n column: column\n };\n });\n // Sometimes there can be just a single cell as a spreadsheet's \"dimensions\".\n // For example, the default \"dimensions\" in Apache POI library is \"A1\",\n // meaning that only the first cell in the spreadsheet is used.\n //\n // A quote from Apache POI library:\n // \"Single cell ranges are formatted like single cell references (e.g. 'A1' instead of 'A1:A1').\"\n //\n if (dimensions.length === 1) {\n dimensions = [dimensions[0], dimensions[0]];\n }\n return dimensions;\n }\n}\n//# sourceMappingURL=parseSheetDimensions.js.map","export default function reconstructSheetDimensionsFromSheetCells(cells) {\n var comparator = function comparator(a, b) {\n return a - b;\n };\n var allRows = cells.map(function (cell) {\n return cell.row;\n }).sort(comparator);\n var allCols = cells.map(function (cell) {\n return cell.column;\n }).sort(comparator);\n var minRow = allRows[0];\n var maxRow = allRows[allRows.length - 1];\n var minCol = allCols[0];\n var maxCol = allCols[allCols.length - 1];\n return [{\n row: minRow,\n column: minCol\n }, {\n row: maxRow,\n column: maxCol\n }];\n}\n//# sourceMappingURL=reconstructSheetDimensionsFromSheetCells.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nexport default function dropEmptyRows(data) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n rowIndexSourceMap = _ref.rowIndexSourceMap,\n _ref$accessor = _ref.accessor,\n accessor = _ref$accessor === void 0 ? function (_) {\n return _;\n } : _ref$accessor,\n onlyTrimAtTheEnd = _ref.onlyTrimAtTheEnd;\n // Drop empty rows.\n var i = data.length - 1;\n while (i >= 0) {\n // Check if the row is empty.\n var empty = true;\n for (var _iterator = _createForOfIteratorHelperLoose(data[i]), _step; !(_step = _iterator()).done;) {\n var cell = _step.value;\n if (accessor(cell) !== null) {\n empty = false;\n break;\n }\n }\n // Remove the empty row.\n if (empty) {\n data.splice(i, 1);\n if (rowIndexSourceMap) {\n rowIndexSourceMap.splice(i, 1);\n }\n } else if (onlyTrimAtTheEnd) {\n break;\n }\n i--;\n }\n return data;\n}\n//# sourceMappingURL=dropEmptyRows.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nexport default function dropEmptyColumns(data) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$accessor = _ref.accessor,\n accessor = _ref$accessor === void 0 ? function (_) {\n return _;\n } : _ref$accessor,\n onlyTrimAtTheEnd = _ref.onlyTrimAtTheEnd;\n var i = data[0].length - 1;\n while (i >= 0) {\n var empty = true;\n for (var _iterator = _createForOfIteratorHelperLoose(data), _step; !(_step = _iterator()).done;) {\n var row = _step.value;\n if (accessor(row[i]) !== null) {\n empty = false;\n break;\n }\n }\n if (empty) {\n var j = 0;\n while (j < data.length) {\n data[j].splice(i, 1);\n j++;\n }\n } else if (onlyTrimAtTheEnd) {\n break;\n }\n i--;\n }\n return data;\n}\n//# sourceMappingURL=dropEmptyColumns.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nimport dropEmptyRows from './dropEmptyRows.js';\nimport dropEmptyColumns from './dropEmptyColumns.js';\nexport default function convertCellsToData2dArray(cells, dimensions) {\n // If the sheet is empty.\n if (cells.length === 0) {\n return [];\n }\n var _dimensions = _slicedToArray(dimensions, 2),\n leftTop = _dimensions[0],\n rightBottom = _dimensions[1];\n\n // Don't discard empty rows or columns at the start of the spreadsheet,\n // even when the `*.xlsx` file itself tells that the content starts at an offset.\n // https://github.com/catamphetamine/read-excel-file/issues/102\n // const colsCount = (rightBottom.column - leftTop.column) + 1\n // const rowsCount = (rightBottom.row - leftTop.row) + 1\n\n var colsCount = rightBottom.column;\n var rowsCount = rightBottom.row;\n\n // Initialize spreadsheet data structure.\n var data = new Array(rowsCount);\n var i = 0;\n while (i < rowsCount) {\n data[i] = new Array(colsCount);\n var j = 0;\n while (j < colsCount) {\n data[i][j] = null;\n j++;\n }\n i++;\n }\n\n // Fill in spreadsheet `data`.\n // (this code implies that `cells` aren't necessarily sorted by row and column:\n // maybe that's not correct, this piece code was initially copy-pasted\n // from some other library that used `XPath`)\n for (var _iterator = _createForOfIteratorHelperLoose(cells), _step; !(_step = _iterator()).done;) {\n var cell = _step.value;\n // Don't discard empty rows or columns at the start of the spreadsheet,\n // even when the `*.xlsx` file itself tells that the content starts at an offset.\n // https://github.com/catamphetamine/read-excel-file/issues/102\n // const rowIndex = cell.row - leftTop.row\n // const columnIndex = cell.column - leftTop.column\n var rowIndex = cell.row - 1;\n var columnIndex = cell.column - 1;\n // Ignore the data in the cell if it's outside of the spreadsheet's \"dimensions\".\n if (columnIndex < colsCount && rowIndex < rowsCount) {\n data[rowIndex][columnIndex] = cell.value;\n }\n }\n\n // // Fill in the row map, if the row map was passed.\n // if (options.rowIndexSourceMap) {\n // let i = 0\n // while (i < data.length) {\n // options.rowIndexSourceMap[i] = i\n // i++\n // }\n // }\n\n // Drop (discard) empty columns at the right side.\n // Drop (discard) empty rows at the bottom.\n data = dropEmptyRows(dropEmptyColumns(data, {\n onlyTrimAtTheEnd: true\n }), {\n onlyTrimAtTheEnd: true\n } // { onlyTrimAtTheEnd: true, rowIndexSourceMap: options.rowIndexSourceMap }\n );\n\n return data;\n}\n//# sourceMappingURL=convertCellsToData2dArray.js.map","import parseCells from './parseCells.js';\nimport parseSheetDimensions from './parseSheetDimensions.js';\nimport reconstructSheetDimensionsFromSheetCells from './reconstructSheetDimensionsFromSheetCells.js';\nimport convertSheetToData2dArray from './convertCellsToData2dArray.js';\nexport default function parseSheet(content, xml, sharedStrings, styles, epoch1904, options) {\n var sheetDocument = xml.createDocument(content);\n var cells = parseCells(sheetDocument, sharedStrings, styles, epoch1904, options);\n\n // `dimensions` defines the spreadsheet area enclosing all non-empty cells.\n // https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.sheetdimension?view=openxml-2.8.1\n var dimensions = parseSheetDimensions(sheetDocument) || reconstructSheetDimensionsFromSheetCells(cells);\n return convertSheetToData2dArray(cells, dimensions);\n}\n//# sourceMappingURL=parseSheet.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport parseSpreadsheetInfo from './parseSpreadsheetInfo.js';\nimport parseFilePaths from './parseFilePaths.js';\nimport parseStyles from './parseStyles.js';\nimport parseSharedStrings from './parseSharedStrings.js';\nimport parseSheet from './parseSheet.js';\n\n// For an introduction in reading `.xlsx` files see \"The minimum viable XLSX reader\":\n// https://www.brendanlong.com/the-minimum-viable-xlsx-reader.html\n\n/**\r\n * Reads data from an `.xlsx` file.\r\n * @param {Record<string,string>} contents - A map of `.xml` files inside the `.xlsx` file (which itself is just a zipped directory).\r\n * @param {object} xml — An object having a single property — `createDocument(string)` function.\r\n * @param {object} [options]\r\n * @return {Sheet[]}\r\n */\nexport default function parseSpreadsheetContents(contents, xml) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var getFileContent = function getFileContent(filePath) {\n if (!contents[filePath]) {\n throw new Error(\"\\\"\".concat(filePath, \"\\\" file not found inside the *.xlsx file zip archive\"));\n }\n return contents[filePath];\n };\n\n // Read the paths to certain files inside the `.xlsx` file, which is itself just a `.zip` archive.\n // These paths aren't standardized between different spreadsheet editors.\n // https://github.com/tidyverse/readxl/issues/104\n var filePaths = parseFilePaths(getFileContent('xl/_rels/workbook.xml.rels'), xml);\n\n // The usual file path for \"shared strings\" is \"xl/sharedStrings.xml\".\n var sharedStrings = filePaths.sharedStrings ? parseSharedStrings(getFileContent(filePaths.sharedStrings), xml) : [];\n\n // The usual file path for \"styles\" is \"xl/styles.xml\".\n var styles = filePaths.styles ? parseStyles(getFileContent(filePaths.styles), xml) : {};\n var _parseSpreadsheetInfo = parseSpreadsheetInfo(getFileContent('xl/workbook.xml'), xml),\n sheets = _parseSpreadsheetInfo.sheets,\n epoch1904 = _parseSpreadsheetInfo.epoch1904;\n var sheetIdsToRead = options.sheets && options.sheets.map(function (sheet) {\n return getSheetId(sheet, sheets);\n });\n\n // Parse sheets data.\n\n var sheetsData = [];\n for (var _i = 0, _Object$keys = Object.keys(filePaths.sheets); _i < _Object$keys.length; _i++) {\n var sheetId = _Object$keys[_i];\n if (sheetIdsToRead && !sheetIdsToRead.includes(sheetId)) {\n continue;\n }\n sheetsData.push({\n sheet: getSheetNameById(sheetId, sheets),\n data: parseSheet(getFileContent(filePaths.sheets[sheetId]), xml, sharedStrings, styles, epoch1904, options)\n });\n }\n\n // Return spreadsheet data.\n return sheetsData;\n}\nfunction getSheetId(sheet, sheets) {\n if (typeof sheet === 'string') {\n for (var _iterator = _createForOfIteratorHelperLoose(sheets), _step; !(_step = _iterator()).done;) {\n var _sheet = _step.value;\n if (_sheet.name === sheet) {\n return _sheet.relationId;\n }\n }\n throw new Error(\"Sheet \\\"\".concat(sheet, \"\\\" not found. Available sheets: \").concat(sheets.map(function (_ref) {\n var name = _ref.name;\n return \"\\\"\".concat(name, \"\\\"\");\n }).join(', ')));\n } else {\n if (sheet <= sheets.length) {\n return sheets[sheet - 1].relationId;\n }\n throw new Error(\"Sheet number out of bounds: \".concat(sheet, \". Available sheets count: \").concat(sheets.length));\n }\n}\nfunction getSheetNameById(sheetId, sheets) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(sheets), _step2; !(_step2 = _iterator2()).done;) {\n var sheet = _step2.value;\n if (sheet.relationId === sheetId) {\n return sheet.name;\n }\n }\n throw new Error(\"Sheet ID not found: \".concat(sheetId));\n}\n//# sourceMappingURL=parseSpreadsheetContents.js.map","import xml from '../xml/xmlBrowser.js';\nimport unpackXlsxFile from './unpackXlsxFileBrowser.js';\nimport parseSpreadsheetContents from '../xlsx/parseSpreadsheetContents.js';\n\n/**\r\n * Reads an `.xlsx` file.\r\n * @param {(File|Blob|ArrayBuffer)} input\r\n * @param {object} [options]\r\n * @return {Promise<Sheet[]>}\r\n */\nexport default function readXlsxFile(input, options) {\n return unpackXlsxFile(input).then(function (contents) {\n return parseSpreadsheetContents(contents, xml, options);\n });\n}\n//# sourceMappingURL=readXlsxFileBrowser.js.map","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar InvalidError = /*#__PURE__*/function (_Error) {\n _inherits(InvalidError, _Error);\n var _super = _createSuper(InvalidError);\n function InvalidError(reason) {\n var _this;\n _classCallCheck(this, InvalidError);\n _this = _super.call(this, 'invalid');\n _this.reason = reason;\n return _this;\n }\n return _createClass(InvalidError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\nexport { InvalidError as default };\n//# sourceMappingURL=InvalidError.js.map","import InvalidError from '../InvalidError.js';\nexport default function NumberType(value) {\n // An XLSX file editing software might not always correctly\n // detect numeric values in string-type cells. Users won't bother\n // manually selecting a cell type, so the editing software has to guess\n // based on the user's input. One can assume that such auto-detection\n // might not always work.\n //\n // So, if a cell is supposed to be a numeric one, convert a string value to a number.\n //\n if (typeof value === 'string') {\n var stringifiedValue = value;\n value = Number(value);\n if (String(value) !== stringifiedValue) {\n throw new InvalidError('not_a_number');\n }\n }\n if (typeof value !== 'number') {\n throw new InvalidError('not_a_number');\n }\n if (isNaN(value)) {\n throw new InvalidError('invalid_number');\n }\n // At this point, `value` can only be a number.\n //\n // The global `isFinite()` function filters out:\n // * NaN\n // * -Infinity\n // * Infinity\n //\n // All other values pass (including non-numbers).\n //\n if (!isFinite(value)) {\n throw new InvalidError('out_of_bounds');\n }\n return value;\n}\n//# sourceMappingURL=Number.js.map","import InvalidError from '../InvalidError.js';\nexport default function StringType(value) {\n if (typeof value === 'string') {\n return value;\n }\n // Excel tends to perform a forced automatic convertion of string-type values\n // to number-type ones when the user has input them. Otherwise, users wouldn't\n // be able to perform formula calculations on those cell values because users\n // won't bother manually choosing a \"numeric\" cell type for each cell, and\n // even if they did, choosing a \"numeric\" cell type every time wouldn't be an\n // acceptable \"user experience\".\n //\n // So, if a cell value is supposed to be a string and Excel has automatically\n // converted it to a number, perform a backwards conversion.\n //\n if (typeof value === 'number') {\n if (isNaN(value)) {\n throw new InvalidError('invalid_number');\n }\n // The global `isFinite()` function filters out:\n // * NaN\n // * -Infinity\n // * Infinity\n //\n // All other values pass (including non-numbers).\n //\n if (!isFinite(value)) {\n throw new InvalidError('out_of_bounds');\n }\n return String(value);\n }\n throw new InvalidError('not_a_string');\n}\n//# sourceMappingURL=String.js.map","import InvalidError from '../InvalidError.js';\nexport default function BooleanType(value) {\n if (typeof value === 'boolean') {\n return value;\n }\n throw new InvalidError('not_a_boolean');\n}\n//# sourceMappingURL=Boolean.js.map","import InvalidError from '../InvalidError.js';\nexport default function DateType(value) {\n // XLSX has no specific format for dates.\n // Sometimes a date can be heuristically detected.\n // https://github.com/catamphetamine/read-excel-file/issues/3#issuecomment-395770777\n if (value instanceof Date) {\n if (isNaN(value.valueOf())) {\n throw new InvalidError('out_of_bounds');\n }\n return value;\n }\n throw new InvalidError('not_a_date');\n}\n//# sourceMappingURL=Date.js.map","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport NumberType from './types/Number.js';\nimport StringType from './types/String.js';\nimport BooleanType from './types/Boolean.js';\nimport DateType from './types/Date.js';\n\n/**\r\n * Converts spreadsheet-alike data structure into an array of JSON objects.\r\n *\r\n * Parameters:\r\n *\r\n * * `data` — An array of rows, each row being an array of cells. The first row should be the list of column headers and the rest of the rows should be the data.\r\n * * `schema` — A \"to JSON\" convertion schema (see above).\r\n * * `options` — (optional) Schema conversion parameters of `read-excel-file`:\r\n * * `propertyValueWhenColumnIsMissing` — By default, when some of the `schema` columns are missing in the input `data`, those properties are set to `undefined` in the output objects. Pass `propertyValueWhenColumnIsMissing: null` to set such \"missing column\" properties to `null` in the output objects.\r\n * * `propertyValueWhenCellIsEmpty` — By default, when it encounters a `null` value in a cell in input `data`, it sets it to `undefined` in the output object. Pass `propertyValueWhenCellIsEmpty: null` to make it set such values as `null`s in output objects.\r\n * // * `shouldSkipRequiredValidationWhenColumnIsMissing: (column: string, { object }) => boolean` — By default, it does apply `required` validation to `schema` properties for which columns are missing in the input `data`. One could pass a custom `shouldSkipRequiredValidationWhenColumnIsMissing(column, { object })` to disable `required` validation for missing columns in some or all cases.\r\n * * `transformEmptyObject(object, { path? })` — By default, it returns `null` for \"empty\" objects. One could override that value using `transformEmptyObject(object, { path })` parameter. The value applies to both top-level object and any nested sub-objects in case of a nested schema, hence the additional (optional) `path?: string` parameter.\r\n * * `transformEmptyArray(array, { path })` — By default, it returns `null` for an \"empty\" array value. One could override that value using `transformEmptyArray(array, { path })` parameter.\r\n * * `separatorCharacter` — By default, it splits array-type cell values by a comma character.\r\n *\r\n * When parsing a property value, in case of an error, the value of that property is gonna be `undefined`.\r\n *\r\n * @param {SheetData} data - An array of rows, each row being an array of cells.\r\n * @param {object} schema\r\n * @param {object} [options]\r\n * @param {any} [options.propertyValueWhenColumnIsMissing] — By default, when some of the `schema` columns are missing in the input `data`, those properties are set to `undefined` in the output objects. Pass `propertyValueWhenColumnIsMissing: null` to set such \"missing column\" properties to `null` in the output objects.\r\n * @param {any} [options.propertyValueWhenCellIsEmpty] — By default, when it encounters a `null` value in a cell in input `data`, it leaves the value as is. Pass a custom `propertyValueWhenCellIsEmpty` to make it set such values to that value.\r\n * // @param {boolean} [options.shouldSkipRequiredValidationWhenColumnIsMissing(column: string, { object })] — By default, it does apply `required` validation to `schema` properties for which columns are missing in the input `data`. One could pass a custom `shouldSkipRequiredValidationWhenColumnIsMissing(column, { object })` to disable `required` validation for missing columns in some or all cases.\r\n * @param {function} [options.transformEmptyObject(object, { path })] — By default, it returns `null` for an \"empty\" resulting object. One could override that value using `transformEmptyObject(object, { path })` parameter. The value applies to both top-level object and any nested sub-objects in case of a nested schema, hence the additional `path?: string` parameter.\r\n * @param {function} [options.transformEmptyArray(array, { path })] — By default, it returns `null` for an \"empty\" array value. One could override that value using `transformEmptyArray(array, { path })` parameter.\r\n * @param {string} [options.separatorCharacter] — When specified, string values will be split by this separator to get the array.\r\n * @return {object} — An object of shape `{ objects, errors }`. Either `objects` or `errors` is going to be `undefined`.\r\n */\nexport default function parseSheetData(data, schema, optionsCustom) {\n var objects = [];\n var errors = [];\n var parsedRows = parseSheetDataWithPerRowErrors(data, schema, optionsCustom);\n var parsedRowIndex = 0;\n for (var _iterator = _createForOfIteratorHelperLoose(parsedRows), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n object = _step$value.object,\n rowErrors = _step$value.errors;\n if (rowErrors) {\n errors = errors.concat(rowErrors.map(\n // Add row number property to each row error.\n function (rowError) {\n return _objectSpread(_objectSpread({}, rowError), {}, {\n row: parsedRowIndex + 1\n });\n }));\n } else {\n objects.push(object);\n }\n parsedRowIndex++;\n }\n if (errors.length > 0) {\n return {\n errors: errors\n };\n }\n return {\n objects: objects\n };\n}\n\n// This one is only used in tests.\nexport function parseSheetDataWithPerRowErrors(data, schema, optionsCustom) {\n validateSchema(schema);\n var options = applyDefaultOptions(optionsCustom);\n var _data = _toArray(data),\n columns = _data[0],\n dataRows = _data.slice(1);\n return dataRows.map(function (row) {\n return parseDataRow(row, schema, columns, options);\n });\n}\nfunction parseDataRow(dataRow, schema, columns, options) {\n // Create a `schemaEntry` for the top-level object.\n var schemaEntry = {\n schema: schema\n };\n\n // Parse the values in the given data row into an object.\n var _parseProperty = parseProperty(dataRow, schemaEntry, undefined, columns, options),\n value = _parseProperty.value,\n isEmptyValue = _parseProperty.isEmptyValue,\n errors = _parseProperty.errors,\n children = _parseProperty.children;\n\n // Simulate a \"dummy\" parent object for the top-level object.\n // It will be used when running `required` validations.\n var dummyParentObject = {\n // The \"dummy\" parent object has a \"dummy\" value.\n // This value is irrelevant because it won't be read anywhere.\n value: PARSED_OBJECT_TREE_START,\n // The \"dummy\" parent object is empty if the parsed row is empty.\n isEmptyValue: isEmptyValue,\n // The \"dummy\" object has the same errors as the parsed row.\n errors: errors,\n // The parsed object by default is not required to have any data\n // so the \"dummy\" object is not required.\n isRequired: undefined\n };\n\n // Run any `required` validations.\n //\n // `required` validations should be run after the entire data row has been parsed,\n // i.e. when the entire object structure has been parsed.\n // The reason is that a `required` validation could be either a simple boolean or a \"complex\" function.\n // In the latter case, the result of a `required()` function may depend on any other property of the object,\n // hence the actual `required` flag value could only be obtained after the entire data row has been parsed.\n //\n // For example, consider a top-level object:\n //\n // {\n // firstName: string,\n // lastName: string,\n // pet?: { name: string }\n // }\n //\n // A corresponding schema would be:\n //\n // {\n // firstName: {\n // required: true\n // },\n // lastName: {\n // required: true\n // },\n // pet: {\n // required: false,\n // schema: {\n // name: {\n // required: true\n // }\n // }\n // }\n // }\n //\n // I.e. when a `pet` exists, it must have a `name`.\n //\n // In such case, the `required: true` check of the `pet`'s `name` property\n // should not be performed if the `pet` is not present, because the `pet` nested object\n // is marked as `required: false`, meaning that `pet` data is not required to be present.\n //\n var requiredErrors = runPendingRequiredValidations(schemaEntry, value, isEmptyValue, errors, children,\n // Simulate a \"dummy\" parent object for the top-level object.\n dummyParentObject.isRequired, dummyParentObject.value, dummyParentObject.isEmptyValue, dummyParentObject.errors, columns);\n\n // If there were any errors, whether caused by `required`\n // or occured while parsing the values, return those errors.\n if (errors || requiredErrors) {\n return {\n errors: (errors || []).concat(requiredErrors || [])\n };\n }\n\n // Return the parsed object.\n return {\n object: transformValue(value, isEmptyValue, undefined, options)\n };\n}\nfunction parseObject(row, schema, path, columns, options) {\n var object = {};\n var isEmptyObject = true;\n var errors = [];\n var children = [];\n\n // For each property of the object.\n for (var _i = 0, _Object$keys = Object.keys(schema); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n var child = parseProperty(row, schema[key], getPropertyPath(key, path), columns, options);\n if (child.errors) {\n errors = errors.concat(child.errors);\n } else {\n object[key] = transformValue(child.value, child.isEmptyValue, getPropertyPath(key, path), options);\n // Potentially unmark the object as \"empty\".\n if (isEmptyObject && !child.isEmptyValue) {\n isEmptyObject = false;\n }\n }\n children.push(_objectSpread(_objectSpread({}, child), {}, {\n // `schemaEntry` will be used when running `required` validation of this property (later),\n schemaEntry: schema[key]\n }));\n }\n\n // If there were any errors, return them.\n if (errors.length > 0) {\n return {\n // Return the errors.\n errors: errors,\n // Return the `children` because `required` validations still have to be run (later).\n children: children\n };\n }\n return {\n value: object,\n isEmptyValue: isEmptyObject,\n // Return the `children` because `required` validations still have to be run (later).\n children: children\n };\n}\nfunction parseProperty(row, schemaEntry, path, columns, options) {\n var columnIndex = schemaEntry.column ? columns.indexOf(schemaEntry.column) : undefined;\n var isMissingColumn = schemaEntry.column ? columnIndex < 0 : undefined;\n var _ref = schemaEntry.column ? isMissingColumn ? {\n value: options.propertyValueWhenColumnIsMissing,\n isEmptyValue: true\n } : parseCellValueWithPossibleErrors(row[columnIndex], schemaEntry, columnIndex, options) : parseObject(row, schemaEntry.schema, path, columns, options),\n value = _ref.value,\n isEmptyValue = _ref.isEmptyValue,\n errors = _ref.errors,\n children = _ref.children;\n\n // If there were any errors, return them.\n if (errors) {\n return {\n // Return the errors.\n errors: errors,\n // Return the `children` because `required` validations still have to be run (later).\n children: children\n };\n }\n return {\n value: value,\n isEmptyValue: isEmptyValue,\n // Return the `children` because `required` validations still have to be run (later).\n children: children\n };\n}\nfunction parseCellValueWithPossibleErrors(cellValue, schemaEntry, columnIndex, options) {\n var _parseCellValue = parseCellValue(cellValue, schemaEntry, options),\n value = _parseCellValue.value,\n isEmptyValue = _parseCellValue.isEmptyValue,\n errorMessage = _parseCellValue.error,\n errorReason = _parseCellValue.reason;\n if (errorMessage) {\n var error = createError({\n error: errorMessage,\n reason: errorReason,\n column: schemaEntry.column,\n columnIndex: columnIndex,\n valueType: schemaEntry.type,\n value: cellValue\n });\n return {\n errors: [error]\n };\n }\n return {\n value: value,\n isEmptyValue: isEmptyValue\n };\n}\n\n/**\r\n * Converts a cell value value to a javascript typed value.\r\n * @param {any} cellValue\r\n * @param {object} schemaEntry\r\n * @param {string} propertyPath\r\n * @param {object} options\r\n * @return {{ value?: any, isEmptyValue: boolean } | { error: string, reason?: string }}\r\n */\nfunction parseCellValue(cellValue, schemaEntry, options) {\n if (cellValue === undefined) {\n // This isn't supposed to be possible when reading spreadsheet data:\n // cell values are always read as `null` when those cells are empty.\n // It's currently impossible for `read-excel-file` to return `undefined` cell value.\n // Here it uses some \"sensible default\" fallback by treating `undefined` as \"column missing\".\n return {\n value: options.propertyValueWhenColumnIsMissing,\n isEmptyValue: true\n };\n }\n if (cellValue === null) {\n return {\n value: options.propertyValueWhenCellIsEmpty,\n isEmptyValue: true\n };\n }\n\n // Parse comma-separated cell value.\n if (Array.isArray(schemaEntry.type)) {\n return parseArrayValue(cellValue, schemaEntry, options);\n }\n return parseValue(cellValue, schemaEntry, options);\n}\n\n/**\r\n * Converts textual value to a javascript typed array value.\r\n * @param {any} value\r\n * @param {object} schemaEntry\r\n * @param {object} options\r\n * @return {{ value?: any, isEmptyValue: boolean } | { error: string, reason?: string }}\r\n */\nfunction parseArrayValue(value, schemaEntry, options) {\n // If the cell value is not a string — i.e. a number, a boolean, a Date —\n // then throw an error.\n if (typeof value !== 'string') {\n return {\n error: 'not_a_string'\n };\n }\n var isEmptyArray = true;\n var errors = [];\n var reasons = [];\n var values = parseSeparatedSubstrings(value, options.separatorCharacter).map(function (substring) {\n // If any substring was already detected to be invalid\n // don't attempt to parse any other substrings.\n if (errors.length > 0) {\n return;\n }\n\n // If an empty substring was extracted, it means that there was an out-of-place separator.\n if (!substring) {\n errors.push('invalid');\n reasons.push('syntax');\n return;\n }\n var _parseValue = parseValue(substring, schemaEntry, options),\n value = _parseValue.value,\n isEmptyValue = _parseValue.isEmptyValue,\n error = _parseValue.error,\n reason = _parseValue.reason;\n if (error) {\n errors.push(error);\n reasons.push(reason);\n return;\n }\n if (isEmptyArray && !isEmptyValue) {\n isEmptyArray = false;\n }\n return value;\n });\n if (errors.length > 0) {\n return {\n error: errors[0],\n reason: reasons[0]\n };\n }\n return {\n value: values,\n isEmptyValue: isEmptyArray\n };\n}\n\n/**\r\n * Converts textual value to a javascript typed value.\r\n * @param {any} value\r\n * @param {object} schemaEntry\r\n * @param {object} options\r\n * @return {{ value?: any, isEmptyValue: boolean } | { error: string }}\r\n */\nexport function parseValue(value, schemaEntry, options) {\n // `null` values (i.e. empty cells) don't get parsed.\n if (value === null) {\n return {\n value: null,\n isEmptyValue: true\n };\n }\n\n // Parse the value according to the `type` that is specified in the schema entry.\n var result;\n if (schemaEntry.type) {\n result = parseValueOfType(value,\n // Get the type of the value.\n //\n // Handle the case if it's a comma-separated value.\n // Example `type`: String[]\n // Example Input Value: 'Barack Obama, \"String, with, colons\", Donald Trump'\n // Example Parsed Value: ['Barack Obama', 'String, with, colons', 'Donald Trump']\n //\n Array.isArray(schemaEntry.type) ? schemaEntry.type[0] : schemaEntry.type, options);\n } else {\n // If the `type` is not specified for a given schema entry, the `value` will be returned as is.\n result = {\n value: value\n };\n // throw new Error('Invalid schema entry: no `type` specified:\\n\\n' + JSON.stringify(schemaEntry, null, 2))\n }\n\n // If there was an error when parsing the value then return the error.\n if (result.error) {\n return result;\n }\n\n // If the parsed value is empty, return it.\n if (value === null) {\n return {\n value: null,\n isEmptyValue: true\n };\n }\n\n // Value is not empty.\n // Validate it and return.\n\n // Perform `oneOf` validation.\n if (schemaEntry.oneOf) {\n var errorAndReason = validateOneOf(result.value, schemaEntry.oneOf);\n if (errorAndReason) {\n return errorAndReason;\n }\n }\n\n // Perform `validate()` validation.\n if (schemaEntry.validate) {\n try {\n schemaEntry.validate(result.value);\n } catch (error) {\n return {\n error: error.message\n };\n }\n }\n\n // Return the value.\n return {\n value: result.value,\n isEmptyValue: isEmptyValue(result.value)\n };\n}\nfunction validateOneOf(value, oneOf) {\n if (oneOf.indexOf(value) < 0) {\n return {\n error: 'invalid',\n reason: 'unknown'\n };\n }\n}\n\n/**\r\n * Converts cell value to a javascript typed value.\r\n * @param {(string|number|boolean|Date)} value\r\n * @param {function} type\r\n * @return {object} Either `{ value: (string|number|Date|boolean) }` or `{ error: string, reason?: string }`\r\n */\nfunction parseValueOfType(value, type) {\n switch (type) {\n case String:\n return parseValueUsingTypeParser(value, StringType);\n case Number:\n return parseValueUsingTypeParser(value, NumberType);\n case Date:\n return parseValueUsingTypeParser(value, DateType);\n case Boolean:\n return parseValueUsingTypeParser(value, BooleanType);\n default:\n // Validate `type`\n if (typeof type !== 'function') {\n throw new Error(\"Unsupported schema `type`: \".concat(type && type.name || type));\n }\n return parseValueUsingTypeParser(value, type);\n }\n}\n\n/**\r\n * Converts textual value to a custom value using supplied `type`.\r\n * @param {any} value\r\n * @param {function} type\r\n * @return {{ value: any, error: string }}\r\n */\nfunction parseValueUsingTypeParser(value, type) {\n try {\n var parsedValue = type(value);\n // Returning `undefined` from a `type` parser is treated as returning `null`.\n if (parsedValue === undefined) {\n return {\n value: null\n };\n }\n return {\n value: parsedValue\n };\n } catch (error) {\n var result = {\n error: error.message\n };\n // Built-in types such as `Number` or `Date` may also report\n // a specific `reason` of the error.\n if (error.reason) {\n result.reason = error.reason;\n }\n return result;\n }\n}\n\n// Extracts a substring from a string.\nexport function getNextSubstring(string, separatorCharacter, startIndex) {\n var i = 0;\n var substring = '';\n while (startIndex + i < string.length) {\n var character = string[startIndex + i];\n if (character === separatorCharacter) {\n return [substring, i];\n }\n // Previously, it used to treat `\"` character similar to how it's treated in `.csv` files:\n // any commas inside quotes are ignored. But then I thought that it could introduce more\n // issues than it was originally intending to fix, and it also didn't provide an \"escape\" mechanism.\n // Overall, a decision was made to simplify the whole thing and drop the concept of quotes as special characters.\n //\n // else if (character === '\"') {\n // const quotedSubstring = getNextSubstring(string, '\"', startIndex + i + 1)\n // substring += quotedSubstring[0]\n // i += '\"'.length + quotedSubstring[1] + '\"'.length\n // }\n else {\n substring += character;\n i++;\n }\n }\n return [substring, i];\n}\n\n/**\r\n * Parses a string of comma-separated substrings into an array of substrings.\r\n * (the `export` is just for tests)\r\n * @param {string} string — A string of comma-separated substrings.\r\n * @return {string[]} An array of substrings.\r\n */\nexport function parseSeparatedSubstrings(string, separatorCharacter) {\n var elements = [];\n var index = 0;\n while (index < string.length) {\n var _getNextSubstring = getNextSubstring(string, separatorCharacter, index),\n _getNextSubstring2 = _slicedToArray(_getNextSubstring, 2),\n substring = _getNextSubstring2[0],\n length = _getNextSubstring2[1];\n index += length + separatorCharacter.length;\n elements.push(substring.trim());\n }\n return elements;\n}\nfunction transformValue(value, isEmptyValue, path, options) {\n if (isEmptyValue) {\n if (isObject(value)) {\n return options.transformEmptyObject(value, {\n path: path\n });\n } else if (Array.isArray(value)) {\n return options.transformEmptyArray(value, {\n path: path\n });\n }\n }\n return value;\n}\nfunction getPropertyPath(propertyName, parentObjectPath) {\n return \"\".concat(parentObjectPath ? parentObjectPath + '.' : '').concat(propertyName);\n}\n\n// Recursively runs `required` validations for the parsed data row tree.\nfunction runPendingRequiredValidations(schemaEntry, value, isEmptyValue, errors, children, parentObjectIsRequired, parentObjectValue, parentObjectValueIsEmpty, parentObjectErrors, columns) {\n var requiredErrors = [];\n\n // See if this property is required.\n var isRequired = isPropertyRequired(schemaEntry, parentObjectIsRequired, parentObjectValue, parentObjectValueIsEmpty, parentObjectErrors);\n\n // If this property is required and empty, create a \"required\" error.\n if (isRequired && isEmptyValue) {\n requiredErrors.push(createError({\n error: 'required',\n column: schemaEntry.column,\n columnIndex: columns.indexOf(schemaEntry.column),\n valueType: schemaEntry.type,\n value: value\n }));\n }\n\n // Run `required` validations of the children.\n if (children) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(children), _step2; !(_step2 = _iterator2()).done;) {\n var child = _step2.value;\n var requiredErrorsOfChild = runPendingRequiredValidations(child.schemaEntry, child.value, child.isEmptyValue, child.errors, child.children,\n // The following properties describe the parent object of the `child`,\n // i.e. the current (iterated) object.\n isRequired, value, isEmptyValue, errors, columns);\n if (requiredErrorsOfChild) {\n requiredErrors = requiredErrors.concat(requiredErrorsOfChild);\n }\n }\n }\n if (requiredErrors.length > 0) {\n return requiredErrors;\n }\n}\nfunction isPropertyRequired(schemaEntry, parentObjectIsRequired, parentObjectValue, parentObjectValueIsEmpty, parentObjectErrors) {\n // If the parent object is marked as `required: false` then it's allowed\n // to be absent entirely from the input data. If that's the case,\n // i.e. if the parent object is absent entirely from the input data,\n // then any descendant properties of such object are allowed to be absent too,\n // which means that they should also be considered being `required: false`.\n //\n // Also, if the parent object couldn't be parsed due to some non-`required` errors,\n // it can't be known whether it's actually empty or not. In case of such uncertainty,\n // the code shouldn't attempt to be overly smart and do things that might not be necessary,\n // so such parent object is just assumed to be empty in order to not falsly trigger\n // any `required` validations that otherwise wouldn't have been run.\n // In other words, skipping some `required` validations is better than\n // running `required` validations that shouldn't have been run.\n //\n if (parentObjectIsRequired === false && (parentObjectValueIsEmpty || parentObjectErrors)) {\n return false;\n }\n return schemaEntry.required && (typeof schemaEntry.required === 'boolean' ? schemaEntry.required :\n // If there were any non-`required` errors when parsing the parent object,\n // the `parentObject` will be `undefined`. In that case, \"complex\" `required()`\n // validations — the ones where `required` is a function — can't really be run\n // because those validations assume a fully and correctly parsed parent object\n // be passed as an argument, and the thing is that the `parentObject` is unknown.\n // As a result, only \"basic\" `required` validations could be run,\n // i.e. the ones where `required` is just a boolean, and \"complex\" `required`\n // validations, i.e. the ones where `required` is a functions, should be skipped,\n // because it's better to skip some `required` errors than to trigger falsy ones.\n parentObjectErrors ? false : schemaEntry.required(parentObjectValue));\n}\nfunction createError(_ref2) {\n var column = _ref2.column,\n columnIndex = _ref2.columnIndex,\n valueType = _ref2.valueType,\n value = _ref2.value,\n errorMessage = _ref2.error,\n reason = _ref2.reason;\n var error = {\n error: errorMessage,\n column: column,\n columnIndex: columnIndex,\n value: value\n };\n if (reason) {\n error.reason = reason;\n }\n // * Regular values specify a `type?` property, which is included in the `error` object.\n // * Nested objects specify a `schema` property, which is not included in the `error` object.\n if (valueType) {\n error.type = valueType;\n }\n return error;\n}\nfunction validateSchema(schema) {\n for (var _i2 = 0, _Object$keys2 = Object.keys(schema); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n var schemaEntry = schema[key];\n // Validate that the `schema` is not using a deprecated `type: nestedSchema` format.\n if (_typeof(schemaEntry.type) === 'object' && !Array.isArray(schemaEntry.type)) {\n throw new Error('When defining a nested schema, use a `schema` property instead of a `type` property');\n }\n // Validate that every property has a source `column` title specified for it.\n if (!schemaEntry.schema) {\n if (!schemaEntry.column) {\n throw new Error(\"\\\"column\\\" not defined for schema entry \\\"\".concat(key, \"\\\".\"));\n }\n }\n }\n\n // A nested object could have a `required` property but the only allowed value is `false`.\n // The reason why `true` value is not allowed is because in case of a \"required\" error\n // there's no single column title corresponding to such nested object, and column title\n // is required to create a \"required\" error.\n validateObjectSchemaRequiredProperty(schema, undefined);\n}\nfunction validateObjectSchemaRequiredProperty(schema, required) {\n if (required !== undefined && required !== false) {\n throw new Error(\"In a schema, a nested object can have a `required` property but the only allowed value is `undefined` or `false`. Otherwise, a \\\"required\\\" error for a nested object would have to include a specific `column` title and a nested object doesn't have one. You've specified the following `required`: \".concat(required));\n }\n // For each property of the described object.\n for (var _i3 = 0, _Object$keys3 = Object.keys(schema); _i3 < _Object$keys3.length; _i3++) {\n var key = _Object$keys3[_i3];\n // If this property is itself an object.\n if (isObject(schema[key].schema)) {\n // Validate that a `column` property can't coexist with a `schema` property.\n if (schema[key].column) {\n throw new Error(\"In a schema, `column` property is only allowed when describing a property value rather than a nested object. Key: \".concat(key, \". Schema:\\n\").concat(JSON.stringify(schema[key], null, 2)));\n }\n // Recurse into the child object.\n validateObjectSchemaRequiredProperty(schema[key].schema, schema[key].required);\n }\n }\n}\nfunction isEmptyValue(value) {\n return value === undefined || value === null;\n}\nvar DEFAULT_OPTIONS = {\n propertyValueWhenColumnIsMissing: undefined,\n propertyValueWhenCellIsEmpty: null,\n // shouldSkipRequiredValidationWhenColumnIsMissing: () => false,\n // `transformEmptyObject(object, { path })` applies to both the top-level object\n // and any of its nested objects.\n transformEmptyObject: function transformEmptyObject() {\n return null;\n },\n transformEmptyArray: function transformEmptyArray() {\n return null;\n },\n separatorCharacter: ','\n};\nfunction applyDefaultOptions(options) {\n if (options) {\n return _objectSpread(_objectSpread({}, DEFAULT_OPTIONS), options);\n } else {\n return DEFAULT_OPTIONS;\n }\n}\n\n// This `value` marks the start of a tree structure that is parsed from a given data row.\nvar PARSED_OBJECT_TREE_START = {};\nvar objectConstructor = {}.constructor;\nfunction isObject(object) {\n return object !== undefined && object !== null && object.constructor === objectConstructor;\n}\n//# sourceMappingURL=parseSheetData.js.map","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport parseSpreadsheetContents from '../xlsx/parseSpreadsheetContents.js';\nimport parseSheetData from '../parseSheetData/parseSheetData.js';\n\n/**\r\n * Reads data from a single sheet of an `.xlsx` file as an array of rows (which are arrays of cells) or as an array of objects (if `options.schema` was passed).\r\n * @param {Record<string,string>} contents - A map of `.xml` files inside the `.xlsx` file (which itself is just a zipped directory).\r\n * @param {object} xml — An object having a single property — `createDocument(string)` function.\r\n * @param {string|number} [sheet] — Sheet name or number.\r\n * @param {object} [options]\r\n * @return {Sheet[]}\r\n */\nexport default function parseSheet(contents, xml, sheet, options) {\n var data = parseSpreadsheetContents(contents, xml, _objectSpread(_objectSpread({}, options), {}, {\n sheets: [sheet === undefined ? 1 : sheet]\n }))[0].data;\n if (options && options.schema) {\n return parseSheetData(data, options.schema);\n }\n return data;\n}\n//# sourceMappingURL=parseSheet.js.map","import xml from '../xml/xmlBrowser.js';\nimport unpackXlsxFile from './unpackXlsxFileBrowser.js';\nimport parseSheet from './parseSheet.js';\n\n/**\r\n * Reads a single sheet from an `.xlsx` file.\r\n * @param {(Blob|ArrayBuffer)} input\r\n * @param {(number|string)} [sheet] — Sheet number or sheet name\r\n * @param {object} [options]\r\n * @return {Promise<SheetData>}\r\n */\nexport default function readSheet(input, sheet, options) {\n // `sheet` argument is optional.\n // It could be omitted while `options` argument is passed.\n if (!options && sheet && typeof sheet !== 'number' && typeof sheet !== 'string') {\n options = sheet;\n sheet = undefined;\n }\n return unpackXlsxFile(input).then(function (contents) {\n return parseSheet(contents, xml, sheet, options);\n });\n}\n//# sourceMappingURL=readSheetBrowser.js.map","import readXlsxFile, { readSheet } from 'read-excel-file/browser';\nimport type {\n CellValue,\n SheetData,\n} from 'read-excel-file/browser';\nimport { parse } from 'csv/browser/esm/sync';\nimport type {\n AnyObject,\n ObjectSchema,\n} from 'yup';\nimport {\n lazy,\n object,\n string,\n} from 'yup';\nimport { t } from 'i18next';\nimport difference from 'lodash/difference';\nimport uniq from 'lodash/uniq';\nimport { format } from 'date-fns';\nimport type {\n CaseDbCaseBatchUploadResult,\n CaseDbCaseForUpload,\n CaseDbCaseType,\n CaseDbCaseUploadResult,\n CaseDbCol,\n CaseDbCompleteCaseType,\n CaseDbReadSetForUpload,\n CaseDbSeqForUpload,\n} from '@gen-epix/api-casedb';\nimport {\n CaseDbCaseApi,\n CaseDbColType,\n CaseDbEtlStatus,\n CaseDbReadsFileFormat,\n CaseDbSeqFileFormat,\n CaseDbUploadAction,\n} from '@gen-epix/api-casedb';\nimport { QueryClientService } from '@gen-epix/ui/classes/services/QueryClientService';\nimport { ValidationUtil } from '@gen-epix/ui-core/utils/ValidationUtil';\nimport { ObjectUtil } from '@gen-epix/ui-core/utils/ObjectUtil';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport type {\n AutoCompleteOption,\n FormFieldDefinition,\n OptionBase,\n} from '@gen-epix/ui-form/models/form';\nimport { FORM_FIELD_DEFINITION_TYPE } from '@gen-epix/ui-form/models/form';\nimport { DATE_FORMAT } from '@gen-epix/ui-core/constants/date';\n\nimport { CaseTypeUtil } from '../CaseTypeUtil';\nimport { CaseUtil } from '../CaseUtil';\nimport type {\n UploadCompleteColStats,\n UploadMappedColumn,\n UploadMappedColumnsFormFields,\n UploadSequenceMapping,\n UploadSequenceMappingForCaseId,\n} from '../../models/upload';\nimport { FileUtil } from '../FileUtil';\nimport { UploadError } from '../../classes/errors';\nimport { CASEDB_QUERY_KEY } from '../../constants/query';\n\nexport class UploadUtil {\n public static readonly caseDateColumnAliases = ['_case_date', 'case date', 'case_date', 'casedate', 'case.date'];\n public static readonly caseIdColumnAliases = ['_case_id', 'case id', 'case_id', 'caseid', 'case.id'];\n public static readonly colAliases = ['_case_type', 'case type', 'case_type', 'casetype', 'case.type'];\n\n public static areMappedColumnsEqual(a: UploadMappedColumn[], b: UploadMappedColumn[]): boolean {\n if (a.length !== b.length) {\n return false;\n }\n\n return a.every((itemA, index) => {\n const itemB = b[index];\n const stringifiedA = `${itemA.originalIndex}-${itemA.originalLabel}`;\n const stringifiedB = `${itemB.originalIndex}-${itemB.originalLabel}`;\n return stringifiedA === stringifiedB;\n });\n }\n\n public static async createCases(kwArgs: {\n assemblyProtocolId: string;\n casesForVerificationFromSourceData: CaseDbCaseForUpload[];\n completeCaseType: CaseDbCompleteCaseType;\n createdInDataCollectionId: string;\n mappedColumns: UploadMappedColumn[];\n sampleIdColId: string;\n selectedValidatedCases: CaseDbCaseUploadResult[];\n sequenceMapping: UploadSequenceMapping;\n sequencingProtocolId: string;\n signal: AbortSignal;\n }): Promise<CaseDbCaseBatchUploadResult> {\n const {\n assemblyProtocolId,\n casesForVerificationFromSourceData,\n completeCaseType,\n createdInDataCollectionId,\n mappedColumns,\n sampleIdColId,\n selectedValidatedCases: validatedCases,\n sequenceMapping,\n sequencingProtocolId,\n signal,\n } = kwArgs;\n\n const { col: mappedSampleIdCol, sampleIdentifierIssuerId } = mappedColumns.find(mc => mc.col?.id === sampleIdColId) ?? {};\n\n return (await CaseDbCaseApi.getInstance().uploadCases({\n case_batch: {\n cases: validatedCases.map((vc) => {\n const caseId = vc.id;\n const readSetsForUpload: CaseDbReadSetForUpload[] = [];\n const seqsForUpload: CaseDbSeqForUpload[] = [];\n const externalSampleId = mappedSampleIdCol ? CaseUtil.getRowValue(\n vc.validated_content,\n mappedSampleIdCol,\n completeCaseType,\n )?.raw : null;\n const caseFromSourceData = casesForVerificationFromSourceData.find(c => c.id === vc.id);\n\n if (externalSampleId) {\n if (sequenceMapping[vc.id]?.sequenceFileNames) {\n Object.entries(sequenceMapping[vc.id].sequenceFileNames).forEach(([colId, fileName]) => {\n if (fileName) {\n seqsForUpload.push({\n case_id: caseId ?? undefined,\n col_id: colId,\n other_sample_identifier: {\n external_id: externalSampleId,\n identifier_issuer_id: sampleIdentifierIssuerId,\n },\n protocol_id: assemblyProtocolId,\n } satisfies CaseDbSeqForUpload);\n }\n });\n }\n if (sequenceMapping[vc.id]?.readsFileNames) {\n Object.entries(sequenceMapping[vc.id].readsFileNames).forEach(([colId, fileNames]) => {\n if (fileNames.fwd || fileNames.rev) {\n readSetsForUpload.push({\n case_id: caseId ?? undefined,\n col_id: colId,\n other_sample_identifier: {\n external_id: externalSampleId,\n identifier_issuer_id: sampleIdentifierIssuerId,\n },\n protocol_id: sequencingProtocolId,\n } satisfies CaseDbReadSetForUpload);\n }\n });\n }\n }\n\n return ObjectUtil.deepNullifyEmptyStrings<CaseDbCaseForUpload>({\n case: {\n case_type_id: completeCaseType.id,\n content: vc.validated_content,\n created_in_data_collection_id: caseFromSourceData?.case?.created_in_data_collection_id ?? createdInDataCollectionId,\n id: caseId ?? undefined,\n },\n read_sets: readSetsForUpload,\n seqs: seqsForUpload,\n });\n }),\n },\n case_type_id: completeCaseType.id,\n default_created_in_data_collection_id: createdInDataCollectionId ?? undefined,\n on_exists: CaseDbUploadAction.UPDATE,\n }, { signal })).data;\n }\n\n public static async createCasesAndUploadFiles(kwArgs: {\n assemblyProtocolId: string;\n casesForVerificationFromSourceData: CaseDbCaseForUpload[];\n completeCaseType: CaseDbCompleteCaseType;\n createdInDataCollectionId: string;\n mappedColumns: UploadMappedColumn[];\n onComplete: () => void;\n onError: (error: Error) => void;\n onProgress: (progress: number, message: string) => void;\n sampleIdColId: string;\n selectedValidatedCases: CaseDbCaseUploadResult[];\n sequenceFilesDataTransfer: DataTransfer;\n sequenceMapping: UploadSequenceMapping;\n sequencingProtocolId: string;\n signal: AbortSignal;\n }): Promise<CaseDbCaseBatchUploadResult> {\n const {\n onComplete,\n onError,\n onProgress,\n } = kwArgs;\n\n try {\n onProgress(0, t('Creating cases...'));\n const caseBatchUploadResult = await UploadUtil.createCases(kwArgs);\n\n if (caseBatchUploadResult.status === CaseDbEtlStatus.FAILED) {\n throw new UploadError(t('Failed to create cases during upload.'), caseBatchUploadResult);\n }\n\n await UploadUtil.uploadFilesForCases({ ...kwArgs, caseBatchUploadResult, endPercentage: 99, startPercentage: 1 });\n onProgress(100, t('Upload complete.'));\n\n await QueryClientService.getInstance().invalidateQueryKeys(QueryClientService.getInstance().getQueryKeyDependencies([CASEDB_QUERY_KEY.CASES], true));\n onComplete();\n return caseBatchUploadResult;\n } catch (error) {\n onError(error instanceof Error ? error : new Error('Unknown error occurred during upload'));\n throw error;\n }\n }\n\n public static getCasesForUpload(kwArgs: { caseTypeId: string; createdInDataCollectionId: string; mappedColumns: UploadMappedColumn[]; rawData: string[][] }): CaseDbCaseForUpload[] {\n const { caseTypeId, createdInDataCollectionId, mappedColumns, rawData } = kwArgs;\n return rawData.slice(1).map((rawDataRow) => {\n const rawDataCaseIdColumnIndex = mappedColumns.find((mappedColumn) => mappedColumn.isCaseIdColumn)?.originalIndex;\n const content: { [key: string]: string } = {};\n\n mappedColumns.forEach((mappedColumn) => {\n if (mappedColumn.col) {\n content[mappedColumn.col.id] = rawDataRow[mappedColumn.originalIndex];\n }\n });\n let id: string;\n if (!isNaN(rawDataCaseIdColumnIndex) && rawDataRow[rawDataCaseIdColumnIndex]) {\n id = rawDataRow[rawDataCaseIdColumnIndex];\n } else {\n id = StringUtil.createUuid();\n }\n\n const caseForCreateUpdate: CaseDbCaseForUpload = {\n case: {\n case_type_id: caseTypeId,\n content: ObjectUtil.deepNullifyEmptyStrings(content),\n created_in_data_collection_id: createdInDataCollectionId,\n },\n id,\n };\n\n return { ...caseForCreateUpdate, content };\n });\n }\n\n public static getCaseTypeFromColumnLabels(cols: CaseDbCol[], columnLabels: string[]): CaseDbCaseType {\n const bestMatch = {\n caseType: null as CaseDbCaseType,\n matchCount: 0,\n };\n\n // Group columns by case type ID to count matches per case type\n const caseTypeMatches = new Map<string, { caseType: CaseDbCaseType; matchCount: number }>();\n\n cols.forEach(col => {\n const matchCount = columnLabels.filter(label =>\n this.matchColumnLabel(label, col)).length;\n\n if (matchCount > 0) {\n const caseTypeId = col.case_type_id;\n const existing = caseTypeMatches.get(caseTypeId);\n\n if (existing) {\n existing.matchCount += matchCount;\n } else {\n // Note: We don't have access to the full CaseType object here,\n // so we create a minimal one with the ID. In a real implementation,\n // you might need to pass the complete case type data or modify the method signature.\n caseTypeMatches.set(caseTypeId, {\n caseType: { id: caseTypeId } as CaseDbCaseType,\n matchCount,\n });\n }\n }\n });\n\n // Find the case type with the highest match count\n caseTypeMatches.forEach(match => {\n if (match.matchCount > bestMatch.matchCount) {\n bestMatch.caseType = match.caseType;\n bestMatch.matchCount = match.matchCount;\n }\n });\n\n return bestMatch.caseType;\n }\n\n public static getColumnMappingFormFieldDefinitions(completeCaseType: CaseDbCompleteCaseType, rawDataHeaders: string[], _fileName: string): FormFieldDefinition<UploadMappedColumnsFormFields>[] {\n const fields: FormFieldDefinition<UploadMappedColumnsFormFields>[] = [];\n const options: AutoCompleteOption<string>[] = [];\n\n options.push({\n label: 'Case ID',\n value: 'case_id',\n });\n\n const allowedColIds = CaseTypeUtil.getWritableImportExportColIds(completeCaseType);\n completeCaseType.ordered_col_ids.filter(x => allowedColIds.includes(x)).forEach((colId) => {\n const col = completeCaseType.cols[colId];\n\n options.push({\n label: col.label,\n value: col.id,\n });\n });\n\n rawDataHeaders.forEach((header, index) => {\n fields.push({\n definition: FORM_FIELD_DEFINITION_TYPE.SELECT,\n label: header,\n name: index.toString(),\n options,\n });\n });\n\n return fields;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n public static getColumnMappingSchema(rawData: string[][], completeCaseType: CaseDbCompleteCaseType): ObjectSchema<{}, AnyObject, {}, ''> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const fields: { [key: string]: any } = {};\n const fieldNames: string[] = rawData[0].map((_, index) => index.toString());\n const sampleIdColIds = UploadUtil.getSampleIdColIds(completeCaseType);\n\n sampleIdColIds.forEach((colId) => {\n fields[colId] = lazy(() => string().nullable().when(fieldNames, (otherFieldValues, schema) => {\n return schema.test('needs-identifier-issuer', t('An identifier issuer must be selected.'), (fieldValue) => {\n const allFieldValues = [...otherFieldValues as string[], fieldValue];\n if (allFieldValues.includes(colId)) {\n return !!fieldValue;\n }\n return true;\n });\n }));\n });\n\n fieldNames.forEach((fieldName, fieldIndex) => {\n const otherFieldNames = fieldNames.filter(name => name !== fieldName);\n fields[fieldName] = lazy(() => string().nullable().when(otherFieldNames, (otherFieldValues, schema) => {\n return schema\n .test('unique', t('This column has already been mapped to another field.'), (fieldValue) => {\n return !fieldValue || !otherFieldValues.includes(fieldValue);\n })\n .test('valid-case-id-values', t('The column mapped to the case id field must contain valid UUID\\'s.'), (fieldValue) => {\n if (fieldValue !== 'case_id') {\n return true;\n }\n const values = rawData.slice(1).map(row => row[fieldIndex]);\n return values.every(value => !value || ValidationUtil.validate('UUID4', value));\n });\n }));\n });\n\n return object().shape(fields);\n }\n\n\n public static getCompleteCaseTypeColStats(completeCaseType: CaseDbCompleteCaseType): UploadCompleteColStats {\n const sampleIdColumns = CaseTypeUtil.getColsByType(completeCaseType, [CaseDbColType.ID_SAMPLE]);\n const sequenceColumns = CaseTypeUtil.getColsByType(completeCaseType, [CaseDbColType.GENETIC_SEQUENCE]);\n const readsColumns = CaseTypeUtil.getColsByType(completeCaseType, [CaseDbColType.GENETIC_READS]);\n const writableColumns = Object.values(completeCaseType.cols).filter(col => CaseTypeUtil.getWritableColIds(completeCaseType).includes(col.id));\n\n return { readsColumns, sampleIdColumns, sequenceColumns, writableColumns };\n }\n\n public static getDefaultColumnMappingFormValues(rawDataHeaders: string[], mappedColumns: UploadMappedColumn[], identifierIssuerOptions: OptionBase<string>[]): UploadMappedColumnsFormFields {\n const defaultFormValues: UploadMappedColumnsFormFields = Object.fromEntries(Object.keys(rawDataHeaders).map<[string, null]>(x => [x.toString(), null]));\n const caseIdColumn = mappedColumns.find(mappedColumn => mappedColumn.isCaseIdColumn);\n\n if (caseIdColumn) {\n defaultFormValues[caseIdColumn.originalIndex.toString()] = 'case_id';\n }\n\n mappedColumns.forEach((mappedColumn) => {\n if (mappedColumn.col) {\n defaultFormValues[mappedColumn.originalIndex.toString()] = mappedColumn.col.id;\n if (mappedColumn.isSampleIdColumn) {\n defaultFormValues[mappedColumn.col.id] = mappedColumn.sampleIdentifierIssuerId || identifierIssuerOptions.length === 1 ? identifierIssuerOptions[0].value : null;\n }\n }\n });\n return defaultFormValues;\n }\n\n public static getEpiUploadSequenceMapping(completeCaseType: CaseDbCompleteCaseType, validatedCases: CaseDbCaseUploadResult[], sequenceFilesDataTransfer: DataTransfer): UploadSequenceMapping {\n if (!sequenceFilesDataTransfer || sequenceFilesDataTransfer.files.length === 0) {\n return {};\n }\n\n const stats = UploadUtil.getCompleteCaseTypeColStats(completeCaseType);\n const result: UploadSequenceMapping = {};\n\n (JSON.parse(JSON.stringify(validatedCases)) as CaseDbCaseUploadResult[]).forEach((vc) => {\n const caseSequenceMapping: UploadSequenceMappingForCaseId = {\n readsFileNames: {},\n sequenceFileNames: {},\n };\n\n // modify by reference\n result[vc.id] = caseSequenceMapping;\n\n if (stats.sequenceColumns.length !== 1 && stats.readsColumns.length !== 1) {\n return;\n }\n\n const sampleIdColumnIds: string[] = [];\n stats.sampleIdColumns.forEach((idCol) => {\n const rowValue = CaseUtil.getRowValue(vc.validated_content, idCol, completeCaseType);\n if (rowValue && !rowValue.isMissing) {\n sampleIdColumnIds.push(rowValue.raw);\n }\n });\n if (!sampleIdColumnIds.length) {\n return;\n }\n\n stats.sequenceColumns.forEach((seqCol) => {\n caseSequenceMapping.sequenceFileNames[seqCol.id] = '';\n });\n stats.readsColumns.forEach((readCol) => {\n caseSequenceMapping.readsFileNames[readCol.id] = {\n fwd: '',\n rev: '',\n };\n });\n\n const sequenceFiles: string[] = [];\n const readsFiles: string[] = [];\n Array.from(sequenceFilesDataTransfer.files).forEach((file) => {\n const fileName = file.name;\n const lowerName = fileName.toLowerCase();\n const matchesId = sampleIdColumnIds.some((id) => lowerName.match(UploadUtil.idToRegex(id.toLowerCase())));\n if (matchesId) {\n if (UploadUtil.isGenomeFile(fileName)) {\n sequenceFiles.push(fileName);\n } else if (UploadUtil.isReadsFile(fileName)) {\n readsFiles.push(fileName);\n }\n }\n });\n\n if (stats.sequenceColumns.length === 1 && sequenceFiles.length === 1) {\n caseSequenceMapping.sequenceFileNames[stats.sequenceColumns[0].id] = sequenceFiles[0];\n }\n if (stats.readsColumns.length === 1) {\n if (readsFiles.length === 1) {\n caseSequenceMapping.readsFileNames[stats.readsColumns[0].id].fwd = readsFiles[0];\n }\n if (readsFiles.length === 2) {\n const sortedReadsFiles = readsFiles.sort((a, b) => a.localeCompare(b));\n caseSequenceMapping.readsFileNames[stats.readsColumns[0].id].fwd = sortedReadsFiles[0];\n caseSequenceMapping.readsFileNames[stats.readsColumns[0].id].rev = sortedReadsFiles[1];\n }\n }\n });\n return result;\n }\n\n public static getInitialMappedColumns(completeCaseType: CaseDbCompleteCaseType, rawData: string[][]): UploadMappedColumn[] {\n if (rawData.length === 0) {\n return [];\n }\n const writableColIds = CaseTypeUtil.getWritableColIds(completeCaseType);\n const filteredCols = CaseTypeUtil.getWritableImportExportColIds(completeCaseType).map(id => completeCaseType.cols[id]);\n const sampleIdColIds = UploadUtil.getSampleIdColIds(completeCaseType);\n const mappedColumns = rawData[0].map((label, index) => {\n const isCaseIdColumn = UploadUtil.isCaseIdColumn(label);\n const isCol = UploadUtil.isCol(label);\n\n let col: CaseDbCol = null;\n let isSampleIdColumn = false;\n\n if (!isCaseIdColumn && !isCol) {\n col = filteredCols.find(c => UploadUtil.matchColumnLabel(label, c)) || null;\n if (col && !writableColIds.includes(col.id)) {\n col = null;\n }\n isSampleIdColumn = col ? sampleIdColIds.includes(col.id) : false;\n }\n\n return {\n col,\n isCaseIdColumn,\n isCol,\n isSampleIdColumn,\n originalIndex: index,\n originalLabel: label,\n sampleIdentifierIssuerId: null as string,\n } satisfies UploadMappedColumn;\n });\n\n return mappedColumns.filter(mc => {\n return mc.isCaseIdColumn || mc.col;\n });\n }\n\n public static getMappedColumnsFromFormData(data: UploadMappedColumnsFormFields, rawData: string[][], colMap: Map<string, CaseDbCol>, completeCaseType: CaseDbCompleteCaseType): UploadMappedColumn[] {\n const mappedColumns: UploadMappedColumn[] = [];\n const sampleIdColIds = UploadUtil.getSampleIdColIds(completeCaseType);\n Object.entries(data).forEach(([originalIndexString, formValue]) => {\n if (!formValue) {\n return;\n }\n const originalIndex = parseInt(originalIndexString, 10);\n const isCaseIdColumn = formValue === 'case_id';\n let col: CaseDbCol = null;\n if (!isCaseIdColumn) {\n col = colMap.get(formValue) || null;\n }\n let sampleIdentifierIssuerId: string = null;\n const isSampleIdColumn = col ? sampleIdColIds.includes(col.id) : false;\n if (isSampleIdColumn) {\n sampleIdentifierIssuerId = data[formValue] || null;\n }\n mappedColumns.push({\n col,\n isCaseIdColumn,\n isSampleIdColumn,\n originalIndex,\n originalLabel: rawData[0][originalIndex] || '',\n sampleIdentifierIssuerId,\n } satisfies UploadMappedColumn);\n });\n return mappedColumns;\n }\n\n public static getSampleIdColIds(completeCaseType: CaseDbCompleteCaseType): string[] {\n const colsIds: string[] = [];\n Object.values(Object.keys(completeCaseType.cols)).forEach(colId => {\n const col = completeCaseType.cols[colId];\n const refCol = completeCaseType.ref_cols[col.ref_col_id];\n if (refCol?.col_type === CaseDbColType.ID_SAMPLE) {\n colsIds.push(col.id);\n }\n });\n return colsIds;\n }\n\n public static getSequenceMappingStats(sequenceMapping: UploadSequenceMapping, sequenceFilesDataTransfer: DataTransfer): {\n mappedFiles: string[];\n mappedReadsFiles: string[];\n mappedSequenceFiles: string[];\n numberOfFilesToMap: number;\n unmappedFileNames: string[];\n unmappedReadsFiles: string[];\n unmappedSequenceFiles: string[];\n } {\n const sequenceFiles = Array.from(sequenceFilesDataTransfer.files).map(file => file.name).filter(fileName => UploadUtil.isGenomeFile(fileName));\n const readsFiles = Array.from(sequenceFilesDataTransfer.files).map(file => file.name).filter(fileName => UploadUtil.isReadsFile(fileName));\n const files = [...sequenceFiles, ...readsFiles];\n const numberOfFilesToMap = files.length;\n\n const mappedSequenceFiles = uniq(Object.values(sequenceMapping).flatMap(mapping => Object.values(mapping.sequenceFileNames)).filter(x => x));\n const mappedReadsFiles = uniq(Object.values(sequenceMapping).flatMap(mapping => Object.values(mapping.readsFileNames).flatMap(reads => [reads.fwd, reads.rev])).filter(x => x));\n const mappedFiles = [...mappedSequenceFiles, ...mappedReadsFiles];\n\n const unmappedSequenceFiles = difference(sequenceFiles, mappedSequenceFiles);\n const unmappedReadsFiles = difference(readsFiles, mappedReadsFiles);\n const unmappedFileNames = difference(files, mappedFiles);\n\n return {\n mappedFiles,\n mappedReadsFiles,\n mappedSequenceFiles,\n numberOfFilesToMap,\n unmappedFileNames,\n unmappedReadsFiles,\n unmappedSequenceFiles,\n };\n }\n\n public static async getSheetNameOptions(fileList: FileList): Promise<AutoCompleteOption<string>[]> {\n const file = fileList[0];\n const fileName = file.name.toLowerCase();\n\n if (UploadUtil.isXlsxFile(fileName)) {\n return (await readXlsxFile(file, { trim: true })).map(({ sheet: sheetName }) => ({\n label: sheetName,\n value: sheetName,\n }));\n }\n return [];\n }\n\n public static hasReadsColumnMapped(mappedColumns: UploadMappedColumn[], completeCaseTypeColStats: UploadCompleteColStats): boolean {\n return mappedColumns.some((mappedColumn) => {\n return completeCaseTypeColStats.readsColumns.some(readCol => mappedColumn.col?.id === readCol.id);\n });\n }\n\n public static hasSequenceColumnMapped(mappedColumns: UploadMappedColumn[], completeCaseTypeColStats: UploadCompleteColStats): boolean {\n return mappedColumns.some((mappedColumn) => {\n return completeCaseTypeColStats.sequenceColumns.some(seqCol => mappedColumn.col?.id === seqCol.id);\n });\n }\n\n public static isCaseDateColumn(label: string): boolean {\n return this.caseDateColumnAliases.includes(label.toLocaleLowerCase());\n }\n\n public static isCaseIdColumn(label: string): boolean {\n return this.caseIdColumnAliases.includes(label.toLocaleLowerCase());\n }\n\n public static isCol(label: string): boolean {\n return this.colAliases.includes(label.toLocaleLowerCase());\n }\n\n public static isGenomeFile(fileName: string): boolean {\n const lowerName = fileName.toLowerCase();\n return lowerName.endsWith('.fa') ||\n lowerName.endsWith('.fasta') ||\n lowerName.endsWith('.fa.gz') ||\n lowerName.endsWith('.fasta.gz');\n }\n\n public static isReadsFile(fileName: string): boolean {\n const lowerName = fileName.toLowerCase();\n return lowerName.endsWith('.fq') ||\n lowerName.endsWith('.fastq') ||\n lowerName.endsWith('.fq.gz') ||\n lowerName.endsWith('.fastq.gz');\n }\n\n public static isSupportedGeneticFile(fileName: string): boolean {\n return UploadUtil.isGenomeFile(fileName) || UploadUtil.isReadsFile(fileName);\n }\n\n\n public static isTextFile(fileName: string): boolean {\n const lowerName = fileName?.toLowerCase();\n return lowerName?.endsWith('.csv') || lowerName?.endsWith('.tsv') || lowerName?.endsWith('.txt');\n }\n\n public static isXlsxFile(fileName: string): boolean {\n return fileName?.toLowerCase()?.endsWith('.xlsx');\n }\n\n public static matchColumnLabel(columnLabel: string, col: CaseDbCol): boolean {\n if (!columnLabel || typeof columnLabel !== 'string') {\n return false;\n }\n const labelLowerCase = columnLabel.toLocaleLowerCase();\n return labelLowerCase === col.label.toLocaleLowerCase() || labelLowerCase === col.code.toLowerCase() || labelLowerCase === col.id.toLocaleLowerCase();\n }\n\n public static async readFileAsBase64(file: File): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const result = reader.result as string;\n const base64 = result.split(',')[1]; // Remove data:*/*;base64, prefix\n resolve(base64);\n };\n reader.onerror = (_) => {\n reject(Error('File read error'));\n };\n reader.readAsDataURL(file);\n });\n }\n\n public static async readRawData(fileList: FileList, sheet?: string): Promise<string[][]> {\n const file = fileList[0];\n const fileName = file.name.toLowerCase();\n let result: string[][];\n\n if (UploadUtil.isTextFile(fileName)) {\n // Parse CSV file\n let text = await file.text();\n if (fileName.endsWith('.tsv')) {\n // Convert TSV to CSV by replacing tabs with commas\n text = text.replace(/\\t/g, ',');\n }\n if (fileName.endsWith('.txt')) {\n // Attempt to auto-detect delimiter (comma, tab, semicolon)\n const lines = text.split(/\\r?\\n/).filter(line => line.trim() !== '');\n if (lines.length > 0) {\n const delimiters = [',', '\\t', ';'];\n let bestDelimiter = ',';\n let maxFields = 0;\n delimiters.forEach(delimiter => {\n const fieldsCount = lines[0].split(delimiter).length;\n if (fieldsCount > maxFields) {\n maxFields = fieldsCount;\n bestDelimiter = delimiter;\n }\n });\n if (bestDelimiter !== ',') {\n const regex = new RegExp(bestDelimiter.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'g');\n text = text.replace(regex, ',');\n }\n }\n }\n result = parse(text, {\n columns: false, // Keep as array of arrays\n skip_empty_lines: true,\n trim: true,\n });\n } else if (UploadUtil.isXlsxFile(fileName)) {\n // Parse Excel file\n const excelData = sheet\n ? await readSheet(file, sheet, { trim: true })\n : await readSheet(file, { trim: true });\n result = UploadUtil.mapExcelSheetData(excelData);\n } else {\n throw new Error('Unsupported file format. Please select a CSV or Excel file.');\n }\n if (result.length < 2 || result[0].length < 2) {\n throw new Error('The selected file does not contain enough data. Please ensure it has at least a header row and one data row.');\n }\n return result;\n }\n\n public static reportFileUploadProgress(kwArgs: {\n endPercentage: number;\n fileSize: number;\n message: string;\n onProgress: (progress: number, message: string) => void;\n startPercentage: number;\n totalFileSizeToUpload: number;\n uploadedFileSize: number;\n }): void {\n const {\n endPercentage,\n fileSize,\n message,\n onProgress,\n startPercentage,\n totalFileSizeToUpload,\n uploadedFileSize,\n } = kwArgs;\n\n const percentageRange = endPercentage - startPercentage;\n const percentageRangePerByte = percentageRange / totalFileSizeToUpload;\n const overallProgress = startPercentage + (uploadedFileSize * percentageRangePerByte) + (fileSize * percentageRangePerByte);\n\n onProgress(overallProgress, message);\n }\n\n public static async uploadFilesForCases(kwArgs: {\n assemblyProtocolId: string;\n caseBatchUploadResult: CaseDbCaseBatchUploadResult;\n completeCaseType: CaseDbCompleteCaseType;\n createdInDataCollectionId: string;\n endPercentage: number;\n mappedColumns: UploadMappedColumn[];\n onComplete: () => void;\n onError: (error: Error) => void;\n onProgress: (progress: number, message: string) => void;\n sampleIdColId: string;\n selectedValidatedCases: CaseDbCaseUploadResult[];\n sequenceFilesDataTransfer: DataTransfer;\n sequenceMapping: UploadSequenceMapping;\n sequencingProtocolId: string;\n signal: AbortSignal;\n startPercentage: number;\n }): Promise<void> {\n const {\n caseBatchUploadResult,\n endPercentage,\n onProgress,\n sequenceFilesDataTransfer,\n sequenceMapping,\n signal,\n startPercentage,\n } = kwArgs;\n\n const seqsToBeUploaded: Array<{ caseId: string; colId: string; fileName: string }> = [];\n const readSetsToBeUploaded: Array<{ caseId: string; colId: string; fileName: string; is_fwd: boolean }> = [];\n let totalFileSizeToUpload = 0;\n\n for (const [index, caseUploadResult] of caseBatchUploadResult.cases.entries()) {\n const { id } = kwArgs.selectedValidatedCases[index];\n if (sequenceMapping[id]) {\n const caseId = caseUploadResult.id;\n for (const [colId, fileName] of Object.entries(sequenceMapping[id].sequenceFileNames)) {\n if (fileName) {\n const file = Array.from(sequenceFilesDataTransfer.files).find(f => f.name === fileName);\n if (file) {\n seqsToBeUploaded.push({ caseId, colId, fileName });\n totalFileSizeToUpload = totalFileSizeToUpload + (file?.size || 0);\n }\n }\n }\n for (const [colId, fileNames] of Object.entries(sequenceMapping[id].readsFileNames)) {\n if (fileNames.fwd) {\n const file = Array.from(sequenceFilesDataTransfer.files).find(f => f.name === fileNames.fwd);\n if (file) {\n readSetsToBeUploaded.push({ caseId, colId, fileName: fileNames.fwd, is_fwd: true });\n totalFileSizeToUpload = totalFileSizeToUpload + (file?.size || 0);\n }\n }\n if (fileNames.rev) {\n const file = Array.from(sequenceFilesDataTransfer.files).find(f => f.name === fileNames.rev);\n if (file) {\n readSetsToBeUploaded.push({ caseId, colId, fileName: fileNames.rev, is_fwd: false });\n totalFileSizeToUpload = totalFileSizeToUpload + (file?.size || 0);\n }\n }\n }\n }\n }\n\n // upload in order of cases\n let uploadedFileSize = 0;\n for (const caseUploadResult of caseBatchUploadResult.cases) {\n const caseSeqToBeUploaded = seqsToBeUploaded.find(s => s.caseId === caseUploadResult.id);\n const caseReadSetsToBeUploaded = readSetsToBeUploaded.filter(rs => rs.caseId === caseUploadResult.id);\n\n if (caseSeqToBeUploaded) {\n const file = Array.from(sequenceFilesDataTransfer.files).find(f => f.name === caseSeqToBeUploaded.fileName);\n if (file) {\n const fileSize = file.size;\n const base64Data = await UploadUtil.readFileAsBase64(file);\n await CaseDbCaseApi.getInstance().createFileForSeq(caseSeqToBeUploaded.caseId, caseSeqToBeUploaded.colId, {\n file_compression: FileUtil.getFileCompressionFromFileName(caseSeqToBeUploaded.fileName),\n file_content: base64Data,\n file_format: CaseDbSeqFileFormat.FASTA,\n }, { signal });\n UploadUtil.reportFileUploadProgress({\n endPercentage,\n fileSize,\n message: t('Uploading sequence file \"{{fileName}}\" for case ID \"{{caseId}}\"...', { caseId: caseSeqToBeUploaded.caseId, fileName: caseSeqToBeUploaded.fileName }),\n onProgress,\n startPercentage,\n totalFileSizeToUpload,\n uploadedFileSize,\n });\n uploadedFileSize += fileSize;\n }\n }\n for (const caseReadSetToBeUploaded of caseReadSetsToBeUploaded) {\n const file = Array.from(sequenceFilesDataTransfer.files).find(f => f.name === caseReadSetToBeUploaded.fileName);\n if (file) {\n const fileSize = file.size;\n const base64Data = await UploadUtil.readFileAsBase64(file);\n await CaseDbCaseApi.getInstance().createFileForReadSet(caseReadSetToBeUploaded.caseId, caseReadSetToBeUploaded.colId, {\n file_compression: FileUtil.getFileCompressionFromFileName(caseReadSetToBeUploaded.fileName),\n file_content: base64Data,\n file_format: CaseDbReadsFileFormat.FASTQ,\n is_fwd: caseReadSetToBeUploaded.is_fwd,\n }, { signal });\n UploadUtil.reportFileUploadProgress({\n endPercentage,\n fileSize,\n message: t('Uploading read set file \"{{fileName}}\" for case ID \"{{caseId}}\"...', { caseId: caseReadSetToBeUploaded.caseId, fileName: caseReadSetToBeUploaded.fileName }),\n onProgress,\n startPercentage,\n totalFileSizeToUpload,\n uploadedFileSize,\n });\n uploadedFileSize += fileSize;\n }\n }\n }\n }\n\n private static idToRegex(id: string): RegExp {\n // Create regex that matches the id somewhere in a string\n return new RegExp(id.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'));\n }\n\n private static mapExcelCellToString(cell: CellValue | null): string {\n if (cell instanceof Date) {\n return format(cell, DATE_FORMAT.DATE);\n }\n if (cell === null || cell === undefined) {\n return '';\n }\n return cell.toString();\n }\n\n private static mapExcelSheetData(sheetData: SheetData): string[][] {\n return sheetData.map(row => row.map(cell => UploadUtil.mapExcelCellToString(cell)));\n }\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAA,KAAe,EACb,gBAAgB,SAAwB,GAAS;CAM/C,OAAO,IAAI,UAAU,CAAC,CAAC,gBAAgB,EAAQ,KAAK,GAAG,UAAU;AACnE,EACF;;;ACaA,SAAwB,GAAqB,GAAO,GAAS;CAC3D,OAAO,GAAkC,GAAO,GAAS,IAAY,EAAI;AAC3E;AASA,SAAgB,GAAkC,GAAO;CACvD,IACE,KADS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAA,IAAY,UAAU,KAAK,CAAC,EAAA,CAC/D,QACb,IAAQ,UAAU,SAAS,IAAI,UAAU,KAAK,KAAA;CAIlD,OAHc,UAAU,SAAS,KAAI,UAAU,IAGxC,EAAM,IAAI,WAAW,CAAK,GAAG,EAElC,QAAQ,SAAgB,GAAM;EAM5B,OALI,IACK,EAAQ,EACb,MAAM,EAAK,KACb,CAAC,IAEI;CACT,EACF,CAAC;AACH;AACA,SAAS,GAAW,GAAS;CAC3B,OAAO,IAAI,QAAQ,SAAU,GAAS,GAAQ;EAI5C,EAAM,GAAS,SAAU,GAAO,GAAO;GACrC,AAAI,IACF,EAAO,CAAK,IAEZ,EAAQ,CAAK;EAEjB,CAAC;CACH,CAAC;AACH;;;AC3DA,SAAwB,GAAsC,GAAS;CAErE,KAAK,IADD,IAAmB,CAAC,GACf,IAAK,GAAG,IAAe,OAAO,KAAK,CAAO,GAAG,IAAK,EAAa,QAAQ,KAAM;EACpF,IAAI,IAAM,EAAa;EACvB,EAAiB,KAAO,EAAU,EAAQ,EAAI;CAChD;CACA,OAAO;AACT;;;ACN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