{"version":3,"sources":["coreComponents/Select/Context.tsx","coreComponents/Loading/Loading.tsx","coreComponents/ErrorBoundary/ErrorBoundaryFooter.tsx","coreComponents/Layout/PrivateLayout.tsx","coreComponents/Layout/components/PublicTopbar.tsx","coreComponents/Layout/components/PublicFooter.tsx","coreComponents/Layout/PublicLayout.tsx","features/core/Embargo/contexts/DataplusEmbargoContext.ts","coreComponents/ErrorBoundary/AccessDeniedErrorScreen.tsx","features/core/Permissions/components/CommonPermissions.tsx","coreComponents/logos/TheLogo/TheLogo.tsx","features/core/Tracking/hooks/useTracking.ts","features/core/Permissions/components/RequireClientRole.tsx","utils/getPermissionToken.ts","coreComponents/BrowserSupport/BrowserSupport.tsx","coreComponents/Topbar/Topbar.tsx","features/explore/viewScenario/providers/constants.tsx","coreComponents/ProductTopbar/wurRankingQuery.ts","coreComponents/Select/components/SelectGroupLabel.tsx","coreComponents/Select/components/SelectGroup.tsx","coreComponents/Select/components/SelectItemCheckbox.tsx","coreComponents/Select/components/SelectItemRadio.tsx","coreComponents/Select/components/SelectItemVariant.tsx","coreComponents/Select/components/SelectItem.tsx","coreComponents/Select/components/SelectDropdown.tsx","coreComponents/Select/Select.tsx","coreComponents/Section/Section.tsx","coreComponents/UpsellScreen/UpsellScreen.tsx","features/explore/viewScenario/scenarioAndWurResultQuery.ts","utils/formatUtils.ts","features/core/Embargo/components/DataPlusEmbargoProvider.tsx","providers/ChartThemeProvider/ChartThemeProvider.tsx","features/core/QueryBuilderContext/contexts/QueryBuilderContext.ts","features/core/QueryBuilderContext/components/QueryBuilderProvider.tsx","utils/getPermissionList.ts","coreComponents/Heading/Heading.tsx","features/core/Dashboard/components/SettingsButton.tsx","features/sdgImpact/details/SdgUpsell/SdgUpsell.tsx","coreComponents/Sidebar/DataPointsLogoText.tsx","coreComponents/Sidebar/SidebarTriggers.tsx","coreComponents/Sidebar/SidebarGroup.tsx","coreComponents/Sidebar/Sidebar.tsx","features/core/Years/contexts/YearsContext.ts","features/core/Years/components/Years.tsx","types/generated/graphql.ts","utils/valueFormatters/valueFormatter.ts","utils/valueFormatters/scoreFormatter.ts","coreComponents/QueryBuilder/utils.ts","features/core/Environment/contexts/EnvironmentContext.ts","features/core/Environment/components/Environment.tsx","features/core/Auth/contexts/AuthContext.ts","utils/parseJwt.ts","features/core/Auth/components/AuthProvider.tsx","features/core/Auth/components/Auth.tsx","../../shared/permissions/utils.js","features/core/Institution/contexts/InstitutionContext.ts","features/core/Institution/components/SelectInstitutionSplashScreen.tsx","features/core/Institution/components/Institution.tsx","features/core/Tracking/components/EventTrackingApp.tsx","features/core/Tracking/components/EventTrackingPage.tsx","features/core/Tracking/components/EventTrackingSection.tsx","features/core/Tracking/components/MzTracking.tsx","features/core/Tracking/utils/mz.ts","features/core/Tracking/hocs/withEventTracking.tsx","features/explore/utils/index.ts","features/explore/createScenario/submissionQuery.ts","features/explore/viewScenario/providers/ScenarioDataProvider.tsx","providers/ChartThemeProvider/index.ts","features/core/Permissions/components/RequirePermission.tsx","coreComponents/PeerSelector/PeerSelector.tsx","coreComponents/QueryBuilder/constants.ts","coreComponents/QueryBuilder/reducer.ts","coreComponents/QueryBuilder/QueryBuilder.tsx","coreComponents/QueryBuilder/actions.ts","coreComponents/DownloadLink/DownloadLink.tsx","coreComponents/ProductTopbar/DownloadDropdown.tsx","coreComponents/ProductTopbar/ProductTopbar.tsx","coreComponents/PeerSelector/getPeerSelectorData.ts","coreComponents/Pagination/Pagination.tsx","coreComponents/logos/logoUtils.ts","features/dataplus/components/DataPlusTopbar.tsx","../../shared/permissions/index.js","features/core/Permissions/components/Permissions.tsx","features/core/Permissions/components/LegacyPermissions.tsx","features/core/Permissions/components/RequireRole.tsx","features/core/PageQuery/contexts/PageQueryContext.ts","features/core/PageQuery/components/PageQuery.tsx","features/core/PageQuery/index.ts","../../shared/permissions/datapoints/index.js","../../shared/permissions/dataplus/index.js","../../shared/permissions/dataplus/constants.js","../../shared/permissions/wur/index.js","../../shared/permissions/wur/constants.js","../../shared/permissions/wurReporterInterim/index.js","../../shared/permissions/wurReporterInterim/constants.js","../../shared/permissions/submission/index.js","../../shared/permissions/explore/index.js","../../shared/permissions/explore/constants.js","../../shared/permissions/auth/index.js","../../shared/permissions/auth/constants.js","../../shared/permissions/legacy/index.js","../../shared/permissions/sdgImpact/index.js","../../shared/permissions/sdgImpact/constants.js","../../shared/permissions/reputation/index.js","../../shared/permissions/reputation/constants.js","../../shared/permissions/reputationPlus/index.js","../../shared/permissions/reputationPlus/constants.js","../../shared/permissions/japanRankingsDashboard/index.js","../../shared/permissions/dataplusNewData/index.js","../../shared/permissions/dataplusLatam/index.js","../../shared/permissions/cid/index.js","../../shared/permissions/collegeRankingsDashboard/index.js","../../shared/permissions/bundle/index.js","coreComponents/Card/Card.tsx","features/core/SdgQuiz/components/QuestionFormItemSelect.tsx","providers/ThemeProvider/theme.ts","providers/ThemeProvider/ThemeProvider.tsx","config/auth0Config.ts","features/core/Auth0/contexts/AuthContext.ts","features/core/Auth0/components/Auth0Provider.tsx","features/core/Auth0/components/Auth0.tsx","providers/ApolloProvider/ApolloProvider.tsx","providers/LaunchDarklyProvider/LaunchDarklyProvider.tsx","features/core/NotFound/NotFound.tsx","features/core/Tracking/components/EventTrackingPageView.tsx","coreComponents/PrivateRoute/PrivateRoute.tsx","coreComponents/PublicRoute/PublicRoute.tsx","coreComponents/PublicAndPrivateRoute/PublicAndPrivateRoute.tsx","features/core/网曝门/images/homepage-header-background.jpg","features/core/网曝门/components/网曝门Header.tsx","features/core/网曝门/components/网曝门Info.tsx","features/core/网曝门/images/world_data_customers_v2_0.png","features/core/网曝门/components/网曝门World.tsx","features/core/网曝门/components/网曝门Customers.tsx","features/core/网曝门/images/australian_national_uni_logo.png","features/core/网曝门/images/durham_uni_logo.png","features/core/网曝门/images/emory-univ.png","features/core/网曝门/images/glasgow_logo.png","features/core/网曝门/images/groningen_logo-en.png","features/core/网曝门/images/johns_hopkins_logo.png","features/core/网曝门/images/lmu_muenchen_logo.svg_.png","features/core/网曝门/images/lomonosovlogo.png","features/core/网曝门/images/mit_logo_0.png","features/core/网曝门/images/nus_logo.png","features/core/网曝门/images/seol_national_uni_logo.png","features/core/网曝门/images/trinity-college-dublin-446-logo.png","features/core/网曝门/images/hk_poly_u_logo.png","features/core/网曝门/images/ubc-logo.png","features/core/网曝门/images/uhk_logo.png","features/core/网曝门/images/university_of_melbourne_australia.png","features/core/网曝门/images/university-of-tokyo_logo1.png","features/core/网曝门/images/university-of-toronto.png","features/core/网曝门/images/uoalogohb.png","features/core/网曝门/images/uofhelsinki_logo.png","features/core/网曝门/images/usyd_new_logo.png","features/core/网曝门/images/washington_st_louis_logo.png","features/core/网曝门/images/wits-logo.png","features/core/网曝门/images/zhejiang_university_logo.svg_.png","features/core/网曝门/images/hong_kong_university_of_science_technology_0.png","features/core/网曝门/images/monterrey-institute-of-technology-and-higher-educa_0.jpg","features/core/网曝门/images/nanyang_technological_university.jpg","features/core/网曝门/components/网曝门Quotes.tsx","features/core/网曝门/components/网曝门.tsx","features/core/Dashboard/components/DashboardPageCard.tsx","features/core/Dashboard/components/ProductCard.tsx","features/core/Dashboard/components/DashboardTopbar.tsx","coreComponents/ServiceCard/ServiceCard.tsx","features/core/Dashboard/components/OtherServices.tsx","features/core/Dashboard/components/Dashboard.tsx","features/core/Faqs/components/Faqs.tsx","features/core/SdgQuiz/utils/index.ts","features/core/SdgQuiz/components/SdgIndicator.tsx","features/core/SdgQuiz/components/SdgItemWithIndicators.tsx","features/core/SdgQuiz/components/SkipSdg.tsx","features/core/SdgQuiz/images/sdg-sprite.png","features/core/SdgQuiz/components/SdgImageContainer.tsx","features/core/SdgQuiz/components/SdgHeaderCard.tsx","features/core/SdgQuiz/components/QuestionFormItem.tsx","features/core/SdgQuiz/components/QuizBtn.tsx","features/core/SdgQuiz/images/lamp.svg","features/core/SdgQuiz/components/Relevance.tsx","features/core/SdgQuiz/components/QuestionsForm.tsx","features/core/SdgQuiz/components/IndicatorsAccordion.tsx","features/core/SdgQuiz/components/QuestionPage.tsx","features/core/SdgQuiz/components/StartPage.tsx","features/core/SdgQuiz/images/the-logo.png","features/core/SdgQuiz/images/top-line.svg","features/core/SdgQuiz/components/SdgCategoryHeader.tsx","features/core/SdgQuiz/components/InfoPage.tsx","features/core/SdgQuiz/components/FinishPage.tsx","features/core/SdgQuiz/components/SdgQuiz.tsx","Router.tsx","features/core/AppUpdateNotification/components/UpdateNotification.tsx","features/core/AppUpdateNotification/components/AppUpdateNotification.tsx","features/core/NewRelic/components/NewRelic.tsx","App.tsx","index.tsx","features/core/Permissions/contexts/PermissionsContext.ts","hooks/useLogger.ts","features/core/Tracking/contexts/TrackingContext.ts","coreComponents/ErrorBoundary/contexts/ErrorBoundaryContext.ts","coreComponents/ErrorBoundary/ErrorMessageFull.tsx","coreComponents/ErrorBoundary/ErrorMessageLite.tsx","coreComponents/ErrorBoundary/ErrorBoundary.tsx","features/dataplus/layout.tsx","features/dataplus/testTableauPage/components/TableauDashboard.tsx","utils/useTableauToken.ts","features/dataplus/testTableauPage/components/TableauTokenProvider.tsx","features/dataplus/testTableauPage/TableauPagePrivate.tsx","features/dataplus/config.ts","features/dataplus/testTableauPage/TableauPagePublic.tsx","coreComponents/LegacyAppLayout/LegacyAppLayout.tsx","coreComponents/SupportMessageInProduct/SupportMessageInProduct.tsx","features/dataplusLatam/config.tsx","features/explore/config.ts","features/wurReporterInterim/config.ts","features/reputation/config.tsx","features/sdgImpact/config.tsx","config/products.ts","features/core/Products/contexts/ProductsContext.ts","features/core/Products/components/Products.tsx","features/core/AppLoading/AppLoading.tsx","hooks/useSessionStorage.ts"],"names":["ROOT_PARENT_ID","defaultSelectionData","parentKey","selectedGroupIds","SelectContext","createContext","setSelectionData","selectionData","DataPointsLogo","color","fontSize","fontFamily","textAlign","mb","as","display","Loading","width","height","loaderSize","showLogo","flexProps","useToken","gridLoaderColour","loaderBoxesBorderRadius","useState","showIndicator","setShowIndicator","useEffect","t","setTimeout","clearTimeout","w","h","justify","align","flexDirection","alignItems","sx","div","borderRadius","size","margin","Math","ceil","ErrorFooter","useAuth","keycloak","logOut","actions","baseUrl","useEnvironment","authServerUrl","realm","handleLogout","useCallback","redirectUri","p","variant","colorScheme","onClick","client","role","Link","href","ml","isExternal","PrivateLayout","children","sidebarWrapperProps","contentWrapperProps","position","left","base","xl","zIndex","Sidebar","lg","maxWidth","mt","px","py","BrowserSupport","网曝门Topbar","logIn","flags","useFlags","navigate","useNavigate","Topbar","justifyContent","darkVariant","maxW","flexGrow","cursor","TheLogo","maxHeight","mr","spacing","state","scrollTo","leftIcon","camelCase","footerPages","title","links","text","网曝门Footer","bg","pb","pt","columns","map","key","fontWeight","my","listStyleType","startsWith","to","Date","getFullYear","PublicLayout","PublicTopbar","flexDir","PublicFooter","defaultContextValue","availableSelectedYear","availableYearOnYears","availableEmbargoYears","canViewMainEmbargo","canViewFreeEmbargo","DataPlusEmbargoContext","useDataplusEmbargoData","useContext","AccessDeniedErrorScreen","FooterComponent","footerComponent","canUseElevatedPermissions","useElevatedPermissions","setUseElevatedPermissions","direction","CommonPermissions","resourcePermissions","refetchPermissions","groups","isAuthenticated","roles","permissionToken","permissionList","hasResourcePermission","resourceArg","actionArg","requireAny","reduce","carry","r","a","resource","action","allow","allowForResourceAction","hasResourcePermissionNew","year","institutionId","sdgId","checkPermissions","hasRole","requiredRoles","includes","hasRealmRole","hasClientRole","hasResourceRole","hasGroup","requiredGroups","group","getUserAvailableYearsForProduct","partialProductName","permissions","JSON","parse","Buffer","from","split","toString","formattedPermissions","formatPermissions","availablePermissions","filter","permission","yearRegex","uniqueYears","Set","forEach","subscription","match","add","Number","Array","sort","Provider","value","resources","boxProps","calculateWidthAndHeight","baseHeight","baseWidth","undefined","viewBox","version","id","stroke","strokeWidth","fill","fillRule","transform","points","EventType","useTracking","trackingContext","TrackingContext","enableTracking","environment","location","useLocation","auth","institution","useInstitution","trackEvent","event","eventType","payload","pageMetadata","userMetadata","window","_mz","replacePageMetadata","replaceUserMetadata","emit","document","dispatchEvent","CustomEvent","detail","type","data","trackMzEvent","eventTitle","metadata","section","user","name","app","pageGroup","subsection","page","pagename","pathname","language","orgname","organisation","e","message","newrelic","addPageAction","userId","organisationId","organisationName","RequireClientRole","DeniedComponent","usePermissions","getPermissionToken","apiEndpoint","authToken","elevated","selectedInstitutionId","PERMISSION_URL","headers","authorization","axios","get","response","token","console","log","showBanner","setShowBanner","visibility","top","status","padding","boxSize","flex","target","right","TopbarHeading","titleAcronym","Heading","md","sm","isTruncated","TopbarLogo","logger","useLogger","logoBg","logoColour","institutionLogoUrl","useMemo","url","URL","logo","searchParams","append","warn","src","fitSidebar","withLogo","dropdownRef","rank","props","minH","el","index","ref","DEFAULT_YEAR","CURRENT_YEAR","QUERY_SELECTOR_YEAR","AVAILABLE_METHODOLOGY_YEARS","getWurRankingData","gql","wurRankingDataQuery","variables","isInteger","level1Id","releaseName","responseFields","SelectGroupLabel","isFirstGroup","dark","mx","borderTop","borderColor","textTransform","SelectGroup","label","outline","SelectItemCheckbox","isChecked","_hover","onChange","SelectItemRadio","SelectItemVariant","isOpen","ChevronDown16","transition","pointerEvents","SelectItem","option","getItemProps","getMenuProps","groupMeta","onExpandableClick","onItemClick","forceGroupSelections","stopPropagation","options","meta","SelectDropdown","openSubgroupId","setOpenSubgroupId","isRadioButton","groupToUpdate","valueToUpdate","updatedValue","updatedGroup","assoc","updatedSelectedIds","previousState","optionIndex","isItemChecked","Fragment","groupLabel","ChevronIcon","ChevronDown20","getDefaultSelections","initData","selections","getNextValue","parentId","selected","isArray","sel","Select","defaultSelectedData","useSelect","items","selectedItem","getLabelProps","getToggleButtonProps","defaultSelections","createRef","selectedLabel","setSelectedLabel","setIsOpen","useClickAway","updatedSelections","groupIds","onChangeData","keys","selectedItems","pickBy","Boolean","length","groupId","flatten","renderLabel","acc","selectedItemKey","find","findChildLabel","found","childLabel","rightIcon","_active","isDisabled","overflow","whiteSpace","textOverflow","boxShadow","border","maxH","Section","Card","Header","Title","Description","UpsellScreen","productPath","pagePath","PAGE_VIEW","alignContent","rowGap","justifySelf","CLICK","elementTagName","lineHeight","List","item","CheckmarkFilled32","Icon","Component","component","scenarioInputFields","scenatioResults","getScenarioQuery","getWurReporterInterimScenarioQuery","getWurQuery","scenarioQueryVariables","scenarioId","allowScoresForExcluded","fetchPolicy","skip","wurQueryVariables","formatToDecimalOrLeaveIntact","val","toFixed","convertToRoundedFloatOrReturnOriginal","input","normalizedInput","replace","num","parseFloat","isNaN","numStr","start","end","endsWith","formatBandedValue","higher","lower","formatScore","score","formatRank","jointRanked","roundScore","numberOfDecimalPlaces","scaleFactor","round","getAvailableSelectedYear","isAfterEmbargoDate","isAfterFreeEmbargoDate","isAfterWurDetailsEmbargoDate","isDetailsPage","years","selectedYear","yearKeys","Object","b","availableYear","getLatestAvailableYear","DataPlusEmbargoProvider","viewEmbargoAction","viewFreeEmbargoAction","usePageQuery","query","availableSelectedYears","entries","embargoYears","freeEmbargoYears","indexOf","slice","getAvailableYearOnYears","reverse","getAvailableEmbargoYears","ChartThemeContext","VictoryTheme","grayscale","getThemeColors","themeColors","colors","colorKey","ChartThemeProvider","chakraTheme","useTheme","defaultColorScale","theme","line","colorScale","scatter","axis","style","grid","gray","tickLabels","boxplot","min","max","q1","fillOpacity","q3","median","stack","legend","orientation","gutter","y","tooltip","cornerRadius","flyoutPadding","flyoutStyle","white","compiledTheme","mergeDeepRight","config","filters","selectedYears","querySelectOne","querySelectTwo","querySelectThree","selectedFilters","setConfig","applyChanges","QueryBuilderContext","useQueryBuilder","updateSelectorState","selectorKey","selector","prevState","selectorConfig","selectedChildren","updatedOptions","i","getSelectorData","QueryBuilderProvider","initialConfig","setQuery","setSelectedYears","setSelectedFilters","setQuerySelectOne","setQuerySelectTwo","setQuerySelectThree","useSessionStorage","sessionStorageValues","setSessionStorageValues","pageName","setPageName","setPageConfig","newConfig","newPageName","args","indicator","dimension","groupBy","groupByKey","indicatorDataKey","cleanedConfig","resetSelectedValues","pre","sessionStorageValue","indicatorData","selectedKey","mapItem","filteredOptions","values","variableOptions","selectTwo","selectThree","groupByLabel","dataOptions","createQueryFromConfig","getPermissionList","asProp","defaultSize","headingAsProp","getDefaultHeadingSize","SettingsButton","hasManyInstitutions","institutionApiHeaders","apiHeaders","clearActiveInstitution","authApiHeaders","useCopyToClipboard","clipboardCopy","copyToClipboard","stringify","Button","minW","placement","_focus","bgColor","pr","htmlFor","m","checked","icon","open","accountManagement","SdgUpsell","CrossTab32","DataPointsLogoText","attrs","SidebarLink","isInGroup","isActive","pl","_before","content","SidebarButton","rest","paddingRight","SidebarGroup","userIsWithin","handleToggle","marginRight","MenuIcon","products","useProducts","productUserIsWithin","product","path","openGroup","setOpenGroup","isExpanded","setIsExpanded","mobileAndTabletDisplay","borderRight","borderRightColor","borderRightStyle","bottom","overflowY","overflowX","网曝门20","productConfig","noChildren","pages","hiddenPage","YearsContext","availableYears","wur","sed","sdg","reputation","japanrankingdashboard","cid","latam","crd","explore","useYears","Years","useQuery","releaseNames","error","Error","wurAvailableYears","releases","getReleaseYear","startDate","range","Continent","GraMetricAggregateType","GraQuarter","Methodology","Quarter","ResponseFields2ListItem","ResponseFieldsListItem","SortDirection","SubjectKeys","ValueType","WurMetricAggregateType","WurValueType","roundNumber","decimal","valueFormatter","valueType","imputed","pppToUsd","currency","Na","Reputation","Elsevier","Currency","numeral","format","Percentage","Portal","scoreFormatter","getQuerySelectOptions","prop","selectedMap","this","opt","propEq","getFilterSelectOptions","getDownloadFileName","suffix","Environment","FIRST_SUBDOMAIN_REGEX","hostname","port","apiHostname","calculateApiEndpointDefault","parseInt","date","keycloakConfig","clientId","launchDarklyConfig","clientSideID","newRelicConfig","accountId","licenseKey","appId","classicUrl","UNKNOWN","graURL","EnvironmentContext","localHostnameRegex","stagingNonIACGenericRegex","stagingSharedIaCHostnameRegex","stagingIACGenericRegex","prodHostnameRegex","devStagingSharedIaCHostnameRegex","commonConfig","getBuildMetaValue","htmlEl","metaName","metaElement","querySelector","getAttribute","getBuildInfo","origin","test","calculateApiEndpoint","environmentData","EnvironmentEnum","DEV","STAGING","PRODUCTION","contextValue","getElementsByTagName","emptyKeyCloakAuthFunction","Promise","resolve","isAdmin","setPermissionToken","AuthContext","parseJwt","parts","base64","jsonPayload","decodeURIComponent","atob","c","charCodeAt","join","AuthProvider","renderChildren","useKeycloak","keycloakToken","setIsLoading","useAppLoading","authenticated","tokenParsed","realm_access","useLocalStorage","sub","previousUseElevatedPermisisons","usePrevious","setIsAdmin","setPermissionList","fetchPermissionsToken","permissionsToken","permissionsTokenParsed","fetchPermissionsList","list","then","authContextValue","username","preferred_username","givenName","given_name","familyName","family_name","email","login","fn","logout","sessionStorage","clear","Auth","keycloakInitialised","setKeycloakInitialised","initializeFailed","setInitializeFailed","Keycloak","keycloakError","setKeycloakError","useTimeoutFn","initConfig","onLoad","silentCheckSsoRedirectUri","onEvent","eventMessage","eventErrorMessage","LOGIN","LOGIN_FAIL","errorMessage","module","exports","fromEntries","uid","String","defaultInstitutionContext","country","countryCode","continent","currencyCode","setActiveInstitution","InstitutionContext","InstitutionTile","imageHeight","alt","SelectInstitutionSplashScreen","searchValue","setSearchValue","currentPage","setCurrentPage","debouncedSearchValue","setDebouncedSearchValue","useDebounce","useLazyQuery","findMyInstitutions","findInstitutionLoading","loading","findInstitutionError","findInstitutionData","search","perPage","selectInstitution","pageCount","myInstitutions","closeOnOverlayClick","closeOnEsc","onClose","minHeight","gridGap","placeholder","institutions","isLoaded","count","total","Pagination","current","Institution","savedActiveInstitutionId","setSavedActiveInstitutionId","initialInstitutionLoading","initialInstitutionError","initialInstitutionData","useMutation","onError","validateInstitutionIdMutation","validateInstitutionIdLoading","validateInstitutionIdData","validateInstitutionId","fetchPermissionToken","hasMore","orgId","ErrorBoundaryFooter","validateInstitution","EventTrackingApp","applicationName","EventTrackingPage","EventTrackingSection","MzTracking","useMount","TES","domain","_mz_def","d","n","push","f","loadMzSync","reject","script","createElement","body","appendChild","onload","onerror","async","SUPPORTED_EVENTS","withEventTracking","eventData","mutatedProps","eventKey","eventFn","result","nativeEvent","Event","withEventTrackingCallback","subjectsMap","overall","artsAndHumanities","businessAndEconomics","clinicalAndHealth","computerScience","education","engineering","law","lifeSciences","physicalSciences","psychology","socialSciences","measuresMap","numberOfAcademicStaff","numberOfAcademicStaffOfInternationalOrOverseasOrigin","numberOfResearchStaff","totalNumberOfStudents","totalNumberOfStudentsOfInternationalOrOverseasOrigin","totalNumberOfOutboundExchangeStudents","percentileFieldWeightedCitationImpact","influenceOfPublications","numberOfPatentsCitingResearch","numberOfPublicationsInTheTop10Percentile","numberOfUndergraduateDegreesAwarded","numberOfDoctoratesAwarded","numberOfResearchDoctoratesAwarded","numberOfProfessionalDoctoratesAwarded","totalInstitutionalIncome","researchIncome","researchIncomeFromIndustryAndCommerce","researchVotes","teachingVotes","totalPublications","citationScoreCnNormalised","citationScoreNormalised","internationalPublications","subjectIds","camelize","formFieldsWur2","formFieldsWur3","fieldsMeta","mandatory","subject","maxValue","ignored","wurReportersFieldsMeta","scenarioValidator","errors","hasApplicableSubject","applicable","errorMsg","fieldKey","subjectMissingFields","innerKey","innerValue","missingValue","fieldMeta","missingFields","isEmpty","initialValues","s","methodology","initialErrors","Overall","subjectIdToLabel","subjectId","formatInputObject","isWurReporterInterim","currentKey","formattedValues","omit","getScenarioParametersTableData","scenarioData","submissionData","scenarioMethodologyYear","tableData","measure","getWUR20MetricsExplanation","metric","explanation","getWUR30MetricsExplanation","wur20Columns","accessor","wur30Columns","getWUR20MetricsTable","empty","doctoratesToAcademicStaff","doctoratesToBachelorsDegreesAwarded","teachingReputation","incomeToAcademicStaff","studentsToAcademicStaffRatio","publicationsPerAcademicStaff","researchIncomeToAcademicStaff","researchReputation","citations","industryIncomeToAcademicStaff","proportionOfInternationalAcademicStaff","internationalCoAuthorship","proportionOfInternationalStudents","getWUR30MetricsTable","studentStaffRatio","doctoratBbachelorRatio","doctorateStaffRatio","institutionalIncome","researchProductivity","citationImpact","researchStrength","researchExcellence","researchInfluence","industryIncome","patents","internationalStudents","internationalStaff","studyingAbroad","aggregateLabels","aggregateKey","getIsWurReporterInterimPage","getIsRankedUniversity","prev","curr","defineMethodology","methodologyYear","getNormalizeDataSubmission","submission","omitSubmission","submissionWithoutTypenameWithUndefinedFields","omitValue","getScenarioMethodologyYear","requiredCommonFieldsWur2","requiredCommonFieldsWur3","getSubmissionQueryWur2","getSubmissionQueryWur3","defaultScenarioAndWurContext","freeze","selectedMethodologyYear","wurData","scenarioLoading","submissionLoading","wurLoading","currentYear","peers","selectedPeers","peersRegions","setSelectedPeers","setSelectedMethodologyYear","levelDefinitions","availableMethodologiesYears","ScenarioAndWurContext","useScenarioAndWurData","ScenarioAndWurDataProvider","pageConfig","EXPLORE_METHODOLOGY_3_ENABLED","INCLUDE_2025_IN_YEARS","useParams","getSubmissionQuery","scenarioQuery","scenarioError","scenario","wurReporterInterimScenario","wurError","productTitle","peersFullInfo","productName","toLowerCase","getProduct","institutionGroups","peerContinents","institutionInfo","peerCountries","wurRelease","RequirePermission","useNewPermissions","newAction","PeerSelector","selectedData","setSelectedData","setSearch","itemShouldBe","dataItem","child","areIncluded","pluck","childId","all","any","handleChange","clickedDataShape","childIds","innerChildIds","allInstitutions","selectedInstitutions","institute","allIds","dataToUse","isMatch","countriesThatMatchSearch","childrenThatMatchSearch","filterInstitutionsBySearch","borderBottom","isIndeterminate","parent","Flex","YEAR_CHANGE","QUERY_SELECT_ONE_CHANGE","QUERY_SELECT_TWO_CHANGE","QUERY_SELECT_THREE_CHANGE","initialState","isMapStatic","filterSelectOptions","reducer","querySelectOneData","selectTwoMeta","selectThreeMeta","updatedLabelKey","selectedOption","getOptions","bind","querySelectTwoDataOptions","querySelectTwoSelectedOptionKey","querySelectTwoData","querySelectThreeDataOptions","querySelectThreeFilteredDataOptions","querySelectThreeSelectedOptionKey","querySelectThreeData","querySelectTwoSelectedOption","querySelectThreeStaticOptions","querySelectThreeDynamicOptions","querySelectThreeUpdatedOptions","updatedLabel","QueryBuilder","setFilters","useReducer","dispatch","isMobile","useBreakpointValue","sanitisedFilters","templateColumns","columnGap","gridColumnEnd","selectedDataYears","equals","DownloadLink","fileType","params","setDownloadInProgress","toast","useToast","DOWNLOAD","responseType","timeout","contentBlob","Blob","objectUrl","createObjectURL","fileName","last","anchor","download","click","revokeObjectURL","duration","isClosable","fetchFile","MenuButtonAsButton","MenuButton","DownloadDropdown","urls","hasDownloadPermissionForExplore","hasDownloadPermissionForWurReporterInterim","disabled","xlsx","csv","ProductTopbar","hasPeerSelector","hasQueryBuilder","downloadUrls","currentTabIndex","isFilterVisible","isNewWur3Methodology","wurPeers","wurSelectedPeers","selectedGroupAnalysisPeers","selectedQueryBuilderPeers","downloadInProgress","scoresRegion","setSelectedYear","wurSetSelectedPeers","setSelectedGroupAnalysisPeers","setSelectedQueryBuilderPeers","explorePeers","exploreSelectedPeers","exploreSetSelectedPeers","isPeerGroupAnalysisPage","isExploreModule","filteredPeers","setFilteredPeers","queryBuilderConfig","queryBuilderFilters","applyQueryBuilderChanges","queryBuilderArgs","setQueryBuilderArgs","useRef","peerSelectorData","uniq","peer","countries","getPeerSelectorData","shouldShowDownload","shouldShowFilter","shouldShowTabs","isTabFitted","onQueryBuilderChange","onPeerSelectorChange","selectedPeerIds","onYearChange","onTopbarToggle","renderPeerSelector","renderQueryBuilder","downloadParams","TopbarButtonWithTrackingEvent","backgroundColor","defaultValue","borderStyle","borderWidth","containerRef","isFitted","_selected","alignSelf","prevValues","ListItem","listStyle","inputValue","setInputValue","debouncedInputValue","setDebouncedInputValue","cancelDebounce","changePage","diff","newInputValue","isInputValueNaN","onBlur","newValue","ratio","DataPlusTopbar","WUR_SUBJECTS_DOWNLOAD_ENABLED","institutionName","wurBanding","release","level1","lastIndexOf","hasDownloadPermission","yearsExcludingFirstYear","topbarConfig","DataPlusTopBarEmbargo","require","datapointsPermissions","dataplusPermissions","wurPermissions","wurReporterInterimPermissions","submissionPermissions","explorePermissions","authPermissions","legacyPermissions","sdgImpactPermissions","reputationPermissions","reputationPlusPermissions","japanRankingsDashboardPermissions","dataplusNewDataPermissions","dataplusLatamPermissions","cidPermissions","collegeRankingsDashboardPermissions","bundlePermissions","decodedToken","Permissions","refetch","perms","resourceActions","grant","LegacyPermissions","legacyResourcePermissions","PermissionsContext","Consumer","RequireRole","releaseDates","embargoEndDates","isAfterReleaseDate","embargoEndDate","selectedWurInterimPeers","wurInterimPeers","selectedGroup","continents","sortItems","sortBy","sortDirection","setQuerySelector","setSelectedWurInterimPeers","setSelectedGroup","setSortItems","setSortBy","setSortDirection","setScoresRegion","PageQueryContext","GetWurDashboardPageQuery","PageQuery","wurInterimProductName","activeProduct","productPeers","productGroups","selectedProduct","productLocations","locations","selectedYearIndex","setSelectedYearIndex","carryYears","releaseDate","compareAsc","freeEmbargoStartDate","wurDetailsEmbargoStartDate","yearIndex","selectedRelease","releaseLocations","ErrorBoundary","showDetailedErrorScreen","some","DATAPLUS_ACTIONS_OVERALL","DATAPLUS_ACTIONS","DATAPLUS_ACTION_ESSENTIAL","DATAPLUS_ACTION_CORE","DATAPLUS_ACTION_EMBARGO","DATAPLUS_ACTION_FREE_EMBARGO","DATAPLUS_ACTION_CORE_EMBARGO","DATAPLUS_ACTION_ESSENTIAL_EMBARGO","DATAPLUS_ACTION_TABLEAU","WUR_EMBARGO_ACTIONS","WUR_VIEW_ACTIONS","WUR_OVERALL_ACTIONS","WUR_ACTIONS","WUR_DATAPLUS_ADVANCED_ACTIONS","WUR_ACTIONS_WITHOUT_YEAR","wurAction","WUR_REPORTER_INTERIM_ACTIONS","WUR_REPORTER_INTERIM_ACTIONS_WITHOUT_YEAR","exploreAction","EXPLORE_ACTIONS","EXPLORE_ACTIONS_WITHOUT_YEAR","AUTH_ACTIONS","AUTH_ALL_ACTIONS","authAction","SDG_IMPACT_ACTIONS","sdgImpactAction","REPUTATION_ACTIONS","reputationAction","REPUTATION_PLUS_ACTIONS","reputationPlusAction","Answer","themeOverrides","breakpoints","styles","global","html","boxSizing","button","success","warning","darkBlue","the","red","purple","blue","redViolet","electricViolet","redOrange","fonts","fontSizes","xs","components","Checkbox","defaultProps","sizes","field","addon","customTheme","extendTheme","ThemeProvider","AUTH0_AUDIENCE","emptyAuth0AuthFunction","Auth0Provider","auth0AccessToken","setAuth0AccessToken","useAuth0","getAccessTokenSilently","loginWithRedirect","isLoading","audience","scope","accessToken","getAccessToken","getPermissionWrapper","Auth0","authorizationParams","ApolloProvider","authHeadears","httpLink","HttpLink","uri","genericApiLink","linkCallback","_","graLinkCallback","authLink","setContext","graAuthLink","apolloClient","ApolloClient","link","ApolloLink","operation","getContext","clientName","operationName","concat","cache","InMemoryCache","LaunchDarklyProvider","enabledProducts","userHasAccess","ldParams","custom","authRoles","authGroups","anonymous","NotFound","EventTrackingPageView","PrivateRoute","layout","Layout","React","layoutConfig","errorBoundaryId","trackingPageGroup","trackingPageName","upsellComponent","pageTitle","routeProps","Helmet","fallback","PublicRoute","PublicAndPrivateRoute","privateComponent","privateLayout","publicComponent","publicLayout","privateTrackingPageName","publicTrackingPageName","privatePageTitle","publicPageTitle","网曝门Header","backgroundImage","homeBackgroundImage","backgroundSize","backgroundRepeat","info","description","Binoculars32","Activity32","ScalesTipped32","Earth32","网曝门Info","borderTopStyle","网曝门World","customersAroundTheWorldImage","customerLogos","网曝门Customers","background","quotes","quote","person","Seperator","网曝门Quotes","Quotes32","fontStyle","网曝门","locationState","productRef","customersRef","otherServicesRef","requestDemoFormRef","scrollRefs","customers","otherServices","demo","scrollToRef","offsetTop","behavior","DashboardPageCard","borderLeftColor","borderLeft","minWidth","ProductCard","DashboardTopbar","myInstitutionName","myInstitutionId","DashboardEmbargoTopBar","ServiceCard","downloadUrl","fileExt","pop","services","Finance32","Star32","Portfolio32","Collaborate32","OtherServices","serviceProps","footerLinks","Dashboard","gridColumn","isDevProduct","faqs","question","answer","Faqs","countSdgs","countTotalQuestions","currentContent","countFilledSdgs","sdgNumber","sdgPrefix","countAnswersPoints","totalScore","calculatePercentage","numerator","denominator","useResponsive","useMediaQuery","contentJson","imgContainerSizes","containerWidthMobile","SdgIndicator","isMobileScreen","flexWrap","SdgItemWithIndicators","numericalIndicator","evidenceIndicator","policyQuestion","numberOfUniversitiesRanked2023","SkipSdg","updateFields","handleNext","textDecoration","updatedFields","SdgImageContainer","bgPosition","bgSize","imgWidth","imgHeight","relevanceType","bgImage","sdgSprite","bgRepeat","opacity","SdgHeaderCard","imgSpritePositionMobileSmall","imgSizeMobileSmall","imgSideMobileSmall","QuestionFormItemSelect","fieldName","YES","NO","MAYBE","QuestionFormItem","sdgType","questionTypeData","questions","idx","QuizBtn","Relevance","relevance","percentage","relevancePercentages","finalRelevance","low","notRelevant","medium","partialRelevant","relevant","itemColor","lampSvg","itemTitle","itemDescription","QuestionsForm","handleBack","numberOfSdgs","totalQuestionsCount","areAllFieldsFilledIn","answersPoints","questionType","IndicatorsAccordion","allowMultiple","QuestionPage","imgSpritePositionMobileLarge","imgSpritePositionDesktop","imgSizeDesktop","imgSideDesktop","StartPage","isValid","isRequired","required","isInvalid","firstName","errorBorderColor","surname","startPage","privacyPolicyText","privacyPolicyLink","SdgCategoryHeader","InfoPage","sdgCategories","filteredData","category","categoryTitle","numberOfSdgsPerCategory","imgSpritePositionsMobile","imgSpritePositionsDesktop","formSdgCategories","firstParagraph","firstPart","secondPart","secondParagraph","sdgCategory","imgSpritePosition","imgSizeMobileLarge","imgSideMobileLarge","FinishPage","sdgRelevance","skipped","calculateSDGRelevance","results_very_relevant","results_partly_relevant","results_not_very_relevant","results_skipped","sdgs","finishTitle","finishColor","finishDescription","SdgQuiz","keyName","pageIndex","setPageIndex","setData","setIsValid","CurrentPageComponent","sendData","post","topLineSvg","theLogo","aboutLink","aboutLinkSdgs","paddingTop","incomingData","reset","incomingDataKeys","fieldValue","isUserForm","isAllFieldsValid","every","ScrollTopOnRouteChange","PrivateRouteLayout","RouterComponent","notFoundRoute","default","basepath","process","pageQuery","parentPath","routerPath","authKey","UpdateNotification","dismissMessage","AppUpdateNotification","checkInterval","failedChecksThreshold","appVersion","setVersion","previousVersion","checkEnabled","setCheckEnabled","useCounter","failedChecks","countFailedCheck","inc","showUpdateMessage","setShowUpdateMessage","hideUpdateMessage","checkForUpdate","innerHTML","versionFromRequest","useInterval","NewRelic","accountID","applicationID","NREUM","loader_config","trustKey","agentID","beacon","errorBeacon","sa","queryClient","QueryClient","AuthenticatedApp","ErrorComponent","Products","Router","UnAuthenticatedApp","App","AuthComponent","defaultTitle","titleTemplate","history","createHistory","AppLoading","ReactDOM","render","getElementById","ERROR","PageType","ErrorBoundaryContext","crumbs","errorSuffix","ErrorMessageFull","isDeveloper","ApolloError","apolloError","networkError","graphQLErrors","getErrorTitle","getErrorMessage","ErrorMessageLite","detailedError","onErrorProp","thisBoundaryId","errorCrumbs","newErrorCrumbs","finishedLoading","FallbackComponent","errorType","resetErrorBoundary","DataPlusLayout","topbar","TableauDashboard","toolbar","useTableauToken","TABLEAU_TOKEN_URL","queryArguments","fetch","json","getTableauToken","enabled","refetchOnWindowFocus","TableauAuthContext","TableauTokenProvider","TableauPrivateDashboard","permissionsCheckArgs","canViewTableau","productPage","Overview","lazy","Pillars","PillarsUpsell","Metrics","MetricsUpsell","YearOnYear","YearOnYearUpsell","Subjects","SubjectsUpsell","BenchmarkSummary","BenchmarkSummaryUpsell","PeerGroupAnalysis","PeerGroupAnalysisUpsell","BibliometricAnalysis","BibliometricAnalysisUpsell","DetailedSubjects","DetailedSubjectsUpsell","InstitutionFinder","InstitutionFinderUpsell","dataplusConfig","ChartBar20","LegacyAppLayout","SupportMessageInProduct","flexFlow","BenchmarkInstitutions","ExecutiveSummary","dataplusLatamConfig","usesLegacyPermissions","featureFlagId","disabledFeatureComponent","SelectScenario","SelectScenarioUpsell","ScenarioDisabledUntilRelease","CreateScenario","ViewScenario","EditScenario","exploreConfig","ChartErrorBarAlt20","useNonYearPermissions","wurReporterInterimConfig","VotingAnalysis","AcademicInsights","Peers","Country","NationalVsInternational","SubjectBreakdown","NetworkAnalysis","reputationConfig","Account20","DetailsIndex","Details","InventoryManagement20","defaultProductsContext","peersInfo","supportsPeers","supportsChangingPeers","peerChangeOpen","lastPeerChangeDate","maxPeerCount","peerChangeIntervalWeeks","peerChangeDraft","ProductsContext","leadingSlashRegex","productConf","productsConfig","WUR_REPORTERS_INTERIM_ENABLED","TABLEAU_DASHBOARD_ENABLED","showTableauDashboard","splice","productAcc","pagesConfig","productFlag","pagesAcc","flag","resourcePagePath","substring","newComponent","hasUserAccessToAcademicInsights","allOtherProductsPages","acedamicInsightPages","userHasAccessToProduct","hasAccess","hasAccessToPage","nameA","nameB","LoadingContext","FinishedLoading","isVisible","setIsVisible","getItem","setItem","err","storedValue","setStoredValue","setValue","Function"],"mappings":"gPAgBMA,EAAiB,iBAEjBC,EAAuB,CAC3BC,UAAWF,EACXG,iBAAiB,eACdH,EAAiB,KAIhBI,EAAgBC,wBAAkC,CACtDC,iBAAkB,aAClBC,cAAeN,K,gMCrBXO,EAAiB,kBACrB,oCACE,kBAAC,IAAD,CACEC,MAAM,WACNC,SAAS,MACTC,WAAW,uBACXC,UAAU,SACVC,GAAI,GALN,OAQE,kBAAC,IAAD,CACEC,GAAG,OACHL,MAAM,aACNM,QAAQ,SACRL,SAAS,MACTC,WAAW,wBALb,aAiESK,EA/CX,SAAC,GAME,IAAD,IALJC,aAKI,MALI,OAKJ,MAJJC,cAII,MAJK,OAIL,MAHJC,kBAGI,MAHS,GAGT,MAFJC,gBAEI,SADDC,EACC,iBACJ,EAA2BC,YAAS,SAAU,CAAC,aAAxCC,EAAP,oBACA,EAAkCD,YAAS,QAAS,CAAC,OAA9CE,EAAP,oBACA,EAA0CC,oBAAS,GAAnD,mBAAOC,EAAP,KAAsBC,EAAtB,KAQA,OAPAC,qBAAU,WACR,IAAMC,EAAIC,YAAW,WACnBH,GAAiB,KA1CC,KA4CpB,OAAO,kBAAMI,aAAaF,MACzB,IAEIH,EACL,kBAAC,IAAD,eACE,cAAY,kBACZM,EAAGf,EACHgB,EAAGf,EACHgB,QAAQ,SACRC,MAAM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,mBAAO8nB,EAAP,KAAoBC,EAApB,KAcMC,EAAwBtzD,uBAC5B,SAACiJ,GACC,IACE,IAAMyjC,EAAWzjC,aAAiBsqD,SAAWtqD,EAAMmqD,GAAenqD,EAClEiC,OAAO+kB,eAAeijC,QAAQxvD,EAAKiE,KAAK4b,UAAUmpB,IAClD2mB,EAAe3mB,GACf,MAAOymB,GACP,MAAM,IAAIxrC,MAAJ,iCAAoCwrC,OAG9C,CAACzvD,EAAK0vD,IAGR,MAAO,CAACA,EAAaE,M","file":"static/js/main.c196fb6f.chunk.js","sourcesContent":["import React, { createContext } from 'react';\n\nexport interface SelectionData {\n parentKey: string;\n selectedGroupIds: {\n [groupKey: string]: {\n [optionKey: string]: boolean;\n };\n };\n}\n\ninterface SelectContextProps {\n setSelectionData: React.Dispatch>;\n selectionData: SelectionData;\n}\n\nconst ROOT_PARENT_ID = 'ROOT_PARENT_ID';\n\nconst defaultSelectionData = {\n parentKey: ROOT_PARENT_ID,\n selectedGroupIds: {\n [ROOT_PARENT_ID]: {},\n },\n};\n\nconst SelectContext = createContext({\n setSelectionData: () => {},\n selectionData: defaultSelectionData,\n});\n\nexport { SelectContext as default, ROOT_PARENT_ID, defaultSelectionData };\n","import React, { useState, useEffect } from 'react';\nimport GridLoader from 'react-spinners/GridLoader';\nimport { Text, Flex, FlexProps, useToken } from '@chakra-ui/react';\n\nconst DISPLAY_TIMEOUT = 300;\n\nconst DataPointsLogo = () => (\n <>\n \n Data\n \n Points\n \n \n \n);\n\nconst Loading: React.FC<\n FlexProps & {\n showLogo?: boolean;\n loaderSize?: number;\n }\n> = ({\n width = '100%',\n height = '100%',\n loaderSize = 25,\n showLogo = false,\n ...flexProps\n}) => {\n const [gridLoaderColour] = useToken('colors', ['gray.900']);\n const [loaderBoxesBorderRadius] = useToken('radii', ['sm']);\n const [showIndicator, setShowIndicator] = useState(false);\n useEffect(() => {\n const t = setTimeout(() => {\n setShowIndicator(true);\n }, DISPLAY_TIMEOUT);\n return () => clearTimeout(t);\n }, []);\n\n return showIndicator ? (\n \n \n {showLogo && }\n \n \n \n ) : null;\n};\n\nexport default Loading;\n","import React, { useCallback } from 'react';\nimport { Box, Button, Link } from '@chakra-ui/react';\nimport RequireClientRole from '#core/Permissions/components/RequireClientRole';\n\nimport { useEnvironment } from '#core/Environment';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\n\nconst ErrorFooter: React.FC<{}> = () => {\n const {\n keycloak,\n actions: { logOut },\n }: any = useAuth(); // JME2\n\n const { baseUrl } = useEnvironment();\n const { authServerUrl, realm } = keycloak || {};\n\n const handleLogout = useCallback(() => {\n logOut({\n redirectUri: baseUrl,\n });\n }, [logOut, baseUrl]);\n\n return (\n <>\n \n \n Logout\n \n \n \n Impersonate a user\n \n \n \n \n \n Go to timeshighereducation.com\n \n \n \n );\n};\n\nexport default ErrorFooter;\n","import React from 'react';\nimport { Flex, Box, BoxProps } from '@chakra-ui/react';\n\nimport Sidebar from '../Sidebar';\nimport BrowserSupport from '#coreComponents/BrowserSupport';\n\nexport interface PrivataeLayoutProps {\n sidebarWrapperProps?: BoxProps;\n contentWrapperProps?: BoxProps;\n}\n\nconst PrivateLayout: React.FC = ({\n children,\n sidebarWrapperProps,\n contentWrapperProps,\n}) => (\n \n \n \n \n \n \n {children}\n \n \n);\n\nexport default PrivateLayout;\n","import React from 'react';\nimport { useNavigate } from '@reach/router';\nimport { useFlags } from 'launchdarkly-react-client-sdk';\nimport { Button, ButtonGroup, Container, Flex, Text } from '@chakra-ui/react';\nimport { Login20 } from '@carbon/icons-react';\nimport { camelCase } from 'change-case';\nimport Topbar from '#coreComponents/Topbar';\nimport TheLogo from '#coreComponents/logos/TheLogo';\nimport { useEnvironment } from '#core/Environment';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\n\nconst 网曝门Topbar: React.FC<{}> = () => {\n const { baseUrl } = useEnvironment();\n const {\n actions: { logIn },\n } = useAuth(); // JME2\n const flags = useFlags();\n\n const navigate = useNavigate();\n\n return (\n \n \n navigate(baseUrl)}\n cursor=\"pointer\"\n >\n \n \n Data\n \n Points\n \n \n \n \n \n \n navigate(baseUrl, { state: { scrollTo: 'product' } })\n }\n >\n Product\n \n \n navigate(baseUrl, { state: { scrollTo: 'customers' } })\n }\n >\n Customers\n \n \n navigate(baseUrl, { state: { scrollTo: 'otherServices' } })\n }\n >\n Other Services\n \n navigate(`${baseUrl}sdg-quiz`)}\n >\n SDG Quiz\n \n \n \n \n \n Speak to an expert\n \n }\n onClick={() =>\n flags[camelCase('auth0Enabled')]\n ? logIn()\n : logIn({ redirectUri: baseUrl })\n }\n >\n Log In\n \n \n \n \n );\n};\n\nexport default 网曝门Topbar;\n","import React from 'react';\nimport {\n Box,\n Container,\n SimpleGrid,\n Text,\n List,\n ListItem,\n Link as ExternalLink,\n Flex,\n} from '@chakra-ui/react';\nimport { Link as InternalLink } from '@reach/router';\nimport TheLogo from '#coreComponents/logos/TheLogo';\n\nexport const footerPages: {\n title: string;\n links: { text: string; href: string }[];\n}[] = [\n {\n title: 'About Us',\n links: [\n {\n text: 'About Times Higher Education',\n href: '/about-us',\n },\n ],\n },\n {\n title: 'Contact',\n links: [\n {\n text: 'General Enquiry',\n href: 'mailto:data@timeshighereducation.com',\n },\n {\n text: 'Customer Services',\n href: 'mailto:datapoints.support@timeshighereducation.com',\n },\n ],\n },\n {\n title: 'Other Services',\n links: [\n {\n text: 'Rankings',\n href: '/world-university-rankings',\n },\n {\n text: 'THE Summits',\n href: '/summits',\n },\n ],\n },\n {\n title: 'Legal',\n links: [\n {\n text: 'Cookie Policy',\n href: '/cookie-policy',\n },\n {\n text: 'Privacy Policy',\n href: '/privacy-policy',\n },\n {\n text: 'Accessibility Statement',\n href:\n '/content/online-accessibility-statement',\n },\n {\n text: 'Terms and Conditions',\n href: '/terms-and-conditions',\n },\n {\n text: 'FAQs',\n href: '/datapoints/faqs',\n },\n ],\n },\n];\n\nexport const 网曝门Footer = () => (\n \n \n \n {footerPages.map(({ title, links }) => (\n \n \n \n \n \n {links.map(({ text, href }) => (\n \n {href.startsWith('/') && !href.startsWith('//') ? (\n {text}\n ) : (\n \n {text}\n \n )}\n \n ))}\n \n \n ))}\n \n \n \n \n © {new Date().getFullYear()} THE World Universities Insights\n Limited. All rights reserved.\n \n \n \n \n);\n\nexport default 网曝门Footer;\n","import React from 'react';\nimport { Box, BoxProps, Container } from '@chakra-ui/react';\nimport BrowserSupport from '#coreComponents/BrowserSupport';\n\nimport PublicTopbar from './components/PublicTopbar';\nimport PublicFooter from './components/PublicFooter';\n\nexport interface PublicLayoutProps {\n contentWrapperProps?: BoxProps;\n}\n\nconst PublicLayout: React.FC = ({\n children,\n contentWrapperProps,\n}) => (\n <>\n \n \n \n {children}\n \n \n \n);\n\nexport default PublicLayout;\n","import { createContext, useContext } from 'react';\n\nexport type DataPlusEmbargoContext = {\n availableSelectedYear: number;\n availableYearOnYears: number[];\n availableEmbargoYears: number[];\n canViewMainEmbargo: boolean;\n canViewFreeEmbargo: boolean;\n};\n\nexport const defaultContextValue = {\n availableSelectedYear: new Date().getFullYear(),\n availableYearOnYears: [new Date().getFullYear()],\n availableEmbargoYears: [new Date().getFullYear()],\n canViewMainEmbargo: false,\n canViewFreeEmbargo: false,\n};\n\nexport const DataPlusEmbargoContext = createContext(\n defaultContextValue,\n);\n\nexport const useDataplusEmbargoData = () => useContext(DataPlusEmbargoContext);\n","import React from 'react';\nimport { Text, Flex, Link, Box, Button } from '@chakra-ui/react';\nimport TheLogo from '#coreComponents/logos/TheLogo';\nimport Heading from '#coreComponents/Heading';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\n\nconst AccessDeniedErrorScreen: React.FC<{\n title?: string;\n text?: string;\n footerComponent?: React.FC<{}>;\n}> = ({\n title = 'You do not have access to the DataPoints platform',\n text = 'You do not have access to the DataPoints platform.',\n footerComponent: FooterComponent,\n}) => {\n const {\n canUseElevatedPermissions,\n useElevatedPermissions,\n setUseElevatedPermissions,\n } = useAuth(); // JME2\n return (\n \n \n \n \n \n \n {text}\n \n If you require support email{' '}\n \n datapoints.support@timeshighereducation.com\n \n .\n \n {canUseElevatedPermissions && !useElevatedPermissions && (\n \n \n This may be because you are not using elevated permissions and the\n current institution does not have access.{' '}\n \n setUseElevatedPermissions(true)}\n >\n Turn on elevated permissions\n \n \n )}\n \n {FooterComponent && }\n \n );\n};\n\nexport default AccessDeniedErrorScreen;\n","import React, { useCallback } from 'react';\nimport { useFlags } from 'launchdarkly-react-client-sdk';\n\nimport { camelCase } from 'change-case';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\nimport { checkPermissions } from '#shared/permissions/index';\nimport PermissionsContext, {\n PermissionsContract,\n} from '../contexts/PermissionsContext';\nimport { formatPermissions } from '#shared/permissions/utils';\n\nconst CommonPermissions: React.FC<{\n resourcePermissions: Record>;\n refetchPermissions?: () => void;\n}> = ({ children, resourcePermissions, refetchPermissions }) => {\n const {\n keycloak,\n groups,\n isAuthenticated,\n roles,\n permissionToken,\n permissionList,\n }: any = useAuth(); // JME2\n const flags = useFlags();\n\n const hasResourcePermission: PermissionsContract['hasResourcePermission'] = useCallback(\n (resourceArg, actionArg, requireAny) => {\n const resources =\n typeof resourceArg === 'string' ? [resourceArg] : resourceArg;\n const actions = typeof actionArg === 'string' ? [actionArg] : actionArg;\n\n const resourceActions = resources.reduce(\n (carry, r) => [\n ...carry,\n ...actions.map((a) => ({ resource: r, action: a })),\n ],\n [] as { resource: string; action: string }[],\n );\n\n return resourceActions.reduce((allow, { resource, action }) => {\n const allowForResourceAction =\n typeof resourcePermissions[resource] !== 'undefined' &&\n resourcePermissions[resource][action] === true;\n if (requireAny) {\n return allow || allowForResourceAction;\n }\n return allow && allowForResourceAction;\n }, !requireAny);\n },\n [resourcePermissions],\n );\n\n const hasResourcePermissionNew: PermissionsContract['hasResourcePermissionNew'] = useCallback(\n ({\n action,\n year,\n institutionId,\n sdgId,\n }: {\n action: string;\n year?: number;\n institutionId: string;\n sdgId?: number;\n }) =>\n checkPermissions({\n permissionToken,\n permissionList,\n action,\n year,\n institutionId,\n sdgId,\n }),\n [permissionToken, permissionList],\n );\n\n const hasRole: PermissionsContract['hasRole'] = useCallback(\n (requiredRoles, requireAny) => {\n if (typeof requiredRoles === 'string') {\n if (flags[camelCase('auth0Enabled')]) {\n return !isAuthenticated ? false : roles.includes(requiredRoles);\n }\n\n return typeof keycloak === 'undefined'\n ? false\n : keycloak.hasRealmRole(requiredRoles);\n }\n return requiredRoles.reduce((allow, role) => {\n if (requireAny) {\n return allow || hasRole(role);\n }\n return allow && hasRole(role);\n }, !requireAny);\n },\n [keycloak, isAuthenticated, roles, flags],\n );\n\n const hasClientRole: PermissionsContract['hasClientRole'] = useCallback(\n (client, requiredRoles, requireAny) => {\n if (typeof requiredRoles === 'string') {\n if (flags[camelCase('auth0Enabled')]) {\n return !isAuthenticated ? false : roles.includes(requiredRoles);\n }\n\n return typeof keycloak === 'undefined'\n ? false\n : keycloak.hasResourceRole(requiredRoles, client);\n }\n return requiredRoles.reduce((allow, role) => {\n if (requireAny) {\n return allow || hasRole(role);\n }\n return allow && hasRole(role);\n }, !requireAny);\n },\n [keycloak, hasRole, roles, isAuthenticated, flags],\n );\n\n const hasGroup: PermissionsContract['hasGroup'] = useCallback(\n (requiredGroups, requireAny) => {\n if (typeof requiredGroups === 'string') {\n if (flags[camelCase('auth0Enabled')]) {\n return !isAuthenticated ? false : groups.includes(requiredGroups);\n }\n\n return groups.includes(requiredGroups);\n }\n return requiredGroups.reduce((allow, group) => {\n if (requireAny) {\n return allow || hasGroup(group);\n }\n return allow && hasGroup(group);\n }, !requireAny);\n },\n [groups, isAuthenticated, flags],\n );\n\n const getUserAvailableYearsForProduct = useCallback(\n (institutionId: string, partialProductName: string) => {\n const decodedToken = JSON.parse(\n Buffer.from(permissionToken.split('.')[1], 'base64').toString(),\n );\n const { permissions } = decodedToken;\n const formattedPermissions = formatPermissions(\n permissions,\n permissionList,\n );\n\n const availablePermissions = (\n formattedPermissions[institutionId] ||\n formattedPermissions['*'] ||\n []\n ).filter((permission: string) => permission.includes(partialProductName));\n\n const yearRegex = /_(\\d{4})_/;\n const uniqueYears = new Set();\n availablePermissions.forEach((subscription: string) => {\n const match = subscription.match(yearRegex);\n if (match) {\n uniqueYears.add(Number(match[1]));\n }\n });\n\n if (uniqueYears.size > 0) {\n const uniqueYearsList = Array.from(uniqueYears).sort();\n return uniqueYearsList;\n }\n\n return null;\n },\n [permissionToken, permissionList],\n );\n\n return (\n \n {children}\n \n );\n};\n\nexport default CommonPermissions;\n","import React from 'react';\nimport { Box } from '@chakra-ui/react';\n\nimport { LogoProps, calculateWidthAndHeight } from '../logoUtils';\n\nconst baseWidth = 148;\nconst baseHeight = 124;\n\nexport default (boxProps: LogoProps) => {\n const { height, width } = calculateWidthAndHeight({\n baseHeight,\n baseWidth,\n w: 'w' in boxProps ? boxProps.w : undefined,\n h: 'h' in boxProps ? boxProps.h : undefined,\n });\n return (\n \n \n Times Higher Education Logo\n \n \n \n \n \n \n \n \n \n );\n};\n","import { useContext, useCallback } from 'react';\nimport { useLocation } from '@reach/router';\nimport { useEnvironment, Environment } from '#core/Environment';\n\nimport TrackingContext from '../contexts/TrackingContext';\nimport { useInstitution } from '#core/Institution';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\n\nexport enum EventType {\n PAGE_VIEW = 'view',\n EXIT_CLICK = 'exit.click',\n DOWNLOAD = 'download',\n APPLY = 'apply',\n SUBMIT = 'submit',\n LOGIN = 'login',\n CLICK = 'click',\n PLAY = 'play',\n PAUSE = 'pause',\n RESUME = 'resume',\n END = 'end',\n PROGRESS = 'progress',\n DISPLAY = 'display',\n CLOSE = 'close',\n ACCEPT = 'accept',\n LOGIN_FAIL = 'login-fail',\n LOGIN_SUCCESS = 'login-success',\n IMPRESSION = 'impression',\n ERROR = 'error',\n}\n\ntype TrackingEventBase = {\n type: ET;\n payload: P & {\n id: string;\n metadata?: {\n [key: string]: any;\n };\n };\n};\n\ntype LoginEvent = TrackingEventBase;\ntype LoginFailureEvent = TrackingEventBase;\ntype LoginSuccessEvent = TrackingEventBase;\ntype PageViewEvent = TrackingEventBase;\ntype ExitClickEvent = TrackingEventBase;\ntype DownloadEvent = TrackingEventBase<\n EventType.DOWNLOAD,\n {\n id: string;\n fileType: string;\n }\n>;\ntype ApplyEvent = TrackingEventBase;\ntype SubmitEvent = TrackingEventBase;\ntype ClickEvent = TrackingEventBase<\n EventType.CLICK,\n {\n id: string;\n elementTagName: string;\n }\n>;\ntype PlayEvent = TrackingEventBase;\ntype PauseEvent = TrackingEventBase;\ntype ResumeEvent = TrackingEventBase;\ntype EndEvent = TrackingEventBase;\ntype ProgressEvent = TrackingEventBase;\ntype DisplayEvent = TrackingEventBase;\ntype CloseEvent = TrackingEventBase;\ntype AcceptEvent = TrackingEventBase;\ntype ImpressionEvent = TrackingEventBase;\ntype ErrorEvent = TrackingEventBase<\n EventType.ERROR,\n {\n type?: string;\n message?: string;\n }\n>;\n\nexport type TrackingEvent =\n | LoginEvent\n | LoginFailureEvent\n | LoginSuccessEvent\n | PageViewEvent\n | ExitClickEvent\n | DownloadEvent\n | ApplyEvent\n | SubmitEvent\n | ClickEvent\n | PlayEvent\n | PauseEvent\n | ResumeEvent\n | EndEvent\n | ProgressEvent\n | DisplayEvent\n | CloseEvent\n | AcceptEvent\n | ImpressionEvent\n | ErrorEvent;\n\ntype MzArguments = {\n eventType: EventType;\n payload: object;\n userMetadata: object;\n pageMetadata: {\n app: string;\n variant: string;\n type: string;\n section: string;\n subsection: string;\n pagename: string;\n id: string;\n language: string;\n environment: Environment;\n version: string;\n orgname: string;\n organisation: {\n id: string;\n name: string;\n };\n };\n};\n\nconst trackMzEvent = (\n enableTracking: boolean,\n { eventType, payload, pageMetadata, userMetadata }: MzArguments,\n) => {\n /* NOTE: DO NOT destructure window._mz here, MZ relies on `this` being set and destructuring breaks that\n scope. If for some reason you have to destructure, every function must either use .bind(mz) or .call(mz, ...) */\n if (!enableTracking) {\n // take over from MZ in doing this since we cant load MZ in dev without it loading google tracking etc.\n document.dispatchEvent(\n new CustomEvent('mz-event', {\n detail: {\n type: 'log',\n environment: window._mz.environment,\n event: eventType,\n data: {\n payload,\n pageMetadata,\n userMetadata,\n },\n },\n }),\n );\n } else {\n // otherwise call the MZ functions, should not run on local\n window._mz.replacePageMetadata(pageMetadata);\n window._mz.replaceUserMetadata(userMetadata);\n window._mz.emit(eventType, payload);\n }\n};\n\nexport type TrackingHook = () => {\n trackEvent: (event: TrackingEvent) => void;\n};\n\nconst useTracking: TrackingHook = () => {\n const trackingContext = useContext(TrackingContext);\n const { enableTracking, version, environment } = useEnvironment();\n const location = useLocation();\n const auth = useAuth(); // JME2\n const { institution } = useInstitution();\n\n const trackEvent = useCallback(\n (event: TrackingEvent) => {\n try {\n trackMzEvent(enableTracking, {\n eventType: event.type,\n payload: {\n ...event.payload,\n eventTitle:\n // Legacy events have event titles set in their metadata\n event.payload.metadata?.eventTitle ||\n `${trackingContext.section}-${event.payload.id}`,\n },\n userMetadata: auth.isAuthenticated\n ? {\n id: auth.user?.id,\n name: auth.user?.name,\n }\n : {},\n pageMetadata: {\n app: 'datapoints',\n variant: 'datapoints',\n type: 'product',\n section: trackingContext.pageGroup || '',\n subsection: trackingContext.page || '',\n pagename: `${trackingContext.pageGroup} | ${trackingContext.page}`,\n id: `${location.pathname}.${institution.id}`,\n language: 'en',\n environment,\n version,\n orgname: institution?.name || '',\n organisation: {\n id: institution?.institutionId,\n name: institution?.name || '',\n },\n },\n });\n } catch (e) {\n // make sure the app can't be broken by errors in MZ\n setTimeout(() => {\n document.dispatchEvent(\n new CustomEvent('datapoints-error', {\n detail: (e as Error).message,\n }),\n );\n }, 0);\n }\n if (enableTracking) {\n try {\n const { newrelic } = window;\n newrelic.addPageAction(event.type, {\n ...event.payload,\n userId: auth.isAuthenticated ? auth.user?.id : '',\n pageGroup: trackingContext.pageGroup,\n page: trackingContext.page,\n version,\n organisationId: institution?.institutionId,\n organisationName: institution?.name || '',\n });\n } catch (e) {\n // make sure the app can't be broken by errors in NewRelic\n setTimeout(() => {\n document.dispatchEvent(\n new CustomEvent('datapoints-error', {\n detail: (e as Error).message,\n }),\n );\n }, 0);\n }\n }\n },\n [\n auth.isAuthenticated,\n auth.user?.id,\n auth.user?.name,\n enableTracking,\n environment,\n institution.id,\n institution?.institutionId,\n institution?.name,\n location.pathname,\n trackingContext.page,\n trackingContext.pageGroup,\n trackingContext.section,\n version,\n ],\n );\n\n return {\n trackEvent,\n };\n};\n\nexport default useTracking;\n","import React from 'react';\nimport { usePermissions } from '../contexts/PermissionsContext';\n\nconst RequireClientRole: React.FC<{\n client: string;\n role: string | string[];\n requireAny?: boolean;\n DeniedComponent?: React.FC<{\n role: string | string[];\n }>;\n}> = ({ children, client, role, requireAny = false, DeniedComponent }) => {\n const { hasClientRole } = usePermissions();\n const allow = hasClientRole(client, role, requireAny);\n if (!allow) {\n if (DeniedComponent) {\n return ;\n }\n return null;\n }\n return <>{children};\n};\n\nexport default RequireClientRole;\n","import axios from 'axios';\n\nconst getPermissionToken = async (\n apiEndpoint: string,\n authToken: string,\n elevated = false,\n selectedInstitutionId?: string | null,\n) => {\n const PERMISSION_URL = `https://${apiEndpoint}/permissions-proxy/permissions/token${\n elevated ? `?elevated=true` : ''\n }`;\n\n const headers: Record = {\n authorization: `Bearer ${authToken}`,\n };\n\n if (selectedInstitutionId) {\n headers['x-datapoints-institution'] = selectedInstitutionId;\n }\n\n try {\n const response = await axios.get(PERMISSION_URL, {\n headers,\n });\n\n return response.data.token;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.log(`Failed to load permission token: ${e.message}`);\n return null;\n }\n};\n\nexport default getPermissionToken;\n","import React, { useState } from 'react';\nimport { FaFirefox, FaChrome } from 'react-icons/fa';\nimport {\n Alert,\n AlertDescription,\n AlertIcon,\n AlertTitle,\n Box,\n CloseButton,\n Link,\n} from '@chakra-ui/react';\n\nconst BrowserSupport = () => {\n const [showBanner, setShowBanner] = useState(true);\n\n if (!showBanner) {\n return null;\n }\n\n return (\n \n \n \n \n \n \n Your Browser is no longer supported.\n \n Datapoints no longer supports your browser. Please upgrade your\n browser.\n \n \n \n \n \n Download FireFox\n \n \n \n \n \n \n \n Download Chrome\n \n \n \n \n \n \n setShowBanner(false)}\n position=\"absolute\"\n right=\"8px\"\n top=\"8px\"\n />\n \n \n );\n};\n\nexport default BrowserSupport;\n","import React, { useMemo } from 'react';\nimport {\n Box,\n Text,\n Flex,\n useToken,\n Image,\n BoxProps,\n Icon,\n} from '@chakra-ui/react';\nimport { CaretSortUp20, CheckmarkFilled16 } from '@carbon/icons-react';\nimport { useInstitution } from '#core/Institution';\nimport useLogger from '#hooks/useLogger';\nimport Heading from '#coreComponents/Heading';\n\nconst TopbarHeading: React.FC<{\n title: string;\n titleAcronym?: string;\n}> = ({ title, titleAcronym }) => (\n \n \n \n \n {titleAcronym && (\n \n {titleAcronym}\n \n )}\n \n);\n\nconst TopbarLogo = () => {\n const { institution } = useInstitution();\n const logger = useLogger();\n const [logoBg, logoColour] = useToken('colors', ['gray.100', 'gray.700']);\n const institutionLogoUrl = useMemo(() => {\n try {\n const url = new URL(institution.logo);\n url.searchParams.append('bg', logoBg);\n url.searchParams.append('c', logoColour);\n return url;\n } catch (e) {\n logger.warn(`Invalid institution logo URL - ${e.message}`);\n return '';\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [institution.logo]);\n return (\n \n );\n};\n\nconst Topbar = ({\n children,\n fitSidebar = false,\n withLogo = false,\n title,\n titleAcronym,\n dropdownRef,\n rank,\n year,\n darkVariant = false,\n ...props\n}: React.PropsWithChildren<\n {\n title?: string;\n titleAcronym?: string;\n fitSidebar?: boolean;\n withLogo?: boolean;\n dropdownRef?: React.Ref;\n rank?: string;\n year?: number;\n darkVariant?: boolean;\n } & BoxProps\n>) => (\n \n \n \n {withLogo && }\n {title && (\n \n \n \n {rank && year ? (\n <>\n \n {/* create an icon - ten-pointed star */}\n {[...Array(10)].map((el, index) => (\n \n \n \n ))}\n \n \n \n \n #{rank} in World University rankings {year}\n \n \n \n ) : (\n <>\n )}\n \n \n )}\n {children}\n \n {dropdownRef && (\n \n \n \n \n \n )}\n \n {dropdownRef && }\n \n);\n\nexport default Topbar;\n","export const DEFAULT_YEAR = 2023;\nexport const CURRENT_YEAR = 2024;\nexport const QUERY_SELECTOR_YEAR = 2024;\nexport const AVAILABLE_METHODOLOGY_YEARS = [2024, 2025];\n","import { gql } from '@apollo/client';\n\nexport const getWurRankingData = gql`\n query GetRankData(\n $year: Int!\n $institutionId: String!\n $level1Id: String!\n $releaseName: String!\n $responseFields: [ResponseFieldsListItem!]\n ) {\n release(\n year: $year\n level1Id: $level1Id\n institutionId: $institutionId\n releaseName: $releaseName\n responseFields: $responseFields\n ) {\n institutionData {\n countryRank\n }\n level1 {\n result {\n rank {\n higher\n lower\n }\n jointRanked\n }\n }\n }\n }\n`;\n\nexport const wurRankingDataQuery = (year: number, institutionId: string) => ({\n variables: {\n year: Number.isInteger(year) ? year : new Date().getFullYear(),\n institutionId,\n level1Id: 'overall',\n releaseName: 'wur',\n responseFields: ['INSTITUTIONDATA'],\n },\n});\n","import React from 'react';\nimport { Text } from '@chakra-ui/react';\n\nconst SelectGroupLabel: React.FC<{ isFirstGroup?: boolean; dark: boolean }> = ({\n children,\n isFirstGroup,\n dark,\n}) => (\n \n {children}\n \n);\n\nexport default SelectGroupLabel;\n","import React from 'react';\n\nimport { Box } from '@chakra-ui/react';\nimport SelectGroupLabel from './SelectGroupLabel';\n\ninterface SelectGroupProps {\n dark: boolean;\n label?: string;\n}\n\nconst SelectGroup: React.FC = ({ children, label, dark }) => (\n \n {label && {label}}\n {children}\n \n);\n\nexport default SelectGroup;\n","import React from 'react';\nimport { Box, Checkbox } from '@chakra-ui/react';\n\ninterface SelectItemCheckboxProps {\n onClick: (event: React.ChangeEvent) => void;\n value: string;\n isChecked: boolean;\n dark: boolean;\n}\n\nconst SelectItemCheckbox: React.FC = ({\n onClick,\n children,\n value,\n isChecked,\n dark,\n}) => (\n \n \n {children}\n \n \n);\n\nexport default SelectItemCheckbox;\n","import React from 'react';\nimport { Box, Radio } from '@chakra-ui/react';\n\ninterface SelectItemRadioProps {\n parentKey?: string;\n value: string;\n onClick: (event: React.ChangeEvent) => void;\n isChecked: boolean;\n dark: boolean;\n}\n\nconst SelectItemRadio: React.FC = ({\n children,\n parentKey,\n onClick,\n value,\n isChecked,\n dark,\n}) => (\n \n \n {children}\n \n \n);\n\nexport default SelectItemRadio;\n","import React from 'react';\nimport { Box, Flex } from '@chakra-ui/react';\nimport { ChevronDown16 } from '@carbon/icons-react';\n\nimport { SelectOptionMetaType } from '../types';\nimport SelectItemCheckbox from './SelectItemCheckbox';\nimport SelectItemRadio from './SelectItemRadio';\n\ninterface SelectItemVariantProps {\n type?: SelectOptionMetaType;\n onClick: (\n event: React.ChangeEvent | React.MouseEvent,\n ) => void;\n parentKey?: string;\n value: string;\n isChecked: boolean;\n dark: boolean;\n isOpen: boolean;\n}\n\nconst SelectItemVariant: React.FC = ({\n children,\n type,\n onClick,\n parentKey,\n value,\n isChecked,\n dark,\n isOpen,\n}) => {\n switch (type) {\n case 'checkbox':\n return (\n \n {children}\n \n );\n\n case 'radio':\n return (\n \n {children}\n \n );\n\n case 'parent':\n default:\n return (\n \n \n {children}\n \n );\n }\n};\n\nexport default SelectItemVariant;\n","import React from 'react';\nimport { Box } from '@chakra-ui/react';\nimport {\n GetPropsCommonOptions,\n UseSelectGetItemPropsOptions,\n UseSelectGetMenuPropsOptions,\n} from 'downshift';\n\nimport SelectTypeVariant from './SelectItemVariant';\nimport SelectDropdown from './SelectDropdown';\nimport { SelectMeta, SelectOptions } from '../types';\n\ninterface SelectItemProps {\n option: SelectOptions;\n isOpen: boolean;\n forceGroupSelections: boolean;\n dark: boolean;\n\n isChecked?: boolean;\n groupMeta?: SelectMeta;\n parentKey?: string;\n\n getMenuProps: (\n options?: UseSelectGetMenuPropsOptions | undefined,\n otherOptions?: GetPropsCommonOptions | undefined,\n ) => any;\n getItemProps: (options: UseSelectGetItemPropsOptions) => any;\n onExpandableClick: (key: string) => void;\n onItemClick: (\n event: React.MouseEvent | React.ChangeEvent,\n ) => void;\n}\n\nconst SelectItem = ({\n option,\n getItemProps,\n getMenuProps,\n parentKey,\n isOpen,\n groupMeta,\n onExpandableClick,\n onItemClick,\n forceGroupSelections,\n isChecked = false,\n dark,\n}: SelectItemProps) => (\n {\n event.stopPropagation();\n onExpandableClick(option.key);\n }}\n {...getItemProps}\n color={dark ? 'gray.100' : 'gray.700'}\n w=\"100%\"\n mx={2}\n >\n | React.ChangeEvent,\n ) => !option.children && onItemClick(event)}\n parentKey={parentKey}\n value={option.key}\n isChecked={isChecked}\n dark={dark}\n isOpen={isOpen}\n >\n {option.label}\n \n {option.children && (\n \n )}\n \n);\n\nexport default SelectItem;\n","import React, { useCallback, useState, useContext } from 'react';\nimport { Flex } from '@chakra-ui/react';\nimport {\n GetPropsCommonOptions,\n UseSelectGetItemPropsOptions,\n UseSelectGetMenuPropsOptions,\n} from 'downshift';\nimport assoc from 'ramda/src/assoc';\n\nimport { SelectMeta, SelectOptions } from '../types';\nimport SelectContext, { ROOT_PARENT_ID } from '../Context';\n\nimport SelectGroup from './SelectGroup';\nimport SelectItem from './SelectItem';\nimport SelectGroupLabel from './SelectGroupLabel';\n\ninterface SelectDropdownProps {\n getMenuProps: (\n options?: UseSelectGetMenuPropsOptions | undefined,\n otherOptions?: GetPropsCommonOptions | undefined,\n ) => any;\n\n getItemProps: (options: UseSelectGetItemPropsOptions) => any;\n\n data: SelectOptions[];\n isOpen: boolean;\n meta?: SelectMeta;\n parentKey?: string;\n forceGroupSelections: boolean;\n dark: boolean;\n}\n\nconst SelectDropdown = ({\n getMenuProps,\n isOpen,\n data,\n getItemProps,\n meta: groupMeta,\n parentKey = ROOT_PARENT_ID,\n forceGroupSelections,\n dark,\n}: SelectDropdownProps) => {\n const [openSubgroupId, setOpenSubgroupId] = useState<{\n [index: string]: boolean;\n }>({});\n\n const { selectionData, setSelectionData } = useContext(SelectContext);\n\n const onItemClick = useCallback(\n (event: React.MouseEvent | React.ChangeEvent) => {\n event.stopPropagation();\n\n const { value, type } = event.target as HTMLInputElement;\n if (!value) {\n return;\n }\n\n const isRadioButton = type === 'radio';\n\n const { selectedGroupIds } = selectionData;\n const groupToUpdate = selectedGroupIds[parentKey] || {};\n const valueToUpdate = groupToUpdate[value] || false;\n const updatedValue = isRadioButton ? true : !valueToUpdate;\n\n const updatedGroup = assoc(\n value,\n updatedValue,\n isRadioButton ? {} : groupToUpdate,\n );\n\n const updatedSelectedIds = assoc(\n parentKey,\n updatedGroup,\n forceGroupSelections ? {} : selectedGroupIds,\n );\n\n setSelectionData({\n parentKey,\n selectedGroupIds: updatedSelectedIds,\n });\n },\n [parentKey, selectionData, setSelectionData, forceGroupSelections],\n );\n\n const onExpandableClick = (key: string) =>\n setOpenSubgroupId((previousState) =>\n assoc(key, !openSubgroupId[key], previousState),\n );\n\n return isOpen ? (\n \n {data.map((option, optionIndex) => {\n const isItemChecked =\n selectionData.selectedGroupIds[parentKey] &&\n selectionData.selectedGroupIds[parentKey][option.key];\n\n return (\n \n {option.meta?.groupLabel && (\n \n {option.meta.groupLabel}\n \n )}\n {/* eslint-disable-next-line */}\n \n \n \n \n );\n })}\n \n ) : null;\n};\n\nexport default SelectDropdown;\n","import React, { createRef, useEffect, useState } from 'react';\nimport { useSelect } from 'downshift';\nimport { Box, Button, Text } from '@chakra-ui/react';\nimport { ChevronDown20 } from '@carbon/icons-react';\nimport { flatten, keys, pickBy } from 'ramda';\nimport { useClickAway } from 'react-use';\n\nimport { SelectData, OnChangeCallbackData, SelectOptions } from './types';\nimport SelectDropdown from './components/SelectDropdown';\nimport SelectContext, {\n defaultSelectionData,\n ROOT_PARENT_ID,\n SelectionData,\n} from './Context';\n\ninterface SelectProps {\n data: SelectData;\n defaultSelectedData?: SelectionData;\n label?: string | number | (string | number)[];\n forceGroupSelections?: boolean;\n width?: number | string;\n onChange: (selectedData: OnChangeCallbackData[]) => void;\n defaultSelections?: SelectionData['selectedGroupIds'];\n dark?: boolean;\n}\n\nconst ChevronIcon: React.FC<{ isOpen: boolean; dark: boolean }> = ({\n isOpen,\n dark,\n}) => (\n \n);\n\nconst getDefaultSelections = (initData: SelectData) => {\n const selections: SelectionData['selectedGroupIds'] = {};\n\n const getNextValue = (parentId: string, data: SelectData) => {\n if (data.meta?.selected) {\n const { selected } = data.meta;\n\n selections[parentId] = {};\n\n if (Array.isArray(selected)) {\n selected.forEach((sel) => {\n selections[parentId][sel] = true;\n });\n } else {\n selections[parentId][selected] = true;\n }\n }\n\n data.options.forEach(\n (option) => option.children && getNextValue(option.key, option.children),\n );\n };\n\n getNextValue(ROOT_PARENT_ID, initData);\n\n return selections;\n};\n\nconst Select = ({\n data,\n defaultSelectedData,\n forceGroupSelections = false,\n label = '',\n width = '100%',\n onChange,\n dark = false,\n}: SelectProps) => {\n const {\n selectedItem,\n getLabelProps,\n getToggleButtonProps,\n getMenuProps,\n getItemProps,\n } = useSelect({\n items: data.options,\n });\n\n const defaultSelections = getDefaultSelections(data);\n const dropdownRef = createRef();\n const [selectionData, setSelectionData] = useState(\n defaultSelectedData || {\n ...defaultSelectionData,\n selectedGroupIds:\n defaultSelections || defaultSelectionData.selectedGroupIds,\n },\n );\n const [selectedLabel, setSelectedLabel] = useState<\n string | number | (string | number)[] | null\n >(selectedItem?.label || label);\n\n const [isOpen, setIsOpen] = useState(false);\n\n useClickAway(dropdownRef, () => isOpen && setIsOpen(false));\n\n useEffect(() => {\n const updatedSelections = getDefaultSelections(data);\n\n setSelectionData({\n ...selectionData,\n selectedGroupIds: updatedSelections,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data]);\n\n useEffect(() => {\n const groupIds = selectionData.selectedGroupIds;\n const selectedGroupKeys = keys(groupIds) as string[];\n const onChangeData = selectedGroupKeys\n .map((id: string) => {\n const selectedItems = keys(pickBy(Boolean, groupIds[id]));\n\n return (\n selectedItems.length && {\n groupId: id,\n selectedItems,\n }\n );\n })\n .filter(Boolean) as OnChangeCallbackData[];\n\n setSelectedLabel(\n onChangeData.length\n ? flatten(onChangeData.map(({ selectedItems }) => selectedItems))\n : null,\n );\n\n onChange(onChangeData);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectionData]);\n\n const renderLabel = (value: string | number | (string | number)[] | null) => {\n if (!value) {\n return label;\n }\n\n if (Array.isArray(value)) {\n const parentValuesSelected = value.reduce(\n (acc, selectedItemKey) =>\n acc && !!data.options.find(({ key }) => key === selectedItemKey),\n true,\n );\n\n const findChildLabel = (options: SelectOptions[]): string => {\n const found = options.find(({ key }) => key === value[0]);\n\n if (!found) {\n return options.reduce((acc, option) => {\n const childLabel = findChildLabel(option.children?.options || []);\n return childLabel === '' ? acc : childLabel;\n }, '');\n }\n\n return found.label;\n };\n\n if (!parentValuesSelected) {\n if (value.length === 1) {\n return findChildLabel(data.options);\n }\n\n return `${value.length} selected`;\n }\n\n if (value.length === 1) {\n return data.options.find(({ key }) => key === value[0])?.label;\n }\n return `${value.length} selected out of ${data.options.length}`;\n }\n return data.options.find(({ key }) => key === value)?.label || label;\n };\n\n return (\n \n \n {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}\n \n {renderLabel(selectedLabel)}\n \n\n }\n justifyContent=\"space-between\"\n fontWeight={400}\n color={dark ? 'white' : 'gray.700'}\n bg={dark ? 'gray.700' : 'white'}\n _hover={{ bg: dark ? 'gray.900' : 'white' }}\n _active={{ bg: dark ? 'gray.900' : 'white' }}\n borderColor={dark ? 'gray.900' : 'gray.200'}\n data-testid=\"selectTriggerButton\"\n onClick={() => setIsOpen(!isOpen)}\n isDisabled={data.options.length === 0}\n >\n \n {renderLabel(selectedLabel)}\n \n \n \n {isOpen && (\n \n \n \n )}\n \n \n \n );\n};\n\nexport default Select;\n","import React from 'react';\nimport { BoxProps } from '@chakra-ui/react';\nimport Card from '../Card';\n\nconst Section = (props: BoxProps) => ;\n\nSection.Header = Card.Header;\nSection.Title = Card.Title;\nSection.Description = Card.Description;\n\nexport default Section;\n","import React, { useEffect } from 'react';\nimport { useLocation } from '@reach/router';\nimport { CarbonIconProps, CheckmarkFilled32 } from '@carbon/icons-react';\nimport {\n Box,\n BoxProps,\n HeadingProps,\n Text,\n Flex,\n List as ChakraList,\n ListIcon,\n ListItem,\n Button,\n Link,\n Grid,\n} from '@chakra-ui/react';\nimport Heading from '#coreComponents/Heading';\nimport { EventType, useTracking } from '#core/Tracking';\n\nconst Title = (props: HeadingProps) => (\n \n);\n\nconst List = ({ items }: { items: string[] }) => (\n \n {items.map((item, index) => (\n \n \n \n {item}\n \n \n ))}\n \n);\n\nconst Icon = ({\n component: Component,\n}: {\n component: React.FC;\n}) => (\n \n \n \n);\n\nconst UpsellScreen = ({ children, ...props }: BoxProps) => {\n const { trackEvent } = useTracking();\n const { pathname } = useLocation();\n\n const [, , productPath, pagePath] = pathname.split('/');\n\n useEffect(() => {\n trackEvent({\n type: EventType.PAGE_VIEW,\n payload: {\n id: `LEADGEN_${productPath}_${pagePath}`,\n },\n });\n }, [trackEvent, productPath, pagePath]);\n\n const onContact = () =>\n trackEvent({\n type: EventType.CLICK,\n payload: { id: 'upsell-contact-button', elementTagName: 'button' },\n });\n\n return (\n \n \n \n {children}\n \n \n \n \n \n \n );\n};\n\nUpsellScreen.Title = Title;\nUpsellScreen.List = List;\nUpsellScreen.Icon = Icon;\n\nexport default UpsellScreen;\n","import { gql, WatchQueryFetchPolicy } from '@apollo/client';\n\nconst scenarioInputFields = `\nnumberOfAcademicStaff\n numberOfAcademicStaffOfInternationalOrOverseasOrigin\n numberOfResearchStaff\n totalNumberOfStudents\n totalNumberOfStudentsOfInternationalOrOverseasOrigin\n totalNumberOfOutboundExchangeStudents\n numberOfUndergraduateDegreesAwarded\n numberOfDoctoratesAwarded\n numberOfResearchDoctoratesAwarded\n numberOfProfessionalDoctoratesAwarded\n totalInstitutionalIncome\n researchIncome\n researchIncomeFromIndustryAndCommerce\n totalPublications\n internationalPublications\n researchVotes\n teachingVotes\n citationScoreCnNormalised\n citationScoreNormalised\n percentileFieldWeightedCitationImpact\n numberOfPublicationsInTheTop10Percentile\n influenceOfPublications\n numberOfPatentsCitingResearch\n`;\n\nconst scenatioResults = `\n t1\n t2\n t3\n t4\n t5\n r1\n r2\n r3\n c1\n c2\n c3\n c4\n e1\n e2\n i1\n i2\n i3\n i4\n`;\n\nexport const getScenarioQuery = gql`\n query Scenario(\n $scenarioId: String!\n $institutionId: String!\n $allowScoresForExcluded: Boolean!\n ) {\n scenario(\n institutionId: $institutionId\n scenarioId: $scenarioId\n allowScoresForExcluded: $allowScoresForExcluded\n ) {\n scenarioId\n name\n methodology\n createdAt\n updatedAt\n submissionYear\n publicationYear\n institution {\n id\n country\n currencyCode\n }\n scenarioInputs {\n overall {\n applicable\n ${scenarioInputFields}\n }\n artsAndHumanities {\n applicable\n ${scenarioInputFields}\n }\n businessAndEconomics {\n applicable\n ${scenarioInputFields}\n }\n clinicalAndHealth {\n applicable\n ${scenarioInputFields}\n }\n computerScience {\n applicable\n ${scenarioInputFields}\n }\n education {\n applicable\n ${scenarioInputFields}\n }\n engineering {\n applicable\n ${scenarioInputFields}\n }\n law {\n applicable\n ${scenarioInputFields}\n }\n lifeSciences {\n applicable\n ${scenarioInputFields}\n }\n physicalSciences {\n applicable\n ${scenarioInputFields}\n }\n psychology {\n applicable\n ${scenarioInputFields}\n }\n socialSciences {\n applicable\n ${scenarioInputFields}\n }\n }\n alexanderJson {\n overall {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n artsAndHumanities {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n businessAndEconomics {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n clinicalAndHealth {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n computerScience {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n education {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n engineering {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n law {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n lifeSciences {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n physicalSciences {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n psychology {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n socialSciences {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n }\n }\n }\n`;\n\nexport const getWurReporterInterimScenarioQuery = gql`\n query WurReporterInterimScenario(\n $scenarioId: String!\n $institutionId: String!\n $allowScoresForExcluded: Boolean!\n ) {\n wurReporterInterimScenario(\n institutionId: $institutionId\n scenarioId: $scenarioId\n allowScoresForExcluded: $allowScoresForExcluded\n ) {\n scenarioId\n name\n methodology\n createdAt\n updatedAt\n submissionYear\n publicationYear\n institution {\n id\n country\n currencyCode\n }\n scenarioInputs {\n overall {\n applicable\n ${scenarioInputFields}\n }\n artsAndHumanities {\n applicable\n ${scenarioInputFields}\n }\n businessAndEconomics {\n applicable\n ${scenarioInputFields}\n }\n clinicalAndHealth {\n applicable\n ${scenarioInputFields}\n }\n computerScience {\n applicable\n ${scenarioInputFields}\n }\n education {\n applicable\n ${scenarioInputFields}\n }\n engineering {\n applicable\n ${scenarioInputFields}\n }\n law {\n applicable\n ${scenarioInputFields}\n }\n lifeSciences {\n applicable\n ${scenarioInputFields}\n }\n physicalSciences {\n applicable\n ${scenarioInputFields}\n }\n psychology {\n applicable\n ${scenarioInputFields}\n }\n socialSciences {\n applicable\n ${scenarioInputFields}\n }\n }\n alexanderJson {\n overall {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n artsAndHumanities {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n businessAndEconomics {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n clinicalAndHealth {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n computerScience {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n education {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n engineering {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n law {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n lifeSciences {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n physicalSciences {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n psychology {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n socialSciences {\n applicable\n ${scenatioResults}\n scoreNumber\n scoreDisplay\n rankNumber\n rankDisplay\n exclusions\n }\n }\n }\n }\n`;\n\nexport const getWurQuery = gql`\n query GetWURRatingAndScore($year: Int!, $institutionId: String!) {\n wurRelease(year: $year) {\n subject(name: \"overall\") {\n result(institutionId: $institutionId) {\n score {\n higher\n lower\n }\n rank {\n higher\n lower\n }\n }\n }\n }\n }\n`;\n\nexport const scenarioQueryVariables = (\n scenarioId: string,\n institutionId: string,\n allowScoresForExcluded: boolean,\n fetchPolicy: WatchQueryFetchPolicy = 'cache-first',\n) => ({\n fetchPolicy,\n skip: !scenarioId,\n variables: {\n scenarioId,\n institutionId,\n allowScoresForExcluded,\n },\n});\n\nexport const wurQueryVariables = (year: number, institutionId: string) => ({\n variables: {\n year,\n institutionId,\n },\n});\n","interface BandedValue {\n lower: number;\n higher: number;\n}\n\nexport const formatToDecimalOrLeaveIntact = (val: number) =>\n Number.isInteger(val) ? val.toFixed(1) : val;\n\nexport const convertToRoundedFloatOrReturnOriginal = (\n input: string,\n): string => {\n const normalizedInput = input.replace(/[-鈥揮/g, '-');\n\n const num = parseFloat(normalizedInput);\n\n if (!Number.isNaN(num)) {\n const numStr = num.toFixed(1);\n\n if (normalizedInput.includes('-')) {\n const [start, end] = normalizedInput.split('-').map(parseFloat);\n if (!Number.isNaN(start) && !Number.isNaN(end)) {\n return `${start.toFixed(1)}-${end.toFixed(1)}`;\n }\n }\n\n if (normalizedInput.endsWith('+')) {\n return `${numStr}+`;\n }\n\n return numStr;\n }\n\n return input;\n};\n\nexport const formatBandedValue = ({ higher, lower }: BandedValue): string => {\n if (higher === lower) {\n return `${higher}`;\n }\n if (higher > 0) {\n return `${lower}-${higher}`;\n }\n return `${lower}+`;\n};\n\n/**\n * Takes a BandedValue object and returns the formatted score.\n *\n * @param score A score object containing lower and higher.\n * @return string\n */\nexport const formatScore = (score: BandedValue) =>\n convertToRoundedFloatOrReturnOriginal(formatBandedValue(score));\n\n/**\n * Takes a BandedValue object and returns a formatted rank.\n *\n * @param rank A rank object containing lower and higher values.\n * @param jointRanked Whether the rank is shared with another institution.\n * @return string\n */\nexport const formatRank = (rank: BandedValue, jointRanked = false) =>\n `${jointRanked ? '=' : ''}${formatBandedValue(rank)}`;\n\nexport const roundScore = (score: number, numberOfDecimalPlaces = 2) => {\n const scaleFactor = 10 ** numberOfDecimalPlaces;\n return Math.round(score * scaleFactor) / scaleFactor;\n};\n","import React, { ReactNode, useMemo } from 'react';\nimport { usePageQuery } from '#core/PageQuery';\nimport { DataPlusEmbargoContext } from '../contexts/DataplusEmbargoContext';\nimport { usePermissions } from '#core/Permissions';\nimport { PageQueryProps } from '#core/PageQuery/contexts/PageQueryContext';\nimport { useInstitution } from '#core/Institution';\nimport { useAuth } from '#core/Auth';\n\ntype GetAvailableSelectedYear = Pick<\n PageQueryProps,\n | 'isAfterEmbargoDate'\n | 'isAfterFreeEmbargoDate'\n | 'isAfterWurDetailsEmbargoDate'\n> & {\n year: number;\n canViewMainEmbargo: boolean;\n canViewFreeEmbargo: boolean;\n isDetailsPage: boolean;\n canUseElevatedPermissions: boolean;\n useElevatedPermissions: boolean;\n};\n\ntype GetAvailableYearOnYears = Pick<\n PageQueryProps,\n 'isAfterEmbargoDate' | 'isAfterFreeEmbargoDate'\n> & {\n selectedYear: number;\n canViewMainEmbargo: boolean;\n canViewFreeEmbargo: boolean;\n canUseElevatedPermissions: boolean;\n useElevatedPermissions: boolean;\n};\n\ntype GetAvailableEmbargoYears = Pick<\n PageQueryProps,\n 'isAfterEmbargoDate' | 'isAfterFreeEmbargoDate'\n> & {\n canViewMainEmbargo: boolean;\n canUseElevatedPermissions: boolean;\n useElevatedPermissions: boolean;\n};\n\nconst getLatestAvailableYear = (\n years: {\n [key: string]: Boolean;\n },\n selectedYear: number,\n): number => {\n const yearKeys = Object.keys(years).map(Number); // Ensure keys are numbers\n yearKeys.sort((a, b) => b - a); // Sort in descending order\n\n const availableYear = yearKeys.find((year) => years[year]);\n\n return availableYear ?? selectedYear;\n};\n\nconst getAvailableYearOnYears = ({\n isAfterEmbargoDate,\n isAfterFreeEmbargoDate,\n canViewFreeEmbargo,\n canViewMainEmbargo,\n selectedYear,\n canUseElevatedPermissions,\n useElevatedPermissions,\n}: GetAvailableYearOnYears) => {\n const availableSelectedYears = Object.entries(isAfterEmbargoDate)\n .filter(([, value]) => value)\n .map(([year]) => Number(year));\n\n const embargoYears = Object.keys(isAfterEmbargoDate).map((year) =>\n Number(year),\n );\n const freeEmbargoYears = Object.keys(isAfterFreeEmbargoDate).map((year) =>\n Number(year),\n );\n\n if (canUseElevatedPermissions && useElevatedPermissions) {\n const index = embargoYears.indexOf(selectedYear);\n\n return embargoYears.slice(0, index + 1);\n }\n\n if (canViewMainEmbargo) {\n const index = embargoYears.indexOf(selectedYear);\n\n return embargoYears.slice(0, index + 1);\n }\n\n if (canViewFreeEmbargo) {\n if (isAfterFreeEmbargoDate[selectedYear]) {\n const index = freeEmbargoYears.indexOf(selectedYear);\n\n return freeEmbargoYears.slice(0, index + 1);\n }\n }\n\n if (availableSelectedYears.includes(selectedYear)) {\n const index = availableSelectedYears.indexOf(selectedYear);\n return availableSelectedYears.slice(0, index + 1);\n }\n\n return availableSelectedYears;\n};\n\nconst getAvailableEmbargoYears = ({\n isAfterEmbargoDate,\n isAfterFreeEmbargoDate,\n canViewMainEmbargo,\n canUseElevatedPermissions,\n useElevatedPermissions,\n}: GetAvailableEmbargoYears) => {\n const embargoYears = Object.keys(isAfterEmbargoDate).map((year) =>\n Number(year),\n );\n const freeEmbargoYears = Object.keys(isAfterFreeEmbargoDate)\n .filter((year) => isAfterFreeEmbargoDate[year])\n .map((year) => Number(year));\n\n if (\n (canUseElevatedPermissions && useElevatedPermissions) ||\n canViewMainEmbargo\n ) {\n return embargoYears.reverse();\n }\n\n return freeEmbargoYears.reverse();\n};\n\nconst getAvailableSelectedYear = ({\n year,\n canViewMainEmbargo,\n canViewFreeEmbargo,\n isAfterEmbargoDate,\n isAfterFreeEmbargoDate,\n isAfterWurDetailsEmbargoDate,\n isDetailsPage,\n canUseElevatedPermissions,\n useElevatedPermissions,\n}: GetAvailableSelectedYear) => {\n if (isAfterEmbargoDate[year]) {\n return year;\n }\n\n if (canUseElevatedPermissions && useElevatedPermissions) {\n return year;\n }\n\n if (!isDetailsPage) {\n if (!isAfterEmbargoDate[year] && canViewMainEmbargo) {\n return year;\n }\n\n if (isAfterFreeEmbargoDate[year] && canViewFreeEmbargo) {\n return year;\n }\n }\n\n if (\n isDetailsPage &&\n isAfterWurDetailsEmbargoDate[year] &&\n canViewMainEmbargo\n ) {\n return year;\n }\n\n return getLatestAvailableYear(isAfterEmbargoDate, year);\n};\n\nexport const DataPlusEmbargoProvider = ({\n children,\n viewEmbargoAction,\n viewFreeEmbargoAction,\n isDetailsPage,\n}: {\n children: ReactNode;\n viewEmbargoAction: string;\n viewFreeEmbargoAction: string;\n isDetailsPage: boolean;\n}) => {\n const {\n query: {\n selectedYear: year,\n isAfterEmbargoDate,\n isAfterFreeEmbargoDate,\n isAfterWurDetailsEmbargoDate,\n },\n } = usePageQuery();\n\n const { institution } = useInstitution();\n\n const { hasResourcePermissionNew } = usePermissions();\n\n const { canUseElevatedPermissions, useElevatedPermissions } = useAuth();\n\n const canViewMainEmbargo = useMemo(\n () =>\n hasResourcePermissionNew({\n action: viewEmbargoAction,\n institutionId: institution.institutionId,\n year,\n }),\n [year, institution, viewEmbargoAction, hasResourcePermissionNew],\n );\n\n const canViewFreeEmbargo = useMemo(\n () =>\n hasResourcePermissionNew({\n action: viewFreeEmbargoAction,\n institutionId: institution.institutionId,\n year,\n }),\n [year, institution, viewFreeEmbargoAction, hasResourcePermissionNew],\n );\n\n const availableSelectedYear = getAvailableSelectedYear({\n year,\n canViewMainEmbargo,\n canViewFreeEmbargo,\n isAfterEmbargoDate,\n isAfterFreeEmbargoDate,\n isAfterWurDetailsEmbargoDate,\n isDetailsPage,\n canUseElevatedPermissions,\n useElevatedPermissions,\n });\n\n const availableYearOnYears = getAvailableYearOnYears({\n selectedYear: year,\n isAfterEmbargoDate,\n isAfterFreeEmbargoDate,\n canViewMainEmbargo,\n canViewFreeEmbargo,\n canUseElevatedPermissions,\n useElevatedPermissions,\n });\n\n // FYI: THIS IS USED IN THE TOP BAR TO DETERMINE WHICH YEARS TO SHOW IN THE YEAR DROPDOWN\n const availableEmbargoYears = getAvailableEmbargoYears({\n isAfterEmbargoDate,\n isAfterFreeEmbargoDate,\n canViewMainEmbargo,\n canUseElevatedPermissions,\n useElevatedPermissions,\n });\n\n return (\n \n {children}\n \n );\n};\n","import React, { createContext, useMemo } from 'react';\nimport { VictoryThemeDefinition, VictoryTheme } from 'victory';\nimport { mergeDeepRight } from 'ramda';\nimport { useTheme } from '@chakra-ui/react';\n\nexport const ChartThemeContext = createContext(VictoryTheme.grayscale);\n\nexport const getThemeColors = (themeColors: {\n [key: string]: Record | string;\n}) =>\n Object.keys(themeColors)\n .filter((colors) => !colors.includes('Alpha'))\n .reduce((acc, colorKey) => {\n const color = themeColors[colorKey];\n if (typeof color === 'object') {\n return [...acc, color[500]];\n }\n return acc;\n }, []);\n\nconst ChartThemeProvider: React.FC = ({ children }) => {\n const chakraTheme = useTheme();\n const themeColors = chakraTheme.colors as {\n [key: string]: Record | string;\n };\n\n const defaultColorScale = useMemo(() => getThemeColors(themeColors), [\n themeColors,\n ]);\n\n const theme: VictoryThemeDefinition = {\n line: {\n colorScale: defaultColorScale,\n },\n scatter: {\n colorScale: defaultColorScale,\n },\n axis: {\n style: {\n grid: {\n stroke: chakraTheme.colors.gray[300],\n },\n tickLabels: {\n fontSize: 14,\n },\n },\n },\n boxplot: {\n style: {\n min: {\n stroke: chakraTheme.colors.gray[500],\n strokeWidth: 2,\n },\n max: {\n stroke: chakraTheme.colors.gray[500],\n strokeWidth: 2,\n },\n q1: {\n stroke: chakraTheme.colors.gray[500],\n fill: chakraTheme.colors.gray[500],\n fillOpacity: 0.2,\n strokeWidth: 2,\n },\n q3: {\n stroke: chakraTheme.colors.gray[500],\n fill: chakraTheme.colors.gray[500],\n fillOpacity: 0.2,\n strokeWidth: 2,\n },\n median: {\n stroke: chakraTheme.colors.gray[500],\n },\n },\n },\n stack: {\n colorScale: defaultColorScale,\n },\n legend: {\n colorScale: defaultColorScale,\n orientation: 'vertical',\n gutter: 20,\n y: 10,\n style: {\n data: {\n type: 'square',\n },\n },\n },\n tooltip: {\n cornerRadius: 0,\n flyoutPadding: 10,\n flyoutStyle: {\n stroke: chakraTheme.colors.gray[400],\n fill: chakraTheme.colors.white,\n },\n },\n group: {\n colorScale: defaultColorScale,\n },\n };\n\n const compiledTheme = mergeDeepRight(\n VictoryTheme.grayscale,\n theme,\n ) as VictoryThemeDefinition;\n\n return (\n \n {children}\n \n );\n};\n\nexport default ChartThemeProvider;\n","import { createContext, useContext } from 'react';\nimport {\n QueryBuilderConfig,\n QueryBuilderState,\n QueryBuilderOnChange,\n} from '#coreComponents/QueryBuilder/types';\nimport { QueryBuilderContextValues } from '../components/QueryBuilderProvider';\n\ninterface QueryBuilderContextProps {\n config: Maybe;\n query: Maybe;\n filters: QueryBuilderState;\n setConfig: (config: QueryBuilderConfig, pageName: string) => void;\n applyChanges: (args: QueryBuilderContextValues) => void;\n}\n\nexport const defaultContextValue = {\n config: null,\n query: null,\n filters: {\n selectedYears: [],\n querySelectOne: null,\n querySelectTwo: null,\n querySelectThree: null,\n selectedFilters: {},\n },\n setConfig: () => {},\n applyChanges: () => {},\n};\n\nexport const QueryBuilderContext = createContext(\n defaultContextValue,\n);\n\nexport const useQueryBuilder = () => useContext(QueryBuilderContext);\n\nexport default QueryBuilderContext;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport { mergeDeepRight } from 'ramda';\n\nimport {\n QueryBuilderConfig,\n QuerySelector,\n QueryBuilderFilters,\n QueryBuilderOnChange,\n QueryBuilderIndicator,\n QueryBuilderDimension,\n QueryBuilderGroupBy,\n} from '#coreComponents/QueryBuilder/types';\nimport { QueryBuilderContext } from '../contexts/QueryBuilderContext';\nimport { SelectData, SelectOptions } from '#coreComponents/Select/types';\nimport { useSessionStorage } from '#hooks/useSessionStorage';\n\nexport type QueryBuilderContextValues = QueryBuilderOnChange & {\n groupByKey: string;\n indicatorDataKey: string;\n};\n\ntype SelectorKey = 'querySelectOne' | 'querySelectTwo' | 'querySelectThree';\ntype Selector =\n | QueryBuilderIndicator\n | QueryBuilderDimension\n | QueryBuilderGroupBy\n | null;\ntype SessionStorageValues =\n | {\n [keys: string]: QueryBuilderContextValues;\n }\n | undefined;\n\nexport const resetSelectedValues = (\n config: QueryBuilderConfig,\n): QueryBuilderConfig => {\n const { querySelectOne, querySelectTwo, querySelectThree } = config;\n querySelectOne.meta = { ...querySelectOne.meta, selected: undefined };\n querySelectOne.options = querySelectOne.options.map((option) => {\n if (!option.children) {\n return option;\n }\n\n return {\n ...option,\n children: mergeDeepRight(option.children, {\n meta: { selected: undefined },\n }),\n };\n });\n\n if (querySelectTwo) {\n querySelectTwo.meta = { ...querySelectTwo?.meta, selected: undefined };\n }\n\n if (querySelectThree) {\n querySelectThree.meta = { ...querySelectThree?.meta, selected: undefined };\n }\n\n return mergeDeepRight(config, {\n querySelectOne,\n querySelectTwo,\n querySelectThree,\n }) as QueryBuilderConfig;\n};\n\nexport const getSelectorData = (\n config: QueryBuilderConfig,\n selectorKey: SelectorKey,\n selector: Selector,\n) => {\n const selectorConfig = config[selectorKey];\n\n if (!selectorConfig || !selector) {\n return null;\n }\n\n if (selector.selectedChildren) {\n const updatedOptions = selectorConfig.options.map((option) => {\n if (option.key !== selector.key || !option.children) {\n return option;\n }\n return mergeDeepRight(option, {\n children: {\n meta: { selected: selector.selectedChildren?.map((i) => i.key) },\n },\n }) as SelectOptions;\n });\n\n // @ts-ignore\n return mergeDeepRight(selectorConfig, {\n options: updatedOptions,\n }) as SelectData;\n }\n\n return mergeDeepRight(selectorConfig, {\n meta: { selected: selector.key },\n }) as SelectData;\n};\n\nexport const updateSelectorState = (\n config: QueryBuilderConfig,\n selectorKey: SelectorKey,\n selector: Selector,\n) => (prevState: Maybe) => {\n if (!selector) {\n return null;\n }\n const data = getSelectorData(config, selectorKey, selector);\n\n if (data) {\n return {\n label: selector.label,\n data,\n selectedItems: selector.selectedChildren?.map((i) => i.key) || [\n selector.key,\n ],\n };\n }\n\n return prevState;\n};\n\nexport const createQueryFromConfig = (\n config: QueryBuilderConfig,\n sessionStorageValue?: QueryBuilderContextValues,\n): QueryBuilderContextValues => {\n const indicatorData = config.querySelectOne.options.find((item) => {\n const selectedKey =\n sessionStorageValue?.indicatorDataKey ||\n config.querySelectOne.meta?.selected;\n return selectedKey\n ? item.key === selectedKey\n : item.key ===\n config.querySelectOne.options.find(\n (option) => option.children?.meta?.selected,\n )?.key;\n })!;\n\n const mapItem = config.map.find((i) => i.key === indicatorData.key)!;\n const selectedChildren = indicatorData.children\n ? indicatorData.children.options.filter(({ key }) =>\n indicatorData.children?.meta?.selected?.includes(key),\n )\n : undefined;\n\n const indicator = {\n key: mapItem.key,\n type: mapItem.type,\n options: mapItem.options,\n querySelectTwo: mapItem.querySelectTwo,\n querySelectThree: mapItem.querySelectThree,\n filteredOptions: mapItem.filteredOptions,\n gql: mapItem.gql,\n label: indicatorData.label,\n selectedChildren,\n selectedFilters: Object.entries(config.filteredOptions)\n .filter(([, values]) => values.meta?.selected)\n .reduce(\n (acc, [key, values]) => ({ ...acc, [key]: values.meta?.selected }),\n {},\n ),\n };\n\n const dimension = config.variableOptions.find(({ key }) => {\n const { querySelectTwo: selectTwo, options } = mapItem;\n return selectTwo ? key === selectTwo : key === options![0];\n })!;\n\n const { label: groupByLabel, key: groupByKey } = config.variableOptions.find(\n ({ key }) => {\n const { querySelectThree: selectThree, options } = mapItem;\n return selectThree ? key === selectThree : key === options![1];\n },\n )!;\n const groupBy = {\n label: groupByLabel,\n key: groupByKey,\n dataOptions: config.dataOptions[groupByKey],\n };\n\n return {\n groupByKey: sessionStorageValue?.groupByKey || groupByKey,\n indicatorDataKey:\n sessionStorageValue?.indicatorDataKey || indicatorData.key,\n indicator: sessionStorageValue?.indicator\n ? {\n ...sessionStorageValue.indicator,\n gql: mapItem.gql,\n querySelectTwo: mapItem.querySelectTwo,\n querySelectThree: mapItem.querySelectThree,\n }\n : indicator,\n dimension: sessionStorageValue?.dimension || dimension,\n groupBy: sessionStorageValue?.groupBy\n ? {\n ...sessionStorageValue.groupBy,\n dataOptions:\n config.dataOptions[sessionStorageValue?.groupByKey || groupByKey],\n }\n : groupBy,\n years: sessionStorageValue?.years.length\n ? sessionStorageValue.years\n : config.years.slice(-2),\n filters: sessionStorageValue?.filters || indicator.selectedFilters,\n };\n};\nconst QueryBuilderProvider: React.FC<{ config?: QueryBuilderConfig }> = ({\n config: initialConfig,\n children,\n}) => {\n const [config, setConfig] = useState>(\n initialConfig || null,\n );\n const [query, setQuery] = useState>(null);\n const [selectedYears, setSelectedYears] = useState([]);\n const [selectedFilters, setSelectedFilters] = useState(\n {},\n );\n const [querySelectOne, setQuerySelectOne] = useState>(\n null,\n );\n const [querySelectTwo, setQuerySelectTwo] = useState>(\n null,\n );\n const [querySelectThree, setQuerySelectThree] = useState<\n Maybe\n >(null);\n\n const [sessionStorageValues, setSessionStorageValues] = useSessionStorage<\n SessionStorageValues\n >('queryBuilderValue', undefined);\n const [pageName, setPageName] = useState>(null);\n\n const setPageConfig = useCallback(\n (newConfig: QueryBuilderConfig, newPageName: string) => {\n setConfig(newConfig);\n setPageName(newPageName);\n },\n [],\n );\n const applyChanges = useCallback(\n (args: QueryBuilderContextValues) => {\n if (!config) {\n return;\n }\n const {\n indicator,\n dimension,\n groupBy,\n years,\n filters,\n groupByKey,\n indicatorDataKey,\n } = args;\n const cleanedConfig = resetSelectedValues({ ...config });\n setQuery(args);\n if (pageName) {\n setSessionStorageValues((pre) => ({\n ...pre,\n [pageName]: {\n dimension,\n indicator,\n groupBy,\n filters,\n years,\n groupByKey,\n indicatorDataKey,\n },\n }));\n }\n setQuerySelectOne(\n updateSelectorState(cleanedConfig, 'querySelectOne', indicator),\n );\n setQuerySelectTwo(\n updateSelectorState(cleanedConfig, 'querySelectTwo', dimension),\n );\n setQuerySelectThree(\n updateSelectorState(cleanedConfig, 'querySelectThree', groupBy),\n );\n setSelectedYears(years);\n setSelectedFilters(filters);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [config],\n );\n\n useEffect(() => {\n if (config && pageName) {\n applyChanges(\n createQueryFromConfig(\n config,\n sessionStorageValues && sessionStorageValues[pageName],\n ),\n );\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [config, applyChanges]);\n\n return (\n \n {children}\n \n );\n};\n\nexport default QueryBuilderProvider;\n","import axios from 'axios';\n\nconst getPermissionList = async (apiEndpoint: string, authToken: string) => {\n const PERMISSION_URL = `https://${apiEndpoint}/permissions-proxy/permissions/list`;\n\n try {\n const response = await axios.get(PERMISSION_URL, {\n headers: {\n authorization: `Bearer ${authToken}`,\n },\n });\n\n return response.data;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.log(`Failed to load permission list: ${e.message}`);\n return null;\n }\n};\n\nexport default getPermissionList;\n","import React from 'react';\nimport { Heading as ChakraHeading, HeadingProps } from '@chakra-ui/react';\n\nconst getDefaultHeadingSize = (headingAsProp: string | undefined): string => {\n const heading = headingAsProp || '网曝门';\n switch (heading) {\n case 'h1':\n return 'xl';\n case '网曝门':\n return 'lg';\n case 'h3':\n return 'sm';\n case 'h4':\n return 'sm';\n case 'h5':\n case 'h6':\n default:\n return 'xs';\n }\n};\n\nconst Heading = (props: HeadingProps) => {\n const { as: asProp } = props;\n const defaultSize = getDefaultHeadingSize(\n typeof asProp === 'string' ? asProp : undefined,\n );\n return ;\n};\n\nexport default Heading;\n","import {\n Flex,\n Menu,\n MenuButton,\n MenuList,\n MenuItem,\n Button,\n Tooltip,\n Box,\n FormLabel,\n Switch,\n} from '@chakra-ui/react';\nimport {\n Api20,\n ColumnDependency20,\n Finance20,\n Locked20,\n Logout20,\n Password20,\n Settings24,\n User20,\n UserProfile20,\n} from '@carbon/icons-react';\n\nimport { useCopyToClipboard } from 'react-use';\nimport React from 'react';\nimport { useInstitution } from '#core/Institution';\nimport { RequireRole } from '#core/Permissions';\nimport { useAuth } from '#core/Auth';\nimport { useEnvironment } from '#core/Environment';\nimport RequireClientRole from '#core/Permissions/components/RequireClientRole';\n\nconst SettingsButton: React.FC = () => {\n const {\n hasManyInstitutions,\n institution,\n apiHeaders: institutionApiHeaders,\n clearActiveInstitution,\n } = useInstitution();\n\n const {\n keycloak,\n token,\n apiHeaders: authApiHeaders,\n canUseElevatedPermissions,\n useElevatedPermissions,\n setUseElevatedPermissions,\n actions: { logOut },\n }: any = useAuth();\n const { apiEndpoint, baseUrl } = useEnvironment();\n const [, clipboardCopy] = useCopyToClipboard();\n\n const copyToClipboard = (data: string | object, message: string) => {\n clipboardCopy(\n typeof data === 'string' ? data : JSON.stringify(data, null, 2),\n );\n document.dispatchEvent(\n new CustomEvent('datapoints-dev-message', {\n detail: { message },\n }),\n );\n };\n return (\n \n }\n border=\"1px\"\n bg=\"white\"\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.200' }}\n w={128}\n minW={128}\n >\n Settings\n \n \n {hasManyInstitutions && (\n \n Change Institution\n \n )}\n {canUseElevatedPermissions && (\n \n \n \n \n \n \n {' '}\n \n Use elevated permissions\n \n \n \n \n setUseElevatedPermissions(event.target.checked)\n }\n />\n \n \n )}\n \n }\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.200' }}\n _focus={{ bg: 'gray.200' }}\n data-testid=\"open-graphiQl\"\n onClick={() => {\n copyToClipboard(\n {\n ...authApiHeaders,\n ...institutionApiHeaders,\n },\n 'Auth token copied to clipboard',\n );\n setTimeout(() => {\n window.open(`https://${apiEndpoint}/graphql`);\n }, 1000);\n }}\n >\n GraphiQL\n \n }\n onClick={() => {\n copyToClipboard(\n `Bearer ${token}`,\n 'Auth token copied to clipboard',\n );\n setTimeout(() => {\n window.open(`https://${apiEndpoint}/legacy-api/docs/`);\n }, 1000);\n }}\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.200' }}\n _focus={{ bg: 'gray.200' }}\n data-testid=\"open-swagger\"\n >\n Swagger\n \n }\n onClick={() =>\n copyToClipboard(\n `Bearer ${token}`,\n 'Auth token copied to clipboard',\n )\n }\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.200' }}\n _focus={{ bg: 'gray.200' }}\n data-testid=\"copy-token\"\n >\n Copy Token\n \n }\n onClick={() =>\n copyToClipboard(\n institution.institutionId,\n 'Institution ID copied to clipboard',\n )\n }\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.200' }}\n _focus={{ bg: 'gray.200' }}\n data-testid=\"copy-institution\"\n >\n Copy Institution Id\n \n \n \n }\n onClick={keycloak?.accountManagement}\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.200' }}\n _focus={{ bg: 'gray.200' }}\n >\n Impersonate\n \n \n }\n onClick={keycloak?.accountManagement}\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.200' }}\n _focus={{ bg: 'gray.200' }}\n >\n My Profile\n \n }\n onClick={() =>\n logOut({\n redirectUri: baseUrl,\n })\n }\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.200' }}\n _focus={{ bg: 'gray.200' }}\n data-testid=\"logout-button\"\n >\n Logout\n \n \n \n );\n};\n\nexport default SettingsButton;\n","import React from 'react';\nimport { CrossTab32 } from '@carbon/icons-react';\nimport UpsellScreen from '#coreComponents/UpsellScreen';\n\nconst items = ['Key institutional data across sdgs'];\nconst SdgUpsell = () => (\n \n \n \n Dive into the key statistics of your sdg impact.\n \n \n \n);\n\nexport default SdgUpsell;\n","import React from 'react';\nimport { Locked32 } from '@carbon/icons-react';\nimport { Flex, Box, Text, Tooltip } from '@chakra-ui/react';\n\nconst DataPointsLogoText: React.FC<{\n canUseElevatedPermissions: boolean;\n useElevatedPermissions: boolean;\n}> = ({ canUseElevatedPermissions, useElevatedPermissions }) => (\n \n \n Data\n \n Points\n \n \n {canUseElevatedPermissions && useElevatedPermissions && (\n \n \n \n \n \n )}\n \n);\n\nexport default DataPointsLogoText;\n","import React from 'react';\nimport { Link } from '@reach/router';\nimport { Button, ButtonProps, Box } from '@chakra-ui/react';\n\nconst attrs: Partial = {\n variant: 'ghost',\n width: '100%',\n color: 'white',\n justifyContent: 'flex-start',\n py: 4,\n px: 6,\n borderRadius: 0,\n _hover: { bg: 'gray.800' },\n _active: { bg: 'gray.900' },\n height: 'auto',\n};\n\nconst SidebarLink: React.FC<{\n to: string;\n // @TODO\n icon?: any;\n isInGroup?: boolean;\n isActive?: boolean;\n}> = ({ children, to, icon: Icon, isInGroup, isActive }) => (\n \n : undefined}\n as={Link}\n to={to}\n pl={isInGroup ? 12 : 6}\n bg=\"white\"\n color=\"gray.800\"\n _hover={{\n bg: 'gray.200',\n color: 'gray.800',\n fontWeight: 'bold',\n // @ts-ignore\n '&:before': {\n width: 1,\n },\n }}\n _before={{\n content: `\"\"`,\n position: 'absolute',\n top: 0,\n left: 0,\n h: '100%',\n width: isActive ? 1 : 0,\n bg: 'yellow.400',\n transition: '.1s width ease-in',\n }}\n fontWeight={isActive || !isInGroup ? 'bold' : 'normal'}\n _active={{ bg: 'gray.200', fontWeight: 'bold' }}\n >\n \n {children}\n \n \n \n);\n\nconst SidebarButton: React.FC<\n {\n icon: any;\n } & ButtonProps\n> = ({ icon: Icon, onClick, children, ...rest }) => (\n }\n onClick={onClick}\n variant=\"ghost\"\n bg=\"white\"\n color=\"gray.800\"\n _hover={{\n bg: 'gray.200',\n color: 'gray.800',\n }}\n _active={{ bg: 'gray.200' }}\n >\n \n {children}\n \n \n);\n\nexport { SidebarButton, SidebarLink };\n","import React from 'react';\nimport { Box } from '@chakra-ui/react';\nimport { ChevronDown20, CarbonIconType } from '@carbon/icons-react';\nimport { SidebarButton } from './SidebarTriggers';\n\ninterface SidebarGroupProps {\n icon: CarbonIconType;\n label: string;\n isOpen: boolean;\n userIsWithin: boolean;\n handleToggle: React.Dispatch>;\n}\n\nconst SidebarGroup: React.FC = ({\n children,\n icon,\n label,\n isOpen,\n userIsWithin,\n handleToggle,\n}) => {\n const onClick = () => {\n handleToggle(!isOpen ? label : null);\n };\n\n return (\n \n \n \n {label}\n \n \n \n {isOpen && children}\n \n );\n};\n\nexport default SidebarGroup;\n","import React, { useState } from 'react';\nimport { useLocation } from '@reach/router';\nimport { Box, Flex, IconButton } from '@chakra-ui/react';\nimport { 网曝门20, Menu32 } from '@carbon/icons-react';\n\nimport DataPointsLogoText from './DataPointsLogoText';\nimport SidebarGroup from './SidebarGroup';\nimport { SidebarLink } from './SidebarTriggers';\nimport { useProducts } from '#core/Products';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\n\nconst MenuIcon = () => ;\nconst Sidebar: React.FC = () => {\n const { canUseElevatedPermissions, useElevatedPermissions }: any = useAuth(); // JME2\n\n const location = useLocation();\n\n const { products } = useProducts();\n\n const [, , productPath] = location.pathname.split('/');\n const productUserIsWithin = products.find(\n (product) => product.path === productPath,\n );\n\n const [openGroup, setOpenGroup] = useState(\n productUserIsWithin?.name || null,\n );\n\n const [isExpanded, setIsExpanded] = useState(false);\n\n const mobileAndTabletDisplay = isExpanded ? 'flex' : 'none';\n\n return (\n <>\n \n }\n color=\"gray.900\"\n bg={useElevatedPermissions ? 'red.700' : 'white'}\n _hover={{ bg: useElevatedPermissions ? 'red.800' : 'gray.100' }}\n _active={{ bg: useElevatedPermissions ? 'red.900' : 'gray.200' }}\n aria-label=\"Open side bar menu\"\n onClick={() => setIsExpanded(!isExpanded)}\n data-testid=\"menu\"\n display={{ base: 'inline-flex', lg: 'none' }}\n />\n \n \n \n \n \n 网曝门\n \n\n {products.map((product) => {\n if (product.productConfig.noChildren) {\n const page = product.pages[0];\n return (\n \n {product.name}\n \n );\n }\n return (\n \n \n {product.pages.map((page) => {\n if (page.hiddenPage) {\n return null;\n }\n return (\n \n {page.name}\n \n );\n })}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default Sidebar;\n","import { createContext, useContext } from 'react';\n\nexport type Release = {\n id?: string;\n releaseDate?: string;\n year: number;\n resource?: string;\n};\n\ntype YearsType = {\n availableYears: {\n [key: string]: Release[];\n };\n};\n\nexport const defaultYearsContext = {\n availableYears: {\n wur: [],\n sed: [],\n sdg: [],\n reputation: [],\n japanrankingdashboard: [],\n 'new-data': [],\n cid: [],\n latam: [],\n crd: [],\n 'wur-reporter': [],\n explore: [],\n },\n};\n\nconst YearsContext = createContext({\n ...defaultYearsContext,\n});\n\nexport const useYears = () => useContext(YearsContext);\n\nexport default YearsContext;\n","import React from 'react';\nimport { range } from 'ramda';\nimport { gql, useQuery } from '@apollo/client';\n\nimport { AvailableYearsQuery } from '#types/generated/graphql';\n\nimport YearsContext from '../contexts/YearsContext';\n\nconst Years: React.FC<{}> = ({ children }) => {\n const { data, error } = useQuery(\n gql`\n query AvailableYears($releaseNames: [String]!) {\n releases(releaseNames: $releaseNames) {\n id\n year\n releaseDate\n }\n }\n `,\n {\n variables: {\n releaseNames: ['wur'],\n },\n },\n );\n\n if (error) {\n throw new Error('Error while receiving WUR available years');\n }\n\n const { releases: wurAvailableYears } = data || { releases: [] };\n\n const getReleaseYear = (startDate: number) =>\n range(startDate, new Date().getFullYear() + 2).map((year) => ({\n year,\n }));\n\n return (\n \n {children}\n \n );\n};\n\nexport default Years;\n","export type Maybe = T | null;\nexport type Exact = { [K in keyof T]: T[K] };\nexport type MakeOptional = Omit & { [SubKey in K]?: Maybe };\nexport type MakeMaybe = Omit & { [SubKey in K]: Maybe };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n Date: any;\n JSON: any;\n JSONObject: any;\n};\n\n\n\nexport type AggregateData = {\n __typename?: 'AggregateData';\n count: Scalars['Int'];\n lowerQuartile: Scalars['Float'];\n max: Scalars['Float'];\n median: Scalars['Float'];\n min: Scalars['Float'];\n upperQuartile: Scalars['Float'];\n};\n\nexport type AllInstitutionsFilters = {\n clusters?: Maybe>;\n location?: Maybe;\n name?: Maybe;\n overallRank?: Maybe;\n subjects?: Maybe>;\n};\n\nexport type AllRankedInstitutions = {\n __typename?: 'AllRankedInstitutions';\n count: Scalars['Int'];\n hasMore: Scalars['Boolean'];\n institutions: Array;\n page: Scalars['Int'];\n pages: Scalars['Int'];\n perPage: Scalars['Int'];\n total: Scalars['Int'];\n};\n\nexport type AllRankedInstitutionsData = {\n __typename?: 'AllRankedInstitutionsData';\n continent: Continent;\n country: Scalars['String'];\n founded: Scalars['Int'];\n id: Scalars['String'];\n institutionData?: Maybe;\n institutionId: Scalars['String'];\n logo: Scalars['String'];\n name: Scalars['String'];\n results?: Maybe>;\n};\n\nexport type AllRankedInstitutionsDataInstitutions = {\n __typename?: 'AllRankedInstitutionsDataInstitutions';\n cluster?: Maybe;\n totalStaff: Scalars['Int'];\n totalStudents: Scalars['Int'];\n};\n\nexport type AllRankedInstitutionsDataResult = {\n __typename?: 'AllRankedInstitutionsDataResult';\n jointRanked: Scalars['Boolean'];\n level1: AllRankedInstitutionsResultLevel1;\n rank: GraBanding;\n year: Scalars['Int'];\n};\n\nexport type AllRankedInstitutionsResultLevel1 = {\n __typename?: 'AllRankedInstitutionsResultLevel1';\n key: Scalars['String'];\n name: Scalars['String'];\n};\n\nexport type AllWurInstitutions = {\n __typename?: 'AllWURInstitutions';\n count: Scalars['Int'];\n hasMore: Scalars['Boolean'];\n institutions: Array;\n page: Scalars['Int'];\n pages: Scalars['Int'];\n perPage: Scalars['Int'];\n total: Scalars['Int'];\n};\n\nexport type AvailableYears = {\n __typename?: 'AvailableYears';\n id: Scalars['ID'];\n releaseDate: Scalars['String'];\n resource: Scalars['ID'];\n year: Scalars['Int'];\n};\n\nexport type BestRank = {\n __typename?: 'BestRank';\n institution: Institution;\n rank?: Maybe;\n};\n\nexport type BibliometricResult = {\n __typename?: 'BibliometricResult';\n citation: Scalars['Float'];\n id: Scalars['ID'];\n institution: Institution;\n internationalCollaboration?: Maybe;\n researchProductivity?: Maybe;\n resource: Scalars['ID'];\n};\n\nexport type BibliometricSubject = {\n __typename?: 'BibliometricSubject';\n aggregateData: AggregateData;\n id: Scalars['ID'];\n key: Scalars['String'];\n name: Scalars['String'];\n resource?: Maybe;\n results: Array;\n shortName: Scalars['String'];\n timeframe?: Maybe;\n};\n\n\nexport type BibliometricSubjectAggregateDataArgs = {\n filter?: Maybe;\n};\n\n/**\n * A pre-defined group of institutions that are selected internally at THE.\n *\n * e.g. \"Old Stars\", \"Technology Challengers\"\n */\nexport type Cluster = {\n __typename?: 'Cluster';\n description?: Maybe;\n id: Scalars['ID'];\n institutions: Array;\n name: Scalars['String'];\n resource: Scalars['ID'];\n /** List of subject areas that this group of institutions are strongest in. */\n strengthsText: Scalars['String'];\n /** List of subject areas that this group of institutions are weakest in. */\n weaknessesText: Scalars['String'];\n};\n\nexport enum Continent {\n Africa = 'AFRICA',\n Antartica = 'ANTARTICA',\n Asia = 'ASIA',\n Europe = 'EUROPE',\n NorthAmerica = 'NORTH_AMERICA',\n Oceania = 'OCEANIA',\n SouthAmerica = 'SOUTH_AMERICA'\n}\n\nexport type DataPointsPeerChangeDraft = {\n __typename?: 'DataPointsPeerChangeDraft';\n fullName?: Maybe;\n institutionIds: Array;\n peers?: Maybe>;\n userId: Scalars['String'];\n username: Scalars['String'];\n};\n\nexport type DataPointsProduct = {\n __typename?: 'DataPointsProduct';\n institutionGroup: Array>;\n institutionGroups: Array;\n institutionId: Scalars['String'];\n locations: DataPointsProductLocations;\n name: Scalars['String'];\n peersInfo: DataPointsProductPeersInfo;\n};\n\n\nexport type DataPointsProductInstitutionGroupArgs = {\n name: Scalars['String'];\n};\n\nexport type DataPointsProductInstitution = {\n __typename?: 'DataPointsProductInstitution';\n continent: Scalars['String'];\n country: Scalars['String'];\n id: Scalars['ID'];\n institutionId: Scalars['String'];\n logo: Scalars['String'];\n name: Scalars['String'];\n};\n\nexport type DataPointsProductInstitutionGroup = {\n __typename?: 'DataPointsProductInstitutionGroup';\n institutions: Array;\n name: Scalars['String'];\n};\n\nexport type DataPointsProductLocations = {\n __typename?: 'DataPointsProductLocations';\n continents: Array;\n countries: Array;\n};\n\nexport type DataPointsProductPeersInfo = {\n __typename?: 'DataPointsProductPeersInfo';\n lastPeerChangeDate?: Maybe;\n maxPeerCount: Scalars['Int'];\n peerChangeDraft?: Maybe;\n peerChangeIntervalWeeks: Scalars['Int'];\n peerChangeOpen: Scalars['Boolean'];\n supportsChangingPeers: Scalars['Boolean'];\n supportsPeers: Scalars['Boolean'];\n};\n\n\nexport type DetailedSubject = {\n __typename?: 'DetailedSubject';\n aggregateData: AggregateData;\n id: Scalars['ID'];\n key: Scalars['String'];\n level3s: Array;\n metrics: Array;\n name: Scalars['String'];\n resource: Scalars['ID'];\n results: Array;\n shortName: Scalars['String'];\n};\n\n\nexport type DetailedSubjectResultsArgs = {\n input?: Maybe;\n};\n\nexport type DetailedSubjectMetric = {\n __typename?: 'DetailedSubjectMetric';\n id: Scalars['ID'];\n key: Scalars['String'];\n name: Scalars['String'];\n};\n\nexport type ExploreInstitution = {\n __typename?: 'ExploreInstitution';\n allowScoresForExcluded: Scalars['Boolean'];\n country: Scalars['String'];\n currencyCode?: Maybe;\n id: Scalars['String'];\n};\n\nexport type ExploreInstitutionInput = {\n allowScoresForExcluded: Scalars['Boolean'];\n country: Scalars['String'];\n currencyCode?: Maybe;\n id: Scalars['String'];\n};\n\nexport type GraAggregateFilterInput = {\n group?: Maybe;\n institutionIds?: Maybe>;\n region?: Maybe;\n};\n\nexport type GraBanding = {\n __typename?: 'GRABanding';\n higher: Scalars['Float'];\n lower: Scalars['Float'];\n};\n\nexport type GraCluster = {\n __typename?: 'GRACluster';\n bestRanked: Array>;\n description?: Maybe;\n geographies: Array;\n id: Scalars['ID'];\n institutionCount?: Maybe;\n medianAge?: Maybe;\n medianRank?: Maybe;\n name: Scalars['String'];\n strengthsText?: Maybe;\n weaknessesText?: Maybe;\n};\n\nexport type GraDataPointsProductLocations = {\n __typename?: 'GRADataPointsProductLocations';\n continents: Array;\n countries: Array;\n};\n\nexport type GraInstitutionData = {\n __typename?: 'GRAInstitutionData';\n cluster: GraCluster;\n countryRank?: Maybe;\n currency: Scalars['String'];\n femaleStudentPercentage: Scalars['Float'];\n id: Scalars['ID'];\n institution: Institution;\n institutionsInCountryCount: Scalars['Int'];\n internationalStudentPercentage: Scalars['Float'];\n level1sData: Array;\n pppToUsd: Scalars['Float'];\n resource: Scalars['ID'];\n studentToStaffPercentage: Scalars['Float'];\n totalStudents: Scalars['Int'];\n};\n\nexport type GraLevel1 = {\n __typename?: 'GRALevel1';\n aggregateData: AggregateData;\n id: Scalars['ID'];\n key: Scalars['String'];\n level2s: Array;\n name: Scalars['String'];\n resource: Scalars['ID'];\n result?: Maybe;\n results: Array;\n};\n\n\nexport type GraLevel1AggregateDataArgs = {\n filter?: Maybe;\n};\n\n\nexport type GraLevel1ResultArgs = {\n institutionId?: Maybe;\n};\n\n\nexport type GraLevel1ResultsArgs = {\n input?: Maybe;\n};\n\nexport type GraLevel2 = {\n __typename?: 'GRALevel2';\n aggregateData: AggregateData;\n id: Scalars['ID'];\n key: Scalars['String'];\n level3s: Array;\n name: Scalars['String'];\n resource: Scalars['ID'];\n result: Level2Result;\n results: Array;\n};\n\n\nexport type GraLevel2AggregateDataArgs = {\n filter?: Maybe;\n};\n\n\nexport type GraLevel2ResultArgs = {\n institutionId?: Maybe;\n};\n\n\nexport type GraLevel2ResultsArgs = {\n input?: Maybe;\n};\n\nexport type GraLevel3 = {\n __typename?: 'GRALevel3';\n aggregateData: AggregateData;\n aggregateScoreData: AggregateData;\n aggregateScorePerformanceData: AggregateData;\n aggregateValueData: AggregateData;\n id: Scalars['ID'];\n key: Scalars['String'];\n name: Scalars['String'];\n resource: Scalars['ID'];\n result: Result;\n results: Array;\n valueType: ValueType;\n weighting: Scalars['Float'];\n};\n\n\nexport type GraLevel3AggregateDataArgs = {\n aggregateType?: Maybe;\n filter?: Maybe;\n populationYear?: Maybe;\n};\n\n\nexport type GraLevel3ResultArgs = {\n institutionId?: Maybe;\n};\n\n\nexport type GraLevel3ResultsArgs = {\n filter?: Maybe;\n};\n\nexport enum GraMetricAggregateType {\n Score = 'SCORE',\n Value = 'VALUE'\n}\n\nexport enum GraQuarter {\n Q1 = 'Q1',\n Q2 = 'Q2',\n Q3 = 'Q3',\n Q4 = 'Q4',\n Year = 'YEAR'\n}\n\n/**\n * TODO: Should be moved to GRA repository\n * Represents a yearly GRA data release for the selected release.\n */\nexport type GraRelease = {\n __typename?: 'GRARelease';\n bandings: Array;\n bibliometricSubject: BibliometricSubject;\n bibliometricSubjects?: Maybe>;\n clusters: Array;\n detailedSubject: DetailedSubject;\n detailedSubjects: Array;\n embargoEndDate: Scalars['String'];\n embargoStartDate: Scalars['String'];\n freeEmbargoStartDate: Scalars['String'];\n id: Scalars['ID'];\n institutionData?: Maybe;\n institutionsData?: Maybe;\n level1: GraLevel1;\n level1s: Array;\n levelDefinitions?: Maybe;\n locations: GraDataPointsProductLocations;\n releaseDate: Scalars['String'];\n resource: Scalars['ID'];\n totalRankedInstitutions: Scalars['Float'];\n type: Scalars['String'];\n wurDetailsEmbargoStartDate: Scalars['String'];\n year: Scalars['Int'];\n};\n\n\n/**\n * TODO: Should be moved to GRA repository\n * Represents a yearly GRA data release for the selected release.\n */\nexport type GraReleaseBibliometricSubjectArgs = {\n name?: Maybe;\n quarter?: Maybe;\n};\n\n\n/**\n * TODO: Should be moved to GRA repository\n * Represents a yearly GRA data release for the selected release.\n */\nexport type GraReleaseBibliometricSubjectsArgs = {\n names?: Maybe>;\n quarters?: Maybe>;\n};\n\n\n/**\n * TODO: Should be moved to GRA repository\n * Represents a yearly GRA data release for the selected release.\n */\nexport type GraReleaseDetailedSubjectArgs = {\n name?: Maybe;\n};\n\n\n/**\n * TODO: Should be moved to GRA repository\n * Represents a yearly GRA data release for the selected release.\n */\nexport type GraReleaseDetailedSubjectsArgs = {\n names?: Maybe>>;\n};\n\n\n/**\n * TODO: Should be moved to GRA repository\n * Represents a yearly GRA data release for the selected release.\n */\nexport type GraReleaseInstitutionDataArgs = {\n id?: Maybe;\n};\n\n\n/**\n * TODO: Should be moved to GRA repository\n * Represents a yearly GRA data release for the selected release.\n */\nexport type GraReleaseInstitutionsDataArgs = {\n filter?: Maybe;\n};\n\n\n/**\n * TODO: Should be moved to GRA repository\n * Represents a yearly GRA data release for the selected release.\n */\nexport type GraReleaseLevel1Args = {\n name?: Maybe;\n};\n\n\n/**\n * TODO: Should be moved to GRA repository\n * Represents a yearly GRA data release for the selected release.\n */\nexport type GraReleaseLevel1sArgs = {\n names?: Maybe>;\n};\n\nexport type GraReleaseLevelDefinitions = {\n __typename?: 'GRAReleaseLevelDefinitions';\n level1?: Maybe>>;\n level2?: Maybe>>;\n level3?: Maybe>>;\n};\n\nexport type GraReleaseLevelItemDefinition = {\n __typename?: 'GRAReleaseLevelItemDefinition';\n levelId?: Maybe;\n longName?: Maybe;\n name?: Maybe;\n parentId?: Maybe;\n rankingYear?: Maybe;\n shortName?: Maybe;\n type?: Maybe;\n weighting?: Maybe;\n};\n\nexport type Institution = {\n __typename?: 'Institution';\n country: Scalars['String'];\n id: Scalars['ID'];\n institutionId: Scalars['String'];\n name: Scalars['String'];\n resource: Scalars['ID'];\n};\n\nexport type InstitutionData = {\n __typename?: 'InstitutionData';\n iid?: Maybe;\n name: Scalars['String'];\n};\n\nexport type InstitutionFilterInput = {\n iids?: Maybe>;\n location?: Maybe>;\n};\n\n/**\n * A user-defined group of institutions\n *\n * e.g. \"Old Stars\", \"Technology Challengers\"\n */\nexport type InstitutionGroup = {\n __typename?: 'InstitutionGroup';\n id: Scalars['ID'];\n institutions: Array;\n name: Scalars['String'];\n resource: Scalars['ID'];\n};\n\nexport type InstitutionsData = {\n __typename?: 'InstitutionsData';\n count: Scalars['Int'];\n data: Array;\n};\n\n\n\nexport type Level1 = {\n __typename?: 'Level1';\n code: Scalars['String'];\n id: Scalars['ID'];\n label: Scalars['String'];\n level2: Array>;\n rankingRows: Array>;\n};\n\n\nexport type Level1Level2Args = {\n iids?: Maybe>;\n};\n\n\nexport type Level1RankingRowsArgs = {\n filter?: Maybe;\n};\n\nexport type Level1Result = {\n __typename?: 'Level1Result';\n decile?: Maybe;\n id: Scalars['ID'];\n institution: Institution;\n isImputed?: Maybe;\n jointRanked: Scalars['Boolean'];\n rank: GraBanding;\n resource: Scalars['ID'];\n score: GraBanding;\n scoreNumber: Scalars['Float'];\n value: Scalars['Float'];\n year?: Maybe;\n};\n\nexport type Level2 = {\n __typename?: 'Level2';\n code: Scalars['String'];\n id: Scalars['ID'];\n label: Scalars['String'];\n level3: Array>;\n rankingRows: Array>;\n};\n\n\nexport type Level2Level3Args = {\n iids?: Maybe>;\n};\n\nexport type Level2Result = {\n __typename?: 'Level2Result';\n decile?: Maybe;\n id: Scalars['ID'];\n institution: Institution;\n isImputed?: Maybe;\n jointRanked: Scalars['Boolean'];\n rank: Scalars['Float'];\n resource: Scalars['ID'];\n score: Scalars['Float'];\n scoreNumber: Scalars['Float'];\n value: Scalars['Float'];\n year?: Maybe;\n};\n\nexport type Level3 = {\n __typename?: 'Level3';\n code: Scalars['String'];\n id: Scalars['ID'];\n label: Scalars['String'];\n rankingRows: Array>;\n};\n\n/** The ranking methodology to be used by The ranking API */\nexport enum Methodology {\n Wur = 'WUR',\n Wur20 = 'WUR20'\n}\n\nexport type Mutation = {\n __typename?: 'Mutation';\n acceptEmbargo: Array;\n /** Adds a new Scenario for given scenario data. */\n addScenario: ScenarioMutationResult;\n /** Marks active scenarios as archived (with timestamp) for a given scenario Ids. */\n archiveScenarios: ScenarioMutationResult;\n /** Edits an existing scenario for a given scenario Id and the payload. */\n editScenario: Scenario;\n setActiveInstitution?: Maybe;\n setProductPeers: Array;\n setProductPeersDraft?: Maybe;\n /** Marks archived scenarios as active (with timestamp) for a given scenario Ids. */\n unarchiveScenarios: ScenarioMutationResult;\n wurReporterInterimAddScenario: ScenarioMutationResult;\n wurReporterInterimArchiveScenarios: ScenarioMutationResult;\n wurReporterInterimEditScenario: Scenario;\n wurReporterInterimUnarchiveScenarios: ScenarioMutationResult;\n};\n\n\nexport type MutationAcceptEmbargoArgs = {\n dataset: Scalars['String'];\n institutionId: Scalars['String'];\n productName: Scalars['String'];\n year: Scalars['Int'];\n};\n\n\nexport type MutationAddScenarioArgs = {\n input: ScenarioDataInput;\n};\n\n\nexport type MutationArchiveScenariosArgs = {\n institutionId: Scalars['String'];\n scenarioIds: Array;\n};\n\n\nexport type MutationEditScenarioArgs = {\n input: ScenarioDataInput;\n scenarioId: Scalars['String'];\n};\n\n\nexport type MutationSetActiveInstitutionArgs = {\n id: Scalars['String'];\n};\n\n\nexport type MutationSetProductPeersArgs = {\n institutionId: Scalars['String'];\n peerIds: Array;\n productName: Scalars['String'];\n};\n\n\nexport type MutationSetProductPeersDraftArgs = {\n institutionId: Scalars['String'];\n peerIds: Array;\n productName: Scalars['String'];\n};\n\n\nexport type MutationUnarchiveScenariosArgs = {\n institutionId: Scalars['String'];\n scenarioIds: Array;\n};\n\n\nexport type MutationWurReporterInterimAddScenarioArgs = {\n input: ScenarioDataInput;\n};\n\n\nexport type MutationWurReporterInterimArchiveScenariosArgs = {\n allowScoresForExcluded: Scalars['Boolean'];\n institutionId: Scalars['String'];\n scenarioIds: Array;\n};\n\n\nexport type MutationWurReporterInterimEditScenarioArgs = {\n input: ScenarioDataInput;\n scenarioId: Scalars['String'];\n};\n\n\nexport type MutationWurReporterInterimUnarchiveScenariosArgs = {\n allowScoresForExcluded: Scalars['Boolean'];\n institutionId: Scalars['String'];\n scenarioIds: Array;\n};\n\nexport type PermissionAction = {\n __typename?: 'PermissionAction';\n action: Scalars['String'];\n grant: Scalars['Boolean'];\n};\n\n/**\n * Used to represent which segment of a given year the data update is relevant\n * to.\n */\nexport enum Quarter {\n Q1 = 'Q1',\n Q2 = 'Q2',\n Q3 = 'Q3',\n Q4 = 'Q4',\n Year = 'YEAR'\n}\n\nexport type Query = {\n __typename?: 'Query';\n allInstitutions?: Maybe;\n allRankedInstitutions: AllRankedInstitutions;\n /** Return all available WUR release years. */\n availableYears: Array;\n /**\n * Returns the 'Citation' pillar for the given years (and quarters where\n * available).\n *\n * @TODO: Revisit, return type may not be optimal.\n * @TODO: Revisit, figure out permissions for citations\n */\n citations: Array;\n getProductPeersDraft?: Maybe;\n institution?: Maybe;\n institutionGroups?: Maybe;\n legacyPermissions: Array;\n /**\n * Returns the active institution for the user defined by the authentication\n * token. If the token defines multiple institutions, this can be overridden by\n * providing the institution ID in the 'x-datapoints-institution' request header.\n */\n myInstitutions: UserInstitutions;\n /**\n * TODO: Should be moved to GRA repository\n * Return NEW generic ranking data for current release.\n */\n newrelease?: Maybe;\n /**\n * TODO: Should be moved to GRA repository\n * Return NEW generic ranking data for all available releases\n * or only those matching a specified list of years.\n */\n newreleases?: Maybe>>;\n permissions: Array;\n /** Return generic ranking data for current release. */\n release: GraRelease;\n releases: Array;\n scenario?: Maybe;\n /** Return available scenarios for a given institution id and scenario Ids. */\n scenarios?: Maybe>;\n /** Return available submissions for a given institution id and year. */\n submission?: Maybe;\n /** Return the WUR Release for a given year. */\n wurRelease?: Maybe;\n wurReleaseMetric?: Maybe;\n /**\n * Return all available WUR Releases or only those matching the specified list of\n * years.\n */\n wurReleases: Array;\n wurReporterInterimScenario?: Maybe;\n wurReporterInterimScenarios?: Maybe>;\n};\n\n\nexport type QueryAllInstitutionsArgs = {\n excludeIds?: Maybe>;\n filters?: Maybe;\n page?: Maybe;\n perPage?: Maybe;\n rankYear: Scalars['Int'];\n sortBy?: Maybe;\n sortDirection?: Maybe;\n};\n\n\nexport type QueryAllRankedInstitutionsArgs = {\n clusters?: Maybe>>;\n excludeIds?: Maybe>;\n institutionName?: Maybe;\n level1s?: Maybe>>;\n location?: Maybe;\n lowerOverallRank?: Maybe;\n page?: Maybe;\n perPage?: Maybe;\n releaseName: Scalars['String'];\n sortBy?: Maybe;\n sortDirection?: Maybe;\n upperOverallRank?: Maybe;\n year: Scalars['Int'];\n};\n\n\nexport type QueryCitationsArgs = {\n years?: Maybe>;\n};\n\n\nexport type QueryGetProductPeersDraftArgs = {\n institutionId: Scalars['String'];\n productName: Scalars['String'];\n};\n\n\nexport type QueryInstitutionArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type QueryInstitutionGroupsArgs = {\n institutionIds: Array;\n};\n\n\nexport type QueryLegacyPermissionsArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type QueryMyInstitutionsArgs = {\n page?: Maybe;\n perPage?: Maybe;\n search?: Maybe;\n};\n\n\nexport type QueryNewreleaseArgs = {\n year: Scalars['Int'];\n};\n\n\nexport type QueryNewreleasesArgs = {\n years?: Maybe>>;\n};\n\n\nexport type QueryPermissionsArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type QueryReleaseArgs = {\n detailedSubjectIds?: Maybe>;\n detailedSubjectMetricIds?: Maybe>;\n institutionId?: Maybe;\n institutionIds?: Maybe>;\n level1Id?: Maybe;\n region?: Maybe;\n releaseName: Scalars['String'];\n responseFields?: Maybe>>;\n year: Scalars['Int'];\n};\n\n\nexport type QueryReleasesArgs = {\n bibliometricSubjectIds?: Maybe>;\n bibliometricSubjectQuarters?: Maybe>;\n detailedSubjectIds?: Maybe>;\n detailedSubjectMetricIds?: Maybe>;\n institutionId?: Maybe;\n institutionIds?: Maybe>;\n level1Id?: Maybe;\n peerInstitutionId?: Maybe;\n region?: Maybe;\n releaseNames: Array>;\n responseFields?: Maybe>>;\n years?: Maybe>>;\n};\n\n\nexport type QueryScenarioArgs = {\n allowScoresForExcluded: Scalars['Boolean'];\n institutionId: Scalars['String'];\n scenarioId: Scalars['String'];\n};\n\n\nexport type QueryScenariosArgs = {\n allowScoresForExcluded: Scalars['Boolean'];\n filter?: Maybe;\n institutionId: Scalars['String'];\n page?: Maybe;\n perPage?: Maybe;\n sortBy?: Maybe;\n sortDirection?: Maybe;\n};\n\n\nexport type QuerySubmissionArgs = {\n institutionId: Scalars['String'];\n year: Scalars['Int'];\n};\n\n\nexport type QueryWurReleaseArgs = {\n year: Scalars['Int'];\n};\n\n\nexport type QueryWurReleaseMetricArgs = {\n year: Scalars['Int'];\n};\n\n\nexport type QueryWurReleasesArgs = {\n years?: Maybe>;\n};\n\n\nexport type QueryWurReporterInterimScenarioArgs = {\n allowScoresForExcluded: Scalars['Boolean'];\n institutionId: Scalars['String'];\n scenarioId: Scalars['String'];\n};\n\n\nexport type QueryWurReporterInterimScenariosArgs = {\n allowScoresForExcluded: Scalars['Boolean'];\n filter?: Maybe;\n institutionId: Scalars['String'];\n page?: Maybe;\n perPage?: Maybe;\n sortBy?: Maybe;\n sortDirection?: Maybe;\n};\n\nexport type RankFilter = {\n lower?: Maybe;\n upper?: Maybe;\n};\n\nexport type RankingRow = {\n __typename?: 'RankingRow';\n displayRank: Scalars['String'];\n displayScore: Scalars['String'];\n id: Scalars['String'];\n iid: Scalars['String'];\n institutionData?: Maybe;\n isImputed?: Maybe;\n scoreOrder?: Maybe;\n sortOrder?: Maybe;\n};\n\n\nexport type RankingRowInstitutionDataArgs = {\n filter?: Maybe;\n};\n\n/** Represents a yearly data release for the selected release. */\nexport type Release = {\n __typename?: 'Release';\n embargoEndDate: Scalars['String'];\n embargoStartDate: Scalars['String'];\n freeEmbargoStartDate: Scalars['String'];\n id: Scalars['ID'];\n institutionData?: Maybe>>;\n level1: Array>;\n type: Scalars['String'];\n wurDetailsEmbargoStartDate: Scalars['String'];\n year: Scalars['Int'];\n};\n\n\n/** Represents a yearly data release for the selected release. */\nexport type ReleaseInstitutionDataArgs = {\n filter?: Maybe;\n};\n\n\n/** Represents a yearly data release for the selected release. */\nexport type ReleaseLevel1Args = {\n code: Scalars['String'];\n};\n\nexport type ResourcePermission = {\n __typename?: 'ResourcePermission';\n actions: Array;\n resource: Scalars['String'];\n};\n\nexport enum ResponseFields2ListItem {\n Bandings = 'BANDINGS',\n Bibliometricsubjects = 'BIBLIOMETRICSUBJECTS',\n Clusters = 'CLUSTERS',\n Detailedsubjects = 'DETAILEDSUBJECTS',\n Detailedsubjectslevel3S = 'DETAILEDSUBJECTSLEVEL3S',\n Institutiondata = 'INSTITUTIONDATA',\n Institutionsdata = 'INSTITUTIONSDATA',\n Level1S = 'LEVEL1S',\n Level2S = 'LEVEL2S',\n Level3S = 'LEVEL3S',\n Locations = 'LOCATIONS'\n}\n\nexport enum ResponseFieldsListItem {\n Bandings = 'BANDINGS',\n Bibliometricsubjects = 'BIBLIOMETRICSUBJECTS',\n Clusters = 'CLUSTERS',\n Detailedsubjects = 'DETAILEDSUBJECTS',\n Detailedsubjectslevel3S = 'DETAILEDSUBJECTSLEVEL3S',\n Institutiondata = 'INSTITUTIONDATA',\n Institutionsdata = 'INSTITUTIONSDATA',\n Level1S = 'LEVEL1S',\n Level2S = 'LEVEL2S',\n Level3S = 'LEVEL3S',\n Locations = 'LOCATIONS'\n}\n\nexport type Result = {\n __typename?: 'Result';\n decile?: Maybe;\n id: Scalars['ID'];\n institution: Institution;\n isImputed?: Maybe;\n jointRanked: Scalars['Boolean'];\n rank: GraBanding;\n resource: Scalars['ID'];\n score: Scalars['Float'];\n scoreNumber: Scalars['Float'];\n value: Scalars['Float'];\n year?: Maybe;\n};\n\nexport type Scenario = {\n __typename?: 'Scenario';\n alexanderJson: ScenarioResult;\n archived?: Maybe;\n createdAt: Scalars['Date'];\n id: Scalars['ID'];\n institution: ExploreInstitution;\n methodology: Scalars['String'];\n name: Scalars['String'];\n publicationYear?: Maybe;\n resource: Scalars['ID'];\n scenarioId: Scalars['String'];\n scenarioInputs: ScenarioData;\n submissionYear?: Maybe;\n totalScenariosCount: Scalars['Float'];\n updatedAt: Scalars['Date'];\n};\n\nexport type ScenarioData = {\n __typename?: 'ScenarioData';\n artsAndHumanities?: Maybe;\n businessAndEconomics?: Maybe;\n clinicalAndHealth?: Maybe;\n computerScience?: Maybe;\n education?: Maybe;\n engineering?: Maybe;\n law?: Maybe;\n lifeSciences?: Maybe;\n overall?: Maybe;\n physicalSciences?: Maybe;\n psychology?: Maybe;\n socialSciences?: Maybe;\n};\n\nexport type ScenarioDataInput = {\n artsAndHumanities?: Maybe;\n businessAndEconomics?: Maybe;\n clinicalAndHealth?: Maybe;\n computerScience?: Maybe;\n education?: Maybe;\n engineering?: Maybe;\n institution: ExploreInstitutionInput;\n law?: Maybe;\n lifeSciences?: Maybe;\n methodology: Scalars['String'];\n name: Scalars['String'];\n overall?: Maybe;\n physicalSciences?: Maybe;\n psychology?: Maybe;\n socialSciences?: Maybe;\n};\n\nexport type ScenarioInput = {\n scenarioIds: Array;\n};\n\nexport type ScenarioMutationResult = {\n __typename?: 'ScenarioMutationResult';\n id: Scalars['ID'];\n resource: Scalars['ID'];\n scenarioId: Scalars['String'];\n};\n\nexport type ScenarioResult = {\n __typename?: 'ScenarioResult';\n artsAndHumanities?: Maybe;\n businessAndEconomics?: Maybe;\n clinicalAndHealth?: Maybe;\n computerScience?: Maybe;\n education?: Maybe;\n engineering?: Maybe;\n law?: Maybe;\n lifeSciences?: Maybe;\n overall?: Maybe;\n physicalSciences?: Maybe;\n psychology?: Maybe;\n socialSciences?: Maybe;\n};\n\n/** The produced result via a methodology */\nexport type ScenarioResultFields = {\n __typename?: 'ScenarioResultFields';\n applicable: Scalars['Boolean'];\n c1?: Maybe;\n c2?: Maybe;\n c3?: Maybe;\n c4?: Maybe;\n e1?: Maybe;\n e2?: Maybe;\n exclusions?: Maybe>>;\n i1?: Maybe;\n i2?: Maybe;\n i3?: Maybe;\n i4?: Maybe;\n r1?: Maybe;\n r2?: Maybe;\n r3?: Maybe;\n rankDisplay?: Maybe;\n rankNumber?: Maybe;\n scoreDisplay?: Maybe;\n scoreNumber?: Maybe;\n t1?: Maybe;\n t2?: Maybe;\n t3?: Maybe;\n t4?: Maybe;\n t5?: Maybe;\n};\n\nexport enum SortDirection {\n Asc = 'ASC',\n Desc = 'DESC'\n}\n\nexport type SubjectData = {\n __typename?: 'SubjectData';\n id: Scalars['ID'];\n name: Scalars['String'];\n numberOfBachelorsStudents: Scalars['Float'];\n numberOfDoctoratesStudents: Scalars['Float'];\n numberOfInternationalStaff: Scalars['Float'];\n numberOfInternationalStudents: Scalars['Float'];\n numberOfMastersStudents: Scalars['Float'];\n resource?: Maybe;\n totalAcademicStaff: Scalars['Float'];\n totalStudents: Scalars['Float'];\n};\n\nexport enum SubjectKeys {\n ArtsAndHumanities = 'artsAndHumanities',\n BusinessAndEconomics = 'businessAndEconomics',\n ClinicalAndHealth = 'clinicalAndHealth',\n ComputerScience = 'computerScience',\n Education = 'education',\n Engineering = 'engineering',\n Law = 'law',\n LifeSciences = 'lifeSciences',\n Overall = 'overall',\n PhysicalSciences = 'physicalSciences',\n Psychology = 'psychology',\n SocialSciences = 'socialSciences'\n}\n\nexport type SubjectsFields = {\n __typename?: 'SubjectsFields';\n applicable?: Maybe;\n citationScoreCnNormalised?: Maybe;\n citationScoreNormalised?: Maybe;\n influenceOfPublications?: Maybe;\n internationalPublications?: Maybe;\n numberOfAcademicStaff?: Maybe;\n numberOfAcademicStaffOfInternationalOrOverseasOrigin?: Maybe;\n numberOfDoctoratesAwarded?: Maybe;\n numberOfPatentsCitingResearch?: Maybe;\n numberOfProfessionalDoctoratesAwarded?: Maybe;\n numberOfPublicationsInTheTop10Percentile?: Maybe;\n numberOfResearchDoctoratesAwarded?: Maybe;\n numberOfResearchStaff?: Maybe;\n numberOfUndergraduateDegreesAwarded?: Maybe;\n percentileFieldWeightedCitationImpact?: Maybe;\n researchIncome?: Maybe;\n researchIncomeFromIndustryAndCommerce?: Maybe;\n researchVotes?: Maybe;\n teachingVotes?: Maybe;\n totalInstitutionalIncome?: Maybe;\n totalNumberOfOutboundExchangeStudents?: Maybe;\n totalNumberOfStudents?: Maybe;\n totalNumberOfStudentsOfInternationalOrOverseasOrigin?: Maybe;\n totalPublications?: Maybe;\n};\n\nexport type SubjectsFieldsInput = {\n applicable?: Maybe;\n citationScoreCnNormalised?: Maybe;\n citationScoreNormalised?: Maybe;\n influenceOfPublications?: Maybe;\n internationalPublications?: Maybe;\n numberOfAcademicStaff?: Maybe;\n numberOfAcademicStaffOfInternationalOrOverseasOrigin?: Maybe;\n numberOfDoctoratesAwarded?: Maybe;\n numberOfPatentsCitingResearch?: Maybe;\n numberOfProfessionalDoctoratesAwarded?: Maybe;\n numberOfPublicationsInTheTop10Percentile?: Maybe;\n numberOfResearchDoctoratesAwarded?: Maybe;\n numberOfResearchStaff?: Maybe;\n numberOfUndergraduateDegreesAwarded?: Maybe;\n percentileFieldWeightedCitationImpact?: Maybe;\n researchIncome?: Maybe;\n researchIncomeFromIndustryAndCommerce?: Maybe;\n researchVotes?: Maybe;\n teachingVotes?: Maybe;\n totalInstitutionalIncome?: Maybe;\n totalNumberOfOutboundExchangeStudents?: Maybe;\n totalNumberOfStudents?: Maybe;\n totalNumberOfStudentsOfInternationalOrOverseasOrigin?: Maybe;\n totalPublications?: Maybe;\n};\n\nexport type Submission = {\n __typename?: 'Submission';\n artsAndHumanities?: Maybe;\n businessAndEconomics?: Maybe;\n clinicalAndHealth?: Maybe;\n computerScience?: Maybe;\n education?: Maybe;\n engineering?: Maybe;\n id: Scalars['ID'];\n institutionId: Scalars['String'];\n law?: Maybe;\n lifeSciences?: Maybe;\n overall?: Maybe;\n physicalSciences?: Maybe;\n psychology?: Maybe;\n resource: Scalars['ID'];\n socialSciences?: Maybe;\n year: Scalars['Int'];\n};\n\nexport type SubmissionsSubjectField = {\n __typename?: 'SubmissionsSubjectField';\n applicable?: Maybe;\n citationScoreCnNormalised?: Maybe;\n citationScoreNormalised?: Maybe;\n influenceOfPublications?: Maybe;\n internationalPublications?: Maybe;\n numberOfAcademicStaff?: Maybe;\n numberOfAcademicStaffOfInternationalOrOverseasOrigin?: Maybe;\n numberOfDoctoratesAwarded?: Maybe;\n numberOfPatentsCitingResearch?: Maybe;\n numberOfProfessionalDoctoratesAwarded?: Maybe;\n numberOfPublicationsInTheTop10Percentile?: Maybe;\n numberOfResearchDoctoratesAwarded?: Maybe;\n numberOfResearchStaff?: Maybe;\n numberOfUndergraduateDegreesAwarded?: Maybe;\n percentileFieldWeightedCitationImpact?: Maybe;\n researchIncome?: Maybe;\n researchIncomeFromIndustryAndCommerce?: Maybe;\n researchVotes?: Maybe;\n teachingVotes?: Maybe;\n totalInstitutionalIncome?: Maybe;\n totalNumberOfOutboundExchangeStudents?: Maybe;\n totalNumberOfStudents?: Maybe;\n totalNumberOfStudentsOfInternationalOrOverseasOrigin?: Maybe;\n totalPublications?: Maybe;\n};\n\nexport type UserInstitution = {\n __typename?: 'UserInstitution';\n continent: Scalars['String'];\n country: Scalars['String'];\n countryCode: Scalars['String'];\n id: Scalars['ID'];\n institutionId: Scalars['String'];\n logo: Scalars['String'];\n name: Scalars['String'];\n products: Array;\n resource: Scalars['ID'];\n};\n\nexport type UserInstitutions = {\n __typename?: 'UserInstitutions';\n count: Scalars['Int'];\n hasMore: Scalars['Boolean'];\n institutions: Array;\n page: Scalars['Int'];\n pages: Scalars['Int'];\n perPage: Scalars['Int'];\n search?: Maybe;\n total: Scalars['Int'];\n};\n\n/**\n * TODO: Should be moved to GRA repository\n * GRA Types\n */\nexport enum ValueType {\n Currency = 'CURRENCY',\n Elsevier = 'ELSEVIER',\n Na = 'NA',\n Percentage = 'PERCENTAGE',\n Portal = 'PORTAL',\n Reputation = 'REPUTATION',\n Untyped = 'UNTYPED'\n}\n\nexport type WurAggregateData = {\n __typename?: 'WURAggregateData';\n count: Scalars['Int'];\n lowerQuartile: Scalars['Float'];\n max: Scalars['Float'];\n median: Scalars['Float'];\n min: Scalars['Float'];\n upperQuartile: Scalars['Float'];\n};\n\nexport type WurAggregateFilterInput = {\n /**\n * The name of a pre-defined cluster or a user-defined institution group.\n *\n * e.g. \"Russell Group\", \"Ivy League Schools\", \"My Amazing Institutions\"\n */\n group?: Maybe;\n institutionIds?: Maybe>;\n /** Can be either a country or a continent. */\n region?: Maybe;\n};\n\nexport type WurBanding = {\n __typename?: 'WURBanding';\n higher: Scalars['Float'];\n lower: Scalars['Float'];\n};\n\nexport type WurBibliometricResult = {\n __typename?: 'WURBibliometricResult';\n citation: Scalars['Float'];\n id: Scalars['ID'];\n institution: WurInstitution;\n internationalCollaboration?: Maybe;\n researchProductivity?: Maybe;\n resource: Scalars['ID'];\n};\n\nexport type WurBibliometricSubject = {\n __typename?: 'WURBibliometricSubject';\n aggregateData?: Maybe;\n id: Scalars['ID'];\n key: Scalars['String'];\n name: Scalars['String'];\n resource: Scalars['ID'];\n result?: Maybe;\n results: Array;\n shortName: Scalars['String'];\n timeframe: Quarter;\n};\n\n\nexport type WurBibliometricSubjectAggregateDataArgs = {\n filter?: Maybe;\n};\n\n\nexport type WurBibliometricSubjectResultArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type WurBibliometricSubjectResultsArgs = {\n input?: Maybe;\n};\n\nexport type WurDetailedSubject = {\n __typename?: 'WURDetailedSubject';\n aggregateData?: Maybe;\n id: Scalars['ID'];\n key: Scalars['String'];\n metric?: Maybe;\n metrics: Array;\n name: Scalars['String'];\n resource: Scalars['ID'];\n result?: Maybe;\n results: Array;\n shortName: Scalars['String'];\n};\n\n\nexport type WurDetailedSubjectAggregateDataArgs = {\n filter?: Maybe;\n};\n\n\nexport type WurDetailedSubjectMetricArgs = {\n name: Scalars['String'];\n};\n\n\nexport type WurDetailedSubjectMetricsArgs = {\n names?: Maybe>;\n};\n\n\nexport type WurDetailedSubjectResultArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type WurDetailedSubjectResultsArgs = {\n input: WurAggregateFilterInput;\n};\n\nexport type WurDetailedSubjectMetric = {\n __typename?: 'WURDetailedSubjectMetric';\n aggregateData?: Maybe;\n id: Scalars['ID'];\n key: Scalars['String'];\n name: Scalars['String'];\n resource: Scalars['ID'];\n result?: Maybe;\n results: Array;\n valueType: WurValueType;\n};\n\n\nexport type WurDetailedSubjectMetricAggregateDataArgs = {\n filter?: Maybe;\n};\n\n\nexport type WurDetailedSubjectMetricResultArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type WurDetailedSubjectMetricResultsArgs = {\n input?: Maybe;\n};\n\nexport type WurDetailedSubjectMetricResult = {\n __typename?: 'WURDetailedSubjectMetricResult';\n id: Scalars['ID'];\n institution: WurInstitution;\n resource: Scalars['ID'];\n score: Scalars['Float'];\n};\n\nexport type WurDetailedSubjectResult = {\n __typename?: 'WURDetailedSubjectResult';\n id: Scalars['ID'];\n institution: WurInstitution;\n resource: Scalars['ID'];\n score: Scalars['Float'];\n};\n\nexport type WurInstitution = {\n __typename?: 'WURInstitution';\n continent: Continent;\n country: Scalars['String'];\n currency: Scalars['String'];\n founded?: Maybe;\n id: Scalars['ID'];\n institutionId: Scalars['String'];\n logo: Scalars['String'];\n name: Scalars['String'];\n resource: Scalars['ID'];\n results?: Maybe>;\n wurData?: Maybe;\n};\n\n\nexport type WurInstitutionResultsArgs = {\n subjectNames?: Maybe>;\n years: Array;\n};\n\n\nexport type WurInstitutionWurDataArgs = {\n year: Scalars['Int'];\n};\n\n/**\n * World University Ranking data related to a specific institution for a specific\n * year.\n */\nexport type WurInstitutionData = {\n __typename?: 'WURInstitutionData';\n cluster?: Maybe;\n countryRank?: Maybe;\n /** The currency that is provided during data submission. */\n currency: Scalars['String'];\n femaleStudentPercentage?: Maybe;\n id: Scalars['ID'];\n institution: WurInstitution;\n institutionsInCountryCount: Scalars['Int'];\n internationalStudentPercentage?: Maybe;\n /** Purchasing power parity against the US Dollar. */\n pppToUsd: Scalars['Float'];\n resource: Scalars['ID'];\n studentToStaffPercentage?: Maybe;\n subjectData?: Maybe;\n subjectsData: Array;\n totalStaff?: Maybe;\n totalStudents?: Maybe;\n};\n\n\n/**\n * World University Ranking data related to a specific institution for a specific\n * year.\n */\nexport type WurInstitutionDataSubjectDataArgs = {\n name: Scalars['String'];\n year: Scalars['Int'];\n};\n\n\n/**\n * World University Ranking data related to a specific institution for a specific\n * year.\n */\nexport type WurInstitutionDataSubjectsDataArgs = {\n names?: Maybe>;\n year: Scalars['Int'];\n};\n\nexport type WurMetric = {\n __typename?: 'WURMetric';\n /**\n * Returns the count, min, lower quartile, median, upper quartile and max\n * scores/ranks for the metric.\n *\n * Optionally takes a 'populationYear' which uses the institutions from the\n * provided yearly but substitutes in the current year's data.\n */\n aggregateData?: Maybe;\n id: Scalars['ID'];\n key: Scalars['String'];\n name: Scalars['String'];\n resource: Scalars['ID'];\n result?: Maybe;\n results: Array;\n shortName: Scalars['String'];\n /**\n * The optimal way to format the score(s) belonging to this metric.\n *\n * e.g. percentage, currency.\n */\n valueType: WurValueType;\n weighting: Scalars['Float'];\n};\n\n\nexport type WurMetricAggregateDataArgs = {\n aggregateType?: Maybe;\n filter?: Maybe;\n populationYear?: Maybe;\n};\n\n\nexport type WurMetricResultArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type WurMetricResultsArgs = {\n filter?: Maybe;\n};\n\nexport enum WurMetricAggregateType {\n Score = 'SCORE',\n Value = 'VALUE'\n}\n\nexport type WurMetricRes = {\n __typename?: 'WURMetricRes';\n aggregateData?: Maybe;\n arrayOfCombinedResultObjects?: Maybe>>;\n id?: Maybe;\n results: Array;\n};\n\n\nexport type WurMetricResAggregateDataArgs = {\n aggregateType?: Maybe;\n filter?: Maybe;\n populationYear?: Maybe;\n};\n\n\nexport type WurMetricResArrayOfCombinedResultObjectsArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type WurMetricResResultsArgs = {\n filter?: Maybe;\n};\n\nexport type WurMetricScore = {\n __typename?: 'WURMetricScore';\n id: Scalars['ID'];\n institution: WurInstitution;\n /**\n * A value isImputed if the institution haven't provided us with a concrete\n * score. In these cases THE offer up a value generated by our ranking\n * methodology.\n */\n isImputed: Scalars['Boolean'];\n resource: Scalars['ID'];\n score: Scalars['Float'];\n value?: Maybe;\n};\n\nexport type WurMetricScoreRes = {\n __typename?: 'WURMetricScoreRes';\n id: Scalars['ID'];\n institution: WurInstitution;\n /**\n * A value isImputed if the institution haven't provided us with a concrete\n * score. In these cases THE offer up a value generated by our ranking\n * methodology.\n */\n isImputed: Scalars['Boolean'];\n resource: Scalars['ID'];\n score: Scalars['Float'];\n value?: Maybe;\n};\n\nexport type WurPillar = {\n __typename?: 'WURPillar';\n aggregateData?: Maybe;\n id: Scalars['ID'];\n key: Scalars['String'];\n metric?: Maybe;\n metrics: Array;\n name: Scalars['String'];\n resource: Scalars['ID'];\n result?: Maybe;\n results: Array;\n shortName: Scalars['String'];\n timeframe: Quarter;\n};\n\n\nexport type WurPillarAggregateDataArgs = {\n filter?: Maybe;\n};\n\n\nexport type WurPillarMetricArgs = {\n name: Scalars['String'];\n};\n\n\nexport type WurPillarMetricsArgs = {\n names?: Maybe>;\n};\n\n\nexport type WurPillarResultArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type WurPillarResultsArgs = {\n input?: Maybe;\n};\n\nexport type WurPillarMetricRes = {\n __typename?: 'WURPillarMetricRes';\n id?: Maybe;\n metrics?: Maybe;\n};\n\n\nexport type WurPillarMetricResMetricsArgs = {\n names?: Maybe>;\n};\n\nexport type WurPillarMetrics = {\n __typename?: 'WURPillarMetrics';\n pillars?: Maybe;\n};\n\n\nexport type WurPillarMetricsPillarsArgs = {\n names?: Maybe>;\n};\n\nexport type WurPillarOrderInput = {\n score?: Maybe;\n};\n\nexport type WurPillarScore = {\n __typename?: 'WURPillarScore';\n decile: Scalars['Float'];\n id: Scalars['ID'];\n institution: WurInstitution;\n rank: Scalars['Int'];\n resource: Scalars['ID'];\n score: Scalars['Float'];\n};\n\n/** Represents a yearly data release for the World University Rankings. */\nexport type WurRelease = {\n __typename?: 'WURRelease';\n /**\n * Pre-defined list of bandings available for the World University Rankings.\n *\n * e.g. \"25-50\", \"50-100\", \"100-200\"\n */\n bandings: Array;\n bibliometricSubject?: Maybe;\n bibliometricSubjects: Array;\n clusters: Array;\n detailedSubject?: Maybe;\n detailedSubjects: Array;\n embargoEndDate: Scalars['String'];\n embargoStartDate: Scalars['String'];\n freeEmbargoStartDate: Scalars['String'];\n id: Scalars['ID'];\n institutionData?: Maybe;\n institutionsData?: Maybe;\n levelDefinitions?: Maybe;\n locations: DataPointsProductLocations;\n releaseDate: Scalars['String'];\n resource: Scalars['ID'];\n subject?: Maybe;\n subjects: Array;\n wurDetailsEmbargoStartDate: Scalars['String'];\n year: Scalars['Int'];\n};\n\n\n/** Represents a yearly data release for the World University Rankings. */\nexport type WurReleaseBibliometricSubjectArgs = {\n name: Scalars['String'];\n quarter: Quarter;\n};\n\n\n/** Represents a yearly data release for the World University Rankings. */\nexport type WurReleaseBibliometricSubjectsArgs = {\n names?: Maybe>;\n quarters?: Maybe>;\n};\n\n\n/** Represents a yearly data release for the World University Rankings. */\nexport type WurReleaseDetailedSubjectArgs = {\n name: Scalars['String'];\n};\n\n\n/** Represents a yearly data release for the World University Rankings. */\nexport type WurReleaseDetailedSubjectsArgs = {\n names?: Maybe>;\n};\n\n\n/** Represents a yearly data release for the World University Rankings. */\nexport type WurReleaseInstitutionDataArgs = {\n id: Scalars['String'];\n};\n\n\n/** Represents a yearly data release for the World University Rankings. */\nexport type WurReleaseInstitutionsDataArgs = {\n filter?: Maybe;\n};\n\n\n/** Represents a yearly data release for the World University Rankings. */\nexport type WurReleaseSubjectArgs = {\n name: Scalars['String'];\n};\n\n\n/** Represents a yearly data release for the World University Rankings. */\nexport type WurReleaseSubjectsArgs = {\n names?: Maybe>;\n};\n\n/**\n * A pre-defined group of institutions that are selected internally at THE for each release.\n * e.g. \"Old Stars\", \"Technology Challengers\"\n */\nexport type WurReleaseCluster = {\n __typename?: 'WURReleaseCluster';\n bestRanked: Array>;\n description?: Maybe;\n geographies: Array;\n id: Scalars['ID'];\n institutionCount: Scalars['Int'];\n medianAge?: Maybe;\n medianRank?: Maybe;\n name: Scalars['String'];\n resource: Scalars['ID'];\n /** List of subject areas that this group of institutions are strongest in. */\n strengthsText: Scalars['String'];\n /** List of subject areas that this group of institutions are weakest in. */\n weaknessesText: Scalars['String'];\n};\n\nexport type WurReleaseInstitutions = {\n __typename?: 'WURReleaseInstitutions';\n count: Scalars['Int'];\n data: Array;\n};\n\nexport type WurReleaseLevelDefinitions = {\n __typename?: 'WURReleaseLevelDefinitions';\n level1?: Maybe>>;\n level2?: Maybe>>;\n level3?: Maybe>>;\n};\n\nexport type WurReleaseLevelItemDefinition = {\n __typename?: 'WURReleaseLevelItemDefinition';\n levelId?: Maybe;\n longName?: Maybe;\n name?: Maybe;\n parentId?: Maybe;\n rankingYear?: Maybe;\n shortName?: Maybe;\n type?: Maybe;\n weighting?: Maybe;\n};\n\nexport type WurReleaseMetric = {\n __typename?: 'WURReleaseMetric';\n /**\n * Pre-defined list of bandings available for the World University Rankings.\n *\n * e.g. \"25-50\", \"50-100\", \"100-200\"\n */\n bandings: Array;\n bibliometricSubject?: Maybe;\n bibliometricSubjects: Array;\n clusters: Array;\n detailedSubject?: Maybe;\n detailedSubjects: Array;\n embargoEndDate: Scalars['String'];\n embargoStartDate: Scalars['String'];\n freeEmbargoStartDate: Scalars['String'];\n id: Scalars['ID'];\n institutionData?: Maybe;\n institutionsData?: Maybe;\n levelDefinitions?: Maybe;\n locations: DataPointsProductLocations;\n releaseDate: Scalars['String'];\n resource: Scalars['ID'];\n subject?: Maybe;\n subjects?: Maybe;\n wurDetailsEmbargoStartDate: Scalars['String'];\n year: Scalars['Int'];\n};\n\n\nexport type WurReleaseMetricBibliometricSubjectArgs = {\n name: Scalars['String'];\n quarter: Quarter;\n};\n\n\nexport type WurReleaseMetricBibliometricSubjectsArgs = {\n names?: Maybe>;\n quarters?: Maybe>;\n};\n\n\nexport type WurReleaseMetricDetailedSubjectArgs = {\n name: Scalars['String'];\n};\n\n\nexport type WurReleaseMetricDetailedSubjectsArgs = {\n names?: Maybe>;\n};\n\n\nexport type WurReleaseMetricInstitutionDataArgs = {\n id: Scalars['String'];\n};\n\n\nexport type WurReleaseMetricInstitutionsDataArgs = {\n filter?: Maybe;\n};\n\n\nexport type WurReleaseMetricSubjectArgs = {\n name: Scalars['String'];\n};\n\n\nexport type WurReleaseMetricSubjectsArgs = {\n names?: Maybe>;\n};\n\nexport type WurSubject = {\n __typename?: 'WURSubject';\n aggregateData?: Maybe;\n id: Scalars['ID'];\n key: Scalars['String'];\n name: Scalars['String'];\n pillar?: Maybe;\n pillars: Array;\n resource: Scalars['ID'];\n result?: Maybe;\n results: Array;\n shortName: Scalars['String'];\n};\n\n\nexport type WurSubjectAggregateDataArgs = {\n filter?: Maybe;\n};\n\n\nexport type WurSubjectPillarArgs = {\n isNewWur3Methodology?: Maybe;\n name: Scalars['String'];\n};\n\n\nexport type WurSubjectPillarsArgs = {\n isNewWur3Methodology?: Maybe;\n names?: Maybe>;\n};\n\n\nexport type WurSubjectResultArgs = {\n institutionId: Scalars['String'];\n};\n\n\nexport type WurSubjectResultsArgs = {\n input?: Maybe;\n};\n\nexport type WurSubjectData = {\n __typename?: 'WURSubjectData';\n id: Scalars['ID'];\n name?: Maybe;\n numberOfBachelorsStudents?: Maybe;\n numberOfDoctoratesStudents?: Maybe;\n numberOfInternationalStaff?: Maybe;\n numberOfInternationalStudents?: Maybe;\n numberOfMastersStudents?: Maybe;\n resource: Scalars['ID'];\n subjectName: Scalars['String'];\n totalAcademicStaff?: Maybe;\n totalStudents?: Maybe;\n};\n\nexport type WurSubjectResult = {\n __typename?: 'WURSubjectResult';\n id: Scalars['ID'];\n institution: WurInstitution;\n jointRanked: Scalars['Boolean'];\n rank: WurBanding;\n resource: Scalars['ID'];\n score: WurBanding;\n scoreNumber?: Maybe;\n subject: WurSubject;\n year: Scalars['Int'];\n};\n\nexport enum WurValueType {\n Currency = 'CURRENCY',\n Elsevier = 'ELSEVIER',\n Na = 'NA',\n Percentage = 'PERCENTAGE',\n Portal = 'PORTAL',\n Reputation = 'REPUTATION',\n Untyped = 'UNTYPED'\n}\n\nexport type GetRankDataQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n level1Id: Scalars['String'];\n releaseName: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetRankDataQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', institutionData?: Maybe<{ __typename?: 'GRAInstitutionData', countryRank?: Maybe }>, level1: { __typename?: 'GRALevel1', result?: Maybe<{ __typename?: 'Level1Result', jointRanked: boolean, rank: { __typename?: 'GRABanding', higher: number, lower: number } }> } } };\n\nexport type GetCitationScoreSubject_1QueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionIds?: Maybe | Scalars['String']>;\n}>;\n\n\nexport type GetCitationScoreSubject_1Query = { __typename?: 'Query', citations: Array<{ __typename?: 'WURPillar', id: string, name: string, timeframe: Quarter, results: Array<{ __typename?: 'WURPillarScore', id: string, score: number }> }> };\n\nexport type GetCitationScoreSubject_2QueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionIds?: Maybe | Scalars['String']>;\n}>;\n\n\nexport type GetCitationScoreSubject_2Query = { __typename?: 'Query', citations: Array<{ __typename?: 'WURPillar', id: string, name: string, timeframe: Quarter, results: Array<{ __typename?: 'WURPillarScore', id: string, score: number, rank: number }> }> };\n\nexport type GetCitationScoreSubject_3QueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionIds?: Maybe | Scalars['String']>;\n}>;\n\n\nexport type GetCitationScoreSubject_3Query = { __typename?: 'Query', citations: Array<{ __typename?: 'WURPillar', id: string, name: string, timeframe: Quarter, results: Array<{ __typename?: 'WURPillarScore', id: string, score: number, rank: number }> }> };\n\nexport type MockGetCitationScoreSubjectQueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionIds?: Maybe | Scalars['String']>;\n}>;\n\n\nexport type MockGetCitationScoreSubjectQuery = { __typename?: 'Query', citations: Array<{ __typename?: 'WURPillar', id: string, name: string, results: Array<{ __typename?: 'WURPillarScore', id: string, score: number, rank: number, institution: { __typename?: 'WURInstitution', name: string } }> }> };\n\nexport type InitialMyInstitutionsQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type InitialMyInstitutionsQuery = { __typename?: 'Query', myInstitutions: { __typename?: 'UserInstitutions', total: number, count: number, page: number, perPage: number, hasMore: boolean, search?: Maybe, pages: number, institutions: Array<{ __typename?: 'UserInstitution', id: string, institutionId: string, name: string, products: Array<{ __typename?: 'DataPointsProduct', peersInfo: { __typename?: 'DataPointsProductPeersInfo', supportsPeers: boolean, supportsChangingPeers: boolean, peerChangeOpen: boolean, lastPeerChangeDate?: Maybe, maxPeerCount: number, peerChangeIntervalWeeks: number } }> }> } };\n\nexport type InstitutionSetActiveInstitutionMutationVariables = Exact<{\n institutionId: Scalars['String'];\n}>;\n\n\nexport type InstitutionSetActiveInstitutionMutation = { __typename?: 'Mutation', setActiveInstitution?: Maybe<{ __typename?: 'UserInstitution', id: string, resource: string, institutionId: string, name: string, logo: string, country: string, countryCode: string, continent: string, products: Array<{ __typename?: 'DataPointsProduct', name: string, peersInfo: { __typename?: 'DataPointsProductPeersInfo', supportsPeers: boolean, supportsChangingPeers: boolean, peerChangeOpen: boolean, lastPeerChangeDate?: Maybe, maxPeerCount: number, peerChangeIntervalWeeks: number, peerChangeDraft?: Maybe<{ __typename?: 'DataPointsPeerChangeDraft', userId: string, username: string, fullName?: Maybe, institutionIds: Array, peers?: Maybe> }> }, locations: { __typename?: 'DataPointsProductLocations', countries: Array, continents: Array }, institutionGroups: Array<{ __typename?: 'DataPointsProductInstitutionGroup', name: string, institutions: Array<{ __typename?: 'DataPointsProductInstitution', id: string, institutionId: string, name: string, country: string, continent: string, logo: string }> }> }> }> };\n\nexport type SelectInstitutionMyInstitutionsQueryVariables = Exact<{\n search: Scalars['String'];\n page: Scalars['Int'];\n perPage: Scalars['Int'];\n}>;\n\n\nexport type SelectInstitutionMyInstitutionsQuery = { __typename?: 'Query', myInstitutions: { __typename?: 'UserInstitutions', total: number, count: number, page: number, perPage: number, hasMore: boolean, search?: Maybe, pages: number, institutions: Array<{ __typename?: 'UserInstitution', id: string, institutionId: string, name: string, logo: string }> } };\n\nexport type WurDashboardPageQueryQueryVariables = Exact<{\n releaseNames: Array> | Maybe;\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type WurDashboardPageQueryQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', year: number, releaseDate: string, embargoEndDate: string, wurDetailsEmbargoStartDate: string, freeEmbargoStartDate: string, locations: { __typename?: 'GRADataPointsProductLocations', countries: Array, continents: Array } }> };\n\nexport type LegacyPermissionsQueryVariables = Exact<{\n institutionId: Scalars['String'];\n}>;\n\n\nexport type LegacyPermissionsQuery = { __typename?: 'Query', legacyPermissions: Array<{ __typename?: 'ResourcePermission', resource: string, actions: Array<{ __typename?: 'PermissionAction', action: string, grant: boolean }> }> };\n\nexport type PermissionsQueryVariables = Exact<{\n institutionId: Scalars['String'];\n}>;\n\n\nexport type PermissionsQuery = { __typename?: 'Query', permissions: Array<{ __typename?: 'ResourcePermission', resource: string, actions: Array<{ __typename?: 'PermissionAction', action: string, grant: boolean }> }> };\n\nexport type AvailableYearsQueryVariables = Exact<{\n releaseNames: Array> | Maybe;\n}>;\n\n\nexport type AvailableYearsQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', id: string, year: number, releaseDate: string }> };\n\nexport type GetBenchmarkSummaryBenchmarkStatisticsQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionIds?: Maybe | Scalars['String']>;\n releaseName: Scalars['String'];\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type GetBenchmarkSummaryBenchmarkStatisticsQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', id: string, institutionsData?: Maybe<{ __typename?: 'InstitutionsData', data: Array<{ __typename?: 'GRAInstitutionData', institution: { __typename?: 'Institution', id: string, institutionId: string, name: string }, level1sData: Array<{ __typename?: 'SubjectData', id: string, name: string, numberOfBachelorsStudents: number, numberOfMastersStudents: number, numberOfDoctoratesStudents: number, numberOfInternationalStudents: number, totalStudents: number, numberOfInternationalStaff: number, totalAcademicStaff: number }> }> }> } };\n\nexport type GetBenchmarkSummaryBenchmarkInstitutionsQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionIds?: Maybe | Scalars['String']>;\n level1Id: Scalars['String'];\n releaseName: Scalars['String'];\n}>;\n\n\nexport type GetBenchmarkSummaryBenchmarkInstitutionsQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', id: string, level1: { __typename?: 'GRALevel1', id: string, results: Array<{ __typename?: 'Level1Result', id: string, jointRanked: boolean, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string, country: string }, rank: { __typename?: 'GRABanding', lower: number, higher: number } }> } } };\n\nexport type GetBenchmarkSummaryPeersCardsQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionIds?: Maybe | Scalars['String']>;\n releaseName: Scalars['String'];\n level1Id?: Maybe;\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type GetBenchmarkSummaryPeersCardsQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', id: string, totalRankedInstitutions: number, level1: { __typename?: 'GRALevel1', id: string, level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, results: Array<{ __typename?: 'Level2Result', score: number, decile?: Maybe, institution: { __typename?: 'Institution', id: string, institutionId: string } }> }>, results: Array<{ __typename?: 'Level1Result', jointRanked: boolean, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string }, rank: { __typename?: 'GRABanding', lower: number, higher: number } }> }, institutionsData?: Maybe<{ __typename?: 'InstitutionsData', count: number, data: Array<{ __typename?: 'GRAInstitutionData', id: string, totalStudents: number, studentToStaffPercentage: number, femaleStudentPercentage: number, internationalStudentPercentage: number, institutionsInCountryCount: number, countryRank?: Maybe, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string, country: string } }> }> } };\n\nexport type GetBibliometricAnalysisPageDetailsQueryVariables = Exact<{\n institutionIds?: Maybe | Scalars['String']>;\n releaseNames: Array> | Maybe;\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type GetBibliometricAnalysisPageDetailsQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', year: number, bibliometricSubjects?: Maybe> }> };\n\nexport type GetBibliometricScoresQueryVariables = Exact<{\n institutionIds?: Maybe | Scalars['String']>;\n releaseNames: Array> | Maybe;\n responseFields?: Maybe> | Maybe>;\n years?: Maybe | Scalars['Int']>;\n bibliometricSubjectIds?: Maybe | Scalars['String']>;\n region?: Maybe;\n}>;\n\n\nexport type GetBibliometricScoresQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', id: string, year: number, bibliometricSubjects?: Maybe, results: Array<{ __typename?: 'BibliometricResult', id: string, citation: number, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }>, aggregateData: { __typename?: 'AggregateData', max: number, min: number, median: number, lowerQuartile: number, upperQuartile: number } }>> }> };\n\nexport type AcceptDataPlusEmbargoMutationVariables = Exact<{\n institutionId: Scalars['String'];\n year: Scalars['Int'];\n dataset: Scalars['String'];\n productName: Scalars['String'];\n}>;\n\n\nexport type AcceptDataPlusEmbargoMutation = { __typename?: 'Mutation', acceptEmbargo: Array<{ __typename?: 'ResourcePermission', resource: string, actions: Array<{ __typename?: 'PermissionAction', action: string, grant: boolean }> }> };\n\nexport type GetGraDetailedSubjectsPageDetailsQueryVariables = Exact<{\n releaseNames: Array> | Maybe;\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type GetGraDetailedSubjectsPageDetailsQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', year: number, detailedSubjects: Array<{ __typename?: 'DetailedSubject', key: string, name: string, shortName: string, level3s: Array<{ __typename?: 'GRALevel3', key: string, name: string }> }> }> };\n\nexport type GetOverallDetailedSubjectScoresQueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionIds?: Maybe | Scalars['String']>;\n detailedSubjectIds?: Maybe | Scalars['String']>;\n region: Scalars['String'];\n releaseNames: Array> | Maybe;\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type GetOverallDetailedSubjectScoresQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', year: number, detailedSubjects: Array<{ __typename?: 'DetailedSubject', id: string, resource: string, key: string, name: string, shortName: string, results: Array<{ __typename?: 'Result', score: number, institution: { __typename?: 'Institution', institutionId: string, name: string } }>, aggregateData: { __typename?: 'AggregateData', max: number, min: number, median: number, lowerQuartile: number, upperQuartile: number } }> }> };\n\nexport type GetDetailedSubjectMetricScoresQueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionIds?: Maybe | Scalars['String']>;\n detailedSubjectIds?: Maybe | Scalars['String']>;\n region: Scalars['String'];\n releaseNames: Array> | Maybe;\n responseFields?: Maybe> | Maybe>;\n detailedSubjectMetricIds?: Maybe | Scalars['String']>;\n}>;\n\n\nexport type GetDetailedSubjectMetricScoresQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', year: number, institutionsData?: Maybe<{ __typename?: 'InstitutionsData', data: Array<{ __typename?: 'GRAInstitutionData', institution: { __typename?: 'Institution', name: string, institutionId: string } }> }>, detailedSubjects: Array<{ __typename?: 'DetailedSubject', id: string, resource: string, key: string, name: string, shortName: string, level3s: Array<{ __typename?: 'GRALevel3', id: string, key: string, name: string, valueType: ValueType, results: Array<{ __typename?: 'Result', score: number, institution: { __typename?: 'Institution', institutionId: string, name: string } }>, aggregateData: { __typename?: 'AggregateData', max: number, min: number, median: number, lowerQuartile: number, upperQuartile: number } }> }> }> };\n\nexport type GetSubjectAndClusterNamesQueryVariables = Exact<{\n year: Scalars['Int'];\n releaseName: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetSubjectAndClusterNamesQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', level1s: Array<{ __typename?: 'GRALevel1', name: string }>, clusters: Array<{ __typename?: 'GRACluster', name: string }> } };\n\nexport type GetProductPeersDraftQueryVariables = Exact<{\n institutionId: Scalars['String'];\n}>;\n\n\nexport type GetProductPeersDraftQuery = { __typename?: 'Query', getProductPeersDraft?: Maybe<{ __typename?: 'DataPointsPeerChangeDraft', userId: string, peers?: Maybe> }> };\n\nexport type GetAllRankedInstitutionsQueryVariables = Exact<{\n releaseName: Scalars['String'];\n page?: Maybe;\n perPage?: Maybe;\n year: Scalars['Int'];\n sortBy?: Maybe;\n sortDirection?: Maybe;\n excludeIds?: Maybe | Scalars['String']>;\n institutionName?: Maybe;\n location?: Maybe;\n level1s?: Maybe> | Maybe>;\n clusters?: Maybe> | Maybe>;\n lowerOverallRank?: Maybe;\n upperOverallRank?: Maybe;\n}>;\n\n\nexport type GetAllRankedInstitutionsQuery = { __typename?: 'Query', allRankedInstitutions: { __typename?: 'AllRankedInstitutions', total: number, count: number, page: number, perPage: number, hasMore: boolean, pages: number, institutions: Array<{ __typename?: 'AllRankedInstitutionsData', id: string, name: string, institutionId: string, logo: string, country: string, founded: number, results?: Maybe>, institutionData?: Maybe<{ __typename?: 'AllRankedInstitutionsDataInstitutions', totalStudents: number, totalStaff: number, cluster?: Maybe<{ __typename?: 'Cluster', name: string }> }> }> } };\n\nexport type SetSelectedPeersMutationVariables = Exact<{\n peerIds: Array | Scalars['String'];\n institutionId: Scalars['String'];\n productName: Scalars['String'];\n}>;\n\n\nexport type SetSelectedPeersMutation = { __typename?: 'Mutation', setProductPeers: Array<{ __typename?: 'DataPointsProductInstitution', id: string, institutionId: string, name: string, country: string, continent: string, logo: string }> };\n\nexport type SetSelectedPeersDraftMutationVariables = Exact<{\n peerIds: Array | Scalars['String'];\n institutionId: Scalars['String'];\n productName: Scalars['String'];\n}>;\n\n\nexport type SetSelectedPeersDraftMutation = { __typename?: 'Mutation', setProductPeersDraft?: Maybe<{ __typename?: 'DataPointsPeerChangeDraft', username: string, institutionIds: Array }> };\n\nexport type GetNewWurMetricsComparisonQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n institutionIds?: Maybe | Scalars['String']>;\n region?: Maybe;\n releaseName: Scalars['String'];\n level1Id: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetNewWurMetricsComparisonQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', level1: { __typename?: 'GRALevel1', id: string, level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, level3s: Array<{ __typename?: 'GRALevel3', id: string, name: string, valueType: ValueType, result: { __typename?: 'Result', id: string, score: number, value: number, isImputed?: Maybe, institution: { __typename?: 'Institution', id: string, institutionId: string } }, results: Array<{ __typename?: 'Result', id: string, score: number, value: number, isImputed?: Maybe, institution: { __typename?: 'Institution', id: string, institutionId: string } }> }> }>, result?: Maybe<{ __typename?: 'Level1Result', id: string, rank: { __typename?: 'GRABanding', lower: number, higher: number } }> }, institutionData?: Maybe<{ __typename?: 'GRAInstitutionData', pppToUsd: number, institution: { __typename?: 'Institution', name: string, id: string, institutionId: string } }>, institutionsData?: Maybe<{ __typename?: 'InstitutionsData', data: Array<{ __typename?: 'GRAInstitutionData', pppToUsd: number, institution: { __typename?: 'Institution', name: string, id: string, institutionId: string } }> }> } };\n\nexport type GetNewWurMetricsOveralScoresQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n institutionIds?: Maybe | Scalars['String']>;\n region?: Maybe;\n releaseName: Scalars['String'];\n level1Id: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetNewWurMetricsOveralScoresQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', id: string, level1: { __typename?: 'GRALevel1', id: string, level2s: Array<{ __typename?: 'GRALevel2', id: string, key: string, name: string, level3s: Array<{ __typename?: 'GRALevel3', id: string, key: string, name: string, valueType: ValueType, aggregateValueData: { __typename?: 'AggregateData', min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }, aggregateScoreData: { __typename?: 'AggregateData', min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }, result: { __typename?: 'Result', id: string, score: number, value: number, isImputed?: Maybe, institution: { __typename?: 'Institution', id: string, institutionId: string } }, results: Array<{ __typename?: 'Result', id: string, score: number, value: number, isImputed?: Maybe, institution: { __typename?: 'Institution', id: string, name: string, institutionId: string } }> }> }>, result?: Maybe<{ __typename?: 'Level1Result', id: string, rank: { __typename?: 'GRABanding', lower: number, higher: number } }> }, institutionData?: Maybe<{ __typename?: 'GRAInstitutionData', pppToUsd: number, institution: { __typename?: 'Institution', name: string, id: string, institutionId: string } }>, institutionsData?: Maybe<{ __typename?: 'InstitutionsData', data: Array<{ __typename?: 'GRAInstitutionData', pppToUsd: number, institution: { __typename?: 'Institution', name: string, id: string, institutionId: string } }> }> } };\n\nexport type GetNewLevelDefinitionsQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n level1Id: Scalars['String'];\n releaseName: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetNewLevelDefinitionsQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', levelDefinitions?: Maybe<{ __typename?: 'GRAReleaseLevelDefinitions', level2?: Maybe, levelId?: Maybe, shortName?: Maybe, name?: Maybe, weighting?: Maybe, type?: Maybe, rankingYear?: Maybe }>>>, level3?: Maybe, levelId?: Maybe, shortName?: Maybe, name?: Maybe, weighting?: Maybe, type?: Maybe, rankingYear?: Maybe }>>> }> } };\n\nexport type GetChangeOverYearQueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionId: Scalars['String'];\n releaseNames: Array> | Maybe;\n level1Id: Scalars['String'];\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type GetChangeOverYearQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', id: string, year: number, level1: { __typename?: 'GRALevel1', id: string, result?: Maybe<{ __typename?: 'Level1Result', jointRanked: boolean, rank: { __typename?: 'GRABanding', lower: number, higher: number } }> } }> };\n\nexport type GetOverviewPerformanceQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n releaseName: Scalars['String'];\n level1Id: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetOverviewPerformanceQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', id: string, institutionData?: Maybe<{ __typename?: 'GRAInstitutionData', currency: string, pppToUsd: number }>, level1: { __typename?: 'GRALevel1', id: string, level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, result: { __typename?: 'Level2Result', score: number, rank: number }, aggregateData: { __typename?: 'AggregateData', count: number, max: number, upperQuartile: number, median: number, lowerQuartile: number, min: number }, level3s: Array<{ __typename?: 'GRALevel3', id: string, name: string, valueType: ValueType, result: { __typename?: 'Result', score: number, value: number, isImputed?: Maybe } }> }> } } };\n\nexport type GetOverviewPillarScoresQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n level1Id: Scalars['String'];\n releaseName: Scalars['String'];\n region: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetOverviewPillarScoresQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', id: string, level1: { __typename?: 'GRALevel1', id: string, level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, key: string, result: { __typename?: 'Level2Result', score: number, rank: number }, aggregateData: { __typename?: 'AggregateData', count: number, max: number, upperQuartile: number, median: number, lowerQuartile: number, min: number } }> } } };\n\nexport type GetOverviewSummaryQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n institutionIds?: Maybe | Scalars['String']>;\n level1Id: Scalars['String'];\n releaseName: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetOverviewSummaryQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', id: string, totalRankedInstitutions: number, institutionData?: Maybe<{ __typename?: 'GRAInstitutionData', countryRank?: Maybe, institutionsInCountryCount: number, institution: { __typename?: 'Institution', country: string } }>, level1: { __typename?: 'GRALevel1', id: string, level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, result: { __typename?: 'Level2Result', score: number, rank: number } }>, result?: Maybe<{ __typename?: 'Level1Result', jointRanked: boolean, score: { __typename?: 'GRABanding', higher: number, lower: number }, rank: { __typename?: 'GRABanding', higher: number, lower: number } }> } } };\n\nexport type GetPeerGroupAnalysisTableQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n institutionIds?: Maybe | Scalars['String']>;\n releaseName: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetPeerGroupAnalysisTableQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', institutionData?: Maybe<{ __typename?: 'GRAInstitutionData', institution: { __typename?: 'Institution', id: string, institutionId: string, name: string }, cluster: { __typename?: 'GRACluster', id: string, name: string } }>, institutionsData?: Maybe<{ __typename?: 'InstitutionsData', data: Array<{ __typename?: 'GRAInstitutionData', institution: { __typename?: 'Institution', id: string, institutionId: string, name: string }, cluster: { __typename?: 'GRACluster', id: string, name: string } }> }> } };\n\nexport type GetPeerGroupAnalysisCardsQueryVariables = Exact<{\n year: Scalars['Int'];\n releaseName: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type GetPeerGroupAnalysisCardsQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', clusters: Array<{ __typename?: 'GRACluster', id: string, name: string, description?: Maybe, institutionCount?: Maybe, geographies: Array, medianAge?: Maybe, strengthsText?: Maybe, weaknessesText?: Maybe, medianRank?: Maybe<{ __typename?: 'GRABanding', lower: number, higher: number }>, bestRanked: Array }>> }> } };\n\nexport type NewReleasePillarsQueryVariables = Exact<{\n institutionId: Scalars['String'];\n year: Scalars['Int'];\n institutionIds?: Maybe | Scalars['String']>;\n region: Scalars['String'];\n level1Id: Scalars['String'];\n releaseName: Scalars['String'];\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type NewReleasePillarsQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', id: string, level1: { __typename?: 'GRALevel1', level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, aggregateData: { __typename?: 'AggregateData', min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }, result: { __typename?: 'Level2Result', id: string, score: number }, results: Array<{ __typename?: 'Level2Result', id: string, score: number, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }> }> } } };\n\nexport type NewReleaseCrossPillarsQueryVariables = Exact<{\n institutionId: Scalars['String'];\n year: Scalars['Int'];\n institutionIds?: Maybe | Scalars['String']>;\n level1Id: Scalars['String'];\n releaseName: Scalars['String'];\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type NewReleaseCrossPillarsQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', id: string, level1: { __typename?: 'GRALevel1', level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, result: { __typename?: 'Level2Result', id: string, score: number }, results: Array<{ __typename?: 'Level2Result', id: string, score: number, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }> }> } } };\n\nexport type NewReleaseIndividualSubjectQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n institutionIds?: Maybe | Scalars['String']>;\n level1Id: Scalars['String'];\n region?: Maybe;\n releaseName: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type NewReleaseIndividualSubjectQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', level1: { __typename?: 'GRALevel1', key: string, name: string, level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, level3s: Array<{ __typename?: 'GRALevel3', id: string, name: string, key: string, valueType: ValueType, aggregateScoreData: { __typename?: 'AggregateData', count: number, min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }, result: { __typename?: 'Result', id: string, score: number, value: number, isImputed?: Maybe, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }, results: Array<{ __typename?: 'Result', isImputed?: Maybe, score: number, value: number, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }> }> }> }, level1s: Array<{ __typename?: 'GRALevel1', key: string, name: string }>, institutionData?: Maybe<{ __typename?: 'GRAInstitutionData', pppToUsd: number, institution: { __typename?: 'Institution', name: string, id: string, institutionId: string } }>, institutionsData?: Maybe<{ __typename?: 'InstitutionsData', data: Array<{ __typename?: 'GRAInstitutionData', pppToUsd: number, institution: { __typename?: 'Institution', name: string, id: string, institutionId: string } }> }> } };\n\nexport type NewReleaseSubjectsQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n institutionIds?: Maybe | Scalars['String']>;\n level1Id: Scalars['String'];\n releaseName: Scalars['String'];\n responseFields?: Maybe | ResponseFieldsListItem>;\n}>;\n\n\nexport type NewReleaseSubjectsQuery = { __typename?: 'Query', release: { __typename?: 'GRARelease', level1: { __typename?: 'GRALevel1', result?: Maybe<{ __typename?: 'Level1Result', rank: { __typename?: 'GRABanding', lower: number, higher: number } }> }, level1s: Array<{ __typename?: 'GRALevel1', id: string, name: string, results: Array<{ __typename?: 'Level1Result', scoreNumber: number, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }> }> } };\n\nexport type GetYearOnYearChangesInPerformanceQueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionIds?: Maybe | Scalars['String']>;\n releaseNames: Array> | Maybe;\n level1Id: Scalars['String'];\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type GetYearOnYearChangesInPerformanceQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', id: string, year: number, level1: { __typename?: 'GRALevel1', id: string, results: Array<{ __typename?: 'Level1Result', id: string, scoreNumber: number, jointRanked: boolean, institution: { __typename?: 'Institution', name: string, id: string, institutionId: string }, rank: { __typename?: 'GRABanding', lower: number, higher: number }, score: { __typename?: 'GRABanding', lower: number, higher: number } }> } }> };\n\nexport type GetYearOnYearContributingFactorsQueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionId: Scalars['String'];\n peerInstitutionId: Scalars['String'];\n releaseNames: Array> | Maybe;\n level1Id: Scalars['String'];\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type GetYearOnYearContributingFactorsQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', id: string, year: number, level1: { __typename?: 'GRALevel1', id: string, result?: Maybe<{ __typename?: 'Level1Result', id: string, scoreNumber: number, score: { __typename?: 'GRABanding', lower: number } }>, level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, level3s: Array<{ __typename?: 'GRALevel3', id: string, name: string, weighting: number, key: string, result: { __typename?: 'Result', id: string, score: number } }> }> } }> };\n\nexport type GetYearOnYearPerformanceDistributionQueryVariables = Exact<{\n years?: Maybe | Scalars['Int']>;\n institutionId: Scalars['String'];\n releaseNames: Array> | Maybe;\n level1Id: Scalars['String'];\n region: Scalars['String'];\n responseFields?: Maybe> | Maybe>;\n}>;\n\n\nexport type GetYearOnYearPerformanceDistributionQuery = { __typename?: 'Query', releases: Array<{ __typename?: 'GRARelease', id: string, year: number, level1: { __typename?: 'GRALevel1', id: string, level2s: Array<{ __typename?: 'GRALevel2', id: string, level3s: Array<{ __typename?: 'GRALevel3', id: string, name: string, key: string, result: { __typename?: 'Result', id: string, score: number }, aggregateScoreData: { __typename?: 'AggregateData', min: number, median: number, lowerQuartile: number, upperQuartile: number, max: number }, aggregateScorePerformanceData: { __typename?: 'AggregateData', min: number, median: number, lowerQuartile: number, upperQuartile: number, max: number } }> }> } }> };\n\nexport type AddScenarioMutationVariables = Exact<{\n input: ScenarioDataInput;\n}>;\n\n\nexport type AddScenarioMutation = { __typename?: 'Mutation', addScenario: { __typename?: 'ScenarioMutationResult', scenarioId: string } };\n\nexport type WurReporterInterimAddScenarioMutationVariables = Exact<{\n input: ScenarioDataInput;\n}>;\n\n\nexport type WurReporterInterimAddScenarioMutation = { __typename?: 'Mutation', wurReporterInterimAddScenario: { __typename?: 'ScenarioMutationResult', scenarioId: string } };\n\nexport type SubmissionWur2QueryVariables = Exact<{\n institutionId: Scalars['String'];\n year: Scalars['Int'];\n}>;\n\n\nexport type SubmissionWur2Query = { __typename?: 'Query', institution?: Maybe<{ __typename?: 'WURInstitution', currency: string }>, submission?: Maybe<{ __typename?: 'Submission', institutionId: string, year: number, overall?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, artsAndHumanities?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, businessAndEconomics?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, clinicalAndHealth?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, computerScience?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, education?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, engineering?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, law?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, lifeSciences?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, physicalSciences?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, psychology?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, socialSciences?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }> }> };\n\nexport type SubmissionWur3QueryVariables = Exact<{\n institutionId: Scalars['String'];\n year: Scalars['Int'];\n}>;\n\n\nexport type SubmissionWur3Query = { __typename?: 'Query', institution?: Maybe<{ __typename?: 'WURInstitution', currency: string }>, submission?: Maybe<{ __typename?: 'Submission', institutionId: string, year: number, overall?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, artsAndHumanities?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, businessAndEconomics?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, clinicalAndHealth?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, computerScience?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, education?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, engineering?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, law?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, lifeSciences?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, physicalSciences?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, psychology?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }>, socialSciences?: Maybe<{ __typename?: 'SubmissionsSubjectField', applicable?: Maybe }> }> };\n\nexport type EditScenarioMutationVariables = Exact<{\n scenarioId: Scalars['String'];\n input: ScenarioDataInput;\n}>;\n\n\nexport type EditScenarioMutation = { __typename?: 'Mutation', editScenario: { __typename?: 'Scenario', scenarioId: string, name: string } };\n\nexport type WurReporterInterimEditScenarioMutationVariables = Exact<{\n scenarioId: Scalars['String'];\n input: ScenarioDataInput;\n}>;\n\n\nexport type WurReporterInterimEditScenarioMutation = { __typename?: 'Mutation', wurReporterInterimEditScenario: { __typename?: 'Scenario', scenarioId: string, name: string } };\n\nexport type EditScenarioNameMutationVariables = Exact<{\n scenarioId: Scalars['String'];\n input: ScenarioDataInput;\n}>;\n\n\nexport type EditScenarioNameMutation = { __typename?: 'Mutation', editScenario: { __typename?: 'Scenario', scenarioId: string } };\n\nexport type WurReporterInterimEditScenarioNameMutationVariables = Exact<{\n scenarioId: Scalars['String'];\n input: ScenarioDataInput;\n}>;\n\n\nexport type WurReporterInterimEditScenarioNameMutation = { __typename?: 'Mutation', wurReporterInterimEditScenario: { __typename?: 'Scenario', scenarioId: string } };\n\nexport type ScenariosQueryVariables = Exact<{\n perPage?: Maybe;\n institutionId: Scalars['String'];\n page?: Maybe;\n sortBy?: Maybe;\n sortDirection?: Maybe;\n allowScoresForExcluded: Scalars['Boolean'];\n}>;\n\n\nexport type ScenariosQuery = { __typename?: 'Query', scenarios?: Maybe, totalScenariosCount: number, alexanderJson: { __typename?: 'ScenarioResult', overall?: Maybe<{ __typename?: 'ScenarioResultFields', scoreDisplay?: Maybe, rankDisplay?: Maybe }> } }>> };\n\nexport type WurReporterInterimScenariosQueryVariables = Exact<{\n perPage?: Maybe;\n institutionId: Scalars['String'];\n page?: Maybe;\n sortBy?: Maybe;\n sortDirection?: Maybe;\n allowScoresForExcluded: Scalars['Boolean'];\n}>;\n\n\nexport type WurReporterInterimScenariosQuery = { __typename?: 'Query', wurReporterInterimScenarios?: Maybe, totalScenariosCount: number, alexanderJson: { __typename?: 'ScenarioResult', overall?: Maybe<{ __typename?: 'ScenarioResultFields', scoreDisplay?: Maybe, rankDisplay?: Maybe }> } }>> };\n\nexport type ArchiveScenariosMutationVariables = Exact<{\n scenarioIds: Array | Scalars['String'];\n institutionId: Scalars['String'];\n}>;\n\n\nexport type ArchiveScenariosMutation = { __typename?: 'Mutation', archiveScenarios: { __typename?: 'ScenarioMutationResult', resource: string } };\n\nexport type WurReporterInterimArchiveScenariosMutationVariables = Exact<{\n scenarioIds: Array | Scalars['String'];\n institutionId: Scalars['String'];\n allowScoresForExcluded: Scalars['Boolean'];\n}>;\n\n\nexport type WurReporterInterimArchiveScenariosMutation = { __typename?: 'Mutation', wurReporterInterimArchiveScenarios: { __typename?: 'ScenarioMutationResult', resource: string } };\n\nexport type UnarchiveScenariosMutationVariables = Exact<{\n scenarioIds: Array | Scalars['String'];\n institutionId: Scalars['String'];\n}>;\n\n\nexport type UnarchiveScenariosMutation = { __typename?: 'Mutation', unarchiveScenarios: { __typename?: 'ScenarioMutationResult', resource: string } };\n\nexport type WurReporterInterimUnarchiveScenariosMutationVariables = Exact<{\n scenarioIds: Array | Scalars['String'];\n institutionId: Scalars['String'];\n allowScoresForExcluded: Scalars['Boolean'];\n}>;\n\n\nexport type WurReporterInterimUnarchiveScenariosMutation = { __typename?: 'Mutation', wurReporterInterimUnarchiveScenarios: { __typename?: 'ScenarioMutationResult', resource: string } };\n\nexport type GetWurRatingAndScoreQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n}>;\n\n\nexport type GetWurRatingAndScoreQuery = { __typename?: 'Query', wurRelease?: Maybe<{ __typename?: 'WURRelease', subject?: Maybe<{ __typename?: 'WURSubject', result?: Maybe<{ __typename?: 'WURSubjectResult', score: { __typename?: 'WURBanding', higher: number, lower: number }, rank: { __typename?: 'WURBanding', higher: number, lower: number } }> }> }> };\n\nexport type GetWurPillarsComparisonQueryVariables = Exact<{\n myId: Scalars['String'];\n year: Scalars['Int'];\n institutionIds?: Maybe | Scalars['String']>;\n region: Scalars['String'];\n isNewWur3Methodology?: Maybe;\n}>;\n\n\nexport type GetWurPillarsComparisonQuery = { __typename?: 'Query', wurRelease?: Maybe<{ __typename?: 'WURRelease', id: string, levelDefinitions?: Maybe<{ __typename?: 'WURReleaseLevelDefinitions', level2?: Maybe, levelId?: Maybe, shortName?: Maybe, longName?: Maybe, name?: Maybe, weighting?: Maybe, type?: Maybe }>>>, level3?: Maybe, levelId?: Maybe, shortName?: Maybe, longName?: Maybe, name?: Maybe, weighting?: Maybe, type?: Maybe }>>> }>, subject?: Maybe<{ __typename?: 'WURSubject', pillars: Array<{ __typename?: 'WURPillar', id: string, name: string, key: string, aggregateData?: Maybe<{ __typename?: 'WURAggregateData', min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }>, result?: Maybe<{ __typename?: 'WURPillarScore', id: string, score: number }>, results: Array<{ __typename?: 'WURPillarScore', id: string, score: number, institution: { __typename?: 'WURInstitution', id: string, institutionId: string, name: string } }> }> }> }> };\n\nexport type NewReleaseQueryVariables = Exact<{\n myId: Scalars['String'];\n year: Scalars['Int'];\n institutionIds?: Maybe | Scalars['String']>;\n region: Scalars['String'];\n}>;\n\n\nexport type NewReleaseQuery = { __typename?: 'Query', newrelease?: Maybe<{ __typename?: 'GRARelease', id: string, levelDefinitions?: Maybe<{ __typename?: 'GRAReleaseLevelDefinitions', level2?: Maybe, levelId?: Maybe, shortName?: Maybe, longName?: Maybe, name?: Maybe, weighting?: Maybe, type?: Maybe }>>>, level3?: Maybe, levelId?: Maybe, shortName?: Maybe, longName?: Maybe, name?: Maybe, weighting?: Maybe, type?: Maybe }>>> }>, level1: { __typename?: 'GRALevel1', level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, key: string, aggregateData: { __typename?: 'AggregateData', min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }, result: { __typename?: 'Level2Result', id: string, score: number }, results: Array<{ __typename?: 'Level2Result', id: string, score: number, scoreNumber: number, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }> }> } }> };\n\nexport type GetScenarioWaterfallQueryVariables = Exact<{\n year: Scalars['Int'];\n name: Scalars['String'];\n institutionId: Scalars['String'];\n}>;\n\n\nexport type GetScenarioWaterfallQuery = { __typename?: 'Query', wurRelease?: Maybe<{ __typename?: 'WURRelease', id: string, subject?: Maybe<{ __typename?: 'WURSubject', pillars: Array<{ __typename?: 'WURPillar', id: string, name: string, metrics: Array<{ __typename?: 'WURMetric', id: string, shortName: string, name: string, valueType: WurValueType, weighting: number, key: string, result?: Maybe<{ __typename?: 'WURMetricScore', score: number }> }> }> }> }> };\n\nexport type GetWurSubjectMetricQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionIds?: Maybe | Scalars['String']>;\n selectedSubject: Scalars['String'];\n myId: Scalars['String'];\n region?: Maybe;\n}>;\n\n\nexport type GetWurSubjectMetricQuery = { __typename?: 'Query', wurRelease?: Maybe<{ __typename?: 'WURRelease', subject?: Maybe<{ __typename?: 'WURSubject', key: string, name: string, pillars: Array<{ __typename?: 'WURPillar', id: string, name: string, metrics: Array<{ __typename?: 'WURMetric', id: string, name: string, key: string, valueType: WurValueType, aggregateValueData?: Maybe<{ __typename?: 'WURAggregateData', min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }>, aggregateScoreData?: Maybe<{ __typename?: 'WURAggregateData', min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }>, result?: Maybe<{ __typename?: 'WURMetricScore', id: string, score: number, value?: Maybe, isImputed: boolean, institution: { __typename?: 'WURInstitution', id: string, institutionId: string, name: string } }>, results: Array<{ __typename?: 'WURMetricScore', id: string, score: number, value?: Maybe, isImputed: boolean, institution: { __typename?: 'WURInstitution', id: string, institutionId: string, name: string } }> }> }> }>, subjects: Array<{ __typename?: 'WURSubject', id: string, key: string, name: string, results: Array<{ __typename?: 'WURSubjectResult', scoreNumber?: Maybe, institution: { __typename?: 'WURInstitution', id: string, institutionId: string, name: string } }> }>, institutionData?: Maybe<{ __typename?: 'WURInstitutionData', pppToUsd: number, institution: { __typename?: 'WURInstitution', name: string, id: string, institutionId: string } }>, institutionsData?: Maybe<{ __typename?: 'WURReleaseInstitutions', data: Array<{ __typename?: 'WURInstitutionData', pppToUsd: number, institution: { __typename?: 'WURInstitution', name: string, id: string, institutionId: string } }> }> }> };\n\nexport type GetGraSubjectMetricQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionIds?: Maybe | Scalars['String']>;\n selectedSubject: Scalars['String'];\n myId: Scalars['String'];\n region?: Maybe;\n}>;\n\n\nexport type GetGraSubjectMetricQuery = { __typename?: 'Query', newrelease?: Maybe<{ __typename?: 'GRARelease', level1: { __typename?: 'GRALevel1', key: string, name: string, level2s: Array<{ __typename?: 'GRALevel2', id: string, name: string, level3s: Array<{ __typename?: 'GRALevel3', id: string, name: string, key: string, valueType: ValueType, aggregateValueData: { __typename?: 'AggregateData', min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }, aggregateScoreData: { __typename?: 'AggregateData', min: number, lowerQuartile: number, median: number, upperQuartile: number, max: number }, result: { __typename?: 'Result', id: string, score: number, value: number, isImputed?: Maybe, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }, results: Array<{ __typename?: 'Result', id: string, score: number, value: number, isImputed?: Maybe, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }> }> }> }, level1s: Array<{ __typename?: 'GRALevel1', id: string, key: string, name: string, results: Array<{ __typename?: 'Level1Result', scoreNumber: number, institution: { __typename?: 'Institution', id: string, institutionId: string, name: string } }> }>, institutionData?: Maybe<{ __typename?: 'GRAInstitutionData', pppToUsd: number, institution: { __typename?: 'Institution', name: string, id: string, institutionId: string } }>, institutionsData?: Maybe<{ __typename?: 'InstitutionsData', data: Array<{ __typename?: 'GRAInstitutionData', pppToUsd: number, institution: { __typename?: 'Institution', name: string, id: string, institutionId: string } }> }> }> };\n\nexport type GetWurRatingScoreAndLevelDefinitionsQueryVariables = Exact<{\n year: Scalars['Int'];\n institutionId: Scalars['String'];\n}>;\n\n\nexport type GetWurRatingScoreAndLevelDefinitionsQuery = { __typename?: 'Query', wurRelease?: Maybe<{ __typename?: 'WURRelease', levelDefinitions?: Maybe<{ __typename?: 'WURReleaseLevelDefinitions', level2?: Maybe, levelId?: Maybe, shortName?: Maybe, longName?: Maybe, name?: Maybe, weighting?: Maybe, type?: Maybe, rankingYear?: Maybe }>>>, level3?: Maybe, levelId?: Maybe, shortName?: Maybe, longName?: Maybe, name?: Maybe, weighting?: Maybe, type?: Maybe, rankingYear?: Maybe }>>> }>, subject?: Maybe<{ __typename?: 'WURSubject', result?: Maybe<{ __typename?: 'WURSubjectResult', score: { __typename?: 'WURBanding', higher: number, lower: number }, rank: { __typename?: 'WURBanding', higher: number, lower: number } }> }> }> };\n\nexport type ScenarioQueryVariables = Exact<{\n scenarioId: Scalars['String'];\n institutionId: Scalars['String'];\n allowScoresForExcluded: Scalars['Boolean'];\n}>;\n\n\nexport type ScenarioQuery = { __typename?: 'Query', scenario?: Maybe<{ __typename?: 'Scenario', scenarioId: string, name: string, methodology: string, createdAt: any, updatedAt: any, submissionYear?: Maybe, publicationYear?: Maybe, institution: { __typename?: 'ExploreInstitution', id: string, country: string, currencyCode?: Maybe }, scenarioInputs: { __typename?: 'ScenarioData', overall?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, artsAndHumanities?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, businessAndEconomics?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, clinicalAndHealth?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, computerScience?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, education?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, engineering?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, law?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, lifeSciences?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, physicalSciences?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, psychology?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, socialSciences?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }> }, alexanderJson: { __typename?: 'ScenarioResult', overall?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, artsAndHumanities?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, businessAndEconomics?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, clinicalAndHealth?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, computerScience?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, education?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, engineering?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, law?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, lifeSciences?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, physicalSciences?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, psychology?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, socialSciences?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }> } }> };\n\nexport type WurReporterInterimScenarioQueryVariables = Exact<{\n scenarioId: Scalars['String'];\n institutionId: Scalars['String'];\n allowScoresForExcluded: Scalars['Boolean'];\n}>;\n\n\nexport type WurReporterInterimScenarioQuery = { __typename?: 'Query', wurReporterInterimScenario?: Maybe<{ __typename?: 'Scenario', scenarioId: string, name: string, methodology: string, createdAt: any, updatedAt: any, submissionYear?: Maybe, publicationYear?: Maybe, institution: { __typename?: 'ExploreInstitution', id: string, country: string, currencyCode?: Maybe }, scenarioInputs: { __typename?: 'ScenarioData', overall?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, artsAndHumanities?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, businessAndEconomics?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, clinicalAndHealth?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, computerScience?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, education?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, engineering?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, law?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, lifeSciences?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, physicalSciences?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, psychology?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }>, socialSciences?: Maybe<{ __typename?: 'SubjectsFields', applicable?: Maybe }> }, alexanderJson: { __typename?: 'ScenarioResult', overall?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, artsAndHumanities?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, businessAndEconomics?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, clinicalAndHealth?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, computerScience?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, education?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, engineering?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, law?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, lifeSciences?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, physicalSciences?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, psychology?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }>, socialSciences?: Maybe<{ __typename?: 'ScenarioResultFields', applicable: boolean, scoreNumber?: Maybe, scoreDisplay?: Maybe, rankNumber?: Maybe, rankDisplay?: Maybe, exclusions?: Maybe>> }> } }> };\n\nexport type AcceptImpactEmbargoMutationVariables = Exact<{\n institutionId: Scalars['String'];\n year: Scalars['Int'];\n dataset: Scalars['String'];\n productName: Scalars['String'];\n}>;\n\n\nexport type AcceptImpactEmbargoMutation = { __typename?: 'Mutation', acceptEmbargo: Array<{ __typename?: 'ResourcePermission', resource: string, actions: Array<{ __typename?: 'PermissionAction', action: string, grant: boolean }> }> };\n","import numeral from 'numeral';\nimport { ValueType, WurValueType } from '#types/generated/graphql';\n\ntype ValueFormatterArgs = {\n value?: number | null;\n valueType?: WurValueType | ValueType;\n imputed?: boolean | Maybe;\n pppToUsd?: number;\n currency?: string;\n};\n\nexport const roundNumber = (value?: number | null, decimal = 0): number => {\n if (!value && value !== 0) {\n return 0;\n }\n return Number(value.toFixed(decimal));\n};\n\nexport const numberWithCommas = (x: number) => {\n const rounded = roundNumber(x);\n return rounded.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n};\n\nexport const isEmpty = (value: any) => {\n if (Array.isArray(value)) {\n return !value.length;\n }\n return !value;\n};\n\nexport const valueFormatter = ({\n value,\n valueType,\n imputed = false,\n pppToUsd = 1,\n currency,\n}: ValueFormatterArgs) => {\n if (valueType === WurValueType.Na || valueType === ValueType.Na) {\n return 'N/A';\n }\n if (\n imputed &&\n !(\n valueType === WurValueType.Reputation ||\n valueType === WurValueType.Elsevier ||\n valueType === ValueType.Reputation ||\n valueType === ValueType.Elsevier ||\n ((valueType === WurValueType.Currency ||\n valueType === ValueType.Currency) &&\n value !== null)\n )\n ) {\n return '-';\n }\n if (typeof value === 'undefined' || value === null) {\n switch (valueType) {\n case WurValueType.Reputation:\n case ValueType.Reputation:\n return '0.0';\n default:\n return 'N/A';\n }\n }\n switch (valueType) {\n case WurValueType.Currency:\n case ValueType.Currency:\n if (pppToUsd === 0) {\n return '0';\n }\n\n return `${numeral(value / pppToUsd).format('0,0')}${\n currency ? ` ${currency}` : ''\n }`;\n case WurValueType.Percentage:\n case ValueType.Percentage:\n case WurValueType.Elsevier:\n case ValueType.Elsevier:\n return numeral(value).format('0.0%');\n case WurValueType.Reputation:\n case ValueType.Reputation:\n case WurValueType.Portal:\n case ValueType.Portal:\n return numeral(value).format('0.0');\n default:\n if (value === 0) {\n return '0';\n }\n return numeral(value).format('0.00');\n }\n};\n","import numeral from 'numeral';\n\nexport const scoreFormatter = (score?: string | number | null): string => {\n const value = typeof score === 'string' ? parseFloat(score) : score;\n if (typeof value === 'undefined' || value === null || Number.isNaN(value)) {\n return '-';\n }\n\n return numeral(score).format('0.0');\n};\n","import { find, propEq } from 'ramda';\n\nimport { SelectData, SelectOptions } from '#coreComponents/Select/types';\nimport { QuerySelectOptionsStaticMap } from './types';\n\ninterface Option {\n key: string;\n label: string;\n}\n\ninterface GetQuerySelectStaticOptions {\n map: QuerySelectOptionsStaticMap[];\n variableOptions: Option[];\n selectedKey: string;\n}\n\nexport function getQuerySelectOptions(\n this: GetQuerySelectStaticOptions,\n prop: string,\n) {\n const selectedMap = this.map.find((m) => m.key === this.selectedKey);\n\n if (selectedMap?.type === 'static') {\n return this.variableOptions.filter((opt) => opt.key === selectedMap[prop]);\n }\n\n const dynamicVariableOptions = selectedMap?.options?.map((opt) =>\n find(propEq('key', opt))(this.variableOptions),\n ) as SelectOptions[];\n\n return dynamicVariableOptions || [{ key: 'placeholder', label: '...' }];\n}\n\nexport function getFilterSelectOptions(\n map: QuerySelectOptionsStaticMap[],\n selectedKey: string,\n filteredOptions: { [index: string]: SelectData },\n selectedFilters: { [key: string]: string[] },\n) {\n const selectedMap = map.find((m) => m.key === selectedKey);\n\n return selectedMap?.filteredOptions?.map((key) => ({\n ...filteredOptions[key],\n meta: {\n ...filteredOptions[key].meta,\n selected: selectedFilters[key],\n },\n key,\n }));\n}\n\nexport function getDownloadFileName(\n base?: string,\n suffix?: string,\n): string | undefined {\n if (!base) {\n return undefined;\n }\n return `${base}${suffix || ''}`;\n}\n","import { createContext, useContext } from 'react';\n\nexport enum Environment {\n DEV = 'dev',\n STAGING = 'staging',\n PRODUCTION = 'production',\n UNKNOWN = 'unknown',\n}\n\nexport type EnvironmentData = {\n enableTracking: boolean;\n keycloakConfig: {\n url: string;\n realm: string;\n clientId: string;\n };\n launchDarklyConfig: {\n clientSideID: string | null;\n };\n newRelicConfig: {\n accountId: string | null;\n licenseKey: string | null;\n appId: string | null;\n };\n classicUrl: string;\n environment: Environment;\n graURL: string;\n};\n\nexport type EnvironmentContract = EnvironmentData & {\n version: string;\n date: string;\n apiEndpoint: string;\n baseUrl: string;\n};\n\nconst FIRST_SUBDOMAIN_REGEX = /^([\\w-_]+)/;\n\nexport const calculateApiEndpointDefault = (hostname: string, port: number) => {\n const apiHostname = hostname.includes('.')\n ? hostname.replace(FIRST_SUBDOMAIN_REGEX, 'api')\n : `api.${hostname}`;\n return port !== 80\n ? `${apiHostname}:${port}/datapoints`\n : `${apiHostname}/datapoints`;\n};\n\nexport const defaultContextValue = {\n apiEndpoint: calculateApiEndpointDefault(\n window.location.hostname,\n parseInt(window.location.port, 10) || 80,\n ),\n version: '',\n date: '',\n baseUrl: '',\n enableTracking: false,\n keycloakConfig: {\n url: '',\n realm: '',\n clientId: '',\n },\n launchDarklyConfig: {\n clientSideID: null,\n },\n newRelicConfig: {\n accountId: null,\n licenseKey: null,\n appId: null,\n },\n classicUrl: '',\n environment: Environment.UNKNOWN,\n graURL: '',\n};\n\nconst EnvironmentContext = createContext({\n ...defaultContextValue,\n});\n\nexport const useEnvironment = () => useContext(EnvironmentContext);\n\nexport default EnvironmentContext;\n","import { mergeDeepRight } from 'ramda';\nimport React, { useMemo } from 'react';\n\nimport EnvironmentContext, {\n EnvironmentData,\n Environment as EnvironmentEnum,\n} from '../contexts/EnvironmentContext';\n\n// In order of precedence\n\n/* \nDec 2024, these are the environments we have:\nProduction via fastly\nProduction origin\n\nStaging non-iac via fastly -- we want to get rid of this and move to iac. \nStaging non-iac origin -- Cluster = non-prod-b2b Non IaC\n\nStaging shared IaC via fastly -- will be done once the origin is working\nStaging shared IaC origin -- Cluster = non-prod-shared (IaC)\n\nDev environment origin (no fastly) -- non-prod-shared (IaC)\nLocal\n*/\n\nconst localHostnameRegex = /.+\\.local$/;\n\n// Staging non-iac fastly and origin\n// Client fastly URL is www.stg.timeshighereducation.com/datapoints\n// Client cluster URL is datapoints.stg.the-internal.com/datapoints\nconst stagingNonIACGenericRegex = /.+\\.stg\\..+$/;\n\n// Staging shared IaC will eventually be staging\nconst stagingSharedIaCHostnameRegex = /datapoints\\.staging-shared\\.the-internal\\.cloud$/;\n\n// Staging iac fastly is not here yet, but would be same as above (www.stg.timeshighereducation.com/datapoints)\n// Client cluster iac URL is datapoints.staging.the-internal.cloud/datapoints\n// Beware this will match staging-shared as well\nconst stagingIACGenericRegex = /.+\\.staging\\..+$/;\n\n// Client Prod via fastly is www.timeshighereducation.com/datapoints\n// Client Prod origin is datapoints.prd.the-internal.com/datapoints. It won't match the below regex, so it probably doesn't work\nconst prodHostnameRegex = /^www\\.timeshighereducation\\.com$/;\n\n// We are deprecating this dev environment\n// Client Dev via fastly is not going to be done\n// Client Dev origin is datapoints-dev.stg.the-internal.com\n// const devNonIacHostnameRegex = /.+-dev\\.stg\\.the-internal\\.com$/;\n\n// Client Dev via fastly is not going to be done\n// Client Dev origin is datapoints-dev.staging-shared.the-internal.cloud\nconst devStagingSharedIaCHostnameRegex = /.+-dev\\.staging-shared\\.the-internal\\.cloud$/;\n\nconst FIRST_SUBDOMAIN_REGEX = /^([\\w-_]+)/;\n\n// Because we are using react, we cannot dynamically set the server_api address, so we use this method instead:\nconst calculateApiEndpoint = (hostname: string, port: number) => {\n /* \n As of Dev 2024, the server_api for datapoints ingresses are:\n prod via fastly = api.datapoints.timeshighereducation.com/datapoints\n prod origin = datapoints-api.prd.the-internal.com/datapoints\n\n staging (Non-Prod B2B) via fastly = api.stg.timeshighereducation.com/datapoints\n staging (Non-Prod B2B) origin = datapoints-api.stg.the-internal.com/datapoints -- It is in the B2B staging non-IAC cluster\n \n staging (shared IaC) via fastly not done yet (but the URL will be the same as above)\n staging (shared IaC) origin = datapoints.staging-shared.the-internal.cloud/datapoint\n\n dev (Non-Prod Shared) via fastly is not going to be put in place\n dev (Non-Prod Shared IaC) origin = datapoints-api-dev.staging-shared.the-internal.cloud/datapoints\n */\n\n if (devStagingSharedIaCHostnameRegex.test(hostname)) {\n // Dev doesn't use the normal pattern\n return 'datapoints-api-dev.staging-shared.the-internal.cloud/datapoints';\n }\n if (stagingSharedIaCHostnameRegex.test(hostname)) {\n return 'datapoints-api.staging-shared.the-internal.cloud/datapoints';\n }\n\n const apiHostname = hostname.includes('.')\n ? hostname.replace(FIRST_SUBDOMAIN_REGEX, 'api')\n : `api.${hostname}`;\n\n const serverApiUrl =\n port !== 80\n ? `${apiHostname}:${port}/datapoints`\n : `${apiHostname}/datapoints`;\n\n // eslint-disable-next-line no-console\n // console.log('hostname: ', hostname, ' calculateApiEndpoint:', serverApiUrl);\n\n return serverApiUrl;\n};\n\nconst commonConfig = {\n keycloakConfig: {\n realm: 'THE',\n clientId: 'DataPoints',\n },\n newRelicConfig: {\n accountId: '2378272',\n licenseKey: 'da4493c478',\n },\n};\n\nconst getBuildMetaValue = (htmlEl: HTMLHtmlElement, metaName: string) => {\n const metaElement = htmlEl.querySelector(`[name~=${metaName}]`);\n return metaElement?.getAttribute('content') || '';\n};\n\nexport const getBuildInfo = (\n htmlEl: HTMLHtmlElement,\n): { version: string; date: string } => ({\n version: getBuildMetaValue(htmlEl, 'build-version'),\n date: getBuildMetaValue(htmlEl, 'build-date'),\n});\n\nconst Environment: React.FC<{}> = ({ children }) => {\n const { hostname, port, origin } = window.location;\n\n const apiEndpoint = useMemo(\n () => calculateApiEndpoint(hostname, parseInt(port, 10) || 80),\n [hostname, port],\n );\n\n const baseUrl = `${origin}/datapoints/`;\n\n const environmentData: EnvironmentData = useMemo(() => {\n if (localHostnameRegex.test(hostname)) {\n return mergeDeepRight(commonConfig, {\n enableTracking: false,\n keycloakConfig: {\n // should be https://auth.timeshighereducation.local/auth/\n url: 'https://auth.stg.timeshighereducation.com/auth/',\n },\n launchDarklyConfig: {\n clientSideID: '6128aff0ebb94525cd03dc33',\n },\n newRelicConfig: {\n appId: null,\n },\n classicUrl: 'https://classic.timeshighereducation.com/datapoints',\n environment: EnvironmentEnum.DEV,\n graURL:\n 'https://generic-ranking-api.timeshighereducation.local/graphql',\n // graURL: 'generic-ranking-api.staging-shared.the-internal.cloud/graphql',\n });\n }\n if (devStagingSharedIaCHostnameRegex.test(hostname)) {\n // Dev should use the staging GRA and keycloak\n return mergeDeepRight(commonConfig, {\n enableTracking: false,\n keycloakConfig: {\n url: 'https://auth.stg.timeshighereducation.com/auth/',\n },\n launchDarklyConfig: {\n clientSideID: '6128aff0ebb94525cd03dc33',\n },\n newRelicConfig: {\n appId: null,\n },\n classicUrl: 'https://classic.timeshighereducation.com/datapoints',\n environment: EnvironmentEnum.DEV,\n graURL:\n 'https://generic-ranking-api.staging-shared.the-internal.cloud/graphql',\n });\n }\n if (stagingSharedIaCHostnameRegex.test(hostname)) {\n // Dev should use the staging GRA and keycloak\n return mergeDeepRight(commonConfig, {\n enableTracking: false,\n keycloakConfig: {\n url: 'https://auth.stg.timeshighereducation.com/auth/',\n },\n launchDarklyConfig: {\n clientSideID: '6128aff0ebb94525cd03dc33',\n },\n newRelicConfig: {\n appId: null,\n },\n classicUrl: 'https://classic.timeshighereducation.com/datapoints',\n environment: EnvironmentEnum.DEV,\n graURL:\n 'https://generic-ranking-api.staging-shared.the-internal.cloud/graphql',\n });\n }\n if (stagingNonIACGenericRegex.test(hostname)) {\n return mergeDeepRight(commonConfig, {\n enableTracking: true,\n keycloakConfig: {\n url: 'https://auth.stg.timeshighereducation.com/auth/',\n },\n launchDarklyConfig: {\n clientSideID: '6128afd889a2d10d79db617c',\n },\n newRelicConfig: {\n appId: '288153577',\n },\n classicUrl: 'https://classic.stg.timeshighereducation.com/datapoints',\n environment: EnvironmentEnum.STAGING,\n graURL:\n 'https://generic-ranking-api.staging-shared.the-internal.cloud/graphql',\n });\n }\n if (stagingIACGenericRegex.test(hostname)) {\n return mergeDeepRight(commonConfig, {\n enableTracking: true,\n keycloakConfig: {\n url: 'https://auth.staging.the-internal.cloud/auth/',\n },\n launchDarklyConfig: {\n clientSideID: '6128afd889a2d10d79db617c',\n },\n newRelicConfig: {\n appId: '288153577',\n },\n classicUrl: 'https://classic.stg.timeshighereducation.com/datapoints',\n environment: EnvironmentEnum.STAGING,\n graURL:\n 'https://generic-ranking-api.staging-shared.the-internal.cloud/graphql',\n });\n }\n // Default is Prod\n return mergeDeepRight(commonConfig, {\n enableTracking: true,\n keycloakConfig: {\n url: 'https://auth.timeshighereducation.com/auth/',\n },\n launchDarklyConfig: {\n clientSideID: '6128af9a1e1e97285771b682',\n },\n newRelicConfig: {\n appId: '288159060',\n },\n classicUrl: 'https://classic.timeshighereducation.com/datapoints',\n environment: prodHostnameRegex.test(hostname)\n ? EnvironmentEnum.PRODUCTION\n : EnvironmentEnum.UNKNOWN,\n graURL: 'https://gra.timeshighereducation.com/graphql',\n });\n }, [hostname]);\n\n const contextValue = useMemo(\n () => ({\n ...environmentData,\n apiEndpoint,\n baseUrl,\n ...getBuildInfo(window.document.getElementsByTagName('html')[0]),\n }),\n [environmentData, apiEndpoint, baseUrl],\n );\n\n return (\n \n {children}\n \n );\n};\n\nexport default Environment;\n","import { createContext, useContext } from 'react';\nimport type { KeycloakInstance } from 'keycloak-js';\n\nexport type User = {\n id: string;\n username: string;\n givenName: string;\n familyName: string;\n name: string;\n email?: string;\n};\n\nexport type PermissionListType = {\n uid: string;\n id: string;\n};\n\nexport type AuthData = {\n keycloak?: KeycloakInstance;\n isAuthenticated: boolean;\n token: string | null;\n isAdmin: boolean;\n user: User | null;\n groups: string[];\n roles: string[];\n canUseElevatedPermissions: boolean;\n useElevatedPermissions: boolean;\n setUseElevatedPermissions: (useElevatedPermissions: boolean) => void;\n apiHeaders: { [key: string]: string };\n permissionToken: string | null;\n permissionList: PermissionListType[] | null;\n setPermissionToken: (permissionToken: string | null) => void;\n};\n\nexport type AuthActions = {\n logIn: KeycloakInstance['login'];\n logOut: KeycloakInstance['logout'];\n};\n\nexport type AuthContract = AuthData & {\n actions: AuthActions;\n};\n\nconst emptyKeyCloakAuthFunction = (): any => Promise.resolve();\n\nexport const defaultContextValue = {\n keycloak: undefined,\n isAuthenticated: false,\n token: null,\n isAdmin: false,\n user: null,\n roles: [],\n groups: [],\n actions: {\n logIn: emptyKeyCloakAuthFunction,\n logOut: emptyKeyCloakAuthFunction,\n },\n canUseElevatedPermissions: false,\n useElevatedPermissions: false,\n setUseElevatedPermissions: () => {},\n apiHeaders: {},\n permissionToken: null,\n permissionList: null,\n setPermissionToken: () => {},\n};\n\nconst AuthContext = createContext({\n ...defaultContextValue,\n});\n\nexport const useAuth = () => useContext(AuthContext);\n\nexport default AuthContext;\n","export const parseJwt = (token: string) => {\n try {\n if (!token || typeof token !== 'string') {\n throw new Error('Invalid token. Token must be a non-empty string.');\n }\n\n const parts = token.split('.');\n if (parts.length !== 3) {\n throw new Error(\n 'Invalid token format. Token must have three parts separated by dots.',\n );\n }\n\n const base64Url = parts[1];\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\n const jsonPayload = decodeURIComponent(\n atob(base64)\n .split('')\n .map((c) => `%${`00${c.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''),\n );\n\n return JSON.parse(jsonPayload);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error parsing JWT.');\n return null;\n }\n};\n","import React, {\n ReactNode,\n useEffect,\n useMemo,\n useState,\n useCallback,\n} from 'react';\nimport { useKeycloak } from '@react-keycloak/web';\nimport Keycloak, { KeycloakPromise } from 'keycloak-js';\nimport { useLocalStorage, usePrevious } from 'react-use';\n\nimport AuthContext, {\n AuthContract,\n PermissionListType,\n} from '../contexts/AuthContext';\nimport { useAppLoading } from '#core/AppLoading';\nimport CommonPermissions from '#core/Permissions/components/CommonPermissions';\nimport { useEnvironment } from '#core/Environment';\nimport getPermissionToken from '#utils/getPermissionToken';\nimport getPermissionList from '#utils/getPermissionList';\nimport { parseJwt } from '#utils/parseJwt';\n\ntype ParsedTokenWithExtraFields =\n | (Keycloak.KeycloakTokenParsed & {\n preferred_username?: string;\n groups?: [string];\n given_name: string;\n family_name: string;\n name: string;\n email?: string;\n })\n | undefined;\n\ntype AuthProviderProps = {\n children: (data: AuthContract) => ReactNode | null;\n};\n\nconst AuthProvider: React.FC = ({\n children: renderChildren,\n}) => {\n const { keycloak } = useKeycloak();\n const { token: keycloakToken } = keycloak || {};\n const { apiEndpoint } = useEnvironment();\n const { setIsLoading } = useAppLoading();\n const authenticated = keycloak?.authenticated || false;\n const tokenParsed = keycloak?.tokenParsed as ParsedTokenWithExtraFields;\n const groups = useMemo(() => tokenParsed?.groups || ([] as string[]), [\n tokenParsed?.groups,\n ]);\n const roles = useMemo(\n () => tokenParsed?.realm_access?.roles || ([] as string[]),\n [tokenParsed?.realm_access?.roles],\n );\n const canUseElevatedPermissions = roles.includes('AssumeAllInstitutions');\n\n const [useElevatedPermissions, setUseElevatedPermissions] = useLocalStorage<\n boolean\n >(`${tokenParsed?.sub}-use-elevated-permissions`, canUseElevatedPermissions);\n const previousUseElevatedPermisisons = usePrevious(useElevatedPermissions);\n\n const [permissionToken, setPermissionToken] = useState(null);\n const [isAdmin, setIsAdmin] = useState(false);\n const [permissionList, setPermissionList] = useState<\n PermissionListType[] | null\n >(null);\n\n const fetchPermissionsToken = useCallback(async () => {\n if (!keycloakToken) {\n return;\n }\n\n const permissionsToken = await getPermissionToken(\n apiEndpoint,\n keycloakToken,\n );\n const permissionsTokenParsed = parseJwt(permissionsToken);\n setPermissionToken(permissionsToken);\n setIsAdmin(permissionsTokenParsed?.isAdmin);\n }, [apiEndpoint, keycloakToken]);\n\n const fetchPermissionsList = useCallback(async () => {\n if (!keycloakToken) {\n return;\n }\n\n const list = await getPermissionList(apiEndpoint, keycloakToken);\n setPermissionList(list);\n }, [keycloakToken, apiEndpoint]);\n\n useEffect(() => {\n fetchPermissionsToken().then(fetchPermissionsList);\n }, [fetchPermissionsList, fetchPermissionsToken]);\n\n useEffect(() => {\n if (useElevatedPermissions !== previousUseElevatedPermisisons) {\n setIsLoading(true);\n }\n }, [useElevatedPermissions, previousUseElevatedPermisisons, setIsLoading]);\n\n const authContextValue: AuthContract = useMemo(() => {\n const token = keycloak?.token || '';\n return {\n keycloak,\n isAuthenticated: authenticated,\n token,\n isAdmin,\n user: tokenParsed\n ? {\n id: tokenParsed.sub as string,\n username: tokenParsed.preferred_username as string,\n givenName: tokenParsed.given_name,\n familyName: tokenParsed.family_name,\n name: tokenParsed.name,\n email: tokenParsed?.email,\n }\n : null,\n roles,\n groups,\n actions: {\n logIn:\n keycloak?.login ||\n (() => Promise.resolve() as KeycloakPromise),\n logOut: (): Keycloak.KeycloakPromise => {\n const fn =\n keycloak?.logout ||\n (() => Promise.resolve() as KeycloakPromise);\n sessionStorage.clear();\n return fn();\n },\n },\n canUseElevatedPermissions,\n useElevatedPermissions:\n canUseElevatedPermissions && useElevatedPermissions === true,\n setUseElevatedPermissions: canUseElevatedPermissions\n ? setUseElevatedPermissions\n : () => {},\n apiHeaders: { authorization: `Bearer ${token}` },\n permissionToken,\n permissionList,\n setPermissionToken,\n };\n }, [\n isAdmin,\n authenticated,\n canUseElevatedPermissions,\n groups,\n keycloak,\n roles,\n setUseElevatedPermissions,\n tokenParsed,\n useElevatedPermissions,\n permissionToken,\n permissionList,\n ]);\n\n if (\n typeof keycloak === 'undefined' ||\n typeof keycloak.authenticated === 'undefined'\n ) {\n // keycloak is not initialised\n return null;\n }\n\n return (\n \n {/* setup the keycloak related permissions (e.g. hasRole and hasGroup) */}\n \n {renderChildren(authContextValue)}\n \n \n );\n};\n\nexport default AuthProvider;\n","import React, { ReactNode, useMemo, useState } from 'react';\nimport { KeycloakProvider } from '@react-keycloak/web';\nimport Keycloak from 'keycloak-js';\nimport { useTimeoutFn } from 'react-use';\n\nimport { DataPointsAuthEvent } from '#coreComponents/DevelopmentNotifier/listeners/dataPointsAuth';\nimport { useTracking, EventType } from '#core/Tracking';\nimport { useEnvironment } from '#core/Environment';\n\nimport { AuthContract } from '../contexts/AuthContext';\nimport AuthProvider from './AuthProvider';\n\nconst KEYCLOAK_INIT_TIMEOUT = 15000;\n\ntype AuthProviderProps = {\n children: (data: AuthContract) => ReactNode | null;\n};\n\nconst Auth: React.FC = (props) => {\n const [keycloakInitialised, setKeycloakInitialised] = useState(false);\n const [initializeFailed, setInitializeFailed] = useState(false);\n const { keycloakConfig } = useEnvironment();\n const keycloak = useMemo(() => Keycloak(keycloakConfig), [keycloakConfig]);\n const { trackEvent } = useTracking();\n const [keycloakError, setKeycloakError] = useState();\n\n useTimeoutFn(() => {\n if (!keycloakInitialised) {\n setInitializeFailed(true);\n }\n }, KEYCLOAK_INIT_TIMEOUT);\n\n if (initializeFailed) {\n throw new Error('Failed to contact authentication server');\n }\n\n if (keycloakError) {\n throw keycloakError;\n }\n\n return (\n {\n let eventType: DataPointsAuthEvent['type'];\n let eventMessage: DataPointsAuthEvent['message'];\n let eventErrorMessage: DataPointsAuthEvent['errorMessage'];\n\n switch (event) {\n case 'onAuthSuccess':\n eventType = 'success';\n eventMessage = 'Auth succeeded';\n eventErrorMessage = error?.error || '';\n trackEvent({\n type: EventType.LOGIN,\n payload: {\n id: 'auth',\n metadata: {},\n },\n });\n break;\n case 'onAuthError':\n eventType = 'error';\n eventMessage = 'Auth failed';\n eventErrorMessage = error?.error || '';\n setKeycloakError(new Error(error?.error));\n trackEvent({\n type: EventType.LOGIN_FAIL,\n payload: {\n id: 'auth',\n metadata: {},\n },\n });\n break;\n case 'onAuthrefreshSuccess':\n eventType = 'success';\n eventMessage = 'Auth token refreshed';\n eventErrorMessage = error?.error || '';\n break;\n case 'onAuthrefreshError':\n eventType = 'error';\n eventMessage = 'Auth token refresh failed';\n eventErrorMessage = error?.error || '';\n break;\n case 'onInitError':\n eventType = 'error';\n eventMessage = 'Auth init failed';\n eventErrorMessage = error?.error || '';\n setKeycloakError(new Error(error?.error));\n break;\n case 'onReady':\n setKeycloakInitialised(true);\n break;\n case 'onTokenExpired':\n case 'onAuthLogout':\n default:\n }\n setTimeout(() => {\n if (eventMessage) {\n document.dispatchEvent(\n new CustomEvent('datapoints-auth', {\n detail: {\n type: eventType,\n message: eventMessage,\n errorMessage: eventErrorMessage,\n },\n }),\n );\n }\n }, 0);\n }}\n >\n \n \n );\n};\n\nexport default Auth;\n","const formatPermissions = (permissions, permissionList) =>\n Object.fromEntries(\n Object.keys(permissions).map((key) => [\n key,\n permissions[key]\n .map((id) => permissionList.find((item) => item.uid === String(id))?.id)\n .filter((id) => !!id),\n ]),\n );\n\nmodule.exports = {\n formatPermissions,\n};\n","import { createContext, useContext } from 'react';\nimport { UserInstitution, DataPointsProduct } from '#types/generated/graphql';\n\nexport type InstitutionContract = {\n hasManyInstitutions: Boolean;\n institution: Omit & {\n products: Pick<\n DataPointsProduct,\n 'name' | 'locations' | 'institutionGroups' | 'peersInfo'\n >[];\n };\n setActiveInstitution: (id: string) => void;\n clearActiveInstitution: () => void;\n apiHeaders: { [key: string]: string };\n};\n\nexport const defaultInstitutionContext = {\n hasManyInstitutions: false,\n institution: {\n id: '',\n institutionId: '',\n name: '',\n logo: '',\n resource: '',\n country: '',\n countryCode: '',\n continent: '',\n products: [],\n currencyCode: '',\n },\n setActiveInstitution: () => {},\n clearActiveInstitution: () => {},\n apiHeaders: {},\n};\n\nconst InstitutionContext = createContext(\n defaultInstitutionContext,\n);\n\nexport const useInstitution = () =>\n useContext(InstitutionContext);\n\nexport default InstitutionContext;\n","import React, { useEffect, useState, useMemo, useCallback } from 'react';\nimport {\n Box,\n Flex,\n Modal,\n ModalOverlay,\n ModalContent,\n ModalBody,\n ModalFooter,\n Input,\n Skeleton,\n SimpleGrid,\n Container,\n Link,\n Text,\n Image,\n Button,\n} from '@chakra-ui/react';\nimport { useDebounce } from 'react-use';\nimport { gql, useLazyQuery } from '@apollo/client';\nimport Heading from '#coreComponents/Heading';\nimport Pagination from '#coreComponents/Pagination';\nimport {\n SelectInstitutionMyInstitutionsQuery,\n // SelectInstitutionSetActiveInstitutionMutation,\n} from '#types/generated/graphql';\nimport useLogger from '#hooks/useLogger';\nimport { useInstitution } from '..';\nimport { useEnvironment } from '#core/Environment';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\n\nconst InstitutionTile: React.FC<{\n institution: SelectInstitutionMyInstitutionsQuery['myInstitutions']['institutions'][0];\n onClick: () => void;\n}> = ({ institution: { name, logo }, onClick }) => {\n const logger = useLogger();\n const imageWidth = '300px';\n const imageHeight = '100px';\n const institutionLogoUrl = useMemo(() => {\n try {\n const url = new URL(logo);\n url.searchParams.append('bg', '#fff');\n url.searchParams.append('w', imageWidth);\n url.searchParams.append('h', imageHeight);\n return url;\n } catch (e) {\n logger.warn(`Invalid institution logo URL - ${e.message}`);\n return '';\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [logo]);\n return (\n \n {institutionLogoUrl && (\n \n {`${name}\n \n )}\n \n {name}\n \n \n );\n};\n\nconst SelectInstitutionSplashScreen: React.FC<{\n validateInstitution: (id: string) => void;\n}> = () => {\n const { setActiveInstitution } = useInstitution();\n const {\n actions: { logOut },\n } = useAuth(); // JME2\n const { baseUrl } = useEnvironment();\n const [searchValue, setSearchValue] = useState('');\n const [currentPage, setCurrentPage] = useState(1);\n const [debouncedSearchValue, setDebouncedSearchValue] = useState('');\n\n useDebounce(\n () => {\n setDebouncedSearchValue(searchValue);\n setCurrentPage(1);\n },\n 300,\n [searchValue],\n );\n\n const [\n findMyInstitutions,\n {\n loading: findInstitutionLoading,\n error: findInstitutionError,\n data: findInstitutionData,\n },\n ] = useLazyQuery(gql`\n query SelectInstitutionMyInstitutions(\n $search: String!\n $page: Int!\n $perPage: Int!\n ) {\n myInstitutions(search: $search, page: $page, perPage: $perPage) {\n total\n count\n page\n perPage\n hasMore\n search\n pages\n institutions {\n id\n institutionId\n name\n logo\n }\n }\n }\n `);\n\n useEffect(() => {\n findMyInstitutions({\n variables: {\n search: debouncedSearchValue,\n page: currentPage,\n perPage: 12, // use 12 here as it's divisible by 1,2,3 and 4 which are our grid col values\n },\n });\n }, [debouncedSearchValue, currentPage, findMyInstitutions]);\n\n const selectInstitution = useCallback(\n async (institutionId) => {\n setActiveInstitution(institutionId);\n },\n [setActiveInstitution],\n );\n\n const pageCount = useMemo(() => {\n if (!findInstitutionData) {\n return 0;\n }\n return findInstitutionData.myInstitutions.pages;\n }, [findInstitutionData]);\n\n return (\n {}}\n size=\"full\"\n >\n \n \n \n \n Select an institution\n setSearchValue(target.value)}\n width=\"100%\"\n maxWidth=\"750px\"\n px={4}\n py={6}\n />\n \n \n Is one of your institutions missing a logo, or is the logo out\n of date?{' '}\n \n Tell us\n {' '}\n and we'll upload one for you.\n \n \n {findInstitutionLoading && (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n {!findInstitutionLoading &&\n findInstitutionData?.myInstitutions?.institutions?.map(\n (institution) => (\n \n selectInstitution(institution.institutionId)\n }\n />\n ),\n )}\n \n \n {!findInstitutionLoading &&\n !findInstitutionError &&\n (!findInstitutionData ||\n findInstitutionData?.myInstitutions?.institutions?.length <\n 1) && (\n \n No institutions found. Please change your search criteria.\n \n )}\n {findInstitutionError && (\n \n Sorry, there was an error querying for institutions. If this\n problem persists please email{' '}\n \n datapoints.support@timeshighereducation.com\n \n \n )}\n \n \n \n {findInstitutionLoading && (\n \n Loading...\n \n )}\n {!findInstitutionLoading && (\n \n Showing {findInstitutionData?.myInstitutions.count} of{' '}\n {findInstitutionData?.myInstitutions.total} institutions\n results.\n \n )}\n \n \n \n \n \n logOut({ redirectUri: baseUrl })}\n >\n Log Out\n \n \n \n \n );\n};\n\nexport default SelectInstitutionSplashScreen;\n","import React, { useCallback, useEffect } from 'react';\nimport { useSessionStorage } from 'react-use';\nimport { useFlags } from 'launchdarkly-react-client-sdk';\nimport { camelCase } from 'change-case';\nimport { gql, useMutation, useQuery } from '@apollo/client';\nimport { useKeycloak } from '@react-keycloak/web';\nimport InstitutionContext, {\n defaultInstitutionContext,\n} from '../contexts/InstitutionContext';\nimport {\n InitialMyInstitutionsQuery,\n InstitutionSetActiveInstitutionMutation,\n} from '#types/generated/graphql';\nimport SelectInstitutionSplashScreen from './SelectInstitutionSplashScreen';\nimport { useAppLoading } from '#core/AppLoading';\nimport Loading from '#coreComponents/Loading';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useEnvironment } from '#core/Environment';\nimport getPermissionToken from '#utils/getPermissionToken';\nimport { useAuth } from '#core/Auth';\nimport AccessDeniedErrorScreen from '#coreComponents/ErrorBoundary/AccessDeniedErrorScreen';\nimport ErrorBoundaryFooter from '#coreComponents/ErrorBoundary/ErrorBoundaryFooter';\n\nconst Institution: React.FC<{}> = ({ children }) => {\n const {\n user,\n useElevatedPermissions,\n setPermissionToken,\n isAdmin,\n }: any = useAuth(); // JME2\n const flags = useFlags();\n const userId = user?.[flags[camelCase('auth0Enabled')] ? 'sub' : 'id'];\n const { setIsLoading } = useAppLoading();\n const { apiEndpoint } = useEnvironment();\n const { keycloak } = useKeycloak();\n\n const [\n savedActiveInstitutionId,\n setSavedActiveInstitutionId,\n ] = useSessionStorage(`${userId}-active-institution`, null);\n\n const {\n loading: initialInstitutionLoading,\n error: initialInstitutionError,\n data: initialInstitutionData,\n } = useQuery(gql`\n query InitialMyInstitutions {\n myInstitutions(perPage: 1) {\n total\n count\n page\n perPage\n hasMore\n search\n pages\n institutions {\n id\n institutionId\n name\n products {\n peersInfo {\n supportsPeers\n supportsChangingPeers\n peerChangeOpen\n lastPeerChangeDate\n maxPeerCount\n peerChangeIntervalWeeks\n }\n }\n }\n }\n }\n `);\n\n const [\n validateInstitutionIdMutation,\n { loading: validateInstitutionIdLoading, data: validateInstitutionIdData },\n ] = useMutation(\n gql`\n mutation InstitutionSetActiveInstitution($institutionId: String!) {\n setActiveInstitution(id: $institutionId) {\n id\n resource\n institutionId\n name\n logo\n country\n countryCode\n continent\n products {\n name\n peersInfo {\n supportsPeers\n supportsChangingPeers\n peerChangeOpen\n lastPeerChangeDate\n maxPeerCount\n peerChangeIntervalWeeks\n peerChangeDraft {\n userId\n username\n fullName\n institutionIds\n peers {\n id\n institutionId\n name\n country\n continent\n logo\n }\n }\n }\n locations {\n countries\n continents\n }\n institutionGroups {\n name\n institutions {\n id\n institutionId\n name\n country\n continent\n logo\n }\n }\n }\n }\n }\n `,\n {\n onError: () => {},\n },\n );\n\n const validateInstitutionId = useCallback(\n async (institutionId: string) => {\n await validateInstitutionIdMutation({\n variables: {\n institutionId,\n },\n });\n },\n [validateInstitutionIdMutation],\n );\n const setActiveInstitution = useCallback(\n async (institutionId: string) => {\n await validateInstitutionId(institutionId);\n setSavedActiveInstitutionId(institutionId);\n },\n [setSavedActiveInstitutionId, validateInstitutionId],\n );\n\n useEffect(() => {\n const fetchPermissionToken = async () => {\n if (keycloak?.token) {\n const token = await getPermissionToken(\n apiEndpoint,\n keycloak?.token,\n useElevatedPermissions,\n savedActiveInstitutionId,\n );\n\n setPermissionToken(token);\n }\n };\n\n if (isAdmin) {\n fetchPermissionToken();\n }\n }, [\n keycloak?.token,\n savedActiveInstitutionId,\n apiEndpoint,\n useElevatedPermissions,\n setPermissionToken,\n isAdmin,\n ]);\n\n useEffect(() => {\n (async () => {\n if (initialInstitutionLoading) {\n return;\n }\n\n if (savedActiveInstitutionId && savedActiveInstitutionId.length > 0) {\n try {\n await validateInstitutionId(savedActiveInstitutionId);\n setSavedActiveInstitutionId(savedActiveInstitutionId);\n } catch {\n setSavedActiveInstitutionId('');\n }\n } else if (\n // if user has only one institution don't show the select screen\n initialInstitutionData &&\n initialInstitutionData?.myInstitutions.total === 1\n ) {\n const institution =\n initialInstitutionData?.myInstitutions?.institutions?.[0];\n\n if (institution) {\n try {\n await validateInstitutionId(institution.institutionId);\n setSavedActiveInstitutionId(institution.institutionId);\n } catch {\n // ignore the error\n }\n }\n }\n })();\n }, [\n savedActiveInstitutionId,\n setSavedActiveInstitutionId,\n validateInstitutionId,\n initialInstitutionData,\n initialInstitutionLoading,\n ]);\n\n useEffect(() => setIsLoading(validateInstitutionIdLoading), [\n setIsLoading,\n validateInstitutionIdLoading,\n ]);\n\n const clearActiveInstitution = useCallback(\n () => setSavedActiveInstitutionId(null),\n [setSavedActiveInstitutionId],\n );\n\n if (initialInstitutionLoading || validateInstitutionIdLoading) {\n return ;\n }\n\n if (initialInstitutionError) {\n throw initialInstitutionError;\n }\n\n if (\n savedActiveInstitutionId &&\n validateInstitutionIdData &&\n validateInstitutionIdData.setActiveInstitution\n ) {\n const institution = validateInstitutionIdData.setActiveInstitution;\n\n return (\n \n {children}\n \n );\n }\n\n if (!validateInstitutionIdData || !savedActiveInstitutionId) {\n return initialInstitutionData?.myInstitutions?.count === 0 ? (\n \n ) : (\n \n \n \n );\n }\n\n return null;\n};\n\nexport default Institution;\n","import React, { useContext } from 'react';\n\nimport TrackingContext from '../contexts/TrackingContext';\n\ntype EventTrackingAppProps = {\n name: string;\n};\n\nconst EventTrackingApp: React.FC = ({\n name,\n children,\n}) => {\n const trackingContext = useContext(TrackingContext);\n\n return (\n \n {children}\n \n );\n};\n\nexport default EventTrackingApp;\n","import React, { useContext } from 'react';\n\nimport TrackingContext from '../contexts/TrackingContext';\n\ntype EventTrackingPageProps = {\n pageGroup: string;\n page: string;\n};\n\nconst EventTrackingPage: React.FC = ({\n pageGroup,\n page,\n children,\n}) => {\n const trackingContext = useContext(TrackingContext);\n\n if (!trackingContext.applicationName) {\n throw new Error(\n ` must be used within a component`,\n );\n }\n\n return (\n \n {children}\n \n );\n};\n\nexport default EventTrackingPage;\n","import React, { useContext } from 'react';\n\nimport TrackingContext from '../contexts/TrackingContext';\n\ntype EventTrackingSectionProps = {\n section: string;\n};\n\nconst EventTrackingSection: React.FC = ({\n section,\n children,\n}) => {\n const trackingContext = useContext(TrackingContext);\n\n if (\n !trackingContext.pageGroup ||\n !trackingContext.page ||\n !trackingContext.applicationName\n ) {\n throw new Error(\n ` must be used within a component`,\n );\n }\n\n return (\n \n {children}\n \n );\n};\n\nexport default EventTrackingSection;\n","import React from 'react';\nimport { useMount } from 'react-use';\n\nimport { useEnvironment } from '#core/Environment';\n\nimport { loadMzSync, loadMzAsync } from '../utils/mz';\n\nconst MzTracking: React.FC<{}> = ({ children }) => {\n const { enableTracking } = useEnvironment();\n\n useMount(() => {\n if (typeof window.TES === 'undefined') {\n window.TES = {\n domain: '',\n pageMetadata: {}, // stop MZ from erroring on start\n };\n loadMzSync();\n if (enableTracking) {\n loadMzAsync();\n }\n }\n });\n return <>{children};\n};\n\nexport default MzTracking;\n","/**\n * WARNING! DO not auto format this file!\n * */\n\nconst MZ_VERSION = '6464e7f';\n\n/*\n * See https://github.com/THE-Engineering/mz/#asynchronous-function-queuing-support\n * for the origin of this snippet\n */\nexport const loadMzSync = () => {\n // @ts-ignore\n // eslint-disable-next-line\n (function(w){w._mz = {};w._mz_def=[];_mz.emit=function(t, d, n){w._mz_def.push({f:'emit',t:t,d:d,n:n});};}(window));\n};\n\n/*\n * This lazy loads the MZ bundle. We do this\n * instead of using a standard script tag so we can better\n * control when MZ is loaded\n */\nexport const loadMzAsync = () =>\n new Promise((resolve, reject) => {\n const script = document.createElement('script');\n document.body.appendChild(script);\n script.onload = resolve;\n script.onerror = reject;\n script.async = true;\n script.src = `/cdn/mz/${MZ_VERSION}/mz.js`;\n });\n","import React, { useMemo } from 'react';\nimport { EventType, TrackingEvent, useTracking } from '#core/Tracking';\nimport useLogger, { Logger } from '#hooks/useLogger';\n\n// These are selected events from https://reactjs.org/docs/events.html\nconst SUPPORTED_EVENTS = [\n 'onFocus',\n 'onBlur',\n 'onChange',\n 'onInput',\n 'onInvalid',\n 'onReset',\n 'onSubmit',\n 'onError',\n 'onLoad',\n 'onClick',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onPointerDown',\n 'onPointerMove',\n 'onPointerUp',\n 'onPointerCancel',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerOver',\n 'onPointerOut',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onToggle',\n];\n\ntype EventDataCallback = (\n e: React.SyntheticEvent,\n) => TrackingEvent | null | undefined | void;\n\ninterface WithEventTrackingProps {\n eventData: EventDataCallback;\n}\n\nconst withEventTrackingCallback = ({\n eventFn,\n eventData,\n trackEvent,\n logger,\n}: {\n eventFn: any;\n eventData: EventDataCallback;\n trackEvent: (event: TrackingEvent) => void;\n logger: Logger;\n}) => (...args: any) => {\n const result = eventFn(...args);\n if (\n !args[0].nativeEvent ||\n !(args[0].nativeEvent instanceof Event) ||\n result === false\n ) {\n // for some reason this isn't a React event handler or the handler returned false, so ignore tracking events\n return;\n }\n\n const event = eventData(\n (args[0] as unknown) as React.SyntheticEvent,\n );\n if (!event) {\n return;\n }\n\n try {\n trackEvent(event);\n } catch (error) {\n logger.error(error as EventType.ERROR);\n }\n};\n\nconst withEventTracking = (\n Component: React.ComponentType,\n): React.FC => ({ eventData, ...props }) => {\n const { trackEvent } = useTracking();\n const logger = useLogger();\n const mutatedProps = useMemo(\n () =>\n Object.entries(props).reduce(\n (acc, [eventKey, eventFn]) =>\n SUPPORTED_EVENTS.includes(eventKey) && typeof eventFn === 'function'\n ? {\n ...acc,\n [eventKey]: withEventTrackingCallback({\n eventFn,\n eventData,\n trackEvent,\n logger,\n }),\n }\n : acc,\n props,\n ),\n [props, eventData, trackEvent, logger],\n ) as T;\n\n return ;\n};\n\nexport default withEventTracking;\n","import { camelize } from 'humps';\nimport { isEmpty, omit } from 'ramda';\nimport {\n ScenarioData,\n Submission,\n SubmissionsSubjectField,\n SubmissionWur2Query,\n} from '#types/generated/graphql';\nimport { roundNumber } from '#utils/valueFormatters';\n\nexport interface ScenarioDataType extends ScenarioData {\n [key: string]: any;\n}\n\nexport interface SubmissionDataType\n extends Omit {\n [key: string]: any;\n}\n\nexport type LevelDefinitionsObjectType = {\n [key: string]: {\n parentId?: string;\n levelId?: string;\n shortName?: string;\n longName?: string;\n name?: string;\n weighting?: number;\n type?: string;\n rankingYear?: number;\n }[];\n};\n\nexport type Subject =\n | 'Overall'\n | 'Arts and Humanities'\n | 'Business and Economics'\n | 'Clinical and Health'\n | 'Computer Science'\n | 'Education'\n | 'Engineering'\n | 'Law'\n | 'Life Sciences'\n | 'Physical Sciences'\n | 'Psychology'\n | 'Social Sciences';\n\nexport type SubjectId =\n | 'overall'\n | 'artsAndHumanities'\n | 'businessAndEconomics'\n | 'clinicalAndHealth'\n | 'computerScience'\n | 'education'\n | 'engineering'\n | 'law'\n | 'lifeSciences'\n | 'physicalSciences'\n | 'psychology'\n | 'socialSciences';\n\nexport type FieldKeys =\n | 'numberOfAcademicStaff'\n | 'numberOfAcademicStaffOfInternationalOrOverseasOrigin'\n | 'numberOfResearchStaff'\n | 'totalNumberOfStudents'\n | 'totalNumberOfStudentsOfInternationalOrOverseasOrigin'\n | 'totalNumberOfOutboundExchangeStudents'\n | 'percentileFieldWeightedCitationImpact'\n | 'influenceOfPublications'\n | 'numberOfPatentsCitingResearch'\n | 'numberOfPublicationsInTheTop10Percentile'\n | 'numberOfUndergraduateDegreesAwarded'\n | 'numberOfDoctoratesAwarded'\n | 'numberOfResearchDoctoratesAwarded'\n | 'numberOfProfessionalDoctoratesAwarded'\n | 'totalInstitutionalIncome'\n | 'researchIncome'\n | 'researchIncomeFromIndustryAndCommerce'\n | 'researchVotes'\n | 'teachingVotes'\n | 'totalPublications'\n | 'citationScoreCnNormalised'\n | 'citationScoreNormalised'\n | 'internationalPublications';\n\nexport const subjects: Subject[] = [\n 'Overall',\n 'Arts and Humanities',\n 'Business and Economics',\n 'Clinical and Health',\n 'Computer Science',\n 'Education',\n 'Engineering',\n 'Law',\n 'Life Sciences',\n 'Physical Sciences',\n 'Psychology',\n 'Social Sciences',\n];\n\nexport const subjectsMap = {\n overall: 'Overall',\n artsAndHumanities: 'Arts and Humanities',\n businessAndEconomics: 'Business and Economics',\n clinicalAndHealth: 'Clinical and Health',\n computerScience: 'Computer Science',\n education: 'Education',\n engineering: 'Engineering',\n law: 'Law',\n lifeSciences: 'Life Sciences',\n physicalSciences: 'Physical Sciences',\n psychology: 'Psychology',\n socialSciences: 'Social Sciences',\n};\n\nexport const measuresMap = {\n numberOfAcademicStaff: 'Number of academic staff (FTE)',\n numberOfAcademicStaffOfInternationalOrOverseasOrigin:\n 'Number of academic staff of international/overseas origin (FTE)',\n numberOfResearchStaff: 'Number of research staff (FTE)',\n totalNumberOfStudents: 'Total number of students (FTE)',\n totalNumberOfStudentsOfInternationalOrOverseasOrigin:\n 'Number of students of international/overseas origin (FTE)',\n totalNumberOfOutboundExchangeStudents: 'Number of outbound exchange students',\n percentileFieldWeightedCitationImpact:\n '75岬検 Percentile Field Weighted Citation Impact',\n influenceOfPublications: 'Influence of publications',\n numberOfPatentsCitingResearch: 'Number of patents citing your research',\n numberOfPublicationsInTheTop10Percentile:\n 'Number of publications in the top 10 percentile',\n numberOfUndergraduateDegreesAwarded:\n 'Number of Undergraduate Degrees awarded',\n numberOfDoctoratesAwarded: 'Number of Doctorates awarded',\n numberOfResearchDoctoratesAwarded: 'Number of research Doctorates awarded',\n numberOfProfessionalDoctoratesAwarded:\n 'Number of professional Doctorates awarded',\n totalInstitutionalIncome: 'Total institutional income',\n researchIncome: 'Research income',\n researchIncomeFromIndustryAndCommerce:\n 'Research income from industry and commerce',\n researchVotes: 'Research Votes',\n teachingVotes: 'Teaching Votes',\n totalPublications: 'Total number of publications',\n citationScoreCnNormalised:\n 'Field Weighted Citation Impact (country normalised)',\n citationScoreNormalised: 'Field Weighted Citation Impact (normalised)',\n internationalPublications: 'Internationally co-authored publications',\n};\n\nexport const subjectIds = subjects.map((name) => camelize(name)) as SubjectId[];\n\nexport const formFieldsWur2 = [\n 'numberOfAcademicStaff',\n 'numberOfAcademicStaffOfInternationalOrOverseasOrigin',\n 'numberOfResearchStaff',\n 'totalNumberOfStudents',\n 'totalNumberOfStudentsOfInternationalOrOverseasOrigin',\n 'numberOfUndergraduateDegreesAwarded',\n 'numberOfDoctoratesAwarded',\n 'numberOfResearchDoctoratesAwarded',\n 'numberOfProfessionalDoctoratesAwarded',\n 'totalInstitutionalIncome',\n 'researchIncome',\n 'researchIncomeFromIndustryAndCommerce',\n 'researchVotes',\n 'teachingVotes',\n 'totalPublications',\n 'citationScoreCnNormalised',\n 'citationScoreNormalised',\n 'internationalPublications',\n];\n\nexport const formFieldsWur3 = [\n ...formFieldsWur2,\n 'totalNumberOfOutboundExchangeStudents',\n 'percentileFieldWeightedCitationImpact',\n 'influenceOfPublications',\n 'numberOfPatentsCitingResearch',\n 'numberOfPublicationsInTheTop10Percentile',\n];\n\nexport const fieldsMeta: {\n [key in FieldKeys]: {\n overall?: {\n mandatory?: boolean;\n ignored?: boolean;\n maxValue?: boolean;\n };\n subject?: {\n mandatory?: boolean;\n ignored?: boolean;\n maxValue?: boolean;\n };\n };\n} = {\n numberOfAcademicStaff: {\n overall: { mandatory: true },\n subject: { mandatory: true, maxValue: true },\n },\n numberOfAcademicStaffOfInternationalOrOverseasOrigin: {\n overall: { mandatory: true, maxValue: true },\n subject: { mandatory: false, maxValue: true },\n },\n numberOfResearchStaff: {\n overall: { mandatory: true, maxValue: true },\n subject: { mandatory: true, maxValue: true },\n },\n totalNumberOfStudents: {\n overall: { mandatory: true, maxValue: true },\n subject: { mandatory: false, maxValue: true },\n },\n totalNumberOfStudentsOfInternationalOrOverseasOrigin: {\n overall: { mandatory: true, maxValue: true },\n subject: { mandatory: false, maxValue: true },\n },\n totalNumberOfOutboundExchangeStudents: {\n overall: { mandatory: true, maxValue: true },\n subject: { mandatory: true, maxValue: true },\n },\n percentileFieldWeightedCitationImpact: {\n overall: { mandatory: true, maxValue: true },\n subject: { mandatory: true, maxValue: true },\n },\n influenceOfPublications: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: true },\n },\n numberOfPatentsCitingResearch: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: true },\n },\n numberOfPublicationsInTheTop10Percentile: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: true },\n },\n numberOfUndergraduateDegreesAwarded: {\n overall: { mandatory: true },\n subject: { mandatory: false },\n },\n numberOfDoctoratesAwarded: {\n overall: { mandatory: true },\n subject: { mandatory: true },\n },\n numberOfResearchDoctoratesAwarded: {\n overall: { mandatory: true },\n subject: { mandatory: true },\n },\n numberOfProfessionalDoctoratesAwarded: {\n overall: { mandatory: true },\n subject: { mandatory: true },\n },\n totalInstitutionalIncome: {\n overall: { mandatory: true },\n subject: { mandatory: false },\n },\n researchIncome: {\n overall: { mandatory: true },\n subject: { mandatory: true },\n },\n researchIncomeFromIndustryAndCommerce: {\n overall: { mandatory: true },\n subject: { mandatory: false },\n },\n researchVotes: {\n overall: { mandatory: false },\n subject: { mandatory: false, ignored: true },\n },\n teachingVotes: {\n overall: { mandatory: false },\n subject: { mandatory: false, ignored: true },\n },\n totalPublications: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false },\n },\n citationScoreCnNormalised: {\n overall: { mandatory: false },\n subject: { mandatory: false, ignored: true },\n },\n citationScoreNormalised: {\n overall: { mandatory: false },\n subject: { mandatory: false, ignored: true },\n },\n internationalPublications: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false },\n },\n};\n\nexport const wurReportersFieldsMeta: {\n [key in FieldKeys]: {\n overall?: {\n mandatory?: boolean;\n ignored?: boolean;\n maxValue?: number;\n };\n subject?: {\n mandatory?: boolean;\n ignored?: boolean;\n maxValue?: number;\n };\n };\n} = {\n numberOfAcademicStaff: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n numberOfAcademicStaffOfInternationalOrOverseasOrigin: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n numberOfResearchStaff: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n totalNumberOfStudents: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n totalNumberOfStudentsOfInternationalOrOverseasOrigin: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n totalNumberOfOutboundExchangeStudents: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n percentileFieldWeightedCitationImpact: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n influenceOfPublications: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n numberOfPatentsCitingResearch: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n numberOfPublicationsInTheTop10Percentile: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n numberOfUndergraduateDegreesAwarded: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n numberOfDoctoratesAwarded: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n numberOfResearchDoctoratesAwarded: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n numberOfProfessionalDoctoratesAwarded: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n totalInstitutionalIncome: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n researchIncome: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n researchIncomeFromIndustryAndCommerce: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n researchVotes: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n teachingVotes: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n totalPublications: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n citationScoreCnNormalised: {\n overall: { mandatory: false, ignored: true, maxValue: 100 },\n subject: { mandatory: false, ignored: true, maxValue: 100 },\n },\n citationScoreNormalised: {\n overall: { mandatory: false, ignored: true, maxValue: 100 },\n subject: { mandatory: false, ignored: true, maxValue: 100 },\n },\n internationalPublications: {\n overall: { mandatory: false, ignored: true },\n subject: { mandatory: false, ignored: true },\n },\n};\n\nexport const mandatoryOverallFields = [\n 'numberOfAcademicStaff',\n 'numberOfAcademicStaffOfInternationalOrOverseasOrigin',\n 'numberOfResearchStaff',\n 'totalNumberOfStudents',\n 'totalNumberOfStudentsOfInternationalOrOverseasOrigin',\n 'totalNumberOfOutboundExchangeStudents',\n 'percentileFieldWeightedCitationImpact',\n 'influenceOfPublications',\n 'numberOfPatentsCitingResearch',\n 'numberOfPublicationsInTheTop10Percentile',\n 'numberOfUndergraduateDegreesAwarded',\n 'numberOfDoctoratesAwarded',\n 'numberOfResearchDoctoratesAwarded',\n 'numberOfProfessionalDoctoratesAwarded',\n 'totalInstitutionalIncome',\n 'researchIncome',\n 'researchIncomeFromIndustryAndCommerce',\n];\n\nexport const mandatorySubjectFields = [\n 'numberOfAcademicStaff',\n 'numberOfResearchStaff',\n 'numberOfDoctoratesAwarded',\n 'numberOfResearchDoctoratesAwarded',\n 'numberOfProfessionalDoctoratesAwarded',\n 'researchIncome',\n];\n\nexport type SubjectFields = {\n [key in FieldKeys]?: string | number;\n} & {\n applicable?: boolean;\n missingFields?: number;\n};\n\nexport type ErrorFields = {\n [key in FieldKeys]?: string;\n} & {\n missingFields?: string;\n};\n\nexport type FormErrors = {\n [key in SubjectId]?: ErrorFields;\n} & {\n applicable?: string;\n name?: string;\n methodology?: string;\n};\n\nexport type Values = { [key in SubjectId]: SubjectFields };\nexport type FormValues = {\n name: string;\n methodology: string;\n} & Values;\n\ntype ScenarioParametersTableRow = {\n subject: string;\n measure: string;\n from: number | string;\n to: number | string;\n};\n\nexport const scenarioValidator = (values: Values) => {\n const errors: FormErrors = {};\n\n let hasApplicableSubject: boolean = false;\n\n Object.entries(values)\n .filter(([, value]) => {\n if (typeof value === 'string') {\n return true;\n }\n return value.applicable;\n })\n .forEach(([key, value]) => {\n switch (key) {\n case 'name':\n case 'methodology':\n if (!value) {\n errors[key] = 'Invalid field';\n }\n break;\n\n default: {\n const subject = key as SubjectId;\n let errorMsg: string;\n let fieldKey: string;\n let subjectMissingFields: number = 0;\n\n // Initialise subject object\n errors[subject] = {};\n\n Object.entries(value)\n .filter(([innerKey]) => innerKey !== 'applicable')\n .forEach(([innerKey, innerValue]) => {\n const missingValue =\n innerValue === '' || innerValue === undefined;\n const fieldMeta =\n wurReportersFieldsMeta[innerKey as FieldKeys][\n key === 'overall' ? key : 'subject'\n ];\n\n if (missingValue && fieldMeta?.mandatory) {\n subjectMissingFields += 1;\n }\n\n if (\n fieldMeta?.maxValue &&\n innerValue &&\n Number(innerValue) > fieldMeta?.maxValue\n ) {\n fieldKey = innerKey;\n errorMsg = `Number can not be greater than ${fieldMeta?.maxValue}`;\n }\n\n if (innerValue && Number(innerValue) < 0) {\n fieldKey = innerKey;\n errorMsg = `Number can not be less than 0`;\n }\n\n if (errorMsg) {\n // @ts-ignore\n errors[subject][fieldKey] = errorMsg;\n }\n });\n\n if (subjectMissingFields >= 3) {\n // @ts-ignore\n errors[subject].missingFields = 'Too many missing fields';\n }\n if (subject !== 'overall' && value.applicable) {\n hasApplicableSubject = true;\n }\n\n break;\n }\n }\n });\n\n if (!hasApplicableSubject) {\n errors.applicable = 'At least one subject should be selected with Overall';\n }\n\n // Filter out subjects without errors\n return Object.entries(errors).reduce((acc, [key, value]) => {\n if (typeof value === 'string' || !isEmpty(value)) {\n return { ...acc, [key]: value };\n }\n return acc;\n }, {});\n};\n\nexport const initialValues = subjectIds.reduce(\n (acc, s) => ({\n ...acc,\n [s as SubjectId]: {\n applicable: s === 'overall',\n numberOfAcademicStaff: undefined,\n numberOfAcademicStaffOfInternationalOrOverseasOrigin: undefined,\n numberOfResearchStaff: undefined,\n totalNumberOfStudents: undefined,\n totalNumberOfStudentsOfInternationalOrOverseasOrigin: undefined,\n totalNumberOfOutboundExchangeStudents: undefined,\n percentileFieldWeightedCitationImpact: undefined,\n influenceOfPublications: undefined,\n numberOfPatentsCitingResearch: undefined,\n numberOfPublicationsInTheTop10Percentile: undefined,\n numberOfUndergraduateDegreesAwarded: undefined,\n numberOfDoctoratesAwarded: undefined,\n numberOfResearchDoctoratesAwarded: undefined,\n numberOfProfessionalDoctoratesAwarded: undefined,\n totalInstitutionalIncome: undefined,\n researchIncome: undefined,\n researchIncomeFromIndustryAndCommerce: undefined,\n researchVotes: undefined,\n teachingVotes: undefined,\n totalPublications: undefined,\n citationScoreCnNormalised: undefined,\n citationScoreNormalised: undefined,\n internationalPublications: undefined,\n },\n }),\n { name: 'New name', methodology: 'wur2003' } as FormValues,\n);\n\nexport const initialErrors = {\n applicable: 'At least one subject should be selected with Overall',\n Overall: {\n missingFields: 'Too many missing fields',\n },\n} as FormErrors;\n\nexport const subjectIdToLabel = (subjectId: SubjectId) =>\n subjectsMap[subjectId];\n\nexport const formatInputObject = (\n input: FormValues | ScenarioData,\n isWurReporterInterim?: boolean,\n) =>\n Object.entries(input).reduce((acc, [key, value]) => {\n if (key === '__typename') {\n return acc;\n }\n\n if (typeof value === 'string') {\n return { ...acc, [key]: value };\n }\n\n const updatedValue = { ...value };\n\n if (isWurReporterInterim && typeof value === 'object') {\n Object.keys(value).forEach((currentKey) => {\n updatedValue[currentKey] =\n updatedValue[currentKey] === '' ? null : updatedValue[currentKey];\n });\n }\n\n const formattedValues = omit(['__typename'], updatedValue);\n\n return { ...acc, [key]: formattedValues };\n }, {} as FormValues);\n\nexport const getScenarioParametersTableData = (\n scenarioData: ScenarioDataType,\n submissionData: SubmissionDataType,\n scenarioMethodologyYear: number,\n) => {\n const tableData: ScenarioParametersTableRow[] = [];\n\n Object.keys(scenarioData)\n .filter(\n (key: string) =>\n subjectsMap[key as keyof typeof subjectsMap] &&\n scenarioData[key].applicable === true,\n )\n .forEach((subject: string) => {\n Object.keys(scenarioData[subject])\n .filter((key: string) =>\n (scenarioMethodologyYear > 2023\n ? formFieldsWur3\n : formFieldsWur2\n ).includes(key),\n )\n .forEach((measure) => {\n tableData.push({\n subject: subjectIdToLabel(subject as SubjectId),\n measure: measuresMap[measure as keyof typeof measuresMap],\n from:\n roundNumber(submissionData?.[subject]?.[measure], 2) ||\n 'Unavailable',\n to: roundNumber(scenarioData[subject][measure], 2) || 'Unavailable',\n });\n });\n });\n return tableData;\n};\n\nexport const getWUR20MetricsExplanation = [\n {\n metric: 'Doctorates awarded to bachelors degrees awarded',\n explanation:\n 'This is about the relative intensity of advanced education. Institutions with a high density of research students compared to the rest of the student body are likely more knowledge-intensive.',\n },\n {\n metric: 'Doctorates awarded to academic staff',\n explanation:\n 'As well as giving a sense of how committed an institution is to nurturing the next generation of academics, a high proportion of postgraduate research students also suggests the provision of teaching at the highest level that is thus attractive to graduates and effective at developing them.',\n },\n {\n metric: 'Teaching reputation',\n explanation:\n 'This metric examines the perceived prestige of teaching at the university. Calculated from the votes received by the Academic Reputation Survey, weighted by subject and country to be representative of the distribution of academics globally.',\n },\n {\n metric: 'Institutional income to academic staff',\n explanation:\n 'The total income per staff (PPP adjusted) is an indicator of the environment and status of an institution, giving a broad sense of the infrastructure and facilities available to students and staff.',\n },\n {\n metric: 'Students to academic staff ratio',\n explanation:\n 'This is an indication of how many resources are dedicated to each student in terms of staffing.',\n },\n {\n metric: 'Publications per staff',\n explanation:\n 'Publication output per head is a measure of the productivity of the institution, giving a sense of the institution鈥檚 ability to get papers published in quality peer-reviewed journals.',\n },\n {\n metric: 'Research income to academic staff',\n explanation:\n 'The ability of a university to acquire funding for research is an indication of how competitive they are. This is a somewhat controversial indicator because it can be influenced by national policy and economic circumstances. Income is crucial to the development of world-class research, and because much of it is subject to competition and judged by peer review, our experts suggested that it was a valid measure.',\n },\n {\n metric: 'Research Reputation',\n explanation:\n 'This metric examines the perceived prestige of research at the university. Calculated from the votes received by the Academic Reputation Survey, weighted by subject and country to be representative of the distribution of academics globally.',\n },\n {\n metric: 'Citations',\n explanation:\n 'Our research influence indicator looks at universities鈥 role in spreading new knowledge and ideas. We examine research influence by capturing the average number of times a university鈥檚 published work is cited by scholars globally. The data is normalised by Elsevier to reflect variations in citation volume between different subject areas. This means that institutions with high levels of research activity in subjects with traditionally high citation counts do not gain an unfair advantage',\n },\n {\n metric: 'Industry income to academic staff',\n explanation:\n 'This metric seeks to capture knowledge-transfer activity. An institution鈥檚 ability to help industry with innovations, inventions and consultancy has become a core mission of the contemporary global academy. This category suggests the extent to which businesses are willing to pay for research and an institution鈥檚 ability to attract funding in the commercial marketplace 鈥 useful indicators of institutional quality.',\n },\n {\n metric: 'Proportion of international academic staff',\n explanation:\n 'This metric captures the proportion of international academic staff on campus. International staff are those whose nationality differs from the country where the institution is based.',\n },\n {\n metric: 'International co-authorship',\n explanation:\n 'In the third international indicator, we calculate the proportion of an institution鈥檚 total research journal publications that have at least one international co-author. The ability to attract international co-authors as an indicator of quality.',\n },\n {\n metric: 'Proportion of international students',\n explanation:\n 'This metric captures the proportion of international students on campus. International students are those whose nationality differs from the country where the institution is based.',\n },\n];\n\nexport const getWUR30MetricsExplanation = [\n {\n metric: 'Teaching Reputation',\n explanation:\n 'It examined the perceived prestige of institutions in teaching. This metric is the total number of votes obtained from the reputation survey from the last two years. Each year is calculated as the number of global teaching votes from respondents of the reputation survey, weighted by subject and country to be representative of the distribution of academics globally. Only non-zero values will be standardised using a logarithmic function, and universities that received no votes are scored a zero for this metric.',\n },\n {\n metric: 'Student Staff Ratio',\n explanation:\n 'The student staff ratio is defined as total full time equivalent (FTE) number of staff employed in an academic post divided by FTE number of students in all years and of all programmes that lead to a degree, certificate, university credit or other qualification. This variable is normalised after calculation.',\n },\n {\n metric: 'Doctorate Bachelor Ratio',\n explanation:\n 'This metric is generated by dividing the total number of doctorates awarded by the total number of undergraduate degrees awarded. This variable is normalised after calculation.',\n },\n {\n metric: 'Doctorate Staff Ratio',\n explanation:\n 'As well as giving a sense of how committed an institution is to nurturing the next generation of academics, a high proportion of postgraduate research students also suggests the provision of teaching at the highest level that is thus attractive to graduates and effective at developing them. This metric is generated by dividing the total subject weighted doctorates, by the total subject weighted number of academic staff. This metric takes into account an institution鈥檚 unique subject mix, reflecting that the volume of doctoral awards varies by discipline. This variable is normalised after calculation.',\n },\n {\n metric: 'Institutional Income',\n explanation:\n 'This measure of income indicates an institution鈥檚 general status and gives a broad sense of the infrastructure and facilities available to students and staff. This metric is generated by dividing the institutional income adjusted to PPP, by the total number of academic staff. This variable is normalised after calculation.',\n },\n {\n metric: 'Research Reputation ',\n explanation:\n 'It examined the perceived prestige of institutions in research. This metric is the total number of votes obtained from the reputation survey from the last two years. Each year is calculated as the number of global research votes from respondents of the reputation survey, weighted by subject and country to be representative of the distribution of academics globally. Only non-zero values will be standardised using a logarithmic function, and universities that received no votes are scored a zero for this metric.',\n },\n {\n metric: 'Research Income',\n explanation:\n 'This metric is generated by dividing the total subject weighted research income adjusted for PPP, by the total subject weighted number of academic staff and is normalised after calculation. This is a somewhat controversial indicator because it can be influenced by national policy and economic circumstances. Income is crucial to the development of world-class research, and because much of it is subject to competition and judged by peer review, our experts suggested that it was a valid measure. This indicator takes account of each institution鈥檚 distinct subject profile, reflecting the fact that research grants in science subjects are often bigger than those awarded for the highest-quality social science, arts and humanities research.',\n },\n {\n metric: 'Research Productivity ',\n explanation:\n 'This metric is generated by dividing the total subject weighted number of papers published in the academic journals indexed by Elsevier鈥檚 Scopus database per scholar, divided by the sum of the total subject weighted number of FTE research staff and FTE academic staff. This metric is normalised after calculation. The indicator gives a sense of the institution鈥檚 ability to get papers published in quality peer-reviewed journals.',\n },\n {\n metric: 'Citation Impact',\n explanation:\n 'Our research influence metric looks at universities鈥 role in spreading new knowledge and ideas. We examine research influence by capturing the average number of times a university鈥檚 published work is cited by scholars globally. We look at the academic journals indexed by Elsevier鈥檚 Scopus database and all indexed publications from a five-year window. Citations to these publications are also collected. The data is normalised by Elsevier to reflect variations in citation volume between different subject areas. This means that institutions with high levels of research activity in subjects with traditionally high citation counts do not gain an unfair advantage. We have blended equal measures of a country-adjusted and non-country-adjusted raw measure of citations scores.',\n },\n {\n metric: 'Research Strength',\n explanation:\n 'Our research strength metric measures the representative research quality based on the FWCI, but without being skewed by papers with an exceptionally high FWCI. It captures the 75th percentile of the Field-Weighted Citation Impact (FWCI) of all papers published by a university. We look at all Scopus-indexed publications from a five-year window. ',\n },\n {\n metric: 'Research Excellence',\n explanation:\n 'This metric recognises the institution鈥檚 contribution to the best research in each subject and overall鈥. Excellence is measured by capturing the total number of publications by an institution that are among the top 10% of publications worldwide by FWCI. We adjust this number by year, subject, and the total number of academic and research staff.',\n },\n {\n metric: 'Research Influence',\n explanation:\n 'This metric analyses the influence of an entity鈥檚 publications by analysing their corresponding citations. The importance of a publication is determined based on the importance of other papers citing it. We adjust this number by year, subject, and the total number of academic and research staff.',\n },\n {\n metric: 'Industry Income',\n explanation:\n 'An institution鈥檚 ability to help industry with innovations, inventions and consultancy has become a core mission of the contemporary global academy. This category suggests the extent to which businesses are willing to pay for research and an institution鈥檚 ability to attract funding in the commercial marketplace 鈥 useful indicators of institutional quality. The indicator seeks to capture such knowledge-transfer activity by looking at how much research income an institution earns from industry (adjusted for PPP), divided by the total number of FTE academic staff it employs. This variable is normalised after calculation.',\n },\n {\n metric: 'Patents',\n explanation:\n 'This metric recognises the extent to which universities are supporting their national economies through technology transfer. It measures the count of patents citing an entity鈥檚 published research. This measure is subject weighted to avoid penalising universities producing research in fields low in patents. We also normalise this by the sum of academic and research staff.',\n },\n {\n metric: 'International Students',\n explanation:\n 'This metric captures the proportion of international students on campus. International students are those whose nationality differs from the country where the institution is based. The metric is calculated as the total FTE number of international students divided by the total FTE number of students. This variable is normalised to account for the country population鈥檚 size.',\n },\n {\n metric: 'International Staff',\n explanation:\n 'This metric captures the proportion of international academic staff on campus. International staff are those whose nationality differs from the country where the institution is based. The metric is calculated as the total FTE number of international academic staff divided by the total FTE number of academic staff. This variable is normalised to account for the country population鈥檚 size.',\n },\n {\n metric: 'International Co-authorship',\n explanation:\n 'In the third international indicator, we calculate the proportion of an institution鈥檚 total research journal publications that have at least one international co-author. The metric is generated by dividing the total subject weighted number of publications with at least one international co-author by the total subjected weighted number of publications. This accounts for an institution鈥檚 subject mix. This variable is normalised to account for the country population鈥檚 size.',\n },\n {\n metric: 'Studying Abroad',\n explanation:\n 'Based on the number of outbound exchange students, this metric assesses international student mobility. The headcount number of exchange students going abroad is divided by the total FTE number of students. This metric is subject-weighted and adjusted by the country鈥檚 population. It has a zero weight for the 2024 ranking calculation.',\n },\n];\n\nexport const wur20Columns = [\n {\n Header: 'Doctorates to academic staff',\n accessor: 'doctoratesToAcademicStaff',\n },\n {\n Header: 'Doctorates to bachelor鈥檚 degrees awarded',\n accessor: 'doctoratesToBachelorsDegreesAwarded',\n },\n {\n Header: 'Teaching Reputation',\n accessor: 'teachingReputation',\n },\n {\n Header: 'Income to academic staff',\n accessor: 'incomeToAcademicStaff',\n },\n {\n Header: 'Students to academic staff ratio',\n accessor: 'studentsToAcademicStaffRatio',\n },\n {\n Header: 'Publications per academic staff',\n accessor: 'publicationsPerAcademicStaff',\n },\n {\n Header: 'Research income to academic staff',\n accessor: 'researchIncomeToAcademicStaff',\n },\n {\n Header: 'Research reputation',\n accessor: 'researchReputation',\n },\n {\n Header: 'Citations',\n accessor: 'citations',\n },\n {\n Header: 'Industry income to academic staff',\n accessor: 'industryIncomeToAcademicStaff',\n },\n {\n Header: 'Proportion of international academic staff',\n accessor: 'proportionOfInternationalAcademicStaff',\n },\n {\n Header: 'International co-authorship',\n accessor: 'internationalCoAuthorship',\n },\n {\n Header: 'Proportion of international students',\n accessor: 'proportionOfInternationalStudents',\n },\n];\n\nexport const wur30Columns = [\n {\n Header: 'Teaching reputation',\n accessor: 'teachingReputation',\n },\n {\n Header: 'Student staff ratio',\n accessor: 'studentStaffRatio',\n },\n {\n Header: 'Doctorate bachelor ratio',\n accessor: 'doctoratBbachelorRatio',\n },\n {\n Header: 'Doctorate staff ratio',\n accessor: 'doctorateStaffRatio',\n },\n {\n Header: 'Institutional income',\n accessor: 'institutionalIncome',\n },\n {\n Header: 'Research reputation',\n accessor: 'researchReputation',\n },\n {\n Header: 'Research income',\n accessor: 'researchIncome',\n },\n {\n Header: 'Research productivity',\n accessor: 'researchProductivity',\n },\n {\n Header: 'Citation Impact',\n accessor: 'citationImpact',\n },\n {\n Header: 'Research strength',\n accessor: 'researchStrength',\n },\n {\n Header: 'Research excellence',\n accessor: 'researchExcellence',\n },\n {\n Header: 'Research influence',\n accessor: 'researchInfluence',\n },\n {\n Header: 'Industry income',\n accessor: 'industryIncome',\n },\n {\n Header: 'Patents',\n accessor: 'patents',\n },\n {\n Header: 'International students',\n accessor: 'internationalStudents',\n },\n {\n Header: 'International staff',\n accessor: 'internationalStaff',\n },\n {\n Header: 'International co-authorship',\n accessor: 'internationalCoAuthorship',\n },\n {\n Header: 'Studying abroad',\n accessor: 'studyingAbroad',\n },\n];\n\nexport const getWUR20MetricsTable = [\n {\n empty: '% weighting',\n doctoratesToAcademicStaff: 6,\n doctoratesToBachelorsDegreesAwarded: 2.25,\n teachingReputation: 15,\n incomeToAcademicStaff: 2.25,\n studentsToAcademicStaffRatio: 4.5,\n publicationsPerAcademicStaff: 6,\n researchIncomeToAcademicStaff: 6,\n researchReputation: 18,\n citations: 30,\n industryIncomeToAcademicStaff: 2.5,\n proportionOfInternationalAcademicStaff: 2.5,\n internationalCoAuthorship: 2.5,\n proportionOfInternationalStudents: 2.5,\n },\n {\n empty: 'Scoring',\n doctoratesToAcademicStaff: 'Z',\n doctoratesToBachelorsDegreesAwarded: 'Z',\n teachingReputation: 'Exp.',\n incomeToAcademicStaff: 'Z',\n studentsToAcademicStaffRatio: 'Z',\n publicationsPerAcademicStaff: 'Z',\n researchIncomeToAcademicStaff: 'Z',\n researchReputation: 'Exp.',\n citations: 'Z',\n industryIncomeToAcademicStaff: 'Z',\n proportionOfInternationalAcademicStaff: 'Z',\n internationalCoAuthorship: 'Z',\n proportionOfInternationalStudents: 'Z',\n },\n {\n empty: 'ppp',\n doctoratesToAcademicStaff: '-',\n doctoratesToBachelorsDegreesAwarded: '-',\n teachingReputation: '-',\n incomeToAcademicStaff: 'Yes',\n studentsToAcademicStaffRatio: '-',\n publicationsPerAcademicStaff: '-',\n researchIncomeToAcademicStaff: 'Yes',\n researchReputation: '-',\n citations: '-',\n industryIncomeToAcademicStaff: 'Yes',\n proportionOfInternationalAcademicStaff: '-',\n internationalCoAuthorship: '-',\n proportionOfInternationalStudents: '-',\n },\n {\n empty: 'Subject weight',\n doctoratesToAcademicStaff: 'Yes',\n doctoratesToBachelorsDegreesAwarded: '-',\n teachingReputation: '-',\n incomeToAcademicStaff: '-',\n studentsToAcademicStaffRatio: '-',\n publicationsPerAcademicStaff: 'Yes',\n researchIncomeToAcademicStaff: 'Yes',\n researchReputation: '-',\n citations: '-',\n industryIncomeToAcademicStaff: '-',\n proportionOfInternationalAcademicStaff: '-',\n internationalCoAuthorship: '-',\n proportionOfInternationalStudents: 'Yes',\n },\n {\n empty: 'Input section',\n doctoratesToAcademicStaff: 'Subject',\n doctoratesToBachelorsDegreesAwarded: 'Overall',\n teachingReputation: 'Overall',\n incomeToAcademicStaff: 'Overall',\n studentsToAcademicStaffRatio: 'Overall',\n publicationsPerAcademicStaff: 'Subject',\n researchIncomeToAcademicStaff: 'Subject',\n researchReputation: 'Overall',\n citations: 'Overall',\n industryIncomeToAcademicStaff: 'Overall',\n proportionOfInternationalAcademicStaff: 'Overall',\n internationalCoAuthorship: 'Overall',\n proportionOfInternationalStudents: 'Subject',\n },\n {\n empty: 'Input data',\n doctoratesToAcademicStaff: 'Degrees: Doctorates awarded',\n doctoratesToBachelorsDegreesAwarded: 'Degrees: Doctorates awarded',\n teachingReputation:\n 'Teaching reputation votes (THE Global Academic Survey)',\n incomeToAcademicStaff: 'Income: Total',\n studentsToAcademicStaffRatio: 'Staff: Academic',\n publicationsPerAcademicStaff: 'Publications: Total (Elsevier鈥檚 Scopus)',\n researchIncomeToAcademicStaff: 'Income: Research',\n researchReputation:\n 'Research reputation votes (THE Global Academic Survey)',\n citations: 'Field weighted citation impact (Elsevier鈥檚 Scopus)',\n industryIncomeToAcademicStaff: 'Income: Research industry and commerce',\n proportionOfInternationalAcademicStaff: 'Staff: International academic',\n internationalCoAuthorship: 'Student: International',\n proportionOfInternationalStudents:\n 'Publications: Internationally co-authored (Elsevier鈥檚 Scopus)',\n },\n {\n empty: 'Input data',\n doctoratesToAcademicStaff: 'Staff: Academic',\n doctoratesToBachelorsDegreesAwarded: 'Degrees: Undergraduate awarded',\n teachingReputation: '-',\n incomeToAcademicStaff: 'Student: Total',\n studentsToAcademicStaffRatio: 'Staff: Academic',\n publicationsPerAcademicStaff: 'Staff Academic',\n researchIncomeToAcademicStaff: 'Staff Academic',\n researchReputation: '-',\n citations: '-',\n industryIncomeToAcademicStaff: 'Staff Academic',\n proportionOfInternationalAcademicStaff: 'Staff Academic',\n internationalCoAuthorship: 'Student: Total',\n proportionOfInternationalStudents:\n 'Publications: Total (Elsevier鈥檚 Scopus)',\n },\n];\n\nexport const getWUR30MetricsTable = [\n {\n empty: 'Pillar',\n teachingReputation: 'Teaching',\n studentStaffRatio: 'Teaching',\n doctoratBbachelorRatio: 'Teaching',\n doctorateStaffRatio: 'Teaching',\n institutionalIncome: 'Teaching',\n researchReputation: 'Research Environment',\n researchIncome: 'Research Environment',\n researchProductivity: 'Research Environment',\n citationImpact: 'Ressearch Quality',\n researchStrength: 'Ressearch Quality',\n researchExcellence: 'Ressearch Quality',\n researchInfluence: 'Ressearch Quality',\n industryIncome: 'Industry',\n patents: 'Industry',\n internationalStudents: 'International',\n internationalStaff: 'International',\n internationalCoAuthorship: 'International',\n studyingAbroad: 'International',\n },\n {\n empty: 'Weight',\n teachingReputation: '15%',\n studentStaffRatio: '4.5%',\n doctoratBbachelorRatio: '2%',\n doctorateStaffRatio: '5.5%',\n institutionalIncome: '2.5%',\n researchReputation: '18%',\n researchIncome: '5.5%',\n researchProductivity: '5.5%',\n citationImpact: '15%',\n researchStrength: '5%',\n researchExcellence: '5%',\n researchInfluence: '5%',\n industryIncome: '2%',\n patents: '2%',\n internationalStudents: '2.5%',\n internationalStaff: '2.5%',\n internationalCoAuthorship: '2.5%',\n studyingAbroad: '0%',\n },\n {\n empty: 'Scoring',\n teachingReputation: 'Exp',\n studentStaffRatio: 'Normal',\n doctoratBbachelorRatio: 'Normal',\n doctorateStaffRatio: 'Normal',\n institutionalIncome: 'Normal',\n researchReputation: 'Exp',\n researchIncome: 'Normal',\n researchProductivity: 'Normal',\n citationImpact: '',\n researchStrength: 'Normal',\n researchExcellence: 'Exp',\n researchInfluence: 'Exp',\n industryIncome: 'Normal',\n patents: 'Exp',\n internationalStudents: 'Normal',\n internationalStaff: 'Normal',\n internationalCoAuthorship: 'Normal',\n studyingAbroad: 'Normal',\n },\n {\n empty: 'PPP',\n teachingReputation: '',\n studentStaffRatio: '',\n doctoratBbachelorRatio: '',\n doctorateStaffRatio: '',\n institutionalIncome: 'Yes',\n researchReputation: '',\n researchIncome: 'Yes',\n researchProductivity: '',\n citationImpact: '',\n researchStrength: '',\n researchExcellence: '',\n researchInfluence: '',\n industryIncome: 'Yes',\n patents: '',\n internationalStudents: '',\n internationalStaff: '',\n internationalCoAuthorship: '',\n studyingAbroad: '',\n },\n {\n empty: 'Input data',\n teachingReputation: 'Teaching votes',\n studentStaffRatio: `Total academic staff\n students total`,\n doctoratBbachelorRatio: `Doctorates awarded\n Undergraduate degrees awarded`,\n doctorateStaffRatio: `Doctorates awarded\n Total academic staff`,\n institutionalIncome: `Total institutional income\n Total academic staff`,\n researchReputation: 'Research votes',\n researchIncome: `Total research income\n Total academic staff`,\n researchProductivity: `Total publications\n Total academic staff\n Total research staff`,\n citationImpact: `Citation score\n Country normalised citation score`,\n researchStrength: '75th Percentile field weighted citation impact',\n researchExcellence: `Top papers\n Total academic staff\n Total research staff`,\n researchInfluence: `Pagerank\n Total academic staff\n Total research staff`,\n industryIncome: `Research income from industry and commerce\n Total academic staff`,\n patents: `Patents\n Total academic staff\n Total research staff`,\n internationalStudents: `International students\n Total students`,\n internationalStaff: `international academic staff\n Total academic staff`,\n internationalCoAuthorship: `International publications\n Total publications`,\n studyingAbroad: `Students on outbound exchange\n Total students`,\n },\n {\n empty: 'Input Section',\n teachingReputation: 'Overall',\n studentStaffRatio: 'Overall',\n doctoratBbachelorRatio: 'Overall',\n doctorateStaffRatio: 'Subject',\n institutionalIncome: 'Overall',\n researchReputation: 'Overall',\n researchIncome: 'Subject',\n researchProductivity: 'Subject',\n citationImpact: 'Overall',\n researchStrength: 'Overall',\n researchExcellence: 'Subject',\n researchInfluence: 'Subject',\n industryIncome: 'Overall',\n patents: 'Subject',\n internationalStudents: 'Overall',\n internationalStaff: 'Overall',\n internationalCoAuthorship: 'Subject',\n studyingAbroad: 'Subject',\n },\n];\n\nexport type Scenario =\n | {\n scenarioId: string;\n name: string;\n methodology: string;\n createdAt: string;\n updatedAt: string;\n alexanderJson: any;\n }[]\n | undefined;\n\nexport const aggregateLabels = [\n { label: 'Top*', aggregateKey: 'max' },\n { label: '75%', aggregateKey: 'upperQuartile' },\n { label: 'Median', aggregateKey: 'median' },\n { label: '25%', aggregateKey: 'lowerQuartile' },\n { label: 'Bottom*', aggregateKey: 'min' },\n];\n\nexport const getIsWurReporterInterimPage = () =>\n window.location.href.includes('wur-reporter-interim');\n\nexport const getIsRankedUniversity = (data: any[]) =>\n data.reduce((prev, curr) => prev || curr.result !== null, false);\n\nexport const defineMethodology = (methodologyYear: number = 2023) =>\n `WUR ${methodologyYear === 2023 ? 2 : 3}.0 - ${methodologyYear}`;\n\nexport const getNormalizeDataSubmission = (data: SubmissionWur2Query) => {\n const { submission } = data;\n\n if (!submission) {\n return initialValues;\n }\n const omitSubmission = omit(\n ['institutionId', '__typename', 'year', 'id'],\n submission,\n );\n\n const submissionWithoutTypenameWithUndefinedFields = Object.entries(\n omitSubmission,\n ).reduce((acc, [key, value]) => {\n const omitValue: Omit = omit(\n ['__typename'],\n value,\n );\n Object.entries(omitValue).forEach(([position, count]) => {\n const result =\n omitValue[position as keyof typeof omitValue] === null\n ? (omitValue[position as keyof typeof omitValue] = undefined)\n : // @ts-ignore\n (omitValue[position] = count);\n return result;\n });\n return { ...acc, [key]: omit(['__typename'], omitValue) };\n }, {});\n\n return {\n ...initialValues,\n ...submissionWithoutTypenameWithUndefinedFields,\n };\n};\n\nexport const getScenarioMethodologyYear = (\n methodology: string = 'WUR 2.0 - 2023',\n) => Number(methodology.slice(-4));\n","import { gql } from '@apollo/client';\n\nconst requiredCommonFieldsWur2 = `\n numberOfAcademicStaff\n numberOfAcademicStaffOfInternationalOrOverseasOrigin\n numberOfResearchStaff\n totalNumberOfStudents\n totalNumberOfStudentsOfInternationalOrOverseasOrigin\n numberOfUndergraduateDegreesAwarded\n numberOfDoctoratesAwarded\n numberOfResearchDoctoratesAwarded\n numberOfProfessionalDoctoratesAwarded\n totalInstitutionalIncome\n researchIncome\n researchIncomeFromIndustryAndCommerce\n totalPublications\n internationalPublications\n researchVotes\n teachingVotes\n citationScoreCnNormalised\n citationScoreNormalised\n`;\n\nconst requiredCommonFieldsWur3 = `\n ${requiredCommonFieldsWur2}\n totalNumberOfOutboundExchangeStudents\n percentileFieldWeightedCitationImpact\n numberOfPublicationsInTheTop10Percentile\n influenceOfPublications\n numberOfPatentsCitingResearch\n`;\nexport const getSubmissionQueryWur2 = gql`\n query SubmissionWur2($institutionId: String!, $year: Int!) {\n institution(institutionId: $institutionId) {\n currency\n }\n submission(institutionId: $institutionId, year: $year) {\n institutionId\n year\n overall {\n applicable\n ${requiredCommonFieldsWur2}\n }\n artsAndHumanities {\n applicable\n ${requiredCommonFieldsWur2}\n }\n businessAndEconomics {\n applicable\n ${requiredCommonFieldsWur2}\n }\n clinicalAndHealth {\n applicable\n ${requiredCommonFieldsWur2}\n }\n computerScience {\n applicable\n ${requiredCommonFieldsWur2}\n }\n education {\n applicable\n ${requiredCommonFieldsWur2}\n }\n engineering {\n applicable\n ${requiredCommonFieldsWur2}\n }\n law {\n applicable\n ${requiredCommonFieldsWur2}\n }\n lifeSciences {\n applicable\n ${requiredCommonFieldsWur2}\n }\n physicalSciences {\n applicable\n ${requiredCommonFieldsWur2}\n }\n psychology {\n applicable\n ${requiredCommonFieldsWur2}\n }\n socialSciences {\n applicable\n ${requiredCommonFieldsWur2}\n }\n }\n }\n`;\n\nexport const getSubmissionQueryWur3 = gql`\n query SubmissionWur3($institutionId: String!, $year: Int!) {\n institution(institutionId: $institutionId) {\n currency\n }\n submission(institutionId: $institutionId, year: $year) {\n institutionId\n year\n overall {\n applicable\n ${requiredCommonFieldsWur3}\n }\n artsAndHumanities {\n applicable\n ${requiredCommonFieldsWur3}\n }\n businessAndEconomics {\n applicable\n ${requiredCommonFieldsWur3}\n }\n clinicalAndHealth {\n applicable\n ${requiredCommonFieldsWur3}\n }\n computerScience {\n applicable\n ${requiredCommonFieldsWur3}\n }\n education {\n applicable\n ${requiredCommonFieldsWur3}\n }\n engineering {\n applicable\n ${requiredCommonFieldsWur3}\n }\n law {\n applicable\n ${requiredCommonFieldsWur3}\n }\n lifeSciences {\n applicable\n ${requiredCommonFieldsWur3}\n }\n physicalSciences {\n applicable\n ${requiredCommonFieldsWur3}\n }\n psychology {\n applicable\n ${requiredCommonFieldsWur3}\n }\n socialSciences {\n applicable\n ${requiredCommonFieldsWur3}\n }\n }\n }\n`;\n\nexport const submissionQueryVariables = (\n institutionId: string,\n year: number,\n) => ({\n variables: {\n institutionId,\n year,\n },\n});\n","import React, { createContext, useCallback, useContext, useState } from 'react';\nimport { useQuery, gql } from '@apollo/client';\nimport { useParams } from '@reach/router';\nimport { camelCase } from 'change-case';\nimport { useFlags } from 'launchdarkly-react-client-sdk';\nimport { useInstitution } from '#core/Institution';\nimport {\n ScenarioQuery,\n GetWurRatingAndScoreQuery,\n SubmissionWur2Query,\n SubmissionWur3Query,\n WurReporterInterimScenarioQuery,\n} from '#types/generated/graphql';\nimport { Peer } from '#core/PageQuery';\nimport { useSessionStorage } from '#hooks/useSessionStorage';\nimport { usePermissions } from '#core/Permissions';\nimport {\n getSubmissionQueryWur2,\n getSubmissionQueryWur3,\n} from '../../createScenario/submissionQuery';\nimport {\n LevelDefinitionsObjectType,\n getScenarioMethodologyYear,\n} from '../../utils';\nimport {\n getScenarioQuery,\n getWurReporterInterimScenarioQuery,\n scenarioQueryVariables,\n wurQueryVariables,\n} from '../scenarioAndWurResultQuery';\nimport {\n CURRENT_YEAR,\n DEFAULT_YEAR,\n AVAILABLE_METHODOLOGY_YEARS,\n QUERY_SELECTOR_YEAR,\n} from './constants';\n\nexport type ScenarioAndWurContract = {\n selectedMethodologyYear?: number;\n scenarioData?: ScenarioQuery | WurReporterInterimScenarioQuery;\n submissionData?: SubmissionWur2Query;\n wurData?: GetWurRatingAndScoreQuery;\n institutionId?: string;\n scenarioLoading: boolean;\n submissionLoading: boolean;\n wurLoading: boolean;\n currentYear: number;\n peers: Peer[];\n selectedPeers: Peer[];\n peersRegions: string[];\n setSelectedPeers: (peers: Peer[] | ((peers: Peer[]) => Peer[])) => void;\n setSelectedMethodologyYear: (year: number) => void;\n levelDefinitions: LevelDefinitionsObjectType;\n availableMethodologiesYears: number[];\n};\n\nexport const defaultScenarioAndWurContext = Object.freeze({\n selectedMethodologyYear: undefined,\n scenarioData: {},\n submissionData: {},\n wurData: {},\n institutionId: '',\n scenarioLoading: true,\n submissionLoading: true,\n wurLoading: true,\n currentYear: CURRENT_YEAR,\n peers: [],\n selectedPeers: [],\n peersRegions: [],\n setSelectedPeers: () => {},\n setSelectedMethodologyYear: () => {},\n levelDefinitions: {},\n availableMethodologiesYears: [],\n});\n\nconst ScenarioAndWurContext = createContext(\n defaultScenarioAndWurContext,\n);\n\nexport const useScenarioAndWurData = () =>\n useContext(ScenarioAndWurContext);\n\nconst ScenarioAndWurDataProvider: React.FC = (props) => {\n const flags = useFlags();\n const { hasResourcePermissionNew } = usePermissions();\n const {\n children,\n pageConfig: { isWurReporterInterim },\n } = props;\n const availableMethodologiesYears: number[] = isWurReporterInterim\n ? []\n : [DEFAULT_YEAR];\n\n const EXPLORE_METHODOLOGY_3_ENABLED =\n flags[camelCase('exploreMethodology3Enabled')];\n const INCLUDE_2025_IN_YEARS =\n flags[camelCase('include2025InMethodologyYears')];\n const { scenarioId } = useParams();\n const { institution } = useInstitution();\n\n const { institutionId } = institution;\n\n const filteredMethodologyYears = INCLUDE_2025_IN_YEARS\n ? AVAILABLE_METHODOLOGY_YEARS\n : AVAILABLE_METHODOLOGY_YEARS.filter((year) => year !== 2025);\n filteredMethodologyYears.forEach((year) => {\n if (\n EXPLORE_METHODOLOGY_3_ENABLED &&\n (isWurReporterInterim ||\n (!isWurReporterInterim &&\n hasResourcePermissionNew({\n action: 'explore:viewPage',\n year,\n institutionId: institution?.institutionId,\n })))\n ) {\n availableMethodologiesYears.push(year);\n }\n });\n\n // Methodology used before 2024 is WUR 2.0\n const [selectedMethodologyYear, setSelectedMethodologyYear] = useState<\n number\n >(availableMethodologiesYears[availableMethodologiesYears.length - 1]);\n\n const getSubmissionQuery =\n selectedMethodologyYear < QUERY_SELECTOR_YEAR\n ? getSubmissionQueryWur2\n : getSubmissionQueryWur3;\n\n const { data: submissionData, loading: submissionLoading } = useQuery<\n SubmissionWur2Query | SubmissionWur3Query\n >(getSubmissionQuery, {\n fetchPolicy: 'no-cache',\n variables: {\n institutionId,\n year: selectedMethodologyYear,\n },\n });\n\n const scenarioQuery = isWurReporterInterim\n ? getWurReporterInterimScenarioQuery\n : getScenarioQuery;\n\n const {\n data: scenarioData,\n loading: scenarioLoading,\n error: scenarioError,\n } = useQuery(\n scenarioQuery,\n scenarioQueryVariables(\n scenarioId,\n institutionId,\n !!isWurReporterInterim,\n 'cache-and-network',\n ),\n );\n\n if (scenarioError) {\n throw scenarioError;\n }\n\n const scenario = isWurReporterInterim\n ? (scenarioData as WurReporterInterimScenarioQuery)\n ?.wurReporterInterimScenario\n : (scenarioData as ScenarioQuery)?.scenario;\n\n const { data: wurData, loading: wurLoading, error: wurError } = useQuery(\n gql`\n query GetWURRatingScoreAndLevelDefinitions(\n $year: Int!\n $institutionId: String!\n ) {\n wurRelease(year: $year) {\n levelDefinitions {\n level2 {\n parentId\n levelId\n shortName\n longName\n name\n weighting\n type\n rankingYear\n }\n level3 {\n parentId\n levelId\n shortName\n longName\n name\n weighting\n type\n rankingYear\n }\n }\n subject(name: \"overall\") {\n result(institutionId: $institutionId) {\n score {\n higher\n lower\n }\n rank {\n higher\n lower\n }\n }\n }\n }\n }\n `,\n wurQueryVariables(selectedMethodologyYear, institutionId),\n );\n\n if (wurError) {\n throw wurError;\n }\n\n const currentYear = getScenarioMethodologyYear(scenario?.methodology);\n\n const productTitle = isWurReporterInterim ? 'WurReporterInterim' : 'DataPlus';\n\n const getProduct = useCallback(\n (productName: string) => {\n const { products: institutionProducts } = institution;\n return (institutionProducts || []).find(\n ({ name }) => name.toLowerCase() === productName.toLowerCase(),\n );\n },\n [institution],\n );\n\n const peersFullInfo = getProduct(productTitle);\n\n const group = peersFullInfo?.institutionGroups?.find(\n ({ name }) => name === 'peers',\n );\n\n const peers = peersFullInfo?.institutionGroups[0]?.institutions || [];\n\n const [selectedPeers, setSelectedPeers] = useSessionStorage(\n isWurReporterInterim ? 'selectedWurInterimPeers' : 'selectedPeers',\n peers,\n );\n\n const peerContinents =\n group?.institutions.reduce(\n (acc, institutionInfo) =>\n acc.indexOf(institutionInfo.continent) >= 0\n ? acc\n : [...acc, institutionInfo.continent],\n [] as string[],\n ) || [];\n const peerCountries =\n group?.institutions.reduce(\n (acc, institutionInfo) =>\n acc.indexOf(institutionInfo.country) >= 0\n ? acc\n : [...acc, institutionInfo.country],\n [] as string[],\n ) || [];\n\n const peersRegions = ['Worldwide', ...peerContinents, ...peerCountries];\n\n // @ts-ignore\n const levelDefinitions = wurData?.wurRelease?.levelDefinitions || {};\n\n return (\n \n {children}\n \n );\n};\n\nexport default ScenarioAndWurDataProvider;\n","export { default } from './ChartThemeProvider';\nexport { ChartThemeContext } from './ChartThemeProvider';\n","import React from 'react';\nimport { usePermissions } from '../contexts/PermissionsContext';\n\nconst RequirePermission: React.FC<{\n useNewPermissions?: boolean;\n resource?: string | string[];\n action?: string | string[];\n newAction?: string;\n year?: number;\n institutionId?: string;\n requireAny?: boolean;\n DeniedComponent?: React.FC<{\n resource?: string;\n action: string | string[];\n }>;\n}> = ({\n children,\n useNewPermissions,\n institutionId,\n year,\n newAction,\n resource,\n action,\n requireAny = false,\n DeniedComponent,\n}) => {\n const { hasResourcePermission, hasResourcePermissionNew } = usePermissions();\n const allow = useNewPermissions\n ? hasResourcePermissionNew({\n action: newAction || '',\n year,\n institutionId: institutionId || '',\n })\n : hasResourcePermission(resource || '', action || '', requireAny);\n\n if (!allow) {\n if (DeniedComponent) {\n return (\n \n );\n }\n return null;\n }\n return <>{children};\n};\n\nexport default RequirePermission;\n","import React, { useState, useEffect } from 'react';\nimport {\n Box,\n Flex,\n Checkbox,\n Text,\n Stack,\n List,\n ListItem,\n Input,\n FormLabel,\n} from '@chakra-ui/react';\nimport { pluck, reject, flatten, any, all } from 'ramda';\n\ninterface DataShape {\n name: string;\n id?: string;\n children?: DataShape[];\n}\n\ninterface PeerSelectorProps {\n data: DataShape[];\n defaultSelectedData?: string[];\n onChange: (selectedData: string[]) => void;\n}\n\nconst PeerSelector: React.FC = ({\n data,\n defaultSelectedData = [],\n onChange,\n}) => {\n const [selectedData, setSelectedData] = useState(defaultSelectedData);\n const [search, setSearch] = useState('');\n\n const itemShouldBe = (\n dataItem: DataShape,\n type: 'selected' | 'indeterminate',\n ) => {\n if (!dataItem.children) {\n return false;\n }\n const result = dataItem.children.map((child) => {\n if (child.children) {\n const childIDs = pluck('id', child.children);\n const areIncluded = childIDs.map((childId) =>\n selectedData.includes(childId || ''),\n );\n\n return type === 'selected'\n ? all((i) => !!i, areIncluded)\n : any((i) => !!i, areIncluded);\n }\n return selectedData.includes(child.id || '');\n });\n\n return type === 'selected'\n ? all((i) => !!i, result)\n : any((i) => !!i, result);\n };\n\n const handleChange = (clickedDataShape: DataShape) => {\n if (clickedDataShape.children) {\n const childIds = pluck('id', clickedDataShape.children).filter(\n Boolean,\n ) as string[];\n\n /**\n * childIds will be `[]` when the clickedDataShape is a continent. In this\n * case we should go one level deeper into the data structure in order to\n * fetch these IDs.\n */\n if (childIds.length === 0) {\n const innerChildIds = pluck(\n 'id',\n flatten(clickedDataShape.children.map((child) => child.children)),\n ).filter(Boolean) as string[];\n\n if (!itemShouldBe(clickedDataShape, 'selected')) {\n setSelectedData([...selectedData, ...innerChildIds]);\n return;\n }\n\n setSelectedData([\n ...reject((id) => innerChildIds.includes(id), selectedData),\n ]);\n return;\n }\n\n if (!itemShouldBe(clickedDataShape, 'selected')) {\n setSelectedData([...selectedData, ...childIds]);\n return;\n }\n\n setSelectedData([...reject((id) => childIds.includes(id), selectedData)]);\n return;\n }\n\n if (selectedData.includes(clickedDataShape.id as string)) {\n setSelectedData(selectedData.filter((id) => id !== clickedDataShape.id));\n return;\n }\n\n setSelectedData([...selectedData, clickedDataShape.id as string]);\n };\n\n const allInstitutions = flatten(\n data.map((continent) =>\n continent.children?.map((country) =>\n country.children?.map((institution) => institution),\n ),\n ),\n );\n const selectedInstitutions = selectedData\n .map((id) =>\n allInstitutions.find(\n (institute) => institute?.id === id && institute?.name,\n ),\n )\n .filter(Boolean);\n\n const allIds = flatten(\n data.map((continent) =>\n continent.children?.map((country) =>\n country.children ? pluck('id', country.children) : null,\n ),\n ),\n ) as string[];\n\n const handleSelectAll = () => {\n if (allIds.length === selectedData.length) {\n setSelectedData([]);\n return;\n }\n\n setSelectedData(allIds);\n };\n const handleSearch = (event: React.ChangeEvent) => {\n setSearch(event.target.value);\n };\n\n useEffect(() => {\n onChange(selectedData);\n }, [selectedData, onChange]);\n\n const filterInstitutionsBySearch = () => {\n const isMatch = (name: string) =>\n name.toLowerCase().includes(search.toLowerCase());\n\n return data\n .map((continent) => {\n const countriesThatMatchSearch = continent.children?.map((country) =>\n country.children?.filter(\n (institution) =>\n isMatch(institution.name) ||\n isMatch(country.name) ||\n isMatch(continent.name),\n ),\n );\n\n if (\n countriesThatMatchSearch &&\n flatten(countriesThatMatchSearch).length < 1\n ) {\n return null;\n }\n\n return {\n ...continent,\n children: continent.children\n ?.map((country) => {\n const childrenThatMatchSearch = country.children?.filter(\n (institution) =>\n isMatch(institution.name) ||\n isMatch(country.name) ||\n isMatch(continent.name),\n );\n return childrenThatMatchSearch &&\n childrenThatMatchSearch.length > 0\n ? {\n ...country,\n children: childrenThatMatchSearch,\n }\n : null;\n })\n .filter(Boolean),\n };\n })\n .filter(Boolean);\n };\n\n const dataToUse = (search\n ? filterInstitutionsBySearch()\n : data) as DataShape[];\n\n return (\n \n \n \n Search by institution name\n
\n \n
\n \n 0 && allIds.length !== selectedData.length\n }\n isChecked={allIds.length === selectedData.length}\n onChange={() => handleSelectAll()}\n >\n Worldwide\n \n {dataToUse.map((parent) => (\n \n handleChange(parent)}\n >\n {parent.name}\n \n {parent.children?.map((item) => (\n \n handleChange(item)}\n >\n {item.name}\n \n {item.children?.map((child) => {\n const isChecked = child?.id\n ? selectedData.includes(child.id)\n : false;\n return (\n \n handleChange(child)}\n value={child.name}\n >\n {child.name}\n \n \n );\n })}\n \n ))}\n \n ))}\n \n
\n \n \n \n {`You have selected ${selectedInstitutions.length} of a possible ${allInstitutions.length}`}\n \n {selectedInstitutions.map((institution, index) => (\n \n handleChange(institution as DataShape)}\n />\n {institution?.name}\n \n ))}\n \n \n
\n );\n};\n\nexport default PeerSelector;\n","export const YEAR_CHANGE: 'YEAR_CHANGE' = 'YEAR_CHANGE';\nexport const QUERY_SELECT_ONE_CHANGE: 'QUERY_SELECT_ONE_CHANGE' =\n 'QUERY_SELECT_ONE_CHANGE';\nexport const QUERY_SELECT_TWO_CHANGE: 'QUERY_SELECT_TWO_CHANGE' =\n 'QUERY_SELECT_TWO_CHANGE';\nexport const QUERY_SELECT_THREE_CHANGE: 'QUERY_SELECT_THREE_CHANGE' =\n 'QUERY_SELECT_THREE_CHANGE';\n","import { assoc } from 'ramda';\nimport { SelectOptionMetaType } from '#coreComponents/Select/types';\nimport { ROOT_PARENT_ID } from '#coreComponents/Select/Context';\n\nimport {\n QUERY_SELECT_ONE_CHANGE,\n QUERY_SELECT_THREE_CHANGE,\n QUERY_SELECT_TWO_CHANGE,\n YEAR_CHANGE,\n} from './constants';\nimport { Action, State } from './types';\nimport { getQuerySelectOptions, getFilterSelectOptions } from './utils';\n\nconst initialState = {\n isMapStatic: false,\n selectedYears: [],\n querySelectOne: {\n label: 'Indicator',\n data: {\n options: [],\n meta: { type: 'radio' as SelectOptionMetaType },\n },\n selectedItems: [],\n },\n querySelectTwo: {\n label: 'Dimension',\n data: {\n options: [],\n meta: { type: 'radio' as SelectOptionMetaType },\n },\n selectedItems: [],\n },\n querySelectThree: {\n label: 'Group',\n data: {\n options: [],\n meta: { type: 'radio' as SelectOptionMetaType },\n },\n selectedItems: [],\n },\n variableOptions: [],\n map: [],\n filteredOptions: {},\n filterSelectOptions: [],\n selectedFilters: {},\n};\n\nconst reducer: React.Reducer = (\n state = initialState,\n action,\n) => {\n const {\n querySelectOne: { data: querySelectOneData },\n querySelectTwo,\n querySelectTwo: {\n data: { meta: selectTwoMeta },\n },\n querySelectThree,\n querySelectThree: {\n data: { meta: selectThreeMeta },\n },\n map,\n variableOptions,\n filteredOptions,\n selectedFilters,\n } = state;\n\n switch (action.type) {\n case YEAR_CHANGE:\n return assoc('selectedYears', action.payload, state);\n\n case QUERY_SELECT_ONE_CHANGE: {\n const { payload } = action;\n if (!payload.length) {\n return state;\n }\n\n const [{ selectedItems, groupId }] = payload;\n const updatedLabelKey =\n groupId === ROOT_PARENT_ID ? selectedItems[0] : groupId;\n const selectedOption = querySelectOneData.options.find(\n (option) => option.key === updatedLabelKey,\n );\n\n const filterSelectOptions = getFilterSelectOptions(\n map,\n updatedLabelKey,\n filteredOptions,\n selectedFilters,\n );\n\n const getOptions = getQuerySelectOptions.bind({\n map,\n variableOptions,\n selectedKey: updatedLabelKey,\n });\n\n const querySelectTwoDataOptions = getOptions('querySelectTwo');\n const querySelectTwoSelectedOptionKey =\n (querySelectTwoDataOptions.find(\n ({ key }) => key === selectTwoMeta?.selected,\n ) &&\n selectTwoMeta?.selected) ||\n querySelectTwoDataOptions[0].key;\n const querySelectTwoData = {\n options: querySelectTwoDataOptions,\n meta: {\n type: 'radio' as SelectOptionMetaType,\n selected: querySelectTwoSelectedOptionKey,\n },\n };\n\n const querySelectThreeDataOptions = getOptions('querySelectThree');\n const querySelectThreeFilteredDataOptions = querySelectThreeDataOptions.filter(\n (option) => option.key !== querySelectTwoSelectedOptionKey,\n );\n\n const querySelectThreeSelectedOptionKey =\n selectThreeMeta?.selected ||\n querySelectThreeFilteredDataOptions[0]?.key;\n const querySelectThreeData = {\n options: querySelectThreeFilteredDataOptions,\n meta: {\n type: 'radio' as SelectOptionMetaType,\n selected: querySelectThreeSelectedOptionKey,\n },\n };\n\n const selectedMap = map.find((m) => m.key === updatedLabelKey);\n\n return {\n ...state,\n filterSelectOptions,\n isMapStatic: selectedMap?.type === 'static',\n querySelectOne: {\n label: selectedOption?.label || 'Indicator',\n data: querySelectOneData,\n selectedItems,\n },\n querySelectTwo: {\n ...querySelectTwo,\n label: querySelectTwoData.options[0]?.label || 'Dimension',\n data: querySelectTwoData || {\n options: querySelectTwoDataOptions,\n meta: {\n type: 'radio' as SelectOptionMetaType,\n selected: querySelectTwoSelectedOptionKey,\n },\n },\n },\n querySelectThree: {\n ...querySelectThree,\n label: querySelectThreeData.options[0]?.label || 'Group',\n data: querySelectThreeData,\n },\n };\n }\n\n case QUERY_SELECT_TWO_CHANGE: {\n const { payload } = action;\n if (!payload.length) {\n return state;\n }\n\n const [{ selectedItems }] = payload;\n const updatedLabelKey = selectedItems[0];\n const { isMapStatic } = state;\n\n const querySelectTwoSelectedOption = querySelectTwo.data.options.find(\n (option) => option.key === updatedLabelKey,\n );\n\n const querySelectThreeStaticOptions = querySelectThree.data.options;\n const querySelectThreeDynamicOptions = querySelectTwo.data.options.filter(\n (option) => option.key !== updatedLabelKey,\n );\n const querySelectThreeUpdatedOptions = isMapStatic\n ? querySelectThreeStaticOptions\n : querySelectThreeDynamicOptions;\n\n const querySelectThreeSelectedOptionKey =\n (querySelectThreeUpdatedOptions.find(\n ({ key }) => key === selectThreeMeta?.selected,\n ) &&\n selectThreeMeta?.selected) ||\n querySelectThreeUpdatedOptions[0]?.key;\n\n return {\n ...state,\n querySelectTwo: {\n ...querySelectTwo,\n label: querySelectTwoSelectedOption?.label || 'Dimension',\n selectedItems,\n },\n querySelectThree: {\n ...querySelectThree,\n label: querySelectThreeUpdatedOptions[0]?.label,\n data: {\n options: querySelectThreeUpdatedOptions,\n meta: {\n ...querySelectThree.data.meta,\n selected: querySelectThreeSelectedOptionKey,\n },\n },\n },\n };\n }\n\n case QUERY_SELECT_THREE_CHANGE: {\n const { payload } = action;\n if (!payload.length) {\n return state;\n }\n\n const [{ selectedItems }] = payload;\n const updatedLabelKey = selectedItems[0];\n const updatedLabel = querySelectThree.data.options.find(\n (option) => option.key === updatedLabelKey,\n )?.label;\n\n return {\n ...state,\n querySelectThree: {\n ...querySelectThree,\n selectedItems,\n label: updatedLabel || 'Group',\n },\n };\n }\n\n default:\n return state;\n }\n};\n\nexport { reducer, initialState };\n","import React, { useEffect, useReducer, useState } from 'react';\nimport {\n Box,\n Flex,\n Grid,\n SimpleGrid,\n useBreakpointValue,\n} from '@chakra-ui/react';\nimport { assoc, equals } from 'ramda';\nimport { ChevronDown32, ChevronRight32 } from '@carbon/icons-react';\n\nimport Select, { OnChangeCallbackData } from '#coreComponents/Select';\nimport { QueryBuilderProps } from './types';\nimport { reducer, initialState } from './reducer';\nimport {\n onQuerySelectOneChange,\n onQuerySelectThreeChange,\n onQuerySelectTwoChange,\n onYearChange,\n} from './actions';\nimport Heading from '#coreComponents/Heading';\n\nconst QueryBuilder = ({\n config,\n onChange,\n defaultSelectedData,\n}: QueryBuilderProps) => {\n const {\n querySelectOne: querySelectOneData,\n variableOptions,\n map,\n filteredOptions,\n years,\n dataOptions,\n } = config;\n\n const [filters, setFilters] = useState(\n defaultSelectedData?.selectedFilters || {},\n );\n\n const [state, dispatch] = useReducer(reducer, {\n ...initialState,\n querySelectOne: defaultSelectedData?.querySelectOne || {\n data: querySelectOneData,\n label: querySelectOneData.options[0].label,\n selectedItems: [],\n },\n querySelectTwo:\n defaultSelectedData?.querySelectTwo || initialState.querySelectTwo,\n querySelectThree:\n defaultSelectedData?.querySelectThree || initialState.querySelectThree,\n selectedYears: defaultSelectedData?.selectedYears || [],\n variableOptions,\n filteredOptions,\n selectedFilters: filters,\n map,\n });\n\n const {\n querySelectOne,\n querySelectTwo,\n querySelectThree,\n filterSelectOptions,\n selectedYears,\n } = state;\n\n const isMobile = useBreakpointValue({ base: true, md: false });\n\n useEffect(() => {\n const sanitisedFilters = Object.entries(filters).reduce(\n (acc, [key, val]) => {\n if (!val) {\n return acc;\n }\n\n return {\n ...acc,\n [key]: val,\n };\n },\n {},\n );\n\n const indicatorData = state.querySelectOne.data.options.find(\n (item) => item.label === state.querySelectOne.label,\n )!;\n\n const mapItem = map.find((i) => i.key === indicatorData.key)!;\n\n const selectedChildren =\n indicatorData.children &&\n indicatorData.children.options.filter((option) =>\n state.querySelectOne.selectedItems.includes(option.key),\n );\n\n const indicator = {\n key: mapItem.key,\n type: mapItem.type,\n options: mapItem.options,\n querySelectThree: mapItem.querySelectThree,\n filteredOptions: mapItem.filteredOptions,\n gql: mapItem.gql,\n label: state.querySelectOne.label,\n selectedChildren: selectedChildren?.filter(Boolean),\n selectedFilters: Object.entries(filteredOptions)\n .filter(([, values]) => values.meta?.selected)\n .reduce(\n (acc, [key, values]) => ({ ...acc, [key]: values.meta?.selected }),\n {},\n ),\n };\n\n const [dimension] = state.querySelectTwo.selectedItems.map((key) => ({\n label: state.querySelectTwo.label,\n key,\n }));\n\n const [groupBy] = state.querySelectThree.selectedItems.map((key) => ({\n label: state.querySelectThree.label,\n key,\n dataOptions: dataOptions[key],\n }));\n\n onChange({\n indicator,\n dimension,\n groupBy,\n years: state.selectedYears,\n filters: sanitisedFilters,\n groupByKey: groupBy?.key,\n indicatorDataKey: indicatorData.key,\n });\n }, [map, dataOptions, state, filters, filteredOptions, onChange]);\n\n const handleYearChange = (selectedData: OnChangeCallbackData[]) => {\n if (selectedData.length) {\n const selectedDataYears = selectedData[0].selectedItems.map((year) =>\n parseInt(year, 10),\n );\n if (!equals(selectedDataYears, selectedYears)) {\n dispatch(onYearChange(selectedDataYears));\n }\n }\n };\n\n const handleQuerySelectOneChange = (selectedData: OnChangeCallbackData[]) => {\n setFilters({});\n dispatch(onQuerySelectOneChange(selectedData));\n };\n\n const handleQuerySelectTwoChange = (selectedData: OnChangeCallbackData[]) => {\n dispatch(onQuerySelectTwoChange(selectedData));\n };\n\n const handleQuerySelectThreeChange = (\n selectedData: OnChangeCallbackData[],\n ) => {\n dispatch(onQuerySelectThreeChange(selectedData));\n };\n\n const handleFiltersChange = (key?: string) => (\n selectedData: OnChangeCallbackData[],\n ) => {\n setFilters((prevState) =>\n key ? assoc(key, selectedData[0]?.selectedItems, prevState) : prevState,\n );\n };\n\n return (\n \n \n \n \n Indicator\n \n \n \n \n {isMobile ? : }\n \n \n \n Dimension\n \n \n \n \n {isMobile ? : }\n \n \n \n Group by\n \n \n \n \n \n \n Filter by\n \n \n \n \n Years\n \n ({\n label: year.toString(),\n key: year.toString(),\n })),\n meta: {\n type: 'checkbox',\n selected: selectedYears.map((year) => year.toString()),\n },\n }}\n label={'Years'}\n onChange={handleYearChange}\n dark\n />\n \n {filterSelectOptions?.map((option) => (\n \n \n {option.label || ''}\n \n \n \n ))}\n \n \n \n );\n};\n\nexport default QueryBuilder;\n","import { OnChangeCallbackData } from '#coreComponents/Select';\nimport {\n QUERY_SELECT_ONE_CHANGE,\n QUERY_SELECT_TWO_CHANGE,\n QUERY_SELECT_THREE_CHANGE,\n YEAR_CHANGE,\n} from './constants';\n\nexport const onYearChange = (payload: number[]) => ({\n type: YEAR_CHANGE,\n payload,\n});\n\nexport const onQuerySelectOneChange = (payload: OnChangeCallbackData[]) => ({\n type: QUERY_SELECT_ONE_CHANGE,\n payload,\n});\n\nexport const onQuerySelectTwoChange = (payload: OnChangeCallbackData[]) => ({\n type: QUERY_SELECT_TWO_CHANGE,\n payload,\n});\n\nexport const onQuerySelectThreeChange = (payload: OnChangeCallbackData[]) => ({\n type: QUERY_SELECT_THREE_CHANGE,\n payload,\n});\n","import React from 'react';\nimport axios from 'axios';\nimport { last } from 'ramda';\nimport { Box, useToast } from '@chakra-ui/react';\nimport { useEnvironment } from '#core/Environment';\nimport { useInstitution } from '#core/Institution';\nimport { usePageQuery } from '#core/PageQuery';\nimport { EventType, useTracking } from '#core/Tracking';\nimport useLogger from '#hooks/useLogger';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\n\nconst DownloadLink: React.FC<{\n url: string;\n fileType: string;\n params?: { [key: string]: any };\n children: React.ReactNode;\n}> = ({ url, fileType, params, children }) => {\n const { apiEndpoint } = useEnvironment();\n const { apiHeaders: authApiHeaders, permissionToken } = useAuth(); // JME2\n const { institution, apiHeaders: institutionApiHeaders } = useInstitution();\n const { setDownloadInProgress } = usePageQuery();\n const { trackEvent } = useTracking();\n const logger = useLogger();\n const toast = useToast();\n\n const handleClick = () => {\n setDownloadInProgress(true);\n trackEvent({\n type: EventType.DOWNLOAD,\n payload: { id: url, fileType },\n });\n const fetchFile = async () => {\n try {\n const response = await axios.get(`https://${apiEndpoint}${url}`, {\n responseType: 'blob',\n // Increase the timeout to 3 minutes so that the large graphql request has time to complete.\n timeout: 3 * 60 * 1000,\n params: {\n ...params,\n allowScoresForExcluded: !!params?.isWurReporterInterim,\n institutionId: institution?.institutionId,\n },\n headers: {\n ...authApiHeaders,\n ...institutionApiHeaders,\n 'permissions-token': permissionToken,\n },\n });\n\n const contentBlob = new Blob([response.data]);\n const objectUrl = window.URL.createObjectURL(contentBlob);\n const fileName = last(\n response.headers['content-disposition']?.split('='),\n );\n const anchor = document.createElement('a');\n document.body.appendChild(anchor);\n anchor.download = fileName;\n anchor.href = objectUrl;\n anchor.click();\n window.URL.revokeObjectURL(objectUrl);\n } catch (error) {\n logger.error('Could not fetch selected file.');\n\n toast({\n title: 'There was a problem downloading your data. Please try again.',\n duration: 2000,\n isClosable: true,\n position: 'top-right',\n status: 'error',\n });\n } finally {\n setDownloadInProgress(false);\n }\n };\n\n fetchFile();\n };\n\n return (\n \n {children}\n \n );\n};\n\nexport default DownloadLink;\n","import React from 'react';\nimport {\n Button,\n ButtonProps,\n Menu,\n MenuButton,\n MenuButtonProps,\n MenuItem,\n MenuList,\n} from '@chakra-ui/react';\nimport {\n Code20,\n DocumentPdf20,\n Download20,\n Table20,\n} from '@carbon/icons-react';\nimport { PulseLoader } from 'react-spinners';\nimport DownloadLink from '#coreComponents/DownloadLink';\nimport { usePermissions } from '#core/Permissions';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\nimport { usePageQuery } from '#core/PageQuery';\nimport { useInstitution } from '#core/Institution';\n\nconst MenuButtonAsButton = MenuButton as React.FC<\n MenuButtonProps & ButtonProps\n>;\n\nexport type DownloadURLs = {\n xlsx?: string;\n csv?: string;\n methodology?: string;\n};\n\nexport type DownloadParams = {\n [key: string]: string | number | boolean | (string | number)[] | undefined;\n};\nconst DownloadDropdown = ({\n urls,\n params,\n loading,\n}: {\n urls: DownloadURLs;\n params: DownloadParams;\n loading?: boolean;\n}) => {\n const {\n query: { selectedYear: year },\n } = usePageQuery();\n const { institution } = useInstitution();\n const { hasResourcePermissionNew } = usePermissions();\n const { useElevatedPermissions } = useAuth(); // JME2\n\n const hasDownloadPermissionForExplore = hasResourcePermissionNew({\n action: 'dataplus:export',\n year,\n institutionId: institution?.institutionId,\n });\n\n const hasDownloadPermissionForWurReporterInterim = hasResourcePermissionNew({\n action: 'wurReporterInterim:viewPage',\n year,\n institutionId: institution?.institutionId,\n });\n\n return (\n \n : \n }\n bg=\"white\"\n border={'1px'}\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.100' }}\n fontWeight=\"bold\"\n display={{ base: 'none', lg: 'inline-flex' }}\n disabled={\n !hasDownloadPermissionForExplore &&\n !useElevatedPermissions &&\n !hasDownloadPermissionForWurReporterInterim\n }\n >\n Download\n \n {!loading && (\n \n {urls?.xlsx && (\n \n \n Excel\n \n \n \n )}\n {urls?.csv && (\n \n \n CSV\n \n \n \n )}\n {urls?.methodology && (\n \n \n Methodology\n \n \n \n )}\n \n )}\n \n );\n};\n\nexport default DownloadDropdown;\n","import React, {\n ChangeEvent,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n Box,\n Button,\n ButtonProps,\n Flex,\n HStack,\n Portal,\n Select,\n Tab,\n TabList,\n TabPanel,\n TabPanels,\n Tabs,\n Text,\n useBreakpointValue,\n} from '@chakra-ui/react';\nimport { Filter20 } from '@carbon/icons-react';\nimport { any } from 'ramda';\n\nimport { useLocation } from '@reach/router';\nimport { VisibleTabFilterType } from 'src/features/explore/viewScenario/components/utils/utils';\nimport Topbar from '#coreComponents/Topbar';\nimport { Peer, usePageQuery } from '#core/PageQuery';\nimport PeerSelector, {\n getPeerSelectorData,\n} from '#coreComponents/PeerSelector';\nimport QueryBuilder from '#coreComponents/QueryBuilder';\nimport { useQueryBuilder } from '#core/QueryBuilderContext';\nimport { EventType, useTracking, withEventTracking } from '#core/Tracking';\nimport { QueryBuilderContextValues } from '#core/QueryBuilderContext/components/QueryBuilderProvider';\nimport SettingsButton from '#core/Dashboard/components/SettingsButton';\nimport { useScenarioAndWurData } from '../../features/explore/viewScenario/providers/ScenarioDataProvider';\nimport DownloadDropdown, { DownloadURLs } from './DownloadDropdown';\nimport { useDataplusEmbargoData } from '../../features/core/Embargo/contexts/DataplusEmbargoContext';\n\nexport interface ProductTopbarProps {\n title: string;\n titleAcronym?: string;\n rank?: string;\n filter: {\n hasPeerSelector: boolean;\n hasQueryBuilder: boolean;\n };\n downloadUrls?: DownloadURLs;\n years?: (number | undefined)[];\n scenarioId?: string;\n currentTabIndex?: number;\n isFilterVisible?: VisibleTabFilterType;\n isNewWur3Methodology?: boolean;\n isWurReporterInterim?: boolean;\n isWurInterimTopBar?: boolean;\n}\n\nconst ProductTopbar: React.FC = ({\n title,\n titleAcronym,\n rank,\n filter,\n filter: { hasPeerSelector, hasQueryBuilder },\n downloadUrls,\n scenarioId,\n currentTabIndex,\n isFilterVisible,\n isNewWur3Methodology,\n isWurReporterInterim,\n years,\n}) => {\n let peers: Peer[] = useMemo(() => [], []);\n let selectedPeers: Peer[] = [];\n let setSelectedPeers: (\n peers: Peer[] | ((peers: Peer[]) => Peer[]),\n ) => void = () => {};\n const {\n query: {\n peers: wurPeers,\n selectedPeers: wurSelectedPeers,\n selectedGroupAnalysisPeers,\n selectedYear,\n selectedQueryBuilderPeers,\n downloadInProgress,\n scoresRegion,\n },\n setSelectedYear,\n setSelectedPeers: wurSetSelectedPeers,\n setSelectedGroupAnalysisPeers,\n setSelectedQueryBuilderPeers,\n } = usePageQuery();\n\n const { availableSelectedYear } = useDataplusEmbargoData();\n\n const {\n peers: explorePeers,\n selectedPeers: exploreSelectedPeers,\n setSelectedPeers: exploreSetSelectedPeers,\n } = useScenarioAndWurData();\n\n const { pathname } = useLocation();\n\n const isPeerGroupAnalysisPage = pathname.includes('peer-group-analysis');\n\n const isExploreModule = pathname.includes('view-scenario');\n\n if (isExploreModule) {\n peers = explorePeers;\n selectedPeers = exploreSelectedPeers;\n setSelectedPeers = exploreSetSelectedPeers;\n } else if (isPeerGroupAnalysisPage) {\n peers = wurPeers;\n selectedPeers = selectedGroupAnalysisPeers;\n setSelectedPeers = setSelectedGroupAnalysisPeers;\n } else {\n peers = wurPeers;\n selectedPeers = wurSelectedPeers;\n setSelectedPeers = wurSetSelectedPeers;\n }\n\n const [filteredPeers, setFilteredPeers] = useState(\n hasQueryBuilder ? selectedQueryBuilderPeers : selectedPeers,\n );\n const [isExpanded, setIsExpanded] = useState(false);\n const {\n config: queryBuilderConfig,\n filters: queryBuilderFilters,\n applyChanges: applyQueryBuilderChanges,\n } = useQueryBuilder();\n const [queryBuilderArgs, setQueryBuilderArgs] = useState<\n Maybe\n >();\n\n const { trackEvent } = useTracking();\n const dropdownRef = useRef(null);\n\n const peerSelectorData = useMemo(() => getPeerSelectorData(peers), [peers]);\n\n const shouldShowDownload = any(Boolean, Object.values(downloadUrls || {}));\n const shouldShowFilter = isExploreModule\n ? currentTabIndex &&\n isFilterVisible &&\n isFilterVisible[currentTabIndex] &&\n currentTabIndex >= 2\n : any(Boolean, Object.values(filter));\n const shouldShowTabs = hasPeerSelector && hasQueryBuilder;\n\n const isTabFitted = useBreakpointValue({ base: true, md: false });\n\n const onApply = () => {\n if (queryBuilderConfig && queryBuilderArgs) {\n applyQueryBuilderChanges(queryBuilderArgs);\n }\n\n if (!isPeerGroupAnalysisPage) {\n setSelectedPeers((prevValues) =>\n hasQueryBuilder ? prevValues : filteredPeers,\n );\n } else {\n setSelectedGroupAnalysisPeers(filteredPeers);\n }\n\n setSelectedQueryBuilderPeers((prevValues) =>\n hasQueryBuilder ? filteredPeers : prevValues,\n );\n setIsExpanded(false);\n };\n\n const onQueryBuilderChange = useCallback(\n (args: QueryBuilderContextValues) => {\n setQueryBuilderArgs(args);\n },\n [setQueryBuilderArgs],\n );\n\n const onPeerSelectorChange = useCallback(\n (selectedPeerIds) => {\n setFilteredPeers(\n peers.filter((peer) => selectedPeerIds.includes(peer.institutionId)),\n );\n },\n [setFilteredPeers, peers],\n );\n\n const onYearChange = useCallback(\n (event: ChangeEvent) => {\n const year = parseInt(event.target.value, 10);\n setSelectedYear(year);\n },\n [setSelectedYear],\n );\n\n const onTopbarToggle = useCallback(() => {\n setIsExpanded(!isExpanded);\n }, [isExpanded]);\n\n const renderPeerSelector = () =>\n hasPeerSelector && (\n peer.institutionId)}\n onChange={onPeerSelectorChange}\n />\n );\n\n const renderQueryBuilder = () =>\n hasQueryBuilder &&\n queryBuilderConfig && (\n \n );\n\n const downloadParams = {\n year: selectedYear,\n indicator: queryBuilderFilters.querySelectOne?.selectedItems[0],\n years: queryBuilderConfig?.years,\n scenarioId,\n scoresRegion,\n isNewWur3Methodology,\n isWurReporterInterim,\n };\n\n const TopbarButtonWithTrackingEvent = withEventTracking(Button);\n\n return (\n \n {isExpanded && (\n \n )}\n \n \n \n {!hasQueryBuilder && !!years?.length && !isExploreModule && (\n \n {years?.map((year) => (\n \n {year}\n \n ))}\n \n )}\n {shouldShowDownload && (\n \n )}\n \n \n {shouldShowFilter && (\n ({\n type: EventType.CLICK,\n payload: {\n id: `topbar-filter-${isExpanded ? 'close' : 'open'}`,\n elementTagName: 'button',\n },\n })}\n bg=\"white\"\n _hover={{ bg: 'gray.100' }}\n _active={{ bg: 'gray.200' }}\n _focus={{ border: 'none' }}\n onClick={onTopbarToggle}\n borderStyle=\"solid\"\n borderWidth={2}\n borderColor={isExpanded ? 'yellow.500' : 'transparent'}\n >\n \n Filter\n \n \n \n )}\n \n \n \n {isExpanded && (\n \n \n \n \n {shouldShowTabs ? (\n \n \n {\n trackEvent({\n type: EventType.CLICK,\n payload: {\n id: 'filter-tab-query-builder',\n elementTagName: 'button',\n },\n });\n }}\n >\n Query Builder\n \n {\n trackEvent({\n type: EventType.CLICK,\n payload: {\n id: 'filter-tab-peer-selector',\n elementTagName: 'button',\n },\n });\n }}\n >\n Peer Selector\n \n \n \n \n {renderQueryBuilder()}\n \n \n {renderPeerSelector()}\n \n \n \n ) : (\n <>\n {renderPeerSelector()}\n {renderQueryBuilder()}\n \n )}\n \n \n ({\n type: EventType.CLICK,\n payload: {\n id: 'topbar-close',\n elementTagName: 'button',\n },\n })}\n _hover={{ bg: 'gray.900' }}\n _active={{ bg: 'gray.900' }}\n _focus={{ bg: 'gray.900' }}\n bg=\"white\"\n color=\"black\"\n onClick={() => setIsExpanded(false)}\n borderStyle=\"solid\"\n borderWidth={2}\n borderColor={'black'}\n alignSelf=\"flex-end\"\n mr={5}\n display={{ md: 'block', base: 'none' }}\n >\n Close\n \n ({\n type: EventType.CLICK,\n payload: {\n id: 'topbar-apply',\n elementTagName: 'button',\n },\n })}\n _hover={{ bg: 'gray.900' }}\n _active={{ bg: 'gray.900' }}\n _focus={{ bg: 'gray.900' }}\n bg=\"white\"\n color=\"black\"\n onClick={onApply}\n borderStyle=\"solid\"\n borderWidth={2}\n borderColor={'black'}\n flex={{ base: 1, md: 'none' }}\n >\n Apply\n \n \n \n \n \n )}\n \n \n );\n};\nexport default ProductTopbar;\n","import { uniq } from 'ramda';\n\ninterface Peer {\n name: string;\n id: string;\n institutionId: string;\n country: string;\n continent: string;\n}\n\nexport const getPeerSelectorData = (peers: Peer[]) => {\n const continents = uniq(peers.map((peer) => peer.continent));\n\n return continents.map((continent) => {\n const countries = uniq(\n peers\n .filter((peer) => peer.continent === continent)\n .map((peer) => peer.country),\n );\n\n return {\n name: continent,\n children: countries.map((country) => ({\n name: country,\n children: peers\n .filter(\n (peer) => peer.continent === continent && peer.country === country,\n )\n .map((peer) => ({\n name: peer.name,\n id: peer.institutionId,\n })),\n })),\n };\n });\n};\n","import React, {\n ChangeEventHandler,\n useEffect,\n useState,\n useCallback,\n} from 'react';\nimport { useDebounce } from 'react-use';\n\nimport { ChevronLeft20, ChevronRight20 } from '@carbon/icons-react';\nimport { Flex, Input, Button } from '@chakra-ui/react';\n\ninterface PaginationProps {\n current: number;\n pageCount: number;\n onChange: (value: number) => void;\n}\n\nconst ListItem: React.FC = ({ children }) => (\n \n {children}\n \n);\n\nconst Pagination: React.FC = ({\n current,\n pageCount,\n onChange,\n}) => {\n const [inputValue, setInputValue] = useState(current);\n const [debouncedInputValue, setDebouncedInputValue] = useState(\n inputValue,\n );\n\n const [, cancelDebounce] = useDebounce(\n () => {\n setDebouncedInputValue(inputValue);\n },\n 1000,\n [inputValue],\n );\n\n useEffect(() => {\n setInputValue(current);\n cancelDebounce();\n setDebouncedInputValue(current);\n }, [cancelDebounce, current]);\n\n useEffect(() => {\n if (debouncedInputValue) {\n onChange(debouncedInputValue);\n }\n }, [debouncedInputValue, onChange]);\n\n const handleInputChange: ChangeEventHandler = (event) => {\n const newValue = parseInt(event.target.value, 10);\n\n if (newValue <= 0 || newValue > pageCount) {\n return;\n }\n\n setInputValue(newValue);\n };\n\n const changePage = useCallback(\n (diff: number) => {\n const newInputValue = inputValue + diff;\n setInputValue(newInputValue);\n cancelDebounce();\n setDebouncedInputValue(newInputValue);\n },\n [cancelDebounce, inputValue],\n );\n\n const onBlur = () => {\n if (Number.isNaN(inputValue)) {\n setInputValue(current);\n }\n };\n\n const isInputValueNaN = Number.isNaN(inputValue);\n\n return (\n \n \n \n changePage(-1)}\n data-testid=\"previous-btn\"\n >\n \n \n \n \n page\n \n of {pageCount}\n \n \n changePage(1)}\n data-testid=\"next-btn\"\n >\n \n \n \n \n \n );\n};\n\nexport default Pagination;\n","import { BoxProps } from '@chakra-ui/react';\n\ntype WithWidth = {\n w: number;\n};\n\ntype WithHeight = {\n h: number;\n};\n\ninterface BaseLogoProps extends Omit {}\n\ntype LogoPropsWithWidth = BaseLogoProps & WithWidth;\n\ntype LogoPropsWithHeight = BaseLogoProps & WithHeight;\n\nexport type LogoProps =\n | BaseLogoProps\n | LogoPropsWithWidth\n | LogoPropsWithHeight;\n\ntype CalculateWidthAndHeightBaseProps = {\n baseWidth: number;\n baseHeight: number;\n};\n\ntype CalculateWidthAndHeightUsingWidth = CalculateWidthAndHeightBaseProps &\n WithWidth;\n\ntype CalculateWidthAndHeightUsingHeight = CalculateWidthAndHeightBaseProps &\n WithHeight;\n\nexport const calculateWidthAndHeight = ({\n baseWidth,\n baseHeight,\n ...props\n}:\n | CalculateWidthAndHeightBaseProps\n | CalculateWidthAndHeightUsingWidth\n | CalculateWidthAndHeightUsingHeight) => {\n let ratio = 1;\n if ('w' in props && typeof props.w !== 'undefined') {\n ratio = props.w / baseWidth;\n }\n if ('h' in props && typeof props.h !== 'undefined') {\n ratio = props.h / baseHeight;\n }\n return {\n width: Math.round(baseWidth * ratio),\n height: Math.round(baseHeight * ratio),\n };\n};\n","import React from 'react';\nimport { useQuery } from '@apollo/client';\nimport { useFlags } from 'launchdarkly-react-client-sdk';\nimport { camelCase } from 'change-case';\nimport { useLocation } from '@reach/router';\nimport { useInstitution } from '#core/Institution';\nimport { GetRankDataQuery } from '#types/generated/graphql';\nimport { formatBandedValue } from '#utils/formatUtils';\nimport { usePageQuery } from '#core/PageQuery';\nimport { usePermissions } from '#core/Permissions';\nimport ProductTopbar, {\n ProductTopbarProps,\n} from '../../../coreComponents/ProductTopbar/ProductTopbar';\nimport {\n getWurRankingData,\n wurRankingDataQuery,\n} from '../../../coreComponents/ProductTopbar/wurRankingQuery';\nimport { DataPlusEmbargoProvider } from '../../core/Embargo/components/DataPlusEmbargoProvider';\nimport { useDataplusEmbargoData } from '../../core/Embargo/contexts/DataplusEmbargoContext';\n\nconst DataPlusTopbar: React.FC = (props) => {\n const flags = useFlags();\n const WUR_SUBJECTS_DOWNLOAD_ENABLED =\n flags[camelCase('wur-dashboard-subject-download-enabled')];\n\n const { pathname } = useLocation();\n\n const {\n institution: { institutionId, name: institutionName },\n } = useInstitution();\n const {\n query: { years, isAfterEmbargoDate },\n } = usePageQuery();\n\n const {\n availableSelectedYear,\n availableEmbargoYears,\n } = useDataplusEmbargoData();\n\n const { hasResourcePermissionNew } = usePermissions();\n\n const queryResult = useQuery(\n getWurRankingData,\n wurRankingDataQuery(availableSelectedYear, institutionId),\n );\n\n const wurBanding = queryResult.data?.release?.level1?.result?.rank;\n\n const pageName = pathname.slice(pathname.lastIndexOf('/') + 1);\n\n const action = `dataplus:viewPage:${pageName}`;\n\n const hasDownloadPermission =\n hasResourcePermissionNew({\n action,\n year: availableSelectedYear,\n institutionId,\n }) && isAfterEmbargoDate[availableSelectedYear];\n\n const yearsExcludingFirstYear = years.slice(0, -1);\n\n const topbarConfig = {\n ...props,\n downloadUrls:\n hasDownloadPermission &&\n ((WUR_SUBJECTS_DOWNLOAD_ENABLED &&\n pathname === '/datapoints/wur/subjects') ||\n pathname !== '/datapoints/wur/subjects')\n ? props.downloadUrls\n : undefined,\n years:\n pageName !== 'year-on-year'\n ? availableEmbargoYears\n : yearsExcludingFirstYear,\n title: institutionName,\n titleAcronym: undefined,\n };\n\n return (\n \n );\n};\n\nconst DataPlusTopBarEmbargo = (props: ProductTopbarProps) => (\n \n \n \n);\n\nexport default DataPlusTopBarEmbargo;\n","const { formatPermissions } = require('./utils');\nconst { datapointsPermissions } = require('./datapoints');\nconst { dataplusPermissions } = require('./dataplus');\nconst { wurPermissions } = require('./wur');\nconst { wurReporterInterimPermissions } = require('./wurReporterInterim');\nconst { submissionPermissions } = require('./submission');\nconst { explorePermissions } = require('./explore');\nconst { authPermissions } = require('./auth');\nconst { legacyPermissions } = require('./legacy');\nconst { sdgImpactPermissions } = require('./sdgImpact');\nconst { reputationPermissions } = require('./reputation');\nconst { reputationPlusPermissions } = require('./reputationPlus');\nconst {\n japanRankingsDashboardPermissions,\n} = require('./japanRankingsDashboard');\nconst { dataplusNewDataPermissions } = require('./dataplusNewData');\nconst { dataplusLatamPermissions } = require('./dataplusLatam');\nconst { cidPermissions } = require('./cid');\nconst {\n collegeRankingsDashboardPermissions,\n} = require('./collegeRankingsDashboard');\nconst { bundlePermissions } = require('./bundle');\n\nconst checkPermissions = ({\n permissionToken = null,\n permissionList = null,\n institutionId = '',\n action = '',\n year = 0,\n sdgId = 0,\n}) => {\n if (!permissionToken || !permissionList || !institutionId || !action) {\n return false;\n }\n\n const decodedToken = JSON.parse(\n Buffer.from(permissionToken.split('.')[1], 'base64').toString(),\n );\n\n const { permissions, isAdmin } = decodedToken\n\n if (isAdmin) {\n return true;\n }\n\n if (permissions && permissions[\"*\"] && permissions[\"*\"].length) {\n return true;\n }\n\n const formattedPermissions = formatPermissions(permissions, permissionList);\n\n const product = action.split(':')[0];\n\n if (!formattedPermissions[institutionId]) {\n formattedPermissions[institutionId] = ['DATAPOINTS_USER'];\n }\n\n if (formattedPermissions[institutionId].includes(`DATAPOINTS_DEVELOPER`)) {\n return true;\n }\n\n if (\n action.endsWith(':viewPage') &&\n formattedPermissions[institutionId].includes(\n `THE_STAFF_ACCESS_ALL_INSTITUTIONS`,\n )\n ) {\n return true;\n }\n\n if (product === 'datapoints') {\n return datapointsPermissions(action, formattedPermissions, institutionId);\n }\n\n if (product === 'dataplus') {\n return dataplusPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n );\n }\n\n if (product === 'wur') {\n return wurPermissions(action, formattedPermissions[institutionId], year);\n }\n\n if (product === 'wurReporterInterim') {\n return wurReporterInterimPermissions(\n action,\n formattedPermissions[institutionId],\n year,\n );\n }\n\n if (product === 'submission') {\n return submissionPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n );\n }\n\n if (product === 'explore') {\n return explorePermissions(\n action,\n formattedPermissions[institutionId],\n year,\n );\n }\n\n if (product === 'auth') {\n return authPermissions(action, formattedPermissions, institutionId);\n }\n\n if (product === 'legacy') {\n return legacyPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n sdgId,\n );\n }\n\n if (product === 'sdgImpact') {\n return sdgImpactPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n sdgId,\n );\n }\n\n if (product === 'reputation') {\n return reputationPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n );\n }\n\n if (product === 'reputation_plus') {\n return reputationPlusPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n );\n }\n\n if (product === 'japanRankingsDashboard') {\n return japanRankingsDashboardPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n );\n }\n\n if (product === 'dataplusNewData') {\n return dataplusNewDataPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n );\n }\n\n if (product === 'dataplusLatam') {\n return dataplusLatamPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n );\n }\n\n if (product === 'cid') {\n return cidPermissions(action, formattedPermissions, institutionId, year);\n }\n\n if (product === 'collegeRankingsDashboard') {\n return collegeRankingsDashboardPermissions(\n action,\n formattedPermissions,\n institutionId,\n year,\n );\n }\n\n if (product === 'bundle') {\n return bundlePermissions(action, formattedPermissions, institutionId);\n }\n\n return false;\n};\n\nmodule.exports = {\n checkPermissions,\n};\n","import React, { useMemo } from 'react';\nimport { gql, useQuery } from '@apollo/client';\nimport { PermissionsQuery } from '#types/generated/graphql';\nimport CommonPermissions from './CommonPermissions';\nimport { useInstitution } from '#core/Institution';\n\nconst Permissions: React.FC<{}> = ({ children }) => {\n const { institution } = useInstitution();\n\n const { loading, error, data, refetch } = useQuery(\n gql`\n query Permissions($institutionId: String!) {\n permissions(institutionId: $institutionId) {\n resource\n actions {\n action\n grant\n }\n }\n }\n `,\n {\n variables: {\n institutionId: institution.institutionId,\n },\n },\n );\n\n const resourcePermissions = useMemo(\n () =>\n (data?.permissions || []).reduce((perms, permission) => {\n if (!permission) {\n return perms;\n }\n const { resource, actions } = permission;\n return {\n ...perms,\n [resource]: actions.reduce((a, resourceActions) => {\n if (!resourceActions) {\n return a;\n }\n const { action, grant } = resourceActions;\n return {\n ...a,\n [action]: grant,\n };\n }, {} as Record),\n };\n }, {} as Record>),\n [data?.permissions],\n );\n\n if (loading) {\n return null;\n }\n\n if (error) {\n throw error;\n }\n\n return (\n \n {children}\n \n );\n};\n\nexport default Permissions;\n","import React, { useMemo } from 'react';\nimport mergeDeepRight from 'ramda/src/mergeDeepRight';\nimport { gql, useQuery } from '@apollo/client';\nimport { LegacyPermissionsQuery } from '#types/generated/graphql';\n\nimport PermissionsContext from '../contexts/PermissionsContext';\nimport Loading from '#coreComponents/Loading';\nimport CommonPermissions from './CommonPermissions';\nimport { useInstitution } from '#core/Institution';\n\nconst LegacyPermissions: React.FC<{}> = ({ children }) => {\n const { institution } = useInstitution();\n\n const { loading, error, data } = useQuery(\n gql`\n query LegacyPermissions($institutionId: String!) {\n legacyPermissions(institutionId: $institutionId) {\n resource\n actions {\n action\n grant\n }\n }\n }\n `,\n {\n variables: {\n institutionId: institution.institutionId,\n },\n },\n );\n\n const legacyResourcePermissions = useMemo(\n () =>\n (data?.legacyPermissions || []).reduce((perms, permission) => {\n if (!permission) {\n return perms;\n }\n const { resource, actions } = permission;\n return {\n ...perms,\n [resource]: actions.reduce((a, resourceActions) => {\n if (!resourceActions) {\n return a;\n }\n const { action, grant } = resourceActions;\n return {\n ...a,\n [action]: grant,\n };\n }, {} as Record),\n };\n }, {} as Record>),\n [data?.legacyPermissions],\n );\n\n if (loading) {\n return ;\n }\n\n if (error) {\n throw error;\n }\n\n return (\n \n {({ resources }) => (\n \n {children}\n \n )}\n \n );\n};\n\nexport default LegacyPermissions;\n","import React from 'react';\nimport { usePermissions } from '../contexts/PermissionsContext';\n\nconst RequireRole: React.FC<{\n role: string | string[];\n requireAny?: boolean;\n DeniedComponent?: React.FC<{\n role: string | string[];\n }>;\n}> = ({ children, role, requireAny = false, DeniedComponent }) => {\n const { hasRole } = usePermissions();\n const allow = hasRole(role, requireAny);\n if (!allow) {\n if (DeniedComponent) {\n return ;\n }\n return null;\n }\n return <>{children};\n};\n\nexport default RequireRole;\n","import { createContext, useContext } from 'react';\n\nexport type Peer = {\n name: string;\n id: string;\n institutionId: string;\n country: string;\n continent: string;\n logo: string;\n};\nexport type SortItem = {\n label: string;\n value: string;\n};\nexport interface PageQueryProps {\n querySelector: {};\n selectedYear: number;\n years: number[];\n releaseDates: { [key: string]: Date };\n embargoEndDates: { [key: string]: Date };\n isAfterReleaseDate: { [key: string]: Boolean };\n isAfterEmbargoDate: { [key: string]: Boolean };\n isAfterFreeEmbargoDate: { [key: string]: Boolean };\n isAfterWurDetailsEmbargoDate: { [key: string]: Boolean };\n selectedPeers: Peer[];\n selectedWurInterimPeers: Peer[];\n selectedGroupAnalysisPeers: Peer[];\n selectedQueryBuilderPeers: Peer[];\n peers: Peer[];\n wurInterimPeers: Peer[];\n selectedGroup?: string | null;\n groups: string[];\n continents: string[];\n countries: string[];\n downloadInProgress: boolean;\n sortItems: SortItem[];\n sortBy?: string;\n sortDirection?: string;\n scoresRegion: string;\n}\ninterface PageContextProps {\n query: PageQueryProps;\n setSelectedYear: (year: number) => void;\n setQuerySelector: (query: object) => void;\n setSelectedPeers: (peers: Peer[] | ((peers: Peer[]) => Peer[])) => void;\n setSelectedWurInterimPeers: (\n peers: Peer[] | ((peers: Peer[]) => Peer[]),\n ) => void;\n setSelectedGroupAnalysisPeers: (\n peers: Peer[] | ((peers: Peer[]) => Peer[]),\n ) => void;\n setSelectedQueryBuilderPeers: (\n peers: Peer[] | ((peers: Peer[]) => Peer[]),\n ) => void;\n setSelectedGroup: (groupName: string) => void;\n setDownloadInProgress: (loading: boolean) => void;\n setSortItems: (items: SortItem[]) => void;\n setSortBy: (value: string) => void;\n setSortDirection: (value: string) => void;\n setScoresRegion: (value: string) => void;\n}\n\nexport const defaultContextValue = {\n query: {\n querySelector: {},\n selectedYear: new Date().getFullYear(),\n years: [],\n releaseDates: {},\n embargoEndDates: {},\n isAfterReleaseDate: {},\n isAfterEmbargoDate: {},\n isAfterFreeEmbargoDate: {},\n isAfterWurDetailsEmbargoDate: {},\n embargoEndDate: '',\n selectedPeers: [],\n selectedWurInterimPeers: [],\n selectedGroupAnalysisPeers: [],\n selectedQueryBuilderPeers: [],\n peers: [],\n wurInterimPeers: [],\n selectedGroup: null,\n groups: [],\n continents: [],\n countries: [],\n downloadInProgress: false,\n sortItems: [],\n sortBy: undefined,\n sortDirection: undefined,\n scoresRegion: 'Worldwide',\n },\n setSelectedYear: () => {},\n setQuerySelector: () => {},\n setSelectedPeers: () => {},\n setSelectedWurInterimPeers: () => {},\n setSelectedGroupAnalysisPeers: () => {},\n setSelectedQueryBuilderPeers: () => {},\n setSelectedGroup: () => {},\n setDownloadInProgress: () => {},\n setSortItems: () => {},\n setSortBy: () => {},\n setSortDirection: () => {},\n setScoresRegion: () => {},\n};\n\nexport const PageQueryContext = createContext(\n defaultContextValue,\n);\n\nexport const usePageQuery = () => useContext(PageQueryContext);\n\nexport default PageQueryContext;\n","import React, { useState, useMemo, useCallback } from 'react';\nimport { compareAsc } from 'date-fns';\nimport { useQuery, gql } from '@apollo/client';\nimport { useSessionStorage } from '#hooks/useSessionStorage';\nimport PageContext, { Peer, SortItem } from '../contexts/PageQueryContext';\nimport { WurDashboardPageQueryQuery } from '#types/generated/graphql';\nimport { useProducts } from '#core/Products';\nimport { useInstitution } from '#core/Institution';\nimport ErrorBoundary from '#coreComponents/ErrorBoundary';\nimport ErrorBoundaryFooter from '#coreComponents/ErrorBoundary/ErrorBoundaryFooter';\n\nexport const GetWurDashboardPageQuery = gql`\n query WurDashboardPageQuery(\n $releaseNames: [String]!\n $responseFields: [ResponseFields2ListItem]\n ) {\n releases(releaseNames: $releaseNames, responseFields: $responseFields) {\n year\n releaseDate\n embargoEndDate\n wurDetailsEmbargoStartDate\n freeEmbargoStartDate\n locations {\n countries\n continents\n }\n }\n }\n`;\n\n/* TODO: this PageQuery component is specific to WUR Dashboard and needs to be\n split from the page query core component and moved inside the WUR Dashboard feature folder structure.\n Any other pages that need to use the concept of page query need their own specific page query component */\nconst PageQuery: React.FC<{}> = ({ children }) => {\n const productName = 'DataPlus';\n const wurInterimProductName = 'WurReporterInterim';\n const activeProduct = window.location.pathname.includes('wur-reporter')\n ? wurInterimProductName\n : productName;\n const { productPeers, productGroups } = useProducts();\n const { institution } = useInstitution();\n const selectedProduct = institution?.products.find(\n (product) => product.name === activeProduct,\n );\n const productLocations = selectedProduct?.locations;\n\n const wurInterimPeers = useMemo(() => productPeers(wurInterimProductName), [\n productPeers,\n ]);\n\n const peers = useMemo(() => productPeers(productName), [productPeers]);\n const groups = useMemo(() => productGroups(productName), [productGroups]);\n const [selectedYearIndex, setSelectedYearIndex] = useSessionStorage(\n 'selectedYearIndex',\n 0,\n );\n const [selectedPeers, setSelectedPeers] = useSessionStorage(\n 'selectedPeers',\n peers,\n );\n\n const [\n selectedWurInterimPeers,\n setSelectedWurInterimPeers,\n ] = useSessionStorage('selectedWurInterimPeers', wurInterimPeers);\n\n const [\n selectedGroupAnalysisPeers,\n setSelectedGroupAnalysisPeers,\n ] = useSessionStorage('selectedGroupAnalysisPeers', peers);\n\n const [\n selectedQueryBuilderPeers,\n setSelectedQueryBuilderPeers,\n ] = useSessionStorage('selectedQueryBuilderPeers', []);\n const [selectedGroup, setSelectedGroup] = useSessionStorage<\n string | undefined\n >('selectedGroup', undefined);\n const [querySelector, setQuerySelector] = useSessionStorage(\n 'querySelector',\n {},\n );\n const [downloadInProgress, setDownloadInProgress] = useState(false);\n const [sortItems, setSortItems] = useState([]);\n const [sortBy, setSortBy] = useState();\n const [sortDirection, setSortDirection] = useState();\n const [scoresRegion, setScoresRegion] = useState('Worldwide');\n\n const { data, loading, error } = useQuery(\n GetWurDashboardPageQuery,\n {\n variables: {\n releaseNames: ['wur'],\n responseFields: ['LOCATIONS'],\n },\n },\n );\n\n const { releases } = data || {};\n\n const years = useMemo(() => {\n if (!releases) {\n return [];\n }\n return releases\n .reduce((carryYears, release) => {\n if (!release) {\n return carryYears;\n }\n const { year } = release;\n if (year) {\n return [...carryYears, year];\n }\n return carryYears;\n }, [])\n .sort((a, b) => b - a);\n }, [releases]);\n\n const releaseDates = useMemo(() => {\n if (!releases) {\n return {};\n }\n return releases.reduce<{ [key: string]: Date }>((acc, release) => {\n if (!release) {\n return acc;\n }\n const { year, releaseDate } = release;\n if (year) {\n return { ...acc, [year]: new Date(releaseDate) };\n }\n return acc;\n }, {});\n }, [releases]);\n\n const embargoEndDates = useMemo(() => {\n if (!releases) {\n return {};\n }\n return releases.reduce<{ [key: string]: Date }>((acc, release) => {\n if (!release) {\n return acc;\n }\n const { year, embargoEndDate } = release;\n if (year) {\n return { ...acc, [year]: new Date(embargoEndDate) };\n }\n return acc;\n }, {});\n }, [releases]);\n\n const isAfterReleaseDate = useMemo(() => {\n if (!releases) {\n return {};\n }\n return releases.reduce<{ [key: string]: boolean }>((acc, release) => {\n if (!release) {\n return acc;\n }\n const { year, releaseDate } = release;\n if (year) {\n return {\n ...acc,\n [year]: compareAsc(new Date(), new Date(releaseDate)) === 1,\n };\n }\n return acc;\n }, {});\n }, [releases]);\n\n const isAfterEmbargoDate = useMemo(() => {\n if (!releases) {\n return {};\n }\n return releases.reduce<{ [key: string]: boolean }>((acc, release) => {\n if (!release) {\n return acc;\n }\n const { year, embargoEndDate } = release;\n if (year) {\n return {\n ...acc,\n [year]: compareAsc(new Date(), new Date(embargoEndDate)) === 1,\n };\n }\n return acc;\n }, {});\n }, [releases]);\n\n const isAfterFreeEmbargoDate = useMemo(() => {\n if (!releases) {\n return {};\n }\n return releases.reduce<{ [key: string]: boolean }>((acc, release) => {\n if (!release) {\n return acc;\n }\n const { year, freeEmbargoStartDate } = release;\n if (year) {\n return {\n ...acc,\n [year]: compareAsc(new Date(), new Date(freeEmbargoStartDate)) === 1,\n };\n }\n return acc;\n }, {});\n }, [releases]);\n\n const isAfterWurDetailsEmbargoDate = useMemo(() => {\n if (!releases) {\n return {};\n }\n return releases.reduce<{ [key: string]: boolean }>((acc, release) => {\n if (!release) {\n return acc;\n }\n const { year, wurDetailsEmbargoStartDate } = release;\n if (year) {\n return {\n ...acc,\n [year]:\n compareAsc(new Date(), new Date(wurDetailsEmbargoStartDate)) === 1,\n };\n }\n return acc;\n }, {});\n }, [releases]);\n\n const setSelectedYear = useCallback(\n (year: number) => {\n const yearIndex = years.indexOf(year);\n if (yearIndex < 0) {\n throw new Error(`Year (${year}) must be one of ${years.join(',')}`);\n }\n setSelectedYearIndex(yearIndex);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [years],\n );\n\n if (loading) {\n return null;\n }\n\n if (!data || error) {\n throw new Error('There was an error while WUR Dashboard data');\n }\n\n const selectedRelease = data.releases.find(\n (release) => release.year === years[selectedYearIndex],\n );\n const releaseLocations = selectedRelease?.locations;\n\n const continents =\n productLocations?.continents.filter((continent) =>\n releaseLocations?.continents.includes(continent),\n ) || [];\n\n const countries =\n productLocations?.countries.filter((country) =>\n releaseLocations?.countries.includes(country),\n ) || [];\n\n return (\n \n \n {children}\n \n \n );\n};\n\nexport default PageQuery;\n","import PageQuery from './components/PageQuery';\n\nexport default PageQuery;\n\nexport {\n default as PageContext,\n usePageQuery,\n defaultContextValue,\n} from './contexts/PageQueryContext';\n\nexport type { Peer } from './contexts/PageQueryContext';\n","const datapointsPermissions = (action, permissions, institutionId) => {\n if (\n action.startsWith('datapoints') &&\n permissions[institutionId].includes('THE_STAFF_ACCESS_ALL_INSTITUTIONS')\n ) {\n return true;\n }\n\n if (\n action === 'datapoints:userAccess' &&\n permissions[institutionId].some((item) =>\n ['DATAPOINTS_USER', 'THE_STAFF_ACCESS_ALL_INSTITUTIONS'].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n action === 'datapoints:institutionAccess' &&\n permissions[institutionId].some((item) =>\n ['DATAPOINTS_INSTITUTION', 'THE_STAFF_ACCESS_ALL_INSTITUTIONS'].includes(\n item,\n ),\n )\n ) {\n return true;\n }\n\n if (\n action === 'datapoints:assumeActiveInstitution' &&\n permissions[institutionId].includes('DATAPOINTS_INSTITUTION')\n ) {\n return true;\n }\n\n if (action === \"datapoints:viewPage\") {\n const perms = permissions[institutionId];\n return perms && perms.length > 1 && perms.includes(\"DATAPOINTS_USER\");\n }\n\n return false;\n};\n\nmodule.exports = {\n datapointsPermissions,\n};\n","const {\n DATAPLUS_ACTIONS_OVERALL,\n DATAPLUS_ACTIONS,\n DATAPLUS_ACTION_ESSENTIAL,\n DATAPLUS_ACTION_CORE,\n DATAPLUS_ACTION_EMBARGO,\n DATAPLUS_ACTION_FREE_EMBARGO,\n DATAPLUS_ACTION_CORE_EMBARGO,\n DATAPLUS_ACTION_ESSENTIAL_EMBARGO,\n DATAPLUS_ACTION_TABLEAU,\n} = require(\"./constants\");\n\nconst dataplusPermissions = (action, permissions, institutionId, year) => {\n if (\n action === 'dataplus:changePeers' &&\n permissions[institutionId].includes('DATAPLUS_CHANGE_PEERS')\n ) {\n return true;\n }\n\n if (\n DATAPLUS_ACTIONS_OVERALL.includes(action) &&\n permissions[institutionId].some((item) =>\n [\n `DATAPLUS_RELEASE_${year}`,\n `DATAPLUS_ESSENTIAL_${year}`,\n `DATAPLUS_CORE_${year}`,\n `DATAPLUS_EMBARGO_${year}`,\n `DATAPLUS_ADVANCED_${year}`,\n `DATAPLUS_COMPREHENSIVE_${year}`,\n ].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n DATAPLUS_ACTION_ESSENTIAL.includes(action) &&\n permissions[institutionId].some((item) =>\n [`DATAPLUS_ESSENTIAL_${year}`].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n DATAPLUS_ACTION_CORE.includes(action) &&\n permissions[institutionId].some((item) =>\n [`DATAPLUS_CORE_${year}`].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n DATAPLUS_ACTIONS.includes(action) &&\n permissions[institutionId].some((item) =>\n [`DATAPLUS_ADVANCED_${year}`, `DATAPLUS_COMPREHENSIVE_${year}`].includes(\n item,\n ),\n )\n ) {\n return true;\n }\n\n if (\n DATAPLUS_ACTION_EMBARGO.includes(action) &&\n permissions[institutionId].some((item) =>\n [\n `DATAPLUS_ADVANCED_${year}`,\n `DATAPLUS_COMPREHENSIVE_${year}`,\n ].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n DATAPLUS_ACTION_CORE_EMBARGO.includes(action) &&\n permissions[institutionId].some((item) =>\n [`DATAPLUS_CORE_${year}`].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n DATAPLUS_ACTION_ESSENTIAL_EMBARGO.includes(action) &&\n permissions[institutionId].some((item) =>\n [`DATAPLUS_ESSENTIAL_${year}`].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n DATAPLUS_ACTION_FREE_EMBARGO.includes(action) &&\n permissions[institutionId].some((item) =>\n [`DATAPLUS_RELEASE_${year}`].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n action === 'dataplus:export' &&\n permissions[institutionId].some((item) =>\n [\n `WUR_REPORTER_INTERIM_${year}`,\n `DATAPLUS_RELEASE_${year}`,\n `DATAPLUS_ESSENTIAL_${year}`,\n `DATAPLUS_ADVANCED_${year}`,\n `DATAPLUS_COMPREHENSIVE_${year}`,\n ].includes(item)\n )\n ) {\n return true;\n }\n\n if (\n DATAPLUS_ACTION_TABLEAU.includes(action) &&\n permissions[institutionId].some((item) =>\n [`DATAPLUS_COMPREHENSIVE_${year}`].includes(item)\n )\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n dataplusPermissions,\n};\n","const DATAPLUS_ACTIONS_OVERALL = [\n 'dataplus:viewPage',\n 'dataplus:viewPage:overview',\n];\n\nconst DATAPLUS_ACTIONS = [\n 'dataplus:viewPage',\n 'dataplus:viewPage:pillars',\n 'dataplus:viewPage:metrics',\n 'dataplus:viewPage:benchmark-summary',\n 'dataplus:viewPage:bibliometric-analysis',\n 'dataplus:viewPage:detailed-subjects',\n 'dataplus:viewPage:peer-group-analysis',\n 'dataplus:viewPage:subjects',\n 'dataplus:viewPage:year-on-year',\n 'dataplus:viewPage:institution-finder',\n];\n\nconst DATAPLUS_ACTION_ESSENTIAL = [\n 'dataplus:viewPage',\n 'dataplus:viewPage:pillars',\n 'dataplus:viewPage:metrics',\n 'dataplus:viewPage:benchmark-summary',\n 'dataplus:viewPage:bibliometric-analysis',\n 'dataplus:viewPage:institution-finder',\n];\n\nconst DATAPLUS_ACTION_CORE = [\n ...DATAPLUS_ACTION_ESSENTIAL,\n 'dataplus:viewPage:year-on-year',\n];\n\nconst DATAPLUS_ACTION_EMBARGO = [\n 'dataplus:viewPage:overview-embargo',\n 'dataplus:viewPage:pillars-embargo',\n 'dataplus:viewPage:metrics-embargo',\n 'dataplus:viewPage:benchmark-summary-embargo',\n 'dataplus:viewPage:bibliometric-analysis-embargo',\n 'dataplus:viewPage:detailed-subjects-embargo',\n 'dataplus:viewPage:peer-group-analysis-embargo',\n 'dataplus:viewPage:subjects-embargo',\n 'dataplus:viewPage:year-on-year-embargo',\n 'dataplus:viewPage:institution-finder-embargo',\n];\nconst DATAPLUS_ACTION_FREE_EMBARGO = [\n 'dataplus:viewPage:overview-free-embargo',\n 'dataplus:viewPage:pillars-free-embargo',\n 'dataplus:viewPage:metrics-free-embargo',\n 'dataplus:viewPage:benchmark-summary-free-embargo',\n 'dataplus:viewPage:bibliometric-analysis-free-embargo',\n 'dataplus:viewPage:detailed-subjects-free-embargo',\n 'dataplus:viewPage:peer-group-analysis-free-embargo',\n 'dataplus:viewPage:subjects-free-embargo',\n 'dataplus:viewPage:year-on-year-free-embargo',\n 'dataplus:viewPage:institution-finder-free-embargo',\n];\nconst DATAPLUS_ACTION_CORE_EMBARGO = [\n 'dataplus:viewPage:overview-embargo',\n 'dataplus:viewPage:pillars-embargo',\n 'dataplus:viewPage:metrics-embargo',\n 'dataplus:viewPage:benchmark-summary-embargo',\n 'dataplus:viewPage:bibliometric-analysis-embargo',\n 'dataplus:viewPage:year-on-year-embargo',\n 'dataplus:viewPage:institution-finder-embargo',\n];\nconst DATAPLUS_ACTION_ESSENTIAL_EMBARGO = [\n 'dataplus:viewPage:overview-embargo',\n 'dataplus:viewPage:pillars-embargo',\n 'dataplus:viewPage:metrics-embargo',\n 'dataplus:viewPage:benchmark-summary-embargo',\n 'dataplus:viewPage:bibliometric-analysis-embargo',\n 'dataplus:viewPage:institution-finder-embargo',\n];\n\nconst DATAPLUS_ACTION_TABLEAU = [\"dataplus:viewTableauDashboard\"];\n\nmodule.exports = {\n DATAPLUS_ACTION_CORE,\n DATAPLUS_ACTION_ESSENTIAL,\n DATAPLUS_ACTIONS_OVERALL,\n DATAPLUS_ACTIONS,\n DATAPLUS_ACTION_EMBARGO,\n DATAPLUS_ACTION_FREE_EMBARGO,\n DATAPLUS_ACTION_CORE_EMBARGO,\n DATAPLUS_ACTION_ESSENTIAL_EMBARGO,\n DATAPLUS_ACTION_TABLEAU,\n};\n","const {\n WUR_EMBARGO_ACTIONS,\n WUR_VIEW_ACTIONS,\n WUR_OVERALL_ACTIONS,\n WUR_ACTIONS,\n WUR_DATAPLUS_ADVANCED_ACTIONS,\n WUR_ACTIONS_WITHOUT_YEAR,\n} = require('./constants');\n\nconst wurPermissions = (action, permissions, year) => {\n if (\n action.startsWith('wur:') &&\n permissions.includes('THE_STAFF_ACCESS_ALL_INSTITUTIONS')\n ) {\n return true;\n }\n\n if (WUR_ACTIONS_WITHOUT_YEAR.some((wurAction) => action === wurAction) &&\n permissions.some((item) =>\n item.includes('DATAPLUS_ADVANCED') ||\n item.includes('DATAPLUS_COMPREHENSIVE') ||\n item.includes('DATAPLUS_RELEASE') ||\n item.includes('DATAPLUS_ESSENTIAL') ||\n item.includes('DATAPLUS_CORE') ||\n item.includes('DATAPLUS_EMBARGO') ||\n item.includes('DATAPLUS_ADVANCED') ||\n item.includes('WUR_REPORTER_INTERIM')\n )) {\n return true;\n }\n\n if (\n WUR_VIEW_ACTIONS.some((wurAction) => action === wurAction) &&\n permissions.some((item) =>\n [\n `WUR_REPORTER_INTERIM_${year}`,\n `DATAPLUS_RELEASE_${year}`,\n `DATAPLUS_ESSENTIAL_${year}`,\n `DATAPLUS_ADVANCED_${year}`,\n `DATAPLUS_CORE_${year}`,\n `DATAPLUS_COMPREHENSIVE_${year}`,\n `DATAPLUS_EMBARGO_${year}`,\n ].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n WUR_EMBARGO_ACTIONS.some((wurAction) => action === wurAction) &&\n permissions.some((item) =>\n [\n `DATAPLUS_EMBARGO_${year}`,\n ].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n WUR_OVERALL_ACTIONS.some((wurAction) => action === wurAction) &&\n permissions.some((item) =>\n [\n `DATAPLUS_RELEASE_${year}`,\n `DATAPLUS_EMBARGO_${year}`,\n `DATAPLUS_ESSENTIAL_${year}`,\n `DATAPLUS_CORE_${year}`,\n ].includes(item),\n )\n ) {\n return true;\n }\n\n if (\n WUR_ACTIONS.some((wurAction) => action === wurAction) &&\n permissions.includes(`WUR_REPORTER_INTERIM_${year}`)\n ) {\n return true;\n }\n\n if (\n WUR_DATAPLUS_ADVANCED_ACTIONS.some((wurAction) =>\n action === wurAction,\n ) &&\n permissions.some((item) =>\n [`DATAPLUS_ADVANCED_${year}`, `DATAPLUS_COMPREHENSIVE_${year}`].includes(\n item,\n ),\n )\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n wurPermissions,\n};\n","const WUR_ACTIONS_WITHOUT_YEAR = ['wur:viewInstitution'];\n\nconst WUR_EMBARGO_ACTIONS = ['wur:viewEmbargo'];\n\nconst WUR_VIEW_ACTIONS = ['wur:viewRelease', 'wur:viewInstitutionData'];\n\nconst WUR_OVERALL_ACTIONS = [\n 'wur:viewInstitutionGroup',\n 'wur:viewReleaseBanding',\n 'wur:viewSubjectOverall',\n 'wur:viewSubjectResultOverall',\n 'wur:viewSubjectResultScoreOverall',\n 'wur:viewSubjectResultRankOverall',\n 'wur:viewSubjectAggregateDataOverall',\n 'wur:viewPillarOverall',\n 'wur:viewPillarAggregateDataOverall',\n 'wur:viewPillarResultOverall',\n 'wur:viewPillarResultScoreOverall',\n 'wur:viewPillarResultRankOverall',\n 'wur:viewMetricOverall',\n 'wur:viewMetricAggregateDataOverall',\n 'wur:viewMetricResultOverall',\n 'wur:viewMetricResultValueOverall',\n 'wur:viewMetricResultScoreOverall',\n 'wur:viewMetricAggregateDataOverall',\n 'wur:viewInstitutionSubjectData',\n];\n\nconst WUR_ACTIONS = [\n ...WUR_OVERALL_ACTIONS,\n 'wur:viewSubject',\n 'wur:viewSubjectAggregateData',\n 'wur:viewSubjectResult',\n 'wur:viewSubjectResultScore',\n 'wur:viewSubjectResultRank',\n 'wur:viewPillar',\n 'wur:viewPillarAggregateData',\n 'wur:viewPillarResult',\n 'wur:viewPillarResultScore',\n 'wur:viewPillarResultRank',\n 'wur:viewMetric',\n 'wur:viewMetricAggregateData',\n 'wur:viewMetricResult',\n 'wur:viewMetricResultScore',\n 'wur:viewMetricResultValue',\n 'wur:viewMetricResultRank',\n];\n\nconst WUR_DATAPLUS_ADVANCED_ACTIONS = [\n ...WUR_ACTIONS,\n 'wur:viewCluster',\n 'wur:viewClusterResult',\n 'wur:viewDetailedSubject',\n 'wur:viewDetailedSubjectAggregateData',\n 'wur:viewDetailedSubjectMetric',\n 'wur:viewDetailedSubjectResult',\n \"wur:viewDetailedSubjectResultScore\",\n \"wur:viewDetailedSubjectMetricResult\",\n \"wur:viewDetailedSubjectMetricResultScore\",\n 'wur:viewDetailedSubjectMetricAggregateData',\n 'wur:viewBibliometricSubject',\n 'wur:viewBibliometricSubjectResult',\n 'wur:viewBibliometricSubjectAggregateData',\n];\n\nmodule.exports = {\n WUR_EMBARGO_ACTIONS,\n WUR_VIEW_ACTIONS,\n WUR_OVERALL_ACTIONS,\n WUR_ACTIONS,\n WUR_DATAPLUS_ADVANCED_ACTIONS,\n WUR_ACTIONS_WITHOUT_YEAR,\n};\n","const { WUR_REPORTER_INTERIM_ACTIONS, WUR_REPORTER_INTERIM_ACTIONS_WITHOUT_YEAR } = require('./constants');\n\nconst wurReporterInterimPermissions = (\n action,\n permissions,\n year,\n) => {\n if (\n action.startsWith('wurReporterInterim:') &&\n permissions.some((item) =>\n ['DATAPOINTS_DEVELOPER', 'THE_STAFF_ACCESS_ALL_INSTITUTIONS'].includes(\n item,\n ),\n )\n ) {\n return true;\n }\n\n if (\n WUR_REPORTER_INTERIM_ACTIONS.some((wurAction) =>\n action.includes(wurAction),\n ) &&\n permissions.includes(`WUR_REPORTER_INTERIM_${year}`)\n ) {\n return true;\n }\n\n if (\n WUR_REPORTER_INTERIM_ACTIONS_WITHOUT_YEAR.some((exploreAction) => action === exploreAction) &&\n permissions.some((item) =>\n item.includes('WUR_REPORTER_INTERIM')\n )\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n wurReporterInterimPermissions,\n};\n","const WUR_REPORTER_INTERIM_ACTIONS = [\n 'wurReporterInterim:viewRelease',\n];\n\nconst WUR_REPORTER_INTERIM_ACTIONS_WITHOUT_YEAR = [\n 'wurReporterInterim:addScenario',\n 'wurReporterInterim:viewScenario',\n 'wurReporterInterim:editScenario',\n 'wurReporterInterim:archiveScenario',\n 'wurReporterInterim:viewPage',\n];\n\nmodule.exports = {\n WUR_REPORTER_INTERIM_ACTIONS,\n WUR_REPORTER_INTERIM_ACTIONS_WITHOUT_YEAR,\n};\n","const submissionPermissions = (action, permissions, institutionId, year) => {\n if (\n action === 'submission:viewSubmission' &&\n permissions[institutionId].some((item) =>\n [\n `DATAPOINTS_DEVELOPER_${year}`,\n `THE_STAFF_ACCESS_ALL_INSTITUTIONS_${year}`,\n `WUR_REPORTER_INTERIM_${year}`,\n `DATAPLUS_ADVANCED_${year}`,\n `DATAPLUS_COMPREHENSIVE_${year}`,\n ].includes(item),\n )\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n submissionPermissions,\n};\n","const { EXPLORE_ACTIONS, EXPLORE_ACTIONS_WITHOUT_YEAR } = require('./constants');\n\nconst explorePermissions = (action, permissions, year) => {\n if (\n action.startsWith('explore:') &&\n permissions.some((item) =>\n ['DATAPOINTS_DEVELOPER', 'THE_STAFF_ACCESS_ALL_INSTITUTIONS'].includes(\n item,\n ),\n )\n ) {\n return true;\n }\n\n if (\n action === 'explore:viewRelease' &&\n permissions.includes(`DATAPLUS_ADVANCED_${year}`)\n ) {\n return true;\n }\n\n if (\n EXPLORE_ACTIONS.some((exploreAction) => action === exploreAction) &&\n permissions.some((item) =>\n [`DATAPLUS_ADVANCED_${year}`, `DATAPLUS_COMPREHENSIVE_${year}`].includes(\n item,\n ),\n )\n ) {\n return true;\n }\n\n if (\n EXPLORE_ACTIONS_WITHOUT_YEAR.some((exploreAction) => action === exploreAction) &&\n permissions.some((item) =>\n item.includes('DATAPLUS_ADVANCED') || item.includes('DATAPLUS_COMPREHENSIVE')\n )\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n explorePermissions,\n};\n","const EXPLORE_ACTIONS = [\n 'explore:viewPage',\n];\n\nconst EXPLORE_ACTIONS_WITHOUT_YEAR = [\n 'explore:addScenario',\n 'explore:viewScenario',\n 'explore:editScenario',\n 'explore:archiveScenario',\n];\n\nmodule.exports = {\n EXPLORE_ACTIONS,\n EXPLORE_ACTIONS_WITHOUT_YEAR\n};\n","const { AUTH_ACTIONS, AUTH_ALL_ACTIONS } = require('./constants');\n\nconst authPermissions = (action, permissions, institutionId) => {\n if (\n action.startsWith('auth:') &&\n permissions[institutionId].includes('ADMIN_UI_DEVELOPER')\n ) {\n return true;\n }\n\n if (\n AUTH_ALL_ACTIONS.some((authAction) => action.includes(authAction)) &&\n permissions[institutionId].includes('ADMIN_UI_ALL_ORG_MANAGEMENT')\n ) {\n return true;\n }\n\n if (\n AUTH_ACTIONS.some((authAction) => action.includes(authAction)) &&\n permissions[institutionId].includes('ADMIN_UI_ORG_MANAGEMENT')\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n authPermissions,\n};\n","const AUTH_ACTIONS = [\n 'auth:assumeActiveInstitution',\n 'auth:listUsers',\n 'auth:listRoles',\n 'auth:addUser',\n 'auth:setUserRoles',\n 'auth:removeUser',\n];\n\nconst AUTH_ALL_ACTIONS = [\n ...AUTH_ACTIONS,\n 'auth:showOrgProducts',\n 'auth:removeOrgProduct',\n 'auth:addOrgProduct',\n 'auth:findUser',\n 'auth:listProducts',\n 'auth:viewUser',\n];\n\nmodule.exports = {\n AUTH_ACTIONS,\n AUTH_ALL_ACTIONS,\n};\n","const legacyPermissions = (action, permissions, institutionId, year, sdgId) => {\n if (\n action === 'legacy:viewProduct' &&\n permissions[institutionId].some((item) =>\n [\n `IMPACT_EMBARGO_${year}`,\n `SDG_IMPACT_RELEASE_${year}_${sdgId}`,\n `SDG_IMPACT_SUBSCRIPTION_${year}_${sdgId}`,\n `REPUTATION_${year}`,\n `REPUTATION_PLUS_${year}`,\n `JAPAN_RANKINGS_DASHBOARD_${year}`,\n `DATAPLUS_NEW_DATA_${year}`,\n `DATAPLUS_LATAM_${year}`,\n `COUNTRY_INSIGHTS_DASHBOARD_${year}`,\n `COLLEGE_RANKINGS_DASHBOARD_${year}`,\n `THE_STAFF_ACCESS_ALL_INSTITUTIONS`,\n ].includes(item),\n )\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n legacyPermissions,\n};\n","const { SDG_IMPACT_ACTIONS } = require('./constants');\n\nconst sdgImpactPermissions = (\n action,\n permissions,\n institutionId,\n year,\n sdgId,\n) => {\n if (\n action === 'sdgImpact:viewPage:overview' &&\n permissions[institutionId].some(\n (item) =>\n `IMPACT_EMBARGO_${year}` === item ||\n item.includes(`SDG_IMPACT_RELEASE_${year}`) ||\n item.includes(`SDG_IMPACT_SUBSCRIPTION_${year}`),\n )\n ) {\n return true;\n }\n\n if (\n action === 'sdgImpact:viewPage:details' &&\n permissions[institutionId].some((item) =>\n item.includes(`SDG_IMPACT_SUBSCRIPTION_${year}`),\n )\n ) {\n return true;\n }\n\n if (\n SDG_IMPACT_ACTIONS.some((sdgImpactAction) =>\n action.includes(sdgImpactAction),\n ) &&\n permissions[institutionId].some((item) =>\n [\n `IMPACT_EMBARGO_${year}`,\n `SDG_IMPACT_RELEASE_${year}_${sdgId}`,\n `SDG_IMPACT_SUBSCRIPTION_${year}_${sdgId}`,\n ].includes(item),\n )\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n sdgImpactPermissions,\n};\n","const SDG_IMPACT_ACTIONS = ['sdgImpact:viewRelease', 'sdgImpact:viewSdg'];\n\nmodule.exports = {\n SDG_IMPACT_ACTIONS,\n};\n","const { REPUTATION_ACTIONS } = require('./constants');\n\nconst reputationPermissions = (action, permissions, institutionId, year) => {\n if (action === 'reputation:viewProduct' &&\n permissions[institutionId].some(item => item.includes('REPUTATION_'))\n ) {\n return true;\n }\n\n if (\n REPUTATION_ACTIONS.some((reputationAction) =>\n action.includes(reputationAction),\n ) &&\n permissions[institutionId].includes(`REPUTATION_${year}`)\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n reputationPermissions,\n};\n","const REPUTATION_ACTIONS = ['reputation:viewRelease', 'reputation:viewPage'];\n\nmodule.exports = {\n REPUTATION_ACTIONS,\n};\n","const { REPUTATION_PLUS_ACTIONS } = require('./constants');\n\nconst reputationPlusPermissions = (\n action,\n permissions,\n institutionId,\n year,\n) => {\n if (action === 'reputation_plus:viewProduct' &&\n permissions[institutionId].some(item => item.includes('REPUTATION_PLUS'))\n ) {\n return true;\n }\n\n if (\n REPUTATION_PLUS_ACTIONS.some((reputationPlusAction) =>\n action.includes(reputationPlusAction),\n ) &&\n permissions[institutionId].includes(`REPUTATION_PLUS_${year}`)\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n reputationPlusPermissions,\n};\n","const REPUTATION_PLUS_ACTIONS = [\n 'reputation_plus:viewRelease',\n 'reputation_plus:viewPage',\n];\n\nmodule.exports = {\n REPUTATION_PLUS_ACTIONS,\n};\n","const japanRankingsDashboardPermissions = (\n action,\n permissions,\n institutionId,\n year,\n) => {\n if (\n action === 'japanRankingsDashboard:viewPage' &&\n permissions[institutionId].includes(`JAPAN_RANKINGS_DASHBOARD_${year}`)\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n japanRankingsDashboardPermissions,\n};\n","const dataplusNewDataPermissions = (\n action,\n permissions,\n institutionId,\n year,\n) => {\n if (\n action === 'dataplusNewData:viewPage' &&\n permissions[institutionId].includes(`DATAPLUS_NEW_DATA_${year}`)\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n dataplusNewDataPermissions,\n};\n","const dataplusLatamPermissions = (action, permissions, institutionId, year) => {\n if (\n action === 'dataplusLatam:viewPage' &&\n permissions[institutionId].includes(`DATAPLUS_LATAM_${year}`)\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n dataplusLatamPermissions,\n};\n","const cidPermissions = (action, permissions, institutionId, year) => {\n if (\n action === 'cid:viewPage' &&\n permissions[institutionId].includes(`COUNTRY_INSIGHTS_DASHBOARD_${year}`)\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n cidPermissions,\n};\n","const collegeRankingsDashboardPermissions = (\n action,\n permissions,\n institutionId,\n year,\n) => {\n if (\n action === 'collegeRankingsDashboard:viewPage' &&\n permissions[institutionId].some((item) =>\n [\n `COLLEGE_RANKINGS_DASHBOARD_${year}`,\n `COLLEGE_RANKINGS_DASHBOARD_RELEASE_${year}`,\n ].includes(item),\n )\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n collegeRankingsDashboardPermissions,\n};\n","const bundlePermissions = (action, permissions, institutionId) => {\n if (\n action === ('bundle:viewManifest' || 'bundle:viewBundle') &&\n permissions[institutionId].includes(`DATAPOINTS_INSTITUTION`)\n ) {\n return true;\n }\n\n if (\n action.startsWith('bundle:') &&\n permissions[institutionId].some((item) =>\n [`DATAPOINTS_DEVELOPER`, `THE_STAFF_ACCESS_ALL_INSTITUTIONS`].includes(\n item,\n ),\n )\n ) {\n return true;\n }\n\n return false;\n};\n\nmodule.exports = {\n bundlePermissions,\n};\n","import React from 'react';\nimport { Box, BoxProps, Divider, HeadingProps, Text } from '@chakra-ui/react';\nimport Heading from '#coreComponents/Heading';\n\nconst Header = ({ children, ...props }: BoxProps) => (\n \n {children}\n \n \n);\n\nconst Title = (props: HeadingProps) => ;\n\nconst Description = (props: BoxProps) => (\n \n);\n\nconst Card = ({ children, ...props }: BoxProps) => (\n \n {children}\n \n);\n\nCard.Header = Header;\nCard.Title = Title;\nCard.Description = Description;\n\nexport default Card;\n","import React from 'react';\nimport { FormLabel, Select } from '@chakra-ui/react';\nimport { FormData } from './SdgQuiz';\nimport { useResponsive } from '#core/SdgQuiz/utils';\n\nenum Answer {\n YES = 'Yes',\n NO = 'No / don鈥檛 know',\n MAYBE = 'Maybe / partly',\n}\n\ntype QuestionFormItemSelectProps = {\n fieldName: string;\n title: string;\n value: string;\n\n updateFields: (fields: Partial) => void;\n};\n\nexport const QuestionFormItemSelect = ({\n fieldName,\n title,\n value,\n updateFields,\n}: QuestionFormItemSelectProps) => {\n const isMobileScreen = useResponsive();\n\n return (\n <>\n \n\n updateFields({ [fieldName]: e.target.value })}\n >\n \n \n \n \n \n );\n};\n","import { ThemeOverride } from '@chakra-ui/react';\n\nconst themeOverrides: ThemeOverride = {\n breakpoints: {\n base: '0em',\n sm: '30em',\n md: '48em',\n lg: '62em',\n xl: '80em',\n '2xl': '96em',\n '3xl': '110em',\n },\n styles: {\n global: {\n html: {\n boxSizing: 'border-box',\n },\n '*, *:before, *:after': {\n boxSizing: 'inherit',\n },\n body: {\n backgroundColor: 'gray.100',\n },\n button: {\n cursor: 'pointer',\n },\n },\n },\n colors: {\n gray: {\n // these are Chakras greys, each destaturated by 50\n 50: '#f9f9f9',\n 100: '#f2f2f2',\n 200: '#e9e9e9',\n 300: '#d5d5d5',\n 400: '#b0b0b0',\n 500: '#838383',\n 600: '#595959',\n 700: '#3a3a3a',\n 800: '#232323',\n 900: '#1d1d1d',\n },\n success: {\n 50: '#EAFAEF',\n 100: '#C5F2D2',\n 200: '#9FEAB5',\n 300: '#7AE197',\n 400: '#54D97A',\n 500: '#24A148',\n 600: '#25A74B',\n 700: '#1C7D38',\n 800: '#135325',\n 900: '#092A13',\n },\n warning: {\n 50: '#FFF0E5',\n 100: '#FFD5B8',\n 200: '#FFBA8A',\n 300: '#FF9F5C',\n 400: '#FF842E',\n 500: '#FF832C',\n 600: '#CC5400',\n 700: '#993F00',\n 800: '#662A00',\n 900: '#331500',\n },\n error: {\n 50: '#FCE9EA',\n 100: '#F6C1C3',\n 200: '#F0989D',\n 300: '#EB7076',\n 400: '#E54850',\n 500: '#D91F28',\n 600: '#B31921',\n 700: '#861319',\n 800: '#590D10',\n 900: '#2D0608',\n },\n darkBlue: {\n 50: '#F0F1F5',\n 100: '#D4D9E3',\n 200: '#B8C1D1',\n 300: '#9CA8BF',\n 400: '#8090AD',\n 500: '#64789B',\n 600: '#50607C',\n 700: '#3C485D',\n 800: '#28303E',\n 900: '#14181F',\n },\n the: {\n red: '#e40327',\n purple: '#b70d7f',\n blue: '#1b60ab',\n redViolet: '#DE1B7C',\n electricViolet: '#6933F7',\n redOrange: '#FE4537',\n },\n },\n fonts: {\n body: \"'Open Sans', sans-serif\",\n },\n fontSizes: {\n xs: '0.75rem',\n sm: '0.875rem',\n md: '1rem',\n lg: '1.125rem',\n xl: '1.25rem',\n '2xl': '1.5rem',\n '3xl': '1.75rem',\n '4xl': '2rem',\n '5xl': '2.25rem',\n '6xl': '2.5rem',\n '7xl': '2.75rem',\n '8xl': '3rem',\n '9xl': '3.25rem',\n },\n components: {\n Checkbox: {\n defaultProps: {\n colorScheme: 'yellow',\n },\n },\n Select: {\n sizes: {\n sm: {\n field: {\n borderRadius: 'md',\n },\n addon: {\n borderRadius: 'md',\n },\n },\n },\n },\n },\n};\n\nexport default themeOverrides;\n","import React from 'react';\nimport { ChakraProvider, extendTheme } from '@chakra-ui/react';\nimport themeOverrides from './theme';\n\nconst customTheme = extendTheme(themeOverrides);\n\nconst ThemeProvider: React.FC<{}> = ({ children }) => (\n {children}\n);\n\nexport default ThemeProvider;\n","export const AUTH0_DOMAIN = 'dev-0jzuv6tnpwxxioe6.uk.auth0.com';\nexport const AUTH0_CLIENTID = 'mJLmvY2JTE0xsIVujH7BF6m7ZzK5H548';\nexport const AUTH0_REDIRECT_URI =\n 'https://www.timeshighereducation.local/datapoints';\nexport const AUTH0_AUDIENCE =\n 'https://api.timeshighereducation.local/datapoints/graphql';\nexport const AUTH0_SCOPE =\n 'read:user read:current_user update:current_user_metadata read:my_submissions submit:my_submission openid';\n","import { createContext, useContext } from 'react';\n\nexport type User = {\n id: string;\n username: string;\n givenName: string;\n familyName: string;\n name: string;\n email?: string;\n};\n\nexport type PermissionListType = {\n uid: string;\n id: string;\n};\n\nexport type Auth0Data = {\n isAuthenticated?: boolean;\n token: string | null;\n user: User | null;\n groups: string[];\n roles: string[];\n canUseElevatedPermissions: boolean;\n useElevatedPermissions: boolean;\n setUseElevatedPermissions: (useElevatedPermissions: boolean) => void;\n apiHeaders: { [key: string]: string };\n permissionToken: string | null;\n permissionList: PermissionListType[] | null;\n};\n\nexport type Auth0Actions = {\n logIn: any;\n logOut: any;\n};\n\nexport type Auth0Contract = Auth0Data & {\n actions: Auth0Actions;\n};\n\nconst emptyAuth0AuthFunction = (): any => Promise.resolve();\n\nexport const defaultContextValue = {\n isAuthenticated: undefined,\n token: null,\n user: null,\n roles: [],\n groups: [],\n actions: {\n logIn: emptyAuth0AuthFunction,\n logOut: emptyAuth0AuthFunction,\n },\n canUseElevatedPermissions: false,\n useElevatedPermissions: false,\n setUseElevatedPermissions: () => {},\n apiHeaders: {},\n permissionToken: null,\n permissionList: null,\n};\n\nconst AuthContext = createContext({\n ...defaultContextValue,\n});\n\nexport const useAuth0 = () => useContext(AuthContext);\n\nexport default AuthContext;\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { useAuth0 } from '@auth0/auth0-react';\n\nimport { useLocalStorage, usePrevious } from 'react-use';\nimport AuthContext, { PermissionListType } from '../contexts/AuthContext';\nimport CommonPermissions from '#core/Permissions/components/CommonPermissions';\nimport { AUTH0_AUDIENCE, AUTH0_SCOPE } from '#config/auth0Config';\nimport { useAppLoading } from '#core/AppLoading';\nimport { useEnvironment } from '#core/Environment';\nimport getPermissionToken from '#utils/getPermissionToken';\nimport getPermissionList from '#utils/getPermissionList';\n\nconst Auth0Provider: React.FC = ({ children: renderChildren }) => {\n const [auth0AccessToken, setAuth0AccessToken] = useState(null);\n const [permissionToken, setPermissionToken] = useState(null);\n const [permissionList, setPermissionList] = useState<\n PermissionListType[] | null\n >(null);\n const {\n isAuthenticated,\n getAccessTokenSilently,\n user,\n logout,\n loginWithRedirect,\n isLoading,\n } = useAuth0();\n const { setIsLoading } = useAppLoading();\n const { apiEndpoint } = useEnvironment();\n const groups = useMemo(() => user?.groups || ([] as string[]), [\n user?.groups,\n ]);\n const roles = useMemo(\n () => user?.['https://timeshighereducation.com/roles'] || ([] as string[]),\n [user],\n );\n const canUseElevatedPermissions = roles.includes('data_submitter');\n\n const [useElevatedPermissions, setUseElevatedPermissions] = useLocalStorage<\n boolean\n >(`${user?.sub}-use-elevated-permissions`, canUseElevatedPermissions);\n const previousUseElevatedPermisisons = usePrevious(useElevatedPermissions);\n\n useEffect(() => {\n if (useElevatedPermissions !== previousUseElevatedPermisisons) {\n setIsLoading(true);\n }\n }, [useElevatedPermissions, previousUseElevatedPermisisons, setIsLoading]);\n\n // eslint-disable-next-line no-console\n console.log('Auth0 User:', user);\n\n useEffect(() => {\n const getAccessToken = async () => {\n try {\n const accessToken = await getAccessTokenSilently({\n // @ts-expect-error\n audience: AUTH0_AUDIENCE,\n scope: AUTH0_SCOPE,\n });\n\n setAuth0AccessToken(accessToken);\n } catch (e) {\n const error: any = e;\n // eslint-disable-next-line no-console\n console.log('Error: ', error.message);\n }\n };\n\n getAccessToken();\n }, [getAccessTokenSilently]);\n\n useEffect(() => {\n const getPermissionWrapper = async (authToken: string) => {\n const token = await getPermissionToken(apiEndpoint, authToken);\n const list = await getPermissionList(apiEndpoint, authToken);\n\n setPermissionToken(token);\n setPermissionList(list);\n };\n\n if (auth0AccessToken) {\n getPermissionWrapper(auth0AccessToken);\n }\n }, [auth0AccessToken, apiEndpoint]);\n\n const authContextValue: any = useMemo(\n () => ({\n isAuthenticated,\n token: auth0AccessToken,\n apiHeaders: { authorization: `Bearer ${auth0AccessToken}` },\n canUseElevatedPermissions,\n useElevatedPermissions:\n canUseElevatedPermissions && useElevatedPermissions === true,\n setUseElevatedPermissions: canUseElevatedPermissions\n ? setUseElevatedPermissions\n : () => {},\n actions: {\n logIn: loginWithRedirect || (() => Promise.resolve()),\n logOut: () => {\n const fn = logout || (() => Promise.resolve());\n sessionStorage.clear();\n return fn();\n },\n },\n user: {\n ...user,\n id: user?.sub,\n },\n roles,\n groups,\n permissionToken,\n permissionList,\n }),\n [\n isAuthenticated,\n auth0AccessToken,\n setUseElevatedPermissions,\n canUseElevatedPermissions,\n useElevatedPermissions,\n logout,\n loginWithRedirect,\n user,\n roles,\n groups,\n permissionToken,\n permissionList,\n ],\n );\n\n if (typeof isAuthenticated === 'undefined' || isLoading) {\n return null;\n }\n\n return (\n \n \n {renderChildren(authContextValue)}\n \n \n );\n};\n\nexport default Auth0Provider;\n","import React from 'react';\nimport { Auth0Provider } from '@auth0/auth0-react';\nimport {\n AUTH0_DOMAIN,\n AUTH0_REDIRECT_URI,\n AUTH0_AUDIENCE,\n AUTH0_CLIENTID,\n} from '#config/auth0Config';\n\nimport AuthProvider from './Auth0Provider';\n\nconst Auth0: React.FC = (props) => (\n \n \n \n);\n\nexport default Auth0;\n","import React, { useCallback, useMemo, useRef } from 'react';\nimport {\n ApolloClient,\n ApolloLink,\n ApolloProvider as BaseApolloProvider,\n from,\n HttpLink,\n InMemoryCache,\n} from '@apollo/client';\nimport { setContext } from '@apollo/client/link/context';\n\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\nimport { useEnvironment } from '#core/Environment';\nimport { useInstitution } from '#core/Institution';\n\n/*\n NOTE: This provider is used twice in app.tsx, once near the top of tree to get the list of\n institutions available to user and again further down the tree once the Institution context\n has been defined\n\n Be careful when adding something like a websocket connection to this provider or we may\n end up with double the amount of connections\n*/\nconst ApolloProvider: React.FC<{}> = ({ children }) => {\n const { apiEndpoint, graURL } = useEnvironment();\n const { apiHeaders: institutionApiHeaders } = useInstitution();\n const { apiHeaders: authApiHeaders, permissionToken } = useAuth(); // JME2\n\n const authHeadears = useRef({});\n\n authHeadears.current = {\n ...authApiHeaders,\n };\n\n const httpLink = from([\n new HttpLink({\n uri: `//${apiEndpoint}/graphql`,\n }),\n ]);\n\n // TODO: update to real link when generic-ranking-api is ready\n const genericApiLink = from([\n new HttpLink({\n uri: graURL,\n }),\n ]);\n\n const linkCallback = useCallback(\n (_, { headers }) => ({\n headers: {\n ...headers,\n ...authHeadears.current,\n ...institutionApiHeaders,\n },\n }),\n [authHeadears, institutionApiHeaders],\n );\n\n const graLinkCallback = useCallback(\n (_, { headers }) => ({\n headers: {\n ...headers,\n ...authHeadears.current,\n ...institutionApiHeaders,\n 'permissions-token': permissionToken,\n },\n }),\n [authHeadears, institutionApiHeaders, permissionToken],\n );\n\n return useMemo(() => {\n const authLink = setContext(linkCallback);\n const graAuthLink = setContext(graLinkCallback);\n const apolloClient = new ApolloClient({\n link: ApolloLink.split(\n (operation) =>\n operation.getContext().clientName === 'generic-ranking-api' ||\n [\n 'NewReleasePillars',\n 'NewReleaseCrossPillars',\n 'GetNewWURMetricsOveralScores',\n 'GetNewWURMetricsComparison',\n 'GetBibliometricAnalysisPageDetails',\n 'GetBibliometricScores',\n 'GetOverviewSummary',\n 'GetOverviewPerformance',\n 'GetNewLevelDefinitions',\n 'GetChangeOverYear',\n 'GetOverviewPillarScores',\n 'GetBenchmarkSummaryBenchmarkInstitutions',\n 'GetBenchmarkSummaryBenchmarkStatistics',\n 'GetBenchmarkSummaryPeersCards',\n 'NewReleaseSubjects',\n 'NewReleaseIndividualSubject',\n 'GetPeerGroupAnalysisTable',\n 'GetPeerGroupAnalysisCards',\n 'GetYearOnYearChangesInPerformance',\n 'GetYearOnYearContributingFactors',\n 'GetYearOnYearPerformanceDistribution',\n 'GetGRADetailedSubjectsPageDetails',\n 'GetOverallDetailedSubjectScores',\n 'GetDetailedSubjectMetricScores',\n 'WurDashboardPageQuery',\n 'AvailableYears',\n 'GetSubjectAndClusterNames',\n 'GetRankData',\n 'GetAllRankedInstitutions',\n ].includes(operation.operationName),\n graAuthLink.concat(genericApiLink), // <= apollo will send to this if clientName is \"generic-ranking-api\"\n authLink.concat(httpLink), // <= otherwise will send to this\n ),\n cache: new InMemoryCache(),\n });\n return (\n {children}\n );\n }, [linkCallback]); // eslint-disable-line react-hooks/exhaustive-deps\n};\n\nexport default ApolloProvider;\n","import React from 'react';\nimport { LDProvider } from 'launchdarkly-react-client-sdk';\nimport type { ProviderConfig } from 'launchdarkly-react-client-sdk/lib/types';\nimport { useEnvironment } from '#core/Environment';\nimport { useProducts } from '#core/Products';\nimport { useInstitution } from '#core/Institution';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\n\nconst LaunchDarklyProvider: React.FC = ({ children }) => {\n const { user, roles, groups, isAuthenticated } = useAuth(); // JME2\n const { launchDarklyConfig } = useEnvironment();\n const { products } = useProducts();\n const { institution } = useInstitution();\n const enabledProducts = products.reduce(\n (carry, { name, auth: { userHasAccess } }) =>\n userHasAccess ? [...carry, name] : carry,\n [],\n );\n\n if (!launchDarklyConfig.clientSideID) {\n return <>children;\n }\n\n const ldParams: Omit = isAuthenticated\n ? {\n user: {\n key: user?.id,\n name: user?.name,\n email: user?.email,\n custom: {\n authRoles: roles,\n authGroups: groups,\n products: enabledProducts,\n institution: `${institution.institutionId} - ${institution.name}`,\n },\n },\n }\n : {\n user: {\n anonymous: true,\n },\n };\n\n return (\n \n {children}\n \n );\n};\n\nexport default LaunchDarklyProvider;\n","import React from 'react';\nimport { useFlags } from 'launchdarkly-react-client-sdk';\nimport { Flex, Text, Button, ButtonGroup } from '@chakra-ui/react';\nimport { useNavigate } from '@reach/router';\nimport { camelCase } from 'change-case';\nimport Heading from '#coreComponents/Heading';\nimport { useEnvironment } from '#core/Environment';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\n\nconst NotFound: React.FC<{}> = () => {\n const {\n isAuthenticated,\n actions: { logIn },\n } = useAuth(); // JME2\n const { baseUrl } = useEnvironment();\n const navigate = useNavigate();\n const flags = useFlags();\n\n return (\n \n Page Not Found\n It looks like you've found a page that doesn't exist.\n \n navigate(new URL(baseUrl).pathname)}\n >\n {isAuthenticated ? 'Go to my dashboard' : 'Go home'}\n \n {!isAuthenticated && (\n \n flags[camelCase('auth0Enabled')]\n ? logIn()\n : logIn({ redirectUri: baseUrl })\n }\n >\n Log in\n \n )}\n \n \n );\n};\n\nexport default NotFound;\n","import { useEffect } from 'react';\nimport { useLocation } from '@reach/router';\nimport useTracking, { EventType } from '../hooks/useTracking';\n\nconst EventTrackingPageView = ({ payload = {} }) => {\n const { trackEvent } = useTracking();\n const { pathname } = useLocation();\n\n useEffect(() => {\n trackEvent({\n type: EventType.PAGE_VIEW,\n payload: {\n id: pathname,\n ...payload,\n metadata: {\n pathname,\n },\n },\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pathname]);\n /* We only want pathname in this array since we only want to track a view event when the path changes.\n If `trackEvent` is also added to the dependencie array we'll get extra page view events as the user is\n logged in behind the scenes and the dependencies for `trackEvent` change inside `useTracking`. */\n return null;\n};\n\nexport default EventTrackingPageView;\n","import React, { Suspense } from 'react';\nimport { RouteComponentProps } from '@reach/router';\n\nimport { Helmet } from 'react-helmet';\nimport { RequirePermission } from '#core/Permissions';\nimport ErrorBoundary from '#coreComponents/ErrorBoundary';\nimport NotFound from '#core/NotFound';\n\nimport { EventTrackingPage } from '#core/Tracking';\nimport { PageConfig } from '../../config/products';\nimport Loading from '#coreComponents/Loading';\nimport EventTrackingPageView from '#core/Tracking/components/EventTrackingPageView';\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\nimport AccessDeniedErrorScreen from '#coreComponents/ErrorBoundary/AccessDeniedErrorScreen';\n\nexport type PrivateRouteComponentProps = {\n pageConfig: PageConfig;\n auth?: AuthProp;\n upsellComponent?: React.FC<{}>;\n} & RouteComponentProps;\n\nexport type PrivateRouteLayoutProps = {\n pageConfig: PageConfig;\n};\n\ntype AuthProp = {\n action: string;\n};\ninterface PrivateRouteProps extends RouteComponentProps {\n layout?: React.FC | React.FC<{}>;\n layoutConfig?: DeepPartial;\n component: React.FC;\n upsellComponent?: React.FC<{}>;\n path?: string;\n default?: boolean;\n auth?: AuthProp;\n errorBoundaryId: string;\n trackingPageGroup: string;\n trackingPageName: string;\n pageTitle: string;\n}\n\nconst PrivateRoute: React.FC = ({\n layout: Layout = React.Fragment,\n layoutConfig,\n component: Component,\n path,\n auth,\n errorBoundaryId,\n trackingPageGroup,\n trackingPageName,\n upsellComponent,\n pageTitle,\n ...routeProps\n}) => {\n const { isAuthenticated } = useAuth(); // JME2\n\n if (isAuthenticated) {\n return (\n \n \n \n \n \n }>\n {auth ? (\n (\n \n ))\n }\n >\n \n \n ) : (\n \n )}\n \n \n \n \n );\n }\n\n return ;\n};\n\nexport default PrivateRoute;\n","import React, { Suspense } from 'react';\nimport { RouteComponentProps } from '@reach/router';\nimport { Helmet } from 'react-helmet';\nimport { EventTrackingPage } from '#core/Tracking';\nimport ErrorBoundary from '#coreComponents/ErrorBoundary';\nimport Loading from '#coreComponents/Loading';\nimport EventTrackingPageView from '#core/Tracking/components/EventTrackingPageView';\n\ninterface PublicRouteProps extends RouteComponentProps {\n layout?: React.FC<{}>;\n component: React.ComponentType;\n default?: boolean;\n path?: string;\n errorBoundaryId: string;\n trackingPageGroup: string;\n trackingPageName: string;\n pageTitle: string;\n}\n\n/**\n * This component exists solely as a way to keep the API the same between\n * setting public and private routes.\n */\nconst PublicRoute: React.FC = ({\n layout: Layout = React.Fragment,\n component: Component,\n path,\n errorBoundaryId,\n trackingPageGroup,\n trackingPageName,\n pageTitle,\n}) => (\n \n \n \n \n \n }>\n \n \n \n \n \n);\n\nexport default PublicRoute;\n","import React from 'react';\nimport { RouteComponentProps } from '@reach/router';\n\n// JME\n// import { useAuthHook } from '#utils/useAuthHook';\n// JME1\nimport { useAuth } from '#core/Auth';\nimport PrivateRoute from '../PrivateRoute';\nimport PublicRoute from '../PublicRoute';\nimport { PageConfig } from '../../config/products';\n\ninterface PublicAndPrivateRouteProps extends RouteComponentProps {\n privateLayout?: React.FC<{}>;\n publicLayout?: React.FC<{}>;\n layoutConfig?: DeepPartial;\n publicComponent: React.ComponentType;\n privateComponent: React.FC<{ pageConfig: PageConfig } & RouteComponentProps>;\n path?: string;\n default?: boolean;\n auth?: {\n resource: string;\n action: string;\n };\n errorBoundaryId: string;\n productName?: string;\n pageName?: string;\n trackingPageGroup: string;\n privateTrackingPageName: string;\n publicTrackingPageName: string;\n privatePageTitle: string;\n publicPageTitle: string;\n}\n\nconst PublicAndPrivateRoute: React.FC = ({\n privateComponent,\n privateLayout,\n publicComponent,\n publicLayout,\n privateTrackingPageName,\n publicTrackingPageName,\n privatePageTitle,\n publicPageTitle,\n ...props\n}) => {\n const { isAuthenticated } = useAuth(); // JME2\n\n if (isAuthenticated) {\n return (\n \n );\n }\n\n return (\n \n );\n};\n\nexport default PublicAndPrivateRoute;\n","export default __webpack_public_path__ + \"static/media/homepage-header-background.8e527aae.jpg\";","import React from 'react';\nimport { Box, Flex, Button } from '@chakra-ui/react';\nimport Heading from '#coreComponents/Heading';\nimport homeBackgroundImage from '../images/homepage-header-background.jpg';\n\nconst 网曝门Header: React.FC = () => (\n \n \n Global data.\n
\n World universities.\n
\n International insights.\n
\n \n Helping universities through performance analysis & benchmarking.\n \n \n \n Speak to an expert\n \n \n \n);\n\nexport default 网曝门Header;\n","import React from 'react';\nimport { Box, SimpleGrid, Text, VStack } from '@chakra-ui/react';\nimport {\n Binoculars32,\n Activity32,\n ScalesTipped32,\n Earth32,\n} from '@carbon/icons-react';\nimport Heading from '#coreComponents/Heading';\n\nconst info = [\n {\n title: 'Monitor reputation',\n description:\n \"Discover what the world's academics and students think of your institution.\",\n icon: Binoculars32,\n },\n {\n title: 'Demonstrate impact',\n description:\n 'See how your strategy affects your performance on the world stage.',\n icon: Activity32,\n },\n {\n title: 'Support strategic decisions',\n description:\n 'Understand your strengths and weaknesses to maximise your opportunities.',\n icon: ScalesTipped32,\n },\n {\n title: 'Spot new opportunities',\n description:\n 'Find potential collaborators and competitors in a constantly changing landscape',\n icon: Earth32,\n },\n];\n\nconst 网曝门Info = () => (\n \n \n How can the rich data intelligence behind the world's most rigorous and\n trusted ranking of universities help your university improve?\n \n \n {info.map(({ title, description, icon }) => (\n \n \n \n \n \n {description}\n \n \n \n \n ))}\n \n \n);\n\nexport default 网曝门Info;\n","export default __webpack_public_path__ + \"static/media/world_data_customers_v2_0.5c10c518.png\";","import React from 'react';\nimport { Box, Image } from '@chakra-ui/react';\nimport Heading from '#coreComponents/Heading';\n\nimport customersAroundTheWorldImage from '../images/world_data_customers_v2_0.png';\n\nconst 网曝门World = () => (\n \n \n Trusted by universities around the world\n \n \n \n);\n\nexport default 网曝门World;\n","import React from 'react';\nimport { Box, SimpleGrid, Image, Flex } from '@chakra-ui/react';\nimport Heading from '#coreComponents/Heading';\n\nimport australianNationalUniLogo from '../images/australian_national_uni_logo.png';\nimport durhamUniLogo from '../images/durham_uni_logo.png';\nimport emoryUnivLogo from '../images/emory-univ.png';\nimport glasgowLogo from '../images/glasgow_logo.png';\nimport groningenLogo from '../images/groningen_logo-en.png';\nimport johnsHopkinsLogo from '../images/johns_hopkins_logo.png';\nimport lmuMuenchenL from '../images/lmu_muenchen_logo.svg_.png';\nimport lomonosovLogo from '../images/lomonosovlogo.png';\nimport mitLogo from '../images/mit_logo_0.png';\nimport nusLogo from '../images/nus_logo.png';\nimport seolNationalUniLogo from '../images/seol_national_uni_logo.png';\nimport trinityCollegeDublinLogo from '../images/trinity-college-dublin-446-logo.png';\nimport hongKongPolyLogo from '../images/hk_poly_u_logo.png';\nimport ubcLogo from '../images/ubc-logo.png';\nimport uhkLogo from '../images/uhk_logo.png';\nimport universityOfMelbourneLogo from '../images/university_of_melbourne_australia.png';\nimport universityOfTokyoLogo from '../images/university-of-tokyo_logo1.png';\nimport universityOfTorontoLogo from '../images/university-of-toronto.png';\nimport uoaLogo from '../images/uoalogohb.png';\nimport uniOfHelsinkiLogo from '../images/uofhelsinki_logo.png';\nimport usydLogo from '../images/usyd_new_logo.png';\nimport washingtonStLouisLogo from '../images/washington_st_louis_logo.png';\nimport witsLogo from '../images/wits-logo.png';\nimport zhejiangUniversityLogo from '../images/zhejiang_university_logo.svg_.png';\nimport hongKongUniversityOfScienceTechnologyLogo from '../images/hong_kong_university_of_science_technology_0.png';\nimport monterreyInstituteOfTechnologyAndHigherEducationLogo from '../images/monterrey-institute-of-technology-and-higher-educa_0.jpg';\nimport nanyangTechnologicalUniversityLogo from '../images/nanyang_technological_university.jpg';\n\nconst customerLogos = [\n australianNationalUniLogo,\n durhamUniLogo,\n emoryUnivLogo,\n glasgowLogo,\n groningenLogo,\n johnsHopkinsLogo,\n lmuMuenchenL,\n lomonosovLogo,\n mitLogo,\n nusLogo,\n seolNationalUniLogo,\n trinityCollegeDublinLogo,\n hongKongPolyLogo,\n ubcLogo,\n uhkLogo,\n universityOfMelbourneLogo,\n universityOfTokyoLogo,\n universityOfTorontoLogo,\n uoaLogo,\n uniOfHelsinkiLogo,\n usydLogo,\n washingtonStLouisLogo,\n witsLogo,\n zhejiangUniversityLogo,\n hongKongUniversityOfScienceTechnologyLogo,\n monterreyInstituteOfTechnologyAndHigherEducationLogo,\n nanyangTechnologicalUniversityLogo,\n];\n\nconst 网曝门Customers = () => (\n \n \n Our customers include:\n \n \n {customerLogos.map((logo) => (\n \n \n \n ))}\n \n \n);\n\nexport default 网曝门Customers;\n","export default __webpack_public_path__ + \"static/media/australian_national_uni_logo.3236057c.png\";","export default __webpack_public_path__ + \"static/media/durham_uni_logo.83bb9fb4.png\";","export default __webpack_public_path__ + \"static/media/emory-univ.60006b70.png\";","export default __webpack_public_path__ + \"static/media/glasgow_logo.60d203d6.png\";","export default __webpack_public_path__ + \"static/media/groningen_logo-en.7ccafeac.png\";","export default __webpack_public_path__ + \"static/media/johns_hopkins_logo.5c006f4d.png\";","export default __webpack_public_path__ + \"static/media/lmu_muenchen_logo.svg_.0b96df27.png\";","export default __webpack_public_path__ + \"static/media/lomonosovlogo.217acddc.png\";","export default __webpack_public_path__ + \"static/media/mit_logo_0.9b4d985d.png\";","export default __webpack_public_path__ + \"static/media/nus_logo.c37d06f2.png\";","export default __webpack_public_path__ + \"static/media/seol_national_uni_logo.ad479d9e.png\";","export default __webpack_public_path__ + \"static/media/trinity-college-dublin-446-logo.cef5ebc9.png\";","export default __webpack_public_path__ + \"static/media/hk_poly_u_logo.fb8648e4.png\";","export default __webpack_public_path__ + \"static/media/ubc-logo.7467e335.png\";","export default __webpack_public_path__ + \"static/media/uhk_logo.928034d9.png\";","export default __webpack_public_path__ + \"static/media/university_of_melbourne_australia.ffd7097f.png\";","export default __webpack_public_path__ + \"static/media/university-of-tokyo_logo1.7c7ea94b.png\";","export default __webpack_public_path__ + \"static/media/university-of-toronto.adb377e7.png\";","export default __webpack_public_path__ + \"static/media/uoalogohb.1e859b48.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAACBCAYAAAAYC2neAAAZNUlEQVR4nO3df7BcZX3H8bfL9jZzJ3PnTuaWYRgmjREzMUWK+KMUEYFCZBARKSKlSJEqFWxFEbUK6jAZi5YiRaGUUkQFC4KoIIIIGkREfshvEIhJiEEhJBDCJSTh5t5r//jszp5z9pzdc86evWf37uc18wzk7tmzz+6ePc/v7/MqBlMV+CWwMMNzxoE3Axu7kiMzMxso1bIzUKJRYCzD8UNApUt5MTOzAeMCxczMrAQugM3MzErgAtjMzKwELoDNzMxK4ALYzMysBC6AzczMSuAC2MzMrAQugM3MzErgAtjMzKwELoDNzMxKMMihKLcBmzMcvxmY7lJezMxswLyq7AyUKE/lY7LwXJiZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZWU8Y5EAcSXYGjkOBOqZRBKx1wMpackQsMzOzLjkU2AD8MZK2AvcCZwP7AXNKyp+Zmdms9SbiC+F6mgJ+C5yBWs1mZmZWkANRqzepEK6nF4CzgHnlZNPMzPrNDmVnoI0h4DXAW4GDULfvXwOLgT9DY9ibUWu0G1YDc4F92hw3p3bM+9F48aOoYDYzM+sr84FlwGPAKyS3PF8BVgEXAwfQne0Vd6R1V3Rc1/RlwGgX8mJmZtY184HvAM+SvtCrpweBYyi+IL4kR14eBXYtOB9mZmZdNxc4AriLbAXfFPALYM8C83JcxjzU01PAWwrMh5mZ2YwZAk4DtpOt8HsZ+BhQKSAPB2Z87WDagGZUm5mZ9aUjSTcjOZquAcY6fO0jcrxuMD0DLOowD2ZmZqU5lXwF4MNo5nRey3K+bjDdjydmmZlZn6oCN5K/K/jwHK85DDyR8zWj6eIcr29mZtYTFpOvK/qPaBz5bDTBK61/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0tzJZeC7MzGwgDWoBXAXuBRZmeM448HpgY1dyZGZmAyVPK3C2mIN2OUprGi8dMjOzgrhAMTMzK4ELYDMzsxK4ADYzMyuBC2AzM7MSuAA2MzMrgQtgMzOzErgANjMzK4ELYDMzsxK4ADYzMyuBC2AzM7MSDHIoyk3AcxmOH0fhKM3MzDr2/weELvieDXesAAAAAElFTkSuQmCC\"","export default __webpack_public_path__ + \"static/media/usyd_new_logo.2d7bb7f6.png\";","export default __webpack_public_path__ + \"static/media/washington_st_louis_logo.80919d1c.png\";","export default __webpack_public_path__ + \"static/media/wits-logo.153f789f.png\";","export default __webpack_public_path__ + \"static/media/zhejiang_university_logo.svg_.02c1bb50.png\";","export default __webpack_public_path__ + \"static/media/hong_kong_university_of_science_technology_0.c52c0169.png\";","export default __webpack_public_path__ + \"static/media/monterrey-institute-of-technology-and-higher-educa_0.b8d8bd35.jpg\";","export default __webpack_public_path__ + \"static/media/nanyang_technological_university.bfac10e3.jpg\";","import React, { Fragment } from 'react';\nimport { Box, Text, Flex } from '@chakra-ui/react';\nimport { Quotes32 } from '@carbon/icons-react';\n\nconst quotes = [\n {\n quote:\n 'There is no world department of education, but Times Higher Education is doing a real service to universities by developing definitions and data that can be used for comparison and understanding.',\n person: 'Lydia Snover',\n position: 'Director of institutional research',\n institution: 'Massachusetts Institute of Technology',\n },\n {\n quote:\n 'Data gives us a view on how the world perceives us, and a perspective not readily available elsewhere.',\n person: 'Sunny Kwong',\n position: 'Director of planning',\n institution: 'Chinese University of Hong Kong',\n },\n];\n\nconst Seperator = () => (\n \n);\n\nconst 网曝门Quotes = () => (\n \n \n {quotes.map(({ quote, person, position, institution }, i) => (\n \n {i > 0 && }\n \n \n \n \n {quote}\n \n \n {person}\n \n \n {position}, {institution}\n \n \n \n \n \n ))}\n \n \n);\n\nexport default 网曝门Quotes;\n","import React, { useEffect, useMemo, useRef } from 'react';\nimport { RouteComponentProps, useLocation } from '@reach/router';\nimport { Box, Button, Container, Link, VStack } from '@chakra-ui/react';\n\nimport 网曝门Header from './网曝门Header';\nimport 网曝门Info from './网曝门Info';\nimport 网曝门World from './网曝门World';\nimport 网曝门Customers from './网曝门Customers';\nimport 网曝门Quotes from './网曝门Quotes';\n\nconst 网曝门: React.FC = () => {\n const { state: locationState } = useLocation();\n const productRef = useRef(null);\n const customersRef = useRef(null);\n const otherServicesRef = useRef(null);\n const requestDemoFormRef = useRef(null);\n const scrollRefs: Record<\n string,\n React.RefObject | undefined\n > = useMemo(\n () => ({\n product: productRef,\n customers: customersRef,\n otherServices: otherServicesRef,\n demo: requestDemoFormRef,\n }),\n [],\n );\n useEffect(() => {\n if (typeof locationState === 'object' && locationState !== null) {\n const state = locationState as {\n scrollTo?: string | null;\n };\n if (!state.scrollTo) {\n return;\n }\n const scrollToRef = scrollRefs[state.scrollTo];\n if (scrollToRef) {\n setTimeout(() => {\n window.scrollTo({\n left: 0,\n top: scrollToRef.current?.offsetTop,\n behavior: 'smooth',\n });\n }, 0);\n }\n }\n }, [locationState, scrollRefs]);\n return (\n <>\n \n \n \n <网曝门Header />\n <网曝门Info />\n \n \n Download Brochure\n \n \n <网曝门World />\n \n <网曝门Customers />\n \n <网曝门Quotes />\n \n Download case studies\n \n \n Enquire Now\n \n \n \n \n \n );\n};\n\nexport default 网曝门;\n","import React, { ReactElement } from 'react';\nimport { Box, Text, Flex } from '@chakra-ui/react';\nimport { CarbonIconType } from '@carbon/icons-react';\nimport Heading from '#coreComponents/Heading';\nimport Card from '#coreComponents/Card';\n\nconst DashboardPageCard: React.FC<{\n title: string;\n text: string | ReactElement<{}>;\n color: string;\n icon: CarbonIconType;\n}> = ({ icon, title, text, color }) => {\n const borderLeftColor = `the.${color}`;\n\n return (\n \n \n \n \n \n \n \n \n \n {text}\n
\n \n \n );\n};\n\nexport default DashboardPageCard;\n","import React from 'react';\nimport { CarbonIconType } from '@carbon/icons-react';\nimport { Link } from '@reach/router';\nimport DashboardPageCard from './DashboardPageCard';\n\nconst ProductCard: React.FC<{\n icon: CarbonIconType;\n name: string;\n description: string;\n path: string;\n color: string;\n}> = ({ icon, name, description, color, path }) => (\n \n \n \n);\n\nexport default ProductCard;\n","import React from 'react';\nimport { useQuery } from '@apollo/client';\nimport { Flex } from '@chakra-ui/react';\nimport { useInstitution } from '#core/Institution';\nimport Topbar from '#coreComponents/Topbar';\nimport { GetRankDataQuery } from '#types/generated/graphql';\nimport {\n getWurRankingData,\n wurRankingDataQuery,\n} from '#coreComponents/ProductTopbar/wurRankingQuery';\nimport { formatBandedValue } from '#utils/formatUtils';\nimport SettingsButton from './SettingsButton';\nimport { useDataplusEmbargoData } from '../../Embargo/contexts/DataplusEmbargoContext';\nimport { DataPlusEmbargoProvider } from '../../Embargo/components/DataPlusEmbargoProvider';\nimport PageQuery from '#core/PageQuery';\n\nconst DashboardTopbar: React.FC = () => {\n const {\n institution: { name: myInstitutionName, institutionId: myInstitutionId },\n } = useInstitution();\n\n const { availableSelectedYear } = useDataplusEmbargoData();\n\n const queryResult = useQuery(\n getWurRankingData,\n wurRankingDataQuery(availableSelectedYear, myInstitutionId),\n );\n\n const wurBanding = queryResult.data?.release?.level1?.result?.rank;\n\n return (\n \n \n \n \n \n );\n};\n\nconst DashboardEmbargoTopBar = () => (\n \n \n \n \n \n);\n\nexport default DashboardEmbargoTopBar;\n","import React from 'react';\nimport { Link, Button, Flex, Box } from '@chakra-ui/react';\nimport { CarbonIconType, Download20 } from '@carbon/icons-react';\nimport Heading from '#coreComponents/Heading';\nimport Card from '#coreComponents/Card';\nimport { EventType, useTracking } from '#core/Tracking';\n\ntype ServiceCardProps = {\n name: string;\n downloadUrl: string;\n icon: CarbonIconType;\n};\n\nconst ServiceCard: React.FC = ({\n name,\n downloadUrl,\n icon,\n}) => {\n const { trackEvent } = useTracking();\n\n const onClick = () => {\n const fileExt = downloadUrl.split('.').pop();\n trackEvent({\n type: EventType.DOWNLOAD,\n payload: { id: downloadUrl, fileType: fileExt || 'marketing' },\n });\n };\n\n return (\n \n \n \n \n \n {name}\n \n \n\n \n }\n px={6}\n >\n Download\n \n \n \n \n );\n};\n\nexport default ServiceCard;\n","import React from 'react';\nimport { SimpleGrid, Box } from '@chakra-ui/react';\nimport {\n Finance32,\n Star32,\n Portfolio32,\n Collaborate32,\n} from '@carbon/icons-react';\nimport Section from '#coreComponents/Section';\nimport ServiceCard from '#coreComponents/ServiceCard';\n\nconst services = [\n {\n name: 'THE DataPoints: Data-driven strategic success',\n icon: Finance32,\n downloadUrl:\n 'https://datapoints-static-files.s3.eu-west-1.amazonaws.com/files/the_datapoints.pdf',\n },\n {\n name: 'THE Branding Solutions: Global profile and visibility',\n icon: Star32,\n downloadUrl:\n 'https://datapoints-static-files.s3.eu-west-1.amazonaws.com/files/the_branding_solutions.pdf',\n },\n {\n name: 'THE Hiring Solutions: Find the talent you need',\n icon: Portfolio32,\n downloadUrl:\n 'https://datapoints-static-files.s3.eu-west-1.amazonaws.com/files/the_hiring_solutions.pdf',\n },\n {\n name: 'THE Consultancy Services: Strategy and expert guidance',\n icon: Collaborate32,\n downloadUrl:\n 'https://datapoints-static-files.s3.eu-west-1.amazonaws.com/files/the_consultancy.pdf',\n },\n];\n\nconst OtherServices = () => (\n
\n \n Other Services\n \n \n {services.map((serviceProps) => (\n \n ))}\n \n
\n);\n\nexport default OtherServices;\n","import React from 'react';\nimport { RouteComponentProps, Link as InternalLink } from '@reach/router';\nimport { SimpleGrid, Box, Link as ExternalLink } from '@chakra-ui/react';\n\nimport { useProducts } from '#core/Products';\n\nimport { EventTrackingSection } from '#core/Tracking';\nimport Heading from '#coreComponents/Heading';\nimport Section from '#coreComponents/Section';\nimport ProductCard from './ProductCard';\nimport DashboardTopbar from './DashboardTopbar';\nimport OtherServices from './OtherServices';\nimport { usePermissions } from '#core/Permissions';\nimport AccessDeniedErrorScreen from '#coreComponents/ErrorBoundary/AccessDeniedErrorScreen';\nimport { useInstitution } from '#core/Institution';\n\nconst footerLinks = [\n {\n text: 'Cookie Policy',\n url: '/cookie-policy',\n },\n {\n text: 'Privacy Policy',\n url: '/privacy-policy',\n },\n {\n text: 'Accessibility Statement',\n url:\n '/content/online-accessibility-statement',\n },\n {\n text: 'Terms and Conditions',\n url: '/terms-and-conditions',\n },\n {\n text: 'FAQs',\n url: '/datapoints/faqs',\n },\n];\n\nconst Dashboard: React.FC = () => {\n const { hasResourcePermissionNew } = usePermissions();\n const { products } = useProducts();\n const { institution } = useInstitution();\n\n const canViewDashboard = hasResourcePermissionNew({\n action: 'datapoints:viewPage',\n institutionId: institution.institutionId,\n });\n\n if (!canViewDashboard) {\n return (\n \n );\n }\n\n return (\n \n \n\n \n \n \n
\n \n Your services\n \n \n {products.map(\n (product) =>\n !product.productConfig.isDevProduct && (\n \n ),\n )}\n \n
\n
\n
\n\n \n \n \n \n \n
\n\n \n {footerLinks.map(({ text, url }, index) => (\n \n {url.startsWith('/') && !url.startsWith('//') ? (\n {text}\n ) : (\n \n {text}\n \n )}\n \n ))}\n \n
\n );\n};\n\nexport default Dashboard;\n","import React from 'react';\nimport {\n Box,\n Text,\n UnorderedList,\n ListItem,\n Link,\n Stack,\n} from '@chakra-ui/react';\nimport Heading from '#coreComponents/Heading';\n\nexport const faqs: { question: string; answer: React.ReactNode }[] = [\n {\n question: 'What tools and data can I access through THE DataPoints?',\n answer: (\n <>\n \n THE DataPoints provides access to tools and data to understand your\n institution鈥檚 individual performance based on THE World University\n Rankings and other data, and to allow you to understand your relative\n performance based on a comparison with your peers or benchmark sets.\n \n \n THE WUR Dashboard is a toolset that focuses on THE World University\n Rankings. It illuminates performance patterns within the sector,\n giving you insight into potential collaborators or competitors by\n investigating the actual performance on research, teaching, knowledge\n transfer and internationalisation metrics in a global context.\n \n \n The data provided reflects both the data published on the THE website,\n but also more detailed data examining each of the metrics that\n underpin performance.\n \n \n ),\n },\n {\n question:\n 'How does Times Higher Education compile the data behind THE DataPoints?',\n answer: (\n \n In 2025, the data for THE WUR Dashboard was drawn from on information\n from over 2,800 institutions, 157 million citations and 18 million\n publications and over 93,000 academic survey responses that form the\n backbone of the prestigious World University Rankings. This data is\n submitted via our portal, through the Times Higher Education reputation\n survey, and the Scopus dataset provided by Elsevier. We clean and\n transform this data to create the 18 metrics that feed into the 5\n pillars of the rankings to give you an accurate and credible picture of\n your global performance.\n \n ),\n },\n {\n question:\n 'What breadth of the global higher education market is covered by THE DataPoints?',\n answer: (\n \n Times Higher Education has expanded its data coverage to include 2,800\n institutions for the World University Rankings 2025 (published in\n October 2024). We are committed to increasing our global view year on\n year to ensure our data products remain the most complete in the world.\n \n ),\n },\n {\n question: 'How many benchmark institutions can I select?',\n answer: (\n \n The quantity varies with your subscription package, from none up to 50.\n We can also help you in choosing a benchmark group that is relevant to\n your needs.\n \n ),\n },\n {\n question: 'Can I download data from THE WUR Dashboard?',\n answer: (\n \n All data included in your subscription is available to download to\n Microsoft Excel from THE DataPoints\n \n ),\n },\n {\n question:\n 'How can I use THE WUR Dashboard to assess the differences between my university and my competitors?',\n answer: (\n \n As part of a THE WUR Dashboard subscription we make available scores and\n values for both your university and those of your selected peers across\n the 5 pillars and the 18 metrics of the THE World University Rankings.\n With these you can assess the actual difference, not only the distance\n in scores, in each individual metric, between yourselves and your peers.\n The data is provided graphically, where appropriate, as well as in\n tabular form, and can also be downloaded into Microsoft Excel format for\n your own analysis.\n \n ),\n },\n {\n question:\n 'How is the similarity of my university to my selected peers determined?',\n answer: (\n \n When we use Similarity in the THE WUR Dashboard we\n calculate it directly from the difference between two scores. A lower\n distance means higher similarity.\n \n ),\n },\n {\n question:\n 'What is meant by 鈥渦ser defined groups鈥 and how are they determined?',\n answer: (\n \n The user defined groups are universities that themselves nominate to\n help them understand their performance relative to their peers. However,\n unlike the benchmark institutions, the university would not see the\n individual performance data of the members of the target and stretch\n groups. Instead they will see the distribution of the performance data\n of the groups e.g. 25% percentile, median, 75% percentile etc. Clients\n can either choose pre-defined groupings such as the Association of\n American University, Russell Group etc, or they can hand pick their own\n groups.\n \n ),\n },\n {\n question: 'How many users can access my subscription',\n answer: (\n \n Again, the number of logins available for your institution will vary\n according to your subscription level. We can help you think about the\n number of logins that would be sensible for your purposes.\n \n ),\n },\n {\n question: 'How is the citation data normalised by subject-area?',\n answer: (\n \n In each of the 334 detailed subjects in Scopus, we calculate the average\n number of citations across the time period (for the relevant paper\n types). We find each paper that any academic affiliated with university\n X has written in the time period. For each paper we calculate how the\n number of citations compares to the average number in that subject. For\n example if the average number is 20 and this paper has 10 then it scores\n 0.5. If it has 25 then it scores 1.25. We average the scores for every\n paper across the whole university.\n \n ),\n },\n];\n\nconst Faqs = () => (\n \n \n Frequently Asked Questions\n \n \n These Frequently Asked Questions apply to Times Higher Education鈥檚\n flagship performance analysis and benchmarking platform, THE DataPoints.\n \n \n For information on our university rankings methodologies, please see the\n Times Higher Education website:\n \n \n \n \n Times Higher Education World University Rankings Methodology\n \n \n \n \n {faqs.map(({ question, answer }) => (\n \n \n {question}\n \n {answer}\n \n ))}\n \n \n);\nexport default Faqs;\n","/* eslint-disable no-plusplus */\nimport { useMediaQuery } from '@chakra-ui/media-query';\nimport { SdgCategory } from '#core/SdgQuiz/types';\nimport contentJson from '#core/SdgQuiz/utils/content.json';\n\nexport const extractSdgs = (content: Record): string[] =>\n Object.keys(content)\n .filter((keyName: string) => keyName.startsWith('sdg'))\n .map((keyName: string) => keyName.replace('sdg', ''));\n\nexport const countSdgs = (content: any): number =>\n Object.keys(content).filter((key: string) => key.startsWith('sdg')).length;\n\nexport const countTotalQuestions = (currentContent: any): number =>\n Object.values(currentContent).reduce(\n (acc: number, curr: any) => acc + curr.length,\n 0,\n );\n\nexport const countFilledSdgs = (data: any, sdgNumber: number): number => {\n const sdgPrefix = `sdg${sdgNumber}`;\n\n return Object.keys(data).filter(\n (key: string) => key.startsWith(sdgPrefix) && data[key] !== '',\n ).length;\n};\n\nexport const countAnswersPoints = (\n data: Record,\n sdgNumber: number,\n): number => {\n const sdgPrefix = `sdg${sdgNumber}`;\n\n return Object.entries(data).reduce((totalScore, [key, value]) => {\n if (key.startsWith(sdgPrefix)) {\n if (value === 'Yes') {\n return totalScore + 1;\n }\n\n if (value.includes('Maybe')) {\n return totalScore + 0.5;\n }\n }\n return totalScore;\n }, 0);\n};\n\nexport const calculatePercentage = (numerator: number, denominator: number) => {\n if (denominator === 0) {\n return 0;\n }\n\n return (numerator / denominator) * 100;\n};\n\nexport const countParticipatedSDGs = (data: any) => {\n const uniqueSDG = new Set();\n Object.keys(data).forEach((key: any) => {\n if (key.startsWith('sdg')) {\n const sdgNumber = key.match(/\\d+/)[0];\n uniqueSDG.add(sdgNumber);\n }\n });\n\n return uniqueSDG.size;\n};\n\nexport const calculateSDGRelevance = (\n content: Record,\n data: Record,\n numberOfSdgs: number,\n) => {\n const relevance: {\n relevant: number[];\n partialRelevant: number[];\n notRelevant: number[];\n skipped: number[];\n } = {\n relevant: [],\n partialRelevant: [],\n notRelevant: [],\n skipped: [],\n };\n\n for (let i = 0; i < numberOfSdgs; i++) {\n const sdgNumber = i + 1;\n const currentContent = content[`sdg${sdgNumber}`]?.questions || [];\n const totalQuestionsCount = countTotalQuestions(currentContent);\n const numberOfFilledSdgs = countFilledSdgs(data, sdgNumber);\n\n const areAllFieldsFilledIn = numberOfFilledSdgs === totalQuestionsCount;\n\n const answersPoints = countAnswersPoints(data, sdgNumber);\n\n const percentage = areAllFieldsFilledIn\n ? calculatePercentage(answersPoints, totalQuestionsCount)\n : -1;\n\n const { relevancePercentages } = content;\n\n if (percentage > relevancePercentages.medium) {\n relevance.relevant.push(sdgNumber);\n } else if (\n percentage > relevancePercentages.low &&\n percentage <= relevancePercentages.medium\n ) {\n relevance.partialRelevant.push(sdgNumber);\n } else if (percentage >= 0 && percentage <= relevancePercentages.low) {\n relevance.notRelevant.push(sdgNumber);\n } else {\n relevance.skipped.push(sdgNumber);\n }\n }\n\n return relevance;\n};\n\nexport const formSdgCategories = (data: any): SdgCategory[] => {\n const filteredData: any = {};\n\n Object.keys(data).forEach((key: string) => {\n if (key.startsWith('sdg')) {\n const { category } = data[key];\n filteredData[category] = filteredData[category] || {\n categoryTitle: category,\n numberOfSdgsPerCategory: 0,\n imgSpritePositionsMobile: [],\n imgSpritePositionsDesktop: [],\n };\n filteredData[category].numberOfSdgsPerCategory++;\n filteredData[category].imgSpritePositionsMobile.push(\n data[key].imgSpritePositionMobileLarge,\n );\n filteredData[category].imgSpritePositionsDesktop.push(\n data[key].imgSpritePositionDesktop,\n );\n }\n });\n\n return Object.values(filteredData);\n};\n\nexport const useResponsive = () => {\n const [isMobileScreen] = useMediaQuery(\n `(max-width: ${contentJson.imgContainerSizes.containerWidthMobile})`,\n );\n return isMobileScreen;\n};\n","import React from 'react';\nimport { Flex, Text } from '@chakra-ui/react';\nimport { useResponsive } from '#core/SdgQuiz/utils';\n\ntype SdgIndicatorProps = {\n label: string;\n value: string;\n color: string;\n};\n\nconst SdgIndicator = ({ label, value, color }: SdgIndicatorProps) => {\n const isMobileScreen = useResponsive();\n\n return (\n \n \n {label}\n \n \n {value}\n \n \n );\n};\n\nexport default SdgIndicator;\n","import React from 'react';\nimport { Text } from '@chakra-ui/react';\nimport SdgIndicator from './SdgIndicator';\nimport contentJson from '../utils/content.json';\n\nconst content: any = contentJson;\n\ntype SdgItemWithIndicatorsProps = {\n sdgNumber: number;\n};\n\nexport const SdgItemWithIndicators = ({\n sdgNumber,\n}: SdgItemWithIndicatorsProps) => {\n const currentContent = content[`sdg${sdgNumber}`];\n return (\n <>\n \n \n \n\n \n Ranking size\n \n\n \n \n );\n};\n","import React from 'react';\nimport { Link, Text } from '@chakra-ui/react';\nimport { FormData } from './SdgQuiz';\nimport { useResponsive } from '#core/SdgQuiz/utils';\n\ntype SkipSdgProps = {\n data: any;\n sdgNumber: number;\n\n updateFields: (fields: Partial, reset: boolean) => void;\n handleNext: () => void;\n};\n\nexport const SkipSdg = ({\n data,\n sdgNumber,\n updateFields,\n handleNext,\n}: SkipSdgProps) => {\n const handleSkipSdg = () => {\n const updatedFields: any = {};\n\n Object.keys(data).forEach((key) => {\n if (!key.startsWith(`sdg${sdgNumber}`)) {\n updatedFields[key] = data[key];\n }\n });\n\n updateFields(updatedFields, true);\n\n handleNext();\n };\n\n const isMobileScreen = useResponsive();\n\n return (\n \n Skip this SDG\n \n );\n};\n","export default __webpack_public_path__ + \"static/media/sdg-sprite.d7aebf0d.png\";","import React from 'react';\nimport { Flex } from '@chakra-ui/react';\nimport sdgSprite from '../images/sdg-sprite.png';\n\ntype SdgImageContainerProps = {\n bgPosition: string;\n bgSize: string;\n imgWidth: string;\n imgHeight: string;\n relevanceType?: string;\n};\n\nexport const SdgImageContainer = ({\n bgPosition,\n bgSize,\n imgWidth,\n imgHeight,\n relevanceType,\n}: SdgImageContainerProps) => (\n \n);\n","import React from 'react';\nimport { Flex, Heading, Text } from '@chakra-ui/react';\nimport Card from '#coreComponents/Card';\nimport { SkipSdg } from './SkipSdg';\nimport { FormData } from './SdgQuiz';\nimport { SdgImageContainer } from './SdgImageContainer';\nimport contentJson from '../utils/content.json';\nimport { useResponsive } from '#core/SdgQuiz/utils';\n\nconst content: any = contentJson;\n\ntype SdgHeaderCardProps = {\n data: any;\n sdgNumber: number;\n\n updateFields: (fields: Partial) => void;\n handleNext: () => void;\n};\n\nconst SdgHeaderCard = ({\n data,\n sdgNumber,\n updateFields,\n handleNext,\n}: SdgHeaderCardProps) => {\n const currentContent = content[`sdg${sdgNumber}`];\n\n const isMobileScreen = useResponsive();\n\n return (\n \n \n {isMobileScreen ? (\n \n \n\n \n {currentContent.title}\n
\n \n ) : (\n \n {currentContent.title}\n \n )}\n \n {currentContent.description}\n \n\n \n \n \n );\n};\n\nexport default SdgHeaderCard;\n","import React from 'react';\nimport { Divider, Text } from '@chakra-ui/react';\nimport Card from '#coreComponents/Card';\nimport Heading from '#coreComponents/Heading';\nimport { FormData } from './SdgQuiz';\nimport { QuestionFormItemSelect } from './QuestionFormItemSelect';\nimport contentJson from '../utils/content.json';\nimport { useResponsive } from '#core/SdgQuiz/utils';\n\nconst content: any = contentJson;\n\ntype QuestionFormItemProps = {\n sdgNumber: number;\n sdgType: string;\n data: any;\n\n updateFields: (fields: Partial) => void;\n};\n\nexport const QuestionFormItem = ({\n sdgNumber,\n sdgType,\n data,\n updateFields,\n}: QuestionFormItemProps) => {\n const currentContent = content?.questionTypeData[sdgType];\n\n const questions = content[`sdg${sdgNumber}`].questions[sdgType];\n\n const isMobileScreen = useResponsive();\n\n return (\n \n \n {currentContent?.title}\n \n\n \n {currentContent?.content}\n \n\n \n\n {questions.map(\n (question: { title: string; content: string }, idx: number) => {\n const key = `sdg${sdgNumber}_${sdgType}_${idx + 1}`;\n return (\n \n );\n },\n )}\n \n );\n};\n","import React from 'react';\nimport { Button, ButtonProps } from '@chakra-ui/react';\nimport { useResponsive } from '../utils';\n\ntype QuizBtnProps = ButtonProps & {\n children: React.ReactNode;\n onClick: () => void;\n};\n\nexport const QuizBtn: React.FC = ({\n children,\n onClick,\n ...rest\n}: QuizBtnProps) => {\n const isMobileScreen = useResponsive();\n\n return (\n \n {children}\n \n );\n};\n","export default __webpack_public_path__ + \"static/media/lamp.95043e41.svg\";","import React from 'react';\nimport { Flex, Heading, Text } from '@chakra-ui/react';\nimport Card from '#coreComponents/Card';\nimport lampSvg from '../images/lamp.svg';\nimport contentJson from '../utils/content.json';\nimport { useResponsive } from '#core/SdgQuiz/utils';\n\nconst content: any = contentJson;\n\ntype RelevanceProps = {\n percentage: number;\n};\n\nexport const Relevance = ({ percentage }: RelevanceProps) => {\n const isMobileScreen = useResponsive();\n\n const { relevancePercentages, finalRelevance } = content;\n\n let relevance;\n\n if (percentage <= relevancePercentages.low) {\n relevance = finalRelevance.notRelevant;\n }\n\n if (\n percentage > relevancePercentages.low &&\n percentage <= relevancePercentages.medium\n ) {\n relevance = finalRelevance.partialRelevant;\n }\n\n if (percentage > relevancePercentages.medium) {\n relevance = finalRelevance.relevant;\n }\n\n return (\n \n \n \n \n\n \n \n {relevance.itemTitle}\n \n\n \n {relevance.itemDescription}\n \n \n \n \n \n );\n};\n","import React, { useMemo } from 'react';\nimport { Flex, FormControl } from '@chakra-ui/react';\nimport SdgHeaderCard from './SdgHeaderCard';\nimport { FormData } from './SdgQuiz';\nimport { QuestionFormItem } from './QuestionFormItem';\nimport contentJson from '../utils/content.json';\nimport { QuizBtn } from './QuizBtn';\nimport { SkipSdg } from './SkipSdg';\nimport { Relevance } from './Relevance';\nimport {\n calculatePercentage,\n countAnswersPoints,\n countFilledSdgs,\n countSdgs,\n countTotalQuestions,\n useResponsive,\n} from '../utils';\n\ntype QuestionsFormProps = {\n sdgNumber: number;\n data: any;\n\n updateFields: (fields: Partial) => void;\n handleNext: () => void;\n handleBack: () => void;\n};\n\nexport const QuestionsForm = ({\n sdgNumber,\n data,\n\n updateFields,\n handleNext,\n handleBack,\n}: QuestionsFormProps) => {\n const content: any = contentJson;\n const currentContent = content[`sdg${sdgNumber}`].questions;\n\n const isMobileScreen = useResponsive();\n\n const numberOfSdgs = useMemo(() => countSdgs(content), [content]);\n\n const totalQuestionsCount = useMemo(\n () => countTotalQuestions(currentContent),\n [currentContent],\n );\n\n const numberOfFilledSdgs = countFilledSdgs(data, sdgNumber);\n\n const areAllFieldsFilledIn = numberOfFilledSdgs === totalQuestionsCount;\n\n const answersPoints = countAnswersPoints(data, sdgNumber);\n\n const percentage = areAllFieldsFilledIn\n ? calculatePercentage(answersPoints, totalQuestionsCount)\n : 0;\n\n return (\n \n \n\n \n {Object.keys(currentContent).map((questionType) => (\n \n ))}\n \n\n {areAllFieldsFilledIn && }\n\n \n {!isMobileScreen && sdgNumber > 1 && (\n Back to SDG {sdgNumber - 1}\n )}\n {sdgNumber < numberOfSdgs ? (\n \n Continue to SDG {sdgNumber + 1}\n \n ) : (\n \n Finish\n \n )}\n \n\n \n \n \n \n );\n};\n","import React from 'react';\nimport {\n Accordion,\n AccordionButton,\n AccordionIcon,\n AccordionItem,\n AccordionPanel,\n Text,\n} from '@chakra-ui/react';\nimport { SdgItemWithIndicators } from './SdgItemWithIndicators';\n\ntype IndicatorsAccordionProps = {\n sdgNumber: number;\n};\n\nexport const IndicatorsAccordion = ({\n sdgNumber,\n}: IndicatorsAccordionProps) => (\n \n \n \n \n Data that will be required from your institution\n \n\n \n \n\n \n \n \n \n \n);\n","import React from 'react';\nimport { Flex, Link, Text } from '@chakra-ui/react';\nimport { ChevronLeft24 } from '@carbon/icons-react';\nimport { SdgItemWithIndicators } from './SdgItemWithIndicators';\nimport { QuestionsForm } from './QuestionsForm';\nimport { FormData } from './SdgQuiz';\nimport { IndicatorsAccordion } from './IndicatorsAccordion';\nimport { SdgImageContainer } from './SdgImageContainer';\nimport contentJson from '../utils/content.json';\nimport { PageData } from '../types';\nimport { useResponsive } from '#core/SdgQuiz/utils';\n\nconst content: any = contentJson;\n\ntype QuestionPageProps = {\n sdgNumber: number;\n data: PageData;\n\n updateFields: (fields: Partial) => void;\n handleNext: () => void;\n handleBack: () => void;\n};\n\nexport const QuestionPage = ({\n sdgNumber,\n data,\n\n updateFields,\n handleNext,\n handleBack,\n}: QuestionPageProps) => {\n const currentContent = content[`sdg${sdgNumber}`];\n\n const isMobileScreen = useResponsive();\n\n return (\n \n {isMobileScreen && sdgNumber > 1 ? (\n \n {' '}\n \n \n Back to SDG {sdgNumber - 1}\n \n \n ) : null}\n\n {isMobileScreen ? (\n \n ) : (\n \n \n\n \n Data that will be required from your institution\n \n\n \n \n )}\n\n \n \n );\n};\n","import React from 'react';\nimport {\n Divider,\n Flex,\n FormControl,\n FormLabel,\n Heading,\n Input,\n Link,\n Select,\n Text,\n} from '@chakra-ui/react';\nimport Card from '#coreComponents/Card';\nimport { QuizBtn } from './QuizBtn';\nimport { FormData, IsValidType } from './SdgQuiz';\nimport contentJson from '../utils/content.json';\nimport { PageData } from '#core/SdgQuiz/types';\nimport { useResponsive } from '#core/SdgQuiz/utils';\n\nconst content: any = contentJson;\n\ntype StartPageProps = {\n data: PageData;\n isValid: IsValidType;\n updateFields: (fields: Partial) => void;\n handleNext: (isFormSubmit?: boolean) => void;\n};\n\nexport const StartPage = ({\n data,\n isValid,\n updateFields,\n handleNext,\n}: StartPageProps) => {\n const isMobileScreen = useResponsive();\n\n return (\n \n \n Which of our Impact Rankings are the most relevant to your activities?\n \n\n \n \n We鈥檒l need a few details for you to continue\n \n\n \n This will help us share your results with you\n \n\n \n\n \n First name\n updateFields({ firstName: e.target.value })}\n />\n\n {!isValid.firstName && (\n \n First name is required\n \n )}\n\n Surname\n updateFields({ surname: e.target.value })}\n />\n\n {!isValid.surname && (\n \n Surname is required\n \n )}\n\n Your institution\n updateFields({ institutionName: e.target.value })}\n />\n\n {!isValid.institutionName && (\n \n Institution name is required\n \n )}\n\n Your role\n updateFields({ role: e.target.value })}\n >\n {content.startPage.roles.map((role: string) => (\n \n ))}\n \n\n {!isValid.role && (\n \n Role is required\n \n )}\n\n Your country\n updateFields({ country: e.target.value })}\n >\n {content.startPage.countries.map((country: string) => (\n \n ))}\n \n\n {!isValid.role && (\n \n Role is required\n \n )}\n\n Your work email\n updateFields({ email: e.target.value })}\n />\n\n {!isValid.email && (\n \n Email is required\n \n )}\n \n \n\n handleNext(true)}>Get started\n\n \n {content.startPage.privacyPolicyText}{' '}\n \n {content.startPage.privacyPolicyLink}\n \n \n \n );\n};\n","export default __webpack_public_path__ + \"static/media/the-logo.eeb6b48f.png\";","export default __webpack_public_path__ + \"static/media/top-line.70978575.svg\";","import React from 'react';\nimport { Flex } from '@chakra-ui/react';\nimport { useResponsive } from '#core/SdgQuiz/utils';\n\ntype SdgCategoryHeaderProps = {\n title: string;\n backgroundColor: string;\n color: string;\n};\n\nexport const SdgCategoryHeader = ({\n title,\n backgroundColor,\n color,\n}: SdgCategoryHeaderProps) => {\n const isMobileScreen = useResponsive();\n\n return (\n \n \n \n );\n};\n","import React, { useMemo } from 'react';\nimport { Box, Flex, Heading, Link, Text } from '@chakra-ui/react';\nimport { QuizBtn } from './QuizBtn';\nimport { SdgCategoryHeader } from './SdgCategoryHeader';\nimport { SdgImageContainer } from './SdgImageContainer';\nimport { formSdgCategories, useResponsive } from '../utils';\nimport contentJson from '../utils/content.json';\nimport { SdgCategory } from '#core/SdgQuiz/types';\n\nconst content: any = contentJson;\n\ntype InfoPageProps = {\n handleNext: () => void;\n};\n\nexport const InfoPage = ({ handleNext }: InfoPageProps) => {\n const isMobileScreen = useResponsive();\n\n const sdgCategories: SdgCategory[] = useMemo(\n () => formSdgCategories(content),\n [],\n );\n\n return (\n \n \n \n {content.startPage.title}\n \n \n {content.startPage.firstParagraph.firstPart}\n \n {content.startPage.firstParagraph.secondPart}\n \n \n\n \n {content.startPage.secondParagraph}\n \n Take the quiz\n \n\n \n {sdgCategories.map((sdgCategory: SdgCategory) => (\n \n \n\n \n {(isMobileScreen\n ? sdgCategory.imgSpritePositionsMobile\n : sdgCategory.imgSpritePositionsDesktop\n ).map((imgSpritePosition: string) => (\n \n \n \n ))}\n \n \n ))}\n\n Take the quiz\n \n \n );\n};\n","import React, { useEffect } from 'react';\nimport { Flex, Heading, Link, Text } from '@chakra-ui/react';\nimport { SdgCategoryHeader } from './SdgCategoryHeader';\nimport { SdgImageContainer } from './SdgImageContainer';\nimport { FormData } from './SdgQuiz';\nimport { calculateSDGRelevance, countSdgs, useResponsive } from '../utils';\nimport contentJson from '../utils/content.json';\n\nconst content: any = contentJson;\n\ntype FinishPageProps = {\n data: any;\n updateFields: (fields: Partial) => void;\n};\n\nexport const FinishPage = ({ data, updateFields }: FinishPageProps) => {\n const numberOfSdgs = countSdgs(content);\n\n const sdgRelevance = calculateSDGRelevance(content, data, numberOfSdgs);\n\n const isMobileScreen = useResponsive();\n\n useEffect(() => {\n updateFields({\n results_very_relevant: sdgRelevance.relevant.join(','),\n results_partly_relevant: sdgRelevance.partialRelevant.join(','),\n results_not_very_relevant: sdgRelevance.notRelevant.join(','),\n results_skipped: sdgRelevance.skipped.join(','),\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n \n \n You鈥檙e done! You will receive your results soon\n \n \n A member of the team will be in touch to discuss how we can help you\n achieve your sustainability goals through our data analysis platform.\n \n\n \n In the meantime, learn more about the{' '}\n \n SDG Impact Dashboard\n {' '}\n or watch our recent{' '}\n \n Impact participation masterclass\n \n .\n \n \n\n \n {Object.entries(sdgRelevance).map(([relevanceType, sdgs]) =>\n sdgs.length ? (\n \n \n\n \n {content.finalRelevance[relevanceType].finishDescription}\n \n\n \n {sdgs.map((sdg) => (\n \n ))}\n \n \n ) : null,\n )}\n \n \n );\n};\n","import React, { useEffect, useState } from 'react';\nimport { Box, Flex, Link } from '@chakra-ui/react';\nimport axios from 'axios';\nimport { QuestionPage } from './QuestionPage';\nimport { StartPage } from './StartPage';\nimport theLogo from '../images/the-logo.png';\nimport topLineSvg from '#core/SdgQuiz/images/top-line.svg';\nimport { InfoPage } from './InfoPage';\nimport { FinishPage } from './FinishPage';\nimport { extractSdgs, useResponsive } from '../utils';\nimport contentJson from '../utils/content.json';\nimport { PageData } from '#core/SdgQuiz/types';\nimport { useEnvironment } from '#core/Environment';\nimport { useAuth } from '#core/Auth';\nimport useLogger from '#hooks/useLogger';\n\nconst content: any = contentJson;\n\nexport type FormData = {\n firstName: string;\n surname: string;\n role: string;\n country: string;\n email: string;\n institutionName: string;\n results_very_relevant?: string;\n results_partly_relevant?: string;\n results_not_very_relevant?: string;\n results_skipped?: string;\n};\n\nexport type IsValidType = {\n [key: string]: boolean;\n};\n\nconst SdgQuiz = () => {\n const { apiEndpoint } = useEnvironment();\n const { apiHeaders: authApiHeaders, permissionToken } = useAuth(); // JME2\n const sdgs: string[] = extractSdgs(content);\n const [pageIndex, setPageIndex] = useState(0);\n const pages = [StartPage, InfoPage, ...sdgs, FinishPage];\n const logger = useLogger();\n\n const isMobileScreen = useResponsive();\n\n const INITIAL_DATA: PageData = {\n firstName: '',\n surname: '',\n role: '',\n country: '',\n email: '',\n institutionName: '',\n };\n\n const [data, setData] = useState(INITIAL_DATA);\n\n const [isValid, setIsValid] = useState({\n firstName: true,\n surname: true,\n role: true,\n country: true,\n email: true,\n institutionName: true,\n });\n\n const handleNext = (isUserForm = false) => {\n if (isUserForm) {\n const isAllFieldsValid = Object.values(data).every((value) => value);\n\n if (!isAllFieldsValid) {\n Object.entries(data).forEach(([key, value]) => {\n if (value === '') {\n setIsValid((prev) => ({\n ...prev,\n [key]: false,\n }));\n }\n });\n\n return;\n }\n }\n\n setPageIndex((index) => Math.min(index + 1, pages.length - 1));\n\n window.scrollTo(0, 0);\n };\n\n const handleBack = () => {\n setPageIndex((index) => Math.max(index - 1, 0));\n\n window.scrollTo(0, 0);\n };\n\n const updateFields = (incomingData: any, reset = false) => {\n const incomingDataKeys = Object.keys(incomingData);\n\n if (incomingDataKeys.length > 0) {\n const [fieldName, fieldValue] = Object.entries(incomingData)[0];\n\n if (fieldName in isValid) {\n setIsValid((prev) => ({\n ...prev,\n [fieldName]: Boolean(fieldValue),\n }));\n }\n }\n\n setData((prev: any) =>\n reset ? incomingData : { ...prev, ...incomingData },\n );\n };\n\n const CurrentPageComponent =\n typeof pages[pageIndex] === 'string' ? QuestionPage : pages[pageIndex];\n\n const sdgNumber =\n typeof pages[pageIndex] === 'string' ? Number(pages[pageIndex]) : 0;\n\n useEffect(() => {\n const sendData = async () => {\n try {\n await axios.post(`https://${apiEndpoint}/sdg-quiz`, data, {\n headers: {\n ...authApiHeaders,\n 'permissions-token': permissionToken,\n },\n });\n } catch (error) {\n logger.error(`Error sending data: ${error}`);\n }\n };\n\n if (pageIndex === pages.length - 1 && 'results_very_relevant' in data) {\n // Actual final data log\n // eslint-disable-next-line no-console\n console.log('FINAL DATA', data);\n sendData();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pageIndex, data]);\n\n const currentContent = content[`sdg${sdgNumber}`];\n\n return (\n \n \n\n \n \n\n 0\n ? currentContent.aboutLink\n : '/world-university-rankings/impact-rankings-2024-methodology'\n }\n >\n {sdgNumber > 0 ? content.aboutLinkSdgs : content.startPage.aboutLink}\n \n \n\n \n \n \n {pageIndex + 1} / {pages.length}\n \n\n \n \n \n \n );\n};\n\nexport default SdgQuiz;\n","import React from 'react';\nimport { Router, useLocation } from '@reach/router';\nimport { mergeDeepRight } from 'ramda';\nimport { useProducts } from '#core/Products';\nimport PrivateRoute from '#coreComponents/PrivateRoute';\nimport PublicAndPrivateRoute from '#coreComponents/PublicAndPrivateRoute';\nimport { PrivateLayout, PublicLayout } from '#coreComponents/Layout';\nimport 网曝门 from './features/core/网曝门';\nimport Dashboard from './features/core/Dashboard';\nimport NotFound from './features/core/NotFound';\nimport Faqs from '#core/Faqs';\nimport SdgQuiz from '#core/SdgQuiz';\n\nconst ScrollTopOnRouteChange: React.FC<{ path: string }> = ({ children }) => {\n const location = useLocation();\n React.useEffect(() => window.scrollTo(0, 0), [location.pathname]);\n return <>{children};\n};\n\nconst PrivateRouteLayout: React.FC<{}> = ({ children }) => (\n \n {children}\n \n);\n\nconst RouterComponent = () => {\n const { products } = useProducts();\n\n const notFoundRoute = (\n \n );\n // eslint-disable-next-line no-process-env\n const basepath = process.env.PUBLIC_URL;\n return (\n <>\n \n \n {notFoundRoute}\n\n \n\n \n\n \n\n {products.map(({ pageQuery: PageQuery, ...product }) => {\n const pages = product.pages.map((page) => {\n const layoutConfig = mergeDeepRight(\n { ...product.productConfig, parentPath: product.path },\n page.pageConfig || {},\n );\n\n return (\n \n );\n });\n\n if (PageQuery) {\n return (\n \n {notFoundRoute}\n {pages}\n \n );\n }\n\n return pages;\n })}\n \n \n \n );\n};\n\nexport default RouterComponent;\n","import React from 'react';\nimport {\n Box,\n Alert,\n AlertIcon,\n AlertTitle,\n AlertDescription,\n CloseButton,\n} from '@chakra-ui/react';\n\nconst UpdateNotification: React.FC<{ dismissMessage: () => void }> = ({\n dismissMessage,\n}) => (\n \n \n \n A new version of Datapoints is available.\n \n Refresh your browser to update, or click to dismiss this message.\n \n \n \n \n);\n\nexport default UpdateNotification;\n","import React, { useState, useCallback, useEffect } from 'react';\nimport axios from 'axios';\nimport { useCounter, useInterval, usePrevious } from 'react-use';\nimport { useEnvironment, getBuildInfo } from '#core/Environment';\nimport UpdateNotification from './UpdateNotification';\nimport useLogger from '#hooks/useLogger';\n\nconst AppUpdateNotification: React.FC<{\n checkInterval?: number;\n failedChecksThreshold?: number;\n}> = ({ checkInterval = 1000 * 60 * 50, failedChecksThreshold = 1 }) => {\n const { baseUrl, version: appVersion } = useEnvironment();\n const logger = useLogger();\n const [version, setVersion] = useState(appVersion);\n const previousVersion = usePrevious(version);\n const [checkEnabled, setCheckEnabled] = useState(true);\n const [failedChecks, { inc: countFailedCheck }] = useCounter();\n const [showUpdateMessage, setShowUpdateMessage] = useState(false);\n\n const hideUpdateMessage = useCallback(() => setShowUpdateMessage(false), [\n setShowUpdateMessage,\n ]);\n\n const checkForUpdate = useCallback(async () => {\n try {\n const { data } = await axios.get(baseUrl);\n const htmlEl = document.createElement('html');\n htmlEl.innerHTML = data;\n const { version: versionFromRequest } = getBuildInfo(htmlEl);\n if (versionFromRequest === '') {\n throw new Error('Unable to find version from request');\n }\n if (version !== versionFromRequest) {\n setVersion(versionFromRequest);\n }\n } catch (e) {\n logger.warn(`Version check failed`);\n logger.warn(e);\n // dont immediately fail since it's possible we got an error due to a new version being deployed at exactly the same time we check\n if (failedChecks >= failedChecksThreshold) {\n logger.warn(\n `Failed version checks ${failedChecks} >= threshold of ${failedChecksThreshold}, stopping version checks`,\n );\n setCheckEnabled(false);\n } else {\n countFailedCheck();\n }\n }\n }, [\n baseUrl,\n countFailedCheck,\n failedChecks,\n failedChecksThreshold,\n logger,\n version,\n ]);\n\n useEffect(() => {\n if (\n appVersion !== version ||\n (typeof previousVersion !== 'undefined' && previousVersion !== version)\n ) {\n setShowUpdateMessage(true);\n }\n }, [appVersion, previousVersion, version]);\n\n useInterval(checkForUpdate, checkEnabled ? checkInterval : null);\n\n return showUpdateMessage ? (\n \n ) : null;\n};\n\nexport default AppUpdateNotification;\n","import { useEnvironment } from '#core/Environment';\n\nconst NewRelic = () => {\n const {\n newRelicConfig: { accountId: accountID, appId: applicationID, licenseKey },\n } = useEnvironment();\n\n if (\n [accountID, applicationID, licenseKey].every(\n (config) => typeof config !== 'undefined' && config !== null,\n )\n ) {\n window.NREUM.loader_config = {\n accountID,\n trustKey: accountID,\n agentID: applicationID,\n licenseKey,\n applicationID,\n };\n window.NREUM.info = {\n beacon: 'bam.eu01.nr-data.net',\n errorBeacon: 'bam.eu01.nr-data.net',\n licenseKey,\n applicationID,\n sa: 1,\n };\n }\n\n return null;\n};\n\nexport default NewRelic;\n","import React from 'react';\nimport { createHistory, LocationProvider } from '@reach/router';\nimport { QueryClient, QueryClientProvider } from 'react-query';\nimport { Helmet } from 'react-helmet';\nimport { useFlags } from 'launchdarkly-react-client-sdk';\nimport { camelCase } from 'change-case';\nimport { EventTrackingApp, MzTracking } from '#core/Tracking';\nimport Auth from '#core/Auth';\nimport Auth0 from '#core/Auth0';\nimport Environment from '#core/Environment';\nimport ApolloProvider from '#providers/ApolloProvider';\nimport LaunchDarklyProvider from '#providers/LaunchDarklyProvider';\nimport Permissions from '#core/Permissions';\nimport Institution from '#core/Institution';\nimport Years from '#core/Years';\nimport Products from '#core/Products';\nimport ErrorBoundary from '#coreComponents/ErrorBoundary';\nimport ErrorBoundaryFooter from '#coreComponents/ErrorBoundary/ErrorBoundaryFooter';\nimport AccessDeniedErrorScreen from '#coreComponents/ErrorBoundary/AccessDeniedErrorScreen';\nimport AppLoading, { FinishedLoading } from '#core/AppLoading';\nimport QueryBuilderProvider from '#core/QueryBuilderContext';\n// import DevTooling from '#core/DevTooling';\nimport Router from './Router';\nimport AppUpdateNotification from '#core/AppUpdateNotification';\nimport NewRelic from '#core/NewRelic';\n\nconst queryClient = new QueryClient();\n\nconst AuthenticatedApp = () => (\n // re-add LaunchDarklyProvider now we're authenticated\n \n \n {/* */}\n \n (\n \n )}\n footerComponent={ErrorBoundaryFooter}\n id=\"institution\"\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nconst UnAuthenticatedApp = () => (\n \n \n \n \n \n \n \n);\n\nconst App = () => {\n const flags = useFlags();\n const AuthComponent = flags[camelCase('auth0Enabled')] ? Auth0 : Auth;\n\n return (\n \n \n \n \n \n \n \n \n \n \n {({ isAuthenticated = false }) =>\n isAuthenticated ? (\n \n ) : (\n \n )\n }\n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n","import 'react-app-polyfill/ie11';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport ChartThemeProvider from '#providers/ChartThemeProvider';\nimport ThemeProvider from './providers/ThemeProvider';\nimport App from './App';\n\n// eslint-disable-next-line no-process-env\nif (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line global-require\n const { worker } = require('./mocks');\n\n worker.start({\n serviceWorker: {\n url: '/datapoints/mockServiceWorker.js',\n },\n });\n\n if (window.location.hostname === 'localhost') {\n window.location.replace(\n 'https://www.timeshighereducation.local/datapoints/',\n );\n }\n\n // eslint-disable-next-line global-require\n require('@axe-core/react')(React, ReactDOM, 1000, {\n runOnly: {\n type: 'tag',\n values: ['wcag2a', 'wcag2aa'],\n },\n });\n}\n\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root'),\n);\n","import { createContext, useContext } from 'react';\n\nexport type PermissionsContract = {\n resources: Record>;\n refetchPermissions?: () => void;\n hasResourcePermission: (\n resource: string | string[],\n actions: string | string[],\n requireAny?: boolean,\n ) => boolean;\n hasResourcePermissionNew: ({\n action,\n year,\n institutionId,\n sdgId,\n }: {\n action: string;\n year?: number;\n institutionId: string;\n sdgId?: number;\n }) => boolean;\n hasRole: (role: string | string[], requireAny?: boolean) => boolean;\n hasClientRole: (\n client: string,\n role: string | string[],\n requireAny?: boolean,\n ) => boolean;\n hasGroup: (role: string | string[], requireAny?: boolean) => boolean;\n // Need to sort the return typing later...\n getUserAvailableYearsForProduct: (\n institutionId: string,\n partialProductName: string,\n ) => any;\n};\n\nexport const defaultContextValue = {\n hasResourcePermission: () => false,\n hasResourcePermissionNew: () => false,\n hasRole: () => false,\n hasClientRole: () => false,\n hasGroup: () => false,\n global: {},\n resources: {},\n getUserAvailableYearsForProduct: () => null,\n};\n\nconst PermissionsContext = createContext({\n ...defaultContextValue,\n});\n\nexport const usePermissions = () => useContext(PermissionsContext);\n\nexport default PermissionsContext;\n","/* eslint-disable no-console */\nimport { EventType, useTracking } from '#core/Tracking';\n\nexport type Logger = {\n info: (message: string) => void;\n error: (message: string | Error) => void;\n warn: (message: string) => void;\n log: (message: string) => void;\n};\n\nconst useLogger = (): Logger => {\n const { trackEvent } = useTracking();\n return {\n info: (message: string) => {\n console.info(message);\n },\n\n error: (message: string | Error) => {\n console.error(message);\n trackEvent({\n type: EventType.ERROR,\n payload: {\n id: typeof message === 'string' ? 'error' : message.name,\n type: typeof message === 'string' ? 'error' : message.name,\n message: typeof message === 'string' ? message : message.message,\n },\n });\n if (message instanceof Error) {\n setTimeout(() => {\n document.dispatchEvent(\n new CustomEvent('datapoints-error', { detail: message }),\n );\n }, 0);\n }\n },\n\n warn: (message: string) => {\n console.warn(message);\n },\n\n log: (message: string) => {\n console.log(message);\n },\n };\n};\n\nexport default useLogger;\n","import { createContext } from 'react';\n\nexport enum PageType {\n PAGE = 'page',\n PRODUCT = 'product',\n}\nexport interface TrackingContextData {\n applicationName?: string;\n pageGroup?: string;\n page?: string;\n type?: PageType;\n section?: string;\n}\n\nexport const defaultContextValue = {};\n\nexport default createContext({ ...defaultContextValue });\n","import { createContext, useContext } from 'react';\n\nexport interface ErrorBoundaryContextData {\n crumbs: string[];\n}\n\nexport const defaultContextValue = {\n crumbs: [],\n};\n\nconst ErrorBoundaryContext = createContext({\n ...defaultContextValue,\n});\n\nexport const useErrorBoundaryContext = () => useContext(ErrorBoundaryContext);\n\nexport default ErrorBoundaryContext;\n","import React, { ReactNode } from 'react';\nimport type { FallbackProps } from 'react-error-boundary';\nimport { Text, Flex, Link, Box } from '@chakra-ui/react';\nimport { ApolloError } from '@apollo/client';\nimport Heading from '#coreComponents/Heading';\nimport TheLogo from '#coreComponents/logos/TheLogo';\nimport { usePermissions } from '#core/Permissions';\n\ntype FallbackPropsWithLogout = FallbackProps & {\n id: string;\n footerComponent?: React.FC<{}>;\n};\n\nconst errorSuffix =\n 'Our team has been notified and is working to resolve the issue.';\n\nexport const getErrorTitle = (\n id: string,\n error: Error | undefined,\n isDeveloper: boolean,\n): string => {\n if (error instanceof ApolloError) {\n const apolloError = error as ApolloError;\n if (apolloError.networkError) {\n return isDeveloper\n ? `${id}: Network Error`\n : 'There was an error connecting to the server';\n }\n if (apolloError.graphQLErrors.length > 0) {\n return isDeveloper\n ? `${id}: GraphQL Error ${JSON.stringify(apolloError.graphQLErrors)}`\n : 'There was an error querying for data';\n }\n }\n return isDeveloper\n ? `${id}: ${error?.name || 'No Error'}`\n : 'There was an error loading Datapoints';\n};\n\nexport const getErrorMessage = (\n id: string,\n error: Error | undefined,\n isDeveloper: boolean,\n): string | ReactNode => {\n if (error instanceof ApolloError) {\n const apolloError = error as ApolloError;\n if (apolloError.networkError) {\n return isDeveloper\n ? `Network Error: ${apolloError.networkError.message}`\n : `There was an error connecting to the Datapoints server, please try refreshing the app. ${errorSuffix}`;\n }\n if (apolloError.graphQLErrors.length > 0) {\n return isDeveloper ? (\n <>{JSON.stringify(apolloError.graphQLErrors)}\n ) : (\n `There was an error fetching Datapoints data, please try refreshing the app. ${errorSuffix}`\n );\n }\n }\n return isDeveloper\n ? `${error?.message || 'No Error Message'}`\n : `There was an error loading Datapoints, please try refreshing the app. ${errorSuffix}`;\n};\n\nconst ErrorMessageFull: React.FC = ({\n id,\n error,\n footerComponent: FooterComponent,\n}) => {\n const { hasRole } = usePermissions();\n const isDeveloper = hasRole('Developer');\n\n return (\n \n \n \n \n {getErrorTitle(id, error, isDeveloper)}\n \n {getErrorMessage(id, error, isDeveloper)}\n \n If you require support email{' '}\n \n datapoints.support@timeshighereducation.com\n \n .\n \n \n {FooterComponent && }\n \n );\n};\n\nexport default ErrorMessageFull;\n","import React, { ReactNode } from 'react';\nimport type { FallbackProps } from 'react-error-boundary';\nimport { Box } from '@chakra-ui/react';\nimport { ApolloError } from '@apollo/client';\nimport Heading from '#coreComponents/Heading';\nimport { usePermissions } from '#core/Permissions';\n\nconst errorSuffix =\n 'Our team has been notified and is working to resolve the issue.';\n\nexport const getErrorMessage = (\n id: string,\n error: Error | undefined,\n isDeveloper: boolean,\n): string | ReactNode => {\n if (error instanceof ApolloError) {\n const apolloError = error as ApolloError;\n if (apolloError.networkError) {\n const { networkError } = apolloError;\n // @ts-ignore - result exists on the object but isnt exposed as a type by Apollo\n const errors = (networkError?.result?.errors || []) as {\n message: string;\n }[];\n const detailedError =\n errors.length > 0\n ? `${errors.map(({ message }) => message).join(', ')}`\n : '';\n return isDeveloper ? (\n <>\n {id}: Network Error\n

{detailedError || networkError.message}

\n \n ) : (\n `There was an error connecting to the server. ${errorSuffix}`\n );\n }\n if (apolloError.graphQLErrors.length > 0) {\n return isDeveloper ? (\n <>\n {id}: GraphQL Error\n

{JSON.stringify(apolloError.graphQLErrors)}

\n \n ) : (\n `There was an error when querying for data. ${errorSuffix}`\n );\n }\n }\n return isDeveloper\n ? `${id}: ${error?.message || 'No Error'}`\n : `Something went wrong. ${errorSuffix}`;\n};\n\nconst ErrorMessageLite: React.FC = ({\n id,\n error,\n}) => {\n const { hasRole } = usePermissions();\n const isDeveloper = hasRole('Developer');\n return (\n \n {getErrorMessage(id, error, isDeveloper)}\n \n );\n};\n\nexport default ErrorMessageLite;\n","import React, { useCallback, useMemo } from 'react';\nimport {\n ErrorBoundary as ReactErrorBoundary,\n FallbackProps,\n} from 'react-error-boundary';\nimport { ApolloError } from '@apollo/client';\nimport ErrorBoundaryContext, {\n useErrorBoundaryContext,\n} from './contexts/ErrorBoundaryContext';\n\nimport ErrorMessageFull from './ErrorMessageFull';\nimport ErrorMessageLite from './ErrorMessageLite';\nimport { useAppLoading } from '#core/AppLoading';\nimport useLogger from '#hooks/useLogger';\n\nexport type { FallbackProps } from 'react-error-boundary';\n\ntype OnErrorHandler = (error: Error, info: { componentStack: string }) => void;\n\ntype ErrorBoundaryCommonProps = {\n id: string;\n onError?: OnErrorHandler;\n footerComponent?: React.FC<{}>;\n};\ntype ErrorBoundaryWithErrorComponent = ErrorBoundaryCommonProps & {\n ErrorComponent: React.FC<\n FallbackProps & {\n id: string;\n footerComponent?: React.FC<{}>;\n }\n >;\n};\ntype ErrorBoundaryWithFullOrLiteMessage = ErrorBoundaryCommonProps & {\n showDetailedErrorScreen?: boolean;\n};\ntype ErrorBoundaryProps =\n | ErrorBoundaryWithErrorComponent\n | ErrorBoundaryWithFullOrLiteMessage;\n\nconst ErrorBoundary: React.FC = ({\n children,\n onError: onErrorProp,\n footerComponent,\n id: thisBoundaryId,\n ...props\n}) => {\n const logger = useLogger();\n const { crumbs: errorCrumbs } = useErrorBoundaryContext();\n const newErrorCrumbs = [...errorCrumbs, thisBoundaryId];\n const id = newErrorCrumbs.join('/');\n const { isLoading, finishedLoading } = useAppLoading();\n\n const ErrorComponent = (props as ErrorBoundaryWithErrorComponent)\n ?.ErrorComponent;\n const showDetailedErrorScreen = (props as ErrorBoundaryWithFullOrLiteMessage)\n ?.showDetailedErrorScreen;\n\n const FallbackComponent = useMemo(() => {\n if (typeof ErrorComponent !== 'undefined') {\n return ErrorComponent;\n }\n if (showDetailedErrorScreen === true) {\n return ErrorMessageFull;\n }\n return ErrorMessageLite;\n }, [ErrorComponent, showDetailedErrorScreen]);\n\n const onError: OnErrorHandler = useCallback(\n (error, info) => {\n if (isLoading) {\n finishedLoading();\n }\n if (error instanceof ApolloError) {\n const apolloError = error as ApolloError;\n const errorType = apolloError.networkError\n ? 'GraphQL network'\n : 'Apollo';\n logger.error(\n `Error boundary for ID '${id}' encountered an ${errorType} error`,\n );\n } else {\n logger.error(`Error boundary for ID '${id}' encountered an error`);\n }\n logger.error(error);\n if (typeof onErrorProp === 'function') {\n onErrorProp(error, info);\n }\n },\n [isLoading, logger, onErrorProp, finishedLoading, id],\n );\n\n return (\n \n (\n \n )}\n onError={onError}\n >\n {children}\n \n \n );\n};\n\nexport default ErrorBoundary;\n","import React from 'react';\nimport { Flex, Box } from '@chakra-ui/react';\nimport DataPlusTopbar from './components/DataPlusTopbar';\nimport Sidebar from '#coreComponents/Sidebar';\nimport BrowserSupport from '#coreComponents/BrowserSupport';\nimport { PrivateRouteLayoutProps } from '#coreComponents/PrivateRoute/PrivateRoute';\n\nconst DataPlusLayout: React.FC = ({\n children,\n pageConfig,\n}) => (\n \n \n \n \n \n \n \n {children}\n \n \n);\n\nexport default DataPlusLayout;\n","import React from 'react';\nimport { TableauViz } from '@tableau/embedding-api-react';\n\nexport type TableauDashboardProps = {\n url: string;\n token?: string | null;\n};\n\nexport const TableauDashboard = ({ url, token }: TableauDashboardProps) => (\n
\n \n
\n);\n\nexport default TableauDashboard;\n","import { useKeycloak } from '@react-keycloak/web';\nimport { useQuery } from 'react-query';\nimport { useMemo } from 'react';\nimport { useEnvironment } from '#core/Environment';\nimport { useAuth } from '#core/Auth';\nimport { useInstitution } from '#core/Institution';\nimport { usePageQuery } from '#core/PageQuery';\n\nconst getTableauToken = ({\n url,\n keycloakToken,\n permissionToken,\n institutionId,\n year,\n}: {\n url: string;\n keycloakToken?: string;\n permissionToken?: string;\n institutionId?: string;\n year?: number;\n}) => async (): Promise => {\n if (!keycloakToken || !permissionToken || !institutionId || !year) {\n return undefined;\n }\n const headers = {\n authorization: `Bearer ${keycloakToken}`,\n 'permissions-token': permissionToken,\n 'X-DataPoints-Institution': institutionId,\n 'X-DataPoints-Release-Year': year.toString(),\n };\n\n const response = await (\n await fetch(url, {\n headers,\n })\n ).json();\n\n return response.token;\n};\n\nconst useTableauToken = () => {\n const { apiEndpoint } = useEnvironment();\n const { keycloak } = useKeycloak();\n const { token: keycloakToken } = keycloak || {};\n const { permissionToken } = useAuth();\n const { institution } = useInstitution();\n const {\n query: { selectedYear },\n } = usePageQuery();\n\n const TABLEAU_TOKEN_URL = `https://${apiEndpoint}/tableau/token`;\n\n const queryArguments = useMemo(\n () => ({\n keycloakToken,\n permissionToken: permissionToken || undefined,\n institutionId: institution?.institutionId,\n year: selectedYear,\n }),\n [institution?.institutionId, keycloakToken, permissionToken, selectedYear],\n );\n\n const { data, isLoading, error } = useQuery(\n ['getTableauToken', queryArguments],\n getTableauToken({\n url: TABLEAU_TOKEN_URL,\n ...queryArguments,\n }),\n {\n enabled: !!keycloakToken,\n refetchOnWindowFocus: false,\n },\n );\n\n return { token: data, isLoading, error };\n};\n\nexport default useTableauToken;\n","import React, { createContext, ReactNode, useContext, useMemo } from 'react';\nimport { QueryClient, QueryClientProvider } from 'react-query';\nimport useTableauToken from '#utils/useTableauToken';\n\nexport type TableauTokenContract = {\n token?: string;\n isLoading: boolean;\n error: unknown;\n};\n\nexport const defaultContextValue: TableauTokenContract = {\n token: undefined,\n isLoading: false,\n error: null,\n};\nconst TableauAuthContext = createContext(\n defaultContextValue,\n);\n\nexport const useTableauAuthContext = () =>\n useContext(TableauAuthContext);\n\ntype TableauAuthProviderProps = {\n children: (data: TableauTokenContract) => ReactNode | null;\n};\n\nconst queryClient = new QueryClient();\n\nconst TableauTokenProvider: React.FC = ({\n children: renderChildren,\n}) => {\n const { token } = useTableauToken();\n\n const value = useMemo(\n () => ({\n ...defaultContextValue,\n ...{\n token,\n },\n }),\n [token],\n );\n\n return (\n \n \n {renderChildren(value)}\n \n \n );\n};\n\nexport default TableauTokenProvider;\n","import React from 'react';\nimport { Stack } from '@chakra-ui/react';\nimport { TableauDashboard } from './components/TableauDashboard';\nimport TableauTokenProvider, {\n TableauTokenContract,\n} from './components/TableauTokenProvider';\nimport { useInstitution } from '#core/Institution';\nimport { usePermissions } from '#core/Permissions';\nimport { usePageQuery } from '#core/PageQuery';\n\nconst TableauPrivateDashboard = (contextValue: TableauTokenContract) => {\n const { institution } = useInstitution();\n const { hasResourcePermissionNew } = usePermissions();\n const {\n query: { selectedYear },\n } = usePageQuery();\n\n const permissionsCheckArgs = {\n action: 'dataplus:viewTableauDashboard',\n year: selectedYear,\n institutionId: institution.institutionId,\n };\n\n const canViewTableau = hasResourcePermissionNew(permissionsCheckArgs);\n\n const { token, isLoading, error } = contextValue;\n\n return (\n <>\n \n \n {canViewTableau ? '鉁' : '鉂'}  Permissions determined that you{' '}\n {canViewTableau ? 'can' : \"can't\"} view Tableau Dashboards.\n Permissions check:{' '}\n {` ${JSON.stringify(permissionsCheckArgs)}`}.\n \n {isLoading && (\n \n 锔 Retrieving Tableau access token...\n \n )}\n {!isLoading && token && (\n {`鉁 Tableau access token retrieved. If the user is licensed in Tableau, the dashboard will load.`}\n )}\n {!isLoading && token === undefined && (\n
{`鉂 No authorisation token for Tableau available`}
\n )}\n {error && (\n \n {`鉂 Error retrieving authorisation token from Tableau: ${JSON.stringify(\n error,\n )}`}\n \n )}\n ;\n {token && (\n \n )}\n
\n \n );\n};\n\nexport const TableauPagePrivate = () => (\n {TableauPrivateDashboard}\n);\n","import React from 'react';\nimport { ChartBar20 } from '@carbon/icons-react';\nimport type { Product } from '#config/products';\nimport type Products from '.';\nimport PageQuery from '#core/PageQuery';\nimport DataPlusLayout from './layout';\nimport { TableauPagePrivate, TableauPagePublic } from './testTableauPage';\n\nconst productPage = (productName: keyof typeof Products) => async () => {\n // this cannot be a param, dont try to make this function generic\n const products = (await import('.')).default;\n return {\n default: products[productName],\n };\n};\n\nconst Overview = React.lazy(productPage('Overview'));\nconst Pillars = React.lazy(productPage('Pillars'));\nconst PillarsUpsell = React.lazy(productPage('PillarsUpsell'));\nconst Metrics = React.lazy(productPage('Metrics'));\nconst MetricsUpsell = React.lazy(productPage('MetricsUpsell'));\nconst YearOnYear = React.lazy(productPage('YearOnYear'));\nconst YearOnYearUpsell = React.lazy(productPage('YearOnYearUpsell'));\nconst Subjects = React.lazy(productPage('Subjects'));\nconst SubjectsUpsell = React.lazy(productPage('SubjectsUpsell'));\nconst BenchmarkSummary = React.lazy(productPage('BenchmarkSummary'));\nconst BenchmarkSummaryUpsell = React.lazy(\n productPage('BenchmarkSummaryUpsell'),\n);\nconst PeerGroupAnalysis = React.lazy(productPage('PeerGroupAnalysis'));\nconst PeerGroupAnalysisUpsell = React.lazy(\n productPage('PeerGroupAnalysisUpsell'),\n);\nconst BibliometricAnalysis = React.lazy(productPage('BibliometricAnalysis'));\nconst BibliometricAnalysisUpsell = React.lazy(\n productPage('BibliometricAnalysisUpsell'),\n);\nconst DetailedSubjects = React.lazy(productPage('DetailedSubjects'));\nconst DetailedSubjectsUpsell = React.lazy(\n productPage('DetailedSubjectsUpsell'),\n);\nconst InstitutionFinder = React.lazy(productPage('InstitutionFinder'));\nconst InstitutionFinderUpsell = React.lazy(\n productPage('InstitutionFinderUpsell'),\n);\n\nconst dataplusConfig: Product = {\n name: 'WUR Dashboard',\n authKey: 'dataplus',\n description:\n 'Access the full dataset behind THE鈥檚 influential World University Rankings',\n path: 'wur',\n icon: ChartBar20,\n color: 'redOrange ',\n pageQuery: PageQuery,\n productConfig: {\n topbar: {\n title: 'World University Ranking',\n titleAcronym: 'WUR',\n filter: {\n hasPeerSelector: true,\n hasQueryBuilder: false,\n },\n },\n },\n pages: [\n {\n name: 'Overview',\n path: 'overview',\n layout: DataPlusLayout,\n component: Overview,\n pageConfig: {\n topbar: {\n downloadUrls: {\n xlsx: '/download/wur/overview/xlsx',\n csv: '/download/wur/overview/zip',\n },\n filter: {\n hasPeerSelector: false,\n },\n },\n },\n },\n {\n name: 'Benchmark Summary',\n path: 'benchmark-summary',\n layout: DataPlusLayout,\n component: BenchmarkSummary,\n upsellComponent: BenchmarkSummaryUpsell,\n pageConfig: {\n topbar: {\n downloadUrls: {\n xlsx: '/download/wur/benchmark-summary/xlsx',\n csv: '/download/wur/benchmark-summary/zip',\n },\n filter: {\n hasPeerSelector: true,\n },\n },\n },\n },\n {\n name: 'Pillars',\n path: 'pillars',\n component: Pillars,\n layout: DataPlusLayout,\n upsellComponent: PillarsUpsell,\n pageConfig: {\n topbar: {\n downloadUrls: {\n xlsx: '/download/wur/pillars/xlsx',\n csv: '/download/wur/pillars/zip',\n },\n filter: {\n hasPeerSelector: true,\n },\n },\n },\n },\n {\n name: 'Metrics',\n path: 'metrics',\n component: Metrics,\n layout: DataPlusLayout,\n upsellComponent: MetricsUpsell,\n pageConfig: {\n topbar: {\n downloadUrls: {\n xlsx: '/download/wur/metrics/xlsx',\n csv: '/download/wur/metrics/zip',\n },\n filter: {\n hasPeerSelector: true,\n },\n },\n },\n },\n {\n name: 'Bibliometric Analysis',\n path: 'bibliometric-analysis',\n component: BibliometricAnalysis,\n upsellComponent: BibliometricAnalysisUpsell,\n layout: DataPlusLayout,\n pageConfig: {\n topbar: {\n downloadUrls: {\n xlsx: '/download/wur/bibliometric-analysis/xlsx',\n csv: '/download/wur/bibliometric-analysis/zip',\n },\n filter: {\n hasPeerSelector: true,\n hasQueryBuilder: true,\n },\n },\n },\n },\n {\n name: 'Subjects',\n path: 'subjects',\n component: Subjects,\n layout: DataPlusLayout,\n upsellComponent: SubjectsUpsell,\n pageConfig: {\n topbar: {\n downloadUrls: {\n xlsx: '/download/wur/subjects/xlsx',\n csv: '/download/wur/subjects/zip',\n },\n filter: {\n hasPeerSelector: true,\n },\n },\n },\n },\n {\n name: 'Detailed Subjects',\n path: 'detailed-subjects',\n layout: DataPlusLayout,\n component: DetailedSubjects,\n upsellComponent: DetailedSubjectsUpsell,\n pageConfig: {\n topbar: {\n downloadUrls: {\n xlsx: '/download/wur/detailed-subjects/xlsx',\n csv: '/download/wur/detailed-subjects/zip',\n },\n filter: {\n hasQueryBuilder: true,\n },\n },\n },\n },\n {\n name: 'Peer Group Analysis',\n path: 'peer-group-analysis',\n component: PeerGroupAnalysis,\n layout: DataPlusLayout,\n upsellComponent: PeerGroupAnalysisUpsell,\n pageConfig: {\n topbar: {\n downloadUrls: {\n xlsx: '/download/wur/peer-group-analysis/xlsx',\n csv: '/download/wur/peer-group-analysis/zip',\n },\n filter: {\n hasPeerSelector: true,\n },\n },\n },\n },\n {\n name: 'Year on Year',\n path: 'year-on-year',\n component: YearOnYear,\n layout: DataPlusLayout,\n upsellComponent: YearOnYearUpsell,\n pageConfig: {\n topbar: {\n downloadUrls: {\n xlsx: '/download/wur/year-on-year/xlsx',\n csv: '/download/wur/year-on-year/zip',\n },\n },\n },\n },\n {\n name: 'Institution Finder',\n path: 'institution-finder',\n component: InstitutionFinder,\n upsellComponent: InstitutionFinderUpsell,\n layout: DataPlusLayout,\n pageConfig: {},\n },\n {\n name: 'Tableau Public',\n path: 'tableau-dashboard-public',\n component: TableauPagePublic,\n layout: DataPlusLayout,\n pageConfig: {},\n },\n {\n name: 'Tableau Private',\n path: 'tableau-dashboard-private',\n component: TableauPagePrivate,\n layout: DataPlusLayout,\n pageConfig: {},\n },\n ],\n};\n\nexport default dataplusConfig;\n","import React from 'react';\nimport { TableauDashboard } from './components/TableauDashboard';\n\nexport const TableauPagePublic = () => (\n
\n \n
\n);\n","import React from 'react';\n\nimport { PrivateLayout } from '#coreComponents/Layout';\n\nconst LegacyAppLayout: React.FC<{}> = ({ children }) => (\n \n {children}\n \n);\n\nexport default LegacyAppLayout;\n","import React from 'react';\nimport { Alert, Text, Button, Flex, Link } from '@chakra-ui/react';\nimport { useEnvironment } from '#core/Environment';\n\nconst SupportMessageInProduct: React.FC<{ productName: string }> = ({\n productName,\n}) => {\n const { classicUrl } = useEnvironment();\n\n return (\n \n \n \n \n We are working hard to create a single platform which will enhance\n your experience with us.{' '}\n \n \n Our technical team is preparing for the {productName} to be moved\n onto the single platform, which will make your browsing experience,\n simple.\n \n \n \n \n \n );\n};\n\nexport default SupportMessageInProduct;\n","import React from 'react';\nimport { ChartBar20 } from '@carbon/icons-react';\n\nimport type { Product } from '#config/products';\nimport LegacyAppLayout from '#coreComponents/LegacyAppLayout';\nimport type Products from '.';\nimport SupportMessageInProduct from '#coreComponents/SupportMessageInProduct/SupportMessageInProduct';\n\nconst productPage = (productName: keyof typeof Products) => async () => {\n // this cannot be a param, dont try to make this function generic\n const products = (await import('.')).default;\n return {\n default: products[productName],\n };\n};\n\nconst Overview = React.lazy(productPage('Overview'));\nconst Metrics = React.lazy(productPage('Metrics'));\nconst BenchmarkInstitutions = React.lazy(productPage('BenchmarkInstitutions'));\nconst PeerGroupAnalysis = React.lazy(productPage('PeerGroupAnalysis'));\nconst ExecutiveSummary = React.lazy(productPage('ExecutiveSummary'));\n\nconst dataplusLatamConfig: Product = {\n name: 'DataPlus Latam',\n authKey: 'dataplusLatam',\n description:\n 'Based on THE鈥檚 WUR data, access the full dataset behind THE鈥檚 Latin America Rankings',\n path: 'latam',\n icon: ChartBar20,\n color: 'redOrange',\n usesLegacyPermissions: true,\n featureFlagId: 'datapluslatam',\n disabledFeatureComponent: () => (\n \n ),\n productConfig: {\n topbar: {\n title: 'DataPLus Latam',\n titleAcronym: 'LATAM',\n rank: '1',\n filter: {\n hasPeerSelector: true,\n hasQueryBuilder: false,\n },\n },\n },\n pages: [\n {\n name: 'Overview',\n path: 'overview',\n component: Overview,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Metrics',\n path: 'metrics',\n component: Metrics,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Benchmark Institutions',\n path: 'benchmark-institutions',\n component: BenchmarkInstitutions,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Peer Group Analysis',\n path: 'peer-group-analysis',\n component: PeerGroupAnalysis,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Executive Summary',\n path: 'executive-summary',\n component: ExecutiveSummary,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n ],\n};\n\nexport default dataplusLatamConfig;\n","import React from 'react';\nimport { ChartErrorBarAlt20 } from '@carbon/icons-react';\nimport type { Product } from '#config/products';\nimport LegacyAppLayout from '#coreComponents/LegacyAppLayout';\nimport PageQuery from '#core/PageQuery';\nimport type Products from '.';\n\nconst productPage = (productName: keyof typeof Products) => async () => {\n // this cannot be a param, dont try to make this function generic\n const products = (await import('.')).default;\n return {\n default: products[productName],\n };\n};\n\nconst SelectScenario = React.lazy(productPage('SelectScenario'));\nconst SelectScenarioUpsell = React.lazy(productPage('SelectScenarioUpsell'));\nconst ScenarioDisabledUntilRelease = React.lazy(\n productPage('ScenarioDisabledUntilRelease'),\n);\nconst CreateScenario = React.lazy(productPage('CreateScenario'));\nconst ViewScenario = React.lazy(productPage('ViewScenario'));\nconst EditScenario = React.lazy(productPage('EditScenario'));\n\nconst exploreConfig: Product = {\n name: 'Explore',\n authKey: 'explore',\n description:\n 'Understand how changes to your institution could impact your World University Ranking position by creating hypothetical scenarios',\n path: 'explore',\n icon: ChartErrorBarAlt20,\n color: 'electricViolet',\n disabledFeatureComponent: ScenarioDisabledUntilRelease,\n pageQuery: PageQuery,\n productConfig: {\n noChildren: true,\n useNonYearPermissions: true,\n topbar: {\n title: 'Explore',\n titleAcronym: 'Ex',\n rank: '1',\n filter: {\n hasPeerSelector: true,\n hasQueryBuilder: false,\n },\n },\n },\n pages: [\n {\n name: 'Select Scenario',\n path: 'select-scenario',\n component: SelectScenario,\n upsellComponent: SelectScenarioUpsell,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Create Scenario',\n path: 'create-scenario',\n component: CreateScenario,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'View Scenario',\n path: 'view-scenario/:scenarioId',\n component: ViewScenario,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Edit Scenario',\n path: 'edit-scenario/:scenarioId',\n component: EditScenario,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n ],\n};\n\nexport default exploreConfig;\n","import React from 'react';\nimport { ChartErrorBarAlt20 } from '@carbon/icons-react';\nimport type { Product } from '#config/products';\nimport LegacyAppLayout from '#coreComponents/LegacyAppLayout';\nimport PageQuery from '#core/PageQuery';\nimport type Products from '.';\n\nconst productPage = (productName: keyof typeof Products) => async () => {\n // this cannot be a param, dont try to make this function generic\n const products = (await import('.')).default;\n return {\n default: products[productName],\n };\n};\n\nconst SelectScenario = React.lazy(productPage('SelectScenario'));\nconst SelectScenarioUpsell = React.lazy(productPage('SelectScenarioUpsell'));\nconst ScenarioDisabledUntilRelease = React.lazy(\n productPage('ScenarioDisabledUntilRelease'),\n);\nconst CreateScenario = React.lazy(productPage('CreateScenario'));\nconst ViewScenario = React.lazy(productPage('ViewScenario'));\nconst EditScenario = React.lazy(productPage('EditScenario'));\n\nconst wurReporterInterimConfig: Product = {\n name: 'WUR Reporter',\n authKey: 'wurReporterInterim',\n description:\n 'Understand how changes to your institution could impact your World University Ranking position by creating hypothetical scenarios',\n path: 'wur-reporter',\n icon: ChartErrorBarAlt20,\n color: 'electricViolet',\n disabledFeatureComponent: ScenarioDisabledUntilRelease,\n pageQuery: PageQuery,\n productConfig: {\n noChildren: true,\n useNonYearPermissions: true,\n isWurReporterInterim: true,\n topbar: {\n title: 'WUR Reporter',\n titleAcronym: 'WR',\n rank: '1',\n filter: {\n hasPeerSelector: true,\n hasQueryBuilder: false,\n },\n },\n },\n pages: [\n {\n name: 'Select Scenario',\n path: 'select-scenario',\n component: SelectScenario,\n upsellComponent: SelectScenarioUpsell,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Create Scenario',\n path: 'create-scenario',\n component: CreateScenario,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'View Scenario',\n path: 'view-scenario/:scenarioId',\n component: ViewScenario,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Edit Scenario',\n path: 'edit-scenario/:scenarioId',\n component: EditScenario,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n ],\n};\n\nexport default wurReporterInterimConfig;\n","import React from 'react';\nimport { Account20 } from '@carbon/icons-react';\n\nimport type { Product } from '#config/products';\nimport LegacyAppLayout from '#coreComponents/LegacyAppLayout';\nimport type Products from '.';\nimport SupportMessageInProduct from '#coreComponents/SupportMessageInProduct/SupportMessageInProduct';\n\nconst productPage = (productName: keyof typeof Products) => async () => {\n // this cannot be a param, dont try to make this function generic\n const products = (await import('.')).default;\n return {\n default: products[productName],\n };\n};\n\nconst Overview = React.lazy(productPage('Overview'));\nconst VotingAnalysis = React.lazy(productPage('VotingAnalysis'));\nconst AcademicInsights = React.lazy(productPage('AcademicInsights'));\nconst Peers = React.lazy(productPage('Peers'));\nconst Country = React.lazy(productPage('Country'));\nconst NationalVsInternational = React.lazy(\n productPage('NationalVsInternational'),\n);\nconst SubjectBreakdown = React.lazy(productPage('SubjectBreakdown'));\nconst NetworkAnalysis = React.lazy(productPage('NetworkAnalysis'));\n\nconst reputationConfig: Product = {\n name: 'Reputation',\n authKey: 'reputation',\n description:\n 'Understand the strength of your university鈥檚 brand and reputation, globally',\n path: 'reputation',\n icon: Account20,\n color: 'electricViolet',\n usesLegacyPermissions: true,\n featureFlagId: 'reputation',\n disabledFeatureComponent: () => (\n \n ),\n productConfig: {\n topbar: {\n title: 'Reputation',\n titleAcronym: 'Rep',\n rank: '1',\n filter: {\n hasPeerSelector: true,\n hasQueryBuilder: false,\n },\n },\n },\n pages: [\n {\n name: 'Overview',\n path: 'overview',\n component: Overview,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Voting Analysis',\n path: 'voting-analysis',\n component: VotingAnalysis,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Academic Insights',\n path: 'academic-insights',\n component: AcademicInsights,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Peers',\n path: 'peers',\n component: Peers,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Country',\n path: 'country',\n component: Country,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'National VS International',\n path: 'national-vs-international',\n component: NationalVsInternational,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Subject Breakdown',\n path: 'subject-breakdown',\n component: SubjectBreakdown,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Network Analysis',\n path: 'network-analysis',\n component: NetworkAnalysis,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n ],\n};\n\nexport default reputationConfig;\n","import React from 'react';\nimport { InventoryManagement20 } from '@carbon/icons-react';\n\nimport type { Product } from '#config/products';\nimport LegacyAppLayout from '#coreComponents/LegacyAppLayout';\nimport type Products from '.';\nimport SupportMessageInProduct from '#coreComponents/SupportMessageInProduct/SupportMessageInProduct';\nimport SdgUpsell from './details/SdgUpsell/SdgUpsell';\n\nconst productPage = (productName: keyof typeof Products) => async (): Promise<{\n default: React.ComponentType;\n}> => {\n // this cannot be a param, dont try to make this function generic\n const products = (await import('.')).default;\n return {\n default: products[productName],\n };\n};\n\nconst Overview = React.lazy(productPage('Overview'));\nconst DetailsIndex = React.lazy(productPage('DetailsIndex'));\nconst Details = React.lazy(productPage('Details'));\n\nconst sdgImpactConfig: Product = {\n name: 'SDG Impact',\n authKey: 'sdgImpact',\n description:\n 'Access the powerful data behind THE鈥檚 Impact Rankings, based on the UN鈥檚 Sustainable Development Goals',\n path: 'sdg',\n icon: InventoryManagement20,\n color: 'electricViolet',\n usesLegacyPermissions: true,\n featureFlagId: 'impact',\n disabledFeatureComponent: () => (\n \n ),\n productConfig: {\n topbar: {\n title: 'SDG Impact',\n titleAcronym: 'SDG',\n rank: '1',\n filter: {\n hasPeerSelector: true,\n hasQueryBuilder: false,\n },\n },\n },\n pages: [\n {\n name: 'Overview',\n path: 'overview',\n component: Overview,\n upsellComponent: SdgUpsell,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Details',\n path: 'details',\n component: DetailsIndex,\n upsellComponent: SdgUpsell,\n layout: LegacyAppLayout,\n pageConfig: {},\n },\n {\n name: 'Details',\n path: 'details/:sdgId',\n component: Details,\n layout: LegacyAppLayout,\n upsellComponent: SdgUpsell,\n hiddenPage: true,\n pageConfig: {},\n },\n ],\n};\n\nexport default sdgImpactConfig;\n","import { CarbonIconType } from '@carbon/icons-react';\nimport { RouteComponentProps } from '@reach/router';\nimport React from 'react';\n\nimport { PrivateRouteLayoutProps } from '#coreComponents/PrivateRoute/PrivateRoute';\nimport dataplusConfig from '../features/dataplus/config';\nimport dataplusLatamConfig from '../features/dataplusLatam/config';\nimport exploreConfig from '../features/explore/config';\nimport wurReporterInterimConfig from '../features/wurReporterInterim/config';\nimport reputationConfig from '../features/reputation/config';\nimport sdgImpactConfig from '../features/sdgImpact/config';\n\nexport interface PageConfig {\n noChildren?: boolean;\n isDevProduct?: boolean;\n isWurReporterInterim?: boolean;\n topbar: {\n title: string;\n titleAcronym: string;\n rank: string;\n filter: {\n hasPeerSelector: boolean;\n hasQueryBuilder: boolean;\n };\n downloadUrls?: {\n xlsx?: string;\n csv?: string;\n methodology?: string;\n };\n };\n useNonYearPermissions: boolean;\n}\n\nexport interface Page {\n name: string;\n path: string;\n component: React.FC<{ pageConfig: PageConfig }>;\n upsellComponent?: React.FC<{}>;\n layout?: React.FC;\n pageConfig: DeepPartial;\n hiddenPage?: boolean;\n featureFlagId?: string;\n}\n\nexport interface Product {\n layout?: React.FC;\n name: string;\n authKey?: string;\n description: string;\n path: string;\n icon: CarbonIconType;\n color: string;\n pages: Page[];\n pageQuery?: React.FC;\n productConfig: DeepPartial;\n usesLegacyPermissions?: boolean;\n featureFlagId?: string;\n disabledFeatureComponent?: React.FC<{}>;\n}\n\nexport default [\n dataplusConfig,\n dataplusLatamConfig,\n exploreConfig,\n wurReporterInterimConfig,\n reputationConfig,\n sdgImpactConfig,\n];\n","import { createContext, useContext } from 'react';\nimport { Product as ProductConfig, Page as PageConfig } from '#config/products';\nimport { Peer } from '#core/PageQuery';\n\nexport type ProductPage = PageConfig & {\n routerPath: string;\n upsellComponent?: React.FC;\n url: string;\n auth: {\n action: string;\n userHasAccess: boolean;\n };\n};\n\nexport type Product = Omit & {\n auth: {\n userHasAccess: boolean;\n };\n pages: ProductPage[];\n};\n\ntype PeerChangeDraft = {\n userId: string;\n username: string;\n fullName?: string | null;\n institutionIds: string[];\n peers?: Peer[] | null;\n};\n\nexport type ProductsContextContract = {\n products: Product[];\n productPeers: (\n productName: string,\n ) => {\n id: string;\n institutionId: string;\n name: string;\n country: string;\n continent: string;\n logo: string;\n }[];\n productGroups: (productName: string) => string[];\n peersInfo: (\n productName: string,\n ) => {\n supportsPeers: boolean;\n supportsChangingPeers: boolean;\n peerChangeOpen: boolean;\n lastPeerChangeDate: Date | null;\n maxPeerCount: number;\n peerChangeIntervalWeeks: number | null;\n peerChangeDraft?: PeerChangeDraft | null;\n };\n};\n\nconst defaultProductsContext = {\n products: [],\n productPeers: () => [],\n productGroups: () => [],\n peersInfo: () => ({\n supportsPeers: false,\n supportsChangingPeers: false,\n peerChangeOpen: false,\n lastPeerChangeDate: null,\n maxPeerCount: -1,\n peerChangeIntervalWeeks: null,\n peerChangeDraft: undefined,\n }),\n};\n\nconst ProductsContext = createContext(\n defaultProductsContext,\n);\n\nexport const useProducts = () =>\n useContext(ProductsContext);\n\nexport default ProductsContext;\n","import React, { useCallback, useMemo } from 'react';\nimport { camelCase } from 'change-case';\nimport { useFlags } from 'launchdarkly-react-client-sdk';\nimport { LegacyPermissions, usePermissions } from '#core/Permissions';\nimport productsConfig, { Page, PageConfig } from '#config/products';\nimport ProductsContext, {\n Product,\n ProductPage,\n} from '../contexts/ProductsContext';\nimport { useInstitution } from '#core/Institution';\nimport { useYears } from '#core/Years';\nimport { useEnvironment } from '#core/Environment';\n\nconst componentWithLegacyPermissions = (\n Component: Page['component'],\n): Page['component'] => (props) => (\n \n \n \n);\n\nconst leadingSlashRegex = /^\\//;\n\nconst Products: React.FC<{}> = ({ children }) => {\n const { hasResourcePermissionNew } = usePermissions();\n const { environment } = useEnvironment();\n const flags = useFlags();\n const productConf = [...productsConfig];\n\n const { institution } = useInstitution();\n const { availableYears } = useYears();\n\n const WUR_REPORTERS_INTERIM_ENABLED =\n flags[camelCase('wur-reporters-interim-enabled')];\n\n const TABLEAU_DASHBOARD_ENABLED = flags.showTableauDashboard;\n\n if (!WUR_REPORTERS_INTERIM_ENABLED) {\n productConf.forEach((config, index) => {\n if (config.authKey === 'wurReporterInterim') {\n productConf.splice(index, 1);\n }\n });\n }\n\n if (!TABLEAU_DASHBOARD_ENABLED) {\n productConf.forEach((config) => {\n if (config.authKey === 'dataplus') {\n config.pages.forEach((page, index) => {\n if (\n page.path === 'tableau-dashboard-public' ||\n page.path === 'tableau-dashboard-private'\n ) {\n config.pages.splice(index, 1);\n }\n });\n }\n });\n }\n\n const products = useMemo(\n () =>\n productConf\n .reduce((productAcc, product) => {\n const {\n authKey,\n usesLegacyPermissions,\n pages: pagesConfig,\n path: productPath,\n featureFlagId: productFlag,\n ...productConfig\n } = product;\n\n const pages: ProductPage[] = pagesConfig.reduce(\n (\n pagesAcc,\n { component, path, featureFlagId: flag, ...productPage },\n ) => {\n if (flag && flags[camelCase(flag)] === false) {\n return pagesAcc;\n }\n const resourcePagePath = path.includes('/:')\n ? camelCase(path.substring(0, path.indexOf('/:')))\n : camelCase(path);\n\n let action: string;\n\n if (resourcePagePath === 'academicInsights') {\n action = 'reputation_plus:viewPage';\n } else if (\n environment === 'production' &&\n (resourcePagePath === 'tableauDashboardPublic' ||\n resourcePagePath === 'tableauDashboardPrivate')\n ) {\n action = 'dataplus:viewTableauPoc';\n } else {\n action = `${authKey}:viewPage`;\n }\n\n if (authKey === 'sdgImpact') {\n action = `${authKey}:viewPage:${resourcePagePath}`;\n }\n\n let userHasAccess = !authKey;\n\n availableYears[productPath].forEach(({ year }) => {\n userHasAccess =\n userHasAccess ||\n hasResourcePermissionNew({\n action,\n year,\n institutionId: institution?.institutionId,\n });\n });\n\n let newComponent: React.FC<{\n pageConfig: PageConfig;\n }>;\n\n if (productFlag && flags[camelCase(productFlag)] === false) {\n newComponent =\n productConfig.disabledFeatureComponent ?? component;\n } else {\n newComponent = usesLegacyPermissions\n ? componentWithLegacyPermissions(component)\n : component;\n }\n\n const hasUserAccessToAcademicInsights =\n (authKey === 'reputation' &&\n resourcePagePath !== 'academicInsights') ||\n userHasAccess;\n\n const allOtherProductsPages = pagesAcc;\n\n const acedamicInsightPages = [\n ...pagesAcc,\n {\n ...productPage,\n path,\n routerPath: `${productPath}/${path}`,\n url: `/datapoints/${productPath}/${path.replace(\n leadingSlashRegex,\n '',\n )}`,\n usesLegacyPermissions,\n component: newComponent,\n auth: {\n action,\n userHasAccess,\n },\n },\n ];\n\n return hasUserAccessToAcademicInsights\n ? acedamicInsightPages\n : allOtherProductsPages;\n },\n [],\n );\n\n const userHasAccessToProduct = pages.reduce(\n (hasAccess, { auth: { userHasAccess: hasAccessToPage } }) =>\n hasAccess || hasAccessToPage,\n false,\n );\n\n return userHasAccessToProduct\n ? [\n ...productAcc,\n {\n ...productConfig,\n path: productPath,\n authKey,\n auth: {\n userHasAccess: userHasAccessToProduct,\n },\n pages,\n },\n ]\n : productAcc;\n }, [])\n .sort(({ name: nameA }, { name: nameB }) => {\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n return 1;\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [flags, hasResourcePermissionNew, availableYears],\n );\n\n const getProduct = useCallback(\n (productName: string) => {\n const { products: institutionProducts } = institution;\n return (institutionProducts || []).find(\n ({ name }) => name.toLowerCase() === productName.toLowerCase(),\n );\n },\n [institution],\n );\n\n const productGroups = useCallback(\n (productName: string) => {\n const product = getProduct(productName);\n const groups = product?.institutionGroups?.map(({ name }) => name);\n return groups || [];\n },\n [getProduct],\n );\n\n const productPeers = useCallback(\n (productName: string) => {\n const product = getProduct(productName);\n const group = product?.institutionGroups?.find(\n ({ name }) => name === 'peers',\n );\n return group?.institutions || [];\n },\n [getProduct],\n );\n\n const peersInfo = useCallback(\n (productName: string) => ({\n supportsPeers: false,\n supportsChangingPeers: false,\n peerChangeOpen: false,\n lastPeerChangeDate: null,\n maxPeerCount: -1,\n peerChangeIntervalWeeks: null,\n ...getProduct(productName)?.peersInfo,\n }),\n [getProduct],\n );\n\n return (\n \n {children}\n \n );\n};\n\nexport default Products;\n","import React, {\n useState,\n useCallback,\n createContext,\n useContext,\n useEffect,\n} from 'react';\nimport Loading from '#coreComponents/Loading';\n\nexport const LoadingContext = createContext<{\n isLoading: boolean;\n finishedLoading: () => void;\n setIsLoading: (isLoading: boolean) => void;\n}>({\n isLoading: true,\n finishedLoading: () => {},\n setIsLoading: () => {},\n});\n\nexport const useAppLoading = () => useContext(LoadingContext);\n\nconst AppLoading: React.FC<{}> = ({ children }) => {\n const [isVisible, setIsVisible] = useState(true);\n const finishedLoading = useCallback(() => {\n setTimeout(() => setIsVisible(false), 0);\n }, [setIsVisible]);\n return (\n setIsVisible(isLoading),\n }}\n >\n {isVisible && (\n \n )}\n {children}\n \n );\n};\n\nexport const FinishedLoading: React.FC<{}> = ({ children }) => {\n const { isLoading, finishedLoading } = useAppLoading();\n useEffect(() => {\n if (isLoading) {\n finishedLoading();\n }\n }, [isLoading, finishedLoading]);\n return <>{children};\n};\n\nexport default AppLoading;\n","import { Dispatch, SetStateAction, useCallback, useState } from 'react';\n\ntype SetValue = Dispatch>;\n\nexport const useSessionStorage = (\n key: string,\n defaultValue: T,\n): [T, SetValue] => {\n const [storedValue, setStoredValue] = useState(() => {\n try {\n const item = window.sessionStorage.getItem(key);\n\n if (item) {\n return JSON.parse(item);\n }\n window.sessionStorage.setItem(key, JSON.stringify(defaultValue));\n return defaultValue;\n } catch (err) {\n return defaultValue;\n }\n });\n\n const setValue: SetValue = useCallback(\n (value) => {\n try {\n const newValue = value instanceof Function ? value(storedValue) : value;\n window.sessionStorage.setItem(key, JSON.stringify(newValue));\n setStoredValue(newValue);\n } catch (err) {\n throw new Error(`Session Storage Error: ${err}`);\n }\n },\n [key, storedValue],\n );\n\n return [storedValue, setValue];\n};\n"],"sourceRoot":""}