{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///D:/a/_work/1/s/libs/core-contracts/src/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/index.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/index.ts","webpack:///D:/a/_work/1/s/libs/isomorphic-util/src/DOMHelpersCore.ts","webpack:///D:/a/_work/1/s/libs/telemetry-contracts/src/index.ts","webpack:///D:/a/_work/1/s/libs/experiences-constants/src/BrowserTypes.ts","webpack:///D:/a/_work/1/s/libs/core/src/app/HeadData.ts","webpack:///D:/a/_work/1/s/libs/isomorphic-util/src/DOMHelpers.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/UrlUtility.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/AppError/AppErrors.ts","webpack:///D:/a/_work/1/s/libs/render-cache/src/Constants.ts","webpack:///D:/a/_work/1/s/libs/core/src/constants/Constants.ts","webpack:///D:/a/_work/1/s/libs/page-lifecycle-helpers/src/PageLifecycleConstants.ts","webpack:///D:/a/_work/1/s/libs/experiences-constants/src/AppTypes.ts","webpack:///D:/a/_work/1/s/libs/isomorphic-util/src/requestData.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/constants/ConnectorConstants.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/Parsing.ts","webpack:///D:/a/_work/1/s/libs/experiences-base/src/utilities/BreakpointManager.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/ActionDispatchHelper.ts","webpack:///D:/a/_work/1/s/libs/core/src/webstorage/LocalStorage.ts","webpack:///D:/a/_work/1/s/libs/core/src/webstorage/WebStorage.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/pages/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/app/AppEnvironment.ts","webpack:///D:/a/_work/1/s/libs/render-cache/src/Helper.ts","webpack:///D:/a/_work/1/s/libs/experiences-constants/src/PageTypes.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/pages/PageHelper.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/pages/PageBase.ts","webpack:///D:/a/_work/1/s/libs/experiences-base/src/index.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/logging/Logger.ts","webpack:///D:/a/_work/1/s/libs/experiences-constants/src/SignedInStatus.ts","webpack:///D:/a/_work/1/s/libs/telemetry-contracts/src/telemetry-statics/Telemetry.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/Utility.ts","webpack:///D:/a/_work/1/s/libs/experiences-base/src/utilities/ColumnWidths.ts","webpack:///D:/a/_work/1/s/libs/core/src/app/Environment.ts","webpack:///D:/a/_work/1/s/libs/experiences-constants/src/SameSiteValues.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/CookieUtility.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/utilities/ResolverAppErrors.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/DataConnectorTracker.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/performance/PerfTimeline.ts","webpack:///D:/a/_work/1/s/components/icon/src/icons/GlyphInline.ts","webpack:///D:/a/_work/1/s/libs/core/src/app/StoredHeadData.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/DataConnectorInjector.ts","webpack:///D:/a/_work/1/s/libs/milestone-data/src/MilestoneData.actions.ts","webpack:///D:/a/_work/1/s/libs/milestone-data/src/data-model/ExperienceLoadingState.ts","webpack:///D:/a/_work/1/s/libs/experiences-constants/src/ConnectorNamespaces.ts","webpack:///D:/a/_work/1/s/libs/core/src/app/index.tsx","webpack:///D:/a/_work/1/s/libs/core/src/app/Enterprise.ts","webpack:///D:/a/_work/1/s/libs/core/src/app/HostPage.ts","webpack:///D:/a/_work/1/s/libs/core/src/app/Market.ts","webpack:///./src/integration/RequireAsync.ts","webpack:///D:/a/_work/1/s/libs/experiences-constants/src/AuthCookieNames.ts","webpack:///D:/a/_work/1/s/libs/page-error-handling/src/Utilities.ts","webpack:///D:/a/_work/1/s/libs/page-error-handling/src/PageSettings.ts","webpack:///D:/a/_work/1/s/libs/page-error-handling/src/ErrorLogger.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/DynamicReducer.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/GetDataConnector.ts","webpack:///D:/a/_work/1/s/libs/experiences-connector/src/connectors/ComponentConnector.constants.ts","webpack:///D:/a/_work/1/s/libs/experiences-connector/src/connectors/ExperiencePerfTimeline.tsx","webpack:///D:/a/_work/1/s/libs/diagnostics/src/performance/PerfMarkerConstants.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/index.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/performance/PageTimings.ts","webpack:///D:/a/_work/1/s/libs/telemetry-core/src/tracking/TelemetryContractCoverter.ts","webpack:///D:/a/_work/1/s/libs/experiences-connector/src/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/configs/index.ts","webpack:///D:/a/_work/1/s/libs/web-worker-shared-utils/src/server-cache/ServerCacheMock.ts","webpack:///D:/a/_work/1/s/libs/page-lifecycle-helpers/src/PrerenderActionHelpers.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/performance/PerfMarker.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/UrlSearchParamsHelper.ts","webpack:///D:/a/_work/1/s/libs/core/src/public-path/index.ts","webpack:///D:/a/_work/1/s/libs/views-helpers/src/IntraArticle.types.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/SingletonResetManager.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/WebWorkerUtility.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/IndexedDb.ts","webpack:///D:/a/_work/1/s/libs/core-contracts/src/appError-contracts/index.ts","webpack:///D:/a/_work/1/s/libs/core-contracts/src/appError-contracts/ErrorBehavior.ts","webpack:///D:/a/_work/1/s/libs/core-contracts/src/appError-contracts/Severity.ts","webpack:///D:/a/_work/1/s/libs/core-contracts/src/resolver-contracts/index.ts","webpack:///D:/a/_work/1/s/libs/core-contracts/src/resolver-contracts/ConfigFetchError.ts","webpack:///D:/a/_work/1/s/libs/core-contracts/src/resolver-contracts/ConfigOrigin.ts","webpack:///D:/a/_work/1/s/libs/core-contracts/src/service-contracts/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/app/ScreenWidth.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/configs/ChildExperienceConfigInfo.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/AbortableFetch.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/configs/ChildExperiencesDeferRenderType.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/configs/ChildExperienceValidator.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/configs/composition/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/configs/composition/ChildrenTypes.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/configs/ExperienceCompositionTypes.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/configs/ExperienceState.ts","webpack:///D:/a/_work/1/s/libs/core/src/inspector/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/types/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/types/MonetizationPlacementOptions.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/CookieInlineUtility.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/FastDnaUtility.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/LinkNavigation.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/LocalStorageInline.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/ContentNumberAbbreviation.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/PageUtility.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/ShallowCompare.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/StringHasLength.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/TelemetryHelper.ts","webpack:///D:/a/_work/1/s/libs/telemetry-contracts/src/telemetry-contracts/index.ts","webpack:///D:/a/_work/1/s/libs/telemetry-contracts/src/telemetry-contracts/TelemetryEnums.ts","webpack:///D:/a/_work/1/s/libs/telemetry-contracts/src/telemetry-contracts/TelemetryConstants.ts","webpack:///D:/a/_work/1/s/libs/telemetry-contracts/src/telemetry-interfaces/index.ts","webpack:///D:/a/_work/1/s/libs/core/src/utilities/ZIndex.ts","webpack:///D:/a/_work/1/s/libs/core/src/request/index.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/utilities/Constants.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/utilities/Utilities.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/client-fallback-resolver/BlobFetcher.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/client-fallback-resolver/ClientConfigIndexService.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/client-fallback-resolver/ClientConfigService.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/client-fallback-resolver/ClientManifestService.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/client-fallback-resolver/ClientConfigMerger.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/client-fallback-resolver/TargetScopeMatcher.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/client-fallback-resolver/ClientSingleConfigResolver.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/client-fallback-resolver/ClientResolver.ts","webpack:///D:/a/_work/1/s/libs/web-worker-shared-utils/src/indexedDb/indexedDb.ts","webpack:///D:/a/_work/1/s/libs/web-worker-shared-utils/src/AppErrorHelper.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/ConfigCache.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/ConfigService.ts","webpack:///D:/a/_work/1/s/libs/config-resolver/src/resolver/client-resolver/ConfigResolver.ts","webpack:///D:/a/_work/1/s/libs/web-worker-shared-utils/src/getRootConfigRef.ts","webpack:///D:/a/_work/1/s/libs/core/src/config/Resolver.ts","webpack:///D:/a/_work/1/s/node_modules/@msnews/ssr-server/dist/interop/RequestData.js","webpack:///D:/a/_work/1/s/libs/isomorphic-util/src/SSRInteropContractHelpers.ts","webpack:///D:/a/_work/1/s/libs/isomorphic-util/src/SSRInteropContract.ts","webpack:///D:/a/_work/1/s/libs/core/src/request/RequestContext.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/logging/LiteLogger.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/logging/Util.ts","webpack:///D:/a/_work/1/s/libs/experiences-connector/src/connectors/index.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/connectors/index.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/connectors/DataConnector.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/ActionHandler.ts","webpack:///D:/a/_work/1/s/libs/experiences-connector/src/rendering/index.ts","webpack:///D:/a/_work/1/s/libs/experiences-base/src/base/index.ts","webpack:///D:/a/_work/1/s/libs/experiences-base/src/tracking/index.ts","webpack:///D:/a/_work/1/s/libs/experiences-base/src/tracking/Telemetry.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/actions/CommonActions.ts","webpack:///D:/a/_work/1/s/libs/page-lifecycle-helpers/src/PageRevealTracker.ts","webpack:///D:/a/_work/1/s/libs/config-validator/src/ConfigProcessor.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/performance/PerfTimelineImpl.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/performance/ExperienceDiagnostics.ts","webpack:///D:/a/_work/1/s/libs/experiences-connector/src/experience-loader/ExperienceLoader.ts","webpack:///D:/a/_work/1/s/libs/experiences-connector/src/connectors/ComponentConnector.ts","webpack:///D:/a/_work/1/s/libs/telemetry-core/src/react/ComponentTracker.tsx","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/ActionSenderBase.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/ActionSender.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/GlobalActionSender.ts","webpack:///D:/a/_work/1/s/libs/experiences-redux/src/reducers/ActionMap.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/performance/PerfTracker.ts","webpack:///D:/a/_work/1/s/libs/experiences-base/src/base/BaseExperience.tsx","webpack:///D:/a/_work/1/s/libs/page-lifecycle-helpers/src/PageVisibilityActionHelpers.ts","webpack:///D:/a/_work/1/s/libs/page-lifecycle-helpers/src/PageInvalidationReasons.ts","webpack:///./src/integration/PrimeTrack.ts","webpack:///./src/integration/PrimeTelemetry.ts","webpack:///./src/integration/PrimeTrackExtensionComplete.ts","webpack:///./src/integration/PrimeElementTrackingDecorator.ts","webpack:///D:/a/_work/1/s/libs/telemetry-core/src/tracking/TelemetryObject.ts","webpack:///./src/integration/MediatorEventNames.ts","webpack:///./src/integration/PrimeMediator.ts","webpack:///D:/a/_work/1/s/libs/web-worker-shared-utils/src/server-cache/ServerCache.ts","webpack:///D:/a/_work/1/s/libs/wpo-common/src/WpoHelper.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/logging/ErrorHelper.ts","webpack:///D:/a/_work/1/s/libs/experiences-constants/src/Flights.ts","webpack:///D:/a/_work/1/s/libs/experimentation-helpers/src/GetPeregrineFlights.ts","webpack:///./src/integration/SubnavTabId.ts","webpack:///D:/a/_work/1/s/libs/telemetry-core/src/utilities/TelemetryHelper.ts","webpack:///D:/a/_work/1/s/libs/card-properties/src/CardSizes.ts","webpack:///D:/a/_work/1/s/components/icon/icons/AdChoices.svg","webpack:///D:/a/_work/1/s/components/icon/icons/AlertWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/AllDone.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BingCardDefaultHotelImage.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BingHotelSeePrice.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BingLogo.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BingRatingDarkLightStar.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BingRatingDarkStar.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BingRatingLightStar.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BlowingHail.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BlowingHailWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BlowingHailV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BlowingSnow.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BlowingSnowWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/BlowingSnowV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/CardActionButton.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ChatBubbleIcon.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Check.svg","webpack:///D:/a/_work/1/s/components/icon/icons/CheckmarkOutline.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Chevron.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ChevronDown.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ChevronDownV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ChevronDownV3.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ChevronRight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHChevronLeft.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHChevronRight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ChevronUp.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ChevronWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/CircleChevron.svg","webpack:///D:/a/_work/1/s/components/icon/icons/CircleClose.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ClearNight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ClearNightWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ClearNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Close.svg","webpack:///D:/a/_work/1/s/components/icon/icons/CloseV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/CloseThin.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Cloudy.svg","webpack:///D:/a/_work/1/s/components/icon/icons/CloudyWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/CloudyV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Comment.svg","webpack:///D:/a/_work/1/s/components/icon/icons/CommentFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ConflictWarning.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Copy.svg","webpack:///D:/a/_work/1/s/components/icon/icons/DarkModeHotel.svg","webpack:///D:/a/_work/1/s/components/icon/icons/DataProvider.svg","webpack:///D:/a/_work/1/s/components/icon/icons/DayTime.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Delete.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Discover.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Dislike.svg","webpack:///D:/a/_work/1/s/components/icon/icons/DislikeText.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Disliked.svg","webpack:///D:/a/_work/1/s/components/icon/icons/DislikedLight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/DislikedText.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Docx.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Download.svg","webpack:///D:/a/_work/1/s/components/icon/icons/DownloadNoFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Edit.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EditNoFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Edited.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EditedNoFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Ellipses.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EllipsesLight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EllipsesV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EmojiAngry.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EmojiHeart.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EmojiLike.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EmojiSad.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EmojiSurprised.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EmojiThinking.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EmptyDiscoverDark.svg","webpack:///D:/a/_work/1/s/components/icon/icons/EmptyDiscoverLight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ErrorRocketLight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ErrorRocketDark.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Excel.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Facebook.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FacebookCircle.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FacebookText.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FacebookTextBlack.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Feedback.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Flag.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentArrowTrending.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentAttach.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentCalendar.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentComment.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentCompassNorthwest.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentEdit.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentFolderOpen.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentMention.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentNews.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentPeople.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FluentVideo.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Fog.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FogWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FogV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Folder.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FolderNoFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FolderOpen.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Form.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Forward.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FreezingRain.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FreezingRainWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FreezingRainV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FrequentSitesEmpty.svg","webpack:///D:/a/_work/1/s/components/icon/icons/FrequentSitesError.svg","webpack:///D:/a/_work/1/s/components/icon/icons/GalleryFullscreen.svg","webpack:///D:/a/_work/1/s/components/icon/icons/GalleryMediaIcon.svg","webpack:///D:/a/_work/1/s/components/icon/icons/GeneralErrorDark.svg","webpack:///D:/a/_work/1/s/components/icon/icons/GeneralErrorLight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/GenericFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Glimmer.svg","webpack:///D:/a/_work/1/s/components/icon/icons/GridView.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HailDay.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HailDayWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HailDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HailNight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HailNightWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HailNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HazeSmoke.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HazeSmokeNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HazeSmokeNightV2_106.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HazeSmokeWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HazySmokeV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HeavySnow.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HeavySnowWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HeavySnowV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Hide.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HideV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HideStory.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HideStoryV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Home.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HomeOutline.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Hotel.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HurricaneFull.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Hurricane.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Hurricane1.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Hurricane2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Hurricane3.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Hurricane4.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Hurricane5.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HurricaneTC.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HurricaneTD.svg","webpack:///D:/a/_work/1/s/components/icon/icons/HurricaneTS.svg","webpack:///D:/a/_work/1/s/components/icon/icons/IndustryBriefcase.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Information.svg","webpack:///D:/a/_work/1/s/components/icon/icons/InteractionRequiredDark.svg","webpack:///D:/a/_work/1/s/components/icon/icons/InteractionRequiredLight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Interested.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LanguageAndContent.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LightBulb.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LightRain.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LightRainWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LightRainV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LightSnow.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LightSnowWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LightSnowV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Like.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LikeText.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Liked.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LikedText.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Line.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Link.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LinkedIn.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LinkedInBlack.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LinkedInText.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ListMenu.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LocaleLanguage.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Locate.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LocateWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/LocationDetect.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Lock.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Mail.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MailBlack.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MailRoundedCorners.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MailNoFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ManagedBriefcase.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ManagedBriefcaseNoFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MapEnterFullScreenMode.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MapExitFullScreenMode.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MapZoomIn.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MapZoomOut.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MediaIconSlideshow.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MediaIconVideo.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Message.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MessageNoFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Messages.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MicrosoftFullLogo.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MicrosoftLogo.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MicrosoftNews.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MicrosoftNewsFull.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MicrosoftNewsFull_FR.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MicrosoftNewsFull_ZH.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ModerateRain.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ModerateRainWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ModerateRainV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/More.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MostlySunny.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MoreV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Movie.svg","webpack:///D:/a/_work/1/s/components/icon/icons/MsnLogo.svg","webpack:///D:/a/_work/1/s/components/icon/icons/NightTime.svg","webpack:///D:/a/_work/1/s/components/icon/icons/OfferTimer.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Office.svg","webpack:///D:/a/_work/1/s/components/icon/icons/OfficeFormsLogo.svg","webpack:///D:/a/_work/1/s/components/icon/icons/OneDrive.svg","webpack:///D:/a/_work/1/s/components/icon/icons/OneNote.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Onetoc.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Open.svg","webpack:///D:/a/_work/1/s/components/icon/icons/OpenSquared.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Outlook.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PartlyCloudyDay.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PartlyCloudyDayWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PartlyCloudyDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PartlyCloudyNight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PartlyCloudyNightWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PartlyCloudyNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Pdf.svg","webpack:///D:/a/_work/1/s/components/icon/icons/People.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Pencil.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHAdd.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHAlert.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHArrowRight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHBlowingHailV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHBlowingSnowV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHCalendar.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHClearNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHCloudyV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHEllipsis.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHEmptyTasks.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHFavorite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHFavoriteFilled.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHExcel.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHExcelFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHFluidFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHFog.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHFogV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHFormFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHFreezingRainV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHGenericFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHHailDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHHailNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHHazeSmokeNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHHazeSmokeV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHHeavySnowV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHLightRainV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHLightSnowV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHModerateRainV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHMostlySunnyV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHNoTask.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHOutlook.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHOneDrive.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHOneNote.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHOneNoteFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHPartlyCloudyDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHPartlyCloudyNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHPDFFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHPowerBIFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHPowerPointFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHProjectFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHRaindrop.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHRainShowersDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHRainShowersNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHRainSnowV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHRainSnowShowersNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHSharepoint.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHSharePointFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHSharePointNewsFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHStream.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHStreamFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHSnowShowersDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHSnowShowersNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHSunnyDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHSwayFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHThunderstormsV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHToDo.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHVideoFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHVisioFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHWindyV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHWord.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PHWordFile.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Pin.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Plus.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PopoverArrow.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PowerBI.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PowerPoint.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Pptx.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PresenceAvailable.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PresenceAway.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PresenceBusy.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PresenceOof.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PresenceOofAvailable.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PresenceOofBusy.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PresenceUnknown.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PriceDrop.svg","webpack:///D:/a/_work/1/s/components/icon/icons/PriceDropBlue.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Project.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Radar.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Raindrop.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainShowersDay.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainShowersDayWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainShowersDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainShowersNight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainShowersNightWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainShowersNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainSnow.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainSnowV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainSnowShowersDay.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainSnowShowersDayWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainSnowShowersNight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainSnowShowersNightWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainSnowShowersNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RainSnowWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Rating.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RatingEmpty.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RatingEmptyDark.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RatingPartial.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RatingPartialDark.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RecommendedEmpty.svg","webpack:///D:/a/_work/1/s/components/icon/icons/RecommendedError.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Refresh.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Remove.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Save.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Saved.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SetHome.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SevereWeather.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Search.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SearchV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Share.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ShareRoundedCorners.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ShareLight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ShareNoFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Sharepoint.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Shopping.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ShoppingDealsDark.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ShoppingDealsLight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Skype.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SkypeOffice.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SlugInfo.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SlugInfoDark.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SnowShowersDay.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SnowShowersDayWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SnowShowersDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SnowShowersNight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SnowShowersNightWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SnowShowersNightV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Star.svg","webpack:///D:/a/_work/1/s/components/icon/icons/StarFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/StarFollow.svg","webpack:///D:/a/_work/1/s/components/icon/icons/StarFollowBlue.svg","webpack:///D:/a/_work/1/s/components/icon/icons/StarOutline.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Stars.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SunnyDay.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SunnyDayOutline.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SunnyDayWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SunnyDayV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Sway.svg","webpack:///D:/a/_work/1/s/components/icon/icons/SwayApp.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Teams.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThumbnailView.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThumbDown.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThumbDownBlue.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThumbUp.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThumbUp2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThumbUp3.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThumbUpBlue.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThumbUpFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThumbsUpAndDown.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Thunderstorms.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThunderstormsWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/ThunderstormsV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/TodaysEventsEmpty.svg","webpack:///D:/a/_work/1/s/components/icon/icons/TodaysEventsError.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Trending.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Twitter.svg","webpack:///D:/a/_work/1/s/components/icon/icons/TwitterBlack.svg","webpack:///D:/a/_work/1/s/components/icon/icons/TwitterNoFill.svg","webpack:///D:/a/_work/1/s/components/icon/icons/TwitterText.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Unpin.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Upload.svg","webpack:///D:/a/_work/1/s/components/icon/icons/VerticalSeparator.svg","webpack:///D:/a/_work/1/s/components/icon/icons/VideoMediaIcon.svg","webpack:///D:/a/_work/1/s/components/icon/icons/VideoPlay.svg","webpack:///D:/a/_work/1/s/components/icon/icons/VideoFallback.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Visio.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Vkcom.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Vsdx.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WaterDropL2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherAlert.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherAQI.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherBarometer.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherCloud.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherDaylight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherDewpoint.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherWarning.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherWatch.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherAdvisory.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherAlertV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherExpand.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherHumidity.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherIcon.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherMapPause.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherMapPlay.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherPrecipitation.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherSatellite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherSunrise.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherSunset.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherTemperature.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherUv.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherVisiblity.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherWind.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherWildfire.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeatherWindDir.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeeklyAdsDark.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WeeklyAdsLight.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WhatsApp.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WhatsAppBlack.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Windy.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WindyWhite.svg","webpack:///D:/a/_work/1/s/components/icon/icons/WindyV2.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Winterstorm.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Word.svg","webpack:///D:/a/_work/1/s/components/icon/icons/World.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Xlsx.svg","webpack:///D:/a/_work/1/s/components/icon/icons/Yammer.svg","webpack:///./src/publicPath.ts","webpack:///./src/integration/SubnavTabName.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/schema/enums.ts","webpack:///D:/a/_work/1/s/libs/experiences-base/src/utilities/FastBreakpointManager.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/performance/PerfMarkerWait.ts","webpack:///D:/a/_work/1/s/libs/experiences-constants/src/ExperienceIds.ts","webpack:///D:/a/_work/1/s/libs/milestone-data/src/data-management/MilestoneTrackerHelper.ts","webpack:///D:/a/_work/1/s/libs/views-helpers/src/SocialMediaConfig.ts","webpack:///D:/a/_work/1/s/libs/diagnostics/src/logging/ExceptionLogging.ts","webpack:///D:/a/_work/1/s/libs/render-cache/src/PersistRenderCache.ts","webpack:///D:/a/_work/1/s/libs/milestone-data/src/data-model/ExperienceMilestoneEventTypes.ts","webpack:///D:/a/_work/1/s/libs/milestone-data/src/data-model/ExperienceDeferralEventTypes.ts","webpack:///D:/a/_work/1/s/libs/milestone-data/src/data-management/ExperienceDeferralDependencyTrackerState.ts","webpack:///D:/a/_work/1/s/libs/milestone-data/src/MilestoneData.Helper.ts","webpack:///D:/a/_work/1/s/libs/milestone-data/src/MilestoneData.constants.ts","webpack:///D:/a/_work/1/s/libs/milestone-data/src/data-model/ExperienceDeferralHandlerSignature.ts","webpack:///D:/a/_work/1/s/libs/core/src/bundles/Bundles.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/mapper/SocialServiceMapper.ts","webpack:///./src/integration/Constants.ts","webpack:///./src/integration/Mediator.ts","webpack:///./src/integration/SubnavTabHelper.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/index.ts","webpack:///D:/a/_work/1/s/libs/telemetry-core/src/tracking/TelemetryDOM.ts","webpack:///D:/a/_work/1/s/libs/river-data-types/src/RiverCardActions.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/ObserverHelper.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/schema/SocialBarData.ts","webpack:///D:/a/_work/1/s/libs/experiences-base/src/design-system/DesignSystemDefaults.ts","webpack:///D:/a/_work/1/s/libs/core/src/telemetry-base/TelemetryBase.ts","webpack:///D:/a/_work/1/s/libs/views-helpers/src/SocialMediaHelper.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/schema/index.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/utils/UrlHelper.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/utils/FetchScripts.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/utils/ApiErrors.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/utils/AppErrorLogger.ts","webpack:///D:/a/_work/1/s/libs/social-data-service/src/service/SocialService.ts","webpack:///D:/a/_work/1/s/experiences/social/src/Social.bridge.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/SocialData.actions.ts","webpack:///D:/a/_work/1/s/experiences/social/src/Social.actions.ts","webpack:///D:/a/_work/1/s/experiences/social/src/Social.inspector.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/AppErrorLogger.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/enums.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/themeHelpers.ts","webpack:///D:/a/_work/1/s/experiences/social/src/Social.connector.ts","webpack:///D:/a/_work/1/s/experiences/social/src/Social.reducer.ts","webpack:///D:/a/_work/1/s/experiences/social/src/Social.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/AccessibilityHelpers.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/Comment.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/images.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/avatarFallback.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/icons.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/comment/comment-list/CommentList.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/comment-box/CommentBox.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/urlHelper.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/openGuidelinePage.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/disabled-message/DisabledMessage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/follow-button/FollowButton.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/follow-button/FollowButton.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/utils/mouseHandlers.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/popover/Popover.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/utils/openProfilePage.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/user-card/UserCard.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/utils/openEditProfilePage.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/comment-box/CommentBox.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/comment/comment-item/CommentItem.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/delete-menu/DeleteMenu.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/delete-menu/DeleteMenu.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/utils/emojiIcons.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/common/mini-reaction-breakdown/MiniReactionBreakdown.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/common/most-reactions/MostReactions.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/common/reaction-panel/ReactionPanel.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/reaction-menu/ReactionMenu.telemetry.ts","webpack:///D:/a/_work/1/s/libs/social-interaction-helpers/src/utils/EventHelpers.ts","webpack:///D:/a/_work/1/s/libs/social-interaction-helpers/src/utils/BridgeHelpers.ts","webpack:///D:/a/_work/1/s/libs/social-interaction-helpers/src/TouchSlideHandlers.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/reaction-menu/ReactionMenu.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/utils/styleHelpers.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/reaction-panel/ReactionPanel.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/comment/reply-list/ReplyList.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/common/report-menu/ReportMenu.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/report-menu/ReportMenu.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/utils/getAgoText.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/comment-item/CommentItem.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/common/sort-box/SortBox.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/sort-box/SortBox.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/comment/comment-list/CommentList.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/comment/content-panel/ContentPanel.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/typing-users/TypingUsers.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/comment/content-panel/ContentPanel.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/common/notification/NotificationCard.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/openArticlePage.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/notification/NotificationCard.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/common/notification/NotificationTray.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/utils/isValidURL.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/contentIdKey.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/Comment.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/community-guideline/CommunityGuidelinePage.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/navbar/Navbar.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/community-guideline/CommunityGuidelinePage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/content-social-bar/ContentSocialBar.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/social-bar-panel/SocialBarPanel.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/social-bar-panel/SocialBarPanel.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/content-social-bar/ContentSocialBar.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/utils/getFlight.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/fileHelpers.ts","webpack:///D:/a/_work/1/s/experiences/social/src/copyright-form/CopyrightForm.tsx","webpack:///D:/a/_work/1/s/libs/subscription-sdk-wrapper/src/Initialization.ts","webpack:///D:/a/_work/1/s/libs/subscription-sdk-wrapper/src/API.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/gradient-overlay/GradientOverlay.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/multi-login-page/MultiLoginPage.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/socialMedia.ts","webpack:///D:/a/_work/1/s/experiences/social/src/multi-login-page/MultiLoginPage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/multiple-content-test/MultipleContentTest.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/onboarding-page/OnboardingPage.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/onboarding-page/OnboardingPage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/onboarding-page/OnboardingThirdPartyPage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/onboarding-page/OnboardingUnderagePage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-card/ProfileCard.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-card/profile-card-user-stats/ProfileCardUserStats.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-report-menu/ProfileReportMenu.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-report-menu/ProfileReportMenu.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-card/ProfileCard.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-manage-data-page/ProfileManagaDataPage.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-manage-data-page/ProfileManageDataPage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-tabs/ProfileTabs.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/ProfileActivityReadMarker.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/ProfileAlertActivity.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/ProfileBadgeActivity.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/ProfileActivity.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/ProfileFollowActivity.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/ProfileReactionActivity.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/ProfileReplyActivity.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/ProfileActivity.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-comments/ProfileComments.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-comments/ProfileCommentItem.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-comments/ProfileCommentItem.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-comments/ProfileComments.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-privacy/ProfilePrivacy.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-privacy/ProfilePrivacy.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-subscriptions/ProfileSubscriptions.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-users/ProfileUsers.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-users/ProfileUsers.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-tabs/ProfileTabs.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-page/ProfilePage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-card/PublisherProfileCard.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-card/publisher-profile-card-stats/PublisherProfileCardStats.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-card/PublisherProfileCard.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-tabs/PublisherProfileTabs.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-tabs/PublisherProfileTabs.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-page/PublisherProfilePage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-subscribe-follow-button/PublisherSubscribeFollowButton.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/reaction-breakdown/ReactionBreakdown.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/reaction-breakdown/ReactionBreakdownListItem.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/reaction-breakdown/ReactionBreakdown.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/media-input/MediaInput.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/ug-content-create-view1/UGContentCreateView1.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/tag-input/TagInput.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/ug-content-create-view2/UGContentCreateView2.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/ug-content-create-page/UGContentCreatePage.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/ug-content-list/UGContentList.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/main/main.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/popup/Popup.telemetry.ts","webpack:///D:/a/_work/1/s/experiences/social/src/popup/Popup.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/Social.errors.ts","webpack:///D:/a/_work/1/s/experiences/social/src/Social.tsx","webpack:///D:/a/_work/1/s/experiences/social/src/utils/commonJssConstants.ts","webpack:///D:/a/_work/1/s/experiences/social/src/copyright-form/CopyrightForm.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/disabled-message/DisabledMessage.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/follow-button/FollowButton.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/media-input/MediaInput.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/multi-login-page/MultiLoginPage.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/popup/Popup.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-page/ProfilePage.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-posts/ProfilePosts.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-report-menu/ProfileReportMenu.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/reaction-breakdown/ReactionBreakdown.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/social-bar-panel/SocialBarPanel.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/tag-input/TagInput.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/index.ts","webpack:///D:/a/_work/1/s/experiences/social/src/Social.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/Common.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/Comment.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/content-panel/ContentPanel.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/comment-box/CommentBox.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/comment-list/CommentList.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/comment-item/CommentItem.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/reply-list/ReplyList.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/user-card/UserCard.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/mini-reaction-breakdown/MiniReactionBreakdown.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/popover/Popover.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/reaction-menu/ReactionMenu.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/reaction-panel/ReactionPanel.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/report-menu/ReportMenu.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/sort-box/SortBox.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/community-guideline/CommunityGuideline.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/content-social-bar/ContentSocialBar.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-users/ProfileUsers.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/notification/NotificationCard.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/notification/NotificationTray.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/ProfileActivity.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-card/ProfileCard.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-comments/ProfileComments.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-privacy/ProfilePrivacy.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-tabs/ProfileTabs.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-manage-data-page/ProfileManageDataPage.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/onboarding-page/OnboardingPage.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/delete-menu/DeleteMenu.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/ug-content-create-page/UGContentCreatePage.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/ug-content-create-view1/UGContentCreateView1.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/ug-content-create-view2/UGContentCreateView2.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/ug-content/ug-content-list/UGContentList.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/content-card/ContentCard.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/typing-users/TypingUsers.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/gradient-overlay/GradientOverlay.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-card/profile-card-user-stats/ProfileCardUserStats.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/navbar/Navbar.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-page/PublisherProfilePage.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-tabs/PublisherProfileTabs.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-card/PublisherProfileCard.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-profile/publisher-profile-card/publisher-profile-card-stats/PublisherProfileCardStats.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-subscriptions/ProfileSubscriptions.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/most-reactions/MostReactions.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/publisher-subscribe-follow-button/PublisherSubscribeFollowButton.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/utils/themes/superapp/CommonSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/comment/themes/superapp/CommentSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-page/themes/superapp/ProfilePageSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-card/profile-card-user-stats/themes/superapp/ProfileCardUserStatsSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-tabs/themes/superapp/ProfileTabsSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-card/themes/superapp/ProfileCardSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-activity/themes/superapp/ProfileActivitySuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-comments/themes/superapp/ProfileCommentsSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/follow-button/themes/superapp/FollowButtonSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-users/themes/superapp/ProfileUsersSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-privacy/themes/superapp/ProfilePrivacySuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/content-social-bar/themes/superapp/ContentSocialBarSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/reaction-breakdown/themes/superapp/ReactionBreakdownSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/profile/profile-report-menu/themes/superapp/ProfileReportMenuSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/common/report-menu/themes/superapp/ReportMenuSuperApp.styles.ts","webpack:///D:/a/_work/1/s/experiences/social/src/community-guideline/themes/superapp/CommunityGuidelinePageSuperApp.styles.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/SocialData.bridge.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/utils/fetchScripts.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/utils/webSockets.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/utils/AppErrorLogger.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/utils/parseState.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/utils/enums.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/utils/contentIdKey.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/SocialData.connector.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/utils/themeHelpers.ts","webpack:///D:/a/_work/1/s/libs/social-data-connector/src/SocialData.reducer.ts","webpack:///./src/social/Social.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","500","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","canUseDOM","BrowserType","clientData","enableCMSPPEConfigs","this","initializeHeadData","locale","marketDir","currentFlights","clientSettings","userIsSignedIn","isPreload","isPrerender","isAppcache","isBlendedEnterprise","isMmxWwwContentRequest","isServiceWorkerCache","lastKnownAppVersion","anonCookieName","ssoComplete","aadState","_instance","headData","initializeFromData","newRidNeeded","lastUsedActivityIdBacking","locationSearch","htmlElement","html","headElement","applicationCache","initializeFromDom","getAttribute","manifestAttributeName","navigator","serviceWorker","controller","initializeFromStorage","initializeLastUsedActivityId","clientSettingsLocaleExists","language","market","toLowerCase","toLocaleLowerCase","setQueryItemProvidedValues","headDataJs","headJs","anonckname","signedin","UrlUtility","getQueryParameterByName","visibilityState","logDocumentVisibility","setIsBlendedEnterprise","setIsMmxWwwContentRequest","storageKey","getStoredActivityIdKey","storedActivityIdJson","getItem","activityId","id","ts","setItem","JSON","stringify","removeItem","pagetype","headDataResponse","setFlights","clientInfo","dataClientSettings","calculateForwardableParams","pageTypeFromSettings","storedVersions","getObject","pageVersions","bundleInfo","currentDomVersion","v","setObject","log","logPrefix","currentPageStoredHeadData","storedHeadData","populateFromApiResponse","response","responseClientSettings","responseFlights","info","pageGenTime","domQueryParams","queryparams","currentPageVersion","assign","params","lowerCaseParams","availableParams","map","paramValue","encodeURIComponent","filter","x","forwardablequeryparams","join","lastUsedAid","lastUsedActivityId","currentAid","aid","pageGenTimestamp","parseISO","getTime","flightString","exec","IsBlendedEnterprise","audienceMode","Enterprise","browser","browserType","EdgeChromium","parseInt","version","includes","queryItems","getParamsWithItems","cmsItem","find","item","setCurrentFlightsTestOverride","flights","isVisible","addEventListener","getHeadData","getInstance","resetInstance","canMatchMedia","query","breakpoint","matchMedia","matches","maxWidthValues","minWidthValues","minWidth","maxWidth","Infinity","minBreakpoint","toString","breakpoints","maxBreakpoint","getLocationHref","location","href","url","getLocationHostname","hostname","getLocationHost","host","getLocationOrigin","origin","getLocationSearch","search","getCookieString","cookie","getDocumentElementById","elementId","getElementById","getDocumentElementsByTagName","tagName","getElementsByTagName","getIndexedDB","indexedDB","getInnerHeight","innerHeight","getCssGridSupport","CSS","supports","canUseCssGrid","createScriptTag","loadAsync","scriptElement","async","NONCE_ID","nonce","primeForbiddenCharacters","getParamsFromUrl","decodeComponents","getParams","split","decodeURIComponentWithPlusSign","val","replace","decodeURIComponent","queryString","startsWith","substring","queryArray","ndx","parts","queryKey","queryValue","newParam","existingParam","entry","encodeURIComponentForPrime","uriComponent","findIndex","hrefParamsObj","getParamsObj","paramsObj","paramArray","forEach","keyValuePair","isValidUrl","validateScheme","indexOf","keyValueArrayToQueryString","kv","isKeyValuePair","joinSubpathToURL","subPath","trimmedEndSlashFromHref","trimmedStartSlashFromSubpath","URL","updateSearchParam","searchParams","set","appendSearchParam","fallback","append","getAbsoluteUrl","partialUrl","severity","Alert","pb","build","updateAppErrorsPropertyBag","newPbInfo","getAppErrorsPropertyBag","NoAlert","OneServiceCardProviderAppErrors","OneServiceResponseEmpty","source","EmptyMyFeed","OneServiceResponseWasNullOrErroneous","ErrorFetchingOneServiceResponse","HighImpact","InvalidJsonInOneServiceResponse","InvalidFeedListInOneServiceResponse","RiverConfigurationIssue","QueryInterestContentFetchError","StaticContentLoaded","ContentPreviewAppErrors","ErrorWhileFetchingContentPreviewContent","InvalidResponseFromContentPreviewFetch","InvalidResponseFromContentPreviewResponseJson","ErrorWhileInitializingAsyncContentPreviewContent","InvalidOrMissingContentId","MissingDataForExternalContent","MissingPartnerLink","RiverSourceFile","RiverAppErrors","UnknownMetadataReceivedFromRiverCardProvider","RiverContentProviderFetchException","SkipPositionedCardsFallbackStrategyFailed","InvalidConfig","MissingExperienceTypeMap","ChildLoadError","InitialDataLoadError","DuplicateInstanceIdWarning","FullHeightFallbackStrategyFailed","UserInitiatedPageRefreshErrors","Default","SportsCardError","SportsLeaguePdpFetchError","SportsLeaguePdpInvalidResponse","SportsPlayersPdpFetchError","SportsPlayersPdpInvalidResponse","SportsTeamsPdpFetchError","SportsTeamsPdpInvalidResponse","SportsCardConfigFetchError","SportsCardGetFavoriteTeamDataError","SportsCardGetPlayerBioError","SportsCardGetLeaguesGamesArrayError","SportsCardGetPdpDataFailure","SportsCardGetLeagueSeasonYearDataFailure","SportsCardGetLocalizedTeamNameDataFailure","SportsCardGetTeamDataFailure","SportsCardGetLeagueDataFailure","MoneyCardError","MoneyQuoteSummaryGetError","MoneyQuoteSummariesGetError","MoneyPdpDataGetErrorFromService","MoneyPdpInvalidResponseFromService","MoneyQuoteSummaryGetErrorFromService","MoneyQuoteSummaryInvalidResponseFromService","TrendingNewsErrors","DataFetchError","BackupDataFetchError","GridSectionAppErrors","GridSectionCardGenerationError","MeControlAppErrors","SSOFailedError","MeControlLoadFailedError","PageClickTrackerErrors","InvalidResponse","FetchFailure","CoachmarkAppErrors","GeneralError","NotPlaceable","NotFoundComponent","CoachmarkDataConnectorUndefined","InvalidCTAType","CTATypeNotDefined","ConfigDataUndefined","FailedToFetchConfigData","ExceptionFetchingConfigData","EventNotDefined","CoachmarkStateNotDefined","CoachmarkDataAppErrors","InvalidCoachmarkMessage","IrisDataConnectorUndefined","ErrorFoundForSurface","TelemetryInfoUndefined","EventTypeUndefined","IrisActionUndefined","SpotlightPreviewAppErrors","ErrorWhileFetchingSpotlightPreviewCardInfo","NoServiceContextMetadata","SpotlightErrors","UnknownError","ContentFetchError","PartnerFetchFail","CardActionErrors","CardActionBaseExperienceError","CardActionPostActionError","CardActionDeleteActionError","CardActionGetActionError","CookieRelatedErrors","SharedStateConnectorNull","CookieNotCategorized","OverlayErrors","LoadExperienceError","ViewsCommonAppErrors","InvalidIntraArticleDataError","InvalidDocumentContentError","ViewsPaddleDataLoadError","ViewsErrorPage","ProviderMapperError","ContentActionsToolbarAppErrors","ContentActionsSharingToolbarLoadError","ContentActionsArticleDatafetchError","ContentActionsBaseExperienceError","ContentActionsGetDocumentDataError","ContentActionsGetContentStatusActionError","ContentActionsDeleteActionError","ContentActionsPostActionError","ContentActionsExperienceLoadError","ContentActionsFlipToolbarError","ContentActionsContentStatusFetchError","ContentActionsContentPreviewFetchError","ContentSharingToolbarAppErrors","ContentSharingToolbarInitializationError","ContentSharingToolbarSaveForLaterServiceError","ContentProviderAppErrors","InvalidSourceIdError","ProviderDetailsFetchError","ProviderFeedFetchError","InvalidLayoutTemplate","ViewsGalleryAppErrors","InvalidGalleryIdError","GalleryDataLoadError","GalleryImagesLoadError","VideoListAppErrors","VideoListDataLoadError","ViewsArticleAppErrors","InvalidArticleIdError","ArticleDataLoadError","IntraArticleComponentLoadError","InlineGalleryInvokeError","InterestsSearchAppErrors","ErrorResponseFromOneService","ErrorResponseFromOneServiceIsInvalid","InvalidUrlFoundForElement","SelectedItemNotFoundInSuggestions","SelectedItemIsInvalid","InterestsAppErrors","InterestsRetrieveTopicsError","InterestsRetrieveFollowedTopicsError","InterestsRetrieveMutedPublishersError","InterestsUnMutePublisherError","InterestsFollowTopicError","InterestsUnfollowTopicError","InterestsTopicStateUndefined","InterestsShouldHaveRendered","InterestsRetrieveTopicError","InterestsRetrieveSavedStoriesError","InterestsSavedStoriesInvalidConfigError","InterestsSavedStoriesChildLoadError","InterestsSavedStoriesInvalidJsonError","InterestsSavedStoriesInvalidListError","InterestsRetrieveRecommendedTopicsError","UndefinedTopicDataConnector","InterestsRetrieveReadStoriesError","InterestsReadStoriesInvalidConfigError","InterestsReadStoriesChildLoadError","InterestsReadStoriesInvalidJsonError","InterestsReadStoriesInvalidListError","FailedRestoringDefaultTopicsError","TopicsFailedIndexedDBConnection","TopicsFailedGettingIndexedDB","TopicsFailedUpdatingIndexedDB","TopicsFailedCheckingLimitedFeed","InterestsRetrieveWorkTopicsError","ComponentConnector","ComponentConnectorAppErrors","DuplicateChildInstanceFound","BundleLoadError","ChildConfigInfoListNull","ListStartPositionInvalid","ChildDelayLoadError","ExperienceDependencyTimeout","LoadDataConnectorConfigFailed","LoadDataConnectorFailed","ChildWithInvalidExperience","ExperienceLoaderAppErrors","InsufficientLoadArgs","ConnectComponentFailureError","LoadComponentFailureError","SearchError","MissingFormCode","RecommendedSearchErrors","ResponseParsingFailed","InvalidJsonResponse","ServiceCallFailed","RenderFailed","Timeout","PollsCardAppErrors","Critical","PollsListFetchError","PollDataFetchError","PollsCardInvalidPoll","PollsCardInvalidQuizPoll","PollsCardVoteError","PollsCardMapStateToPropsError","PollsUnknownError","PollsResultPercentageError","PollAutoCuratedErrors","PollAutoCuratedContentError","PollAutoCuratedInvalid","PollAutoCuratedResultsFetchError","PollAutoCuratedResultsTransformError","MonetizationAppErrors","PlacementManagerLoadError","ArrangementPositionLoadError","GetCMSContentError","GetSAMRTBResponseError","MediaNetEOABError","InvalidPromoModuleConfig","CookieSyncDownloadExternalScriptError","CookieSyncMissingExternalScriptUrl","CookieSyncTimeout","CookieSyncPartnerScriptError","CookieSyncPixelPartnerDownloadError","CMSOrBackfillNativeAdLoadError","PlacementPositionMismatchingError","MissingRequiredPropertyPlacementManagerConfig","NativeAdTargetScopeError","RiverVideoAdPartnerError","JsTrackerPartnerScriptLoadError","ViglinkError","MissingTopicId","TopicIdNotFound","GetSAMRTBResponseErrorNoAlert","DisplayAdsOathLoadError","DisplayAdsApnLoadError","DisplayAdsApnEmptyProvider","DisplayAdsAdsDetectionNotInit","DisplayAdsMoatLoadError","DisplayAdsNoAdObjects","DisplayAdsProviderIdEncode","DisplayAdsJacLoadError","DisplayAdsInvalidSizeError","DisplayAdsInvalidParameterError","TaboolaRiverAppErrors","TaboolaRiverFetchError","CoreLibAppErrors","DeprecatedCompositionLayoutUsed","InvalidColumnInGridConfig","ErrorLoadingBundle","GenericJSException","LocalStorageDoesntExist","SessionStorageDoesntExist","ReactRenderException","userImpacting","NetworkConnectionStatus","ResolverAppErrors","IndexedDbWriteFailed","IndexedDbReadFailed","CrsFetchError","ReceivedConfigFromCdnAsCrsFetchFailed","GetConfigException","IndexedDbBulkReadFailed","IndexedDbFailedToRemoveCachedConfig","IndexedDbFailedToClearAllCachedConfigs","RenderCachePurgedDueToChangesInConfig","FailedToPurgeRenderCache","RefreshConfigCacheFailed","IndexedDbInitFailed","DifferentCbid","PrgFlightLsWriteError","PrgFlightLsReadError","ResolverErrorConfigsDownloadedByCdn","CachedConfigsForDifferentFlight","ConfigCrsFetchNon200Response","ConfigCdnFetchNon200Response","GitConfigsInvalidConfigRef","GitConfigsInvalidConfigResolver","BingCardsAppErrors","BingCardGetHotelAnswersError","BingCardGetHotelErrorFromService","BingCardGetAnswersError","BingCardInvalidEntityType","BingCardErrorOut","BingAnswersAppErrors","FailedToLoadData","NoCardsContentType","NoCardsRelated","BingShoppingLifestyleCardError","LifestyleShopCardServiceFetchError","LifestyleShopCardServiceFetchInvalidResponse","LifestyleShopCardServiceEmptyResponse","LifestyleShopCardServiceInvalidResponse","LifestyleShopCardCdnServiceFetchError","LifestyleShopCardCdnServiceFetchInvalidResponse","LifestyleShopCardCdnServiceInvalidResponse","LifestyleShopAutosuggestServiceFetchError","LifestyleShopAutosuggestServiceFetchInvalidResponse","LifestyleShopAutosuggestServiceEmptyResponse","LifestyleShopAutosuggestServiceInvalidResponse","LifestyleShopAutosuggestInvalidSuggestionUrl","BingMiniShoppingServiceClientSourceFile","BingMiniShoppingError","BingMiniShoppingServiceFetchError","BingMiniShoppingServiceEmptyResponse","BingMiniShoppingServiceInvalidResponse","BingMiniShoppingServiceInsufficientDealsItems","BingMiniShoppingServiceInsufficientActiveDealsItems","BingMiniShoppingServiceInsufficientTrendingItems","BingMiniShoppingServiceInsufficientTrendingCategories","BingShoppingMeStripeServiceFetchError","BingShoppingMeStripeServiceEmptyResponse","BingShoppingMeStripeServiceInvalidResponse","BingShoppingMeStripeServiceMissingRequiredFields","ShoppingCarouselEntitiesDataServiceFetchError","ShoppingCarouselEntitiesDataServiceEmptyResponse","ShoppingCarouselEntitiesDataServiceInvalidResponse","ShoppingCarouselEntitiesDataServiceInsufficientItems","ShoppingCarouselGenericError","ShoppingCarouselRenderError","ShoppingContentCardServiceFetchError","ShoppingContentCardServiceEmptyResponse","ShoppingContentServiceInvalidData","ShoppingContentServiceInsufficientActiveItems","ShoppingContentServiceMissingFields","OneServiceContentDataConnector","FailedToUpdateBypassValueConnectorNotInitialized","FailedToGetBypassValueConnectorNotInitialized","NotificationBellErrors","JsonParseError","NewsItemDataFetchError","MalformedNewsItemResponseError","ElectionResultMapConnectorErrors","ElectionResultMapInspectorErrors","EmptyResultSummaryError","ElectionResultMapErrors","FetchAndUpdateElectionDataError","ElectionDelegateCounterErrors","TopicByNameFetchFailed","RecommendedTopicsErrors","TopicsDataConnectorFailed","InvalidTopicClick","WebWorkerErrors","FileNotFound","RuntimeError","MessageTimeout","HandledError","WindowsShellInvalidShellContentResponse","WindowsShellInvalidContentResponse","WindowsShellEmptyShellContentResponse","WindowsShellFailedToGetContentOnRetry","WindowsShellAskingToFetchNewContentForRetry","SSRAppErrors","UntrackedClick","FragmentFetchFailed","DidUseBrowserCacheAPIError","DidUseBrowserCachePolyfillResponseHeaderInvalid","ServerCacheFetchFailed","ConnectorMapInvalid","FetchSSRPageFailed","FetchSSRPageFailedFromInvalidWindowInnerWidth","ServerCacheRefreshFailed","WebEntryFailed","SsrResolverReturnedNullConfig","AppError_InvalidQParams_35001","AppError_ArcResponseNotOk_35003","AppError_ArcResponseUnparsable_35004","AppError_UnknownIrisErrorFound_35006","AppError_TimeoutIrisErrorFound_35007","AppError_TemplateIrisErrorFound_35008","AppError_ClientErrorIrisErrorFound_35009","AppError_DSourceIrisErrorFound_35010","AppError_ActionResponseFailure_35013","AppError_UncaughtErrorDetected_35014","AppError_UnconvertableCreative_35015","AppError_InvalidResponseFormat_35016","AppError_UnparsableSingleResponseJSON_35018","SubscriberNotFound","CreativeCountNegativeOrZero","MissingIrisParameterForConditionalBanner","SubscriberNotFoundInIrisPlacementDictionary","FailedToReadNurturingAcceptedFlag","ExceptionRequestingSurfaceInfo","MissingIrisParameterForBackgroundImages","EdgeChromiumAPIsNotAvailable","AcquireAccessTokenFailed","AcquireAccessTokenHandledFailure","RenderCacheErrors","JssStyleMismatchWarning","JssStyleCriticalMismatchError","PreloadReportingMessages","TtvrMissing","TfprMissing","TtvrSearchBoxMissing","TtfSearchBoxMissing","PrerenderRevalidateException","PushNotificationsLibErrors","FetchKeyError","SubscribeUnsubscribeError","ContentTruncationErrors","OverTruncationError","EmptyFeedWithFeedId","EmptySearchedFeedWithFeedId","EmptySearchedFeedWithFeedQuery","EmptyKidsModeFeed","UnauthorizedFeedResponse","CardViewFeedDataMapperInvalidData","TabRiverRequestEmptyResponse","TabsRequestEmptyResponse","FallingBackToSkipStrategy","FallingBackToFullHeightStrategy","RiverContentProviderFetchNextPageException","InvalidEmptyRiverContent","GridSectionCardRenderFailure","FinanceAutoSuggestFetchError","FinanceAutoSuggestStatusError","FinanceAutoSuggestInvalidResponseBody","FinanceMostActiveQuotesFetchError","FinanceMostActiveQuotesStatusError","FinanceMostActiveQuotesInvalidResponseBody","FinanceWatchListFetchFailed","FinanceChartFetchError","FinanceChartStatusError","FinanceChartInvalidResponseBody","FinanceQuoteSummaryFetchError","FinanceQuoteSummaryStatusError","FinanceQuoteSummaryInvalidResponseBody","FinanceExchangeFetchError","FinanceExchangeStatusError","FinanceExchangeInvalidResponseBody","FinanceIndicesFetchError","FinanceIndicesStatusError","FinanceIndicesInvalidResponseBody","FinanceEquitiesFetchError","FinanceEquitiesStatusError","FinanceEquitiesInvalidResponseBody","FinanceEquityFinancialsFetchError","FinanceEquityFinancialsStatusError","FinanceEquityFinancialsInvalidResponseBody","FinanceGetAllCurrenciesFetchError","FinanceGetAllCurrenciesStatusError","FinanceGetAllCurrenciesInvalidResponseBody","FinanceGetMicrosoftIdFetchError","FinanceGetMicrosoftIdStatusError","FinanceGetMicrosoftIdInvalidResponseBody","FinanceGetMorningStarIdFetchError","FinanceGetMorningStarIdStatusError","FinanceGetMorningStarIdInvalidResponseBody","FinancePDPUserSettingsWriteFailed","FinanceWatchlistDataVisuallyUnavailable","FinanceQuotesDataVisuallyUnavailable","FinanceChartsDataVisuallyUnavailable","FinanceMoversDataVisuallyUnavailable","FinanceExchangesDataVisuallyUnavailable","FinanceIndicesDataVisuallyUnavailable","FinanceEquitiesDataVisuallyUnavailable","FinanceEquityFinancialsDataVisuallyUnavailable","FinanceCurrenciesDataVisuallyUnavailable","FinanceFundsDataVisuallyUnavailable","FinanceGetMicrosoftIdDataVisuallyUnavailable","FinanceGetMorningStarIdDataVisuallyUnavailable","FinanceCreatePortfolioFailed","FinanceCreateTransactionFailed","FinanceAddToWatchlistFailed","FinanceSortWatchlistFailed","FinanceDeleteFromWatchlistFailed","FinancePortfolioListFetchError","FinancePortfolioDataFetchError","FinanceDeletePortfolioError","FinanceUpdatePortfolioError","FinanceDeleteTransactionError","FinanceUpdateTransactionError","FinanceAddToPortfolioError","FinanceDeleteFromPortfolioError","FinanceSortPortfolioError","SocialNoModuleName","SocialExperienceReducerIncorrectArgumentError","SocialDataConnectorNotFound","SocialAPIRequestErrorUnknown","SocialAPIRequestErrorContents","SocialAPIRequestErrorComments","SocialAPIRequestErrorUsers","SocialExperienceRenderErrorComment","SocialExperienceRenderErrorProfilePage","SocialExperienceRenderErrorProfileCard","SocialExperienceRenderErrorProfileTabs","SocialExperienceRenderErrorSocialBar","SocialExperienceRenderErrorReactionBreakdown","SocialExperienceRenderErrorGuideline","SocialExperienceRenderErrorMultilineLogin","SocialExperienceRenderErrorNotificationTray","SocialExperienceRenderErrorOnboarding","SocialExperienceRenderErrorOnbardingThirdParty","SocialExperienceRenderErrorUnknownComponent","UnknownBulkLoadGraphActionType","WindowsCardProviderResponseWasNullOrErroneous","WindowsCardProviderErrorFetchingData","CommonHeaderNavigationFailed","CommonHeaderInvalidConfig","CommonHeaderMissingFormCode","CommonHeaderRenderError","NtpSettingsPrivateNotAvailable","NtpSetPrefFailureToWrite","NtpGetPrefFailureToRead","PerferenceSettingApiNotAvailable","PreferenceSettingKeyNotAvailable","PreferenceSettingDidNotSave","targetActionCTA","SetDefaultBrowserException","SetDefaultBrowserNotAvailable","AppPinningPrivateException","DesktopWidgetPrivateNotAvailable","WebWidgetLaunchApiNotAvailable","WebWidgetEnableAutoStartApiNotAvailable","FailedToLaunchAndDefaultWebWidget","locationHref","defaultExpirationTimeMs","defaultForceExpirationTimeMs","expirationPrefix","forceTimestampPrefix","jssMapSuffix","keysPrefix","normalizedUrlConfigkey","storagePrefix","riverRcClassName","ariaLabelAttribute","rootElementId","htmlElementIds","body","applicationCacheConstants","pagesRefreshData","pagetypeSettings","js","dir","serviceUrl","telemetryId","trackPageProduct","trackPageType","minimumHostPagePathSegments","appAnonCookieExistsCookieName","childCookieName","nurturingAcceptedStateKey","EnterpriseToConsumerOverrideKey","oneServiceHeaders","authorization","oneServiceQueryStringKeys","apiKey","complexInfoPaneEnabled","contentType","delta","disableTypeSerialization","infopaneCount","fdhead","feedLayoutRequestType","ids","ocid","parentContentId","parentNamespace","parentTitle","queryQ","queryType","qScope","responseSchema","select","session","signInCookieName","skip","timeOut","top","user","wrapOData","infoPaneItemCount","newsTop","newsSkip","AriaRoles","DeviceOrientation","CoreLocalStorageKeys","SelectedPivotStorageId","expPersistentDataChangeTrackerKey","prerenderedPageReload","prerenderedPageAge","forceReloadFlagName","AppType","CardStyleMode","RequestData","devicePixelRatio","requestId","referer","global","resetRequestData","getRequestData","ConnectorConstants","connectorStateKey","renderAction","dataConnectorMergeInitAction","tryParseJson","jsonString","parse","tryParseInt","defaultValue","isNaN","tryStringifyJson","jsonObj","ColumnArrangement","minViewportWidthOverrides","updateColumnArrangementsForFiveCol","fiveColSupported","columnArrangements","colFiveArrangementDefinition","ColumnArrangementDefinition","c5","columnArrangementMap","arrangement","contentSizePx","isFirstBreakpoint","widthOverride","contentBufferPx","c1","c2","c3","c4","columnArrangementDefinition","minViewportWidthPx","getBreakpointsFromColumnArrangements","getMediaQuery","minArrangement","maxArrangement","queries","minWidthPx","maxArrangementDefinition","maxArrangementIndex","getMediaQueryFor","columnArrangement","getMediaQuerySelector","mediaQuery","getMediaQuerySelectorFor","getActionPayload","connector","args","experienceInstanceId","stateKey","namespace","dispatchAction","payload","store","dispatch","getLocalStorage","safeLocalStorage","storage","supported","parsedObj","index","logError","matchingKeys","localStorage","ex","super","AppEnvironment","_serviceUrl","_configServiceOverride","_serviceDomainOverride","initializeAppEnvironment","wpoData","addWpoFlights","ClientSettings","environmentConfigUrl","process","env","WEBPACK_DEV_SERVER","URLSearchParams","searchParam","contentServiceUrlBase","currentRequestTargetScope","currentMarket","enableFiveColLayout","environment","staticDomain","hostPage","appType","authCookieName","useOneServiceAuthEndpoints","useAuthFetch","accountInfoPromise","resolvedAccountInfo","buildVersion","clarityEnabled","rootTelemetryId","trackInfo","getUserMuid","userId","oneServiceApiKey","isDebug","showMnsCreatorDashboard","currentContentLinkHost","isCnDomain","serviceUrlBase","feedServiceUrlBase","enterpriseServiceDomainUrl","CurrentRequestTargetScope","ResolvedAccountInfo","account_type","AAD","isFrePage","disableCachingConfigs","queryParamOverride","enableConfigService","EnableCMSPPEConfigs","isMultiConfigRetrievalEnabled","disableContentPreviewCache","sendFeedCallActivityIdInHeader","disableContentCacheIDBRead","configServiceBaseUrl","featureFlags","configRootUrl","cacheBustingIdentifier","isGitConfigs","countryCode","latitude","longitude","configCacheProperties","configOrigins","feature","Production","loc","IsGitConfigs","EnableConfigService","configServiceOverride","serviceDomainOverride","appEnvironment","environmentFromHeadData","locationHost","endsWith","tryReformatGuid","Locale","apps_locale","geo_country","geo_lat","geo_long","pcsInfo","setAccountInfoPromise","apptype","getAuthCookieName","disableActivityIdInHeader","Edge","Hub","cbid","pcsVersion","propertyBagPcsVersion","alias","configsHash","hash","locConfigsHash","buildAlias","bundleHash","configHash","locHash","configIndexDocId","rootElement","locationOrigin","envQSOverwrite","prod","servicesEndpoints","pcsProvidedDomainUrl","feedService","domain","serviceDomainUrl","enterpriseFeedService","crsVersion","crs","getHostPageFromUrl","Number","trackPageProd","trackPageTypeVal","sitePage","page_product","page_type","createContentLinkHost","setTargetScope","useGitConfigs","setConfigOrigin","MMX","IsMmxWwwContentRequest","mmxExperimentContentHost","useMultiConfigsRetrieval","baseUrl","getConfigServiceBaseUrl","1","true","getOneServiceApiKey","WindowsShell","NewsAndInterests","muid","muidCookie","relativePath","urlQuery","param","pageExperiments","Windows","Anon","AppAnon","FirstParty","MicrosoftNews","Views","Weather","Finance","HomePage","Office","AccountInfoPromise","chrome","authPrivate","getPrimaryAccountInfo","startTime","Math","round","performance","now","accountInfo","endTime","ZHCN","guid","match","Kids","getEnterpriseOverride","Adult","deviceFormFactor","os","platform","Web","pageType","stringHasData","CurrentFlights","model","FeatureFlags","wpoEnabled","WPOModel","getWpoModel","flightsCached","currentPageExperiments","concat","getAppEnvironment","renderCacheObject","windowAvailable","batchCSS","batchCss","styles","dataset","jss","innerHTML","scrapeDom","includeNewsFeed","root","rivers","getElementsByClassName","river","outerHTML","getStateFromRenderCache","renderCache","renderCacheKeys","renderCacheStoredKeys","renderCacheKeyOfNormalizedKeys","keyn","expn","frcn","jssn","cacheExpirationTimestamp","parsedCacheExpirationTimestamp","Date","renderCacheStorage","dom","batch_css","getRenderCache","state","initialState","reduxStoreStringifyReviver","getNormalizedLocationHref","configParamsList","normalizeKeyParamsList","normalizeUrlQsp","getNormalizeKeyParamsList","normalizedParams","setNormalizeKeyParamsList","dataType","Map","PageType","AudienceModeType","designSystemMap","designSystemIndexMap","createGenerateClassName","designSystem","dsKey","callback","dsName","dsIndex","rulesMap","rule","sheet","enhancer","middlewares","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","trace","traceLimit","_rootReducer","DynamicReducer","needsHydrate","hasPreHydrateState","keys","_store","rootReducer","reduce","connectors","onApplicationStart","connectedTopLevelElement","hostElement","bypassJSS","isSSR","updateJssManagerInstance","pageTimings","startMark","hydrate","endMark","render","jssInstance","plugins","logger","SignedInStatus","AccountType","AadAccountType","Telemetry","Utility","isNotNullOrUndefined","isDefined","potentialKeyValuePair","isKey","isValue","isNonNullObject","isNotNull","isNullOrWhiteSpace","trim","toNumber","arrayHasData","constructor","Array","objectToString","firstRun","attribute","removeHyphens","input","Size1ColumnWidth","Size2ColumnWidth","Size3ColumnWidth","Size4ColumnWidth","Size5ColumnWidth","GutterSize","Environment","getEnvironmentFromString","int1","int","intpr","intpef","SameSiteValues","getCookie","cookieString","RegExp","getMuidCookie","setRequireFunctionalCookie","expiryDays","path","secure","sameSiteValue","expiryDate","builder","date","setTime","toUTCString","Lax","None","updateResolverAppErrorsPropertyBag","FallbackResolverAppErrors","RecursiveGetFailed","BlobFetchReturnedNull","errorBehavior","Fallback","callbackMap","getDataConnector","initializeDataConnectorTracker","tryGetDataConnector","reportDataConnectorStateChange","dataConnectorName","newState","callbacks","createPerfTimeline","ctor","timelineName","instanceId","addPerfMarks","addPageTimings","tryGetPerfTimelineFuncRef","setTryGetPerfTimelineFunc","func","tryGetPerfTimeline","experienceName","Accounts","CDCSelfCheck","CircleCheckmark","ClinicalTrialBot","CoronaVirusIcon","DeleteTrashCan","DoubleTap","EmptyMruDark","EmptyMruLight","EmptyPinnedDark","EmptyPinnedLight","EmptySharedDark","EmptySharedLight","RiverLayout","StripeLayout","NewsArticle","NotificationFivePlusSign","NotificationRefreshArrow","PHPowerPoint","PollResults","SavedNeutral","SettingsIcon","Traffic","TrafficCamera","Video","WaterDrop","getStoredHeadDataKey","getStoredHeadData","storedHeadDataJson","setStoredHeadData","dataConnectorToExperienceKeyMap","createStatePropertyKey","fullNamespace","dataConnectorInjector","registerInjection","experienceFullNamespace","experienceSet","Set","add","initializeExperience","appState","experienceStatePropertyKey","connectorPreviousState","initialDataConnectorState","nextStateForConnector","reportStateChange","dataConnectorNamespace","newDataConnectorState","experienceKeys","experienceKey","experiencePreviousState","MilestoneDataActionsImpl","updateHydrationComplete","updateRiverHydrationComplete","updateAboveTheFoldVisuallyReady","updateBelowTheFoldTransitionStart","updateExperienceLoadDeferralState","updateExperienceCurrentState","updateExperiencePublicState","updateExperienceRenderDeferralState","updateInitTiming","updatePageComplete","updatePageRevealStart","updatePageRevealComplete","updateRenderTiming","updateVisuallyReadyTiming","updateStartLoadingTiming","updateDomCompleteTiming","updateMilestonePlugins","unregisterObservers","MilestoneDataActions","ExperienceLoadingState","ConnectorNamespaces","RegionScope","AccessTokenStatus","clientId","oneServiceScope","oneServiceFriendlyName","eNtpChromiumVersion","HostPage","pathnameSegments","pathname","topDomainName","originalUrl","categoryKey","verticalKey","hostName","topDomain","indexOffset","subcategoryKey","Market","requireAsync","moduleName","defaultModule","require","AuthCookieName","AuthCookieExistsCookieName","isAppCache","getPageSettings","settingsJson","loggingEndpoint","Product","mmx","edge","edgeChromium","hybrid","hub","microsoftNews","office","appErrorId","propertyBag","settingsObject","flightIds","storedHeadDataString","getCurrentFlights","uploadTime","isProd","cors","apikey","w","anoncknm","getLoggingParameters","iKey","iKeyIndex","getIKeyValue","pageProduct","getCookieConsentRequired","time","ver","baseData","baseType","page","product","flight","mkt","extSchema","getLoggingPayload","formatParams","sendBeacon","_connectorMap","_globalConnectors","_allConnectors","_getDataConnectorPendingPromises","dataConnector","pendingPromise","resolveCallback","rejectCallback","actionPayload","stateChanged","connectorKey","typeIsString","statePropertyKey","connectorState","isGlobal","merge","connectorReducerResult","computeNextStateForConnector","has","delete","subReduce","reducer","connectorStateChanged","previousState","reducedState","networkErrorString","instrumentPerf","WrappedComponent","perfTimeline","Component","lastRenderEndMeasure","startMeasure","endMeasure","props","timeToVisuallyReady","timeToVideoStart","pageRevealStartMarker","_pageTimings","_secondaryPageTimings","getPageTimings","incrementCounter","counterName","existingCount","mapper","a","b","customHandled","TelemetryContractCoverter","obj","outputObj","mappedValue","MockLRUCache","cacheMap","maxAge","isPrerenderVisible","IsPrerender","getCurrentPerformanceTimeStamp","timing","navigationStart","PerfMarker","endMarkSuffix","initialize","instance","singleMark","measureStartEnd","mark","clearMarks","getPromise","perfMarkers","perfEntries","getEntriesByType","markerName","perfMarkerDetail","PerfMarkerDetail","processPerfEntry","isValid","measure","perfMarker","duration","perfEntry","firstStartTime","UrlSearchParamsHelper","parseQueryString","sort","charAt","keyValuePairs","prodAssets","cnProdAssets","ENV","initializeHybridPublicPath","spalinkItem","spalinkValues","spalinkDir","segments","IntraArticleComponentPosition","IntraArticleComponentType","resetCallbacks","registerResetCallback","isWebWorkerPresent","messages","logAppError","standbyMessages","getFromWebWorker","timeoutInMs","defaultResponse","fetched","endGetFromWebWorker","standbyMessageData","promiseTimeout","timeOutPromise","errorMessage","customMessage","webWorkerPromise","webWorker","postMessage","race","sendToWebWorker","subscribeWebWorkerNotification","override","_isWebWorkerPresent","onmessage","pendingMessage","webWorkerMessages","isArray","IndexedDb","idb","searchObj","IDBObjectStore","getAll","idbPromise","req","withIdbStore","storeCallback","isGetAllAllowed","returnArray","openCursor","onsuccess","cursor","continue","put","clear","idbVersion","idbStoreName","dbName","preInitializedIdbPromise","storeName","endOpen","openreq","open","onupgradeneeded","createObjectStore","operationName","then","db","endOperation","transaction","oncomplete","onabort","objectStore","ErrorBehavior","Severity","ConfigFetchError","isNetworkFailure","ConfigOrigin","ScreenWidth","getExperienceType","configInfo","evalGitOrCmsExperienceInfo","gitId","configRef","experienceType","cmsId","getConfigId","gitRef","cmsRef","cmsHref","getConfigHref","getConfigIdString","instanceIdOverride","gitConfigInfo","getConfigRefString","cmsConfigInfo","instanceSrc","sharedNs","processGitConfigInfo","processCMSConfigInfo","processCMSConfigHref","httpAgent","httpsAgent","FetchAbortToken","AbortController","abort","init","signal","abortableFetch","timeoutMs","abortToken","method","agent","agentFunc","_parsedURL","protocol","setAbortSignal","requestStart","errorObj","statusCode","fetch","status","catch","finally","serverFetchInfo","timeElapsed","toFixed","errorName","errorCode","code","logObjects","ChildExperiencesDeferRenderType","ValidatorSectionName","ChildrenTypes","ExperienceCompositionTypes","ExperienceState","MonetizationPlacementOptions","cookieMapInline","getCookieInline","cookiePairs","cookieKeyValue","normalizedName","getStyleFromTypographySize","size","typeRampItem","fontSize","lineHeight","LinkNavigation","contentUrlPrefixLookup","article","video","slideshow","generateTopicLink","topicId","encodedName","originUrl","CurrentMarket","generateContentLink","category","subCategory","contentId","uriTitle","getLocalStorageInline","abbreviateNumber","count","num","precision","prec","pow","roundWithPrecision","LOG10E","PageUtility","isDhpPage","DHP","isNtpPage","NTP","EnableFiveColLayout","ShallowCompare","stringHasLength","tryAddOrderedTelemetryChild","parent","childExperienceType","telemetryContract","Module","content","addOrUpdateChild","getOcid","pageMetadata","getPageMetadata","contract","appendOcid","lowerCaseUrl","token","TelemetryType","Undefined","Header","Footer","TopNavBar","NavBar","DropDown","Section","Carousel","SearchBox","InputBox","ActionButton","Interaction","Headline","Entity","Topic","Provider","NewStories","AutoSuggest","Tile","TrendingNews","AllCoverage","Report","MsccCookieComplianceBanner","CookieWallCookieComplianceBanner","FRE","VideoPlayer","TelemetryContentType","StructuredData","AppStore","CmsPromotions","MicrosoftWebStore","XboxStore","OfficeStore","PartnerLinks","SponsoredContent","Spotlight","ExternalLink","SearchPromo","Feed","Article","Gallery","Audio","Settings","DisplayAd","OfficeDocument","App","SearchResult","VideoAd","Comment","Profile","Coachmark","TrendingSearch","AutoSuggestSearch","SearchHistory","TextSearch","TopSites","SearchLink","ImageSearch","VoiceSearch","Toast","Greeting","Image","Banner","TelemetryActionType","Click","Hover","Submit","View","RightClick","Wheel","KeyPress","TelemetryBehaviorType","Navigate","ContextMenu","Pin","Unpin","Rearrange","Remove","Add","Open","Follow","Unfollow","More","Close","Share","Like","Dislike","Unlike","Undislike","Mute","Unmute","Cancel","Launch","Install","Manage","Show","MuteCancel","Save","Hide","Unhide","Customize","Suspend","Clear","SignIn","SignOut","UndoSave","TurnOn","TurnOff","Forward","Response","ZoomIn","ZoomOut","Sort","Love","Surprised","Thinking","Sad","Angry","UndoRemove","Rename","TelemetryAttrName","TelemetryContentViewType","ZIndex","ConfigCachingConstants","getCacheKeyFromConfigRef","getConfigRefFromKey","sharedPrefix","getChildConfigRefs","resolvedConfig","configRefSet","properties","addConfigRefFromObject","indicies","values","getConfigReferencePath","configReference","isLocalizationConfig","sendAppError","appErrorCallback","appError","useLocalConfigs","configType","isFeatureConfigType","isLocalOrigin","configOrigin","Local","getLocalDevPrefix","test","idbName","configStalenessDuration","serverLruConfigCacheMax","idbInitPromiseNameKey","idbReadPromiseNameKey","idbWritePromiseNameKey","fetchAsync","memoize","relativeUrl","fetchUrl","ok","json","statusText","failedConfigIndexFetches","fetchAndParseConfigIndex","hashedFileName","isLocalConfigs","failedConfigFetches","fetchAndParseConfig","configFileName","manifestsMap","manifestType","manifestBlobResult","isEmpty","configIndexKey","getFromManifest","configKey","cacheKey","manifest","fileHashes","substr","configMergeCustomizer","srcValue","objValue","targetScopeMatched","configTargetScope","pageTargetScope","audienceModeMatched","browserTypeMatched","deviceTypeMatched","domainMatched","experimentId","experimentMatched","targetLocale","currentLocale","stringsEqualCaseInsensitive","marketMatched","osMatched","pageTypeMatched","platformMatched","lhs","rhs","localeCompare","sensitivity","resolverEnvironment","configServiceParameters","targetScope","clientManifestService","clientConfigIndexService","clientConfigService","entity","featureEntityReference","localizationEntityReference","buildNumber","tryGetBuildNumber","itemParams","itemSpalink","getBuildNumberAsync","featureManifestTask","fetchAndParseManifest","localizationManifestTask","featureIndexHashedFileName","getConfigIndexHashedFileName","localizationIndexHashedFileName","featureConfigIndexTask","localizationConfigIndexTask","indexResults","results","featureIndex","localizationIndex","featureConfigPaths","configs","localizationConfigPaths","configTasks","fetchMathingConfigs","mergeWith","mergeConfigs","config","configPaths","configPath","getConfigHashedFileName","allNullFetches","configNullFetches","getFailedConfigFetches","configIndexNullFetches","getFailedConfigIndexFetches","_buildNumber","mergedConfigMap","clientSingleConfigResolver","getFullTree","getConfigRecursive","getFailedFetches","nullFetchUrl","mergedConfig","resolveConfigAsync","unresolvedConfigRefs","createError","baseError","enableIdbCaching","enableConfigCaching","useConfigCaching","stalenessCheckTimestamp","indexedDbMap","readConfigsFromIdb","_readConfigsFromIdb","initializeIdb","indexedDb","queryParams","configMap","experienceConfig","storageTimestamp","configRefCacheKey","writeConfigMapToIdb","idbConfigOpenPromise","initializeIndexedDb","indexedDbInitialized","logMessage","indexedDbKey","generateIdbKey","cachedConfigs","cacheSource","idbConfigLookup","idbConfigReadPromise","cachedConfig","isConfigStale","loggerCallback","configPromiseMap","_shouldTryFallbackResolver","_hadNetworkError","shouldUseConfigService","setConfigServiceParams","configServiceParams","maxDepth","containsDevOnlyQueryParameters","configPromise","getConfigTreeFromCrs","crsResponse","downloadFromCrs","generateCrsUrl","headers","msedgeRef","fetchNetworkResponse","sharedNsQsp","configServiceRelativeUrl","fallbackResolverCalled","crsInitComplete","configService","configsEqual","lastBundleHash","lastConfigHash","lastLocHash","isConfigBundleLocHashSameAsLastPage","configCache","clientResolver","hadNetworkError","tryGetConfigSync","isLoggerCallbackAvailable","localConfigs","getConfig","initiateConfigService","fromMemoryConfig","networkReadPromise","crsConfig","shouldTryFallbackResolver","cdnConfig","cacheReadPromise","crsConfigMap","getConfigMap","updateCache","clientResolverConfigMap","currentTargetScope","promiseMap","refreshServerCachePromiseMap","localOverrideMap","_initializeIndexedDb","populateConfigMapFromIndexedDbAsync","_populateConfigMapFromIndexedDbAsync","peregrineFlightsKey","initializeCaching","cdnConfigBaseUrl","ConfigRootUrl","EnvironmentConfigUrl","ConfigServiceBaseUrl","resolverErrors","configTimings","useWebWorkerToCache","useIndexedDb","enableIndexedDbInMainResolver","DisableCachingConfigs","isCachingAllowed","useServerCache","ServerCache","setTargetScopeAndConfigServiceParams","currentTargetScopeOverride","peregrineFlights","scopeWithPeregrineFlights","useConfigService","IsMultiConfigRetrievalEnabled","CacheBustingIdentifier","getConfigRetrievalMaxDepth","_cbid","generateKey","trackAppErrorEvent","_idbConfigOpenPromise","_idbConfigReadPromise","_idbConfigLookup","getConfigCacheProperties","BuildVersion","isThisWebWorkerThread","logObjectsCallback","ConfigOrigins","configResolver","customizer","configIndex","experienceRef","overrideConfig","isString","cache","overrideEnv","configId","overrideKey","typeVersion","_name","appConfig","rootExperience","startGetConfig","configIdStr","localOverride","addConfigTiming","configEndMeasure","gitConfigFromMemory","gitConfig","crsHadNetworkError","getCacheKey","configFromMemory","existingPromise","processed","configSource","hasCacheError","isHeadConfig","cachedOnServer","serializedConfig","configFromServerCache","cacheFetchDuration","isServerCacheConfigStale","updateServerCache","serverCacheGetConfig","isCached","detailedMessage","sendAppErrorEvent","getConfigFromNetwork","networkConfig","readPromises","configFromMemoryAfterRace","sendRefreshError","mergedConfigsMap","removeCmsPathFromRelativeUrl","downloadFile","rootConfigIndexId","crsMergedConfig","configIndexHref","addConfigToConfigMap","downloadMergeConfig","multiConfigs","relatedConfigIndexHref","refreshPromise","refreshConfigServerCache","areConfigsEqual","removeSubstringKeys","experienceIndex","resolveConfigIndex","configObjects","downloadExperienceConfig","mergeConfig","baseConfigUrl","hrefs","promiseArray","isCrsFetch","crsMaxDepth","segment","wwResponse","refreshConfigResponse","purgeRenderCacheUponConfigChanges","writeConfigCacheProperties","liveCbId","liveCbid","writeCbidInLocalStorage","pcsCbid","highestCbid","clearConfigCache","clearObjects","getAllConfigTimingsOverride","allConfigsCacheDuration","allConfigsNetworkDuration","configTiming","networkFetchDuration","IsDebug","configFetchTimings","prgFlights","startBulkConfig","populateConfigMapFromCachedConfigs","unusableCount","flightsFromStorage","ConfigCacheProperties","prgFlightsSameAsLocalStorage","configHashes","getConfigsCacheLocalStorageKey","cbidKey","resolver","getRootConfig","getConfigTimings","getResolverErrors","refreshConfigCache","removeCachedConfig","getUseConfigService","overrideCurrentRequestTargetScope","overrideCurrentRequestEnvironment","clearInternalState","getConfigServiceParameters","setConfigTimingsObject","spec","qspPrefix","memo","objectFromSpecification","requestDataValue","clientValue","pv","cv","qsp","qp","verParam","current","newValue","recurse","prefix","k","currentPrefix","getURLSearchParams","DefaultSize2ColumnWidth","DefaultSize3ColumnWidth","DefaultSize4ColumnWidth","SSRContract","innerWidth","locationHash","locationHostName","locationPathName","locationProtocol","documentElement","lang","direction","requestData","loadQueryParams","RequestId","app","ActivityId","getContextData","dataGetter","dataName","throwException","LiteLogger","isDebugEnabled","webpackRequire","tags","getMessage","nameRegEx","queryNameValueMatches","DataConnector","parentStore","requestContext","_fullNamespace","selectState","_subspace","_perfTimeline","addSubReducerForConnector","_configHref","getState","globalConnectors","globalConnector","getCurrentState","namespaceParts","connectorType","ActionHandler","actionMap","actionMaps","actionPayloadType","String","parentTelemetry","childTelemetry","parentIndex","telemetryName","telemetryType","initTelemetryProps","resultTelemetryProps","createProps","setChildProps","random","rootTelemetryIndex","rootIndex","getNewIndex","ordinalTracker","ordinal","childIndices","childOrdinalCounter","savedProps","componentProps","initializationProps","resetChildProps","ct","f","feedId","h","headlineIndex","y","vertical","filteredResult","userFacingText","telemetryIndex","oldProps","newProps","telemetry","0","CommonActions","renderExperience","ActionMap","dataConnectorMergeInit","staleCallbacks","apptypeValidator","expValidatorMap","getAllValidators","expConfig","childExpValidatorMap","expMap","originalConfig","tempConfig","validatorName","childExpValidator","validator","validationArgs","expConfigMap","cloneDeep","filterConfig","riverGridChildren","element","childElems","children","validatorConfigInfo","childExperienceConfigInfo","validatorConfigExperienceType","childExp","baseExperienceConfig","childrenConfigInfo","dataConnectors","dataConnectorForCurrentScreenType","getOrdinalObjectForCurrentBreakpoint","screenWidth","screenTypeObjList","Any","currentColumnArrangement","getMetadataByScreenWidth","OneColumn","TwoColumn","ThreeColumn","FourColumn","FiveColumn","connectorProps","getCompositionIdOverride","composition","compositionOverrides","compositionOverrideResolver","horizontalStack","layout","grid","column","childType","peregrineExperience","child","rows","row","columns","itemType","customExperience","customConfig","experience","sectionName","removeFromRiverGridChildren","KeyCounter","timelineCount","getCount","perfTimelineInstances","getInstanceKey","getInstanceKeyCore","configIndexId","experienceConnector","experienceComponent","$experienceType","_","ExperienceIds","earlyLoadBundlePromises","loadExperience","fullConfig","getChildrenDataConnectorConfigInfos","childConfig","earlyLoadBundles","getChildrenExperienceConfigInfos","isDataConnector","linesRunUntilFailure","uniqueId","configResult","instrumentPromise","loaderPromises","bundlePromise","newExperienceName","oldInstanceKey","rename","newInstanceKey","renamePerfTimeline","bundleModule","initMeasureEnd","updateExperienceLoadedMilestone","ExperienceConnector","ExperienceReducer","experienceNamespace","getExperienceNamespace","experienceParentNamespace","experienceStore","configHref","loadConnector","connectComponent","milestoneDataConnector","getActionSender","send","loaded","experienceConfigInfo","ConfiglessConnectors","BingImageData","OneServiceContent","TelemetryData","TopicData","TopSitesLayoutData","PageClickTrackerData","OfficeSharedData","pivotContentV2","childMap","telemetryContext","telemetryTags","$experienceGroup","$connectedComponent","$componentInstance","$renderIfOffline","$isStale","$maxWaitToBatchRenderChildExperiences","$milestoneDataConnector","onExperienceMilestoneTimingUpdate","milestoneType","ExperienceMilestoneEventTypes","domComplete","updateTiming","initialized","rendered","visuallyReady","startLoading","staleRevalidationComplete","experienceGroup","experienceInstance","eventType","onAppError","revalidateIfNeeded","isStale","revalidateExperienceStaleState","selectComponentState","namespaceArray","configNamespace","processConfig","setupForPageReveal","childComponentList","componentInstance","ownProps","stateProps","dispatchProps","mnsDashBoardProps","ShowMnsCreatorDashboard","componentToConnect","onLine","onAppErrorCallback","connectMeasureEnd","telemetryObject","onComponentConnect","context","mapStateToProps","instrumentFunc","mapDispatchToProps","mergeProps","connectedComponent","pure","experienceInfoList","mergeStartPosition","additionalChildExperiences","ordinalBlockForCurrentColumn","mergeEndPos","childArrangementMetadata","childExpArrangement","positionProps","experienceArrangement","startPosition","insertAt","experienceInfo","initialProps","$connectorProps","experienceTelemetry","TelemetryObject","loadDataConnectors","injectedDataConnector","injectedDataConnectors","onLoadChildExperiences","loadChildrenExperiences","childConnectorProps","childExpsToLoadImmediately","reRenderCallback","readyExperienceToRender","promiseDependency","startProcessingChildExperience","loadDataConnector","childConnector","getChildExperienceConnector","addConnectorToChildMap","Failed","childExperienceInstanceId","expType","invalidationReason","staleCallback","mockStalenessConfig","stalenessInfo","isStaleCheckRequired","thresholdMinutes","staleThreshold","loader","getConnectedExperience","getChildExperienceConnectorProps","getNewComponentInstance","milestoneDependencyToLoadChildExp","shouldResolve","addTimeout","deferralType","CustomEventBasedDeferral","Unknown","resolveDependency","loadAndRenderExperience","childExpInfo","delayLoaded","milestoneDependencyToRenderChildExp","ReadyToRender","childExperiencesRenderType","batch","reRenderExperience","dependency","pending","timer","moneyCard","weatherCard","topSitesEdgeNext","backgroundImageEdgeNext","searchBoxEdgeNext","headerEdgeNext","observers","actionEndMeasure","getDispatchResult","filterConnector","observer","dispatchConnector","renderActionPayload","connectorInstance","indexToRemove","existObserver","PerfTracker","InitialCommonExperienceProps","customField","visuallyReadyTracker","initializedTracker","domCompleteTracker","isStaleRevalidated","startInitializeMilestone","startVisuallyReadyMilestone","startDomCompleteMilestone","incrementExpCount","endDomCompleteMilestone","prevProps","prevState","snapshot","completeStaleRevalidation","needsHydrateLogString","endInitializeMilestone","shouldMarkTelemetryTtvr","aliasName","endVisuallyReadyMilestone","setStart","updateStartTiming","updateEndTiming","markTimeToRevalidateStaleState","shouldMarkPageReveal","tracker","getStart","getEnd","setEnd","markerPrefix","renderCounterPrefix","ClarityEnabled","UserIsSignedIn","functionalonly_cookie_experience","hasExperiencePersistentDataUpdated","storedExperiences","timeStamp","trackExpWithPersistentDataUpdate","trackPageInvalidation","PageInvalidationReasons","getTrack","trackingResolved","trackingObject","elementTrackingDecorator","trackExtCompleted","trackEventBuffer","trackImpressionBuffer","trackAppErrorEventBuffer","elementTrackingDecoratorBuffer","trackingPromiseCalled","setTrackingForSingleElement","elementTree","parentElement","options","disableImpressionUpdate","sendTrackingCall","destination","headline","trackEvent","sendPartialPageRequest","elem","visibilityCheck","mechanism","topLevelContainerType","trackPartialImpression","sendTrackAppErrorEvent","errId","errSource","errMsg","processPendingTrackingCall","eventObj","decorator","handleTelemetryCall","action","behavior","handlePartialPageImpressionCall","viewType","handleAppErrorEventCall","handleSetTrackingAttrs","isRoot","attr","compress","savedChildObject","option","getMetadata","MediatorEventNames","ContentActionsUpdated","FeedFollowed","ForcePageReload","FollowedTopicsUpdated","MediatedCoachMark","TabNavigation","TabNavigateTo","TopicAction","Msn360","CardActionInit","CardActionPost","InterestsRenderComplete","RenderXFeed","ShowPivotById","ResumeInfopaneAutoRotate","SocialActionsUpdated","getMediator","serverCache","reset","del","itemCount","getWpoFlights","treatments","stringifyError","tryIncludeErrorStack","stack","supportedAppTypes","getPeregrineFlights","cleanedUpFlights","lowercaseItem","shouldUseGitConfigs","some","containsGitConfigsFlight","SubnavTabId","sessionStorage","timestampSeed","getDigit","seededRandom","floor","generateGuid","getHeadline","dataHlValue","headlineElement","querySelector","depth","limitDepth","getDepth","getText","titleElement","HTMLAnchorElement","titleText","ariaLable","nodeName","depthFirstChildAttribute","trimRegex","textContent","innerText","attributeName","skipElement","altValue","localName","closestElement","selector","found","closest","getRootNode","parentNode","getAllTelemetryElements","telemetryElements","elems","isShadowRoot","shadowRoot","querySelectorAll","getAllTelemetryElementsInternal","isTelemetryElement","from","hasAttribute","CardSizes","SubnavTabName","Interests","MyFeed","XFeed","enums","selectPpeParameter","externalUrls","api","ppeApi","guidelinePage","profilePage","privacySettings","profileSettings","feedbackForm","copyrightReportForm","moderationEmail","newPost","userStateType","existingUser","anonymous","newUser","userNameStatusType","normal","notAllow","inReview","unknown","userAvatarStatusType","userAgeGroup","under18","above18","activityType","follow","reply","reaction","badge","moderation","commentDeleteAlert","profileBannedAlert","profileErrorAlert","moderationErrorType","takedown","ban","notAllowName","notAllowPicture","approveUserAppeal","rejectUserAppeal","approveProfilePicAppeal","rejectProfilePicAppeal","approveCommentAppeal","rejectCommentAppeal","visibleStatusType","Normal","DeletedByUser","DeletedByAI","DeletedByHI","InReview","visibleStatusMap","commentReportMap","Spam","Profanity","Abuse","RiskyLowAuthority","TechnicalAttack","Copyright","Trademark","ChildRelated","Violent","Danger","PublicThreats","Illegal","Terrorism","Privacy","Inappropriate","userNameReportMap","userPictureReportMap","Nudity","NonConsensualIntimateImagery","reactionOrder","profileReportItemMap","UserName","ProfilePicture","profilePageEmptyStates","NoUser","NotSocialUser","reactionIconMap","like","love","thinking","surprised","sad","angry","reactions","responsiveLevels","L0","MobilePopup","newCommentErrorCodeMap","400","403","bodyTooLong","other","4","6","7","8","9","10","11","12","20","21","22","23","24","25","26","27","28","29","30","31","32","2","3","5","13","14","15","16","17","18","ugcPublishStatusType","theme","default","disabledComponents","superappBase","windowsBase","superappEmbed","superappFullpage","FastBreakpointManager","refreshBreakpoints","indexToStandardConverter","currentBreakpoint","defaultBreakpoint","pop","_fastBreakpointManager","unsubscribe","managerCallback","subscribe","fastBreakpointManager","recreate","PerfMarkersGroup","remainingMarkers","remainingSecondaryMarkers","remainingTtvrMarkers","remainingTtprMarkers","ttvrMarkers","ttvrPromise","resolveTtvrCallback","perfMarkerResolveCallback","secondaryPerfMarkerResolveCallback","resolveTtvsCallback","ttprMarkerPromise","resolveTtprCallback","primaryMarkers","secondaryMarkers","markTtf","markTimeNA","setMark","markTtvr","markTtvrRaf","requestAnimationFrame","markTtprRaf","startMarker","getSinglePerfMarkStartTimeByName","waitForTtprMarkers","setSecondaryPerfMarkerTime","existingMarker","getEntriesByName","Boolean","getSecondaryMarkers","markerFullName","getTtvrMarkers","getMarkers","getMarkersWithType","waitForTtvr","getTtfMarkers","markPageTTVR","maxValue","perfMarks","trackingExperiences","shouldTrackExperience","shouldTrack","SocialMediaProviderConfig","SocialMedia","SocialMediaTarget","apiUrl","attribution","FacebookEmbed","InstagramEmbed","TwitterEmbed","SocialMediaDefaultConfig","Copy","ariaLabel","backgroundColor","color","icon","label","none","Email","Mail","_self","Facebook","_blank","Line","LinkedIn","Skype","Twitter","WhatsApp","VK","Vkcom","logException","jssGeneratedClassesMap","jssCaptureCompleted","removeRenderCache","captureJssGeneratedClasses","renderCacheEnabled","CustomDeferralEventTypes","ExperienceDeferralEventTypes","experienceDeferralDependencyMap","isExperienceDependencyResolved","experienceDependency","deferralEventType","dependents","currentState","getMilestoneDataConnector","MilestoneData","getDefaultExperienceInstance","milestones","perExperienceMilestones","perInstanceMilestones","getExperienceLoadDelegate","deferralEventReady","loadAfter","aboveTheFoldVisuallyReady","isAboveTheFoldVisuallyReady","belowTheFoldTransitionStart","isBelowTheFoldTransitionStarted","hydrationComplete","isHydrationComplete","getDeferralLoadEventReadyState","shouldLoad","getDeferralEventMetadata","waitForAboveTheFoldVisuallyReadyAsync","registerObserver","requestPageRevealStartedAsync","pageReveal","isPageRevealStarted","requestPageRevealCompletedAsync","isPageRevealCompleted","getExperienceRenderDelegate","renderAfter","getDeferralRenderEventReadyState","shouldRender","deferralInfo","StandardEventBasedDeferral","createExperienceStateUpdate","createTimingUpdate","DeferralEventType","DynamicBundles","dynamicBundles","bundle","registerExperience","es6Import","hasExperienceRegistered","SocialServiceMapper","contentData","reactionCounts","reactionSummary","subReactionSummaries","totalCount","comments","moreCount","list","totalCommentCount","commentSummary","userData","isSocialUser","nameStatus","primaryName","avatarUrl","notUseAvatar","primaryAvatar","likesCount","postsCount","followersCount","followSummary","subFollowSummaries","followingCount","reactionsCount","avatarStatus","ageGroup","userListData","hasMore","items","convertUser","links","commentData","owner","foundUser","link","createdBy","foundContent","convertContent","isHidden","visibleStatus","isInReview","isDeleted","skipRender","ownerId","text","createDatetime","createdTime","replies","replyCount","commentListData","commentStatus","hasPrevious","asc","convertComment","reactionsResponse","reactionDetails","reactionBreakdownData","rateValue","subType","isFollowingFetched","isFollowing","ratingData","userActivitiesData","activity","convertUserActivity","baseActivity","datetime","createdDateTime","isSeen","read","notification","userLink","achievementLink","badgeType","contentLink","commentLink","comment","reactionLink","targetReactionCounts","targetType","convertSubReactionSummariesToReactionCounts","targetBody","title","moderationRecordLink","ugContent","convertUGContent","abstract","categories","locations","resources","convertResources","authorUserId","isPublished","lastEditedDateTime","lastPublishedDateTime","displayPublishedDateTime","resource","isCover","tag","myReaction","localStorageGet","subCommentSummaries","getSubReactionCounts","reactionType","myLocalReaction","totalCommentsCount","PrimeIntegrationConstants","Mediator","getActiveTabValue","activeTabValue","navigation","activeTab","tabNameToTabId","registerForTabChangeEvent","shouldCallCallbackImmediately","sendActiveTabToCallback","tab","_perfMarker","tabIdToTabName","sub","registerContentActionsUpdatedEvent","registerCardActionEnableEvent","initData","registerCardActionPostEvent","postData","registerForFollowButtonClickEvent","followButtonData","isFollowed","registerForInterestsRenderCompleteEvent","registerSocialActionsUpdatedEvent","publishEventForPrime","pub","renderUserActionErrorCoachmark","refElement","hideCoachMark","coachMarkId","TabsHelper","tabId","tabName","TelemetryDOM","ordinalCount","internalContract","lineage","lineageOrdinal","getLineage","placement","parentDOM","parentId","parseContract","generateId","parentDOMObj","addElement","getRoot","needUpdate","renderContract","telemetryDOM","elementMap","updatedContract","delimeter","includeRootElement","metadataAttribute","parseAttribute","parseMetadata","metadata","decompress","domObj","lastId","WeakMap","RiverCardActions","changeCardSize","loadPolyfills","polyfills","IntersectionObserverEntry","SocialReactions","blackHexColor","whiteHexColor","DarkModeBackgroundColor","ImageBackgroundColorOffset","LightModeBackgroundColor","isDarkMode","media","TelemetryBase","sendSinglePageViewBeacon","setTrackingAttrs","SharedDocumentType","SharingHelper","sharingInfo","appId","getAppId","getSharingUrlBase","sharingUrl","shortUrlPathFormat","documentType","documentId","AppKeys","Base36AppIdString","articleUrl","currentBaseUrl","SharingProductionHosts","SharingBaseUrlDefault","contentUrl","contentTitle","emailBody","overrideShareUrl","socialMediaItemConfig","shareUrl","appendQueryStringFormat","Format","refererUrl","openNewWindow","finalOptions","entries","toolbar","resizable","scrollbars","getParameter","vars","pair","getHashParameter","getQueryParameter","generateQueryStringByKeyVals","keyVals","fetchBlobClient","res","rej","AzureStorage","fjs","insertBefore","fetchScript","ApiErrors","contents","users","appErrorLogger","ItemTypes","getLocalContentReaction","saveLocalContentReaction","localStorageSave","myReactionIds","getXPayToken","tokenStorageKey","tokenExpirationStorageKey","storedToken","tokenExpires","valueOf","getXPayTokenInfo","accessToken","expiresIn","sendAuthHeader","newDomain","endpoints","verify","getUserById","deletingData","profile","DELETE","GET","followers","following","getFollowersByUserId","getFollowingsByUserId","getCommentsByUserId","premium","$top","$skip","$orderby","orderBy","productType","POST","convertUserList","notUserAvatar","postBody","isPrivateProfile","PUT","targetId","reportItemType","reportType","intellectualPropertyReportParams","urlPart","reportMessage","intellectualPropertyDetails","ReportType","ReportMessage","IntellectualPropertyDetails","onlynotification","convertUserActivities","cmsid","contentInfo","contentIdAndMarket","commentId","sortType","commentsObj","convertCommentList","parentCommentId","anchorCommentId","anchorId","commentBody","commentParentId","commentMentionReplyId","ContentId","Body","mentionReply","file","sasTokenInfo","blobUri","accountUrl","blobService","Blob","createBlobServiceWithSas","sasString","createBlockBlobFromBrowserFile","container","blobName","forceRate","convertRatingToRateValue","createContent","rate","friends","others","convertReactionsResponseToReactionBreakdownData","prepareHubString","typingUpdates","profileImageUrl","ugcontents","convertUGContentListView","headlines","subTitle","kicker","image","convertUGContentPublishResponse","getUGSasToken","resourceCMSRequest","altText","sasTokenId","resourceCMSResponse","newResource","contentInfoToBeUpdated","postUGContent","ugsastokens","$filter","$select","systags","convertTags","requestArgs","authHeader","xhr","cachedResponses","clearCache","scn","wrapodata","msaAccessToken","fetchOptions","credentials","fetchCachedResponse","onRequestError","clone","resourceForUrl","testDomain","dispatchBridgeEvent","bridgeEventName","dispatchEvent","CustomEvent","detail","eventName","handleBridgeEvent","customEvent","ReactNativeWebView","BridgeEventNames","signInClicked","saveCachedMyReaction","commentsClicked","openDeepLink","requestBrowser","increaseBackStack","openPopup","closePopup","SocialDataActions","setTheme","updateMe","updateNotifications","updateActivities","deleteActivities","updateActivityStatus","setContent","updateContent","updateContentRating","insertComments","resetSpecificCommentId","updateCommentRating","incrementReplyCount","insertComment","updateUser","updateUserFollowers","updateUserFollowing","updateUserComments","deleteUserComment","setReactionBreakdown","setGradientOverlayData","setPublisherSubscribeFollowButtonData","setPopup","addTyper","updateTypers","recordSignalRHub","updateUGContents","updateUGContent","publishUGContent","unPublishUGContent","deleteUGContent","updateResponsiveClass","deleteMyData","updateActivityAppeal","mapCmsIdToContentId","resetError","SocialActions","setComponent","setSocialData","SocialInspector","inspect","commentDisplayType","styleOverrides","enableSubscriptionFeatures","specificCommentId","localizedStrings","jssStyleSheet","missingChildren","contentCommentsOnly","guidelinePageEmbed","channelPage","OffTopic","L1","L2","commentsStatusType","zero","minimal","expanded","notDetermined","modalComponents","hasThemeBase","targetTheme","isComponentDisabled","component","socialDataConnectorConfig","SocialData","setOnAppError","socialDataConnector","registerObservers","updateSocialState","gradientOverlayDataPromise","gradientOverlayData","publisherSubscribeFollowButtonDataPromise","publisherSubscribeFollowButtonData","cardActionConfig","publisherProfileChildren","cardAction","loadChildExperience","getSocialDataConnector","inspectorResult","childComponentInstanceList","connectorFunctions","getDataConnectorFunctionsWithStateBindings","mainTelemetryObject","componentConnector","getContentCards","popup","manageHistory","history","replaceState","initial","pushState","onpopstate","setHistoryComponent","publisherId","contentPreviewConfig","contentPreview","cardData","SocialService","getUserContents","cardType","cardLoadInfo","card","serviceContextMetadata","loadInfo","cardConnectors","Size1Wx6H","handleAction","socialData","dispatchDedupe","dispatchTelemetryEvent","telemetryEvent","telemetryAttributes","refreshDataAttribute","applyDedupe","UpperTelemetryType","ContentView","Action","TelemetryEventNames","genericLoaded","genericAction","genericHover","TelemetryEventMap","subTypes","Partial","sendPrime","sendPeregrine","convertToHybridTags","elementTelemetryObject","customTelemetryTags","hl","renderHybrid","refCallback","isArticlePage","isGalleryPage","isVideoPage","finalAttributes","ref","elementRef","findDOMNode","defaults","telemetryTagsObject","addOrUpdateTelemetryObject","parentTelemetryObject","dynamicContentObject","existingObject","uniqueTelemetryContract","getHeadlineByReactionType","isUndo","toUpperCase","genericTelemetryClickDispatcher","getPageContentType","GalleryFullScreen","ArticleFullScreen","ReactionToBehaviorTypeMap","AccessibilityHelpers","attachAccessibilityListeners","node","addTabIndex","style","addAccessibilityOutlines","simulateMouseClick","targetNode","triggerMouseEvent","clickEvent","createEvent","initEvent","ele","keyCode","preventDefault","stopPropagation","shouldHaveOutline","focusKeys","isTrusted","commentTelemetryContracts","compactStartConversationButton","compactJoinConversationButton","overlayAddCommentButton","overlayStartConversationButton","overlayJoinConversationButton","mobileFloaterButton","overlayComments","sourcePath","activityImages","trophy","commenter","profileImages","privateProfile","zeroComments","zeroUsers","zeroActivity","logoImages","facebook","google","microsoft","microsoftText","msNews","placeholderImages","avatar","peopleAvatar","notSocialAvatar","guidlineImages","g1","g2","g3","g4","g5","onboardingImages","avatarFallback","contentImageFallback","flag","xmlns","className","viewBox","fill","plus","thumbs_up","fillRule","clipRule","chevron_down","chevron_up","transform","ellipsis","ellipsis2","ellipsis3","users2","users3","user_following","user_locked","trash","pen","shield","tick","close2","arrow_reply","exclamation","exclamation_small","exclamation_round","open_outside","fillOpacity","maskUnits","width","height","mask","clipPath","opacity","check","check_small","typing_animation","cx","cy","dur","repeatCount","begin","chevron_left","twitter","linkedin","publisherTabAll","publisherTabPremium","renew","arrow_down","credit_card","check_circled","commentListTelemetryContracts","mainItem","commentBoxTelemetryContracts","postViolationAI","postHumanReview","sendReply","sendComment","signIn","commentBoxTelemetryActionDispatchers","genericClick","getExternalURL","externalURL","hasSectionIndicator","openGuidelinePage","attributes","fullScreen","managedClasses","showGuidelines","hideIcon","disabledMessageContainer","role","DisabledMessagesGuidelines","DisabledMessagesInfo","followButtonTelemetryContracts","followButton","followButtonTelemetryActionDispatchers","isFollow","fetchUser","usersConnector","fetchIsUserFollowed","warn","me","isSuperApp","traceId","isSelf","isAnonymous","telemetryObjects","FollowButtonWrapperComponent","Fragment","FollowButtonTitle","followButtonContainer","followButtonSuperAppContainer","onClick","toggleFollow","FollowButtonFollowingText","FollowButtonFollowText","followUser","currentTarget","mouseHandlers","preventSelection","removeNoSelect","once","stopPropagationAndPreventDefault","isHovered","delayCompleted","containerRef","createRef","contentRef","onClickOutside","onLeaveTrigger","escFunction","hoverTriggeredPopover","hide","isHover","shouldMove","onHide","movePopover","triggerRef","hoverDelay","timeoutId","setState","clickedIsNotTrigger","contains","removeEventListener","marginTop","marginBottom","popoverRect","firstChild","getBoundingClientRect","leftDiff","left","rightDiff","right","clientWidth","topDiff","botDiff","bottom","clientHeight","translateY","translateX","onMoved","visible","hideOnMobile","responsiveClass","hasFocusLock","shouldHideMobile","innerContent","popoverContainer","onClickInside","onMouseLeave","focusLockStyle","openProfilePage","hasMouseEnter","isBanned","userCardPopover","userCardContainer","onMouseOver","mouseEnterHandler","alt","AriaLabelsProfilePicture","onError","UserCardPosts","UserCardLikes","ProfileFollowersLbl","openEditProfilePage","_isMounted","showActions","userCardVisible","userCardUserId","lastTypedTime","lastBroadcastTypingTime","newCommentVisibleStatus","newCommentErrorMessage","remainingCharsCount","maxCharsLimit","disabledHasClicked","disabled","focused","commentBoxFocusRoot","commentBoxRef","signInRef","handleChange","charsCount","broadcastAsTyping","keepCursorInBox","focus","submitCommentAndUpdateState","getErrorMessageFromCodes","errorSubCodes","el","getSelection","createRange","range","selectNodeContents","collapse","sel","removeAllRanges","addRange","capture","commentBoxType","placeCaretAtEnd","onCommentBoxInitialized","popupConnector","focusBackRef","isDisabled","handleSignInClick","clipboardData","getData","execCommand","getRangeAt","insertNode","createTextNode","subCodes","maxSubCode","max","isFirstCommenter","isExpired","CommentBoxPlaceholderExpired","CommentBoxPlaceholderAnonymousUser","CommentBoxPlaceholderNewUser","CommentBoxPlaceholderBannedUser","CommentBoxPlaceholderNameNotAllow","CommentBoxPlaceholderFirstComment","CommentBoxPlaceholderMsg","CommentBoxPlaceholderReply","NameNotAllowTip","AvatarNotAllowTip","NameInReviewTip","AvatarInReviewTip","UserBannedTip","AvatarAltText","parentType","parentUser","placeholderText","getPlaceholderText","meHasInReviewInfo","getAvatarAltText","meHasNotAllowInfo","hasDeniedMessage","commentForm","onMouseEnter","showUserCard","contentEditable","listenKeyEvents","placeholder","suppressContentEditableWarning","AriaLabelsCommentBox","commentBoxClickHandler","onPaste","commentBoxPasteHandler","onFocus","handleFocus","onKeyDown","onBlur","AriaLabelsDiscardComment","AriaLabelsSendComment","submitComment","CommentBoxButtonSignIn","CommentBoxButtonChangeName","CommentBoxButtonEditProfile","CommentBoxButtonViewProfile","CommentBoxCharsRemaining","CommentBoxCharsLimitReached","NewPostDeniedMsg","NewPostInReviewMsg","commentItemTelemetryContracts","commentItem","deletedCommentItem","reportedCommentItem","reactionBreakdown","reportButton","deleteButton","commentItemTelemetryActionDispatchers","deleteMenuTelemetryContracts","yesButton","cancelButton","deleteMenu","deleteMenuTelemetryActionDispatchers","onConfirmDelete","prev","previousElementSibling","lastElementChild","next","nextElementSibling","firstElementChild","deleteMenuContainer","handleKeyDown","DeleteMenuDeleteComment","AriaLabelsOpenDeleteCommentMenu","yesHandler","DeleteMenuDeleteCommentConfirm","cancelHandler","DeleteMenuDeleteCommentCancel","maskPaths","likeMaskImage","loveMaskImage","circleMaskImage","likeMaskImageRTL","loveMaskImageRTL","circleMaskImageRTL","getEmojiStylesByWidth","getEmojiMask","maskName","renderEmojiByType","miniReactionBreakdownPopover","miniReactionBreakdownContainer","counts","maskClassMap","isHoverHandlersAttached","miniReactionBreakdownVisible","isHoverMiniReactionBreakdown","containerClassName","hideLabel","customLabel","onReactionsClick","hasSeperatorBefore","hasSeperatorAfter","totalReactionCount","mostReactionKeys","$sum","$count","$0","$1","$","seperatorV","ProfileReactionsLbl","mostReactionsContainer","setRef","setReactionsCountRef","attachHoverHandlers","reactionPanelTelemetryContracts","likeButton","reactionPanelTelemetryActionDispatchers","likeButtonClick","likeButtonHover","reactionMenuTelemetryContracts","emojis","reactionMenuTelemetryActionDispatchers","emojiClick","setBodyUserSelect","coords","evt","originalEvent","touch","touches","changedTouches","clientX","clientY","isPointerOnElement","rect","pointerCoords","sendBridgeEvent","unlockTouch","longPressTimeout","reopenTimeout","slideDisabled","longpressDisabled","listenLongpress","hasLongpressed","isInterrupted","stopLongpress","onLongpress","onLongpressEnd","listenSlideStart","initiateSlide","triggerElement","triggerClickHandler","onSlideStart","listenSliding","triggerTouchStartHandler","touchEndHandler","unregisterTriggerEventHandlers","registerTriggerEventHandlers","setupTrigger","onTouchStart","enoughTimePassedSinceLastTouchEnd","click","blur","onTriggerClick","onTouchEnd","releaseTouchEvents","lastMoveTimeStamp","touchMoveHandler","cancelable","trackingPeriod","onSlide","passive","onSlideEnd","isHandled","lastTouchEndTime","reactioMenuCallbacks","emojiSelector","reactionMenuSlideHandler","reactionHandler","containerElement","virtualTray","hMargin","emojiElementSelector","dispose","touchFocusedEmojiElement","reactionMenuRect","yRange","xRange","virtualWidthPerEmoji","matchingEmojiIndex","min","onEmojiBlur","emojiToFocus","onEmojiFocus","triggerHoverHandler","touchSlideHandler","touchEnabled","onShow","classList","remove","registerHandlers","triggerElements","nextProps","unregisterHandlers","generateOrUpdateTelemetryObjects","reactionMenuPopover","reactionMenuContainer","reactionClickHandler","onReaction","lastHiddenTime","setupTriggerAtTouchStart","triggerRefs","setReactionMenuContainer","removeAttribute","rating","getReactionColorClass","reactionMenuVisible","isHoverReactionPanel","reactionMenuTriggerRefs","which","button","currentRating","replyLabel","onReplyClick","showCommentsButton","reactionMenuClassName","reactionPanelContainer","onMouseDown","onMouseMove","onTouchMove","onReactionMenuHide","onReactionMenuShow","onLikeBtnClick","EmojiLabellike","activeReactionButton","AriaLabelsOpenReactionPanel","AriaLabelsOpenReplies","CommentReplyBtn","$i","addedOffline","showMoreReplies","commentConnector","rootParentCommentId","hideReplyBox","contentDisabled","repliesHasPrevious","repliesHasMore","commentItemType","moreReplyCount","specificCommentMode","replyListContainer","showReplyBox","loadPreviousComments","SpecificCommentModeSeePreviousRepliesTxt","loadMoreComments","SpecificCommentModeSeeMoreRepliesTxt","showReplies","SeeMoreRepliesTxt","SeeMoreRepliesPluralTxt","reportMenuTelemetryContracts","reportItem","reportMenu","reportMenuTelemetryActionDispatchers","reportItemClick","fetchMe","reportItems","renderInPopover","renderDefault","renderMobile","reportMenuPopover","AriaLabelsOpenReportCommentMenu","reportMenuContainer","renderReportItems","reportMenuSuperAppContainer","CommentReportText","reportHandler","reportValue","disableBridge","onReport","reportComment","getAgoText","dateTimeStr","monthNames","shortMonthStr","nowTs","seconds","toLocaleString","month","getMonth","getDate","getFullYear","reportMenuVisible","deleteMenuVisible","selectedReportType","nowDeleted","messageTruncated","isHoverUserCard","shouldFooterRenderTwoLines","mentionUserCardVisible","messageRef","mentionUser","scrollIntoView","block","checkMessageTruncated","checkContainerWidth","scrollHeight","isMobile","sendCommentReaction","deleteComment","isBlury","isReply","showAvatar","reactionAllowed","isSpecificComment","commentItemContract","showMentionUserCard","userCardOnHide","dangerouslySetInnerHTML","__html","reportedCommentItemTelemetryObject","VisibleStatusInReview","CommentDeletedMsg","CommentItemDeletedUserName","CommentItemSeeMore","CommentReactionDisabledMsg","renderReactionsCount","renderReactionPanel","showDeleteMenu","CommentDeleteText","deleteCommentHandler","commentItemDeleteMenuPopover","showReportMenu","replyList","userAvatar","commentItemContainer","commentItemOverlayContainer","commentItemFooterTwoLines","tabIndex","dist","offsetWidth","renderReactionPanelParams","replyButtonClickHandler","showSeperator","sortBoxTelemetryContracts","sortItem","sortBoxTelemetryActionDispatchers","genericClicked","listVisible","sortMenuTriggerRef","sortMenuListItemRef","sortItems","onChange","selectedSortType","sortTypes","dontShowLabel","sortBoxContainer","onLinkClick","CommentSortByTxt","sortBoxPopover","changeSortHandler","showMoreClicked","showMoreComments","onSortTypeChanged","isExpanded","renderFull","renderMinimal","commentListContent","renderCommentItem","moreCommentCount","renderCommentSortList","commentListHeader","getSortedComments","SpecificCommentModeSeePreviousCommentsTxt","SpecificCommentModeSeeMoreCommentsTxt","SeeMoreCommentsTxt","SeeMoreCommentsPluralTxt","SeeMoreCommentsBtn","commentItemProps","Rating","Time","contentPanelTelemetryContracts","guidelinesLink","listenForTypers","setInterval","clearInterval","noText","myId","displayedTypers","numTypers","typingUsersContainer","TypingUsersImages","TypingUsersText","images","typer","TypingUserImage","displayedTyper","user1","typingUserName","YouTypingUserInfo","SingleTypingUserInfo","user2","DoubleTypingUserInfo","user3","TripleTypingUserInfo","PeopleTypingUserInfo","numberOfUsers","UserPlaceHolder","renderFullState","renderZeroState","renderMinimalState","contentPanelContainer","contentPanelZeroStateContainer","conversationTitle","typingUserProps","contentPanelMinimalStateContainer","isCommentOverlay","contentPanelOverlayContainer","ContentPanelCommentsTxt","ReferToGuidelinesMsgBefore","ShowGuidelinesLink","ReferToGuidelinesMsgAfter","notificationCardTelemetryContracts","closeButton","achievement","openArticlePage","idAndMarket","AchievementTitles","Member","AchievementTitlesMember","Commenter","AchievementTitlesCommenter","Networker","AchievementTitlesNetworker","ConversationStarter","AchievementTitlesConversationStarter","AchievementMessages","AchievementMessagesMember","AchievementMessagesCommenter","AchievementMessagesNetworker","AchievementMessagesConversationStarter","sendContentView","markActivityAsRead","NotificationFollowMessage","NotificationReplyMessage","NotificationYourComment","NotificationReactionMessage","messageLink","isImageClickable","isAchievement","generateTelemetryObjects","notificationImg","AriaLabelsAchievementTrophy","getImageFromNotification","notificationCardContainer","AriaLabelsCloseNotification","closeHandler","getTitleFromNotification","getMessageFromNotification","containerTelemetryObject","getContainerTelemetryContract","getMessageLinkTelemetryContract","notificationType","isLoaded","fetchNotifications","fetchNotificationsJobId","alignment","notifications","isLeftAligned","notificationTrayContainer","notificationTrayContainerRightAligned","notificationTrayContainerLeftAligned","AriaLabelsNotificationTray","isValidURL","pageURL","contentURL","whitelist","blacklist","considerURL","selectContentId","contentIds","contentIdKey","commentContainerRef","minimalContainerRef","componentEndIndicatorRef","minimalContainerObserver","IntersectionObserver","commentContainerIntersectionHandler","threshold","overlayContainerRef","overlayObserver","commentsLoaded","showNotificationTray","displayState","isOverlayActive","isCompactFloatButtonVisible","isEntireComponentScrolled","buttonVisibilityTurnedOn","componentIsInView","toggleCommentsState","trackScrolling","prepareCommentConnector","commentToBeFetchedCount","onCommentComponentConnect","expandComponent","setFloatingButtonVisibility","isDefault","isOverlay","jumpToCommentsSection","isContainerLoaded","observe","unobserve","commentWhiteListSegments","commentBlackListSegments","renderParams","isComponentExpanded","commmentView","renderOverlay","renderDefaultOrCompact","notificationPosition","isInZeroState","displayNotInitialized","activeElement","isCompactFloatMode","buttonName","CommentStartConversation","CommentJoinConversation","commentContainer","commentSuperAppContainer","commentMinimalContainer","commentZeroStateContainer","compactCommentsClickHandler","renderContentDisabledSection","renderContentPanel","renderCommentList","renderDefaultCTAButton","renderOverlayCTAButton","buttonFadeInContainer","buttonFadeOutContainer","contentThumbnailUrl","thumbnail","commentOverlayContainer","commentOverlayActiveContainer","isComponentScrolledDown","hideOverlayHandler","ContentCommentsDisabledMsg","isZeroState","buttonText","showCommentsFloatButton","showCompactCommentsHandler","isExistingUser","hasComment","showAddCommentMessage","showProfilePicture","commentsCountLabel","buttonMessage","CommentAddComment","showOverlayCommentsHandler","beforeContent","afterContent","addCommentsHashToUrl","scrollCommentContainerIntoView","focusToCommentBox","intersectionRatio","commentBox","showButton","preventScroll","isCommentContainerExist","turnOn","communityGuidelinesTelemetryContracts","tabs","Principles","Guidelines","Enforcement","guidelinesBtn","enforcementBtn","principlesBtn","communityGuidelinesTelemetryActionDispatchers","onBackClick","onEllipsisClick","whiteIcons","navbarContainer","AriaLabelsGoBackButton","backClickHandler","AriaLabelsEllipsisButton","ellipsisClickHandler","guidelineTabs","tabNameFromUrl","back","mainTitle","OnboardingProceedingGuidelines","guidelinesBtnAtPrinciples","guidelinesBtnAtEnforcement","communityGuidelinePageContainer","communityGuidelinePageSuperAppContainer","navbarBackHandler","ImgAltsMicrosoftNewsLogo","GuidelinesPageSubHeading","showTab","ImgAltsPeopleReactingContents","GuidelinesPageGuidelinesTabAvoidPartText","GuidelinesPageGuidelinesTabAvoidPartHarassment","GuidelinesPageGuidelinesTabAvoidPartBullying","ImgAltsPeopleSendingComments","GuidelinesPageGuidelinesTabRespectPartText","GuidelinesPageGuidelinesTabRespectPartImpersonate","GuidelinesPageGuidelinesTabRespectPartRespectOthers","GuidelinesPageGuidelinesTabRespectPartNotShareContent","ImgAltsTwoPeopleInteractingSocialUI","GuidelinesPageGuidelinesTabReportPartText","GuidelinesPageGuidelinesTabReportPartViolent","GuidelinesPageGuidelinesTabReportPartIllegalAct","GuidelinesPageGuidelinesTabReportPartRiskTo","GuidelinesPageGuidelinesTabReportPartProfaneText","GuidelinesPageGuidelinesTabReportPartHateSpeech","ImgAltsTwoPeopleShakingHands","GuidelinesPageGuidelinesTabFinalPartText","GuidelinesPageGuidelinesTabFinalPartCopywrited","GuidelinesPageGuidelinesTabFinalPartSpam","CommunityGuidelinePageTabsPrinciples","CommunityGuidelinePageTabsEnforcement","GuidelinesPagePrinciplesTabSupportText","GuidelinesPagePrinciplesTabUpholdText","GuidelinesPagePrinciplesTabRespectLawText","GuidelinesPagePrinciplesTabInformText","CodeofConduct","CodeOfConduct","MicrosoftServicesAgreement","CommunityGuidelinePageTabsGuidelines","GuidelinesPageEnforcementTabFlaggedText","GuidelinesPageEnforcementTabSupendText","GuidelinesPageDeemedViolating","contentSocialBarTelemetryContracts","socialBarPanelTelemetryContracts","commentsButton","socialBarPanelTelemetryActionDispatchers","commentsButtonClick","isHoverSocialBarPanel","onCommentsClick","reactionsDisabled","socialBarPanelContainer","isReactionsDisabled","isCommentsOnly","socialBarConnector","onSocialBarComponentConnected","disableSuperAppBodyScrollbar","friendRatings","reactionCountsVisible","friendNames","SocialBarNamesAndMoreTxt","names","contentSocialBarContainer","contentSocialBarSuperAppContainer","contentReactionPopoversSuperAppContainer","SocialBarCommentsPlural","SocialBarCommentsSingular","commentsClickHandler","cornerPosition","sendContentReaction","overflow","flightId","getFlight","getExtension","fileName","AcceptedAttachmentTypes","FileUploadState","FileUploadFailureReason","step2DefaultState","contactInfo","firstName","lastName","email","details","authorizedExample","description","files","formIsValid","validationErrors","firstNameError","lastNameError","emailError","emailSyntaxError","authorizedError","descriptionError","step","fileUploadAction","defaultInvalidMessage","CopyrightFormRequiredField","getErrorValue","field","calculatedErrors","CopyrightFormEmailValidation","hasError","fileKey","uploadState","fileId","uploadFailureReason","fileState","eventTarget","selectedFiles","getFileKey","lastModified","updateFileState","waiting","fileExtension","isFileAlreadyHandled","uploadedFileCount","uploaded","failed","uploading","uploadCopyrightFile","format","handleValidation","FirstName","LastName","EmailAddress","AuthorizedExample","AttachedFiles","reportUser","fieldName","step0","step1","copyrightFormContainer","CopyrightFormCheckTxt","CopyrightFormCheckSubTxt","CopyrightFormContentIssueTitle","CopyrightFormUserIDTitle","CopyrightFormCommentIDTitle","renderButtonField","DeleteDataCancel","CopyrightFormYesContinueButton","fileCount","waitingOrUploadingFileCount","acceptedAttachmentTypes","CopyrightFormMainTxt","CopyrightFormMainSubTxt","CopyrightFormContactInfoTitle","renderInputField","CopyrightFormContactInfoFirstName","CopyrightFormContactInfoLastName","CopyrightFormContactInfoEmail","CopyrightFormDetailsTitle","CopyrightFormAuthorizedExample","CopyrightFormAuthorizedExampleSubTxt","CopyrightFormDescription","CopyrightFormDescriptionSubTxt","CopyrightFormAttachments","CopyrightFormAttachmentsSubTxt","multiple","accept","fileSelectHandler","onDrop","CopyrightFormUploadFileButton","CopyrightFormFileWaiting","CopyrightFormFileUploading","CopyrightFormFileUploaded","CopyrightFormFileUploadFailed","getFileUploadStateString","failureReason","CopyrightFormFileSizeFailure","CopyrightFormFileFormatFailure","CopyrightFormFileCountFailure","CopyrightFormFileOtherFailure","getFileUploadFailureString","removeFile","CopyrightFormNoFileChosen","CopyrightFormAttachmentsInfoTxt","CopyrightFormResetButton","submitForm","CopyrightFormSubmitButton","inputName","inputValue","handleContactInfoOnChange","btnName","onClick1","btnName1","newFiles","subscriptionContainerId","sdkLoadedResolver","sdkLoaded","initializeSubscriptionSdk","sdkScript","getSdkUrl","defer","subscriptionContainer","renderCreateSubscription","callSdkFunction","renderManageSubscription","getSubscriptionStatus","ProductType","freeze","Basic","Advanced","Premium","MsnProductType","EnvList","functionName","xpaySubscription","getSdkEnv","tileContainerId","ensureRequiredParams","gradientActive","buttonVisible","componentActive","checkSubscription","subscriptionChecked","subscriptionProductType","activateComponent","authToken","publisherName","publisherLogoUrl","userProfilePageUrl","userProfileImageUrl","scenario","onSuccess","reload","deactivateButtonText","OverlayGradientSubscribeText","maxHeightStyles","maxHeight","gradientOverlayContainer","onButtonClick","hideOverlay","overlayButton","multiLoginPageTelemetryContracts","main","loginMicrosoft","loginGoogle","loginFacebook","multiLoginPageTelemetryActionDispatchers","defaultIds","msaLogin","replyUrl","isSignup","redirectLink","msaLoginWindow","listenMSALoginWindow","close","loginType","fbClientId","FB","login","authResponse","fields","scope","fbAsyncInit","facebookLogin","googleClientId","loginAndGetPassword","auth2","getEmailFromActiveSession","currentUser","getBasicProfile","getEmail","googleInit","gapi","load","client_id","googleLogin","renderLoginImage","multiLoginPageContainer","MultiLoginTitle","loginWith","MultiLoginMicrosoft","MultiLoginGoogle","MultiLoginFacebook","MultiLoginFooterTxt","MultiLoginFooterTerms","MultiLoginFooterPrivacy","testContentIds","propsToPass","onboardingPageTelemetryContracts","onboardingPage","onboardingThirdPartyPage","onboardingThirdPartyPageSignIn","onboardingThirdPartyPageCreateAccount","step1Continue","step1EditProfile","step2ThanksPage","step2LetsGo","maxRetryCount","retryCount","createUserInProgress","fetchAndVerifyMeTimerId","fetchAndVerifyMe","createUserErrorMessage","createUser","getCreateUserErrorMessage","OnboardingErrorUnknownMsg","OnboardingErrorNotSignInMsg","OnboardingErrorNotAllowMsg","OnboardingErrorNoNameMsg","OnboardingFailChildMsg","refreshPage","isChild","onboardingStep2TelemetryObject","onboardingUnderagePageContainer","OnboardingUnderageTitle","OnboardingUnderageMsg","OnboardingCloseWindow","hasNotAllowInfo","hasInReviewInfo","isNoName","EditButtonWrapperComponent","onboardingPageContainer","OnboardingTitle","OnboardingSubTitle","OnboardingSuccessMsg","OnboardingReviewImageMsg","OnboardingReviewNameMsg","OnboardingFailImageMsg","OnboardingFailNameMsg","editProfileHandler","OnboardingEditProfile","continueOnboardingHandler","OnboardingContinue","OnboardingOK","OnboardingProceedingText","OnboardingProceedingTermsOfService","OnboardingProceedingPrivacyAndCookies","thanksJoiningTitle","onboardingWelcomePageStep2Container","OnboardingThanksJoiningSubTitle","letsGoHandler","ImgAltsMicrosoftLogo","OnboardingThirdPartyTitle","OnboardingThirdPartySubTitle","signInThirdPartyMsaHandler","OnboardingThirdPartySignIn","createNewMicrosoftAccountHandler","OnboardingThirdPartyCreate","profileCardTelemetryContracts","profileCard","moreButton","reportUserMenu","reportUserMenuTypes","reportedMessage","renderSuperApp","profileCardUserStatsContainer","AriaLabelComments","AriaLabelComment","AriaLabelFollowers","AriaLabelFollower","AriaLabelReactions","AriaLabelReaction","profileCardUserStatsSuperAppContainer","profileReportMenuTelemetryContracts","profileReportMenuTelemetryActionDispatchers","containerWidth","containerHeight","containerOffsetLeft","selectedReportItemType","activeListId","listRefs","showNextList","loadedHandler","offsetHeight","offsetLeft","profileReportMenuPopover","profileReportMenuContainer","ProfileReportUserTitle","selectReportItemType","profileReportMenuSuperAppContainer","commonContent","isReported","emptyState","modifiedName","ProfileNoUserUsername","ProfileNotSocialUsername","modifiedAvatarUrl","avatarAltText","profileCardTelemetryObject","actionPanelHtml","calculateActionHTML","profileCardContainer","profileCardSuperAppContainer","actionHTMLParams","openOnboardingPopup","AriaLabelsOpenOnboardingPopup","ProfileCreateBtn","ProfileEditBtn","ProfileCardUserReported","AriaLabelsReportProfile","profileManageDataPageTelemetryContracts","clearData","clearDataConfirmation","step0CancelBtn","step0RemoveDataBtn","step1YesRemoveDataBtn","step1CancelDataBtn","DataType","profileConnector","activityChecked","commentsChecked","reactionsChecked","followChecked","uncheckedOptions","profileManageDataPageContainer","ProfileManageDataDeleteProfileTxt","ProfileManageDataDeleteProfileSubTxt","toggleCheckState","ProfileManageDataDeleteMyActivityTitle","ProfileManageDataDeleteMyActivityTxt","ProfileManageDataDeleteMyCommentsTitle","ProfileManageDataDeleteMyCommentsTxt","ProfileManageDataDeleteMyReactionsTitle","ProfileManageDataDeleteMyReactionsTxt","ProfileManageDataDeleteMyFollowersTitle","ProfileManageDataDeleteMyFollowersTxt","DeleteDataFromCommunity","cancelClickHandler","removeDataClickHandler","DeleteDataRemoveData","DeleteDataConfirmationQuestion","ProfileManageDataDeleteDataMsg","DeleteDataDeleteProfileCancel","submitClearData","DeleteDataDeleteConfirm","profileTabsTelemetryContracts","Activity","Comments","Followers","Following","Subscriptions","profileTabsTelemetryActionDispatchers","tabClicked","componentInView","alreadyMarkedAsRead","activityItemRef","isIntersecting","disconnect","checkIcon","profileActivityContainer","profileActivityAlertContainer","profileActivitySuperAppContainer","messageText","profileActivityBadgeContainer","ImgAltsAchievementsLogo","profileActivityItemTelemetryContracts","activityItem","profileName","commentReactionBreakdown","profileActivityFollowContainer","profileActivityFollowSuperAppContainer","ProfileActivityFollowMsg","AriaLabelsShowUserCard","reactionMenuIconRef","mentionUserId","profileActivityReactionContainer","profileActivityReactionSuperAppContainer","AriaLabelsShowMiniReactionBreakdownPopup","ProfileActivityReactionPluralMsg","ProfileActivityReactionMsg","CommentLink","profileActivityReplyContainer","profileActivityReplySuperAppContainer","ProfileActivityReplyMsg","profileActivityListContainerRef","footerRef","footerInView","isLoading","fetchActivities","activities","appealComment","appealMe","appealMyPicture","profileActivityListContainer","profileActivityListSuperAppContainer","ProfileActivityViewGuidelines","appealSent","ProfileActivityRequestReceived","requestReview","ProfileActivityRequestReview","requestUserAppeal","ProfileActivityEditProfile","requestUserPictureAppeal","profileEmptyTabContainer","profileEmptyTabSuperAppContainer","ImgAltsZeroActivityProfile","ProfileActivityZeroActivityMessage","ProfileActivityZeroActivitySubMessage","profileCommentsTelemetryContracts","profileCommentItemTelemetryContracts","replyLink","reactionCountsBtn","profileCommentItemTelemetryActionDispatchers","reactionCountsClicked","reactionsCountBtn","isEmbeded","commentItemTelemetryObject","CommentItemReadMore","ProfileCommentsReplyLink","ProfileCommentsReplyPluralLink","ProfileCommentItemComment","ProfileCommentItemCommentReply","profileCommentsDeleteMenuPopover","profileCommentListContainerRef","pageYOffset","fetchUserComments","handleScroll","profileCommentsContainer","profileCommentsSuperAppContainer","ImgAltsNoComments","ProfilePageCommentsNoCommentForUserTitle","ProfilePageCommentsNoCommentForOthersTitle","ProfilePageCommentsNoCommentForUserText","ProfilePageCommentsNoCommentForOthersText","profilePrivacyTelemetryContracts","privateSwitchTurnOff","privateSwitchTurnOn","manageYourDataBtn","profilePrivacyTelemetryActionDispatchers","divRef","setProfilePrivate","ButtonWrapperComponent","profilePrivacyContainer","profilePrivacySuperAppContainer","ProfilePagePrivateProfileTitle","defaultChecked","togglePrivateChecked","ProfilePagePrivacySwitchOn","ProfilePagePrivacySwitchOff","ProfilePagePrivacySwitchText","profileDataContainer","profileDataSuperAppContainer","ProfilePagePrivacyManageTitle","ProfilePagePrivacyManageText","clearDataClickHandler","ProfilePagePrivacyClearDataButton","subscriptions","getInitialState","expandedSubscriptions","transactions","transactionFetchErrors","subscription","subscriptionStatus","timestring","paymentInfoString","paymentInfo","last4CardNumber","subscriptionsResponse","getSubscriptions","publisherIdFromMsn","transactionResponse","getTransactionHistory","subscriptionId","subscriptionsFetchFailed","loadSubscriptions","publishers","profileSubscriptionsContainer","ProfilePageSubscriptionsFetchError","activeSubscriptions","subs","isSubscriptionActive","expiredSubscriptions","activeSubscriptionsTitle","ProfilePageSubscriptionsActiveSubscriptionsTitle","expiredSubscriptionsTitle","ProfilePageSubscriptionsExpiredSubscriptionsTitle","profileSubscriptionsSuperAppContainer","renderSubscriptionHistoryCard","subscriptionHistoryContainer","renderSingleSubscription","renderEmptyState","ProfilePageSubscriptionsNoSubscription","publisher","actionButtonType","isSyncedFromPublisher","otherProperties","siteUrl","renderActionButton","calculateFooterTag","calculatePaymentInfo","renderFooterAction","ProfilePageSubscriptionsTransactionFetchError","trans","ProfilePageSubscriptionsTransactionInfo","paymentAmount","paidAmount","paymentDate","getUtcDate","paymentDateTimeUtc","toLocaleDateString","actionButtonIcon","actionButtonText","ProfilePageSubscriptionsRenewButtonTitle","reloadSubscriptions","ProfilePageSubscriptionsManageButtonTitle","ProfilePageSubscriptionsDelinkButtonTitle","unlinkPublisher","transactionAction","toggleExpand","ProfilePageSubscriptionsTransactionsHistory","ProfilePageSubscriptionsVisitSite","expirationDate","expireDateUtc","isSubscriptionPrepaid","ProfilePageSubscriptionsFooterTagPrepaidPayment","ProfilePageSubscriptionsFooterTagPeriodicPayment","price","chargeAmount","period","chargeCycle","ProfilePageSubscriptionsFooterTagManagedByPublisher","ProfilePageSubscriptionsFooterTagExpired","newExpandedSubscriptions","nextChargeDate","nextChargeDateUtc","paymentMethod","getPaymentMethodString","ProfilePageSubscriptionsFooterPaymentInfoPrepaid","ProfilePageSubscriptionsFooterPaymentInfoNextCharge","nextChargeDay","profileUsersTelemetryContracts","nameLink","listItemTelemetryObjectMap","fetchUsers","isObservingFooter","profileUsersContainer","profileUsersSuperAppContainer","ProfileCommentsLbl","tabContentRef","profileTabs","ProfileTabsActivityTab","ProfileTabsCommentsTab","ProfileTabsFollowersTab","ProfileTabsFollowingTab","ProfileTabsPrivacyTab","ProfileTabsSubscriptionsTab","activeTabs","onProfilePageComponentConnected","scrollLeft","onTabChange","scrollToTop","ugContentConnector","profileExistsButNotSocial","profileLockedContainer","profileLockedSuperAppContainer","profileLockedIcon","ImgAltPrivateProfile","ProfileNotAvailableTxt","ProfilePrivateAccountMsg","followersTab","followingTab","fetchUserFollowers","ImgAltNoFollowers","NoFollowersTitleForUser","NoFollowersTitleForOthers","NoFollowersTextForUser","NoFollowersTextForOthers","fetchUserFollowings","ImgAltNoFollowings","NoFollowingTitleForUser","NoFollowingTitleForOthers","NoFollowingTextForUser","profileTabsContainer","profileTabsSuperAppContainer","ProfileNotSocialUserJoinMessage","ProfileNotSocialUserJoinButton","subscriptionSdkInitialized","isFetched","profilePageContainer","profilePageSuperAppContainer","navbarEllipsisHandler","publisherProfileCardTelemetryContracts","publisherProfileCard","subscribeButton","followersDefinitionPopoverVisible","followersTriggerRef","publisherProfileCardStatsContainer","abbreviate","followersDefinitionPopoverContainer","renderPopoverContext","getFollowersDefinitionText","PublisherProfilePageLikesDescription","PublisherProfilePageFollowersDescription","definition","infoPopover","activeSharePlatforms","isSubscribed","showCannotUnfollowNotification","alreadySubscribedPopoverVisible","alreadySubscribedTriggerRef","checkSubscriptionStatus","publisherProfileCardTelemetryObject","publisherProfileCardContainer","renderPublisherInfo","renderActionPanel","renderAboutPanel","renderSocialPanel","followButtonText","PublisherProfilePageFollowing","PublisherProfilePageFollow","handleFollowing","alreadySubscribedPopoverContainer","PublisherProfilePagePaidSubscriptionUnfollowBody","subscribeButtonText","PublisherProfilePageSubscribed","PublisherProfilePageSubscribe","SubscribeButtonWrapperComponent","ProfilePageSubscriptionsUnlockBenefits","handleSubscription","handleAlreadySubscribedClick","PublisherProfilePageAlreadySubscribedQuestion","aboutText","about","PublisherProfilePageAboutUs","icons","PublisherProfilePageShareTo","share","renderLinkToPublisher","manageSubscription","subscribeToPublisher","getSocialMediaShareUrl","publisherProfileTabsTelemetryContracts","All","publisherProfileTabsTelemetryActionDispatchers","contentContainerRef","contentCards","PublisherProfilePageTabsAllTab","PublisherProfilePageTabsPremiumTab","loadMoreContent","currentContentCards","cardsPromise","cards","existingCardKeys","newContentCards","isLoadingNewContent","newSortType","publisherProfileTabsContainer","renderSortBox","onSortTypeChange","Recommend","Latest","MostPopular","publisherProfilePageContainer","SubscribeButtonStateEnum","buttonConfig","publisherSubscribeFollowButtonInactiveContainer","publisherSubscribeFollowButtonActiveContainer","Subscribed","checkSubscriptionAndFollowStatus","subscriptionAndFollowChecked","getButtonConfig","publisherSubscribeFollowButtonContainer","redirectToPublisherProfile","followPublisher","reactionBreakdownTelemetryContracts","contentReactionBreakdown","reactionBreakdownListItemTelemetryContracts","userNameAndProfilePic","reactionBreakdownTelemetryActionDispatchers","onFollow","userName","profilePicture","followClickHandler","reactionBreakdownConnector","onReactionBreakdownComponentConnected","onReactionBreakdownComponentDisconnected","sendTabClickedTelemetry","meId","attachUserDataToItem","userState","breakdownWithTabs","itemOfSelf","selfId","otherCount","reactionStrings","ReactionBreakDownOneOtherLoves","ReactionBreakDownSomeOthersLove","ReactionBreakDownOneOtherLikes","ReactionBreakDownSomeOthersLike","ReactionBreakDownOneOtherIsSurprised","ReactionBreakDownSomeOthersAreSurprised","ReactionBreakDownOneOtherIsAngry","ReactionBreakDownSomeOthersAreAngry","ReactionBreakDownOneOtherIsSad","ReactionBreakDownSomeOthersAreSad","ReactionBreakDownOneOtherIsThinking","ReactionBreakDownSomeOthersAreThinking","isContentModerated","activeTabItems","prepareActiveTabItems","moreCounts","capitalize","OtherReactionsItem","getOtherReactionsString","reactionBreakdownContainer","reactionBreakdownSuperAppContainer","ReactionBreakDownTitle","AriaLabelsAllReactions","ReactionBreakDownTabText","t0","t1","inputRef","previewUrls","onRemove","onSetCover","setCoverItem","mediaInputContainer","MediaInputAddMedia","renderImage","bodyContainerRef","titleContainerRef","handleKeypress","saveUGContentResource","textOnly","saveUGContent","ugContentCreateView1Container","mediaInputChangeHandler","onRemoveResource","onSetCoverResource","UGCContentCreateV1ContentHeadlinePlaceHolder","changeHandler","onKeyUp","UGCContentCreateV1ContentTextPlaceHolder","itemsChanged","newItemList","tagInputContainer","addItem","containerClickHandler","renderItem","inputKeyDownHandler","fetchTags","fetchCategories","fetchLocations","tagOptions","categoryOptions","locationOptions","ugContentCreateView2Container","UGContentCreatePageTags","UGContentCreatePageSelection","tagsChangeHandler","UGContentCreatePageCategories","categoriesChangeHandler","UGContentCreatePageLocation","locationChangeHandler","UGCreateSteps","Step1","Step2","currentStep","fetchUGContent","saveStatus","saveLabelName","isSaving","ugContentCreatePageContainer","showMyArticles","UGContentCreatePageMyArticles","showMyDrafts","UGContentCreatePageMyDraft","saveContent","nextStep","UGContentCreatePageNextButton","prevStep","UGContentCreatePagePreviousButton","unpublishContent","UGContentCreatePageUnPublishButton","publishContent","UGContentCreatePagePublishButton","navButtons","isFetchingContents","fetchUGContents","ugContents","isDraft","extractContents","ugContentListContainer","editContent","UGContentListEditButton","UGContentListLoading","UGContentListNoArticles","usedProps","PureComponent","preventSelectionInSuperapp","moduleTelemetryContract","preparePropsToPass","mainContainer","mainSuperAppContainer","mainInSuperappModal","isRenderedInSuperappModal","isComponentInModal","switchToComponent","popupTelemetryContracts","closeBtn","popupTelemetryActionDispatchers","popupProps","hideButtons","overlayContainer","AriaLabelsPopup","AriaLabelsClosePopupDialogue","closeClickHandler","RenderErrors","UnknownComponent","handledProps","checkAndLogReducerError","telemetryHandler","consumed","telemetryDomElement","customClickHandler","customImpressionHandler","sendContentViewEvent","isNavigate","primeEventType","destinationUrl","sendActionEvent","handleEvent","setupTelemetry","setupBridge","teardownTelemetry","teardownBridge","markTimeToVisuallyReady","setDomain","listenMediaQueries","componentRegex","componentNameResult","componentStack","componentName","reduxResult","isRedux","isPopup","socialProps","unhandledProps","queryLevels","queryLevel","addListener","checkMediaQueryLevel","classNames","styleConnector","defaultProps","social","profileHrColor","fontFamily","margin","padding","border","highContrastButton","background","selectedBackground","transition","selectedText","DisabledMessageStyles","display","FollowButtonStyles","MediaInputStyles","position","MultiLoginPageStyles","PopupStyles","ProfilePageStyles","flex","ProfilePostsStyles","profilePostsContainer","order","ProfileReportMenuStyles","scrollGradientStyle","TagInputStyles","outline","ToolingInfo","reactComponent","to","font","CommonStyles","animation","CommentStyles","ContentPanelStyles","markSize","float","CommentBoxStyles","commentListContentBlury","CommentListStyles","commentVPadding","CommentItemStyles","ReplyListStyles","UserCardStyles","MiniReactionBreakdownStyles","PopoverStyles","Dialog","ReactionMenuStyles","ReactionPanelStyles","ReportMenuStyles","SortBoxStyles","CommunityGuidelineStyles","profileEmptyMessageContainer","ProfileUsersStyles","NotificationCardStyles","NotificationTrayStyles","screen","ReactionBreakdownStyles","profileActivityTitleContainer","profileReactionActivityMiniBreakdownPopover","ProfileActivityStyles","ProfileCardStyles","profileCommentsMiniBreakdownPopover","ProfileCommentsStyles","ProfilePrivacyStyles","ProfileTabsStyles","ProfileManageDataPageStyles","OnboardingPageStyles","DeleteMenuMenuStyles","UGContentCreatePageStyles","UGContentCreateView1Styles","UGContentCreateView2Styles","UGContentListStyles","contentCardContainer","ContentCardStyles","TypingUsersStyles","GradientOverlayStyles","ProfileCardUserStatsStyles","CopyrightFormStyles","NavbarStyles","PublisherProfileTabsStyles","PublisherProfileCardStyles","PublisherProfileCardStatsStyles","ProfileSubscriptionStyles","likeMask","loveMask","circleMask","MostReactionsStyles","PublisherSubscribeFollowButtonStyles","ProfilePageSuperAppStyles","ProfileCardUserStatsSuperAppStyles","ProfileTabsSuperAppStyles","ProfileCardSuperAppStyles","ProfileActivitySuperAppStyles","ProfileCommentsSuperAppStyles","profileEmptyMessageSuperAppContainer","ProfileUsersSuperAppStyles","ProfilePrivacySuperAppStyles","profileReportMenuSuperAppPopover","ProfileReportMenuSuperAppStyles","contentReactionCounts","SocialBarPanelStyles","experienceConfigSchema","defaultMockState","mockState","mockConfig","inspector","hubName","onNewMessage","fetching","signalRHub","signalR","getSignalRConnectionInfo","accessKey","endpoint","accessTokenFactory","connection","HubConnectionBuilder","withUrl","configureLogging","LogLevel","Information","on","signalRConnection","stop","start","commentExists","commentList","contentAutoSaver","getAndUpdateContent","notCreated","loadSpecificComment","loadAllComments","getCommentById","commentsBefore","getCommentsByAnchorCommentId","commentsAfter","reverse","parentAndItsAround","updateCommentRatings","commentAndItsAround","topCommentsToFetchCount","skippedCommentsCount","getCommentsByContentId","loadPrevious","prepending","lastCommentId","loadCommentsUsingAnchorComment","firstCommentId","getCommentsByParentId","getRating","handleUserLoginFromState","createContentIfNotExists","responseComment","postComment","broadcastCommentNotification","newContent","resetRating","saveReactionInSuperAppLocalStorage","localContent","getLocalContent","getContentById","getContent","force","isFetching","isFollowingFetching","getUserIsFollowed","newMe","unfollowUser","cachedMyReaction","getFriendRatings","ratings","processRatings","userRecord","myAnonReaction","sourceId","getUserActivities","isSocialDataUser","getUserNotifications","updateReduxStore","updateUserActivityStatus","getRatingBreakdown","newItems","newItem","getUserProfile","isPrivate","updateUserSettings","getUGContents","getUGContentById","existingUGContent","updatedFields","savedUGContent","resourceBlob","postUGContentResource","uGContentPublishResponse","getTagsByTitle","getCategoriesByTitle","getLocationsByTitle","handleSignalRMessage","lastTypingTime","newComment","commentContentId","parentComment","expirationTime","typingUsers","expireTime","isUpdateTypersChanged","broadcastTypingNotification","relativeClass","appealActivity","argument","makeErrorIfUndefined","updateNotificationStatus","prepend","updateCounts","updateTypersIfNeeded","insertUserUGContents","deleteUserUGContents","userSkeleton","oldUserState","newUGContents","ugContentList","cNew","cOld","markCommentAsDeleted","mapAllComments","insertReplies","existingNotifications","newNotifications","notificationList","newNotification","keyA","keyB","existingActivities","newActivities","activityList","mapFunc","mapCommentAndReplies","$comment","commentCount","mapAllContents","getDisplayedTypers","typingUserIds","newContents","currentId","newTypingUsers","newComments","existingReplies","newReplies","replyIds","distinctReplies","roots","apps","createContainers","pageConfig","typeAndId","getPageType","newContainer","exp","separator","addSocialBarIntoVideo","addSocialBarIntoArticle","addOverlayCommentContainer","renderToContainers","isDarkModeSupported","newStyle","darkModeQuery","rtl","ltr","socialId","socialModule","resetPageBaseInstance","verticalkey","categorykey","socialConnector","lowerCaseHref","socialMarket","socialExperience","renderRootElement","findRoots","setupContainers","removeOldContainers","placeHolders","sticky","fixed","spaTest","placeholders","removeChild","ec"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD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8BACA,8BACA,wCACA,wDACA,4CACA,oDACA,wCACA,4CACA,8BACA,gDACA,8CACA,wCACA,4CACA,oCACA,0CACA,0CACA,0CACA,oDACA,wDACA,wDACA,8CACA,8CACA,sCACA,sCACA,0CACA,wCACA,wCACA,4CACA,4BACA,sCACA,wCACA,kCACA,8CACA,0CACA,gCACA,sBACA,4CACA,gDACA,kBACA,4BACA,sCACA,sBACA,wBACA,wCACA,oCACA,0CACA,4BACA,4BACA,kCACA,kCACA,8CACA,wBACA,wCACA,4CACA,sCACA,8BACA,sCACA,kCACA,wBACA,sBACA,oBACA,gCACA,wCACA,sCACA,sBACA,oBACA,4CACA,oCACA,wBACA,gCACA,0BACA,kCACA,wBACA,4BACA,sCACA,sBACA,4BACA,sCACA,oCACA,kBACA,oCACA,0CACA,8CACA,wBACA,oBACA,4CACA,gCACA,oCACA,4BACA,gCACA,8BACA,kCACA,0BACA,wBACA,4BACA,wBACA,8DACA,oCACA,oCACA,sDACA,4BACA,8CACA,oBACA,8BACA,4BACA,gCACA,4CACA,0CACA,oCACA,wCACA,4CACA,8CACA,wCACA,oEACA,wDACA,4DACA,sCACA,wCACA,4CACA,4CACA,wBACA,kCACA,wCACA,gBACA,sCACA,oCACA,gCACA,wCACA,4CACA,4CACA,wCACA,gDACA,wDACA,wCACA,0CACA,8BACA,4CACA,gCACA,kDACA,8CACA,oCACA,4BACA,8CACA,4CACA,sCACA,4CACA,wCACA,sBACA,8BACA,8BACA,wBACA,wBACA,kBACA,0BACA,wCACA,wBACA,sCACA,0BACA,8BACA,wBACA,8BACA,kBACA,0BACA,0BACA,4BACA,gCACA,kCACA,0CACA,kCACA,sDACA,8BACA,wBACA,4BACA,gBACA,sCACA,0CACA,sBACA,0BACA,wBACA,sBACA,kCACA,8BACA,sCACA,0CACA,4BACA,gCACA,0BACA,4BACA,8BACA,4BACA,0BACA,sDACA,0CACA,oCACA,wBACA,4BACA,8BACA,wBACA,8BACA,0CACA,8BACA,gCACA,8BACA,4BACA,gCACA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5K,GAAMn5K,GAAO7C,SAAS6N,eAAekwK,EAAal7K,aAE/Dm5K,GAAMkC,SAETL,GAAoB7B,GAAM18E,SAAY08E,GAAMgC,QAAWhC,GAAMiC,QAC7D/B,KACA0B,IAAU,IApQlB73E,EAAA,EAAcpkC,mBAAqB,KACnCokC,EAAA,EAAc5iB,uBAAyB,KACvC4iB,EAAA,EAAcljB,WAAa,KAC3BkjB,EAAA,EAAcE,iBAAmB,KAqQjC23E,IAAU,GAGV,WAAS7+G,UAAU,8CACd5b,KAAMk7H,IACHviH,GAAmBuiH,EACnBzB,OAGRv7E,GAAA,EAASsB,kCAAkC,IAAY,8CACnDi7E,IAAU,GAAM,GAChBhB","file":"social.39a458214f76f6236d5b.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t500: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"85\":\"icon-assets-Accounts\",\"86\":\"icon-assets-AdChoices\",\"87\":\"icon-assets-AlertWhite\",\"88\":\"icon-assets-AllDone\",\"89\":\"icon-assets-BingCardDefaultHotelImage\",\"90\":\"icon-assets-BingHotelSeePrice\",\"91\":\"icon-assets-BingLogo\",\"92\":\"icon-assets-BingRatingDarkLightStar\",\"93\":\"icon-assets-BingRatingDarkStar\",\"94\":\"icon-assets-BingRatingLightStar\",\"95\":\"icon-assets-BlowingHail\",\"96\":\"icon-assets-BlowingHailV2\",\"97\":\"icon-assets-BlowingHailWhite\",\"98\":\"icon-assets-BlowingSnow\",\"99\":\"icon-assets-BlowingSnowV2\",\"100\":\"icon-assets-BlowingSnowWhite\",\"101\":\"icon-assets-CDCLogo\",\"102\":\"icon-assets-CardActionButton\",\"103\":\"icon-assets-ChatBubbleIcon\",\"104\":\"icon-assets-Check\",\"105\":\"icon-assets-CheckmarkOutline\",\"106\":\"icon-assets-Chevron\",\"107\":\"icon-assets-ChevronDown\",\"108\":\"icon-assets-ChevronDownV3\",\"109\":\"icon-assets-ChevronRight\",\"110\":\"icon-assets-ChevronWhite\",\"111\":\"icon-assets-CircleCheckmark\",\"112\":\"icon-assets-CircleChevron\",\"113\":\"icon-assets-CircleClose\",\"114\":\"icon-assets-ClearNight\",\"115\":\"icon-assets-ClearNightV2\",\"116\":\"icon-assets-ClearNightWhite\",\"117\":\"icon-assets-ClinicalTrialBot\",\"118\":\"icon-assets-Close\",\"119\":\"icon-assets-CloseThin\",\"120\":\"icon-assets-CloseV2\",\"121\":\"icon-assets-Cloudy\",\"122\":\"icon-assets-CloudyV2\",\"123\":\"icon-assets-CloudyWhite\",\"124\":\"icon-assets-Comment\",\"125\":\"icon-assets-CommentFill\",\"126\":\"icon-assets-ConflictWarning\",\"127\":\"icon-assets-Copy\",\"128\":\"icon-assets-DarkModeHotel\",\"129\":\"icon-assets-DataProvider\",\"130\":\"icon-assets-DayTime\",\"131\":\"icon-assets-Delete\",\"132\":\"icon-assets-DeleteTrashCan\",\"133\":\"icon-assets-Discover\",\"134\":\"icon-assets-Dislike\",\"135\":\"icon-assets-DislikeText\",\"136\":\"icon-assets-Disliked\",\"137\":\"icon-assets-DislikedLight\",\"138\":\"icon-assets-DislikedText\",\"139\":\"icon-assets-Docx\",\"140\":\"icon-assets-DoubleTap\",\"141\":\"icon-assets-Download\",\"142\":\"icon-assets-DownloadNoFill\",\"143\":\"icon-assets-Edit\",\"144\":\"icon-assets-EditNoFill\",\"145\":\"icon-assets-Edited\",\"146\":\"icon-assets-EditedNoFill\",\"147\":\"icon-assets-Ellipses\",\"148\":\"icon-assets-EllipsesLight\",\"149\":\"icon-assets-EllipsesV2\",\"150\":\"icon-assets-EmojiAngry\",\"151\":\"icon-assets-EmojiHeart\",\"152\":\"icon-assets-EmojiLike\",\"153\":\"icon-assets-EmojiSad\",\"154\":\"icon-assets-EmojiSurprised\",\"155\":\"icon-assets-EmojiThinking\",\"156\":\"icon-assets-EmptyDiscoverDark\",\"157\":\"icon-assets-EmptyDiscoverLight\",\"158\":\"icon-assets-EmptyMruDark\",\"159\":\"icon-assets-EmptyMruLight\",\"160\":\"icon-assets-EmptyPinnedDark\",\"161\":\"icon-assets-EmptyPinnedLight\",\"162\":\"icon-assets-EmptySharedDark\",\"163\":\"icon-assets-EmptySharedLight\",\"164\":\"icon-assets-ErrorRocketDark\",\"165\":\"icon-assets-ErrorRocketLight\",\"166\":\"icon-assets-Excel\",\"167\":\"icon-assets-Facebook\",\"168\":\"icon-assets-FacebookCircle\",\"169\":\"icon-assets-FacebookText\",\"170\":\"icon-assets-FacebookTextBlack\",\"171\":\"icon-assets-Flag\",\"172\":\"icon-assets-FluentArrowTrending\",\"173\":\"icon-assets-FluentAttach\",\"174\":\"icon-assets-FluentCalendar\",\"175\":\"icon-assets-FluentComment\",\"176\":\"icon-assets-FluentCompassNorthwest\",\"177\":\"icon-assets-FluentEdit\",\"178\":\"icon-assets-FluentFolderOpen\",\"179\":\"icon-assets-FluentMention\",\"180\":\"icon-assets-FluentNews\",\"181\":\"icon-assets-FluentPeople\",\"182\":\"icon-assets-FluentVideo\",\"183\":\"icon-assets-Fog\",\"184\":\"icon-assets-FogV2\",\"185\":\"icon-assets-FogWhite\",\"186\":\"icon-assets-Folder\",\"187\":\"icon-assets-FolderNoFill\",\"188\":\"icon-assets-FolderOpen\",\"189\":\"icon-assets-Form\",\"190\":\"icon-assets-Forward\",\"191\":\"icon-assets-FreezingRain\",\"192\":\"icon-assets-FreezingRainV2\",\"193\":\"icon-assets-FreezingRainWhite\",\"194\":\"icon-assets-FrequentSitesEmpty\",\"195\":\"icon-assets-FrequentSitesError\",\"196\":\"icon-assets-GalleryFullscreen\",\"197\":\"icon-assets-GalleryMediaIcon\",\"198\":\"icon-assets-GeneralErrorDark\",\"199\":\"icon-assets-GeneralErrorLight\",\"200\":\"icon-assets-GenericFile\",\"201\":\"icon-assets-Glimmer\",\"202\":\"icon-assets-GridView\",\"203\":\"icon-assets-HailDay\",\"204\":\"icon-assets-HailDayV2\",\"205\":\"icon-assets-HailDayWhite\",\"206\":\"icon-assets-HailNight\",\"207\":\"icon-assets-HailNightV2\",\"208\":\"icon-assets-HailNightWhite\",\"209\":\"icon-assets-HazeSmoke\",\"210\":\"icon-assets-HazeSmokeNightV2_106\",\"211\":\"icon-assets-HazeSmokeWhite\",\"212\":\"icon-assets-HazySmokeV2\",\"213\":\"icon-assets-HeavySnow\",\"214\":\"icon-assets-HeavySnowV2\",\"215\":\"icon-assets-HeavySnowWhite\",\"216\":\"icon-assets-Hide\",\"217\":\"icon-assets-HideStory\",\"218\":\"icon-assets-HideStoryV2\",\"219\":\"icon-assets-HideV2\",\"220\":\"icon-assets-Home\",\"221\":\"icon-assets-HomeOutline\",\"222\":\"icon-assets-Hotel\",\"223\":\"icon-assets-Hurricane\",\"224\":\"icon-assets-Hurricane1\",\"225\":\"icon-assets-Hurricane2\",\"226\":\"icon-assets-Hurricane3\",\"227\":\"icon-assets-Hurricane4\",\"228\":\"icon-assets-Hurricane5\",\"229\":\"icon-assets-HurricaneFull\",\"230\":\"icon-assets-HurricaneTC\",\"231\":\"icon-assets-HurricaneTD\",\"232\":\"icon-assets-HurricaneTS\",\"233\":\"icon-assets-IndustryBriefcase\",\"234\":\"icon-assets-Information\",\"235\":\"icon-assets-InteractionRequiredDark\",\"236\":\"icon-assets-InteractionRequiredLight\",\"237\":\"icon-assets-Interested\",\"238\":\"icon-assets-LanguageAndContent\",\"239\":\"icon-assets-Layout\",\"240\":\"icon-assets-LightBulb\",\"241\":\"icon-assets-LightRain\",\"242\":\"icon-assets-LightRainV2\",\"243\":\"icon-assets-LightRainWhite\",\"244\":\"icon-assets-LightSnow\",\"245\":\"icon-assets-LightSnowV2\",\"246\":\"icon-assets-LightSnowWhite\",\"247\":\"icon-assets-Like\",\"248\":\"icon-assets-LikeText\",\"249\":\"icon-assets-Liked\",\"250\":\"icon-assets-LikedText\",\"251\":\"icon-assets-Line\",\"252\":\"icon-assets-Link\",\"253\":\"icon-assets-LinkedIn\",\"254\":\"icon-assets-LinkedInBlack\",\"255\":\"icon-assets-LinkedInText\",\"256\":\"icon-assets-ListMenu\",\"257\":\"icon-assets-LocaleLanguage\",\"258\":\"icon-assets-Locate\",\"259\":\"icon-assets-LocateWhite\",\"260\":\"icon-assets-LocationDetect\",\"261\":\"icon-assets-Lock\",\"262\":\"icon-assets-Mail\",\"263\":\"icon-assets-MailBlack\",\"264\":\"icon-assets-MailNoFill\",\"265\":\"icon-assets-MailRoundedCorners\",\"266\":\"icon-assets-ManagedBriefcase\",\"267\":\"icon-assets-ManagedBriefcaseNoFill\",\"268\":\"icon-assets-MapEnterFullScreenMode\",\"269\":\"icon-assets-MapExitFullScreenMode\",\"270\":\"icon-assets-MapZoomIn\",\"271\":\"icon-assets-MapZoomOut\",\"272\":\"icon-assets-MediaIconSlideshow\",\"273\":\"icon-assets-MediaIconVideo\",\"274\":\"icon-assets-Message\",\"275\":\"icon-assets-MessageNoFill\",\"276\":\"icon-assets-Messages\",\"277\":\"icon-assets-MicrosoftFullLogo\",\"278\":\"icon-assets-MicrosoftLogo\",\"279\":\"icon-assets-MicrosoftNews\",\"280\":\"icon-assets-MicrosoftNews_FR\",\"281\":\"icon-assets-MicrosoftNews_ZH\",\"282\":\"icon-assets-ModerateRain\",\"283\":\"icon-assets-ModerateRainV2\",\"284\":\"icon-assets-ModerateRainWhite\",\"285\":\"icon-assets-More\",\"286\":\"icon-assets-MoreV2\",\"287\":\"icon-assets-Movie\",\"288\":\"icon-assets-MsnLogo\",\"289\":\"icon-assets-NewsArticle\",\"290\":\"icon-assets-NightTime\",\"291\":\"icon-assets-Notification-Five-Plus-Sign\",\"292\":\"icon-assets-OfferTimer\",\"293\":\"icon-assets-Office\",\"294\":\"icon-assets-OfficeFormsLogo\",\"295\":\"icon-assets-OneDrive\",\"296\":\"icon-assets-OneNote\",\"297\":\"icon-assets-Onetoc\",\"298\":\"icon-assets-Open\",\"299\":\"icon-assets-OpenSquared\",\"300\":\"icon-assets-Outlook\",\"301\":\"icon-assets-PHAdd\",\"302\":\"icon-assets-PHAlert\",\"303\":\"icon-assets-PHArrowRight\",\"304\":\"icon-assets-PHCalendar\",\"305\":\"icon-assets-PHChevronLeft\",\"306\":\"icon-assets-PHChevronRight\",\"307\":\"icon-assets-PHEllipsis\",\"308\":\"icon-assets-PHEmptyTasks\",\"309\":\"icon-assets-PHExcel\",\"310\":\"icon-assets-PHExcelFile\",\"311\":\"icon-assets-PHFavorite\",\"312\":\"icon-assets-PHFavoriteFilled\",\"313\":\"icon-assets-PHFluidFile\",\"314\":\"icon-assets-PHFormFile\",\"315\":\"icon-assets-PHGenericFile\",\"316\":\"icon-assets-PHNoTask\",\"317\":\"icon-assets-PHOneDrive\",\"318\":\"icon-assets-PHOneNote\",\"319\":\"icon-assets-PHOneNoteFile\",\"320\":\"icon-assets-PHOutlook\",\"321\":\"icon-assets-PHPDFFile\",\"322\":\"icon-assets-PHPowerBIFile\",\"323\":\"icon-assets-PHPowerPoint\",\"324\":\"icon-assets-PHPowerPointFile\",\"325\":\"icon-assets-PHProjectFile\",\"326\":\"icon-assets-PHSharePointFile\",\"327\":\"icon-assets-PHSharePointNewsFile\",\"328\":\"icon-assets-PHSharepoint\",\"329\":\"icon-assets-PHStream\",\"330\":\"icon-assets-PHStreamFile\",\"331\":\"icon-assets-PHSwayFile\",\"332\":\"icon-assets-PHToDo\",\"333\":\"icon-assets-PHVideoFile\",\"334\":\"icon-assets-PHVisioFile\",\"335\":\"icon-assets-PHWord\",\"336\":\"icon-assets-PHWordFile\",\"337\":\"icon-assets-PartlyCloudyDay\",\"338\":\"icon-assets-PartlyCloudyDayV2\",\"339\":\"icon-assets-PartlyCloudyDayWhite\",\"340\":\"icon-assets-PartlyCloudyNight\",\"341\":\"icon-assets-PartlyCloudyNightV2\",\"342\":\"icon-assets-PartlyCloudyNightWhite\",\"343\":\"icon-assets-Pdf\",\"344\":\"icon-assets-Pencil\",\"345\":\"icon-assets-People\",\"346\":\"icon-assets-Pin\",\"347\":\"icon-assets-Plus\",\"348\":\"icon-assets-PopoverArrow\",\"349\":\"icon-assets-PowerBI\",\"350\":\"icon-assets-PowerPoint\",\"351\":\"icon-assets-Pptx\",\"352\":\"icon-assets-PresenceAvailable\",\"353\":\"icon-assets-PresenceAway\",\"354\":\"icon-assets-PresenceBusy\",\"355\":\"icon-assets-PresenceOof\",\"356\":\"icon-assets-PresenceOofAvailable\",\"357\":\"icon-assets-PresenceOofBusy\",\"358\":\"icon-assets-PresenceUnknown\",\"359\":\"icon-assets-PriceDrop\",\"360\":\"icon-assets-PriceDropBlue\",\"361\":\"icon-assets-Project\",\"362\":\"icon-assets-Radar\",\"363\":\"icon-assets-RainShowersDay\",\"364\":\"icon-assets-RainShowersDayV2\",\"365\":\"icon-assets-RainShowersDayWhite\",\"366\":\"icon-assets-RainShowersNight\",\"367\":\"icon-assets-RainShowersNightV2\",\"368\":\"icon-assets-RainShowersNightWhite\",\"369\":\"icon-assets-RainSnow\",\"370\":\"icon-assets-RainSnowShowersDay\",\"371\":\"icon-assets-RainSnowShowersDayWhite\",\"372\":\"icon-assets-RainSnowShowersNight\",\"373\":\"icon-assets-RainSnowShowersNightV2\",\"374\":\"icon-assets-RainSnowShowersNightWhite\",\"375\":\"icon-assets-RainSnowV2\",\"376\":\"icon-assets-RainSnowWhite\",\"377\":\"icon-assets-Rating\",\"378\":\"icon-assets-RatingEmpty\",\"379\":\"icon-assets-RatingEmptyDark\",\"380\":\"icon-assets-RatingPartial\",\"381\":\"icon-assets-RatingPartialDark\",\"382\":\"icon-assets-RecommendedEmpty\",\"383\":\"icon-assets-RecommendedError\",\"384\":\"icon-assets-Refresh\",\"385\":\"icon-assets-Remove\",\"386\":\"icon-assets-Save\",\"387\":\"icon-assets-Saved\",\"388\":\"icon-assets-Search\",\"389\":\"icon-assets-SearchV2\",\"390\":\"icon-assets-SetHome\",\"391\":\"icon-assets-Settings\",\"392\":\"icon-assets-SevereWeather\",\"393\":\"icon-assets-Share\",\"394\":\"icon-assets-ShareLight\",\"395\":\"icon-assets-ShareNoFill\",\"396\":\"icon-assets-ShareRoundedCorners\",\"397\":\"icon-assets-Sharepoint\",\"398\":\"icon-assets-Shopping\",\"399\":\"icon-assets-ShoppingDealsDark\",\"400\":\"icon-assets-ShoppingDealsLight\",\"401\":\"icon-assets-Skype\",\"402\":\"icon-assets-SkypeOffice\",\"403\":\"icon-assets-SlugInfo\",\"404\":\"icon-assets-SlugInfoDark\",\"405\":\"icon-assets-SnowShowersDay\",\"406\":\"icon-assets-SnowShowersDayV2\",\"407\":\"icon-assets-SnowShowersDayWhite\",\"408\":\"icon-assets-SnowShowersNight\",\"409\":\"icon-assets-SnowShowersNightV2\",\"410\":\"icon-assets-SnowShowersNightWhite\",\"411\":\"icon-assets-Star\",\"412\":\"icon-assets-StarFill\",\"413\":\"icon-assets-StarFollow\",\"414\":\"icon-assets-StarFollowBlue\",\"415\":\"icon-assets-StarOutline\",\"416\":\"icon-assets-Stars\",\"417\":\"icon-assets-SunnyDay\",\"418\":\"icon-assets-SunnyDayOutline\",\"419\":\"icon-assets-SunnyDayV2\",\"420\":\"icon-assets-SunnyDayWhite\",\"421\":\"icon-assets-Sway\",\"422\":\"icon-assets-SwayApp\",\"423\":\"icon-assets-Teams\",\"424\":\"icon-assets-ThumbDown\",\"425\":\"icon-assets-ThumbDownBlue\",\"426\":\"icon-assets-ThumbUp\",\"427\":\"icon-assets-ThumbUpBlue\",\"428\":\"icon-assets-ThumbUpFill\",\"429\":\"icon-assets-ThumbnailView\",\"430\":\"icon-assets-ThumbsUpAndDown\",\"431\":\"icon-assets-Thunderstorms\",\"432\":\"icon-assets-ThunderstormsV2\",\"433\":\"icon-assets-ThunderstormsWhite\",\"434\":\"icon-assets-TodaysEventsEmpty\",\"435\":\"icon-assets-TodaysEventsError\",\"436\":\"icon-assets-Traffic\",\"437\":\"icon-assets-TrafficCamera\",\"438\":\"icon-assets-Trending\",\"439\":\"icon-assets-Twitter\",\"440\":\"icon-assets-TwitterBlack\",\"441\":\"icon-assets-TwitterNoFill\",\"442\":\"icon-assets-TwitterText\",\"443\":\"icon-assets-Unpin\",\"444\":\"icon-assets-VerticalSeparator\",\"445\":\"icon-assets-Video\",\"446\":\"icon-assets-VideoFallback\",\"447\":\"icon-assets-VideoMediaIcon\",\"448\":\"icon-assets-VideoPlay\",\"449\":\"icon-assets-Visio\",\"450\":\"icon-assets-Vkcom\",\"451\":\"icon-assets-Vsdx\",\"452\":\"icon-assets-WaterDrop\",\"453\":\"icon-assets-WaterDropL2\",\"454\":\"icon-assets-WeatherAQI\",\"455\":\"icon-assets-WeatherAlert\",\"456\":\"icon-assets-WeatherBarometer\",\"457\":\"icon-assets-WeatherCloud\",\"458\":\"icon-assets-WeatherDaylight\",\"459\":\"icon-assets-WeatherDewpoint\",\"460\":\"icon-assets-WeatherExpand\",\"461\":\"icon-assets-WeatherHumidity\",\"462\":\"icon-assets-WeatherIcon\",\"463\":\"icon-assets-WeatherMapPause\",\"464\":\"icon-assets-WeatherMapPlay\",\"465\":\"icon-assets-WeatherPrecipitation\",\"466\":\"icon-assets-WeatherSatellite\",\"467\":\"icon-assets-WeatherSunrise\",\"468\":\"icon-assets-WeatherSunset\",\"469\":\"icon-assets-WeatherTemperature\",\"470\":\"icon-assets-WeatherUv\",\"471\":\"icon-assets-WeatherVisiblity\",\"472\":\"icon-assets-WeatherWildfire\",\"473\":\"icon-assets-WeatherWind\",\"474\":\"icon-assets-WeatherWindDir\",\"475\":\"icon-assets-WeeklyAdsDark\",\"476\":\"icon-assets-WeeklyAdsLight\",\"477\":\"icon-assets-WhatsApp\",\"478\":\"icon-assets-WhatsAppBlack\",\"479\":\"icon-assets-Windy\",\"480\":\"icon-assets-WindyV2\",\"481\":\"icon-assets-WindyWhite\",\"482\":\"icon-assets-Winterstorm\",\"483\":\"icon-assets-Word\",\"484\":\"icon-assets-World\",\"485\":\"icon-assets-Xlsx\",\"486\":\"icon-assets-Yammer\",\"487\":\"icon-coronavirus-icon\",\"488\":\"icon-poll-results\"}[chunkId]||chunkId) + \".\" + {\"85\":\"0b8604ea8cff538e082e\",\"86\":\"2a6ef7766a75f028e601\",\"87\":\"442598a608332359f347\",\"88\":\"8257458575423b0e5b40\",\"89\":\"592dbaa23b250a807c98\",\"90\":\"59bdf3a506ecf6f3f781\",\"91\":\"6ac9ccf7a77cf2bac70e\",\"92\":\"c7ac0a3c638e02b4d6b7\",\"93\":\"c666803a70af8c0c094a\",\"94\":\"d6945872dcdde56bd8fc\",\"95\":\"9eb8f76e930017491b83\",\"96\":\"4b990a6b02441eb3925b\",\"97\":\"65eed4f02b4e6ca5244d\",\"98\":\"c1a15f00f35660a89122\",\"99\":\"5d41ba29d34475a1ca77\",\"100\":\"e25c30185247d7cc5729\",\"101\":\"df47d064da959be6a54a\",\"102\":\"af23f079b7ece35fd08a\",\"103\":\"2fd5f5e2a1f8e1ea673f\",\"104\":\"2fe46b6335a41871f0a7\",\"105\":\"250799b09ffac6eb4c26\",\"106\":\"09fcb13dfd77beb05374\",\"107\":\"15a949c9b772d2ecbc9f\",\"108\":\"e39b48ed9244fc2c94a8\",\"109\":\"639bc7d9b6d8711b3543\",\"110\":\"1c7630c77585c0b06a18\",\"111\":\"4b43195cee84dfc10a9d\",\"112\":\"ce4c11ab366726f7ed5d\",\"113\":\"585b4ecd8109afdf61ea\",\"114\":\"10d0779d152f9aaa74c9\",\"115\":\"6b8ea8b8bb00e5c728d2\",\"116\":\"ec7349121acf6f6d098f\",\"117\":\"a3bb4efbfe7fb6ee127e\",\"118\":\"8a23e6016cc43c789796\",\"119\":\"73fa38e4419fc316ee0f\",\"120\":\"abdb197894a9f29d1921\",\"121\":\"4fc0ddbf3c6eec6a0911\",\"122\":\"0be89d7ccaaeffd206b4\",\"123\":\"4ca9328df65cbfb28248\",\"124\":\"3ac310b3c4f4f2a8558e\",\"125\":\"6bebe5195e13a2cbeb01\",\"126\":\"62eb52671912dba9582d\",\"127\":\"fac7f098cb30a1cad7c1\",\"128\":\"a5cb5bbaeb94e3161aa9\",\"129\":\"d18c0f226d9b94eed343\",\"130\":\"dd9cf39e913bdb3abed3\",\"131\":\"9dc24f528604d8e2d077\",\"132\":\"8489162a205819724419\",\"133\":\"6bc65d00f1a1a893f5e9\",\"134\":\"38c786343141e507619f\",\"135\":\"b3bdb117669593b0ce01\",\"136\":\"1fa6fcdd40f6282ac2d3\",\"137\":\"066b24f57ebc65c86f80\",\"138\":\"e61b5db3ee72019f90ff\",\"139\":\"d79768da53bdb411b1b8\",\"140\":\"75bf196d99a9a635d061\",\"141\":\"c7150e9ffbebf2dc8087\",\"142\":\"27719f3263ae90872b28\",\"143\":\"759347629c88aa87e4f4\",\"144\":\"bdbc517e93d6278007ac\",\"145\":\"6fe86c2701347092d0c6\",\"146\":\"ce8794c3c3ef9e5e0fbe\",\"147\":\"9ec648028e8c012dc2ef\",\"148\":\"26d6286e67aa60cfd132\",\"149\":\"faf114aa5308df5157a7\",\"150\":\"e619d49e761ec4919fc0\",\"151\":\"44080c8a6ab253e49385\",\"152\":\"9c8f01e7b302cf5bfb08\",\"153\":\"459b505ba65828c20fb9\",\"154\":\"f169ae402b957144421f\",\"155\":\"b75ba31cb1a31a8bec1b\",\"156\":\"d3f14ab4df792de2febb\",\"157\":\"685d3936563fa6a18db0\",\"158\":\"5178a7f0068425102283\",\"159\":\"fe844a4881a18e0f2078\",\"160\":\"4d1a950f5834db0e13b5\",\"161\":\"03fd93c184aa7c8553a7\",\"162\":\"561acf36f1085cc2073e\",\"163\":\"511d4cc23a2e110c59be\",\"164\":\"b907364b80e3c49e0636\",\"165\":\"0882c2d1a21bdd170337\",\"166\":\"d7dbdd2ef6f8ca88c444\",\"167\":\"8aaf25c0f9f6e124855e\",\"168\":\"55846f4e9e36c626ced5\",\"169\":\"027cb846b7127f4415de\",\"170\":\"7d60dd82398f678cef1b\",\"171\":\"25e0e9e8ac8a6d000d4a\",\"172\":\"653db228b03e1b6910b6\",\"173\":\"d1e107d97c8d2acc646a\",\"174\":\"0b625b8df9d5e55f0944\",\"175\":\"9bd83062c4ab1c81ee3a\",\"176\":\"4858fd751a90f9de7c9d\",\"177\":\"2304e0b2e06c2473f65c\",\"178\":\"4717809900041f0ae32c\",\"179\":\"91dcd58f44aab85c6c96\",\"180\":\"e785f6ef1418200132a9\",\"181\":\"5efaa54a6ab7c24c1713\",\"182\":\"2a3e7b2e70681011e6f6\",\"183\":\"fd7d641292dd32cfd946\",\"184\":\"5932851902e02ec36816\",\"185\":\"db207ae5f3a6713ec1d4\",\"186\":\"4181c216dbde1285a1d2\",\"187\":\"5161c5492d75a35c8c01\",\"188\":\"92a06e34058499a39d20\",\"189\":\"2b472a5471968590a3ef\",\"190\":\"d6bf4333958aad3f92f9\",\"191\":\"3e83f602a154e98ab921\",\"192\":\"7f12954f3fd69210ef62\",\"193\":\"28d721744b1969bfce80\",\"194\":\"8a61b848ee39275e6f7c\",\"195\":\"9a93630e020a0e1d407c\",\"196\":\"51a4202dc9ddccf5c38d\",\"197\":\"9e819cd69479f5cdc96a\",\"198\":\"2897e3f1b38184e2f12c\",\"199\":\"379779b631d99d40cacf\",\"200\":\"94932f7b17d667ff6285\",\"201\":\"f4e80d2cce401f2a1e64\",\"202\":\"46a6f0a07d38fd891d76\",\"203\":\"212b80505450e207ce82\",\"204\":\"284e1242b60352ed3c2e\",\"205\":\"79fce5946e7fe0648435\",\"206\":\"b6e020a021e673dfa738\",\"207\":\"fc6cd9b36d743a1c85e9\",\"208\":\"aa8bbf287fe7ba06715a\",\"209\":\"60402ca25eabe7ace9c9\",\"210\":\"de48c08214beeb9330db\",\"211\":\"6439965c6d50c9476cf4\",\"212\":\"100945816c0a1612129f\",\"213\":\"8bb56a3919af1d950638\",\"214\":\"ad925e292b30d66197ed\",\"215\":\"007919118fdb952ac0c5\",\"216\":\"2d4ecee97a5f6dd2b561\",\"217\":\"ad85b01a3cf4e200f2b5\",\"218\":\"f6566091520750d25cf1\",\"219\":\"a85c4dc1e10559fd8b88\",\"220\":\"0360384e58153c488334\",\"221\":\"02e3c0c07e897d5544d8\",\"222\":\"85f334ba325652794026\",\"223\":\"7a2a55f90d4620c4477a\",\"224\":\"225c1f7fee8d84878a8e\",\"225\":\"b7cba5183c6e52f35ce5\",\"226\":\"860bdb6b3f80e7296fc9\",\"227\":\"7cf9036c37839f56b18a\",\"228\":\"dc79c7b598ab0a13224b\",\"229\":\"97fd97c805141784da33\",\"230\":\"a97a34d98306f32364e9\",\"231\":\"0aef80cc695fb9985102\",\"232\":\"d5428accd29f0f113da3\",\"233\":\"83752d21f58af0653e64\",\"234\":\"e939b2cd3066f99619ed\",\"235\":\"2f164b28c2c5e7958a4b\",\"236\":\"d2d4cc96887fa235a46b\",\"237\":\"1cad7d8073165b3b6f51\",\"238\":\"8e5e31d6754bdec6c533\",\"239\":\"7b799cf4f69d97c49a25\",\"240\":\"d6dbc703dd6baea16049\",\"241\":\"a7423d556ccf127dee79\",\"242\":\"63d7839675117c60f7c5\",\"243\":\"9d02ec30d7175d318554\",\"244\":\"6b88506572f1273ce3b5\",\"245\":\"4ef8abca1aee223f2768\",\"246\":\"f719be10d6c22e36ff75\",\"247\":\"f6fc212c24d05f65a92f\",\"248\":\"1ea7a3a0958dd6cd365e\",\"249\":\"fcf39111051cad43d0d9\",\"250\":\"f3ce7eee1a021c5d8c13\",\"251\":\"41788e68ef1b8803cc11\",\"252\":\"03b6be75699b5a693ea4\",\"253\":\"7b281a78b7734ac10390\",\"254\":\"94b3da283c3c3fabb811\",\"255\":\"8d4c784071b132e6f8e1\",\"256\":\"effa5c5914464301b8c7\",\"257\":\"0c1debf73489378b3ee0\",\"258\":\"d28f95d7356657578303\",\"259\":\"82095cf41bd0a68c4620\",\"260\":\"43a946e158e2d1bc0d9e\",\"261\":\"86caa82ef6a01e22584a\",\"262\":\"abd9b11513a7d942586c\",\"263\":\"79e88f43036880e77d77\",\"264\":\"adf36112242ea9e6088f\",\"265\":\"ecc42c61098354b23403\",\"266\":\"783cc86bd3c228f11974\",\"267\":\"fbf1509be919a4b169a5\",\"268\":\"19e19a9096cad6729d9e\",\"269\":\"a356c2ebc193b24c639c\",\"270\":\"f9fa30440457b8567694\",\"271\":\"1b529cbac901c5677e44\",\"272\":\"7ea4ec6291fc33fc105f\",\"273\":\"c0469baa2bf58e5938b2\",\"274\":\"7dd97ce6e3b79bc9ac3d\",\"275\":\"fa92d8f7a11419de371c\",\"276\":\"4ded61a65b6eae3161cf\",\"277\":\"f07a1b25305dabbcda80\",\"278\":\"cf7ccc6f5af9e4ad1217\",\"279\":\"061bf05552661e7211fc\",\"280\":\"e59688bbc0f98be17f22\",\"281\":\"372a9878aae57faf839b\",\"282\":\"c50e36cba65ad5931146\",\"283\":\"06a4bf7872bccbfa3457\",\"284\":\"38a568fae218edf844aa\",\"285\":\"ca876f9bd42ee3b3b7ad\",\"286\":\"15b4398e34468f5e8ae7\",\"287\":\"7dd2d2bd569762bc7813\",\"288\":\"bc9396e20b126765995f\",\"289\":\"1a822d5581f1bc0bba03\",\"290\":\"8692c47dc498d30f27c4\",\"291\":\"3fca4c45ab9e1e88f7da\",\"292\":\"51e7038be9c7c1cf194e\",\"293\":\"082b243667a8a736f264\",\"294\":\"7019e54b1cd38176105a\",\"295\":\"19c9f7c79f32b7fdfe5b\",\"296\":\"4147666ec1dae2164da0\",\"297\":\"691d751e0246c740eb3c\",\"298\":\"83e19d44270688d18bb6\",\"299\":\"b1920a9a9d1d28526967\",\"300\":\"acc2f11c2d8beef15e1b\",\"301\":\"0a14eff5fa5a7220bff0\",\"302\":\"d69cff2b89a4db831cc9\",\"303\":\"898af5dbf3e82a88d728\",\"304\":\"87f083099a393794fef6\",\"305\":\"d3da400f1a72dcdda916\",\"306\":\"a9c915e45ae41c1ebce3\",\"307\":\"23328ae8d6d158bb3519\",\"308\":\"fb6f8d66884860fbaf18\",\"309\":\"8a3b623a1a4e9fa5168d\",\"310\":\"3a8bb02936ee010d7b95\",\"311\":\"cf1e73e3be8f066bf2ef\",\"312\":\"1d36f4eb16ec982ab1ea\",\"313\":\"11a02191260db500530d\",\"314\":\"66edd86dd6cf2a7913b3\",\"315\":\"c17386fa6dae499965fa\",\"316\":\"9744dd4a908e54ce93ff\",\"317\":\"b3a18e766a68608e37fb\",\"318\":\"87a9513f4972edc36057\",\"319\":\"21188d7fb4bfc51c5f0e\",\"320\":\"fdd06e8a07b3917a04c1\",\"321\":\"c9071fac285b50ccca75\",\"322\":\"3e419ef9150d9970e52c\",\"323\":\"e6bb23bea121f42a9e18\",\"324\":\"7b1efa78eab2d6b08d10\",\"325\":\"1a4fff2c00ef76638a5d\",\"326\":\"d6a12b9ece9fd26dffe2\",\"327\":\"5c71b450e9b951fc8d14\",\"328\":\"2011288d522c14a14939\",\"329\":\"f87f591f1e59097f76a1\",\"330\":\"ae6a014ca8a45b4d0606\",\"331\":\"137d2d33dcb9d9b4f9e1\",\"332\":\"8eab6f65271fb14ff276\",\"333\":\"5a2cbae9e45fb597af5d\",\"334\":\"3f1a48559c1cdb54ca08\",\"335\":\"42c8e12046d4e3bb9211\",\"336\":\"7115c55b700b1e0a84ae\",\"337\":\"24b4854115cf86839fb5\",\"338\":\"14c64b39e695f4ce9341\",\"339\":\"9cc19673ef1cc8556918\",\"340\":\"59fbc6801520a6b9b76c\",\"341\":\"39c20ad15d11fd1826e9\",\"342\":\"c86b3e20abf0cab02e58\",\"343\":\"98526c5892e15fc084ee\",\"344\":\"54bdb4ced0b71c839161\",\"345\":\"33d174b2c74082906804\",\"346\":\"72feaf6d43e1affcf85b\",\"347\":\"2254af03ffc99e7369f4\",\"348\":\"951d78f9480fe87e5d18\",\"349\":\"20d7e7c2c3e3c6e279aa\",\"350\":\"5d565c87ea4c7eaf156b\",\"351\":\"c5df62ff460ba055203f\",\"352\":\"4758c9a1bea0f0975d04\",\"353\":\"3633cd980122dac53a8d\",\"354\":\"2463f8c9a7f7180f0a68\",\"355\":\"333a2807dda67276740e\",\"356\":\"326483dea0db27448b9a\",\"357\":\"61d17dc7c89b7f1ca9ac\",\"358\":\"75736922740dfc6cd9be\",\"359\":\"64a2df244130437223a1\",\"360\":\"2f690a1a14f049ae9cfc\",\"361\":\"39aaf05babc123c78a91\",\"362\":\"c3419310adc163706d30\",\"363\":\"8e2681c927582f536979\",\"364\":\"fe10c2a5ebea4052f024\",\"365\":\"e7d79d9e7fbfc752c7c3\",\"366\":\"a76c6cd4f2af49ae5238\",\"367\":\"e88b4cb2d1705e4dd1b9\",\"368\":\"2d7ab0b99869a4a42124\",\"369\":\"f399f02ecd88bbe3c19f\",\"370\":\"8d895fa59302cc1d4df6\",\"371\":\"a68db54fc5c63fd1126f\",\"372\":\"99beac598624c74b3205\",\"373\":\"3bea38d2f373eed943cb\",\"374\":\"6f697b45b659d7af48c5\",\"375\":\"f922ac1ac02b1455a2d9\",\"376\":\"efd5e68438b4ea089259\",\"377\":\"ea70e51c1bbbb90daa2f\",\"378\":\"273ba6b786c8f19fdbf5\",\"379\":\"171fc74be68a162b8633\",\"380\":\"aa0f82afcc0a34a28d30\",\"381\":\"c436d89a57151c15571b\",\"382\":\"e563936e0b7b7e230c29\",\"383\":\"bfdf6172890efd2c5760\",\"384\":\"d4a8bcfbe86674a88b4a\",\"385\":\"1499ab3e12cf43f1b052\",\"386\":\"7c8ae7b130e1b0d80826\",\"387\":\"4e035d0485ce6daa99f7\",\"388\":\"1bf2a3b79dd78abaf1af\",\"389\":\"2284bdcb68cff2823281\",\"390\":\"f9989187961dc8735f7b\",\"391\":\"54139d9d9f46058b3ac1\",\"392\":\"a041b6a40b1152d2cd29\",\"393\":\"7058d4aa33fe8281e0f8\",\"394\":\"ef0c9f6e0a06e2f2413b\",\"395\":\"d9724d5be1a2ae26541e\",\"396\":\"f1fd7199eef6321fda84\",\"397\":\"00fbe636144a1bfbcf44\",\"398\":\"24e79570d8e7daac9c95\",\"399\":\"6bfbc43ac27292618e3b\",\"400\":\"0004639bc5314656709b\",\"401\":\"acf360b2bb1e25dfa06d\",\"402\":\"a26a66c0eeedfad72cda\",\"403\":\"e02f0a8bf26489a52f9c\",\"404\":\"fa76d3dfdceb418aa645\",\"405\":\"2e65c2ac6e335e407d98\",\"406\":\"d594fe5fd642eab5d38d\",\"407\":\"2194613769926ff6442c\",\"408\":\"a3349f286c18e0ea8396\",\"409\":\"094fedd13cc76d168a31\",\"410\":\"4cc6a72f06735e252d7a\",\"411\":\"a8c72c1a2d7903edf53f\",\"412\":\"f518d68819e3c4915c3f\",\"413\":\"d626322365e397cc541a\",\"414\":\"c8bedd164b425d197e30\",\"415\":\"4be7a4cdf2766f761f72\",\"416\":\"f8f951687f34a4f7fb9c\",\"417\":\"abeef0dcf085bcdba48c\",\"418\":\"6ae752e0081f0e847416\",\"419\":\"db1b7bedc4d51979bb5c\",\"420\":\"07e062d6305fd29871f1\",\"421\":\"7f40914f25deb1888cfd\",\"422\":\"72ea253dd4cde9c4803c\",\"423\":\"6170153aef1c7dab02ce\",\"424\":\"c6a32164db0769993556\",\"425\":\"05edfc8719a78bc71148\",\"426\":\"bcb57f23c6d49b193f01\",\"427\":\"d52e6f0e5941b2115365\",\"428\":\"5f555af983aa08cbcd09\",\"429\":\"b95acc3c3743e4c9c496\",\"430\":\"9d0b7a5d77d6fef33929\",\"431\":\"f89cab875d570a31cf39\",\"432\":\"d1a40cfcc996498aaf74\",\"433\":\"c68c731a53fe29014d40\",\"434\":\"9f72afd28b74b84d15f1\",\"435\":\"424fb58ee4feaca92035\",\"436\":\"6e8c08f84cb588fce098\",\"437\":\"0dcb1226e9463db4c07d\",\"438\":\"12518adf3774a6879bf5\",\"439\":\"dedac7f9844cde6d5650\",\"440\":\"8cf281609ec13689c96b\",\"441\":\"0066f2718a862fa326b1\",\"442\":\"6f45e1c995f9e1d5e832\",\"443\":\"01713e190952e5a9ef36\",\"444\":\"ae4c8cbc8b30df28d49a\",\"445\":\"1a7f9e220273a792235b\",\"446\":\"1daf7a25bc9ec0d46078\",\"447\":\"0374276a8d9c36c57b42\",\"448\":\"871e87f6845d98f8048d\",\"449\":\"ab73039560713ed8d08a\",\"450\":\"8b93f27b2d032d6adb9e\",\"451\":\"a36327227aefe62abc0b\",\"452\":\"e10ae6289feab9a74606\",\"453\":\"d2a95ff3e5a2e9c98b6c\",\"454\":\"1c9f673e271cea9096c3\",\"455\":\"6c4c8ed290dd4ff579f9\",\"456\":\"dc770c8bb20d5cd5195c\",\"457\":\"4a005d664ce55a79fe78\",\"458\":\"027287aa51448f90e142\",\"459\":\"a0f4035bd68062cfbe96\",\"460\":\"56481ffffa0615749954\",\"461\":\"f1c6acb906bc08e3491a\",\"462\":\"20e3d59b83194c77b49a\",\"463\":\"0f2c8c20dc47ac3240b8\",\"464\":\"80dfd92b9963dda4e00e\",\"465\":\"a84b397f901147fe9d52\",\"466\":\"371daefe89c26c536060\",\"467\":\"83512be46cfa042802e4\",\"468\":\"b4ab44acdf7899fc94d5\",\"469\":\"3b98f9806e2353186ce8\",\"470\":\"27ac1fbd603a35a6cf54\",\"471\":\"ffa3295776a3569c6588\",\"472\":\"f32e61ddd6c5823d833f\",\"473\":\"104f90d231b2d6e70428\",\"474\":\"64b0fb75010126fff5bf\",\"475\":\"5087a31e3b6b437415f7\",\"476\":\"b085d0f3fca97b323c5f\",\"477\":\"0c630e17e4dab74fe679\",\"478\":\"f8001998f864a64b495a\",\"479\":\"1a5a43409d087c65a884\",\"480\":\"48bbc6b00069de461ff4\",\"481\":\"ac0ef4a23e720876a114\",\"482\":\"aac1b240cfdc509b07e1\",\"483\":\"930b56617ae32f6ac5f3\",\"484\":\"1762564a6960495e82b6\",\"485\":\"c4f9d2cd3f176f517689\",\"486\":\"8be0e0316b963684ee58\",\"487\":\"e411e945f359fdd87168\",\"488\":\"13237cbd42b0b51ac8b7\",\"513\":\"fc1403c8eff84d829ba8\"}[chunkId] + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/bundles/v1/hybrid/buildNumber/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1825,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","// © Microsoft Corporation. All rights reserved.\r\nexport * from \"./appError-contracts\";\r\nexport * from \"./resolver-contracts\";\r\nexport * from \"./service-contracts\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport getPlaceholderStringAsArray from \"./string-manipulation/PlaceholderReplacement\";\r\n\r\nexport * from \"./app\";\r\nexport * from \"./bundles\";\r\nexport * from \"./config\";\r\nexport * from \"./constants\";\r\nexport * from \"./current-search-params/CurrentSearchParams\";\r\nexport * from \"./delay-promise/DelayPromise\";\r\nexport * from \"./flyout-coordination/FlyoutCoordination\";\r\nexport * from \"./image-url-generator/ImageUrlGenerator\";\r\nexport * from \"./inspector\";\r\nexport * from \"./keyboard-tracker/KeyboardTracker\";\r\nexport * from \"./services\";\r\nexport * from \"./smooth-scroll/SmoothScroll\";\r\nexport * from \"./telemetry-base\";\r\nexport * from \"./types\";\r\nexport * from \"./utilities\";\r\nexport * from \"./public-path\";\r\nexport * from \"./cache\";\r\nexport * from \"./request\";\r\nexport * from \"./webstorage\";\r\nexport * from \"./web-worker-init\";\r\nexport {\r\n getPlaceholderStringAsArray\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport PageBase from \"./pages\";\r\n\r\nexport { PageBase };\r\n\r\nexport * from \"./actions\";\r\nexport * from \"./connectors\";\r\nexport * from \"./pages\";\r\nexport * from \"./reducers\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n// Split from DOMHelper to aid treeshaking\r\n// which currently adds class definition dependency (eg. RequestData)\r\n// even if they aren't used by code that only uses canUseDOM\r\n//\r\n// This being used in PCS inline scripts so only add to here\r\n// if critically important and do not have any other dependencies;\r\n// otherwise add to DOMHelpers\r\n\r\n/**\r\n * Checks if the DOM is available to access and use.\r\n * @returns {boolean} - true if DOM is available, or false if it is not. This is typically true for\r\n * client side rendering and false for server side rendering.\r\n */\r\nexport function canUseDOM(): boolean {\r\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\nexport * from \"./telemetry-contracts\";\r\nexport * from \"./telemetry-interfaces\";\r\nexport * from \"./telemetry-types\";\r\nexport * from \"./telemetry-statics\";\r\nexport * from \"./version\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Enum for different browser types\r\n * @enum\r\n */\r\nexport enum BrowserType {\r\n EdgeChromium = \"edgeChromium\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { canUseDOM, getDocumentElementsByTagName, getLocationSearch, getLocationHostname } from \"@msnews/isomorphic-util\";\r\nimport { applicationCacheConstants, clientSettings, dir, htmlElementIds, info, js, lang, pagetypeSettings, CoreLocalStorageKeys } from \"../constants\";\r\n\r\nimport { IClientSettings } from \"./ClientSettings\";\r\nimport { AudienceModeType, BrowserType } from \"@msnews/experiences-constants\";\r\nimport { WebClientData } from \"../types/WebClientData\";\r\nimport { UrlUtility } from \"../utilities/UrlUtility\";\r\nimport { getLocalStorage } from \"../webstorage\";\r\nimport { tryParseJson } from \"../utilities/Parsing\";\r\nimport { KeyValueArray } from \"../utilities\";\r\nimport { logger, updateAppErrorsPropertyBag } from \"@msnews/diagnostics\";\r\nimport { parseISO } from \"date-fns\";\r\nimport { getStoredHeadData, setStoredHeadData, HeadDataResponse } from \"./StoredHeadData\";\r\nimport { eNtpChromiumVersion } from \"./Enterprise\";\r\n\r\n/**\r\n * Format used for activity ID stored in storage\r\n */\r\nexport type StoredActivityId = {\r\n /**\r\n * ID value\r\n */\r\n id: string;\r\n\r\n /**\r\n * Timestamp of when value was stored\r\n */\r\n ts: number;\r\n};\r\n\r\nexport const MmxWwwContentFlightId = \"prg-mmxcontent-t\";\r\n\r\n/** Type for storing app versions for different page types */\r\nexport type PageAppVersions = { [pageType: string]: string };\r\n\r\n/**\r\n * Class for getting the head data information.\r\n */\r\nclass HeadData {\r\n /**\r\n * The single instance of the HeadData class.\r\n * @type {HeadData}\r\n */\r\n private static _instance: HeadData;\r\n\r\n private anonCookieName: string;\r\n private locale: string;\r\n private marketDir: string;\r\n private currentFlights: string;\r\n private clientSettings: IClientSettings;\r\n private enableCMSPPEConfigs = false;\r\n private userIsSignedIn: boolean; // Always signed out on server side: https://dev.azure.com/microsoft/OS/_workitems/edit/25344027\r\n private isPreload: boolean;\r\n private isPrerender: boolean;\r\n private headElement: any;\r\n private htmlElement: any;\r\n private applicationCache: any;\r\n private isAppcache: boolean;\r\n private isBlendedEnterprise: boolean;\r\n private isMmxWwwContentRequest: boolean;\r\n private isServiceWorkerCache: boolean;\r\n private ssoComplete: boolean;\r\n private aadState: boolean;\r\n private locationSearch: string;\r\n private lastKnownAppVersion: string;\r\n\r\n // TODO: Task 24890741: refactor this class to use the current singleton pattern with ES6 modules\r\n // This will also clean up these getters/setters\r\n public get Locale(): string { return this.locale; }\r\n\r\n public get MarketDir(): string { return this.marketDir; }\r\n public set MarketDir(value: string) { this.marketDir = value; }\r\n\r\n public get CurrentFlights(): string { return this.currentFlights || \"\"; }\r\n public set CurrentFlights(value: string) { this.currentFlights = value; }\r\n\r\n public get ClientSettings(): IClientSettings { return this.clientSettings; }\r\n public set ClientSettings(value: IClientSettings) { this.clientSettings = value; }\r\n\r\n public get EnableCMSPPEConfigs(): boolean { return this.enableCMSPPEConfigs; }\r\n\r\n public get UserIsSignedIn(): boolean { return this.userIsSignedIn; }\r\n public set UserIsSignedIn(value: boolean) { this.userIsSignedIn = value; }\r\n\r\n public get IsPreload(): boolean { return this.isPreload; }\r\n public set IsPreload(value: boolean) { this.isPreload = value; }\r\n\r\n public get IsPrerender(): boolean { return this.isPrerender; }\r\n public set IsPrerender(value: boolean) { this.isPrerender = value; }\r\n\r\n public get IsAppCache(): boolean { return this.isAppcache; }\r\n\r\n public get IsBlendedEnterprise(): boolean { return this.isBlendedEnterprise; }\r\n public set IsBlendedEnterprise(value: boolean) { this.isBlendedEnterprise = value; }\r\n\r\n public get IsMmxWwwContentRequest(): boolean { return this.isMmxWwwContentRequest; }\r\n public set IsMmxWwwContentRequest(value: boolean) { this.isMmxWwwContentRequest = value; }\r\n\r\n public get IsServiceWorkerCache(): boolean { return this.isServiceWorkerCache; }\r\n\r\n /**\r\n * The last known app version for the currently loaded page type.\r\n * To get the current page version, use clientSettings.bundleInfo.v value.\r\n */\r\n public get LastKnownAppVersion(): string { return this.lastKnownAppVersion; }\r\n\r\n // TODO: Dependencies that some client side code expects headData to specify but doesn't due to PCS\r\n public get AnonCookieName(): string { return this.anonCookieName; }\r\n public set AnonCookieName(value: string) { this.anonCookieName = value; }\r\n\r\n public get SsoComplete(): boolean { return this.ssoComplete; }\r\n\r\n public get AadState(): boolean { return this.aadState; }\r\n public set AadState(value: boolean) { this.aadState = value; }\r\n\r\n public set LocaleName(value: string) { this.locale = value; }\r\n\r\n /**\r\n * True if we need to generate a new RID for telemetry.\r\n * In normal scenarios the ActivityID and telemetry RID will match. But sometimes we are unable to refresh the head data\r\n * to get a new activity ID. In those cases we need to generate a fresh RID for telemetry, and the ActivityID and RID will\r\n * not match.\r\n */\r\n public newRidNeeded: boolean;\r\n\r\n /**\r\n * Initialize the head data instance, on server side provide the client info & client settings\r\n * @param {WebClientData} clientData Data object containing both client info and settings\r\n */\r\n private constructor(clientData?: WebClientData) {\r\n this.initializeHeadData(clientData);\r\n }\r\n\r\n /**\r\n * Returns singleton class instance.\r\n * @returns {HeadData}\r\n */\r\n public static getInstance(): HeadData { return HeadData._instance || (HeadData._instance = new HeadData()); }\r\n\r\n /**\r\n * Reset singleton class instance with passed in info and client settings. Used on server side to reset HeadData for each request.\r\n * @param {WebClientData} clientData Data object containing both client info and settings\r\n * @returns {HeadData}\r\n */\r\n public static resetInstance(clientData?: WebClientData): HeadData {\r\n HeadData._instance = new HeadData(clientData);\r\n headData = HeadData._instance;\r\n return HeadData._instance;\r\n }\r\n\r\n /**\r\n * Initializes head data. If WebClientData is provided use that, otherwise do client side initialization.\r\n * @param {WebClientData} clientData - Data object containing both client info and settings\r\n */\r\n public initializeHeadData(clientData?: WebClientData): void {\r\n if (clientData) {\r\n // Data is passed in only from Render Service under Node.JS environment since there is no DOM.\r\n this.initializeFromData(clientData);\r\n return;\r\n }\r\n\r\n this.newRidNeeded = undefined;\r\n this.lastUsedActivityIdBacking = undefined;\r\n this.locationSearch = getLocationSearch();\r\n this.htmlElement = canUseDOM() ? getDocumentElementsByTagName(htmlElementIds.html)[0] : null;\r\n this.headElement = canUseDOM() ? getDocumentElementsByTagName(htmlElementIds.head)[0] : null;\r\n this.applicationCache = canUseDOM() ? window.applicationCache : null;\r\n\r\n if (!this.htmlElement || !this.headElement) {\r\n return;\r\n }\r\n\r\n // We always initialize from DOM first because\r\n // even if we are in an appcache/service worker case, we still need some data from the DOM\r\n // and we will fallback to DOM if there are no items found in storage\r\n this.initializeFromDom();\r\n\r\n // Attempt to override with local storage item when in appcache scenario\r\n // In service worker scenario, just update the storage activity id\r\n if (this.applicationCache && this.htmlElement.getAttribute(applicationCacheConstants.manifestAttributeName)) {\r\n this.isAppcache = true;\r\n } else if (window && window.navigator && window.navigator.serviceWorker && window.navigator.serviceWorker.controller) {\r\n this.isServiceWorkerCache = true;\r\n }\r\n\r\n if (this.isAppcache || this.isServiceWorkerCache) {\r\n // First apply head data from local storage. This might change the AID\r\n this.initializeFromStorage();\r\n\r\n // Now update last used activity ID based on the current activity ID\r\n this.initializeLastUsedActivityId();\r\n }\r\n\r\n // Below items are common for both scenarios\r\n const clientSettingsLocaleExists = this.clientSettings && this.clientSettings.locale && this.clientSettings.locale.language && this.clientSettings.locale.market;\r\n this.locale = clientSettingsLocaleExists &&\r\n (\r\n this.clientSettings.locale.language\r\n + \"-\"\r\n + (this.clientSettings.locale.script ? this.clientSettings.locale.script + \"-\" : \"\")\r\n + this.clientSettings.locale.market\r\n ).toLowerCase() || \"\";\r\n\r\n const marketDir = this.htmlElement.getAttribute(dir);\r\n this.marketDir = marketDir && marketDir.toLocaleLowerCase() || \"\";\r\n\r\n this.setQueryItemProvidedValues();\r\n\r\n // Note: This isn't currently being stamped by PCS\r\n const headDataJs = this.headElement.getAttribute(js);\r\n if (headDataJs) {\r\n const headJs = <{ anonckname: string, signedin: number }>tryParseJson(headDataJs);\r\n this.anonCookieName = headJs.anonckname;\r\n this.userIsSignedIn = headJs.signedin === 1;\r\n }\r\n\r\n // Checks if current request is background preload\r\n if (UrlUtility.getQueryParameterByName(\"backgroundpreload\", this.locationSearch)\r\n && document.visibilityState === \"hidden\") {\r\n this.isPreload = true;\r\n this.logDocumentVisibility();\r\n }\r\n\r\n // Checks if current request is prerender request\r\n if (UrlUtility.getQueryParameterByName(\"prerender\", this.locationSearch)\r\n && document.visibilityState === \"hidden\") {\r\n this.isPrerender = true;\r\n this.logDocumentVisibility();\r\n }\r\n\r\n // Determine if we are in Enterprise version or not\r\n this.setIsBlendedEnterprise();\r\n this.setIsMmxWwwContentRequest();\r\n }\r\n\r\n private lastUsedActivityIdBacking: StoredActivityId;\r\n\r\n /**\r\n * Gets the last used activity ID, or null if there is none stored.\r\n */\r\n public get lastUsedActivityId(): StoredActivityId {\r\n if (this.lastUsedActivityIdBacking) {\r\n return this.lastUsedActivityIdBacking;\r\n }\r\n\r\n const storageKey: string = this.getStoredActivityIdKey();\r\n const storedActivityIdJson: string = getLocalStorage().getItem(storageKey);\r\n if (storedActivityIdJson) {\r\n this.lastUsedActivityIdBacking = tryParseJson(storedActivityIdJson);\r\n }\r\n\r\n return this.lastUsedActivityIdBacking;\r\n }\r\n\r\n /**\r\n * Sets the last used activity ID. Pass in null to clear the stored data.\r\n */\r\n public set lastUsedActivityId(activityId: StoredActivityId) {\r\n const storageKey: string = this.getStoredActivityIdKey();\r\n if (activityId) {\r\n if (activityId.id && activityId.ts) {\r\n getLocalStorage().setItem(storageKey, JSON.stringify(activityId));\r\n this.lastUsedActivityIdBacking = activityId;\r\n }\r\n } else {\r\n getLocalStorage().removeItem(storageKey);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the stored head data, or null if none is stored.\r\n */\r\n public get storedHeadData(): HeadDataResponse {\r\n return getStoredHeadData(this.clientSettings.pagetype);\r\n }\r\n\r\n /**\r\n * Sets the stored head data. Pass in null to clear the stored data.\r\n */\r\n public set storedHeadData(headDataResponse: HeadDataResponse) {\r\n setStoredHeadData(this.clientSettings.pagetype, headDataResponse);\r\n }\r\n\r\n /**\r\n * Initializes the client settings and info from client data passed in externally (render service query param)\r\n * @param {WebClientData} clientData Data object containing both client info and settings\r\n */\r\n private initializeFromData(clientData: WebClientData): void {\r\n this.clientSettings = clientData.clientSettings;\r\n\r\n this.setFlights(clientData.clientInfo);\r\n\r\n this.setQueryItemProvidedValues();\r\n\r\n const clientSettingsLocaleExists = this.clientSettings && this.clientSettings.locale && this.clientSettings.locale.language && this.clientSettings.locale.market;\r\n this.locale = clientSettingsLocaleExists &&\r\n (\r\n this.clientSettings.locale.language\r\n + \"-\"\r\n + (this.clientSettings.locale.script ? this.clientSettings.locale.script + \"-\" : \"\")\r\n + this.clientSettings.locale.market\r\n ).toLowerCase() || \"\";\r\n this.marketDir = clientData.marketDir && clientData.marketDir.toLocaleLowerCase() || \"\";\r\n\r\n // Determine if we are in Enterprise version or not\r\n this.setIsBlendedEnterprise();\r\n this.setIsMmxWwwContentRequest();\r\n }\r\n\r\n /**\r\n * Initializes the client settings and info from DOM element\r\n */\r\n private initializeFromDom(): void {\r\n\r\n this.setFlights(this.headElement.getAttribute(info));\r\n\r\n const dataClientSettings = this.headElement.getAttribute(clientSettings);\r\n if (!dataClientSettings) {\r\n return;\r\n }\r\n\r\n this.clientSettings = tryParseJson(dataClientSettings);\r\n if (!this.clientSettings) {\r\n return;\r\n }\r\n\r\n this.calculateForwardableParams();\r\n const { pagetype } = this.clientSettings;\r\n\r\n // If clientSettings.pagetype does not exist, try getting from data-pagetype.\r\n // For Peregrine full spa page: pagetype is part of data-client-settings. There is no data-pagetype.\r\n // For Prime/Hybrid, pagetype is outside of data-client-settings and it belongs to data-pagetype\r\n if (!pagetype) {\r\n const pageTypeFromSettings = this.headElement.getAttribute(pagetypeSettings);\r\n this.clientSettings.pagetype = pageTypeFromSettings == null ? undefined : pageTypeFromSettings;\r\n }\r\n\r\n // try to get the previously store page version from local storage for this page type,\r\n // and store back the current version\r\n if (pagetype) {\r\n try {\r\n const storedVersions = getLocalStorage().getObject(CoreLocalStorageKeys.pageVersions) || {};\r\n this.lastKnownAppVersion = storedVersions[pagetype];\r\n\r\n // update the dictionary with the new value if different, and store it back to local storage\r\n const { bundleInfo: currentDomVersion } = this.clientSettings;\r\n if (currentDomVersion && this.lastKnownAppVersion !== currentDomVersion) {\r\n storedVersions[pagetype] = currentDomVersion.v;\r\n getLocalStorage().setObject(CoreLocalStorageKeys.pageVersions, storedVersions);\r\n }\r\n } catch {\r\n logger.log(`${this.logPrefix()} couldn't complete local storage related operation.`);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Initializes headData client settings and info from the value found in storage\r\n * and if none is found, falls back to using the DOM element\r\n */\r\n private initializeFromStorage(): void {\r\n const currentPageStoredHeadData = this.storedHeadData;\r\n\r\n if (currentPageStoredHeadData) {\r\n this.populateFromApiResponse(currentPageStoredHeadData);\r\n }\r\n }\r\n\r\n /**\r\n * Populates fields based on a HeadData API response.\r\n * @param response The response to populate from.\r\n */\r\n private populateFromApiResponse(response: HeadDataResponse) {\r\n if (!response) {\r\n return;\r\n }\r\n\r\n const responseClientSettings = response.clientSettings;\r\n const responseFlights = response.info;\r\n\r\n // The stored head data is corrupt, bail\r\n if (!responseClientSettings || !responseFlights) {\r\n return;\r\n }\r\n\r\n // If DOM page gen time is later than response page gen time, bail. We don't want to load stale head data from storage.\r\n if (this.clientSettings.pageGenTime >= responseClientSettings.pageGenTime) {\r\n // Purge obsolete stored head data.\r\n this.storedHeadData = null;\r\n return;\r\n }\r\n\r\n // Hold on to the current DOM queryparams as we will need to override\r\n // what we get from what is in storage\r\n const domQueryParams = this.clientSettings.queryparams;\r\n\r\n // save the current version if available in a temp variable so we can\r\n // restore it back after updating the clientSettings object with the one from\r\n // storage (which came from head data API, which does not contain the version info\r\n // by design, because version is tied with the static bundles, which should represent the currently\r\n // loaded page.\r\n const currentPageVersion = this.clientSettings && this.clientSettings.bundleInfo && this.clientSettings.bundleInfo.v;\r\n this.clientSettings = responseClientSettings;\r\n\r\n // restore the version after the object update\r\n this.clientSettings.bundleInfo = Object.assign(this.clientSettings.bundleInfo || {}, { v: currentPageVersion });\r\n\r\n // restore the queryParams base on what is found in DOM\r\n // as we want the DOM value to be what is used\r\n // and not what is found in storage for this field\r\n // We want these to stay true to what PCS generated for the page\r\n // and avoid desync when reading what comes from future headData API calls.\r\n this.clientSettings.queryparams = domQueryParams;\r\n this.calculateForwardableParams();\r\n\r\n this.setFlights(responseFlights);\r\n }\r\n\r\n /**\r\n * Initializes the queryparams from parameters\r\n */\r\n private calculateForwardableParams() {\r\n const params = this.clientSettings ? this.clientSettings.queryparams : \"\";\r\n if (!params) {\r\n return;\r\n }\r\n const forwardableParams = [\"fdhead\", \"item\"];\r\n const lowerCaseParams = params.toLocaleLowerCase();\r\n const availableParams = forwardableParams.map((key) => {\r\n const paramValue = UrlUtility.getQueryParameterByName(key, lowerCaseParams);\r\n if (!paramValue) {\r\n return null;\r\n }\r\n return `${key}=${encodeURIComponent(paramValue)}`;\r\n }).filter(x => x);\r\n this.clientSettings.forwardablequeryparams = availableParams.join(\"&\");\r\n }\r\n\r\n /**\r\n * Initializes the \"newRidNeeded\" value based on the page generation time and last used activity ID timestamp.\r\n * Updates the stored \"last used activity ID\"\r\n */\r\n private initializeLastUsedActivityId() {\r\n // Read the \"last used activity ID\"\r\n const lastUsedAid = this.lastUsedActivityId;\r\n\r\n // The activity ID that the page is currently planning on using. This may have been embedded or it may have been loaded up from stored head data.\r\n const currentAid = this.clientSettings.aid;\r\n const pageGenTimeDate: Date = parseISO(this.clientSettings.pageGenTime);\r\n const pageGenTimestamp: number = pageGenTimeDate.getTime();\r\n\r\n // Three conditions need to be met to generate a new RID\r\n // 1) The user has stored a previously used activity ID\r\n // 2) We have a valid page generation timestamp from PCS. PCS embeds pageGenTimestamp in the client settings to tell us\r\n // when it ran and generated the page. This will not be the case for localhost requests because they do not use PCS and instead\r\n // use a static App.html file. For localhost we do not need to generate a new RID.\r\n // 3) The current ActivityId matches the previously used one\r\n this.newRidNeeded = !!(lastUsedAid && pageGenTimestamp && lastUsedAid.id === currentAid);\r\n\r\n // If we have a proper timestamp and it's more recent than the last stored one\r\n if (pageGenTimestamp && (!lastUsedAid || pageGenTimestamp > lastUsedAid.ts)) {\r\n // Store the current activity ID as last used.\r\n this.lastUsedActivityId = { id: currentAid, ts: pageGenTimestamp };\r\n }\r\n }\r\n\r\n /**\r\n * Parses flights from provided string (if in proper format of f:{flights})\r\n * and sets it to the headData object\r\n */\r\n private setFlights(flightString: string): void {\r\n // The comma separated list of flights enabled in current request\r\n this.currentFlights = ((/f:\\s*([^;]+)/i.exec(flightString) || {})[1] || \"\").toLowerCase();\r\n }\r\n\r\n /**\r\n * Determines if we are in the blended Enterprise version based on clientSettings and currentFlights\r\n */\r\n private setIsBlendedEnterprise(): void {\r\n // We know we are in the Enterprise version of the page when both the audience mode is set to Enterprise\r\n // & the browser is edgeChromium, version >= 87\r\n this.IsBlendedEnterprise = this.clientSettings &&\r\n this.clientSettings.audienceMode === AudienceModeType.Enterprise &&\r\n this.clientSettings.browser &&\r\n this.clientSettings.browser.browserType === BrowserType.EdgeChromium &&\r\n parseInt(this.clientSettings.browser.version) >= eNtpChromiumVersion;\r\n }\r\n\r\n /**\r\n * Determines if we are in Www content version based on clientSettings and currentFlights\r\n */\r\n private setIsMmxWwwContentRequest(): void {\r\n this.isMmxWwwContentRequest = this.currentFlights && this.currentFlights.includes(MmxWwwContentFlightId);\r\n }\r\n\r\n /**\r\n * Read query items to determine the headdata variable values.\r\n */\r\n private setQueryItemProvidedValues(): void {\r\n // This only finds multiples of item=key:value qsp. If keys are the same, first given will be used (similar to UrlSearchParamsHelper).\r\n const queryItems = UrlUtility.getParamsWithItems(getLocationSearch());\r\n const cmsItem = queryItems.find(item => item.key === \"cms\");\r\n this.enableCMSPPEConfigs = (cmsItem && cmsItem.value === \"ppe\");\r\n\r\n // Test override to add flights for scope purposes\r\n this.setCurrentFlightsTestOverride(queryItems);\r\n }\r\n\r\n /**\r\n * Overrides currentFlights when hostname is localhost. Used for testing.\r\n */\r\n private setCurrentFlightsTestOverride(queryItems: KeyValueArray): void {\r\n if (getLocationHostname().toLowerCase().includes(\"localhost\") && queryItems) {\r\n const flights = queryItems.find(item => item.key === \"flights\");\r\n if (flights) {\r\n this.currentFlights = flights.value;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the local storage key for the head data.\r\n */\r\n private getStoredActivityIdKey(): string {\r\n return \"sai_\" + this.clientSettings.pagetype;\r\n }\r\n\r\n /**\r\n * Prefix for headdata logs. Server side add the head and html elements.\r\n * @returns the prefix string for logger message.\r\n */\r\n private logPrefix(): string {\r\n // Request Id is only available on server side.\r\n return `HeadData:${(canUseDOM() ? \"\" : ` [Head:${this.headElement}] and [Html:${this.htmlElement}]`)}`;\r\n }\r\n\r\n /**\r\n * Updates AppError property bag with document visibility and adds event listener for visibility change\r\n */\r\n private logDocumentVisibility(): void {\r\n if (!canUseDOM()) {\r\n return;\r\n }\r\n\r\n updateAppErrorsPropertyBag({ isVisible: document.visibilityState === \"visible\" });\r\n\r\n document.addEventListener(\"visibilitychange\", () => {\r\n updateAppErrorsPropertyBag({ isVisible: document.visibilityState === \"visible\" });\r\n });\r\n }\r\n}\r\n\r\nexport const getHeadData = HeadData.getInstance;\r\n\r\n// headData can be reinitialized through resetHeadData.\r\nexport let headData = HeadData.getInstance();\r\n\r\n/**\r\n * Export function to reset headData based on WebClientData\r\n */\r\nexport const resetHeadData = HeadData.resetInstance;","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { identifyBreakpoint, BreakpointTracker } from \"@microsoft/fast-layouts-react\";\r\n\r\nimport { canUseDOM } from \"./DOMHelpersCore\";\r\nimport { getRequestData } from \"./requestData\";\r\n\r\n/**\r\n * Checks if a given JS media query matches in an isomorphic manner\r\n * NOTE: Only supports min/max-width queries outside of the web client\r\n * @param query The media query\r\n * @param breakpoint The current breakpoint, needed if SSR\r\n */\r\nexport function canMatchMedia(query: string, breakpoint?: number): boolean {\r\n if (canUseDOM()) {\r\n return window.matchMedia(query).matches;\r\n }\r\n\r\n if (breakpoint === undefined) {\r\n throw Error(\"Breakpoint must be supplied when server side rendering\");\r\n }\r\n\r\n const maxWidthValues = /max-width:\\s?(\\d+)/.exec(query);\r\n const minWidthValues = /min-width:\\s?(\\d+)/.exec(query);\r\n\r\n const minWidth = minWidthValues && minWidthValues.length ? minWidthValues[1] : 0;\r\n const maxWidth = maxWidthValues && maxWidthValues.length ? maxWidthValues[1] : Infinity;\r\n\r\n const minBreakpoint = identifyBreakpoint(parseInt(minWidth.toString()), BreakpointTracker.breakpoints);\r\n const maxBreakpoint = maxWidth === Infinity ?\r\n BreakpointTracker.breakpoints.length - 1 : identifyBreakpoint(parseInt(maxWidth.toString()), BreakpointTracker.breakpoints);\r\n\r\n return breakpoint >= minBreakpoint && breakpoint <= maxBreakpoint;\r\n}\r\n\r\n/**\r\n * Get window.location.href in an isomorphic manner.\r\n */\r\nexport function getLocationHref(): string {\r\n return canUseDOM() ? window.location.href : getRequestData().url.href;\r\n}\r\n\r\n/**\r\n * Get window.location.hostname in an isomorphic manner.\r\n */\r\nexport function getLocationHostname(): string {\r\n return canUseDOM() ? window.location.hostname : getRequestData().url.hostname;\r\n}\r\n\r\n/**\r\n * Get window.location.host in an isomorphic manner.\r\n */\r\nexport function getLocationHost(): string {\r\n return canUseDOM() ? window.location.host : getRequestData().url.host;\r\n}\r\n\r\n/**\r\n * Get window.location.origin in an isomorphic manner.\r\n */\r\nexport function getLocationOrigin(): string {\r\n return canUseDOM() ? window.location.origin : getRequestData().url.origin;\r\n}\r\n\r\n/**\r\n * Get window.location.search in an isomorphic manner.\r\n */\r\nexport function getLocationSearch(): string {\r\n return canUseDOM() ? window.location.search : getRequestData().url.search;\r\n}\r\n\r\n/**\r\n * Get window.location.pathname in an isomorphic manner.\r\n */\r\nexport function getLocationPathname(): string {\r\n return canUseDOM() ? window.location.pathname : getRequestData().url.pathname;\r\n}\r\n\r\n/**\r\n * Get window.location.protocol in an isomorphic manner.\r\n */\r\nexport function getLocationProtocol(): string {\r\n return canUseDOM() ? window.location.protocol : getRequestData().url.protocol;\r\n}\r\n\r\n/**\r\n * Get window.location.hash in an isomorphic manner.\r\n */\r\nexport function getLocationHash(): string {\r\n return canUseDOM() ? window.location.hash : getRequestData().url.hash;\r\n}\r\n\r\n/**\r\n * Get document.cookie in an isomorphic manner.\r\n */\r\nexport function getCookieString(): string {\r\n return canUseDOM() ? window.document.cookie : getRequestData().cookie;\r\n}\r\n\r\n/**\r\n * Get window.document.getElementById(elementId).\r\n */\r\nexport function getDocumentElementById(elementId: string): HTMLElement {\r\n if (!canUseDOM()) {\r\n throw new Error(\"getDocumentElementById is unsupported server side. This call should be wrapped in canUseDOM().\");\r\n }\r\n\r\n return window.document.getElementById(elementId);\r\n}\r\n\r\n/**\r\n * Get window.document.getDocumentElementsByTagName(elementId).\r\n */\r\nexport function getDocumentElementsByTagName(tagName: string): HTMLCollectionOf {\r\n if (!canUseDOM()) {\r\n throw new Error(\"getDocumentElementsByTagName is unsupported server side. This call should be wrapped in canUseDOM().\");\r\n }\r\n\r\n return window.document.getElementsByTagName(tagName);\r\n}\r\n\r\n/**\r\n * Get indexedDB in an isomorphic manner.\r\n * Todo (http://osgvsowi/23753462), provide actual functionality for indexedDB on the server side.\r\n */\r\nexport function getIndexedDB(): IDBFactory {\r\n return canUseDOM() ? window.indexedDB : null;\r\n}\r\n\r\n/**\r\n * Get window.innerHeight in an isomorphic manner.\r\n * Todo (http://osgvsowi/23876778), remove the need for server to know about innerWidth by limiting layout options or use CSS based solution.\r\n */\r\nexport function getInnerHeight(): number {\r\n return canUseDOM() ? window.innerHeight : getRequestData().innerHeight;\r\n}\r\n\r\n/**\r\n * Get window.devicePixelRatio in an isomorphic manner.\r\n */\r\nexport function getDevicePixelRatio(): number {\r\n return canUseDOM() ? window.devicePixelRatio : getRequestData().devicePixelRatio;\r\n}\r\n\r\n/**\r\n * Get CSS Grid support in an isomorphic manner\r\n */\r\nexport function getCssGridSupport(): boolean {\r\n return !!(canUseDOM() ? (window.CSS && window.CSS.supports && CSS.supports(\"display\", \"grid\")) : getRequestData().canUseCssGrid);\r\n}\r\n\r\n/**\r\n * Get variable font support in an isomorphic manner\r\n * TODO: SSR currently does not support custom fonts.\r\n */\r\nexport function getVariableFontSupport(): boolean {\r\n if (!canUseDOM()) {\r\n throw new Error(\"SSR currently does not support custom fonts.\");\r\n }\r\n\r\n return !!(window.CSS && window.CSS.supports && CSS.supports(\"(font-variation-settings: normal)\"));\r\n}\r\n\r\n/**\r\n * Returns a script element using several default values.\r\n * Not supported server side.\r\n * @param src The absolute URL for the script src. Default is undefined, blank is okay.\r\n * @param id The id to assign the script element. default is \"\" so no id.\r\n * @param loadAsync Should the script load asynchronously. Default is true.\r\n * @returns {HTMLScriptElement} the script element. not using const so it can be overridden by caller.\r\n */\r\nexport function createScriptTag(src: string = undefined, id = undefined, loadAsync = true): HTMLScriptElement {\r\n if (!canUseDOM()) {\r\n throw new Error(\"createScriptTag is unsupported server side. This call should be wrapped in canUseDOM().\");\r\n }\r\n\r\n const scriptElement: HTMLScriptElement = document.createElement(\"script\");\r\n if (id) {\r\n scriptElement.id = id;\r\n }\r\n scriptElement.type = \"text/javascript\";\r\n if (src) {\r\n scriptElement.src = src;\r\n scriptElement.async = loadAsync;\r\n }\r\n // @ts-ignore\r\n if (window && window.NONCE_ID) {\r\n // @ts-ignore\r\n scriptElement.nonce = window.NONCE_ID;\r\n }\r\n\r\n return scriptElement;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { KeyValueArray, KeyValuePair, Utility } from \"./Utility\";\r\nimport { findIndex, isArray, isEmpty, isString, trimEnd, trimStart } from \"lodash-es\";\r\n\r\nimport { StringMap } from \"../types\";\r\nimport { getLocationOrigin } from \"@msnews/isomorphic-util\";\r\n\r\nexport namespace UrlUtility {\r\n\r\n /**\r\n * Characters that, if present on a url, will make prime routing misbehave\r\n *\r\n * These are the characters we know cause problems:\r\n * - spaces\r\n * - slashes\r\n * - punctuation: !?.:\r\n * - ampersands\r\n *\r\n * As we don't know all the offending characters, we are just removing every character that is not alphanumeric\r\n */\r\n const primeForbiddenCharacters = /[^A-Za-z0-9]+/g;\r\n\r\n /**\r\n * Parse parameters from the given URL\r\n * @param {string} url - the URL to parse for parameters\r\n * @param {boolean} decodeComponents - flag to indicate whether the query param key and value should be URL decoded\r\n * @returns {KeyValueArray} - the parsed query key/value collection\r\n */\r\n export function getParamsFromUrl(url: string, decodeComponents = false): KeyValueArray {\r\n if (!isString(url)) {\r\n return null;\r\n }\r\n\r\n const queryString: string = (url || \"\").split(\"?\")[1];\r\n return getParams(queryString, decodeComponents);\r\n }\r\n\r\n /**\r\n * Decode the given URL encoded string that may contain plus signs\r\n * @param {string} val - The value to decode.\r\n * @returns {string} - the decoded value\r\n */\r\n function decodeURIComponentWithPlusSign(val: string): string {\r\n val = val.replace(/\\+/g, \" \");\r\n val = decodeURIComponent(val);\r\n return val;\r\n }\r\n\r\n /**\r\n * Encode uri components in a way that won't break prime routing system\r\n * @param uriComponent the uriComponent to be encoded\r\n */\r\n export function encodeURIComponentForPrime(uriComponent: string): string {\r\n return encodeURIComponent(uriComponent.replace(primeForbiddenCharacters, \"-\"));\r\n }\r\n\r\n /**\r\n * Parse parameters from the given query string\r\n * @param {string} queryString - the query string to parse for parameters\r\n * @param {boolean} decodeComponents - flag to indicate whether the query param key and value should be URL decoded\r\n * @returns {KeyValueArray} - the parsed query key/value collection\r\n */\r\n export function getParams(queryString: string, decodeComponents = false): KeyValueArray {\r\n const params: KeyValueArray = [];\r\n // Remove the leading ? if it is present\r\n if (queryString && queryString.startsWith(\"?\")) {\r\n queryString = queryString.substring(1);\r\n }\r\n\r\n if (queryString) {\r\n // remove hash part.\r\n queryString = queryString.split(\"#\")[0];\r\n const queryArray = queryString.split(\"&\");\r\n for (let ndx = 0; ndx < queryArray.length; ndx++) {\r\n const parts = queryArray[ndx].split(\"=\");\r\n let queryKey = parts[0];\r\n let queryValue = parts[1];\r\n\r\n if (decodeComponents) {\r\n queryKey = decodeURIComponentWithPlusSign(queryKey);\r\n if (queryValue) {\r\n queryValue = decodeURIComponentWithPlusSign(queryValue);\r\n }\r\n }\r\n\r\n // Don't allow for duplicate query string parameter keys. Take the last one\r\n const newParam: KeyValuePair = { key: queryKey, value: queryValue };\r\n const existingParam = findIndex(params, (entry) => entry.key === newParam.key);\r\n if (existingParam === -1) {\r\n params.push(newParam);\r\n } else {\r\n params[existingParam] = newParam;\r\n }\r\n }\r\n }\r\n return params;\r\n }\r\n\r\n /**\r\n * Parse specific parameters from the given query string, allowing for multiple item=key:value.\r\n * This function ONLY parses qsp item=[key]:[value]\r\n * Note: Use first given rule for duplicate key!\r\n * @param {string} queryString - the query string to parse for parameters\r\n * @param {boolean} decodeComponents - flag to indicate whether the query param key and value should be URL decoded\r\n * @returns {KeyValueArray} - the parsed query key/value collection\r\n */\r\n export function getParamsWithItems(queryString: string, decodeComponents = false): KeyValueArray {\r\n const params: KeyValueArray = [];\r\n\r\n const inputKey = \"item\";\r\n\r\n if (queryString) {\r\n // Remove the leading ? if it is present\r\n if (queryString.startsWith(\"?\")) {\r\n queryString = queryString.substring(1);\r\n }\r\n\r\n // split on the hashes.\r\n queryString = queryString.split(\"#\")[0];\r\n const queryArray = queryString.split(\"&\");\r\n for (let ndx = 0; ndx < queryArray.length; ndx++) {\r\n const parts = queryArray[ndx].split(\"=\");\r\n let queryKey = parts[0];\r\n let queryValue = parts[1];\r\n\r\n if (decodeComponents) {\r\n queryKey = decodeURIComponentWithPlusSign(queryKey);\r\n if (queryValue) {\r\n queryValue = decodeURIComponentWithPlusSign(queryValue);\r\n }\r\n }\r\n\r\n // If the query key is inputKey (default: \"item\"), and the query values is key:value, then convert the\r\n // value into the actual key/value\r\n if (queryKey.toLowerCase() === inputKey) {\r\n const queryItems = queryValue.split(\":\");\r\n // Ignore value not in \"key:value\" format\r\n if (queryItems.length === 2) {\r\n queryKey = queryItems[0];\r\n queryValue = queryItems[1];\r\n\r\n // Don't allow for duplicate query string parameter keys. Use first given rule for duplicate key!\r\n const newParam: KeyValuePair = { key: queryKey, value: queryValue };\r\n const existingParam = params.findIndex((entry) => entry.key === newParam.key);\r\n if (existingParam === -1) {\r\n params.push(newParam);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return params;\r\n }\r\n\r\n /**\r\n * Cache URI to paramsObj mapping\r\n */\r\n const hrefParamsObj: any = {};\r\n\r\n /**\r\n * Utility method to extract query string param in url.\r\n *\r\n * @export\r\n * @param {string} name - query param name\r\n * @param {string} href - URL\r\n * @returns {string} - query param value\r\n */\r\n export function getQueryParameterByName(name: string, href: string): string {\r\n if (!hrefParamsObj[href]) {\r\n hrefParamsObj[href] = getParamsObj(href);\r\n }\r\n\r\n const paramsObj = hrefParamsObj[href];\r\n const value = paramsObj[name];\r\n return (value !== undefined)\r\n ? value\r\n : null;\r\n }\r\n\r\n /**\r\n * Check if given url string is a valid url.\r\n * Returns true when url string is a valid url, otherwise false.\r\n *\r\n * @export\r\n * @param url {string} - Url string value to check\r\n * @param validateScheme {boolean} - Should scheme validation be forced\r\n * @return {boolean}\r\n */\r\n export function isValidUrl(url: string, validateScheme: boolean): boolean {\r\n return (isString(url) &&\r\n (url.length > 0) &&\r\n (!validateScheme ||\r\n validateScheme && url.indexOf(\"http\") === 0));\r\n }\r\n\r\n /**\r\n * Converts a keyValueArray into a set of query string parameters\r\n *\r\n * @export\r\n * @param {any} - params to be converted\r\n * @return {string}\r\n */\r\n export function keyValueArrayToQueryString(params: KeyValueArray): string {\r\n // Validate we have a nonempty array\r\n if (!isArray(params) || isEmpty(params)) {\r\n return \"\";\r\n }\r\n\r\n // Filter for valid keyValue entries, and then map them into key==value strings\r\n // joined with an &\r\n const queryString: string = params.filter(kv =>\r\n Utility.isKeyValuePair(\r\n kv,\r\n (key) => typeof (key) === \"string\",\r\n (value) => typeof (value) === \"string\"))\r\n .map(kv => kv.key + \"=\" + kv.value)\r\n .join(\"&\");\r\n\r\n return queryString;\r\n }\r\n\r\n /**\r\n * Helper method to parse the given URLs query parameters to a lookup dictionary\r\n * @param url - the URL string with the query params to parse\r\n * @returns The {StringMap} containing the key/value pairs, or empty object.\r\n */\r\n export function getParamsObj(url: string): StringMap {\r\n const paramsObj = {};\r\n const paramArray = getParamsFromUrl(url, true);\r\n if (paramArray && paramArray.length) {\r\n paramArray.forEach(keyValuePair =>\r\n paramsObj[keyValuePair.key] = keyValuePair.value);\r\n }\r\n return paramsObj;\r\n }\r\n\r\n /**\r\n * For the given `url`, it appends the `subPath` to it.\r\n * It takes propers care to forward slashes characters\r\n * at the end of `url` and at the start of `subPath` parameters\r\n * @param url a valid url\r\n * @param subPath the path which is appended to `url`\r\n * @returns an URL object which is the `url` appended by `subPath`\r\n */\r\n export function joinSubpathToURL(url: URL, subPath: string): URL {\r\n const href = url.href;\r\n const trimmedEndSlashFromHref = trimEnd(href, \"/\");\r\n const trimmedStartSlashFromSubpath = trimStart(subPath, \"/\");\r\n return new URL(`${trimmedEndSlashFromHref}/${trimmedStartSlashFromSubpath}`);\r\n }\r\n\r\n /**\r\n * Updates a search parameter in the given url to map to a new value\r\n * Does not modify the url if the given search param doesn't exist\r\n * @param url the url to update\r\n * @param key the name of the search param to be updated\r\n * @param value the new value for the given search param\r\n * @returns {URL} the updated URL\r\n */\r\n export function updateSearchParam(url: URL, key: string, value: string): URL {\r\n // Note that the searchParams data member may not be compatible with older browser versions\r\n // see https://caniuse.com/#search=searchparams\r\n if (url && url.searchParams && url.searchParams.get(key)) {\r\n url.searchParams.set(key, value);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Appends a search parameter to the given url\r\n * @param url the url to modify\r\n * @param key the name of the search param to be appended\r\n * @param value the new value for the given search param\r\n * @returns {URL} the modified URL\r\n */\r\n export function appendSearchParam(url: URL, key: string, value: string, fallback?: boolean): URL {\r\n if (url) {\r\n if (url.searchParams || fallback) {\r\n url.searchParams.append(key, value);\r\n } else {\r\n // TODO Bug 22390312: [Peregrine] UrlUtility appendSearchParam needs more robust polyfill\r\n url = new URL(url.href + (url.search.indexOf(\"?\") >= 0 ? \"&\" : \"?\") + key + \"=\" + value);\r\n }\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Returns an absolute URL if a relative on is passed in, or returns the passed in URL if already absolute\r\n * @param partialUrl The relative or absolute URL\r\n * @returns {string} the absolute URL\r\n */\r\n export function getAbsoluteUrl(partialUrl: string): string {\r\n if (partialUrl.indexOf(\"://\") > 0 || partialUrl.indexOf(\"//\") === 0) {\r\n return partialUrl;\r\n } else {\r\n return getLocationOrigin() + partialUrl;\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, AppErrorPropertyBag, Severity } from \"@msnews/core-contracts\";\r\n\r\n/**\r\n * This file contains the list of errors to log to the server for each feature.\r\n * We are centralizing errors here to make sure we do not have any dupes\\conflicts.\r\n * The idea is that each feature would have their own range of values.\r\n *\r\n * IMPORTANT: Please do not add strings to this file. Please map messages to send in your\r\n * code.\r\n */\r\n\r\n/**\r\n * All app errors are set to create IcM ticket by default unless specified in individual error code otherwise.\r\n */\r\nconst severity = Severity.Alert;\r\n\r\n/**\r\n * Build number is only passed in from updateAppErrorsPropertyBag at page initialization\r\n */\r\nconst pb: AppErrorPropertyBag = {\r\n build: \"\"\r\n};\r\n\r\n/**\r\n * Append or update property bag properties. At page level intialization, this should be called to update the build number.\r\n * Since all app error objects has reference to this base property bag, calling this method will in fact update for all app errors.\r\n * @param newPbInfo Additional information needed for app error property bag\r\n */\r\nexport function updateAppErrorsPropertyBag(newPbInfo: Partial): void {\r\n Object.assign(pb, newPbInfo);\r\n}\r\n\r\n/**\r\n * Getter for current base app error property bag.\r\n */\r\nexport function getAppErrorsPropertyBag(): AppErrorPropertyBag {\r\n return pb;\r\n}\r\n\r\nconst pageTsFileName = \"page.ts\";\r\n\r\n/**\r\n * Error during app initialization for Edge page experience.\r\n * Need to mimic the prime one since telemetry cooking logic looks for this\r\n */\r\nconst establishSignInSource = \"EstablishSignInStateHelpers.ts\";\r\nexport const EstablishSignedInState: AppError = {\r\n id: 1405,\r\n source: establishSignInSource,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents a ServiceUI related error */\r\nexport const ServiceUiError: AppError = {\r\n id: 5100,\r\n source: \"ServiceUiComm.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents a Top Sites related error */\r\nexport const TopSitesError: AppError = {\r\n id: 8010,\r\n source: \"TopSites.tsx\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents a Top Sites error when there are zero rendered top sites */\r\nexport const ZeroTopSitesError: AppError = {\r\n id: 8011,\r\n source: \"TopSites.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Curated sites list is empty */\r\nexport const CuratedSitesEmpty: AppError = {\r\n id: 8012,\r\n source: \"TopSites.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nconst TopSitesEdgeConnectorFileName = \"TopSitesEdge.connector.tsx\";\r\nconst TopSitesEdgeStorageFileName = \"TopSitesStorage.ts\";\r\n\r\nexport const TopSitesEdgeAppErrors = {\r\n ZeroTopSitesError: {\r\n id: 8013,\r\n source: TopSitesEdgeConnectorFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n CuratedSitesEmpty: {\r\n id: 8014,\r\n source: TopSitesEdgeStorageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n ComponentMountFailed: {\r\n id: 8015,\r\n source: TopSitesEdgeConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n ErrorFetchingRichTopSitesDataCollectionFromCms: {\r\n id: 8016,\r\n source: TopSitesEdgeStorageFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst TopSitesEdgeNextConnectorFileName = \"TopSitesEdgeNext.connector.tsx\";\r\n\r\nexport const TopSitesEdgeNextAppErrors = {\r\n\r\n /** The React component failed to mount */\r\n ComponentMountFailed: {\r\n id: 8020,\r\n source: TopSitesEdgeNextConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Represents a Top Sites error when there are zero rendered top sites */\r\n ZeroTopSitesError: {\r\n id: 8021,\r\n source: TopSitesEdgeNextConnectorFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const TopSiteDialogAppErrors = {\r\n /** The React component failed to mount */\r\n TopSitesDialogFailedToMount: {\r\n id: 8025,\r\n source: \"TopSitesDialog.tsx\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst OneServiceCardProviderFileName = \"OneServiceCardProvider.ts\";\r\n\r\nexport const OneServiceCardProviderAppErrors = {\r\n OneServiceResponseEmpty: {\r\n id: 8029,\r\n source: OneServiceCardProviderFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n EmptyMyFeed: {\r\n id: 8030,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n OneServiceResponseWasNullOrErroneous: {\r\n id: 8031,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n ErrorFetchingOneServiceResponse: {\r\n id: 8032,\r\n source: OneServiceCardProviderFileName,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n InvalidJsonInOneServiceResponse: {\r\n id: 8033,\r\n source: OneServiceCardProviderFileName,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n InvalidFeedListInOneServiceResponse: {\r\n id: 8034,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n RiverConfigurationIssue: {\r\n id: 8035,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load views river content based on current vertical/category. */\r\n QueryInterestContentFetchError: {\r\n id: 8036,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n StaticContentLoaded: {\r\n id: 8037,\r\n source: OneServiceCardProviderFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst OneServiceDailyBriefApi = \"dailyBriefServiceClient.ts\";\r\n\r\nexport const DailyBriefServiceClientAppErrors = {\r\n OneServiceResponseWasNullOrErroneous: {\r\n id: 8038,\r\n source: OneServiceDailyBriefApi,\r\n severity,\r\n pb\r\n },\r\n\r\n OneServiceArticleListWasNullOrErroneous: {\r\n id: 8039,\r\n source: OneServiceDailyBriefApi,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ContentPreviewSourceFile = \"ContentPreview.connector.ts\";\r\nconst ContentPreviewDataSourceFile = \"ContentPreviewData.ts\";\r\nconst ExternalContentMapperHelperFile = \"ExternalContentMapperHelper.ts\";\r\n\r\nexport const ContentPreviewAppErrors = {\r\n\r\n ErrorWhileFetchingContentPreviewContent: {\r\n id: 8041,\r\n source: ContentPreviewDataSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n InvalidResponseFromContentPreviewFetch: {\r\n id: 8042,\r\n source: ContentPreviewDataSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n InvalidResponseFromContentPreviewResponseJson: {\r\n id: 8043,\r\n source: ContentPreviewDataSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n ErrorWhileInitializingAsyncContentPreviewContent: {\r\n id: 8044,\r\n source: ContentPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n InvalidOrMissingContentId: {\r\n id: 8045,\r\n source: ContentPreviewDataSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n MissingDataForExternalContent: {\r\n id: 8046,\r\n source: ExternalContentMapperHelperFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const MissingPartnerLink: AppError = {\r\n id: 8047,\r\n source: ContentPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst RiverSourceFile = \"River.connector.ts\";\r\n\r\nexport const RiverAppErrors = {\r\n UnknownMetadataReceivedFromRiverCardProvider: {\r\n id: 8051,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n RiverContentProviderFetchException: {\r\n id: 8052,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n SkipPositionedCardsFallbackStrategyFailed: {\r\n id: 8053,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n InvalidConfig: {\r\n id: 8054,\r\n source: RiverSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n MissingExperienceTypeMap: {\r\n id: 8055,\r\n source: RiverSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n ChildLoadError: {\r\n id: 8056,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n InitialDataLoadError: {\r\n id: 8057,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Warning for when the ordinal children we get from config contains a duplicate instance id. */\r\n DuplicateInstanceIdWarning: {\r\n id: 8058,\r\n source: RiverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const FullHeightFallbackStrategyFailed: AppError = {\r\n id: 8059,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst UserInitiatedPageRefreshSourceFile = \"UserInitiatedPageRefresh.ts\";\r\nexport const UserInitiatedPageRefreshErrors = {\r\n Default: {\r\n id: 8060,\r\n source: UserInitiatedPageRefreshSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PivotContentSourceFile = \"PivotContent.connector.ts\";\r\nexport const PivotContentErrors = {\r\n LoadFailure: {\r\n id: 8070,\r\n source: PivotContentSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PivotContentV2SourceFile = \"PivotContentV2.connector.ts\";\r\nexport const PivotContentV2Errors = {\r\n LoadFailure: {\r\n id: 8071,\r\n source: PivotContentV2SourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const PivotContentRenderFailure: AppError = {\r\n id: 8072,\r\n source: \"PivotContent.tsx\",\r\n severity,\r\n pb\r\n};\r\n\r\nconst PivotsNavSourceFile = \"PivotsNav.connector.ts\";\r\nexport const PivotsNavErrors = {\r\n TopicDataConnectorUnavailable: {\r\n id: 8075,\r\n source: PivotsNavSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n NavigationDataConnectorUnavailable: {\r\n id: 8076,\r\n source: PivotsNavSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n DynamicPivotsHelperLoaderFailed: {\r\n id: 8077,\r\n source: PivotsNavSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n LayoutPreferenceDataConnectorUnavailable: {\r\n id: 8078,\r\n source: PivotsNavSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PivotsNavV2SourceFile = \"PivotsNavV2.connector.ts\";\r\nexport const PivotsNavV2Errors = {\r\n PivotHoverLoadFailure: {\r\n id: 8079,\r\n source: PivotsNavV2SourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Smart list is empty */\r\nexport const SmartListEmpty: AppError = {\r\n id: 8080,\r\n source: \"SmartList.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents BingWebSSO related App errors */\r\nconst BingWebSSOSourceFile = \"BingWebSSO.tsx\";\r\nexport const BingWebSSOAppErrors = {\r\n /** Failed to render bing websso iframe */\r\n BingWebSSORenderFailed: {\r\n id: 8090,\r\n source: BingWebSSOSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** User signed-in to MSA on page but bing SSO returned authentication failed response */\r\n BingWebSSOSignInFailed: {\r\n id: 8091,\r\n source: BingWebSSOSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Bing SSO process did not complete withing required time */\r\n BingWebSSOTimeout: {\r\n id: 8092,\r\n source: BingWebSSOSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WeatherDataConnectorSourceFile = \"WeatherData.connector.ts\";\r\nconst WeatherCardConnectorSourceFile = \"WeatherCard.connector.ts\";\r\nconst WeatherPdpClientSourceFile = \"WeatherPdpClient.ts\";\r\nconst WeatherOverviewApiClientSourceFile = \"WeatherOverviewApiClient.ts\";\r\nconst WeatherMapRadarSourceFile = \"RadarLayer.ts\";\r\nconst WeatherMapWeatherLayersSourceFile = \"WeatherLayers.ts\";\r\nconst WeatherMapPrecipitationSourceFile = \"PrecipitationLayer.ts\";\r\nconst WeatherMapGenericSevereLayerSourceFile = \"GenericSevereLayer.tsx\";\r\nconst WeatherMapHeatmapRenderLayerSourceFile = \"HeatmapRender.ts\";\r\nconst WeatherMapBingJsonLabelLayerSourceFile = \"BingJsonLabelLayer.ts\";\r\nconst WeatherMapBingOneCanvasTileLayerSourceFile = \"OneCanvasTileLayer.ts\";\r\n\r\n/** Failed to fetch weather summary */\r\nexport const WeatherSummaryFetchError: AppError = {\r\n id: 8100,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** No valid Location set from User */\r\nexport const WeatherLocationEmpty: AppError = {\r\n id: 8101,\r\n source: WeatherDataConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Not able to read from PDP */\r\nexport const WeatherPDPReadFailed: AppError = {\r\n id: 8102,\r\n source: WeatherPdpClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Not able to write home location to PDP */\r\nexport const WeatherPDPHomeLocationWriteFailed: AppError = {\r\n id: 8103,\r\n source: WeatherPdpClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Not able to write display Unit to PDP */\r\nexport const WeatherPDPDisplayUnitWriteFailed: AppError = {\r\n id: 8104,\r\n source: WeatherPdpClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Not able to localize Location */\r\nexport const WeatherLocalizeLocationFailed: AppError = {\r\n id: 8105,\r\n source: WeatherDataConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const WeatherCardAppErrors = {\r\n /** Failed to fetch local news */\r\n WeatherLocalNewsFetchError: {\r\n id: 8106,\r\n source: WeatherCardConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Failed to fetch autosuggest for locations */\r\n WeatherAutoSuggestFetchError: {\r\n id: 8107,\r\n source: WeatherCardConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** No valid Location set from User */\r\n WeatherLocationEmpty: {\r\n id: 8108,\r\n source: WeatherCardConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Failed to fetch autosuggest for locations */\r\nexport const WeatherAutoSuggestFetchError: AppError = {\r\n id: 8109,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** for more error about Weather, use 295XX */\r\n\r\nconst SportsPdpServiceClientSourceFile = \"SportsPdpServiceClient.ts\";\r\nexport const SportsCardError = {\r\n /** Failed to fetch league sports pdp */\r\n SportsLeaguePdpFetchError: {\r\n id: 8110,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch league sports pdp */\r\n SportsLeaguePdpInvalidResponse: {\r\n id: 8111,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch players sports pdp */\r\n SportsPlayersPdpFetchError: {\r\n id: 8112,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch players sports pdp */\r\n SportsPlayersPdpInvalidResponse: {\r\n id: 8113,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch teams sports pdp */\r\n SportsTeamsPdpFetchError: {\r\n id: 8114,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch teams sports pdp */\r\n SportsTeamsPdpInvalidResponse: {\r\n id: 8115,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get sports card config */\r\n SportsCardConfigFetchError: {\r\n id: 8116,\r\n source: \"SportsCardConfigReader.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get Team Data */\r\n SportsCardGetFavoriteTeamDataError: {\r\n id: 8117,\r\n source: \"SportsCard.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get Team Data */\r\n SportsCardGetPlayerBioError: {\r\n id: 8118,\r\n source: \"SportsCard.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetLeaguesGamesArrayError: {\r\n id: 8119,\r\n source: \"SportsCard.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetPdpDataFailure: {\r\n id: 8120,\r\n source: \"SportsCard.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetLeagueSeasonYearDataFailure: {\r\n id: 8121,\r\n source: \"SportsCardServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetLocalizedTeamNameDataFailure: {\r\n id: 8122,\r\n source: \"SportsCardServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetTeamDataFailure: {\r\n id: 8123,\r\n source: \"SportsCardServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetLeagueDataFailure: {\r\n id: 8124,\r\n source: \"SportsCardServiceClient.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MoneyCardConnectorFile = \"MoneyCard.connector.ts\";\r\nconst MoneyPdpServiceClientFile = \"MoneyPdpServiceClient.ts\";\r\nexport const MoneyCardError = {\r\n /** Failed to get quote summary for user */\r\n MoneyQuoteSummaryGetError: {\r\n id: 8130,\r\n source: MoneyCardConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get quote summaries */\r\n MoneyQuoteSummariesGetError: {\r\n id: 8131,\r\n source: MoneyCardConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get pdp data */\r\n MoneyPdpDataGetErrorFromService: {\r\n id: 8132,\r\n source: MoneyPdpServiceClientFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get pdp data because of invalid response */\r\n MoneyPdpInvalidResponseFromService: {\r\n id: 8133,\r\n source: MoneyPdpServiceClientFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get quote summary response for user from service client */\r\n MoneyQuoteSummaryGetErrorFromService: {\r\n id: 8134,\r\n source: MoneyPdpServiceClientFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get quote summary response for user from service client because of invalid response */\r\n MoneyQuoteSummaryInvalidResponseFromService: {\r\n id: 8135,\r\n source: MoneyPdpServiceClientFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst TrendingNewsConnectorFile = \"TrendingNews.connector.ts\";\r\nexport const TrendingNewsErrors = {\r\n /** Failed to fetch the trending news stories */\r\n DataFetchError: {\r\n id: 8140,\r\n source: TrendingNewsConnectorFile,\r\n severity,\r\n pb\r\n },\r\n /** Failed to fetch the backup data for trending news stories */\r\n BackupDataFetchError: {\r\n id: 8141,\r\n source: TrendingNewsConnectorFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ComplexContentPreviewSourceFile = \"ComplexContentPreview.connector.ts\";\r\nexport const ComplexContentPreviewErrors = {\r\n InitError: {\r\n id: 8150,\r\n source: ComplexContentPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n LoadError: {\r\n id: 8151,\r\n source: ComplexContentPreviewSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n ContentError: {\r\n id: 8152,\r\n source: ComplexContentPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n ContentCountError: {\r\n id: 8153,\r\n source: ComplexContentPreviewSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const GridSectionAppErrors = {\r\n /** Unable to generate river section cards */\r\n GridSectionCardGenerationError: {\r\n id: 8160,\r\n source: \"GridSection.tsx\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MmxEntryPointFileName = \"MMXPage.connector.ts\";\r\n\r\nexport const MmxEntryPointAppErrors = {\r\n /**\r\n * MMX river is not able to load Error Page.\r\n */\r\n MmxErrorPage: {\r\n id: 8170,\r\n source: MmxEntryPointFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error fetching the APP_ANON cookie on MMX page load\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 8171,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Warning that MMX server side rendering is skipped and client side rendering is triggered\r\n * due to either server error or slow server response.\r\n */\r\n MMXSSRSkip: {\r\n id: 8172,\r\n source: MmxEntryPointFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Errors related to Background image\r\n * More errors can be found on 386XX\r\n */\r\nconst irisImageHotspotsProviderFile = \"IrisImageHotspotsProvider.ts\";\r\nconst irisMuseumCardFile = \"IrisMuseumCard.tsx\";\r\nconst irisHotspotCtaFile = \"Hotspot.cta.ts\";\r\nconst bingImageProvider = \"BingImageOfTheDayProvider.ts\";\r\nconst freImageProvider = \"FREBackgroundProvider.ts\";\r\n\r\n/** The Bing Image of the Day failed to load properly */\r\nexport const BingIOTDFailedToLoad: AppError = {\r\n id: 8180,\r\n source: bingImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** The FRE image method has not been implemented */\r\nexport const FREImageMethodNotImplemented: AppError = {\r\n id: 8181,\r\n source: freImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Iris call from museum card failed */\r\nexport const ImageMuseumIrisDataFetchFailed: AppError = {\r\n id: 8182,\r\n source: irisMuseumCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Hotspots data found for the off page navigation failed inspection. */\r\nexport const InvalidOffPageNavCTA: AppError = {\r\n id: 8183,\r\n source: irisHotspotCtaFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Hotspots cta type or metadata not defined */\r\nexport const CTATypeOrMetdataNotDefined: AppError = {\r\n id: 8184,\r\n source: irisHotspotCtaFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Event not defined */\r\nexport const EventNotDefined: AppError = {\r\n id: 8185,\r\n source: irisHotspotCtaFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Hotspot call to action state not defined */\r\nexport const HotspotCtaStateNotDefined: AppError = {\r\n id: 8186,\r\n source: irisHotspotCtaFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Iris data connector not defined */\r\nexport const ImageIrisDataConnectorUndefined: AppError = {\r\n id: 8187,\r\n source: irisImageHotspotsProviderFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Iris data connector not defined on Museum card */\r\nexport const ImageIrisDataConnectorUndefinedMuseumCard: AppError = {\r\n id: 8188,\r\n source: irisMuseumCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Iris data call failed */\r\nexport const ImageIrisDataFetchFailed: AppError = {\r\n id: 8189,\r\n source: irisImageHotspotsProviderFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SettingsDialogAppErrors = {\r\n /** Failed to get the saved layout preferences */\r\n ReadPreferencesFailed: {\r\n id: 8190,\r\n source: \"SettingsDialogEdgeNext.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch the ConfigData object from the client API */\r\n FetchNtpConfigDataFailed: {\r\n id: 8191,\r\n source: \"SettingsDialogEdgeNextBase.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n ChromiumClientEmbededsearchAPIError: {\r\n id: 8192,\r\n source: \"SettingsDialogEdgeNext.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MsnSettingMenuConnectorFileName = \"MsnSettingMenuConnector.connector.ts\";\r\n\r\nexport const MsnSettingsMenuAppErrors = {\r\n /** Failed to get feedback dialog connector */\r\n FailedToGetFeedbackDialogConnector: {\r\n id: 8193,\r\n source: MsnSettingMenuConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed to get feedback data connector */\r\n FailedToGetFeedbackDataConnector: {\r\n id: 8194,\r\n source: MsnSettingMenuConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** The Msn settings menu failed to load valid config settings */\r\n MsnSettingsMenuFailedToFetchConfig: {\r\n id: 8195,\r\n source: MsnSettingMenuConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const EdgePageSettingsAppErrors = {\r\n ServiceUiError: {\r\n id: 8196,\r\n source: \"EdgeSettingsProvider.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n InlineServiceUiError: {\r\n id: 8197,\r\n source: \"inline-head.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ShowFeedConnectorFileName = \"ShowFeed.connector.ts\";\r\n\r\nexport const ShowFeedAppErrors = {\r\n ExpectedDataMissing: {\r\n id: 8198,\r\n source: ShowFeedConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n MissingPageSettings: {\r\n id: 8199,\r\n source: ShowFeedConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst InfopaneSourceFile = \"Infopane.connector.ts\";\r\nexport const InfopaneErrors = {\r\n InitializeError: {\r\n id: 8201,\r\n source: InfopaneSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidConfig: {\r\n id: 8202,\r\n source: InfopaneSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const FeedbackLinkAppErrors = {\r\n /** The Feedback link failed to load valid config settings */\r\n FeedbackLinkFailedToFetchConfig: {\r\n id: 8210,\r\n source: \"FeedbackLink.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Failed to get feedback dialog connector */\r\n FailedToGetFeedbackDialogConnector: {\r\n id: 8211,\r\n source: \"FeedbackLink.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Failed to get feedback data connector */\r\n FailedToGetFeedbackDataConnector: {\r\n id: 8212,\r\n source: \"FeedbackLink.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst FeedbackServiceClientSourceFile = \"FeedbackServiceClient.ts\";\r\nexport const FeedbackDialogAppErrors = {\r\n /** Failed to get feedback data connector */\r\n FailedToGetFeedbackDataConnector: {\r\n id: 8213,\r\n source: \"FeedbackDialog.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Request is not valid, it has no content, or the manifest is not formatted correctly */\r\n BadRequestReportingFeedback: {\r\n id: 8214,\r\n source: FeedbackServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n /** Exception thrown when reporting feedback to OCV */\r\n ExceptionReportingFeedback: {\r\n id: 8215,\r\n source: FeedbackServiceClientSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WindowsShellSettingFeedbackFileName = \"HeaderWindowsShell.connector.ts\";\r\n\r\n/** The Setting Feedback menu failed to load valid config settings */\r\nexport const WindowsShellSettingFeedbackMenuFailedToFetchConfig: AppError = {\r\n id: 8216,\r\n source: WindowsShellSettingFeedbackFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** The Setting Feedback menu Failed to get feedback dialog connector */\r\nexport const WindowsShellSettingFeedbackMenuFailedToGetFeedbackDialogConnector: AppError = {\r\n id: 8217,\r\n source: WindowsShellSettingFeedbackFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** The Setting Feedback menu Failed to get feedback data connector */\r\nexport const WindowsShellSettingFeedbackMenuFailedToGetFeedbackDataConnector: AppError = {\r\n id: 8218,\r\n source: WindowsShellSettingFeedbackFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst OneFooterConnectorFileName = \"OneFooter.connector.ts\";\r\nexport const OneFooterErrors = {\r\n InvalidConfig: {\r\n id: 8220,\r\n source: OneFooterConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed to get feedback data connector */\r\n FailedToGetFeedbackDataConnector: {\r\n id: 8221,\r\n source: OneFooterConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const PoweredByLegendAppErrors = {\r\n /** The PoweredBy legend failed to load expected config settings */\r\n PoweredByLegendInvalidConfig: {\r\n id: 8230,\r\n source: \"PoweredByLegend.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst EdgeHeaderConnectorFileName = \"EdgeHeader.connector.ts\";\r\n\r\nexport const EdgeHeaderAppErrors = {\r\n /** The BingImageData Connector was not loaded */\r\n BingImageDataConnectorNotLoaded: {\r\n id: 8240,\r\n source: EdgeHeaderConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MicrosoftNewsPageConnectorFileName = \"MicrosoftNewsPage.connector.ts\";\r\n\r\nexport const MicrosoftNewsPageAppErrors = {\r\n /** The BingImageData Connector was not loaded */\r\n BingImageDataConnectorNotLoaded: {\r\n id: 8241,\r\n source: MicrosoftNewsPageConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WindowsPageConnectorFileName = \"WindowsPage.connector.ts\";\r\n\r\nexport const WindowsPageAppErrors = {\r\n /** The BingImageData Connector was not loaded */\r\n BingImageDataConnectorNotLoaded: {\r\n id: 8242,\r\n source: WindowsPageConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst TabbedInfopaneSourceFile = \"TabbedInfopane.connector.ts\";\r\nexport const TabbedInfopaneErrors = {\r\n InitializeError: {\r\n id: 8250,\r\n source: TabbedInfopaneSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidConfig: {\r\n id: 8251,\r\n source: TabbedInfopaneSourceFile,\r\n severity,\r\n pb\r\n },\r\n ChildLoadError: {\r\n id: 8252,\r\n source: TabbedInfopaneSourceFile,\r\n severity,\r\n pb\r\n },\r\n /** Problems with the second oneservice call that gathers the rest of the tabs*/\r\n SubTabFailure: {\r\n id: 8253,\r\n source: TabbedInfopaneSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const MeControlAppErrors = {\r\n /** The SSO call failed to return valid SSO sign-in information. */\r\n SSOFailedError: {\r\n id: 8260,\r\n source: \"MeControl.tsx\",\r\n severity,\r\n pb\r\n },\r\n /** The Me Control failed to load */\r\n MeControlLoadFailedError: {\r\n id: 8261,\r\n source: \"MeControl.tsx\",\r\n severity: Severity.HighImpact,\r\n pb\r\n }\r\n};\r\n\r\nconst TabbedInfopaneTabPreviewSourceFile = \"TabbedInfopaneTabPreview.connector.ts\";\r\nexport const TabbedInfopaneTabPreviewErrors = {\r\n InitError: {\r\n id: 8270,\r\n source: TabbedInfopaneTabPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidConfig: {\r\n id: 8271,\r\n source: TabbedInfopaneTabPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n LoadError: {\r\n id: 8272,\r\n source: TabbedInfopaneTabPreviewSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const HeaderNavigationLogoAppErrors = {\r\n MegaMenuDataError: {\r\n id: 8280,\r\n source: \"HeaderNavigationLogoConnector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst pageClicksTrackerFileName = \"pageClicksTracker.ts\";\r\nexport const PageClickTrackerErrors = {\r\n InvalidResponse: {\r\n id: 8290,\r\n severity: Severity.NoAlert,\r\n source: pageClicksTrackerFileName,\r\n pb\r\n },\r\n FetchFailure: {\r\n id: 8291,\r\n severity: Severity.NoAlert,\r\n source: pageClicksTrackerFileName,\r\n pb\r\n }\r\n};\r\n\r\nconst TargetingSystemSourceFile = \"TargetingSystem.ts\";\r\nexport const TargetingSystemAppErrors = {\r\n GeneralError: {\r\n id: 8310,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n TopLevelDataMissing: {\r\n id: 8311,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n TrackingDataUPSMissing: {\r\n id: 8312,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n AppEnvironmentValuesMissing: {\r\n id: 8313,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n CallingOneServiceFailed: {\r\n id: 8314,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n CallingUPSServiceFailed: {\r\n id: 8315,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst CoachmarkSourceFile = \"Coachmark.connector.ts\";\r\nconst CoachmarkTSX = \"Coachmark.tsx\";\r\nconst CoachmarkCTA = \"Coachmark.cta.ts\";\r\nexport const CoachmarkAppErrors = {\r\n GeneralError: {\r\n id: 8320,\r\n source: CoachmarkTSX,\r\n severity,\r\n pb\r\n },\r\n NotPlaceable: {\r\n id: 8321,\r\n source: CoachmarkTSX,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n NotFoundComponent: {\r\n id: 8322,\r\n source: CoachmarkTSX,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n CoachmarkDataConnectorUndefined: {\r\n id: 8323,\r\n source: CoachmarkSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidCTAType: {\r\n id: 8324,\r\n source: CoachmarkCTA,\r\n severity,\r\n pb\r\n },\r\n CTATypeNotDefined: {\r\n id: 8325,\r\n source: CoachmarkCTA,\r\n severity,\r\n pb\r\n },\r\n ConfigDataUndefined: {\r\n id: 8326,\r\n source: CoachmarkSourceFile,\r\n severity,\r\n pb\r\n },\r\n FailedToFetchConfigData: {\r\n id: 8327,\r\n source: CoachmarkSourceFile,\r\n severity,\r\n pb\r\n },\r\n ExceptionFetchingConfigData: {\r\n id: 8328,\r\n source: CoachmarkSourceFile,\r\n severity,\r\n pb\r\n },\r\n EventNotDefined: {\r\n id: 8329,\r\n source: CoachmarkCTA,\r\n severity,\r\n pb\r\n },\r\n CoachmarkStateNotDefined: {\r\n id: 8330,\r\n source: CoachmarkCTA,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst CoachmarkDataConnectorSourceFile = \"CoachmarkData.connector.ts\";\r\nconst CoachmarkPayloadSourceFile = \"CoachmarkPayload.ts\";\r\nconst IrisHandlerSourceFile = \"IrisHandler.ts\";\r\nexport const CoachmarkDataAppErrors = {\r\n InvalidCoachmarkMessage: {\r\n id: 8331,\r\n source: CoachmarkPayloadSourceFile,\r\n severity,\r\n pb\r\n },\r\n IrisDataConnectorUndefined: {\r\n id: 8332,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n ErrorFoundForSurface: {\r\n id: 8334,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n TelemetryInfoUndefined: {\r\n id: 8335,\r\n source: CoachmarkDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n EventTypeUndefined: {\r\n id: 8336,\r\n source: CoachmarkDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n IrisActionUndefined: {\r\n id: 8337,\r\n source: CoachmarkDataConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst AppTraceFile = \"AppTrace\";\r\nexport const AppTraceErrors = {\r\n /** Error for when app trace upload fails */\r\n UploadError: {\r\n id: 8350,\r\n source: AppTraceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ConditionalBannerPayloadSourceFile = \"ConditionalBannerPayload.ts\";\r\nconst ConditionalBannerIrisHandlerSourceFile = \"ConditionalBannerIrisHandler.ts\";\r\n\r\nexport const ConditionalBannerInvalidConditionalBannerMessage: AppError = {\r\n id: 8363,\r\n source: ConditionalBannerPayloadSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerIrisDataConnectorUndefined: AppError = {\r\n id: 8364,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerNoSurfaceFoundForCampaign: AppError = {\r\n id: 8365,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerErrorFoundForSurface: AppError = {\r\n id: 8366,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerTelemetryInfoUndefined: AppError = {\r\n id: 8367,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerEventTypeUndefined: AppError = {\r\n id: 8368,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerIrisActionUndefined: AppError = {\r\n id: 8369,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst SpotlightPreviewSourceFile = \"SpotlightPreview.connector.ts\";\r\n\r\nexport const SpotlightPreviewAppErrors = {\r\n ErrorWhileFetchingSpotlightPreviewCardInfo: {\r\n id: 8401,\r\n source: SpotlightPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n NoServiceContextMetadata: {\r\n id: 8402,\r\n source: SpotlightPreviewSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst SpotlightSourceFile = \"Spotlight.connector.ts\";\r\nexport const SpotlightErrors = {\r\n UnknownError: {\r\n id: 8500,\r\n source: SpotlightSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n ContentFetchError: {\r\n id: 8501,\r\n source: SpotlightSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n PartnerFetchFail: {\r\n id: 8502,\r\n source: \"PartnerService.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const CommentsErrors: { [key: string]: AppError } = {\r\n NoPost: {\r\n id: 8510,\r\n source: \"Comments.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const CardActionErrors = {\r\n /** Error catch in base CardAction experience container */\r\n CardActionBaseExperienceError: {\r\n id: 8600,\r\n source: \"CardAction.tsx\",\r\n severity,\r\n pb\r\n },\r\n /** Post action failed (Like/Dislike) */\r\n CardActionPostActionError: {\r\n id: 8601,\r\n source: \"CarActionServiceClient.tsx\",\r\n severity,\r\n pb\r\n },\r\n /** Delete action failed (Unlike/Undislike) */\r\n CardActionDeleteActionError: {\r\n id: 8602,\r\n source: \"CardActionServiceClient.tsx\",\r\n severity,\r\n pb\r\n },\r\n /** Get action failed (GetPublisherDetails) */\r\n CardActionGetActionError: {\r\n id: 8603,\r\n source: \"CardActionServiceClient.tsx\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ContentRelatedSourceFile = \"ContentRelated.connector.ts\";\r\nexport const ContentRelatedErrors = {\r\n /**\r\n * Missing source Id error\r\n */\r\n MissingSourceIdError: {\r\n id: 8700,\r\n source: ContentRelatedSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Invalid sourceIdError\r\n */\r\n InvalidSourceIdError: {\r\n id: 8701,\r\n source: ContentRelatedSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Related contents feed fetch error\r\n */\r\n ContentRelatedFeedFetchError: {\r\n id: 8702,\r\n source: ContentRelatedSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst CookieConsentBannerHelper = \"MsccCookieConsentHelper.ts\";\r\nexport const CookieConsentBannerHelperErrors = {\r\n FailedToParseStaticsUrls: {\r\n id: 8810,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n ScriptsNotFound: {\r\n id: 8811,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n StyleSheetsNotFound: {\r\n id: 8812,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n FailedToMountScript: {\r\n id: 8813,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n FailedToMountStyleSheet: {\r\n id: 8814,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents IFrame related errors */\r\nconst IFrameSourceFile = \"IFrame.tsx\";\r\nexport const IFrameErrors = {\r\n /** Message received by event listener not from expected origin */\r\n IFrameUnallowedOriginMessage: {\r\n id: 8820,\r\n source: IFrameSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const RightRailCarouselAppErrors = {\r\n NoChildrenExperienceFoundError: {\r\n id: 8830,\r\n source: \"RightRailCarousel.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst Cookies = \"Cookies.ts\";\r\nexport const CookieRelatedErrors = {\r\n SharedStateConnectorNull: {\r\n id: 8840,\r\n source: Cookies,\r\n severity,\r\n pb\r\n },\r\n\r\n CookieNotCategorized: {\r\n id: 8841,\r\n source: Cookies,\r\n severity: Severity.HighImpact,\r\n pb\r\n }\r\n};\r\n\r\nexport const BreakingNewsErrors = {\r\n /** Error fetching Breaking News content */\r\n ContentFetchError: {\r\n id: 8901,\r\n source: \"BreakingNews.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Error fetching Blowout content */\r\n BlowoutDocumentFetchError: {\r\n id: 8902,\r\n source: \"BreakingNews.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const BlowoutErrors = {\r\n /** Error fetching Blowout content */\r\n ContentFetchError: {\r\n id: 8921,\r\n source: \"Blowout.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const OverlayErrors: { [name: string]: AppError } = {\r\n /** Error loading experience */\r\n LoadExperienceError: {\r\n id: 8941,\r\n source: \"Overlay.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const ViewsCommonAppErrors = {\r\n /** Invalid intra article component metadata passed. */\r\n InvalidIntraArticleDataError: {\r\n id: 9001,\r\n source: \"IntraArticleHelper.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch from data api. */\r\n DataFetchError: {\r\n id: 9002,\r\n source: \"ViewsServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Invalid content markup encountered. */\r\n InvalidDocumentContentError: {\r\n id: 9003,\r\n source: \"ViewsUtility.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load views paddle data from data api. */\r\n ViewsPaddleDataLoadError: {\r\n id: 9004,\r\n source: \"ViewsPaddle.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Error during app initialization for views page experience. */\r\n ViewsErrorPage: {\r\n id: 9005,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Error during mapping provider data for views content header experience */\r\n ProviderMapperError: {\r\n id: 9006,\r\n source: \"ViewContentHeader.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const LegacySharingToolbarAppErrors = {\r\n /** Failed to invoke legacy sharing toolbar. */\r\n LegacySharingToolbarInvokeError: {\r\n id: 9100,\r\n source: \"SharingHelper.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load sharing toolbar. */\r\n SharingToolbarLoadError: {\r\n id: 9101,\r\n source: \"LegacySharingToolbar.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Invalid source content id passed in. */\r\n InvalidContentIdError: {\r\n id: 9102,\r\n source: \"LegacySharingToolbar.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents ContentActionsToolbar experience related errors */\r\nconst ContentActionsToolbarConnectorSourceFile = \"ContentActionToolbar.connector.ts\";\r\nconst ContentActionsToolbarSourceFile = \"ContentActionToolbar.tsx\";\r\nconst ContentActionsToolbarServiceClientSourceFile = \"ContentActionToolbarServiceClient.tsx\";\r\nexport const ContentActionsToolbarAppErrors = {\r\n /** Failed to load sharing toolbar - 9120 */\r\n ContentActionsSharingToolbarLoadError: {\r\n id: 9120,\r\n source: ContentActionsToolbarConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Error fetching article data - 9121 */\r\n ContentActionsArticleDatafetchError: {\r\n id: 9121,\r\n source: ContentActionsToolbarConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Base Experience error - 9122 */\r\n ContentActionsBaseExperienceError: {\r\n id: 9122,\r\n source: ContentActionsToolbarSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Get content views action failed (getContentViewsRequest) - 9123 */\r\n ContentActionsGetDocumentDataError: {\r\n id: 9123,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Get content status action failed (getContentStatusRequest) - 9124 */\r\n ContentActionsGetContentStatusActionError: {\r\n id: 9124,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Delete action failed (Unlike/Undislike) - 9125 */\r\n ContentActionsDeleteActionError: {\r\n id: 9125,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Post action failed (Like/Dislike) - 9126 */\r\n ContentActionsPostActionError: {\r\n id: 9126,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Prime hybrid error loading the experience - 9127 */\r\n ContentActionsExperienceLoadError: {\r\n id: 9127,\r\n source: ContentActionsToolbarSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Missing vert/horiz placeholder to flip toolbar - 9128 */\r\n ContentActionsFlipToolbarError: {\r\n id: 9128,\r\n source: ContentActionsToolbarSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Failed fetching contentStatus - 9129 */\r\n ContentActionsContentStatusFetchError: {\r\n id: 9129,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Failed fetching contentPreview - 9130 */\r\n ContentActionsContentPreviewFetchError: {\r\n id: 9130,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const ContentSharingToolbarAppErrors = {\r\n ContentSharingToolbarInitializationError: {\r\n id: 9150,\r\n source: \"ContentSharingToolbar.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const ContentSharingToolbarSaveForLaterServiceError: AppError = {\r\n id: 9151,\r\n source: \"SaveForLaterServiceClient.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ContentProviderAppErrors = {\r\n /** Invalid source article/gallery id passed in. */\r\n InvalidSourceIdError: {\r\n id: 9200,\r\n source: \"ContentProvider.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch provider details. */\r\n ProviderDetailsFetchError: {\r\n id: 9201,\r\n source: \"ContentProvider.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch provider feed. */\r\n ProviderFeedFetchError: {\r\n id: 9202,\r\n source: \"ContentProvider.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Invalid layout template passed in. */\r\n InvalidLayoutTemplate: {\r\n id: 9203,\r\n source: \"ContentProvider.templates.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** ApplicationCache related messages */\r\nconst refreshHeadDataFile = \"Appcache/RefreshHeadDataAppCache.ts\";\r\nconst edgeAppCacheHelperFile = \"Appcache/EdgeApplicationCacheHelper.ts\";\r\nconst refreshHeadDataAppCacheFile = \"page-error-handling/AppCacheErrorHandler.ts\";\r\n\r\nexport const ApplicationCacheMessages = {\r\n FailedToFetchHeadData: {\r\n id: 9310,\r\n source: refreshHeadDataFile,\r\n severity,\r\n pb\r\n },\r\n CatastrophicFailedToFetchHeadData: {\r\n id: 9311,\r\n source: refreshHeadDataFile,\r\n severity,\r\n pb\r\n },\r\n StaleActivityIdEncountered: {\r\n id: 9312,\r\n source: refreshHeadDataFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /**\r\n * The current DOM that is in AppCache doesn't match what should be getting served\r\n * to the user due to the existence of the ntps cookie that defines what the locale should be.\r\n * In this case, we must bypass AppCache to get the proper DOM from PCS.\r\n */\r\n LocaleMismatch: {\r\n id: 9313,\r\n source: edgeAppCacheHelperFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /**\r\n * Our checks determining we need to bypass appcache for the user are failing\r\n * to detect that the appcache refresh has succeeded. We've tried, for the current page view, to\r\n * bypass without any success.\r\n */\r\n RapidAppcacheForcedRefreshes: {\r\n id: 9314,\r\n source: edgeAppCacheHelperFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n ApplicationCacheAPIErrorEvent: {\r\n id: 9317,\r\n source: refreshHeadDataAppCacheFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n ApplicationCacheAPIObsoleteEvent: {\r\n id: 9318,\r\n source: refreshHeadDataAppCacheFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst MsRewardsConnectorSourceFile = \"MsRewards.connector.ts\";\r\nexport const MsRewardsAppErrors = {\r\n RewardsDataConnectorUndefined: {\r\n id: 9400,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n CategoryKeyOrAppTypeUndefined: {\r\n id: 9401,\r\n source: MsRewardsConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n FailedToFetchCoachmarkUXConfig: {\r\n id: 9402,\r\n source: MsRewardsConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n ConfigDataUndefined: {\r\n id: 9403,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n FailedToFetchConfigData: {\r\n id: 9404,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ExceptionFetchingConfigData: {\r\n id: 9405,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ChromiumPageSettingsDataConnectorUndefined: {\r\n id: 9406,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n PageSettingsStateUndefined: {\r\n id: 9407,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst RewardsDataConnectorSourceFile = \"RewardsData.connector.ts\";\r\nconst RewardsPayloadSourceFile = \"RewardsPayload.ts\";\r\nconst RewardsServiceClientSourceFile = \"RewardsServiceClient.ts\";\r\nexport const RewardsDataAppErrors = {\r\n IrisDataConnectorUndefined: {\r\n id: 9421,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n CoachmarkDataConnectorUndefined: {\r\n id: 9424,\r\n source: RewardsDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ErrorFetchingUserProfile: {\r\n id: 9425,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ExceptionFetchingUserProfile: {\r\n id: 9426,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ExceptionReportingRewardActivity: {\r\n id: 9427,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BadRequestReportingRewardActivity: {\r\n id: 9428,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n OfferIdNotDefined: {\r\n id: 9429,\r\n source: RewardsDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ActionNameNotDefined: {\r\n id: 9430,\r\n source: RewardsDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidParameters: {\r\n id: 9431,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n UnknownErrorsReportingRewardActivity: {\r\n id: 9432,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n UnknownErrorOccurred: {\r\n id: 9433,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n MaxRetryReachedForUpdatingRewardsPoints: {\r\n id: 9434,\r\n source: RewardsDataConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst TrendingNewsCardConnectorFile = \"mobile-feed/trending-news/TrendingNews.connector.ts\";\r\n/** Failed to fetch the trending news card in mobile feed */\r\nexport const TrendingNewsDataFetchError: AppError = {\r\n id: 9501,\r\n source: TrendingNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to parse JSON data for trending news in mobile feed */\r\nexport const TrendingNewsDataParseError: AppError = {\r\n id: 9502,\r\n source: TrendingNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Received null or empty response for trending news in mobile feed */\r\nexport const TrendingNewsEmptyResponseDataError: AppError = {\r\n id: 9503,\r\n source: TrendingNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingServiceClientSourceFile = \"mobile-feed/shopping-connector/ShoppingServiceClient.ts\";\r\n/** Received null or empty response for ShoppingServiceClient */\r\nexport const ShoppingTrendingProductDataError: AppError = {\r\n id: 9504,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingMetaDataError: AppError = {\r\n id: 9505,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingRecentPriceDropsDataError: AppError = {\r\n id: 9506,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingRecommendedForYouProductsDataError: AppError = {\r\n id: 9507,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingRecommendedForYouProductDealsDataError: AppError = {\r\n id: 9508,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingMomentInTimeDataError: AppError = {\r\n id: 9509,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingForYouDataError: AppError = {\r\n id: 9510,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingPopularProductDealDataError: AppError = {\r\n id: 9511,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingMerchantDealDataError: AppError = {\r\n id: 9512,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingMerchantCatDealDataEnUsError: AppError = {\r\n id: 9513,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingMerchantCatDealDataEnGbError: AppError = {\r\n id: 9514,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingTrendingCatDataError: AppError = {\r\n id: 9515,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingTrendingCatProductsDataError: AppError = {\r\n id: 9516,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingTrendingCatDealsDataError: AppError = {\r\n id: 9517,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingTrendingDealsDataError: AppError = {\r\n id: 9518,\r\n source: ShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst LocalNewsCardConnectorFile = \"LocalNews.connector.ts\";\r\n/** Failed to fetch the local news card in mobile feed*/\r\nexport const LocalNewsDataFetchError: AppError = {\r\n id: 9601,\r\n source: LocalNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to parse JSON data for local news in mobile feed */\r\nexport const LocalNewsDataParseError: AppError = {\r\n id: 9602,\r\n source: LocalNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Received null or empty response for local news in mobile feed */\r\nexport const LocalNewsEmptyResponseDataError: AppError = {\r\n id: 9603,\r\n source: LocalNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedConnectorFile = \"mobile-feed/MobileFeed.connector.ts\";\r\n/** Failed to prefetch data for mobile feed in super app */\r\nexport const MobileFeedPrefetchError: AppError = {\r\n id: 9701,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed in super app */\r\nexport const MobileFeedPrefetchParseError: AppError = {\r\n id: 9702,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Sesion id not found on next page url in oneservice response */\r\nexport const MobileFeedSessionIdNotFound: AppError = {\r\n id: 9703,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch mobile feed data from bridge get http method. */\r\nexport const MobileFeedBridgeGetHttpError: AppError = {\r\n id: 9704,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON parse mobile feed data from bridge get http method. */\r\nexport const MobileFeedBridgeGetHttpParseError: AppError = {\r\n id: 9705,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Timeout in fetching mobile feed data from bridge get http method */\r\nexport const MobileFeedBridgeGetHttpTimeout: AppError = {\r\n id: 9706,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch mobile feed data from network get http method. */\r\nexport const MobileFeedNetworkGetHttpError: AppError = {\r\n id: 9707,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON parse mobile feed data from bridge get http method. */\r\nexport const MobileFeedNetworkGetHttpParseError: AppError = {\r\n id: 9708,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Recieved empty data from Oneservice network call. */\r\nexport const MobileFeedNetworkEmptyData: AppError = {\r\n id: 9709,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedShoppingFile = \"mobile-feed/shopping-connector/ShoppingServiceClient.ts\";\r\n/** Failed to prefetch data for mobile feed shopping in super app */\r\nexport const MobileFeedShoppingPrefetchError: AppError = {\r\n id: 9711,\r\n source: MobileFeedShoppingFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed shopping in super app */\r\nexport const MobileFeedShoppingPrefetchParseError: AppError = {\r\n id: 9712,\r\n source: MobileFeedShoppingFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedFinanceGlanceCardFile = \"mobile-feed/glance-stripe/FinanceGlanceCard.connector.ts\";\r\n/** Failed to prefetch data for mobile feed fiance glance card in super app */\r\nexport const MobileFeedFinanceGlanceCardPrefetchError: AppError = {\r\n id: 9721,\r\n source: MobileFeedFinanceGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed finance glance card in super app */\r\nexport const MobileFeedFinanceGlanceCardPrefetchParseError: AppError = {\r\n id: 9722,\r\n source: MobileFeedFinanceGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedEsportsGlanceCardFile = \"mobile-feed/glance-stripe/EsportsGlanceCard.connector.ts\";\r\n/** Failed to prefetch data for mobile feed Esports glance card in super app */\r\nexport const MobileFeedEsportsGlanceCardPrefetchError: AppError = {\r\n id: 9731,\r\n source: MobileFeedEsportsGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed Esports glance card in super app */\r\nexport const MobileFeedEsportsGlanceCardPrefetchParseError: AppError = {\r\n id: 9732,\r\n source: MobileFeedEsportsGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst SuperAppHomepageFile = \"app-types/superapp/Homepage.ts\";\r\nconst SuperAppPersonalizeFile = \"app-types/superapp/Personalize.ts\";\r\n/** Failed to prefetch mobile feed config in super app */\r\nexport const MobileFeedConfigPrefetchError: AppError = {\r\n id: 9741,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched config for mobile feed in super app */\r\nexport const MobileFeedConfigPrefetchParseError: AppError = {\r\n id: 9742,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch mobile feed config in super app */\r\nexport const MobileFeedConfigFetchError: AppError = {\r\n id: 9743,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase fetched config for mobile feed in super app */\r\nexport const MobileFeedConfigFetchParseError: AppError = {\r\n id: 9744,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to generate config url in super app homepage */\r\nexport const MobileFeedConfigGetUrlError: AppError = {\r\n id: 9745,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch InterestV3 config in super app */\r\nexport const InterestV3ConfigFetchError: AppError = {\r\n id: 9746,\r\n source: SuperAppPersonalizeFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch InterestV3 config in super app */\r\nexport const InterestV3ConfigGetUrlError: AppError = {\r\n id: 9747,\r\n source: SuperAppPersonalizeFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to parse super app homepage user config object from local storage */\r\nexport const localStorageUserConfigObjectParseError: AppError = {\r\n id: 9748,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to write super app homepage user config object in to local storage */\r\nexport const localStorageUserConfigObjectWriteError: AppError = {\r\n id: 9749,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Timeout in fetching config for mobile feed in super app */\r\nexport const MobileFeedConfigFetchTimeoutError: AppError = {\r\n id: 9750,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch mobile feed config via network in super app */\r\nexport const MobileFeedConfigNetworkFetchError: AppError = {\r\n id: 9751,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase mobile feed config fetched via network in super app */\r\nexport const MobileFeedConfigNetworkFetchParseError: AppError = {\r\n id: 9752,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedActionMenuHelperFile = \"ActionMenuHelper.ts\";\r\n/** OneService call failed for action menu Actions type */\r\nexport const MobileFeedActionMenuServiceCallFailedError: AppError = {\r\n id: 9760,\r\n source: MobileFeedActionMenuHelperFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Action menu Sapphire bridge api returned with error response */\r\nexport const MobileFeedActionMenuServiceCallParsedError: AppError = {\r\n id: 9761,\r\n source: MobileFeedActionMenuHelperFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Action menu Sapphire bridge api returned with error response */\r\nexport const MobileFeedActionMenuBridgeCallFailedError: AppError = {\r\n id: 9762,\r\n source: MobileFeedActionMenuHelperFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst TopicCarouselConnectorFile = \"TopicCarousel.connector.ts\";\r\n/** Failed to fetch the topic carousel in mobile feed*/\r\nexport const TopicCarouselDataFetchError: AppError = {\r\n id: 9801,\r\n source: TopicCarouselConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Received null or empty response for topic carousel in mobile feed */\r\nexport const TopicCarouselEmptyResponseDataError: AppError = {\r\n id: 9802,\r\n source: TopicCarouselConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to parse content url */\r\nexport const FailedToParseContentUrl: AppError = {\r\n id: 9851,\r\n source: \"mobile-feed/src/helpers/common.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Screen width in SA is zero */\r\nexport const ZeroScreenWidth: AppError = {\r\n id: 9861,\r\n source: \"mobile-feed/src/helpers/DisplayHelper.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedRewardsGlanceCardFile = \"mobile-feed/src/glance-stripe/rewards/RewardsGlanceCard.connector.ts\";\r\n/** Failed to prefetch data for mobile feed rewards glance card in super app */\r\nexport const MobileFeedRewardsGlanceCardPrefetchError: AppError = {\r\n id: 9871,\r\n source: MobileFeedRewardsGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed finance glance card in super app */\r\nexport const MobileFeedRewardsGlanceCardPrefetchParseError: AppError = {\r\n id: 9872,\r\n source: MobileFeedRewardsGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ViewsGallerySourceFile = \"ViewsGallery.connector.ts\";\r\nexport const ViewsGalleryAppErrors = {\r\n /** Invalid gallery id passed. */\r\n InvalidGalleryIdError: {\r\n id: 10001,\r\n source: ViewsGallerySourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load gallery data. */\r\n GalleryDataLoadError: {\r\n id: 10010,\r\n source: ViewsGallerySourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load images. */\r\n GalleryImagesLoadError: {\r\n id: 10020,\r\n source: ViewsGallerySourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst SlideShowConnectorFile = \"SlideShow.connector.ts\";\r\nconst SlideShowCarouselFile = \"SlideShowCarousel.tsx\";\r\nexport const SlideShowAppErrors = {\r\n /** Invalid slideshow id passed. */\r\n InvalidSlideShowIdError: {\r\n id: 10100,\r\n source: SlideShowConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load slideshow data. */\r\n SlideShowDataLoadError: {\r\n id: 10110,\r\n source: SlideShowConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load images. */\r\n SlideShowImagesLoadError: {\r\n id: 10120,\r\n source: SlideShowConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to ads refresh. */\r\n SlideShowAdsRefreshError: {\r\n id: 10130,\r\n source: SlideShowCarouselFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load image. */\r\n SlideShowImageLoadFailed: {\r\n id: 10135,\r\n source: SlideShowCarouselFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const VideoListAppErrors = {\r\n /** Failed to load the video list data. */\r\n VideoListDataLoadError: {\r\n id: 11001,\r\n source: \"VideoList.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst VideoContentSourceFile = \"VideoContent.connector.ts\";\r\nexport const VideoContentAppErrors = {\r\n /** Failed to load the video content data. */\r\n InvalidResponseFromVideoContentResponseJson: {\r\n id: 11101,\r\n source: VideoContentSourceFile,\r\n severity\r\n },\r\n /** Failed to fetch the video content data from server. */\r\n ErrorWhileFetchingContentPreviewContent: {\r\n id: 11102,\r\n source: VideoContentSourceFile,\r\n severity\r\n }\r\n};\r\n\r\nconst VideoContentDownScriptFile = \"AdsHelper.ts\";\r\n/** Failed to download external script file for content video player */\r\nexport const DownloadScriptError: AppError = {\r\n id: 11103,\r\n source: VideoContentDownScriptFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ViewsArticleSourceFile = \"ViewsArticle.connector.ts\";\r\nexport const ViewsArticleAppErrors = {\r\n /** Invalid article id passed. */\r\n InvalidArticleIdError: {\r\n id: 12001,\r\n source: ViewsArticleSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load article data. */\r\n ArticleDataLoadError: {\r\n id: 12002,\r\n source: ViewsArticleSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load intra-article component. */\r\n IntraArticleComponentLoadError: {\r\n id: 12003,\r\n source: ViewsArticleSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to invoke inline gallery experience. */\r\n InlineGalleryInvokeError: {\r\n id: 12004,\r\n source: ViewsArticleSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Set of errors in Article Page.\r\n */\r\nconst ArticleParserFileName = \"ArticleParser.ts\";\r\nconst ArticleVideoParserFileName = \"VideoParser.ts\";\r\nexport const ArticleInvalidContentError: AppError = {\r\n id: 12100,\r\n source: ArticleParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ArticleInvalidVideoIdError: AppError = {\r\n id: 12101,\r\n source: ArticleParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ArticleInvalidSlideshowIdError: AppError = {\r\n id: 12102,\r\n source: ArticleParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ArticleInvalidVideoContentError: AppError = {\r\n id: 12103,\r\n source: ArticleVideoParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ArticleCopyrightTruncateError: AppError = {\r\n id: 12104,\r\n source: ArticleParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ArticleCreateElementError: AppError = {\r\n id: 12105,\r\n source: ArticleParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const InterestsSearchAppErrors = {\r\n /** Received non 200 from OneService */\r\n ErrorResponseFromOneService: {\r\n id: 13000,\r\n source: \"InterestsSearchServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Received a response from 200 but didn't have expected structure */\r\n ErrorResponseFromOneServiceIsInvalid: {\r\n id: 13001,\r\n source: \"InterestsSearchServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n /**\r\n * When building the XFeed URL for one of the suggestion items,\r\n * we weren't able to build a valid URL\r\n */\r\n InvalidUrlFoundForElement: {\r\n id: 13002,\r\n source: \"InterestsSearch.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /**\r\n * When building the XFeed URL for one of the suggestion items,\r\n * we weren't able to build a valid URL\r\n */\r\n SelectedItemNotFoundInSuggestions: {\r\n id: 13003,\r\n source: \"InterestsSearch.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /**\r\n * When building the XFeed URL for one of the suggestion items,\r\n * we weren't able to build a valid URL\r\n */\r\n SelectedItemIsInvalid: {\r\n id: 13004,\r\n source: \"InterestsSearch.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst InterestsConnectorFileName = \"Interests.connector.ts\";\r\nconst SettingsConnectorManagerFileName = \"Setting.connector.manager.ts\";\r\nconst TopicDataConnectorFileName = \"TopicData.connector.ts\";\r\nconst TopicCacheFileName = \"TopicCache.ts\";\r\nconst XfeedConnectorFileName = \"Xfeed.connector.ts\";\r\nexport const InterestsAppErrors = {\r\n /** We could not retrieve the list of Topics from OneService */\r\n InterestsRetrieveTopicsError: {\r\n id: 13100,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Followed Topics from OneService */\r\n InterestsRetrieveFollowedTopicsError: {\r\n id: 13101,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Muted Publishers from OneService */\r\n InterestsRetrieveMutedPublishersError: {\r\n id: 13102,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not UnMute a Muted Publisher */\r\n InterestsUnMutePublisherError: {\r\n id: 13103,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not follow a new interests topic */\r\n InterestsFollowTopicError: {\r\n id: 13104,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not unfollow an interests topic */\r\n InterestsUnfollowTopicError: {\r\n id: 13105,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** TopicState should not be undefined */\r\n InterestsTopicStateUndefined: {\r\n id: 13106,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Topics should have rendered */\r\n InterestsShouldHaveRendered: {\r\n id: 13107,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Could not retrieve a specific topic */\r\n InterestsRetrieveTopicError: {\r\n id: 13108,\r\n source: XfeedConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Saved Stories from OneService */\r\n InterestsRetrieveSavedStoriesError: {\r\n id: 13109,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Saved stories config is invalid */\r\n InterestsSavedStoriesInvalidConfigError: {\r\n id: 13110,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not load saved stories children */\r\n InterestsSavedStoriesChildLoadError: {\r\n id: 13111,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService response for saved stories had invalid json */\r\n InterestsSavedStoriesInvalidJsonError: {\r\n id: 13112,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService response for saved stories had invalid list of response */\r\n InterestsSavedStoriesInvalidListError: {\r\n id: 13113,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Recommended Topics from OneService */\r\n InterestsRetrieveRecommendedTopicsError: {\r\n id: 13114,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Topic Data Connector is not defined */\r\n UndefinedTopicDataConnector: {\r\n id: 13115,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Read Stories from OneService */\r\n InterestsRetrieveReadStoriesError: {\r\n id: 13116,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Read stories config is invalid */\r\n InterestsReadStoriesInvalidConfigError: {\r\n id: 13117,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not load Read stories children */\r\n InterestsReadStoriesChildLoadError: {\r\n id: 13118,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService response for Read stories had invalid json */\r\n InterestsReadStoriesInvalidJsonError: {\r\n id: 13119,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService response for Read stories had invalid list of response */\r\n InterestsReadStoriesInvalidListError: {\r\n id: 13120,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService failed resetting user default set of interests */\r\n FailedRestoringDefaultTopicsError: {\r\n id: 13121,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed opening topics IndexedDB connection */\r\n TopicsFailedIndexedDBConnection: {\r\n id: 13122,\r\n source: TopicCacheFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed getting topics indexedDB */\r\n TopicsFailedGettingIndexedDB: {\r\n id: 13123,\r\n source: TopicCacheFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed updating topics indexedDB */\r\n TopicsFailedUpdatingIndexedDB: {\r\n id: 13124,\r\n source: TopicCacheFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Failed updating segment card user settings to one service */\r\nexport const FailedUpdatingUserSegmentCardsPreferences: AppError = {\r\n id: 13125,\r\n source: SettingsConnectorManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed while checking if topic has limited data in feed */\r\nexport const TopicsFailedCheckingLimitedFeed: AppError = {\r\n id: 13126,\r\n source: TopicDataConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** We could not retrieve the user's list of Followed Publishers from OneService */\r\nexport const InterestsRetrieveFollowedPublishersError: AppError = {\r\n id: 13127,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Could not follow a publisher */\r\nexport const PublisherFollowTopicError: AppError = {\r\n id: 13128,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Could not unfollow a publisher */\r\nexport const PublisherUnfollowTopicError: AppError = {\r\n id: 13129,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** We could not retrieve the user's list of Work Topics from OneService */\r\nexport const InterestsRetrieveWorkTopicsError: AppError = {\r\n id: 13130,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ComponentConnector = \"ComponentConnector.ts\";\r\n\r\n/** {ComponentConnector} base app errors */\r\nexport const ComponentConnectorAppErrors = {\r\n\r\n /** Duplicate child experience instance found */\r\n DuplicateChildInstanceFound: {\r\n id: 14000,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load bundle */\r\n BundleLoadError: {\r\n id: 14001,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** ChildConfigInfoList is null */\r\n ChildConfigInfoListNull: {\r\n id: 14002,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Merge List start position must be greater than 0 */\r\n ListStartPositionInvalid: {\r\n id: 14003,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to delay load child bundle */\r\n ChildDelayLoadError: {\r\n id: 14004,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Milestone dependency failed to resolve and timeout triggered */\r\n ExperienceDependencyTimeout: {\r\n id: 14005,\r\n source: ComponentConnector,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/** Data connector loading failed */\r\nexport const LoadDataConnectorConfigFailed: AppError = {\r\n id: 14006,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Data connector loading failed */\r\nexport const LoadDataConnectorFailed: AppError = {\r\n id: 14007,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Attempted to load child with invalid experience */\r\nexport const ChildWithInvalidExperience: AppError = {\r\n id: 14008,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** App errors for {ExperienceLoader} */\r\nexport const ExperienceLoaderAppErrors = {\r\n /** Logged when neither the config type nor config HREF was provided to the loader */\r\n InsufficientLoadArgs: {\r\n id: 14100,\r\n source: \"ExperienceLoader.ts\",\r\n severity: Severity.HighImpact,\r\n pb\r\n }\r\n};\r\n\r\n/** Logged when ConnectComponent call in getConnectedExperience fails */\r\nexport const ConnectComponentFailureError: AppError = {\r\n id: 14101,\r\n source: \"ExperienceLoader.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Logged when loadComponent fails */\r\nexport const LoadComponentFailureError: AppError = {\r\n id: 14102,\r\n source: \"ExperienceLoader.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents SearchHistoryCommon related App errors */\r\nconst SearchHistoryCommonSourceFile = \"SearchHistoryCommon.tsx\";\r\nexport const SearchHistoryCommonAppErrors = {\r\n /** Failed to parse search history response */\r\n ResponseParsingFailed: {\r\n id: 15000,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history service call failed */\r\n ServiceCallFailed: {\r\n id: 15001,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to render search history */\r\n RenderFailed: {\r\n id: 15002,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api response not received within configured time */\r\n Timeout: {\r\n id: 15003,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api call unauthorized */\r\n Unauthorized: {\r\n id: 15004,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api call forbidden */\r\n Forbidden: {\r\n id: 15005,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api not able to find recent search associated with this request */\r\n NotFound: {\r\n id: 15006,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api response not received within configured time but wait for searchHistoryFetchPromise to be completed */\r\n TimeoutDetail: {\r\n id: 15007,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents search history edgenext failed to render */\r\nexport const SearchHistoryEdgenextRenderFailed: AppError = {\r\n id: 15008,\r\n source: \"SearchHistoryEdgenext.tsx\",\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\nconst SearchHistoryEdgeNextSourceFile = \"SearchHistoryEdgenext.connector.ts\";\r\n/** Represents failed to retrieve account type */\r\nexport const FailedToRetrieveAccountType: AppError = {\r\n id: 15009,\r\n source: SearchHistoryEdgeNextSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents failed to retrieve account info */\r\nexport const FailedToRetrieveAccountInfo: AppError = {\r\n id: 15010,\r\n source: SearchHistoryEdgeNextSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents failed to get access token */\r\nexport const FailedToGetAccessToken: AppError = {\r\n id: 15011,\r\n source: SearchHistoryEdgeNextSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents a Search related error */\r\nexport const SearchError: AppError = {\r\n id: 15100,\r\n source: \"SearchBox.tsx\",\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Represents missing form code/parameters related App errors */\r\nexport const MissingFormCode: AppError = {\r\n id: 15101,\r\n source: \"SearchBoxCommon.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents RecommendedSearch related App errors */\r\nconst RecommendedSearchSourceFile = \"RecommendedSearchDataService.ts\";\r\nexport const RecommendedSearchErrors = {\r\n /** Warning for failed to parse recommended search response */\r\n ResponseParsingFailed: {\r\n id: 15200,\r\n source: RecommendedSearchSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** warning for recommended search service returned invalid Json response */\r\n InvalidJsonResponse: {\r\n id: 15201,\r\n source: RecommendedSearchSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Warning for recommended search service call failed */\r\n ServiceCallFailed: {\r\n id: 15202,\r\n source: RecommendedSearchSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Failed to render recommended searches */\r\n RenderFailed: {\r\n id: 15203,\r\n source: RecommendedSearchSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Warning for recommended search api response not received within configured time */\r\n Timeout: {\r\n id: 15204,\r\n source: RecommendedSearchSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** recommended search back fill failed to fetch content from CMS */\r\n ContentFetchError: {\r\n id: 15205,\r\n source: RecommendedSearchSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents recommende search below search box rendered failed to render */\r\nexport const RecommendedSearchBelowSearchBoxRenderFailed: AppError = {\r\n id: 15211,\r\n source: \"RecommendedSearchBelowSearchBox.tsx\",\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Represents Trending Now related app errors */\r\nconst TrendingNowSourceFile = \"TrendingNow.connector.ts\";\r\nexport const TrendingNowErrors = {\r\n /** Failed to fetch Trending now content from CMS */\r\n ContentFetchError: {\r\n id: 15250,\r\n source: TrendingNowSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch child experience config */\r\n FailedToFetchConfig: {\r\n id: 15251,\r\n source: TrendingNowSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load child experience */\r\n FailedToLoadChildExperience: {\r\n id: 15252,\r\n source: TrendingNowSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** OCID not set for canvas */\r\n OCIDNotSetWarning: {\r\n id: 15253,\r\n source: \"TrendingNowServiceClient.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst RelatedSearchesCardConnectorFile = \"RelatedSearchesCard.connector.ts\";\r\nexport const RelatedSearchesNoSearchTerm: AppError = {\r\n id: 15260,\r\n source: RelatedSearchesCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const RelatedSearchesServiceCallError: AppError = {\r\n id: 15261,\r\n source: RelatedSearchesCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const RelatedSearchesResponseEmpty: AppError = {\r\n id: 15262,\r\n source: RelatedSearchesCardConnectorFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents Voice Search related app errors */\r\nexport const VoiceSearchErrors = {\r\n /** Failed to render Voice Search */\r\n RenderFailed: {\r\n id: 15300,\r\n source: \"VoiceSearch.tsx\",\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n },\r\n\r\n /** Represents SearchBoxCommon Voice Search not configured App errors */\r\n SearchBoxCommonVoiceSearchError: {\r\n id: 15301,\r\n source: \"SearchBoxCommon.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Represents SearchBoxEdgeNext Voice Search not configured App errors */\r\n SearchBoxEdgeNextVoiceSearchError: {\r\n id: 15302,\r\n source: \"SearchBoxEdgeNext.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Represents Voice Search communication App errors */\r\n CommunicationsError: {\r\n id: 15303,\r\n source: \"VoiceSearch.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Image Search related app errors */\r\nconst ImageSearchConnectorFile = \"ImageSearch.connector.ts\";\r\n/** Failed to render Image Search */\r\nexport const ImageSearchRenderFailed: AppError = {\r\n id: 15400,\r\n source: \"ImageSearch.tsx\",\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Represents SearchBoxCommon Image Search not configured App errors */\r\nexport const SearchBoxCommonImageSearchError: AppError = {\r\n id: 15401,\r\n source: \"SearchBoxCommon.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents SearchBoxEdgeNext Image Search not configured App errors */\r\nexport const SearchBoxEdgeNextImageSearchError: AppError = {\r\n id: 15402,\r\n source: \"SearchBoxEdgeNext.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents Image Search communication App errors */\r\nexport const ImageSearchCommunicationsError: AppError = {\r\n id: 15403,\r\n source: ImageSearchConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst PollsCardConnectorSourceFile = \"PollsCard.connector.ts\";\r\nconst PollsCardSchemaTransformerFile = \"PollsCard.SchemaTransformer.ts\";\r\nexport const PollsCardAppErrors = {\r\n /**\r\n * Failed to fetch polls list\r\n */\r\n PollsListFetchError: {\r\n id: 18000,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Failed to fetch poll data\r\n */\r\n PollDataFetchError: {\r\n id: 18001,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * No data{questions} for poll\r\n */\r\n PollsCardInvalidPoll: {\r\n id: 18002,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Invalid Poll Quiz\r\n */\r\n PollsCardInvalidQuizPoll: {\r\n id: 18003,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * PollsVoteError\r\n */\r\n PollsCardVoteError: {\r\n id: 18004,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * PollsMapStateToPropsError\r\n */\r\n PollsCardMapStateToPropsError: {\r\n id: 18005,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * PollsUnknownError\r\n */\r\n PollsUnknownError: {\r\n id: 18006,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Poll Result Percentage Error\r\n */\r\n PollsResultPercentageError: {\r\n id: 18007,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const PollAutoCuratedErrors = {\r\n /**\r\n * Poll Auto curate content error\r\n */\r\n PollAutoCuratedContentError: {\r\n id: 18008,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Poll Auto curate content error\r\n */\r\n PollAutoCuratedInvalid: {\r\n id: 18009,\r\n source: PollsCardSchemaTransformerFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Poll Auto curate content error\r\n */\r\n PollAutoCuratedResultsFetchError: {\r\n id: 18010,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n PollAutoCuratedResultsTransformError: {\r\n id: 18011,\r\n source: PollsCardSchemaTransformerFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst EdgeChromiumPageConnectorFileName = \"EdgeChromiumPage.connector.ts\";\r\nexport const EdgeNextAppErrors = {\r\n /**\r\n * Error during a critical error on the EdgeNext page. This can be during initialization or a react rendering error.\r\n */\r\n EdgeNextErrorPage: {\r\n id: 19000,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Error fetching the APP_ANON cookie on EdgeNext page load */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 19001,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on bundle syntax errors.\r\n */\r\n EdgeNextLocalNTPPageShownSyntaxErrors: {\r\n id: 19002,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on bundle failures.\r\n */\r\n EdgeNextLocalNTPPageShownBundleFailureErrors: {\r\n id: 19003,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on page exception.\r\n */\r\n EdgeNextLocalNTPPageShownPageExceptionError: {\r\n id: 19004,\r\n source: pageTsFileName,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on page exception.\r\n */\r\n EdgeNextLocalNTPPageShownJSSMismatchExceptionError: {\r\n id: 19005,\r\n source: pageTsFileName,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n },\r\n\r\n /**\r\n * When the page is redirected to the local NTP page due to an unavoidable network failure.\r\n */\r\n EdgeNextLocalNtpDueToNetwork: {\r\n id: 19006,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up reloading the NTP page on jss mismatch exception.\r\n */\r\n EdgeNextPageReloadedPageExceptionError: {\r\n id: 19010,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up reloading the NTP page on jss mismatch exception.\r\n */\r\n EdgeNextPageReloadedJSSMismatchExceptionError: {\r\n id: 19011,\r\n source: \"PersistRenderCache.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Errors when form code is missing for Edge Chromium Page.\r\n */\r\n EdgeChromiumPageMissingFormCode: {\r\n id: 19012,\r\n source: EdgeChromiumPageConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * When the is reloaded due to an unavoidable network failure.\r\n */\r\n EdgeNextPageReloadedDueToNetwork: {\r\n id: 19013,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * When the page fails to render due to an unavoidable network failure.\r\n */\r\n EdgeNextPageRenderFailedDueToNetwork: {\r\n id: 19014,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst AdRefreshSourceFile = \"AdsRefresh.ts\";\r\nconst ApnWrapperSourceFile = \"AppnexusWrapper.ts\";\r\nconst DisplayAdsAdsDetectionSourceFile = \"AdsDetection.ts\";\r\nconst DisplayAdsConnectorSourceFile = \"DisplayAds.connector.ts\";\r\nconst DisplayAdsManagerConnectorSourceFile = \"DisplayAdsManager.connector.ts\";\r\nconst NativeAdConnectorSourceFile = \"NativeAd.connector.ts\";\r\nconst OathWrapperSourceFile = \"OathAdsWrapper.ts\";\r\nconst JacWrapperSourceFile = \"JacAdsWrapper.ts\";\r\nconst PlacementManagerConnectorSourceFile = \"PlacementManager.connector.ts\";\r\nconst PlacementManagerCookieSyncSourceFile = \"PlacementManagerCookieSync.ts\";\r\nconst PlacementManagerCMSServiceSourceFile = \"PlacementManagerCMSService.ts\";\r\nconst NativeAdClientConnectorSourceFile = \"NativeAdClient.connector.ts\";\r\nconst PartnerScriptLoaderFile = \"PartnerScriptLoader.ts\";\r\nconst NativeAdBeaconSourceFile = \"Beacon.ts\";\r\n\r\nexport const MonetizationAppErrors = {\r\n /** Failed to load Placement Manager. */\r\n PlacementManagerLoadError: {\r\n id: 20000,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load arrangement position on native ad experience. */\r\n ArrangementPositionLoadError: {\r\n id: 20001,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get CMS Content. */\r\n GetCMSContentError: {\r\n id: 20002,\r\n source: PlacementManagerCMSServiceSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get SAM RTB Response. */\r\n GetSAMRTBResponseError: {\r\n id: 20003,\r\n source: PlacementManagerConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load MediaNet End Of Article Block. */\r\n MediaNetEOABError: {\r\n id: 20005,\r\n source: \"medianetNativeAdOnArticle.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Invalid promo module config */\r\n InvalidPromoModuleConfig: {\r\n id: 20006,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to download cookie sync external script. */\r\n CookieSyncDownloadExternalScriptError: {\r\n id: 20007,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Missing cookie sync external script. */\r\n CookieSyncMissingExternalScriptUrl: {\r\n id: 20008,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Cookie sync timeout. */\r\n CookieSyncTimeout: {\r\n id: 20009,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Cookie sync partner script error */\r\n CookieSyncPartnerScriptError: {\r\n id: 20010,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Cookie pixel sync partner download error */\r\n CookieSyncPixelPartnerDownloadError: {\r\n id: 20011,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load cms or backfill native ad. */\r\n CMSOrBackfillNativeAdLoadError: {\r\n id: 20012,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load cms or backfill native ad. */\r\n PlacementPositionMismatchingError: {\r\n id: 20013,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Missing required property on placement manager config */\r\n MissingRequiredPropertyPlacementManagerConfig: {\r\n id: 20014,\r\n source: PlacementManagerConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Missing page type target scope. */\r\n NativeAdTargetScopeError: {\r\n id: 20016,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** River video ad partner error. */\r\n RiverVideoAdPartnerError: {\r\n id: 20017,\r\n source: PartnerScriptLoaderFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** JsTracker ad partner script load error. */\r\n JsTrackerPartnerScriptLoadError: {\r\n id: 20018,\r\n source: NativeAdBeaconSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Viglink load error. */\r\n ViglinkError: {\r\n id: 20019,\r\n source: PartnerScriptLoaderFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Missing topic id for stripe native ad */\r\n MissingTopicId: {\r\n id: 20020,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Topic id not found for stripe native ad */\r\n TopicIdNotFound: {\r\n id: 20021,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get SAM RTB Response. This App error doesn't trigger alert */\r\n GetSAMRTBResponseErrorNoAlert: {\r\n id: 20022,\r\n source: PlacementManagerConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Failed to load Oath JS */\r\n DisplayAdsOathLoadError: {\r\n id: 20050,\r\n source: OathWrapperSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load AppNexus JS */\r\n DisplayAdsApnLoadError: {\r\n id: 20051,\r\n source: ApnWrapperSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** AppNexus Provider was empty */\r\n DisplayAdsApnEmptyProvider: {\r\n id: 20052,\r\n source: ApnWrapperSourceFile,\r\n severity: Severity.Alert\r\n },\r\n\r\n /** Ads Detection no initialized properly Provider was empty */\r\n DisplayAdsAdsDetectionNotInit: {\r\n id: 20053,\r\n source: DisplayAdsAdsDetectionSourceFile,\r\n severity: Severity.Alert,\r\n pb\r\n },\r\n\r\n /** Failed to load Moat JS */\r\n DisplayAdsMoatLoadError: {\r\n id: 20054,\r\n source: DisplayAdsManagerConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Display ad objects were not available for refresh */\r\n DisplayAdsNoAdObjects: {\r\n id: 20055,\r\n source: AdRefreshSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** There was a problem in encoding CMS provider ID from base 62 to 32 */\r\n DisplayAdsProviderIdEncode: {\r\n id: 20056,\r\n source: DisplayAdsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load Jac JS */\r\n DisplayAdsJacLoadError: {\r\n id: 20057,\r\n source: JacWrapperSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Display Ad size is not valid */\r\n DisplayAdsInvalidSizeError: {\r\n id: 20058,\r\n source: JacWrapperSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** parameter for rendering ads is invalid */\r\n DisplayAdsInvalidParameterError: {\r\n id: 20059,\r\n source: JacWrapperSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const TaboolaRiverAppErrors = {\r\n /** Failed to fetch taboola river data. */\r\n TaboolaRiverFetchError: {\r\n id: 20100,\r\n source: \"TaboolaRiver.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst NativeAdServiceFile = \"NativeAdService.ts\";\r\nconst CMSAdServiceFile = \"CMSAdService.ts\";\r\nconst SAMAdServiceFile = \"SAMAdService.ts\";\r\n\r\n/** Failed to get valid Response from AdService library */\r\nexport const GetNativeAdRequestError: AppError = {\r\n id: 20150,\r\n source: NativeAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid Response from AdService library */\r\nexport const GetNativeAdResponseError: AppError = {\r\n id: 20151,\r\n source: NativeAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid CMS Response from AdService library */\r\nexport const GetCMSAdResponseError: AppError = {\r\n id: 20152,\r\n source: CMSAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBResponseErrorNoAlert: AppError = {\r\n id: 20153,\r\n source: SAMAdServiceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBRequestError: AppError = {\r\n id: 20154,\r\n source: SAMAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBResponseError: AppError = {\r\n id: 20155,\r\n source: SAMAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBResponseParseError: AppError = {\r\n id: 20156,\r\n source: SAMAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBResponseException: AppError = {\r\n id: 20157,\r\n source: SAMAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst NativeAdFeedCardFile = \"NativeAdFeedCard.connector.ts\";\r\nconst NativeAdGlanceCardFile = \"NativeAdGlanceCard.connector.ts\";\r\n\r\n/** Failed to get valid Response from AdService library in SuperApp Feed card*/\r\nexport const GetNativeAdFeedCardError: AppError = {\r\n id: 20160,\r\n source: NativeAdFeedCardFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Failed to get valid Response from AdService library in SuperApp Glance card*/\r\nexport const GetNativeAdGlanceCardError: AppError = {\r\n id: 20161,\r\n source: NativeAdGlanceCardFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nconst PCSPageHTMLFile = \"PCS-Page.cshtml\";\r\nexport const CoreLibAppErrors = {\r\n /** Deprecated composition layout config in use */\r\n DeprecatedCompositionLayoutUsed: {\r\n id: 20200,\r\n source: \"LayoutBase.inspector.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Deprecated composition layout config in use */\r\n InvalidColumnInGridConfig: {\r\n id: 20201,\r\n source: \"GridBase.inspector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error during loading of page bundles.\r\n */\r\n ErrorLoadingBundle: {\r\n id: 20202,\r\n source: PCSPageHTMLFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n /**\r\n * Generic JS exceptions.\r\n */\r\n GenericJSException: {\r\n id: 20203,\r\n source: PCSPageHTMLFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Missing localStorage exception\r\n */\r\n LocalStorageDoesntExist: {\r\n id: 20204,\r\n source: \"WebStorage.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Missing sessionStorage exception\r\n */\r\n SessionStorageDoesntExist: {\r\n id: 20205,\r\n source: \"WebStorage.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Exception thrown during rendering in React, with no additional handling specified.\r\n * This means React has unmounted your DOM tree and you'll be getting a blank page.\r\n */\r\n ReactRenderException: {\r\n id: 20206,\r\n source: PCSPageHTMLFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n },\r\n\r\n /** App Error to log network connection status */\r\n NetworkConnectionStatus: {\r\n id: 20207,\r\n source: \"NetworkCheck.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Authenticatedfetch related App errors */\r\nconst AuthenticatedFetchSourceFile = \"AuthenticatedFetch.ts\";\r\nexport const AuthenticatedFetchErrors = {\r\n ErrorCodeReceived: {\r\n id: 20302,\r\n source: AuthenticatedFetchSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n CallFailed: {\r\n id: 20303,\r\n source: AuthenticatedFetchSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n EmptyJsonResponse: {\r\n id: 20304,\r\n source: AuthenticatedFetchSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst resolverSourceFile = \"resolver.ts\";\r\nexport const ResolverAppErrors = {\r\n /**\r\n * IndexedDb write failed in resolver.\r\n */\r\n IndexedDbWriteFailed: {\r\n id: 22010,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb read failed in resolver.\r\n */\r\n IndexedDbReadFailed: {\r\n id: 22011,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Config Service Resolver fetch errors.\r\n */\r\n CrsFetchError: {\r\n id: 22012,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Config Service Resolver was enabled but we still went to Assets to getConfig and merge configs at client (classic resolver).\r\n */\r\n ReceivedConfigFromCdnAsCrsFetchFailed: {\r\n id: 22013,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Exception In GetConfig function.\r\n */\r\n GetConfigException: {\r\n id: 22014,\r\n source: resolverSourceFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n },\r\n\r\n /**\r\n * IndexedDb bulk read failed in resolver.\r\n */\r\n IndexedDbBulkReadFailed: {\r\n id: 22015,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb failed to remove cached config\r\n */\r\n IndexedDbFailedToRemoveCachedConfig: {\r\n id: 22016,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb failed to clear all configs\r\n */\r\n IndexedDbFailedToClearAllCachedConfigs: {\r\n id: 22017,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Render cache is purged due to changes in config\r\n */\r\n RenderCachePurgedDueToChangesInConfig: {\r\n id: 22018,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Render cache failed purge even though config changes were detected.\r\n */\r\n FailedToPurgeRenderCache: {\r\n id: 22019,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Failed to refresh config cache\r\n */\r\n RefreshConfigCacheFailed: {\r\n id: 22020,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Failed to initialize indexedDb\r\n */\r\n IndexedDbInitFailed: {\r\n id: 22021,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Different cache busting identifier\r\n */\r\n DifferentCbid: {\r\n id: 22022,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error writing prg flights to localStorage\r\n */\r\n PrgFlightLsWriteError: {\r\n id: 22023,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error reading prg flights to localStorage\r\n */\r\n PrgFlightLsReadError: {\r\n id: 22024,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Configs served from CDN after CRS fetch failed\r\n */\r\nexport const ResolverErrorConfigsDownloadedByCdn: AppError = {\r\n id: 22025,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Cached configs are for different flight\r\n */\r\nexport const CachedConfigsForDifferentFlight: AppError = {\r\n id: 22026,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * CRS sent non-200 response\r\n */\r\nexport const ConfigCrsFetchNon200Response: AppError = {\r\n id: 22027,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Cdn config fetch received non-200 response\r\n */\r\nexport const ConfigCdnFetchNon200Response: AppError = {\r\n id: 22028,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Invalid config ref received to resolve configs when Git configs is enabled\r\n */\r\nexport const GitConfigsInvalidConfigRef: AppError = {\r\n id: 22029,\r\n source: resolverSourceFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/**\r\n * Invalid configResolver object for Git configs flight\r\n */\r\nexport const GitConfigsInvalidConfigResolver: AppError = {\r\n id: 22030,\r\n source: resolverSourceFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\nexport const HubAppErrors = {\r\n /**\r\n * Error during app initialization for hub page experience.\r\n */\r\n HubErrorPage: {\r\n id: 22100,\r\n source: \"web.page.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Warning that hub server side rendering is skipped and client side rendering is triggered\r\n * due to either server error or slow server response.\r\n */\r\n HubSSRSkip: {\r\n id: 22110,\r\n source: \"web.page.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst EdgePageFileName = \"Edge/web.page.ts\";\r\n\r\n/** Edge App Type errors. */\r\nexport const EdgeAppErrors = {\r\n ErrorFetchingChildCookie: {\r\n id: 23000,\r\n source: EdgePageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error during app initialization for Edge page experience.\r\n */\r\n EdgeErrorPage: {\r\n id: 23001,\r\n source: EdgePageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error fetching the APP_ANON cookie on Edge page load\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 23002,\r\n source: EdgePageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error during set flight instrumentation data\r\n */\r\n ErrorSetFlightInstrumentation: {\r\n id: 23003,\r\n source: EdgePageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Warning that edge server side rendering is skipped and client side rendering is triggered\r\n * due to either server error or slow server response.\r\n */\r\n EdgeSSRSkip: {\r\n id: 23004,\r\n source: EdgePageFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const BingCardsAppErrors = {\r\n BingCardGetHotelAnswersError: {\r\n id: 24001,\r\n source: \"BingCardsServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n BingCardGetHotelErrorFromService: {\r\n id: 24002,\r\n source: \"BingCardsServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n BingCardGetAnswersError: {\r\n id: 24003,\r\n source: \"BingCardsExperience.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n BingCardInvalidEntityType: {\r\n id: 24004,\r\n source: \"BingCardsExperience.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n BingCardErrorOut: {\r\n id: 24005,\r\n source: \"BingCardsExperience.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const BingAnswersAppErrors = {\r\n UnknownError: {\r\n id: 24101,\r\n source: \"BingAnswers.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n FailedToLoadData: {\r\n id: 24102,\r\n source: \"BingAnswers.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n NoCardsContentType: {\r\n id: 24103,\r\n source: \"BingAnswers.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n NoCardsRelated: {\r\n id: 24104,\r\n source: \"BingAnswers.connector.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst BingShoppingShopCardServiceClientSourceFile =\r\n \"bing-shopping/ShopCardServiceClient.ts\";\r\n\r\nexport const BingShoppingShopCardError = {\r\n ShopCardServiceFetchError: {\r\n id: 24200,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceFetchInvalidResponse: {\r\n id: 24201,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceEmptyPersonalizedResponse: {\r\n id: 24202,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceInvalidPersonalizedResponse: {\r\n id: 24203,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceEmptyTrendingResponse: {\r\n id: 24204,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceInvalidTrendingResponse: {\r\n id: 24205,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst BingShoppingLifestyleCardServiceClientSourceFile =\r\n \"bing-shopping-lifestyle-card/BingShoppingLifestyleCardServiceClient.ts\";\r\n\r\nconst BingShoppingLifestyleCardCdnServiceClientSourceFile =\r\n \"bing-shopping-lifestyle-card/BingShoppingLifestyleCardCdnServiceClient.ts\";\r\n\r\nconst BingShoppingLifestyleAutosuggestServiceClientSourceFile =\r\n \"bing-shopping-lifestyle-card/BingShoppingLifestyleAutosuggestServiceClient.ts\";\r\n\r\nconst BingShoppingLifestyleConnectorSourceFile =\r\n \"bing-shopping-lifestyle-card/BingShoppingLifestyleCard.connector.ts\";\r\nexport const BingShoppingLifestyleCardError = {\r\n // Lifestyle Shopcard service Errors\r\n LifestyleShopCardServiceFetchError: {\r\n id: 24300,\r\n source: BingShoppingLifestyleCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardServiceFetchInvalidResponse: {\r\n id: 24301,\r\n source: BingShoppingLifestyleCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardServiceEmptyResponse: {\r\n id: 24302,\r\n source: BingShoppingLifestyleCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardServiceInvalidResponse: {\r\n id: 24303,\r\n source: BingShoppingLifestyleCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n // Lifestyle Shopcard Cdn service Errors\r\n LifestyleShopCardCdnServiceFetchError: {\r\n id: 24304,\r\n source: BingShoppingLifestyleCardCdnServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardCdnServiceFetchInvalidResponse: {\r\n id: 24305,\r\n source: BingShoppingLifestyleCardCdnServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardCdnServiceInvalidResponse: {\r\n id: 24306,\r\n source: BingShoppingLifestyleCardCdnServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n // Lifestyle Autosuggest service Errors\r\n LifestyleShopAutosuggestServiceFetchError: {\r\n id: 24310,\r\n source: BingShoppingLifestyleAutosuggestServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopAutosuggestServiceFetchInvalidResponse: {\r\n id: 24311,\r\n source: BingShoppingLifestyleAutosuggestServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopAutosuggestServiceEmptyResponse: {\r\n id: 24312,\r\n source: BingShoppingLifestyleAutosuggestServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopAutosuggestServiceInvalidResponse: {\r\n id: 24313,\r\n source: BingShoppingLifestyleAutosuggestServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopAutosuggestInvalidSuggestionUrl: {\r\n id: 24314,\r\n source: BingShoppingLifestyleConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ShoppingSmartListServiceClientSourceFile =\r\n \"shopping-smart-list/ShoppingSmartListServiceClient.ts\";\r\n\r\nconst ShoppingSmartListConnectorSourceFile =\r\n \"shopping-smart-list/ShoppingSmartList.connector.ts\";\r\n\r\nexport const ShoppingSmartListError = {\r\n ShoppingSmartListServiceEmptyResponse: {\r\n id: 24400,\r\n source: ShoppingSmartListServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShoppingSmartListServiceFetchError: {\r\n id: 24401,\r\n source: ShoppingSmartListServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShoppingSmartListServiceInvalidResponse: {\r\n id: 24402,\r\n source: ShoppingSmartListServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShoppingSmartListServiceMissingRequiredFields: {\r\n id: 24403,\r\n source: ShoppingSmartListServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShoppingSmartListChromiumApiConfigDataFetchFailure: {\r\n id: 24404,\r\n source: ShoppingSmartListConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst BingMiniShoppingServiceClientSourceFile =\r\n \"bing-mini-shopping/BingMiniShoppingServiceClient.ts\";\r\n\r\nexport const BingMiniShoppingError = {\r\n // Bing-MiniShopping service Errors\r\n BingMiniShoppingServiceFetchError: {\r\n id: 24500,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceEmptyResponse: {\r\n id: 24501,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInvalidResponse: {\r\n id: 24502,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInsufficientDealsItems: {\r\n id: 24503,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInsufficientActiveDealsItems: {\r\n id: 24504,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInsufficientTrendingItems: {\r\n id: 24505,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInsufficientTrendingCategories: {\r\n id: 24506,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst BingShoppingMeStripeServiceClientSourceFile =\r\n \"bing-shopping-mestripe/BingShoppingMeStripeServiceClient.ts\";\r\n\r\nexport const BingShoppingMeStripeServiceFetchError: AppError = {\r\n id: 24510,\r\n source: BingShoppingMeStripeServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingShoppingMeStripeServiceEmptyResponse: AppError = {\r\n id: 24511,\r\n source: BingShoppingMeStripeServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingShoppingMeStripeServiceInvalidResponse: AppError = {\r\n id: 24512,\r\n source: BingShoppingMeStripeServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingShoppingMeStripeServiceMissingRequiredFields: AppError = {\r\n id: 24513,\r\n source: BingShoppingMeStripeServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingCarouselServiceClientSourceFile =\r\n \"shopping-carousel/ShoppingCarouselServiceClient.ts\";\r\n\r\nexport const ShoppingCarouselEntitiesDataServiceFetchError: AppError = {\r\n id: 24520,\r\n source: ShoppingCarouselServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingCarouselEntitiesDataServiceEmptyResponse: AppError = {\r\n id: 24521,\r\n source: ShoppingCarouselServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingCarouselEntitiesDataServiceInvalidResponse: AppError = {\r\n id: 24522,\r\n source: ShoppingCarouselServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingCarouselEntitiesDataServiceInsufficientItems: AppError = {\r\n id: 24523,\r\n source: ShoppingCarouselServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingCarouselConnectorSourceFile =\r\n \"shopping-carousel/ShoppingCarousel.connector.ts\";\r\n\r\nexport const ShoppingCarouselGenericError: AppError = {\r\n id: 24524,\r\n source: ShoppingCarouselConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingCarouselSourceFile =\r\n \"shopping-carousel/ShoppingCarousel.tsx\";\r\n\r\nexport const ShoppingCarouselRenderError: AppError = {\r\n id: 24525,\r\n source: ShoppingCarouselSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingCarouselMapperSourceFile =\r\n \"shopping-carousel/ShoppingCarouselCardDataMapper.ts\";\r\n\r\nexport const ShoppingCarouselCardMapperError: AppError = {\r\n id: 24526,\r\n source: ShoppingCarouselMapperSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingContentCardServiceClientSourceFile =\r\n \"ShoppingContentCard.serviceClient.ts\";\r\n\r\nexport const ShoppingContentCardServiceFetchError: AppError = {\r\n id: 24530,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingContentCardServiceEmptyResponse: AppError = {\r\n id: 24531,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingContentServiceInvalidData: AppError = {\r\n id: 24532,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingContentServiceInsufficientActiveItems: AppError = {\r\n id: 24533,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingContentServiceMissingFields: AppError = {\r\n id: 24534,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error in page.ts of Shopping app type.\r\n */\r\nexport const ShoppingErrorPage: AppError = {\r\n id: 24900,\r\n source: \"Shopping/page.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nexport const PageSettingsDataConnectorAppErrors = {\r\n PageSettingsGetInitialState: {\r\n id: 26001,\r\n source: \"PageSettingsData.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MicrosoftNewsEntryPointFileName = \"MicrosoftNews.connector.ts\";\r\nexport const MicrosoftNewsEntryPointAppErrors = {\r\n /**\r\n * Error during app initialization for MicrosoftNews page experience.\r\n */\r\n MicrosoftNewsErrorPage: {\r\n id: 27000,\r\n source: MicrosoftNewsEntryPointFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const NavigationDataConnectorAppErrors = {\r\n /**\r\n * Error while trying to fetch the Navigation Items\r\n */\r\n NavigationDataGetNavigationItems: {\r\n id: 28000,\r\n source: \"NavigationData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n NavigationDataIndexedDbInitializationFailed: {\r\n id: 28001,\r\n source: \"NavigationData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n NavigationDataIndexedDbWriteFailed: {\r\n id: 28002,\r\n source: \"NavigationData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n NavigationDataIndexedDbBulkReadFailed: {\r\n id: 28003,\r\n source: \"NavigationData.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const CategoryDataConnectorAppErrors = {\r\n /**\r\n * Error while to get the category details\r\n */\r\n CategoryDataGetCategoryDetail: {\r\n id: 28100,\r\n source: \"CategoryData.connector.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n CategoryDataIndexedDbInitializationFailed: {\r\n id: 28101,\r\n source: \"CategoryData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n CategoryDataIndexedDbWriteFailed: {\r\n id: 28102,\r\n source: \"CategoryData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n CategoryDataIndexedDbBulkReadFailed: {\r\n id: 28103,\r\n source: \"CategoryData.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * App reporting messages related to OneService Content Data Connector\r\n */\r\nexport const OneServiceContentDataConnector = {\r\n /**\r\n * Message sent when a feature tries to update\r\n * the cache bypass value but the connector was not initialized\r\n * for the page\r\n */\r\n FailedToUpdateBypassValueConnectorNotInitialized: {\r\n id: 28200,\r\n source: \"OneServiceContentHelper.ts\",\r\n severity,\r\n pb\r\n },\r\n /**\r\n * Message sent when a feature tries to update\r\n * the cache bypass value but the connector was not initialized\r\n * for the page\r\n */\r\n FailedToGetBypassValueConnectorNotInitialized: {\r\n id: 28201,\r\n source: \"OneServiceContentHelper.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst OneSericeUtility = \"OneSericeFetch.ts\";\r\n/* App errors related to centralized OneService fetch call */\r\nexport const FetchResponseNullOrError: AppError = {\r\n id: 28210,\r\n source: OneSericeUtility,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const NonAuthFetchResponseNullOrError: AppError = {\r\n id: 28211,\r\n source: OneSericeUtility,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const AuthFetchResponseNullOrError: AppError = {\r\n id: 28212,\r\n source: OneSericeUtility,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * App reporting messages related to Stripe Experience\r\n */\r\nexport const StripeAppErrors = {\r\n InvalidConfig: {\r\n id: 28300,\r\n source: \"Stripe.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const NotificationBellErrors = {\r\n /** Failed to fetch the notification bell data content */\r\n DataFetchError: {\r\n id: 28400,\r\n source: \"NotificationBell.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n JsonParseError: {\r\n id: 28401,\r\n source: \"LocalStorageSettings.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n NewsItemDataFetchError: {\r\n id: 28402,\r\n source: \"NotificationBellServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n MalformedNewsItemResponseError: {\r\n id: 28403,\r\n source: \"NotificationBellServiceClient.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Layout Preference Data Connector related App errors */\r\nconst LayoutPreferenceDataSourceFile = \"LayoutPreferenceData.connector.ts\";\r\nexport const LayoutPreferenceDataErrors = {\r\n /** Failed to retrieve Layout Preference Data */\r\n LayoutPreferenceDataGetFailed: {\r\n id: 28500,\r\n source: LayoutPreferenceDataSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * App reporting messages related to StripeView Experience\r\n */\r\nexport const StripeViewAppErrors = {\r\n InvalidConfig: {\r\n id: 28600,\r\n source: \"StripeView.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n ChildLoadError: {\r\n id: 28601,\r\n source: \"StripeView.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Sentiment Line Chart Connector related app errors */\r\nconst SentimentLineChartSourceFile = \"SentimentLineChart.connector.ts\";\r\nexport const SentimentLineChartErrors = {\r\n ContentFetchError: {\r\n id: 28700,\r\n source: SentimentLineChartSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Sentiment Result Card Connector related app errors */\r\nconst SentimentResultCardSourceFile = \"SentimentResultCard.connector.ts\";\r\nexport const SentimentResultCardErrors = {\r\n ContentFetchError: {\r\n id: 28710,\r\n source: SentimentResultCardSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Sentiment Map Connector related app errors */\r\nconst SentimentMapSourceFile = \"SentimentMap.connector.ts\";\r\nexport const SentimentMapErrors = {\r\n ContentFetchError: {\r\n id: 28720,\r\n source: SentimentMapSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Election Results Card Connector related app errors */\r\nconst ElectionResultsCardFile = \"ElectionResultsCard.connector.ts\";\r\nexport const ElectionResultsCardErrors = {\r\n ContentFetchError: {\r\n id: 28730,\r\n source: ElectionResultsCardFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Sentiment Bar chart Connector related app errors */\r\nconst SentimentBarChartSourceFile = \"SentimentBarChart.connector.ts\";\r\nexport const SentimentBarChartErrors = {\r\n ContentFetchError: {\r\n id: 28740,\r\n source: SentimentBarChartSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Elction Result Map connector App errors */\r\nconst ElectionResultMapConnectorSourceFile = \"ElectionResultMap.connector.ts\";\r\nexport const ElectionResultMapConnectorErrors = {\r\n UnknownError: {\r\n id: 28750,\r\n source: ElectionResultMapConnectorSourceFile,\r\n severity\r\n },\r\n\r\n ContentFetchError: {\r\n id: 28751,\r\n source: ElectionResultMapConnectorSourceFile,\r\n severity\r\n }\r\n};\r\n\r\n/** Elction Result Map Inspector App errors */\r\nconst ElectionResultMapInspectorSourceFile = \"ElectionResultMap.inspector.ts\";\r\nexport const ElectionResultMapInspectorErrors = {\r\n EmptyResultSummaryError: {\r\n id: 28752,\r\n source: ElectionResultMapInspectorSourceFile,\r\n severity\r\n }\r\n};\r\n/** Elction Result Map App errors */\r\nconst ElectionResultMapSourceFile = \"ElectionResultMap.tsx\";\r\nexport const ElectionResultMapErrors = {\r\n FetchAndUpdateElectionDataError: {\r\n id: 28753,\r\n source: ElectionResultMapSourceFile,\r\n severity\r\n }\r\n};\r\n\r\n/** Election Editor's Note App errors */\r\nexport const ElectionEditorsNoteErrors = {\r\n\r\n ContentFetchError: {\r\n id: 28760,\r\n source: \"ElectionEditorsNote.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Election Delegate Counter related app errors */\r\nexport const ElectionDelegateCounterErrors = {\r\n ContentFetchError: {\r\n id: 28770,\r\n source: \"ElectionDelegateCounter.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents fetch failure for Feed visualizer experience */\r\nexport const FeedVisualizerFetchFailed: AppError = {\r\n id: 28780,\r\n source: \"FeedVisualizer.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Topics hub - failed to fetch topic by name\r\n */\r\nexport const TopicByNameFetchFailed: AppError = {\r\n id: 28790,\r\n source: \"TopicsHub.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * App reporting messages related to Partner Widget Experience\r\n */\r\nexport const PartnerWidgetAppErrors = {\r\n /** default breakpoint settings missing */\r\n DefaultBreakpointSettingsMissing: {\r\n id: 28801,\r\n source: \"PartnerWidget.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** non whitelisted source url */\r\n NonWhitelistedSourceUrl: {\r\n id: 28802,\r\n source: \"PartnerWidget.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents RecommendedSearch related App errors */\r\nconst RecommendedTopicsSourceFile = \"RecommendedTopics.connector.ts\";\r\nexport const RecommendedTopicsErrors = {\r\n /** Failed to connect to the Topics Data Connector */\r\n TopicsDataConnectorFailed: {\r\n id: 28901,\r\n source: RecommendedTopicsSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Topic Clicked was null */\r\n InvalidTopicClick: {\r\n id: 28902,\r\n source: RecommendedTopicsSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst webWorkerSource = \"Web worker\";\r\nconst webWorkerUtility = \"WebWorkerUtility.ts\";\r\nexport const WebWorkerErrors = {\r\n /** Web worker script load error (404 response) */\r\n FileNotFound: {\r\n id: 29000,\r\n source: webWorkerUtility,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Web worker runtime error, fired by web worker on unhandled exceptions */\r\n RuntimeError: {\r\n id: 29001,\r\n source: webWorkerSource,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Web worker message timeout */\r\n MessageTimeout: {\r\n id: 29002,\r\n source: webWorkerUtility,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Web worker handled errors. These are the errors received as messages from web worker */\r\n HandledError: {\r\n id: 29003,\r\n source: webWorkerSource,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PageTimingsSource = \"entry-point-shared-utils/src/PageTimings.ts\";\r\n/**\r\n * Indicates that for some reason the page never received all the perf markers it was waiting for\r\n * resulting in the timeout logic kicking in.\r\n */\r\nexport const WaitForAllPerfMarkersTimeoutInvoked: AppError = {\r\n id: 29100,\r\n source: PageTimingsSource,\r\n severity: Severity.Alert,\r\n pb\r\n};\r\n\r\n/**\r\n * Indicates that for some reason the page never received all the secondary perf markers\r\n * it was waiting for, resulting in the timeout logic kicking in.\r\n */\r\nexport const WaitForAllSecondaryPerfMarkersTimeoutInvoked: AppError = {\r\n id: 29101,\r\n source: PageTimingsSource,\r\n severity: Severity.Alert,\r\n pb\r\n};\r\n\r\nconst PageLoadTimeSource = \"entry-point-shared-utils/src/TrackPageLoadTime.ts\";\r\n/**\r\n * Indicates that for some reason the page load time is not able to be sent out.\r\n */\r\nexport const PageLoadTimeError: AppError = {\r\n id: 29102,\r\n source: PageLoadTimeSource,\r\n severity: Severity.Alert,\r\n pb\r\n};\r\n\r\nconst FirstPartyEntryPointFileName = \"FirstParty.connector.ts\";\r\nexport const FirstPartyEntryPointAppErrors = {\r\n /**\r\n * Error during app initialization for FirstParty page experience.\r\n */\r\n FirstPartyErrorPage: {\r\n id: 29200,\r\n source: FirstPartyEntryPointFileName,\r\n severity,\r\n pb\r\n },\r\n /** Error during initial SSO call, either the call failed of the user was not signed in */\r\n SSOFailedError: {\r\n id: 29250,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst HomePageEntryPointFileName = \"HomePage.connector.ts\";\r\nexport const HomePageEntryPointAppErrors = {\r\n /**\r\n * Error during app initialization for Home page experience.\r\n */\r\n HomePageErrorPage: {\r\n id: 29300,\r\n source: HomePageEntryPointFileName,\r\n severity,\r\n pb\r\n },\r\n /** Error during initial SSO call, either the call failed of the user was not signed in */\r\n SSOFailedError: {\r\n id: 29301,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WindowsEntryPointFileName = \"Windows.connector.ts\";\r\n\r\nexport const WindowsEntryPointAppErrors = {\r\n /**\r\n * Error during app initialization for Windows page experience.\r\n */\r\n WindowsErrorPage: {\r\n id: 29400,\r\n source: WindowsEntryPointFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on page exception.\r\n */\r\n WindowsPageShownPageExceptionError: {\r\n id: 29401,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up reloading the NTP page on jss mismatch exception.\r\n */\r\n WindowsPageReloadedPageExceptionError: {\r\n id: 29402,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error fetching the APP_ANON cookie on Windows page load\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 29403,\r\n source: pageTsFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WeatherAppEntrySourceFile = \"Weather.connector.ts\";\r\nconst WeatherLocationSearchSourceFile = \"WeatherLocationSearch.connector.ts\";\r\nconst WeatherMapSourceFile = \"WeatherMap.connector.ts\";\r\nconst WeatherMapHelperClient = \"WeatherMapHelperClient.ts\";\r\nconst WeatherInfoCardConnectorSourceFile = \"WeatherInfoCard.connector.ts\";\r\n\r\n/** Error during 'weather' app initialization. */\r\nexport const WeatherEntryPointAppError: AppError = {\r\n id: 29500,\r\n source: WeatherAppEntrySourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Fetch no data when search for locations from msn api */\r\nexport const WeatherLocationSearchNullError: AppError = {\r\n id: 29501,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception to fetch search for locations from msn api */\r\nexport const WeatherLocationSearchFetchError: AppError = {\r\n id: 29502,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Warnings when weather fail on GoogleBot traffic */\r\nexport const WeatherGoogleBotError: AppError = {\r\n id: 29503,\r\n source: WeatherOverviewApiClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Warnings when weather location search is invalid */\r\nexport const WeatherLocationSearchInvalidSuggestionIdError: AppError = {\r\n id: 29504,\r\n source: WeatherLocationSearchSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch hurricane data */\r\nexport const WeatherMapHurricaneApiError: AppError = {\r\n id: 29505,\r\n source: WeatherMapSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when Hurricane schema broken */\r\nexport const WeatherMapHurricaneSchemaError: AppError = {\r\n id: 29506,\r\n source: WeatherMapSourceFile,\r\n severity: Severity.Alert,\r\n pb\r\n};\r\n\r\n/** Exception when write user weather settings to pdp */\r\nexport const WeatherPDPUserSettingsWriteFailed: AppError = {\r\n id: 29507,\r\n source: WeatherPdpClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception when OneService response is incorrect */\r\nexport const WeatherCardOneServiceDataError: AppError = {\r\n id: 29508,\r\n source: WeatherInfoCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception when weather card is in invalid state */\r\nexport const WeatherCardInvalidStateError: AppError = {\r\n id: 29509,\r\n source: WeatherCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch weather tile version */\r\nexport const WeatherTileVersionApiError: AppError = {\r\n id: 29510,\r\n source: WeatherMapHelperClient,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Exception when schema not match when fetch weather tile version */\r\nexport const WeatherTileVersionApiSchemaError: AppError = {\r\n id: 29511,\r\n source: WeatherMapHelperClient,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when save home fail for non-sign-in user with HttpOnly cookie */\r\nexport const WeatherServerCookieSaveError: AppError = {\r\n id: 29512,\r\n source: WeatherDataConnectorSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch Bing map tile data */\r\nexport const WeatherMapBingTileLayerApiError: AppError = {\r\n id: 29513,\r\n source: WeatherMapWeatherLayersSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch radar tile data */\r\nexport const WeatherMapRadarApiError: AppError = {\r\n id: 29514,\r\n source: WeatherMapRadarSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch Precipitation tile data */\r\nexport const WeatherMapPrecipitationApiError: AppError = {\r\n id: 29515,\r\n source: WeatherMapPrecipitationSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch GenericSevere tile data */\r\nexport const WeatherMapGenericSevereApiError: AppError = {\r\n id: 29516,\r\n source: WeatherMapGenericSevereLayerSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch Heatmap tile data */\r\nexport const WeatherMapHeatmapApiError: AppError = {\r\n id: 29517,\r\n source: WeatherMapHeatmapRenderLayerSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch animation tile data */\r\nexport const WeatherMapWindAnimationApiError: AppError = {\r\n id: 29518,\r\n source: WeatherMapWeatherLayersSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch animation tile data */\r\nexport const WeatherMapBorderApiError: AppError = {\r\n id: 29519,\r\n source: WeatherMapWeatherLayersSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch Bing json label tile data */\r\nexport const WeatherMapJsonLabelApiError: AppError = {\r\n id: 29520,\r\n source: WeatherMapBingJsonLabelLayerSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch OneCanvasTileLayer tile data */\r\nexport const WeatherMapOneCanvasTileLayerApiError: AppError = {\r\n id: 29521,\r\n source: WeatherMapBingOneCanvasTileLayerSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\nconst WindowsShellPage = \"windows-shell/page.ts\";\r\n\r\n/**\r\n * Windows Shell Page Error fetching the APP_ANON cookie\r\n */\r\nexport const WindowsShellPageErrorFetchingAppAnonCookie: AppError = {\r\n id: 29600,\r\n source: WindowsShellPage,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Windows Shell Page level exception was thrown\r\n */\r\nexport const WindowsShellPageError: AppError = {\r\n\r\n id: 29601,\r\n source: WindowsShellPage,\r\n severity,\r\n pb\r\n};\r\n\r\nconst WindowsShellCardProvider = \"WindowsShellCardProvider.ts\";\r\n/**\r\n * Content that was retrieved from shell was invalid\r\n */\r\nexport const WindowsShellInvalidShellContentResponse: AppError = {\r\n id: 29602,\r\n source: WindowsShellCardProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Content format was invalid\r\n */\r\nexport const WindowsShellInvalidContentResponse: AppError = {\r\n id: 29603,\r\n source: WindowsShellCardProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Content was valid JSON but was missing items\r\n */\r\nexport const WindowsShellEmptyShellContentResponse: AppError = {\r\n id: 29604,\r\n source: WindowsShellCardProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Received empty content after asking client to update the Oneservice content\r\n */\r\nexport const WindowsShellFailedToGetContentOnRetry: AppError = {\r\n id: 29605,\r\n source: WindowsShellCardProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking how often we need to ask client to retry getting new Oneservice content\r\n */\r\nexport const WindowsShellAskingToFetchNewContentForRetry: AppError = {\r\n id: 29606,\r\n source: WindowsShellCardProvider,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nconst WindowsShellConnector = \"WindowsShellConnector.connector.ts\";\r\n\r\nexport const WindowsShellEmptyHeaderResponse: AppError = {\r\n id: 29700,\r\n source: WindowsShellConnector,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const WindowsShellInvalidFeedResponse: AppError = {\r\n id: 29701,\r\n source: WindowsShellConnector,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const WindowsShellFailedVersionResponse: AppError = {\r\n id: 29702,\r\n source: WindowsShellConnector,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const WindowsShellInvalidTreatmentInfo: AppError = {\r\n id: 29703,\r\n source: WindowsShellConnector,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const WindowsShellNoSessionIdProvided: AppError = {\r\n id: 29704,\r\n source: WindowsShellConnector,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nconst WindowsNewsAndInterestsPage = \"windows-newsandinterests/page.ts\";\r\nconst WindowsDashboardConnector = \"WindowsDashboardConnector.connector.ts\";\r\n\r\nexport const WindowsNewsAndInterestsPageError: AppError = {\r\n\r\n id: 29800,\r\n source: WindowsNewsAndInterestsPage,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const WindowsNewsAndInterestsPageErrorFetchingAppAnonCookie: AppError = {\r\n id: 29801,\r\n source: WindowsNewsAndInterestsPage,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Invalid Dashboard load data */\r\nexport const InvalidDashboardData: AppError = {\r\n id: 29802,\r\n source: WindowsDashboardConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception fetching dashboard data from host api */\r\nexport const ExceptionFetchingDashboardData: AppError = {\r\n id: 29803,\r\n source: WindowsDashboardConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception fetching user account info from host api */\r\nexport const ExceptionFetchingAccountInfo: AppError = {\r\n id: 29804,\r\n source: WindowsDashboardConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception fetching auth token from host api */\r\nexport const ExceptionFetchingAuthToken: AppError = {\r\n id: 29805,\r\n source: WindowsDashboardConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception loading host api */\r\nexport const ExceptionLoadingHostApi: AppError = {\r\n id: 29806,\r\n source: WindowsDashboardConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception subscribing dashboard events */\r\nexport const ExceptionSubscribingDashboardEvents: AppError = {\r\n id: 29807,\r\n source: WindowsDashboardConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception subscribing dashboard events */\r\nexport const NotifyFeedDisplayReadyEventFailed: AppError = {\r\n id: 29808,\r\n source: WindowsDashboardConnector,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Auth related app messages (errors|warnings) */\r\nexport const AuthenticationAppMessages = {\r\n AuthRefreshBlockedError: {\r\n id: 33000,\r\n source: \"\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error fetching the APP_ANON cookie\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 33001,\r\n source: \"\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error during app initialization for migration consent\r\n */\r\n EstablishMigrationConsent: {\r\n id: 33010,\r\n source: \"EstablishMigrationConsent.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n MigrationConsentServiceClient: {\r\n id: 33011,\r\n source: \"MigrationConsentServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n // This is a duplicate of 1405 and will be logged in addition to it.\r\n // This is to maintain backwards compatibility while allowing us to alert on this\r\n // from EdgeNext\r\n EstablishSignedInState: {\r\n id: 33012,\r\n source: establishSignInSource,\r\n severity,\r\n pb\r\n },\r\n\r\n // Auth private property is not available in edge chromium browser\r\n EdgeChromiumAuthPropertyNotAvailable: {\r\n id: 33013,\r\n source: pageTsFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n // The browser has reported that a user is signed in, but the request to fetch the user token has failed\r\n // This will usually result in a sign in state mismatch, which will cause a single page refresh for the user\r\n // If the user cannot get the token on the refreshed page they will no longer see signed in personalization\r\n EdgeChromiumTokenAccessFailure: {\r\n id: 33014,\r\n source: \"EstablishEdgeChromiumSignedInState.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Server side rendering error */\r\nexport const RenderServerError: AppError = {\r\n id: 34000,\r\n source: \"service-render-app.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * SSR Inline script errors\r\n */\r\nexport const SSRAppErrors = {\r\n /**\r\n * Warning that user clicked on the page before hydration and telemetry is initialized.\r\n */\r\n UntrackedClick: {\r\n id: 34001,\r\n source: \"\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Warning that SSR fragment fetch failed\r\n */\r\n FragmentFetchFailed: {\r\n id: 34002,\r\n source: \"SSRInline.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that the Performance API was not available.\r\n */\r\n DidUseBrowserCacheAPIError: {\r\n id: 34003,\r\n source: \"SSRInline.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that the expected response header was not available.\r\n */\r\n DidUseBrowserCachePolyfillResponseHeaderInvalid: {\r\n id: 34004,\r\n source: \"SSRInline.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that when SSR failed to getConfig.\r\n */\r\n ServerCacheFetchFailed: {\r\n id: 34005,\r\n source: \"Resolver.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that when connectorMap is invalid.\r\n */\r\n ConnectorMapInvalid: {\r\n id: 34006,\r\n source: \"Resolver.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that SSR inline script failed.\r\n */\r\n FetchSSRPageFailed: {\r\n id: 34007,\r\n source: \"inline-head.ts\",\r\n severity: Severity.Alert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that no window.innerWidth was reported.\r\n * Devices on mobile may report a window.innerWidth of 0 or undefined until the window.onLoad page completes.\r\n * This error is thrown when window.innerWidth is still 0 or undefined when onload has completed.\r\n * We expect this error to never throw.\r\n */\r\n FetchSSRPageFailedFromInvalidWindowInnerWidth: {\r\n id: 34008,\r\n source: \"inline-head.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that when Server Cache config refresh failed\r\n */\r\n ServerCacheRefreshFailed: {\r\n id: 34009,\r\n source: \"Resolver.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error during app initialization for page experience.\r\n */\r\n WebEntryFailed: {\r\n id: 34010,\r\n source: \"webEntry.ts\",\r\n severity: Severity.Alert,\r\n pb\r\n },\r\n\r\n /**\r\n * SSR config resolver returned null config\r\n */\r\n SsrResolverReturnedNullConfig: {\r\n id: 34011,\r\n source: \"SsrResolver.ts\",\r\n severity: Severity.HighImpact,\r\n pb\r\n }\r\n};\r\n\r\nconst irisArcCallerFileName = \"Iris.arcCaller.ts\";\r\nconst irisArcParserFileName = \"Iris.arcParser.ts\";\r\nconst irisMasterFileName = \"Iris.master.ts\";\r\n\r\n/** The query parameters presented to the arc caller were found to be invalid. */\r\nexport const AppError_InvalidQParams_35001: AppError = {\r\n id: 35001,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ArcCallFailed_35002: AppError = {\r\n id: 35002,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ArcResponseNotOk_35003: AppError = {\r\n id: 35003,\r\n source: irisArcCallerFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\nexport const AppError_ArcResponseUnparsable_35004: AppError = {\r\n id: 35004,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_UnknownIrisErrorFound_35006: AppError = {\r\n id: 35006,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_TimeoutIrisErrorFound_35007: AppError = {\r\n id: 35007,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_TemplateIrisErrorFound_35008: AppError = {\r\n id: 35008,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ClientErrorIrisErrorFound_35009: AppError = {\r\n id: 35009,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_DSourceIrisErrorFound_35010: AppError = {\r\n id: 35010,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ActionCallFailure_35011: AppError = {\r\n id: 35011,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ActionFetchFailure_35012: AppError = {\r\n id: 35012,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ActionResponseFailure_35013: AppError = {\r\n id: 35013,\r\n source: irisArcCallerFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\nexport const AppError_UncaughtErrorDetected_35014: AppError = {\r\n id: 35014,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_UnconvertableCreative_35015: AppError = {\r\n id: 35015,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_InvalidResponseFormat_35016: AppError = {\r\n id: 35016,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_UnparsableSingleResponseJSON_35018: AppError = {\r\n id: 35018,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents Iris data connector related App errors */\r\nconst IrisDataConnectorSourceFile = \"IrisData.connector.ts\";\r\nconst SubscriberValidatorSourceFile = \"SubscriberValidator.ts\";\r\nconst IrisPersistentStorageUtilityFile = \"IrisPersistentStorageUtility.ts\";\r\n\r\nexport const SubscriberNotFound: AppError = {\r\n id: 35117,\r\n source: SubscriberValidatorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CreativeCountNegativeOrZero: AppError = {\r\n id: 35118,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const MissingIrisParameterForConditionalBanner: AppError = {\r\n id: 35119,\r\n source: SubscriberValidatorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const ErrorFoundForSurface: AppError = {\r\n id: 35120,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SubscriberNotFoundInIrisPlacementDictionary: AppError = {\r\n id: 35121,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConfigDataUndefined: AppError = {\r\n id: 35122,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const FailedToFetchConfigData: AppError = {\r\n id: 35123,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ExceptionFetchingConfigData: AppError = {\r\n id: 35124,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const FailedToReadNurturingAcceptedFlag: AppError = {\r\n id: 35125,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error when Iris fails to return Hotspots Data to the client. Previous #8181 */\r\nexport const FailedHotSpotsDataDelivery: AppError = {\r\n id: 35126,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Hotspots data that was returned failed to validate. Previous #8182 */\r\nexport const IncompleteHotSpotsContract: AppError = {\r\n id: 35127,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception making iris call from data connector */\r\nexport const ExceptionRequestingSurfaceInfo: AppError = {\r\n id: 35128,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error missing iris parameters for iris call to background images surface\r\n */\r\nexport const MissingIrisParameterForBackgroundImages: AppError = {\r\n id: 35129,\r\n source: SubscriberValidatorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents AccessTokens related App errors */\r\nconst AccessTokensSourceFile = \"AadAuthHelper.ts\";\r\nconst PivotContentErrorPlaceholderFile = \"AadErrorPlaceholder.tsx\";\r\nexport const EdgeChromiumAPIsNotAvailable: AppError = {\r\n id: 35200,\r\n source: AccessTokensSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const AcquireAccessTokenFailed: AppError = {\r\n id: 35201,\r\n source: AccessTokensSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const AcquireAccessTokenFailedForPivotContent: AppError = {\r\n id: 35202,\r\n source: PivotContentErrorPlaceholderFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const AcquireAccessTokenHandledFailure: AppError = {\r\n id: 35203,\r\n source: AccessTokensSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const AcquireAccessTokenHandledFailureForPivotContent: AppError = {\r\n id: 35204,\r\n source: PivotContentErrorPlaceholderFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents Render Cache errors*/\r\nconst PersistRenderCacheFile = \"PersistRenderCache.ts\";\r\nexport const RenderCacheErrors = {\r\n JssStyleMismatchWarning: {\r\n id: 35300,\r\n source: PersistRenderCacheFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n JssStyleCriticalMismatchError: {\r\n id: 35301,\r\n source: PersistRenderCacheFile,\r\n severity: Severity.Alert,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents OcvFeedbackData related App errors */\r\nconst OcvFeedbackDataSourceFile = \"OcvFeedbackData.ts\";\r\nexport const OcvFeedbackDataErrors = {\r\n UndefinedDataNotAvailable: {\r\n id: 35400,\r\n source: OcvFeedbackDataSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const PivotHoverErrors = {\r\n /** Failed to fetch feed summary data for the Pivot Hover list. */\r\n FeedSummaryFetchError: {\r\n id: 35500,\r\n source: \"FeedSummaryFetcher.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PreloadActionHelpers = \"PreloadActionHelpers.ts\";\r\nexport const PreloadReportingMessages = {\r\n TtvrMissing: {\r\n id: 35600,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n TfprMissing: {\r\n id: 35601,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n TtvrSearchBoxMissing: {\r\n id: 35602,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n TtfSearchBoxMissing: {\r\n id: 35603,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst PrerenderPageTimingHelper = \"PrerenderPageTimingHelper.ts\";\r\nexport const PrerenderTtvrMissing: AppError = {\r\n id: 35604,\r\n source: PrerenderPageTimingHelper,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const PrerenderTtprMissing: AppError = {\r\n id: 35605,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const PrerenderTtvrSearchBoxMissing: AppError = {\r\n id: 35606,\r\n source: PrerenderPageTimingHelper,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const PrerenderTtfSearchBoxMissing: AppError = {\r\n id: 35607,\r\n source: PrerenderPageTimingHelper,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const PrerenderRevalidateException: AppError = {\r\n id: 35608,\r\n source: \"PageRevealStaleStracker.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const GetTabTimingsReturnedFalse: AppError = {\r\n id: 35609,\r\n source: PrerenderPageTimingHelper,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const GetTabTimingsReturnedInvalidTimings: AppError = {\r\n id: 35610,\r\n source: PrerenderPageTimingHelper,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents push notifications lib App errors */\r\nconst PushNotificationsLibFile = \"PushNotifications.ts\";\r\nexport const PushNotificationsLibErrors = {\r\n FetchKeyError: {\r\n id: 35700,\r\n source: PushNotificationsLibFile,\r\n severity,\r\n pb\r\n },\r\n SubscribeUnsubscribeError: {\r\n id: 35701,\r\n source: PushNotificationsLibFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents content truncation lib App errors */\r\nconst ContentTruncationSourceFile = \"ContentTruncation.ts\";\r\nexport const ContentTruncationErrors = {\r\n OverTruncationError: {\r\n id: 35800,\r\n source: ContentTruncationSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst SuperAppEntryPointFileName = \"SuperAppPage.connector.ts\";\r\n\r\nexport const SuperAppEntryPointAppErrors = {\r\n /**\r\n * Super app page is not able to load Error Page.\r\n */\r\n SuperAppErrorPage: {\r\n id: 35901,\r\n source: SuperAppEntryPointFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Error fetching feed with location in Local News experience */\r\nconst LocalNewsFileName = \"LocalNews.connector.ts\";\r\nexport const LocalNewsInterestByLocationFetchFailed: AppError = {\r\n id: 36001,\r\n source: LocalNewsFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** 361XX represent office related errors */\r\nconst GenerateShareUiFile = \"GenerateShareUi.tsx\";\r\nconst OfficeShareUiFile = \"OfficeShareUi.tsx\";\r\nconst OfficeFallbackHandlerFileName = \"OfficeFallbackHandler.ts\";\r\nconst EnterpriseWaffleFile = \"EnterpriseWaffle.connector.ts\";\r\nconst OfficeDocumentsTableConnectorFile = \"OfficeDocumentsTable.connector.ts\";\r\nconst OfficeDocumentsTableMruUtilitiesFile = \"mru-plusplus.utility.ts\";\r\nconst OfficeSharePointSitesTableConnectorFile = \"SharePointSitesTable.connector.ts\";\r\nconst OfficeDocumentsTableDiscoverFile = \"DiscoverDocumentProvider.ts\";\r\nconst RecommendedDocumentsConnectorFile = \"RecommendedDocuments.connector.ts\";\r\nconst ShellNewTabDataFileName = \"ShellNewTabData.connector.ts\";\r\nconst OfficeDocumentProviderFile = \"OfficeDocumentProvider.ts\";\r\n\r\nexport const OfficeFallbackHandlerAppErrors = {\r\n /**\r\n * Tracking errors where we ended up reloading the office content on jss mismatch exception.\r\n */\r\n OfficeContentReloadedJSSMismatchExceptionError: {\r\n id: 36101,\r\n source: OfficeFallbackHandlerFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Error for failure to generate office share ui\r\n */\r\nexport const OfficeGenerateShareUiError: AppError = {\r\n id: 36105,\r\n source: GenerateShareUiFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error for failure inside office share ui\r\n */\r\nexport const OfficeShareUiError: AppError = {\r\n id: 36106,\r\n source: OfficeShareUiFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error for Enterprise Waffle not able to retrieve app links from ShellNewTabData\r\n */\r\nexport const EnterpriseWaffleAppError: AppError = {\r\n id: 36107,\r\n source: EnterpriseWaffleFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error for failed call to Shell NTP API for Enterprise waffle and company logo\r\n */\r\nexport const ShellNewTabDataAPIError: AppError = {\r\n id: 36108,\r\n source: ShellNewTabDataFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Documents Table type is not provided\r\n */\r\nexport const OfficeDocumentsTableInvalidTypeError: AppError = {\r\n id: 36110,\r\n source: OfficeDocumentsTableConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Documents Table fails to fetch documents\r\n */\r\nexport const OfficeDocumentsTableDocumentFetchFailedError: AppError = {\r\n id: 36111,\r\n source: OfficeDocumentsTableConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Documents Table fails to fetch documents\r\n */\r\nexport const OfficeDocumentsTableLinkFetchFailedError: AppError = {\r\n id: 36112,\r\n source: OfficeDocumentsTableConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Documents Table fails to update document properties\r\n */\r\nexport const OfficeDocumentsTableUpdateDocumentPropertiesFailed: AppError = {\r\n id: 36113,\r\n source: OfficeDocumentsTableMruUtilitiesFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n* Tracking errors when Office Documents Table fails to fetch activity data\r\n*/\r\nexport const OfficeDocumentsTableFetchActivitiesFailed: AppError = {\r\n id: 36114,\r\n source: OfficeDocumentsTableDiscoverFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n* Tracking errors when Office Documents Table fails to fetch sharepoint data\r\n*/\r\nexport const OfficeDocumentsTableFetchSharepointFailed: AppError = {\r\n id: 36115,\r\n source: OfficeDocumentsTableDiscoverFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n* Tracking errors when Office Documents Table fails to generate document item\r\n*/\r\nexport const OfficeDocumentsTableGenerateDocumentItemError: AppError = {\r\n id: 36116,\r\n source: OfficeDocumentProviderFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Share Point Table fails to fetch sites\r\n */\r\nexport const OfficeSharepointSitesTableFetchFailedError: AppError = {\r\n id: 36120,\r\n source: OfficeSharePointSitesTableConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when failed to get Recommended Documents\r\n */\r\nexport const RecommendedDocumentsFetchFailedError: AppError = {\r\n id: 36130,\r\n source: RecommendedDocumentsConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when failed to fetch preview image for recommended documents\r\n */\r\nexport const RecommendedDocumentsImageFetchFailedError: AppError = {\r\n id: 36131,\r\n source: RecommendedDocumentsConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents autos experiences App errors */\r\nconst AutosExperienceConnectorFile = \"AutosCard.connector.ts\";\r\nconst AutosExperienceServiceClientFile = \"AutosServiceClient.ts\";\r\n\r\n/**\r\n * Error while fetching research make models\r\n */\r\nexport const FetchResearchMakeModelDocumentError: AppError = {\r\n id: 36200,\r\n source: AutosExperienceServiceClientFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Error while fetching Film Strip Document Error\r\n */\r\nexport const FetchFilmStripDocumentError: AppError = {\r\n id: 36201,\r\n source: AutosExperienceServiceClientFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Error while fetching lead classified cms documents\r\n */\r\nexport const FetchClassifiedLeadCMSDocumentsError: AppError = {\r\n id: 36202,\r\n source: AutosExperienceServiceClientFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Error while fetching lead classified make models\r\n */\r\nexport const FetchLeadClassifiedMakeModelDocumentError: AppError = {\r\n id: 36203,\r\n source: AutosExperienceServiceClientFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Error for incorrect tab configuration\r\n */\r\nexport const TabsIncorrectConfiguration: AppError = {\r\n id: 36204,\r\n source: AutosExperienceConnectorFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Whole Page Optimization(WPO) App errors */\r\n\r\nconst WpoServiceFileName = \"WpoServiceClient.ts\";\r\n\r\n/**\r\n * WPO service call failure.\r\n */\r\nexport const WpoServiceCallFailure: AppError = {\r\n id: 36301,\r\n source: WpoServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error updating local storage with wpo service call response.\r\n */\r\nexport const WpoFailedToStoreToLocalStorage: AppError = {\r\n id: 36302,\r\n source: WpoServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Whole Page Optimization(WPO) App errors in SuperApp */\r\nconst WpoServiceHelperFileName = \"WPOServiceHelper.ts\";\r\n\r\n/**\r\n * WPO service call failure for glance cards in SA.\r\n */\r\nexport const WpoGlanceServiceCallFailure: AppError = {\r\n id: 36303,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * WPO service call no content respose for glance cards in SA.\r\n */\r\nexport const WpoGlanceServiceCallNoContent: AppError = {\r\n id: 36304,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * WPO service call failure for feed modules in SA.\r\n */\r\nexport const WpoFeedServiceCallFailure: AppError = {\r\n id: 36305,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * WPO service call no content respose for feed modules in SA.\r\n */\r\nexport const WpoFeedServiceCallNoContent: AppError = {\r\n id: 36306,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error updating local storage with wpo service call response in SuperApp.\r\n */\r\nexport const WpoFailedToStoreToSALocalStorage: AppError = {\r\n id: 36307,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** MarketSelector App errors */\r\nconst MarketSelectorFileName = \"marketSetting/index.ts\";\r\n\r\n/**\r\n * Error when load current market setting when initialize market selector\r\n */\r\nexport const MarketSelectorFailedToReadCurrentMarket: AppError = {\r\n id: 36401,\r\n source: MarketSelectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** FlyoutCard App errors */\r\nconst FlyoutCardFileName = \"FlyoutCard.connector.ts\";\r\n\r\n/**\r\n * Error when fetching feed in FlyoutCard experience\r\n */\r\nexport const FlyoutCardFailedToLoadOneServiceData: AppError = {\r\n id: 36410,\r\n source: FlyoutCardFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** The Microsoft logo component inside of the HeaderEdgeNext experience */\r\nconst MicrosoftLogo = \"MicrosoftLogo.tsx\";\r\n\r\n/** Represents a Microsoft Logo related error */\r\nexport const MicrosoftLogoErrors: AppError = {\r\n id: 36420,\r\n source: MicrosoftLogo,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/**\r\n * Clarity Script App Errors\r\n */\r\nconst ClarityScriptLoaderFile = \"ScriptLoader.ts\";\r\n\r\n/**\r\n * Error loading clarity script.\r\n */\r\nexport const LoadScriptError: AppError = {\r\n id: 36500,\r\n source: ClarityScriptLoaderFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error starting clarity script.\r\n */\r\nexport const ScriptStartError: AppError = {\r\n id: 36501,\r\n source: ClarityScriptLoaderFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** 366XX are River OneService App Errors */\r\nexport const EmptyFeedWithFeedId: AppError = {\r\n id: 36600,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const EmptySearchedFeedWithFeedId: AppError = {\r\n id: 36601,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const EmptySearchedFeedWithFeedQuery: AppError = {\r\n id: 36602,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const EmptyKidsModeFeed: AppError = {\r\n id: 36603,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const UnauthorizedFeedResponse: AppError = {\r\n id: 36604,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CardViewFeedDataMapperInvalidData: AppError = {\r\n id: 36605,\r\n source: \"OneServiceFeedDataMapper.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nexport const TabRiverRequestEmptyResponse: AppError = {\r\n id: 36606,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const TabsRequestEmptyResponse: AppError = {\r\n id: 36607,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** 367XX are River App Errors */\r\nexport const FallingBackToSkipStrategy: AppError = {\r\n id: 36700,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const FallingBackToFullHeightStrategy: AppError = {\r\n id: 36701,\r\n source: RiverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const RiverContentProviderFetchNextPageException: AppError = {\r\n id: 36702,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const InvalidEmptyRiverContent: AppError = {\r\n id: 36703,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const GridSectionCardRenderFailure: AppError = {\r\n id: 36704,\r\n source: \"GridSection.tsx\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents OutlookEmailPreview related App errors */\r\nconst OutlookEmailPreviewDataSourceFile = \"OutlookEmailPreviewDataHelper.ts\";\r\n\r\nexport const OutlookEmailPreviewEmailFetchError: AppError = {\r\n id: 36800,\r\n source: OutlookEmailPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const OutlookEmailPreviewUnreadEmailCountFetchError: AppError = {\r\n id: 36801,\r\n source: OutlookEmailPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst OutlookEmailPreviewAuthSourceFile = \"OutlookEmailPreviewAuthHelper.ts\";\r\nexport const OutlookEmailPreviewAccessTokenFetchError: AppError = {\r\n id: 36802,\r\n source: OutlookEmailPreviewAuthSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst FinancePageFilename = \"Finance.connector.ts\";\r\nconst FinanceUserServiceImplFile = \"FinanceUserServiceImpl.ts\";\r\nconst FinanceServiceImplFile = \"FinanceServiceImpl.ts\";\r\nconst FinancePrimeServiceImplFile = \"FinancePrimeServiceImpl.ts\";\r\nconst FinanceAutoSuggestServiceImplFile = \"AutoSuggestServiceImpl\";\r\n\r\n/**\r\n * Error when initializing Finance page experience.\r\n */\r\nexport const FinanceEntryPointAppErrors: AppError = {\r\n id: 36900,\r\n source: FinancePageFilename,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get autosuggest because of unsuccessful fetch */\r\nexport const FinanceAutoSuggestFetchError: AppError = {\r\n id: 36901,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get autosuggest because the http code is not 20x */\r\nexport const FinanceAutoSuggestStatusError: AppError = {\r\n id: 36902,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get autosuggest because the response body is not valid */\r\nexport const FinanceAutoSuggestInvalidResponseBody: AppError = {\r\n id: 36903,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get MostActiveQuotes because unsuccess fetch */\r\nexport const FinanceMostActiveQuotesFetchError: AppError = {\r\n id: 36904,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get MostActiveQuotes because the http code is not 20x */\r\nexport const FinanceMostActiveQuotesStatusError: AppError = {\r\n id: 36905,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get MostActiveQuotes because the response body is not valid */\r\nexport const FinanceMostActiveQuotesInvalidResponseBody: AppError = {\r\n id: 36906,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception when fetch watchlist */\r\nexport const FinanceWatchListFetchFailed: AppError = {\r\n id: 36907,\r\n source: FinanceUserServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Chart because unsuccess fetch */\r\nexport const FinanceChartFetchError: AppError = {\r\n id: 36908,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Chart because the http code is not 20x */\r\nexport const FinanceChartStatusError: AppError = {\r\n id: 36909,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Chart because the response body is not valid */\r\nexport const FinanceChartInvalidResponseBody: AppError = {\r\n id: 36910,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get QuoteSummary because unsuccess fetch */\r\nexport const FinanceQuoteSummaryFetchError: AppError = {\r\n id: 36911,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get QuoteSummary because the http code is not 20x */\r\nexport const FinanceQuoteSummaryStatusError: AppError = {\r\n id: 36912,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get QuoteSummary because the response body is not valid */\r\nexport const FinanceQuoteSummaryInvalidResponseBody: AppError = {\r\n id: 36913,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Exchange because unsuccess fetch */\r\nexport const FinanceExchangeFetchError: AppError = {\r\n id: 36914,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Exchange because the http code is not 20x */\r\nexport const FinanceExchangeStatusError: AppError = {\r\n id: 36915,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Exchange because the response body is not valid */\r\nexport const FinanceExchangeInvalidResponseBody: AppError = {\r\n id: 36916,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get indices because of unsuccessful fetch */\r\nexport const FinanceIndicesFetchError: AppError = {\r\n id: 36917,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get indices because the http code is not 20x */\r\nexport const FinanceIndicesStatusError: AppError = {\r\n id: 36918,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get indices because the response body is not valid */\r\nexport const FinanceIndicesInvalidResponseBody: AppError = {\r\n id: 36919,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equities because of unsuccessful fetch */\r\nexport const FinanceEquitiesFetchError: AppError = {\r\n id: 36920,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equities because the http code is not 20x */\r\nexport const FinanceEquitiesStatusError: AppError = {\r\n id: 36921,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equities because the response body is not valid */\r\nexport const FinanceEquitiesInvalidResponseBody: AppError = {\r\n id: 36922,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equity financials because of unsuccessful fetch */\r\nexport const FinanceEquityFinancialsFetchError: AppError = {\r\n id: 36923,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equity financials because the http code is not 20x */\r\nexport const FinanceEquityFinancialsStatusError: AppError = {\r\n id: 36924,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equity financials because the response body is not valid */\r\nexport const FinanceEquityFinancialsInvalidResponseBody: AppError = {\r\n id: 36925,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MoneyInfoCardConnectorSourceFile = \"MoneyInfoCard.connector.ts\";\r\n\r\n/** Exception when OneService response is incorrect */\r\nexport const MoneyInfoCardOneServiceDataError: AppError = {\r\n id: 36926,\r\n source: MoneyInfoCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get all currencies because of unsuccessful fetch */\r\nexport const FinanceGetAllCurrenciesFetchError: AppError = {\r\n id: 36927,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get all currencies because the http code is not 20x */\r\nexport const FinanceGetAllCurrenciesStatusError: AppError = {\r\n id: 36928,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get all currencies because the response body is not valid */\r\nexport const FinanceGetAllCurrenciesInvalidResponseBody: AppError = {\r\n id: 36929,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get microsoft id because of unsuccessful fetch */\r\nexport const FinanceGetMicrosoftIdFetchError: AppError = {\r\n id: 36930,\r\n source: FinancePrimeServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get microsoft id because the http code is not 20x */\r\nexport const FinanceGetMicrosoftIdStatusError: AppError = {\r\n id: 36931,\r\n source: FinancePrimeServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get microsoft id because the response body is not valid */\r\nexport const FinanceGetMicrosoftIdInvalidResponseBody: AppError = {\r\n id: 36932,\r\n source: FinancePrimeServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get MorningStar id because of unsuccessful fetch */\r\nexport const FinanceGetMorningStarIdFetchError: AppError = {\r\n id: 36933,\r\n source: FinancePrimeServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get MorningStar id because the http code is not 20x */\r\nexport const FinanceGetMorningStarIdStatusError: AppError = {\r\n id: 36934,\r\n source: FinancePrimeServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get MorningStar id because the response body is not valid */\r\nexport const FinanceGetMorningStarIdInvalidResponseBody: AppError = {\r\n id: 36935,\r\n source: FinancePrimeServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception when write user money settings to pdp */\r\nexport const FinancePDPUserSettingsWriteFailed: AppError = {\r\n id: 36936,\r\n source: FinanceUserServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Funds because unsuccess fetch */\r\nexport const FinanceFundsFetchError: AppError = {\r\n id: 36937,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Funds because the http code is not 20x */\r\nexport const FinanceFundsStatusError: AppError = {\r\n id: 36938,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Funds because the response body is not valid */\r\nexport const FinanceFundsInvalidResponseBody: AppError = {\r\n id: 36939,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Reserve 3694* ids for errors in TTVR */\r\n/** Failed to get watchlist data before TTVR */\r\nexport const FinanceWatchlistDataVisuallyUnavailable: AppError = {\r\n id: 36940,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get quotes data before TTVR */\r\nexport const FinanceQuotesDataVisuallyUnavailable: AppError = {\r\n id: 36941,\r\n source: FinanceServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get charts data before TTVR */\r\nexport const FinanceChartsDataVisuallyUnavailable: AppError = {\r\n id: 36942,\r\n source: FinanceServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get movers data before TTVR */\r\nexport const FinanceMoversDataVisuallyUnavailable: AppError = {\r\n id: 36943,\r\n source: FinanceServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get exchanges data before TTVR */\r\nexport const FinanceExchangesDataVisuallyUnavailable: AppError = {\r\n id: 36944,\r\n source: FinanceServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get indices data before TTVR */\r\nexport const FinanceIndicesDataVisuallyUnavailable: AppError = {\r\n id: 36945,\r\n source: FinanceServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get equities data before TTVR */\r\nexport const FinanceEquitiesDataVisuallyUnavailable: AppError = {\r\n id: 36946,\r\n source: FinanceServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get equity financials data before TTVR */\r\nexport const FinanceEquityFinancialsDataVisuallyUnavailable: AppError = {\r\n id: 36947,\r\n source: FinanceServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get currencies data before TTVR */\r\nexport const FinanceCurrenciesDataVisuallyUnavailable: AppError = {\r\n id: 36948,\r\n source: FinanceServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get funds data before TTVR */\r\nexport const FinanceFundsDataVisuallyUnavailable: AppError = {\r\n id: 36949,\r\n source: FinanceServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get microsoft id before TTVR */\r\nexport const FinanceGetMicrosoftIdDataVisuallyUnavailable: AppError = {\r\n id: 36950,\r\n source: FinancePrimeServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get morning star id before TTVR */\r\nexport const FinanceGetMorningStarIdDataVisuallyUnavailable: AppError = {\r\n id: 36951,\r\n source: FinancePrimeServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to create portfolio */\r\nexport const FinanceCreatePortfolioFailed: AppError = {\r\n id: 36960,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to create transaction */\r\nexport const FinanceCreateTransactionFailed: AppError = {\r\n id: 36961,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to add to watchlist */\r\nexport const FinanceAddToWatchlistFailed: AppError = {\r\n id: 36962,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to sort watchlist */\r\nexport const FinanceSortWatchlistFailed: AppError = {\r\n id: 36963,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to delete from watchlist */\r\nexport const FinanceDeleteFromWatchlistFailed: AppError = {\r\n id: 36964,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get portfolio list. */\r\nexport const FinancePortfolioListFetchError: AppError = {\r\n id: 36965,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to get portfolio data. */\r\nexport const FinancePortfolioDataFetchError: AppError = {\r\n id: 36966,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to delete portfolio. */\r\nexport const FinanceDeletePortfolioError: AppError = {\r\n id: 36967,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to update portfolio. */\r\nexport const FinanceUpdatePortfolioError: AppError = {\r\n id: 36968,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to delete transaction. */\r\nexport const FinanceDeleteTransactionError: AppError = {\r\n id: 36969,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to update transaction. */\r\nexport const FinanceUpdateTransactionError: AppError = {\r\n id: 36970,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to add to portfolio. */\r\nexport const FinanceAddToPortfolioError: AppError = {\r\n id: 36971,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to delete from portfolio. */\r\nexport const FinanceDeleteFromPortfolioError: AppError = {\r\n id: 36972,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Failed to sort portfolio. */\r\nexport const FinanceSortPortfolioError: AppError = {\r\n id: 36973,\r\n source: FinanceUserServiceImplFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/**\r\n * Error when initializing Social page experience.\r\n */\r\nconst SocialConnectorSourceFile = \"Social.connector.ts\";\r\n\r\nexport const SocialNoModuleName: AppError = {\r\n id: 37000,\r\n source: SocialConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error when Social experience reducer recieves incorrect arguments\r\n */\r\n\r\nconst SocialExperienceReducerFile = \"Social.reducer.ts\";\r\n\r\nexport const SocialExperienceReducerIncorrectArgumentError: AppError = {\r\n id: 37001,\r\n source: SocialExperienceReducerFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error when trying to bind social data connector in social experience.\r\n */\r\nexport const SocialDataConnectorNotFound: AppError = {\r\n id: 37002,\r\n source: SocialExperienceReducerFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors on Social experience http requests\r\n */\r\n\r\nconst SocialAPISourceFile = \"Social.api.ts\";\r\n\r\nexport const SocialAPIRequestErrorUnknown: AppError = {\r\n id: 37020,\r\n source: SocialAPISourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialAPIRequestErrorContents: AppError = {\r\n id: 37021,\r\n source: SocialAPISourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialAPIRequestErrorComments: AppError = {\r\n id: 37022,\r\n source: SocialAPISourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialAPIRequestErrorUsers: AppError = {\r\n id: 37023,\r\n source: SocialAPISourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors on Social experience component renders\r\n */\r\n\r\nconst SocialExperienceFile = \"Social.tsx\";\r\n\r\nexport const SocialExperienceRenderErrorComment: AppError = {\r\n id: 37050,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorProfilePage: AppError = {\r\n id: 37051,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorProfileCard: AppError = {\r\n id: 37052,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorProfileTabs: AppError = {\r\n id: 37053,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorSocialBar: AppError = {\r\n id: 37054,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorReactionBreakdown: AppError = {\r\n id: 37055,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorGuideline: AppError = {\r\n id: 37057,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\nexport const SocialExperienceRenderErrorMultilineLogin: AppError = {\r\n id: 37058,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorNotificationTray: AppError = {\r\n id: 37059,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorOnboarding: AppError = {\r\n id: 37060,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorOnbardingThirdParty: AppError = {\r\n id: 37061,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorUnknownComponent: AppError = {\r\n id: 37062,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst LocationSelectorConnectorFileName = \"LocationSelector.connector.ts\";\r\n/**\r\n * Suggestion Id is out of bounds or it doesn't exist;\r\n */\r\nexport const LocationSelectorInvalidSuggestionId: AppError = {\r\n id: 37100,\r\n source: LocationSelectorConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommunityErrorPage: AppError = {\r\n id: 37200,\r\n source: \"app-types/community/src/page.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * PDP Service library errors - 3730X\r\n */\r\nexport const UnknownBulkLoadGraphActionType: AppError = {\r\n id: 37300,\r\n source: \"PdpServiceClient.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors in story-snippet experience.\r\n */\r\nexport const StorySnippetInvalidStoryData: AppError = {\r\n id: 37450,\r\n source: \"StorySnippet.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Erro when Story Snippet experience receives invalid data schema from related content cluster endpoint.\r\n */\r\nexport const StorySnippetInvalidRelatedContentClusterData: AppError = {\r\n id: 37451,\r\n source: \"StorySnippet.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to MyBriefRiverCard\r\n */\r\nconst MyBriefRiverCardFileName = \"MyBriefRiverCard.connector.ts\";\r\nexport const MyBriefRiverCardMissingConfig: AppError = {\r\n id: 37500,\r\n source: MyBriefRiverCardFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const MyBriefRiverCardEmptyOrNullResponse: AppError = {\r\n id: 37501,\r\n source: MyBriefRiverCardFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst WindowsCardProviderFileName = \"WindowsCardProvider.ts\";\r\nexport const WindowsCardProviderResponseWasNullOrErroneous: AppError = {\r\n id: 37550,\r\n source: WindowsCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const WindowsCardProviderErrorFetchingData: AppError = {\r\n id: 37551,\r\n source: WindowsCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst OneServicePageProviderFileName = \"OneServicePageProvider.ts\";\r\nexport const OneServicePageProviderResponseWasNullOrErroneous: AppError = {\r\n id: 37560,\r\n source: OneServicePageProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const OneServicePageProviderErrorFetchingData: AppError = {\r\n id: 37561,\r\n source: OneServicePageProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error related to Traffic experiences.\r\n */\r\nconst TrafficPageFileName = \"traffic/page.ts\";\r\nconst TrafficCardConnectorFileName = \"traffic-card/TrafficCard.connector.ts\";\r\nconst TrafficAutoSuggestClientFileName = \"traffic-card/AutoSuggest/DirectionsAutoSuggestClient.ts\";\r\nconst TrafficServiceFileName = \"traffic-lib/TrafficService.ts\";\r\n\r\nexport const TrafficEntryPointAppError: AppError = {\r\n id: 37600,\r\n source: TrafficPageFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const TrafficIncidentsError: AppError = {\r\n id: 37601,\r\n source: TrafficCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const TrafficAutoSuggestError: AppError = {\r\n id: 37602,\r\n source: TrafficAutoSuggestClientFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const TrafficSettingsSaveError: AppError = {\r\n id: 37603,\r\n source: TrafficCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const TrafficCardOneServiceJsonError: AppError = {\r\n id: 37604,\r\n source: TrafficCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const TrafficCardOneServiceUserSettingsSaveError: AppError = {\r\n id: 37605,\r\n source: TrafficServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Represents GmailEmailPreview related App errors\r\n */\r\nconst GmailEmailPreviewDataSourceFile = \"GmailEmailPreview.connector.ts\";\r\nexport const GmailEmailPreviewGoogleAPIError: AppError = {\r\n id: 37700,\r\n source: GmailEmailPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const GmailEmailPreviewGmailAPIError: AppError = {\r\n id: 37701,\r\n source: GmailEmailPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst LocalNewsViewCardConnectorFileName = \"LocalNewsViewCard.connector.ts\";\r\n/**\r\n * Data connector fails to be found or to get the cards from;\r\n */\r\nexport const LocalNewsViewCardDataConnectorAppError: AppError = {\r\n id: 37800,\r\n source: LocalNewsViewCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * LocationFeedData Errors\r\n */\r\nexport const LocationFeedDataConnectorAppError: AppError = {\r\n id: 37900,\r\n source: \"LocationFeed.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Admin Portal\r\n */\r\nconst AdminPortalConnectorFileName = \"AdminPortalData.connector.ts\";\r\nexport const AdminPortalSettingsFetchAppError: AppError = {\r\n id: 38000,\r\n source: AdminPortalConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const AdminPortalShimUiShown: AppError = {\r\n id: 38001,\r\n source: AdminPortalConnectorFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Desktop Feed\r\n */\r\nconst DesktopFeedConnectorFileName = \"DesktopFeed.connector.ts\";\r\nexport const DesktopFeedRiverContentFetchFailed: AppError = {\r\n id: 38010,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedUnsupportedCardType: AppError = {\r\n id: 38011,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedWindowsTopStripeContentFetchFailed: AppError = {\r\n id: 38012,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedFeedNativeAdServiceFetchFailed: AppError = {\r\n id: 38013,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedFeedInvalidRiverTemplateId: AppError = {\r\n id: 38014,\r\n source: DesktopFeedConnectorFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedFeedInvalidEmptyRiver: AppError = {\r\n id: 38015,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Common Header\r\n */\r\nconst CommonHeaderConnectorFileName = \"CommonHeader.connector.ts\";\r\nconst CommonHeaderTsxFileName = \"CommonHeader.tsx\";\r\nexport const CommonHeaderNavigationFailed: AppError = {\r\n id: 38020,\r\n source: CommonHeaderConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderInvalidConfig: AppError = {\r\n id: 38021,\r\n source: CommonHeaderConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderMissingFormCode: AppError = {\r\n id: 38022,\r\n source: CommonHeaderConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderRenderError: AppError = {\r\n id: 38023,\r\n source: CommonHeaderTsxFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderSSOFailed: AppError = {\r\n id: 38024,\r\n source: CommonHeaderTsxFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderMeControlLoadFailed: AppError = {\r\n id: 38025,\r\n source: CommonHeaderTsxFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors in video-card experience.\r\n */\r\nexport const VideoCardInvalidVideoData: AppError = {\r\n id: 38100,\r\n source: \"VideoCard.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nconst NewsbarFeedConnectorFileName = \"NewsbarFeed.connector.ts\";\r\nexport const NewsbarFeedNativeAdServiceFetchFailed: AppError = {\r\n id: 38200,\r\n source: NewsbarFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\nexport const NewsbarFeedOneServicePageProviderFetchFailed: AppError = {\r\n id: 38201,\r\n source: NewsbarFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\nexport const NewsbarFeedInvalidLayoutTemplateId: AppError = {\r\n id: 38202,\r\n source: NewsbarFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n/*\r\n * Set of errors in sports-card experience.\r\n */\r\nconst SportsDataServiceFileName = \"SportsDataService.ts\";\r\nexport const SportsDataServiceResponseWasNullOrErroneous: AppError = {\r\n id: 38300,\r\n source: SportsDataServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SportsDataServiceFetchFailed: AppError = {\r\n id: 38301,\r\n source: SportsDataServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SportsDataServiceUserSettingSaveFailed: AppError = {\r\n id: 38302,\r\n source: SportsDataServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors in the sports-matchup-card experience\r\n */\r\n\r\nconst SportsMatchupCardConnectorSourceFile = \"SportsMatchupCard.connector.ts\";\r\n\r\n/** Exception when OneService response is incorrect */\r\nexport const SportsMatchupCardOneServiceDataError: AppError = {\r\n id: 38310,\r\n source: SportsMatchupCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors in ugc app type.\r\n */\r\nexport const UgcErrorPage: AppError = {\r\n id: 38400,\r\n source: \"UGC/page.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nexport const UgcCreatorRenderError: AppError = {\r\n id: 38401,\r\n source: \"UgcCreator.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nexport const UgcCreatorApiError: AppError = {\r\n id: 38402,\r\n source: \"UgcCreator.api.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Modern Right Rail\r\n */\r\nconst ModernRightRailConnectorFileName = \"ModernRightRail.connector.ts\";\r\nconst ContentProviderServiceFileName = \"ContentProvider.services.ts\";\r\nconst TrendingNewsServiceFileName = \"ContentProvider.services.ts\";\r\n/** Failed to fetch provider details. */\r\nexport const ProviderDetailsFetchError: AppError = {\r\n id: 38500,\r\n source: ContentProviderServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** No content on fetching provider feed. */\r\nexport const ProviderFeedFetchEmpty: AppError = {\r\n id: 38501,\r\n source: ContentProviderServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch trending news card data. */\r\nexport const TrendingNewsFetchError: AppError = {\r\n id: 38502,\r\n source: TrendingNewsServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch trending news card backup data. */\r\nexport const TrendingNewsBackupFetchError: AppError = {\r\n id: 38503,\r\n source: TrendingNewsServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Native Ad fetch failed */\r\nexport const NativeAdFetchFailed: AppError = {\r\n id: 38504,\r\n source: ModernRightRailConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors for BasePreferenceSettingManager.\r\n */\r\nconst BasePreferenceSettingManagerFileName = \"BasePreferenceSettingManager.ts\";\r\n\r\n/**\r\n * window.chrome.ntpSettingsPrivate API is not available\r\n */\r\nexport const NtpSettingsPrivateNotAvailable: AppError = {\r\n id: 38600,\r\n source: BasePreferenceSettingManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error with writing to browser with ntpSettingsPrivate.setPref\r\n */\r\nexport const NtpSetPrefFailureToWrite: AppError = {\r\n id: 38601,\r\n source: BasePreferenceSettingManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error reading ntpSettingsPrivate.getPref\r\n */\r\nexport const NtpGetPrefFailureToRead: AppError = {\r\n id: 38602,\r\n source: BasePreferenceSettingManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Top level preference setting API is not available\r\n */\r\nexport const PerferenceSettingApiNotAvailable: AppError = {\r\n id: 38603,\r\n source: BasePreferenceSettingManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Preference key is missing\r\n */\r\nexport const PreferenceSettingKeyNotAvailable: AppError = {\r\n id: 38604,\r\n source: BasePreferenceSettingManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Preference setting did not save\r\n */\r\nexport const PreferenceSettingDidNotSave: AppError = {\r\n id: 38605,\r\n source: BasePreferenceSettingManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Background image\r\n * More errors can be found on 818X\r\n */\r\nconst enterpriseImageProvider = \"EnterpriseImageProvider.ts\";\r\n\r\n/** Failed to fetch provider details. */\r\nexport const CopyrightParseError: AppError = {\r\n id: 38700,\r\n source: bingImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** FRE image invalid index */\r\nexport const FREImageInvalidIndex: AppError = {\r\n id: 38701,\r\n source: bingImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Enterprise image unexpected call */\r\nexport const EnterpriseImageUnexpected: AppError = {\r\n id: 38702,\r\n source: enterpriseImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Enterprise image invalid index */\r\nexport const EnterpriseInvalidIndex: AppError = {\r\n id: 38703,\r\n source: enterpriseImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\nconst summaryCardConnectorFileName = \"SummaryCard.connector.ts\";\r\n\r\n/** Error fetching weather data */\r\nexport const SummaryCardFetchWeatherData: AppError = {\r\n id: 38800,\r\n source: summaryCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error fetching weather auto suggest data */\r\nexport const SummaryCardFetchAutoSuggestWeatherData: AppError = {\r\n id: 38801,\r\n source: summaryCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error refreshing weather data */\r\nexport const SummaryCardRefreshWeatherData: AppError = {\r\n id: 38802,\r\n source: summaryCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error connecting summary card component */\r\nexport const SummaryCardConnectComponent: AppError = {\r\n id: 38803,\r\n source: summaryCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst todaysEventsCardConnectorFileName = \"TodaysEventsCard.connector.ts\";\r\n\r\n/** Error fetching today's events */\r\nexport const TodaysEventsCardFetch: AppError = {\r\n id: 38900,\r\n source: todaysEventsCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst todaysEventsCardManagerFileName = \"EventManager.ts\";\r\n\r\n/** Error determining todays event's conflicts */\r\nexport const TodaysEventsCardManagerConflict: AppError = {\r\n id: 38901,\r\n source: todaysEventsCardManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst todaysEventsCardTimeHelperName = \"TimeHelper.ts\";\r\n\r\n/** Error with the Date-fns library */\r\nexport const TodaysEventsCardDateFnsError: AppError = {\r\n id: 38902,\r\n source: todaysEventsCardTimeHelperName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst frequentSitesCardConnectorFileName = \"FrequentSitesCard.connector.ts\";\r\n\r\n// Error Fetching Frequent Sites Data\r\nexport const FrequentSitesCardFetch: AppError = {\r\n id: 39000,\r\n source: frequentSitesCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst recommendedCardConnectorFileName = \"RecommendedCard.connector.ts\";\r\nconst recommendedCardInspectorFileName = \"RecommendedCard.inspector.ts\";\r\nconst recommendedCardFeed = \"RecommendedCardFeed\";\r\n\r\n// Error Fetching Recommended Card Documents\r\nexport const RecommendedCardConnectorFetchDocuments: AppError = {\r\n id: 39100,\r\n source: recommendedCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const RecommendedCardConnectorFetchImages: AppError = {\r\n id: 39101,\r\n source: recommendedCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n// Error Fetching Recommended Card Preview Image\r\nexport const RecommendedCardConnectorFetchImage: AppError = {\r\n id: 39102,\r\n source: recommendedCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n// Error creating file item props\r\nexport const RecommendedCardInspectorBuildFileItems: AppError = {\r\n id: 39103,\r\n source: recommendedCardInspectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n// Error Fetching Documents from the Recommended Card Feed component\r\nexport const RecommendedCardFeedFetchDocuments: AppError = {\r\n id: 39104,\r\n source: recommendedCardFeed,\r\n severity,\r\n pb\r\n};\r\n\r\n// Error Fetching Preview Image from the Recommended Card Feed component\r\nexport const RecommendedCardFeedFetchImage: AppError = {\r\n id: 39105,\r\n source: recommendedCardFeed,\r\n severity,\r\n pb\r\n};\r\n\r\n// Error switching from the Recommended Card Feed component to Office pivto\r\nexport const RecommendedCardFeedSwitchToOffice: AppError = {\r\n id: 39106,\r\n source: recommendedCardFeed,\r\n severity,\r\n pb\r\n};\r\n\r\n// Error switching from the Recommended Card Feed component to Office pivto\r\nexport const RecommendedCardFeedMissingPivotSwitchConfig: AppError = {\r\n id: 39107,\r\n source: recommendedCardFeed,\r\n severity,\r\n pb\r\n};\r\n\r\nconst productivityHubContainerConnectorFileName = \"ProductivityHubContainer.connector.ts\";\r\n\r\n/** Error loading child experiences */\r\nexport const ProductivityHubContainerLoadChildren: AppError = {\r\n id: 39200,\r\n source: productivityHubContainerConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst edgeNextLayoutOptimizerFileName = \"EdgeNextLayoutOptimizer.ts\";\r\n\r\n/** Error applying recommended layout */\r\nexport const ApplyingRecommendedLayoutFailed: AppError = {\r\n id: 39300,\r\n source: edgeNextLayoutOptimizerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors in the bing-video-card experience\r\n */\r\n\r\nconst BingVideoCardConnectorSourceFile = \"BingVideoCard.connector.ts\";\r\nconst BingVideoSlideCardSourceFile = \"SlideCard.tsx\";\r\nconst BingVideoOpalRecoInstrumentationSourceFile = \"OpalRecoInstrumentation.ts\";\r\n\r\n/** Exception when OneService response is incorrect */\r\nexport const BingVideoCardOneServiceDataError: AppError = {\r\n id: 39400,\r\n source: BingVideoCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingVideoCardOneServiceDataTypeError: AppError = {\r\n id: 39401,\r\n source: BingVideoCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingVideoCardOneServiceDataParseError: AppError = {\r\n id: 39402,\r\n source: BingVideoCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingVideoCardDataError: AppError = {\r\n id: 39403,\r\n source: BingVideoCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingVideoCardDataParseError: AppError = {\r\n id: 39404,\r\n source: BingVideoCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingVideoCardMotionThumbnailError: AppError = {\r\n id: 39405,\r\n source: BingVideoSlideCardSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingVideoCardOpalFeedbackError: AppError = {\r\n id: 39406,\r\n source: BingVideoOpalRecoInstrumentationSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst FreServiceClientFileName = \"FreServiceClient.ts\";\r\nconst ColdStartConnectorFileName = \"ColdStart.connector.ts\";\r\nconst ColdStartFileName = \"ColdStart.tsx\";\r\nconst ColdStartArticlesTemplateFileName = \"Articles.template.tsx\";\r\nconst ColdStartPublishersTemplateFileName = \"Publishers.template.tsx\";\r\n\r\n/** Error setting required parameters for FRE client functions */\r\nexport const SettingRequiredParametersFailed: AppError = {\r\n id: 39500,\r\n source: FreServiceClientFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error getting data for artifacts */\r\nexport const GettingArtifactsDataFailed: AppError = {\r\n id: 39501,\r\n source: ColdStartConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Missing FRE signal */\r\nexport const MissingFRESignal: AppError = {\r\n id: 39502,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Empty FRE response */\r\nexport const EmptyFREResponse: AppError = {\r\n id: 39503,\r\n source: ColdStartConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** FRE unsupported template */\r\nexport const FREUnsupportedTemplate: AppError = {\r\n id: 39504,\r\n source: ColdStartFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** FRE missing publisher metadata */\r\nexport const FREMissingPublisherMetadata: AppError = {\r\n id: 39505,\r\n source: ColdStartPublishersTemplateFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** FRE missing article metadata */\r\nexport const FREMissingArticleMetadata: AppError = {\r\n id: 39506,\r\n source: ColdStartArticlesTemplateFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** FRE missing callback url */\r\nexport const FREMissingCallbackUrl: AppError = {\r\n id: 39507,\r\n source: ColdStartConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to go to next stage*/\r\nexport const FailedToGoToNextStage: AppError = {\r\n id: 39508,\r\n source: ColdStartConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** The done Action call failed */\r\nexport const DoneActionFailed: AppError = {\r\n id: 39509,\r\n source: FreServiceClientFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** An Actions call failed */\r\nexport const FreActionsCallFailed: AppError = {\r\n id: 39510,\r\n source: FreServiceClientFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents HoroscopeAnswerCard related App errors. 396xx: Horoscope Answer Card*/\r\nconst horoscopeAnswerCardDataService = \"HoroscopeAnswerCardDataService.ts\";\r\n/** Represents get horoscope info and user signin info error */\r\nexport const HoroscopeAnswerCardGetApiFailed: AppError = {\r\n id: 39600,\r\n source: horoscopeAnswerCardDataService,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents horoscope selection post error */\r\nexport const HoroscopeAnswerCardPostApiFailed: AppError = {\r\n id: 39601,\r\n source: horoscopeAnswerCardDataService,\r\n severity,\r\n pb\r\n};\r\n\r\nconst targetActionCTA = \"TargetAction.cta.ts\";\r\n/**\r\n * SetDefaultBrowser chromium api threw exception\r\n */\r\nexport const SetDefaultBrowserException: AppError = {\r\n id: 39700,\r\n source: targetActionCTA,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * SetDefaultBrowser chromium api not available\r\n */\r\nexport const SetDefaultBrowserNotAvailable: AppError = {\r\n id: 39701,\r\n source: targetActionCTA,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error reading ntp private settings preference.\r\n */\r\nexport const AppPinningPrivateException: AppError = {\r\n id: 39702,\r\n source: targetActionCTA,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * window.chrome.desktopWidgetPrivate API is not available\r\n */\r\nexport const DesktopWidgetPrivateNotAvailable: AppError = {\r\n id: 39703,\r\n source: targetActionCTA,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error reading ntp private settings preference.\r\n */\r\nexport const WebWidgetLaunchApiNotAvailable: AppError = {\r\n id: 39704,\r\n source: targetActionCTA,\r\n severity,\r\n pb\r\n};\r\n\r\n/*\r\n* Error reading ntp private settings preference.\r\n*/\r\nexport const WebWidgetEnableAutoStartApiNotAvailable: AppError = {\r\n id: 39705,\r\n source: targetActionCTA,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error reading ntp private settings preference.\r\n */\r\nexport const FailedToLaunchAndDefaultWebWidget: AppError = {\r\n id: 39706,\r\n source: targetActionCTA,\r\n severity,\r\n pb\r\n};\r\n\r\n/** AppErrors for SocialEmbeds */\r\nconst FacebookEmbedFile = \"FacebookEmbed.ts\";\r\nconst InstagramEmbedFile = \"InstagramEmbed.ts\";\r\nconst InfogramEmbedFile = \"InfogramEmbed.ts\";\r\nconst GoogleMapsEmbedFile = \"GoogleMapsEmbed.ts\";\r\nconst TiktokEmbedFile = \"TiktokEmbed.ts\";\r\nconst SpotifyEmbedFile = \"SpotifyEmbed.ts\";\r\nconst FlourishEmbedFile = \"FlourishEmbed.ts\";\r\nconst RedditEmbedFile = \"RedditEmbed.ts\";\r\nconst PinterestEmbedFile = \"PinterestEmbed.ts\";\r\n/** Represents facebook embed validation failed */\r\nexport const FacebookEmbedValidationError: AppError = {\r\n id: 39800,\r\n source: FacebookEmbedFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents instagram embed validation failed */\r\nexport const InstagramEmbedValidationError: AppError = {\r\n id: 39810,\r\n source: InstagramEmbedFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents infogram embed validation failed */\r\nexport const InfogramEmbedValidationError: AppError = {\r\n id: 39820,\r\n source: InfogramEmbedFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents GoogleMaps embed validation failed */\r\nexport const GoogleMapsEmbedValidationError: AppError = {\r\n id: 39830,\r\n source: GoogleMapsEmbedFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents Tiktok embed validation failed */\r\nexport const TiktokEmbedValidationError: AppError = {\r\n id: 39840,\r\n source: TiktokEmbedFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents Flourish embed validation failed */\r\nexport const FlourishEmbedValidationError: AppError = {\r\n id: 39850,\r\n source: FlourishEmbedFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents Spotify embed validation failed */\r\nexport const SpotifyEmbedValidationError: AppError = {\r\n id: 39860,\r\n source: SpotifyEmbedFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents Reddit embed validation failed */\r\nexport const RedditEmbedValidationError: AppError = {\r\n id: 39870,\r\n source: RedditEmbedFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents Pinterest embed validation failed */\r\nexport const PinterestEmbedValidationError: AppError = {\r\n id: 39880,\r\n source: PinterestEmbedFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst onThisDayCardDataService = \"OnThisDayCardDataService.ts\";\r\n/** Represents get onThisDay info failed */\r\nexport const OnThisDayCardGetApiFailed: AppError = {\r\n id: 39900,\r\n source: onThisDayCardDataService,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Telemetry initialization error\r\n */\r\nexport const EventHubPageTelemetryInitializationError: AppError = {\r\n id: 40000,\r\n source: \"EventHubPage.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Apperrors for the ntp consumer waffle\r\n */\r\nconst ConsumerWaffleFile = \"ServiceWaffle.connector.ts\";\r\nexport const ConsumerWaffleError: AppError = {\r\n id: 40100,\r\n source: ConsumerWaffleFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConsumerWaffleStringLoadError: AppError = {\r\n id: 40101,\r\n source: ConsumerWaffleFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst portugueseElectionExperienceDataService = \"PortugueseElectionExperienceDataService.ts\";\r\n/** Represents get portugueseElectionExperienceDataService info failed */\r\nexport const PortugueseElectionExperienceGetApiFailed: AppError = {\r\n id: 40201,\r\n source: portugueseElectionExperienceDataService,\r\n severity,\r\n pb\r\n};\r\n\r\nconst WpoCardProviderFileName = \"WpoCardProvider.ts\";\r\n\r\nexport const WpoCardProviderAppErrors = {\r\n WpoResponseWasNullOrErroneous: {\r\n id: 40300,\r\n source: WpoCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n ErrorFetchingWpoResponse: {\r\n id: 40301,\r\n source: WpoCardProviderFileName,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n RiverConfigurationIssue: {\r\n id: 40302,\r\n source: WpoCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n WpoGetMuidFailure: {\r\n id: 40303,\r\n source: WpoCardProviderFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n StaticContentLoaded: {\r\n id: 40304,\r\n source: WpoCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n WpoResponseEmpty: {\r\n id: 40305,\r\n source: WpoCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n UnauthorizedWpoResponse: {\r\n id: 40306,\r\n source: WpoCardProviderFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Errors related to Desktop Feed EdgeNext\r\n */\r\nconst DesktopFeedEdgeNextConnectorFileName = \"DesktopFeedEdgeNext.connector.ts\";\r\nexport const DesktopFeedEdgeNextNativeAdServiceFetchFailed: AppError = {\r\n id: 40401,\r\n source: DesktopFeedEdgeNextConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedEdgeNextRiverContentFetchFailed: AppError = {\r\n id: 40402,\r\n source: DesktopFeedEdgeNextConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedEdgeNextCmsAdsMatchResponseFailed: AppError = {\r\n id: 40403,\r\n source: DesktopFeedEdgeNextConnectorFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** App Errors for Recipes */\r\nconst RecipesPage = \"recipes/page.ts\";\r\n\r\n/**\r\n * Recipes level exception was thrown\r\n */\r\nexport const RecipesPageError: AppError = {\r\n id: 40500,\r\n source: RecipesPage,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Recipes Page Error fetching the APP_ANON cookie\r\n */\r\nexport const RecipesPageErrorFetchingAppAnonCookie: AppError = {\r\n id: 40501,\r\n source: RecipesPage,\r\n severity,\r\n pb\r\n};\r\n/** End App Errors for Recipes */\r\n\r\n/**\r\n * Errors related to Desktop Feed Single Column\r\n */\r\nconst DesktopFeedSingleColumnConnectorFileName = \"DesktopFeedSingleColumn.connector.ts\";\r\nexport const DesktopFeedSingleColumnNativeAdServiceFetchFailed: AppError = {\r\n id: 40601,\r\n source: DesktopFeedSingleColumnConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedSingleColumnRiverContentFetchFailed: AppError = {\r\n id: 40602,\r\n source: DesktopFeedSingleColumnConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedSingleColumnCmsAdsMatchResponseFailed: AppError = {\r\n id: 40603,\r\n source: DesktopFeedSingleColumnConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst SDCardProviderFileName = \"SDCardProvider.ts\";\r\n\r\nexport const SDCardProviderResponseWasNullOrErroneous: AppError = {\r\n id: 40700,\r\n source: SDCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SDCardProviderErrorFetchingResponse: AppError = {\r\n id: 40701,\r\n source: SDCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SDCardProviderConfigurationIssue: AppError = {\r\n id: 40702,\r\n source: SDCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** App Errors for QnA */\r\nconst QnaPage = \"qna/page.ts\";\r\n/**\r\n * Qna level exception was thrown\r\n */\r\nexport const QnaPageError: AppError = {\r\n\r\n id: 40800,\r\n source: QnaPage,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Qna Page Error fetching the APP_ANON cookie\r\n */\r\nexport const QnaPageErrorFetchingAppAnonCookie: AppError = {\r\n id: 40801,\r\n source: QnaPage,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Social Reactions App errors in SuperApp */\r\nconst SocialReactionsServiceResponseFileName = \"ArticleCardRenderer.tsx\";\r\n\r\n/**\r\n * Error parsing response from OneService call to update Social Reaction count in SuperApp.\r\n */\r\nexport const SocialReactionsServiceResponseDataParse: AppError = {\r\n id: 40900,\r\n source: SocialReactionsServiceResponseFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ToDoCardConnectorFileName = \"TodoCard.connector.ts\";\r\n\r\n/** Error with the ToDo card connector */\r\nexport const ToDoCardConnectorError: AppError = {\r\n id: 41000,\r\n source: ToDoCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst FinanceMarketCardFile = \"FinanceMarketCard.connector.ts\";\r\nconst FinanceDetailCardFile = \"FinanceDetailsCard.connector.ts\";\r\nconst FinanceWatchlistViewFile = \"WatchlistView.connector.ts\";\r\n\r\n/**\r\n * 411xx reserved for finance experiecne errors\r\n*/\r\n\r\n/** Error when finance market card unabailable */\r\nexport const FinanceMarketCardAppError: AppError = {\r\n id: 41100,\r\n source: FinanceMarketCardFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Error when finance detail card unabailable */\r\nexport const FinanceDetailCardAppError: AppError = {\r\n id: 41101,\r\n source: FinanceDetailCardFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/** Error when finance watchlist view sign status error, this err code is especially used for sign in */\r\nexport const FinanceWatchlistViewAppError: AppError = {\r\n id: 41102,\r\n source: FinanceWatchlistViewFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true\r\n }\r\n};\r\n\r\n/**\r\n * 412xx reserved for finance experiecne warnings\r\n*/\r\n\r\n/** Warning for finance market card. */\r\nexport const FinanceMarketCardAppWarning: AppError = {\r\n id: 41200,\r\n source: FinanceMarketCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Warning for finance detail card. */\r\nexport const FinanceDetailCardAppWarning: AppError = {\r\n id: 41201,\r\n source: FinanceDetailCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** App Errors for Views FullPage Data Connector */\r\nconst ViewsFullPageConnector = \"ViewsFullPage.connector.ts\";\r\nconst ViewsFullPageServiceClient = \"ViewsFullPageServiceClient.ts\";\r\n\r\n/**\r\n * Error while parsing data\r\n */\r\nexport const ViewsFullPageTransformError: AppError = {\r\n id: 41300,\r\n source: ViewsFullPageConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error while fetching data\r\n */\r\nexport const ViewsFullPageFetchError: AppError = {\r\n id: 41301,\r\n source: ViewsFullPageServiceClient,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error while retrieveing sections data\r\n */\r\nexport const ViewsFullPageInvalidSection: AppError = {\r\n id: 41302,\r\n source: ViewsFullPageConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * No Content Id present\r\n */\r\nexport const ViewsFullPageUndefinedContentId: AppError = {\r\n id: 41303,\r\n source: ViewsFullPageConnector,\r\n severity,\r\n pb\r\n};\r\n\r\nconst IndustryNewsCardFile = \"IndustryNewsCard.ts\";\r\n\r\n/** The Industry News Card failed to fetch industry news articles. */\r\nexport const IndustryNewsCardFailedToFetch: AppError = {\r\n id: 41400,\r\n source: IndustryNewsCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Stripe Feed\r\n */\r\nconst StripeFeedConnectorFileName = \"StripeFeed.connector.ts\";\r\nexport const StripeFeedRiverContentFetchFailed: AppError = {\r\n id: 41501,\r\n source: StripeFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const StripeFeedUnsupportedCardType: AppError = {\r\n id: 41502,\r\n source: StripeFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const StripeFeedWindowsTopStripeContentFetchFailed: AppError = {\r\n id: 41503,\r\n source: StripeFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const StripeFeedNativeAdServiceFetchFailed: AppError = {\r\n id: 41504,\r\n source: StripeFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const StripeFeedInvalidRiverTemplateId: AppError = {\r\n id: 41505,\r\n source: StripeFeedConnectorFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const StripeFeedInvalidEmptyRiver: AppError = {\r\n id: 41506,\r\n source: StripeFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error during Service Worker registration. */\r\nconst ServiceWorkerRegistrationFileName = \"ResolveServiceWorker.ts\";\r\nexport const ServiceWorkerRegistrationAppError: AppError = {\r\n id: 43000,\r\n source: ServiceWorkerRegistrationFileName,\r\n severity,\r\n pb\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * locationHref of page\r\n */\r\nexport const locationHref = (typeof (window) !== \"undefined\" ? window.location.href : \"\");\r\n\r\n/**\r\n * Render-cache expiration time in ms\r\n * 86400000 = 24 hours in milliseconds\r\n */\r\nexport const defaultExpirationTimeMs = 86400000;\r\n\r\n/**\r\n * Render-cache force expiration time in ms\r\n * 129600000 = 36 hours in milliseconds\r\n */\r\nexport const defaultForceExpirationTimeMs = 129600000;\r\n\r\n/**\r\n * localStorage key prefix for render cache expiration timestamp\r\n * Stores the sliding window expiration\r\n */\r\nexport const expirationPrefix = \"timestamp_\";\r\n\r\n/**\r\n * Force timestamp prefix for render cache values\r\n * Stores the absolute window expiration\r\n */\r\nexport const forceTimestampPrefix = \"force_timestamp_\";\r\n\r\n/**\r\n * Jss map suffix for render cache values\r\n * Stores the jss class list map\r\n */\r\nexport const jssMapSuffix = \"_jssMap\";\r\n\r\n/**\r\n * Prefix for render cache keys\r\n * Stores the collection of all render cache keys\r\n */\r\nexport const keysPrefix = \"keys_\";\r\n\r\n/**\r\n * Prefix for render cache qsp to remove and normlize the url\r\n */\r\nexport const normalizedUrlConfigkey = \"rcqsp\";\r\n\r\n/**\r\n * localStorage key prefix for render cache object\r\n * Stores the render cache snapshot\r\n */\r\nexport const storagePrefix = \"lastKnown_\";\r\n\r\n/**\r\n * River Render Cache ClassName\r\n */\r\nexport const riverRcClassName = \"river-rc\";\r\n\r\n/**\r\n * localStorage key for JSS Map object\r\n */\r\nexport const jssMapKey = `${storagePrefix}${locationHref}_jssmap`;\r\n\r\n/**\r\n * localStorage key for render cache object\r\n */\r\nexport const renderCacheKey = `${storagePrefix}${locationHref}`;\r\n\r\n/**\r\n * localStorage key for render cache expiration timestamp\r\n */\r\nexport const renderCacheExpirationKey = `${expirationPrefix}${locationHref}`;\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * The aria-label html attribute\r\n * @type {string}\r\n */\r\nexport const ariaLabelAttribute = \"aria-label\";\r\n\r\n/**\r\n * The id attribute on the
element that is the root element for Peregrine Pages / Experiences.\r\n * There is only ever 1 root element on a page\r\n * @type {string}\r\n */\r\nexport const rootElementId = \"msnewsroot\";\r\n\r\n/**\r\n * Element names that are commonly used in Peregrine pages and experiences\r\n * @type {object}\r\n */\r\nexport const htmlElementIds: any = {\r\n html: \"html\",\r\n head: \"head\",\r\n body: \"body\"\r\n};\r\n\r\n/**\r\n * Constants used by application cache related scenarios\r\n */\r\nexport const applicationCacheConstants = {\r\n /**\r\n * Attribute name on html tag that is set when appcache is being used on the page\r\n */\r\n manifestAttributeName: \"manifest\",\r\n\r\n /**\r\n * Local storage key that holds the appcache info used to determine page refresh needs\r\n * for different page types.\r\n */\r\n pagesRefreshData: \"ac_prd\"\r\n};\r\n\r\n/**\r\n * The attributes that are part of markup elements that we care about\r\n */\r\nexport const clientSettings = \"data-client-settings\";\r\nexport const pagetypeSettings = \"data-pagetype\";\r\nexport const id = \"data-id\";\r\nexport const info = \"data-info\";\r\nexport const js = \"data-js\";\r\nexport const t = \"data-t\";\r\nexport const lang = \"lang\";\r\nexport const dir = \"dir\";\r\nexport const serviceUrl = \"data-service-url\";\r\nexport const telemetryId = \"data-telemetry-id\";\r\nexport const trackPageProduct = \"data-page-product\";\r\nexport const trackPageType = \"data-page-type\";\r\n\r\n/**\r\n * The number of characters that our Service Request Ids must have. This is currently defined by OneService\r\n * @type {number}\r\n */\r\nexport const numberOfCharactersNeededForUniqueRequestId = 32;\r\n\r\n/**\r\n * The minimum number of path segments that will be in the URL which hosts MS News Experience pages.\r\n * The first path segment should be the vertical key, e.g. spartan and the second path segment\r\n * should be the the category key, e.g. ntp\r\n * @type {number}\r\n */\r\nexport const minimumHostPagePathSegments = 2;\r\n\r\n/**\r\n * Default value we use for the name of the cookie that holds the ANID\r\n */\r\nexport const anonCookieName = \"APP_ANON\";\r\n\r\n/**\r\n * App Anon Cookie Exists Cookie Name. This cookie is a marker if APP_ANON exist or not.\r\n * This is necessary because APP_ANON is HTTP cookie and not accessible by JS.\r\n */\r\nexport const appAnonCookieExistsCookieName = \"aace\";\r\n\r\n/**\r\n * Child cookie name, used to signal if rpsUser is child account.\r\n */\r\nexport const childCookieName = \"child\";\r\n\r\n/**\r\n * Tracks user engagement for the Meet Now feature via the first day it was shown\r\n */\r\nexport const meetNowEngagementDayFirstShown = \"meetnow-day-first-shown\";\r\n\r\n/**\r\n * Tracks user engagment for the Meet Now feature via the number of clicks\r\n */\r\nexport const meetNowEngagementNumberOfClicks = \"meetnow-number-clicks\";\r\n\r\n/**\r\n * Tracks whether user engagement requirements for the Meet Now feature have been met\r\n */\r\nexport const meetNowengagementReached = \"meetnow-engagement-reached\";\r\n\r\n/**\r\n * Migration consent state cookie, indicates user has already granted or denied migration consent\r\n */\r\nexport const migrationConsentStateKey = \"migration-state\";\r\n\r\n/**\r\n * Id of MSCC cookie banner container element.\r\n */\r\nexport const msccCookieBannerElementId = \"consent-banner-container\";\r\n\r\n/**\r\n * Nurturing accepted state key is intended to be used in local storage, indicates user has opted in or out of Iris targeted content.\r\n */\r\nexport const nurturingAcceptedStateKey = \"nurturingAccepted\";\r\n\r\n/**\r\n * Recommended search key is intended to be used in local storage,\r\n * indicates user has opted in or out to show recommended search below search box\r\n */\r\nexport const recommendedSearchKey = \"recommended-search-enabled\";\r\n\r\n/**\r\n * Search history key is intended to be used in local storage, indicates user has opted in or out to show search history\r\n */\r\nexport const searchHistoryKey = \"search-history-enabled\";\r\n\r\n/**\r\n * Local storage key to indicated if no search history is expected based on auth logic\r\n * If it is expected then do not show search history toggle, otherwise show search history toggle in settings dialog\r\n */\r\nexport const noSearchHistoryExpectedKey = \"no-search-history-expected-auth\";\r\n\r\n/**\r\n * key which is used to force consumer mode for Enterprise Users.\r\n */\r\nexport const EnterpriseToConsumerOverrideKey = \"forceConsumer\";\r\n\r\n/**\r\n * Headers used for one service requests\r\n */\r\nexport const oneServiceHeaders = {\r\n activityId: \"x-client-activityid\",\r\n authorization: \"Authorization\"\r\n};\r\n\r\n/**\r\n * used query string params in OneService requests\r\n */\r\nexport const oneServiceQueryStringKeys = {\r\n activityId: \"activityId\",\r\n apiKey: \"apikey\",\r\n complexInfoPaneEnabled: \"cipenabled\",\r\n contentType: \"contentType\",\r\n delta: \"delta\",\r\n disableTypeSerialization: \"DisableTypeSerialization\",\r\n infopaneCount: \"infopaneCount\",\r\n fdhead: \"fdhead\",\r\n feedLayoutRequestType: \"t\",\r\n filter: \"$filter\",\r\n ids: \"ids\",\r\n location: \"location\",\r\n market: \"market\",\r\n ocid: \"ocid\",\r\n parentContentId: \"parent-content-id\",\r\n parentNamespace: \"parent-ns\",\r\n parentTitle: \"parent-title\",\r\n queryQ: \"q\",\r\n query: \"query\",\r\n queryType: \"queryType\",\r\n qScope: \"qscope\",\r\n responseSchema: \"responseSchema\", // IDX returns nextPageUrl with camel cased responseSchema query string\r\n select: \"$select\",\r\n session: \"session\",\r\n signInCookieName: \"scn\",\r\n skip: \"$skip\",\r\n source: \"source\",\r\n timeOut: \"timeOut\",\r\n top: \"$top\",\r\n type: \"type\",\r\n user: \"user\",\r\n wrapOData: \"wrapodata\",\r\n infoPaneItemCount: \"t:InfoPane.itemCount\",\r\n newsTop: \"newsTop\",\r\n newsSkip: \"newsSkip\"\r\n};\r\n\r\n/**\r\n * Constants to use as role attribute value for elements\r\n */\r\nexport enum AriaRoles {\r\n /**\r\n * Presentation role is used to remove semantic meaning from an element and any of its related child elements.\r\n */\r\n Presentation = \"presentation\"\r\n}\r\n\r\n/**\r\n * Basic enum values for mobile device orientation\r\n */\r\nexport enum DeviceOrientation {\r\n Unknown = \"Unknown\",\r\n Portrait = \"Portrait\",\r\n Landscape = \"Landscape\"\r\n}\r\n\r\n/**\r\n * Common local storage keys\r\n */\r\nexport const CoreLocalStorageKeys = {\r\n /**\r\n * This key is used to store a dictionary of app versions per app type based on the current page version from the DOM.\r\n * Note that the version value will represent the current **loaded page** version and **not the new version** in scenarios\r\n * where the page is cached and require a new version to be loaded upon version detection (i.e., appcache, or service worker).\r\n * In these cached/refresh scenarios, we still want to store the version that the page was actually loaded from.\r\n */\r\n pageVersions: \"pageVersions\"\r\n};\r\n\r\n/**\r\n * The default APIKey for OneService requests\r\n */\r\nexport const defaultOneServiceApiKey = \"0QfOX3Vn51YCzitbLaRkTTBadtWpgTN8NZLW0C1SEM\";\r\n\r\n/**\r\n * Url for microsoft news page\r\n */\r\nexport const MicrosoftNewsUrl = \"https://microsoftnews.msn.com/\";\r\n\r\n/**\r\n * Local storage key for user's currently selected pivot (used for enterprise)\r\n */\r\nexport const SelectedPivotStorageId = \"selectedPivot\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Local storage key to save prerendered page reload telemetry data\r\n */\r\nexport const expPersistentDataChangeTrackerKey = \"epdu\";\r\n\r\n/**\r\n * Local storage key to save prerendered page reload telemetry data\r\n */\r\nexport const prerenderedPageReload = \"ppreload\";\r\n\r\n/**\r\n * Local storage key to track of the page's age (used for telemetry)\r\n */\r\nexport const prerenderedPageAge = \"ppage\";\r\n\r\n/**\r\n * The key for storing \"timeTakenFromVisibleToReload\" value in local storage.\r\n * This value will be used to calculate the totalTimeTaken between when the current page became visible\r\n * and next page(same page reloaded by prerender code)'s TTAFMax event.\r\n */\r\nexport const timeTakenFromVisibleToReloadKey = \"timeTakenFromVisibleToReload\";\r\n\r\n/**\r\n * Visibility change event\r\n */\r\nexport const visibilityChangeEventName = \"visibilitychange\";\r\n\r\n/**\r\n * Force reload flag name\r\n */\r\nexport const forceReloadFlagName = \"fpr\";\r\n\r\n/**\r\n * Time To Page Reveal when page's primary content is already rendered.\r\n * This is for when the page was revealed after the page had finished loading in the background\r\n */\r\nexport const timeToPageRevealMarker = \"TTPR\";\r\n\r\n/**\r\n * Time To Functional SearchBox\r\n */\r\nexport const timeToFunctionalSearchBoxMarker = \"TTF.SearchBox\";\r\n\r\n/**\r\n * Time To Visually Ready Marker\r\n */\r\nexport const timeToVisuallyReadyMarker = \"TTVR\";\r\n\r\n/**\r\n * Time To Visually Ready Marker SearchBox\r\n */\r\nexport const timeToVisuallyReadySearchBoxMarker = \"TTVR.SearchBox\";\r\n\r\n/**\r\n * Time To Visually Ready Marker when the page was loaded in the background\r\n */\r\nexport const ttvrBackgroundExecution = \"TTVR.BackgroundExecution\";\r\n\r\n/**\r\n * PageTiming entry added when the page is background preloaded\r\n */\r\nexport const backgroundPreloadKey = \"backgroundpreload\";\r\n\r\n/**\r\n * PageTiming entry added when the page is prerendered\r\n */\r\nexport const prerenderKey = \"prerender\";\r\n\r\n/**\r\n * Time To Page Visible\r\n */\r\nexport const timeToPageVisible = \"TTPV\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Enum for different app types\r\n * @enum\r\n */\r\nexport enum AppType {\r\n Edge = \"edge\",\r\n EdgeChromium = \"edgeChromium\",\r\n Finance = \"finance\",\r\n FirstParty = \"firstParty\",\r\n HomePage = \"homePage\",\r\n Hub = \"hub\",\r\n MicrosoftNews = \"microsoftNews\",\r\n MMX = \"mmx\",\r\n NewsAndInterests = \"newsAndInterests\",\r\n Office = \"office\",\r\n qna = \"qna\",\r\n Recipes = \"recipes\",\r\n SuperApp = \"superApp\",\r\n Shopping = \"shopping\",\r\n Traffic = \"traffic\",\r\n UGC = \"ugc\",\r\n Views = \"views\",\r\n Weather = \"weather\",\r\n Windows = \"windows\",\r\n WindowsShell = \"windowsShell\"\r\n}\r\n\r\n/**\r\n * Card style mode\r\n */\r\nexport enum CardStyleMode {\r\n Default = \"Default\",\r\n WinDashboard = \"WinDashboard\",\r\n Edge = \"Edge\"\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Client side properties that Render Service sends to initialize RequestData.\r\n * These properties are typically passed via query param to the render service.\r\n * On the client side these are available and populated through the DOM.\r\n */\r\nexport interface RequestProps {\r\n\r\n /**\r\n * URL for the original client request.\r\n */\r\n href: string;\r\n\r\n /**\r\n * Height of client browser window.\r\n */\r\n innerHeight: number;\r\n\r\n /**\r\n * Device pixel ratio of client.\r\n */\r\n devicePixelRatio: number;\r\n\r\n /**\r\n * CSS Grid support of the client browser.\r\n */\r\n canUseCssGrid: boolean;\r\n\r\n /**\r\n * Request Id.\r\n */\r\n requestId: string;\r\n\r\n /**\r\n * The request cookie string\r\n */\r\n cookie: string;\r\n\r\n /**\r\n * The request referer string\r\n */\r\n referer: string;\r\n}\r\n\r\n/**\r\n * Singleton class to store client browser data sent through query param to Render Service.\r\n * This is only used under server environment.\r\n */\r\nclass RequestData {\r\n /**\r\n * The single instance of the RequestData class.\r\n * @type {RequestData}\r\n */\r\n private static _instance: RequestData = null;\r\n\r\n /**\r\n * URL object to be used to store original request url.\r\n */\r\n public readonly url: URL;\r\n\r\n /**\r\n * Inner height of browser from the original request.\r\n */\r\n public readonly innerHeight: number;\r\n\r\n /**\r\n * Device pixel ratio from the original request.\r\n */\r\n public readonly devicePixelRatio: number;\r\n\r\n /**\r\n * Boolean flag that represents if CSS Grid is supported by the browser from the original request.\r\n */\r\n public readonly canUseCssGrid: boolean;\r\n\r\n /**\r\n * Request Id.\r\n */\r\n public readonly requestId: string;\r\n\r\n /**\r\n * Request cookie string\r\n */\r\n public readonly cookie: string;\r\n\r\n /**\r\n * Request referer string\r\n */\r\n public readonly referer: string;\r\n\r\n /**\r\n * Initialize the request data instance with passed in client properties\r\n */\r\n private constructor(data: RequestProps) {\r\n this.url = new URL(data.href);\r\n this.innerHeight = data.innerHeight;\r\n this.devicePixelRatio = data.devicePixelRatio;\r\n this.canUseCssGrid = data.canUseCssGrid;\r\n this.requestId = data.requestId;\r\n this.cookie = data.cookie;\r\n this.referer = data.referer;\r\n }\r\n\r\n /**\r\n * Returns singleton class instance.\r\n * @returns RequestData\r\n */\r\n public static getInstance(): RequestData {\r\n if (global[\"TEST_ENV\"] && !RequestData._instance) {\r\n resetRequestData({\r\n href: \"http://localhost:8080/\",\r\n innerHeight: 768,\r\n devicePixelRatio: 1,\r\n canUseCssGrid: false,\r\n requestId: \"0\",\r\n cookie: \"\",\r\n referer: \"\"\r\n });\r\n }\r\n\r\n if (!RequestData._instance) {\r\n // Throw error if the request data has not been set as this should never be the case.\r\n // This likely highlights that the request data was not initialized when handling a\r\n // request when server side rendering.\r\n // TODO - http://osgvsowi/24832691 renable throwing an error.\r\n // This is currently disabled as other singletons that are initialized at import time use\r\n // this they will throw an error before anyone has the chance to initialize the request data\r\n resetRequestData({\r\n href: \"http://localhost:8080/\",\r\n innerHeight: 0,\r\n devicePixelRatio: 0,\r\n canUseCssGrid: false,\r\n requestId: \"0\",\r\n cookie: \"\",\r\n referer: \"\"\r\n });\r\n // throw new Error(\"Request data is not initialized yet through ResetInstance.\");\r\n }\r\n return RequestData._instance;\r\n }\r\n\r\n /**\r\n * Reset singleton class instance with passed in info and client settings\r\n * @returns RequestData\r\n */\r\n public static resetInstance(data: RequestProps): RequestData {\r\n RequestData._instance = new RequestData(data);\r\n return RequestData._instance;\r\n }\r\n}\r\n\r\n/**\r\n * Export function to reset the request data singleton.\r\n * This must be used to set the request data.\r\n */\r\nexport const resetRequestData = RequestData.resetInstance;\r\n\r\n/**\r\n * Export get instance function for testing\r\n */\r\nexport const getRequestData = () => (RequestData.getInstance());","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Constants that are used throughout the library\r\n */\r\nexport namespace ConnectorConstants {\r\n /**\r\n * The key within a state JSON document used to store a connectors individual state\r\n */\r\n export const connectorStateKey = \"_@STATE@_\";\r\n\r\n export const renderAction = \"@@connector-view/RENDER\";\r\n\r\n export const dataConnectorMergeInitAction = \"@@data-connector/MERGE-INIT\";\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Attempts to parse a given string to a JSON object\r\n * @param {string} jsonString - The string to parse.\r\n * @returns {any} - the parsed object if successful, or null otherwise.\r\n */\r\nexport function tryParseJson(jsonString: string): any {\r\n try {\r\n return JSON.parse(jsonString);\r\n } catch {\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * Attempts to parse the given value as a integer and if failed will return the defaultValue.\r\n * @param {string} value - The value to parse.\r\n * @param {number} defaultValue - The default value to return if parsing fails\r\n * @returns {number} the parsed value if it was a valid number or otherwise the default value if specified.\r\n */\r\nexport function tryParseInt(value: string, defaultValue: number): number {\r\n const n = parseInt(value);\r\n return isNaN(n) ? defaultValue : n;\r\n}\r\n\r\n/**\r\n * Attempts to convert the given JSON object to a string.\r\n * @param jsonObj - The JSON object to convert.\r\n * @returns {string} - the converted string if successful, or null otherwise.\r\n */\r\nexport function tryStringifyJson(jsonObj: {}): string {\r\n try {\r\n return JSON.stringify(jsonObj);\r\n } catch {\r\n return null;\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Size1ColumnWidth, Size2ColumnWidth, Size3ColumnWidth, Size4ColumnWidth, Size5ColumnWidth } from \"./ColumnWidths\";\r\n\r\nimport { PageUtility } from \"@msnews/core\";\r\nimport { findIndex } from \"lodash-es\";\r\nimport { toPx } from \"@microsoft/fast-jss-utilities\";\r\n\r\n/**\r\n * Describes possible arrangements of columns. For example c3 represents 3 columns.\r\n *\r\n * Each arrangement is valid for a particular range of window widths. For example, for window widths from 996px to 1319px,\r\n * we will use the c3 arrangement, or 3 columns.\r\n *\r\n * Currently each arrangement describes a column count, but in the future, there may be separate 3-column \"large\"\r\n * and 3-column \"small\" arrangements, like on msn.com.\r\n */\r\nexport enum ColumnArrangement {\r\n c1 = \"c1\",\r\n c2 = \"c2\",\r\n c3 = \"c3\",\r\n c4 = \"c4\",\r\n c5 = \"c5\"\r\n}\r\n\r\nlet minViewportWidthOverrides: Map;\r\n\r\n/**\r\n * Override the min viewport widths for the given column arrangements.\r\n * @param overrides The overrides to use for the column arrangements.\r\n */\r\nexport function overrideMinViewportWidths(overrides: Map): void {\r\n minViewportWidthOverrides = overrides;\r\n}\r\n\r\n/**\r\n * Returns the column arrangement\r\n * @param breakpoint The breakpoint we want to map to column arrangement\r\n */\r\nexport function mapBreakpointToColumnArrangement(breakpoint: number): ColumnArrangement {\r\n switch (breakpoint) {\r\n case 0:\r\n return ColumnArrangement.c1;\r\n case 1:\r\n return ColumnArrangement.c2;\r\n case 2:\r\n return ColumnArrangement.c3;\r\n case 3:\r\n return ColumnArrangement.c4;\r\n case 4:\r\n return PageUtility.fiveColSupported() ? ColumnArrangement.c5 : null;\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * Update ColumnArrangements and columnArrangementMap in case five column layout is supported\r\n */\r\nexport function updateColumnArrangementsForFiveCol(): void {\r\n if (PageUtility.fiveColSupported() && columnArrangements.length === 4) {\r\n const colFiveArrangementDefinition = new ColumnArrangementDefinition(ColumnArrangement.c5, Size5ColumnWidth);\r\n columnArrangements.push(colFiveArrangementDefinition);\r\n columnArrangementMap[ColumnArrangement.c5] = colFiveArrangementDefinition;\r\n }\r\n}\r\n\r\n/**\r\n * Defines the properties of a particular column arrangement.\r\n */\r\nexport class ColumnArrangementDefinition {\r\n /**\r\n * Creates a column arrangement definition.\r\n * @param arrangement The column arrangement being defined.\r\n * @param contentSizePx The size of the content in pixels for this arrangement.\r\n * @param isFirstBreakpoint True if this is the first breakpoint.\r\n */\r\n constructor(public arrangement: ColumnArrangement, public contentSizePx: number, private isFirstBreakpoint?: boolean) { }\r\n\r\n /**\r\n * Gets the minimum required window width to trigger this column arrangement.\r\n */\r\n public get minViewportWidthPx(): number {\r\n if (this.isFirstBreakpoint) {\r\n return 0;\r\n }\r\n\r\n if (minViewportWidthOverrides) {\r\n const widthOverride = minViewportWidthOverrides.get(this.arrangement);\r\n if (widthOverride) {\r\n return widthOverride;\r\n }\r\n }\r\n\r\n return this.contentSizePx + contentBufferPx;\r\n }\r\n}\r\n\r\n/**\r\n * The list of possible column arrangement definitions. Use this to determine what window sizes are\r\n * appropriate for each column arrangement.\r\n */\r\nexport const columnArrangements: ColumnArrangementDefinition[] = [\r\n new ColumnArrangementDefinition(ColumnArrangement.c1, Size1ColumnWidth, true),\r\n new ColumnArrangementDefinition(ColumnArrangement.c2, Size2ColumnWidth),\r\n new ColumnArrangementDefinition(ColumnArrangement.c3, Size3ColumnWidth),\r\n new ColumnArrangementDefinition(ColumnArrangement.c4, Size4ColumnWidth)];\r\n\r\n// Add five column arrangement when supported.\r\n// Note this will not currently work with SSR as no reset functionality is provided and this edits a global constant.\r\nif (PageUtility.fiveColSupported()) {\r\n columnArrangements.push(new ColumnArrangementDefinition(ColumnArrangement.c5, Size5ColumnWidth));\r\n}\r\n\r\n/**\r\n * A map of column arrangements to definitions.\r\n */\r\nconst columnArrangementMap: { [columnArrangement in ColumnArrangement]?: ColumnArrangementDefinition } = {};\r\nfor (const columnArrangementDefinition of columnArrangements) {\r\n columnArrangementMap[columnArrangementDefinition.arrangement] = columnArrangementDefinition;\r\n}\r\n\r\n/**\r\n * The number of pixels to add on top of the content width in order to get the window width required to show it.\r\n * This buffer guarantees space between the content and the edge of the window, and also space for the scrollbar,\r\n * which is also counted when determining breakpoints.\r\n */\r\nconst contentBufferPx = 32;\r\n\r\n/**\r\n * Get list of breakpoints from column arrangements\r\n */\r\nfunction getBreakpointsFromColumnArrangements(): number[] {\r\n const breakpoints: number[] = [0];\r\n\r\n for (let i = 1; i < columnArrangements.length; i++) {\r\n breakpoints.push(columnArrangements[i].minViewportWidthPx);\r\n }\r\n\r\n return breakpoints;\r\n}\r\n\r\n/**\r\n * Breakpoints that are calculated from the column arrangements\r\n */\r\nexport const columnBreakpoints = getBreakpointsFromColumnArrangements();\r\n\r\n/**\r\n * Gets the content width for the given column arrangement.\r\n * @param columnArrangement The column arrangement to look up.\r\n * @returns The width in pixels of the content.\r\n */\r\nexport function contentWidthPxForColumnArrangement(columnArrangement: ColumnArrangement): number {\r\n return columnArrangementMap[columnArrangement].contentSizePx;\r\n}\r\n\r\n/**\r\n * Gets the minimum window width for the given column arrangement.\r\n * @param columnArrangement The column arrangement to look up.\r\n * @returns The minimum width for the window to show this column arrangement.\r\n */\r\nexport function minWindowWidthPxForColumnArrangement(columnArrangement: ColumnArrangement): number {\r\n return columnArrangementMap[columnArrangement].minViewportWidthPx;\r\n}\r\n\r\n/**\r\n * Gets the maximum window width for the given column arrangement.\r\n * @param columnArrangement The column arrangement to look up.\r\n * @returns The maximum width for the window to show this column arrangement. NaN if there is no maximum.\r\n */\r\nexport function maxWindowWidthPxForColumnArrangement(columnArrangement: ColumnArrangement): number {\r\n const arrangementIndex = findIndex(columnArrangements, a => a.arrangement === columnArrangement);\r\n\r\n if (arrangementIndex < columnArrangements.length - 1) {\r\n return columnArrangements[arrangementIndex + 1].minViewportWidthPx - 1;\r\n }\r\n\r\n return NaN;\r\n}\r\n\r\n/**\r\n * Helper to efficiently get the media query string to be used for given min/max column arrangements\r\n * It can be used in conjunction with `window.matchMedia` to target specific page widths, and it is also\r\n * used internally to generate the equivalent css selectors in `getMediaQuerySelector`\r\n * @param minArrangement The min column arrangement to use for the @media query (inclusive)\r\n * @param maxArrangement The max column arrangement to use for the @media query (inclusive)\r\n * @returns the @media query for the specified min/max.\r\n */\r\nexport function getMediaQuery(minArrangement: ColumnArrangement | null, maxArrangement: ColumnArrangement | null): string {\r\n const queries = [];\r\n\r\n if (minArrangement) {\r\n const minArrangementDefinition = columnArrangementMap[minArrangement];\r\n const minWidthPx = minArrangementDefinition.minViewportWidthPx;\r\n\r\n if (minWidthPx > 0) {\r\n queries.push(`(min-width: ${toPx(minWidthPx)})`);\r\n }\r\n }\r\n\r\n if (maxArrangement) {\r\n const maxArrangementDefinition = columnArrangementMap[maxArrangement];\r\n const maxArrangementIndex = columnArrangements.indexOf(maxArrangementDefinition);\r\n\r\n if (maxArrangementIndex < columnArrangements.length - 1) {\r\n queries.push(`(max-width: ${toPx(columnArrangements[maxArrangementIndex + 1].minViewportWidthPx - 1)})`);\r\n }\r\n }\r\n\r\n return queries.join(\" and \");\r\n}\r\n\r\n/**\r\n * Helper to efficiently get the media query string to be used for the given column arrangement\r\n * It can be used in conjunction with `window.matchMedia` to target specific page widths, and it is also\r\n * used internally to generate the equivalent css selectors in `getMediaQuerySelector`\r\n * @param columnArrangement The column arrangement to target\r\n * @returns The media query to target that column arrangement\r\n */\r\nexport function getMediaQueryFor(columnArrangement: ColumnArrangement): string {\r\n return getMediaQuery(columnArrangement, columnArrangement);\r\n}\r\n\r\n/**\r\n * Helper to efficiently get the CSS selector to be used for apply styles for given min/max arrangements\r\n * @param minArrangement The min column arrangement to use for the media query (inclusive)\r\n * @param maxArrangement The max column arrangement to use for the media query (inclusive)\r\n * @returns the css media query selector for the specified min/max.\r\n */\r\nexport function getMediaQuerySelector(minArrangement: ColumnArrangement | null, maxArrangement: ColumnArrangement | null): string {\r\n const mediaQuery = getMediaQuery(minArrangement, maxArrangement);\r\n return mediaQuery ? \"@media \" + mediaQuery : \"\";\r\n}\r\n\r\n/**\r\n * Helper to efficiently get the CSS selector to be used for apply styles for the given column arrangement.\r\n * @param columnArrangement The column arrangement to target\r\n * @returns the css media query selector for the specified column arrangement.\r\n */\r\nexport function getMediaQuerySelectorFor(columnArrangement: ColumnArrangement): string {\r\n return getMediaQuerySelector(columnArrangement, columnArrangement);\r\n}\r\n\r\n/**\r\n * Callback type for subscribing to BreakpointManager breakpoint changed events.\r\n */\r\nexport type BreakpointManagerCallback = (columnArrangement: ColumnArrangement) => void;\r\n\r\n/**\r\n * Breakpoint manager common interface.\r\n */\r\nexport interface BreakpointManager {\r\n /**\r\n * Gets the current column arrangement.\r\n */\r\n currentColumnArrangement: ColumnArrangement;\r\n\r\n /**\r\n * Subscribes for changes\r\n * @param callback The method to call when the column arrangement changes.\r\n */\r\n subscribe(callback: BreakpointManagerCallback): void;\r\n\r\n /**\r\n * Unsubscribe from changes\r\n * @param callback The callback to unregister.\r\n */\r\n unsubscribe(callback: BreakpointManagerCallback): void;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { IActionPayload } from \"./IActionPayload\";\r\nimport { IDataConnector } from \"../connectors\";\r\nimport PageBase from \"../pages/PageBase\";\r\n\r\n/**\r\n * Helper function to create an action payload\r\n * @param connector The connector (if applicable) where the action will be dispatched\r\n * @param type The Action Type (name of the action)\r\n * @param args Arguments to be passed to the action\r\n * @param experienceInstanceId If defined, the id of an experience instance, that will be used by action receiver\r\n */\r\nexport function getActionPayload(connector: IDataConnector, type: string, args: any[], experienceInstanceId: string): IActionPayload {\r\n let stateKey: string = undefined;\r\n if (connector) {\r\n if (!connector.parentNamespace) {\r\n stateKey = connector.namespace;\r\n } else {\r\n stateKey = connector.parentNamespace + \".\" + connector.namespace;\r\n }\r\n }\r\n\r\n return {\r\n key: stateKey,\r\n experienceInstanceId: experienceInstanceId,\r\n type: type,\r\n params: args\r\n };\r\n}\r\n\r\n/**\r\n * Helper function to dispatch an action either to a connector's namespaced store, or to the root store for the entire app.\r\n * @param connector The connector (if applicable) where the action will be dispatched\r\n * @param payload The action payload\r\n */\r\nexport function dispatchAction(connector: IDataConnector, payload: IActionPayload): any {\r\n\r\n // Dispatch the action\r\n if (connector) {\r\n return connector.store.dispatch(payload);\r\n } else {\r\n return PageBase.getInstance().store.dispatch(payload);\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { WebStorage } from \"./WebStorage\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * Local storage class for persistent storage\r\n */\r\nexport class LocalStorage extends WebStorage {\r\n constructor() {\r\n let storage: Storage = null;\r\n\r\n if (canUseDOM()) {\r\n try {\r\n storage = localStorage;\r\n } catch (ex) {\r\n // Getting local storage failed. Can happen in Chrome when user has disabled cookies.\r\n }\r\n }\r\n\r\n super(storage);\r\n }\r\n}\r\n\r\n/**\r\n * Set the local storage instance. Useful when setting up mock storage instance.\r\n * @param _storage The local storage instance to change to.\r\n */\r\nexport function setLocalStorage(_storage: WebStorage): void {\r\n safeLocalStorage = _storage;\r\n}\r\n\r\n/**\r\n * Get the local storage instance. This should be used in place of window.localStorage\r\n * as the browser API would throw exception on browsers with cookies disabled.\r\n * @return The local storage instance.\r\n */\r\nexport function getLocalStorage(): WebStorage {\r\n return safeLocalStorage;\r\n}\r\n\r\nlet safeLocalStorage: WebStorage = new LocalStorage();","// © Microsoft Corporation. All rights reserved.\r\n// Provides utility functions to get and set data from browser webStorage.\r\n\r\nimport { tryParseJson } from \"../utilities/Parsing\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\n/**\r\n * Base class for localeStorage and sessionStorage abstractions\r\n */\r\nexport class WebStorage {\r\n\r\n /**\r\n * Check if the web storage is supported\r\n * @returns {boolean} true if supported\r\n */\r\n public get supported(): boolean {\r\n return !!this.storage;\r\n }\r\n\r\n /**\r\n * Local storage object for persistent storage\r\n * @param storage Storage used.\r\n */\r\n constructor(private readonly storage: Storage) {\r\n }\r\n\r\n /**\r\n * Get given key's value from web storage\r\n * @param {string} key - Key name\r\n * @returns {string} Key value\r\n */\r\n public getItem(key: string): string {\r\n if (this.supported) {\r\n return this.storage.getItem(key);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the value from local storage using the key.\r\n * @param {string} key - the storage key to store under\r\n * @param {T} defaultValue - the default value to return if parsing fails\r\n * @returns {T} The parsed JSON value\r\n */\r\n public getObject(key: string, defaultValue?: T): T {\r\n const value = this.getItem(key);\r\n if (value != null) {\r\n const parsedObj = tryParseJson(value);\r\n if (parsedObj != null) {\r\n return parsedObj;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n /**\r\n * Gets given index location key from web storage\r\n * @param {string} key - Key name\r\n * @returns {string} Key value\r\n */\r\n public key(index: number): string {\r\n if (this.supported && index >= 0) {\r\n return this.storage.key(index);\r\n }\r\n }\r\n\r\n /**\r\n * Sets the given value after stringifying as JSON\r\n * @param {string} key - the storage key to store under\r\n * @param {T} value - the value to serialize and store\r\n */\r\n public setObject(key: string, value: T): void {\r\n (value !== undefined)\r\n ? this.setItem(key, JSON.stringify(value))\r\n : this.removeItem(key);\r\n }\r\n\r\n /**\r\n * Removes the given key from storage and returns the existing value parsed\r\n * @param {string} key - the key to remove.\r\n */\r\n public removeObject(key: string): T {\r\n const value = this.removeItem(key);\r\n if (value != null) {\r\n return tryParseJson(value);\r\n }\r\n }\r\n\r\n /**\r\n * Set given key's value to local storage\r\n * @param {string} key - Key name\r\n * @param {string} value - Key value\r\n */\r\n public setItem(key: string, value: string): void {\r\n if (this.supported) {\r\n // Catch quota exceeded exception\r\n try {\r\n this.storage.setItem(key, value);\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Remove key item from local storage\r\n * @param {string} key - Key name\r\n * @returns {string} Key value\r\n */\r\n public removeItem(key: string): string {\r\n if (this.supported) {\r\n const value = this.getItem(key);\r\n this.storage.removeItem(key);\r\n return value;\r\n }\r\n }\r\n\r\n /**\r\n * Removes all keys containing the given substring in the storage key\r\n * @param {string} substring The substring to check\r\n */\r\n public removeSubstringKeys(substring: string): void {\r\n if (!this.supported || !substring) {\r\n return;\r\n }\r\n\r\n const matchingKeys = [];\r\n for (let index = 0; index < this.storage.length; index++) {\r\n const storageKey = this.key(index);\r\n if (storageKey && storageKey.includes(substring)) {\r\n matchingKeys.push(storageKey);\r\n }\r\n }\r\n\r\n for (let index = 0; index < matchingKeys.length; index++) {\r\n this.removeItem(matchingKeys[index]);\r\n }\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport PageBase from \"./PageBase\";\r\n\r\nexport default PageBase;\r\nexport * from \"./PageBase\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccountType, AppType, AudienceModeType, AuthCookieName, PageType } from \"@msnews/experiences-constants\";\r\nimport { AppErrorPropertyBag, getAppErrorsPropertyBag, getPageTimings, updateAppErrorsPropertyBag } from \"@msnews/diagnostics\";\r\n\r\nimport {\r\n appAnonCookieExistsCookieName,\r\n childCookieName,\r\n rootElementId,\r\n serviceUrl,\r\n telemetryId,\r\n trackPageProduct,\r\n trackPageType,\r\n EnterpriseToConsumerOverrideKey\r\n} from \"../constants\";\r\n\r\nimport { Environment, getEnvironmentFromString } from \"./Environment\";\r\nimport { HostPage, IHostPage } from \"./HostPage\";\r\nimport { WpoModel, getWpoFlights } from \"@msnews/wpo-common\";\r\nimport { canUseDOM, getDocumentElementById, getLocationHostname, getLocationHref, getLocationOrigin, getLocationSearch } from \"@msnews/isomorphic-util\";\r\nimport { getCookie, getMuidCookie } from \"../utilities/CookieUtility\";\r\nimport { getLocalStorage } from \"../webstorage/LocalStorage\";\r\n\r\nimport { AccountInfo } from \"./Enterprise\";\r\nimport { Market } from \"./Market\";\r\nimport { PageRequestTargetScope } from \"./PageRequestTargetScope\";\r\nimport { PlatformType } from \"cms-models-msn/configuration/types/PlatformType\";\r\nimport { UrlUtility } from \"../utilities/UrlUtility\";\r\nimport { Utility } from \"../utilities/Utility\";\r\nimport { headData } from \"./HeadData\";\r\nimport { isString } from \"lodash-es\";\r\nimport { tryParseJson } from \"../utilities/Parsing\";\r\nimport { shouldUseGitConfigs } from \"@msnews/experimentation-helpers\";\r\nimport { ConfigCacheProperties, ConfigOrigin, ConfigOrigins } from \"@msnews/core-contracts\";\r\nimport { updateResolverAppErrorsPropertyBag } from \"@msnews/config-resolver\";\r\n\r\n/**\r\n * chrome\r\n * The chrome API is not defined in Typescript\r\n */\r\ndeclare global {\r\n interface Window { chrome: any; }\r\n}\r\n\r\n/**\r\n * Page level experience tracking info\r\n */\r\nexport interface ITrackInfo {\r\n sitePage: {\r\n page_product: string,\r\n page_type: string\r\n }\r\n}\r\n\r\n// This is defined in webpack config\r\ndeclare let __WEBPACK_LOCAL_GITCONFIGS__: string;\r\ndeclare let __WEBPACK_LOCAL_GITCONFIGS_LOC__: string;\r\n\r\nexport class AppEnvironment {\r\n /**\r\n * The single instance of the AppEnvironment class.\r\n * @type {AppEnvironment}\r\n */\r\n private static _instance: AppEnvironment;\r\n\r\n /**\r\n * the activity id for the current page view\r\n */\r\n private activityId: string;\r\n\r\n /**\r\n * Base url for the content service, endpoints/queries are appended for specific content calls.\r\n * This is an akamai url for highly cacheable content.\r\n * Possible values are enumerated on ContentServiceConfig.ts\r\n *\r\n * @private\r\n * @type {string}\r\n * @memberof AppEnvironment\r\n */\r\n private contentServiceUrlBase: URL;\r\n\r\n private currentRequestTargetScope: PageRequestTargetScope;\r\n\r\n private currentMarket: Market;\r\n private hostPage: IHostPage;\r\n\r\n /** The hostname to use for content links. */\r\n private currentContentLinkHost: string;\r\n\r\n /**\r\n * Indicates that the page is running as an FRE page (i.e. the url contains fre=1)\r\n * Does not indicate that the FRE itself is currently displayed over the page.\r\n */\r\n private isFrePage: boolean;\r\n\r\n /** Flag to enable five column layout. */\r\n private enableFiveColLayout: boolean;\r\n\r\n /**\r\n * Base for the service url, endpoints/queries are appended for specific service calls.\r\n * This is the OneService url used for personalized content.\r\n * Possible values are enumerated on OneServiceConfig.ts\r\n *\r\n * @private\r\n * @type {string}\r\n * @memberof AppEnvironment\r\n */\r\n private serviceUrlBase: URL;\r\n\r\n /**\r\n * Base URL for the feed service\r\n */\r\n private feedServiceUrlBase: URL;\r\n\r\n /**\r\n * Base domain for the feed service\r\n */\r\n private serviceDomainUrl: string;\r\n\r\n /**\r\n * Base domain host for static resources\r\n */\r\n private staticDomain: string;\r\n\r\n /**\r\n * Base domain for the enterprise feed service\r\n */\r\n private enterpriseServiceDomainUrl: string;\r\n\r\n /**\r\n * The account info for the current page user wrapped in a promise\r\n */\r\n private accountInfoPromise: Promise;\r\n\r\n /**\r\n * The resolved account info. This is only set when the account info promise is resolved.\r\n */\r\n private resolvedAccountInfo: AccountInfo;\r\n\r\n private appType: string;\r\n private authCookieName: AuthCookieName;\r\n private buildVersion: string;\r\n\r\n private environmentConfigUrl: URL;\r\n\r\n private rootTelemetryId: number;\r\n private trackInfo: ITrackInfo;\r\n private userId: string;\r\n private countryCode: string;\r\n private latitude: string;\r\n private longitude: string;\r\n private environment: Environment;\r\n private featureFlags: any;\r\n private disableCachingConfigs: boolean;\r\n private enableConfigService: boolean;\r\n private isMultiConfigRetrievalEnabled: boolean;\r\n private configServiceBaseUrl: URL;\r\n private disableContentPreviewCache: boolean;\r\n private disableContentCacheIDBRead: boolean;\r\n private sendFeedCallActivityIdInHeader: boolean;\r\n private useOneServiceAuthEndpoints: boolean;\r\n private useAuthFetch: boolean;\r\n private clarityEnabled: boolean;\r\n private isCnDomain: boolean;\r\n private oneServiceApiKey: string;\r\n\r\n /** True if query string has appropriate debug flag */\r\n private isDebug: boolean;\r\n\r\n /** True if query string has appropriate flag to show msnCreatorDashboard (msnDash=) */\r\n private showMnsCreatorDashboard: boolean;\r\n\r\n /** Config Root Url */\r\n private configRootUrl: URL;\r\n\r\n /** Cache busting identifier received from pcs */\r\n private cacheBustingIdentifier: string;\r\n\r\n /** True if this is git configs flight */\r\n private isGitConfigs: boolean;\r\n\r\n /** Indicates whether feature/localization configs are fetched from local repo */\r\n private configOrigins: ConfigOrigins;\r\n\r\n /** For Config caching optimizations. */\r\n private configCacheProperties: ConfigCacheProperties;\r\n\r\n /** CRS endpoint version. Example: v2 or v3 */\r\n private crsVersion: string;\r\n\r\n /** Root config index CMS Id. Example: cms/api/amp/experienceConfigIndex/BBUsYQa */\r\n private configIndexDocId: string;\r\n\r\n /** The WPOData we get from local storage using the requestContext wpoData function */\r\n private wpoData: string;\r\n public get WpoData(): string { return this.wpoData; }\r\n public set WpoData(value: string) {\r\n this.wpoData = value;\r\n this.addWpoFlights();\r\n }\r\n\r\n /**\r\n * ActivityId value from initial server response, use telemetry's requestId instead for associating with current page client navigation\r\n */\r\n public get ActivityId(): string { return this.activityId; }\r\n public set ActivityId(value: string) {\r\n this.activityId = value;\r\n headData.ClientSettings = {\r\n ...headData.ClientSettings,\r\n aid: value\r\n };\r\n }\r\n\r\n /**\r\n * Getter for the base url for the content service, endpoints/queries are appended for specific content calls.\r\n * This is an akamai url for highly cacheable content.\r\n * Possible values are enumerated on ContentServiceConfig.ts\r\n *\r\n * @readonly\r\n * @type {URL}\r\n * @memberof AppEnvironment\r\n */\r\n public get EnvironmentConfigUrl(): URL {\r\n // If I mutate the same object, I will need to revert to the original state somewhere.\r\n // For safety reason, it is better to use a new Object\r\n const url = new URL(\"\", this.environmentConfigUrl);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.config\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.config\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.config\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Getter for the base url for the content service, endpoints/queries are appended for specific content calls.\r\n * This is an akamai url for highly cacheable content.\r\n * Possible values are enumerated on ContentServiceConfig.ts\r\n *\r\n * @readonly\r\n * @type {URL}\r\n * @memberof AppEnvironment\r\n */\r\n public get ContentServiceUrlBase(): URL {\r\n // If I mutate the same object, I will need to revert to the original state somewhere.\r\n // For safety reason, it is better to use a new Object\r\n const url = new URL(\"\", this.contentServiceUrlBase);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.content\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.content\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.content\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n public get CurrentRequestTargetScope(): PageRequestTargetScope { return this.currentRequestTargetScope; }\r\n public set CurrentRequestTargetScope(value: PageRequestTargetScope) { this.currentRequestTargetScope = value; }\r\n\r\n public get CurrentMarket(): Market { return this.currentMarket; }\r\n public set CurrentMarket(value: Market) { this.currentMarket = value; }\r\n\r\n public get EnableFiveColLayout(): boolean { return this.enableFiveColLayout; }\r\n public set EnableFiveColLayout(value: boolean) { this.enableFiveColLayout = value; }\r\n\r\n public get Environment(): Environment { return this.environment; }\r\n public set Environment(value: Environment) { this.environment = value; }\r\n\r\n public get StaticDomain(): string { return this.staticDomain; }\r\n\r\n public get HostPage(): IHostPage { return this.hostPage; }\r\n public set HostPage(value: IHostPage) { this.hostPage = value; }\r\n\r\n public get AppType(): string { return this.appType; }\r\n\r\n public get AuthCookieName(): AuthCookieName { return this.authCookieName; }\r\n public set AuthCookieName(value: AuthCookieName) { this.authCookieName = value; }\r\n\r\n public get UseOneServiceAuthEndpoints(): boolean { return this.useOneServiceAuthEndpoints; }\r\n public set UseOneServiceAuthEndpoints(value: boolean) { this.useOneServiceAuthEndpoints = value; }\r\n\r\n public get UseAuthFetch(): boolean { return this.useAuthFetch; }\r\n public set UseAuthFetch(value: boolean) { this.useAuthFetch = value; }\r\n\r\n public get AccountInfoPromise(): Promise { return this.accountInfoPromise; }\r\n public set AccountInfoPromise(value: Promise) { this.accountInfoPromise = value; }\r\n\r\n public get ResolvedAccountInfo(): AccountInfo { return this.resolvedAccountInfo; }\r\n public set ResolvedAccountInfo(value: AccountInfo) { this.resolvedAccountInfo = value; }\r\n\r\n public get BuildVersion(): string { return this.buildVersion || \"\"; }\r\n\r\n public get ClarityEnabled(): boolean { return this.clarityEnabled; }\r\n public set ClarityEnabled(value: boolean) { this.clarityEnabled = value; }\r\n\r\n public get RootTelemetryId(): number { return this.rootTelemetryId; }\r\n public set RootTelemetryId(value: number) { this.rootTelemetryId = value; }\r\n\r\n public get TrackInfo(): ITrackInfo { return this.trackInfo; }\r\n public set TrackInfo(value: ITrackInfo) { this.trackInfo = value; }\r\n\r\n public get UserId(): string { return this.getUserMuid() || this.userId; }\r\n public set UserId(value: string) { this.userId = value; }\r\n\r\n public get OneServiceApiKey(): string { return this.oneServiceApiKey; }\r\n public set OneServiceApiKey(value: string) { this.oneServiceApiKey = value; }\r\n\r\n /** True if query string has appropriate debug flag */\r\n public get IsDebug(): boolean { return this.isDebug; }\r\n\r\n /** True if query string has appropriate flag to show msnCreatorDashboard (msnDash=) */\r\n public get ShowMnsCreatorDashboard(): boolean { return this.showMnsCreatorDashboard; }\r\n\r\n /**\r\n * Gets the host to use when linking to content.\r\n */\r\n public get contentLinkHost(): string { return this.currentContentLinkHost; }\r\n\r\n public get IsCnDomain(): boolean { return this.isCnDomain; }\r\n\r\n /**\r\n * Getter for the base for the service url, endpoints/queries are appended for specific service calls.\r\n * This is the oneservice url used for personalized content.\r\n * Possible values are enumerated on OneServiceConfig.ts\r\n *\r\n * @type {URL}\r\n * @memberof AppEnvironment\r\n */\r\n public get ServiceUrlBase(): URL {\r\n const url = new URL(\"\", this.serviceUrlBase);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.service\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.service\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.service\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Base URL for the feed service\r\n */\r\n public get FeedServiceUrlBase(): URL {\r\n if (!this.feedServiceUrlBase) {\r\n return null;\r\n }\r\n\r\n const url = new URL(\"\", this.feedServiceUrlBase);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.service\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.service\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.service\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Base URL for the enterprise service\r\n */\r\n public get EnterpriseServiceUrlBase(): URL {\r\n if (!this.enterpriseServiceDomainUrl) {\r\n return;\r\n }\r\n\r\n const url = new URL(\"\", this.enterpriseServiceDomainUrl);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.service\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.service\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.service\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Returns true if audience mode is set to Enterprise and the user is logged into an AAD account, else false\r\n */\r\n public get isAadAccountUser(): boolean {\r\n return this.CurrentRequestTargetScope && this.CurrentRequestTargetScope.audienceMode === AudienceModeType.Enterprise &&\r\n this.ResolvedAccountInfo && this.ResolvedAccountInfo.account_type && this.ResolvedAccountInfo.account_type === AccountType.AAD;\r\n }\r\n\r\n public get IsFrePage(): boolean { return this.isFrePage; }\r\n\r\n /**\r\n * This is the switch to turn on/off indexed db operation used as a caching layer in config resolver (Resolver.ts)\r\n */\r\n public get DisableCachingConfigs(): boolean { return this.disableCachingConfigs; }\r\n\r\n /**\r\n * This is the switch to turn on/off config service operation\r\n */\r\n public get EnableConfigService(): boolean {\r\n const queryParamOverride = UrlUtility.getQueryParameterByName(\"enableConfigService\", getLocationSearch());\r\n\r\n if (queryParamOverride) {\r\n return queryParamOverride.toLocaleLowerCase() === \"true\";\r\n }\r\n return this.enableConfigService;\r\n }\r\n\r\n /**\r\n * This indicates whether we will use CMS PPE configs or not\r\n */\r\n public get EnableCMSPPEConfigs(): boolean { return headData && headData.EnableCMSPPEConfigs; }\r\n\r\n /**\r\n * Check whether multi config retrieval is supported.\r\n */\r\n public get IsMultiConfigRetrievalEnabled(): boolean { return this.isMultiConfigRetrievalEnabled; }\r\n\r\n /**\r\n * This is the switch to turn on/off content preview caching in core/cache/ContentPreview.ts\r\n */\r\n public get DisableContentPreviewCache(): boolean {\r\n return this.disableContentPreviewCache;\r\n }\r\n\r\n /**\r\n * Returns a flag indicating whether the one service feed fetch call should send activityID\r\n * in the request header or as a QSP in the URL (current behavior is via QSP).\r\n */\r\n public get SendFeedCallActivityIdInHeader(): boolean {\r\n return this.sendFeedCallActivityIdInHeader;\r\n }\r\n\r\n /**\r\n * This is the switch to turn off hydrating content preview cache from IndexedDB.\r\n * Default is false\r\n */\r\n public get DisableContentCacheIDBRead(): boolean {\r\n const queryParamOverride = UrlUtility.getQueryParameterByName(\"disableContentCacheIDBRead\", getLocationSearch());\r\n\r\n if (queryParamOverride) {\r\n return queryParamOverride === \"true\";\r\n }\r\n\r\n return this.disableContentCacheIDBRead;\r\n }\r\n\r\n /**\r\n * Get base url of Config Service.\r\n */\r\n public get ConfigServiceBaseUrl(): URL { return this.configServiceBaseUrl; }\r\n\r\n /**\r\n * This returns feature flags client settings stamped by PCS.\r\n */\r\n public get FeatureFlags(): any { return this.featureFlags; }\r\n\r\n /**\r\n * This returns config root url\r\n */\r\n public get ConfigRootUrl(): URL {\r\n if (!this.configRootUrl) {\r\n return null;\r\n }\r\n\r\n const url = new URL(\"\", this.configRootUrl);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.config\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.config\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.config\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Returns cache busting identifier from PCS.\r\n */\r\n public get CacheBustingIdentifier(): string { return this.cacheBustingIdentifier; }\r\n\r\n /**\r\n * True if this is git configs flight\r\n */\r\n public get IsGitConfigs(): boolean { return this.isGitConfigs; }\r\n\r\n /**\r\n * Returns the country code. For example \"br\"\r\n */\r\n public get CountryCode(): string { return this.countryCode; }\r\n public set CountryCode(value: string) { this.countryCode = value; }\r\n\r\n /// / FIXME: hyphen has a second 'h'\r\n /// / Bug 24228723: [Peregrine] ActivityIdLowerCaseNoHypens misspells \"Hyphen\"\r\n /**\r\n * Gets the Activity ID in lower case and without any hyphens. This helper method should be where parity with Prime is required.\r\n * Use telemetry's requestId instead for associating with current page client navigation\r\n */\r\n public get ActivityIdLowerCaseNoHypens(): string { return ((headData && headData.ClientSettings && headData.ClientSettings.aid) || \"\").toLowerCase(); }\r\n\r\n /**\r\n * Returns the latitude. For example \"42.361145\"\r\n */\r\n public get Latitude(): string { return this.latitude; }\r\n\r\n /**\r\n * Returns the longitude. For example \"-71.057083\"\r\n */\r\n public get Longitude(): string { return this.longitude; }\r\n\r\n /** For Config caching optimizations. */\r\n public get ConfigCacheProperties(): ConfigCacheProperties { return this.configCacheProperties; }\r\n\r\n /** Fetches local dev environment for client resolver */\r\n public get ConfigOrigins(): ConfigOrigins { return this.configOrigins; }\r\n\r\n /**\r\n * Indicates whether configs should be fetched from local repo based on conditions and overrides\r\n */\r\n private setConfigOrigin(): ConfigOrigins {\r\n // Default to production\r\n const configOrigins: ConfigOrigins = { feature: ConfigOrigin.Production, loc: ConfigOrigin.Production };\r\n\r\n if (__WEBPACK_LOCAL_GITCONFIGS_LOC__) {\r\n configOrigins.feature = ConfigOrigin.Local;\r\n configOrigins.loc= ConfigOrigin.Local;\r\n } else if (__WEBPACK_LOCAL_GITCONFIGS__) {\r\n configOrigins.feature = ConfigOrigin.Local;\r\n configOrigins.loc = ConfigOrigin.Production;\r\n }\r\n\r\n // Override based on conditions\r\n if (!this.IsGitConfigs || this.EnableConfigService) {\r\n configOrigins.feature = ConfigOrigin.Production;\r\n configOrigins.loc = ConfigOrigin.Production;\r\n }\r\n return configOrigins;\r\n }\r\n\r\n /**\r\n * Initialize the AppEnvironment singleton instance.\r\n * @param _serviceUrl Optional URL to initialize the ServiceUrlBase.\r\n * Render service can be deployed to the shared cluster or OneService cluster. Depending on where it is deployed, we can override the configServiceUrl or serviceDomainUrl to speed up the performance\r\n * @param _configServiceOverride When render service is deployed to the shared cluster. We want to make calls to the config service within the shared cluster region, instead of calling www.msn.com\r\n * @param _serviceDomainOverride When render service is deployed to OneService cluster, we want to make calls to the feed service within the OneService cluster region, instead of calling assets.msn.com\r\n */\r\n private constructor(_serviceUrl: URL, _configServiceOverride: string, _serviceDomainOverride: string) {\r\n this.initializeAppEnvironment(_serviceUrl, _configServiceOverride, _serviceDomainOverride);\r\n }\r\n\r\n /**\r\n * Returns singleton class instance.\r\n * @returns {AppEnvironment}\r\n */\r\n public static getInstance(serviceUrl: URL = null, configServiceOverride: string = null, serviceDomainOverride: string = null): AppEnvironment {\r\n return AppEnvironment._instance || (AppEnvironment._instance = new AppEnvironment(serviceUrl, configServiceOverride, serviceDomainOverride));\r\n }\r\n\r\n /**\r\n * Reinitialize the singleton class instance.\r\n * @param serviceUrl OneService service url to initialize to.\r\n * @param configServiceOverride url that is used to override config service url.\r\n * @param serviceDomainOverride url that is used to override service domain url.\r\n * This value is externally configured from SSR environment\r\n * @returns {AppEnvironment}\r\n */\r\n public static resetInstance(serviceUrl: URL = null, configServiceOverride: string = null, serviceDomainOverride: string = null): AppEnvironment {\r\n AppEnvironment._instance = new AppEnvironment(serviceUrl, configServiceOverride, serviceDomainOverride);\r\n appEnvironment = AppEnvironment._instance;\r\n return AppEnvironment._instance;\r\n }\r\n\r\n /**\r\n * Initializes App environment. This is normally only called by the constructor (singleton pattern)\r\n * It is made public so that it can be also called by test code.\r\n */\r\n public initializeAppEnvironment(_serviceUrl?: URL, configServiceOverride?: string, serviceDomainOverride?: string): void {\r\n\r\n let environmentFromHeadData: Environment = null;\r\n const clientSettings = headData && headData.ClientSettings;\r\n\r\n const locationHost: string = getLocationHostname();\r\n this.isCnDomain = locationHost.toLowerCase().endsWith(\".cn\");\r\n\r\n if (clientSettings) {\r\n this.activityId = this.tryReformatGuid(clientSettings.aid);\r\n this.currentMarket = (headData.Locale || clientSettings.apps_locale) as Market;\r\n this.countryCode = clientSettings.geo_country;\r\n this.latitude = clientSettings.geo_lat;\r\n this.longitude = clientSettings.geo_long;\r\n this.configRootUrl = clientSettings.configRootUrl ? new URL(\"\", clientSettings.configRootUrl) : null;\r\n environmentFromHeadData = getEnvironmentFromString(clientSettings.pcsInfo && clientSettings.pcsInfo.env || \"prod\");\r\n\r\n this.setAccountInfoPromise();\r\n this.appType = clientSettings.apptype || \"\";\r\n this.authCookieName = this.getAuthCookieName();\r\n this.useOneServiceAuthEndpoints = false;\r\n this.useAuthFetch = false;\r\n\r\n this.featureFlags = clientSettings.featureFlags;\r\n\r\n this.disableCachingConfigs =\r\n this.featureFlags && this.featureFlags.disableCachingConfigs\r\n ? this.featureFlags.disableCachingConfigs === \"true\"\r\n : false;\r\n\r\n this.enableConfigService =\r\n this.featureFlags && this.featureFlags.enableConfigService\r\n ? this.featureFlags.enableConfigService === \"true\"\r\n : true;\r\n\r\n this.disableContentPreviewCache =\r\n this.featureFlags && this.featureFlags.disableContentPreviewCache\r\n ? this.featureFlags.disableContentPreviewCache === \"true\"\r\n : false;\r\n\r\n this.disableContentCacheIDBRead = this.featureFlags && this.featureFlags.disableContentCacheIDBRead\r\n ? this.featureFlags.disableContentCacheIDBRead === \"true\"\r\n : false;\r\n\r\n // Use feature flag as a switch to disable the feature (will need a PCS deployment)\r\n this.sendFeedCallActivityIdInHeader = this.featureFlags && this.featureFlags.disableActivityIdInHeader && this.featureFlags.disableActivityIdInHeader === \"true\"\r\n ? false\r\n : this.appType === AppType.Edge || this.appType === AppType.Hub;\r\n\r\n this.cacheBustingIdentifier = clientSettings.cbid;\r\n\r\n if (clientSettings.pcsInfo && !getAppErrorsPropertyBag().pcsVersion) {\r\n const propertyBagPcsVersion: AppErrorPropertyBag = {\r\n appType: this.appType,\r\n pcsVersion: clientSettings.pcsInfo.v\r\n };\r\n\r\n updateAppErrorsPropertyBag(propertyBagPcsVersion);\r\n }\r\n\r\n const bundleInfo = clientSettings.bundleInfo;\r\n\r\n if (bundleInfo) {\r\n const { alias, configsHash, hash, locConfigsHash, v } = bundleInfo;\r\n this.buildVersion = v || \"\";\r\n updateAppErrorsPropertyBag({ build: this.buildVersion });\r\n updateResolverAppErrorsPropertyBag({ build: this.buildVersion });\r\n\r\n const buildAlias = alias;\r\n if (buildAlias) {\r\n updateAppErrorsPropertyBag({ buildAlias });\r\n }\r\n\r\n if (hash && configsHash && locConfigsHash) {\r\n this.configCacheProperties = {\r\n bundleHash: hash,\r\n configHash: configsHash,\r\n locHash: locConfigsHash\r\n };\r\n }\r\n }\r\n\r\n // Get configIndexDocId\r\n this.configIndexDocId = clientSettings.configIndexDocId;\r\n }\r\n\r\n const rootElement = canUseDOM() ? getDocumentElementById(rootElementId) : null;\r\n const locationHref = getLocationHref();\r\n const locationOrigin = getLocationOrigin();\r\n\r\n // env is read from\r\n // - query string param env, if present\r\n // - headData.ClientSettings.pcsInfo.env\r\n // - defaults to prod otherwise\r\n const envQSOverwrite = getEnvironmentFromString(UrlUtility.getQueryParameterByName(\"env\", locationHref));\r\n this.environment =\r\n envQSOverwrite\r\n || environmentFromHeadData\r\n || Environment.prod;\r\n\r\n const servicesEndpoints = clientSettings && clientSettings.servicesEndpoints;\r\n const pcsProvidedDomainUrl = servicesEndpoints && servicesEndpoints.feedService && servicesEndpoints.feedService.domain || locationOrigin;\r\n\r\n if (canUseDOM()) {\r\n // Get from headdata if possible.\r\n // Else using locationOrigin is okay (current MMX scenario) since it'd use .cn version for China.\r\n // todo: pass this to SW to override regex in service-worker/src/swConstants/DefaultRoutes.enum.ts\r\n this.serviceDomainUrl = pcsProvidedDomainUrl;\r\n } else {\r\n this.serviceDomainUrl = serviceDomainOverride || pcsProvidedDomainUrl;\r\n }\r\n\r\n this.staticDomain = new URL(pcsProvidedDomainUrl).host;\r\n this.enterpriseServiceDomainUrl = servicesEndpoints && servicesEndpoints.enterpriseFeedService && servicesEndpoints.enterpriseFeedService.domain;\r\n\r\n // Get CRS endpoint version. Example: v2 or v3.\r\n this.crsVersion = servicesEndpoints && servicesEndpoints.crs && servicesEndpoints.crs.v;\r\n\r\n this.serviceUrlBase = _serviceUrl || (rootElement && rootElement.getAttribute(serviceUrl) && new URL(\"\", rootElement.getAttribute(serviceUrl))) || new URL(\"/service/\", this.serviceDomainUrl);\r\n this.feedServiceUrlBase = this.serviceDomainUrl ? new URL(\"/service/\", this.serviceDomainUrl) : undefined;\r\n\r\n // Get the hostPage from the request url\r\n this.hostPage = HostPage.getHostPageFromUrl(locationHref);\r\n\r\n // Determine if the page is running as an FRE page\r\n this.isFrePage = (UrlUtility.getQueryParameterByName(\"fre\", locationHref) === \"1\");\r\n\r\n this.userId = this.getUserMuid();\r\n\r\n // Get attributes from the head (full page Peregrine experience) or from the spa \"root\" element (PrimeHybrid case)\r\n // TODO, determine where in the element attributes these values should be set\r\n this.rootTelemetryId = rootElement ? Number(rootElement.getAttribute(telemetryId)) : 0;\r\n const trackPageProd = rootElement && rootElement.getAttribute(trackPageProduct);\r\n const trackPageTypeVal = rootElement && rootElement.getAttribute(trackPageType);\r\n this.trackInfo = { sitePage: { page_product: trackPageProd, page_type: trackPageTypeVal } };\r\n\r\n this.currentContentLinkHost = this.createContentLinkHost();\r\n\r\n this.setTargetScope();\r\n\r\n // Before calling this function make sure that\r\n // 1) Target scope is set and pageExperiments are available. No flights is fine.\r\n // 2) ServiceEndPoints are set and crsVersion is available.\r\n // 3) configIndexDocId is set.\r\n // 4) appType is set correctly.\r\n this.isGitConfigs = this.useGitConfigs();\r\n\r\n this.configOrigins = this.setConfigOrigin();\r\n\r\n // Temporarily hardcode endpoint for MMX flight, when flight is off, we want to use hardcoded value.\r\n // After the flight, we hope to start using the regular logic for MMX\r\n if (this.appType === AppType.MMX && headData && !headData.IsMmxWwwContentRequest) {\r\n const mmxExperimentContentHost = getLocationHostname().endsWith(\".cn\") ? \"https://assets.msn.cn\" : \"https://assets.msn.com\";\r\n this.contentServiceUrlBase = new URL(\"/content/\", mmxExperimentContentHost);\r\n } else {\r\n // IsMmxWwwContentRequest still comes here\r\n this.contentServiceUrlBase = this.serviceDomainUrl ? new URL(\"/content/\", this.serviceDomainUrl) : undefined;\r\n }\r\n\r\n this.isMultiConfigRetrievalEnabled = this.useMultiConfigsRetrieval();\r\n\r\n // Make sure that this.isGitConfigs is set before calling getConfigServiceBaseUrl.\r\n const baseUrl = this.getConfigServiceBaseUrl(this.isMultiConfigRetrievalEnabled, configServiceOverride);\r\n\r\n this.configServiceBaseUrl = baseUrl ? new URL(\"\", baseUrl) : null;\r\n\r\n this.environmentConfigUrl = this.serviceDomainUrl ? new URL(\"/config/v1/\", this.serviceDomainUrl) : undefined;\r\n\r\n this.isDebug = ((UrlUtility.getQueryParameterByName(\"debug\", locationHref) || \"\").toLowerCase() in { 1: 1, true: 1 })\r\n || (UrlUtility.getQueryParameterByName(\"item\", locationHref) || \"\").toLowerCase().indexOf(\"/debug\") > 0\r\n || locationHost.includes(\"localhost\");\r\n\r\n this.showMnsCreatorDashboard = UrlUtility.getQueryParameterByName(\"mnsDash\", locationHref) != null;\r\n\r\n this.oneServiceApiKey = this.getOneServiceApiKey();\r\n\r\n this.enableFiveColLayout = false;\r\n }\r\n\r\n /**\r\n * Get the ApiKey that should be used by the current AppType\r\n * Please work OneService (aka: IDX) before updating it as this can break features\r\n * even if the call succeeds.\r\n */\r\n private getOneServiceApiKey(): string {\r\n let apiKey;\r\n switch (this.appType) {\r\n case AppType.WindowsShell:\r\n apiKey = \"pWw5OmQehOA0XNfgcgrTrwEJZJJJzE83ovtTQx6JRG\";\r\n break;\r\n case AppType.NewsAndInterests:\r\n apiKey = \"AEbyVYqTQAPvg4lWwMSFHaLkDzl3weRKKIDDInLQUj\";\r\n break;\r\n default:\r\n apiKey = \"0QfOX3Vn51YCzitbLaRkTTBadtWpgTN8NZLW0C1SEM\";\r\n }\r\n return apiKey;\r\n }\r\n\r\n /**\r\n * Get the UserMuid from the muid cookie\r\n */\r\n private getUserMuid(): string {\r\n let muid: string;\r\n const muidCookie: string = getMuidCookie();\r\n if (isString(muidCookie)) {\r\n muid = \"m-\" + muidCookie;\r\n }\r\n return muid;\r\n }\r\n\r\n /**\r\n * Get config service base url\r\n * @param isMultiConfigRetrievalEnabled if multiple config retrieval is supported.\r\n * @param configServiceOverride url that is used to override config service url. This value is externally configured from SSR environment.\r\n * @returns {string} - config service base url.\r\n */\r\n private getConfigServiceBaseUrl(isMultiConfigRetrievalEnabled = true, configServiceOverride = null): string {\r\n const relativePath = this.isGitConfigs\r\n ? \"/resolver/api/resolve/v3/config/\"\r\n : `/resolver/api/resolve/${isMultiConfigRetrievalEnabled ? \"v2/\" : \"\"}configindex/`;\r\n\r\n if (configServiceOverride) {\r\n // When doing server side rendering the ClusterRegionUrl env variable should be set, use this to avoid calls to CRS going outside of the cluster.\r\n return configServiceOverride + relativePath;\r\n } else if (process && process.env && process.env.WEBPACK_DEV_SERVER) {\r\n // int and localhost to use int.msn.com for config service.\r\n return \"https://int.msn.com\" + relativePath;\r\n } else {\r\n return getLocationOrigin() ? getLocationOrigin() + relativePath : null;\r\n }\r\n }\r\n\r\n /**\r\n * Function checks if ConfigService should return multiple configs\r\n * @returns true if supported else false.\r\n */\r\n private useMultiConfigsRetrieval(): boolean {\r\n const urlQuery = getLocationSearch();\r\n if (urlQuery) {\r\n const param = UrlUtility.getQueryParameterByName(\"isMultiConfigRetrievalEnabled\", urlQuery);\r\n if (param) {\r\n return param.toLocaleLowerCase() === \"true\";\r\n }\r\n }\r\n\r\n // PCS flag to turn on/off multi config retrieval.\r\n if (this.featureFlags\r\n && this.featureFlags.isMultiConfigRetrievalEnabled) {\r\n return this.featureFlags.isMultiConfigRetrievalEnabled === \"true\";\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Function checks if Git configs is enabled\r\n * @returns true if supported else false.\r\n */\r\n private useGitConfigs(): boolean {\r\n const urlQuery = getLocationSearch();\r\n if (urlQuery) {\r\n const param = UrlUtility.getQueryParameterByName(\"isGitConfig\", urlQuery);\r\n if (param) {\r\n return param.toLocaleLowerCase() === \"true\";\r\n }\r\n }\r\n\r\n const flights = this.currentRequestTargetScope && this.currentRequestTargetScope.pageExperiments;\r\n return shouldUseGitConfigs(this.crsVersion, flights, this.configIndexDocId, this.appType);\r\n }\r\n\r\n /**\r\n * Get the auth cookie name based on the app type of the page\r\n * @returns {AuthCookieName} - the name of the auth cookie to use\r\n */\r\n private getAuthCookieName(): AuthCookieName {\r\n const clientSettings = headData && headData.ClientSettings;\r\n const appType: AppType = (clientSettings.apptype || \"\") as AppType;\r\n let authCookieName: AuthCookieName;\r\n switch (appType) {\r\n case AppType.Windows:\r\n authCookieName = headData.ClientSettings.pagetype === PageType.Windows ? AuthCookieName.Anon : AuthCookieName.AppAnon;\r\n break;\r\n case AppType.FirstParty:\r\n case AppType.Hub:\r\n case AppType.MicrosoftNews:\r\n case AppType.Views:\r\n case AppType.Weather:\r\n case AppType.Finance:\r\n case AppType.HomePage:\r\n authCookieName = AuthCookieName.Anon;\r\n break;\r\n case AppType.Edge:\r\n case AppType.EdgeChromium:\r\n case AppType.MMX:\r\n case AppType.Office:\r\n default:\r\n authCookieName = AuthCookieName.AppAnon;\r\n }\r\n\r\n return authCookieName;\r\n }\r\n\r\n /**\r\n * Sets the AccountInfoPromise for the current user.\r\n * If unable to await, ResolvedAccountInfo is also set when the promise is resolved.\r\n */\r\n private setAccountInfoPromise(): void {\r\n this.ResolvedAccountInfo = null;\r\n this.AccountInfoPromise = new Promise((resolve) => {\r\n if (!canUseDOM() || !window.chrome || !window.chrome.authPrivate || !window.chrome.authPrivate.getPrimaryAccountInfo) {\r\n return resolve(null);\r\n }\r\n\r\n const markerName = \"Auth.GetPrimaryAccountInfo\";\r\n const startTime = Math.round(performance.now());\r\n\r\n window.chrome.authPrivate.getPrimaryAccountInfo((accountInfo) => {\r\n const endTime = Math.round(performance.now());\r\n const pageTimings = getPageTimings();\r\n pageTimings[markerName] = endTime - startTime;\r\n\r\n this.ResolvedAccountInfo = accountInfo;\r\n return resolve(accountInfo);\r\n });\r\n });\r\n\r\n // Start the promise asynchronously.\r\n this.AccountInfoPromise;\r\n }\r\n\r\n /**\r\n * Determines the content link host to use.\r\n * @returns The content link host.\r\n */\r\n private createContentLinkHost(): string {\r\n const topLevelDomain = this.currentMarket === Market.ZHCN ? \"cn\" : \"com\";\r\n return \"www.msn.\" + topLevelDomain;\r\n }\r\n\r\n /**\r\n * Reformats the given guid without dashes to a guid string with dashes.\r\n * @param {string} guid - The guid without dashes.\r\n * @returns {string} - The reformatted GUI with dashes.\r\n */\r\n private tryReformatGuid(guid: string): string {\r\n if (guid && guid.length === 32) {\r\n // use a regex to extract the specific substrings to reformat the guid\r\n const matches = guid.match(/(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})/i);\r\n if (matches) {\r\n // join all the captured groups from 1-5 to format the final guid string\r\n guid = matches.slice(1).join(\"-\");\r\n }\r\n }\r\n\r\n return guid;\r\n }\r\n\r\n /**\r\n * Sets target scope for current request.\r\n */\r\n private setTargetScope(): void {\r\n if (!headData || !headData.ClientSettings) {\r\n return;\r\n }\r\n // If user is signed in and \"child\" Cookie exists - set Kids audience mode, otherwise use PCS provided Audience mode.\r\n let audienceMode: AudienceModeType;\r\n if (getCookie(appAnonCookieExistsCookieName) && getCookie(childCookieName)) {\r\n audienceMode = AudienceModeType.Kids;\r\n } else if (headData.ClientSettings.audienceMode === AudienceModeType.Enterprise && this.getEnterpriseOverride()) {\r\n audienceMode = AudienceModeType.Adult;\r\n } else {\r\n audienceMode = headData.ClientSettings.audienceMode || AudienceModeType.Adult;\r\n }\r\n\r\n const { browser, deviceFormFactor, domain, locale, os, pagetype } = headData.ClientSettings;\r\n\r\n this.currentRequestTargetScope = {\r\n audienceMode: audienceMode,\r\n browser: browser,\r\n deviceFormFactor: deviceFormFactor,\r\n domain: domain,\r\n locale: locale,\r\n os: os,\r\n platform: PlatformType.Web,\r\n pageType: pagetype\r\n };\r\n\r\n // if locale is not defined in client settings, try reading it from headData for backward compatibility\r\n if (!this.currentRequestTargetScope.locale && Utility.stringHasData(headData.Locale)) {\r\n const locale = headData.Locale.split(\"-\");\r\n if (locale.length > 1) {\r\n this.currentRequestTargetScope.locale = {\r\n language: locale[0],\r\n // Some spartan locale are in format \"ha-latn-ng\". Here the market is \"ng\" and language is \"ha\"\r\n market: locale[locale.length - 1]\r\n };\r\n }\r\n }\r\n\r\n if (Utility.stringHasData(headData.CurrentFlights)) {\r\n this.currentRequestTargetScope.pageExperiments = headData.CurrentFlights.split(\",\");\r\n }\r\n\r\n this.addWpoFlights();\r\n }\r\n\r\n /**\r\n * Get WpoModel from WpoData that we got from local storage given the specific WPO\r\n * key\r\n */\r\n private getWpoModel(wpoData: string): WpoModel {\r\n let model: WpoModel;\r\n if (wpoData != null) {\r\n model = tryParseJson(wpoData);\r\n if (model != null) {\r\n model;\r\n }\r\n }\r\n return model;\r\n }\r\n\r\n /**\r\n * Adds WPO flights to the current request target scope pageExperiments.\r\n */\r\n private addWpoFlights(): void {\r\n if (!this.FeatureFlags || !this.FeatureFlags.wpoEnabled) {\r\n return;\r\n }\r\n const WPOModel = this.getWpoModel(this.wpoData);\r\n const flightsCached: string[] = getWpoFlights(WPOModel);\r\n\r\n if (!flightsCached) {\r\n return;\r\n }\r\n const currentPageExperiments = this.currentRequestTargetScope.pageExperiments || [];\r\n this.currentRequestTargetScope.pageExperiments = currentPageExperiments.concat(flightsCached);\r\n }\r\n\r\n private getEnterpriseOverride(): boolean {\r\n return !!getLocalStorage().getObject(EnterpriseToConsumerOverrideKey);\r\n }\r\n}\r\n\r\nexport const getAppEnvironment = AppEnvironment.getInstance;\r\n\r\n// appEnvironment can be reinitialized for server side rendering through resetAppEnvironment.\r\nexport let appEnvironment = AppEnvironment.getInstance();\r\n\r\nexport const resetAppEnvironment = AppEnvironment.resetInstance;","\r\n// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { RenderCache, RenderCacheKeys } from \"./RenderCache\";\r\nimport { keysPrefix, locationHref, normalizedUrlConfigkey, riverRcClassName } from \"./Constants\";\r\n\r\nimport { KeyValueArray, getLocalStorageInline } from \"@msnews/core\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\nlet renderCacheObject: RenderCache;\r\n\r\nexport const windowAvailable = !!((typeof(window) !== \"undefined\") && window);\r\n\r\n/**\r\n * Function to get render cache if it's valid.\r\n * @returns Render cache object if it exists and is valid otherwise null.\r\n */\r\nexport function getRenderCache(): RenderCache {\r\n if (renderCacheObject) {\r\n return renderCacheObject;\r\n }\r\n\r\n const storage = getLocalStorageInline();\r\n if (!storage) {\r\n return null;\r\n }\r\n\r\n // get all normalized render cache keys from local storage\r\n let renderCacheKeys: RenderCacheKeys;\r\n const renderCacheStoredKeys = storage.getItem(renderCacheKeyOfNormalizedKeys);\r\n try {\r\n renderCacheKeys = renderCacheStoredKeys && JSON.parse(renderCacheStoredKeys);\r\n } catch (error) {\r\n return null; // keys not parsable.\r\n }\r\n\r\n if (!renderCacheKeys || !renderCacheKeys.keyn || !renderCacheKeys.expn || !renderCacheKeys.frcn || !renderCacheKeys.jssn) {\r\n return null;\r\n }\r\n\r\n const cacheExpirationTimestamp = storage.getItem(renderCacheKeys.expn);\r\n if (!cacheExpirationTimestamp) {\r\n return null; // Cache Expiration Timestamp not exist\r\n }\r\n\r\n const parsedCacheExpirationTimestamp = parseInt(cacheExpirationTimestamp);\r\n if (!parsedCacheExpirationTimestamp) {\r\n return null; // Cache Expiration Timestamp broken.\r\n }\r\n\r\n const currentTimestamp: number = new Date().getTime();\r\n if (currentTimestamp >= parsedCacheExpirationTimestamp) {\r\n return null; // cache expired.\r\n }\r\n\r\n const renderCacheStorage = storage.getItem(renderCacheKeys.keyn);\r\n if (!renderCacheStorage) {\r\n return null; // Cache object is missing.\r\n }\r\n\r\n try {\r\n renderCacheObject = JSON.parse(renderCacheStorage);\r\n } catch (error) {\r\n return null; // Cache object not parsable.\r\n }\r\n\r\n if (!renderCacheObject || !renderCacheObject.dom || !renderCacheObject.batch_css) {\r\n renderCacheObject = null; // Cache object is broken\r\n }\r\n\r\n return renderCacheObject;\r\n}\r\n\r\n/**\r\n * Batch All styles into one object.\r\n */\r\nexport function batchCSS(): string {\r\n let batchCss = \"\";\r\n\r\n // Enumerate and write out all of the JSS styles\r\n const styles = document.getElementsByTagName(\"style\");\r\n const length = styles.length;\r\n\r\n for (let i = 0; i < length; i++) {\r\n // Skip any styles that do not have a data-jss attribute to always pick newer styles added by jss\r\n if (styles[i].dataset.jss != null) {\r\n batchCss += styles[i].innerHTML;\r\n }\r\n }\r\n\r\n return batchCss;\r\n}\r\n\r\n/**\r\n * Scrapes Dom and remove River.\r\n */\r\nexport function scrapeDom(includeNewsFeed: boolean): string {\r\n const root = document.getElementById(\"root\");\r\n\r\n if (!root || !root.innerHTML) {\r\n return \"\";\r\n }\r\n\r\n /* Currently we don't have functionality to include experiences separately,\r\n because of that we do return whole dom if river included in render cache and exclude river otherwise */\r\n if (includeNewsFeed) {\r\n return root.innerHTML;\r\n }\r\n\r\n const rivers = document.getElementsByClassName(riverRcClassName);\r\n\r\n if (!rivers || !rivers.length) {\r\n return root.innerHTML;\r\n }\r\n\r\n const river = rivers[0] as HTMLElement;\r\n\r\n return root.innerHTML.replace(river.outerHTML, \"\");\r\n}\r\n\r\n/**\r\n * Gets the state object from render cache.\r\n * @returns The redux state object.\r\n */\r\nexport function getStateFromRenderCache(): any {\r\n // Check to see if this app instance was bootstrapped with a render-cache\r\n const renderCache = getRenderCache();\r\n\r\n if (!renderCache || !renderCache.state) {\r\n return null; // Render Cache missing or it does not include State.\r\n }\r\n\r\n let initialState;\r\n\r\n try {\r\n initialState = JSON.parse(renderCache.state, reduxStoreStringifyReviver);\r\n } catch (error) {\r\n // Cache state object is not parsable.\r\n }\r\n\r\n return initialState;\r\n}\r\n\r\n/**\r\n * Redux Store Stringify replacer HOF, generates store stringify.\r\n * @param storeExceptions list of store namespaces which will not be included in result.\r\n */\r\nexport function reduxStoreStringifyReplacer(key: string, value: any): any {\r\n const originalObject = this[key];\r\n if (originalObject instanceof Map) {\r\n return {\r\n dataType: \"Map\",\r\n value: [...originalObject]\r\n };\r\n } else {\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * Function to normalize current URL\r\n * Example:\r\n * For normalizeKeyParamsList = [\"startpage\", \"prerender\"]\r\n * https://ntp.msn.com/edge/ntp?locale=en-us&startpage=1 is normalized to https://ntp.msn.com/edge/ntp?locale=en-us\r\n * https://ntp.msn.com/edge/ntp?startpage=1&locale=en-us is normalized to https://ntp.msn.com/edge/ntp?locale=en-us\r\n * https://ntp.msn.com/edge/ntp?locale=en-us&startpage=1&prerender=1 is normalized to https://ntp.msn.com/edge/ntp?locale=en-us\r\n * @returns normalized location href\r\n */\r\nexport function getNormalizedLocationHref(configParamsList?: [string]) {\r\n\r\n // get the url\r\n const normalizeKeyParamsList = configParamsList || getNormalizeKeyParamsList();\r\n\r\n if (!normalizeKeyParamsList || !normalizeKeyParamsList.length) {\r\n return locationHref;\r\n }\r\n\r\n const searchParams: URLSearchParams = new URLSearchParams(location.search);\r\n if (!searchParams) {\r\n return locationHref;\r\n }\r\n\r\n const normalizedParams: KeyValueArray = [];\r\n searchParams.forEach((value, key) => {\r\n if (!normalizeKeyParamsList.includes(key)) {\r\n normalizedParams.push({ key, value });\r\n }\r\n });\r\n\r\n // Filter for valid keyValue entries, and then map them into key==value strings\r\n // joined with an &\r\n const queryString = normalizedParams.map(kv => kv.key + \"=\" + kv.value).join(\"&\");\r\n const basePath = (locationHref || \"\").split(\"?\")[0];\r\n return basePath + (queryString ? \"?\" + queryString : \"\");\r\n}\r\n\r\n/**\r\n * set normalized param list to localStorage\r\n */\r\nexport function setNormalizeKeyParamsList(normalizeKeyParamsList: Array): void {\r\n if (normalizeKeyParamsList) {\r\n const storage = getLocalStorageInline();\r\n if (storage) {\r\n storage.setItem(normalizedUrlConfigkey, normalizeKeyParamsList.toString());\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * The key for storing all render cache normalized keys\r\n * Maintain a single entry for collection of all render cache keys\r\n * Example: for https://ntp.msn.com/edge/ntp?locale=en-us URL,\r\n * we have one key with all the following render cache keys values\r\n *\r\n * key: keys_https://ntp.msn.com/edge/ntp?locale=en-us&startpage=1\r\n * value: {\r\n * keyn: \"lastKnown_https://ntp.msn.com/edge/ntp?locale=en-us\", // render cache key\r\n * expn: \"timestamp_https://ntp.msn.com/edge/ntp?locale=en-us\", // expiration key\r\n * frcn: \"force_timestamp_https://ntp.msn.com/edge/ntp?locale=en-us\", // force timestamp key\r\n * jssn: \"lastKnown_https://ntp.msn.com/edge/ntp?locale=en-us_jssMap\" // jss map key\r\n * }\r\n */\r\nexport const renderCacheKeyOfNormalizedKeys = `${keysPrefix}${(typeof (window) !== \"undefined\" ? getNormalizedLocationHref() : \"\")}`;\r\n\r\n/**\r\n * Custom JSON.stringify reviver that will create Map objects from a string/JSON representation\r\n * @param key not used\r\n * @param value The value being converted from a string\r\n */\r\nfunction reduxStoreStringifyReviver(key: any, value: any): any {\r\n // If the value being restored is a object, check it it was a map\r\n if (typeof value === \"object\" && value !== null) {\r\n // If the object value being restored was a map, that was custom written, then revive it by creating a map\r\n if (value.dataType === \"Map\") {\r\n return new Map(value.value);\r\n }\r\n }\r\n\r\n // Return the original value being restored\r\n return value;\r\n}\r\n\r\n/**\r\n * get normalized param list from localStorage\r\n */\r\nfunction getNormalizeKeyParamsList(): Array {\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n const storage = getLocalStorageInline();\r\n if (!storage) {\r\n return null;\r\n }\r\n\r\n const normalizeUrlQsp = storage.getItem(normalizedUrlConfigkey);\r\n return normalizeUrlQsp ? normalizeUrlQsp.split(\",\") : null;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Enum for different page types\r\n * @enum\r\n */\r\nexport enum PageType {\r\n Article = \"article\",\r\n ArticleFullScreen = \"articlefullscreen\",\r\n DHP = \"dhp\",\r\n Gallery = \"gallery\",\r\n GalleryFullScreen = \"galleryfullscreen\",\r\n Launcher = \"launcher\",\r\n MMX = \"mmx\",\r\n NewsAndInterests = \"newsandinterestshp\",\r\n Newsbar = \"newsbar\",\r\n NTP = \"ntp\",\r\n Story = \"story\",\r\n Video = \"video\",\r\n Windows = \"windowshp\",\r\n WindowsShell = \"shellhp\"\r\n}\r\n\r\n/** The AudienceMode enum */\r\nexport enum AudienceModeType {\r\n Adult = \"adult\",\r\n Enterprise = \"enterprise\",\r\n Kids = \"kids\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { captureJssGeneratedClasses } from \"@msnews/render-cache\";\r\nimport { registerResetCallback } from \"@msnews/core\";\r\n\r\n/**\r\n * Map which is used to store DesignSystem to GenerateClassName Callback.\r\n * Serialized designSystem is used as the key to ensure designSystemIndex is incremented if the designSystem is updated.\r\n * Weakmap is not used as identical designSystem objects should not be treated as different designSystems, an example is PivotContent.tsx progressive hydration.\r\n * Objects potentially garbage collected in WeakMap will also result in designSystemIndexMap being out of sync.\r\n */\r\nlet designSystemMap = new Map();\r\n\r\n/**\r\n * Map which will store number of DesignSystem appearances with same name.\r\n */\r\nlet designSystemIndexMap = new Map();\r\n\r\n/**\r\n * Register a callback to reset the designSystem globals.\r\n * The callback is registered once when the module is loaded and invoked once on the server side at the beginning of each request.\r\n */\r\nregisterResetCallback(() => {\r\n designSystemMap = new Map();\r\n designSystemIndexMap = new Map();\r\n});\r\n\r\n/**\r\n * JSS callback function that defines the class name generation logic\r\n * The default jss manager class name generation logic increments counter based on order\r\n * of how the experiences are rendered. We cannot guarantee the order due to async nature\r\n * of experiences which potentially causes different class names on every reload/refresh.\r\n * Instead here with this callback, we start the counter from 1 per rule to ensure class\r\n * names stays consistent irrespective of when they are rendered.\r\n *\r\n * Design system is taken into account since a change in it can result in potential different\r\n * styling being needed even if that rule was already used in a previous design system.\r\n *\r\n * For example:\r\n * For TopSites, with this override the class name would be generated as \"topSites-DS-default1-1\"\r\n * (jss manager by default would have generated it something like \"topSites-0-1-305\")\r\n * If the design system were to be updated and the same rule would be passed then you would\r\n * get topsites-DS-default2-1.\r\n */\r\nexport function createGenerateClassName(designSystem: any): (rule: any, sheet: any) => string {\r\n if (!designSystem) {\r\n return;\r\n }\r\n\r\n const dsKey = JSON.stringify(designSystem);\r\n let callback = designSystemMap.get(dsKey);\r\n\r\n if (!callback) {\r\n const dsName = designSystem.name || \"unknown\";\r\n const dsIndex = designSystemIndexMap.get(dsName) + 1 || 1;\r\n const rulesMap: any = {};\r\n callback = (rule: any, sheet: any) => {\r\n const key = rule.key;\r\n\r\n if (!rulesMap[key]) {\r\n rulesMap[key] = 1;\r\n } else {\r\n rulesMap[key]++;\r\n }\r\n\r\n const name = `DS-${dsName}${dsIndex}-${rulesMap[key]}`;\r\n captureJssGeneratedClasses(key, name);\r\n\r\n return `${key}-${name}`;\r\n };\r\n\r\n designSystemMap.set(dsKey, callback);\r\n designSystemIndexMap.set(dsName, dsIndex);\r\n }\r\n\r\n return callback;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Provider, connect } from \"react-redux\";\r\nimport { Store, StoreEnhancer, compose, createStore } from \"redux\";\r\nimport { getPageTimings, logger, perfMarker } from \"@msnews/diagnostics\";\r\n\r\nimport { DynamicReducer } from \"../reducers/DynamicReducer\";\r\nimport { IDataConnector } from \"../connectors/IDataConnector\";\r\nimport { JSSManager } from \"@microsoft/fast-jss-manager-react\";\r\nimport React from \"react\";\r\nimport ReactDom from \"react-dom\";\r\nimport { applyMiddleware } from \"redux-subspace\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\nimport { create } from \"jss\";\r\nimport { createGenerateClassName } from \"./PageHelper\";\r\nimport { getStateFromRenderCache } from \"@msnews/render-cache\";\r\nimport jssGlobal from \"jss-global\";\r\nimport jssNested from \"jss-nested\";\r\n\r\ndeclare global {\r\n interface Window {\r\n\r\n /**\r\n * Enable redux devtools extension debugging\r\n */\r\n __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: any;\r\n\r\n /**\r\n * Boolean flag to indicate if render cache hydration is happening\r\n */\r\n needsHydrate?: boolean;\r\n\r\n /**\r\n * Boolean flag to indicate if state is stored in render cache along with DOM\r\n */\r\n hasPreHydrateState?: boolean;\r\n }\r\n}\r\n\r\n/**\r\n * Page Base.\r\n * Each page or hybrid page/experience must have an instance of the PageBase, which contains the the store, and dynamic reducer\r\n * for the experience/app.\r\n * PageBase is setup as a singleton, so the proper usage in consumers is:\r\n * var pageBase = PageBase.getInstance();\r\n * @export\r\n * @class\r\n */\r\nclass PageBase {\r\n /**\r\n * The singleton instance of this class\r\n * @type: {PageBase}\r\n */\r\n private static _instance: PageBase;\r\n\r\n /**\r\n * The Dynamic reducer for this app/experience\r\n * @type: {DynamicReducer}\r\n */\r\n private _rootReducer: DynamicReducer;\r\n\r\n /**\r\n * The Redux store containing the top level application state. All component and data connectors will manage namespaced subspaces within\r\n * this store\r\n * @type {Store}\r\n */\r\n private _store: Store;\r\n\r\n /**\r\n * Constructor for PageBase class\r\n * @constructor\r\n * @param {any} initialState Optional initial redux state provided as part of SSR response during hydration\r\n */\r\n private constructor(initialState?: any) {\r\n /**\r\n * In debug build, add the option to turn on redux-devtools-extension debugging.\r\n * More info here https://github.com/zalmoxisus/redux-devtools-extension\r\n */\r\n let enhancer: StoreEnhancer;\r\n const middlewares: any = [];\r\n if (canUseDOM() && ((typeof logger !== \"undefined\") && logger ? logger.isDebug() : false)) {\r\n const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ trace: true, traceLimit: 25 }) || compose;\r\n enhancer = composeEnhancers(applyMiddleware(...middlewares)\r\n );\r\n } else {\r\n enhancer = applyMiddleware(...middlewares);\r\n }\r\n\r\n // Create the root reducer\r\n this._rootReducer = new DynamicReducer();\r\n\r\n // Check to see if this app instance was bootstrapped with a render-cache\r\n initialState = initialState || (canUseDOM() && window.needsHydrate && getStateFromRenderCache()) || {};\r\n if (canUseDOM()) {\r\n window.hasPreHydrateState = !!(initialState && Object.keys(initialState).length !== 0);\r\n }\r\n\r\n // create the store with a basic root reducer\r\n this._store = createStore(this.rootReducer.reduce, initialState, enhancer);\r\n\r\n }\r\n\r\n /**\r\n * Reset PageBase. Useful when handling multiple requests when server side rendering.\r\n */\r\n public static resetPageBaseInstance(initialState?: any): void {\r\n this._instance = new PageBase(initialState);\r\n }\r\n\r\n /**\r\n * Gets the Redux store for this app/experience\r\n * @method\r\n * @returns {Store} The overall state for the App, which contains sub-states for each connector\r\n */\r\n public get store(): Store {\r\n return this._store;\r\n }\r\n\r\n /**\r\n * Gets the root reducer for this app/experience\r\n * @returns {DynamicReducer} The reducer for the app/experience\r\n */\r\n public get rootReducer(): DynamicReducer {\r\n return this._rootReducer;\r\n }\r\n\r\n /**\r\n * Gets the singleton instance of this class for the app/experience\r\n * @returns {PageBase} The instance of PageBase for the page/hybrid experience\r\n */\r\n public static getInstance(initialState?: any): PageBase {\r\n return this._instance || (this._instance = new this(initialState));\r\n }\r\n\r\n /**\r\n * Starts the application by calling the onApplicationStart method for each connector that has been added to the app.\r\n * @function\r\n * @method\r\n */\r\n public start(): void {\r\n // Iterate over all of the connector's and call their OnApplicationStart method\r\n const allConnectors: IDataConnector[] = this.rootReducer.connectors();\r\n allConnectors.forEach(connector => connector.onApplicationStart());\r\n }\r\n\r\n /**\r\n * Creates and renders a root element, that is connected to the store.\r\n * The root element will created with the passed in connected element as a child.\r\n * @function\r\n * @param {React.ReactElement} connectedTopLevelElement The top level rendering element for the page/application.\r\n * @param {HTMLElement} hostElement The host element (usually a
) to contain the msnews-experiences-redux application\r\n * @param {Function} callback An optional callback to be fired after hydration is complete, used when hydrating server side rendered content.\r\n * @param {boolean} bypassJSS To bypass JSSManager instance update set this to false\r\n * @param {Boolean} isSSR An optional flag to signal page is server side rendered and hydration is needed instead of render.\r\n * @method\r\n */\r\n public renderRootElement(\r\n connectedTopLevelElement: React.ReactElement,\r\n hostElement: HTMLElement,\r\n callback?: Function,\r\n bypassJSS?: Boolean,\r\n isSSR?: Boolean): void {\r\n // Update the base JSS manager instance\r\n if (bypassJSS !== true) {\r\n this.updateJssManagerInstance();\r\n }\r\n\r\n // Create a ReactElement, that contains the Redux provider with the store, passing the incoming top level element in as a child, so that\r\n // the pageElement wraps the top level element with the redux store\r\n const rootElement = React.createElement(Provider, { store: this._store }, connectedTopLevelElement);\r\n\r\n // Capture Render cache state in page timings\r\n const pageTimings = getPageTimings();\r\n\r\n if (isSSR) {\r\n pageTimings[\"isRenderCachePresent\"] = 0;\r\n perfMarker.startMark(\"SSR.Hydrate\");\r\n ReactDom.hydrate(rootElement, hostElement, callback);\r\n perfMarker.endMark(\"SSR.Hydrate\");\r\n window.needsHydrate = false;\r\n } else if (window.needsHydrate) {\r\n ReactDom.hydrate(rootElement, hostElement);\r\n pageTimings[\"isRenderCachePresent\"] = 1;\r\n window.needsHydrate = false;\r\n } else {\r\n perfMarker.startMark(\"CSR.Render\");\r\n pageTimings[\"isRenderCachePresent\"] = 0;\r\n ReactDom.render(rootElement, hostElement);\r\n perfMarker.endMark(\"CSR.Render\");\r\n }\r\n }\r\n\r\n /**\r\n * Updates the base JSSManager instance with the correct default plugins\r\n */\r\n public updateJssManagerInstance(): void {\r\n const jssInstance: ReturnType = create({\r\n plugins: [jssNested(), jssGlobal()]\r\n });\r\n\r\n JSSManager.createGenerateClassName = createGenerateClassName;\r\n JSSManager.jss = jssInstance;\r\n }\r\n}\r\n\r\nexport default PageBase;","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./base\";\r\nexport * from \"./design-system\";\r\nexport * from \"./tracking\";\r\nexport * from \"./utilities\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { LiteLogger } from \"./LiteLogger\";\r\nimport { ILoggingService } from \"clientcore-infrastructure-analytics/ILoggingService\";\r\n\r\n/**\r\n * Interface for logger so different implementation of logger could be used.\r\n */\r\nexport interface Logger {\r\n\r\n /**\r\n * Returns the logging service\r\n * @returns {ILoggingService}\r\n */\r\n getLoggingService(): ILoggingService;\r\n\r\n /**\r\n * Checks whether we're running in debug mode.\r\n * @returns True when either debug=1 or debug=true is present as a query param, otherwise false.\r\n */\r\n isDebug(): boolean;\r\n\r\n /**\r\n * Override the isDebug setting. Useful when server side rendering.\r\n */\r\n setDebug(isDebug: boolean): void;\r\n\r\n /**\r\n * Set the tags to filter logs.\r\n * @param tags Tags to filter logs. If empty, do not filter.\r\n */\r\n setTags(tags: string[]): void;\r\n\r\n /**\r\n * Log console message.\r\n * Note that these are not output to the console unless you're in debug mode.\r\n * @param message - Message to log.\r\n * @param tags - Optional tags for specifying log type for filtering logs.\r\n */\r\n log(message: string, tags?: string[]): void;\r\n\r\n /**\r\n * Log error message.\r\n * @param message - Message to log\r\n */\r\n logError(message: string): void;\r\n\r\n /**\r\n * Lazy log console message. Use this when the message being constructed is complex or expensive so that it's only evaluated if needed.\r\n * Note that the callback is not invoked and the message is not output unless you're in debug mode.\r\n * @param getMessage - The function to call to get message to log\r\n */\r\n logCallback(getMessage: () => string): void;\r\n\r\n /**\r\n * Log the object to the console.\r\n * Note that these are not output to the console unless you're in debug mode.\r\n * @param message - Array of messages to log\r\n */\r\n logObjects(...message: any[]): void;\r\n}\r\n\r\n/**\r\n * Set the logger instance.\r\n * @param _logger The logger instance to change to.\r\n */\r\nexport function setLogger(_logger: Logger): void {\r\n logger = _logger;\r\n}\r\n\r\n/** Logger used by everyone. Default is LiteLogger. Please set up desired logger implementaiton with setLogger(). */\r\nexport let logger: Logger = new LiteLogger();\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * An enumeration indicating the MSA sign in status for the page.\r\n */\r\nexport enum SignedInStatus {\r\n Unknown,\r\n NotSignedIn,\r\n SignedIn\r\n}\r\n\r\n/**\r\n * The various account types that we support in Peregrine, this enum can be modified as new types are added\r\n * \"MSA\" - MSA\r\n * \"AAD\" - AAD\r\n */\r\nexport enum AccountType {\r\n MSA = \"MSA\",\r\n AAD = \"AAD\",\r\n UNSUPPORTED_SOVEREIGNTY = \"UNSUPPORTED_SOVEREIGNTY\"\r\n}\r\n\r\n/**\r\n * Note: these values are used by the Telemetry team and must remain in the following order:\r\n * 0 - NonAadAccount\r\n * 1 - AadAccount\r\n * 2 - Unknown\r\n */\r\nexport enum AadAccountType {\r\n NonAadAccount = 0,\r\n AadAccount = 1,\r\n Unknown = 2\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryLibraryBase } from \"../telemetry-interfaces\";\r\n\r\n/**\r\n * Static global variables used to reference to Telemetry library implementation.\r\n * @var TelemetryLibraryBase\r\n */\r\nexport let Telemetry: TelemetryLibraryBase = null;\r\n\r\n/**\r\n * Initialize Telemetry\r\n * @param telemetry TelemetryLibraryBase implementation\r\n */\r\nexport function initTelemetry(telemetry: TelemetryLibraryBase): void {\r\n Telemetry = telemetry;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { toNumber as _toNumber, isString } from \"lodash-es\";\r\n\r\nexport type KeyValuePair = { key: K, value: V };\r\nexport type KeyValueArray = KeyValuePair[];\r\n\r\nexport namespace Utility {\r\n /**\r\n * Check if given value is not null. Returns true when not null, otherwise false.\r\n *\r\n * @export\r\n * @param {any} value - Value to check for not null\r\n * @return {boolean}\r\n */\r\n export function isNotNullOrUndefined(value: any): boolean {\r\n return typeof value !== \"undefined\" && value !== null;\r\n }\r\n\r\n export interface IHashable {\r\n /**\r\n * This function will return the string representation of the complex object\r\n * @type {function}\r\n */\r\n toString(): string;\r\n }\r\n\r\n /**\r\n * Check if given value is defined. Returns true when defined, otherwise false.\r\n *\r\n * @export\r\n * @param {any} value - Value to check for defined\r\n * @return {boolean}\r\n */\r\n export function isDefined(value: any): boolean {\r\n return (typeof value !== \"undefined\");\r\n }\r\n\r\n /**\r\n * Check if a given value is a valid key value pair\r\n *\r\n * @export\r\n * @param potentialKeyValuePair\r\n * @return {boolean}\r\n */\r\n export function isKeyValuePair(potentialKeyValuePair: { key: K, value: V },\r\n isKey: (key: K) => boolean,\r\n isValue: (value: V) => boolean): boolean {\r\n return Utility.isNonNullObject(potentialKeyValuePair)\r\n && isKey(potentialKeyValuePair.key)\r\n && isValue(potentialKeyValuePair.value);\r\n }\r\n\r\n /**\r\n * Check if given value is a non null object. Returns true when value is non null , otherwise false.\r\n *\r\n * @export\r\n * @param {any} value - Value to check for non null\r\n * @return {boolean}\r\n */\r\n export function isNonNullObject(value: any): boolean {\r\n return value && typeof value === \"object\";\r\n }\r\n\r\n /**\r\n * Check if given value is not null. Returns true when not null, otherwise false.\r\n *\r\n * @export\r\n * @param {any} value - Value to check for not null\r\n * @return {boolean}\r\n */\r\n export function isNotNull(value: any): boolean {\r\n return value !== null;\r\n }\r\n\r\n /**\r\n * Check if given value is a a non-null or non-empty string. Returns true when it is, otherwise false.\r\n *\r\n * @export\r\n * @param {string} value - Value to check for string\r\n * @return {boolean}\r\n */\r\n export function isNullOrWhiteSpace(value: string): boolean {\r\n return !isString(value) || value.trim() === \"\";\r\n }\r\n\r\n /**\r\n * Converts string to number\r\n *\r\n * @export\r\n * @param {string} value - string to convert to a number\r\n * @param {number} defaultValue - number to return if there is an error\r\n * @return {number}\r\n */\r\n export function toNumber(value: string, defaultValue = -1): number {\r\n if (!value) {\r\n return defaultValue;\r\n }\r\n\r\n const result = _toNumber(value);\r\n if (!isNaN(result)) {\r\n return result;\r\n } else {\r\n return defaultValue;\r\n }\r\n }\r\n\r\n /**\r\n * Check if given value is an array with content in it.\r\n * Returns true when value is an array with content, otherwise false.\r\n *\r\n * @export\r\n * @param {any[]} value - Value to check for array with content\r\n * @return {boolean}\r\n */\r\n export function arrayHasData(value: any[]): boolean {\r\n if (isNotNullOrUndefined(value)) {\r\n return ((value.constructor === Array) && (value.length > 0));\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Check if given value is a string with content in it.\r\n * Returns true when value is a string with content, otherwise false.\r\n *\r\n * @export\r\n * @param {string} value - Value to check for string with content\r\n * @return {boolean}\r\n */\r\n export function stringHasData(value: string): boolean {\r\n return (isString(value) && (value.trim().length > 0));\r\n }\r\n\r\n /**\r\n * Convert object to string representation for it's values.\r\n * @param {object} object - The object to convert\r\n * @returns {string}\r\n */\r\n export function objectToString(object: object): string {\r\n let value = \"\";\r\n let firstRun = true;\r\n\r\n if (typeof object !== \"object\") {\r\n return value;\r\n }\r\n\r\n for (const attribute in object) {\r\n if (typeof object[attribute] === \"object\") {\r\n value += firstRun ? `${objectToString(object[attribute])}` : `-${objectToString(object[attribute])}`;\r\n } else {\r\n value += firstRun ? `${object[attribute]}` : `-${object[attribute]}`;\r\n }\r\n\r\n firstRun = false;\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /**\r\n * Helper function to replace hyphens with empty strings\r\n *\r\n * @param {string} input - Input string\r\n * @returns {string}\r\n */\r\n export function removeHyphens(input: string): string {\r\n if (!input) {\r\n return;\r\n }\r\n return input.replace(/-/g, \"\");\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nconst DefaultSize1ColumnWidth = 300;\r\nconst DefaultSize2ColumnWidth = 624;\r\nconst DefaultSize3ColumnWidth = 948;\r\nconst DefaultSize4ColumnWidth = 1272;\r\nconst DefaultSize5ColumnWidth = 1596;\r\nconst DefaultGutterSize = 24;\r\n\r\nexport const Size1ColumnWidth = DefaultSize1ColumnWidth;\r\nexport let Size2ColumnWidth = DefaultSize2ColumnWidth;\r\nexport let Size3ColumnWidth = DefaultSize3ColumnWidth;\r\nexport let Size4ColumnWidth = DefaultSize4ColumnWidth;\r\nexport let Size5ColumnWidth = DefaultSize5ColumnWidth;\r\nexport let GutterSize = DefaultGutterSize;\r\n\r\n/** Updates the current ColumnWidths based on changes in gutterSize */\r\nexport function updateColumnWidths(gutterSize: number): void {\r\n GutterSize = gutterSize;\r\n Size5ColumnWidth = (Size1ColumnWidth * 5) + (gutterSize * 4);\r\n Size4ColumnWidth = (Size1ColumnWidth * 4) + (gutterSize * 3);\r\n Size3ColumnWidth = (Size1ColumnWidth * 3) + (gutterSize * 2);\r\n Size2ColumnWidth = (Size1ColumnWidth * 2) + gutterSize;\r\n}\r\n\r\n/** Resets the ColumnWidths to their default values */\r\nexport function resetColumnWidthsAndGutterSize(): void {\r\n GutterSize = DefaultGutterSize;\r\n Size2ColumnWidth = DefaultSize2ColumnWidth;\r\n Size3ColumnWidth = DefaultSize3ColumnWidth;\r\n Size4ColumnWidth = DefaultSize4ColumnWidth;\r\n Size5ColumnWidth = DefaultSize5ColumnWidth;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport enum Environment {\r\n prod = \"prod\",\r\n int1 = \"int1\",\r\n int = \"int\",\r\n intpr = \"intPR\",\r\n intpef = \"intPef\"\r\n}\r\n\r\n/**\r\n * Parses from string to Environment enum.\r\n * Defaults to null\r\n *\r\n * @export\r\n * @param {(string | null | undefined)} environment - string being parsed\r\n * @returns {(Environment | null)} - the parsed Environment enum, or null.\r\n */\r\nexport function getEnvironmentFromString(environment: string | null | undefined): Environment | null {\r\n switch (environment) {\r\n case Environment.prod:\r\n return Environment.prod;\r\n case Environment.int1:\r\n return Environment.int1;\r\n case Environment.int:\r\n case Environment.intpr:\r\n case Environment.intpef:\r\n return Environment.int;\r\n default:\r\n return null;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * An enumeration indicating for samesite when setting cookies.\r\n */\r\nexport enum SameSiteValues {\r\n /**\r\n * (Default when not specified) Cookies are not sent on normal cross-site subrequests (for example to load images or frames into a third party site),\r\n * but are sent when a user is navigating to the origin site (i.e. when following a link).\r\n */\r\n Lax = \"lax\",\r\n /**\r\n * Cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites.\r\n */\r\n Strict = \"strict\",\r\n /**\r\n * Cookies will be sent in all contexts, i.e in responses to both first-party and cross-origin requests.If SameSite=None is set,\r\n * the cookie Secure attribute must also be set (or the cookie will be blocked).\r\n */\r\n None = \"none\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { canUseDOM, getCookieString } from \"@msnews/isomorphic-util\";\r\n\r\nimport { SameSiteValues } from \"@msnews/experiences-constants\";\r\n\r\n/**\r\n * Returns the cookie content given a name\r\n *\r\n * @param name {string} - cookie name\r\n * @returns the value of the cookie or `null`, if the key is not found.\r\n */\r\nexport function getCookie(name: string): string {\r\n const cookieString = getCookieString();\r\n\r\n if (cookieString) {\r\n const re = new RegExp(\"\\\\b\" + name + \"\\\\s*=\\\\s*([^;]*)\", \"i\");\r\n const match = re.exec(cookieString);\r\n return (match && match.length > 1 ? match[1] : null);\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Helper function that retrieves the MUID from the document.cookie\r\n * or uses the saved value if the cookie was retrieved for the current page instance\r\n */\r\nexport function getMuidCookie(): string {\r\n return getCookie(\"MUID\");\r\n}\r\n\r\n/**\r\n * Helper function used to set a cookie\r\n * NOTE: THIS BYPASSES ANY GDPR CHECK AND HENCE ONLY REQUIRED FUNCTIONAL COOKIES SHOULD BE SET USING THIS\r\n * IF YOU DO NOT KNOW IF YOUR COOKIE IS ONE THEN PLEASE USE Cookies.ts setCookie THAT MAKES USE OF GDPR LOGIC CHECKS\r\n * When expiryDays is equal to -1 it will unset the cookie\r\n * * @param {string} name Cookie name\r\n * * @param {string} value Cookie value\r\n * * @param {number} expiryDays Cookie expiry days\r\n * * @param {string} domain Cookie domain\r\n * * @param {string} path Cookie path\r\n * * @param {boolean} secure Is it a https only cookie\r\n * * @param {SameSiteValues} sameSiteValue What value should we use for samesite? also sets secure.\r\n */\r\nexport function setRequireFunctionalCookie(name: string, value: string, expiryDays?: number, domain?: string, path?: string, secure?: boolean, sameSiteValue?: SameSiteValues): void {\r\n let expiryDate;\r\n const builder = [name, \"=\", value];\r\n if (-1 === expiryDays) {\r\n // Expires date format is supposed to be in GMT.\r\n expiryDate = \"Fri, 31 Dec 1999 23:59:59 GMT\";\r\n } else if (expiryDays) {\r\n const date = new Date();\r\n date.setTime(date.getTime() + (expiryDays * 86400000)); // 86400000 == 24*60*60*1000 (ms/day)\r\n expiryDate = date.toUTCString();\r\n }\r\n\r\n if (expiryDate) { builder.push(\";expires=\", expiryDate); }\r\n if (domain) { builder.push(\";domain=\", domain); }\r\n if (path) { builder.push(\";path=\", path); }\r\n if (secure) { builder.push(\";secure\"); }\r\n // Do we have a value to set for samesite? NOTE: the browser default is \"lax\" so we won't set when we have that value.\r\n if (sameSiteValue && sameSiteValue !== SameSiteValues.Lax) {\r\n builder.push(\";samesite=\", sameSiteValue.toString());\r\n // If samesite is \"none\" and we have not already set \"secure\".\r\n if (sameSiteValue === SameSiteValues.None && !secure) {\r\n builder.push(\";secure\");\r\n }\r\n }\r\n\r\n if (canUseDOM() && document) {\r\n document.cookie = builder.join(\"\");\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, AppErrorPropertyBag, ErrorBehavior, Severity } from \"@msnews/core-contracts\";\r\n\r\n/**\r\n * All app errors are set to create IcM ticket by default unless specified in individual error code otherwise.\r\n */\r\nconst severity = Severity.Alert;\r\n\r\n/**\r\n * Build number is only passed in from updateResolverAppErrorsPropertyBag on page initialization\r\n */\r\nconst pb: AppErrorPropertyBag = {\r\n build: \"\"\r\n};\r\n\r\n/**\r\n * Append or update property bag properties. At page level intialization, this should be called to update the build number.\r\n * Since all app error objects has reference to this base property bag, calling this method will in fact update for all app errors.\r\n * @param newPbInfo Additional information needed for app error property bag\r\n */\r\nexport function updateResolverAppErrorsPropertyBag(newPbInfo: Partial): void {\r\n Object.assign(pb, newPbInfo);\r\n}\r\n\r\n/**\r\n * Getter for the base app error property bag. Currently only used in unit test\r\n */\r\nexport function getResolverAppErrorsPropertyBag(): AppErrorPropertyBag {\r\n return pb;\r\n}\r\n\r\nconst resolverSourceFile = \"ConfigService.ts\";\r\nexport const ResolverAppErrors = {\r\n /**\r\n * IndexedDb write failed in resolver.\r\n */\r\n IndexedDbWriteFailed: {\r\n id: 22010,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb read failed in resolver.\r\n */\r\n IndexedDbReadFailed: {\r\n id: 22011,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Config Service Resolver fetch errors.\r\n */\r\n CrsFetchError: {\r\n id: 22012,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Config Service Resolver was enabled but we still went to Assets to getConfig and merge configs at client (classic resolver).\r\n */\r\n ReceivedConfigFromCdnAsCrsFetchFailed: {\r\n id: 22013,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Exception In GetConfig function.\r\n */\r\n GetConfigException: {\r\n id: 22014,\r\n source: resolverSourceFile,\r\n severity: Severity.Critical,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb bulk read failed in resolver.\r\n */\r\n IndexedDbBulkReadFailed: {\r\n id: 22015,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb failed to remove cached config\r\n */\r\n IndexedDbFailedToRemoveCachedConfig: {\r\n id: 22016,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb failed to clear all configs\r\n */\r\n IndexedDbFailedToClearAllCachedConfigs: {\r\n id: 22017,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Render cache is purged due to changes in config\r\n */\r\n RenderCachePurgedDueToChangesInConfig: {\r\n id: 22018,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Render cache failed purge even though config changes were detected.\r\n */\r\n FailedToPurgeRenderCache: {\r\n id: 22019,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Failed to refresh config cache\r\n */\r\n RefreshConfigCacheFailed: {\r\n id: 22020,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Failed to initialize indexedDb\r\n */\r\n IndexedDbInitFailed: {\r\n id: 22021,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Different cache busting identifier\r\n */\r\n DifferentCbid: {\r\n id: 22022,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error writing prg flights to localStorage\r\n */\r\n PrgFlightLsWriteError: {\r\n id: 22023,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error reading prg flights to localStorage\r\n */\r\n PrgFlightLsReadError: {\r\n id: 22024,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/** Starts from 22050 */\r\nexport const FallbackResolverAppErrors = {\r\n /**\r\n * getConfigRecursive function try catch failed.\r\n */\r\n RecursiveGetFailed: {\r\n id: 22050,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * BlobFetcher fetch failed for configs or config index.\r\n */\r\n BlobFetchReturnedNull: {\r\n id: 22051,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Configs served from CDN after CRS fetch failed\r\n */\r\nexport const ResolverErrorConfigsDownloadedByCdn: AppError = {\r\n id: 22025,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Cached configs are for different flight\r\n */\r\nexport const CachedConfigsForDifferentFlight: AppError = {\r\n id: 22026,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * CRS sent non-200 response\r\n */\r\nexport const ConfigCrsFetchNon200Response: AppError = {\r\n id: 22027,\r\n source: resolverSourceFile,\r\n severity: Severity.Critical,\r\n pb: {\r\n userImpacting: true,\r\n errorBehavior: ErrorBehavior.Fallback\r\n }\r\n};\r\n\r\n/**\r\n * Cdn config fetch received non-200 response\r\n */\r\nexport const ConfigCdnFetchNon200Response: AppError = {\r\n id: 22028,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error that when Server Cache config refresh failed\r\n */\r\nexport const ServerCacheRefreshFailed: AppError = {\r\n id: 34009,\r\n source: \"SsrResolver.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Error that when SSR failed to getConfig.\r\n */\r\nexport const ServerCacheFetchFailed: AppError = {\r\n id: 34005,\r\n source: \"SsrResolver.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * SSR config resolver returned null config\r\n */\r\nexport const SsrResolverReturnedNullConfig: AppError = {\r\n id: 34011,\r\n source: \"SsrResolver.ts\",\r\n severity: Severity.HighImpact,\r\n pb\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\n\r\ntype DataConnectorStateCallback = (newState: any) => void;\r\n\r\nconst callbackMap: { [dataConnectorName: string]: DataConnectorStateCallback[] } = {};\r\nlet getDataConnector: (dataConnectorName: ConnectorNamespaces) => any;\r\n\r\n/**\r\n * Sets up the data connector tracker. Needed to avoid a dependency cycle.\r\n * @param tryGetDataConnector The method to use to get the data connector.\r\n */\r\nexport function initializeDataConnectorTracker(tryGetDataConnector: (dataConnectorName: ConnectorNamespaces) => any) {\r\n getDataConnector = tryGetDataConnector;\r\n}\r\n\r\n/**\r\n * Subscribes to changes in data connector state.\r\n * @param dataConnectorName The name of the data connector to subscribe to.\r\n * @param callback The callback function to invoke when the state changes.\r\n * @param fireForInitialState True to fire the callback immediately when the data connector is already initialized. Defaults to true.\r\n */\r\nexport function subscribeDataConnectorState(dataConnectorName: ConnectorNamespaces, callback: (newState: TState) => void, fireForInitialState = true) {\r\n let callbackList = callbackMap[dataConnectorName];\r\n if (!callbackList) {\r\n callbackList = [];\r\n callbackMap[dataConnectorName] = callbackList;\r\n }\r\n\r\n callbackList.push(callback);\r\n\r\n if (fireForInitialState) {\r\n const dataConnector = getDataConnector(dataConnectorName);\r\n if (dataConnector) {\r\n const initialState = dataConnector.getCurrentState();\r\n if (initialState) {\r\n callback(initialState);\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Reports a state change for a data connector to interested parties.\r\n * @param dataConnectorName The name of the data connector whose state changed.\r\n * @param newState The new state.\r\n */\r\nexport function reportDataConnectorStateChange(dataConnectorName: string, newState: any) {\r\n const callbacks: DataConnectorStateCallback[] = callbackMap[dataConnectorName];\r\n if (callbacks && newState) {\r\n for (const callback of callbacks) {\r\n callback(newState);\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/** Type info of a single page measure in the window._pageMeasures object */\r\nexport type PageMeasure = {\r\n\r\n /** Name of the timeline */\r\n timelineName: string;\r\n\r\n /** Name of the metric */\r\n measureName: string;\r\n\r\n /** Flag that indicates whether this measure is an async measure */\r\n async?: boolean;\r\n\r\n /** The start time of the measure */\r\n from: number;\r\n\r\n /** The end time of the measure */\r\n to: number;\r\n};\r\n\r\n/**\r\n * Interface for PerfTimeline constructor\r\n *\r\n * Reason for constructor interface is to\r\n * prevent PerfTimeline implementation and dependencies\r\n * from added to inline script bundle (eg. Edge Legacy service-ui)\r\n * when perftimeline is disabled.\r\n*/\r\ninterface PerfTimelineConstructor {\r\n /**\r\n * New method to construct a {PerfTimeline} instance\r\n * @param timelineName - the name of the perf timeline. Note that if you don't know the name\r\n * of a perf timeline at construction time, it can later be renamed to a known name later via\r\n * the 'rename' method.\r\n * @param instanceId - this specific instance's ID. Used during a renaming operation to idenfity any previous isntance.\r\n * @param addPerfMarks - Flag to indicate whether to log perf marks with the native performance API.\r\n * @param addPageTimings - Flag to indicate whether to log the perf marks into the _pageTimings object.\r\n * @param async - Flag to mark this timeline as an async timeline, so by default all measures under\r\n * this timeline will show under a new process line.\r\n */\r\n new (timelineName: string,\r\n instanceId: string,\r\n addPerfMarks: boolean,\r\n addPageTimings: boolean,\r\n async?: boolean): PerfTimeline;\r\n}\r\n\r\n/**\r\n * Factory method to construct a {PerfTimeline} instance\r\n * @param timelineName - the name of the perf timeline. Note that if you don't know the name\r\n * of a perf timeline at construction time, it can later be renamed to a known name later via\r\n * the 'rename' method.\r\n * @param instanceId - this specific instance's ID. Used during a renaming operation to idenfity any previous isntance.\r\n * @param addPerfMarks - Flag to indicate whether to log perf marks with the native performance API.\r\n * @param addPageTimings - Flag to indicate whether to log the perf marks into the _pageTimings object.\r\n * @param async - Flag to mark this timeline as an async timeline, so by default all measures under\r\n * this timeline will show under a new process line.\r\n */\r\nexport function createPerfTimeline(\r\n ctor: PerfTimelineConstructor,\r\n timelineName: string,\r\n instanceId: string,\r\n addPerfMarks = false,\r\n addPageTimings = false,\r\n async?: boolean\r\n): PerfTimeline {\r\n return new ctor(timelineName, instanceId, addPerfMarks, addPageTimings, async);\r\n}\r\n\r\n/** PerfTimeline interface for diagnostic utilities and its clients. */\r\nexport interface PerfTimeline {\r\n\r\n /**\r\n * the name of the perf timeline. Note that if you don't know the name\r\n * of a perf timeline at construction time, it can later be renamed to a known name later via\r\n * the 'rename' method.\r\n */\r\n readonly timelineName: string;\r\n\r\n /** this specific instance's ID. Used during a renaming operation to idenfity any previous isntance. */\r\n readonly instanceId: string;\r\n\r\n /** Renames this instances of the timeline to the new given name. */\r\n rename(timelineName: string): void;\r\n\r\n /** Marks the start of a timeline measurement. */\r\n startMeasure(coreMarkerName: string, dynamicMeasureName?: string, async?: boolean): {\r\n /** Method that should be used to mark the end the measure */\r\n endMeasure: (updatedDynamicMeasureName?: string) => void\r\n };\r\n\r\n /** Returns the list of page measures for this timeline object */\r\n getPageMeasures(): Array;\r\n\r\n /** Instruments the start/begin for the given function with a given binding context */\r\n instrumentFunc(funcName: string, func: TFunc, bindingContext?: Object): TFunc;\r\n\r\n /** Instruments the start/begin for the given async-style function */\r\n instrumentPromise(promiseName: string, getPromise: () => Promise , async?: boolean): Promise ;\r\n}\r\n\r\n/** Main factory function interface for perf timeline. */\r\nexport interface TryGetPerfTimelineFunc {\r\n /**\r\n * Gets or creates a perf timeline object for the given experience instance\r\n * @param experienceName - the name of the experience for which to create the timeline\r\n * @param instanceId - the ID that will uniquely identify this timeline across multiple instances.\r\n * @param async - Optional flag to indicate the default tracing mode for this timeline.\r\n * Specifying true will render the measures under its own process id in the app trace.\r\n * Useful if the timeline will contain many async operations that frequently overlap with each other.\r\n * Note that this value can be overriden when taking an individual measure as well.\r\n */\r\n (experienceName: string, instanceId: string, async?: boolean): PerfTimeline;\r\n}\r\n\r\n/** Internal function reference for the perf timeline factory method */\r\nlet tryGetPerfTimelineFuncRef: TryGetPerfTimelineFunc = null;\r\n\r\n/** Set the function to use to get PerfTimeline. This is used by initializeExperienceDiagnotics. */\r\nexport function setTryGetPerfTimelineFunc(func: TryGetPerfTimelineFunc): void {\r\n tryGetPerfTimelineFuncRef = func;\r\n}\r\n\r\n/**\r\n * Gets or creates a perf timeline object for the given experience instance\r\n * @param experienceName - the name of the experience for which to create the timeline\r\n * @param instanceId - the ID that will uniquely identify this timeline across multiple instances.\r\n * @param async - Optional flag to indicate the default tracing mode for this timeline.\r\n * Specifying true will render the measures under its own process id in the app trace.\r\n * Useful if the timeline will contain many async operations that frequently overlap with each other.\r\n * Note that this value can be overriden when taking an individual measure as well.\r\n */\r\nexport const tryGetPerfTimeline: TryGetPerfTimelineFunc = (experienceName: string, instanceId: string, async?: boolean): PerfTimeline => {\r\n if (tryGetPerfTimelineFuncRef) {\r\n return tryGetPerfTimelineFuncRef(experienceName, instanceId, async);\r\n } else {\r\n return null;\r\n }\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n/// \r\n\r\n/**\r\n * List of SVG icon types available by its key\r\n */\r\nexport const Accounts = () => import(/* webpackChunkName: \"icon-assets-Accounts\" */\"@svgr/webpack?-svgo!../../icons/Accounts.svg\");\r\nexport const AdChoices = () => import(/* webpackChunkName: \"icon-assets-AdChoices\" */\"@svgr/webpack?-svgo!../../icons/AdChoices.svg\");\r\nexport const AlertWhite = () => import(/* webpackChunkName: \"icon-assets-AlertWhite\" */\"@svgr/webpack?-svgo!../../icons/AlertWhite.svg\");\r\nexport const AllDone = () => import(/* webpackChunkName: \"icon-assets-AllDone\" */\"@svgr/webpack?-svgo!../../icons/AllDone.svg\");\r\nexport const BingCardDefaultHotelImage = () => import(/* webpackChunkName: \"icon-assets-BingCardDefaultHotelImage\" */\"@svgr/webpack?-svgo!../../icons/BingCardDefaultHotelImage.svg\");\r\nexport const BingHotelSeePrice = () => import(/* webpackChunkName: \"icon-assets-BingHotelSeePrice\" */\"@svgr/webpack?-svgo!../../icons/BingHotelSeePrice.svg\");\r\nexport const BingLogo = () => import(/* webpackChunkName: \"icon-assets-BingLogo\" */\"@svgr/webpack?-svgo!../../icons/BingLogo.svg\");\r\nexport const BingRatingDarkStar = () => import(/* webpackChunkName: \"icon-assets-BingRatingDarkStar\" */\"@svgr/webpack?-svgo!../../icons/BingRatingDarkStar.svg\");\r\nexport const BingRatingLightStar = () => import(/* webpackChunkName: \"icon-assets-BingRatingLightStar\" */\"@svgr/webpack?-svgo!../../icons/BingRatingLightStar.svg\");\r\nexport const BingRatingDarkLightStar = () => import(/* webpackChunkName: \"icon-assets-BingRatingDarkLightStar\" */\"@svgr/webpack?-svgo!../../icons/BingRatingDarkLightStar.svg\");\r\nexport const BlowingHail = () => import(/* webpackChunkName: \"icon-assets-BlowingHail\" */\"@svgr/webpack?-svgo!../../icons/BlowingHail.svg\");\r\nexport const BlowingHailWhite = () => import(/* webpackChunkName: \"icon-assets-BlowingHailWhite\" */\"@svgr/webpack?-svgo!../../icons/BlowingHailWhite.svg\");\r\nexport const BlowingHailV2 = () => import(/* webpackChunkName: \"icon-assets-BlowingHailV2\" */\"@svgr/webpack?-svgo!../../icons/BlowingHailV2.svg\");\r\nexport const BlowingSnow = () => import(/* webpackChunkName: \"icon-assets-BlowingSnow\" */\"@svgr/webpack?-svgo!../../icons/BlowingSnow.svg\");\r\nexport const BlowingSnowWhite = () => import(/* webpackChunkName: \"icon-assets-BlowingSnowWhite\" */\"@svgr/webpack?-svgo!../../icons/BlowingSnowWhite.svg\");\r\nexport const BlowingSnowV2 = () => import(/* webpackChunkName: \"icon-assets-BlowingSnowV2\" */\"@svgr/webpack?-svgo!../../icons/BlowingSnowV2.svg\");\r\nexport const CardActionButton = () => import(/* webpackChunkName: \"icon-assets-CardActionButton\" */\"@svgr/webpack?-svgo!../../icons/CardActionButton.svg\");\r\nexport const CDCSelfCheck = () => import(/* webpackChunkName: \"icon-assets-CDCLogo\" */\"@svgr/webpack?-svgo!../../icons/CDCSelfCheck.svg\");\r\nexport const ChatBubbleIcon = () => import(/* webpackChunkName: \"icon-assets-ChatBubbleIcon\" */\"@svgr/webpack?-svgo!../../icons/ChatBubbleIcon.svg\");\r\nexport const Check = () => import(/* webpackChunkName: \"icon-assets-Check\" */\"@svgr/webpack?-svgo!../../icons/Check.svg\");\r\nexport const CheckmarkOutline = () => import(/* webpackChunkName: \"icon-assets-CheckmarkOutline\" */\"@svgr/webpack?-svgo!../../icons/CheckmarkOutline.svg\");\r\nexport const Chevron = () => import(/* webpackChunkName: \"icon-assets-Chevron\" */\"@svgr/webpack?-svgo!../../icons/Chevron.svg\");\r\nexport const ChevronDown = () => import(/* webpackChunkName: \"icon-assets-ChevronDown\" */\"@svgr/webpack?-svgo!../../icons/ChevronDown.svg\");\r\nexport const ChevronDownV2 = () => import(/* webpackChunkName: \"icon-assets-ChevronDown\" */\"@svgr/webpack?-svgo!../../icons/ChevronDownV2.svg\");\r\nexport const ChevronDownV3 = () => import(/* webpackChunkName: \"icon-assets-ChevronDownV3\" */\"@svgr/webpack?-svgo!../../icons/ChevronDownV3.svg\");\r\nexport const ChevronRight = () => import(/* webpackChunkName: \"icon-assets-ChevronRight\" */ \"@svgr/webpack?-svgo!../../icons/ChevronRight.svg\");\r\nexport const PHChevronLeft = () => import(/* webpackChunkName: \"icon-assets-PHChevronLeft\" */ \"@svgr/webpack?-svgo!../../icons/PHChevronLeft.svg\");\r\nexport const PHChevronRight = () => import(/* webpackChunkName: \"icon-assets-PHChevronRight\" */ \"@svgr/webpack?-svgo!../../icons/PHChevronRight.svg\");\r\nexport const ChevronUp = () => import(/* webpackChunkName: \"icon-assets-ChevronDown\" */\"@svgr/webpack?-svgo!../../icons/ChevronUp.svg\");\r\nexport const ChevronWhite = () => import(/* webpackChunkName: \"icon-assets-ChevronWhite\" */\"@svgr/webpack?-svgo!../../icons/ChevronWhite.svg\");\r\nexport const CircleClose = () => import(/* webpackChunkName: \"icon-assets-CircleClose\" */\"@svgr/webpack?-svgo!../../icons/CircleClose.svg\");\r\nexport const CircleCheckmark = () => import(/* webpackChunkName: \"icon-assets-CircleCheckmark\" */\"@svgr/webpack?-svgo!../../icons/CircleCheckmark.svg\");\r\nexport const CircleChevron = () => import(/* webpackChunkName: \"icon-assets-CircleChevron\" */\"@svgr/webpack?-svgo!../../icons/CircleChevron.svg\");\r\nexport const ClearNight = () => import(/* webpackChunkName: \"icon-assets-ClearNight\" */\"@svgr/webpack?-svgo!../../icons/ClearNight.svg\");\r\nexport const ClearNightWhite = () => import(/* webpackChunkName: \"icon-assets-ClearNightWhite\" */\"@svgr/webpack?-svgo!../../icons/ClearNightWhite.svg\");\r\nexport const ClearNightV2 = () => import(/* webpackChunkName: \"icon-assets-ClearNightV2\" */\"@svgr/webpack?-svgo!../../icons/ClearNightV2.svg\");\r\nexport const ClinicalTrialBot = () => import(/* webpackChunkName: \"icon-assets-ClinicalTrialBot\" */\"@svgr/webpack?-svgo!../../icons/ClinicalTrialBot.svg\");\r\nexport const Close = () => import(/* webpackChunkName: \"icon-assets-Close\" */\"@svgr/webpack?-svgo!../../icons/Close.svg\");\r\nexport const CloseV2 = () => import(/* webpackChunkName: \"icon-assets-CloseV2\" */\"@svgr/webpack?-svgo!../../icons/CloseV2.svg\");\r\nexport const CloseThin = () => import(/* webpackChunkName: \"icon-assets-CloseThin\" */\"@svgr/webpack?-svgo!../../icons/CloseThin.svg\");\r\nexport const Cloudy = () => import(/* webpackChunkName: \"icon-assets-Cloudy\" */\"@svgr/webpack?-svgo!../../icons/Cloudy.svg\");\r\nexport const CloudyWhite = () => import(/* webpackChunkName: \"icon-assets-CloudyWhite\" */\"@svgr/webpack?-svgo!../../icons/CloudyWhite.svg\");\r\nexport const CloudyV2 = () => import(/* webpackChunkName: \"icon-assets-CloudyV2\" */\"@svgr/webpack?-svgo!../../icons/CloudyV2.svg\");\r\nexport const Comment = () => import(/* webpackChunkName: \"icon-assets-Comment\" */\"@svgr/webpack?-svgo!../../icons/Comment.svg\");\r\nexport const CommentFill = () => import(/* webpackChunkName: \"icon-assets-CommentFill\" */\"@svgr/webpack?-svgo!../../icons/CommentFill.svg\");\r\nexport const ConflictWarning = () => import(/* webpackChunkName: \"icon-assets-ConflictWarning\" */\"@svgr/webpack?-svgo!../../icons/ConflictWarning.svg\");\r\nexport const Copy = () => import(/* webpackChunkName: \"icon-assets-Copy\" */\"@svgr/webpack?-svgo!../../icons/Copy.svg\");\r\nexport const CoronaVirusIcon = () => import(/* webpackChunkName: \"icon-coronavirus-icon\" */\"@svgr/webpack?-svgo!../../icons/CoronavirusIcon.svg\");\r\nexport const DarkModeHotel = () => import(/* webpackChunkName: \"icon-assets-DarkModeHotel\" */\"@svgr/webpack?-svgo!../../icons/DarkModeHotel.svg\");\r\nexport const DataProvider = () => import(/* webpackChunkName: \"icon-assets-DataProvider\" */\"@svgr/webpack?-svgo!../../icons/DataProvider.svg\");\r\nexport const DayTime = () => import(/* webpackChunkName: \"icon-assets-DayTime\" */\"@svgr/webpack?-svgo!../../icons/DayTime.svg\");\r\nexport const Delete = () => import(/* webpackChunkName: \"icon-assets-Delete\" */\"@svgr/webpack?-svgo!../../icons/Delete.svg\");\r\nexport const DeleteTrashCan = () => import(/* webpackChunkName: \"icon-assets-DeleteTrashCan\" */\"@svgr/webpack?-svgo!../../icons/DeleteTrashCan.svg\");\r\nexport const Discover = () => import(/* webpackChunkName: \"icon-assets-Discover\" */\"@svgr/webpack?-svgo!../../icons/Discover.svg\");\r\nexport const Dislike = () => import(/* webpackChunkName: \"icon-assets-Dislike\" */\"@svgr/webpack?-svgo!../../icons/Dislike.svg\");\r\nexport const DislikeText = () => import(/* webpackChunkName: \"icon-assets-DislikeText\" */\"@svgr/webpack?-svgo!../../icons/DislikeText.svg\");\r\nexport const Disliked = () => import(/* webpackChunkName: \"icon-assets-Disliked\" */\"@svgr/webpack?-svgo!../../icons/Disliked.svg\");\r\nexport const DislikedText = () => import(/* webpackChunkName: \"icon-assets-DislikedText\" */\"@svgr/webpack?-svgo!../../icons/DislikedText.svg\");\r\nexport const DislikedLight = () => import(/* webpackChunkName: \"icon-assets-DislikedLight\" */\"@svgr/webpack?-svgo!../../icons/DislikedLight.svg\");\r\nexport const Docx = () => import(/* webpackChunkName: \"icon-assets-Docx\" */\"@svgr/webpack?-svgo!../../icons/Docx.svg\");\r\nexport const DoubleTap = () => import(/* webpackChunkName: \"icon-assets-DoubleTap\" */\"@svgr/webpack?-svgo!../../icons/DoubleTap.svg\");\r\nexport const Download = () => import(/* webpackChunkName: \"icon-assets-Download\" */\"@svgr/webpack?-svgo!../../icons/Download.svg\");\r\nexport const DownloadNoFill = () => import(/* webpackChunkName: \"icon-assets-DownloadNoFill\" */\"@svgr/webpack?-svgo!../../icons/DownloadNoFill.svg\");\r\nexport const Edit = () => import(/* webpackChunkName: \"icon-assets-Edit\" */\"@svgr/webpack?-svgo!../../icons/Edit.svg\");\r\nexport const EditNoFill = () => import(/* webpackChunkName: \"icon-assets-EditNoFill\" */\"@svgr/webpack?-svgo!../../icons/EditNoFill.svg\");\r\nexport const Edited = () => import(/* webpackChunkName: \"icon-assets-Edited\" */\"@svgr/webpack?-svgo!../../icons/Edited.svg\");\r\nexport const EditedNoFill = () => import(/* webpackChunkName: \"icon-assets-EditedNoFill\" */\"@svgr/webpack?-svgo!../../icons/EditedNoFill.svg\");\r\nexport const Ellipses = () => import(/* webpackChunkName: \"icon-assets-Ellipses\" */\"@svgr/webpack?-svgo!../../icons/Ellipses.svg\");\r\nexport const EllipsesLight = () => import(/* webpackChunkName: \"icon-assets-EllipsesLight\" */\"@svgr/webpack?-svgo!../../icons/EllipsesLight.svg\");\r\nexport const EllipsesV2 = () => import(/* webpackChunkName: \"icon-assets-EllipsesV2\" */\"@svgr/webpack?-svgo!../../icons/EllipsesV2.svg\");\r\nexport const EmojiAngry = () => import(/* webpackChunkName: \"icon-assets-EmojiAngry\" */\"@svgr/webpack?-svgo!../../icons/EmojiAngry.svg\");\r\nexport const EmojiHeart = () => import(/* webpackChunkName: \"icon-assets-EmojiHeart\" */\"@svgr/webpack?-svgo!../../icons/EmojiHeart.svg\");\r\nexport const EmojiLike = () => import(/* webpackChunkName: \"icon-assets-EmojiLike\" */\"@svgr/webpack?-svgo!../../icons/EmojiLike.svg\");\r\nexport const EmojiSad = () => import(/* webpackChunkName: \"icon-assets-EmojiSad\" */\"@svgr/webpack?-svgo!../../icons/EmojiSad.svg\");\r\nexport const EmojiSurprised = () => import(/* webpackChunkName: \"icon-assets-EmojiSurprised\" */\"@svgr/webpack?-svgo!../../icons/EmojiSurprised.svg\");\r\nexport const EmojiThinking = () => import(/* webpackChunkName: \"icon-assets-EmojiThinking\" */\"@svgr/webpack?-svgo!../../icons/EmojiThinking.svg\");\r\nexport const EmptyDiscoverDark = () => import(/* webpackChunkName: \"icon-assets-EmptyDiscoverDark\" */\"@svgr/webpack?-svgo!../../icons/EmptyDiscoverDark.svg\");\r\nexport const EmptyDiscoverLight = () => import(/* webpackChunkName: \"icon-assets-EmptyDiscoverLight\" */\"@svgr/webpack?-svgo!../../icons/EmptyDiscoverLight.svg\");\r\nexport const EmptyMruDark = () => import(/* webpackChunkName: \"icon-assets-EmptyMruDark\" */\"@svgr/webpack?-svgo!../../icons/EmptyMruDark.svg\");\r\nexport const EmptyMruLight = () => import(/* webpackChunkName: \"icon-assets-EmptyMruLight\" */\"@svgr/webpack?-svgo!../../icons/EmptyMruLight.svg\");\r\nexport const EmptyPinnedDark = () => import(/* webpackChunkName: \"icon-assets-EmptyPinnedDark\" */\"@svgr/webpack?-svgo!../../icons/EmptyPinnedDark.svg\");\r\nexport const EmptyPinnedLight = () => import(/* webpackChunkName: \"icon-assets-EmptyPinnedLight\" */\"@svgr/webpack?-svgo!../../icons/EmptyPinnedLight.svg\");\r\nexport const EmptySharedDark = () => import(/* webpackChunkName: \"icon-assets-EmptySharedDark\" */\"@svgr/webpack?-svgo!../../icons/EmptySharedDark.svg\");\r\nexport const EmptySharedLight = () => import(/* webpackChunkName: \"icon-assets-EmptySharedLight\" */\"@svgr/webpack?-svgo!../../icons/EmptySharedLight.svg\");\r\nexport const ErrorRocketLight = () => import(/* webpackChunkName: \"icon-assets-ErrorRocketLight\" */\"@svgr/webpack?-svgo!../../icons/ErrorRocketLight.svg\");\r\nexport const ErrorRocketDark = () => import(/* webpackChunkName: \"icon-assets-ErrorRocketDark\" */\"@svgr/webpack?-svgo!../../icons/ErrorRocketDark.svg\");\r\nexport const Excel = () => import(/* webpackChunkName: \"icon-assets-Excel\" */\"@svgr/webpack?-svgo!../../icons/Excel.svg\");\r\nexport const Facebook = () => import(/* webpackChunkName: \"icon-assets-Facebook\" */\"@svgr/webpack?-svgo!../../icons/Facebook.svg\");\r\nexport const FacebookCircle = () => import(/* webpackChunkName: \"icon-assets-FacebookCircle\" */\"@svgr/webpack?-svgo!../../icons/FacebookCircle.svg\");\r\nexport const FacebookText = () => import(/* webpackChunkName: \"icon-assets-FacebookText\" */\"@svgr/webpack?-svgo!../../icons/FacebookText.svg\");\r\nexport const FacebookTextBlack = () => import(/* webpackChunkName: \"icon-assets-FacebookTextBlack\" */\"@svgr/webpack?-svgo!../../icons/FacebookTextBlack.svg\");\r\nexport const Feedback = () => import(/* webpackChunkName\" \"icon-assets-Feedback\" */\"@svgr/webpack?-svgo!../../icons/Feedback.svg\");\r\nexport const Flag = () => import(/* webpackChunkName: \"icon-assets-Flag\" */\"@svgr/webpack?-svgo!../../icons/Flag.svg\");\r\nexport const FluentArrowTrending = () => import(/* webpackChunkName: \"icon-assets-FluentArrowTrending\" */\"@svgr/webpack?-svgo!../../icons/FluentArrowTrending.svg\");\r\nexport const FluentAttach = () => import(/* webpackChunkName: \"icon-assets-FluentAttach\" */\"@svgr/webpack?-svgo!../../icons/FluentAttach.svg\");\r\nexport const FluentCalendar = () => import(/* webpackChunkName: \"icon-assets-FluentCalendar\" */\"@svgr/webpack?-svgo!../../icons/FluentCalendar.svg\");\r\nexport const FluentComment = () => import(/* webpackChunkName: \"icon-assets-FluentComment\" */\"@svgr/webpack?-svgo!../../icons/FluentComment.svg\");\r\nexport const FluentCompassNorthwest = () => import(/* webpackChunkName: \"icon-assets-FluentCompassNorthwest\" */\"@svgr/webpack?-svgo!../../icons/FluentCompassNorthwest.svg\");\r\nexport const FluentEdit = () => import(/* webpackChunkName: \"icon-assets-FluentEdit\" */\"@svgr/webpack?-svgo!../../icons/FluentEdit.svg\");\r\nexport const FluentFolderOpen = () => import(/* webpackChunkName: \"icon-assets-FluentFolderOpen\" */\"@svgr/webpack?-svgo!../../icons/FluentFolderOpen.svg\");\r\nexport const FluentMention = () => import(/* webpackChunkName: \"icon-assets-FluentMention\" */\"@svgr/webpack?-svgo!../../icons/FluentMention.svg\");\r\nexport const FluentNews = () => import(/* webpackChunkName: \"icon-assets-FluentNews\" */\"@svgr/webpack?-svgo!../../icons/FluentNews.svg\");\r\nexport const FluentPeople = () => import(/* webpackChunkName: \"icon-assets-FluentPeople\" */\"@svgr/webpack?-svgo!../../icons/FluentPeople.svg\");\r\nexport const FluentVideo = () => import(/* webpackChunkName: \"icon-assets-FluentVideo\" */\"@svgr/webpack?-svgo!../../icons/FluentVideo.svg\");\r\nexport const Fog = () => import(/* webpackChunkName: \"icon-assets-Fog\" */\"@svgr/webpack?-svgo!../../icons/Fog.svg\");\r\nexport const FogWhite = () => import(/* webpackChunkName: \"icon-assets-FogWhite\" */\"@svgr/webpack?-svgo!../../icons/FogWhite.svg\");\r\nexport const FogV2 = () => import(/* webpackChunkName: \"icon-assets-FogV2\" */\"@svgr/webpack?-svgo!../../icons/FogV2.svg\");\r\nexport const Form = () => import(/* webpackChunkName: \"icon-assets-Form\" */\"@svgr/webpack?-svgo!../../icons/Form.svg\");\r\nexport const Folder = () => import(/* webpackChunkName: \"icon-assets-Folder\" */\"@svgr/webpack?-svgo!../../icons/Folder.svg\");\r\nexport const FolderNoFill = () => import(/* webpackChunkName: \"icon-assets-FolderNoFill\" */\"@svgr/webpack?-svgo!../../icons/FolderNoFill.svg\");\r\nexport const FolderOpen = () => import(/* webpackChunkName: \"icon-assets-FolderOpen\" */\"@svgr/webpack?-svgo!../../icons/FolderOpen.svg\");\r\nexport const Forward = () => import(/* webpackChunkName: \"icon-assets-Forward\" */\"@svgr/webpack?-svgo!../../icons/Forward.svg\");\r\nexport const FreezingRain = () => import(/* webpackChunkName: \"icon-assets-FreezingRain\" */\"@svgr/webpack?-svgo!../../icons/FreezingRain.svg\");\r\nexport const FreezingRainWhite = () => import(/* webpackChunkName: \"icon-assets-FreezingRainWhite\" */\"@svgr/webpack?-svgo!../../icons/FreezingRainWhite.svg\");\r\nexport const FreezingRainV2 = () => import(/* webpackChunkName: \"icon-assets-FreezingRainV2\" */\"@svgr/webpack?-svgo!../../icons/FreezingRainV2.svg\");\r\nexport const FrequentSitesEmpty = () => import(/* webpackChunkName: \"icon-assets-FrequentSitesEmpty\" */\"@svgr/webpack?-svgo!../../icons/FrequentSitesEmpty.svg\");\r\nexport const FrequentSitesError = () => import(/* webpackChunkName: \"icon-assets-FrequentSitesError\" */\"@svgr/webpack?-svgo!../../icons/FrequentSitesError.svg\");\r\nexport const GalleryFullscreen = () => import(/* webpackChunkName: \"icon-assets-GalleryFullscreen\" */\"@svgr/webpack?-svgo!../../icons/GalleryFullscreen.svg\");\r\nexport const GalleryMediaIcon = () => import(/* webpackChunkName: \"icon-assets-GalleryMediaIcon\" */\"@svgr/webpack?-svgo!../../icons/GalleryMediaIcon.svg\");\r\nexport const GeneralErrorDark = () => import(/* webpackChunkName: \"icon-assets-GeneralErrorDark\" */\"@svgr/webpack?-svgo!../../icons/GeneralErrorDark.svg\");\r\nexport const GeneralErrorLight = () => import(/* webpackChunkName: \"icon-assets-GeneralErrorLight\" */\"@svgr/webpack?-svgo!../../icons/GeneralErrorLight.svg\");\r\nexport const GenericFile = () => import(/* webpackChunkName: \"icon-assets-GenericFile\" */\"@svgr/webpack?-svgo!../../icons/GenericFile.svg\");\r\nexport const Glimmer = () => import(/* webpackChunkName: \"icon-assets-Glimmer\" */\"@svgr/webpack?-svgo!../../icons/Glimmer.svg\");\r\nexport const GridView = () => import(/* webpackChunkName: \"icon-assets-GridView\" */\"@svgr/webpack?-svgo!../../icons/GridView.svg\");\r\nexport const HailDay = () => import(/* webpackChunkName: \"icon-assets-HailDay\" */\"@svgr/webpack?-svgo!../../icons/HailDay.svg\");\r\nexport const HailDayWhite = () => import(/* webpackChunkName: \"icon-assets-HailDayWhite\" */\"@svgr/webpack?-svgo!../../icons/HailDayWhite.svg\");\r\nexport const HailDayV2 = () => import(/* webpackChunkName: \"icon-assets-HailDayV2\" */\"@svgr/webpack?-svgo!../../icons/HailDayV2.svg\");\r\nexport const HailNight = () => import(/* webpackChunkName: \"icon-assets-HailNight\" */\"@svgr/webpack?-svgo!../../icons/HailNight.svg\");\r\nexport const HailNightWhite = () => import(/* webpackChunkName: \"icon-assets-HailNightWhite\" */\"@svgr/webpack?-svgo!../../icons/HailNightWhite.svg\");\r\nexport const HailNightV2 = () => import(/* webpackChunkName: \"icon-assets-HailNightV2\" */\"@svgr/webpack?-svgo!../../icons/HailNightV2.svg\");\r\nexport const HazeSmoke = () => import(/* webpackChunkName: \"icon-assets-HazeSmoke\" */\"@svgr/webpack?-svgo!../../icons/HazeSmoke.svg\");\r\nexport const HazeSmokeNightV2_106 = () => import(/* webpackChunkName: \"icon-assets-HazeSmokeNightV2_106\" */\"@svgr/webpack?-svgo!../../icons/HazeSmokeNightV2_106.svg\");\r\nexport const HazeSmokeWhite = () => import(/* webpackChunkName: \"icon-assets-HazeSmokeWhite\" */\"@svgr/webpack?-svgo!../../icons/HazeSmokeWhite.svg\");\r\nexport const HazySmokeV2 = () => import(/* webpackChunkName: \"icon-assets-HazySmokeV2\" */\"@svgr/webpack?-svgo!../../icons/HazySmokeV2.svg\");\r\nexport const HeavySnow = () => import(/* webpackChunkName: \"icon-assets-HeavySnow\" */\"@svgr/webpack?-svgo!../../icons/HeavySnow.svg\");\r\nexport const HeavySnowWhite = () => import(/* webpackChunkName: \"icon-assets-HeavySnowWhite\" */\"@svgr/webpack?-svgo!../../icons/HeavySnowWhite.svg\");\r\nexport const HeavySnowV2 = () => import(/* webpackChunkName: \"icon-assets-HeavySnowV2\" */\"@svgr/webpack?-svgo!../../icons/HeavySnowV2.svg\");\r\nexport const Hide = () => import(/* webpackChunkName: \"icon-assets-Hide\" */\"@svgr/webpack?-svgo!../../icons/Hide.svg\");\r\nexport const HideV2 = () => import(/* webpackChunkName: \"icon-assets-HideV2\" */\"@svgr/webpack?-svgo!../../icons/HideV2.svg\");\r\nexport const HideStory = () => import(/* webpackChunkName: \"icon-assets-HideStory\" */\"@svgr/webpack?-svgo!../../icons/HideStory.svg\");\r\nexport const HideStoryV2 = () => import(/* webpackChunkName: \"icon-assets-HideStoryV2\" */\"@svgr/webpack?-svgo!../../icons/HideStoryV2.svg\");\r\nexport const Home = () => import(/* webpackChunkName: \"icon-assets-Home\" */\"@svgr/webpack?-svgo!../../icons/Home.svg\");\r\nexport const HomeOutline = () => import(/* webpackChunkName: \"icon-assets-HomeOutline\" */\"@svgr/webpack?-svgo!../../icons/HomeOutline.svg\");\r\nexport const Hotel = () => import(/* webpackChunkName: \"icon-assets-Hotel\" */\"@svgr/webpack?-svgo!../../icons/Hotel.svg\");\r\nexport const HurricaneFull = () => import(/* webpackChunkName: \"icon-assets-HurricaneFull\" */\"@svgr/webpack?-svgo!../../icons/HurricaneFull.svg\");\r\nexport const Hurricane = () => import(/* webpackChunkName: \"icon-assets-Hurricane\" */\"@svgr/webpack?-svgo!../../icons/Hurricane.svg\");\r\nexport const Hurricane1 = () => import(/* webpackChunkName: \"icon-assets-Hurricane1\" */\"@svgr/webpack?-svgo!../../icons/Hurricane1.svg\");\r\nexport const Hurricane2 = () => import(/* webpackChunkName: \"icon-assets-Hurricane2\" */\"@svgr/webpack?-svgo!../../icons/Hurricane2.svg\");\r\nexport const Hurricane3 = () => import(/* webpackChunkName: \"icon-assets-Hurricane3\" */\"@svgr/webpack?-svgo!../../icons/Hurricane3.svg\");\r\nexport const Hurricane4 = () => import(/* webpackChunkName: \"icon-assets-Hurricane4\" */\"@svgr/webpack?-svgo!../../icons/Hurricane4.svg\");\r\nexport const Hurricane5 = () => import(/* webpackChunkName: \"icon-assets-Hurricane5\" */\"@svgr/webpack?-svgo!../../icons/Hurricane5.svg\");\r\nexport const HurricaneTC = () => import(/* webpackChunkName: \"icon-assets-HurricaneTC\" */\"@svgr/webpack?-svgo!../../icons/HurricaneTC.svg\");\r\nexport const HurricaneTD = () => import(/* webpackChunkName: \"icon-assets-HurricaneTD\" */\"@svgr/webpack?-svgo!../../icons/HurricaneTD.svg\");\r\nexport const HurricaneTS = () => import(/* webpackChunkName: \"icon-assets-HurricaneTS\" */\"@svgr/webpack?-svgo!../../icons/HurricaneTS.svg\");\r\nexport const Information = () => import(/* webpackChunkName: \"icon-assets-Information\" */\"@svgr/webpack?-svgo!../../icons/Information.svg\");\r\nexport const IndustryBriefcase = () => import(/* webpackChunkName: \"icon-assets-IndustryBriefcase\" */\"@svgr/webpack?-svgo!../../icons/IndustryBriefcase.svg\");\r\nexport const InteractionRequiredDark = () => import(/* webpackChunkName: \"icon-assets-InteractionRequiredDark\" */\"@svgr/webpack?-svgo!../../icons/InteractionRequiredDark.svg\");\r\nexport const InteractionRequiredLight = () => import(/* webpackChunkName: \"icon-assets-InteractionRequiredLight\" */\"@svgr/webpack?-svgo!../../icons/InteractionRequiredLight.svg\");\r\nexport const Interested = () => import(/* webpackChunkName: \"icon-assets-Interested\" */\"@svgr/webpack?-svgo!../../icons/Interested.svg\");\r\nexport const LanguageAndContent = () => import(/* webpackChunkName: \"icon-assets-LanguageAndContent\" */\"@svgr/webpack?-svgo!../../icons/LanguageAndContent.svg\");\r\nexport const LightBulb = () => import(/* webpackChunkName: \"icon-assets-LightBulb\" */\"@svgr/webpack?-svgo!../../icons/LightBulb.svg\");\r\nexport const RiverLayout = () => import(/* webpackChunkName: \"icon-assets-Layout\" */\"@svgr/webpack?-svgo!../../icons/RiverLayout.svg\");\r\nexport const StripeLayout = () => import(/* webpackChunkName: \"icon-assets-Layout\" */\"@svgr/webpack?-svgo!../../icons/StripeLayout.svg\");\r\nexport const ListMenu = () => import(/* webpackChunkName: \"icon-assets-ListMenu\" */\"@svgr/webpack?-svgo!../../icons/ListMenu.svg\");\r\nexport const LightRain = () => import(/* webpackChunkName: \"icon-assets-LightRain\" */\"@svgr/webpack?-svgo!../../icons/LightRain.svg\");\r\nexport const LightRainWhite = () => import(/* webpackChunkName: \"icon-assets-LightRainWhite\" */\"@svgr/webpack?-svgo!../../icons/LightRainWhite.svg\");\r\nexport const LightRainV2 = () => import(/* webpackChunkName: \"icon-assets-LightRainV2\" */\"@svgr/webpack?-svgo!../../icons/LightRainV2.svg\");\r\nexport const LightSnow = () => import(/* webpackChunkName: \"icon-assets-LightSnow\" */\"@svgr/webpack?-svgo!../../icons/LightSnow.svg\");\r\nexport const LightSnowWhite = () => import(/* webpackChunkName: \"icon-assets-LightSnowWhite\" */\"@svgr/webpack?-svgo!../../icons/LightSnowWhite.svg\");\r\nexport const LightSnowV2 = () => import(/* webpackChunkName: \"icon-assets-LightSnowV2\" */\"@svgr/webpack?-svgo!../../icons/LightSnowV2.svg\");\r\nexport const Like = () => import(/* webpackChunkName: \"icon-assets-Like\" */\"@svgr/webpack?-svgo!../../icons/Like.svg\");\r\nexport const LikeText = () => import(/* webpackChunkName: \"icon-assets-LikeText\" */\"@svgr/webpack?-svgo!../../icons/LikeText.svg\");\r\nexport const Liked = () => import(/* webpackChunkName: \"icon-assets-Liked\" */\"@svgr/webpack?-svgo!../../icons/Liked.svg\");\r\nexport const LikedText = () => import(/* webpackChunkName: \"icon-assets-LikedText\" */\"@svgr/webpack?-svgo!../../icons/LikedText.svg\");\r\nexport const Line = () => import(/* webpackChunkName: \"icon-assets-Line\" */\"@svgr/webpack?-svgo!../../icons/Line.svg\");\r\nexport const Link = () => import(/* webpackChunkName: \"icon-assets-Link\" */\"@svgr/webpack?-svgo!../../icons/Link.svg\");\r\nexport const LinkedIn = () => import(/* webpackChunkName: \"icon-assets-LinkedIn\" */\"@svgr/webpack?-svgo!../../icons/LinkedIn.svg\");\r\nexport const LinkedInBlack = () => import(/* webpackChunkName: \"icon-assets-LinkedInBlack\" */\"@svgr/webpack?-svgo!../../icons/LinkedInBlack.svg\");\r\nexport const LinkedInText = () => import(/* webpackChunkName: \"icon-assets-LinkedInText\" */\"@svgr/webpack?-svgo!../../icons/LinkedInText.svg\");\r\nexport const LocaleLanguage = () => import(/* webpackChunkName: \"icon-assets-LocaleLanguage\" */\"@svgr/webpack?-svgo!../../icons/LocaleLanguage.svg\");\r\nexport const Locate = () => import(/* webpackChunkName: \"icon-assets-Locate\" */\"@svgr/webpack?-svgo!../../icons/Locate.svg\");\r\nexport const LocateWhite = () => import(/* webpackChunkName: \"icon-assets-LocateWhite\" */\"@svgr/webpack?-svgo!../../icons/LocateWhite.svg\");\r\nexport const LocationDetect = () => import(/* webpackChunkName: \"icon-assets-LocationDetect\" */\"@svgr/webpack?-svgo!../../icons/LocationDetect.svg\");\r\nexport const Lock = () => import(/* webpackChunkName: \"icon-assets-Lock\" */\"@svgr/webpack?-svgo!../../icons/Lock.svg\");\r\nexport const Mail = () => import(/* webpackChunkName: \"icon-assets-Mail\" */\"@svgr/webpack?-svgo!../../icons/Mail.svg\");\r\nexport const MailBlack = () => import(/* webpackChunkName: \"icon-assets-MailBlack\" */\"@svgr/webpack?-svgo!../../icons/MailBlack.svg\");\r\nexport const MailNoFill = () => import(/* webpackChunkName: \"icon-assets-MailNoFill\" */\"@svgr/webpack?-svgo!../../icons/MailNoFill.svg\");\r\nexport const MailRoundedCorners = () => import(/* webpackChunkName: \"icon-assets-MailRoundedCorners\" */\"@svgr/webpack?-svgo!../../icons/MailRoundedCorners.svg\");\r\nexport const ManagedBriefcase = () => import(/* webpackChunkName: \"icon-assets-ManagedBriefcase\" */\"@svgr/webpack?-svgo!../../icons/ManagedBriefcase.svg\");\r\nexport const ManagedBriefcaseNoFill = () => import(/* webpackChunkName: \"icon-assets-ManagedBriefcaseNoFill\" */\"@svgr/webpack?-svgo!../../icons/ManagedBriefcaseNoFill.svg\");\r\nexport const MapEnterFullScreenMode = () => import(/* webpackChunkName: \"icon-assets-MapEnterFullScreenMode\" */\"@svgr/webpack?-svgo!../../icons/MapEnterFullScreenMode.svg\");\r\nexport const MapExitFullScreenMode = () => import(/* webpackChunkName: \"icon-assets-MapExitFullScreenMode\" */\"@svgr/webpack?-svgo!../../icons/MapExitFullScreenMode.svg\");\r\nexport const MapZoomIn = () => import(/* webpackChunkName: \"icon-assets-MapZoomIn\" */\"@svgr/webpack?-svgo!../../icons/MapZoomIn.svg\");\r\nexport const MapZoomOut = () => import(/* webpackChunkName: \"icon-assets-MapZoomOut\" */\"@svgr/webpack?-svgo!../../icons/MapZoomOut.svg\");\r\nexport const MediaIconSlideshow = () => import(/* webpackChunkName: \"icon-assets-MediaIconSlideshow\" */\"@svgr/webpack?-svgo!../../icons/MediaIconSlideshow.svg\");\r\nexport const MediaIconVideo = () => import(/* webpackChunkName: \"icon-assets-MediaIconVideo\" */\"@svgr/webpack?-svgo!../../icons/MediaIconVideo.svg\");\r\nexport const Message = () => import(/* webpackChunkName: \"icon-assets-Message\" */\"@svgr/webpack?-svgo!../../icons/Message.svg\");\r\nexport const MessageNoFill = () => import(/* webpackChunkName: \"icon-assets-MessageNoFill\" */\"@svgr/webpack?-svgo!../../icons/MessageNoFill.svg\");\r\nexport const Messages = () => import(/* webpackChunkName: \"icon-assets-Messages\" */\"@svgr/webpack?-svgo!../../icons/Messages.svg\");\r\nexport const MsnLogo = () => import(/* webpackChunkName: \"icon-assets-MsnLogo\" */\"@svgr/webpack?-svgo!../../icons/MsnLogo.svg\");\r\nexport const MicrosoftFullLogo = () => import(/* webpackChunkName: \"icon-assets-MicrosoftFullLogo\" */\"@svgr/webpack?-svgo!../../icons/MicrosoftFullLogo.svg\");\r\nexport const MicrosoftLogo = () => import(/* webpackChunkName: \"icon-assets-MicrosoftLogo\" */\"@svgr/webpack?-svgo!../../icons/MicrosoftLogo.svg\");\r\nexport const MicrosoftNews = () => import(/* webpackChunkName: \"icon-assets-MicrosoftNews\" */\"@svgr/webpack?-svgo!../../icons/MicrosoftNews.svg\");\r\nexport const MicrosoftNewsFull = () => import(/* webpackChunkName: \"icon-assets-MicrosoftNews\" */\"@svgr/webpack?-svgo!../../icons/MicrosoftNewsFull.svg\");\r\nexport const MicrosoftNewsFull_FR = () => import(/* webpackChunkName: \"icon-assets-MicrosoftNews_FR\" */\"@svgr/webpack?-svgo!../../icons/MicrosoftNewsFull_FR.svg\");\r\nexport const MicrosoftNewsFull_ZH = () => import(/* webpackChunkName: \"icon-assets-MicrosoftNews_ZH\" */\"@svgr/webpack?-svgo!../../icons/MicrosoftNewsFull_ZH.svg\");\r\nexport const ModerateRain = () => import(/* webpackChunkName: \"icon-assets-ModerateRain\" */\"@svgr/webpack?-svgo!../../icons/ModerateRain.svg\");\r\nexport const ModerateRainWhite = () => import(/* webpackChunkName: \"icon-assets-ModerateRainWhite\" */\"@svgr/webpack?-svgo!../../icons/ModerateRainWhite.svg\");\r\nexport const ModerateRainV2 = () => import(/* webpackChunkName: \"icon-assets-ModerateRainV2\" */\"@svgr/webpack?-svgo!../../icons/ModerateRainV2.svg\");\r\nexport const More = () => import(/* webpackChunkName: \"icon-assets-More\" */\"@svgr/webpack?-svgo!../../icons/More.svg\");\r\nexport const MoreV2 = () => import(/* webpackChunkName: \"icon-assets-MoreV2\" */\"@svgr/webpack?-svgo!../../icons/MoreV2.svg\");\r\nexport const Movie = () => import(/* webpackChunkName: \"icon-assets-Movie\" */\"@svgr/webpack?-svgo!../../icons/Movie.svg\");\r\nexport const NewsArticle = () => import(/* webpackChunkName: \"icon-assets-NewsArticle\" */\"@svgr/webpack?-svgo!../../icons/NewsArticle.svg\");\r\nexport const NightTime = () => import(/* webpackChunkName: \"icon-assets-NightTime\" */\"@svgr/webpack?-svgo!../../icons/NightTime.svg\");\r\nexport const NotificationFivePlusSign = () => import(/* webpackChunkName: \"icon-assets-Notification-Five-Plus-Sign\" */\"@svgr/webpack?-svgo!../../icons/NotificationFivePlusSign.svg\");\r\nexport const NotificationRefreshArrow = () => import(/* webpackChunkName: \"icon-assets-Notification-Five-Plus-Sign\" */\"@svgr/webpack?-svgo!../../icons/NotificationRefreshArrow.svg\");\r\nexport const OfferTimer = () => import(/* webpackChunkName: \"icon-assets-OfferTimer\" */\"@svgr/webpack?-svgo!../../icons/OfferTimer.svg\");\r\nexport const Office = () => import(/* webpackChunkName: \"icon-assets-Office\" */\"@svgr/webpack?-svgo!../../icons/Office.svg\");\r\nexport const OfficeFormsLogo = () => import(/* webpackChunkName: \"icon-assets-OfficeFormsLogo\" */\"@svgr/webpack?-svgo!../../icons/OfficeFormsLogo.svg\");\r\nexport const OneDrive = () => import(/* webpackChunkName: \"icon-assets-OneDrive\" */\"@svgr/webpack?-svgo!../../icons/OneDrive.svg\");\r\nexport const OneNote = () => import(/* webpackChunkName: \"icon-assets-OneNote\" */\"@svgr/webpack?-svgo!../../icons/OneNote.svg\");\r\nexport const Onetoc = () => import(/* webpackChunkName: \"icon-assets-Onetoc\" */\"@svgr/webpack?-svgo!../../icons/Onetoc.svg\");\r\nexport const Open = () => import(/* webpackChunkName: \"icon-assets-Open\" */\"@svgr/webpack?-svgo!../../icons/Open.svg\");\r\nexport const OpenSquared = () => import(/* webpackChunkName: \"icon-assets-OpenSquared\" */\"@svgr/webpack?-svgo!../../icons/OpenSquared.svg\");\r\nexport const Outlook = () => import(/* webpackChunkName: \"icon-assets-Outlook\" */\"@svgr/webpack?-svgo!../../icons/Outlook.svg\");\r\nexport const PartlyCloudyDay = () => import(/* webpackChunkName: \"icon-assets-PartlyCloudyDay\" */\"@svgr/webpack?-svgo!../../icons/PartlyCloudyDay.svg\");\r\nexport const PartlyCloudyDayWhite = () => import(/* webpackChunkName: \"icon-assets-PartlyCloudyDayWhite\" */\"@svgr/webpack?-svgo!../../icons/PartlyCloudyDayWhite.svg\");\r\nexport const PartlyCloudyDayV2 = () => import(/* webpackChunkName: \"icon-assets-PartlyCloudyDayV2\" */\"@svgr/webpack?-svgo!../../icons/PartlyCloudyDayV2.svg\");\r\nexport const PartlyCloudyNight = () => import(/* webpackChunkName: \"icon-assets-PartlyCloudyNight\" */\"@svgr/webpack?-svgo!../../icons/PartlyCloudyNight.svg\");\r\nexport const PartlyCloudyNightWhite = () => import(/* webpackChunkName: \"icon-assets-PartlyCloudyNightWhite\" */\"@svgr/webpack?-svgo!../../icons/PartlyCloudyNightWhite.svg\");\r\nexport const PartlyCloudyNightV2 = () => import(/* webpackChunkName: \"icon-assets-PartlyCloudyNightV2\" */\"@svgr/webpack?-svgo!../../icons/PartlyCloudyNightV2.svg\");\r\nexport const Pdf = () => import(/* webpackChunkName: \"icon-assets-Pdf\" */\"@svgr/webpack?-svgo!../../icons/Pdf.svg\");\r\nexport const People = () => import(/* webpackChunkName: \"icon-assets-People\" */\"@svgr/webpack?-svgo!../../icons/People.svg\");\r\nexport const Pencil = () => import(/* webpackChunkName: \"icon-assets-Pencil\" */\"@svgr/webpack?-svgo!../../icons/Pencil.svg\");\r\nexport const PHAdd = () => import(/* webpackChunkName: \"icon-assets-PHAdd\" */\"@svgr/webpack?-svgo!../../icons/PHAdd.svg\");\r\nexport const PHAlert = () => import(/* webpackChunkName: \"icon-assets-PHAlert\" */\"@svgr/webpack?-svgo!../../icons/PHAlert.svg\");\r\nexport const PHArrowRight = () => import(/* webpackChunkName: \"icon-assets-PHArrowRight\" */\"@svgr/webpack?-svgo!../../icons/PHArrowRight.svg\");\r\nexport const PHCalendar = () => import(/* webpackChunkName: \"icon-assets-PHCalendar\" */\"@svgr/webpack?-svgo!../../icons/PHCalendar.svg\");\r\nexport const PHEllipsis = () => import(/* webpackChunkName: \"icon-assets-PHEllipsis\" */\"@svgr/webpack?-svgo!../../icons/PHEllipsis.svg\");\r\nexport const PHEmptyTasks = () => import(/* webpackChunkName: \"icon-assets-PHEmptyTasks\" */\"@svgr/webpack?-svgo!../../icons/PHEmptyTasks.svg\");\r\nexport const PHFavorite = () => import(/* webpackChunkName: \"icon-assets-PHFavorite\" */\"@svgr/webpack?-svgo!../../icons/PHFavorite.svg\");\r\nexport const PHFavoriteFilled = () => import(/* webpackChunkName: \"icon-assets-PHFavoriteFilled\" */\"@svgr/webpack?-svgo!../../icons/PHFavoriteFilled.svg\");\r\nexport const PHNoTask = () => import(/* webpackChunkName: \"icon-assets-PHNoTask\" */\"@svgr/webpack?-svgo!../../icons/PHNoTask.svg\");\r\nexport const PHToDo = () => import(/* webpackChunkName: \"icon-assets-PHToDo\" */\"@svgr/webpack?-svgo!../../icons/PHToDo.svg\");\r\nexport const PHExcel = () => import(/* webpackChunkName: \"icon-assets-PHExcel\" */\"@svgr/webpack?-svgo!../../icons/PHExcel.svg\");\r\nexport const PHExcelFile = () => import(/* webpackChunkName: \"icon-assets-PHExcelFile\" */\"@svgr/webpack?-svgo!../../icons/PHExcelFile.svg\");\r\nexport const PHFluidFile = () => import(/* webpackChunkName: \"icon-assets-PHFluidFile\" */\"@svgr/webpack?-svgo!../../icons/PHFluidFile.svg\");\r\nexport const PHFormFile = () => import(/* webpackChunkName: \"icon-assets-PHFormFile\" */\"@svgr/webpack?-svgo!../../icons/PHFormFile.svg\");\r\nexport const PHGenericFile = () => import(/* webpackChunkName: \"icon-assets-PHGenericFile\" */\"@svgr/webpack?-svgo!../../icons/PHGenericFile.svg\");\r\nexport const PHOneDrive = () => import(/* webpackChunkName: \"icon-assets-PHOneDrive\" */\"@svgr/webpack?-svgo!../../icons/PHOneDrive.svg\");\r\nexport const PHOneNote = () => import(/* webpackChunkName: \"icon-assets-PHOneNote\" */\"@svgr/webpack?-svgo!../../icons/PHOneNote.svg\");\r\nexport const PHOneNoteFile = () => import(/* webpackChunkName: \"icon-assets-PHOneNoteFile\" */\"@svgr/webpack?-svgo!../../icons/PHOneNoteFile.svg\");\r\nexport const PHOutlook = () => import(/* webpackChunkName: \"icon-assets-PHOutlook\" */\"@svgr/webpack?-svgo!../../icons/PHOutlook.svg\");\r\nexport const PHPDFFile = () => import(/* webpackChunkName: \"icon-assets-PHPDFFile\" */\"@svgr/webpack?-svgo!../../icons/PHPDFFile.svg\");\r\nexport const PHPowerBIFile = () => import(/* webpackChunkName: \"icon-assets-PHPowerBIFile\" */\"@svgr/webpack?-svgo!../../icons/PHPowerBIFile.svg\");\r\nexport const PHPowerPoint = () => import(/* webpackChunkName: \"icon-assets-PHPowerPoint\" */\"@svgr/webpack?-svgo!../../icons/PHPowerPoint.svg\");\r\nexport const PHPowerPointFile = () => import(/* webpackChunkName: \"icon-assets-PHPowerPointFile\" */\"@svgr/webpack?-svgo!../../icons/PHPowerPointFile.svg\");\r\nexport const PHProjectFile = () => import(/* webpackChunkName: \"icon-assets-PHProjectFile\" */\"@svgr/webpack?-svgo!../../icons/PHProjectFile.svg\");\r\nexport const PHSharepoint = () => import(/* webpackChunkName: \"icon-assets-PHSharepoint\" */\"@svgr/webpack?-svgo!../../icons/PHSharepoint.svg\");\r\nexport const PHSharePointFile = () => import(/* webpackChunkName: \"icon-assets-PHSharePointFile\" */\"@svgr/webpack?-svgo!../../icons/PHSharePointFile.svg\");\r\nexport const PHSharePointNewsFile = () => import(/* webpackChunkName: \"icon-assets-PHSharePointNewsFile\" */\"@svgr/webpack?-svgo!../../icons/PHSharePointNewsFile.svg\");\r\nexport const PHStream = () => import(/* webpackChunkName: \"icon-assets-PHStream\" */\"@svgr/webpack?-svgo!../../icons/PHStream.svg\");\r\nexport const PHStreamFile = () => import(/* webpackChunkName: \"icon-assets-PHStreamFile\" */\"@svgr/webpack?-svgo!../../icons/PHStreamFile.svg\");\r\nexport const PHSwayFile = () => import(/* webpackChunkName: \"icon-assets-PHSwayFile\" */\"@svgr/webpack?-svgo!../../icons/PHSwayFile.svg\");\r\nexport const PHVideoFile = () => import(/* webpackChunkName: \"icon-assets-PHVideoFile\" */\"@svgr/webpack?-svgo!../../icons/PHVideoFile.svg\");\r\nexport const PHVisioFile = () => import(/* webpackChunkName: \"icon-assets-PHVisioFile\" */\"@svgr/webpack?-svgo!../../icons/PHVisioFile.svg\");\r\nexport const PHWord = () => import(/* webpackChunkName: \"icon-assets-PHWord\" */\"@svgr/webpack?-svgo!../../icons/PHWord.svg\");\r\nexport const PHWordFile = () => import(/* webpackChunkName: \"icon-assets-PHWordFile\" */\"@svgr/webpack?-svgo!../../icons/PHWordFile.svg\");\r\nexport const Pin = () => import(/* webpackChunkName: \"icon-assets-Pin\" */\"@svgr/webpack?-svgo!../../icons/Pin.svg\");\r\nexport const Plus = () => import(/* webpackChunkName: \"icon-assets-Plus\" */\"@svgr/webpack?-svgo!../../icons/Plus.svg\");\r\nexport const PopoverArrow = () => import(/* webpackChunkName: \"icon-assets-PopoverArrow\" */\"@svgr/webpack?-svgo!../../icons/PopoverArrow.svg\");\r\nexport const PowerBI = () => import(/* webpackChunkName: \"icon-assets-PowerBI\" */\"@svgr/webpack?-svgo!../../icons/PowerBI.svg\");\r\nexport const PowerPoint = () => import(/* webpackChunkName: \"icon-assets-PowerPoint\" */\"@svgr/webpack?-svgo!../../icons/PowerPoint.svg\");\r\nexport const PollResults = () => import(/* webpackChunkName: \"icon-poll-results\" */\"@svgr/webpack?-svgo!../../icons/PollResults.svg\");\r\nexport const Pptx = () => import(/* webpackChunkName: \"icon-assets-Pptx\" */\"@svgr/webpack?-svgo!../../icons/Pptx.svg\");\r\nexport const PresenceAvailable = () => import(/* webpackChunkName: \"icon-assets-PresenceAvailable\" */\"@svgr/webpack?-svgo!../../icons/PresenceAvailable.svg\");\r\nexport const PresenceAway = () => import(/* webpackChunkName: \"icon-assets-PresenceAway\" */\"@svgr/webpack?-svgo!../../icons/PresenceAway.svg\");\r\nexport const PresenceBusy = () => import(/* webpackChunkName: \"icon-assets-PresenceBusy\" */\"@svgr/webpack?-svgo!../../icons/PresenceBusy.svg\");\r\nexport const PresenceOof = () => import(/* webpackChunkName: \"icon-assets-PresenceOof\" */\"@svgr/webpack?-svgo!../../icons/PresenceOof.svg\");\r\nexport const PresenceOofAvailable = () => import(/* webpackChunkName: \"icon-assets-PresenceOofAvailable\" */\"@svgr/webpack?-svgo!../../icons/PresenceOofAvailable.svg\");\r\nexport const PresenceOofBusy = () => import(/* webpackChunkName: \"icon-assets-PresenceOofBusy\" */\"@svgr/webpack?-svgo!../../icons/PresenceOofBusy.svg\");\r\nexport const PresenceUnknown = () => import(/* webpackChunkName: \"icon-assets-PresenceUnknown\" */\"@svgr/webpack?-svgo!../../icons/PresenceUnknown.svg\");\r\nexport const PriceDrop = () => import(/* webpackChunkName: \"icon-assets-PriceDrop\" */\"@svgr/webpack?-svgo!../../icons/PriceDrop.svg\");\r\nexport const PriceDropBlue = () => import(/* webpackChunkName: \"icon-assets-PriceDropBlue\" */\"@svgr/webpack?-svgo!../../icons/PriceDropBlue.svg\");\r\nexport const Project = () => import(/* webpackChunkName: \"icon-assets-Project\" */\"@svgr/webpack?-svgo!../../icons/Project.svg\");\r\nexport const Radar = () => import(/* webpackChunkName: \"icon-assets-Radar\" */\"@svgr/webpack?-svgo!../../icons/Radar.svg\");\r\nexport const RainShowersDay = () => import(/* webpackChunkName: \"icon-assets-RainShowersDay\" */\"@svgr/webpack?-svgo!../../icons/RainShowersDay.svg\");\r\nexport const RainShowersDayWhite = () => import(/* webpackChunkName: \"icon-assets-RainShowersDayWhite\" */\"@svgr/webpack?-svgo!../../icons/RainShowersDayWhite.svg\");\r\nexport const RainShowersDayV2 = () => import(/* webpackChunkName: \"icon-assets-RainShowersDayV2\" */\"@svgr/webpack?-svgo!../../icons/RainShowersDayV2.svg\");\r\nexport const RainShowersNight = () => import(/* webpackChunkName: \"icon-assets-RainShowersNight\" */\"@svgr/webpack?-svgo!../../icons/RainShowersNight.svg\");\r\nexport const RainShowersNightWhite = () => import(/* webpackChunkName: \"icon-assets-RainShowersNightWhite\" */\"@svgr/webpack?-svgo!../../icons/RainShowersNightWhite.svg\");\r\nexport const RainShowersNightV2 = () => import(/* webpackChunkName: \"icon-assets-RainShowersNightV2\" */\"@svgr/webpack?-svgo!../../icons/RainShowersNightV2.svg\");\r\nexport const RainSnow = () => import(/* webpackChunkName: \"icon-assets-RainSnow\" */\"@svgr/webpack?-svgo!../../icons/RainSnow.svg\");\r\nexport const RainSnowWhite = () => import(/* webpackChunkName: \"icon-assets-RainSnowWhite\" */\"@svgr/webpack?-svgo!../../icons/RainSnowWhite.svg\");\r\nexport const RainSnowV2 = () => import(/* webpackChunkName: \"icon-assets-RainSnowV2\" */\"@svgr/webpack?-svgo!../../icons/RainSnowV2.svg\");\r\nexport const RainSnowShowersDay = () => import(/* webpackChunkName: \"icon-assets-RainSnowShowersDay\" */\"@svgr/webpack?-svgo!../../icons/RainSnowShowersDay.svg\");\r\nexport const RainSnowShowersDayWhite = () => import(/* webpackChunkName: \"icon-assets-RainSnowShowersDayWhite\" */\"@svgr/webpack?-svgo!../../icons/RainSnowShowersDayWhite.svg\");\r\nexport const RainSnowShowersNight = () => import(/* webpackChunkName: \"icon-assets-RainSnowShowersNight\" */\"@svgr/webpack?-svgo!../../icons/RainSnowShowersNight.svg\");\r\nexport const RainSnowShowersNightWhite = () => import(/* webpackChunkName: \"icon-assets-RainSnowShowersNightWhite\" */\"@svgr/webpack?-svgo!../../icons/RainSnowShowersNightWhite.svg\");\r\nexport const RainSnowShowersNightV2 = () => import(/* webpackChunkName: \"icon-assets-RainSnowShowersNightV2\" */\"@svgr/webpack?-svgo!../../icons/RainSnowShowersNightV2.svg\");\r\nexport const Rating = () => import(/* webpackChunkName: \"icon-assets-Rating\" */\"@svgr/webpack?-svgo!../../icons/Rating.svg\");\r\nexport const RatingEmpty = () => import(/* webpackChunkName: \"icon-assets-RatingEmpty\" */\"@svgr/webpack?-svgo!../../icons/RatingEmpty.svg\");\r\nexport const RatingEmptyDark = () => import(/* webpackChunkName: \"icon-assets-RatingEmptyDark\" */\"@svgr/webpack?-svgo!../../icons/RatingEmptyDark.svg\");\r\nexport const RatingPartial = () => import(/* webpackChunkName: \"icon-assets-RatingPartial\" */\"@svgr/webpack?-svgo!../../icons/RatingPartial.svg\");\r\nexport const RatingPartialDark = () => import(/* webpackChunkName: \"icon-assets-RatingPartialDark\" */\"@svgr/webpack?-svgo!../../icons/RatingPartialDark.svg\");\r\nexport const RecommendedEmpty = () => import(/* webpackChunkName: \"icon-assets-RecommendedEmpty\" */\"@svgr/webpack?-svgo!../../icons/RecommendedEmpty.svg\");\r\nexport const RecommendedError = () => import(/* webpackChunkName: \"icon-assets-RecommendedError\" */\"@svgr/webpack?-svgo!../../icons/RecommendedError.svg\");\r\nexport const Refresh = () => import(/* webpackChunkName: \"icon-assets-Refresh\" */\"@svgr/webpack?-svgo!../../icons/Refresh.svg\");\r\nexport const Remove = () => import(/* webpackChunkName: \"icon-assets-Remove\" */\"@svgr/webpack?-svgo!../../icons/Remove.svg\");\r\nexport const VideoMediaIcon = () => import(/* webpackChunkName: \"icon-assets-VideoMediaIcon\" */\"@svgr/webpack?-svgo!../../icons/VideoMediaIcon.svg\");\r\nexport const VideoPlay = () => import(/* webpackChunkName: \"icon-assets-VideoPlay\" */\"@svgr/webpack?-svgo!../../icons/VideoPlay.svg\");\r\nexport const Save = () => import(/* webpackChunkName: \"icon-assets-Save\" */\"@svgr/webpack?-svgo!../../icons/Save.svg\");\r\nexport const Saved = () => import(/* webpackChunkName: \"icon-assets-Saved\" */\"@svgr/webpack?-svgo!../../icons/Saved.svg\");\r\nexport const SavedNeutral = () => import(/* webpackChunkName: \"icon-assets-Saved\" */\"@svgr/webpack?-svgo!../../icons/SavedNeutral.svg\");\r\nexport const SetHome = () => import(/* webpackChunkName: \"icon-assets-SetHome\" */\"@svgr/webpack?-svgo!../../icons/SetHome.svg\");\r\nexport const SevereWeather = () => import(/* webpackChunkName: \"icon-assets-SevereWeather\" */\"@svgr/webpack?-svgo!../../icons/SevereWeather.svg\");\r\nexport const Search = () => import(/* webpackChunkName: \"icon-assets-Search\" */\"@svgr/webpack?-svgo!../../icons/Search.svg\");\r\nexport const SearchV2 = () => import(/* webpackChunkName: \"icon-assets-SearchV2\" */\"@svgr/webpack?-svgo!../../icons/SearchV2.svg\");\r\nexport const SettingsIcon = () => import(/* webpackChunkName: \"icon-assets-Settings\" */\"@svgr/webpack?-svgo!../../icons/SettingsIcon.svg\");\r\nexport const Share = () => import(/* webpackChunkName: \"icon-assets-Share\" */\"@svgr/webpack?-svgo!../../icons/Share.svg\");\r\nexport const ShareLight = () => import(/* webpackChunkName: \"icon-assets-ShareLight\" */\"@svgr/webpack?-svgo!../../icons/ShareLight.svg\");\r\nexport const ShareNoFill = () => import(/* webpackChunkName: \"icon-assets-ShareNoFill\" */\"@svgr/webpack?-svgo!../../icons/ShareNoFill.svg\");\r\nexport const ShareRoundedCorners = () => import(/* webpackChunkName: \"icon-assets-ShareRoundedCorners\" */\"@svgr/webpack?-svgo!../../icons/ShareRoundedCorners.svg\");\r\nexport const Sharepoint = () => import(/* webpackChunkName: \"icon-assets-Sharepoint\" */\"@svgr/webpack?-svgo!../../icons/Sharepoint.svg\");\r\nexport const Shopping = () => import(/* webpackChunkName: \"icon-assets-Shopping\" */\"@svgr/webpack?-svgo!../../icons/Shopping.svg\");\r\nexport const ShoppingDealsDark = () => import(/* webpackChunkName: \"icon-assets-ShoppingDealsDark\" */\"@svgr/webpack?-svgo!../../icons/ShoppingDealsDark.svg\");\r\nexport const ShoppingDealsLight = () => import(/* webpackChunkName: \"icon-assets-ShoppingDealsLight\" */\"@svgr/webpack?-svgo!../../icons/ShoppingDealsLight.svg\");\r\nexport const Skype = () => import(/* webpackChunkName: \"icon-assets-Skype\" */\"@svgr/webpack?-svgo!../../icons/Skype.svg\");\r\nexport const SkypeOffice = () => import(/* webpackChunkName: \"icon-assets-SkypeOffice\" */\"@svgr/webpack?-svgo!../../icons/SkypeOffice.svg\");\r\nexport const SlugInfo = () => import(/* webpackChunkName: \"icon-assets-SlugInfo\" */\"@svgr/webpack?-svgo!../../icons/SlugInfo.svg\");\r\nexport const SlugInfoDark = () => import(/* webpackChunkName: \"icon-assets-SlugInfoDark\" */\"@svgr/webpack?-svgo!../../icons/SlugInfoDark.svg\");\r\nexport const SnowShowersDay = () => import(/* webpackChunkName: \"icon-assets-SnowShowersDay\" */\"@svgr/webpack?-svgo!../../icons/SnowShowersDay.svg\");\r\nexport const SnowShowersDayWhite = () => import(/* webpackChunkName: \"icon-assets-SnowShowersDayWhite\" */\"@svgr/webpack?-svgo!../../icons/SnowShowersDayWhite.svg\");\r\nexport const SnowShowersDayV2 = () => import(/* webpackChunkName: \"icon-assets-SnowShowersDayV2\" */\"@svgr/webpack?-svgo!../../icons/SnowShowersDayV2.svg\");\r\nexport const SnowShowersNight = () => import(/* webpackChunkName: \"icon-assets-SnowShowersNight\" */\"@svgr/webpack?-svgo!../../icons/SnowShowersNight.svg\");\r\nexport const SnowShowersNightWhite = () => import(/* webpackChunkName: \"icon-assets-SnowShowersNightWhite\" */\"@svgr/webpack?-svgo!../../icons/SnowShowersNightWhite.svg\");\r\nexport const SnowShowersNightV2 = () => import(/* webpackChunkName: \"icon-assets-SnowShowersNightV2\" */\"@svgr/webpack?-svgo!../../icons/SnowShowersNightV2.svg\");\r\nexport const Star = () => import(/* webpackChunkName: \"icon-assets-Star\" */\"@svgr/webpack?-svgo!../../icons/Star.svg\");\r\nexport const StarFill = () => import(/* webpackChunkName: \"icon-assets-StarFill\" */\"@svgr/webpack?-svgo!../../icons/StarFill.svg\");\r\nexport const StarFollow = () => import(/* webpackChunkName: \"icon-assets-StarFollow\" */\"@svgr/webpack?-svgo!../../icons/StarFollow.svg\");\r\nexport const StarFollowBlue = () => import(/* webpackChunkName: \"icon-assets-StarFollowBlue\" */\"@svgr/webpack?-svgo!../../icons/StarFollowBlue.svg\");\r\nexport const StarOutline = () => import(/* webpackChunkName: \"icon-assets-StarOutline\" */\"@svgr/webpack?-svgo!../../icons/StarOutline.svg\");\r\nexport const Stars = () => import(/* webpackChunkName: \"icon-assets-Stars\" */\"@svgr/webpack?-svgo!../../icons/Stars.svg\");\r\nexport const SunnyDay = () => import(/* webpackChunkName: \"icon-assets-SunnyDay\" */\"@svgr/webpack?-svgo!../../icons/SunnyDay.svg\");\r\nexport const SunnyDayOutline = () => import(/* webpackChunkName: \"icon-assets-SunnyDayOutline\" */\"@svgr/webpack?-svgo!../../icons/SunnyDayOutline.svg\");\r\nexport const SunnyDayWhite = () => import(/* webpackChunkName: \"icon-assets-SunnyDayWhite\" */\"@svgr/webpack?-svgo!../../icons/SunnyDayWhite.svg\");\r\nexport const SunnyDayV2 = () => import(/* webpackChunkName: \"icon-assets-SunnyDayV2\" */\"@svgr/webpack?-svgo!../../icons/SunnyDayV2.svg\");\r\nexport const Sway = () => import(/* webpackChunkName: \"icon-assets-Sway\" */\"@svgr/webpack?-svgo!../../icons/Sway.svg\");\r\nexport const SwayApp = () => import(/* webpackChunkName: \"icon-assets-SwayApp\" */\"@svgr/webpack?-svgo!../../icons/SwayApp.svg\");\r\nexport const Teams = () => import(/* webpackChunkName: \"icon-assets-Teams\" */\"@svgr/webpack?-svgo!../../icons/Teams.svg\");\r\nexport const ThumbnailView = () => import(/* webpackChunkName: \"icon-assets-ThumbnailView\" */\"@svgr/webpack?-svgo!../../icons/ThumbnailView.svg\");\r\nexport const ThumbDown = () => import(/* webpackChunkName: \"icon-assets-ThumbDown\" */\"@svgr/webpack?-svgo!../../icons/ThumbDown.svg\");\r\nexport const ThumbDownBlue = () => import(/* webpackChunkName: \"icon-assets-ThumbDownBlue\" */\"@svgr/webpack?-svgo!../../icons/ThumbDownBlue.svg\");\r\nexport const ThumbUp = () => import(/* webpackChunkName: \"icon-assets-ThumbUp\" */\"@svgr/webpack?-svgo!../../icons/ThumbUp.svg\");\r\nexport const ThumbUp2 = () => import(/* webpackChunkName: \"icon-assets-ThumbUp\" */\"@svgr/webpack?-svgo!../../icons/ThumbUp2.svg\");\r\nexport const ThumbUp3 = () => import(/* webpackChunkName: \"icon-assets-ThumbUp\" */\"@svgr/webpack?-svgo!../../icons/ThumbUp3.svg\");\r\nexport const ThumbUpBlue = () => import(/* webpackChunkName: \"icon-assets-ThumbUpBlue\" */\"@svgr/webpack?-svgo!../../icons/ThumbUpBlue.svg\");\r\nexport const ThumbUpFill = () => import(/* webpackChunkName: \"icon-assets-ThumbUpFill\" */\"@svgr/webpack?-svgo!../../icons/ThumbUpFill.svg\");\r\nexport const ThumbsUpAndDown = () => import(/* webpackChunkName: \"icon-assets-ThumbsUpAndDown\" */\"@svgr/webpack?-svgo!../../icons/ThumbsUpAndDown.svg\");\r\nexport const Thunderstorms = () => import(/* webpackChunkName: \"icon-assets-Thunderstorms\" */\"@svgr/webpack?-svgo!../../icons/Thunderstorms.svg\");\r\nexport const ThunderstormsWhite = () => import(/* webpackChunkName: \"icon-assets-ThunderstormsWhite\" */\"@svgr/webpack?-svgo!../../icons/ThunderstormsWhite.svg\");\r\nexport const ThunderstormsV2 = () => import(/* webpackChunkName: \"icon-assets-ThunderstormsV2\" */\"@svgr/webpack?-svgo!../../icons/ThunderstormsV2.svg\");\r\nexport const TodaysEventsEmpty = () => import(/* webpackChunkName: \"icon-assets-TodaysEventsEmpty\" */\"@svgr/webpack?-svgo!../../icons/TodaysEventsEmpty.svg\");\r\nexport const TodaysEventsError = () => import(/* webpackChunkName: \"icon-assets-TodaysEventsError\" */\"@svgr/webpack?-svgo!../../icons/TodaysEventsError.svg\");\r\nexport const Traffic = () => import(/* webpackChunkName: \"icon-assets-Traffic\" */\"@svgr/webpack?-svgo!../../icons/Traffic.svg\");\r\nexport const TrafficCamera = () => import(/* webpackChunkName: \"icon-assets-TrafficCamera\" */\"@svgr/webpack?-svgo!../../icons/TrafficCamera.svg\");\r\nexport const Trending = () => import(/* webpackChunkName: \"icon-assets-Trending\" */\"@svgr/webpack?-svgo!../../icons/Trending.svg\");\r\nexport const Twitter = () => import(/* webpackChunkName: \"icon-assets-Twitter\" */\"@svgr/webpack?-svgo!../../icons/Twitter.svg\");\r\nexport const TwitterBlack = () => import(/* webpackChunkName: \"icon-assets-TwitterBlack\" */\"@svgr/webpack?-svgo!../../icons/TwitterBlack.svg\");\r\nexport const TwitterNoFill = () => import(/* webpackChunkName: \"icon-assets-TwitterNoFill\" */\"@svgr/webpack?-svgo!../../icons/TwitterNoFill.svg\");\r\nexport const TwitterText = () => import(/* webpackChunkName: \"icon-assets-TwitterText\" */\"@svgr/webpack?-svgo!../../icons/TwitterText.svg\");\r\nexport const Unpin = () => import(/* webpackChunkName: \"icon-assets-Unpin\" */\"@svgr/webpack?-svgo!../../icons/Unpin.svg\");\r\nexport const VerticalSeparator = () => import(/* webpackChunkName: \"icon-assets-VerticalSeparator\" */\"@svgr/webpack?-svgo!../../icons/VerticalSeparator.svg\");\r\nexport const Video = () => import(/* webpackChunkName: \"icon-assets-Video\" */\"@svgr/webpack?-svgo!../../icons/Video.svg\");\r\nexport const VideoFallback = () => import(/* webpackChunkName: \"icon-assets-VideoFallback\" */\"@svgr/webpack?-svgo!../../icons/VideoFallback.svg\");\r\nexport const Visio = () => import(/* webpackChunkName: \"icon-assets-Visio\" */\"@svgr/webpack?-svgo!../../icons/Visio.svg\");\r\nexport const Vkcom = () => import(/* webpackChunkName: \"icon-assets-Vkcom\" */\"@svgr/webpack?-svgo!../../icons/Vkcom.svg\");\r\nexport const Vsdx = () => import(/* webpackChunkName: \"icon-assets-Vsdx\" */\"@svgr/webpack?-svgo!../../icons/Vsdx.svg\");\r\nexport const WaterDrop = () => import(/* webpackChunkName: \"icon-assets-WaterDrop\" */\"@svgr/webpack?-svgo!../../icons/WaterDrop.svg\");\r\nexport const WaterDropL2 = () => import(/* webpackChunkName: \"icon-assets-WaterDropL2\" */\"@svgr/webpack?-svgo!../../icons/WaterDropL2.svg\");\r\nexport const WeatherAlert = () => import(/* webpackChunkName: \"icon-assets-WeatherAlert\" */\"@svgr/webpack?-svgo!../../icons/WeatherAlert.svg\");\r\nexport const WeatherAlertV2 = () => import(/* webpackChunkName: \"icon-assets-WeatherAlert\" */\"@svgr/webpack?-svgo!../../icons/WeatherAlertV2.svg\");\r\nexport const WeatherAQI = () => import(/* webpackChunkName: \"icon-assets-WeatherAQI\" */\"@svgr/webpack?-svgo!../../icons/WeatherAQI.svg\");\r\nexport const WeatherBarometer = () => import(/* webpackChunkName: \"icon-assets-WeatherBarometer\" */\"@svgr/webpack?-svgo!../../icons/WeatherBarometer.svg\");\r\nexport const WeatherCloud = () => import(/* webpackChunkName: \"icon-assets-WeatherCloud\" */\"@svgr/webpack?-svgo!../../icons/WeatherCloud.svg\");\r\nexport const WeatherDaylight = () => import(/* webpackChunkName: \"icon-assets-WeatherDaylight\" */\"@svgr/webpack?-svgo!../../icons/WeatherDaylight.svg\");\r\nexport const WeatherDewpoint = () => import(/* webpackChunkName: \"icon-assets-WeatherDewpoint\" */\"@svgr/webpack?-svgo!../../icons/WeatherDewpoint.svg\");\r\nexport const WeatherExpand = () => import(/* webpackChunkName: \"icon-assets-WeatherExpand\" */\"@svgr/webpack?-svgo!../../icons/WeatherExpand.svg\");\r\nexport const WeatherHumidity = () => import(/* webpackChunkName: \"icon-assets-WeatherHumidity\" */\"@svgr/webpack?-svgo!../../icons/WeatherHumidity.svg\");\r\nexport const WeatherIcon = () => import(/* webpackChunkName: \"icon-assets-WeatherIcon\" */\"@svgr/webpack?-svgo!../../icons/WeatherIcon.svg\");\r\nexport const WeatherMapPause = () => import(/* webpackChunkName: \"icon-assets-WeatherMapPause\" */\"@svgr/webpack?-svgo!../../icons/WeatherMapPause.svg\");\r\nexport const WeatherMapPlay = () => import(/* webpackChunkName: \"icon-assets-WeatherMapPlay\" */\"@svgr/webpack?-svgo!../../icons/WeatherMapPlay.svg\");\r\nexport const WeatherPrecipitation = () => import(/* webpackChunkName: \"icon-assets-WeatherPrecipitation\" */\"@svgr/webpack?-svgo!../../icons/WeatherPrecipitation.svg\");\r\nexport const WeatherSatellite = () => import(/* webpackChunkName: \"icon-assets-WeatherSatellite\" */\"@svgr/webpack?-svgo!../../icons/WeatherSatellite.svg\");\r\nexport const WeatherSunrise = () => import(/* webpackChunkName: \"icon-assets-WeatherSunrise\" */\"@svgr/webpack?-svgo!../../icons/WeatherSunrise.svg\");\r\nexport const WeatherSunset = () => import(/* webpackChunkName: \"icon-assets-WeatherSunset\" */\"@svgr/webpack?-svgo!../../icons/WeatherSunset.svg\");\r\nexport const WeatherTemperature = () => import(/* webpackChunkName: \"icon-assets-WeatherTemperature\" */\"@svgr/webpack?-svgo!../../icons/WeatherTemperature.svg\");\r\nexport const WeatherUv = () => import(/* webpackChunkName: \"icon-assets-WeatherUv\" */\"@svgr/webpack?-svgo!../../icons/WeatherUv.svg\");\r\nexport const WeatherVisiblity = () => import(/* webpackChunkName: \"icon-assets-WeatherVisiblity\" */\"@svgr/webpack?-svgo!../../icons/WeatherVisiblity.svg\");\r\nexport const WeatherWind = () => import(/* webpackChunkName: \"icon-assets-WeatherWind\" */\"@svgr/webpack?-svgo!../../icons/WeatherWind.svg\");\r\nexport const WeatherWildfire = () => import(/* webpackChunkName: \"icon-assets-WeatherWildfire\" */\"@svgr/webpack?-svgo!../../icons/WeatherWildfire.svg\");\r\nexport const WeatherWindDir = () => import(/* webpackChunkName: \"icon-assets-WeatherWindDir\" */\"@svgr/webpack?-svgo!../../icons/WeatherWindDir.svg\");\r\nexport const WeeklyAdsDark = () => import(/* webpackChunkName: \"icon-assets-WeeklyAdsDark\" */\"@svgr/webpack?-svgo!../../icons/WeeklyAdsDark.svg\");\r\nexport const WeeklyAdsLight = () => import(/* webpackChunkName: \"icon-assets-WeeklyAdsLight\" */\"@svgr/webpack?-svgo!../../icons/WeeklyAdsLight.svg\");\r\nexport const WhatsApp = () => import(/* webpackChunkName: \"icon-assets-WhatsApp\" */\"@svgr/webpack?-svgo!../../icons/WhatsApp.svg\");\r\nexport const WhatsAppBlack = () => import(/* webpackChunkName: \"icon-assets-WhatsAppBlack\" */\"@svgr/webpack?-svgo!../../icons/WhatsAppBlack.svg\");\r\nexport const Windy = () => import(/* webpackChunkName: \"icon-assets-Windy\" */\"@svgr/webpack?-svgo!../../icons/Windy.svg\");\r\nexport const WindyWhite = () => import(/* webpackChunkName: \"icon-assets-WindyWhite\" */\"@svgr/webpack?-svgo!../../icons/WindyWhite.svg\");\r\nexport const WindyV2 = () => import(/* webpackChunkName: \"icon-assets-WindyV2\" */\"@svgr/webpack?-svgo!../../icons/WindyV2.svg\");\r\nexport const Winterstorm = () => import(/* webpackChunkName: \"icon-assets-Winterstorm\" */\"@svgr/webpack?-svgo!../../icons/Winterstorm.svg\");\r\nexport const Word = () => import(/* webpackChunkName: \"icon-assets-Word\" */\"@svgr/webpack?-svgo!../../icons/Word.svg\");\r\nexport const World = () => import(/* webpackChunkName: \"icon-assets-World\" */\"@svgr/webpack?-svgo!../../icons/World.svg\");\r\nexport const Xlsx = () => import(/* webpackChunkName: \"icon-assets-Xlsx\" */\"@svgr/webpack?-svgo!../../icons/Xlsx.svg\");\r\nexport const Yammer = () => import(/* webpackChunkName: \"icon-assets-Yammer\" */\"@svgr/webpack?-svgo!../../icons/Yammer.svg\");\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { IClientSettings } from \"./ClientSettings\";\r\nimport { tryParseJson } from \"../utilities/Parsing\";\r\nimport { getLocalStorage } from \"../webstorage\";\r\n\r\n/**\r\n * The response from the HeadData API\r\n */\r\nexport interface HeadDataResponse {\r\n /** The client settings object. */\r\n clientSettings: IClientSettings;\r\n\r\n /** The info string, containing flights. */\r\n info: string;\r\n}\r\n\r\n/**\r\n * Gets the local storage key for the head data.\r\n * @param pagetype The page type of the page used as local storage cache key\r\n */\r\nexport function getStoredHeadDataKey(pagetype: string): string {\r\n return \"shd_\" + pagetype;\r\n}\r\n\r\n/**\r\n * Gets the stored head data, or null if none is stored.\r\n * @param pagetype The page type of the page used as local storage cache key\r\n * @return The stored head data if found, otherwise return null\r\n */\r\nexport function getStoredHeadData(pagetype: string): HeadDataResponse {\r\n const storageKey: string = getStoredHeadDataKey(pagetype);\r\n const storedHeadDataJson: string = getLocalStorage().getItem(storageKey);\r\n return (storedHeadDataJson) ? tryParseJson(storedHeadDataJson) : null;\r\n}\r\n\r\n/**\r\n * Sets the stored head data. Pass in null to clear the stored data.\r\n * @param pagetype The page type of the page used as local storage cache key\r\n * @param headDataResponse The head data response from api call to be set to local storage\r\n */\r\nexport function setStoredHeadData(pagetype: string, headDataResponse: HeadDataResponse) {\r\n const storageKey: string = getStoredHeadDataKey(pagetype);\r\n\r\n if (headDataResponse) {\r\n getLocalStorage().setItem(storageKey, JSON.stringify(headDataResponse));\r\n } else {\r\n getLocalStorage().removeItem(storageKey);\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { get, set } from \"lodash-es\";\r\n\r\nimport { ConnectorConstants } from \"../constants/ConnectorConstants\";\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\n\r\n/**\r\n * Maps the data connector name to the set of experience keys it is injected into.\r\n * The values include the \"._@STATE@_\" portion needed to pull experience state out of the app state object.\r\n */\r\nconst dataConnectorToExperienceKeyMap: Map> = new Map>();\r\n\r\n/**\r\n * Register a data connector to inject into an experience.\r\n * @param experienceFullNamespace The full namespace of the experience to inject into.\r\n * @param dataConnectorName The name for the data connector to inject.\r\n */\r\nfunction registerInjection(\r\n experienceFullNamespace: string,\r\n dataConnectorName: ConnectorNamespaces): void {\r\n let experienceSet: Set = dataConnectorToExperienceKeyMap.get(dataConnectorName);\r\n if (!experienceSet) {\r\n experienceSet = new Set();\r\n dataConnectorToExperienceKeyMap.set(dataConnectorName, experienceSet);\r\n }\r\n\r\n experienceSet.add(createStatePropertyKey(experienceFullNamespace));\r\n}\r\n\r\n/**\r\n * Initializes the shared data connector state for the given experience.\r\n * @param appState The global app state to modify.\r\n * @param experienceFullNamespace The full namespace of the experience to host the data connector state.\r\n * @param dataConnectorName The name of the data connector to use.\r\n */\r\nfunction initializeExperience(\r\n appState: any,\r\n experienceFullNamespace: string,\r\n dataConnectorName: ConnectorNamespaces): void {\r\n\r\n // Setup the key and get the actual state property for the connector. lodash uses dotted notation\r\n // so the key will be something like: namespace._@STATE@_\r\n const experienceStatePropertyKey = createStatePropertyKey(experienceFullNamespace);\r\n const connectorPreviousState = get(appState, experienceStatePropertyKey, undefined);\r\n\r\n // Find the initial data connector state\r\n const initialDataConnectorState = get(appState, createStatePropertyKey(dataConnectorName), undefined);\r\n\r\n // Create the new experience connector state\r\n const nextStateForConnector = { ...connectorPreviousState, [dataConnectorName]: initialDataConnectorState };\r\n set(appState, experienceStatePropertyKey, nextStateForConnector);\r\n}\r\n\r\n/**\r\n * Updates the data connector state on all experiences that include it.\r\n * @param appState The global app state object.\r\n * @param dataConnectorNamespace The namespace of the data connector that's been updated.\r\n * @param newDataConnectorState The new data connector state object.\r\n */\r\nfunction reportStateChange(\r\n appState: any,\r\n dataConnectorNamespace: string,\r\n newDataConnectorState: any): void {\r\n\r\n const experienceKeys: Set = dataConnectorToExperienceKeyMap.get(dataConnectorNamespace);\r\n if (experienceKeys) {\r\n for (const experienceKey of experienceKeys) {\r\n const experiencePreviousState: any = get(appState, experienceKey, undefined);\r\n\r\n if (experiencePreviousState) {\r\n set(appState, experienceKey, { ...experiencePreviousState, [dataConnectorNamespace]: newDataConnectorState });\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Creates the lodash property key to get or set the experience or data connector state.\r\n * @param fullNamespace The full namespace of the experience or data connector.\r\n */\r\nfunction createStatePropertyKey(fullNamespace: string): string {\r\n return fullNamespace + \".\" + ConnectorConstants.connectorStateKey;\r\n}\r\n\r\n/** Methods to support injecting data connector state into experiences */\r\nexport const dataConnectorInjector = {\r\n registerInjection,\r\n initializeExperience,\r\n reportStateChange\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ExperienceMilestoneEventTypes, MilestonePlugin } from \"./data-model\";\r\n\r\nimport { ActionMap } from \"@msnews/experiences-redux\";\r\nimport { ExperienceDeferralInfo } from \"./data-model/ExperienceDeferralInfo\";\r\nimport { ExperienceLoadingState } from \"./data-model/ExperienceLoadingState\";\r\n\r\n/**\r\n * Base arguments for all experience milestone updates\r\n */\r\nexport interface UpdateArgsBase {\r\n /** Experience Type - Defines an experience */\r\n experienceType: string;\r\n\r\n /** Associated Experience Group */\r\n experienceGroup?: string;\r\n\r\n /** Defines an instance of the Experience */\r\n experienceInstance?: string;\r\n}\r\n\r\nexport interface UpdateExperiencePublicStateArgs extends UpdateArgsBase {\r\n /** Current Milestone eventType of the experience e.g loaded, staleRevalidationComplete etc */\r\n eventType: ExperienceMilestoneEventTypes;\r\n}\r\n\r\nexport interface UpdateExperienceCurrentStateArgs extends UpdateArgsBase {\r\n /** Current Milestone of the experience e.g initialized, loaded, deferred etc */\r\n currentState: ExperienceLoadingState;\r\n}\r\n\r\nexport interface UpdateExperienceDeferralArgs extends UpdateArgsBase {\r\n /** Tracks deferral information used by an experience to determine when it should load/render */\r\n deferralInfo: ExperienceDeferralInfo;\r\n}\r\n\r\nexport interface UpdateTimingArgs extends UpdateArgsBase {\r\n /** start time fo the milestone e.g. startTime of loaded milestone */\r\n startTime?: number;\r\n\r\n /** end time fo the milestone e.g. endTime of loaded milestone */\r\n endTime?: number;\r\n}\r\n\r\nexport type UpdateExperienceCurrentStateSignature = (info: Array) => void;\r\n\r\nexport type UpdateExperiencePublicStateSignature = (args: UpdateExperiencePublicStateArgs) => void;\r\n\r\nexport type UpdateExperienceDeferralSignature = (info: Array) => void;\r\n\r\nexport type UpdateTimingSignature = (args: UpdateTimingArgs) => void;\r\n\r\nexport type UpdatePluginSignature = (\r\n /** Plugins to add additional behaviors in page lifecycle events */\r\n plugins: MilestonePlugin[]\r\n) => void;\r\n\r\nexport type UpdatePageTimingSignature = (time?: number) => void;\r\n\r\nexport type UpdatePageRevealStartSignature = (startTimeMs: number, wasHidden: boolean, visuallyReadyDependencies: string[]) => void;\r\n\r\nexport type UpdateBelowTheFoldTransitionSignature = (start?: boolean) => void;\r\n\r\ntype UpdateHydrationCompleteSignature = () => void;\r\n\r\ntype UpdateRiverHydrationCompleteSignature = () => void;\r\n\r\n/**\r\n * Actions for the Milestone Data Connector\r\n * @class\r\n */\r\nexport class MilestoneDataActionsImpl {\r\n\r\n /** Action to trigger hydration timing updates */\r\n public updateHydrationComplete: ActionMap\r\n = new ActionMap(\"updateHydrationRenderComplete\");\r\n\r\n /** Action to trigger River hydration timing updates */\r\n public updateRiverHydrationComplete: ActionMap\r\n = new ActionMap(\"updateRiverHydrationRenderComplete\");\r\n\r\n /** Action to trigger above the fold timing updates */\r\n public updateAboveTheFoldVisuallyReady: ActionMap\r\n = new ActionMap(\"updateAboveTheFoldVisuallyReady\");\r\n\r\n /** Action to trigger below the fold transition updates */\r\n public updateBelowTheFoldTransitionStart: ActionMap\r\n = new ActionMap(\"updateBelowTheFoldTransitionStart\");\r\n\r\n /** Action to trigger when deferring an experience load */\r\n public updateExperienceLoadDeferralState: ActionMap\r\n = new ActionMap(\"updateExperienceLoadDeferralState\");\r\n\r\n /** Action to trigger when updating current state of experience in load/render life-cycle */\r\n public updateExperienceCurrentState: ActionMap\r\n = new ActionMap(\"updateExperienceCurrentState\");\r\n\r\n /** Action to trigger when updating current state of experience through publicly exposed MilestoneExperienceEventTypes */\r\n public updateExperiencePublicState: ActionMap\r\n = new ActionMap(\"updateExperiencePublicState\");\r\n\r\n /** Action to trigger when deferring an experience render */\r\n public updateExperienceRenderDeferralState: ActionMap\r\n = new ActionMap(\"updateExperienceRenderDeferralState\");\r\n\r\n /** Action to trigger when experience load initiates */\r\n public updateInitTiming: ActionMap\r\n = new ActionMap(\"UpdateInitTiming\");\r\n\r\n /** Action to trigger page complete timing updates */\r\n public updatePageComplete: ActionMap\r\n = new ActionMap(\"updatePageCompleteTiming\");\r\n\r\n /** Action to trigger page complete timing updates */\r\n public updatePageRevealStart: ActionMap\r\n = new ActionMap(\"updatePageRevealStart\");\r\n\r\n /** Action to trigger page complete timing updates */\r\n public updatePageRevealComplete: ActionMap\r\n = new ActionMap(\"updatePageRevealComplete\");\r\n\r\n /** Action to trigger when experience instance completed render */\r\n public updateRenderTiming: ActionMap\r\n = new ActionMap(\"UpdateRenderTiming\");\r\n\r\n /** Action to trigger when experience instance is visually ready */\r\n public updateVisuallyReadyTiming: ActionMap\r\n = new ActionMap(\"UpdateVisuallyReadyTiming\");\r\n\r\n /** Action to trigger when experience instance starts loading */\r\n public updateStartLoadingTiming: ActionMap\r\n = new ActionMap(\"UpdateStartLoadingTiming\");\r\n\r\n /** Action to trigger when experience instance is DOM complete */\r\n public updateDomCompleteTiming: ActionMap\r\n = new ActionMap(\"UpdateDomCompleteTiming\");\r\n\r\n /** Action to trigger when adding/updating milestone plugin */\r\n public updateMilestonePlugins: ActionMap\r\n = new ActionMap(\"updateMilestonePlugin\");\r\n\r\n /** Reset the static instance. Useful when server side rendering. */\r\n public resetInstance(): void {\r\n\r\n this.updateHydrationComplete.unregisterObservers();\r\n this.updateRiverHydrationComplete.unregisterObservers();\r\n this.updateAboveTheFoldVisuallyReady.unregisterObservers();\r\n this.updateBelowTheFoldTransitionStart.unregisterObservers();\r\n this.updateExperienceLoadDeferralState.unregisterObservers();\r\n this.updateExperienceCurrentState.unregisterObservers();\r\n this.updateExperiencePublicState.unregisterObservers();\r\n this.updateExperienceRenderDeferralState.unregisterObservers();\r\n this.updateInitTiming.unregisterObservers();\r\n this.updatePageComplete.unregisterObservers();\r\n this.updatePageRevealStart.unregisterObservers();\r\n this.updatePageRevealComplete.unregisterObservers();\r\n this.updateRenderTiming.unregisterObservers();\r\n this.updateVisuallyReadyTiming.unregisterObservers();\r\n this.updateDomCompleteTiming.unregisterObservers();\r\n this.updateMilestonePlugins.unregisterObservers();\r\n\r\n MilestoneDataActions = new MilestoneDataActionsImpl();\r\n }\r\n}\r\n\r\n/** The singleton instance */\r\nexport let MilestoneDataActions = new MilestoneDataActionsImpl();","// © Microsoft Corporation. All rights reserved.\r\n/**\r\n * Defines valid loading states for an experience\r\n * The state has been defined as it happens. Please do not update the ordering or the numeric value of states.\r\n * If the numeric value of the state is updated this will break internal logic.\r\n */\r\nexport enum ExperienceLoadingState {\r\n\r\n /**\r\n * The experience has not been started yet\r\n */\r\n notStarted = 1,\r\n\r\n /**\r\n * The experience loading has been deferred\r\n */\r\n loadDeferred = 2,\r\n\r\n /**\r\n * The experience is coming out of loadDeferred state and is now resolved to be loaded.\r\n */\r\n resolvedForLoad = 3,\r\n\r\n /**\r\n * The experience has been loaded (i.e. the bundle has been downloaded and parsed, and the connector created)\r\n */\r\n loaded = 4,\r\n\r\n /**\r\n * The experience initialized milestone has been reached\r\n */\r\n initialized = 5,\r\n\r\n /**\r\n * The experience render has been deferred\r\n */\r\n renderDeferred = 6,\r\n\r\n /**\r\n * The experience is coming out of renderDeferred state and is now resolved to be rendered.\r\n */\r\n resolvedForRender = 7,\r\n\r\n /**\r\n * The experience rendered milestone has been reached (render function has been completed)\r\n */\r\n rendered = 8,\r\n\r\n /**\r\n * The experience DOM complete milestone has been reached\r\n */\r\n domComplete = 10,\r\n\r\n /**\r\n * The initial render of the experience has completed. All initial DOM elements have been created, and the browser has completed all render\r\n * task (applying styles, animations, etc)\r\n */\r\n visuallyReady = 11,\r\n\r\n /**\r\n * The experience encountered an error during loading\r\n */\r\n error = 12,\r\n\r\n /**\r\n * The experience has completed the revalidation of stale state.\r\n */\r\n staleRevalidationComplete = 13,\r\n\r\n /**\r\n * The experience starts loading\r\n */\r\n startLoading = 14,\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * An enumeration of global / fixed connector namespaces\r\n * Only name spaces that are constant (i.e. not instanced) for the entire SPA lifetime should be listed here\r\n * NOTE: Keep this list alphabetical\r\n * NOTE: Left/Right side need to match\r\n */\r\nexport enum ConnectorNamespaces {\r\n AdminPortalData = \"AdminPortalData\",\r\n AdService = \"AdService\",\r\n AdsManager = \"AdsManager\",\r\n BingImageData = \"BingImageData\",\r\n CategoryData = \"CategoryData\",\r\n ChromiumPageSettings = \"ChromiumPageSettings\",\r\n CoachmarkData = \"CoachmarkData\",\r\n DailyBriefServiceClient = \"DailyBriefServiceClient\",\r\n DisplayAdsManager = \"DisplayAdsManager\",\r\n ExperienceLoadedData = \"ExperienceLoadedData\",\r\n ExperienceLoadedDataConnector = \"ExperienceLoadedDataConnector\",\r\n ExperienceTrackerCommunityData = \"ExperienceTrackerCommunityData\",\r\n ExperienceTrackerData = \"ExperienceTrackerData\",\r\n ExperienceTrackerEdgeData = \"ExperienceTrackerEdgeData\",\r\n ExperienceTrackerEdgeNextData = \"ExperienceTrackerEdgeNextData\",\r\n ExperienceTrackerFinanceData = \"ExperienceTrackerFinanceData\",\r\n ExperienceTrackerFirstPartyData = \"ExperienceTrackerFirstPartyData\",\r\n ExperienceTrackerHomePageData = \"ExperienceTrackerHomePageData\",\r\n ExperienceTrackerHubData = \"ExperienceTrackerHubData\",\r\n ExperienceTrackerMicrosoftNewsData = \"ExperienceTrackerMicrosoftNewsData\",\r\n ExperienceTrackerMMXData = \"ExperienceTrackerMMXData\",\r\n ExperienceTrackerOfficeData = \"ExperienceTrackerOfficeData\",\r\n ExperienceTrackerShoppingData = \"ExperienceTrackerShoppingData\",\r\n ExperienceTrackerTrafficData = \"ExperienceTrackerTrafficData\",\r\n ExperienceTrackerUgcData = \"ExperienceTrackerUgcData\",\r\n ExperienceTrackerViewsData = \"ExperienceTrackerViewsData\",\r\n ExperienceTrackerWeatherData = \"ExperienceTrackerWeatherData\",\r\n ExperienceTrackerWeatherDataConnector = \"ExperienceTrackerWeatherDataConnector\",\r\n ExperienceTrackerWindowsDashboardData = \"ExperienceTrackerWindowsDashboardData\",\r\n ExperienceTrackerWindowsData = \"ExperienceTrackerWindowsData\",\r\n ExperienceTrackerWindowsShellData = \"ExperienceTrackerWindowsShellData\",\r\n FeedbackData = \"FeedbackData\",\r\n HubPageSettings = \"HubPageSettings\",\r\n IrisData = \"IrisData\",\r\n LayoutPreferenceData = \"LayoutPreferenceData\",\r\n LocationFeed = \"LocationFeed\",\r\n MarketSelector = \"MarketSelector\",\r\n MilestoneData = \"MilestoneData\",\r\n MsccCookieBannerData = \"MsccCookieBannerData\",\r\n MsNewsPageSettings = \"MsNewsPageSettings\",\r\n NavigationData = \"NavigationData\",\r\n OfficeSharedData = \"OfficeSharedData\",\r\n OneServiceContent = \"OneServiceContent\",\r\n OneTrustCookieConsentData = \"OneTrustCookieConsentData\",\r\n PageClickTrackerData = \"PageClickTrackerData\",\r\n PageLayout = \"PageLayout\",\r\n PageSettingsData = \"PageSettingsData\",\r\n PlacementManager = \"PlacementManager\",\r\n PoweredByData = \"PoweredByData\",\r\n Preload = \"Preload\",\r\n RewardsData = \"RewardsData\",\r\n SharedState = \"SharedState\",\r\n SportsData = \"SportsData\",\r\n Telemetry = \"Telemetry\",\r\n ShellNewTabData = \"ShellNewTabData\",\r\n SmartListSharedData = \"SmartListSharedData\",\r\n TelemetryData = \"TelemetryData\",\r\n TelemetryDataEdgeChromium = \"TelemetryDataEdgeChromium\",\r\n TelemetryEdgeChromium = \"TelemetryEdgeChromium\",\r\n TopicData = \"TopicData\",\r\n TopSitesLayoutData = \"TopSitesLayoutData\",\r\n VerticalPropertyData = \"VerticalPropertyData\",\r\n VideoDataManager = \"VideoDataManager\",\r\n ViewsNativeAd = \"ViewsNativeAdConnector\",\r\n ViewsFullPage = \"ViewsFullPage\",\r\n WeatherData = \"WeatherData\",\r\n FinanceData = \"FinanceData\",\r\n SocialData = \"SocialData\",\r\n WindowsDashboardData = \"WindowsDashboardData\",\r\n WindowsShellData = \"WindowsShellData\",\r\n WindowsPageSettings = \"WindowsPageSettings\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./AppEnvironment\";\r\nexport * from \"./ClientSettings\";\r\nexport * from \"./Market\";\r\nexport * from \"./HeadData\";\r\nexport * from \"./HostPage\";\r\nexport * from \"./Environment\";\r\nexport * from \"./PageRequestTargetScope\";\r\nexport * from \"./ScreenWidth\";\r\nexport * from \"./Enterprise\";\r\nexport * from \"./StoredHeadData\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Aad data formatted from browser response\r\n */\r\nexport type AadData = {\r\n /**\r\n * Access token\r\n */\r\n token?: string;\r\n\r\n /**\r\n * Any error info\r\n */\r\n errorInfo?: AadErrorInfo;\r\n\r\n /**\r\n * Flag to indicate if call was successful\r\n */\r\n isSuccess?: boolean;\r\n\r\n /**\r\n * Flag to indicate if token is valid\r\n */\r\n isValid?: boolean;\r\n\r\n /**\r\n * Status for the authentication\r\n */\r\n status: AccessTokenStatus;\r\n};\r\n\r\n/**\r\n * Error info from aad request\r\n */\r\nexport type AadErrorInfo = {\r\n /**\r\n * Error string\r\n */\r\n error_string?: string;\r\n\r\n /**\r\n * Platform error code\r\n */\r\n platform_error_code?: number;\r\n\r\n /**\r\n * Primary error code\r\n */\r\n primary_error?: number;\r\n\r\n /**\r\n * Secondary error code\r\n */\r\n secondary_error?: number;\r\n\r\n /**\r\n * Internal error code for auth issues not handled by auth api\r\n */\r\n internal_error_code?: number;\r\n};\r\n\r\n/**\r\n * Account info\r\n */\r\nexport type AccountInfo = {\r\n /**\r\n * Account id\r\n */\r\n account_id?: string;\r\n\r\n /**\r\n * Account type\r\n */\r\n account_type?: string;\r\n\r\n /**\r\n * Tenant id\r\n */\r\n tenant_id?: string;\r\n\r\n /**\r\n * First name\r\n */\r\n first_name?: string;\r\n\r\n /**\r\n * Last name\r\n */\r\n last_name?: string;\r\n\r\n /**\r\n * Region/scope of customer's cloud environment\r\n */\r\n region_scope?: RegionScope;\r\n\r\n /**\r\n * Object ID\r\n */\r\n oid?: string;\r\n};\r\n\r\nexport enum RegionScope {\r\n /** Global cloud user */\r\n GLOBAL = \"GLOBAL\",\r\n /** GCC Moderate user */\r\n GCC_MODERATE = \"GCC_MODERATE\"\r\n}\r\n\r\nexport enum AccessTokenStatus {\r\n success,\r\n mfaRequired,\r\n otherError\r\n}\r\n\r\n/**\r\n * The client id of our application\r\n */\r\nexport const clientId = \"d7b530a4-7680-4c23-a8bf-c52c121d2e87\";\r\n\r\n/**\r\n * The scope/resource id for enterprise One Service\r\n */\r\nexport const oneServiceScope = \"https://enterprisenews.microsoft.com\";\r\n\r\n/**\r\n * The friendly name for the scope/resource for Enterprise One Service to be used\r\n * in logging.\r\n */\r\nexport const oneServiceFriendlyName = \"OneService\";\r\n\r\n/**\r\n * Edge Chromium version including and after which the blended ntp experience is available\r\n */\r\nexport const eNtpChromiumVersion = 87;","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { minimumHostPagePathSegments } from \"../constants\";\r\n\r\n/**\r\n * The HostPage interface uses words defined by the Prime project for us to locate in what hostpage\r\n * the Feeds project is running.\r\n */\r\nexport interface IHostPage {\r\n originalUrl: string; // ex: https://www.msn.com/spartan/ntp/interests/my?fdhead=gizmodemo\r\n verticalKey: string, // ex: spartan or compass\r\n categoryKey: string, // ex: dhp or ntp\r\n hostName: string, // ex: www.msn.com\r\n topDomain: string, // ex: msn.com or msn.cn\r\n subcategoryKey?: string // ex: interests or discover\r\n}\r\n\r\nexport namespace HostPage {\r\n /**\r\n * This function extracts the hostPage information from the passed in href. This is based on the\r\n * Prime pathname convention of \"/vertical/category/subcategory\". If the passed href does not have at least the\r\n * category, then null is returned instead as this is considered an invalid URL.\r\n * @param {string} href - The URL, which will be used to extract the hostPage\r\n * @returns {IHostPage | null}\r\n */\r\n export function getHostPageFromUrl(href: string): IHostPage | null {\r\n if (!href) { return; }\r\n const url = new URL(href);\r\n\r\n const host = url.hostname;\r\n const pathnameSegments = url.pathname.split(\"/\");\r\n\r\n // for cookie stamping that needs the msn.com or msn.cn path isntead of using the full host value\r\n const topDomainName = (host.match(/[^.]+\\.[^.\\d]+$/) || {})[0] || \"\";\r\n\r\n /**\r\n * The + 1 in the following statement is take into account the empty string \"segment\"\r\n * that would be to the left of the first backslash in a valid path like \"/spartan/ntp\"\r\n */\r\n if (pathnameSegments.length <= minimumHostPagePathSegments) {\r\n return {\r\n originalUrl: href,\r\n categoryKey: null,\r\n verticalKey: null,\r\n hostName: host,\r\n topDomain: topDomainName\r\n }; // When the user url doesn't have atleast two pathsegments the vertical and category keys are null\r\n }\r\n\r\n /**\r\n * Consider path segments that have market in it e.g.\r\n * /en-us/news/other/title/ar-cmsId\r\n * /en-us/video/animals\r\n * /en-us/sports/nfl/scores\r\n */\r\n const isMarketPresent = pathnameSegments[1].length === 5 && pathnameSegments[1].split(\"-\").length === 2;\r\n const indexOffset = isMarketPresent ? 1 : 0;\r\n\r\n const hostPage: IHostPage = {\r\n originalUrl: href,\r\n categoryKey: pathnameSegments[2 + indexOffset],\r\n verticalKey: pathnameSegments[1 + indexOffset],\r\n hostName: host,\r\n topDomain: topDomainName\r\n };\r\n\r\n if (pathnameSegments.length >= minimumHostPagePathSegments) {\r\n hostPage.subcategoryKey = pathnameSegments[3 + indexOffset];\r\n }\r\n return hostPage;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport enum Market {\r\n BR = \"pt-br\",\r\n DEDE = \"de-de\",\r\n ENCA = \"en-ca\",\r\n ENGB = \"en-gb\",\r\n ENUS = \"en-us\",\r\n ESMX = \"es-mx\",\r\n FRCA = \"fr-ca\",\r\n FRFR = \"fr-fr\",\r\n IN = \"en-in\",\r\n JAJP = \"ja-jp\",\r\n PTBR = \"pt-br\",\r\n KOKR = \"ko-kr\",\r\n ZHCN = \"zh-cn\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Helper to promisify the Prime 'require' AMD helper to resolve a single module with no dependencies.\r\n * @param moduleName {string} - the name of the module to resolve\r\n * @param defaultModule {TModule} - the default module implementation if require is not available.\r\n * @returns {Promise{TModule}} a promise that will resolve the module when it's available.\r\n * @description Note that this version only resolves a single module with no dependencies.\r\n */\r\nexport async function requireAsync(moduleName: string, defaultModule?: TModule): Promise {\r\n return new Promise((resolve: (module: TModule) => void, reject) => {\r\n\r\n if (typeof window.require === \"function\") {\r\n window.require([moduleName], resolve);\r\n } else if (defaultModule) {\r\n console.error(`require was not available. Returning default implementation for ${moduleName}`);\r\n resolve(defaultModule);\r\n } else {\r\n reject(\"require is not available\");\r\n }\r\n });\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Enum for different auth cookie names\r\n * @enum\r\n */\r\nexport enum AuthCookieName {\r\n Anon = \"ANON\",\r\n AppAnon = \"APP_ANON\",\r\n Unknown = \"\"\r\n}\r\n\r\n/**\r\n * List of http-readable cookies that indicate the presence of an auth cookie\r\n */\r\nexport enum AuthCookieExistsCookieName {\r\n AnonCookieExists = \"ace\",\r\n AppAnonCookieExists = \"aace\"\r\n}\r\n\r\n/**\r\n * Original source is Constants.ts\r\n * Child cookie name, used to signal if rpsUser is child account.\r\n */\r\nexport const childCookieName = \"child\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n// todo: Deliverable 29531401: [Client] Move client-data-settings to a separate library to avoid importing core library\r\n// Remove these and import from common library once the above deliverable is completed.\r\n\r\n/**\r\n * Checks if the DOM is available to access and use.\r\n * @returns {boolean} - true if DOM is available, or false if it is not. This is typically true for\r\n * client side rendering and false for server side rendering.\r\n */\r\nexport function canUseDOM(): boolean {\r\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\r\n}\r\n\r\n/**\r\n * Return true if html has app cache enabled\r\n */\r\nexport function isAppCache() {\r\n if (canUseDOM() && window.applicationCache) {\r\n const htmlElement = window.document.getElementsByTagName(\"html\")[0];\r\n return htmlElement.getAttribute(\"manifest\");\r\n }\r\n\r\n return false;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { isAppCache } from \"./Utilities\";\r\n\r\n// todo: Deliverable 29531401: [Client] Move client-data-settings to a separate library to avoid importing core library\r\n// Import common functions from the new library once the above deliverable is completed.\r\n\r\nlet clientSettings: ClientSettings;\r\nlet currentFlights: string;\r\n\r\n/** The client settings object. */\r\nexport interface ClientSettings {\r\n /** The name of the app */\r\n apptype: string;\r\n\r\n /** The name of the page */\r\n pagetype: string;\r\n\r\n /** The activity ID */\r\n aid: string;\r\n\r\n /** The PCS page generation time in ISO 8601 format, UTC. */\r\n pageGenTime?: string;\r\n\r\n /** Information about the JS bundles we are running. */\r\n bundleInfo: {\r\n /** The build number for the JS bundles. */\r\n v: string;\r\n }\r\n\r\n /** Information about PCS that created the page. */\r\n pcsInfo: {\r\n /** The environment we are on */\r\n env: string;\r\n\r\n /** The build number for PCS. */\r\n v: string;\r\n }\r\n}\r\n\r\n/**\r\n * Gets the client settings object.\r\n */\r\nexport function getPageSettings(): ClientSettings {\r\n if (!clientSettings) {\r\n const settingsJson: string = document.head.getAttribute(\"data-client-settings\");\r\n if (settingsJson) {\r\n clientSettings = JSON.parse(settingsJson);\r\n }\r\n }\r\n\r\n return clientSettings;\r\n}\r\n\r\n/**\r\n * Extract eligible flight ids from head data.\r\n * @returns string of flight ids.\r\n */\r\nexport function getCurrentFlights(): string {\r\n if (currentFlights) {\r\n return currentFlights;\r\n }\r\n\r\n let clientInfo = document.head.getAttribute(\"data-info\");\r\n const clientSettings = getPageSettings();\r\n\r\n // If page is possibly app cached, check the updated head data if available.\r\n // Use flights from stored head data if they aren't too old.\r\n // This logic is similiar to initializeFromStorage from HeadData\r\n // except we have to do it first in the inline script to get the flight ids.\r\n if (isAppCache()) {\r\n let storedHeadData;\r\n try {\r\n const storedHeadDataString = window.localStorage.getItem(\"shd_\" + clientSettings.pagetype);\r\n storedHeadData = JSON.parse(storedHeadDataString);\r\n } catch {\r\n storedHeadData = null;\r\n }\r\n\r\n if (storedHeadData) {\r\n const responseClientSettings = storedHeadData.clientSettings;\r\n const responseFlights = storedHeadData.info;\r\n\r\n // The stored head data is corrupt, bail\r\n if (responseClientSettings && responseFlights) {\r\n\r\n // If DOM page gen time is later than response page gen time, bail. We don't want to load stale head data from storage.\r\n if (clientSettings.pageGenTime < responseClientSettings.pageGenTime) {\r\n // Use the new flights from stored head data\r\n clientInfo = responseFlights;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Create array from comma separated list of flights enabled in current request.\r\n currentFlights = ((/f:\\s*([^;]+)/i.exec(clientInfo) || {})[1] || \"\").toLowerCase();\r\n\r\n return currentFlights;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ClientSettings, getCurrentFlights, getPageSettings } from \"./PageSettings\";\r\n\r\nimport { getCookieInline } from \"@msnews/core\";\r\n\r\n/** Declared cookie consent required function on PCS side. */\r\nexport declare function getCookieConsentRequired(): boolean;\r\n\r\nlet loggingEndpoint;\r\nconst Product = {\r\n mmx: \"emmx\",\r\n edge: \"spartan\",\r\n edgeChromium: \"anaheim\",\r\n hybrid: \"spartan\",\r\n hub: \"prime\",\r\n microsoftNews: \"msnews\",\r\n office: \"entnews\"\r\n};\r\n\r\n/**\r\n * Logs error to the given endpoint (e.g. otf). ONLY USE FROM INLINE SCRIPTS.\r\n * @param message - The error message\r\n * @param appErrorId - The app error id to be logged\r\n * @param propertyBag - The blob to store additional error information\r\n */\r\nexport function logError(message: string, appErrorId: number, propertyBag: any): void {\r\n try {\r\n const settingsObject: ClientSettings = getPageSettings();\r\n const flightIds: string = getCurrentFlights();\r\n const params: object = getLoggingParameters(settingsObject);\r\n\r\n let iKey = \"\";\r\n if (params && params[\"apikey\"] && params[\"apikey\"] !== \"\") {\r\n iKey = getIKeyValue(params[\"apikey\"]);\r\n }\r\n\r\n const payload: string = getLoggingPayload(appErrorId, message, settingsObject, iKey, propertyBag, flightIds);\r\n if (params && payload) {\r\n console.error(payload);\r\n\r\n const url: string = \"https://\" + loggingEndpoint + \"/OneCollector/1.0\" + formatParams(params);\r\n navigator.sendBeacon(url, payload); // fire and forget\r\n } else {\r\n console.log(\"missing parameters in data-client-settings. \" + message);\r\n }\r\n } catch {\r\n console.log(\"error logging the app error. \" + message);\r\n }\r\n}\r\n\r\n/**\r\n * Gets data to set the logging parameters\r\n * @param settingsObject - The object containing client settings\r\n */\r\nfunction getLoggingParameters(settingsObject: ClientSettings): object {\r\n if (settingsObject) {\r\n const { pcsInfo, pageGenTime } = settingsObject;\r\n const uploadTime = new Date(pageGenTime).getTime();\r\n const isProd: boolean = !pcsInfo || pcsInfo.env === \"prod\";\r\n\r\n // JSLL endpoints\r\n loggingEndpoint = isProd ? \"browser.events.data.msn.com\" : \"events-sandbox.data.msn.com\";\r\n const apikey = isProd\r\n ? \"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279\"\r\n : \"f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028\";\r\n\r\n return {\r\n cors: \"true\",\r\n \"content-type\": \"application/x-json-stream\",\r\n \"client-id\": \"NO_AUTH\",\r\n \"client-version\": \"1DS-Web-JS-2.2.2\",\r\n apikey: apikey,\r\n \"upload-time\": uploadTime,\r\n w: \"0\",\r\n anoncknm: \"app_anon\"\r\n };\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Gets data to set the logging payload\r\n * @param appErrorId - The app error id to be logged\r\n * @param message - The error message\r\n * @param iKey - The key for authenticating on 1DS endpoint\r\n * @param propertyBag - The blob to store additional error information\r\n * @param flightIds - The flight ids\r\n */\r\nfunction getLoggingPayload(appErrorId: number, message: string, settingsObject: ClientSettings, iKey: string, propertyBag: any, flightIds: string): string {\r\n if (settingsObject) {\r\n propertyBag = propertyBag || {};\r\n const { apptype, pagetype, pageGenTime, bundleInfo } = settingsObject;\r\n\r\n propertyBag.pageGenTime = pageGenTime;\r\n propertyBag.build = bundleInfo && bundleInfo.v;\r\n\r\n const pageProduct = Product[apptype] ? Product[apptype] : apptype;\r\n const source = apptype + \"-\" + pagetype;\r\n const market = document.getElementsByTagName(\"html\")[0].getAttribute(\"lang\");\r\n\r\n let muid = \"\";\r\n try {\r\n const isCookieConsentRequired: boolean = getCookieConsentRequired && typeof getCookieConsentRequired === \"function\" && getCookieConsentRequired();\r\n if (!isCookieConsentRequired) {\r\n muid = getCookieInline(\"muid\");\r\n }\r\n } catch {\r\n console.log(\"error fetching muid.\");\r\n }\r\n\r\n // Setting RID=AID might not be correct. The more complex logic in the bundles may determine that we have already burned this as a RID\r\n // and generate a new one different from AID. But it's better than nothing and we cannot see AID on app error reports right now.\r\n // Most of the time when we are not using app cache these two will be the same.\r\n const payload = {\r\n name: \"MS.News.Web.AppError\",\r\n time: pageGenTime,\r\n ver: \"4.0\",\r\n iKey: `o:${iKey}`,\r\n data: {\r\n baseData: {},\r\n baseType: \"MS.News.Web.Base\",\r\n page: {\r\n name: \"default\",\r\n product: pageProduct,\r\n type: pagetype\r\n },\r\n browser: {\r\n clientId: muid\r\n },\r\n flight: {\r\n id: flightIds\r\n },\r\n request: {\r\n activityId: settingsObject.aid,\r\n requestId: settingsObject.aid\r\n },\r\n locale: {\r\n mkt: market\r\n },\r\n extSchema: {\r\n id: appErrorId,\r\n source: source,\r\n severity: 0,\r\n pb: propertyBag,\r\n message: message\r\n }\r\n }\r\n };\r\n\r\n return payload ? JSON.stringify(payload) : null;\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Format query string parameters\r\n * @param params - The logging params\r\n */\r\nfunction formatParams(params: object): string {\r\n return \"?\" + Object\r\n .keys(params)\r\n .map(function (key: string): string {\r\n return key + \"=\" + encodeURIComponent(params[key]);\r\n }).join(\"&\");\r\n}\r\n\r\n/**\r\n * Extracts the value of iKey from apikey\r\n * @param apikey - The value of apikey for 1DS authentication\r\n */\r\nexport function getIKeyValue(apikey: string): string {\r\n\r\n if (apikey) {\r\n const iKeyIndex = apikey.indexOf(\"-\");\r\n if (iKeyIndex > 0) {\r\n return apikey.substring(0, iKeyIndex);\r\n }\r\n }\r\n\r\n return \"\";\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { assign, get, merge, set } from \"lodash-es\";\r\n\r\nimport { ConnectorConstants } from \"../constants/ConnectorConstants\";\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\nimport { IActionPayload } from \"./IActionPayload\";\r\nimport { IDataConnector } from \"../connectors/IDataConnector\";\r\nimport { IReducer } from \"./IReducer\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\nimport { dataConnectorInjector } from \"./DataConnectorInjector\";\r\nimport { reportDataConnectorStateChange } from \"./DataConnectorTracker\";\r\nimport { isNullOrUndefined } from \"util\";\r\nimport { logError } from \"@msnews/page-error-handling\";\r\n\r\n/** Resolve & Reject Function Signature */\r\ntype ResolveConnectorSignature = (connector: IDataConnector) => void;\r\ntype RejectConnectorSignature = (error: Error) => void;\r\n\r\n/**\r\n * Pending getDataConnector Promise\r\n */\r\ninterface PendingConnectorPromise {\r\n /** Promise */\r\n promise: Promise>;\r\n /** callback to resolve the promise */\r\n resolve: ResolveConnectorSignature;\r\n /** callback to reject the promise */\r\n reject: RejectConnectorSignature;\r\n}\r\n\r\n/** Result from running a reducer. */\r\ninterface ReducerResult {\r\n /** The new state calculated by the reducer */\r\n newState: any;\r\n\r\n /** True if the state changed. */\r\n stateChanged: boolean;\r\n}\r\n\r\n/**\r\n * A reducer that can dynamically add and remove individual sub-reducers\r\n * @class\r\n */\r\nexport class DynamicReducer {\r\n\r\n /**\r\n * A map of connectors, which maintain the sub-spaced state. Reducers and connectors are keyed by namespace\r\n */\r\n private readonly _connectorMap: {[key: string]: IDataConnector} = {};\r\n\r\n /**\r\n * The list of global connectors. Used for fast lookup instead of iterating through _connectorMap keys and toArray methods.\r\n */\r\n private readonly _globalConnectors: IDataConnector[] = [];\r\n\r\n /**\r\n * The list of all connectors. Used for fast lookup instead of iterating through _connectorMap keys and toArray methods.\r\n */\r\n private readonly _allConnectors: IDataConnector[] = [];\r\n\r\n /**\r\n * The list of all pending promises for the get data connector call. Used to resolve the promise when data connector is instantiated.\r\n */\r\n private readonly _getDataConnectorPendingPromises: Map = new Map();\r\n\r\n /**\r\n * Creates an instance of the `DynamicReducer` class.\r\n * @constructor\r\n * @param {string} type The action type.\r\n */\r\n constructor() {\r\n // bind the reduce method to this instance\r\n this.reduce = this.reduce.bind(this);\r\n }\r\n\r\n /**\r\n * Returns an array of connectors that have their reducers registered with this instance\r\n * @method\r\n * @returns {IDataConnector} A simple arry of all connectors\r\n */\r\n public connectors(): IDataConnector[] {\r\n return this._allConnectors;\r\n }\r\n\r\n /**\r\n * Returns an array of connectors that have their reducers registered with this instance\r\n * @method\r\n * @param {string} namespace The namespace of the connector to return, if it is in the map\r\n * @returns {IDataConnector | undefined} A simple arry of all connectors\r\n */\r\n public connector(namespace: string): IDataConnector | undefined {\r\n return (this._connectorMap[namespace]);\r\n }\r\n\r\n /**\r\n * Returns an array of connectors that have state that is global\r\n * @method\r\n * @returns {IDataConnector} A simple arry of connectors that have global state\r\n */\r\n public globalConnectors(): IDataConnector[] {\r\n return this._globalConnectors;\r\n }\r\n\r\n /**\r\n * Returns a promise which resolves immediately if the data connector is already present on the page,\r\n * otherwise resolves when the data connector is instantiated on the Page later in the lifecycle.\r\n * @method\r\n * @param namespace The namespace of data connector to return\r\n */\r\n public getDataConnector(namespace: ConnectorNamespaces): Promise> {\r\n // Check for data connector, if it is already present resolve immediately\r\n const dataConnector = this.connector(namespace);\r\n if (dataConnector) {\r\n return Promise.resolve(dataConnector);\r\n }\r\n\r\n // Check if we have an entry for the namespace in pending promise map, if present return the same promise\r\n const pendingPromise = this._getDataConnectorPendingPromises.get(namespace);\r\n if (pendingPromise) {\r\n return pendingPromise.promise;\r\n }\r\n\r\n // If the data connector is not on the page and has no entry in the pending promise map, create a new promise\r\n let resolveCallback: ResolveConnectorSignature;\r\n let rejectCallback: RejectConnectorSignature;\r\n const promise = new Promise>((resolve, reject) => {\r\n // Get the reference to the resolve & reject which can be called later when the data connector is instantiated on the Page\r\n resolveCallback = resolve;\r\n rejectCallback = reject;\r\n });\r\n\r\n // Add the promise to the pending promise map\r\n this._getDataConnectorPendingPromises.set(namespace, { promise: promise, resolve: resolveCallback, reject: rejectCallback });\r\n\r\n // Return the promise\r\n return promise;\r\n }\r\n\r\n /**\r\n * Produces the next state based on the given action. The state to be reduced is an aggregate of the reducers for all of the connectors\r\n * that have been added.\r\n * The overall state looks something like:\r\n * This will be the state for the redux-subspace for the connector. It is of the form:\r\n * {\r\n * FOO: {\r\n * _@STATE@_: {\r\n * \r\n * },\r\n * BAR: {\r\n * _@STATE@_: {\r\n * \r\n * },\r\n * },\r\n * }\r\n * }\r\n * @function\r\n * @param state {any} The previous state of the application. The application state, will contain one or more sub-states, which will be individually reduced\r\n * @param actionPayload {IActionPayload} The action detail to update the state with.\r\n * @returns {any} The next state for the application, containing the next state for each connector (a.k.a subspace)\r\n */\r\n public reduce(state: any, actionPayload: IActionPayload): any {\r\n // If the initial state is undefined, then create an empty object to start with\r\n if (isNullOrUndefined(state)) {\r\n state = {};\r\n }\r\n\r\n let newState = { ...state };\r\n let stateChanged = false;\r\n const connectorKey: string = actionPayload.key;\r\n\r\n // See if we need to reduce for a specific connector. This is the common case.\r\n if (actionPayload !== undefined && connectorKey !== undefined) {\r\n const typeIsString: boolean = typeof actionPayload.type === \"string\";\r\n if (typeIsString && actionPayload.type.endsWith(ConnectorConstants.renderAction)) {\r\n // If this is a special action, used to force a re-render, then we need to set stateChanged to true, and create a clone of the existing scoped state\r\n const statePropertyKey = connectorKey + \".\" + ConnectorConstants.connectorStateKey;\r\n const connectorState = assign({}, get(state, statePropertyKey, undefined));\r\n set(newState, statePropertyKey, connectorState);\r\n stateChanged = true;\r\n } else if (typeIsString && actionPayload.type.endsWith(ConnectorConstants.dataConnectorMergeInitAction)) {\r\n // This is an action meant to set up initial state when an experience injects data connector state into itself.\r\n const experienceFullNamespace: string = connectorKey;\r\n const dataConnectorName: ConnectorNamespaces = actionPayload.params[0];\r\n\r\n if (dataConnectorName) {\r\n dataConnectorInjector.initializeExperience(newState, experienceFullNamespace, dataConnectorName);\r\n stateChanged = true;\r\n }\r\n } else {\r\n const connector = this._connectorMap[connectorKey];\r\n if (connector) {\r\n // If the connector doing the reducing is global, then create a deep copy of state, so that all the connected\r\n // components think the state is new, and run their mappers. Connected components are subscribed to, and only see\r\n // changed in their subspace portion of the state tree. The redux connect implementation uses strict equal comparison,\r\n // meaning it consider the state change if it is a new object reference, even if all the properties are still the same\r\n if (connector.isGlobal) {\r\n newState = merge({}, newState);\r\n }\r\n\r\n const connectorReducerResult = this.computeNextStateForConnector(newState, connectorKey, actionPayload);\r\n stateChanged = connectorReducerResult.stateChanged;\r\n\r\n if (stateChanged) {\r\n // Check to see if any experiences are including this data connector state. If so, update those too.\r\n dataConnectorInjector.reportStateChange(newState, connectorKey, connectorReducerResult.newState);\r\n\r\n if (canUseDOM()) {\r\n reportDataConnectorStateChange(connectorKey, connectorReducerResult.newState);\r\n }\r\n }\r\n } else {\r\n // If connector is not found in the map, throw error immediately during SSR.\r\n if (!canUseDOM()) {\r\n logError(`ConnectorMap for ${connectorKey} is undefined.`, 34006, {});\r\n throw new Error(\"Reducer for: \" + connectorKey + \" must not return undefined.\");\r\n }\r\n }\r\n }\r\n } else {\r\n // Iterate over the full list of connectors calling each reducer. This is not the common case, and is typically done\r\n // for actions that come from Redux, during initialization\r\n Object.keys(this._connectorMap).forEach(key => {\r\n if (this.computeNextStateForConnector(newState, key, actionPayload).stateChanged) {\r\n stateChanged = true;\r\n }\r\n });\r\n }\r\n\r\n // Return the newState, as modified by the reducer(s) if it was changed, otherwise return the original state\r\n if (stateChanged) {\r\n return newState;\r\n } else {\r\n return state;\r\n }\r\n }\r\n\r\n /**\r\n * Adds a sub reducer for a connector to the sub-reducer collection.\r\n * @method\r\n * @param {IDataConnector} connector The connector to add.\r\n */\r\n public addSubReducerForConnector(connector: IDataConnector): void {\r\n if (!connector) {\r\n throw new Error(\"The parameter 'connector' cannot be null.\");\r\n }\r\n\r\n // Add the sub-reducer and connector into their maps, based on the connector's namespace\r\n const key = connector.fullNamespace;\r\n this._connectorMap[key] = connector;\r\n\r\n // update the all and global connector fast lookup lists\r\n this._allConnectors.push(connector);\r\n\r\n if (connector.isGlobal) {\r\n this._globalConnectors.push(connector);\r\n }\r\n\r\n // Check if there is a pending promise for the data connector\r\n // DO NOT CHANGE namespace to fullnamespace, data connectors are supposed to be queried using just the namespace by design.\r\n if (this._getDataConnectorPendingPromises.has(connector.namespace)) {\r\n // Get the resolve callback for the pending promise and resolve it\r\n const pendingPromise = this._getDataConnectorPendingPromises.get(connector.namespace);\r\n\r\n try {\r\n pendingPromise.resolve(connector);\r\n } catch (error) {\r\n pendingPromise.reject(error);\r\n }\r\n\r\n // Delete the entry from the pending promise map\r\n this._getDataConnectorPendingPromises.delete(connector.namespace);\r\n }\r\n\r\n connector.store.dispatch({ key: key, type: \"@@connector-view/INIT\" });\r\n }\r\n\r\n /**\r\n * Helper method to compute the next state for a given connector. This method will get the connector's actual state\r\n * from the state tree, call the reducer, and then state the state in the passed in object that is to receive the new state\r\n * @param {any} state The current subspace (or root) state object, which will be updated\r\n * @param {string} key The key to the connector in the connector map\r\n * @param {IActionPayload} actionPayload The action to apply\r\n * @returns Information on how the connector state was changed\r\n */\r\n private computeNextStateForConnector(state: any, key: string, actionPayload: IActionPayload): ReducerResult {\r\n // Get the connector, so that we can call the reducer\r\n const connector = this._connectorMap[key];\r\n\r\n // Setup the key and get the actual state property for the connector. lodash uses dotted notation\r\n // so the key will be something like: namespace._@STATE@_\r\n const statePropertyKey = key + \".\" + ConnectorConstants.connectorStateKey;\r\n const connectorPreviousState = get(state, statePropertyKey, undefined);\r\n\r\n // Call the reducer for the connector, and validate that we received a state object back.\r\n const nextStateForConnector = this.subReduce(connector.reducer, connectorPreviousState, actionPayload);\r\n if (typeof nextStateForConnector === \"undefined\") {\r\n throw new Error(\"Reducer for: \" + key + \" must not return undefined.\");\r\n }\r\n\r\n // If the state changed, then set the new connector state in the overall state object\r\n const connectorStateChanged: boolean = nextStateForConnector !== connectorPreviousState;\r\n if (connectorStateChanged) {\r\n set(state, statePropertyKey, nextStateForConnector);\r\n }\r\n\r\n return { newState: nextStateForConnector, stateChanged: connectorStateChanged };\r\n }\r\n\r\n /**\r\n * Calls the reducer that has been registered to handle the state associated with a specific subspace\r\n * @param {Reducer} reducer The reducer to call\r\n * @param {TSubReducerState} state The state object for the subreducer\r\n * @param {IActionPayload} actionPayload The action to apply\r\n */\r\n private subReduce(reducer: IReducer, previousState: TSubReducerState, actionPayload: IActionPayload): TSubReducerState {\r\n const reducedState: TSubReducerState = reducer.reduce(previousState, actionPayload);\r\n if (reducedState !== previousState) {\r\n return reducedState;\r\n } else {\r\n return previousState;\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\nimport { IDataConnector } from \"../connectors/IDataConnector\";\r\nimport PageBase from \"../pages/PageBase\";\r\n\r\n/**\r\n * Gets a data connector with the given namespace.\r\n * @param namespace The data connector's namespace.\r\n * @returns The data connector.\r\n */\r\nexport async function getDataConnector>(namespace: ConnectorNamespaces): Promise {\r\n return namespace\r\n ? (await PageBase.getInstance().rootReducer.getDataConnector(namespace))\r\n : null;\r\n}\r\n\r\n/**\r\n * Tries to get a data connector with the given namespace.\r\n * @param namespace The data connector's namespace.\r\n * @returns The data connector, or null if it could not be found.\r\n */\r\nexport function tryGetDataConnector>(namespace: ConnectorNamespaces): T {\r\n return PageBase.getInstance().rootReducer.connector(namespace);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Network err string\r\n */\r\nexport const networkErrorString = \"No network\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { PerfTimeline } from \"@msnews/diagnostics\";\r\nimport React from \"react\";\r\n\r\n/**\r\n * Returns an HOC for tracking perf timeline of a React.Component\r\n * @param WrappedComponent - the component to instrument perf for\r\n * @param perfTimeline - the {PerfTimeline} object to use for tracking perf.\r\n * This is normally created in the parent context when instantating the component\r\n * and passed down to the HOC.\r\n */\r\nexport function instrumentPerf(\r\n WrappedComponent: React.ComponentType,\r\n perfTimeline: PerfTimeline\r\n): React.ComponentClass {\r\n\r\n return class ComponentPerfTimeline extends React.Component {\r\n\r\n /**\r\n * The last render action's endMeasure method to be used to mark the end of the render\r\n * cycle when mount or update happens next\r\n */\r\n private lastRenderEndMeasure: () => void;\r\n\r\n /** React render lifecycle handler */\r\n public render(): JSX.Element {\r\n this.lastRenderEndMeasure = perfTimeline.startMeasure(\"render\").endMeasure;\r\n return ;\r\n }\r\n\r\n /** React componentDidMount lifecycle handler */\r\n public componentDidMount(): void {\r\n this.lastRenderEndMeasure();\r\n }\r\n\r\n /** React componentDidUpdate lifecycle handler */\r\n public componentDidUpdate(): void {\r\n this.lastRenderEndMeasure();\r\n }\r\n };\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Captures time elapsed since browser start\r\n */\r\nexport const fromBrowserStart = \"E2E\";\r\n\r\n/**\r\n * Time To Functional\r\n */\r\nexport const timeToFunctional = \"TTF\";\r\n\r\n/**\r\n * Time To Page Visible\r\n */\r\nexport const timeToPageVisible = \"TTPV\";\r\n\r\n/**\r\n * Time To Visually Ready\r\n */\r\nexport const timeToVisuallyReady = \"TTVR\";\r\n\r\n/**\r\n * Time To Video Start\r\n */\r\nexport const timeToVideoStart = \"TTVS\";\r\n\r\n/**\r\n * pageTiming cacheKey for html cached state\r\n */\r\nexport const htmlCachedKey = \"htmlCached\";\r\n\r\n/**\r\n * Page reveal start performance marker\r\n */\r\nexport const pageRevealStartMarker = \"pageRevealStart\";\r\n\r\n/**\r\n * Page reveal complete performance marker\r\n */\r\nexport const pageRevealCompleteMarker = \"pageRevealComplete\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport { ServerCache, MockLRUCache } from \"@msnews/web-worker-shared-utils\";\r\n\r\nexport * from \"./AbortableFetch\";\r\nexport * from \"./Ajax\";\r\nexport * from \"./BaseConverter\";\r\nexport * from \"./CookieInlineUtility\";\r\nexport * from \"./CookieUtility\";\r\nexport * from \"./FastDnaUtility\";\r\nexport * from \"./HandledPropsKeys\";\r\nexport * from \"./IndexedDb\";\r\nexport * from \"./IndexedDBCache\";\r\nexport * from \"./LinkNavigation\";\r\nexport * from \"./LocalStorageInline\";\r\nexport * from \"./ContentNumberAbbreviation\";\r\nexport * from \"./PageUtility\";\r\nexport * from \"./Parsing\";\r\nexport * from \"./ShallowCompare\";\r\nexport * from \"./SingletonResetManager\";\r\nexport * from \"./StringHasLength\";\r\nexport * from \"./TelemetryHelper\";\r\nexport * from \"./UrlSearchParamsHelper\";\r\nexport * from \"./UrlUtility\";\r\nexport * from \"./Utility\";\r\nexport * from \"./visibility\";\r\nexport * from \"./WebWorkerUtility\";\r\nexport * from \"./ZIndex\";\r\nexport * from \"./NetworkCheck\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\nconst pageTimings = canUseDOM() ? (window._pageTimings || (window._pageTimings = {})) : {};\r\nconst secondaryPageTimings = canUseDOM() ? (window._secondaryPageTimings || (window._secondaryPageTimings = {})) : {};\r\n\r\n/**\r\n * Gets current window._pageTimings object\r\n */\r\nexport function getPageTimings(): object {\r\n return pageTimings;\r\n}\r\n\r\n/**\r\n * Gets current window._secondaryPageTimings object\r\n */\r\nexport function getSecondaryPageTimings(): object {\r\n return secondaryPageTimings;\r\n}\r\n\r\n/**\r\n * Creates or updates a new counter under the page timings\r\n * @param counterName - the name of the counter to increment.\r\n */\r\nexport function incrementCounter(counterName: string): void {\r\n if (counterName && pageTimings) {\r\n const existingCount = pageTimings[counterName] || (pageTimings[counterName] = 0);\r\n pageTimings[counterName] = existingCount + 1;\r\n }\r\n}\r\n\r\n/**\r\n * Reset pageTimings object\r\n */\r\nexport function resetPageTimings(): void {\r\n Object.keys(pageTimings).forEach(key => delete pageTimings[key]);\r\n Object.keys(secondaryPageTimings).forEach(key => delete secondaryPageTimings[key]);\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ObjectTelemetryContract } from \"@msnews/telemetry-contracts\";\r\nimport { get, set } from \"lodash-es\";\r\n\r\nconst mapper = {\r\n n: \"name\",\r\n t: \"type\",\r\n a: \"action\",\r\n b: \"behavior\",\r\n customHandled: \"customHandled\",\r\n d: \"overrideDestinationUrl\",\r\n \"c.hi\": \"content.headlineIdx\",\r\n \"c.auth\": \"content.author\",\r\n \"c.i\": \"content.id\",\r\n \"c.s\": \"content.source\",\r\n \"c.p\": \"content.parentId\",\r\n \"c.t\": \"content.type\",\r\n \"c.tp\": \"content.topic\",\r\n \"c.v\": \"content.vertical\",\r\n \"c.c\": \"content.category\",\r\n \"c.sc\": \"content.subcategory\",\r\n \"c.pn\": \"content.partnerName\",\r\n \"c.pi\": \"content.partnerId\",\r\n \"c.b\": \"content.brand\",\r\n \"c.bi\": \"content.brandId\",\r\n \"c.pl.i\": \"content.placement.id\",\r\n \"c.pl.p\": \"content.placement.parentId\",\r\n \"c.pl.o\": \"content.placement.ordinal\",\r\n \"c.pl.l\": \"content.placement.lineage\",\r\n \"c.pl.lo\": \"content.placement.lineageOrdinal\",\r\n \"c.aud\": \"content.audienceMode\",\r\n \"f.i\": \"feed.id\",\r\n \"f.n\": \"feed.name\",\r\n \"f.t\": \"feed.type\"\r\n};\r\n\r\nexport class TelemetryContractCoverter {\r\n public static compress(obj: ObjectTelemetryContract): any {\r\n const outputObj = {};\r\n const keys = Object.keys(mapper);\r\n for (let i = 0; i < keys.length; i++) {\r\n const key = keys[i];\r\n const mappedValue = get(obj, mapper[key]);\r\n\r\n if (mappedValue !== undefined) {\r\n outputObj[key] = mappedValue;\r\n }\r\n }\r\n\r\n // filter out if headline length > 20 and use headline in DOM (h2/h3/h4) instead.\r\n const mappedValue = get(obj, \"content.headline\");\r\n if (mappedValue) {\r\n outputObj[\"c.hl\"] = mappedValue;\r\n }\r\n\r\n return outputObj;\r\n }\r\n\r\n public static decompress(obj: any): ObjectTelemetryContract {\r\n if (!obj) {\r\n return;\r\n }\r\n\r\n const outputObj = {};\r\n const keys = Object.keys(mapper);\r\n for (let i = 0; i < keys.length; i++) {\r\n const key = keys[i];\r\n const mappedValue = get(obj, key);\r\n\r\n if (mappedValue !== undefined) {\r\n set(outputObj, mapper[key], mappedValue);\r\n }\r\n }\r\n\r\n if (obj[\"c.hl\"]) {\r\n set(outputObj, \"content.headline\", obj[\"c.hl\"]);\r\n }\r\n\r\n return outputObj as ObjectTelemetryContract;\r\n }\r\n}\r\n\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport IConnectedComponentProps from \"./rendering\";\r\n\r\nexport { IConnectedComponentProps };\r\n\r\nexport * from \"./connectors\";\r\nexport * from \"./experience-loader\";\r\nexport * from \"./rendering\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./BaseExperienceConfig\";\r\nexport * from \"./ChildArrangementMetadata\";\r\nexport * from \"./ChildExperienceConfigInfo\";\r\nexport * from \"./ChildExperiencesDeferRenderType\";\r\nexport * from \"./ChildExperienceValidator\";\r\nexport * from \"./composition\";\r\nexport * from \"./ScreenTypeMetadata\";\r\nexport * from \"./ExperienceArrangement\";\r\nexport * from \"./ExperienceConfigWrapper\";\r\nexport * from \"./ExperienceCompositionTypes\";\r\nexport * from \"./ExperienceConfigs\";\r\nexport * from \"./ExperienceStalenessConfig\";\r\nexport * from \"./ExperienceState\";\r\nexport * from \"./Preload\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n/// \r\n\r\n/**\r\n * Used to mock the LRU cache in unit test environments.\r\n * Partial is used to highlight this class is a subset of LRUCache and only\r\n * implements the functions we currently use out of this API. If more functions are\r\n * utilized they will need to be implmented here in this class.\r\n */\r\nexport class MockLRUCache implements Partial> {\r\n /** cache */\r\n private cacheMap: Map = new Map();\r\n\r\n /** Check if cache key exists */\r\n public async has(key: string): Promise {\r\n return !!this.cacheMap[key];\r\n }\r\n /** Get cached value by key */\r\n public async get(key: string): Promise {\r\n return this.cacheMap[key];\r\n }\r\n /** Set cached value by key */\r\n public async set(key: string, value: any, maxAge?: number): Promise {\r\n this.cacheMap[key] = value;\r\n return true;\r\n }\r\n /** Delete cached key-value pair */\r\n public async del(key: string): Promise {\r\n delete this.cacheMap[key];\r\n }\r\n /** Get count of total items cached */\r\n public async itemCount(): Promise {\r\n return Object.keys(this.cacheMap).length;\r\n }\r\n /** Reset entire cache */\r\n public async reset(): Promise {\r\n this.cacheMap = new Map();\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { getMuidCookie, headData, getLocalStorage } from \"@msnews/core\";\r\nimport { prerenderedPageAge, prerenderedPageReload } from \"./PageLifecycleConstants\";\r\n\r\nimport { PageInvalidationReasons } from \"./PageInvalidationReasons\";\r\nimport { Telemetry } from \"@msnews/telemetry-contracts\";\r\nimport { forceReloadFlagName } from \"./PageLifecycleConstants\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\nimport { refreshPage } from \"@msnews/experiences-base\";\r\n\r\nlet muidAtLoad;\r\nlet invalidationReason: PageInvalidationReasons;\r\n/** The HTML element which is being used as the overlay element */\r\nlet overlayElement;\r\nlet overlayTimeout;\r\nlet hasRevealed = false;\r\n\r\n/**\r\n * Init Prerender\r\n */\r\nexport function initPrerender() {\r\n muidAtLoad = getMuidCookie() || \"\";\r\n overlayElement = document.createElement(\"div\");\r\n}\r\n\r\n/**\r\n * return true if prerendered page is visible else false0\r\n */\r\nexport function isPrerenderVisible(): boolean {\r\n if (headData.IsPrerender && document.visibilityState === \"visible\") {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns true if the page is prerendered and we have not revealed yet.\r\n */\r\nexport function isPrerenderBeforeReveal(): boolean {\r\n return headData.IsPrerender && !hasRevealed;\r\n}\r\n\r\n/**\r\n * Test-only function to reset hasRevealed. Will be tree-shaken away in prod mode.\r\n */\r\nexport function testResetHasRevealed() {\r\n hasRevealed = false;\r\n}\r\n\r\n/**\r\n * Process pageReveal state\r\n * This method should be hooked just before pageReveal is started.\r\n * !!!IMPORTANT!!! - Hook this up with milestone pageRevealStartWillFire plugin event.\r\n */\r\nexport function processPageRevealedState(): boolean {\r\n hasRevealed = true;\r\n if (document.visibilityState !== \"visible\") {\r\n return false;\r\n }\r\n\r\n // remove overlay with timeout\r\n removeOverlayWithTimeout();\r\n\r\n if (shouldReloadPrerenderPage()) {\r\n preparePageForReload(getCurrentPerformanceTimeStamp());\r\n } else {\r\n firePageRevealTelemetry(getCurrentPerformanceTimeStamp());\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * current performance timestamp\r\n */\r\nexport function getCurrentPerformanceTimeStamp(): number {\r\n return Math.round(performance.timing.navigationStart + performance.now());\r\n}\r\n\r\n/**\r\n * Add the overlay which mocks the background. This is needed when a preloaded page on reveal is forced reloaded (stale content, settings change).\r\n * For preload, we add an overlay over the content, that we show until we know the content is fresh.\r\n * If the content is not fresh, we will reload to ensure freshness. The purpose of the overlay is to prevent flickering\r\n * (showing the old content, then the new) when the revealed data is old.\r\n */\r\nexport function addPrerenderOverlay(): void {\r\n if (!headData.IsPrerender) {\r\n return;\r\n }\r\n\r\n if (!overlayElement) {\r\n return;\r\n }\r\n\r\n const body = document.body;\r\n const style = overlayElement.style;\r\n\r\n style.background = \"inherit\";\r\n style.position = \"fixed\";\r\n style.bottom = style.left = style.right = style.top = \"0\";\r\n style.zIndex = \"2147483647\";\r\n\r\n if (body) {\r\n body.appendChild(overlayElement);\r\n logger.logObjects(\"pageRevealDelegate:addOverlay: Added overlay\");\r\n } else {\r\n logger.logObjects(\"pageRevealDelegate:addOverlay: Document body is not available, failed to add overlay.\");\r\n }\r\n}\r\n\r\n/**\r\n * Remove the overlay\r\n */\r\nexport function removePrerenderOverlay(): void {\r\n try {\r\n // clear overlayTimeout if its set.\r\n overlayTimeout && clearTimeout(overlayTimeout);\r\n\r\n // Remove it safely if it is present in the DOM\r\n document.body.removeChild(overlayElement);\r\n logger.logObjects(\"pageRevealDelegate:removeOverlay: Removed overlay\");\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n\r\n overlayElement = null;\r\n}\r\n\r\n/**\r\n * prepare page for reload\r\n * @param pageRevealTimeStamp - pageReveal start timestamp\r\n */\r\nfunction preparePageForReload(pageRevealTimeStamp: DOMHighResTimeStamp): void {\r\n // save telemetry in persistent storage to be used after page is reloaded.\r\n savePrerenderedPageReloadTracking(pageRevealTimeStamp);\r\n\r\n // By specifying the new URL, the helper will use location.replace() method which\r\n // replaces the current resource with the one at the provided URL.\r\n // After using replace() the current page will not be saved in session History,\r\n // meaning the user won't be able to use the back button to navigate to it.\r\n refreshPage({ newUrl: getReloadUrl() });\r\n}\r\n\r\n/**\r\n * should reload hidden page on reveal\r\n */\r\nfunction shouldReloadPrerenderPage(): boolean {\r\n if (!headData.IsPrerender) {\r\n return false;\r\n }\r\n\r\n const flag = getLocalStorage().getItem(forceReloadFlagName);\r\n\r\n if (flag) {\r\n\r\n // remove after reading\r\n getLocalStorage().removeItem(forceReloadFlagName);\r\n\r\n let flagData;\r\n\r\n try {\r\n flagData = JSON.parse(flag);\r\n logger.logObjects(\"pageRevealDelegate:isForceReloadRequested, time: \" + (new Date(flagData.time)).toTimeString());\r\n } catch (e) {\r\n logger.logObjects(\"pageRevealDelegate:isForceReloadRequested: JSON parsing failed for fpr data\");\r\n }\r\n\r\n if (flagData) {\r\n // We should only reload the page if reload request was made after this page navigation started.\r\n // if the request was made before the page navigation, preloaded page must already have the latest settings.\r\n // Therefore no need to reload at reveal.\r\n\r\n const time = flagData.time;\r\n invalidationReason = flagData.data;\r\n\r\n if (!isNaN(time) && (time > performance.timing.navigationStart)) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return hasMuidChanged();\r\n}\r\n\r\n/**\r\n * Has muid changed\r\n */\r\nfunction hasMuidChanged(): boolean {\r\n const muid = getMuidCookie() || \"\";\r\n\r\n if (muidAtLoad !== muid) {\r\n invalidationReason = PageInvalidationReasons.MuidChange;\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Fire Telemetry for prerendered tab reload.\r\n */\r\nfunction trackPrerenderedPageReloadTelemetry(): void {\r\n if (!headData.IsPrerender && document.visibilityState === \"visible\") {\r\n const prerenderedPageReloadData = getLocalStorage().getItem(prerenderedPageReload);\r\n const prerenderedPageAgeData = getLocalStorage().getItem(prerenderedPageAge);\r\n\r\n if (prerenderedPageReloadData) {\r\n Telemetry.addOrUpdateCustomProperty(prerenderedPageReload, prerenderedPageReloadData);\r\n getLocalStorage().removeItem(prerenderedPageReload);\r\n }\r\n\r\n if (prerenderedPageAgeData) {\r\n Telemetry.addOrUpdateCustomProperty(prerenderedPageAge, prerenderedPageAgeData);\r\n getLocalStorage().removeItem(prerenderedPageAge);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Save Telemetry for prerendered tab reload.\r\n */\r\nfunction savePrerenderedPageReloadTracking(pageRevealTimeStamp: DOMHighResTimeStamp): void {\r\n if (headData.IsPrerender && invalidationReason) {\r\n getLocalStorage().setItem(prerenderedPageReload, invalidationReason + \"\");\r\n getLocalStorage().setItem(prerenderedPageAge, (pageRevealTimeStamp - performance.timing.navigationStart).toString());\r\n }\r\n}\r\n\r\n/**\r\n * Fire Telemetry for prerendered tab.\r\n */\r\nfunction trackPrerenderedPageTelemetry(pageRevealTimeStamp: DOMHighResTimeStamp): void {\r\n if (isPrerenderVisible()) {\r\n // There was a race condition within trackInfo which would undo the tmpl\r\n // This race condition is fixed by taking dependency on c.trackExtComplete\r\n Telemetry.addOrUpdateTmplProperty(\"isbackgroundpreload\", \"1\");\r\n Telemetry.addOrUpdateTmplProperty(\"isprerender\", \"1\");\r\n Telemetry.addOrUpdateCustomProperty(prerenderedPageAge, (pageRevealTimeStamp - performance.timing.navigationStart).toString());\r\n }\r\n}\r\n\r\n/**\r\n * Returns modified current URL with removed prerender query string.\r\n */\r\nfunction getReloadUrl(): string {\r\n // background prerender query string is added by browser whenever the page is rendered in the background.\r\n // Since we are going to reload the page, we need to remove this query string to make sure the MSN servers\r\n // do not think of this request as a prerendered page.\r\n const url = location.href;\r\n\r\n return url ? url.replace(/[?&]prerender(=\\d)?/, \"\") : \"\";\r\n}\r\n\r\n/**\r\n * fire pageReveal telemetry\r\n * @param pageRevealTimeStamp - pageReveal start timestamp\r\n */\r\nfunction firePageRevealTelemetry(pageRevealTimeStamp: DOMHighResTimeStamp): void {\r\n trackPrerenderedPageTelemetry(pageRevealTimeStamp);\r\n trackPrerenderedPageReloadTelemetry();\r\n}\r\n\r\n/**\r\n * fail safe measure to remove overlay after timeout.\r\n */\r\nfunction removeOverlayWithTimeout(): void {\r\n // fail safe measure to remove overlay after timeout.\r\n overlayTimeout = setTimeout(() => {\r\n removePrerenderOverlay();\r\n }, 1000);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { logger } from \"../logging\";\r\n\r\n/** Perf marker start suffix */\r\nconst StartMarkSuffix = \"-start\";\r\n\r\n/**\r\n * PerfMarker facilitates adding and measuring performance markers.\r\n */\r\nclass PerfMarker {\r\n /** The single instance of the PerfMarker class. */\r\n private static instance: PerfMarker;\r\n\r\n /** The performance object. */\r\n private performance: Performance;\r\n\r\n /** Perf marker end suffix */\r\n private readonly endMarkSuffix: string = \"-end\";\r\n\r\n /**\r\n * The constructor.\r\n */\r\n private constructor() {\r\n if (typeof window !== \"undefined\") {\r\n this.initialize(window.performance);\r\n }\r\n }\r\n\r\n /**\r\n * Returns singleton class instance.\r\n * @returns The class instance\r\n */\r\n public static getInstance(): PerfMarker {\r\n if (!PerfMarker.instance) {\r\n PerfMarker.instance = new PerfMarker();\r\n }\r\n\r\n return PerfMarker.instance;\r\n }\r\n\r\n /**\r\n * Initialize the member variables.\r\n * @param performance - The performance object instance.\r\n */\r\n public initialize(performance: Performance): void {\r\n this.performance = performance;\r\n }\r\n\r\n /**\r\n * Adds given perf marker to browser.\r\n * @param name - Perf marker to start\r\n */\r\n public startMark(name: string): void {\r\n this.singleMark(name + StartMarkSuffix);\r\n }\r\n\r\n /**\r\n * Adds given perf marker to browser.\r\n * @param name - Perf marker to end\r\n */\r\n public endMark(name: string): void {\r\n this.singleMark(name + this.endMarkSuffix);\r\n this.measureStartEnd(name);\r\n }\r\n\r\n /**\r\n * Adds a single performance marker via the performance API.\r\n * @param name - the name of the perf marker\r\n */\r\n public singleMark(name: string): void {\r\n const performance = this.performance;\r\n if (performance && performance.mark) {\r\n performance.mark(name);\r\n }\r\n }\r\n\r\n /**\r\n * Removes a single mark.\r\n * @param name - the name of the perf marker\r\n */\r\n public clearMark(name: string): void {\r\n const performance = this.performance;\r\n if (performance && performance.clearMarks) {\r\n performance.clearMarks(name);\r\n }\r\n }\r\n\r\n /**\r\n * Utility method to add start/end marker around a promise.\r\n * @param name - The name of perf marker\r\n * @param getPromise - The callback\r\n * @returns The promise\r\n */\r\n public async measurePromise(name: string, getPromise: () => Promise): Promise {\r\n this.startMark(name);\r\n const result = await getPromise();\r\n this.endMark(name);\r\n return result;\r\n }\r\n\r\n /**\r\n * Telemetry call this method to collect existing perf markers that each Experience has added.\r\n * @param experienceName - Perf marker name in case of custom marker / Experience name\r\n * @returns {IPerfMarkers}\r\n */\r\n public measurePerfMarker(experienceName: string): IPerfMarkers {\r\n\r\n if (!this.performance) {\r\n return;\r\n }\r\n\r\n const perfMarkers: { [id: string]: PerfMarkerDetail; } = {};\r\n\r\n // Get all perf markers from browser.\r\n const perfEntries = this.performance.getEntriesByType(\"mark\");\r\n if (!perfEntries) {\r\n return perfMarkers;\r\n }\r\n\r\n // Iterate through perfEntries received from browser.\r\n for (let i = 0; i < perfEntries.length; i++) {\r\n\r\n // if marker name in perfEntries object is null\r\n let markerName: string = perfEntries[i].name;\r\n if (!markerName || perfEntries[i].startTime == null) {\r\n continue;\r\n }\r\n\r\n // Remove start and end suffix.\r\n markerName = markerName.replace(/-(end|start)$/i, \"\");\r\n\r\n // if marker name retrieved from browser is not for this experience then continue with next marker.\r\n if (!markerName.startsWith(experienceName)) {\r\n continue;\r\n }\r\n\r\n const perfMarkerDetail = perfMarkers[markerName] || new PerfMarkerDetail(markerName);\r\n perfMarkerDetail.processPerfEntry(perfEntries[i]);\r\n if (perfMarkerDetail.isValid) {\r\n perfMarkers[markerName] = perfMarkerDetail;\r\n }\r\n }\r\n\r\n return perfMarkers;\r\n }\r\n\r\n /**\r\n * Measures the given marker name's start/end markers.\r\n * @param name - The name of the marker whose -start and -end to measure\r\n */\r\n private measureStartEnd(name: string): void {\r\n const performance = this.performance;\r\n if (performance && performance.measure) {\r\n try {\r\n performance.measure(\r\n name,\r\n name + StartMarkSuffix,\r\n name + this.endMarkSuffix\r\n );\r\n } catch (ex) {\r\n // An exception will be thrown if either start/end marker didn't exist.\r\n // We swallo this exception and log an error so that actual code's execution\r\n // would not be effected due to performance measurement code.\r\n logger.logError(`Error while attempting to measure start/end of '${name}'. Error: ${ex}`);\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport const perfMarker = PerfMarker.getInstance();\r\n\r\n/**\r\n * Interface defining attributes of each per marker.\r\n */\r\nexport interface IPerfMarkers {\r\n [key: string]: PerfMarkerDetail;\r\n}\r\n\r\n/**\r\n * Interface defining perf markers.\r\n */\r\nclass PerfMarkerDetail {\r\n /** marker name */\r\n public readonly markerName: string;\r\n /** first start time */\r\n public firstStartTime: number;\r\n /** start time */\r\n public startTime: number;\r\n /** duration */\r\n public duration = 0;\r\n\r\n /**\r\n * Sets marker name.\r\n */\r\n constructor(markerName: string) {\r\n this.markerName = markerName;\r\n }\r\n\r\n /**\r\n * Check if given marker is valid. If marker has a start time then it is a valid marker.\r\n * @returns True if valid else false.\r\n */\r\n get isValid(): boolean {\r\n return this.startTime != null;\r\n }\r\n\r\n /**\r\n * Sum up start and end marker duraiton per marker name.\r\n */\r\n public processPerfEntry(perfEntry: PerformanceEntry): void {\r\n\r\n // If given mark is a start mark\r\n if (perfEntry.name.endsWith(StartMarkSuffix)) {\r\n\r\n // If this is a start mark and firstStartTime is undefined then assign value of startTime now.\r\n if (!this.firstStartTime) {\r\n this.firstStartTime = perfEntry.startTime;\r\n }\r\n\r\n // Change start time to start time of current mark.\r\n this.startTime = perfEntry.startTime;\r\n\r\n } else if (this.startTime != null) {\r\n // This is is not a start mark. Assuming this is end mark, check start time of this mark is set earlier. if set properly then proceed.\r\n // else likely a candiddate to skip \"if\" part.\r\n\r\n // This is a end mark. Add earlier duration plus current start time minus this start time.\r\n this.duration += perfEntry.startTime - this.startTime;\r\n\r\n // reset start time so we can recalculate the next start/end pair correctly\r\n this.startTime = null;\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./ActionDispatchHelper\";\r\nexport * from \"./ActionHandler\";\r\nexport * from \"./ActionMap\";\r\nexport * from \"./ActionObserver\";\r\nexport * from \"./DataConnectorInjector\";\r\nexport * from \"./DataConnectorTracker\";\r\nexport * from \"./DynamicReducer\";\r\nexport * from \"./GetDataConnector\";\r\nexport * from \"./IActionMap\";\r\nexport * from \"./IActionPayload\";\r\nexport * from \"./IReducer\";\r\nexport * from \"./TestHelper\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n// IF YOU UPDATE THIS FILE PLEASE UPDATE THE ONE IN WebWorker\r\n// DUE TO TREE SHAKING ISSUES WHEN IN DEBUG WE CAN'T USE COMMON CODE\r\n// WITHOUT CAUSING ISSUES IN WebWorker\r\n\r\n/** Helper class to work on URL search params */\r\nexport class UrlSearchParamsHelper {\r\n /** Object that contains all the query strings */\r\n private searchParams: { [index: string]: string } = Object.create(null);\r\n\r\n constructor(search?: string) {\r\n this.parseQueryString(search);\r\n }\r\n\r\n /**\r\n * Sets the query string value\r\n * @param name query string name\r\n * @param value query string value\r\n */\r\n public set(name: string, value: string): UrlSearchParamsHelper {\r\n if (value !== undefined && value !== null) {\r\n this.searchParams[name] = value;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets the query string value\r\n * @param name query string name\r\n */\r\n public get(name: string): string {\r\n return this.searchParams[name];\r\n }\r\n\r\n /**\r\n * Deletes the query string value\r\n * @param name query string name\r\n */\r\n public delete(name: string): void {\r\n delete this.searchParams[name];\r\n }\r\n\r\n /**\r\n * Returns the query parameters as a string\r\n */\r\n public toString(): string {\r\n const keys = Object.keys(this.searchParams);\r\n\r\n if (!keys.length) {\r\n return \"\";\r\n }\r\n\r\n return keys.sort().map((key: string) => {\r\n return `${key}=${this.searchParams[key]}`;\r\n }).join(\"&\");\r\n }\r\n\r\n /** Parses the query string and adds the values to searchParams */\r\n private parseQueryString(queryString?: string): void {\r\n if (!queryString) {\r\n return;\r\n }\r\n\r\n if (queryString.charAt(0) === \"?\") {\r\n queryString = queryString.substring(1);\r\n }\r\n\r\n queryString.split(\"&\").forEach((keyValuePairs) => {\r\n const query = keyValuePairs.split(\"=\");\r\n\r\n const name = query[0];\r\n\r\n if (!this.get(name)) {\r\n this.searchParams[name] = query[1];\r\n }\r\n });\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { UrlSearchParamsHelper, UrlUtility } from \"../utilities\";\r\nimport { canUseDOM, getLocationHost, getLocationSearch } from \"@msnews/isomorphic-util\";\r\n\r\nimport { headData } from \"../app/HeadData\";\r\n\r\n// See https://webpack.js.org/guides/public-path/#on-the-fly for the details of __webpack_public_path__\r\ndeclare let __webpack_public_path__: string;\r\n\r\n// This is the statics path defined on server side.\r\ndeclare let __WEBPACK_LOCAL_STATICS_PATH__: string;\r\n\r\nconst prodAssets = \"//assets.msn.com\";\r\nconst cnProdAssets = \"//assets.msn.cn\";\r\n\r\nconst localHost = \"localhost.msn.com:8080\";\r\n\r\nconst ENV = {\r\n \"int.msn.com\": prodAssets,\r\n \"int.msn.cn\": cnProdAssets,\r\n \"int1.msn.com\": prodAssets,\r\n \"int1.msn.cn\": cnProdAssets,\r\n \"localhost:6000\": prodAssets, // for pcs local dev box,\r\n \"localhost.msn.com:8080\": `//${localHost}`,\r\n \"microsoftnews-dev.msn.com\": prodAssets,\r\n \"microsoftnews-int.msn.com\": prodAssets,\r\n \"microsoftnews-int.msn.cn\": cnProdAssets,\r\n \"microsoftnews-int1.msn.com\": prodAssets,\r\n \"microsoftnews-int1.msn.cn\": cnProdAssets,\r\n \"microsoftnews.msn.com\": prodAssets,\r\n \"microsoftnews.msn.cn\": cnProdAssets,\r\n \"msnrender-sf-sand-westus.msn.com:33000\": prodAssets,\r\n \"msnrender-sf-sand-eastus.msn.com:33000\": prodAssets,\r\n \"ntp.msn.com\": prodAssets,\r\n \"ntp.msn.cn\": cnProdAssets,\r\n \"owa-int.msn.com\": prodAssets,\r\n \"owa-int.msn.cn\": cnProdAssets,\r\n \"owa-int1.msn.com\": prodAssets,\r\n \"owa-int1.msn.cn\": cnProdAssets,\r\n \"owa.msn.com\": prodAssets,\r\n \"owa.msn.cn\": cnProdAssets,\r\n \"pagecomposition.msn.com\": prodAssets,\r\n \"pagecomposition-int.msn.com\": prodAssets,\r\n \"superapp-int.msn.com\": prodAssets,\r\n \"superapp-int.msn.cn\": cnProdAssets,\r\n \"superapp-int1.msn.cn\": cnProdAssets,\r\n \"superapp-int1.msn.com\": prodAssets,\r\n \"superapp.msn.cn\": cnProdAssets,\r\n \"superapp.msn.com\": prodAssets,\r\n \"windows-int.msn.com\": prodAssets,\r\n \"windows-int.msn.cn\": cnProdAssets,\r\n \"windows-int1.msn.com\": prodAssets,\r\n \"windows-int1.msn.cn\": cnProdAssets,\r\n \"windows.msn.com\": prodAssets,\r\n \"windows.msn.cn\": cnProdAssets,\r\n \"www.msn.com\": prodAssets,\r\n \"www.msn.cn\": cnProdAssets\r\n};\r\n\r\nexport const getPublicPath = (locationSearch: string, locationHost: string, webpackPublicPath: string): string => {\r\n const search = new URLSearchParams(locationSearch);\r\n\r\n // Special arrangement for local render service server\r\n // since it could support either assets.msn.com or local static path.\r\n const isLocalHost = locationHost === localHost;\r\n const useDeployedBundles = search.has(\"useDeployedBundles\") && search.get(\"useDeployedBundles\") === \"true\";\r\n const assetHost: string = (isLocalHost && useDeployedBundles) ? prodAssets : ENV[locationHost];\r\n\r\n if (search.has(\"entry\")) {\r\n const segments = search.get(\"entry\").split(\"/\").slice(0, -1).join(\"/\") + \"/\";\r\n\r\n if (assetHost) {\r\n return assetHost + segments;\r\n }\r\n } else if (assetHost && isLocalHost && !useDeployedBundles) {\r\n\r\n if (!canUseDOM()) {\r\n // Use direct static path on local dev server.\r\n const path = __WEBPACK_LOCAL_STATICS_PATH__;\r\n return assetHost + path;\r\n } else if (webpackPublicPath) {\r\n return assetHost + webpackPublicPath;\r\n } else {\r\n return webpackPublicPath;\r\n }\r\n } else {\r\n if (assetHost) {\r\n\r\n // Combine query string params from HeadData with current query string param\r\n // to figure out what is the supported qsp is.\r\n // This is to solve qsp rewritten to PCS but client side have no qsp in address.\r\n const headDataQsp = headData.ClientSettings && headData.ClientSettings.queryparams;\r\n const searchParamStringLocation = (locationSearch || \"\").substring(1);\r\n const searchParamStringHeadData = (headDataQsp || \"\").substring(1);\r\n\r\n // Current query string param from client side has higher priority\r\n let combinedString = \"?\" + searchParamStringHeadData ? searchParamStringLocation + \"&\" + searchParamStringHeadData : searchParamStringLocation;\r\n combinedString = decodeURIComponent(combinedString);\r\n\r\n // For duplicate qsp keys, UrlSearchParamsHelper assumes first given, and other duplicates are ignored.\r\n const search = new UrlSearchParamsHelper(combinedString);\r\n const bundlesValue = search.get(\"bundles\");\r\n\r\n // Item qsp supports multiple items. First value of the same key will be used.\r\n // Example, spalinkValue is rolling when qsp is item=test&item=spalink:rolling&item=spalink:123.45\r\n const itemParams = UrlUtility.getParamsWithItems(combinedString);\r\n const spalinkItem = itemParams.find(item => item.key === \"spalink\");\r\n\r\n // Take care of potential spalink:/rolling\r\n let spalinkValues = spalinkItem && spalinkItem.value && spalinkItem.value.split(\"/\");\r\n if (spalinkValues && spalinkValues[0] === \"\") {\r\n spalinkValues = spalinkValues.slice(1);\r\n }\r\n const spalinkDir = spalinkValues && spalinkValues[0];\r\n\r\n if (webpackPublicPath) {\r\n\r\n // in order to have the lazy chunk pointing to latest with a stable path, the build number will be overridden on runtime\r\n // PATHNAME: /bundles/v1/mmx/buildNumber/\r\n // PATHNAME.split(\"/\"): [\"\", \"bundles\", \"v1\", \"mmx\", \"buildNumber\", \"\"]\r\n //\r\n // Example,\r\n // Query string param: item=spalink:123.45/debug\r\n // webpackPublicPath before: /bundles/v1/mmx/buildNumber/debug\r\n // webpackPublicPath after: /bundles/v1/mmx/123.45/debug\r\n const segments = webpackPublicPath.split(\"/\");\r\n if (spalinkDir) {\r\n segments[4] = spalinkDir;\r\n } else if (bundlesValue) {\r\n segments[4] = bundlesValue;\r\n } else {\r\n segments[4] = \"latest\";\r\n }\r\n return assetHost + segments.join(\"/\");\r\n }\r\n }\r\n }\r\n\r\n return webpackPublicPath;\r\n};\r\n\r\nexport const initializePublicPath = () => {\r\n __webpack_public_path__ = getPublicPath(getLocationSearch(), getLocationHost(), __webpack_public_path__);\r\n};\r\n\r\nexport const initializeHybridPublicPath = () => {\r\n const search = decodeURIComponent(window.location.search);\r\n if (search.indexOf(\"item=spa_env:localdev\") > -1) {\r\n // Use active prime instance SPA directory for localdev\r\n __webpack_public_path__ = `//${window.location.host}/spa/`;\r\n return;\r\n }\r\n\r\n const host = ENV[window.location.host] || prodAssets;\r\n\r\n // Item qsp supports multiple items. First value of the same key will be used.\r\n // Example, spalinkValue is rolling when qsp is item=test&item=spalink:rolling&item=spalink:123.45\r\n const itemParams = UrlUtility.getParamsWithItems(search);\r\n const spalinkItem = itemParams.find(item => item.key === \"spalink\");\r\n\r\n // Take care of potential spalink:/rolling\r\n let spalinkValues = spalinkItem && spalinkItem.value && spalinkItem.value.split(\"/\");\r\n if (spalinkValues && spalinkValues[0] === \"\") {\r\n spalinkValues = spalinkValues.slice(1);\r\n }\r\n const spalinkDir = spalinkValues && spalinkValues[0];\r\n\r\n // in order to have the lazy chunk pointing to latest with a stable path, the build number will be overridden on runtime\r\n // PATHNAME: /bundles/v1/mmx/buildNumber/\r\n // PATHNAME.split(\"/\"): [\"\", \"bundles\", \"v1\", \"mmx\", \"buildNumber\", \"\"]\r\n //\r\n // Example,\r\n // Query string param: item=spalink:123.45/debug\r\n // webpackPublicPath before: /bundles/v1/mmx/buildNumber/debug\r\n // webpackPublicPath after: /bundles/v1/mmx/123.45/debug\r\n const segments = __webpack_public_path__.split(\"/\");\r\n segments[4] = (spalinkDir) ? spalinkDir : \"latest\";\r\n __webpack_public_path__ = host + segments.join(\"/\");\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { HeadingProps } from \"@microsoft/fast-components-react-msft\";\r\n\r\n/**\r\n * An enum for intra article component position values\r\n *\r\n * @export\r\n * @enum IntraArticleComponentPosition\r\n */\r\nexport enum IntraArticleComponentPosition {\r\n Normal = \"normal\",\r\n Wide = \"wide\"\r\n}\r\n\r\n/**\r\n * An enum for views article component types\r\n *\r\n * @export\r\n * @enum IntraArticleComponentType\r\n */\r\nexport enum IntraArticleComponentType {\r\n ArticleReader = \"articlereader\",\r\n InlineImage = \"inlineimage\",\r\n InlineSlideshow = \"inlineslideshow\",\r\n InlineVideo = \"inlinevideo\",\r\n FacebookEmbed = \"facebookembed\",\r\n TwitterEmbed = \"twitterembed\",\r\n InstagramEmbed = \"instagramembed\",\r\n GiphyEmbed = \"giphyembed\",\r\n GraphiqEmbed = \"graphiqembed\",\r\n PinterestEmbed = \"pinterestembed\",\r\n TextParagraph = \"textparagraph\",\r\n Unknown = \"unknown\"\r\n}\r\n\r\n/**\r\n * An interface for SocialEmbedData contract\r\n *\r\n * @export\r\n * @interface SocialEmbedData\r\n */\r\nexport interface SocialEmbedData {\r\n /**\r\n * Social feed attribution\r\n * @type {string}\r\n */\r\n attribution?: string;\r\n\r\n /**\r\n * Url to fetch social feed from provider\r\n * @type {string}\r\n */\r\n feedHref: string;\r\n\r\n /**\r\n * Embed identifier\r\n * @type {string}\r\n */\r\n id: string;\r\n\r\n /**\r\n * Title for the social feed\r\n * @type {string}\r\n */\r\n title?: string;\r\n\r\n /**\r\n * Social embed type\r\n * @type {IntraArticleComponentType}\r\n */\r\n type: IntraArticleComponentType;\r\n}\r\n\r\n/**\r\n * An interface for IntraArticleComponent contract\r\n *\r\n * @export\r\n * @interface IntraArticleComponent\r\n */\r\nexport interface IntraArticleComponent {\r\n /**\r\n * CMS document id\r\n * @type {string}\r\n */\r\n cmsDocumentId?: string;\r\n\r\n /**\r\n * Additional component data\r\n * @type {unknown}\r\n */\r\n data?: unknown;\r\n\r\n /**\r\n * Message to show if error encountered while loading component\r\n * @type {HeadingProps}\r\n */\r\n loadError?: HeadingProps;\r\n\r\n /**\r\n * Ingested component markup\r\n * @type {string}\r\n */\r\n marker: string;\r\n\r\n /**\r\n * Position index in ingested article body markup\r\n * @type {number}\r\n */\r\n startIndex: number;\r\n\r\n /**\r\n * Expected component positioning inside article body\r\n * @type {IntraArticleComponentPosition}\r\n */\r\n position?: IntraArticleComponentPosition;\r\n\r\n /**\r\n * Type of component\r\n * @type {IntraArticleComponentType}\r\n */\r\n type: IntraArticleComponentType;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * A callback to reset singleton data. Used for server side rendering.\r\n */\r\nexport type ResetCallback = () => void;\r\n\r\n/**\r\n * Global array of callbacks that are used for resetting singleton data.\r\n */\r\nconst resetCallbacks: ResetCallback[] = [];\r\n\r\n/**\r\n * Adds a callback to the global array of reset callbacks.\r\n * This should only be used to reset singleton data.\r\n * @param callback The function that resets the singleton data.\r\n */\r\nexport function registerResetCallback(callback: ResetCallback): void {\r\n resetCallbacks.push(callback);\r\n}\r\n\r\n/**\r\n * Calls all of the reset functions in resetCallbacks.\r\n * This gets called once on the server side at the beginning of each request.\r\n */\r\nexport function invokeResetCallbacks(): void {\r\n for (const resetCallback of resetCallbacks) {\r\n resetCallback();\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, WebWorkerErrors, logger, stringifyError, tryGetPerfTimeline, getAppErrorsPropertyBag } from \"@msnews/diagnostics\";\r\n\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\ndeclare global {\r\n /** Adding webWorker to Window */\r\n interface Window {\r\n /** Global flag indicating if web worker is present */\r\n _isWebWorkerPresent: boolean;\r\n\r\n /** Web worker instance */\r\n webWorker?: Worker;\r\n\r\n /** Web worker runtime errors */\r\n webWorkerErrors?: any[];\r\n\r\n /** Web worker messages */\r\n webWorkerMessages?: any[];\r\n }\r\n}\r\n\r\n/** Web worker request interface. */\r\nexport interface WebWorkerRequest {\r\n /** The message id. */\r\n id: string;\r\n\r\n /** The type of message. */\r\n type?: string;\r\n\r\n /** The additional message payload */\r\n payload?: any;\r\n}\r\n\r\n/** Web worker response interface. */\r\nexport interface WebWorkerResponse {\r\n /** The message id. */\r\n id: string;\r\n\r\n /** The item fetched status. */\r\n fetched: boolean;\r\n\r\n /** The item payload. */\r\n payload: T;\r\n}\r\n\r\n/**\r\n * Reports web worker presence.\r\n *\r\n * **NOTE**: Make sure to update the **_window._isWebWorkerPresent_** flag as well\r\n * while updating this, since the diagnostics lib doesn't have access to the core lib.\r\n */\r\nexport let isWebWorkerPresent: boolean;\r\n\r\n/** Web-worker message-map entry */\r\nexport interface WebWorkerMessageMapEntry {\r\n /** The message type (default is \"data\") */\r\n type: string;\r\n\r\n /** The callback, if any, that receives the data payload for the message */\r\n callback: (data: any) => void;\r\n}\r\n\r\n/** The message map from message id to the WebWorkerMessageMapEntry */\r\nconst messages = new Map();\r\n\r\nlet logAppError: (data: AppError) => void;\r\n\r\n/** The perf timeline for the web-worker interface */\r\nconst perfTimeline = tryGetPerfTimeline(\"WebWorkerUtility\", \"WebWorkerUtility\", true);\r\n\r\n/** Map to save messages that were sent from web worker but were not requested by main thread */\r\nconst standbyMessages = new Map();\r\n\r\n/**\r\n * Initialize isWebWorkerPresent. And this function also serve as test hook.\r\n * @param override - The test override\r\n */\r\nexport function init(override?: boolean): void {\r\n isWebWorkerPresent = false;\r\n if (canUseDOM()) {\r\n isWebWorkerPresent = (typeof override !== \"undefined\" ? override : !!window.webWorker);\r\n window._isWebWorkerPresent = isWebWorkerPresent;\r\n }\r\n\r\n if (!isWebWorkerPresent) {\r\n return;\r\n }\r\n\r\n window.webWorker.onmessage = (event: MessageEvent) => {\r\n const { data: response } = event;\r\n const pendingMessage = messages.get(response.id);\r\n\r\n if (!pendingMessage) {\r\n standbyMessages.set(response.id, response);\r\n return;\r\n }\r\n\r\n if (pendingMessage.type === \"data\") {\r\n messages.delete(response.id);\r\n }\r\n\r\n const callback = pendingMessage.callback;\r\n if (callback) {\r\n callback(response);\r\n }\r\n };\r\n\r\n // Process messages received before main thread initialized\r\n setTimeout(() => {\r\n if (window.webWorkerMessages && Array.isArray(window.webWorkerMessages)) {\r\n window.webWorkerMessages.forEach((response: WebWorkerResponse) => {\r\n if (!response.id) {\r\n return;\r\n }\r\n standbyMessages.set(response.id, response);\r\n });\r\n\r\n delete window.webWorkerMessages;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * This function utility is converting web worker's postMessage communication into an async function.\r\n * It's sends given request to web worker, returns a promise, and promise is resolved when response is received from web worker.\r\n * @param request - The message to send\r\n * @param timeoutInMs(optional) - Timeout in milliseconds after which the promise will resolve with the default(failed) web worker response\r\n * @returns A promise to return WebWorkerResponse\r\n */\r\nexport function getFromWebWorker(request: WebWorkerRequest, timeoutInMs?: number): Promise {\r\n const defaultResponse = {\r\n id: (request && request.id) || \"\",\r\n fetched: false,\r\n payload: null\r\n };\r\n\r\n if (!isWebWorkerPresent || !request || !request.id) {\r\n return Promise.resolve(defaultResponse);\r\n }\r\n\r\n const endGetFromWebWorker = perfTimeline && perfTimeline.startMeasure(request.id).endMeasure;\r\n\r\n // Check if web worker already sent the message with data and return it.\r\n const standbyMessageData = standbyMessages.get(request.id);\r\n\r\n if (standbyMessageData) {\r\n // Delete the message to avoid returning the same data for future requests\r\n standbyMessages.delete(request.id);\r\n\r\n if (endGetFromWebWorker) {\r\n endGetFromWebWorker(\"standbymessage\");\r\n }\r\n\r\n return Promise.resolve(standbyMessageData);\r\n }\r\n\r\n let promiseTimeout;\r\n let timeOutPromise;\r\n\r\n // If timeout is provided, create a promise that will resolve after the timeout expires\r\n if (timeoutInMs) {\r\n timeOutPromise = new Promise(resolve => {\r\n promiseTimeout = setTimeout(\r\n () => {\r\n // Request timed out, we need not process the response if it's returned later, remove from messages map\r\n messages.delete(request.id);\r\n\r\n const errorMessage = `Web worker request timed out after ${timeoutInMs}ms for request id: [${request.id}]`;\r\n\r\n if (logAppError) {\r\n logAppError({\r\n ...WebWorkerErrors.MessageTimeout,\r\n message: \"Web worker request timed out\",\r\n pb: {\r\n ...WebWorkerErrors.MessageTimeout.pb,\r\n customMessage: errorMessage\r\n }\r\n });\r\n } else {\r\n logger.logError(errorMessage);\r\n }\r\n\r\n if (endGetFromWebWorker) {\r\n endGetFromWebWorker(\"timeout\");\r\n }\r\n\r\n resolve(defaultResponse);\r\n },\r\n timeoutInMs);\r\n });\r\n }\r\n\r\n const webWorkerPromise: Promise = new Promise(\r\n resolve => {\r\n const onMessage = (response: WebWorkerResponse) => {\r\n // We got a response from web worker, clear the promise timeout if it exists.\r\n if (promiseTimeout) {\r\n clearTimeout(promiseTimeout);\r\n }\r\n\r\n if (endGetFromWebWorker) {\r\n endGetFromWebWorker();\r\n }\r\n\r\n resolve(response);\r\n };\r\n\r\n messages.set(request.id, {\r\n type: request.type || \"data\",\r\n callback: onMessage\r\n });\r\n }\r\n );\r\n\r\n window.webWorker.postMessage({\r\n id: request.id,\r\n type: request.type || \"data\",\r\n payload: request.payload\r\n });\r\n\r\n return timeoutInMs\r\n ? Promise.race([webWorkerPromise, timeOutPromise])\r\n : webWorkerPromise;\r\n}\r\n\r\n/**\r\n * Sends given request to the web worker.\r\n * @param request - The message to send\r\n */\r\nexport function sendToWebWorker(request: WebWorkerRequest): void {\r\n if (!isWebWorkerPresent || !request || !request.id) {\r\n return;\r\n }\r\n\r\n window.webWorker.postMessage({\r\n id: request.id,\r\n type: request.type || \"command\",\r\n payload: request.payload || null\r\n });\r\n}\r\n\r\n/**\r\n * Subscribes to web worker notification\r\n * @param request subscription request\r\n * @param callback the callback to execute when notification is received\r\n */\r\nexport function subscribeWebWorkerNotification(request: WebWorkerRequest, callback: (payload: any) => void): void {\r\n if (!isWebWorkerPresent || !request || request.type !== \"subscription\" || !callback) {\r\n return;\r\n }\r\n\r\n messages.set(request.id, { type: \"subscription\", callback });\r\n window.webWorker.postMessage(request);\r\n}\r\n\r\n/**\r\n * Sets the AppError logging function and adds event listener for web worker errors.\r\n * @param handler - Error tracker function\r\n */\r\nexport function trackWebWorkerErrors(trackAppErrorEvent: (data: AppError) => void): void {\r\n if (!isWebWorkerPresent || !trackAppErrorEvent || typeof trackAppErrorEvent !== \"function\") {\r\n return;\r\n }\r\n\r\n logAppError = function (data: AppError): void {\r\n try {\r\n trackAppErrorEvent(data);\r\n } catch (ex) {\r\n logger.logError(`Failed to log web worker AppError. Error: ${stringifyError(ex)}`);\r\n }\r\n };\r\n\r\n // callback for unhandled runtime exceptions\r\n window.webWorker.onerror = onWebWorkerRuntimeError;\r\n\r\n // Callback for handled errors(logger.error) in web worker\r\n const onWorkerErrorMessage = (response: WebWorkerResponse) => {\r\n if (response.payload && typeof response.payload === \"object\") {\r\n const wwAppError = response.payload as AppError;\r\n\r\n // Since web worker is not aware of certain property bag values, merge it with current values.\r\n wwAppError.pb = {\r\n ...wwAppError.pb,\r\n ...getAppErrorsPropertyBag()\r\n };\r\n\r\n logAppError(wwAppError);\r\n } else {\r\n logAppError({\r\n ...WebWorkerErrors.HandledError,\r\n message: \"Web worker error\",\r\n pb: {\r\n ...WebWorkerErrors.HandledError.pb,\r\n customMessage: JSON.stringify(response.payload || \"\")\r\n }\r\n });\r\n }\r\n };\r\n\r\n subscribeWebWorkerNotification({ id: \"WebWorkerError\", type: \"subscription\" }, onWorkerErrorMessage);\r\n\r\n // Skip the thread to capture any errors in the queue\r\n setTimeout(() => {\r\n // Read and log web worker errors that were reported before the main thread initialized.\r\n if (window.webWorkerErrors && Array.isArray(window.webWorkerErrors)) {\r\n window.webWorkerErrors.forEach(error => {\r\n onWebWorkerRuntimeError(error);\r\n });\r\n\r\n delete window.webWorkerErrors;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Handler for web worker error events\r\n * @param event web worker ErrorEvent\r\n */\r\nfunction onWebWorkerRuntimeError(event: ErrorEvent): void {\r\n // If ErrorEvent does not contain the filename, only possible reason could be that the web worker script 404ed.\r\n if (!event.filename) {\r\n isWebWorkerPresent = false;\r\n window._isWebWorkerPresent = isWebWorkerPresent;\r\n window.webWorker.terminate();\r\n\r\n logAppError({\r\n ...WebWorkerErrors.FileNotFound,\r\n message: \"Web worker script not found\",\r\n pb: {\r\n ...WebWorkerErrors.FileNotFound.pb,\r\n customMessage: JSON.stringify(getErrorDetails(event))\r\n }\r\n });\r\n\r\n return;\r\n }\r\n\r\n logAppError({\r\n ...WebWorkerErrors.RuntimeError,\r\n message: \"Web worker runtime error\",\r\n pb: {\r\n ...WebWorkerErrors.RuntimeError.pb,\r\n customMessage: JSON.stringify(getErrorDetails(event))\r\n }\r\n });\r\n}\r\n\r\n/** Extracts properties from error event. Direct JSON.stringify removes all properties except `isTrusted` */\r\nfunction getErrorDetails(error: ErrorEvent): any {\r\n return JSON.stringify({\r\n filename: error.filename,\r\n message: error.message,\r\n lineno: error.lineno\r\n });\r\n}\r\n\r\ninit();\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { PerfTimeline, logger, tryGetPerfTimeline } from \"@msnews/diagnostics\";\r\nimport { getIndexedDB, getLocationSearch, canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\nimport { UrlUtility } from \"./UrlUtility\";\r\n\r\n/**\r\n * Provides utility functions to get and set data from IndexedDB.\r\n * If dbName is not provied, this class creates a db with name MicrosoftNews.\r\n * If storeName is not provied, this class creates a table/store with name Default.\r\n * Recommended to create a new table for your feature to separate and iterate through entries quickly.\r\n * IndexedDB utility does not require stringify and json parsing so more efficient! Just store your object as value.\r\n */\r\nexport class IndexedDb {\r\n\r\n /** IndexedDb object */\r\n private idb: IDBFactory = getIndexedDB();\r\n\r\n /** IndexedDb store name */\r\n /** DO NOT PUT DOT IN THE STORE NAME. */\r\n private storeName: string;\r\n\r\n /** IndexedDb promise. Sets when IndexedDB is initialized. */\r\n private idbPromise: Promise;\r\n\r\n /** The perf timeline for this IDB instance */\r\n private perfTimeline: PerfTimeline;\r\n\r\n /**\r\n * Returns if IndexedDb is supported.\r\n * @returns true if supported else false.\r\n */\r\n public get supported(): boolean {\r\n if (!this.idb) {\r\n if (canUseDOM() && logger) {\r\n logger.log(\"window.indexedDB is not supported.\");\r\n }\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Function looks at query string param and check if IndexedDb operation is allowed or not. By default it is allowed.\r\n * @returns true if supported else false.\r\n */\r\n public get isCachingAllowed(): boolean {\r\n const searchObj = getLocationSearch();\r\n if (searchObj) {\r\n const param = UrlUtility.getQueryParameterByName(\"enableIndexedDbOperation\", searchObj);\r\n if (param) {\r\n return param.toLocaleLowerCase() === \"true\";\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Function looks at query string param and check if IndexedDb operation is allowed or not. By default it is allowed.\r\n * @returns true if supported else false.\r\n */\r\n public get isGetAllAllowed(): boolean {\r\n const searchObj = getLocationSearch();\r\n if (searchObj) {\r\n const param = UrlUtility.getQueryParameterByName(\"allowGetAllOverCursor\", searchObj);\r\n if (param) {\r\n return param.toLocaleLowerCase() === \"true\";\r\n }\r\n }\r\n\r\n if (IDBObjectStore.prototype && IDBObjectStore.prototype.getAll) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * This should be used for unit testing only.\r\n * @public\r\n * @param {IDBFactory} idb - IndexedDB object to override.\r\n */\r\n public _setIndexedDb(idb: IDBFactory): void {\r\n this.idb = idb;\r\n }\r\n\r\n /**\r\n * This should be used for unit testing only.\r\n * @public\r\n * @return {Promise} existing promise.\r\n */\r\n public _getIdbPromise(): Promise {\r\n return this.idbPromise;\r\n }\r\n\r\n /**\r\n * Returns object from IndexedDB\r\n * @public\r\n * @param {IDBValidKey} key - IndexedDB key. Typically it can be string or any supported type.\r\n * @returns Promise\r\n */\r\n public async getObject(key: IDBValidKey): Promise {\r\n let req: IDBRequest;\r\n\r\n await this.withIdbStore(\"readonly\", \"getObject\", storeCallback => {\r\n req = storeCallback.get(key);\r\n });\r\n return req.result;\r\n }\r\n\r\n /**\r\n * Return all objects from IndexedDB using getAll implementation.\r\n * @public\r\n * @returns Promise\r\n */\r\n public async getAll(): Promise {\r\n let req: IDBRequest;\r\n await this.withIdbStore(\"readonly\", \"getAll\", storeCallback => {\r\n req = storeCallback.getAll();\r\n });\r\n return req.result;\r\n }\r\n\r\n /**\r\n * Returns all objects from IndexedDB.\r\n * if getAll is supported, call it else fallback to Cursor implementation that exists on wide range of devices.\r\n * @public\r\n * @returns Promise\r\n */\r\n public async getAllObjects(): Promise {\r\n if (this.isGetAllAllowed) {\r\n return this.getAll();\r\n }\r\n\r\n const returnArray: Type[] = [];\r\n await this.withIdbStore(\"readonly\", \"getAllObjects\", storeCallback => {\r\n storeCallback.openCursor().onsuccess = function (event: any): void {\r\n const cursor = event.target && event.target.result ? event.target.result : undefined;\r\n if (cursor && cursor.value) {\r\n returnArray.push(cursor.value);\r\n cursor.continue();\r\n }\r\n };\r\n });\r\n return returnArray;\r\n }\r\n\r\n /**\r\n * Sets object into IndexedDB\r\n * @public\r\n * @param {IDBValidKey} key - IndexedDB key. Typically it can be string or any supported type.\r\n * @param {any} value - Any typed value you want to insert into IndexedDB.\r\n */\r\n public async setObject(key: IDBValidKey, value: any): Promise {\r\n return await this.withIdbStore(\"readwrite\", \"setObject\", storeCallback => {\r\n storeCallback.put(value, key);\r\n });\r\n }\r\n\r\n /**\r\n * Removes object from IndexedDB\r\n * @public\r\n * @param {IDBValidKey} key - IndexedDB key. Typically it can be string or any supported type.\r\n */\r\n public async removeObject(key: IDBValidKey): Promise {\r\n return await this.withIdbStore(\"readwrite\", \"removeObject\", storeCallback => {\r\n storeCallback.delete(key);\r\n });\r\n }\r\n\r\n /**\r\n * Removes all objects from IndexedDB\r\n * @public\r\n */\r\n public async clearObjects(): Promise {\r\n return await this.withIdbStore(\"readwrite\", \"clearObjects\", storeCallback => {\r\n storeCallback.clear();\r\n });\r\n }\r\n\r\n /**\r\n * Initialize IndexedDb.\r\n * @param idbStoreName {string} - IndexedDB store name\r\n * @param dbName {string} - Database name\r\n * @param preInitializedIdbPromise {Promise} - Optional pre-initialized promise that is fetching the {IDBDatabase} object.\r\n * Used to optimize/prime the IDB connection cost so it can be started as early as possible in the page without incurring additional cost\r\n * later when lot more things are happening on the page.\r\n */\r\n public async initializeIndexedDb(\r\n idbVersion = 1,\r\n idbStoreName = \"Default\",\r\n dbName = \"MicrosoftNews\",\r\n preInitializedIdbPromise: Promise = null\r\n ): Promise {\r\n\r\n this.storeName = idbStoreName;\r\n this.perfTimeline = tryGetPerfTimeline(`IndexedDB-${idbStoreName}`, idbStoreName);\r\n\r\n this.idbPromise = preInitializedIdbPromise || new Promise((resolve, reject) => {\r\n\r\n const endOpen = this.perfTimeline && this.perfTimeline.startMeasure(\"open\").endMeasure;\r\n const openreq = this.idb.open(dbName, idbVersion);\r\n\r\n openreq.onerror = () => {\r\n if (endOpen) { endOpen(\"error\"); }\r\n reject(openreq.error);\r\n };\r\n\r\n openreq.onsuccess = () => {\r\n if (endOpen) { endOpen(); }\r\n resolve(openreq.result);\r\n };\r\n\r\n openreq.onupgradeneeded = () => {\r\n openreq.result.createObjectStore(idbStoreName);\r\n };\r\n });\r\n }\r\n\r\n /**\r\n * Private function to set transaction.\r\n * @param type - IDB read/write mode\r\n * @param operationName - readable name to use in the app trace logging\r\n * @param callback - the callback to invoke with the IDB objectStore.\r\n * @returns {Promise} async operation that ends when the IDB transaction is complete.\r\n */\r\n private async withIdbStore(\r\n type: IDBTransactionMode,\r\n operationName: string,\r\n callback: ((store: IDBObjectStore) => void)\r\n ): Promise {\r\n\r\n return this.idbPromise.then(db => new Promise((resolve, reject) => {\r\n const endOperation = this.perfTimeline && this.perfTimeline.startMeasure(operationName).endMeasure;\r\n const transaction = db.transaction(this.storeName, type);\r\n\r\n transaction.oncomplete = () => {\r\n if (endOperation) { endOperation(); }\r\n resolve();\r\n };\r\n\r\n transaction.onabort = transaction.onerror = () =>\r\n reject(transaction.error);\r\n\r\n callback(transaction.objectStore(this.storeName));\r\n }));\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./AppError\";\r\nexport * from \"./AppErrorPropertyBag\";\r\nexport * from \"./ErrorBehavior\";\r\nexport * from \"./FetchNetworkResponse\";\r\nexport * from \"./Severity\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport enum ErrorBehavior {\r\n /** This app error can trigger exceptional behavior */\r\n Exceptional,\r\n\r\n /** This app error can trigger fallback behavior */\r\n Fallback\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * This will decide whether to create Alert for this app error or no alert. This can generate IcM ticket.\r\n * Alerts ones are tracked at http://aka.ms/AppErrors\r\n * NoAlerts will have separate tab just next to Errors aka Warnings. IcM ticket won't be generated when NoAlert is set.\r\n */\r\nexport enum Severity {\r\n /**\r\n * This is app error with default severity\r\n */\r\n Alert,\r\n\r\n /**\r\n * This is app warning\r\n */\r\n NoAlert,\r\n\r\n /**\r\n * This app error has high user impact\r\n */\r\n HighImpact,\r\n\r\n /**\r\n * This is fatal app error\r\n */\r\n Critical\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./ClientResolverConfig\";\r\nexport * from \"./ConfigCacheProperties\";\r\nexport * from \"./ConfigFetchError\";\r\nexport * from \"./ConfigFetchTiming\";\r\nexport * from \"./ConfigServiceParameters\";\r\nexport * from \"./ConfigServiceResponse\";\r\nexport * from \"./ConfigOrigin\";\r\nexport * from \"./ResolverEnvironment\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Interface for defining property if this is network failure\r\n */\r\ninterface NetworkErrorInterface {\r\n isNetworkFailure: boolean;\r\n}\r\n\r\n/**\r\n * A network-related error.\r\n */\r\nexport type NetworkError = Error & NetworkErrorInterface;\r\n\r\n/**\r\n * Extending error class to instrument if this is network failure\r\n */\r\nexport class ConfigFetchError extends Error implements NetworkErrorInterface {\r\n isNetworkFailure: boolean;\r\n\r\n constructor(message: string, isNetworkFailure: boolean) {\r\n super(message);\r\n this.isNetworkFailure = isNetworkFailure;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Contract related to local dev workflow\r\n */\r\nexport enum ConfigOrigin {\r\n // Configs are fetched from remote\r\n Production = 0,\r\n\r\n // Configs are fetched from local file system\r\n Local = 1\r\n}\r\n\r\n/**\r\n * Contract related to local dev workflow\r\n */\r\nexport interface ConfigOrigins {\r\n /** feature config */\r\n feature: ConfigOrigin;\r\n\r\n /** localization config origin*/\r\n loc: ConfigOrigin;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./IServicesEndpoints\";","\r\n// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Enum to describe screen width(column types)\r\n */\r\nexport enum ScreenWidth {\r\n OneColumn = \"OneColumn\",\r\n TwoColumn = \"TwoColumn\",\r\n ThreeColumn = \"ThreeColumn\",\r\n FourColumn = \"FourColumn\",\r\n FiveColumn = \"FiveColumn\",\r\n Any = \"Any\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./Resolver\";\r\nexport * from \"./configs\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ChildExperienceCMSConfigInfo, ChildExperienceGitConfigInfo, ConfigReference } from \"@msnews/config-data-types\";\r\n\r\nimport { ExperienceState } from \"./ExperienceState\";\r\nimport { identity } from \"lodash-es\";\r\n\r\n/**\r\n * Core config structure used to reference another experience config instance.\r\n * Note that this currently has support for both CMS & Git based config IDs.\r\n * Once the Git config migration is 100% complete, we must remove old CMS ID support.\r\n */\r\nexport type ChildExperienceConfigInfo =\r\n (ChildExperienceCMSConfigInfo | ChildExperienceGitConfigInfo)\r\n & ChildExperienceConfigInfoState;\r\n\r\n/**\r\n * Interim type used to represent either a CMS HREF string or a Git config info structure.\r\n * This is used to support the upgrade process from one-off CMS HREF references in various existing experience\r\n * configs to the propertly formed configRef structure for Git configs.\r\n *\r\n * This should be removed and replaced with just the Git config structure after 100% Git config migration.\r\n */\r\nexport type ChildExperienceHybridConfigInfo = string | ChildExperienceGitConfigInfo;\r\n\r\n/**\r\n * This represents a universal type that can represent one of the following three config info types:\r\n * - RAW CMS HREF string\r\n * - CMS config info structure\r\n * - Git config info structure\r\n *\r\n * This must be removed and replaced with the Git config info structure after 100% Git config migration.\r\n */\r\nexport type ChildExperienceUniversalConfigInfo =\r\n ChildExperienceCMSConfigInfo |\r\n ChildExperienceGitConfigInfo\r\n | string;\r\n\r\n/**\r\n * Auxiliary info regarding the child experience's current loading state.\r\n * This info is normally set dynamically during run time and is not part\r\n * of the base config structure.\r\n */\r\nexport interface ChildExperienceConfigInfoState {\r\n /**\r\n * optional experience state\r\n */\r\n state?: ExperienceState;\r\n}\r\n\r\n/**\r\n * Temporary helper to conditionally extract the experience type from either a CMS or Git config info structure.\r\n * The experience type will be returned in case of a CMS or Git config ref structure, or null, in case of a CMS HREF\r\n * This should be removed after 100% Git config migration.\r\n * @param configInfo - The config info structure for either a CMS or Git based ref\r\n * @returns the experience type for the config reference.\r\n */\r\nexport function getExperienceType(configInfo: ChildExperienceConfigInfo): string | null {\r\n return evalGitOrCmsExperienceInfo(\r\n configInfo,\r\n gitId => gitId.configRef.experienceType,\r\n cmsId => cmsId.experienceType,\r\n null\r\n );\r\n}\r\n\r\n/**\r\n * Temporary helper to conditionally extract the ID from either a CMS or Git config info structure, or CMS HREF.\r\n * This should be removed after 100% Git config migration.\r\n * @param configInfo - The config info structure for either a CMS or Git based ref, or CMS HREF\r\n * @returns A {string} if the given config ID is either a CMS config info or HREF,\r\n * or an {ConfigReference} in case the given config ID is a Git ID.\r\n */\r\nexport function getConfigId(configInfo: ChildExperienceUniversalConfigInfo): string | ConfigReference {\r\n return evalGitOrCmsExperienceInfo(\r\n configInfo,\r\n gitRef => gitRef.configRef,\r\n cmsRef => cmsRef.href,\r\n cmsHref => cmsHref\r\n );\r\n}\r\n\r\n/**\r\n * Temporary helper to conditionally extract the HREF from either a CMS or Git config info structure, or CMS HREF.\r\n * This should be removed after 100% Git config migration.\r\n * @param configInfo - The config info structure for either a CMS or Git based ref, or CMS HREF\r\n * @returns A {string} representing the CMS HREF only if the given config ID is either a CMS config info or HREF.\r\n * In case the given config ID is a Git ID, null will be returned instead.\r\n */\r\nexport function getConfigHref(configInfo: ChildExperienceUniversalConfigInfo): string | null {\r\n return evalGitOrCmsExperienceInfo(\r\n configInfo,\r\n null,\r\n cmsRef => cmsRef.href,\r\n cmsHref => cmsHref\r\n );\r\n}\r\n\r\n/**\r\n * Temporary helper to conditionally extract the Git ID from a CMS HREF or Git config ref structure.\r\n * This should be removed after 100% Git config migration.\r\n * @param configInfo - The config info structure for either a Git based ref, or CMS HREF\r\n * @returns A {ChildExperienceGitConfigInfo} if the given config ID is a Git config ref,\r\n * or null in case the given config ID is a CMS HREF.\r\n */\r\nexport function getConfigInfo(configInfo: ChildExperienceHybridConfigInfo): ChildExperienceGitConfigInfo | null {\r\n return evalGitOrCmsExperienceInfo(\r\n configInfo,\r\n identity,\r\n null,\r\n null\r\n );\r\n}\r\n\r\n/**\r\n * Temporary helper to unify converting the given config ID to a string representation.\r\n * This should be removed after 100% Git config migration.\r\n * @param configInfo - The config info for a CMS or Git config\r\n * @param instanceIdOverride - Optional instance ID override to use instead of the one in the config object\r\n * @returns A string that uniquely identifies the given config info object\r\n */\r\nexport function getConfigIdString(configInfo: ChildExperienceUniversalConfigInfo, instanceIdOverride?: string): string {\r\n return evalGitOrCmsExperienceInfo(\r\n configInfo,\r\n gitConfigInfo => `${getConfigRefString(gitConfigInfo.configRef)}_${instanceIdOverride || gitConfigInfo.instanceId || \"\"}`,\r\n cmsConfigInfo => `${cmsConfigInfo.experienceType}_${cmsConfigInfo.href}_${instanceIdOverride || cmsConfigInfo.instanceId || \"\"}`,\r\n cmsHref => `${cmsHref}_${instanceIdOverride || \"\"}`\r\n );\r\n}\r\n\r\n/**\r\n * Helper to convert a Git ID structure to a string representation.\r\n * @param configRef - The Git config ID\r\n * @returns A string that uniquely identifies the given Git config ID\r\n */\r\nexport function getConfigRefString(configRef: ConfigReference): string {\r\n return `${configRef.experienceType}_${configRef.instanceSrc}_${configRef.sharedNs || \"\"}`;\r\n}\r\n\r\n/**\r\n * Helper to conditionally check if the given a CMs/Git ID structure is valid\r\n * @param configInfo - The config info object to check\r\n * @returns True if the config info structure contains all the required fields.\r\n */\r\nexport function isValidConfigInfo(configInfo: ChildExperienceConfigInfo): boolean {\r\n return configInfo\r\n && configInfo.instanceId != null\r\n && !!evalGitOrCmsExperienceInfo(\r\n configInfo,\r\n gitInfo => gitInfo.configRef && gitInfo.configRef.experienceType && gitInfo.configRef.instanceSrc,\r\n cmsInfo => cmsInfo.experienceType && cmsInfo.href != null,\r\n null);\r\n}\r\n\r\n/**\r\n * Core helper to conditionally process/evaluate all three types of config IDs\r\n * including CMS HREF, CMS config info, or Git config info. Based on the given\r\n * config info type, one of the given callbacks will be invoked and the result\r\n * from the callback will be returned.\r\n * @param configInfo - The config info object to process\r\n * @param processGitConfigInfo - Processor callback for Git config info objects\r\n * @param processCMSConfigInfo - Processor callback for CMS config info objects\r\n * @param processCMSConfigHref - Processor callback for CMS HREF strings\r\n * @param defaultValue - The default value to return in case the config info\r\n * is invalid or does not conform to any of the known ID types.\r\n * @returns The conditional return value from one of the specified callbacks\r\n * based on the detected config info type.\r\n */\r\nexport function evalGitOrCmsExperienceInfo(\r\n configInfo: ChildExperienceUniversalConfigInfo,\r\n processGitConfigInfo?: (configRef: ChildExperienceGitConfigInfo) => T1,\r\n processCMSConfigInfo?: (cmsRef: ChildExperienceCMSConfigInfo) => T2,\r\n processCMSConfigHref?: (cmsHref: string) => T3,\r\n defaultValue?: T1 | T2 | T3\r\n): T1 | T2 | T3 | null {\r\n\r\n if (defaultValue === undefined) {\r\n defaultValue = null;\r\n }\r\n\r\n if (configInfo != null) {\r\n\r\n // process CMS HREF string\r\n if (typeof configInfo === \"string\") {\r\n return processCMSConfigHref && processCMSConfigHref(configInfo) || defaultValue;\r\n }\r\n\r\n // process Git config info object\r\n const gitRef = (configInfo as ChildExperienceGitConfigInfo);\r\n if (gitRef.configRef) {\r\n return processGitConfigInfo && processGitConfigInfo(gitRef) || defaultValue;\r\n }\r\n\r\n // process CMS config info object\r\n const cmsRef = configInfo as ChildExperienceCMSConfigInfo;\r\n if (processCMSConfigInfo) {\r\n return processCMSConfigInfo(cmsRef) || defaultValue;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport Agent from \"agentkeepalive\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\n// Keep alive agents will automatically keep outbound connections open to reduce resource usage.\r\nlet httpAgent: Agent;\r\nlet httpsAgent: Agent;\r\n\r\n/**\r\n * Augment fetch options that contains node-fetch extensions\r\n */\r\ndeclare interface RequestInit {\r\n\r\n // A string to set request's method\r\n method?: string;\r\n\r\n // whatwg/fetch standard options\r\n signal?: AbortSignal | null;\r\n\r\n // node-fetch extensions\r\n agent?: Agent | ((parsedUrl: URL) => Agent); // =null http.Agent instance, allows custom proxy, certificate etc.\r\n}\r\n\r\n/**\r\n * Wrapper class for cancelling fetch.\r\n * This is meant so AbortController is not exposed for browsers that doesn't support it.\r\n */\r\nexport class FetchAbortToken {\r\n\r\n private controller?: AbortController;\r\n\r\n /** Create controller if supported. */\r\n public constructor() {\r\n // Check browser support for AbortController. Create if supported.\r\n if (typeof AbortController !== \"undefined\") {\r\n this.controller = new AbortController();\r\n }\r\n }\r\n\r\n /** Abort fetch only if controller is available. If browser do not support AbortController then this is noop. */\r\n public abort(): boolean {\r\n if (this.controller) {\r\n this.controller.abort();\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Set AbortSignal here since no one else has access to the controller */\r\n public setAbortSignal(init: RequestInit) {\r\n if (this.controller) {\r\n init.signal = this.controller.signal;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * On server side, initialize abortable fetch with the custom http agents as soon as possible (in node.index.ts)\r\n * @param inHttpAgent the input http agent\r\n * @param inHttpsAgent the input https agent\r\n */\r\nexport function abortableFetchInitialize(inHttpAgent: Agent, inHttpsAgent: Agent) {\r\n if (httpAgent && httpsAgent) {\r\n return;\r\n }\r\n\r\n if (inHttpAgent && inHttpsAgent) {\r\n httpAgent = inHttpAgent;\r\n httpsAgent = inHttpsAgent;\r\n } else {\r\n httpAgent = new Agent();\r\n httpsAgent = new Agent.HttpsAgent();\r\n }\r\n}\r\n\r\n/**\r\n * Fetch with timeout and close connection\r\n * @param url fetch url\r\n * @param timeoutMs timeout in miliseconds before rejecting the fetch. If 0, the fetch will not timeout.\r\n * @param init fetch options\r\n * @param abortToken client provides FetchAbortToken object so it could be cancelled.\r\n */\r\nexport async function abortableFetch(url: string, timeoutMs: number, init?: RequestInit, abortToken?: FetchAbortToken): Promise {\r\n\r\n if (!abortToken) {\r\n abortToken = new FetchAbortToken();\r\n }\r\n\r\n // Setup fetch timeout if timeoutMs value is positive\r\n let timeout = null;\r\n if (timeoutMs > 0) {\r\n timeout = setTimeout(() => {\r\n const aborted = abortToken.abort();\r\n if (!aborted) {\r\n throw new Error(`Fetch for ${url} aborted due to timeout of ${timeoutMs} ms. AbortController is not supported.`);\r\n }\r\n }, timeoutMs);\r\n }\r\n\r\n if (!init) {\r\n init = {\r\n method: \"GET\"\r\n };\r\n }\r\n\r\n // Insert default http agents with keep-alive if not defined (server only)\r\n if (!canUseDOM() && !init.agent && httpAgent && httpsAgent) {\r\n const agentFunc = function (_parsedURL) {\r\n if (_parsedURL.protocol === \"http:\") {\r\n return httpAgent;\r\n } else {\r\n return httpsAgent;\r\n }\r\n };\r\n\r\n init.agent = agentFunc;\r\n }\r\n\r\n // Insert default abort controller if not defined\r\n if (!init.signal) {\r\n abortToken.setAbortSignal(init);\r\n }\r\n\r\n const requestStart = performance.now();\r\n let errorObj;\r\n let statusCode = 0;\r\n\r\n return fetch(url, init)\r\n .then((response) => {\r\n statusCode = response.status;\r\n return response;\r\n })\r\n .catch(err => {\r\n errorObj = err;\r\n if (err.name === \"AbortError\") {\r\n throw new Error(`Fetch for ${url} aborted due to timeout of ${timeoutMs} ms.`);\r\n }\r\n throw new Error(err);\r\n })\r\n .finally(() => {\r\n if (!canUseDOM()) {\r\n const serverFetchInfo = {\r\n abortableFetch: {\r\n url: url,\r\n statusCode: statusCode,\r\n timeElapsed: (performance.now() - requestStart).toFixed(2),\r\n timeOut: timeoutMs.toFixed(2),\r\n errorMessage: errorObj && errorObj.message,\r\n errorName: errorObj && errorObj.name,\r\n errorCode: errorObj && errorObj.code,\r\n errorType: errorObj && errorObj.type\r\n }\r\n };\r\n logger.logObjects(serverFetchInfo);\r\n }\r\n\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n }\r\n });\r\n}","\r\n// © Microsoft Corporation. All rights reserved.\r\n\r\nexport enum ChildExperiencesDeferRenderType {\r\n /**\r\n * Wait for all child experinces milestone load dependecies to be resolved, once all child experiences are loaded and available\r\n * triggers parent re-render. Best from perfomance standpoint as it does a single re-render of parent\r\n */\r\n batch = \"batch\",\r\n\r\n /**\r\n * Render every child experince as soon as its available after milestone load dependecies has been resolved, This is less performant as it triggers\r\n * parent re-render multiple times for each delay loaded child experience\r\n */\r\n renderWhenAvailable = \"renderWhenAvailable\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ChildExperienceConfigInfo } from \"./ChildExperienceConfigInfo\";\r\n\r\n/**\r\n * Specifies validator for child experience\r\n * @export\r\n * @interface\r\n */\r\nexport interface ChildExperienceValidator {\r\n /**\r\n * section name from where child element should be removed\r\n */\r\n sectionName: ValidatorSectionName;\r\n\r\n /**\r\n * ChildExperienceConfigInfo object to be removed\r\n */\r\n childExperienceConfigInfo: ChildExperienceConfigInfo;\r\n\r\n /**\r\n * Optional validation arguments\r\n */\r\n validationArgs?: ValidationArgs;\r\n}\r\n\r\n/**\r\n * section name from where child element should be removed. We can add more support in this list as additionalChildExperiences\r\n * or childExperienceMap. The current design and approach support that.\r\n */\r\nexport enum ValidatorSectionName {\r\n /**\r\n * Section name for River Grid children, positioned by row/column syntax\r\n */\r\n riverGridChildren = \"riverGridChildren\"\r\n}\r\n\r\n/**\r\n * Validation arguments to determine experience enable / disable\r\n * @export\r\n * @interface\r\n */\r\nexport interface ValidationArgs {\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./ActionTriggerInfo\";\r\nexport * from \"./ButtonInfo\";\r\nexport * from \"./ChildInfo\";\r\nexport * from \"./ChildrenTypes\";\r\nexport * from \"./CustomCompositionConfig\";\r\nexport * from \"./ItemInfo\";\r\nexport * from \"./ColumnConfig\";\r\nexport * from \"./FastColumnConfig\";\r\nexport * from \"./FastGridConfig\";\r\nexport * from \"./GridConfig\";\r\nexport * from \"./GridCompositionConfig\";\r\nexport * from \"./HeadingInfo\";\r\nexport * from \"./HorizontalStackConfig\";\r\nexport * from \"./LayoutConfig\";\r\nexport * from \"./PageConfig\";\r\nexport * from \"./PeregrineChildInfo\";\r\nexport * from \"./RowConfig\";\r\nexport * from \"./TypographyInfo\";\r\nexport * from \"./VerticalStackConfig\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * An enumeration of possible children types that can be rendered into a layout column\r\n */\r\nexport enum ChildrenTypes {\r\n /**\r\n * A Fast DNA ActionTrigger component\r\n */\r\n actionTrigger = \"ActionTrigger\",\r\n /**\r\n * A Fast DNA Button component\r\n */\r\n button = \"Button\",\r\n\r\n /**\r\n * A Fast DNA Heading component\r\n */\r\n heading = \"Heading\",\r\n\r\n /**\r\n * A React Peregrine Experience\r\n */\r\n peregrineExperience = \"PeregrineExperience\",\r\n\r\n /**\r\n * A Fast DNA Typography component\r\n */\r\n typography = \"Typography\",\r\n\r\n /**\r\n * A Web Component Experience\r\n */\r\n webComponentExperience = \"WebComponentExperience\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport enum ExperienceCompositionTypes {\r\n grid = \"grid\",\r\n horizontalStack = \"horizontalStack\",\r\n layout = \"layout\",\r\n verticalStack = \"verticalStack\",\r\n customExperience = \"customExperience\"\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport enum ExperienceState {\r\n /**\r\n * State when experience has not started its lifecycle events\r\n */\r\n NotStarted = 0,\r\n\r\n /**\r\n * This state is when experience is waiting to load its bundles\r\n */\r\n WaitingToLoad = 1,\r\n\r\n /**\r\n * Bundles loaded for experience and connector has been initialized\r\n */\r\n LoadedWaitingToRender = 2,\r\n\r\n /**\r\n * All milestone dependencies have been resolved for this experience and its ready to render\r\n */\r\n ReadyToRender = 3,\r\n\r\n /**\r\n * Experience failed to load\r\n */\r\n Failed = 4,\r\n\r\n /**\r\n * Experience state is not known, probably when timeout happened before dependency is resolved or dependency is on some UI event.\r\n */\r\n Unknown = 5\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./Types\";\r\nexport * from \"./ExperienceInfo\";\r\nexport * from \"./InspectorArgs\";\r\nexport * from \"./InspectorContentKey\";\r\nexport * from \"./InspectorResponse\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./DeepPartial\";\r\nexport * from \"./MapTypes\";\r\nexport * from \"./MonetizationPlacementOptions\";\r\nexport * from \"./WebClientData\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Used to define how an experience is related to monetization scenarios\r\n * that need to be accounted when selecting a certain section template.\r\n * e.g.: monetization child experiences will need to be turned off in the river\r\n * when non-monetizable experiences start being returned from OneService.\r\n */\r\nexport enum MonetizationPlacementOptions {\r\n /**\r\n * e.g.: ContentPreview, when used for cms content\r\n */\r\n Monetizable,\r\n /**\r\n * e.g.: ExternalContentPreview, when used for webcontent\r\n */\r\n NonMonetizable,\r\n /**\r\n * e.g.: DisplayAd, NativeAd or EditorChoicePromoCard (when sponsored content)\r\n */\r\n Monetization\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/** Global map for inline script so the initial cookie map is cached. */\r\nlet cookieMapInline: {[cookieName: string]: string};\r\n\r\n/**\r\n * Helper to get cookie value at inline script. This were to have minimal dependency.\r\n * Snapshot of cookies will be made and do not respect cookie changes during runtime.\r\n * @param name - The cookie name\r\n * @returns Decoded cookie value when found, otherwise null\r\n */\r\nexport function getCookieInline(name: string): string {\r\n if (!name) {\r\n return null;\r\n }\r\n\r\n if (!cookieMapInline) {\r\n const cookiePairs = document.cookie.split(\"; \");\r\n cookieMapInline = {};\r\n\r\n const length = cookiePairs && cookiePairs.length;\r\n for (let index = 0; index < length; index++) {\r\n const cookieKeyValue = cookiePairs[index].split(\"=\");\r\n cookieMapInline[cookieKeyValue[0].toLocaleLowerCase()] = decodeURIComponent(cookieKeyValue[1]);\r\n }\r\n }\r\n\r\n const normalizedName = name.toLocaleLowerCase();\r\n const cookieVal = cookieMapInline[normalizedName];\r\n return cookieVal || null;\r\n}\r\n\r\n/**\r\n * Helper to get encoded cookie value at inline script.\r\n * @param name - The cookie name\r\n * @returns Encoded cookie value when found, otherwise null\r\n */\r\nexport function getEncodedCookieInline(name: string): string {\r\n const cookieVal = getCookieInline(name);\r\n return (cookieVal && encodeURIComponent(cookieVal)) || null;\r\n}\r\n\r\n/** Only used for unit test */\r\nexport function resetCookieMapInline() {\r\n cookieMapInline = null;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TypeRampItem, typeRamp } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { TypographySize } from \"@microsoft/fast-components-react-base\";\r\nimport { memoize } from \"lodash-es\";\r\n\r\n/**\r\n * Gets the style props to add, given a typography size.\r\n * @param size The typography size.\r\n * @returns The CSS properties to apply to the element, or null if no size was given.\r\n */\r\nexport const getStyleFromTypographySize = memoize((size: TypographySize): React.CSSProperties => {\r\n if (!size) {\r\n return null;\r\n }\r\n\r\n const typeRampItem: TypeRampItem = typeRamp[\"t\" + size];\r\n return {\r\n fontSize: typeRampItem.fontSize + \"px\",\r\n lineHeight: typeRampItem.lineHeight + \"px\"\r\n };\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { UrlUtility } from \"./UrlUtility\";\r\nimport { appEnvironment } from \"../app/AppEnvironment\";\r\n\r\nexport namespace LinkNavigation {\r\n\r\n /**\r\n * URL Prefix Lookup Table Constants\r\n * @export\r\n */\r\n export const contentUrlPrefixLookup = {\r\n article: \"ar\",\r\n video: \"vi\",\r\n slideshow: \"ss\"\r\n };\r\n\r\n /**\r\n * Generates a link to a topic xfeed using the current location for the origin and\r\n * the search string (Query String Parameters) and the passed in hostPage for its verticalKey and categoryKey.\r\n * @param topicId - an Id of a topic, for example Y_46b78bbb-31c4-4fc5-8a4a-858072348d06.\r\n * @param name - the name of a topic, for example \"US News\", this parameter will be encoded.\r\n * @return {string} - The generated URL.\r\n */\r\n export function generateTopicLink(topicId: string, name: string): string {\r\n const encodedName = UrlUtility.encodeURIComponentForPrime(name).toLowerCase();\r\n const { HostPage: hostPage } = appEnvironment;\r\n const xFeedSubcategory = \"interests\";\r\n\r\n if (hostPage) {\r\n const originUrl = new URL(hostPage.originalUrl);\r\n return originUrl.origin +\r\n \"/\" + hostPage.verticalKey +\r\n \"/\" + hostPage.categoryKey +\r\n \"/\" + xFeedSubcategory +\r\n \"/\" + encodedName +\r\n \"/\" + appEnvironment.CurrentMarket +\r\n \"/f-\" + topicId +\r\n originUrl.search;\r\n } else {\r\n // We don't have a host page we recognize, so there is no way to generate a proper Xfeed page Link, so just sent them to the homepage\r\n return \"https://www.msn.com\";\r\n }\r\n }\r\n\r\n /**\r\n * Generate the link for the content using the parameters passed and locale from the app-environment\r\n * @param category localized string for category\r\n * @param subCategory localized string for sub category\r\n * @param locale locale string\r\n * @param contentId string indicating content id\r\n * @param uriTitle seo friendly headline\r\n * @param type string indicate the type of content\r\n */\r\n export function generateContentLink(category: string, subCategory: string, contentId: string, uriTitle: string, type: string): string {\r\n // If something is null/undefined, return default\r\n if (!category || !subCategory || !contentId || !uriTitle || !type) {\r\n return \"/\";\r\n }\r\n\r\n return `/${appEnvironment.CurrentMarket}/${category}/${subCategory}/${uriTitle}/${contentUrlPrefixLookup[type]}-${contentId}`;\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Returns local storage object, or null if it is not accessible.\r\n * This is minimal version used by client side inline script.\r\n */\r\nexport function getLocalStorageInline(): Storage {\r\n try {\r\n return localStorage;\r\n } catch (error) {\r\n return null;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Since it's not decided if the abbreviation should be localized,\r\n * we keep the abbreviations as \"k\" and \"M\" for now.\r\n */\r\nconst millionAbbrev = \"1M\";\r\nconst moreThanMillionAbbrev = \"1M+\";\r\nconst thousandsAbbrev = \"k\";\r\n\r\n/**\r\n * Helper function that formats number to be shown more readable using abbreviations (e.g. \"k\" for thousands)\r\n * @param count - number of comments to be formatted into easily readable string\r\n * @returns {string | number} the count of comments\r\n */\r\nexport function abbreviateNumber(count: number): string | number {\r\n if (count === undefined || count < 1) {\r\n return;\r\n } else if (count < 1000) {\r\n return count;\r\n } else if (count > 999499 && count <= 1000000) {\r\n return millionAbbrev;\r\n } else if (count > 1000000) {\r\n return moreThanMillionAbbrev;\r\n }\r\n\r\n // if number of digits would be 1 after using abbreviation (\"k\"), 1 decimal is allowed\r\n const numDigits = Math.log(count) * Math.LOG10E + 1 | 0;\r\n const decimalLength = numDigits % 3 === 1 ? 1 : 0;\r\n return roundWithPrecision(count/1000, decimalLength) + thousandsAbbrev;\r\n}\r\n\r\n/**\r\n * Helper function that rounds a number to have certain number of decimals\r\n * @param num - a number that has decimals to be rounded with precision\r\n * @param precision - a number of decimals that should be kept after rounding\r\n */\r\nfunction roundWithPrecision(num: number, precision: number): number {\r\n const prec = Math.pow(10, precision);\r\n return Math.round(num * prec)/prec;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppType, PageType } from \"@msnews/experiences-constants\";\r\nimport { Market, appEnvironment } from \"../app\";\r\n\r\nimport { headData } from \"../app/HeadData\";\r\n\r\n/**\r\n * Base class for page utility functions\r\n */\r\nexport namespace PageUtility {\r\n\r\n /**\r\n * Returns true if the current page is the DHP\r\n */\r\n export function isDhpPage(): boolean {\r\n return headData.ClientSettings.pagetype === PageType.DHP;\r\n }\r\n\r\n /**\r\n * Returns true if the current page is the NTP\r\n */\r\n export function isNtpPage(): boolean {\r\n return headData.ClientSettings.pagetype === PageType.NTP;\r\n }\r\n\r\n /**\r\n * Returns true if five column is supported or not\r\n */\r\n export function fiveColSupported(): boolean {\r\n /**\r\n * TODO: Support 5 columns\r\n */\r\n /* if (!appEnvironment) {\r\n return false;\r\n }\r\n\r\n // restrict the flight to Anaheim apptype\r\n if (appEnvironment.AppType !== AppType.EdgeChromium) {\r\n return false;\r\n }\r\n\r\n // enable five column 100% for Anaheim for listed markets\r\n return appEnvironment.CurrentMarket === Market.ENUS\r\n || appEnvironment.CurrentMarket === Market.ENCA\r\n || appEnvironment.CurrentMarket === Market.ENGB\r\n || appEnvironment.CurrentMarket === Market.DEDE\r\n || appEnvironment.CurrentMarket === Market.FRFR; */\r\n\r\n return appEnvironment.EnableFiveColLayout;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Shallow compare of two objects.\r\n * Compares reference and primitive values of both object's key-value pairs\r\n *\r\n * @param a\r\n * @param b\r\n * @returns {bool} result of comparison.\r\n */\r\nexport function ShallowCompare(a: Object, b: Object): boolean {\r\n for (const key in a) {\r\n if (!(key in b) || a[key] !== b[key]) {\r\n return false;\r\n }\r\n }\r\n\r\n for (const key in b) {\r\n if (!(key in a) || a[key] !== b[key]) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/** Detects if an entity is a string with contents */\r\nexport const stringHasLength = (s: any): boolean => {\r\n return s && typeof s === \"string\" && s.trim && !!s.trim();\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ObjectTelemetryContract, Telemetry, TelemetryObjectBase, TelemetryType } from \"@msnews/telemetry-contracts\";\r\n\r\n/**\r\n * Try creating and adding a child telemetry object to the parent object.\r\n * This is useful when you you have a list of children that will be loaded asynchronously.\r\n * Loading children asynchronously has the detrimental effect that telemetry ordinal IDs will\r\n * be non deterministically generated (as they are usually generated via in increment on the number\r\n * of existing children, and that is incremented when the child's onComponentConnect is called, which\r\n * could be at any time).\r\n * @returns the created child telemetry object.\r\n */\r\nexport function tryAddOrderedTelemetryChild(parent: TelemetryObjectBase, childExperienceType: string): TelemetryObjectBase | null {\r\n if (parent) {\r\n const telemetryContract = {\r\n type: TelemetryType.Module,\r\n name: childExperienceType,\r\n content: {}\r\n } as ObjectTelemetryContract;\r\n\r\n return parent.addOrUpdateChild(telemetryContract);\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Helper to get the ocid for the page\r\n * @returns - the ocid if avaliable, else undefined\r\n */\r\nexport function getOcid(): string | undefined {\r\n if (!Telemetry) {\r\n return;\r\n }\r\n\r\n const pageMetadata = Telemetry.getPageMetadata();\r\n\r\n if (!pageMetadata || !pageMetadata.contract || !pageMetadata.contract.page) {\r\n return;\r\n }\r\n\r\n return pageMetadata.contract.page.ocid;\r\n}\r\n\r\n/**\r\n * Appends page ocid into given URL\r\n * @param url - destination URL\r\n * @returns the modified URL if ocid not added\r\n */\r\nexport function appendOcid(url: string): string {\r\n const ocid = getOcid();\r\n const lowerCaseUrl = url.toLowerCase();\r\n if (!ocid || lowerCaseUrl.indexOf(\"?ocid=\") != -1 || lowerCaseUrl.indexOf(\"&ocid=\") != -1) {\r\n return url;\r\n }\r\n const token = (url.indexOf(\"?\") == -1) ? \"?\" : \"&\";\r\n return `${url}${token}ocid=${encodeURIComponent(ocid)}`;\r\n}","// © Microsoft Corporation. All rights reserved.\r\nexport * from \"./TelemetryContract\";\r\nexport * from \"./TelemetryEnums\";\r\nexport * from \"./TelemetryContractExtension\";\r\nexport * from \"./TelemetryConstants\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * This file defines the datatypes used in telemetry beacons.\r\n */\r\n\r\n/**\r\n * Telemetry Page Type\r\n * @enum TelemetryTelemetryPageTypeProduct\r\n */\r\nexport const TelemetryPageType = {\r\n Unspecified: \"unspecified\",\r\n DHP: \"dhp\",\r\n NTP: \"ntp\",\r\n HomePage: \"hp\",\r\n VerticalHomePage: \"verthp\",\r\n Article: \"article\",\r\n Gallery: \"gallery\",\r\n Video: \"video\",\r\n Spotlight: \"spotlight\"\r\n};\r\n\r\n/**\r\n * Telemetry Object Type. (Deprecating. Please use TelemetryContentType and TelemetryBehaviorType instead)\r\n * @enum TelemetryObjectType\r\n */\r\nexport const TelemetryType = {\r\n Undefined: 0,\r\n Header: 1,\r\n Footer: 2,\r\n TopNavBar: 3,\r\n NavBar: 4,\r\n DropDown: 5,\r\n Section: 6,\r\n Carousel: 7,\r\n Module: 8,\r\n SearchBox: 9,\r\n InputBox: 10,\r\n ActionButton: 11,\r\n Interaction: 12,\r\n Headline: 13,\r\n Entity: 15,\r\n Topic: 29,\r\n Provider: 30,\r\n NewStories: 46,\r\n AutoSuggest: 47,\r\n Tile: 49,\r\n TrendingNews: 50,\r\n AllCoverage: 51,\r\n Report: 52,\r\n MsccCookieComplianceBanner: 54,\r\n CookieWallCookieComplianceBanner: 57,\r\n FRE: 60,\r\n VideoPlayer: 61\r\n};\r\n\r\n/**\r\n * Telemetry Content Type used to describe content type that is assocated with an object\r\n * @enum TelemetryContentType\r\n */\r\nexport const TelemetryContentType = {\r\n Undefined: 0,\r\n StructuredData: 1,\r\n AppStore: 2,\r\n CmsPromotions: 3,\r\n MicrosoftWebStore: 4,\r\n XboxStore: 5,\r\n OfficeStore: 6,\r\n PartnerLinks: 7,\r\n SponsoredContent: 8,\r\n Spotlight: 9,\r\n ExternalLink: 10,\r\n SearchPromo: 11,\r\n Feed: 12,\r\n Article: 13,\r\n Gallery: 14,\r\n Video: 15,\r\n Audio: 16,\r\n Settings: 17,\r\n DisplayAd: 18,\r\n OfficeDocument: 19,\r\n App: 20,\r\n SearchResult: 21,\r\n VideoAd: 22,\r\n Map: 23,\r\n Comment: 24,\r\n Profile: 25,\r\n Coachmark: 26,\r\n TrendingSearch: 27,\r\n AutoSuggestSearch: 28,\r\n SearchHistory: 29,\r\n TextSearch: 30,\r\n TopSites: 31,\r\n SearchLink: 32,\r\n ImageSearch: 33,\r\n VoiceSearch: 34,\r\n Toast: 35,\r\n Greeting: 36,\r\n Image: 37,\r\n Banner: 38\r\n};\r\n\r\n/**\r\n * Telemetry Action Type\r\n * @enum TelemetryActionType\r\n */\r\nexport const TelemetryActionType = {\r\n Click: \"click\",\r\n Hover: \"mouseenter\",\r\n Submit: \"submit\",\r\n View: \"view\",\r\n RightClick: \"rightclick\",\r\n Wheel: \"wheel\",\r\n KeyPress: \"keypress\"\r\n};\r\n\r\n/**\r\n * Telemetry Behavior Type\r\n * @enum TelemetryBehaviorType\r\n */\r\nexport const TelemetryBehaviorType = {\r\n Undefined: 0,\r\n Navigate: 1,\r\n ContextMenu: 2,\r\n Pin: 3,\r\n Unpin: 4,\r\n Rearrange: 5,\r\n Remove: 6,\r\n Add: 7,\r\n Open: 8,\r\n View: 9,\r\n Follow: 10,\r\n Unfollow: 11,\r\n More: 12,\r\n Close: 13,\r\n Share: 14,\r\n Like: 15,\r\n Dislike: 16,\r\n Unlike: 17,\r\n Undislike: 18,\r\n Mute: 19,\r\n Unmute: 20,\r\n Cancel: 21,\r\n Launch: 22,\r\n Install: 23,\r\n Manage: 24,\r\n Show: 25,\r\n MuteCancel: 26,\r\n Save: 27,\r\n Hide: 28,\r\n Unhide: 29,\r\n Customize: 30,\r\n Suspend: 31,\r\n Clear: 32,\r\n SignIn: 33,\r\n SignOut: 34,\r\n UndoSave: 35,\r\n TurnOn: 36,\r\n TurnOff: 37,\r\n Forward: 38,\r\n Response: 39,\r\n Report: 40,\r\n ZoomIn: 41,\r\n ZoomOut: 42,\r\n Comment: 43,\r\n Sort: 44,\r\n Love: 45,\r\n Surprised: 46,\r\n Thinking: 47,\r\n Sad: 48,\r\n Angry: 49,\r\n TextSearch: 50,\r\n ImageSearch: 51,\r\n UndoRemove: 52,\r\n Rename: 53,\r\n SearchLink: 54,\r\n VoiceSearch: 55\r\n};\r\n\r\n/**\r\n * Telemetry Content Source Type\r\n * @enum TelemetryContentSourceType\r\n */\r\nexport const TelemetryContentSourceType = {\r\n Editor: 0,\r\n PersonalizationAlgo: 1,\r\n Bing: 2,\r\n Taboola: 3,\r\n Outbrain: 4,\r\n AutoCuration: 5,\r\n User: 6,\r\n AppNexus: 7,\r\n OtherSponconProvider: 8\r\n};\r\n\r\n/**\r\n * Telemetry Page Configuration\r\n * @enum TelemetryPageConfiguration\r\n */\r\nexport const TelemetryPageConfiguration = {\r\n Empty: 0,\r\n SearchBox: 1,\r\n TopSites: 2,\r\n Suggested: 4,\r\n ContentFeed: 8,\r\n WinFRE: 16,\r\n BingImage: 32,\r\n ContentBelowTheFold: 64,\r\n CustomModeOption: 128,\r\n GreetingEnabled: 256,\r\n HeadingsOnly: 512,\r\n StripeLayout: 1024,\r\n Peek: 2048\r\n};\r\n\r\n/**\r\n * Telemetry Page Product\r\n * @enum TelemetryPageProduct\r\n */\r\nexport const TelemetryPageProduct = {\r\n Emmx: \"emmx\",\r\n Prime: \"prime\",\r\n Spartan: \"spartan\",\r\n ChromeExt: \"chromeext\",\r\n IEExt: \"ieext\",\r\n Anaheim: \"anaheim\",\r\n Amp: \"amp\"\r\n};\r\n\r\n/**\r\n * Mouse click number to identify right/left/middle clicks\r\n */\r\nexport const MouseButton = {\r\n LeftClickButton: 0,\r\n MiddleClickButton: 1,\r\n RightClickButton: 2\r\n};\r\n\r\n/**\r\n * Telemetry Service Type Enum\r\n * @enum TelemetryServiceTypeEnum\r\n */\r\nexport type TelemetryServiceType = \"oneservice\";\r\n\r\n/**\r\n * Telemetry audience mode\r\n * @type TelemetryAudienceMode\r\n */\r\nexport type TelemetryAudienceMode = \"enterprise\" | \"consumer\";\r\n\r\n/**\r\n * Log type.\r\n * @type LogType\r\n */\r\nexport type LogType = \"information\" | \"error\" | \"warning\";\r\n\r\n/**\r\n * ANID cookie name.\r\n * @type ANONCookieName\r\n */\r\nexport type ANONCookieName = \"anon\" | \"app_anon\";\r\n\r\n/**\r\n * Feed layout type.\r\n * @type FeedLayout\r\n */\r\nexport type FeedLayout = \"singlecol\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n/** Telemetry attribute name */\r\nexport const TelemetryAttrName = \"data-t\";\r\n/**\r\n * Telemetry event type\r\n * @interface TelemetryEventType\r\n */\r\nexport type TelemetryEventType = \"UserAction\" | \"PageView\" | \"ContentView\" | \"AppError\" | \"LoadTime\" | \"Unload\" | \"Feedback\" | \"AdImpression\" | \"AdFeedback\" | \"VideoPlay\" | \"VideoAdPlay\" | \"ServerLog\" | \"AppPerfTrace\" | \"Auth\" | \"ClientLog\" | \"PageOutOfFocus\" | \"TraceInfo\";\r\n\r\n/**\r\n * Telemetry content view type\r\n * @interface TelemetryContentViewType\r\n */\r\nexport enum TelemetryContentViewType {\r\n Auto = \"auto\",\r\n AutoScroll = \"autoScroll\",\r\n Load = \"load\",\r\n Partial = \"partial\",\r\n Resize = \"resize\",\r\n Scroll = \"scroll\",\r\n Swipe = \"swipe\",\r\n Tap = \"tap\",\r\n View = \"view\"\r\n}\r\n\r\n/**\r\n * Dispatch event name when raising the custom page view event\r\n */\r\nexport const telemetryPageViewNotificationEvent = \"TelemetryPageViewNotificationEvent\";\r\n\r\n/**\r\n * Dispatch event name when raising the custom app error event\r\n */\r\nexport const appErrorNotificationEvent = \"AppErrorNotificationEvent\";","// © Microsoft Corporation. All rights reserved.\r\nexport * from \"./TelemetryLibraryBase\";\r\nexport * from \"./TelemetryObjectBase\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Enum to set standardized z-index values.\r\n *\r\n * // EXAMPLE:\r\n * myClass: {\r\n * \"z-index\": ZIndex.Above.toString()\r\n * }\r\n *\r\n * Use these constants to specify z-index values in the root stacking context. If you have created another stacking context,\r\n * these values will have no meaning.\r\n *\r\n * Adequate room is left in each block for additional levels to be added if needed.\r\n *\r\n * OTHER GUIDANCE:\r\n * Easily increment within a block by adding an integer like the below example.\r\n * Consider a scenario where you need to increase something just above the navigation level:\r\n *\r\n * myClass: {\r\n * \"z-index\": `${ZIndex.Nav + 1}`\r\n * }\r\n *\r\n * You may also find it useful to increment by other values in the case where you are within a given stacking context.\r\n *\r\n * Recommended reading: https://philipwalton.com/articles/what-no-one-told-you-about-z-index/\r\n *\r\n * Note: If you have a reason to use a value above CookieWall, Make sure it is not causing a compliance violation.\r\n */\r\nexport enum ZIndex {\r\n /** Use for cookie wall (Compliance). */\r\n CookieWall = 1100,\r\n\r\n /** A modal dialog that needs a button press to be dismissed. */\r\n Dialog = 900,\r\n\r\n /** Any kind of easily-dismissed flyout */\r\n Flyout = 700,\r\n\r\n /** An overlay that darkens the page to display a flyout or dialog. */\r\n Overlay = 600,\r\n\r\n /** Navigation pivots. */\r\n Nav = 500,\r\n\r\n /** Items that need to appear over the page content, like a fixed header. */\r\n Over = 300,\r\n\r\n /** Items in the main page content that need to float above the rest, like floating buttons on top of a content card. */\r\n Above = 100,\r\n\r\n /** Default browser element z-index (baseline). */\r\n Default = 0,\r\n\r\n /** Use for elements that need to live below the normal flow of the document. */\r\n Below = -1,\r\n\r\n /** Reserved for lowest elements in the stack. */\r\n Buried = -2\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\nexport * from \"./IRequestContext\";\r\nexport * from \"./RequestContext\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n/** Git configs flight treatment t with IndexedDB */\r\nexport const gitConfigsTreatmentWithIdb = \"prg-gitconfigs-t\";\r\n\r\n/** Git configs flight treatment t1 without IndexedDB */\r\nexport const gitConfigsTreatmentWithoutIdb = \"prg-gitconfigs-t1\";\r\n\r\n/** Git configs flight treatment t11 without IndexedDB */\r\nexport const gitConfigsTreatment1WithoutIdb = \"prg-gitconfigs-t11\";\r\n\r\n/**\r\n * Constants used for client resolver\r\n */\r\n// fetch type constants\r\nexport const featureManifests = \"feature-manifests\";\r\nexport const localizationManifests = \"loc-manifests\";\r\n\r\nexport const featureConfigs = \"feature-configs\";\r\nexport const localizationConfigs = \"loc-configs\";\r\n\r\n// instance constants\r\nexport const defaultInstance = \"default\";\r\n\r\n/**\r\n * Constants used for config caching\r\n */\r\nexport namespace ConfigCachingConstants {\r\n /** IndexedDB store */\r\n export const idbStoreName = \"Configurations_12\";\r\n\r\n /** IndexedDB name */\r\n export const idbName = \"wwConfigs\";\r\n\r\n /** Config staleness duration.\r\n * This is used by IndexedDB at client and ServerCache at SSR.\r\n * 604800000 = 7 days in milliseconds\r\n */\r\n export const configStalenessDuration = 604800000;\r\n\r\n /**\r\n * Default max of server side resolver's in-memory config cache.\r\n */\r\n export const serverLruConfigCacheMax = 10240;\r\n\r\n /** Idb config read promise name */\r\n export const idbInitPromiseNameKey = \"initializeIdbKey\";\r\n\r\n /** Idb config read promise name */\r\n export const idbReadPromiseNameKey = \"readConfigsFromIdbKey\";\r\n\r\n /** Idb config write promise name */\r\n export const idbWritePromiseNameKey = \"writeConfigsToIndexedDbKey\";\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, ConfigOrigin, ConfigOrigins } from \"@msnews/core-contracts\";\r\nimport { ConfigReference, ExperienceConfig } from \"@msnews/config-data-types\";\r\nimport { defaultInstance, featureConfigs, featureManifests, gitConfigsTreatmentWithIdb, localizationConfigs } from \"./Constants\";\r\n\r\nimport { ConfigCacheProperties } from \"@msnews/core-contracts\";\r\nimport { getLocationSearch } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * Get the cache key based on configRef object\r\n * @param {ConfigReference} configRef object\r\n * @returns The unique cache key from configRef\r\n */\r\nexport function getCacheKeyFromConfigRef(configRef: ConfigReference, appType?: string): string {\r\n if (!configRef) {\r\n return;\r\n }\r\n\r\n const { experienceType, instanceSrc, sharedNs } = configRef;\r\n const keys = [appType, experienceType, instanceSrc];\r\n if (sharedNs) {\r\n keys.push(sharedNs);\r\n }\r\n return keys.map(key => key || \"\").join(\"/\").toLowerCase();\r\n}\r\n\r\n/**\r\n * Map key received from CRS response to ConfigReference\r\n * @param key received in CRS response\r\n * @returns ConfigReference\r\n */\r\nexport function getConfigRefFromKey(key: string): ConfigReference {\r\n if (!key) {\r\n return null;\r\n }\r\n\r\n if (key.match(\"^shared/\")) {\r\n const [sharedPrefix, sharedNs, experienceType, instanceSrc] = key.split(\"/\");\r\n return { experienceType, instanceSrc, sharedNs };\r\n } else {\r\n const [experienceType, instanceSrc] = key.split(\"/\");\r\n return { experienceType, instanceSrc };\r\n }\r\n}\r\n\r\n/**\r\n * This function returns child configRefs\r\n * @param {ExperienceConfig} resolvedConfig: Experience resolved properties\r\n * @returns {Set} Array of Config Refs in the resolved config.\r\n */\r\nexport function getChildConfigRefs(resolvedConfig: ExperienceConfig): Set {\r\n const configRefSet = new Set();\r\n if (resolvedConfig && resolvedConfig.properties) {\r\n try {\r\n addConfigRefFromObject(resolvedConfig.properties, configRefSet);\r\n } catch (error) {\r\n // Log Error\r\n }\r\n }\r\n\r\n return configRefSet;\r\n}\r\n\r\n/**\r\n * Adds all config ref found in the object to the given set.\r\n * @param obj The object to search in.\r\n * @param indicies The set of ConfigReference to add to.\r\n */\r\nfunction addConfigRefFromObject(obj: any, indicies: Set): void {\r\n const configRef: any = obj.configRef;\r\n if (configRef && configRef.experienceType) {\r\n indicies.add(configRef);\r\n }\r\n\r\n for (const value of Object.values(obj)) {\r\n if (typeof (value) === \"object\" && value) {\r\n addConfigRefFromObject(value, indicies);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Gets Entity Reference string from entity object.\r\n * This is a combination of experienceType, instanceSrc and sharedNs (if exists), to access manifest hashes.\r\n * @param {ConfigReference} configReference config reference for the root config.\r\n * @param {boolean} isLocalizationConfig indicates if this is for localizationConfigs.\r\n * @returns {Map} returns the merged config map.\r\n */\r\nexport function getConfigReferencePath(configReference: ConfigReference, isLocalizationConfig = false): string {\r\n if (!configReference) {\r\n return;\r\n }\r\n\r\n // use default instance when it is localization configs or when instanceSrc isn't available.\r\n const instance = (isLocalizationConfig ? defaultInstance : configReference.instanceSrc) || defaultInstance;\r\n if (!configReference.sharedNs || isLocalizationConfig) {\r\n return `${configReference.experienceType}/${instance}`;\r\n } else {\r\n return `shared/${configReference.sharedNs}/${configReference.experienceType}/${instance}`;\r\n }\r\n}\r\n\r\n/**\r\n * Race between network and cache promise\r\n * Borrowed from https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook#cache-and-network-race\r\n * @param promises - Array of promises\r\n */\r\nexport function networkAndCacheRace(promises: Array>): Promise {\r\n // return a new promise\r\n return new Promise((resolve, reject) => {\r\n // iterate over each promise, 'chain' is the previously\r\n // returned value, or Promise.reject() for the first\r\n // iteration\r\n promises.reduce((chain: Promise, promise: Promise) => {\r\n // cast \"promise\" to a promise as other promise methods do\r\n promise = Promise.resolve(promise);\r\n // if this promise resolves, resolve the promise\r\n // we originally returned from networkAndCacheRace\r\n // (the resolve function ignore additional calls,\r\n // so first call wins)\r\n // Do nothing at catch because we want to wait for all promises.\r\n promise.then(resolve).catch(reject => {\r\n // do nothing\r\n });\r\n // build a chain of promises, where each catches from\r\n // the previous\r\n return chain.catch(() => {\r\n return promise;\r\n });\r\n }, Promise.reject()).catch(() => {\r\n // if we got here, none of the promises fulfilled\r\n reject(Error(\"Unable get a response from network or cache.\"));\r\n });\r\n });\r\n}\r\n\r\n/**\r\n * Return true if bundle, config and loc hash of current page is same as last page\r\n */\r\nexport function isConfigBundleLocHashSameAsLastPage(configCacheProperties: ConfigCacheProperties): boolean {\r\n if (!configCacheProperties) {\r\n return false;\r\n }\r\n\r\n const {bundleHash, lastBundleHash, configHash, lastConfigHash, locHash, lastLocHash} = configCacheProperties;\r\n if (lastBundleHash && lastBundleHash === bundleHash\r\n && lastConfigHash && lastConfigHash === configHash\r\n && lastLocHash && lastLocHash === locHash) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Send this app error\r\n * @param appError AppError to send to telemetry\r\n */\r\nexport function sendAppError(appErrorCallback: (data: AppError) => void, appError: AppError): void {\r\n if (appErrorCallback) {\r\n appErrorCallback(appError);\r\n }\r\n}\r\n\r\n/**\r\n * Check if IndexedDB caching is enabled based on the flight treatment\r\n * @param flights Array of flights\r\n * @returns true if this is git configs treatment with indexedDB caching enabled\r\n */\r\nexport function enableIdbCaching(flights: string[]): boolean {\r\n return flights && flights.indexOf(gitConfigsTreatmentWithIdb) > -1;\r\n}\r\n\r\n/**\r\n * Get build number given associated app-type from published bundle info\r\n * eg: https://assets.msn.com/bundles/v1/edgeChromium/20210112.159/v, https://assets.msn.com/bundles/v1/edgeChromium/latest/v)\r\n * This is used only in local dev/TEST scenario. Please do not use this for PROD scenarios\r\n * @param buildVersion Build version\r\n * @param appType associated app type for that build\r\n * @returns Associated build number\r\n */\r\nexport async function getBuildNumberAsync(buildVersion: string, appType: string): Promise {\r\n // Provide QSP build number override to buildVersion specified in bundleInfo\r\n let buildNumber: string;\r\n const itemParams = new URLSearchParams(getLocationSearch()).getAll(\"item\");\r\n const itemSpalink = itemParams ?\r\n itemParams.find((param) => (param && param.indexOf(\"spalink:\") === 0)) :\r\n undefined;\r\n if (itemSpalink) {\r\n buildNumber = itemSpalink.replace(\"spalink:\", \"\").replace(\"/debug\", \"\");\r\n }\r\n const build = buildNumber || buildVersion;\r\n if (!build || !appType || (build !== \"latest\" && build !== \"rolling\" &&\r\n // Check if build number doesn't look legit (eg: 20210112.159)\r\n !/^-?\\d{8}\\.\\d*$/.test(build))) {\r\n throw new Error(`Arguments are incorrect. Check buildVersion: ${build} appType: ${appType}`);\r\n }\r\n // Adding a datetime qsp to ensure we don't get cached results for assets.msn.com/bundles/v1/rolling\r\n const fetchUrl = `https://assets.msn.com/bundles/v1/${appType}/${build}/v?${(new Date()).getTime()}`;\r\n let response: Response;\r\n try {\r\n response = await fetch(fetchUrl);\r\n if (!response || !response.ok) {\r\n throw new Error(`Response not OK, Status: ${response.status}, StatusText: ${response.statusText}`);\r\n }\r\n return await response.json();\r\n } catch (error) {\r\n throw new Error(`getBuildNumberAsync Fetch Url: ${fetchUrl}, ${error}`);\r\n }\r\n}\r\n\r\n/**\r\n * Helper method that indicates whether configs matching the right config-type are from local\r\n * @param configType\r\n * @param configOrigins\r\n */\r\nexport function useLocalConfigs(configType: string, configOrigins: ConfigOrigins): boolean {\r\n return isFeatureConfigType(configType)\r\n ? isLocalOrigin(configOrigins && configOrigins.feature)\r\n : isLocalOrigin(configOrigins && configOrigins.loc);\r\n}\r\n\r\n/**\r\n * Helper method to indicate if config type is feature config related\r\n * @param configType\r\n */\r\nfunction isFeatureConfigType(configType: string): boolean {\r\n return configType === featureConfigs || configType === featureManifests;\r\n}\r\n\r\n/**\r\n * Helper method to indicate if a specific config type (feature or loc) is local\r\n * @param configOrigin\r\n */\r\nfunction isLocalOrigin(configOrigin: ConfigOrigin): boolean {\r\n return configOrigin === ConfigOrigin.Local;\r\n}\r\n\r\n/**\r\n * Helper method to set the right path to local file system in local dev work flow\r\n * @param configType loc-configs or feature-configs\r\n * @param configReference combination of experienceType, instance source and shared namespace\r\n * @param appType\r\n */\r\nexport function getLocalDevPrefix(configType: string, configReference: string, appType: string): string {\r\n const prependConfigType = configType === localizationConfigs ? \"dev/loc\" : \"prod\";\r\n const prependConfigLocation = /^shared/.test(configReference) ? configReference : `${appType}/${configReference}`;\r\n return `${prependConfigType}/${prependConfigLocation}`;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ConfigOrigins } from \"@msnews/core-contracts\";\r\nimport { memoize } from \"lodash-es\";\r\nimport { useLocalConfigs } from \"../../../utilities\";\r\n\r\n/**\r\n * BlobFetcher\r\n * This is for downloading the blob according to the url.\r\n */\r\n\r\n// todo: use PCS headdata response here for the assets.msn.com hardcoded part?\r\nconst gitConfigBaseUrl = \"https://assets.msn.com/periconfigs/\";\r\n\r\n// todo: Figure out how to not specify the port\r\nconst gitLocalConfigBaseUrl = \"https://localhost.msn.com:9000/\";\r\n\r\n// Memoize the fetchAsyncNotMemoized function to return promises when it is continuing to fetch.\r\nexport const fetchAsync = memoize(fetchAsyncNotMemoized);\r\n\r\n/**\r\n * This function fetches the file from a combination of provided relative url and the const GIT config base url.\r\n * @param relativeUrl to be used to fetch the blob\r\n * @param configType featureConfigs | featureManifests | localizationConfigs | localizationManifests configType\r\n * @param configOrigins Indicates if configs should be served from local repo\r\n */\r\nexport async function fetchAsyncNotMemoized(relativeUrl: string, configType?: string, configOrigins?: ConfigOrigins): Promise {\r\n if (!relativeUrl) {\r\n // Logs error later in ClientResolver.ts\r\n throw new Error(\"BlobFetcher.ts: Fetch Error: Relative Url is null or undefined.\");\r\n }\r\n const fetchUrl = useLocalConfigs(configType, configOrigins)\r\n ? gitLocalConfigBaseUrl + relativeUrl // File names are case sensitive for local look up but not for Azure Blob Storage\r\n : gitConfigBaseUrl + relativeUrl.toLowerCase();\r\n const fetchPromise = fetch(fetchUrl).then(response => {\r\n if (response.ok) {\r\n return response.json();\r\n }\r\n\r\n // Logs error later in ClientResolver.ts\r\n throw new Error(`Non-200 response, Status: ${response.status}, StatusText: ${response.statusText}, fetch url: ${fetchUrl}`);\r\n }).catch(error => {\r\n // Catches json parsing and fetch errors.\r\n throw new Error(`BlobFetcher.ts: Fetch Error: fetch url: ${fetchUrl}, error: ${error}.`);\r\n });\r\n\r\n return fetchPromise;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { getLocalDevPrefix, useLocalConfigs } from \"../../../utilities\";\r\n\r\nimport { ConfigOrigins } from \"@msnews/core-contracts\";\r\nimport { ExperienceIndex } from \"@msnews/config-data-types\";\r\nimport { fetchAsync } from \"./BlobFetcher\";\r\nimport { memoize } from \"lodash-es\";\r\n\r\n/**\r\n * ConfigIndexService class\r\n * This is for fetching and parsing the Config Index into an easily consumable form.\r\n */\r\nexport class ClientConfigIndexService {\r\n /** null config index fetches to note as error later */\r\n private failedConfigIndexFetches: string[] = [];\r\n\r\n /** Application Type */\r\n private appType: string;\r\n\r\n /** Indicates if configs should be served from local repo */\r\n private configOrigins: ConfigOrigins;\r\n\r\n /**\r\n * Initialize client config index service.\r\n * @param {appType} appType\r\n * @param {ConfigOrigins } Indicates if configs should be served from local repo\r\n */\r\n constructor(appType: string, configOrigins: ConfigOrigins) {\r\n this.appType = appType;\r\n this.configOrigins= configOrigins;\r\n this.fetchAndParseConfigIndex = memoize(this.fetchAndParseConfigIndex, (...args) => args.join(\"/\"));\r\n }\r\n\r\n /**\r\n * This function fetches and parses config index file from azure blob storage.\r\n * @param {string} configType config type, loc-configs or feature-configs\r\n * @param {string} configReference config reference: combination of experienceType, instance source and shared namespace.\r\n * @param {string} hashedFileName config index hashed file name from the manifest file.\r\n */\r\n public async fetchAndParseConfigIndex(configType: string, configReference: string, hashedFileName: string): Promise {\r\n // In prod scenario, we don't proceed if hashedFileName is empty\r\n // In local scenario, hashed name could be empty\r\n // If hashed file name is null/undefined AND it's not local scenario, return undefined\r\n const isLocalConfigs = useLocalConfigs(configType, this.configOrigins);\r\n if (!hashedFileName && !isLocalConfigs) {\r\n return undefined;\r\n }\r\n\r\n const relativeUrl = isLocalConfigs\r\n ? `${getLocalDevPrefix(configType, configReference, this.appType)}/index.json`\r\n : `${configType}/${configReference}/index.json/${hashedFileName}`;\r\n\r\n try {\r\n return await fetchAsync(relativeUrl, configType, this.configOrigins);\r\n } catch (error) {\r\n if (!isLocalConfigs) {\r\n this.failedConfigIndexFetches.push(error);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Returns the list of failed config index fetches\r\n */\r\n public getFailedConfigIndexFetches(): string[] {\r\n return this.failedConfigIndexFetches;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { getLocalDevPrefix, useLocalConfigs } from \"../../../utilities\";\r\n\r\nimport { ConfigOrigins } from \"@msnews/core-contracts\";\r\nimport { ExperienceConfig } from \"@msnews/config-data-types\";\r\nimport { fetchAsync } from \"./BlobFetcher\";\r\nimport { memoize } from \"lodash-es\";\r\n\r\n/**\r\n * ClientConfigService class\r\n * This is for fetching and parsing the Config into an easily consumable form.\r\n */\r\nexport class ClientConfigService {\r\n /** Array for keeping track of the null fetches */\r\n private failedConfigFetches: string[] = [];\r\n\r\n /** Application Type */\r\n private appType: string;\r\n\r\n /** Indicates if configs should be served from local repo */\r\n private configOrigins: ConfigOrigins;\r\n\r\n /**\r\n * Initialize client config service.\r\n * @param {appType} appType\r\n * @param {ConfigOrigins} Indicates if configs should be served from local repo\r\n */\r\n constructor(appType: string, configOrigins: ConfigOrigins) {\r\n this.appType = appType;\r\n this.configOrigins = configOrigins;\r\n this.fetchAndParseConfig = memoize(this.fetchAndParseConfig, (...args) => args.join(\"/\"));\r\n }\r\n\r\n /**\r\n * This function fetches and parses config file from azure blob storage.\r\n * @param {string} configType config type, loc-configs or feature-configs\r\n * @param {string} configReference config reference: combination of experienceType, instance source and shared namespace.\r\n * @param {string} configFileName config src file name.\r\n * @param {string} hashedFileName config hashed file name from the manifest file.\r\n */\r\n public async fetchAndParseConfig(configType: string, configReference: string, configFileName: string, hashedFileName: string): Promise {\r\n // In prod scenario, we don't proceed if hashedFileName is empty\r\n // In local scenario, hashed name could be empty\r\n // If hashed file name is null/undefined AND it's not local scenario, return undefined\r\n const isLocalConfigs = useLocalConfigs(configType, this.configOrigins);\r\n if (!hashedFileName && !isLocalConfigs) {\r\n return undefined;\r\n }\r\n\r\n const relativeUrl = isLocalConfigs\r\n ? `${getLocalDevPrefix(configType, configReference, this.appType)}/${configFileName}`\r\n : `${configType}/${configReference}/${configFileName}/${hashedFileName}`;\r\n\r\n try {\r\n return await fetchAsync(relativeUrl, configType, this.configOrigins);\r\n } catch (error) {\r\n if (!isLocalConfigs) {\r\n this.failedConfigFetches.push(error);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Returns the list of failed config fetches.\r\n */\r\n public getFailedConfigFetches(): string[] {\r\n return this.failedConfigFetches;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ConfigOrigins } from \"@msnews/core-contracts\";\r\nimport { Manifest } from \"@msnews/config-data-types\";\r\nimport { fetchAsync } from \"./BlobFetcher\";\r\nimport { isEmpty } from \"lodash-es\";\r\nimport { useLocalConfigs } from \"../../../utilities\";\r\n\r\n/**\r\n * Manifest Service class\r\n * This is for fetching and parsing the Manifest into an easily consumable form.\r\n */\r\nexport class ClientManifestService {\r\n /** Manifest map to quickly return already fetched manifests. */\r\n private manifestsMap: Map = new Map();\r\n\r\n /** Application Type */\r\n private appType: string;\r\n\r\n /** Indicates if configs should be served from local repo */\r\n private configOrigins: ConfigOrigins;\r\n\r\n /**\r\n * Initialize client manifest service based on app type and if configs should be served from local repo\r\n * @param appType\r\n * @param ConfigOrigins Indicates if configs should be served from local repo\r\n */\r\n constructor(appType: string, configOrigins: ConfigOrigins) {\r\n this.appType = appType;\r\n this.configOrigins= configOrigins;\r\n }\r\n\r\n /**\r\n * This function fetches and parses manifest file from azure blob storage.\r\n * @param {string} manifestType config type, loc-manifests or feature-manifests\r\n * @param {string} version build version\r\n */\r\n public async fetchAndParseManifest(manifestType: string, version: string): Promise {\r\n if (useLocalConfigs(manifestType, this.configOrigins)) {\r\n return undefined;\r\n }\r\n\r\n const relativeUrl = `${manifestType}/${this.appType}/${version}.json`;\r\n\r\n // We don't need a promise map check because it's done in BlobFetcher.\r\n if (!this.manifestsMap.has(manifestType)) {\r\n try {\r\n const manifestBlobResult = await fetchAsync(relativeUrl);\r\n this.manifestsMap.set(manifestType, manifestBlobResult);\r\n if (isEmpty(manifestBlobResult)) {\r\n throw new Error(`Manifest response is ok but empty or undefined, relative url: ${relativeUrl}`);\r\n }\r\n } catch (error) {\r\n // Update the value to null no matter what the error is.\r\n this.manifestsMap.set(manifestType, null);\r\n throw new Error(`ClientManifestService.ts: ${error}`);\r\n }\r\n }\r\n\r\n // Return for easy testing\r\n // todo: would this cause perf problem since feature manifest is huge?\r\n return this.manifestsMap.get(manifestType);\r\n }\r\n\r\n /**\r\n * Gets the hashed file name from the manifest by creating config index map key.\r\n * @param {string} configReference config reference: combination of experienceType, instance source and shared namespace.\r\n * @param {string} manifestType manifest type, feature-manifests vs localization-manifests\r\n */\r\n public getConfigIndexHashedFileName(configReference: string, manifestType: string): string {\r\n if (useLocalConfigs(manifestType, this.configOrigins)) {\r\n return undefined;\r\n }\r\n\r\n const configIndexKey = `${configReference}/index.json`;\r\n return this.getFromManifest(configIndexKey, manifestType);\r\n }\r\n\r\n /**\r\n * Gets the hashed file name from the manifest by creating config map key.\r\n * @param {string} configReference config reference made from entity information.\r\n * @param {string} configFileName config src file name.\r\n * @param {string} manifestType manifest type, feature-manifests vs localization-manifests\r\n */\r\n public getConfigHashedFileName(configReference: string, configFileName: string, manifestType: string): string {\r\n if (useLocalConfigs(manifestType, this.configOrigins)) {\r\n return undefined;\r\n }\r\n\r\n const configKey = `${configReference}/${configFileName}`;\r\n return this.getFromManifest(configKey, manifestType);\r\n }\r\n\r\n /**\r\n * Gets the value according to cache key from the local map cache.\r\n * @param {string} cacheKey cache key to read from the map, either for index or config.\r\n * @param {string} manifestType manifest type, feature-manifests vs localization-manifests\r\n */\r\n private getFromManifest(cacheKey: string, manifestType: string): string {\r\n if (!this.manifestsMap || !this.manifestsMap.get(manifestType)) {\r\n return undefined;\r\n }\r\n\r\n const manifest = this.manifestsMap.get(manifestType);\r\n if (manifest && manifest.fileHashes) {\r\n return manifest.fileHashes[cacheKey.toLowerCase()];\r\n }\r\n\r\n throw new Error(`ClientManifestService.ts: Manifest is defined but does not have fileHashes: ${cacheKey}: cacheKey snippet of manifest: ${JSON.stringify(manifest).substr(0, 100)}`);\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { isArray, mergeWith } from \"lodash-es\";\r\n\r\nimport { ExperienceConfig } from \"@msnews/config-data-types\";\r\n\r\n/**\r\n * Manifest Service class\r\n * This is for fetching and parsing the Manifest into an easily consumable form.\r\n */\r\n\r\n/**\r\n * Merges config objects.\r\n * @private\r\n * @param {ExperienceConfigWrapper[]} configs - an array of config documents\r\n * @param {string} experienceType - experienceType\r\n * @return ExperienceConfig - returns merged config based on a set of rules\r\n */\r\nexport function mergeConfigs(configs: ExperienceConfig[]): ExperienceConfig {\r\n if (!configs || configs.length < 1) {\r\n return null;\r\n }\r\n\r\n const result: ExperienceConfig = configs[0];\r\n\r\n // skip the 0th item as it is assigned to result above, only merge properties section\r\n for (let count = 1; count < configs.length; count++) {\r\n result.properties = mergeWith(result.properties, configs[count].properties, configMergeCustomizer);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Customizer for merge. We are explcitly overriding the array from taget to source. No array elements from source are preserved.\r\n * @private\r\n * @param {any} srcValue - source object to merge. Can be of type any\r\n * @param {any} objValue - target object to merge. Can be of type any\r\n * @return target Object when the type is array. Otherwise uses default behavior of merge.\r\n */\r\nfunction configMergeCustomizer(srcValue: any, objValue: any): any {\r\n if (isArray(srcValue)) {\r\n return objValue;\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { PageRequestTargetScope } from \"@msnews/config-data-types\";\r\n\r\n/**\r\n * TargetScopeMatcher\r\n * This is for comparing targetscope from the config with targetscope from the page.\r\n */\r\n\r\n/**\r\n * basic version of target scope that only checks market currently.\r\n * @private\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return boolean - true if current target scope matches with config target scope, otherwise false\r\n */\r\nexport function targetScopeMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n // if target scope is undefined for a config entry, we treat that as default config and apply it\r\n if (!configTargetScope) {\r\n return true;\r\n }\r\n\r\n return (audienceModeMatched(configTargetScope, pageTargetScope)\r\n && browserTypeMatched(configTargetScope, pageTargetScope)\r\n && deviceTypeMatched(configTargetScope, pageTargetScope)\r\n && domainMatched(configTargetScope, pageTargetScope)\r\n && experimentMatched(configTargetScope, pageTargetScope)\r\n && marketMatched(configTargetScope, pageTargetScope)\r\n && osMatched(configTargetScope, pageTargetScope)\r\n && pageTypeMatched(configTargetScope, pageTargetScope)\r\n && platformMatched(configTargetScope, pageTargetScope));\r\n}\r\n\r\n/**\r\n * function to check if current audienceMode type matches target audienceMode type\r\n * @private\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return boolean - true if current target scope audienceMode matches with config target scope audienceMode, otherwise false\r\n */\r\nfunction audienceModeMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n return !configTargetScope.audienceMode || pageTargetScope.audienceMode === configTargetScope.audienceMode;\r\n}\r\n\r\n/**\r\n * function to check if current browser type matches target browser type\r\n * @private\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return boolean - true if current target scope browser type matches with config target scope browser type, otherwise false\r\n */\r\nfunction browserTypeMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n if (!configTargetScope.browser || !configTargetScope.browser.browserType) {\r\n return true;\r\n }\r\n\r\n if (pageTargetScope.browser && pageTargetScope.browser.browserType === configTargetScope.browser.browserType &&\r\n (!configTargetScope.browser.version || pageTargetScope.browser.version === configTargetScope.browser.version)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * function to check if current device type matches target device type\r\n * @private\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return boolean - true if current target scope device type matches with config target scope device type, otherwise false\r\n */\r\nfunction deviceTypeMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n return !configTargetScope.deviceFormFactor || pageTargetScope.deviceFormFactor === configTargetScope.deviceFormFactor;\r\n}\r\n\r\n/**\r\n * Check if current domain matches target domain\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return Whether the current target scope domain matches with config target scope domain\r\n */\r\nfunction domainMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n return !configTargetScope.domain || pageTargetScope.domain === configTargetScope.domain;\r\n}\r\n\r\n/**\r\n * function to check if current experiment id matches with the requested scope experiment id.\r\n * @private\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return boolean - true if current target scope experiment matches with config target scope experiment, otherwise false\r\n */\r\nfunction experimentMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n pageTargetScope.pageExperiments = pageTargetScope.pageExperiments || [];\r\n\r\n if (typeof configTargetScope.experimentId != \"string\" || Object.keys(configTargetScope.experimentId).length === 0\r\n || pageTargetScope.pageExperiments.indexOf(configTargetScope.experimentId) >= 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Compare the strings case insensitive.\r\n * @private\r\n * @param {string} lhs The string to compare.\r\n * @param {string} rhs The string to compare against.\r\n * @return {number} - true if the strings equal case insensitive.\r\n */\r\nfunction stringsEqualCaseInsensitive(lhs: string, rhs: string): boolean {\r\n return (lhs || \"\").localeCompare(rhs || \"\", undefined, { sensitivity: \"accent\" }) === 0;\r\n}\r\n\r\n/**\r\n * function to check if current market scope match with target scope market.\r\n * @private\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return boolean - true if current target scope market matches with config target scope market, otherwise false\r\n */\r\nfunction marketMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n // if locale is not part of target scope, we assume it is applicable for all locale.\r\n // Separated out this if condition to have clarity about this behavior.\r\n if (!configTargetScope.locale) {\r\n return true;\r\n }\r\n\r\n const targetLocale = configTargetScope.locale;\r\n const currentLocale = pageTargetScope.locale;\r\n\r\n if ((!targetLocale.language || stringsEqualCaseInsensitive(targetLocale.language, currentLocale.language)) &&\r\n (!targetLocale.market || stringsEqualCaseInsensitive(targetLocale.market, currentLocale.market)) &&\r\n (!targetLocale.script || stringsEqualCaseInsensitive(targetLocale.script, currentLocale.script))) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * function to check if current operating system type matches target operating system type\r\n * @private\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return boolean - true if current target scope operating system type matches with config target scope operating system type, otherwise false\r\n */\r\nfunction osMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n return !configTargetScope.os || pageTargetScope.os === configTargetScope.os;\r\n}\r\n\r\n/**\r\n * function to check if current pagetype matches target scope\r\n * @private\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return boolean - true if current target scope pagetype matches with config target scope pagetype, otherwise false\r\n */\r\nfunction pageTypeMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n return !configTargetScope.pageType || pageTargetScope.pageType === configTargetScope.pageType;\r\n}\r\n\r\n/**\r\n * function to check if current scope platform type matches target scope platform type\r\n * @private\r\n * @param {PageRequestTargetScope} configTargetScope - experience config reference that has targetscope as child property\r\n * @param {PageRequestTargetScope} pageTargetScope - page target scope, this is the targetscope from the page HTML\r\n * @return boolean - true if current target scope platform matches with config target scope platform, otherwise false\r\n */\r\nfunction platformMatched(configTargetScope: PageRequestTargetScope, pageTargetScope: PageRequestTargetScope): boolean {\r\n return !configTargetScope.platform || pageTargetScope.platform === configTargetScope.platform;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ConfigOrigin, ConfigOrigins, ResolverEnvironment } from \"@msnews/core-contracts\";\r\nimport { ConfigReference, ExperienceConfig, ExperienceConfigLink, PageRequestTargetScope } from \"@msnews/config-data-types\";\r\nimport { featureConfigs, featureManifests, localizationConfigs, localizationManifests } from \"../../../utilities/Constants\";\r\nimport { getBuildNumberAsync, getConfigReferencePath } from \"../../../utilities/Utilities\";\r\n\r\nimport { ClientConfigIndexService } from \"./ClientConfigIndexService\";\r\nimport { ClientConfigService } from \"./ClientConfigService\";\r\nimport { ClientManifestService } from \"./ClientManifestService\";\r\nimport { mergeConfigs } from \"./ClientConfigMerger\";\r\nimport { targetScopeMatched } from \"./TargetScopeMatcher\";\r\n\r\n/**\r\n * Manifest Service class\r\n * This is for fetching and parsing the Manifest into an easily consumable form.\r\n */\r\nexport class ClientSingleConfigResolver {\r\n /** Application Type */\r\n private appType: string;\r\n\r\n /** Target Scope */\r\n private targetScope: PageRequestTargetScope;\r\n\r\n /** Build Version */\r\n private buildVersion: string;\r\n\r\n /** Client Manifest Service */\r\n private clientManifestService: ClientManifestService;\r\n\r\n /** Client Config Index Service */\r\n private clientConfigIndexService: ClientConfigIndexService;\r\n\r\n /** Client Config Service */\r\n private clientConfigService: ClientConfigService;\r\n\r\n /** Indicate if configs should be served from local repo */\r\n private configOrigins: ConfigOrigins;\r\n\r\n /** Build number associated with app type */\r\n private _buildNumber: string;\r\n\r\n /**\r\n * Initialize single config client resolver based on fetching parameters.\r\n * @param {ResolverEnvironment} resolverEnvironment\r\n */\r\n constructor(resolverEnvironment: ResolverEnvironment) {\r\n if (!resolverEnvironment\r\n || !resolverEnvironment.configServiceParameters\r\n || !resolverEnvironment.appType\r\n || !resolverEnvironment.configServiceParameters.configServiceBaseUrl\r\n || !resolverEnvironment.targetScope) {\r\n throw new Error(\"ClientSingleConfigResolver.ts: ResolverEnvironment or configServiceParameters or targetScope does not exist.\");\r\n }\r\n\r\n this.appType = resolverEnvironment.appType;\r\n this.targetScope = resolverEnvironment.targetScope;\r\n this.buildVersion = resolverEnvironment.configServiceParameters.buildVersion;\r\n this.configOrigins = resolverEnvironment.configOrigins;\r\n\r\n this.clientManifestService = new ClientManifestService(this.appType, this.configOrigins);\r\n this.clientConfigIndexService = new ClientConfigIndexService(this.appType, this.configOrigins);\r\n this.clientConfigService = new ClientConfigService(this.appType, this.configOrigins);\r\n }\r\n\r\n /**\r\n * This function fetches and parses manifest file from azure blob storage.\r\n * @param {string} configType config type, loc-configs or feature-configs\r\n * @param {string} appType application type\r\n * @param {string} version build version\r\n */\r\n public async resolveConfigAsync(entity: ConfigReference): Promise {\r\n // todo: consider using promise.then.then train to avoid awaiting for individual steps.\r\n const featureEntityReference = getConfigReferencePath(entity);\r\n const localizationEntityReference = getConfigReferencePath(entity, true);\r\n\r\n this.buildNumber = this.tryGetBuildNumber() || await getBuildNumberAsync(this.buildVersion, this.appType);\r\n\r\n // fetch the manifest files\r\n const featureManifestTask = this.clientManifestService.fetchAndParseManifest(featureManifests, this.buildNumber);\r\n const localizationManifestTask = this.clientManifestService.fetchAndParseManifest(localizationManifests, this.buildNumber);\r\n\r\n // wait for manifest fetches, they are used within ClientManifestService so no return\r\n await Promise.all([featureManifestTask, localizationManifestTask]);\r\n\r\n // try to find configIndexReference in manifest file\r\n const featureIndexHashedFileName = this.clientManifestService.getConfigIndexHashedFileName(featureEntityReference, featureManifests);\r\n const localizationIndexHashedFileName = this.clientManifestService.getConfigIndexHashedFileName(localizationEntityReference, localizationManifests);\r\n\r\n // try to get config index files\r\n const featureConfigIndexTask = this.clientConfigIndexService.fetchAndParseConfigIndex(featureConfigs, featureEntityReference, featureIndexHashedFileName);\r\n const localizationConfigIndexTask = this.clientConfigIndexService.fetchAndParseConfigIndex(localizationConfigs, localizationEntityReference, localizationIndexHashedFileName);\r\n\r\n const indexResults = await Promise.all([featureConfigIndexTask, localizationConfigIndexTask]).then((results) => {\r\n return {\r\n featureIndex: results[0],\r\n localizationIndex: results[1]\r\n };\r\n });\r\n\r\n // maybe skip these just by returning .configs of index, since its default\r\n const featureConfigPaths = indexResults.featureIndex && indexResults.featureIndex.configs || undefined;\r\n const localizationConfigPaths = indexResults.localizationIndex && indexResults.localizationIndex.configs || undefined;\r\n\r\n const configTasks: Promise[] = [];\r\n // get the config tasks according to list of config paths from the index\r\n this.fetchMathingConfigs(configTasks, featureConfigPaths, featureManifests, featureConfigs, featureEntityReference);\r\n this.fetchMathingConfigs(configTasks, localizationConfigPaths, localizationManifests, localizationConfigs, localizationEntityReference);\r\n if (configTasks.length == 0) {\r\n return undefined;\r\n }\r\n\r\n // await all the configs and merge them\r\n const configsToMerge = await Promise.all(configTasks).then(results => results);\r\n const filteredConfigs = configsToMerge.filter(config => config != null); // Remove null or undefined configs\r\n const mergedConfig = mergeConfigs(filteredConfigs);\r\n\r\n return mergedConfig;\r\n }\r\n\r\n /**\r\n * Checks if the config paths match the targetscope of the page.\r\n * If it matches, starts config fetch task and adds it to the configTasks input parameter.\r\n * @param {Promise[]} configTasks array consisting of config fetching tasks, will be updated in this function\r\n * @param {ExperienceConfigLink[]} configPaths config paths from the config index file\r\n * @param {string} manifestType config type, loc-manifests or feature-manifests\r\n * @param {string} configType config type, loc-configs or feature-configs\r\n * @param {string} configReference configReference to use when getting the hashed file name\r\n */\r\n private fetchMathingConfigs(configTasks: Promise[], configPaths: ExperienceConfigLink[], manifestType: string, configType: string, configReference: string): void {\r\n if (!configPaths || configPaths.length == 0) {\r\n return;\r\n }\r\n\r\n configPaths.forEach(configPath => {\r\n if (targetScopeMatched(configPath.targetScope, this.targetScope)) {\r\n const configFileName = configPath.src;\r\n const hashedFileName = this.clientManifestService.getConfigHashedFileName(configReference, configFileName, manifestType);\r\n configTasks.push(this.clientConfigService.fetchAndParseConfig(configType, configReference, configFileName, hashedFileName));\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Returns all failed fetches for throwing errors.\r\n */\r\n public getFailedFetches(): string[] {\r\n const allNullFetches: string[] = [];\r\n const configNullFetches = this.clientConfigService.getFailedConfigFetches();\r\n if (configNullFetches.length > 0) {\r\n allNullFetches.push(...configNullFetches);\r\n }\r\n const configIndexNullFetches = this.clientConfigIndexService.getFailedConfigIndexFetches();\r\n if (configIndexNullFetches.length > 0) {\r\n allNullFetches.push(...configIndexNullFetches);\r\n }\r\n return allNullFetches;\r\n }\r\n\r\n public get buildNumber(): string { return this._buildNumber; }\r\n public set buildNumber(value: string) { this._buildNumber = value; }\r\n\r\n /**\r\n * Returns build number if already stored or in prod scenario and returns null for local dev scenario\r\n * so that it can be fetched asynchronously later on\r\n */\r\n private tryGetBuildNumber(): string {\r\n if (this.buildNumber) {\r\n return this.buildNumber; // If it has already been set, return it\r\n } else if (this.configOrigins && this.configOrigins.feature === ConfigOrigin.Local) {\r\n return null; // First time look up for dev scenario, return null so it can be fetched asynchronously later\r\n } else { // PROD scenario\r\n return this.buildVersion; // First time look up for prod scenario. After this first lookup, stored in buildNumber\r\n }\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ConfigReference, ExperienceConfig } from \"@msnews/config-data-types\";\r\nimport { getCacheKeyFromConfigRef, getChildConfigRefs, sendAppError } from \"../../../utilities/Utilities\";\r\n\r\nimport { ClientSingleConfigResolver } from \"./ClientSingleConfigResolver\";\r\nimport { FallbackResolverAppErrors } from \"../../../utilities/ResolverAppErrors\";\r\nimport { ResolverEnvironment } from \"@msnews/core-contracts\";\r\n\r\n/**\r\n * Client resolver class\r\n * This is a fallback scenarion when CRS is not available.\r\n */\r\nexport class ClientResolver {\r\n /**\r\n * Dictionary to maintain all resolved config for internal state management\r\n * @type {Map}\r\n */\r\n private mergedConfigMap: Map = new Map();\r\n\r\n /** Application Type */\r\n private appType: string;\r\n\r\n /** Resolver Environment */\r\n private resolverEnvironment: ResolverEnvironment;\r\n\r\n /** Client Single Config Resolver */\r\n private clientSingleConfigResolver: ClientSingleConfigResolver;\r\n\r\n /**\r\n * Initialize client resolver based on fetching parameters.\r\n * @param {ResolverEnvironment} resolverEnvironment\r\n */\r\n constructor(resolverEnvironment: ResolverEnvironment) {\r\n if (!resolverEnvironment\r\n || !resolverEnvironment.configServiceParameters\r\n || !resolverEnvironment.appType\r\n || !resolverEnvironment.configServiceParameters.configServiceBaseUrl\r\n || !resolverEnvironment.targetScope) {\r\n throw new Error(\"ClientResolver.ts: ResolverEnvironment or configServiceParameters or targetScope does not exist.\");\r\n }\r\n\r\n this.resolverEnvironment = resolverEnvironment;\r\n this.appType = resolverEnvironment.appType;\r\n this.clientSingleConfigResolver = new ClientSingleConfigResolver(resolverEnvironment);\r\n }\r\n\r\n /**\r\n * Gets all the config in the config tree in a recursive manner.\r\n * @param {ConfigReference} entity entity for the root config.\r\n * @param {boolean} getFullTree indicate whether we want to load entire tree at once.\r\n * @returns {Map} returns the merged config map.\r\n */\r\n public async getConfig(entity: ConfigReference, getFullTree = false): Promise {\r\n const cacheKey = getCacheKeyFromConfigRef(entity, this.appType);\r\n\r\n // If this is not in the map, get the tree recursively and add all child configs to map\r\n if (!this.mergedConfigMap.has(cacheKey)) {\r\n await this.getConfigRecursive(entity, getFullTree);\r\n\r\n const allNullFetches = this.clientSingleConfigResolver.getFailedFetches();\r\n if (allNullFetches.length > 0) {\r\n allNullFetches.forEach((nullFetchUrl) => {\r\n sendAppError(this.resolverEnvironment.appErrorCallback,\r\n {\r\n ...FallbackResolverAppErrors.BlobFetchReturnedNull,\r\n message: \"Fetch failed for a config\",\r\n pb: {\r\n ...FallbackResolverAppErrors.BlobFetchReturnedNull.pb,\r\n customMessage: `Failed fetch url: ${nullFetchUrl}`\r\n }\r\n });\r\n });\r\n }\r\n }\r\n\r\n return this.mergedConfigMap.get(cacheKey);\r\n }\r\n\r\n /**\r\n * Get configMap downloaded by fallback resolver.\r\n */\r\n public getConfigMap(): Map {\r\n return this.mergedConfigMap;\r\n }\r\n\r\n /**\r\n * Helper function for getConfig. Gets all the config in the config tree in a recursive manner.\r\n * @param {ConfigReference} entity entity for the root config.\r\n * @param {boolean} getFullTree indicate whether we want to load entire tree at once.\r\n */\r\n public async getConfigRecursive(entity: ConfigReference, getFullTree = false): Promise {\r\n const cacheKey = getCacheKeyFromConfigRef(entity, this.appType);\r\n if (!cacheKey || this.mergedConfigMap.has(cacheKey)) {\r\n return;\r\n }\r\n\r\n try {\r\n // root of specific sub tree\r\n const mergedConfig = await this.clientSingleConfigResolver.resolveConfigAsync(entity);\r\n // add to memory even if it is undefined because we don't want to fetch fail states multiple times\r\n this.mergedConfigMap.set(cacheKey, mergedConfig);\r\n\r\n // Only fetch rest of the tree if requested.\r\n if (getFullTree) {\r\n const unresolvedConfigRefs = getChildConfigRefs(mergedConfig);\r\n if (unresolvedConfigRefs.size == 0) {\r\n return;\r\n }\r\n\r\n const configTasks = [];\r\n unresolvedConfigRefs.forEach(entity => {\r\n configTasks.push (this.getConfigRecursive(entity, getFullTree));\r\n });\r\n\r\n // if a single config fails, it fails all, exists today as well\r\n await Promise.all(configTasks);\r\n }\r\n } catch (error) {\r\n sendAppError(this.resolverEnvironment.appErrorCallback,\r\n {\r\n ...FallbackResolverAppErrors.RecursiveGetFailed,\r\n message: \"Exception in getConfig.\",\r\n pb: {\r\n ...FallbackResolverAppErrors.RecursiveGetFailed.pb,\r\n customMessage: `CacheKey: ${cacheKey} / Error: ${error}`\r\n }\r\n });\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Provides utility functions to get and set data from IndexedDB.\r\n * If dbName is not provied, this class creates a db with name MicrosoftNews.\r\n * If storeName is not provied, this class creates a table/store with name Default.\r\n * Recommended to create a new table for your feature to separate and iterate through entries quickly.\r\n * IndexedDB utility does not require stringify and json parsing so more efficient! Just store your object as value.\r\n */\r\nexport class IndexedDb {\r\n\r\n /** IndexedDb object */\r\n private idb: IDBFactory = indexedDB;\r\n\r\n /** IndexedDb store name */\r\n /** DO NOT PUT DOT IN THE STORE NAME. */\r\n private storeName: string;\r\n\r\n /** IndexedDb promise. Sets when IndexedDB is initialized. */\r\n private idbPromise: Promise;\r\n\r\n /**\r\n * Returns if IndexedDb is supported.\r\n * @returns true if supported else false.\r\n */\r\n public get supported(): boolean {\r\n if (!this.idb) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Function looks at query string param and check if IndexedDb operation is allowed or not. By default it is allowed.\r\n * @returns true if supported else false.\r\n */\r\n public get isGetAllAllowed(): boolean {\r\n if (IDBObjectStore.prototype && IDBObjectStore.prototype.getAll) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * This should be used for unit testing only.\r\n * @public\r\n * @param {IDBFactory} idb - IndexedDB object to override.\r\n */\r\n public _setIndexedDb(idb: IDBFactory): void {\r\n this.idb = idb;\r\n }\r\n\r\n /**\r\n * This should be used for unit testing only.\r\n * @public\r\n * @return {Promise} existing promise.\r\n */\r\n public _getIdbPromise(): Promise {\r\n return this.idbPromise;\r\n }\r\n\r\n /**\r\n * Returns object from IndexedDB\r\n * @public\r\n * @param {IDBValidKey} key - IndexedDB key. Typically it can be string or any supported type.\r\n * @returns Promise\r\n */\r\n public async getObject(key: IDBValidKey): Promise {\r\n let req: IDBRequest;\r\n\r\n await this.withIdbStore(\"readonly\", \"getObject\", storeCallback => {\r\n req = storeCallback.get(key);\r\n });\r\n return req.result;\r\n }\r\n\r\n /**\r\n * Return all objects from IndexedDB using getAll implementation.\r\n * @public\r\n * @returns Promise\r\n */\r\n public async getAll(): Promise {\r\n let req: IDBRequest;\r\n await this.withIdbStore(\"readonly\", \"getAll\", storeCallback => {\r\n req = storeCallback.getAll();\r\n });\r\n return req.result;\r\n }\r\n\r\n /**\r\n * Returns all objects from IndexedDB.\r\n * if getAll is supported, call it else fallback to Cursor implementation that exists on wide range of devices.\r\n * @public\r\n * @returns Promise\r\n */\r\n public async getAllObjects(): Promise {\r\n if (this.isGetAllAllowed) {\r\n return this.getAll();\r\n }\r\n\r\n const returnArray: Type[] = [];\r\n await this.withIdbStore(\"readonly\", \"getAllObjects\", storeCallback => {\r\n storeCallback.openCursor().onsuccess = function (event: any): void {\r\n const cursor = event.target && event.target.result ? event.target.result : undefined;\r\n if (cursor && cursor.value) {\r\n returnArray.push(cursor.value);\r\n cursor.continue();\r\n }\r\n };\r\n });\r\n return returnArray;\r\n }\r\n\r\n /**\r\n * Sets object into IndexedDB\r\n * @public\r\n * @param {IDBValidKey} key - IndexedDB key. Typically it can be string or any supported type.\r\n * @param {any} value - Any typed value you want to insert into IndexedDB.\r\n */\r\n public async setObject(key: IDBValidKey, value: any): Promise {\r\n return await this.withIdbStore(\"readwrite\", \"setObject\", storeCallback => {\r\n storeCallback.put(value, key);\r\n });\r\n }\r\n\r\n /**\r\n * Removes object from IndexedDB\r\n * @public\r\n * @param {IDBValidKey} key - IndexedDB key. Typically it can be string or any supported type.\r\n */\r\n public async removeObject(key: IDBValidKey): Promise {\r\n return await this.withIdbStore(\"readwrite\", \"removeObject\", storeCallback => {\r\n storeCallback.delete(key);\r\n });\r\n }\r\n\r\n /**\r\n * Removes all objects from IndexedDB\r\n * @public\r\n */\r\n public async clearObjects(): Promise {\r\n return await this.withIdbStore(\"readwrite\", \"clearObjects\", storeCallback => {\r\n storeCallback.clear();\r\n });\r\n }\r\n\r\n /**\r\n * Initialize IndexedDb.\r\n * @param idbStoreName {string} - IndexedDB store name\r\n * @param dbName {string} - Database name\r\n * @param preInitializedIdbPromise {Promise} - Optional pre-initialized promise that is fetching the {IDBDatabase} object.\r\n * Used to optimize/prime the IDB connection cost so it can be started as early as possible in the page without incurring additional cost\r\n * later when lot more things are happening on the page.\r\n */\r\n public async initializeIndexedDb(\r\n idbVersion = 1,\r\n idbStoreName = \"Default\",\r\n dbName = \"MicrosoftNews\",\r\n preInitializedIdbPromise: Promise = null\r\n ): Promise {\r\n\r\n this.storeName = idbStoreName;\r\n\r\n this.idbPromise = preInitializedIdbPromise || new Promise((resolve, reject) => {\r\n\r\n const openreq = this.idb.open(dbName, idbVersion);\r\n\r\n openreq.onerror = () => {\r\n reject(openreq.error);\r\n };\r\n\r\n openreq.onsuccess = () => {\r\n resolve(openreq.result);\r\n };\r\n\r\n openreq.onupgradeneeded = () => {\r\n openreq.result.createObjectStore(idbStoreName);\r\n };\r\n });\r\n }\r\n\r\n /**\r\n * Private function to set transaction.\r\n * @param type - IDB read/write mode\r\n * @param operationName - readable name to use in the app trace logging\r\n * @param callback - the callback to invoke with the IDB objectStore.\r\n * @returns {Promise} async operation that ends when the IDB transaction is complete.\r\n */\r\n private async withIdbStore(\r\n type: IDBTransactionMode,\r\n operationName: string,\r\n callback: ((store: IDBObjectStore) => void)\r\n ): Promise {\r\n\r\n return this.idbPromise.then(db => new Promise((resolve, reject) => {\r\n const transaction = db.transaction(this.storeName, type);\r\n\r\n transaction.oncomplete = () => {\r\n resolve();\r\n };\r\n\r\n transaction.onabort = transaction.onerror = () =>\r\n reject(transaction.error);\r\n\r\n callback(transaction.objectStore(this.storeName));\r\n }));\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError } from \"@msnews/core-contracts\";\r\n\r\n/**\r\n * Helper to create an error for logging with message and customMessage properties without having\r\n * to go manually clone the error object, or property bag, etc.\r\n * @param baseError - The base error object to use as prototype for creating the error\r\n * @param message - The custom message to use for the error\r\n * @param customMessage - The custom message that may contain strings that do not aggregate well (i.e., unique / per request data)\r\n */\r\nexport function createError(baseError: AppError, message: string, customMessage?: string): AppError {\r\n return {\r\n ...baseError,\r\n message: message || baseError.message,\r\n pb: customMessage\r\n ? { ...baseError.pb, customMessage }\r\n : baseError.pb\r\n };\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, ResolverEnvironment } from \"@msnews/core-contracts\";\r\nimport { ConfigCachingConstants, ResolverAppErrors, getCacheKeyFromConfigRef } from \"../../utilities\";\r\nimport { ConfigReference, ExperienceConfig, ExperienceConfigCachingWrapper } from \"@msnews/config-data-types\";\r\nimport { IndexedDb, createError } from \"@msnews/web-worker-shared-utils\";\r\n\r\nimport { memoize } from \"lodash-es\";\r\n\r\n/**\r\n * Type definition for cached configs in the indexed DB\r\n */\r\ntype CachedConfigsType = Map;\r\n\r\n/**\r\n * Config cache class\r\n * This interacts with browser's storage and get/set resolved and merged config(s).\r\n */\r\nexport class ConfigCache {\r\n /**\r\n * True if config caching is enabled else false.\r\n */\r\n public enableConfigCaching: boolean = this.useConfigCaching();\r\n\r\n /**\r\n * Instance of IndexedDb class\r\n */\r\n private indexedDb: IndexedDb;\r\n\r\n /**\r\n * Resolver environment properties\r\n */\r\n private resolverEnvironment: ResolverEnvironment;\r\n\r\n /**\r\n * Current Timestamp for config staleness check\r\n */\r\n private stalenessCheckTimestamp: number = new Date().getTime();\r\n\r\n /**\r\n * In-memory map storing configs before read/write to cache.\r\n */\r\n private indexedDbMap: Map = new Map();\r\n\r\n /**\r\n * True if indexedDB is already initialized\r\n */\r\n private indexedDbInitialized: boolean;\r\n\r\n /**\r\n * Read indexedDb for configs.\r\n */\r\n private readConfigsFromIdb = memoize(this._readConfigsFromIdb);\r\n\r\n /**\r\n * Function checks if ConfigCaching is enabled.\r\n * @returns true if supported else false.\r\n */\r\n private useConfigCaching(): boolean {\r\n\r\n // Dev scenario to enable/disable config service\r\n const queryParams = this.resolverEnvironment\r\n && this.resolverEnvironment.configServiceParameters\r\n && this.resolverEnvironment.queryParams;\r\n\r\n if (queryParams && queryParams[\"enableConfigCaching\"]) {\r\n return queryParams[\"enableConfigCaching\"] === \"true\";\r\n }\r\n\r\n // Enable config caching by default\r\n return true;\r\n }\r\n\r\n /**\r\n * Config resolver constructor to initialize child classes.\r\n * @param {ResolverEnvironment} resolverEnvironment\r\n */\r\n constructor(readonly environment: ResolverEnvironment, enableIdbCaching = false) {\r\n\r\n if (!environment\r\n || !environment.targetScope\r\n || !environment.appType) {\r\n throw new Error(\"ResolverEnvironment or targetScope or appType does not exist.\");\r\n }\r\n\r\n // Memoize the indexedDB function to protect from being called again\r\n this.initializeIdb = memoize(this.initializeIdb);\r\n\r\n this.resolverEnvironment = environment;\r\n this.indexedDb = new IndexedDb();\r\n\r\n // Do not need to init IDB if IDB caching is disabled\r\n if (enableIdbCaching) {\r\n this.initializeIdb();\r\n }\r\n }\r\n\r\n /**\r\n * Fast helper to try to get it directly from cache so callers do not have to go through\r\n * additional async layers to get to the result if we've already loaded up the memory map.\r\n * @param configRef - The config ref to get from memory cache.\r\n */\r\n public tryGetConfigSync(configRef: ConfigReference): ExperienceConfig | undefined {\r\n if (configRef) {\r\n const cacheKey = getCacheKeyFromConfigRef(configRef, this.resolverEnvironment.appType);\r\n return this.indexedDbMap.get(cacheKey);\r\n }\r\n }\r\n\r\n /**\r\n * This function returns resolve and merge config from browser cache.\r\n * @param {ConfigReference} configRef: The identity structure that uniquely identifies a single instance of an experience\r\n * @returns {Promise} experienceConfig from cache\r\n */\r\n public async getConfig(configRef: ConfigReference): Promise {\r\n if (!configRef) {\r\n return;\r\n }\r\n\r\n const cacheKey = getCacheKeyFromConfigRef(configRef, this.resolverEnvironment.appType);\r\n\r\n // If this config exist in memory, return else read from cache.\r\n if (!this.indexedDbMap.has(cacheKey)) {\r\n await this.readConfigsFromIdb();\r\n }\r\n\r\n return this.indexedDbMap.get(cacheKey);\r\n }\r\n\r\n /**\r\n * Update IndexedDB configs from network configs.\r\n * @param configMap\r\n */\r\n public async updateCache(configMap: Map): Promise {\r\n if (!configMap) {\r\n return;\r\n }\r\n\r\n configMap.forEach((experienceConfig, cacheKey) => {\r\n if (experienceConfig) {\r\n const config: ExperienceConfigCachingWrapper = {\r\n storageTimestamp: this.stalenessCheckTimestamp,\r\n configRefCacheKey: cacheKey,\r\n properties: experienceConfig.properties\r\n };\r\n this.indexedDbMap.set(cacheKey, config);\r\n }\r\n });\r\n\r\n await this.writeConfigMapToIdb();\r\n }\r\n\r\n /**\r\n * Init indexedDb.\r\n */\r\n private async initializeIdb(): Promise {\r\n if (!this.enableConfigCaching) {\r\n return;\r\n }\r\n\r\n try {\r\n\r\n const idbConfigOpenPromise = this.resolverEnvironment.configCacheProperties && this.resolverEnvironment.configCacheProperties.idbConfigOpenPromise;\r\n await this.indexedDb.initializeIndexedDb(1, ConfigCachingConstants.idbStoreName, ConfigCachingConstants.idbName, idbConfigOpenPromise);\r\n this.indexedDbInitialized = true;\r\n this.logMessage(\"IndexedDB initialized.\");\r\n\r\n } catch (e) {\r\n this.enableConfigCaching = false;\r\n this.sendAppError(createError(\r\n ResolverAppErrors.IndexedDbInitFailed,\r\n \"Failed to init configs IndexedDB\",\r\n e\r\n ));\r\n }\r\n }\r\n\r\n /**\r\n * Get cached Configs from IndexedDb and populate configMap based on target scope key.\r\n */\r\n private async _readConfigsFromIdb(): Promise {\r\n if (!this.enableConfigCaching) {\r\n return;\r\n }\r\n\r\n // Check if IndexedDB was initialized\r\n if (!this.indexedDbInitialized) {\r\n await this.initializeIdb();\r\n }\r\n\r\n try {\r\n // This is indexedDB cache key and all configs are stored as a value with this key.\r\n const indexedDbKey = this.generateIdbKey();\r\n let cachedConfigs: CachedConfigsType;\r\n let cacheSource: string;\r\n\r\n const { idbConfigLookup = null, idbConfigReadPromise = null } = this.resolverEnvironment.configCacheProperties || {};\r\n\r\n // Check if we have a top page-level initialized IDB read config lookup populated\r\n // with the specific entry we need, and if so use it. Otherwise proceed to load from indexDB\r\n cachedConfigs = (idbConfigLookup || {})[indexedDbKey] as CachedConfigsType;\r\n if (cachedConfigs) {\r\n cacheSource = \"pre-initialized config cache\";\r\n\r\n } else if (idbConfigReadPromise) {\r\n // see if we have the pre-initialized config read promise from IDB, and if so\r\n // await on that instead of starting our own duplicate IDB init/read.\r\n cacheSource = \"pre-initialized IndexedDb read\";\r\n await idbConfigReadPromise;\r\n cachedConfigs = (idbConfigLookup || {})[indexedDbKey] as CachedConfigsType;\r\n } else {\r\n // start our own IDB read.\r\n cacheSource = \"IndexedDb bulk read\";\r\n cachedConfigs = await this.indexedDb.getObject>(indexedDbKey);\r\n }\r\n\r\n if (!cachedConfigs) {\r\n this.logMessage(`readConfigsFromIdb: Didn't find any config in IndexedDB. CacheSource: ${cacheSource}`);\r\n } else {\r\n // targetScopeKey is inserted into IndexedDb along with configIndexHref.\r\n // Although there can be more than type of keys being formed since DHP and NTP will have different ones due to pageType in targetScope.\r\n cachedConfigs.forEach(cachedConfig => {\r\n if (cachedConfig.configRefCacheKey\r\n && !this.isConfigStale(cachedConfig.storageTimestamp)) {\r\n this.indexedDbMap.set(cachedConfig.configRefCacheKey, cachedConfig);\r\n }\r\n });\r\n\r\n this.logMessage(`readConfigsFromIdb: Configs in IndexedDB: ${cachedConfigs.size}. Configs in memory: ${this.indexedDbMap.size}. CacheSource: ${cacheSource}.`);\r\n }\r\n } catch (e) {\r\n this.sendAppError(createError(\r\n ResolverAppErrors.IndexedDbReadFailed,\r\n \"IndexedDb Configs read failed\",\r\n e\r\n ));\r\n }\r\n }\r\n\r\n /**\r\n * Write in-memory configs to indexedDb.\r\n */\r\n private async writeConfigMapToIdb(): Promise {\r\n if (!this.enableConfigCaching || !this.indexedDbMap) {\r\n return;\r\n }\r\n\r\n // Check if IndexedDB was initialized\r\n if (!this.indexedDbInitialized) {\r\n await this.initializeIdb();\r\n }\r\n\r\n try {\r\n // This is indexedDB cache key and all configs are stored as a value with this key.\r\n const indexedDbKey = this.generateIdbKey();\r\n await this.indexedDb.setObject(indexedDbKey, this.indexedDbMap);\r\n this.logMessage(\"writeConfigMapToIdb: completed\");\r\n\r\n } catch (e) {\r\n this.sendAppError(createError(\r\n ResolverAppErrors.IndexedDbWriteFailed,\r\n \"Failed to write configMap to indexedDb\",\r\n e\r\n ));\r\n }\r\n }\r\n\r\n /**\r\n * This function generates a key that is used to write/read configurations to/from storage.\r\n * example key: \"kids|ja|jp|testPage|mmx\"\r\n * @private\r\n * @return string\r\n */\r\n private generateIdbKey(): string {\r\n const { audienceMode = \"\", locale = {}, pageType = \"\" } = this.resolverEnvironment.targetScope || {};\r\n const { language, market } = locale;\r\n\r\n const keys = [audienceMode, language, market, pageType, this.resolverEnvironment.appType || \"\"];\r\n return keys.map(key => key || \"\").join(\"|\").toLowerCase();\r\n }\r\n\r\n /**\r\n * Function to check config is stale.\r\n * @returns true if stale else false.\r\n */\r\n private isConfigStale(storageTimestamp: number): boolean {\r\n return !storageTimestamp || (this.stalenessCheckTimestamp - storageTimestamp) > ConfigCachingConstants.configStalenessDuration;\r\n }\r\n\r\n /**\r\n * Send this app error\r\n * @param appError AppError to send to telemetry\r\n */\r\n private sendAppError(appError: AppError): void {\r\n if (this.resolverEnvironment.appErrorCallback) {\r\n this.resolverEnvironment.appErrorCallback(appError);\r\n }\r\n }\r\n\r\n /**\r\n * Log message if debug is chosen\r\n * @param message to log\r\n */\r\n private logMessage(message: string): void {\r\n if (this.resolverEnvironment.loggerCallback) {\r\n this.resolverEnvironment.loggerCallback(message);\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, ConfigServiceResponse, ResolverEnvironment } from \"@msnews/core-contracts\";\r\nimport { ConfigCrsFetchNon200Response, ResolverAppErrors, getCacheKeyFromConfigRef, getConfigRefFromKey } from \"../utilities\";\r\nimport { ConfigReference, ExperienceConfig } from \"@msnews/config-data-types\";\r\n\r\nimport { createError } from \"@msnews/web-worker-shared-utils\";\r\n\r\n/**\r\n * Config service class\r\n * This interacts with CRS and gets resolved and merged config\r\n */\r\nexport class ConfigService {\r\n /**\r\n * Config service params appended\r\n */\r\n private configServiceParams: string;\r\n\r\n /**\r\n * Dictionary to maintain all resolved config for internal state management\r\n * @type {Map}\r\n */\r\n private configMap: Map = new Map();\r\n\r\n /**\r\n * True if config service is enabled else false.\r\n */\r\n private enableConfigService = true;\r\n\r\n /**\r\n * Dictionary to maintain all promise objects which are not resolved/rejected. Once promise object is resolved/rejected,\r\n * it gets deleted from this dictionary and put in the configMap.\r\n * @type {Map>}\r\n */\r\n private configPromiseMap: Map> = new Map();\r\n\r\n /**\r\n * If config service returns specific error code, then try fallback resolver.\r\n */\r\n private _shouldTryFallbackResolver = true;\r\n\r\n /**\r\n * If CRS fetch had network error\r\n */\r\n private _hadNetworkError = false;\r\n\r\n /**\r\n * If CRS fetch had network error\r\n */\r\n public get hadNetworkError(): boolean {\r\n return this._hadNetworkError;\r\n }\r\n\r\n /**\r\n * If config service returns specific error code, then try fallback resolver.\r\n */\r\n public get shouldTryFallbackResolver(): boolean {\r\n return this._shouldTryFallbackResolver;\r\n }\r\n\r\n /**\r\n * Returns true if config service is enabled\r\n */\r\n public get configServiceEnabled(): boolean {\r\n return this.enableConfigService;\r\n }\r\n\r\n /**\r\n * Returns config service query params\r\n */\r\n public get configServiceQueryParams(): string {\r\n return this.configServiceParams;\r\n }\r\n\r\n /**\r\n * Initialize config service based on ResolverEnvironment\r\n * @param {ResolverEnvironment} resolverEnvironment\r\n */\r\n constructor(readonly resolverEnvironment: ResolverEnvironment) {\r\n if (!resolverEnvironment\r\n || !resolverEnvironment.configServiceParameters\r\n || !resolverEnvironment.appType\r\n || !resolverEnvironment.configServiceParameters.configServiceBaseUrl\r\n || !resolverEnvironment.targetScope) {\r\n this.enableConfigService = false;\r\n throw new Error(\"ResolverEnvironment or configServiceParameters or targetScope does not exist.\");\r\n }\r\n\r\n this.shouldUseConfigService();\r\n this.setConfigServiceParams();\r\n }\r\n\r\n /**\r\n * Set query param from CRS request configurations\r\n */\r\n private setConfigServiceParams(): void {\r\n const { appType, configServiceParameters, targetScope } = this.resolverEnvironment;\r\n const { maxDepth, buildVersion } = configServiceParameters;\r\n\r\n // Send PCS apptype to CRS so we can build CRS Jarvis dashboards per apptype.\r\n let configServiceParams = `apptype=${appType}`;\r\n\r\n // Add client build version\r\n configServiceParams += `&v=${buildVersion}`;\r\n\r\n // Query string parameter from target scope.\r\n configServiceParams += \"&targetScope=\" + JSON.stringify(targetScope);\r\n\r\n // Add maxDepth if exist. Mostly for dev scenario\r\n if (maxDepth) {\r\n configServiceParams += `&maxDepth=${maxDepth}`;\r\n }\r\n\r\n // If url has dev only query string params, inform CRS so it can exclude from availability and will help debugging on Jarvis.\r\n if (this.containsDevOnlyQueryParameters()) {\r\n configServiceParams += \"&citem=dev:true\";\r\n }\r\n\r\n this.configServiceParams = configServiceParams;\r\n }\r\n\r\n /**\r\n * Function checks if ConfigService is enabled.\r\n * @returns true if supported else false.\r\n */\r\n private shouldUseConfigService(): void {\r\n // Dev scenario to enable/disable config service\r\n const queryParams = this.resolverEnvironment\r\n && this.resolverEnvironment.configServiceParameters\r\n && this.resolverEnvironment.queryParams;\r\n if (queryParams && queryParams[\"enableConfigService\"]) {\r\n this.enableConfigService = queryParams[\"enableConfigService\"] === \"true\";\r\n }\r\n }\r\n\r\n /**\r\n * Function checks if url has any dev only query string param\r\n * @returns true if exist else false.\r\n */\r\n private containsDevOnlyQueryParameters(): boolean {\r\n const queryParams = this.resolverEnvironment.queryParams;\r\n if (!queryParams) {\r\n return false;\r\n }\r\n\r\n const item = queryParams[\"item\"];\r\n if (item && item.length > 0) {\r\n return true;\r\n }\r\n\r\n const citem = queryParams[\"citem\"];\r\n if (citem) {\r\n return true;\r\n }\r\n\r\n const segment = queryParams[\"pcsonly\"];\r\n if (segment) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Returns in-memory configs\r\n * @returns Map\r\n */\r\n public getConfigMap(): Map {\r\n return this.configMap;\r\n }\r\n\r\n /**\r\n * Fast helper to try to get it directly from cache so callers do not have to go through\r\n * additional async layers to get to the result if we've already loaded up the memory map.\r\n * @param configRef - The config ref to get from memory cache.\r\n */\r\n public tryGetConfigSync(configRef: ConfigReference): ExperienceConfig | undefined {\r\n if (configRef) {\r\n const cacheKey = this.getCacheKeyFromConfigRef(configRef);\r\n return this.configMap.get(cacheKey);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the resolved merged Experience config from CRS.\r\n * @param {ConfigReference} configRef object\r\n * @return Promise\r\n */\r\n public async getConfig(configRef: ConfigReference): Promise {\r\n // If request configurations aren't available, throw error.\r\n if (!this.resolverEnvironment.configServiceParameters || !this.resolverEnvironment.targetScope || !configRef) {\r\n return Promise.reject(Error(\"Either of configServiceParameters, targetScope or configRef is not set correctly.\"));\r\n }\r\n\r\n // Return if config service is not enabled.\r\n if (!this.enableConfigService) {\r\n this._shouldTryFallbackResolver = true;\r\n return;\r\n }\r\n\r\n // Get cache key from experience type and other meta data.\r\n const cacheKey = this.getCacheKeyFromConfigRef(configRef);\r\n\r\n // Return config is already present in the memory cache.\r\n if (this.configMap.has(cacheKey)) {\r\n return this.configMap.get(cacheKey);\r\n }\r\n\r\n // if configPromiseMap has the item, we already have an active promise which is not yet resolved/rejected. Return this promise\r\n if (this.configPromiseMap.has(cacheKey)) {\r\n return this.configPromiseMap.get(cacheKey);\r\n }\r\n\r\n // Process config from network\r\n const configPromise = new Promise(async (resolve, reject) => {\r\n try {\r\n\r\n await this.getConfigTreeFromCrs(configRef);\r\n resolve(this.configMap.get(cacheKey));\r\n\r\n } catch (error) {\r\n\r\n this.sendAppError(createError(\r\n ResolverAppErrors.GetConfigException,\r\n `Exception in getConfig for ${cacheKey}`,\r\n error\r\n ));\r\n\r\n // If we don't explicitly catch the error, then the promise never gets rejected which might cause issues during experience load time.\r\n reject(error);\r\n\r\n } finally {\r\n this.configPromiseMap.delete(cacheKey);\r\n }\r\n });\r\n\r\n // if caller is using await then this request has been processed and we should not add it to configPromiseMap.\r\n // if caller is trying to download multiple configs in parallel, then processed should be false.\r\n this.configPromiseMap.set(cacheKey, configPromise);\r\n\r\n return configPromise;\r\n }\r\n\r\n /**\r\n * Fetch configs from CRS and add them to in-memory cache.\r\n * @param {ConfigReference} configRef object\r\n */\r\n private async getConfigTreeFromCrs(configRef: ConfigReference): Promise {\r\n try {\r\n const crsResponse = await this.downloadFromCrs(configRef);\r\n\r\n const configs = crsResponse && crsResponse.configs;\r\n if (!configs) {\r\n return;\r\n }\r\n\r\n // Set shouldRetry to false when CRS response is valid\r\n this._shouldTryFallbackResolver = false;\r\n for (const configKey in configs) {\r\n\r\n const config = configs[configKey];\r\n if (config && config.properties) {\r\n\r\n const cacheKey = this.getCacheKeyFromConfigRef(getConfigRefFromKey(configKey));\r\n this.configMap.set(cacheKey, config);\r\n }\r\n }\r\n\r\n } catch (error) {\r\n this.sendAppError(createError(\r\n ResolverAppErrors.CrsFetchError,\r\n \"CRS fetch network error\",\r\n `ConfigRef: ${this.getCacheKeyFromConfigRef(configRef)}. CrsFetchNetworkError: ${this._hadNetworkError}. Error: ${error}`\r\n ));\r\n }\r\n }\r\n\r\n /**\r\n * Download config(s) from CRS\r\n * @param {ConfigReference} configRef object\r\n * @return Promise returns config service response\r\n */\r\n private async downloadFromCrs(configRef: ConfigReference): Promise {\r\n const fetchUrl = this.generateCrsUrl(configRef);\r\n return fetch(fetchUrl)\r\n .then(response => {\r\n if (response.ok) {\r\n return response.json();\r\n }\r\n\r\n // Set _shouldTryFallbackResolver to false when CRS response status is null or 404, since this is not CRS issue.\r\n // This will retry getting configs from client side fallback resolver.\r\n if (!response.status || response.status === 404) {\r\n this._shouldTryFallbackResolver = false;\r\n }\r\n\r\n // Get appropriate CRS headers and instrument in the app error customMessage\r\n const crsVersion = response.headers.get(\"X-Crs-BuildVersion\") || \"\";\r\n const msedgeRef = response.headers.get(\"x-msedge-ref\") || \"\";\r\n const errorMessage = `Url: ${fetchUrl} and CRS Version: ${crsVersion} and isWebWorkerPresent ${this.resolverEnvironment.isWebWorkerPresent}`;\r\n\r\n const appError: AppError = {\r\n ...ConfigCrsFetchNon200Response,\r\n pb: {\r\n ...ConfigCrsFetchNon200Response.pb,\r\n fetchNetworkResponse: {\r\n activityId: msedgeRef,\r\n statusCode: response.status\r\n }\r\n }\r\n };\r\n this.sendAppError(createError(\r\n appError,\r\n \"CRS returned non-200 response\",\r\n errorMessage\r\n ));\r\n\r\n return Promise.resolve();\r\n })\r\n .catch(error => {\r\n // If fetch fails to make request or cancelled by the browser, do not make call to fallback resolver.\r\n this._shouldTryFallbackResolver = false;\r\n\r\n // If CRS fetch had network error\r\n this._hadNetworkError = true;\r\n\r\n // This throw is required so that parent function can send appropriate app error.\r\n throw error;\r\n });\r\n }\r\n\r\n /**\r\n * Generate CRS fetch url based on configRef, configServiceParams and configServiceBaseUrl.\r\n * @param {ConfigReference} configRef object\r\n * @returns {URL} CRS fetch url\r\n */\r\n private generateCrsUrl(configRef: ConfigReference): string {\r\n const sharedNsQsp = configRef.sharedNs ? `&sharedNs=${configRef.sharedNs}` : \"\";\r\n const configRefQsp = `expType=${configRef.experienceType}&expInstance=${configRef.instanceSrc}${sharedNsQsp}`;\r\n const configServiceRelativeUrl = `?${configRefQsp}&${this.configServiceParams}`;\r\n const fetchUrl = new URL(configServiceRelativeUrl, this.resolverEnvironment.configServiceParameters.configServiceBaseUrl);\r\n return fetchUrl.toString();\r\n }\r\n\r\n /**\r\n * Send this app error\r\n * @param appError AppError to send to telemetry\r\n */\r\n private sendAppError(appError: AppError): void {\r\n if (this.resolverEnvironment.appErrorCallback) {\r\n this.resolverEnvironment.appErrorCallback(appError);\r\n }\r\n }\r\n\r\n /**\r\n * Helper to avoid get cache key for the given configRef and the current resolver environment\r\n * @param configRef The config reference for which to get the cache key\r\n * @returns {string} The cache key that uniquely represents the given config reference object.\r\n */\r\n private getCacheKeyFromConfigRef = (configRef: ConfigReference) =>\r\n getCacheKeyFromConfigRef(configRef, this.resolverEnvironment.appType);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ConfigOrigin, ResolverEnvironment } from \"@msnews/core-contracts\";\r\nimport { ConfigReference, ExperienceConfig } from \"@msnews/config-data-types\";\r\nimport { enableIdbCaching, getCacheKeyFromConfigRef, isConfigBundleLocHashSameAsLastPage } from \"../../utilities\";\r\n\r\nimport { ClientResolver } from \"./client-fallback-resolver/ClientResolver\";\r\nimport { ConfigCache } from \"./ConfigCache\";\r\nimport { ConfigService } from \"../ConfigService\";\r\nimport { getRootConfigRef } from \"@msnews/web-worker-shared-utils\";\r\n\r\n/**\r\n * Git config resolver class\r\n */\r\nexport class ConfigResolver {\r\n /**\r\n * Config service object\r\n */\r\n private readonly configService: ConfigService;\r\n\r\n /**\r\n * Config cache object\r\n */\r\n private readonly configCache: ConfigCache;\r\n\r\n /**\r\n * ClientResolver object\r\n */\r\n private readonly clientResolver: ClientResolver;\r\n\r\n /**\r\n * Set to true when fallback client side resolver is called\r\n */\r\n private fallbackResolverCalled = false;\r\n\r\n /**\r\n * Flag to indicate if the initial CRS bulk fetch call has finished fetching.\r\n * This flag is used to avoid extra awaiting on completed Promises for new getConfig calls.\r\n */\r\n private crsInitComplete = false;\r\n\r\n /**\r\n * True if bundle, config and loc hash of current page is same as last page\r\n */\r\n private readonly configsEqual: boolean;\r\n\r\n /**\r\n * If this is treatment, use IndexedDB cache else do not.\r\n */\r\n private enableIdbCaching = false;\r\n\r\n /**\r\n * Config resolver constructor to initialize child classes.\r\n * @param {ResolverEnvironment} resolverEnvironment\r\n */\r\n constructor(readonly resolverEnvironment: ResolverEnvironment) {\r\n if (!resolverEnvironment || !resolverEnvironment.targetScope) {\r\n throw new Error(\"ResolverEnvironment or targetScope does not exist.\");\r\n }\r\n\r\n // Initialize configService object\r\n this.configService = new ConfigService(resolverEnvironment);\r\n\r\n // True if bundle, config and loc hash of current page is same as last page\r\n this.configsEqual = isConfigBundleLocHashSameAsLastPage(resolverEnvironment.configCacheProperties);\r\n\r\n // True if this belong to idb caching of Git configs\r\n this.enableIdbCaching = enableIdbCaching(resolverEnvironment.targetScope.pageExperiments);\r\n\r\n // Initialize configCache object\r\n this.configCache = new ConfigCache(resolverEnvironment, this.enableIdbCaching);\r\n\r\n // Initialize fallback resolver\r\n this.clientResolver = new ClientResolver(resolverEnvironment);\r\n }\r\n\r\n /**\r\n * True if CRS fetch had network errors, else false\r\n */\r\n public get crsHadNetworkError(): boolean {\r\n return this.configService.hadNetworkError;\r\n }\r\n\r\n /**\r\n * Fast helper to try to get it directly from cache so callers do not have to go through\r\n * additional async layers to get to the result if we've already loaded up the memory map.\r\n * @param configRef - The config ref to get from memory cache.\r\n */\r\n public tryGetConfigSync(configRef: ConfigReference): ExperienceConfig | undefined {\r\n\r\n if (configRef) {\r\n\r\n // try to do a fast synchronous get from the in-memory caches from each of the layers we have\r\n return this.configService.tryGetConfigSync(configRef)\r\n || this.configCache.tryGetConfigSync(configRef);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the resolved merged Experience config from CRS.\r\n * @param {ConfigReference} configRef: The identity structure that uniquely identifies a single instance of an experience\r\n * @returns {Promise} ExperienceConfig\r\n */\r\n public async getConfig(configRef: ConfigReference): Promise {\r\n if (this.resolverEnvironment.configOrigins && this.resolverEnvironment.configOrigins.feature === ConfigOrigin.Local) {\r\n const isLoggerCallbackAvailable = typeof this.resolverEnvironment.loggerCallback === \"function\";\r\n try {\r\n const localConfigs = await this.clientResolver.getConfig(configRef);\r\n if (localConfigs) {\r\n return Promise.resolve(localConfigs);\r\n } else {\r\n isLoggerCallbackAvailable && this.resolverEnvironment.loggerCallback(`ConfigResolver: Failed to fetch configs from local configs. Config: ${getCacheKeyFromConfigRef(configRef)}`);\r\n return Promise.resolve(null);\r\n }\r\n } catch (error) {\r\n isLoggerCallbackAvailable && this.resolverEnvironment.loggerCallback(`${error.message}`);\r\n return Promise.reject(error);\r\n }\r\n }\r\n\r\n if (!this.crsInitComplete) {\r\n await this.initiateConfigService();\r\n this.crsInitComplete = true;\r\n }\r\n\r\n // try to do a fast synchronous get from the in-memory caches from each of the layers we have\r\n const fromMemoryConfig = this.tryGetConfigSync(configRef);\r\n if (fromMemoryConfig) {\r\n return fromMemoryConfig;\r\n }\r\n\r\n const networkReadPromise = new Promise(async (resolve) => {\r\n const crsConfig = await this.configService.getConfig(configRef);\r\n if (crsConfig) {\r\n return resolve(crsConfig);\r\n }\r\n\r\n // Try fallback client resolver only when CRS returns non-200 and non-404 response.\r\n if (this.configService.shouldTryFallbackResolver) {\r\n this.fallbackResolverCalled = true;\r\n const cdnConfig = await this.clientResolver.getConfig(configRef);\r\n if (cdnConfig) {\r\n return resolve(cdnConfig);\r\n }\r\n }\r\n\r\n resolve(null);\r\n });\r\n\r\n const cacheReadPromise = new Promise(async (resolve) => {\r\n // Fetch configs from cache only if configs are equal\r\n if (this.configsEqual && this.enableIdbCaching) {\r\n const cachedConfig = await this.configCache.getConfig(configRef);\r\n if (cachedConfig) {\r\n return resolve(cachedConfig);\r\n }\r\n }\r\n\r\n // If config hashes are not same, do not resolve cacheReadPromise promise!\r\n // Just so that the networkReadPromise wins when we race between networkReadPromise and cacheReadPromise\r\n });\r\n\r\n // start the race between network and IDB cache read\r\n return Promise.race([cacheReadPromise, networkReadPromise]);\r\n }\r\n\r\n /**\r\n * This overwrite (update) / write configs into cache\r\n * This is typically called after TTVR in web worker context\r\n * @returns true if configs are equal\r\n */\r\n public async updateConfigsCache(): Promise {\r\n // We store CMS configs in IndexedDB at client since caching header for CRS call is 15 minutes for DRI scenarios.\r\n // Git configs have 7 days of caching header, so we want to skip IndexedDB read/write/udpate layer of config caching.\r\n // At this point, client is set to make a network call and will find network response in the disk cache.\r\n // If there is a config update, it has new build version number that gets passed to the client and\r\n // client uses this build version to query CRS and thus that breaks disk cache automatically.\r\n if (!this.enableIdbCaching) {\r\n return this.configsEqual;\r\n }\r\n\r\n // If configs from this page and last page are same, we want to skip writing to cache\r\n // When configs are equal, we return true. This should not update cache as cache update is not required.\r\n // If configs are not equal, we return false. This should update cache with new configs\r\n if (this.configsEqual) {\r\n return this.configsEqual;\r\n }\r\n\r\n // Make sure that CRS getConfig is called.\r\n // So that configMap will be populated in order to write to Cache.\r\n // TODO: Make sure that this download full config tree, especially maxDepth scenario.\r\n await this.initiateConfigService();\r\n\r\n // Get configMap downloaded from CRS.\r\n const crsConfigMap = this.configService.getConfigMap();\r\n if (crsConfigMap) {\r\n // Write this CRS downloaded map to Cache.\r\n this.configCache.updateCache(crsConfigMap);\r\n return this.configsEqual;\r\n }\r\n\r\n // Try fallback client resolver only when CRS returns non-200 and non-404 response.\r\n if (!this.configService.shouldTryFallbackResolver) {\r\n return this.configsEqual;\r\n }\r\n\r\n // Make sure that fallback resolver getConfig is called.\r\n // So that configMap will be populated in order to write to Cache.\r\n if (!this.fallbackResolverCalled) {\r\n await this.clientResolver.getConfig(getRootConfigRef());\r\n }\r\n\r\n // Get configMap downloaded from fallback resolver.\r\n const clientResolverConfigMap = this.clientResolver.getConfigMap();\r\n if (clientResolverConfigMap) {\r\n // Write this network downloaded map to Cache.\r\n this.configCache.updateCache(clientResolverConfigMap);\r\n }\r\n\r\n return this.configsEqual;\r\n }\r\n\r\n /**\r\n * To be used by the unit tests\r\n */\r\n public getConfigServiceObject(): ConfigService {\r\n return this.configService;\r\n }\r\n\r\n /**\r\n * Initialize config service call\r\n */\r\n private async initiateConfigService(): Promise {\r\n await this.configService.getConfig(getRootConfigRef());\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ConfigReference } from \"@msnews/config-data-types\";\r\n\r\nexport function getRootConfigRef(): ConfigReference {\r\n return { experienceType: \"AppConfig\", instanceSrc: \"default\" };\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, createError, PerfTimeline, ResolverAppErrors, logger, tryGetPerfTimeline, CachedConfigsForDifferentFlight, ConfigCrsFetchNon200Response, ConfigCdnFetchNon200Response, ResolverErrorConfigsDownloadedByCdn, SSRAppErrors, GitConfigsInvalidConfigRef, GitConfigsInvalidConfigResolver } from \"@msnews/diagnostics\";\r\nimport { Environment, PageRequestTargetScope, appEnvironment } from \"../app\";\r\nimport { ExperienceConfigWrapper, ExperienceConfigs, getConfigRefString } from \"./configs/\";\r\nimport { IndexedDb, ServerCache, UrlUtility, Utility, getFromWebWorker, isWebWorkerPresent, sendToWebWorker, abortableFetch } from \"../utilities\";\r\nimport { getLocalStorage } from \"../webstorage\";\r\nimport { canUseDOM, getLocationHref, getLocationSearch } from \"@msnews/isomorphic-util\";\r\nimport { isArray, isEmpty, isString, memoize, mergeWith } from \"lodash-es\";\r\n\r\nimport { IExperienceConfig } from \"cms-models-msn/configuration/IExperienceConfig\";\r\nimport { IExperienceConfigIndex } from \"cms-models-msn/configuration/IExperienceConfigIndex\";\r\nimport { IExperienceConfigLink } from \"cms-models-msn/configuration/IExperienceConfigLink\";\r\nimport { getPeregrineFlights } from \"@msnews/experimentation-helpers\";\r\nimport { AppConfig, ConfigReference, ExperienceConfig } from \"@msnews/config-data-types\";\r\nimport { ConfigCacheProperties, ConfigFetchError, ConfigServiceParameters, ResolverEnvironment } from \"@msnews/core-contracts\";\r\nimport { Telemetry } from \"@msnews/telemetry-contracts\";\r\nimport { getRootConfigRef } from \"@msnews/web-worker-shared-utils\";\r\nimport { ConfigResolver } from \"@msnews/config-resolver\";\r\n\r\n/**\r\n * Type definition for cached configs in the indexed DB\r\n */\r\ntype CachedConfigsType = Map;\r\n\r\n/**\r\n * Constants for TTLs\r\n */\r\nconst SERVER_CACHE_TTL: number = 60 * 60 * 24 * 1000; // one day in milliseconds\r\nconst SERVER_CACHE_CONFIG_STALENESS_TIMEOUT: number = 5 * 60 * 1000; // 5 minutes in milliseconds\r\n\r\n/**\r\n * Constants for fetch timeouts\r\n */\r\nconst CSRTimeoutInMs = 10000;\r\nconst SSRTimeoutInMs = 900;\r\n\r\n/**\r\n * Resolver Class\r\n */\r\nclass Resolver {\r\n\r\n /**\r\n * Target scope of the current page request\r\n * @type {PageRequestTargetScope}\r\n */\r\n private currentTargetScope: PageRequestTargetScope = appEnvironment.CurrentRequestTargetScope;\r\n\r\n /**\r\n * Target scope of the current page request override. Only used by unit tests and tooling\r\n * @type {PageRequestTargetScope}\r\n */\r\n private currentTargetScopeOverride: PageRequestTargetScope;\r\n\r\n /**\r\n * Dictionary to maintain all resolved config for internal state management\r\n * @type {Map}\r\n */\r\n private configMap: CachedConfigsType = new Map();\r\n\r\n /** set fallback env to prod to avoid any live site issues */\r\n private env: Environment = appEnvironment.Environment || Environment.prod;\r\n\r\n /**\r\n * Config base url used during cms config resolution.\r\n * @type {string}\r\n */\r\n private cdnConfigBaseUrl: URL;\r\n\r\n /**\r\n * Config base url for Config Service\r\n * @type {string}\r\n */\r\n private configServiceBaseUrl: URL;\r\n\r\n /**\r\n * Dictionary to maintain all promise objects which are not resolved/rejected. Once promise object is resolved/rejected,\r\n * it gets deleted from this dictionary and put in the configMap.\r\n * @type {Map>}\r\n */\r\n private promiseMap: Map> = new Map();\r\n\r\n /**\r\n * Maintain promise objects that is updating stale timestamp for server cache.\r\n * This is to prevent concurrent getConfig from updating stale cache even when the head config refresh has initiated\r\n */\r\n private refreshServerCachePromiseMap: Map> = new Map();\r\n\r\n /** Resolver app errors */\r\n private resolverErrors: AppError[];\r\n\r\n /** Object of IndexedDb wrapper class */\r\n private indexedDb: IndexedDb;\r\n\r\n /**\r\n * Check if IndexedDb operation is allowed or not.\r\n * @type {boolean}: true if indexedDB should be used else false.\r\n */\r\n private useIndexedDb: boolean;\r\n\r\n /**\r\n * Check if ServerCache can be used or not.\r\n * @type {boolean}\r\n */\r\n private useServerCache: boolean;\r\n\r\n /** Current Timestamp for config staleness check. */\r\n private stalenessCheckTimestamp: number = new Date().getTime();\r\n\r\n /**\r\n * Check if ConfigService operation is allowed or not.\r\n * @type {boolean}\r\n */\r\n private enableConfigService: boolean;\r\n\r\n /**\r\n * Get config service parameters from currentTargetScope\r\n * @type {string}\r\n */\r\n private configServiceParameters: string;\r\n\r\n /**\r\n * Storage key for indexedDb\r\n * @type {string}\r\n */\r\n private storageKey: string;\r\n\r\n /** Config timings object storing fetch duration of network or cache to retrieve config. */\r\n private configTimings: ConfigFetchTiming[];\r\n\r\n /**\r\n * Check if web worker exists\r\n * @type {boolean}\r\n */\r\n private useWebWorkerToCache: boolean;\r\n\r\n /** The perf timeline for the resolver */\r\n private perfTimeline: PerfTimeline;\r\n\r\n /**\r\n * Check if config service shold return more than 1 config\r\n * @type {boolean}\r\n */\r\n private isMultiConfigRetrievalEnabled = false;\r\n\r\n /** Maps config index HREF to local override for config. */\r\n private localOverrideMap: { [configIndexHref: string]: ExperienceConfigWrapper } = {};\r\n\r\n /** Initialize indexedDb for configs. */\r\n private initializeIndexedDb = memoize(this._initializeIndexedDb);\r\n\r\n /** Initialize configs from IDB. */\r\n private populateConfigMapFromIndexedDbAsync = memoize(this._populateConfigMapFromIndexedDbAsync);\r\n\r\n /** Peregrine only lower cased flights in alphabetical order */\r\n private peregrineFlights: string;\r\n\r\n /** Peregrine flights local storage key */\r\n private peregrineFlightsKey = \"prgflights\";\r\n\r\n /**\r\n * Git config resolver class\r\n */\r\n private configResolver: ConfigResolver;\r\n\r\n /**\r\n * Target scope with Peregrine only flights in page experiments\r\n */\r\n private scopeWithPeregrineFlights: PageRequestTargetScope;\r\n\r\n /**\r\n * Constructor to initialize private variables.\r\n */\r\n public constructor() {\r\n this.initializeCaching();\r\n }\r\n\r\n /**\r\n * Initialize caching layer of resolver.\r\n *\r\n * WARNING!!! Do NOT add async/await in this function. It must remain a pure synchronous function in order\r\n * to initialize the indexedDB cache as quickly as possible before entry point beats to us due to multi-level\r\n * promise waiting hierarchies.\r\n *\r\n * @param idb object of indexedDb class. Unit tests set this value. It will be null in other cases.\r\n * @\r\n */\r\n public initializeCaching(idb?: IndexedDb): void {\r\n /**\r\n * In most cases configRootUrl will be sent by PCS so appEnvironment will have it.\r\n * In case it is not sent, we fall back to environmentConfig so config will be always served.\r\n */\r\n this.cdnConfigBaseUrl = appEnvironment.ConfigRootUrl || appEnvironment.EnvironmentConfigUrl;\r\n\r\n // Get ConfigServiceBaseUrl from appEnvironment\r\n this.configServiceBaseUrl = appEnvironment.ConfigServiceBaseUrl;\r\n\r\n this.resolverErrors = [];\r\n this.configTimings = [];\r\n\r\n this.useWebWorkerToCache = isWebWorkerPresent;\r\n\r\n this.indexedDb = idb ? idb : new IndexedDb();\r\n\r\n const enableCMSPPEConfigs = appEnvironment.EnableCMSPPEConfigs;\r\n\r\n // Check if IndexedDb is supported\r\n this.useIndexedDb =\r\n // Debug scenario: Check if indexedDB is allowed to be read in main thread. By default true.\r\n this.enableIndexedDbInMainResolver()\r\n // PCS flag to turn on/off IndexedDb caching of configs.\r\n && !appEnvironment.DisableCachingConfigs\r\n // Debug scenario: to turn off indexedDB in all threads.\r\n && this.indexedDb.isCachingAllowed\r\n // Check if there exists IndexedDB in browser\r\n && this.indexedDb.supported\r\n // Use case is simple config tests, we do not want to cache\r\n // Also not caching in server-side in this scenario\r\n && !enableCMSPPEConfigs;\r\n\r\n // Check if server cache could be used or not\r\n this.useServerCache = ServerCache !== null\r\n // PCS flag to turn on/off IndexedDb caching of configs.\r\n && !appEnvironment.DisableCachingConfigs\r\n // Use case is simple config tests, we do not want to cache\r\n // Also not caching in server-side in this scenario\r\n && !enableCMSPPEConfigs;\r\n\r\n this.setTargetScopeAndConfigServiceParams();\r\n\r\n // if pre-initialized config map doesn't exist or does not contain the storageKey entry we want,\r\n // then proceed to asynchronously initialize the configMap from indexedDb\r\n // NOTE: we only start the async read, and don't await for this to finish\r\n this.populateConfigMapFromIndexedDbAsync();\r\n }\r\n\r\n /**\r\n * Update target scope as well as updating config service parameters and other related target scope configurations\r\n * in case that target scope from appEnvironment changed during life cycle of a page.\r\n */\r\n public setTargetScopeAndConfigServiceParams() {\r\n\r\n const enableCMSPPEConfigs = appEnvironment.EnableCMSPPEConfigs;\r\n\r\n // Get current target scope in case it has changed. Special case for unit tests where override was set so we don't want to update target scope.\r\n this.currentTargetScope = this.currentTargetScopeOverride || appEnvironment.CurrentRequestTargetScope;\r\n\r\n // Read peregrine specific flights\r\n const pageExperiments = this.currentTargetScope && getPeregrineFlights(this.currentTargetScope.pageExperiments);\r\n if (pageExperiments && pageExperiments.length > 0) {\r\n this.peregrineFlights = pageExperiments.join(\",\");\r\n }\r\n\r\n this.scopeWithPeregrineFlights = {\r\n ...this.currentTargetScope,\r\n pageExperiments\r\n };\r\n\r\n // Check whether to use Config Resolver Service (CRS).\r\n this.enableConfigService = this.useConfigService();\r\n if (this.enableConfigService) {\r\n\r\n // Query string parameter from target scope.\r\n this.configServiceParameters = \"?targetScope=\" + JSON.stringify(this.scopeWithPeregrineFlights);\r\n\r\n // Send PCS apptype to CRS so we can build CRS Jarvis dashboards per apptype.\r\n this.configServiceParameters += `&apptype=${appEnvironment.AppType}`;\r\n\r\n const { IsMultiConfigRetrievalEnabled, CacheBustingIdentifier } = appEnvironment;\r\n\r\n // Check if CRS should fetch multiple configs and its depth.\r\n this.isMultiConfigRetrievalEnabled = IsMultiConfigRetrievalEnabled;\r\n if (this.isMultiConfigRetrievalEnabled) {\r\n this.configServiceParameters += `&maxDepth=${this.getConfigRetrievalMaxDepth()}`;\r\n }\r\n\r\n // If cbid is provided, typically in unit testing context, use it.\r\n // If window has _cbid then use it else use the value from PCS, to send to CRS for busting disk, AFD and Origin cache.\r\n const cacheBustingIdentifier = (canUseDOM() && window._cbid) || CacheBustingIdentifier;\r\n if (cacheBustingIdentifier) {\r\n this.configServiceParameters += `&cbid=${cacheBustingIdentifier}`;\r\n }\r\n\r\n // If url has dev only query string params, inform CRS so it can exclude from availability and will help debugging on Jarvis.\r\n if (this.containsDevOnlyQueryParameters()) {\r\n this.configServiceParameters += \"&item=dev:true\";\r\n }\r\n\r\n if (enableCMSPPEConfigs) {\r\n this.configServiceParameters += \"&item=cms:ppe\";\r\n }\r\n }\r\n\r\n // Update storage key based on target scope.\r\n this.storageKey = this.generateKey();\r\n }\r\n\r\n /**\r\n * Initialize Git config resolver environment.\r\n * @param trackAppErrorEvent - App Error function\r\n */\r\n public initialize(trackAppErrorEvent: (data: AppError) => void) {\r\n\r\n this.perfTimeline = tryGetPerfTimeline(\"Resolver\", \"Resolver\", true);\r\n\r\n // Check if this is git configs treatment\r\n if (!appEnvironment.IsGitConfigs) {\r\n return;\r\n }\r\n\r\n // Optionally pre-initialized IDB config read promise at the top page level\r\n const { _idbConfigOpenPromise = null, _idbConfigReadPromise = null, _idbConfigLookup = null } = canUseDOM() ? window : {};\r\n\r\n const configCacheProperties: ConfigCacheProperties = {\r\n ...this.getConfigCacheProperties(),\r\n idbConfigOpenPromise: _idbConfigOpenPromise,\r\n idbConfigReadPromise: _idbConfigReadPromise,\r\n idbConfigLookup: _idbConfigLookup\r\n };\r\n\r\n // Set up config service param contract\r\n const configServiceParameters: ConfigServiceParameters = {\r\n buildVersion: appEnvironment.BuildVersion,\r\n configServiceBaseUrl: appEnvironment.ConfigServiceBaseUrl.toString()\r\n };\r\n\r\n // Set up Git config resolver contract\r\n const resolverEnvironment: ResolverEnvironment = {\r\n appType: appEnvironment.AppType,\r\n configServiceParameters,\r\n targetScope: this.scopeWithPeregrineFlights,\r\n env: appEnvironment.Environment.toString(),\r\n featureFlags: appEnvironment.FeatureFlags,\r\n isThisWebWorkerThread: false,\r\n isWebWorkerPresent: this.useWebWorkerToCache,\r\n queryParams: UrlUtility.getParamsObj(getLocationSearch()),\r\n appErrorCallback: trackAppErrorEvent,\r\n loggerCallback: logger.log.bind(logger),\r\n logObjectsCallback: logger.logObjects.bind(logger),\r\n configCacheProperties,\r\n configOrigins: appEnvironment.ConfigOrigins\r\n };\r\n\r\n // Initialize Git configs resolver with resolver environment\r\n this.configResolver = new ConfigResolver(resolverEnvironment);\r\n }\r\n\r\n /**\r\n * Merges config objects.\r\n * @private\r\n * @param {ExperienceConfigWrapper[]} configs - an array of config documents\r\n * @param {string} experienceType - experienceType\r\n * @return ExperienceConfig - returns merged config based on a set of rules\r\n */\r\n public mergeConfig(configs: IExperienceConfig[]): IExperienceConfig {\r\n if (!configs || configs.length < 1) {\r\n return null;\r\n }\r\n\r\n const result: IExperienceConfig = configs[0];\r\n\r\n // skip the 0th item as it is assigned to result above, only merge properties section\r\n for (let count = 1; count < configs.length; count++) {\r\n result.properties = mergeWith(result.properties, configs[count].properties, this.customizer);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * matches targeting scope and returns the config urls for the same.\r\n * @private\r\n * @param {IExperienceConfigIndex} configIndex - an array of config documents\r\n * @return string[] - returns urls for configurations for which the scope matched\r\n */\r\n public resolveConfigIndex(configIndex: IExperienceConfigIndex): string[] {\r\n if (!configIndex) {\r\n return null;\r\n }\r\n\r\n const configPaths: string[] = [];\r\n configIndex.configs.forEach(experienceRef => {\r\n if (this.targetScopeMatched(experienceRef)) {\r\n configPaths.push(experienceRef.href);\r\n }\r\n });\r\n\r\n // if override config is provided, then we add that to the end of list\r\n // so props provided in override config will add/update existing properties.\r\n // This is similar to CMS override settings but scoped to experience level.\r\n if (configIndex.overrideConfig && Utility.stringHasData(configIndex.overrideConfig.href)) {\r\n configPaths.push(configIndex.overrideConfig.href);\r\n }\r\n\r\n return configPaths;\r\n }\r\n\r\n /**\r\n * basic version of target scope that only checks market currently.\r\n * @private\r\n * @param {IExperienceConfigReference} experienceRef - experience config reference that has targetscope as child property\r\n * @return boolean - true if current target scope matches with config target scope, otherwise false\r\n */\r\n public targetScopeMatched(experienceRef: IExperienceConfigLink): boolean {\r\n const targetScope = experienceRef.targetScope;\r\n\r\n // if target scope is undefined for a config entry, we treat that as default config and apply it\r\n if (!targetScope) {\r\n return true;\r\n }\r\n\r\n return (this.audienceModeMatched(targetScope)\r\n && this.browserTypeMatched(targetScope)\r\n && this.deviceTypeMatched(targetScope)\r\n && this.domainMatched(targetScope)\r\n && this.experimentMatched(targetScope)\r\n && this.marketMatched(targetScope)\r\n && this.osMatched(targetScope)\r\n && this.pageTypeMatched(targetScope)\r\n && this.platformMatched(targetScope));\r\n }\r\n\r\n /**\r\n * function to check if current audienceMode type matches target audienceMode type\r\n * @private\r\n * @param {PageRequestTargetScope} targetScope - experience config reference that has targetscope as child property\r\n * @return boolean - true if current target scope audienceMode matches with config target scope audienceMode, otherwise false\r\n */\r\n public audienceModeMatched(targetScope: PageRequestTargetScope): boolean {\r\n return !targetScope.audienceMode || this.currentTargetScope.audienceMode === targetScope.audienceMode;\r\n }\r\n\r\n /**\r\n * function to check if current browser type matches target browser type\r\n * @private\r\n * @param {PageRequestTargetScope} targetScope - experience config reference that has targetscope as child property\r\n * @return boolean - true if current target scope browser type matches with config target scope browser type, otherwise false\r\n */\r\n public browserTypeMatched(targetScope: PageRequestTargetScope): boolean {\r\n if (!targetScope.browser || !targetScope.browser.browserType) {\r\n return true;\r\n }\r\n\r\n if (this.currentTargetScope.browser && this.currentTargetScope.browser.browserType === targetScope.browser.browserType &&\r\n (!targetScope.browser.version || this.currentTargetScope.browser.version === targetScope.browser.version)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * function to check if current device type matches target device type\r\n * @private\r\n * @param {PageRequestTargetScope} targetScope - experience config reference that has targetscope as child property\r\n * @return boolean - true if current target scope device type matches with config target scope device type, otherwise false\r\n */\r\n public deviceTypeMatched(targetScope: PageRequestTargetScope): boolean {\r\n return !targetScope.deviceFormFactor || this.currentTargetScope.deviceFormFactor === targetScope.deviceFormFactor;\r\n }\r\n\r\n /**\r\n * Check if current domain matches target domain\r\n * @param targetScope - experience config reference that has targetscope as child property\r\n * @return Whether the current target scope domain matches with config target scope domain\r\n */\r\n public domainMatched(targetScope: PageRequestTargetScope): boolean {\r\n return !targetScope.domain || this.currentTargetScope.domain === targetScope.domain;\r\n }\r\n\r\n /**\r\n * function to check if current experiment id matches with the requested scope experiment id.\r\n * @private\r\n * @param {PageRequestTargetScope} targetScope - experience config reference that has targetscope as child property\r\n * @return boolean - true if current target scope experiment matches with config target scope experiment, otherwise false\r\n */\r\n public experimentMatched(targetScope: PageRequestTargetScope): boolean {\r\n this.currentTargetScope.pageExperiments = this.currentTargetScope.pageExperiments || [];\r\n\r\n if (!isString(targetScope.experimentId) || isEmpty(targetScope.experimentId)\r\n || this.currentTargetScope.pageExperiments.indexOf(targetScope.experimentId) >= 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Compare the strings case insensitive.\r\n * @private\r\n * @param {string} lhs The string to compare.\r\n * @param {string} rhs The string to compare against.\r\n * @return {number} - true if the strings equal case insensitive.\r\n */\r\n public stringsEqualCaseInsensitive(lhs: string, rhs: string): boolean {\r\n return (lhs || \"\").localeCompare(rhs || \"\", undefined, { sensitivity: \"accent\" }) === 0;\r\n }\r\n\r\n /**\r\n * function to check if current market scope match with target scope market.\r\n * @private\r\n * @param {PageRequestTargetScope} targetScope - experience config reference that has targetscope as child property\r\n * @return boolean - true if current target scope market matches with config target scope market, otherwise false\r\n */\r\n public marketMatched(targetScope: PageRequestTargetScope): boolean {\r\n // if locale is not part of target scope, we assume it is applicable for all locale.\r\n // Separated out this if condition to have clarity about this behavior.\r\n if (!targetScope.locale) {\r\n return true;\r\n }\r\n\r\n const targetLocale = targetScope.locale;\r\n const currentLocale = this.currentTargetScope.locale;\r\n\r\n if ((!targetLocale.language || this.stringsEqualCaseInsensitive(targetLocale.language, currentLocale.language)) &&\r\n (!targetLocale.market || this.stringsEqualCaseInsensitive(targetLocale.market, currentLocale.market)) &&\r\n (!targetLocale.script || this.stringsEqualCaseInsensitive(targetLocale.script, currentLocale.script))) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * function to check if current operating system type matches target operating system type\r\n * @private\r\n * @param {PageRequestTargetScope} targetScope - experience config reference that has targetscope as child property\r\n * @return boolean - true if current target scope operating system type matches with config target scope operating system type, otherwise false\r\n */\r\n public osMatched(targetScope: PageRequestTargetScope): boolean {\r\n return !targetScope.os || this.currentTargetScope.os === targetScope.os;\r\n }\r\n\r\n /**\r\n * function to check if current pagetype matches target scope\r\n * @private\r\n * @param {PageRequestTargetScope} targetScope - experience config reference that has targetscope as child property\r\n * @return boolean - true if current target scope pagetype matches with config target scope pagetype, otherwise false\r\n */\r\n public pageTypeMatched(targetScope: PageRequestTargetScope): boolean {\r\n return !targetScope.pageType || this.currentTargetScope.pageType === targetScope.pageType;\r\n }\r\n\r\n /**\r\n * function to check if current scope platform type matches target scope platform type\r\n * @private\r\n * @param {PageRequestTargetScope} targetScope - experience config reference that has targetscope as child property\r\n * @return boolean - true if current target scope platform matches with config target scope platform, otherwise false\r\n */\r\n public platformMatched(targetScope: PageRequestTargetScope): boolean {\r\n return !targetScope.platform || this.currentTargetScope.platform === targetScope.platform;\r\n }\r\n\r\n /**\r\n * Customizer for merge. We are explcitly overriding the array from taget to source. No array elements from source are preserved.\r\n * @private\r\n * @param {any} srcValue - source object to merge. Can be of type any\r\n * @param {any} objValue - target object to merge. Can be of type any\r\n * @return target Object when the type is array. Otherwise uses default behavior of merge.\r\n */\r\n public customizer(srcValue: any, objValue: any): any {\r\n if (isArray(srcValue)) {\r\n return objValue;\r\n }\r\n }\r\n\r\n /**\r\n * Function to clear internal state map for Unit testing.\r\n * @public\r\n * @void\r\n */\r\n public clearInternalState(): void {\r\n this.configMap.clear();\r\n this.initializeIndexedDb.cache.clear();\r\n this.populateConfigMapFromIndexedDbAsync.cache.clear();\r\n }\r\n\r\n /**\r\n * Function to override current request target scope. Should be used only when running outside the\r\n * context of client side rendering. Example tooling.\r\n * This function should not be called by any client rendering experience running inside the Page Context.\r\n * @public\r\n * @param {PageRequestTargetScope} targetScope - Target scope to override current Request target scope\r\n * @void\r\n */\r\n public overrideCurrentRequestTargetScope(targetScope: PageRequestTargetScope): void {\r\n this.currentTargetScopeOverride = targetScope;\r\n if (this.currentTargetScopeOverride) {\r\n this.currentTargetScope = this.currentTargetScopeOverride;\r\n }\r\n }\r\n\r\n /**\r\n * Function to override current request environment. Should be used only when not running outside the\r\n * context of client side rendering. Example tooling\r\n * @public\r\n * @param {Environment} overrideEnv - environment enum to override\r\n * @void\r\n */\r\n public overrideCurrentRequestEnvironment(overrideEnv: Environment): void {\r\n // fallback as prod\r\n this.env = overrideEnv || Environment.prod;\r\n }\r\n\r\n /**\r\n * Overrides a config entry. Use for local testing only. Does not work on PROD environment.\r\n * @param relativeUrl The config index URL to override\r\n * @param experienceType The experience type\r\n * @param config The config to use\r\n */\r\n public overrideConfig(configId: string | ConfigReference, experienceType: string, config: any): void {\r\n\r\n if (this.env !== Environment.prod) {\r\n\r\n const overrideKey = (typeof configId === \"string\")\r\n ? configId\r\n : getConfigRefString(configId);\r\n\r\n this.localOverrideMap[overrideKey] = {\r\n experienceType: experienceType,\r\n properties: config,\r\n typeVersion: \"1.0.0\",\r\n _name: \"index\"\r\n };\r\n }\r\n }\r\n\r\n /**\r\n * Gets the root entry point config for the current app context. This transparently handles\r\n * the entry point config for both CMS and Git based configs.\r\n * @param cmsHref - The CMS based HREF for the app config. This is here to support backwards compatibility\r\n * with CMS based configs when Git configs are not enabled.\r\n * @returns The config for the root entry point experience from which to start page rendering.\r\n */\r\n public async getRootConfig(cmsHref: string): Promise {\r\n\r\n if (!appEnvironment.IsGitConfigs) {\r\n return await this.getConfig(cmsHref);\r\n }\r\n\r\n const appConfigDoc = await this.getConfig(getRootConfigRef());\r\n const appConfig = appConfigDoc.properties as AppConfig;\r\n return await this.getConfig(appConfig.rootExperience.configRef);\r\n }\r\n\r\n /**\r\n * Returns the resolved merged Experience config when passed Experience Config Index.\r\n * This function downloads the config index, filter based on target scope, download the configs and\r\n * merge the configs\r\n * @public\r\n * @param {string | ConfigReference} configId - Experience Index document relative url or configRef object\r\n * @return Promise\r\n */\r\n public async getConfig(configId: string | ConfigReference): Promise {\r\n\r\n if (!this.currentTargetScope) {\r\n return Promise.reject(new Error(`getConfig: Invalid target scope when fetching config ${JSON.stringify(configId)}`));\r\n }\r\n\r\n const startGetConfig = performance.now();\r\n\r\n // If this is Git configs treatment, return config object from Git config resolver.\r\n // Do not use cached response from this file.\r\n if (appEnvironment.IsGitConfigs) {\r\n if ((typeof configId === \"string\")) {\r\n const message = \"Invalid config Id for Git configs flight\";\r\n this.resolverErrors.push({\r\n ...GitConfigsInvalidConfigRef,\r\n message,\r\n pb: {\r\n ...GitConfigsInvalidConfigRef.pb,\r\n customMessage: configId\r\n }\r\n });\r\n return Promise.reject(new Error(`${message}: ${configId}`));\r\n }\r\n\r\n if (!this.configResolver) {\r\n const message = \"Invalid configResolver object for Git configs flight\";\r\n this.resolverErrors.push({\r\n ...GitConfigsInvalidConfigResolver,\r\n message,\r\n pb: {\r\n ...GitConfigsInvalidConfigResolver.pb,\r\n customMessage: JSON.stringify(configId)\r\n }\r\n });\r\n return Promise.reject(new Error(`${message}: ${JSON.stringify(configId)}`));\r\n }\r\n\r\n const configIdStr = getConfigRefString(configId);\r\n const localOverride = this.localOverrideMap[configIdStr];\r\n if (localOverride) {\r\n return localOverride;\r\n }\r\n\r\n this.addConfigTiming(configId.experienceType, startGetConfig, \"network\");\r\n const configEndMeasure = this.perfTimeline && this.perfTimeline.startMeasure(\"config\", configIdStr).endMeasure;\r\n let config: ExperienceConfigWrapper;\r\n let gitConfigFromMemory: ExperienceConfig;\r\n\r\n try {\r\n\r\n gitConfigFromMemory = this.configResolver.tryGetConfigSync(configId);\r\n const gitConfig = gitConfigFromMemory || await this.configResolver.getConfig(configId);\r\n\r\n if (!gitConfig) {\r\n return Promise.reject(new ConfigFetchError(`Could not fetch Git config id ${JSON.stringify(configId)}`, this.configResolver.crsHadNetworkError));\r\n }\r\n\r\n return config = {\r\n experienceType: configId.experienceType,\r\n properties: gitConfig.properties || {},\r\n typeVersion: \"Git\",\r\n _name: getConfigRefString(configId)\r\n };\r\n\r\n } finally {\r\n if (configEndMeasure) {\r\n const configSource = (gitConfigFromMemory && \"memory\") || (config && \"network\") || \"error\";\r\n configEndMeasure(`${configIdStr}-${configSource}`);\r\n }\r\n }\r\n }\r\n\r\n const relativeUrl = configId as string;\r\n\r\n if (!relativeUrl || !isString(relativeUrl) || isEmpty(relativeUrl)) {\r\n throw new Error(\"getConfig: Invalid relativeUrl\");\r\n }\r\n\r\n // If there is a local override for testing, use it.\r\n const localOverride = this.localOverrideMap[relativeUrl];\r\n if (localOverride) {\r\n return localOverride;\r\n }\r\n\r\n const cacheKey = this.getCacheKey(relativeUrl);\r\n\r\n // if it exists in memory, return it immediately\r\n const configFromMemory = this.configMap.get(cacheKey);\r\n if (configFromMemory) {\r\n this.addConfigTiming(configFromMemory.experienceType, startGetConfig, \"cache\");\r\n return configFromMemory;\r\n }\r\n\r\n // if promiseMap has the item, we already have an active promise which is not yet resolved/rejected. Return this promise\r\n const existingPromise = this.promiseMap.get(cacheKey);\r\n if (existingPromise) {\r\n return existingPromise;\r\n }\r\n\r\n let processed = false;\r\n const configEndMeasure = this.perfTimeline && this.perfTimeline.startMeasure(\"config\", relativeUrl).endMeasure;\r\n let experienceType: string;\r\n let configSource: string;\r\n\r\n const configPromise = new Promise(async (resolve, reject) => {\r\n\r\n try {\r\n // Fetch merged config from server cache if available\r\n if (this.useServerCache) {\r\n\r\n let hasCacheError = false;\r\n let isHeadConfig = false;\r\n\r\n const cachedOnServer: boolean = await ServerCache.has(cacheKey);\r\n if (cachedOnServer) {\r\n // Retrieve and deserialize the stringified config stored in ServerCache\r\n const serializedConfig: string = await ServerCache.get(cacheKey);\r\n const configFromServerCache = serializedConfig ? JSON.parse(serializedConfig) as ExperienceConfigWrapper : null;\r\n if (configFromServerCache) {\r\n this.configTimings.push({\r\n experienceType: configFromServerCache.experienceType,\r\n cacheFetchDuration: performance.now() - startGetConfig\r\n });\r\n\r\n // This is true for head configs in multi-config fetch\r\n isHeadConfig = !!(configFromServerCache.relatedConfigIndexHref);\r\n\r\n processed = true;\r\n this.promiseMap.delete(cacheKey);\r\n resolve(configFromServerCache);\r\n\r\n // Update config in server cache if this is already stale (5 minutes)\r\n // This will be fire and forget internally so this resolver might last longer than expected\r\n if (this.isServerCacheConfigStale(configFromServerCache.storageTimestamp)) {\r\n await this.updateServerCache(relativeUrl, configFromServerCache);\r\n }\r\n } else {\r\n logger.log(`Resolver: cacheKey=${cacheKey} Undefined from server cache`);\r\n hasCacheError = true;\r\n }\r\n }\r\n\r\n // Log all config activity for server side so this could be output as metrics.\r\n logger.logObjects({\r\n serverCacheGetConfig: {\r\n cacheKey: cacheKey,\r\n isHeadConfig: isHeadConfig,\r\n isCached: cachedOnServer,\r\n hasCacheError: hasCacheError\r\n }\r\n });\r\n\r\n // Throw error when failed to fetch config from server cache even when it exists.\r\n // This is usually due to really busy IPC traffic ie Server Cache message timing out communication to main process.\r\n if (cachedOnServer && hasCacheError) {\r\n const message = \"Sever Cache key exists but server cache is undefined. Usually due to timeout when server cache IPC is busy.\";\r\n const detailedMessage = `cacheKey=${cacheKey}`;\r\n const error = new Error(message);\r\n Telemetry.sendAppErrorEvent({\r\n ...SSRAppErrors.ServerCacheFetchFailed,\r\n message: message,\r\n pb: {\r\n ...SSRAppErrors.ServerCacheFetchFailed.pb,\r\n customMessage: detailedMessage\r\n }\r\n });\r\n\r\n // Throw the error so the request would 500 instead of returning back results.\r\n throw error;\r\n } else if (cachedOnServer) {\r\n // Already resolved the cached config. End promise.\r\n return;\r\n }\r\n\r\n // Not found on server cache so getting config from network\r\n const networkReadPromise = this.getConfigFromNetwork(relativeUrl);\r\n\r\n // Await on the network promise to get the merged config.\r\n const networkConfigsMap = await networkReadPromise;\r\n const networkConfig = networkConfigsMap.get(cacheKey);\r\n experienceType = networkConfig.experienceType;\r\n this.addConfigTiming(experienceType, startGetConfig, configSource = \"network\");\r\n resolve(networkConfig);\r\n\r\n } else {\r\n // this will contain both the IDB cache read promise, in case we haven't yet read from\r\n // IDB yet, as well as the network read promise, which we will race until one finishes.\r\n const readPromises: Array> = [\r\n\r\n // it's possible that the IDB read is still going on, so see if we can get results from\r\n // cache after racing with it. Note that we never want to 'hard await' on the IDB read\r\n // as it's possible the IDB read may have errored out / stalled, etc. So we're using this\r\n // result only as a secondary fallback. Primary is still the network.\r\n this.populateConfigMapFromIndexedDbAsync()\r\n ];\r\n\r\n const networkReadPromise = this.getConfigFromNetwork(relativeUrl);\r\n readPromises.push(networkReadPromise as Promise);\r\n\r\n // start the race between network and IDB cache read\r\n await Promise.race(readPromises);\r\n\r\n // after the race check in-memory again (in case the IDB read finished populated the\r\n // in-memory map early)\r\n const configFromMemoryAfterRace = this.configMap.get(cacheKey);\r\n if (configFromMemoryAfterRace) {\r\n experienceType = configFromMemoryAfterRace.experienceType;\r\n this.addConfigTiming(experienceType, startGetConfig, configSource = \"cache\");\r\n resolve(configFromMemoryAfterRace);\r\n return;\r\n }\r\n\r\n // Await on the network promise to get the merged config.\r\n const networkConfigsMap = await networkReadPromise;\r\n const networkConfig = networkConfigsMap.get(cacheKey);\r\n experienceType = networkConfig.experienceType;\r\n this.addConfigTiming(experienceType, startGetConfig, configSource = \"network\");\r\n resolve(networkConfig);\r\n\r\n }\r\n } catch (error) {\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.GetConfigException,\r\n message: \"Exception in getConfig\",\r\n pb: {\r\n ...ResolverAppErrors.GetConfigException.pb,\r\n customMessage: `Relative Url: ${relativeUrl}. Error ${error.message || error}`\r\n }\r\n });\r\n\r\n // If we don't explicitly catch the error, then the promise never gets rejected which might cause issues during experience load time.\r\n reject(error);\r\n } finally {\r\n\r\n processed = true;\r\n this.promiseMap.delete(cacheKey);\r\n\r\n // only measure the network operations (otherwise there are too many overlapping measures to make sense)\r\n if (configEndMeasure) {\r\n configEndMeasure(`${experienceType}-${relativeUrl}-${configSource}`);\r\n }\r\n }\r\n });\r\n\r\n // if caller is using await then this request has been processed and we should not add it to promiseMap.\r\n // if caller is trying to download multiple configs in parallel, then processed should be false.\r\n if (!processed) {\r\n this.promiseMap.set(cacheKey, configPromise);\r\n }\r\n\r\n return configPromise;\r\n }\r\n /**\r\n * Returns the resolved merged Experience config when passed Experience Config Index.\r\n * This function downloads the config index, filter based on target scope, download the configs and\r\n * merge the configs\r\n * @private\r\n * @param {string} relativeUrl - Expeience Index document relative url.\r\n * @param {boolean} sendRefreshError - True if server cache refresh error should be sent immediately. False by default to push to resolverErrors.\r\n * @return Promise> map of config(s) resolved by service/cdn.\r\n */\r\n public async getConfigFromNetwork(relativeUrl: string, sendRefreshError = false): Promise> {\r\n\r\n const cacheKey = this.getCacheKey(relativeUrl);\r\n\r\n const mergedConfigsMap = new Map();\r\n\r\n if (this.enableConfigService) {\r\n const configServiceRelativeUrl = this.removeCmsPathFromRelativeUrl(relativeUrl) + this.configServiceParameters;\r\n try {\r\n // Get merged config from config service with multi config support.\r\n if (this.isMultiConfigRetrievalEnabled) {\r\n const crsResponse = await this.downloadFile(new URL(`${configServiceRelativeUrl}${this.configServiceBaseUrl.search}`, this.configServiceBaseUrl), true);\r\n if (crsResponse && crsResponse.rootConfigIndexId && crsResponse.configs) {\r\n const configs = Object.keys(crsResponse.configs).map(e => crsResponse.configs[e]);\r\n for (const crsMergedConfig of configs) {\r\n if (crsMergedConfig && crsMergedConfig.configIndexHref) {\r\n const configIndexKey = crsMergedConfig.configIndexHref;\r\n const isHeadConfig = configIndexKey === relativeUrl;\r\n // Save config to in-memory cache on client or server cache on server.\r\n // Only track relative config hrefs for head config since only need it to trigger freshness update for the others.\r\n await this.addConfigToConfigMap(configIndexKey, crsMergedConfig, isHeadConfig ? configs : null);\r\n mergedConfigsMap.set(this.getCacheKey(configIndexKey), crsMergedConfig);\r\n\r\n if (canUseDOM()) {\r\n logger.log(`Resolver: ${configIndexKey} config for ${crsMergedConfig.experienceType} fetched from network using CRS url with multi config support.`);\r\n }\r\n }\r\n }\r\n return mergedConfigsMap;\r\n }\r\n } else {\r\n // Get single merged config from config service\r\n const crsConfig = await this.downloadFile(new URL(`${configServiceRelativeUrl}${this.configServiceBaseUrl.search}`, this.configServiceBaseUrl), true);\r\n if (crsConfig) {\r\n // Save config to in-memory cache\r\n await this.addConfigToConfigMap(relativeUrl, crsConfig);\r\n mergedConfigsMap.set(cacheKey, crsConfig);\r\n if (canUseDOM()) {\r\n logger.log(`Resolver: ${cacheKey} config for ${crsConfig.experienceType} fetched from network using CRS url.`);\r\n }\r\n return mergedConfigsMap;\r\n }\r\n }\r\n } catch (error) {\r\n const message = `CRS fetch failed for ${relativeUrl}.`;\r\n const detailedMessage = `CRS relative Url: ${configServiceRelativeUrl} Error: ${error}`;\r\n if (sendRefreshError) {\r\n Telemetry.sendAppErrorEvent({\r\n ...SSRAppErrors.ServerCacheRefreshFailed,\r\n message: message,\r\n pb: {\r\n ...SSRAppErrors.ServerCacheRefreshFailed.pb,\r\n customMessage: detailedMessage\r\n }\r\n });\r\n } else {\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.CrsFetchError,\r\n message: message,\r\n pb: {\r\n ...ResolverAppErrors.CrsFetchError.pb,\r\n customMessage: detailedMessage\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n // Get config from CDN when config service is not enabled or it returned null or invalid response.\r\n if (mergedConfigsMap && !mergedConfigsMap.has(cacheKey)) {\r\n const cdnConfig = await this.downloadMergeConfig(relativeUrl);\r\n if (cdnConfig) {\r\n\r\n // Save config to in-memory cache\r\n await this.addConfigToConfigMap(relativeUrl, cdnConfig);\r\n\r\n mergedConfigsMap.set(cacheKey, cdnConfig);\r\n if (canUseDOM()) {\r\n logger.log(`Resolver: ${cacheKey} config fetched from network using Akamai url.`);\r\n }\r\n\r\n // Dev scenario: if config service is not enabled and we got configs from CDN, do not log app error.\r\n if (this.enableConfigService) {\r\n this.resolverErrors.push({\r\n ...ResolverErrorConfigsDownloadedByCdn,\r\n message: \"Configs served from CDN after CRS fetch failed\",\r\n pb: {\r\n ...ResolverErrorConfigsDownloadedByCdn.pb,\r\n customMessage: `Relative Url: ${relativeUrl} CRS Params: ${this.configServiceParameters}`\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n return mergedConfigsMap;\r\n }\r\n\r\n /**\r\n * Set configMap object with appropriate values.\r\n * @private\r\n * @param configIndexHref example: cms/api/amp/experienceConfigIndex/AfCDeG\r\n * @param config object of ExperienceConfigWrapper\r\n * @param multiConfigs optional array of related ExperienceConfigWrapper due to multi config support from CRS (server only)\r\n */\r\n public async addConfigToConfigMap(configIndexHref: string, config: ExperienceConfigWrapper, multiConfigs?: ExperienceConfigWrapper[]): Promise {\r\n config.storageTimestamp = this.stalenessCheckTimestamp;\r\n config.configIndexHref = configIndexHref;\r\n\r\n const cacheKey = this.getCacheKey(configIndexHref);\r\n\r\n // No need to cache on configMap on server side since it will be another layer of memcache to worry about.\r\n if (this.useServerCache) {\r\n\r\n // Update related config href if passed in.\r\n if (multiConfigs) {\r\n config.relatedConfigIndexHref = multiConfigs.map(c => c.configIndexHref);\r\n }\r\n\r\n // Save config to server cache so other processes could reuse the cache.\r\n // ServerCache only accepts string to avoid serialization issues.\r\n // TTL is 1 day for now.\r\n const serializedConfig = JSON.stringify(config);\r\n await ServerCache.set(cacheKey, serializedConfig, SERVER_CACHE_TTL);\r\n } else {\r\n // Set configMap for future reference.\r\n this.configMap.set(cacheKey, config);\r\n }\r\n }\r\n\r\n /**\r\n * Refresh and update config when stale for server cache in order to reduce overall network call from server side.\r\n * @private\r\n * @param configIndexHref example: cms/api/amp/experienceConfigIndex/AfCDeG\r\n * @param configFromServerCache object of ExperienceConfigWrapper\r\n */\r\n public async updateServerCache(configIndexHref: string, configFromServerCache: ExperienceConfigWrapper) {\r\n\r\n // Server only sanity check\r\n if (!this.useServerCache) {\r\n return;\r\n }\r\n\r\n try {\r\n // Skip refresh config if it is already in the promise map\r\n if (!this.refreshServerCachePromiseMap.get(configIndexHref)) {\r\n\r\n // Refresh config and related config first so other processes don't trigger network call as well.\r\n // This is not perfect as this is not atomic so there might be race condition which doesn't really cause harm except multiple network calls might happen.\r\n // Better implementation would be separate worker thread to deal with refreshes but more complicated implementation.\r\n if (configFromServerCache.relatedConfigIndexHref) {\r\n await Promise.all(configFromServerCache.relatedConfigIndexHref.map(x => {\r\n const refreshPromise = (x === configIndexHref) ?\r\n this.refreshConfigServerCache(configIndexHref, configFromServerCache) :\r\n this.refreshConfigServerCache(x);\r\n\r\n this.refreshServerCachePromiseMap.set(x, refreshPromise);\r\n return refreshPromise;\r\n }));\r\n\r\n // Remove from promise map after all refreshes are done.\r\n for (let i = 0; i < configFromServerCache.relatedConfigIndexHref.length; i++) {\r\n this.refreshServerCachePromiseMap.delete(configFromServerCache.relatedConfigIndexHref[i]);\r\n }\r\n } else {\r\n const refreshPromise = this.refreshConfigServerCache(configIndexHref, configFromServerCache);\r\n this.refreshServerCachePromiseMap.set(configIndexHref, refreshPromise);\r\n await refreshPromise;\r\n this.refreshServerCachePromiseMap.delete(configIndexHref);\r\n }\r\n\r\n // Update config from network again since this is now stale.\r\n //\r\n // Note that there's no await here since we do want to fire and forget config update on server cache\r\n // so we could serve next request asap.\r\n // Closure for \"this\" scope is maintained but not any global singleton;\r\n // so if next request starts before updateServerCache promise is done, singletons could be reset.\r\n // Fortunately, only logger and app errors are called and not appEnvironment.\r\n this.getConfigFromNetwork(configIndexHref);\r\n }\r\n } catch (error) {\r\n const message = `Update server cache failed for ${configIndexHref}.`;\r\n const detailedMessage = `Error: ${error}`;\r\n\r\n Telemetry.sendAppErrorEvent({\r\n ...SSRAppErrors.ServerCacheRefreshFailed,\r\n message: message,\r\n pb: {\r\n ...SSRAppErrors.ServerCacheRefreshFailed.pb,\r\n customMessage: detailedMessage\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Refresh config staleness WITHOUT changing the value on server cache\r\n * so that other processes don't need to fetch config from network at the same time.\r\n * @private\r\n * @param configIndexHref example: cms/api/amp/experienceConfigIndex/AfCDeG\r\n * @param configFromServerCache object of ExperienceConfigWrapper\r\n */\r\n private async refreshConfigServerCache(configIndexHref: string, configFromServerCache?: ExperienceConfigWrapper): Promise {\r\n\r\n // Server only sanity check\r\n if (!this.useServerCache) {\r\n return;\r\n }\r\n\r\n const cacheKey = this.getCacheKey(configIndexHref);\r\n\r\n if (!configFromServerCache) {\r\n const serializedConfig: string = await ServerCache.get(cacheKey);\r\n configFromServerCache = serializedConfig ? JSON.parse(serializedConfig) as ExperienceConfigWrapper : null;\r\n }\r\n\r\n if (configFromServerCache) {\r\n // Update staleness timestamp to current request and set to server cache\r\n configFromServerCache.storageTimestamp = this.stalenessCheckTimestamp;\r\n const serializedConfig = JSON.stringify(configFromServerCache);\r\n await ServerCache.set(cacheKey, serializedConfig, SERVER_CACHE_TTL);\r\n }\r\n }\r\n\r\n /**\r\n * Clear render cache when applicable.\r\n * @private\r\n * @param areConfigsEqual: response from web worker. This is typically true or false in this case.\r\n */\r\n public purgeRenderCacheUponConfigChanges(areConfigsEqual: boolean): void {\r\n if (areConfigsEqual) {\r\n return;\r\n }\r\n\r\n try {\r\n getLocalStorage().removeSubstringKeys(\"lastKnown_\");\r\n getLocalStorage().removeSubstringKeys(\"timestamp_\");\r\n getLocalStorage().removeSubstringKeys(\"keys_\");\r\n } catch (e) {\r\n // Send alert to monitoring system that render cache is not being purged, when it is supposed to.\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.FailedToPurgeRenderCache,\r\n message: \"Failed to purge render cache when cached config and network config is not same.\",\r\n pb: {\r\n ...ResolverAppErrors.FailedToPurgeRenderCache.pb,\r\n customMessage: e\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Get the config over the network, merge and return.\r\n * @private\r\n * @param {string} relativeUrl - Expeience Index document relative url.\r\n * @return Promise\r\n */\r\n public async downloadMergeConfig(relativeUrl: string): Promise {\r\n const experienceIndex = await this.downloadFile(new URL(`${relativeUrl}${this.cdnConfigBaseUrl.search}`, this.cdnConfigBaseUrl), false);\r\n const configPaths = this.resolveConfigIndex(experienceIndex);\r\n const configObjects = await this.downloadExperienceConfig(this.cdnConfigBaseUrl, configPaths);\r\n const config: ExperienceConfigWrapper = this.mergeConfig(configObjects) as ExperienceConfigWrapper;\r\n config.experienceType = experienceIndex.experienceType;\r\n\r\n return config;\r\n }\r\n\r\n /**\r\n * Given an array of config urls, this function downloads them in parallel and returns a promise.\r\n * @private\r\n * @param {string} baseConfigUrl - base config url depends on implementation\r\n * @param {string[]} hrefs - Array of configuration relative urls\r\n * @return Promise\r\n */\r\n public async downloadExperienceConfig(baseConfigUrl: URL, hrefs: string[]): Promise {\r\n const promiseArray = [];\r\n hrefs.forEach(href => {\r\n promiseArray.push(this.downloadFile(new URL(`${href}${baseConfigUrl.search}`, baseConfigUrl), false));\r\n });\r\n\r\n return await Promise.all(promiseArray);\r\n }\r\n\r\n /**\r\n * downloads file from CMS given the relative url\r\n * @private\r\n * @param {string} relativeUrl - relative url of the document\r\n * @param {boolean} isCrsFetch - Is this CRS fetch\r\n * @return Promise returns generic Type object wrapped in Promise\r\n */\r\n public async downloadFile(url: URL, isCrsFetch: boolean): Promise {\r\n // Use node-fetch to be compatible with SSR\r\n // Default timeout is 10 seconds client side, 900ms server side\r\n const timeoutInMs = canUseDOM() ? CSRTimeoutInMs : SSRTimeoutInMs;\r\n const fetchUrl = url.toString();\r\n return abortableFetch(fetchUrl, timeoutInMs)\r\n .then(response => {\r\n if (response.ok) {\r\n return response.json();\r\n }\r\n\r\n let errorMessage = \"\";\r\n if (isCrsFetch) {\r\n const crsVersion = response.headers.get(\"X-Crs-BuildVersion\") || \"\";\r\n const msedgeRef = response.headers.get(\"x-msedge-ref\") || \"\";\r\n errorMessage = `msedge ref: ${msedgeRef} Status: ${response.status}, Status Text: ${response.statusText}, Url: ${fetchUrl} and CRS Version: ${crsVersion}`;\r\n this.resolverErrors.push(createError(ConfigCrsFetchNon200Response, \"CRS sent non-200 response\", errorMessage));\r\n } else {\r\n errorMessage = `Status: ${response.status}, Status Text: ${response.statusText}, Url: ${fetchUrl}`;\r\n this.resolverErrors.push(createError(ConfigCdnFetchNon200Response, \"Cdn config fetch received non-200 response\", errorMessage));\r\n }\r\n\r\n return Promise.resolve();\r\n });\r\n }\r\n\r\n /**\r\n * This function generates a key that is used to write/read configurations to/from storage.\r\n * example key: \"kids|ja|jp|testPage|mmx\"\r\n * @private\r\n * @return string\r\n */\r\n public generateKey(): string {\r\n\r\n // Client side resolver will use reduced set of keys for perf and retrival logic. This logic has to match WebWorkerResolver.generateKey\r\n if (canUseDOM()) {\r\n\r\n const { audienceMode = \"\", locale = {}, pageType = \"\" } = this.currentTargetScope || {};\r\n const { language, market } = locale;\r\n\r\n const keys = [audienceMode, language, market, pageType, appEnvironment.AppType || \"\"];\r\n return keys.map(key => key || \"\").join(\"|\").toLowerCase();\r\n\r\n // Server side resolver needs to generate full set of target scopes since multiple pages/users will share the same cache for longer duration\r\n } else {\r\n let { audienceMode = \"\",\r\n browser = null,\r\n deviceFormFactor = \"\",\r\n experimentId = \"\",\r\n locale = {},\r\n os = {},\r\n pageType = \"\",\r\n platform = \"\",\r\n pageExperiments = null } = this.currentTargetScope || {};\r\n const { language, market } = locale;\r\n const { browserType = \"\", version = \"\" } = browser || {};\r\n\r\n // Filter out non-peregrine flights so they are not part of cache key.\r\n pageExperiments = getPeregrineFlights(pageExperiments);\r\n\r\n const keys = [audienceMode, browserType, version, deviceFormFactor, language, market, os, experimentId, pageType, platform, pageExperiments ? pageExperiments.join() : \"\", appEnvironment.AppType || \"\"];\r\n return keys.map(key => key || \"\").join(\"|\").toLowerCase();\r\n }\r\n }\r\n\r\n /**\r\n * Function checks if ConfigService is enabled.\r\n * @returns true if supported else false.\r\n */\r\n public useConfigService(): boolean {\r\n const urlQuery = getLocationSearch();\r\n if (urlQuery) {\r\n const param = UrlUtility.getQueryParameterByName(\"enableConfigService\", urlQuery);\r\n if (param) {\r\n return param.toLocaleLowerCase() === \"true\";\r\n }\r\n }\r\n\r\n // PCS flag to turn on/off ConfigService.\r\n // When EnableConfigService = false, it gets configs from CDN and merge at client side.\r\n return appEnvironment.EnableConfigService;\r\n }\r\n\r\n /**\r\n * Function that returns maxDepth if exists in query string else default value.\r\n * This is the max depth of the config tree.\r\n * @returns Depth of config in tree.\r\n */\r\n public getConfigRetrievalMaxDepth(): string {\r\n const param = UrlUtility.getQueryParameterByName(\"maxDepth\", getLocationHref());\r\n if (param) {\r\n return param;\r\n }\r\n\r\n // PCS flag for maxDepth\r\n if (appEnvironment.FeatureFlags\r\n && appEnvironment.FeatureFlags.crsMaxDepth) {\r\n return appEnvironment.FeatureFlags.crsMaxDepth;\r\n }\r\n\r\n // Config service to use this default to parse depth of config tree.\r\n return \"10\";\r\n }\r\n\r\n /**\r\n * Function checks if url has any dev only query string param\r\n * @returns true if exist else false.\r\n */\r\n public containsDevOnlyQueryParameters(): boolean {\r\n const urlQuery = getLocationSearch();\r\n const item = UrlUtility.getQueryParameterByName(\"item\", urlQuery);\r\n if (item && item.length > 0) {\r\n return true;\r\n }\r\n\r\n const segment = UrlUtility.getQueryParameterByName(\"pcsonly\", urlQuery);\r\n if (segment && segment.length > 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Returns resolver errors if any.\r\n * @returns resolverErrors\r\n */\r\n public getResolverErrors(): AppError[] {\r\n return this.resolverErrors;\r\n }\r\n\r\n /**\r\n * Refresh configs in indexedDb. Next time users visits the page within 3 days, we will get configs from indexedDB first\r\n * After TTVR we will background refresh them in web worker through this function.\r\n * If it more than 3 days, we won't use indexedDb response in main thread, After TTVR, we will background refresh.\r\n * This is required to have latest configs in indexedDb\r\n */\r\n public async refreshConfigCache(): Promise {\r\n // If web worker is not enabled, do not refresh.\r\n if (!this.useWebWorkerToCache) {\r\n return;\r\n }\r\n\r\n try {\r\n // Send post message to web worker to refresh indexedDB.\r\n const wwResponse = await getFromWebWorker({ id: \"refreshconfigs\" });\r\n if (wwResponse\r\n && wwResponse.fetched\r\n && wwResponse.payload !== undefined\r\n && wwResponse.payload !== null) {\r\n\r\n // Receive payload as post message response containing whether configs are changed and live cache busting identifier.\r\n const refreshConfigResponse = wwResponse.payload;\r\n\r\n // Check if cached config and network config properties have any changes.\r\n this.purgeRenderCacheUponConfigChanges(refreshConfigResponse.configsEqual);\r\n\r\n // Git configs treatment: write config hashes to local storage.\r\n this.writeConfigCacheProperties();\r\n\r\n // For Flight specific config resolution, we want to use cached configs only if flights match.\r\n try {\r\n getLocalStorage().setItem(this.peregrineFlightsKey, this.peregrineFlights);\r\n } catch (e) {\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.PrgFlightLsWriteError,\r\n message: \"Error writing prg flights to \",\r\n pb: {\r\n ...ResolverAppErrors.PrgFlightLsWriteError.pb,\r\n customMessage: e\r\n }\r\n });\r\n }\r\n\r\n // Web worker queried CRS endpoint and got value latest liveCbId.\r\n // Write CBID into local storage.\r\n if (refreshConfigResponse.liveCbId) {\r\n const liveCbid = refreshConfigResponse.liveCbId.toString();\r\n this.writeCbidInLocalStorage(liveCbid);\r\n\r\n const pcsCbid = appEnvironment.CacheBustingIdentifier || \"\";\r\n const highestCbid = window._cbid || \"\";\r\n if (!appEnvironment.IsGitConfigs\r\n && (liveCbid !== pcsCbid\r\n || liveCbid !== highestCbid)) {\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.DifferentCbid,\r\n message: \"Different Cbid detected than configured.\",\r\n pb: {\r\n ...ResolverAppErrors.DifferentCbid.pb,\r\n customMessage: `PcsCbid = ${pcsCbid}. HighestCbid = ${highestCbid}. LiveCbid = ${liveCbid}.`\r\n }\r\n });\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.RefreshConfigCacheFailed,\r\n message: \"refreshConfigCache error\",\r\n pb: {\r\n ...ResolverAppErrors.RefreshConfigCacheFailed.pb,\r\n customMessage: e\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Function checks whether to enable or disable indexedDb in main using query string override.\r\n * @returns true if supported else false.\r\n */\r\n public enableIndexedDbInMainResolver(): boolean {\r\n const urlQuery = getLocationSearch();\r\n if (urlQuery) {\r\n const param = UrlUtility.getQueryParameterByName(\"enableIndexedDbInMainResolver\", urlQuery);\r\n if (param) {\r\n return param.toLocaleLowerCase() === \"true\";\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Function to check config is stale.\r\n * @returns true if stale else false.\r\n */\r\n public isConfigStale(storageTimestamp: number): boolean {\r\n if (!storageTimestamp) {\r\n return true;\r\n }\r\n\r\n // 259200000 = 3 days in milliseconds\r\n if ((this.stalenessCheckTimestamp - storageTimestamp) > 259200000) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Function to check config on server cache is stale\r\n * @returns true if stale else false.\r\n */\r\n public isServerCacheConfigStale(storageTimestamp: number): boolean {\r\n if (!storageTimestamp) {\r\n return true;\r\n }\r\n\r\n // 300000 = 5 minutes in milliseconds\r\n if ((this.stalenessCheckTimestamp - storageTimestamp) > SERVER_CACHE_CONFIG_STALENESS_TIMEOUT) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Removes relative path from url and returns Config Index Href.\r\n * Input Example: cms/api/amp/experienceConfigIndex/ABCD\r\n * @returns string. Example: ABCD\r\n */\r\n public removeCmsPathFromRelativeUrl(relativeUrl: string): string {\r\n return relativeUrl.replace(\"cms/api/amp/experienceConfigIndex/\", \"\");\r\n }\r\n\r\n /**\r\n * Removes cached config from IndexedDB.\r\n */\r\n public removeCachedConfig(relativeUrl: string): void {\r\n // check if web worker and indexedDb use is allowed.\r\n if (this.useWebWorkerToCache && this.useIndexedDb) {\r\n // Send post message to web worker.\r\n sendToWebWorker({ id: \"clearconfigcache\", payload: relativeUrl });\r\n } else {\r\n // If web worker is not allowed, remove all configs from indexedDb as they are all stored as a single row.\r\n this.clearConfigCache();\r\n }\r\n }\r\n\r\n /**\r\n * This helper function is used to clear cached configs\r\n * @returns Promise\r\n */\r\n public async clearConfigCache(): Promise {\r\n if (this.useIndexedDb) {\r\n try {\r\n await this.initializeIndexedDb();\r\n\r\n try {\r\n await this.indexedDb.clearObjects();\r\n logger.log(\"Resolver: Cleared all configs from indexedDb.\");\r\n } catch {\r\n logger.logError(\"Resolver: Failed to clear all configs from indexedDb\");\r\n this.useIndexedDb = false;\r\n }\r\n } catch {\r\n logger.logError(\"Resolver: Failed to initialize indexedDb\");\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * For testing purpose to access what has been set for configServiceParameters\r\n */\r\n public getConfigServiceParameters(): string {\r\n return this.configServiceParameters;\r\n }\r\n\r\n /**\r\n * Adds an entry into the config timings for the given type and relative start time\r\n */\r\n public addConfigTiming(experienceType: string, startTime: number, type: \"network\" | \"cache\"): void {\r\n this.configTimings.push({\r\n experienceType,\r\n [type + \"FetchDuration\"]: performance.now() - startTime\r\n });\r\n }\r\n\r\n /**\r\n * Helper function to get Config Timings\r\n * @param pageTimings _pageTimings object\r\n */\r\n public getConfigTimings(pageTimings: any = {}, getAllConfigTimingsOverride = false): void {\r\n if (!this.configTimings) {\r\n return;\r\n }\r\n\r\n let allConfigsCacheDuration = 0;\r\n let allConfigsNetworkDuration = 0;\r\n for (const configTiming of this.configTimings) {\r\n // Instrument networkFetchDuration and cacheFetchDuration\r\n const experienceType = configTiming.experienceType.toLowerCase();\r\n const cacheFetchDuration = configTiming.cacheFetchDuration;\r\n const networkFetchDuration = configTiming.networkFetchDuration;\r\n\r\n if (experienceType === \"entrypoint\"\r\n || experienceType === \"river\"\r\n || experienceType === \"contentpreview\"\r\n // when appropriate debug flag is set, output all config timings.\r\n || appEnvironment.IsDebug\r\n || getAllConfigTimingsOverride) {\r\n\r\n // Instrumenting networkFetchDuration to check effectiveness of get Config over the network for FRE.\r\n if (networkFetchDuration !== undefined) {\r\n pageTimings[\"ConfigFetch.\" + experienceType] = Math.round(networkFetchDuration);\r\n }\r\n\r\n // Instrumenting cacheFetchDuration to check effectiveness of storing merged config since it will be always used in non FRE.\r\n if (cacheFetchDuration !== undefined) {\r\n pageTimings[\"ConfigCache.\" + experienceType] = Math.round(cacheFetchDuration);\r\n }\r\n }\r\n\r\n if (cacheFetchDuration !== undefined) {\r\n allConfigsCacheDuration += cacheFetchDuration;\r\n }\r\n\r\n if (networkFetchDuration !== undefined) {\r\n allConfigsNetworkDuration += networkFetchDuration;\r\n }\r\n }\r\n\r\n if (allConfigsCacheDuration) {\r\n pageTimings[\"ConfigCache.All\"] = Math.round(allConfigsCacheDuration);\r\n }\r\n\r\n if (allConfigsNetworkDuration) {\r\n pageTimings[\"ConfigFetch.All\"] = Math.round(allConfigsNetworkDuration);\r\n }\r\n }\r\n\r\n /**\r\n * UNIT TEST PURPOSE: Function to set configTimings\r\n * @param ConfigFetchTiming[]\r\n */\r\n public setConfigTimingsObject(configFetchTimings: ConfigFetchTiming[]): void {\r\n this.configTimings = configFetchTimings;\r\n }\r\n\r\n /**\r\n * Get the cache key based on confix index url and the target scope generated suffix.\r\n * @param relativeUrl The config url\r\n * @returns The unique cache key for the merged config + target scope combination.\r\n */\r\n public getCacheKey(relativeUrl: string): string {\r\n return relativeUrl === null ? null : this.removeCmsPathFromRelativeUrl(relativeUrl) + \"_\" + this.storageKey;\r\n }\r\n\r\n /**\r\n * Get cached Configs from IndexedDb and populate configMap based on target scope key.\r\n */\r\n private async _populateConfigMapFromIndexedDbAsync(): Promise {\r\n\r\n let cacheSource: string;\r\n\r\n try {\r\n // Check if indexedDb is present, if not return.\r\n // Check if web worker is present, if not, indexedDb will not be refreshed since refreshConfigCache uses post message to web worker.\r\n // so you may get stale configs within 3 days of time range so this check is essential as well.\r\n // Check if we've previously attempted to read from IDB, and if don't do it again.\r\n if (!this.useIndexedDb || !this.useWebWorkerToCache) {\r\n return;\r\n }\r\n\r\n // For Flight specific config resolution, we want to use cached configs only if flights match.\r\n try {\r\n const prgFlights = getLocalStorage().getItem(this.peregrineFlightsKey);\r\n if (prgFlights\r\n && this.peregrineFlights\r\n && prgFlights !== this.peregrineFlights) {\r\n\r\n // Reverse flight: if cached configs are for different flight, throw app error.\r\n if (this.peregrineFlights.indexOf(\"prg-lsconfigs\") >= 0) {\r\n this.resolverErrors.push({\r\n ...CachedConfigsForDifferentFlight,\r\n message: \"Cached configs are for different flight\"\r\n });\r\n }\r\n\r\n // DO NOT USE CACHED CONFIGS SINCE FLIGHTS ARE NOT SAME\r\n // SO CONFIG RESOLUTION MAY LEAD TO INCONSISTENT BEHAVIOR\r\n return;\r\n }\r\n } catch (e) {\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.PrgFlightLsReadError,\r\n message: \"Error reading prg flights from local storage\",\r\n pb: {\r\n ...ResolverAppErrors.PrgFlightLsReadError.pb,\r\n customMessage: e\r\n }\r\n });\r\n }\r\n\r\n const startBulkConfig = performance.now();\r\n\r\n this.configMap.clear();\r\n let cachedConfigs: CachedConfigsType;\r\n\r\n // Optionally pre-initialized IDB config read promise at the top page level\r\n const { _idbConfigReadPromise, _idbConfigLookup } = window;\r\n\r\n // Check if we have a top page-level initialized IDB read config lookup populated\r\n // with the specific entry we need, and if so use it. Otherwise proceed to load from indexDB\r\n cachedConfigs = (_idbConfigLookup || {})[this.storageKey] as CachedConfigsType;\r\n if (cachedConfigs) {\r\n\r\n cacheSource = \"pre-initialized config cache\";\r\n\r\n } else if (_idbConfigReadPromise) {\r\n // see if we have the pre-initialized config read promise from IDB, and if so\r\n // await on that instead of starting our own duplicate IDB init/read.\r\n\r\n cacheSource = \"pre-initialized IndexedDb read\";\r\n await _idbConfigReadPromise;\r\n cachedConfigs = (window._idbConfigLookup || {})[this.storageKey] as CachedConfigsType;\r\n\r\n } else {\r\n\r\n // start our own IDB read.\r\n cacheSource = \"IndexedDb bulk read\";\r\n await this.initializeIndexedDb();\r\n cachedConfigs = await this.indexedDb.getObject(this.storageKey);\r\n }\r\n\r\n if (!cachedConfigs || cachedConfigs.size === 0) {\r\n logger.log(`Resolver: Bulk read of configs from ${cacheSource} didn't find any configs.`);\r\n return;\r\n }\r\n\r\n this.populateConfigMapFromCachedConfigs(cachedConfigs, cacheSource);\r\n this.addConfigTiming(\"IdbInitAndReadAll\", startBulkConfig, \"cache\");\r\n\r\n } catch (e) {\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.IndexedDbBulkReadFailed,\r\n message: \"IndexedDb bulk read failed\",\r\n pb: {\r\n ...ResolverAppErrors.IndexedDbBulkReadFailed.pb,\r\n customMessage: `IndexedDb bulk read from ${cacheSource} failed. Error: ${e}`\r\n }\r\n });\r\n this.useIndexedDb = false;\r\n }\r\n }\r\n\r\n /**\r\n * Initialize indexedDb for configs. Instead of using this directly, please use the memoized\r\n * initializeIndexedDb function instead to avoid re-entrancy of the same async operation.\r\n */\r\n private async _initializeIndexedDb(): Promise {\r\n if (!this.useIndexedDb) {\r\n return;\r\n }\r\n\r\n try {\r\n // IMPORTANT!! The wwConfigs name must be in sync with the PCS script that initializes the IDB and WebWorkerResolver\r\n const { _idbConfigOpenPromise } = window;\r\n await this.indexedDb.initializeIndexedDb(1, \"Configurations_12\", \"wwConfigs\", _idbConfigOpenPromise);\r\n logger.log(\"Resolver: IndexedDb initialized in main thread.\");\r\n } catch (e) {\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.IndexedDbInitFailed,\r\n message: \"IndexedDb initialization failed\",\r\n pb: {\r\n ...ResolverAppErrors.IndexedDbInitFailed.pb,\r\n customMessage: e\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Populates the in-memory map object with the configs from cache\r\n */\r\n private populateConfigMapFromCachedConfigs(cachedConfigs: CachedConfigsType, cacheSource: string): void {\r\n\r\n // targetScopeKey is inserted into IndexedDb along with configIndexHref.\r\n // Although there can be more than type of keys being formed since DHP and NTP will have different ones due to pageType in targetScope.\r\n let unusableCount = 0;\r\n\r\n cachedConfigs.forEach(cachedConfig => {\r\n if (!cachedConfig.configIndexHref\r\n || this.isConfigStale(cachedConfig.storageTimestamp)) {\r\n\r\n unusableCount++;\r\n } else {\r\n const cacheKey = this.getCacheKey(cachedConfig.configIndexHref);\r\n\r\n this.configMap.set(cacheKey, cachedConfig);\r\n }\r\n });\r\n\r\n logger.log(`Resolver: Found ${cachedConfigs.size - unusableCount} valid configs out of ${cachedConfigs.size} from ${cacheSource}`);\r\n }\r\n\r\n /**\r\n * Get Peregrine specific flights from client settings and local storage\r\n * True if they are same else false\r\n */\r\n private prgFlightsSameAsLocalStorage(): boolean {\r\n try {\r\n const flightsFromStorage = getLocalStorage().getItem(this.peregrineFlightsKey);\r\n return flightsFromStorage\r\n && this.peregrineFlights\r\n && flightsFromStorage === this.peregrineFlights;\r\n } catch (error) {\r\n this.resolverErrors.push({\r\n ...ResolverAppErrors.PrgFlightLsReadError,\r\n message: \"Error reading prg flights from localStorage\",\r\n pb: {\r\n ...ResolverAppErrors.PrgFlightLsReadError.pb,\r\n customMessage: error\r\n }\r\n });\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Get local storage key where we will be storing hashes\r\n */\r\n private getConfigsCacheLocalStorageKey(): string {\r\n const { audienceMode, locale = {}, pageType } = this.currentTargetScope || {};\r\n return `config_hash_${audienceMode}_${locale.language}_${locale.market}_${pageType}_${appEnvironment.AppType}`;\r\n }\r\n\r\n /**\r\n * Gets the config hashes from local storage.\r\n * @param clientSettings - The \"clientSettings\" object.\r\n * @returns string config hash QSP\r\n */\r\n private getConfigCacheProperties(): ConfigCacheProperties {\r\n let configCacheProperties: ConfigCacheProperties;\r\n try {\r\n // Get config hashes from client settings\r\n configCacheProperties = appEnvironment.ConfigCacheProperties;\r\n\r\n // If user was in different flights earlier in last page than right now, no need to get hashes from local storage.\r\n // We do not want to use indexedDB configs.\r\n if (!this.prgFlightsSameAsLocalStorage()) {\r\n // Here we know that flights for this page are different than flights for earlier page for which we have render cache snapshot and configs saved.\r\n // We do not want to use RC snapshot for this and do not want to use cached configs.\r\n // RC snapshot will be helpful like an automatic recovery if something goes wrong.\r\n this.purgeRenderCacheUponConfigChanges(false);\r\n\r\n return configCacheProperties;\r\n }\r\n\r\n // Get last hashes from local storage\r\n const configHashes = getLocalStorage().getItem(this.getConfigsCacheLocalStorageKey());\r\n if (configHashes) {\r\n const {bundleHash, configHash, locHash} = JSON.parse(configHashes) || {};\r\n if (bundleHash && configHash && locHash) {\r\n configCacheProperties.lastBundleHash = bundleHash;\r\n configCacheProperties.lastConfigHash = configHash;\r\n configCacheProperties.lastLocHash = locHash;\r\n }\r\n }\r\n\r\n return configCacheProperties;\r\n } catch (error) {\r\n logger.logError(`Error getting config hashes from ls: ${error}`);\r\n\r\n // TODO: Add app error\r\n }\r\n\r\n return configCacheProperties;\r\n }\r\n\r\n /**\r\n * Write config hashes to local storage\r\n */\r\n private writeConfigCacheProperties(): void {\r\n if (!appEnvironment.IsGitConfigs) {\r\n return;\r\n }\r\n\r\n try {\r\n const { bundleHash, configHash, locHash: locHash } = appEnvironment.ConfigCacheProperties || {};\r\n if (bundleHash && configHash && locHash) {\r\n getLocalStorage().setItem(this.getConfigsCacheLocalStorageKey(), JSON.stringify({\r\n bundleHash,\r\n configHash,\r\n locHash\r\n }));\r\n }\r\n } catch (error) {\r\n logger.logError(`Error writing config hashes to ls: ${error}`);\r\n\r\n // TODO: Add app error\r\n }\r\n }\r\n\r\n /**\r\n * Write given CBID in local storage\r\n * @param cbid Cache busting identifier\r\n */\r\n private writeCbidInLocalStorage(cbid: string): void {\r\n const cbidKey = `cbid_${appEnvironment.AppType || \"\"}`;\r\n try {\r\n getLocalStorage().setItem(cbidKey, cbid);\r\n } catch (e) {\r\n throw `Error writing cbid: ${cbid} to local storage with key ${cbidKey}. Error: ${e}`;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Config Timings type to determine how much time each experience took to getConfig\r\n */\r\ninterface ConfigFetchTiming {\r\n /**\r\n * Experience Type\r\n */\r\n experienceType: string,\r\n\r\n /**\r\n * Time took to get configs over the network and merge them.\r\n */\r\n networkFetchDuration?: number,\r\n\r\n /**\r\n * Time took to get merged configs from cache.\r\n */\r\n cacheFetchDuration?: number\r\n}\r\n\r\n/**\r\n * Typed object containing boolean flag that tells if configs are equal and live cbid. This type comes are response from web worker to refresh config message.\r\n */\r\ninterface RefreshConfigsResponse {\r\n /**\r\n * True if configs are equal\r\n */\r\n configsEqual?: boolean;\r\n\r\n /**\r\n * CBID (cache busting identifier) from live document\r\n */\r\n liveCbId?: number;\r\n}\r\n\r\n/** Resolver Singleton */\r\nlet _instance: Resolver = new Resolver();\r\n\r\n/** Reinitialize the singleton class instance. */\r\nexport function resetResolverInstance(): void {\r\n _instance = new Resolver();\r\n}\r\n\r\nexport const resolver = {\r\n getRootConfig: (cmsHref: string) => { return _instance.getRootConfig(cmsHref); },\r\n getConfig: (configId: string | ConfigReference) => { return _instance.getConfig(configId); },\r\n mergeConfig: (configs: IExperienceConfig[]) => { return _instance.mergeConfig(configs); },\r\n resolveConfigIndex: (configIndex: IExperienceConfigIndex) => { return _instance.resolveConfigIndex(configIndex); },\r\n targetScopeMatched: (experienceRef: IExperienceConfigLink) => { return _instance.targetScopeMatched(experienceRef); },\r\n getConfigTimings: (pageTimings: any = {}, getAllConfigTimingsOverride = false) => { return _instance.getConfigTimings(pageTimings, getAllConfigTimingsOverride); },\r\n getResolverErrors: () => { return _instance.getResolverErrors(); },\r\n refreshConfigCache: () => { return _instance.refreshConfigCache(); },\r\n removeCachedConfig: (relativeUrl: string) => { return _instance.removeCachedConfig(relativeUrl); },\r\n clearConfigCache: () => { return _instance.clearConfigCache(); },\r\n getInstance: () => { return _instance; },\r\n setTargetScopeAndConfigServiceParams: () => { return _instance.setTargetScopeAndConfigServiceParams(); },\r\n initialize: (appErrorCallback: (data: AppError) => void) => { return _instance.initialize(appErrorCallback); },\r\n getUseConfigService: () => { return _instance.useConfigService(); },\r\n\r\n // these are test specific exports\r\n overrideConfig: (configId: string | ConfigReference, experienceType: string, config: any) => { return _instance.overrideConfig(configId, experienceType, config); },\r\n overrideCurrentRequestTargetScope: (targetScope: PageRequestTargetScope) => { return _instance.overrideCurrentRequestTargetScope(targetScope); },\r\n overrideCurrentRequestEnvironment: (overrideEnv: Environment) => { return _instance.overrideCurrentRequestEnvironment(overrideEnv); },\r\n generateKey: () => { return _instance.generateKey(); },\r\n clearInternalState: () => { return _instance.clearInternalState(); },\r\n initializeCaching: (idb?: IndexedDb) => { return _instance.initializeCaching(idb); },\r\n getConfigServiceParameters: () => { return _instance.getConfigServiceParameters(); },\r\n setConfigTimingsObject: (configFetchTimings: ConfigFetchTiming[]) => { return _instance.setConfigTimingsObject(configFetchTimings); },\r\n getCacheKey: (relativeUrl: string) => { return _instance.getCacheKey(relativeUrl); },\r\n updateServerCache: (configIndexHref: string, configFromServerCache: ExperienceConfigWrapper) => { return _instance.updateServerCache(configIndexHref, configFromServerCache); }\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n/**\r\n * Default query param prefix used if none specified\r\n */\r\nexport const DefaultQueryParamPrefix = \"rd\";\r\n/**\r\n * Generates a plain JavaScript object with the client values.\r\n * @param values The values to convert.\r\n */\r\nfunction objectFromSpecification(values) {\r\n const requestDataValue = values;\r\n if (requestDataValue.clientValue !== undefined) {\r\n // If it's a IRequestDataValueSpecification, return the actual getter\r\n return requestDataValue.clientValue;\r\n }\r\n // Otherwise recurse for each key until we find a plain value type\r\n return Object\r\n .keys(values)\r\n .reduce((pv, cv) => (Object.assign(Object.assign({}, pv), { [cv]: objectFromSpecification(values[cv]) })), {});\r\n}\r\n/**\r\n * Allows you to pass data about a request between client and server.\r\n * This interface can be used isomorphically.\r\n *\r\n * The \"spec\" contains \"getters\" to receive the data when called client side.\r\n * To operate server-side you must first serialize the client-side data and pass it via\r\n * query string parameters to the server. You then \"load\" the query string parameters using\r\n * \"loadQueryParams\". Once loaded you can request the data server-side with the same\r\n * interface as the client.\r\n *\r\n * NOTE: The use of URLSearchParams makes this not IE11 compatible without polyfill.\r\n *\r\n * @example\r\n * interface IRequestContext extends IRequestDataObject {\r\n * window: {\r\n * innerWidth: IRequestDataValue\r\n * }\r\n * }\r\n *\r\n * // On client and server\r\n * const rd = new RequestData(\r\n * {\r\n * window: {\r\n * innerWidth: {\r\n * clientValue: window.innerWidth\r\n * }\r\n * }\r\n * });\r\n *\r\n * // Client-side\r\n * const innerWidth = rd.data.window.innerWidth();\r\n *\r\n * const serialized = rd.getSerializedData();\r\n * // Make-call to server\r\n * fetch(`https://assets.msn.com/render?${serialized}`);\r\n *\r\n * // Server-side (in default module)\r\n * requestData.loadQueryParams(req.query)\r\n * const innerWidth = rd.data.window.innerWidth();\r\n */\r\nexport class RequestData {\r\n /**\r\n * @param spec Spec contains serialization metadata as well as client and server value getters\r\n * @param qspPrefix Prefix to append to serialized query string parameters\r\n */\r\n constructor(spec, qspPrefix) {\r\n this.spec = spec;\r\n this.qspPrefix = qspPrefix || DefaultQueryParamPrefix;\r\n }\r\n get verParam() {\r\n return `${this.qspPrefix}.ver`;\r\n }\r\n /**\r\n * Will return memoized values in the same structure as IRequestDataSpecification,\r\n * or the data loaded into\r\n */\r\n get data() {\r\n if (this.memo === undefined) {\r\n // Assume we're client-side if we haven't memoized query string params\r\n this.memo = objectFromSpecification(this.spec.spec);\r\n }\r\n return this.memo;\r\n }\r\n /**\r\n * Loads all query string parameters prefixed with qspPrefix into request data.\r\n * @param qsp The query string params to parse. It is safe to pass in the entire query--not just data prefixed by qspPrefix.\r\n */\r\n loadQueryParams(qsp) {\r\n if (this.memo !== undefined) {\r\n throw \"overwriting existing query string parameters.\";\r\n }\r\n const ver = qsp.get([this.qspPrefix, \"ver\"].join(\".\"));\r\n if (ver !== this.spec.ver) {\r\n throw `unmatched spec version: expected \"${this.spec.ver}\" but got ${ver}.`;\r\n }\r\n this.memo = {};\r\n // Load each query string parameter one at a time\r\n qsp.forEach((value, qp) => {\r\n if (!qp.startsWith(this.qspPrefix)) {\r\n // We don't belong in this set (we don't have the right prefix)--ignore.\r\n return;\r\n }\r\n if (qp === this.verParam) {\r\n // Skip version\r\n return;\r\n }\r\n // Split key by dots and remove prefix\r\n const split = qp.split(\".\").slice(1);\r\n let current = this.memo;\r\n split.forEach((key, i) => {\r\n let newValue = {}; // assume object unless last in list\r\n if (i === split.length - 1) {\r\n try {\r\n newValue = () => JSON.parse(value);\r\n }\r\n catch (ex) {\r\n // Reset memo to undefined and re-throw\r\n this.memo = undefined;\r\n throw ex;\r\n }\r\n }\r\n if (!Object.prototype.hasOwnProperty.call(current, key)) {\r\n current[key] = newValue;\r\n }\r\n if (typeof newValue === \"object\") {\r\n // Already exists--don't overwrite\r\n current = current[key];\r\n return;\r\n }\r\n });\r\n });\r\n }\r\n /**\r\n * Gets the stored values serialized as strings\r\n */\r\n getURLSearchParams() {\r\n const params = new URLSearchParams();\r\n /**\r\n * recurse traverses the data object to build dotted prefixes.\r\n * e.g.\r\n * { a: { b: { c: 5 } } } becomes a.b.c=5\r\n */\r\n const recurse = (obj, prefix) => {\r\n Object.keys(obj).forEach(k => {\r\n const current = obj[k];\r\n const currentPrefix = [...prefix, k];\r\n if (typeof current === \"object\") {\r\n recurse(current, currentPrefix);\r\n return;\r\n }\r\n // This will put explicit quotes (%22) around strings in the query, which is intentional\r\n // so JSON.parse is able to determine the correct type for the value.\r\n params.append(currentPrefix.join(\".\"), JSON.stringify(current()));\r\n });\r\n };\r\n recurse(this.data, [this.qspPrefix]);\r\n params.sort();\r\n // Version is always at the end\r\n params.append(this.verParam, this.spec.ver);\r\n return params;\r\n }\r\n /**\r\n * Sort the search params and serialize them to string.\r\n */\r\n getSerializedData() {\r\n return this.getURLSearchParams().toString();\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n// These values should match those found in experiences-base/ColumnWidths.ts\r\nconst DefaultSize2ColumnWidth = 624;\r\nconst DefaultSize3ColumnWidth = 948;\r\nconst DefaultSize4ColumnWidth = 1272;\r\n\r\nconst contentBuffer = 32;\r\n\r\n// The breakpoints to determine the breakpoint from\r\nexport const breakpoints: number[] = [\r\n 0,\r\n DefaultSize2ColumnWidth + contentBuffer,\r\n DefaultSize3ColumnWidth + contentBuffer,\r\n DefaultSize4ColumnWidth + contentBuffer\r\n];","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { identifyBreakpoint } from \"@microsoft/fast-layouts-react\";\r\nimport { breakpoints } from \"./SSRInteropContractHelpers\";\r\n\r\n/**\r\n * The param-name prefix used when serializing params onto the query string.\r\n */\r\nexport const SSRRequestDataPrefix = \"rd\";\r\n\r\n/**\r\n * Defines the \"interop\" contract between client and server-side renderer.\r\n * All of these values will be serialized into request parameters to be passed\r\n * on the HTTP request to the SSR server.\r\n */\r\nexport const SSRContract = {\r\n ver: \"0.1.0\",\r\n spec: {\r\n // IWindow\r\n innerWidth: {\r\n clientValue: () => window.innerWidth\r\n },\r\n innerHeight: {\r\n clientValue: () => window.innerHeight\r\n },\r\n breakpoint: {\r\n clientValue: () => identifyBreakpoint(window.innerWidth, breakpoints)\r\n },\r\n locationHash: {\r\n clientValue: () => window.location.hash\r\n },\r\n locationHref: {\r\n clientValue: () => window.location.href\r\n },\r\n locationHost: {\r\n clientValue: () => window.location.host\r\n },\r\n locationHostName: {\r\n clientValue: () => window.location.hostname\r\n },\r\n locationOrigin: {\r\n clientValue: () => window.location.origin\r\n },\r\n locationPathName: {\r\n clientValue: () => window.location.pathname\r\n },\r\n locationProtocol: {\r\n clientValue: () => window.location.protocol\r\n },\r\n locationSearch: {\r\n clientValue: () => window.location.search\r\n },\r\n // IBrowser\r\n canUseCssGrid: {\r\n clientValue: () => ((window.CSS && window.CSS.supports && CSS.supports(\"display\", \"grid\")) || false)\r\n },\r\n // IDevice\r\n devicePixelRatio: {\r\n clientValue: () => window.devicePixelRatio\r\n },\r\n // ILocale\r\n language: {\r\n clientValue: () => document.documentElement.lang\r\n },\r\n direction: {\r\n clientValue: () => document.documentElement.dir\r\n }\r\n }\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppEnvironment, appEnvironment } from \"../app/AppEnvironment\";\r\nimport { IRequestContext, IRequestData } from \"./IRequestContext\";\r\nimport { IRequestDataInteropValue, IRequestDataSpecification, RequestData } from \"@msnews/ssr-server\";\r\nimport { SSRContract, SSRRequestDataPrefix } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * Defines the parameters used to create a request contract.\r\n * Destructured from an object due to the combinations of parameters that are valid.\r\n */\r\nexport interface IRequestContextContract {\r\n /**\r\n * URL Search params that contain request data (client-side values sent to the server).\r\n * Only required when called server-side\r\n */\r\n params?: URLSearchParams;\r\n\r\n /**\r\n * The prefix to use to pull query params related to request data.\r\n */\r\n qspPrefix?: string;\r\n\r\n /**\r\n * The specification defining what request data should be passed between client and server.\r\n */\r\n spec?: IRequestDataSpecification;\r\n}\r\n\r\n/**\r\n * Used to propagate client-only data (like window.innerWidth) and singletons (like AppEnvironment)\r\n * in a non-global way to assist in making all libs/components/experiences isomorphic.\r\n */\r\nexport class RequestContext implements IRequestContext {\r\n private requestData: RequestData;\r\n private RequestId: string;\r\n\r\n /**\r\n * Create a new request context.\r\n *\r\n * If spec or qspPrefix is not provided it will use the defaults specified in \"@msnews/isomorphic-util\"\r\n *\r\n * @param IRequestContextContract parameters used to initialize the request context\r\n */\r\n constructor({ params, qspPrefix, spec }: IRequestContextContract = {}, requestId?: string) {\r\n this.requestData = new RequestData(spec || SSRContract, qspPrefix || SSRRequestDataPrefix);\r\n if (params) {\r\n this.requestData.loadQueryParams(params);\r\n }\r\n if (requestId) {\r\n this.RequestId = requestId;\r\n }\r\n }\r\n\r\n /**\r\n * The request ID is used to distinguish requests server-side.\r\n * This method passes through the app environment ActivityId\r\n */\r\n public get requestId(): string {\r\n return this.RequestId || this.app.ActivityId;\r\n }\r\n\r\n /**\r\n * The current app environment.\r\n */\r\n public get app(): AppEnvironment {\r\n // TODO: Remove global reference and add to the constructor parameters.\r\n // The constructor should create a new app environment or accept an optional override.\r\n return appEnvironment;\r\n }\r\n\r\n /**\r\n * The current request data. i.e. client-side data that is passed\r\n * between client and server.\r\n */\r\n public get data(): IRequestData {\r\n return this.requestData.data;\r\n }\r\n}\r\n\r\n/**\r\n * Get clientValue from data getter.\r\n * @param dataGetter the data getter to get client-side value from spec\r\n * @param dataName the data name\r\n * @param throwException If true, throws an exception\r\n */\r\nexport function getContextData(dataGetter: any, dataName: string, throwException = true) {\r\n if ((typeof(dataGetter) === \"function\")) {\r\n const value = dataGetter();\r\n if (value || value === 0) {\r\n return value;\r\n }\r\n }\r\n if (throwException) {\r\n throw new Error(\"Expected \" + dataName + \" to return value. Possible invalid RequestContext spec used or the spec doesn't contain this data.\");\r\n }\r\n return undefined;\r\n}\r\n\r\n/**\r\n * Get current URL from request context. in browser, it has the same value with window.location.href\r\n * @param context the request context\r\n */\r\nexport function safeGetLocationHref(context: IRequestContext): string {\r\n return getContextData(context.data.locationHref, \"locationHref\", false);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ILoggingService } from \"clientcore-infrastructure-analytics/ILoggingService\";\r\nimport { Logger, logger } from \"./Logger\";\r\nimport { getQueryParameterByName } from \"./Util\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\ndeclare global {\r\n interface Window {\r\n webpackRequire: any;\r\n }\r\n}\r\n\r\ndeclare let __webpack_require__: any;\r\n\r\n/**\r\n * Logger that simply logs to console with minimum dependencies.\r\n * Used for bootstrap/inline script where we don't need any logging nor its dependencies.\r\n */\r\nexport class LiteLogger implements Logger {\r\n\r\n /** Backing field for the isDebug function */\r\n private isDebugEnabled: boolean;\r\n\r\n /**\r\n * The constructor\r\n */\r\n public constructor() {\r\n if (canUseDOM()) {\r\n this.isDebugEnabled = ((getQueryParameterByName(window.location.href, \"debug\") || \"\").toLowerCase() in { 1: 1, true: 1 });\r\n\r\n // On debug mode, make webpack_require available as global function\r\n // so any code in packages could be triggered from console. Handy for debugging.\r\n if (this.isDebugEnabled && !global[\"TEST_ENV\"]) {\r\n window.webpackRequire = __webpack_require__;\r\n }\r\n } else {\r\n this.isDebugEnabled = false; // isDebugEnabled should be set explictly using the setDebug method\r\n }\r\n }\r\n\r\n /**\r\n * Returns the logging service\r\n * @returns {ILoggingService}\r\n */\r\n public getLoggingService(): ILoggingService {\r\n return null;\r\n }\r\n\r\n /**\r\n * Checks whether we're running in debug mode.\r\n * @returns True when either debug=1 or debug=true is present as a query param, otherwise false.\r\n */\r\n public isDebug(): boolean {\r\n return this.isDebugEnabled;\r\n }\r\n\r\n /**\r\n * Override the isDebug setting. Useful when server side rendering.\r\n */\r\n public setDebug(isDebug: boolean): void {\r\n this.isDebugEnabled = isDebug;\r\n }\r\n\r\n /**\r\n * Set the tags to filter logs.\r\n * @param tags Tags to filter logs. If empty, do not filter.\r\n */\r\n public setTags(tags: string[]): void {\r\n // Not supported in console logger at the moment\r\n }\r\n\r\n /**\r\n * Log console message.\r\n * Note that these are not output to the console unless you're in debug mode.\r\n * @param message - Message to log.\r\n * @param tags - Optional tags for specifying log type for filtering logs.\r\n */\r\n public log(message: string, tags?: string[]): void {\r\n if (this.isDebug()) {\r\n console.info(message);\r\n }\r\n }\r\n\r\n /**\r\n * Log error message.\r\n * @param message - Message to log\r\n */\r\n public logError(message: string): void {\r\n console.error(message);\r\n }\r\n\r\n /**\r\n * Lazy log console message. Use this when the message being constructed is complex or expensive so that it's only evaluated if needed.\r\n * Note that the callback is not invoked and the message is not output unless you're in debug mode.\r\n * @param getMessage - The function to call to get message to log\r\n */\r\n public logCallback(getMessage: () => string): void {\r\n if (this.isDebug()) {\r\n console.info(getMessage());\r\n }\r\n }\r\n\r\n /**\r\n * Log the object to the console.\r\n * Note that these are not output to the console unless you're in debug mode.\r\n * @param message - Array of messages to log\r\n */\r\n public logObjects(...message: any[]): void {\r\n if (this.isDebug()) {\r\n console.log(...message);\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Utility method to extract query string param in url.\r\n * @param name - Query param name\r\n * @returns Query param value\r\n */\r\nexport function getQueryParameterByName(locationHref: string, name: string): string {\r\n\r\n const nameRegEx = name.replace(/[[\\]]/g, \"\\\\$&\");\r\n const regex: any = new RegExp(\"[?&]\" + nameRegEx + \"(=([^&#]*)|&|#|$)\");\r\n\r\n const queryNameValueMatches: any = regex.exec(locationHref);\r\n if (!queryNameValueMatches) {\r\n return null;\r\n }\r\n\r\n // the second group would contain the value of the param\r\n const queryValue = queryNameValueMatches[2];\r\n\r\n return decodeURIComponent(queryValue.replace(/\\+/g, \" \")) || \"\";\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./ComponentConnector.constants\";\r\nexport * from \"./ComponentConnector\";\r\nexport * from \"./ExperienceLoadInfo\";\r\nexport * from \"./IComponentConnector\";\r\nexport * from \"./ExperiencePerfTimeline\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./DataConnector\";\r\nexport * from \"./IDataConnector\";\r\nexport * from \"./IPageSettingsDataConnector\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DynamicReducer, IReducer } from \"../reducers\";\r\nimport { PerfTimeline, tryGetPerfTimeline } from \"@msnews/diagnostics\";\r\nimport { Subspace, subspace } from \"redux-subspace\";\r\nimport { merge as _merge, set as _set } from \"lodash-es\";\r\n\r\nimport { tryGetDataConnector } from \"../reducers/GetDataConnector\";\r\nimport { initializeDataConnectorTracker } from \"../reducers/DataConnectorTracker\";\r\nimport { ConnectorConstants } from \"../constants/ConnectorConstants\";\r\nimport { IDataConnector } from \"./IDataConnector\";\r\nimport { IRequestContext } from \"@msnews/core\";\r\nimport { Store } from \"redux\";\r\n\r\n// Inject DataConnectorTracker with tryGetDataConnector function to avoid a dependency cycle.\r\ninitializeDataConnectorTracker(tryGetDataConnector);\r\n\r\n/**\r\n * Base class for data connectors.\r\n * A Data connector is a the base for all connectors in a msnews-experiences-redux application. The data connector has\r\n * the methods and properties that manage a state object, which can either be a sub-state within the app, or the full\r\n * application state tree\r\n * @class\r\n */\r\nexport class DataConnector implements IDataConnector {\r\n /**\r\n * The Redux subspace store for this connector\r\n * @type {Subspace}\r\n */\r\n protected _subspace: Subspace;\r\n\r\n /**\r\n * The full namespace, including all of the ancestors, in dotted notation:\r\n * i.e.: parent.child.grandchild\r\n */\r\n private _fullNamespace: string;\r\n\r\n /**\r\n * The perf timeline object for this connector\r\n */\r\n private _perfTimeline: PerfTimeline;\r\n\r\n /**\r\n * The config href for the connector\r\n */\r\n private _configHref: string;\r\n\r\n /**\r\n * Gets the Redux store for this data connector instance, which is a subspace within the parent state\r\n * @property\r\n * @returns {Store} The state subspace for this connector, which looks like a Redux Store\r\n */\r\n public get store(): Store {\r\n return this._subspace;\r\n }\r\n\r\n /**\r\n * Gets the full namespace for this connector\r\n * @property\r\n * @returns {string} The connector's full namespace\r\n */\r\n public get fullNamespace(): string {\r\n return this._fullNamespace;\r\n }\r\n\r\n /**\r\n * The perf timeline object for this connector\r\n */\r\n public get perfTimeline(): PerfTimeline {\r\n return this._perfTimeline;\r\n }\r\n\r\n /**\r\n * Get the config href for the connector\r\n */\r\n public get configHref(): string {\r\n return this._configHref;\r\n }\r\n /**\r\n * Set the config href for the connector\r\n */\r\n public set configHref(href: string) {\r\n this._configHref = href;\r\n }\r\n\r\n /**\r\n * Construct a new Data connector\r\n * @constructor\r\n * @param { string } namespace The redux subspace namespace for the connector\r\n * @param { string } parentNamespace The redux subspace namespace for the parent connector, if it exists\r\n * @param { DynamicReducer } rootReducer The root reducer for the Application\r\n * @param { IReducer } reducer The reducer for this connector instance\r\n * @param { Store} parentStore The parent store (or redux subspace) that this connector will be a subspace within\r\n * @param { TConfig } config Param containing the config for the connector\r\n * @param { IRequestContext } requestContext The request context\r\n * @param { boolean } isGlobal Optional param to set if the connector should be global or not. Defaults to false\r\n */\r\n public constructor(\r\n public readonly namespace: string,\r\n public readonly parentNamespace: string,\r\n public readonly rootReducer: DynamicReducer,\r\n public readonly reducer: IReducer,\r\n parentStore: Store,\r\n public config: TConfig,\r\n public requestContext: IRequestContext,\r\n public readonly isGlobal: boolean = false) {\r\n // Setup the full namespace. This namespace will be used as the parentNamespace to any connectors created as children of this\r\n // connector. It is the \"dotted\" concatenation of the parentNamespace + namespace, which represents the key into the state tree for the child connectors\r\n this._fullNamespace = (typeof parentNamespace !== \"undefined\" && parentNamespace !== \"\") ? parentNamespace + \".\" + namespace : namespace;\r\n\r\n // setup the sub-spaced store with a state selector that is bound to this connector's instance, and returns the inner state object (TState) for this connector\r\n this.selectState = this.selectState.bind(this);\r\n this._subspace = subspace(this.selectState, this.namespace)(parentStore);\r\n\r\n // try to create a perf timeline for this connector\r\n this._perfTimeline = this.tryGetPerfTimeline(namespace);\r\n\r\n rootReducer.addSubReducerForConnector(this);\r\n }\r\n\r\n /**\r\n * Gets the current state of the connector. The connector's state (TState) is the sub-portion of the returned state object with the postfix \"State\"\r\n * This is because the overall subspace state for the connector will contain the children states as well\r\n * @method\r\n * @returns {TState} The current state of the component.\r\n */\r\n public getCurrentState(): TState {\r\n // Get the subspace state for this connector. It will be something like:\r\n // { _@STATE@_ : { TState }}, where the subspace selector will already have been used to get the namespaced substate\r\n const wrappedState: TState = this.store.getState();\r\n\r\n // Get the currentState, that will be returned. By default it wil be just the state for this controller\r\n const connectorState = wrappedState[ConnectorConstants.connectorStateKey];\r\n\r\n // If the connector's state is not global, then check to see if there are any global connectors it needs to be merged with\r\n // If the connector is global, then its state is just returned, otherwise we would have an infinte loop merging a global connectors's\r\n // state with itself.\r\n if (!this.isGlobal) {\r\n // Get the list of global connectors\r\n const globalConnectors = this.rootReducer.globalConnectors();\r\n\r\n // See if there are any global connectors that need to be merged in.\r\n if (globalConnectors.length !== 0) {\r\n // For each global connector, merge it's state into the final result, using the global connector's namespace\r\n // So the resulting state will be:\r\n // { globalConnectorNamespace: { state }, TSTATE }}\r\n globalConnectors.forEach(globalConnector => {\r\n _set(connectorState, globalConnector.namespace, globalConnector.getCurrentState());\r\n });\r\n }\r\n }\r\n return connectorState;\r\n }\r\n\r\n /**\r\n * The method is called as the application is starting up, components are created.\r\n * The method can be used by connectors to perform one time initialization functions\r\n * This method needs to be overridden if your connector has specific startup needs\r\n * @method\r\n * @returns void\r\n */\r\n public onApplicationStart(): void { /** no-op */ }\r\n\r\n /**\r\n * The subspace selector that gets the portion of the state tree that is for this connector\r\n * @param state The parent state object that contains the subspace\r\n */\r\n private selectState(state: TParentState): TState {\r\n return (state[this.namespace]);\r\n }\r\n\r\n /**\r\n * Attempts to create the {PerfTimeline} object for this connector\r\n */\r\n private tryGetPerfTimeline(namespace: string): PerfTimeline {\r\n\r\n const namespaceParts = namespace.split(\"_\");\r\n const [connectorType] = namespaceParts;\r\n\r\n // there may not be any instance id -- in which case this would simply be the connector type.\r\n const instanceId = namespaceParts[namespaceParts.length - 1];\r\n\r\n // get the perf timeline object if applicable to the current experience\r\n return tryGetPerfTimeline(connectorType, instanceId);\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { endsWith as _endsWith, some as _some } from \"lodash-es\";\r\n\r\nimport { IActionMap } from \"./IActionMap\";\r\nimport { IActionPayload } from \"./IActionPayload\";\r\nimport { String as StringOperations } from \"typescript-string-operations\";\r\n\r\n/**\r\n * Class Contains helpers to use inside of a reducer, that is managed by and called from DynamicReducer\r\n * These helpers provide the ability to use a strongly typed callback that matches the parameters of an Action.\r\n * redux-subspace will automatically prepend a namespace to actions so that they are targeted to their specific subspace.\r\n * DynamicReducer already handles ensuring actions reach the correct reducer, so the redux-subspace namespace can be ignored\r\n * @class\r\n */\r\nexport class ActionHandler {\r\n\r\n /**\r\n * local function that either uses the built-in String.prototype.endsWith function, or uses the lodash-es function to polyFill;\r\n * the built-in function is significantly faster than the lodash-es function or other options, so we want to use it when we can;\r\n * the lodash-es function, based on splice, is faster than String.prototype.indexOf, but using RegEx might be faster...\r\n */\r\n private static endsWith: Function = String.prototype.endsWith\r\n ? function (search: string, target: string): boolean { return search.endsWith(target); }\r\n : _endsWith;\r\n\r\n /**\r\n * Method to handle specific actions.\r\n * @method\r\n * @param actionPayload {IActionPayload} The action details.\r\n * @param actionMap {IActionMap} The actionMap which maps Action to its callback function type.\r\n * @param callback {TActionSignature} function of type TActionSignature.\r\n * @return { boolean } true if the action type matched, false otherwise.\r\n */\r\n public static handleAction(\r\n actionPayload: IActionPayload,\r\n actionMap: IActionMap,\r\n callback: TActionSignature): boolean {\r\n\r\n // actionPayload.type may have a redux-subspace namespace prepended, so check to see if the ending action is what we want\r\n // namespaces are separated from the action type by a \"/\";\r\n // we use that to differentiate where the payload type ends with the mapped type as part of the name, but is not the same action\r\n // e.g. \"Action\" in the action map and \"NameSpace/AnotherAction\" in the payload, both end in \"Action\" but do not match\r\n // we prepend to *both* to cover the case where they are already equal (that is, no namespace is present)\r\n\r\n if (ActionHandler.endsWith(actionPayload.type + \"\", actionMap.type)) {\r\n callback.apply(callback, actionPayload.params);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Method to handle multiple actions with same signature.\r\n * @method\r\n * @param actionPayload {IActionPayload} The action details.\r\n * @param actionMap {IActionMap[]} The collection of actionMaps which maps Action to its callback function type.\r\n * @param callback {TActionSignature} function of type TActionSignature.\r\n * @return { boolean } true if the action type matched, false otherwise.\r\n */\r\n public static handleActions(\r\n actionPayload: IActionPayload,\r\n actionMaps: IActionMap[],\r\n callback: TActionSignature): boolean {\r\n\r\n const actionPayloadType = actionPayload.type + \"\";\r\n const actionsMatched = _some(actionMaps, (actionMap) => ActionHandler.endsWith(actionPayloadType, actionMap.type));\r\n\r\n if (actionsMatched) {\r\n callback.apply(callback, actionPayload.params);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Method to handle specific actions and check typescript type safely.\r\n * It throws error if actionMap.type does not equal the actionPayload.type.\r\n * @method\r\n * @param actionPayload {IActionPayload} The action details.\r\n * @param actionMap {IActionMap} The actionMap which maps Action to its callback function type.\r\n * @param callback {TActionSignature} function of type TActionSignature.\r\n * @return { boolean } true if the action type matched, false otherwise.\r\n */\r\n public static safeHandleAction(\r\n actionPayload: IActionPayload,\r\n actionMap: IActionMap,\r\n callback: TActionSignature): any {\r\n\r\n if (!ActionHandler.endsWith(actionPayload.type + \"\", actionMap.type)) {\r\n throw \"The action payload does not match the action type.\";\r\n }\r\n\r\n callback.apply(callback, actionPayload.params);\r\n return true;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport IConnectedComponentProps from \"./IConnectedComponentProps\";\r\n\r\nexport default IConnectedComponentProps;\r\nexport * from \"./IConnectedComponentProps\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./BaseExperience\";\r\nexport * from \"./ExperienceInitialProps\";\r\nexport * from \"./ExperienceInitialPositionProps\";\r\nexport * from \"./MnsCreatorDashboard.attributes\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./AppErrors\";\r\nexport * from \"./AppErrorTracker\";\r\nexport * from \"./Telemetry.OrdinalTracker\";\r\nexport * from \"./Telemetry.props\";\r\nexport * from \"./Telemetry.tags\";\r\nexport * from \"./Telemetry\";\r\nexport * from \"./Telemetry.types\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { isNil, isString, omitBy } from \"lodash-es\";\r\n\r\nimport { TelemetryOrdinalTracker } from \"./Telemetry.OrdinalTracker\";\r\nimport { TelemetryProps } from \"./Telemetry.props\";\r\nimport { TelemetryTags } from \"./Telemetry.tags\";\r\nimport { TelemetryTypes } from \".\";\r\nimport { Utility } from \"@msnews/core\";\r\n\r\n/**\r\n * Telemetry class to inject into components via props.\r\n *\r\n * @export\r\n * @class Telemetry\r\n */\r\nexport class Telemetry {\r\n\r\n /**\r\n * The index to uniquely identify the telemetry elements.\r\n * @private\r\n * @type {number}\r\n */\r\n public static ordinalTracker: { [id: number]: TelemetryOrdinalTracker } = {\r\n 0: {\r\n childIndices: [],\r\n childOrdinalCounter: 0,\r\n ordinal: 1\r\n }\r\n };\r\n\r\n /**\r\n * The index to uniquely identify the telemetry elements.\r\n * @private\r\n * @type {number}\r\n */\r\n public static telemetryIndex = 0;\r\n\r\n /**\r\n * Set the new telemetry props for a child component.\r\n * @type {function}\r\n * @param {parentTelemetry} telemetry - props that may contain the telemetry index of the parent component.\r\n * @param {childTelemetry} telemetry - props that contain the telemetry index of the child component.\r\n */\r\n public static setChildProps(parentTelemetry: TelemetryProps, childTelemetry: TelemetryProps): void {\r\n if (!parentTelemetry) {\r\n throw \"the parentTelemetry parameter is required\";\r\n }\r\n\r\n if (!childTelemetry) {\r\n throw \"the childTelemetry parameter is required\";\r\n }\r\n\r\n // set parentIndex from parent's index; if the parent has no non-zero index, use the grandparent index instead, falling back to zero\r\n childTelemetry.parentIndex = parentTelemetry.index || parentTelemetry.parentIndex || 0;\r\n\r\n // This part is required to trigger shouldComponentUpdate on child component,\r\n // if no other props changed but parent component re-renders.\r\n // childTelemetryProps.headlineIndex = Math.random();\r\n }\r\n\r\n /**\r\n * Gets the telemetry item for a child element.\r\n *\r\n * @static\r\n * @param {TelemetryProps} parentTelemetry the telemetry props for the parent element\r\n * @param {string} telemetryName the telemetry name for the child\r\n * @param {TelemetryTypes} telemetryType the telemetry type for the child\r\n * @returns {TelemetryProps} the telemetry props for the child\r\n * @memberof Telemetry\r\n */\r\n public static getChildTelemetryItem(parentTelemetry: TelemetryProps, telemetryName: string, telemetryType: TelemetryTypes): TelemetryProps {\r\n const initTelemetryProps: TelemetryProps = {\r\n name: telemetryName,\r\n telemetryType: telemetryType\r\n };\r\n\r\n const resultTelemetryProps = Telemetry.createProps(initTelemetryProps, parentTelemetry, initTelemetryProps);\r\n Telemetry.setChildProps(parentTelemetry, resultTelemetryProps);\r\n\r\n return resultTelemetryProps;\r\n }\r\n\r\n /**\r\n * Get the parent's index value for telemetry.\r\n * @type {function}\r\n * @param {parentTelemetry} telemetry - props that may contain the telemetry index of the parent component.\r\n */\r\n public static getParentIndex(parentTelemetry: TelemetryProps): number {\r\n if (!parentTelemetry) {\r\n throw \"the parentTelemetry parameter is required\";\r\n }\r\n\r\n // return parentIndex from parent's index; if the parent has no non-zero index, use the grandparent index instead, even if zero\r\n return parentTelemetry.index || parentTelemetry.parentIndex;\r\n }\r\n\r\n /**\r\n * Get the parent's index value for telemetry.\r\n * @type {function}\r\n * @param {parentTelemetry} telemetry - props that may contain the telemetry index of the parent component.\r\n */\r\n public static getParentHeadlineIndex(parentTelemetry: TelemetryProps): number {\r\n if (!parentTelemetry) {\r\n throw \"the parentTelemetry parameter is required\";\r\n }\r\n\r\n // This part is required to trigger shouldComponentUpdate on child component,\r\n // if no other props changed but parent component re-renders.\r\n return Math.random();\r\n }\r\n\r\n /**\r\n * Create the root private telemetry object for an application\r\n * @type {function}\r\n * @param {string} name - Name of the entity.\r\n * @param {string} id - Id property of the entity.\r\n * @param {number} rootTelemetryIndex - telemetry index of root, e.g. the SPA host container index\r\n * @returns {TelemetryProps} - private Telemetery props\r\n */\r\n public static createRootProps(name?: string, id?: string, rootTelemetryIndex?: number): TelemetryProps {\r\n const ordinal = 0;\r\n\r\n // root index if specified otherwise we set it the next telemetry index\r\n const rootIndex = rootTelemetryIndex || Telemetry.getNewIndex();\r\n\r\n Telemetry.ordinalTracker[rootIndex] = {\r\n ordinal,\r\n childIndices: {},\r\n childOrdinalCounter: 0\r\n };\r\n\r\n return {\r\n id: id,\r\n index: rootIndex,\r\n name: name,\r\n ordinal: ordinal,\r\n parentIndex: 0\r\n };\r\n }\r\n\r\n /**\r\n * Create the telemetry object for the component.\r\n * @type {function}\r\n * @param {TelemetryProps} savedProps - Props that are being saved by the calling component. If this is the first call to createProps, null or undefined should be passed.\r\n * @param {TelemetryProps} componentProps - Props that were passed into the calling component. This set of props carries the parentIndex.\r\n * @param {TelemetryProps} initializationProps - Override props which can be used to replace the default properties\r\n * @returns {TelemetryProps} - Telemetry props\r\n */\r\n public static createProps(savedProps: TelemetryProps, componentProps: TelemetryProps, initializationProps: TelemetryProps = {}): TelemetryProps {\r\n\r\n const parentIndex = componentProps.parentIndex || 0;\r\n\r\n if (!(parentIndex in Telemetry.ordinalTracker)) {\r\n throw \"parentIndex not tracked in ordinalTracker\";\r\n }\r\n\r\n let index: number;\r\n let ordinal: number;\r\n\r\n // TODO are we calling the right one?\r\n if (savedProps && !isNil(savedProps.index)) {\r\n index = savedProps.index;\r\n } else {\r\n index = Telemetry.getNewIndex();\r\n }\r\n\r\n Telemetry.resetChildProps(index);\r\n\r\n const isIndexTrackedByParent: boolean = index in Telemetry.ordinalTracker[parentIndex].childIndices;\r\n if (isIndexTrackedByParent) {\r\n ordinal = Telemetry.ordinalTracker[parentIndex].childIndices[index];\r\n } else {\r\n ordinal = ++Telemetry.ordinalTracker[parentIndex].childOrdinalCounter;\r\n Telemetry.ordinalTracker[parentIndex].childIndices[index] = ordinal;\r\n }\r\n\r\n Telemetry.ordinalTracker[index] = {\r\n ordinal,\r\n childIndices: {},\r\n childOrdinalCounter: 0\r\n };\r\n\r\n return { ...initializationProps, index, ordinal, parentIndex };\r\n }\r\n\r\n /**\r\n * Render telemetry props to the DOM.\r\n * @type {function}\r\n * @param {TelemetryProps} props - Props of the element which needs to render telemetry string.\r\n * @returns {TelemetryTags} - Telemetery tags for rendering\r\n */\r\n public static render(props: TelemetryProps): TelemetryTags {\r\n if (!props || !props.index) {\r\n return null;\r\n }\r\n\r\n const result: any = {\r\n c: props.category,\r\n ct: props.contentType,\r\n f: props.feedId || props.id,\r\n h: props.headlineIndex,\r\n i: props.index,\r\n l: props.id,\r\n n: props.name,\r\n o: props.ordinal,\r\n p: props.parentIndex,\r\n y: props.telemetryType,\r\n v: props.vertical\r\n };\r\n\r\n const filteredResult = omitBy(result, isNil);\r\n\r\n const tags: TelemetryTags = {\r\n \"data-m\": JSON.stringify(filteredResult),\r\n \"data-id\": filteredResult.i\r\n };\r\n\r\n if (isString(props.userFacingText)) {\r\n tags[\"data-hl\"] = props.userFacingText;\r\n }\r\n\r\n return tags;\r\n }\r\n\r\n // Bug 15830025: if this isn't used, we should delete it; if it is used, it needs unit tests.\r\n /**\r\n * Resets the global dictionary recursively starting at the given component.\r\n * @type {function}\r\n * @param {number} telemetryIndex - Telemetry index of the component.\r\n */\r\n public static resetChildProps(telemetryIndex: number): void {\r\n if (!(telemetryIndex in Telemetry.ordinalTracker)) {\r\n return;\r\n }\r\n\r\n const childIndices = Telemetry.ordinalTracker[telemetryIndex].childIndices;\r\n Object.keys(childIndices).map((index) => this.resetChildProps(Utility.toNumber(index)));\r\n delete Telemetry.ordinalTracker[telemetryIndex];\r\n }\r\n\r\n /**\r\n * Decides if the new telemetry related props changed on parent component.\r\n * @type {function}\r\n * @param {TelemetryProps} oldProps - Old props of the element which contains parentIndex and ordinal values.\r\n * @param {TelemetryProps} newProps - New props of the element which contains parentIndex and ordinal values.\r\n * @param {TelemetryProps} telemetry - Existing private telemetry props of the element.\r\n * @returns {boolean} - should telemetry props need to be changed.\r\n */\r\n public static shouldComponentUpdate(oldProps: TelemetryProps, newProps: TelemetryProps, telemetry: TelemetryProps): boolean {\r\n return (oldProps.parentIndex !== newProps.parentIndex)\r\n || (telemetry && !(telemetry.index in Telemetry.ordinalTracker[oldProps.parentIndex].childIndices));\r\n }\r\n\r\n /**\r\n * Creates and returns new telemetry index which should be global among the application.\r\n *\r\n * @export\r\n * @return {number}\r\n */\r\n private static getNewIndex(): number {\r\n return --Telemetry.telemetryIndex;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActionMap } from \"../reducers\";\r\nimport { ConnectorConstants } from \"../constants/ConnectorConstants\";\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\n\r\n/**\r\n * Action signature to trigger an experience to render\r\n */\r\ntype RenderExperienceSignature = () => void;\r\n\r\n/**\r\n * Action signature to initialize data connector state merge.\r\n */\r\ntype DataConnectorMergeInitSignature = (dataConnectorName: ConnectorNamespaces) => void;\r\n\r\n/**\r\n * Actions that are common to all experiences\r\n * @class\r\n */\r\nexport class CommonActions {\r\n /**\r\n * Definition for an action that can be dispatched to any experience causing it to render\r\n */\r\n public static renderExperience: ActionMap = new ActionMap(ConnectorConstants.renderAction);\r\n\r\n /**\r\n * Definition for an action that initializes shared data connector state on an experience.\r\n */\r\n public static dataConnectorMergeInit: ActionMap = new ActionMap(ConnectorConstants.dataConnectorMergeInitAction);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { IActionPayload } from \"@msnews/experiences-redux\";\r\nimport { MilestoneDataActions, getMilestoneDataConnector, ExperienceMilestoneEventTypes } from \"@msnews/milestone-data\";\r\nimport { registerResetCallback } from \"@msnews/core\";\r\nimport { hasExperiencePersistentDataUpdated } from \"./PageVisibilityActionHelpers\";\r\nimport { logException, markTtprRaf, PrerenderRevalidateException } from \"@msnews/diagnostics\";\r\n\r\n/**\r\n * Base class for callback information for when an experience may be stale.\r\n */\r\ninterface StaleCallbackBase {\r\n /** The experience type */\r\n experienceType: string,\r\n\r\n /** If the page reveal delay is above this, invoke the callback. */\r\n thresholdMinutes?: number;\r\n}\r\n\r\n/**\r\n * Callback information for when an experience may be stale for React.\r\n */\r\nexport interface StaleCallbackReact extends StaleCallbackBase {\r\n /** Called when an experience is stale. Returns true if the experience took action to refresh itself. */\r\n callback: () => boolean;\r\n}\r\n\r\n/**\r\n * Callback information for when an experience may be stale for Web Components.\r\n */\r\nexport interface StaleCallbackWC extends StaleCallbackBase {\r\n /** Called when an experience is stale. Promise resolves when the refresh is complete. */\r\n asyncCallback: () => Promise;\r\n}\r\n\r\ntype StaleCallback = StaleCallbackReact | StaleCallbackWC;\r\n\r\n/** List of callbacks to potentially invoke on page reveal. */\r\nlet staleCallbacks: StaleCallback[] = [];\r\n\r\n/**\r\n * Register a callback to reset the pageRevealDependencyMap.\r\n * The callback is registered once when the module is loaded and invoked once on the server side at the beginning of each request.\r\n */\r\nregisterResetCallback(() => {\r\n staleCallbacks = [];\r\n});\r\n\r\n/**\r\n * Initializes the page reveal tracker.\r\n */\r\nexport function initializePageRevealTracker(): void {\r\n MilestoneDataActions.updatePageRevealStart.registerObserver((actionPayload: IActionPayload) => {\r\n const wasPageHidden: boolean = actionPayload.params[1];\r\n if (!wasPageHidden) {\r\n // return if page was not in a hidden or prerendered state.\r\n return;\r\n }\r\n\r\n const pageRevealStartTimeMs: DOMHighResTimeStamp = actionPayload.params[0];\r\n\r\n const visuallyReadyDependencies: string[] = actionPayload.params[2];\r\n\r\n const milestoneConnector = getMilestoneDataConnector();\r\n const visuallyReadyEndTime = milestoneConnector.getCurrentState().aboveTheFoldVisuallyReady.endTime;\r\n\r\n const invokedExperiences: Set = new Set();\r\n\r\n for (const staleCallback of staleCallbacks) {\r\n const { experienceType } = staleCallback;\r\n const markedAsInvalid: boolean = hasExperiencePersistentDataUpdated(experienceType);\r\n const stale: boolean = (staleCallback.thresholdMinutes > 0) && (pageRevealStartTimeMs - visuallyReadyEndTime > staleCallback.thresholdMinutes * 60000);\r\n if (markedAsInvalid || stale) {\r\n if (\"callback\" in staleCallback) {\r\n // This is a React registration. We can fire and forget: BaseExperience will know when the component updates and mark the reveal as complete.\r\n try {\r\n // If the callback took no action, mark reveal as complete right away.\r\n if (!staleCallback.callback()) {\r\n markRevealComplete(experienceType);\r\n }\r\n } catch (error) {\r\n logException(\r\n error,\r\n PrerenderRevalidateException,\r\n \"Exception when running stale revalidate callback\",\r\n \"Experience: \" + experienceType);\r\n }\r\n } else {\r\n // This is a Web Component registration. We'll log completion after the callback is fulfilled.\r\n // Do not await the callback, each will be invoked in parallel.\r\n invokeWebComponentStaleCallback(staleCallback);\r\n }\r\n } else {\r\n // If the callback doesn't need to be invoked, mark reveal complete.\r\n markRevealComplete(experienceType);\r\n }\r\n\r\n invokedExperiences.add(experienceType);\r\n }\r\n\r\n // Experiences that are required for visually ready should have reveal marked complete at some point, even if they are not stale liable\r\n // This is required for ExperienceTracker to declare the whole page as revealed.\r\n for (const visuallyReadyDependency of visuallyReadyDependencies) {\r\n if (!invokedExperiences.has(visuallyReadyDependency)) {\r\n markRevealComplete(visuallyReadyDependency);\r\n }\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Invoke the stale callback for the Web Component experience.\r\n * @param staleCallbackWC The callback to invoke.\r\n */\r\nasync function invokeWebComponentStaleCallback(staleCallbackWC: StaleCallbackWC) {\r\n try {\r\n await staleCallbackWC.asyncCallback();\r\n markRevealComplete(staleCallbackWC.experienceType);\r\n } catch (error) {\r\n logException(\r\n error,\r\n PrerenderRevalidateException,\r\n \"Exception when running stale revalidate callback\",\r\n \"Experience: \" + staleCallbackWC.experienceType);\r\n }\r\n}\r\n\r\n/**\r\n * Mark the page reveal as complete for the given experience type.\r\n * @param experienceType The experience type to mark as complete.\r\n */\r\nfunction markRevealComplete(experienceType: string) {\r\n markTtprRaf(experienceType);\r\n MilestoneDataActions.updateExperiencePublicState.getActionSender(getMilestoneDataConnector()).send({\r\n eventType: ExperienceMilestoneEventTypes.staleRevalidationComplete,\r\n experienceType\r\n });\r\n}\r\n\r\n/**\r\n * Registers a callback to run and update stale data when appropriate. This registers the callback for the React rendering mode, where BaseExperience will take care of the post-refresh reporting.\r\n * @param staleCallback Information about the callback to register.\r\n */\r\nexport function registerStaleRevealReact(staleCallback: StaleCallbackReact) {\r\n staleCallbacks.push(staleCallback);\r\n}\r\n\r\n/**\r\n * Registers a callback to run and update stale data when appropriate. This registers the callback for the Web Component rendering mode, and will automatically log completion when the\r\n * callback promise is fulfilled.\r\n * @param staleCallback Information about the callback to register.\r\n */\r\nexport function registerStaleRevealWC(staleCallback: StaleCallbackWC) {\r\n staleCallbacks.push(staleCallback);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n BaseExperienceConfig,\r\n ChildExperienceConfigInfo,\r\n ChildExperienceValidator,\r\n ChildInfo,\r\n ChildrenTypes,\r\n CustomCompositionConfig,\r\n ExperienceCompositionTypes,\r\n GridCompositionConfig,\r\n HorizontalStackConfig,\r\n LayoutConfig,\r\n PeregrineChildInfo,\r\n ScreenTypeMetadata,\r\n ScreenWidth,\r\n ValidationArgs,\r\n ValidatorSectionName,\r\n VerticalStackConfig,\r\n getExperienceType\r\n} from \"@msnews/core\";\r\nimport {\r\n ColumnArrangement,\r\n ExperienceInitialProps,\r\n fastBreakpointManager\r\n} from \"@msnews/experiences-base\";\r\n\r\nimport { AppValidator } from \"./AppValidator\";\r\nimport { cloneDeep } from \"lodash-es\";\r\nimport { isFunction } from \"util\";\r\n\r\n/**\r\n * Config Processor class to filter config\r\n * @class\r\n */\r\nexport class ConfigProcessor {\r\n /**\r\n * experience validator map to be provided by app type. Each entry has a validator name and a validator function associated\r\n * with that.\r\n */\r\n static expValidatorMap: Map boolean> = new Map();\r\n\r\n /**\r\n * config map that keeps track of original configs which are modified by ConfigProcessor.\r\n * This is required for partial page refresh scenarios where original config is required for refernce like ReAdding previously removed SD cards\r\n */\r\n static expConfigMap: Map> = new Map();\r\n\r\n /**\r\n * Registers apptype validators\r\n * @method\r\n * @param {AppValidator} apptypeValidator Validator for a specific app type\r\n * @returns {void}\r\n */\r\n public static registerAppValidator(apptypeValidator: AppValidator): void {\r\n this.expValidatorMap = apptypeValidator.getAllValidators();\r\n }\r\n\r\n /**\r\n * process config based on registered validators for current app-type and removes child experience from\r\n * section defined in CMS condig\r\n * @method\r\n * @param {BaseExperienceConfig} expConfig Experience config object\r\n * @returns {BaseExperienceConfig} returns filtered experience config\r\n */\r\n public static processConfig(expConfig: BaseExperienceConfig, namespace: string): BaseExperienceConfig {\r\n if (!this.expValidatorMap || this.expValidatorMap.size < 1 || !expConfig || !expConfig.childExpValidatorMap) {\r\n return expConfig;\r\n }\r\n\r\n const expMap: { [instanceId: string]: ChildExperienceValidator } = expConfig.childExpValidatorMap;\r\n let originalConfig: BaseExperienceConfig = null;\r\n let tempConfig: BaseExperienceConfig = null;\r\n\r\n for (const validatorName in expMap) {\r\n const childExpValidator = expMap[validatorName];\r\n if (this.expValidatorMap.has(validatorName)) {\r\n const validator = this.expValidatorMap.get(validatorName);\r\n const removeChildExp = validator(childExpValidator.validationArgs);\r\n\r\n if (removeChildExp) {\r\n if (tempConfig === null) {\r\n // always use saved config if exists\r\n tempConfig = this.expConfigMap.get(namespace) || expConfig;\r\n }\r\n\r\n // keep a copy of original config\r\n if (originalConfig === null) {\r\n originalConfig = cloneDeep(tempConfig);\r\n }\r\n\r\n expConfig = this.filterConfig(childExpValidator, tempConfig);\r\n }\r\n }\r\n }\r\n\r\n if (originalConfig) {\r\n this.expConfigMap.set(namespace, originalConfig);\r\n } else if (tempConfig === null && this.expConfigMap.has(namespace)) {\r\n // if tempConfig is null, none of the validators returned true.\r\n // restore expConfig with originalConfig for this case\r\n expConfig = this.expConfigMap.get(namespace);\r\n }\r\n\r\n return expConfig;\r\n }\r\n\r\n /**\r\n * remove child experience based on the response from registerd validator and config.\r\n * @method\r\n * @param {ChildExperienceValidator} childExpValidator Experience config object\r\n * @param {BaseExperienceConfig} expConfig Experience config object\r\n * @returns {BaseExperienceConfig} returns filtered experience config\r\n */\r\n private static removeFromRiverGridChildren(childExpValidator: ChildExperienceValidator, expConfig: any): BaseExperienceConfig {\r\n // TODO: River config is in experiences and we should not take dependency of experiences in this project.\r\n // We should move RiverConfig to core config project or expConfig has to be of type any\r\n const riverGridChildren = expConfig.riverGridChildren;\r\n if (riverGridChildren) {\r\n riverGridChildren.forEach(element => {\r\n const childElems = element.children;\r\n if (childElems) {\r\n const validatorConfigInfo = childExpValidator.childExperienceConfigInfo as ChildExperienceConfigInfo;\r\n const validatorConfigExperienceType = getExperienceType(validatorConfigInfo);\r\n element.children = childElems.filter((childExp) => {\r\n const configInfo = childExp.childExperienceConfigInfo as ChildExperienceConfigInfo;\r\n return !configInfo\r\n || !validatorConfigInfo\r\n || validatorConfigInfo.instanceId !== configInfo.instanceId\r\n || validatorConfigExperienceType !== getExperienceType(configInfo);\r\n });\r\n }\r\n });\r\n }\r\n\r\n return expConfig;\r\n }\r\n\r\n /**\r\n * Given a experience config, get a list of child experience configs for child data connectors\r\n * @method\r\n * @param {BaseExperienceConfig} baseExperienceConfig experience config to find child data connectors configs\r\n * @returns {ChildExperienceConfigInfo[]} - child data connectors configs\r\n */\r\n public static getChildrenDataConnectorConfigInfos(baseExperienceConfig: BaseExperienceConfig): ChildExperienceConfigInfo[] {\r\n const childrenConfigInfo: ChildExperienceConfigInfo[] = [];\r\n\r\n if (baseExperienceConfig && baseExperienceConfig.dataConnectors && baseExperienceConfig.dataConnectors.length > 0) {\r\n const dataConnectorForCurrentScreenType = ConfigProcessor.getOrdinalObjectForCurrentBreakpoint(baseExperienceConfig.dataConnectors);\r\n\r\n if (dataConnectorForCurrentScreenType && dataConnectorForCurrentScreenType.children && dataConnectorForCurrentScreenType.children.length > 0) {\r\n dataConnectorForCurrentScreenType.children.forEach(connector => {\r\n childrenConfigInfo.push(connector);\r\n });\r\n }\r\n }\r\n\r\n return childrenConfigInfo;\r\n }\r\n\r\n /**\r\n * Helper function to match screenWidth and return the correct ScreenTypeMetadata object\r\n * @method\r\n * @param {ScreenWidth} screenWidth - screenWidth to match\r\n * @param {ScreenTypeMetadata[]} screenTypeObjList - Array of ScreenTypeMetadata objects\r\n * @returns {ScreenTypeMetadata} returns the matching ScreenTypeMetadata object for given screenWidth.\r\n */\r\n public static getMetadataByScreenWidth(screenWidth: ScreenWidth, screenTypeObjList: ScreenTypeMetadata[]): ScreenTypeMetadata {\r\n const result =\r\n screenTypeObjList.find(obj =>\r\n obj.screenWidth === screenWidth\r\n )\r\n || screenTypeObjList.find(obj =>\r\n obj.screenWidth === ScreenWidth.Any\r\n );\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * This method returns the ScreenTypeMetadata for current breakpoint.\r\n * @method\r\n * @param {ScreenTypeMetadata[]} screenTypeObjList Array of ScreenTypeMetadata objects\r\n * @returns {ScreenTypeMetadata} returns the matching ScreenTypeMetadata object for current breakpoint.\r\n */\r\n public static getOrdinalObjectForCurrentBreakpoint(screenTypeObjList: ScreenTypeMetadata[]): ScreenTypeMetadata {\r\n switch (fastBreakpointManager().currentColumnArrangement) {\r\n case ColumnArrangement.c1: {\r\n return ConfigProcessor.getMetadataByScreenWidth(ScreenWidth.OneColumn, screenTypeObjList);\r\n }\r\n case ColumnArrangement.c2: {\r\n return ConfigProcessor.getMetadataByScreenWidth(ScreenWidth.TwoColumn, screenTypeObjList);\r\n }\r\n case ColumnArrangement.c3: {\r\n return ConfigProcessor.getMetadataByScreenWidth(ScreenWidth.ThreeColumn, screenTypeObjList);\r\n }\r\n case ColumnArrangement.c4: {\r\n return ConfigProcessor.getMetadataByScreenWidth(ScreenWidth.FourColumn, screenTypeObjList);\r\n }\r\n case ColumnArrangement.c5: {\r\n return ConfigProcessor.getMetadataByScreenWidth(ScreenWidth.FiveColumn, screenTypeObjList);\r\n }\r\n default: {\r\n return ConfigProcessor.getMetadataByScreenWidth(ScreenWidth.Any, screenTypeObjList);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Composition resolver. It will return the composition value based on any possible overrides.\r\n * @method\r\n * @param {BaseExperienceConfig} baseExperienceConfig Array of ScreenTypeMetadata objects\r\n * @param {ExperienceInitialProps} connectorProps initial props for connector\r\n * @returns { GridCompositionConfig | LayoutConfig | HorizontalStackConfig | VerticalStackConfig | CustomCompositionConfig } returns composition from config or given override\r\n */\r\n public static compositionOverrideResolver(baseExperienceConfig: BaseExperienceConfig, connectorProps?: ExperienceInitialProps): GridCompositionConfig | LayoutConfig | HorizontalStackConfig | VerticalStackConfig | CustomCompositionConfig {\r\n const { getCompositionIdOverride } = connectorProps || {};\r\n const { composition, compositionOverrides } = baseExperienceConfig;\r\n return compositionOverrides && isFunction(getCompositionIdOverride) && compositionOverrides[getCompositionIdOverride()] || composition;\r\n }\r\n\r\n /**\r\n * Give an experience config, get a list of child experience configs.\r\n * @method\r\n * @param {BaseExperienceConfig} baseExperienceConfig experience config to find child data connectors configs\r\n * @param {ExperienceInitialProps} connectorProps connector props for given experience\r\n * @returns {ChildExperienceConfigInfo[]} - child data connectors configs\r\n */\r\n public static getChildrenExperienceConfigInfos(baseExperienceConfig: BaseExperienceConfig, connectorProps?: ExperienceInitialProps): ChildExperienceConfigInfo[] {\r\n const childrenConfigInfo: ChildExperienceConfigInfo[] = [];\r\n\r\n // Determine if there are any children in the composition portion of the config document.\r\n if (baseExperienceConfig && baseExperienceConfig.composition) {\r\n\r\n const composition = ConfigProcessor.compositionOverrideResolver(baseExperienceConfig, connectorProps);\r\n\r\n switch (composition.type) {\r\n case ExperienceCompositionTypes.horizontalStack:\r\n case ExperienceCompositionTypes.layout: {\r\n\r\n // Iterate over the composition config to find the children\r\n const layoutConfig = composition as LayoutConfig;\r\n\r\n // Iterate over the composition config to find the children\r\n layoutConfig.page.children.forEach(grid => {\r\n\r\n // If the grid does not contain children, then there are no child experiences\r\n if (grid.children === undefined) {\r\n return;\r\n }\r\n\r\n // Iterate over the grid children (each one is a column) and see if there is a child experience\r\n grid.children.forEach((column) => {\r\n\r\n // If the columnProps does not contain children, then there are no child experiences\r\n if (!column.children) {\r\n return;\r\n }\r\n\r\n // If the column.children is a legacy ColumnChildInfo, or of type PeregrineExperience, then\r\n // add the child to the list\r\n const { childType } = column.children as ChildInfo;\r\n if (!childType) {\r\n childrenConfigInfo.push(column.children as ChildExperienceConfigInfo);\r\n } else if (childType === ChildrenTypes.peregrineExperience) {\r\n childrenConfigInfo.push((column.children as PeregrineChildInfo).child);\r\n }\r\n });\r\n });\r\n break;\r\n }\r\n\r\n case ExperienceCompositionTypes.grid: {\r\n\r\n // Iterate over the grid composition config to find the peregrine child experiences to load\r\n const gridRows = (composition as GridCompositionConfig).grid.rows;\r\n gridRows.forEach(row => {\r\n\r\n // If the row does not contain columns, then there are no child experiences\r\n if (row.columns === undefined) {\r\n return;\r\n }\r\n\r\n // Iterate over the grid columns and see if there are any items\r\n row.columns.forEach((column) => {\r\n // If the column.item is a PeregrineExperience, then add the child to the list of children experiences to load\r\n const { itemType } = column.item;\r\n if (itemType && itemType === ChildrenTypes.peregrineExperience) {\r\n childrenConfigInfo.push(column.item.child as ChildExperienceConfigInfo);\r\n }\r\n });\r\n });\r\n break;\r\n }\r\n\r\n case ExperienceCompositionTypes.customExperience: {\r\n const customConfig = composition as CustomCompositionConfig;\r\n childrenConfigInfo.push(customConfig.experience);\r\n\r\n break;\r\n }\r\n\r\n // No children to load, if we do not know what type of composition this experience has\r\n default:\r\n }\r\n }\r\n\r\n return childrenConfigInfo;\r\n }\r\n\r\n /**\r\n * Verify if the section provided in CMS schema is supported for removal of child experiences.\r\n * Currently only riverGridChildren is supported. Support will be extended to other sections.\r\n * @method\r\n * @param {ChildExperienceValidator} childExpValidator Experience config object\r\n * @param {BaseExperienceConfig} expConfig Experience config object\r\n * @returns {BaseExperienceConfig} returns filtered experience config\r\n */\r\n private static filterConfig(childExpValidator: ChildExperienceValidator, expConfig: BaseExperienceConfig): BaseExperienceConfig {\r\n if (childExpValidator && typeof childExpValidator.sectionName === \"string\" && childExpValidator.sectionName.toLowerCase() === ValidatorSectionName.riverGridChildren.toLowerCase()) {\r\n return this.removeFromRiverGridChildren(childExpValidator, expConfig);\r\n }\r\n\r\n return expConfig;\r\n }\r\n\r\n /** Resets validator map, needed to handle multiple requests for SSR */\r\n public static resetValidatorMap(): void {\r\n this.expValidatorMap.clear();\r\n }\r\n\r\n /** Resets config map, needed to handle multiple requests for SSR */\r\n public static resetConfigMap(): void {\r\n this.expConfigMap.clear();\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { PageMeasure, PerfTimeline } from \"./PerfTimeline\";\r\n\r\nimport { getPageTimings } from \"./PageTimings\";\r\nimport { logger } from \"../logging\";\r\n\r\nconst pageTimings = getPageTimings();\r\n\r\n/**\r\n * Utility class to keep track of how many times a key has appeared in order to\r\n * get a uniquely qualified name back to be used in a dictionary.\r\n */\r\nclass KeyCounter {\r\n\r\n /** Lookup of counts for the given key */\r\n private timelineCount: { [name: string]: number } = {};\r\n\r\n /** Gets the qualified key name */\r\n public qualifyKey(timelineName: string): string {\r\n\r\n // get the previous count\r\n const count = this.getCount(timelineName);\r\n\r\n // if we've called it previously append the count as suffix\r\n // to identify it uniquely.\r\n if (count <= 1) {\r\n return timelineName;\r\n }\r\n\r\n return timelineName + count;\r\n }\r\n\r\n /** Resets the counter state to initial values */\r\n public reset(): void {\r\n this.timelineCount = {};\r\n }\r\n\r\n /** Gets the key's appearence count */\r\n private getCount(timelineName: string): number {\r\n\r\n // get the previous count\r\n const count = this.timelineCount[timelineName] || 0;\r\n\r\n // update the new count\r\n return this.timelineCount[timelineName] = count + 1;\r\n }\r\n}\r\n\r\n/**\r\n * Unique key qualifier for distinctly identifying instances of perf timelines\r\n * across multiple instances of the same or different experience types.\r\n * For example, ContentPreview, ContentPreview2, ContentPreview3, etc.\r\n */\r\nconst timelineKeyCount = new KeyCounter();\r\n\r\n/** Suffix for start markers */\r\nconst startSuffix = \"-start\";\r\n\r\n/** Suffix for end markers */\r\nconst endSuffix = \"-end\";\r\n\r\n/**\r\n * This class can be used to aggregate a list of perf markers and their transitions.\r\n */\r\nexport class PerfTimelineImpl implements PerfTimeline {\r\n\r\n /**\r\n * Unique key qualifier for metric names that appear multiple times.\r\n * For example, render, render2, render3, etc.\r\n */\r\n private readonly markerCount: KeyCounter = new KeyCounter();\r\n\r\n /**\r\n * List of in-memory logged markers for this perf-timeline object\r\n */\r\n private readonly measures: Array> = [];\r\n\r\n /**\r\n * Constructor of a {PerfTimeline} instance\r\n * @param timelineName - the name of the perf timeline. Note that if you don't know the name\r\n * of a perf timeline at construction time, it can later be renamed to a known name later via\r\n * the 'rename' method.\r\n * @param instanceId - this specific instance's ID. Used during a renaming operation to idenfity any previous isntance.\r\n * @param addPerfMarks - Flag to indicate whether to log perf marks with the native performance API.\r\n * @param addPageTimings - Flag to indicate whether to log the perf marks into the _pageTimings object.\r\n * @param async - Flag to mark this timeline as an async timeline, so by default all measures under\r\n * this timeline will show under a new process line.\r\n */\r\n public constructor(\r\n public timelineName: string,\r\n public readonly instanceId: string,\r\n private readonly addPerfMarks: boolean,\r\n private readonly addPageTimings: boolean,\r\n private readonly async?: boolean\r\n ) {\r\n this.timelineName = timelineKeyCount.qualifyKey(timelineName);\r\n }\r\n\r\n /**\r\n * Renames this instances of the timeline to the new given name.\r\n * This is useful when the timeline name is not known until after some asynchronous operation is completed,\r\n * but the measuring operation required to be started before the name was known.\r\n * @param timelineName - the new name of the timeline.\r\n */\r\n public rename(timelineName: string): void {\r\n\r\n if (this.timelineName === timelineName) {\r\n return;\r\n }\r\n\r\n if (this.addPageTimings) {\r\n // if we're adding page timings, then make sure we delete the measures under the old name and add the new ones\r\n this.measures.forEach(measure => {\r\n const oldMeasureName = this.qualifyMeasureName(measure.measureName);\r\n delete pageTimings[oldMeasureName + startSuffix];\r\n delete pageTimings[oldMeasureName];\r\n });\r\n }\r\n\r\n this.timelineName = timelineName;\r\n\r\n if (this.addPageTimings) {\r\n // add back the page timings under the new timeline name\r\n this.measures.forEach(measure => {\r\n const newMeasureName = this.qualifyMeasureName(measure.measureName);\r\n pageTimings[newMeasureName + startSuffix] = measure.from;\r\n pageTimings[newMeasureName] = measure.to - measure.from;\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Marks the start of a timeline measurement.\r\n * @param coreMarkerName - the name of the core marker. This value is usually invariant\r\n * from instance to instance (i.e., init, config, render)\r\n * @param dynamicMeasureName - the optional additional identifying name to give for the measure.\r\n * This value can be used to identify dynamic values across instances. For example the\r\n * HREF of the config. This can also later be updated to a new name when calling the 'endMeasure'\r\n * method.\r\n * @param async - flag to indicate whether this is an async measure or not.\r\n * @returns An object with the following properties:\r\n * - endMeasure - method that should be used to mark the end the measure.\r\n */\r\n public startMeasure(coreMarkerName: string, dynamicMeasureName?: string, async?: boolean): { endMeasure: (updatedDynamicMeasureName?: string) => void } {\r\n\r\n const startTime = performance.now();\r\n\r\n const timelineNameAtStart = this.timelineName;\r\n let measureNameCore = this.formatMeasureName(coreMarkerName, dynamicMeasureName);\r\n let measureName = this.qualifyMeasureName(measureNameCore);\r\n\r\n const startMarkerName = measureName + startSuffix;\r\n this.singleMark(startMarkerName);\r\n\r\n if (this.addPageTimings) {\r\n pageTimings[startMarkerName] = startTime;\r\n }\r\n\r\n return {\r\n /**\r\n * Ends the given measure we started\r\n */\r\n endMeasure: (updatedDynamicMeasureName?: string) => {\r\n\r\n const endTime = performance.now();\r\n\r\n // flag to indicate whether we need to re-qualify the measure name based on frequency. Note that we only\r\n // set this to true if the timeline name has changed since start, or we have a new dynamic name at the end.\r\n const requalifyMeasureName = updatedDynamicMeasureName\r\n || (timelineNameAtStart !== this.timelineName);\r\n\r\n if (requalifyMeasureName) {\r\n // if by the time we're ending the measure, we have a new dynamic name for the measurement, use that as the final measure name.\r\n measureNameCore = this.formatMeasureName(coreMarkerName, updatedDynamicMeasureName);\r\n measureName = this.qualifyMeasureName(measureNameCore);\r\n }\r\n\r\n const endMarkerName = measureName + endSuffix;\r\n\r\n this.singleMark(endMarkerName);\r\n this.measure(measureName, startMarkerName, endMarkerName);\r\n\r\n // Note we only save the partial metric without the timeline name, so we can use the final timeline name\r\n // if any rename operations happen while initial measurements have started without the final timeline name\r\n this.measures.push({\r\n measureName: measureNameCore,\r\n async: (async != null) ? async : this.async,\r\n from: startTime,\r\n to: endTime\r\n });\r\n\r\n if (this.addPageTimings) {\r\n pageTimings[measureName] = endTime - startTime;\r\n }\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Returns the list of page measures for this timeline object\r\n * @returns {Array} containing the fully qualified list of metric names for this perf timeline.\r\n */\r\n public getPageMeasures(): Array {\r\n return this.measures.map(measure => ({\r\n ...measure,\r\n timelineName: this.timelineName\r\n }));\r\n }\r\n\r\n /**\r\n * Instruments the start/begin for the given function with a given binding context\r\n * @param funcName - the identifying name of the function\r\n * @param func - the function instance to measure\r\n * @param bindingContext - the optional context from which to invoke the function\r\n * @returns the instrumented function that will track the start/end of the given function.\r\n */\r\n public instrumentFunc(funcName: string, func: TFunc, bindingContext?: Object): TFunc {\r\n const wrapper = (...args: unknown[]): unknown => {\r\n const endMeasure = this.startMeasure(funcName).endMeasure;\r\n try {\r\n return func.apply(bindingContext, args);\r\n } finally {\r\n endMeasure();\r\n }\r\n };\r\n\r\n return wrapper as unknown as TFunc;\r\n }\r\n\r\n /**\r\n * Instruments the start/begin for the given async-style function\r\n * @param promiseName - the identifying name of the promise\r\n * @param getPromise - the promise getter that returns the promise to measure. This is needed\r\n * so that the start measurement can occur before the promise starts executing.\r\n * @param async - flag to indicate whether to measure this promise as an async timeline\r\n * or a synchronous one. Please note that if you specify this as true, and other measurements\r\n * in the timeline are synchronous, the async measurements will appear as a separate timeline\r\n * and will not be next to the synchronous one. If unsure, leave undefined.\r\n * @returns the wrapped promise that tracks the start/end of the promise execution.\r\n */\r\n public async instrumentPromise(promiseName: string, getPromise: () => Promise, async?: boolean): Promise {\r\n\r\n const endMeasure = this.startMeasure(promiseName, null, async).endMeasure;\r\n try {\r\n return await getPromise();\r\n } finally {\r\n endMeasure();\r\n }\r\n }\r\n\r\n /**\r\n * Prefixes the given measure name with the current timeline name\r\n * @param measureName - the measure name to qualify\r\n * @returns the timeline name prefixed measure name.\r\n */\r\n private qualifyMeasureName(measureName: string): string {\r\n return `${this.timelineName}-${measureName}`;\r\n }\r\n\r\n /**\r\n * Returns the formatted measure name with it's constiuent parts\r\n * @param coreMeasureName - the core marker name\r\n * @param dynamicMeasureName - optional dynamic measure name\r\n * @returns the formatted marker name\r\n */\r\n private formatMeasureName(coreMeasureName: string, dynamicMeasureName?: string): string {\r\n const dynamicMeasureSuffix = dynamicMeasureName ? (\"-\" + dynamicMeasureName) : \"\";\r\n return this.markerCount.qualifyKey(`${coreMeasureName}${dynamicMeasureSuffix}`);\r\n }\r\n\r\n /**\r\n * Helper to add a single mark with the performance API\r\n * @param markerName - the name of the marker to add.\r\n */\r\n private singleMark(markerName: string): void {\r\n if (this.addPerfMarks) {\r\n performance.mark(markerName);\r\n }\r\n }\r\n\r\n /**\r\n * Helper to calculate a performance measurement against the performance API\r\n * @param measureName - the name of the measure\r\n * @param startMarker - the name of the start marker\r\n * @param endMarker - the name of the end marker\r\n */\r\n private measure(measureName: string, startMarker: string, endMarker: string): void {\r\n if (this.addPerfMarks) {\r\n try {\r\n // this can throw if start/end markers were not available for some reason\r\n performance.measure(measureName, startMarker, endMarker);\r\n } catch (ex) {\r\n logger.logError(ex);\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Test export for resetting the timeline name counter\r\n */\r\nexport function _resetTimelineKeyCounter(): void {\r\n timelineKeyCount.reset();\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppPerfTraceConfig, tryParseAppTraceConfig } from \"./AppPerfTraceConfig\";\r\nimport { PageMeasure, PerfTimeline, TryGetPerfTimelineFunc, createPerfTimeline, setTryGetPerfTimelineFunc } from \"./PerfTimeline\";\r\n\r\nimport { PerfTimelineImpl } from \"./PerfTimelineImpl\";\r\nimport { logger } from \"../logging\";\r\n\r\nlet configOverrides: AppPerfTraceConfig;\r\n\r\n/**\r\n * The configuration for app trace switches. This will be updated with the\r\n * config in the CMS and any properties from URL overrides.\r\n */\r\nconst config: AppPerfTraceConfig = {};\r\n\r\n/**\r\n * Dictionary containing the unique {PerfTimeline} object instances across the app.\r\n * When related measurements on the same perf timeline is required across unrelated parts\r\n * of the code, this will guarantee you're tracking those measurements under the same\r\n * perf timeline using a combination of the experience name and instance id.\r\n */\r\nlet perfTimelineInstances: { [instanceId: string]: PerfTimeline };\r\n\r\n/**\r\n * Initializes experience perf diagnostic specific state.\r\n * @param locationHref - the value of window.location.href from which to parse options.\r\n * @param tryGetPerfTimelineFunc - the injected dependency for perf timeline factory method.\r\n */\r\nexport function initExperienceDiagnosticsCore(locationHref: string, tryGetPerfTimelineFunc: TryGetPerfTimelineFunc): void {\r\n perfTimelineInstances = {};\r\n\r\n // Use the actual function to get perf timeline when initExperienceDiagnostics is called.\r\n setTryGetPerfTimelineFunc(tryGetPerfTimelineFunc);\r\n\r\n setAppPerfTraceConfigOverrides(locationHref);\r\n}\r\n\r\n/**\r\n * Returns the app trace config.\r\n */\r\nexport function getAppPerfTraceConfig(): AppPerfTraceConfig {\r\n return config;\r\n}\r\n\r\n/**\r\n * Helper to set the app trace config dynamically. Useful when the app trace config\r\n * has been loaded via a configuration (such as entry point config), and we want to use\r\n * that as the default/base config instead. Note that we still apply higher precedence\r\n * to the location parsed config since we want to make sure to use those if specified.\r\n * @param baseConfig the base configuration to apply.\r\n */\r\nexport function setAppPerfTraceBaseConfig(baseConfig: Partial): void {\r\n if (!baseConfig) {\r\n return;\r\n }\r\n\r\n // Use the config from URL last, so we have highest precedence on QSPs\r\n Object.assign(config, baseConfig, configOverrides);\r\n\r\n // forcefully disable for some options we never want enabled in upload scenario\r\n if (config.uploadTrace) {\r\n\r\n // don't bloat page timings with app trace related timings\r\n config.addPageTimings = false;\r\n\r\n // don't emit performance marks that show up on F12\r\n config.addPerformanceMarks = false;\r\n\r\n // if sample rate has not been set, set to 0, or does not pass\r\n // the random value test, we need to:\r\n // 1. disable app trace collection completely\r\n // 2. disable upload flag, so that when we try to get the app trace for upload\r\n // it will simply return an empty trace, and prevent the upload.\r\n //\r\n if (!config.sampleRate\r\n || Math.random() > config.sampleRate) {\r\n\r\n config.enablePerfTimeline = false;\r\n config.uploadTrace = false;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Initializes experience perf diagnostic specific state\r\n * Note: this method should not be called explicitly (other than from UTs.)\r\n * It is already called by default at the beginning of module initialization.\r\n * @param locationHref - the value of window.location.href from which to parse options\r\n */\r\nfunction setAppPerfTraceConfigOverrides(locationHref: string): void {\r\n Object.assign(config, configOverrides = tryParseAppTraceConfig(locationHref));\r\n}\r\n\r\n/**\r\n * Gets or creates a perf timeline object for the given experience instance if perf measurements are enabled\r\n * for the given experience.\r\n * @param experienceName - the name of the experience for which to create the timeline.\r\n * @param instanceId - the ID that will uniquely identify this timeline across multiple instances.\r\n */\r\nexport const tryGetPerfTimelineImpl: TryGetPerfTimelineFunc = (experienceName: string, instanceId: string, async?: boolean): PerfTimeline => {\r\n return shouldTrackPerfTimeline(experienceName)\r\n ? getPerfTimeline(experienceName, instanceId, async)\r\n : undefined;\r\n};\r\n\r\n/**\r\n * Gets or creates a perf timeline object for the given experience instance. This should only be used in special\r\n * circumstances where we may not know in advance whether perf timeline should be enabled for an experience, but\r\n * still want to start the measurements as not to miss anything in case collection is enabled at a later time.\r\n * This is usually used in entry point to collect intialization measurements before the config is loaded with\r\n * more parameters for app perf trace collection in order to upload trace logs in production.\r\n * @param experienceName - the name of the experience for which to get the perf timeline.\r\n * @param instanceId - the instance specific ID that will uniquely identify this instance from other instances.\r\n */\r\nexport function getPerfTimeline(experienceName: string, instanceId: string, async?: boolean): PerfTimeline {\r\n const instanceKey = getInstanceKeyCore(experienceName, instanceId);\r\n\r\n const perfTimeline = perfTimelineInstances[instanceKey];\r\n if (perfTimeline) {\r\n return perfTimeline;\r\n }\r\n\r\n return perfTimelineInstances[instanceKey] = createPerfTimeline(\r\n PerfTimelineImpl,\r\n experienceName,\r\n instanceId,\r\n config.addPerformanceMarks,\r\n config.addPageTimings,\r\n async\r\n );\r\n}\r\n\r\n/**\r\n * Renames the given perf timeline object and moves the lookup dictionary reference under the new key\r\n * @param perfTimeline - the perf timeline to rename\r\n * @param newExperienceName - the new name for the perf timeline\r\n */\r\nexport function renamePerfTimeline(perfTimeline: PerfTimeline, newExperienceName: string): void {\r\n\r\n const oldInstanceKey = getInstanceKey(perfTimeline);\r\n\r\n if (perfTimelineInstances[oldInstanceKey] !== perfTimeline) {\r\n logger.logError(`Attempted to rename a perf timeline object with mismatching instance key ${oldInstanceKey}`);\r\n return;\r\n }\r\n\r\n // rename the perf timeline to the new name\r\n perfTimeline.rename(newExperienceName);\r\n\r\n // delete the old reference\r\n delete perfTimelineInstances[oldInstanceKey];\r\n\r\n // ...and add the new instance under the new key\r\n const newInstanceKey = getInstanceKey(perfTimeline);\r\n perfTimelineInstances[newInstanceKey] = perfTimeline;\r\n}\r\n\r\n/**\r\n * Returns the list of page measures from all the perf timeline objects being tracked\r\n */\r\nexport function getExperienceMeasures(): Array {\r\n const pageMeasures: Array = [];\r\n Object.keys(perfTimelineInstances).forEach(instanceKey =>\r\n pageMeasures.push(...perfTimelineInstances[instanceKey].getPageMeasures())\r\n );\r\n return pageMeasures;\r\n}\r\n\r\n/**\r\n * Helper to check whether we should track perf timeline for the given experience\r\n * @param experienceName - the name of the experience to check\r\n * @returns {boolean} indicating whether the given experience should be tracked for perf\r\n */\r\nfunction shouldTrackPerfTimeline(experienceName: string): boolean {\r\n if (!config.enablePerfTimeline) {\r\n return false;\r\n }\r\n\r\n // if inclusion list is present, it will supercede the exclusion list,\r\n // so return true early if a match is found here.\r\n const { experiencesForPerf } = config;\r\n if (experiencesForPerf && experiencesForPerf[experienceName]) {\r\n return true;\r\n }\r\n\r\n // check for exclusion list\r\n const { experiencesExcludedForPerf } = config;\r\n if (experiencesExcludedForPerf && experiencesExcludedForPerf[experienceName]) {\r\n return false;\r\n }\r\n\r\n // otherwise the final fallback will be the track all flag.\r\n return config.trackAllExp;\r\n}\r\n\r\n/**\r\n * Gets the instance key to store the experience timeline\r\n * @param perfTimeline - the timeline object from which to get the instance key.\r\n * @returns the cache key that represents the location to which to store the perf timeline.\r\n */\r\nfunction getInstanceKey(perfTimeline: PerfTimeline): string {\r\n const { timelineName, instanceId } = perfTimeline;\r\n return getInstanceKeyCore(timelineName, instanceId);\r\n}\r\n\r\n/**\r\n * Gets the instance key to store the experience timeline\r\n * @param experienceName - the name of the experience\r\n * @param instanceId - the instance ID for the perf timeline.\r\n * @returns the cache key that represents the location to which to store the perf timeline.\r\n */\r\nfunction getInstanceKeyCore(experienceName: string, instanceId: string): string {\r\n return `${experienceName}-${instanceId || \"0\"}`;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n evalGitOrCmsExperienceInfo,\r\n getConfigHref,\r\n getConfigId,\r\n getConfigIdString,\r\n getExperienceType,\r\n resolver,\r\n ChildExperienceUniversalConfigInfo,\r\n DynamicBundles,\r\n ExperienceConfigWrapper\r\n} from \"@msnews/core\";\r\nimport { ChildExperienceConfigInfo, IRequestContext } from \"@msnews/core\";\r\nimport { ConnectComponentFailureError, createError, ExperienceLoaderAppErrors, LoadComponentFailureError, renamePerfTimeline, stringifyError, tryGetPerfTimeline } from \"@msnews/diagnostics\";\r\nimport { ExperienceLoadingState, MilestoneDataActions, createExperienceStateUpdate, getExperienceLoadDelegate, getMilestoneDataConnector } from \"@msnews/milestone-data\";\r\n\r\nimport { ConfigProcessor } from \"@msnews/config-validator\";\r\nimport { ExperienceIds } from \"@msnews/experiences-constants\";\r\nimport { IComponentConnector } from \"../\";\r\nimport { PageBase, reportDataConnectorStateChange } from \"@msnews/experiences-redux\";\r\nimport React from \"react\";\r\nimport { Store } from \"react-redux\";\r\nimport { Telemetry } from \"@msnews/telemetry-contracts\";\r\nimport { uniqueId } from \"lodash-es\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * An experience loader class that encapsulates the dynamic loading of an experience.\r\n * Give an experience config href, this class will determine the bundle to be loaded, load the bundle, and then enable the caller to get\r\n * the connected render component for the experience.\r\n * The loading/initialization of the experience connector and the connecting are separate methods, so that the caller can control when each is done\r\n */\r\nexport class ExperienceLoader {\r\n /**\r\n * The connector for this instance of the experience loader. It is undefined until after loadConnector is called\r\n */\r\n private experienceConnector: IComponentConnector = undefined;\r\n\r\n /**\r\n * The experience rendering Component for this instance of the experience loader. It is undefined until after loadConnector is called\r\n */\r\n private experienceComponent: any = undefined;\r\n\r\n /**\r\n * The experience Type of the experience being loaded. It is undefined until after loadConnector is called\r\n */\r\n private $experienceType: string;\r\n\r\n /**\r\n * The unique ID that identifes this loading experience instance.\r\n */\r\n private readonly instanceId?: string;\r\n\r\n /**\r\n * Gets the experience Type for this instance of the experience loader. It is undefined until after loadConnector is called\r\n */\r\n public get experienceType(): string { return this.$experienceType; }\r\n\r\n /**\r\n * Gets the current Connector for this experience loader instance\r\n */\r\n public get connector(): IComponentConnector { return this.experienceConnector; }\r\n\r\n /**\r\n * When we want to load bundles preemptively with earlyLoadBundles, we'll store their promises here. Mapping from experienceType\r\n * string to the promise for loading its bundle.\r\n */\r\n public static earlyLoadBundlePromises: Map> = new Map>();\r\n\r\n /**\r\n * Creates an experience loader.\r\n * @param {ChildExperienceUniversalConfigInfo} configIndexId The config index ID for the config to load\r\n * @param {string} instanceId The instanceId of the experience\r\n * @param {string} parentNamespace The namespace of the parent experience, if it is known\r\n * @param {Store} parentStore The parent experience redux store\r\n * @param {string} type The experienceType of the experience being loaded. If provided, this type will be used to load the bundle\r\n */\r\n public constructor(\r\n private readonly configIndexId: ChildExperienceUniversalConfigInfo,\r\n instanceId?: string | undefined,\r\n private readonly parentNamespace?: string | undefined,\r\n private readonly parentStore?: Store | undefined,\r\n private readonly requestContext?: IRequestContext | undefined,\r\n experienceType?: string | undefined) {\r\n\r\n this.$experienceType = experienceType || ((typeof configIndexId !== \"string\") && getExperienceType(configIndexId));\r\n this.instanceId = instanceId || evalGitOrCmsExperienceInfo(\r\n this.configIndexId,\r\n gitConfigInfo => gitConfigInfo.instanceId,\r\n cmsConfigInfo => cmsConfigInfo.instanceId,\r\n _ => instanceId,\r\n \"\"\r\n );\r\n }\r\n /**\r\n * Given a child config, recursively find bundles that we can load immediately. If we find a bundle to load immediately, we'll\r\n * create a promise and store it in earlyLoadBundlePromises. The loadConnector method should check the earlyLoadBundlePromises\r\n * before creating new promises to a load bundle.\r\n * @param config child config of an experience config\r\n */\r\n public static async earlyLoadBundles(config: ChildExperienceConfigInfo) {\r\n\r\n const experienceType = getExperienceType(config);\r\n\r\n if (config\r\n && experienceType\r\n && !getExperienceLoadDelegate(experienceType)) {\r\n // Do not early load experiences with delegates. They should have specific events triggering loading.\r\n\r\n if (experienceType === ExperienceIds.river) {\r\n // We should not traverse to the River when early loading bundles because it may have children disabled.\r\n return;\r\n }\r\n\r\n if (!ExperienceLoader.earlyLoadBundlePromises.has(experienceType)) {\r\n ExperienceLoader.earlyLoadBundlePromises.set(experienceType, DynamicBundles.loadExperience(experienceType));\r\n }\r\n\r\n const configId = getConfigId(config);\r\n const fullConfig = await resolver.getConfig(configId);\r\n\r\n ConfigProcessor.getChildrenDataConnectorConfigInfos(fullConfig.properties).forEach(async (childConfig) => {\r\n ExperienceLoader.earlyLoadBundles(childConfig);\r\n });\r\n\r\n ConfigProcessor.getChildrenExperienceConfigInfos(fullConfig.properties).forEach(async (childConfig) => {\r\n ExperienceLoader.earlyLoadBundles(childConfig);\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Dynamically loads and experience bundle, and creates the experience connector\r\n */\r\n public async loadConnector(isDataConnector = false): Promise {\r\n let linesRunUntilFailure = \"start;\";\r\n try {\r\n // Log an app error, if we didn't get either a configIndexHref NOR an experienceType\r\n if (!this.configIndexId && !this.$experienceType) {\r\n // Log an app error if the loader failed to load for whatever reason\r\n Telemetry.sendAppErrorEvent({\r\n ...ExperienceLoaderAppErrors.InsufficientLoadArgs,\r\n message: \"Failed loading experience bundle due to missing configIndexId and experienceType\",\r\n pb: {\r\n ...ExperienceLoaderAppErrors.InsufficientLoadArgs.pb,\r\n customMessage: `Details: \" ${JSON.stringify({ instanceId: this.instanceId, parentNamespace: this.parentNamespace })}`\r\n }\r\n\r\n });\r\n throw new Error(\"Cannot load a connector bundle without either the experienceType, or configIndexId\");\r\n }\r\n linesRunUntilFailure += \"nullCheck;\";\r\n\r\n const perfTimeline = tryGetPerfTimeline(this.$experienceType || uniqueId(), this.instanceId);\r\n linesRunUntilFailure += \"perfTimeline;\";\r\n\r\n // the loaded config result\r\n let configResult: ExperienceConfigWrapper;\r\n\r\n // Get a promise for the resolved config of the experience that is being initialized. If not configIndexHref is supplied,\r\n // then assume the experience has no config, so just create a resolved promise the returns an empty config\r\n let configPromise: any;\r\n const configId = this.configIndexId && getConfigId(this.configIndexId);\r\n if (configId) {\r\n configPromise = perfTimeline\r\n ? perfTimeline.instrumentPromise(\"config\", () => resolver.getConfig(configId))\r\n : resolver.getConfig(configId);\r\n } else {\r\n configPromise = Promise.resolve({\r\n experienceType: this.$experienceType,\r\n properties: {}\r\n });\r\n }\r\n\r\n linesRunUntilFailure += \"configPromise;\";\r\n\r\n // The async promises for loading the config and loading the bundles\r\n const loaderPromises: Promise[] = [configPromise];\r\n\r\n // If we don't know the experienceType, then we need to wait for the config to load and get it from the child config\r\n if (!this.$experienceType) {\r\n\r\n configResult = await configPromise;\r\n\r\n // Note that Git configs do not return experience type with the config yet,\r\n // however, the experience type will be derived from the config id in the ctor.\r\n this.$experienceType = configResult.experienceType;\r\n\r\n linesRunUntilFailure += \"awaitConfigPromise;\";\r\n\r\n // if we didn't have $experienceType at construction time, then we would've used uniqueId() to create this\r\n // temporary timeline. Now that we have the proper type, rename the timeline to the known value.\r\n if (perfTimeline) {\r\n renamePerfTimeline(perfTimeline, this.$experienceType);\r\n linesRunUntilFailure += \"renamePerfTimeline;\";\r\n }\r\n }\r\n\r\n let bundlePromise: Promise;\r\n if (!ExperienceLoader.earlyLoadBundlePromises.has(this.$experienceType)) {\r\n\r\n // Get a promise for loading in the experience bundle\r\n bundlePromise = perfTimeline\r\n ? perfTimeline.instrumentPromise(\"scripts\", () => DynamicBundles.loadExperience(this.$experienceType))\r\n : DynamicBundles.loadExperience(this.$experienceType);\r\n\r\n loaderPromises.push(bundlePromise);\r\n linesRunUntilFailure += \"loadExperienceBundle;\";\r\n }\r\n\r\n // Wait for all of the promises to complete. This will either be both the config and bundle promises,\r\n // or the bundle promise with the pre-resolved config promise to the empty config object.\r\n await Promise.all(loaderPromises);\r\n linesRunUntilFailure += \"waitForLoaderPromises;\";\r\n\r\n // If we don't have the config result yet, get it from the completed promises.\r\n if (!configResult) {\r\n configResult = await configPromise;\r\n linesRunUntilFailure += \"awaitConfigPromise;\";\r\n }\r\n\r\n // Get the bundle from the completed promises\r\n const bundleModule = ExperienceLoader.earlyLoadBundlePromises.has(this.$experienceType)\r\n ? await ExperienceLoader.earlyLoadBundlePromises.get(this.$experienceType)\r\n : await bundlePromise;\r\n linesRunUntilFailure += \"getBundleModule;\";\r\n\r\n const initMeasureEnd = perfTimeline && perfTimeline.startMeasure(\"init\").endMeasure;\r\n\r\n // update experience current state to loaded\r\n this.updateExperienceLoadedMilestone(this.$experienceType);\r\n linesRunUntilFailure += \"updateExperienceLoadedMilestone;\";\r\n\r\n // Extract config object from result\r\n const config = configResult.properties;\r\n\r\n // Get the Connector/Reducer/Component via naming convention\r\n const ExperienceConnector = bundleModule[this.$experienceType + \"Connector\"];\r\n const ExperienceReducer = bundleModule[this.$experienceType + \"Reducer\"];\r\n\r\n // Store the experience rendering component as a class member, for use later when it is connected\r\n this.experienceComponent = bundleModule[this.$experienceType];\r\n\r\n // Create the experience connector. The namespace is a combination of the experienceType and its instance ID (in case there are multiple of them on a page)\r\n const app = PageBase.getInstance();\r\n\r\n let experienceNamespace: string = null;\r\n if (this.configIndexId == null) {\r\n // configRef or HREF is not specified\r\n experienceNamespace = getExperienceNamespace({ instanceId: this.instanceId, configRef: { experienceType: this.$experienceType, instanceSrc: \"NA\" } });\r\n } else {\r\n experienceNamespace = typeof this.configIndexId === \"string\"\r\n ? getExperienceNamespace({ experienceType: this.$experienceType, instanceId: this.instanceId, href: this.configIndexId })\r\n : getExperienceNamespace(this.configIndexId, this.instanceId);\r\n }\r\n\r\n linesRunUntilFailure += \"getExperienceNamespace;\";\r\n\r\n const experienceParentNamespace = this.parentNamespace ? this.parentNamespace : \"\";\r\n const experienceStore = this.parentStore ? this.parentStore : app.store;\r\n\r\n // Data connectors are singletons, and so their registered namespace is only their experienceType. This allows\r\n // data connectors to be found by using the constants in the ExperienceIds enum\r\n this.experienceConnector = new ExperienceConnector(\r\n isDataConnector ? this.$experienceType : experienceNamespace,\r\n experienceParentNamespace,\r\n app.rootReducer,\r\n new ExperienceReducer(config),\r\n experienceStore,\r\n config,\r\n this.requestContext\r\n );\r\n linesRunUntilFailure += \"newExperienceConnector;\";\r\n\r\n // Report initial data connector state when loaded.\r\n if (isDataConnector && canUseDOM()) {\r\n reportDataConnectorStateChange(this.$experienceType, this.experienceConnector.getCurrentState());\r\n }\r\n\r\n // Set the experience config index href property on the connector.\r\n this.experienceConnector.configHref = getConfigHref(this.configIndexId);\r\n\r\n if (initMeasureEnd) {\r\n initMeasureEnd();\r\n }\r\n\r\n } catch (error) {\r\n\r\n Telemetry.sendAppErrorEvent(createError(\r\n LoadComponentFailureError,\r\n \"loadComponent failed\",\r\n `Details: ${JSON.stringify({\r\n error: stringifyError(error, true),\r\n instanceId: this.instanceId,\r\n parentNamespace: this.parentNamespace,\r\n configIndex: this.configIndexId,\r\n linesRunUntilFailure\r\n })}`\r\n ));\r\n\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * Creates and returns the connected rendering component for the experience\r\n * @param connectorProps Any initial props that should be passed to the connector in its onComponentConnect() method\r\n * @returns The Connected component for the experience\r\n */\r\n public async getConnectedExperience(connectorProps?: any): Promise {\r\n // If the connector has not been loaded yet, then load it first\r\n if (!this.experienceConnector) {\r\n await this.loadConnector();\r\n }\r\n\r\n // Return a promise that will resolve to the connected component, ready to render.\r\n try {\r\n return this.experienceConnector.connectComponent(this.experienceComponent, connectorProps);\r\n } catch (error) {\r\n Telemetry.sendAppErrorEvent({\r\n ...ConnectComponentFailureError,\r\n message: \"connectComponent failed\",\r\n pb: {\r\n ...ConnectComponentFailureError.pb,\r\n customMessage: `Details: \" ${JSON.stringify({\r\n error,\r\n connectorProps,\r\n instanceId: this.instanceId,\r\n parentNamespace: this.parentNamespace,\r\n configIndex: this.configIndexId\r\n })}`\r\n }\r\n });\r\n\r\n throw new Error(\"ExperienceLoader connectComponent failed\");\r\n }\r\n }\r\n\r\n /**\r\n * update loaded milestone for the experience\r\n * @param experienceType - Experience Type to update\r\n */\r\n private updateExperienceLoadedMilestone(experienceType: string): void {\r\n const milestoneDataConnector = getMilestoneDataConnector();\r\n if (milestoneDataConnector) {\r\n MilestoneDataActions.updateExperienceCurrentState.getActionSender(milestoneDataConnector)\r\n .send([createExperienceStateUpdate(experienceType, ExperienceLoadingState.loaded, null, null)]);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Creates a namespace based on the passed in experience config info\r\n * @param experienceConfigInfo\r\n */\r\nexport function getExperienceNamespace(experienceConfigInfo: ChildExperienceConfigInfo, instanceIdOverride?: string): string {\r\n const instanceId = instanceIdOverride || (experienceConfigInfo && experienceConfigInfo.instanceId) || \"\";\r\n return getConfigIdString(experienceConfigInfo, instanceId);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n ActionMap,\r\n CommonActions,\r\n DataConnector,\r\n DynamicReducer,\r\n IActionPayload,\r\n IReducer,\r\n PageBase,\r\n dataConnectorInjector\r\n} from \"@msnews/experiences-redux\";\r\nimport {\r\n AppError,\r\n ExperienceInitialPositionProps,\r\n ExperienceInitialProps\r\n} from \"@msnews/experiences-base\";\r\nimport {\r\n BaseExperienceConfig,\r\n ChildArrangementMetadata,\r\n ChildExperienceConfigInfo,\r\n ChildExperiencesDeferRenderType,\r\n ExperienceState,\r\n IRequestContext,\r\n appEnvironment,\r\n getConfigId,\r\n getExperienceType,\r\n resolver,\r\n tryAddOrderedTelemetryChild,\r\n tryStringifyJson\r\n} from \"@msnews/core\";\r\nimport { ChildWithInvalidExperience, ComponentConnectorAppErrors, LoadDataConnectorConfigFailed, LoadDataConnectorFailed, createError, logger, stringifyError } from \"@msnews/diagnostics\";\r\nimport { ConnectorNamespaces, ExperienceIds } from \"@msnews/experiences-constants\";\r\nimport { DeferralEventType, ExperienceMilestoneEventTypes, MilestoneDataActions, MilestoneDataConnector, UpdateTimingSignature, createTimingUpdate, getExperienceLoadDelegate, getExperienceRenderDelegate, pageRevealStartedObserver, requestPageRevealCompletedAsync, requestPageRevealStartedAsync, shouldTrackExperience } from \"@msnews/milestone-data\";\r\nimport { Dispatch, Store } from \"redux\";\r\nimport { ObjectTelemetryContract, Telemetry, TelemetryContext, TelemetryObjectBase, TelemetryTags, TelemetryType } from \"@msnews/telemetry-contracts\";\r\nimport { PageInvalidationReasons, registerStaleRevealReact, trackExpWithPersistentDataUpdate, trackPageInvalidation } from \"@msnews/page-lifecycle-helpers\";\r\nimport { TelemetryObject, trackComponent } from \"@msnews/telemetry-core\";\r\nimport { canUseDOM, getLocationHref, getLocationSearch } from \"@msnews/isomorphic-util\";\r\n\r\nimport { ConfigProcessor } from \"@msnews/config-validator\";\r\nimport { ExperienceLoadInfo } from \"./ExperienceLoadInfo\";\r\nimport { ExperienceLoader } from \"../experience-loader/ExperienceLoader\";\r\nimport { IComponentConnector } from \"./IComponentConnector\";\r\nimport React from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { getMilestoneDataConnector } from \"@msnews/milestone-data\";\r\nimport { instrumentPerf } from \"./ExperiencePerfTimeline\";\r\nimport { isEmpty } from \"lodash-es\";\r\nimport { isFunction } from \"util\";\r\nimport { networkErrorString } from \"./ComponentConnector.constants\";\r\nimport { subspaced } from \"react-redux-subspace\";\r\n\r\nexport type mapToPropsSignature = (state: TState, ownProps?: TProps) => TProps;\r\nexport type mapStateToPropsReturnType = TProps | mapToPropsSignature;\r\nexport type mapDispatchToPropsReturnType = TProps | mapToPropsSignature;\r\n\r\n/**\r\n * Map for making config-less data connectors faster to load\r\n *\r\n * HACK: HACK: HACK: This is a temporary hack until we can update CMS configs to remove\r\n * the HREF requirement for config-less connectors, so that we can opt out\r\n * of loading configs without having this special check. Need to do in phases\r\n * so that we're not breaking PROD users with old scripts.\r\n */\r\nexport const ConfiglessConnectors = {\r\n [ConnectorNamespaces.BingImageData]: true,\r\n [ConnectorNamespaces.OneServiceContent]: true,\r\n [ConnectorNamespaces.TelemetryData]: true,\r\n [ConnectorNamespaces.TopicData]: true,\r\n [ConnectorNamespaces.TopSitesLayoutData]: true,\r\n [ConnectorNamespaces.PageClickTrackerData]: true,\r\n [ConnectorNamespaces.OfficeSharedData]: true,\r\n [ExperienceIds.pivotContentV2]: true\r\n};\r\n\r\n/**\r\n * Base class for a component connector. Every connected component in an app has a connector that inherits from this class\r\n * @class\r\n */\r\nexport abstract class ComponentConnector\r\n extends DataConnector\r\n implements IComponentConnector {\r\n\r\n /**\r\n * A map of child connectors. The key to the map is a concatenation: ExperienceType_ExperienceInstanceId.\r\n * The ExperienceType is the the same as the ExperienceId in the @msnews/experiences-constants ExperienceIds enum (i.e. River)\r\n * The ExperienceInstanceId is set in config, as part of the parent experience config. Which children get created and rendered\r\n * by a parent experience will be specific to that experience, so it will be up to the parent experience to determine the\r\n * instanceId of the children to be rendered by looking in its config object.\r\n * @type Map>\r\n */\r\n protected childMap?: Map> = new Map();\r\n\r\n /**\r\n * Telemetry object of the component. It is automatically populated by this class when experience calls onComponentConnect().\r\n */\r\n protected telemetryObject: TelemetryObjectBase;\r\n\r\n /**\r\n * All telemetry objects of all subcomponent\r\n * It constitutes an object that provides access to each of the telemetry object children of a provided telemetryObject\r\n * attribute that is passed to its contructor. Particularly useful when there are many telemetry object children that need to be accessed\r\n * anywhere in the experience, for example, to update their contracts or to render them within a particular DOM element.\r\n * A great example of how it could be used can be found in the Feedback dialog experience:\r\n * FeedbackDialog.telemetry.ts: https://microsoft.visualstudio.com/ICE/_git/msnews-experiences/pullrequest/4063110?_a=files&path=%2Fexperiences%2Ffeedback-dialog%2Fsrc%2FFeedbackDialog.telemetry.ts\r\n * Feedbackdialog.tsx: https://microsoft.visualstudio.com/ICE/_git/msnews-experiences/pullrequest/4063110?_a=files&path=%2Fexperiences%2Ffeedback-dialog%2Fsrc%2FFeedbackDialog.tsx\r\n */\r\n protected telemetryContext: TelemetryContext = undefined;\r\n\r\n /**\r\n * The telemetry tags to pass along as unhandled props for rendering\r\n */\r\n protected telemetryTags: TelemetryTags = null;\r\n\r\n /**\r\n * The group the experience belongs to, if applicable. This property is to be set as needed in the specific experience connectors\r\n */\r\n protected $experienceGroup: string = undefined;\r\n\r\n /**\r\n * The connected rendering component for the experience connector\r\n */\r\n private $connectedComponent: React.ComponentClass = undefined;\r\n\r\n /**\r\n * The connected rendering component ReactElement instance for the experience connector\r\n */\r\n private $componentInstance: React.ReactElement = undefined;\r\n\r\n /**\r\n * The connector props used to connect this connector to an experience\r\n */\r\n private $connectorProps: ExperienceInitialProps;\r\n\r\n /**\r\n * flag indicating if we should render when offline. Default is false\r\n */\r\n private $renderIfOffline = false;\r\n\r\n /**\r\n * flag indicating if experience is liable to be stale\r\n */\r\n private $isStale = false;\r\n\r\n /**\r\n * The experience type\r\n */\r\n private $experienceType: string = undefined;\r\n\r\n /**\r\n * failsafe timeout(ms) to render child experiences based on milestone batch load strategy\r\n */\r\n private $maxWaitToBatchRenderChildExperiences = 4000;\r\n\r\n /**\r\n * The milestone data connector (if it exists)\r\n */\r\n private $milestoneDataConnector: MilestoneDataConnector = undefined;\r\n\r\n /**\r\n * Gets the connected component for this experience\r\n */\r\n public get connectedComponent(): React.ComponentClass { return this.$connectedComponent; }\r\n\r\n /**\r\n * Gets the component instance for this experience. This is used for rendering the experience\r\n */\r\n public get componentInstance(): React.ReactElement { return this.$componentInstance; }\r\n\r\n /**\r\n * Sets the component instance for this experience\r\n */\r\n public set componentInstance(value: React.ReactElement) { this.$componentInstance = value; }\r\n\r\n /**\r\n * Gets the experience type for this experience.\r\n */\r\n public get experienceType(): string { return this.$experienceType; }\r\n\r\n /**\r\n * Sets the renderIfOffline flag\r\n */\r\n public set renderIfOffline(value: boolean) { this.$renderIfOffline = value; }\r\n\r\n /**\r\n * Gets the staleLiable flag\r\n */\r\n public get isStale(): boolean { return this.$isStale; }\r\n\r\n /**\r\n * Gets the staleLiable flag\r\n */\r\n public set isStale(value: boolean) { this.$isStale = value; }\r\n\r\n /**\r\n * Get a map of the child experience component instances, which is appropriate for passing into the\r\n * inspector function as part of mapStateToProps\r\n */\r\n public get childComponentInstanceList(): { [instanceId: string]: React.ReactElement; } {\r\n const childComponentList: { [instanceId: string]: React.ReactElement; } = {};\r\n this.childMap.forEach((connector, key) => {\r\n childComponentList[key] = connector.componentInstance;\r\n });\r\n return childComponentList;\r\n }\r\n\r\n /**\r\n * Construct a new Component connector\r\n * @constructor\r\n * @param { string } namespace The redux subspace namespace for the connector\r\n * @param { string } parentNamespace The redux subspace namespace for the parent connector, if it exists\r\n * @param { DynamicReducer } rootReducer The root reducer for the Application\r\n * @param { IReducer } reducer The reducer for this connector instance\r\n * @param { Store} parentStore The parent store (or redux subspace) that this connector will be a subspace within\r\n * @param { TConfig } config Param containing the config for the connector\r\n * @param { IRequestContext } requestContext The injected request context\r\n */\r\n public constructor(\r\n namespace: string,\r\n parentNamespace: string,\r\n rootReducer: DynamicReducer,\r\n reducer: IReducer,\r\n parentStore: Store,\r\n config: TConfig,\r\n requestContext: IRequestContext\r\n ) {\r\n super(namespace, parentNamespace, rootReducer, reducer, parentStore, config, requestContext);\r\n this.selectComponentState = this.selectComponentState.bind(this);\r\n\r\n // To get the experience type, split the namespace at the first \"_\" and use the first substring\r\n // as the type. The convention for namespace is: ExperienceType_configHref_InstanceId. If there is no instanceId, then then namespace is just: ExperienceType\r\n const namespaceArray = namespace.split(\"_\");\r\n this.$experienceType = namespaceArray[0];\r\n // configNamespace includes experienceType + index path\r\n const configNamespace = (namespaceArray.length > 1) ? this.$experienceType + namespaceArray[1] : this.$experienceType;\r\n\r\n this.config = ConfigProcessor.processConfig(this.config, configNamespace) as TConfig;\r\n\r\n // update if experience is staleable\r\n this.setupForPageReveal();\r\n }\r\n\r\n /**\r\n * Redux mapper used to map the current state to props the component use to render itself.\r\n * @method\r\n * @param {TState} state The current state of the component.\r\n * @param {any} ownProps The set of properties that is passed in from where the component is created.\r\n * This parameter should be not nil only when the component is supposed to have part of its properties coming from a parent component.\r\n * It can be omitted when the entire set of props is derived from the state.\r\n * @returns {mapStateToPropsReturnType} It can either return the set of mapped props as an object of type TProps derived from a state\r\n * object of type TState or a function that will be used to map the state to the props.\r\n */\r\n public abstract mapStateToProps(state: TState, ownProps?: any): mapStateToPropsReturnType;\r\n\r\n /**\r\n * Inject into props redux action creators.\r\n * @method\r\n * @param {Dispatch} dispatch The redux dispatch function.\r\n * @param {any} ownProps The set of properties that is passed from where the component is created.\r\n * This parameter should be not nil only when the component is supposed to have part of its properties coming from a parent component.\r\n * It can be omitted when the entire set of props is derived from the state.\r\n * @returns {TProps} An enriched set of props.\r\n */\r\n public mapDispatchToProps(dispatch: Dispatch, ownProps?: any): mapDispatchToPropsReturnType {\r\n return {} as TProps;\r\n }\r\n\r\n /**\r\n * Overrides the default redux mergeProps function that will add a callback function for reporting experience milestone timing\r\n * @method\r\n * @param {TState} stateProps The set of properties from mapStateToProps.\r\n * @param {TProps} dispatchProps The set of properties from mapDispatchToProps.\r\n * @param {any} ownProps The set of properties that is passed from where the component is created.\r\n * @returns {TProps} The merged set of props.\r\n */\r\n public mergeProps(stateProps: TProps, dispatchProps: TProps, ownProps: any): TProps {\r\n // WARNING WARNING WARNING. Some render engines, like preact will take dependencies on some props that may be set to undefined, so the\r\n // merge must preserve properties that are undefined in the source (i.e stateProps) in the result.\r\n // Specific to preact depends on the constructor property being explicity set to undefined. When an element is created by preact\r\n // the constructor property is set to undefined, and that must be preserved by this merge function.\r\n // Avoid using lodash merge, as it does not preserve the undefined properties\r\n\r\n // If we are in Mns Creator Dashboard mode, then set props for the config href, and experience type. These will get rendered\r\n // on each experience as unhandled props\r\n let mnsDashBoardProps = {};\r\n if (appEnvironment.ShowMnsCreatorDashboard) {\r\n mnsDashBoardProps = {\r\n \"data-config-href\": this.configHref,\r\n \"data-experience-type\": this.experienceType\r\n };\r\n }\r\n\r\n // The onExperienceMilestoneTimingUpdate and isStale prop is set here, so that it is injected into the resulting properties for all experiences.\r\n return {\r\n onExperienceMilestoneTimingUpdate: this.onExperienceMilestoneTimingUpdate,\r\n isStale: this.isStale,\r\n ...mnsDashBoardProps,\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps,\r\n ...(this.requestContext && { requestContext: this.requestContext } || {})\r\n };\r\n }\r\n\r\n /**\r\n * Connects the passed in component to the redux store/state of the connector\r\n * @method\r\n * @param {React.ComponentType} componentToConnect The react element to connect.\r\n * @param {any} connectorProps Optional connector props to pass to the onComponentConnect call.\r\n * @returns {React.ComponentClass} The Redux connected component.\r\n */\r\n public async connectComponent(componentToConnect: React.ComponentType, connectorProps?: ExperienceInitialProps): Promise> {\r\n\r\n // If we are not online, and we should not render offline, then just return undefined. This will prevent the experience from ever\r\n // rendering\r\n if (canUseDOM() && !navigator.onLine && !this.$renderIfOffline) {\r\n if (connectorProps && connectorProps.onAppErrorCallback) {\r\n connectorProps.onAppErrorCallback(\r\n {\r\n id: 404,\r\n message: networkErrorString,\r\n source: \"ComponentConnector.ts\",\r\n severity: 0\r\n }\r\n );\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n const connectMeasureEnd = this.perfTimeline && this.perfTimeline.startMeasure(\"connect\").endMeasure;\r\n\r\n // Call the onComponentConnect method. This is done first, so that the connector can see the initialProps before mapStateToProps is called\r\n // onComponentConnect is async, so we need to wait for it to complete first\r\n await this.onComponentConnect(connectorProps);\r\n\r\n if (this.telemetryObject) {\r\n componentToConnect = trackComponent(componentToConnect, this.telemetryObject);\r\n }\r\n\r\n // if this experience should be instrumented for perf, do so and get the perf HOC\r\n if (this.perfTimeline) {\r\n componentToConnect = instrumentPerf(componentToConnect, this.perfTimeline);\r\n this.mapStateToProps = this.perfTimeline.instrumentFunc(\"mapStateToProps\", this.mapStateToProps, this);\r\n this.mapDispatchToProps = this.perfTimeline.instrumentFunc(\"mapDispatchToProps\", this.mapDispatchToProps, this);\r\n this.mergeProps = this.perfTimeline.instrumentFunc(\"mergeProps\", this.mergeProps, this);\r\n }\r\n\r\n // Connect the component to redux (will cause mapStateToProps to be called)\r\n const connectedComponent: React.ComponentClass = connect(\r\n this.mapStateToProps.bind(this),\r\n this.mapDispatchToProps.bind(this),\r\n this.mergeProps.bind(this),\r\n { pure: true }\r\n )(componentToConnect);\r\n\r\n // Wrap the redux connected component in a Subspace Provider, and set that as the connectedComponent for this connector\r\n this.$connectedComponent = subspaced(this.selectComponentState, this.namespace)(connectedComponent);\r\n\r\n if (connectMeasureEnd) {\r\n connectMeasureEnd();\r\n }\r\n\r\n return this.$connectedComponent;\r\n }\r\n\r\n /**\r\n * This method reads the experience config and adds any ordinal(index) based child experiences specified in the config to the input\r\n * ChildExperienceConfigInfo array at the specified ordinal position defined in config.\r\n * @method\r\n * @param {ExperienceLoadInfo[]} ExperienceLoadInfoList Array of ChildExperienceConfigInfo objects\r\n * @param {number} mergeStartPosition MergeStartPosition represents the start position for the merge. If your experience only need to call this once,\r\n * it should be 1. For deep river kind of scenario, you would need to pass the updated merge start position. StartPosition = lastEndPosition + 1\r\n * @returns {ExperienceLoadInfo[]}\r\n */\r\n public mergeOrdinalChildExperiences(\r\n experienceInfoList: ExperienceLoadInfo[],\r\n mergeStartPosition: number,\r\n callback?: (experienceInfo: ExperienceLoadInfo) => void\r\n ): ExperienceLoadInfo[] {\r\n\r\n if (!experienceInfoList) {\r\n return null;\r\n }\r\n\r\n if (mergeStartPosition < 1) {\r\n Telemetry.sendAppErrorEvent({\r\n ...ComponentConnectorAppErrors.ListStartPositionInvalid,\r\n message: \"listStartFrom must be greater than 0.\"\r\n });\r\n\r\n return experienceInfoList;\r\n }\r\n\r\n const config = this.config as BaseExperienceConfig;\r\n\r\n if (!config.additionalChildExperiences || config.additionalChildExperiences.length === 0) {\r\n return experienceInfoList;\r\n }\r\n\r\n const ordinalBlockForCurrentColumn = ConfigProcessor.getOrdinalObjectForCurrentBreakpoint(config.additionalChildExperiences);\r\n let mergeEndPos = mergeStartPosition + experienceInfoList.length;\r\n\r\n // Following code loops through the ChildArrangementMetadata array and inserts an additional child experience if startPosition provided in config is greater than mergeStartPosition\r\n // and less than mergeEndPos which is mergeStartPosition + length of the input childConfigInfoList\r\n ordinalBlockForCurrentColumn.children.forEach((childArrangementMetadata) => {\r\n const childExpArrangement = childArrangementMetadata.arrangement;\r\n\r\n // TS requires to define this explicitly and then assign it in line 234.\r\n const positionProps: ExperienceInitialPositionProps = { experienceArrangement: childExpArrangement };\r\n\r\n if (childExpArrangement && childExpArrangement.startPosition >= mergeStartPosition && childExpArrangement.startPosition <= mergeEndPos) {\r\n const insertAt = childExpArrangement.startPosition - mergeStartPosition;\r\n const experienceInfo: ExperienceLoadInfo = {\r\n configInfo: childArrangementMetadata.childExperienceConfigInfo,\r\n initialProps: positionProps\r\n };\r\n\r\n experienceInfoList.splice(insertAt, 0, experienceInfo);\r\n mergeEndPos++;\r\n\r\n if (typeof callback === \"function\") {\r\n callback(experienceInfo);\r\n }\r\n }\r\n });\r\n\r\n return experienceInfoList;\r\n }\r\n\r\n /**\r\n * This method is called when a component is connected to the connectors' store.\r\n * This method can be overridden and used by connectors to perform one time initialization functions\r\n * @method\r\n * @param {any} connectorProps Optional initial props passed into the onComponentConnect call.\r\n * @returns {void}\r\n */\r\n public async onComponentConnect(connectorProps?: ExperienceInitialProps): Promise {\r\n\r\n // save the last connected connector props\r\n this.$connectorProps = connectorProps;\r\n\r\n // Setup telemetry props for this experience.\r\n if (connectorProps) {\r\n // ExperienceTelemetry is passed as an initial prop when the parent has precreated the telemetry object for this component.\r\n // This allows the parent to create all its child components' telemetry objects in a deterministic order, thus ensuring the\r\n // telemetry ordinalIDs are always generated in a deterministic manner. This is important for hydrating prerendered pages.\r\n this.telemetryObject = this.telemetryObject || connectorProps.experienceTelemetry;\r\n\r\n if (!this.telemetryObject) {\r\n const telemetryContract = {\r\n type: TelemetryType.Module,\r\n name: this.$experienceType,\r\n content: {}\r\n } as ObjectTelemetryContract;\r\n\r\n if (connectorProps.parentTelemetry && !isEmpty(connectorProps.parentTelemetry)) {\r\n this.telemetryObject = connectorProps.parentTelemetry.addOrUpdateChild(telemetryContract, this.telemetryObject);\r\n } else {\r\n this.telemetryObject = new TelemetryObject(telemetryContract);\r\n }\r\n }\r\n\r\n // generate the telemetry tags to pass along for rendering\r\n this.telemetryTags = this.telemetryObject.render();\r\n\r\n // Override the onAppError function if passed one.\r\n if (isFunction(connectorProps.onAppErrorCallback)) {\r\n this.onAppError = connectorProps.onAppErrorCallback;\r\n }\r\n }\r\n\r\n // load data connectors\r\n // Experiences relying on looking up data connectors need await here. Data Connectors should not have any blocking calls\r\n // in the constructor.\r\n await this.loadDataConnectors();\r\n\r\n for (const injectedDataConnector of this.injectedDataConnectors) {\r\n // Setup the initial state\r\n CommonActions.dataConnectorMergeInit.getActionSender(this).send(injectedDataConnector);\r\n\r\n // Register the merge so we get updates\r\n dataConnectorInjector.registerInjection(this.fullNamespace, injectedDataConnector);\r\n }\r\n\r\n // load up child experiences\r\n await this.onLoadChildExperiences();\r\n }\r\n\r\n /**\r\n * Gets a new instance of a ReactElement for the connected Component for this connector, that can be used to render\r\n * the experience.\r\n * This method will replace any existing ReactElement instance that has been previously created.\r\n * @param ownProps optional props to be passed into the connected components' mapStateToProps method\r\n */\r\n public getNewComponentInstance(ownProps?: TProps): React.ReactElement {\r\n // If there is a connected component for this connector, then create an instance of it.\r\n if (this.$connectedComponent) {\r\n const newProps = { ...ownProps, key: this.namespace };\r\n this.$componentInstance = React.createElement(this.$connectedComponent, newProps);\r\n }\r\n\r\n return this.$componentInstance;\r\n }\r\n\r\n /**\r\n * Report a milestone timing event\r\n * @param milestoneType The type of milestone timing is being reported for\r\n * @param startTime The start time (if defined)\r\n * @param endTime The end time (if defined)\r\n */\r\n protected onExperienceMilestoneTimingUpdate = (\r\n milestoneType: ExperienceMilestoneEventTypes,\r\n startTime?: number,\r\n endTime?: number\r\n ) => {\r\n\r\n if (!shouldTrackExperience(this.experienceType)) {\r\n return;\r\n }\r\n\r\n // Do a onetime check to get the Milestone Data Connector instance\r\n if (this.$milestoneDataConnector === undefined) {\r\n this.$milestoneDataConnector = getMilestoneDataConnector() || null;\r\n }\r\n\r\n // Skip the Milestone update if we don't have a Milestone Data connector\r\n if (!this.$milestoneDataConnector) {\r\n return;\r\n }\r\n\r\n switch (milestoneType) {\r\n case ExperienceMilestoneEventTypes.domComplete:\r\n this.updateTiming(MilestoneDataActions.updateDomCompleteTiming, startTime, endTime);\r\n break;\r\n\r\n case ExperienceMilestoneEventTypes.initialized:\r\n this.updateTiming(MilestoneDataActions.updateInitTiming, startTime, endTime);\r\n break;\r\n\r\n case ExperienceMilestoneEventTypes.rendered:\r\n this.updateTiming(MilestoneDataActions.updateRenderTiming, startTime, endTime);\r\n break;\r\n\r\n case ExperienceMilestoneEventTypes.visuallyReady:\r\n this.updateTiming(MilestoneDataActions.updateVisuallyReadyTiming, startTime, endTime);\r\n break;\r\n\r\n case ExperienceMilestoneEventTypes.startLoading:\r\n this.updateTiming(MilestoneDataActions.updateStartLoadingTiming, startTime, endTime);\r\n break;\r\n\r\n case ExperienceMilestoneEventTypes.staleRevalidationComplete:\r\n MilestoneDataActions.updateExperiencePublicState.getActionSender(this.$milestoneDataConnector).send({\r\n experienceType: this.$experienceType,\r\n experienceGroup: this.$experienceGroup,\r\n experienceInstance: this.namespace,\r\n eventType: ExperienceMilestoneEventTypes.staleRevalidationComplete\r\n });\r\n break;\r\n\r\n default:\r\n // do nothing for the default cause, since there is no default timing that can be updated\r\n logger.log(`Milestone timing update was attempted for an unknown milestone type: ${milestoneType}`);\r\n break;\r\n }\r\n };\r\n\r\n /**\r\n * This method reads the experience config and returns child experiences placed using index based position.\r\n * @method\r\n * @returns {ExperienceLoadInfo[]}\r\n */\r\n protected getOrdinalChildExperiences(): ExperienceLoadInfo[] {\r\n const config = this.config as BaseExperienceConfig;\r\n\r\n if (!config.additionalChildExperiences || config.additionalChildExperiences.length === 0) {\r\n return null;\r\n }\r\n\r\n const result: ExperienceLoadInfo[] = [];\r\n const ordinalBlockForCurrentColumn = ConfigProcessor.getOrdinalObjectForCurrentBreakpoint(config.additionalChildExperiences);\r\n\r\n ordinalBlockForCurrentColumn.children.forEach((childArrangementMetadata) => {\r\n const childExpArrangement = childArrangementMetadata.arrangement;\r\n\r\n // TS requires to define this explicitly and then assign it in line 234.\r\n const positionProps: ExperienceInitialPositionProps = { experienceArrangement: childExpArrangement };\r\n result.push({\r\n configInfo: childArrangementMetadata.childExperienceConfigInfo,\r\n initialProps: positionProps\r\n });\r\n });\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Loads all the children experiences defined under the configuration in parallel.\r\n * @returns {Promise{void}[]} - an array of promises that loads all the children experiences.\r\n */\r\n protected async onLoadChildExperiences(): Promise {\r\n // Load all the children.\r\n // TODO: passing in the parent's connector props to children verbatim seems wrong.\r\n // However experiences such as spotlight seems to be loading it using this method by\r\n // passing child specific initial props from all the way from the top level page experience,\r\n // so need to resolve that before removing the this.$connectorProps parameter.\r\n await this.loadChildrenExperiences(ConfigProcessor.getChildrenExperienceConfigInfos(this.config, this.$connectorProps), this.$connectorProps);\r\n }\r\n\r\n /**\r\n * Load a list of child experiences\r\n * @param children - The list (array) of child experiences to be loaded\r\n * @param childConnectorProps - The connector props to pass to each child experience as it is loaded\r\n * @returns {Promise{void}} - the async operation that denotes loading of all the children.\r\n */\r\n protected async loadChildrenExperiences(children: ChildExperienceConfigInfo[], childConnectorProps?: ExperienceInitialProps): Promise {\r\n if (!children || children.length === 0) {\r\n return;\r\n }\r\n\r\n const childExpsToLoadImmediately = [];\r\n\r\n const reRenderCallback = () => {\r\n this.readyExperienceToRender(children);\r\n };\r\n\r\n for (const child of children) {\r\n // Call tryAddOrderedTelemetryChild to ensure child telemetry is constructed in order and thus the child telemetry\r\n // ordinal IDs are deterministic. Otherwise ordinal IDs can differ between server side renders and client side hydration.\r\n const promiseDependency = this.startProcessingChildExperience(child, reRenderCallback, {\r\n ...childConnectorProps,\r\n experienceTelemetry: tryAddOrderedTelemetryChild(this.telemetryObject, getExperienceType(child))\r\n });\r\n childExpsToLoadImmediately.push(promiseDependency);\r\n }\r\n\r\n // NOTE: In order to make sure that the fail-fast behavior of Promise.all doesn't kick in, we're wrapping the individual promises\r\n // with a catch block and ensuring that they always resolve (never reject/throw error). If we don't do this, then\r\n // even if one child promise gets rejected early, then the parent experience might fail to load the remaining children.\r\n // childExpsToLoadImmediately.map(async childExp => await childExp());\r\n await Promise.all(childExpsToLoadImmediately);\r\n }\r\n\r\n /**\r\n * Gets the list of data connectors to inject into this experience.\r\n */\r\n protected get injectedDataConnectors(): ConnectorNamespaces[] {\r\n return [];\r\n }\r\n\r\n /**\r\n * Load a list of data connectors provided in the experience config\r\n * @returns {Promise{void}} - the async operation that denotes loading of all the children.\r\n */\r\n protected async loadDataConnectors(): Promise {\r\n await Promise.all(\r\n ConfigProcessor.getChildrenDataConnectorConfigInfos(this.config).map(connector =>\r\n this.loadDataConnector(connector)));\r\n }\r\n\r\n /**\r\n * Loads a single child experience with the given connector initial props.\r\n * @param configInfo - the child experience config info\r\n * @param childConnectorProps - optional initial props to pass to connector.\r\n * @returns {Promise{void}} - the async operation that denotes loading of the child.\r\n */\r\n protected async loadChildExperience(\r\n configInfo: ChildExperienceConfigInfo,\r\n childConnectorProps?: ExperienceInitialProps\r\n ): Promise {\r\n // If the experience is delay loaded, load it through the same flow as composition ones so that MilestoneData deferred loading logic is intact.\r\n const milestoneDependencyToLoadChildExp = getExperienceLoadDelegate(getExperienceType(configInfo));\r\n if (milestoneDependencyToLoadChildExp) {\r\n await this.loadChildrenExperiences([configInfo], childConnectorProps);\r\n return;\r\n }\r\n\r\n const childConnector = await this.getChildExperienceConnector(configInfo, childConnectorProps);\r\n if (!childConnector) {\r\n configInfo.state = ExperienceState.Failed;\r\n return;\r\n }\r\n\r\n this.addConnectorToChildMap(configInfo, childConnector);\r\n }\r\n\r\n /**\r\n * Provides the connector props to be passed into the onComponentConnect method for any children that are created for this\r\n * experience connector\r\n * @param childExperienceType The experience Type of the child experience being loaded\r\n * @param childExperienceInstanceId The experienceInstance Id of the child experience being loaded\r\n */\r\n protected getChildExperienceConnectorProps(childExperienceType: string, childExperienceInstanceId: string): ExperienceInitialProps {\r\n return (\r\n {\r\n parentTelemetry: this.telemetryObject,\r\n context: this.$connectorProps && this.$connectorProps.context,\r\n onAppErrorCallback: this.onAppError,\r\n requestContext: this.requestContext\r\n });\r\n }\r\n\r\n /**\r\n * function to call an action to reRender experience\r\n */\r\n protected reRenderExperience(): void {\r\n CommonActions.renderExperience.getActionSender(this).send();\r\n }\r\n\r\n /**\r\n * function to re-initialize experience state, re-fetch data if stale.\r\n */\r\n protected reInitExperienceState(): void {\r\n CommonActions.renderExperience.getActionSender(this).send();\r\n }\r\n\r\n /**\r\n * The optional function for Experiences to call use when an error occurs.\r\n * Defined as empty function so clients don't need to check it.\r\n * Passed to child experiences. Used mainly outside of Peregrine. e.g. Office page.\r\n * NOTE: we need to default to track.trackAppErrorEvent for PH components.\r\n */\r\n protected onAppError: ((error: AppError) => void) = (err) => Telemetry.sendAppErrorEvent(err);\r\n\r\n /**\r\n * Invoked when the experience is stale and needs to be updated. Override this method to refresh the experience\r\n * if it can get stale.\r\n * @returns True if the experience took an action on being stale.\r\n */\r\n protected revalidateExperienceStaleState(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Revalidate the experience if needed and store outcome in isStale.\r\n */\r\n private revalidateIfNeeded = () => {\r\n this.isStale = this.revalidateExperienceStaleState();\r\n return this.isStale;\r\n };\r\n\r\n /**\r\n * track experience changes for pageReveal\r\n * @param expType - experience type to be revalidated\r\n */\r\n protected trackExperienceChangesForPageReveal(expType?: string): void {\r\n // track changes in persistent store to be used on pageReveal\r\n trackExpWithPersistentDataUpdate(expType ? expType : this.experienceType);\r\n }\r\n\r\n /**\r\n * track experience changes for pageReveal\r\n * @param invalidationReason - page invalidation reason\r\n */\r\n protected trackPageInvalidationOnReveal(invalidationReason: PageInvalidationReasons): void {\r\n // track changes in persistent store for page invalidation on pageReveal\r\n trackPageInvalidation(invalidationReason);\r\n }\r\n\r\n /**\r\n * Base implementation for page visible, resolves when page moves from hidden to visible.\r\n * This is currently used for Prerender PageReveal scenario.\r\n * In future this can be extended for page lifecycle api events.\r\n */\r\n protected async requestPageVisibleAsync(): Promise {\r\n return await requestPageRevealStartedAsync();\r\n }\r\n\r\n /**\r\n * Base implementation for page visible complete, resolves when page is ready to be revealed\r\n * This is currently used for Prerender PageReveal scenario.\r\n * In future this can be extended for page lifecycle api events.\r\n */\r\n protected async requestPageVisibleCompleteAsync(): Promise {\r\n return await requestPageRevealCompletedAsync();\r\n }\r\n\r\n /**\r\n * Initial setup for page reveal\r\n */\r\n private setupForPageReveal() {\r\n const experienceConfig = this.config as BaseExperienceConfig;\r\n // mock config for staleness if url override is provided\r\n this.mockStalenessConfig(experienceConfig);\r\n\r\n if (experienceConfig && experienceConfig.stalenessInfo && experienceConfig.stalenessInfo.isStaleCheckRequired) {\r\n registerStaleRevealReact({ experienceType: this.$experienceType, thresholdMinutes: experienceConfig.stalenessInfo.staleThreshold, callback: this.revalidateIfNeeded });\r\n }\r\n }\r\n\r\n /**\r\n * Common helper to send a milestone timing update for a specific action.\r\n */\r\n private updateTiming(actionMap: ActionMap, startTime?: number, endTime?: number): void {\r\n actionMap.getActionSender(this.$milestoneDataConnector)\r\n .send(createTimingUpdate(this.$experienceType, this.$experienceGroup, this.namespace, startTime, endTime));\r\n }\r\n\r\n /**\r\n * Initializes connector and connected component for a given child experience.\r\n * @param configInfo - the child experience config info\r\n * @param childConnectorProps - optional initial props to pass to connector.\r\n * @returns {Promise>} - the async operation that returns the connector for child experience.\r\n */\r\n private async getChildExperienceConnector(\r\n configInfo: ChildExperienceConfigInfo,\r\n childConnectorProps?: ExperienceInitialProps): Promise> {\r\n\r\n const experienceType = getExperienceType(configInfo);\r\n\r\n try {\r\n // Get an experience loader instance for the child experience\r\n const loader = new ExperienceLoader(configInfo, null, this.fullNamespace, this.store, this.requestContext, experienceType);\r\n\r\n // Get the connector for the child experience, and add it to the child connector map\r\n await loader.loadConnector();\r\n const { connector: childConnector } = loader;\r\n\r\n // Get the connected component for the child experience.\r\n await loader.getConnectedExperience({\r\n // get core connector props\r\n ...this.getChildExperienceConnectorProps(experienceType, configInfo.instanceId),\r\n // add any override props\r\n ...(childConnectorProps || {})\r\n });\r\n\r\n // Get the initial component instance for the child. The experience connector can get a new instance if it needs to do special\r\n // processing (i.e. passing in OwnProps)\r\n childConnector.getNewComponentInstance();\r\n\r\n return childConnector;\r\n } catch (error) {\r\n // Remove this config from cache.\r\n const configId = getConfigId(configInfo);\r\n if (typeof configId === \"string\") {\r\n resolver.removeCachedConfig(configId);\r\n }\r\n // TODO: else Git Configs\r\n\r\n // On server side we need to rethrow error so client side rendering takes over, this is to prevent rendering a mismatched page\r\n if (!canUseDOM()) {\r\n throw error;\r\n }\r\n\r\n // Log an app error if the loader failed to load for whatever reason\r\n /// NOTE: DO NOT throw Error or reject promise here, or else the parent might not load the remaining child experiences.\r\n Telemetry.sendAppErrorEvent({\r\n ...ComponentConnectorAppErrors.BundleLoadError,\r\n message: `Failed to load experience ${experienceType || \"\"}`,\r\n pb: {\r\n ...ComponentConnectorAppErrors.BundleLoadError.pb,\r\n customMessage: `${JSON.stringify(configInfo)}, with error: ${error}`\r\n }\r\n });\r\n\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Load a single data connector\r\n * @param configInfo - data connector config info object\r\n * @returns {Promise{void}} - the async operation that denotes loading of all the children.\r\n */\r\n protected async loadDataConnector(configInfo: ChildExperienceConfigInfo): Promise {\r\n\r\n // Get an experience loader instance for the child experience\r\n const configId = getConfigId(configInfo);\r\n if (!configId) {\r\n\r\n // Log an app error if the loader failed to load for whatever reason\r\n Telemetry.sendAppErrorEvent({\r\n ...LoadDataConnectorConfigFailed,\r\n message: \"configInfo or Href is null while loading data connector\",\r\n pb: {\r\n ...LoadDataConnectorConfigFailed.pb,\r\n customMessage: tryStringifyJson(configInfo)\r\n }\r\n });\r\n\r\n return;\r\n }\r\n\r\n const experienceType = getExperienceType(configInfo);\r\n\r\n try {\r\n const loader = new ExperienceLoader(\r\n // if it's a config-less experience type, do not pass in the HREF to prevent loading the config.\r\n // TODO: after deployment, we need to update configs of config-less connectors so that we don't need\r\n // a special check like this, and instead the empty HREF can be directly set in the config.\r\n // Need to do this in a phased approach so that we don't break PROD users with old scripts.\r\n experienceType && ConfiglessConnectors[experienceType]\r\n ? null\r\n : configInfo,\r\n \"\",\r\n \"\",\r\n PageBase.getInstance().store,\r\n this.requestContext,\r\n experienceType\r\n );\r\n\r\n // Get the connector for the child experience, and add it to the child connector map\r\n await loader.loadConnector(true);\r\n } catch (error) {\r\n // Log an app error if the loader failed to load for whatever reason\r\n /// NOTE: DO NOT throw Error or reject promise here, or else the parent might not load the remaining child experiences.\r\n Telemetry.sendAppErrorEvent(createError(\r\n LoadDataConnectorFailed,\r\n `Data connector loading failed for ${experienceType || \"\"}`,\r\n `${tryStringifyJson(configInfo)}, with error: ${error}`\r\n ));\r\n }\r\n }\r\n\r\n /**\r\n * Select and return the proper inner state for the component. The base DataConnector manages the wrapping of the state\r\n * and so it's getCurrentState() method is used to get the inner state (TState) for the connected component\r\n * NOTE: The signature of this component requires a state parameter, so that it can be passed into the subspaced()\r\n * method that is used to connect the component to state\r\n * @param state For this implementation, this parameter is ignored, since the actual state is managed by the base DataConnector\r\n */\r\n private selectComponentState(state: TParentState): TState {\r\n return (this.getCurrentState());\r\n }\r\n\r\n /**\r\n * Start lifecycle of a child experience\r\n * @param configInfo - the child experience config info\r\n * @param reRenderCallback - Render callback to call when dependencies are resolved\r\n * @param childConnectorProps - child experience connector props\r\n * @returns {Promise{void}} - the async operation that denotes loading of the child.\r\n */\r\n private async startProcessingChildExperience(\r\n configInfo: ChildExperienceConfigInfo,\r\n reRenderCallback: () => void,\r\n childConnectorProps?: ExperienceInitialProps\r\n ): Promise {\r\n\r\n const milestoneDependencyToLoadChildExp = getExperienceLoadDelegate(getExperienceType(configInfo));\r\n\r\n if (milestoneDependencyToLoadChildExp && milestoneDependencyToLoadChildExp.shouldResolve) {\r\n // Don't load delayed children on server side to avoid HTML mismatches\r\n if (canUseDOM()) {\r\n let addTimeout = true;\r\n\r\n if (milestoneDependencyToLoadChildExp.deferralType === DeferralEventType.CustomEventBasedDeferral) {\r\n addTimeout = false;\r\n configInfo.state = ExperienceState.Unknown;\r\n }\r\n\r\n this.resolveDependency(\r\n configInfo,\r\n milestoneDependencyToLoadChildExp.shouldResolve,\r\n () => this.loadAndRenderExperience(configInfo, reRenderCallback, true, childConnectorProps),\r\n addTimeout\r\n );\r\n }\r\n } else {\r\n await this.loadAndRenderExperience(configInfo, reRenderCallback, false, childConnectorProps);\r\n }\r\n }\r\n\r\n /**\r\n * load and render experience\r\n * @param childExpInfo - the child experience config info\r\n * @param reRenderCallback - Render callback to call when dependencies are resolved\r\n * @param delayLoaded - whether this experience is delay loaded or not\r\n * @param childConnectorProps - child experience connector props\r\n * @returns {Promise{void}} - the async operation that denotes loading of the child.\r\n */\r\n private async loadAndRenderExperience(\r\n childExpInfo: ChildExperienceConfigInfo,\r\n reRenderCallback: () => void,\r\n delayLoaded: boolean,\r\n childConnectorProps?: ExperienceInitialProps\r\n ): Promise {\r\n\r\n const experienceType = getExperienceType(childExpInfo);\r\n const configId = getConfigId(childExpInfo);\r\n\r\n // Get an experience loader instance for the child experience\r\n if (!childExpInfo\r\n || (!configId && !ConfiglessConnectors[experienceType])\r\n || !childExpInfo.instanceId) {\r\n\r\n // Log an app error if the loader failed to load for whatever reason\r\n Telemetry.sendAppErrorEvent({\r\n ...ChildWithInvalidExperience,\r\n message: `Attempted to load child with invalid experience ${experienceType || \"\"}`,\r\n pb: {\r\n ...ChildWithInvalidExperience.pb,\r\n customMessage: tryStringifyJson(childExpInfo)\r\n }\r\n });\r\n\r\n return;\r\n }\r\n\r\n try {\r\n const connector = await this.getChildExperienceConnector(childExpInfo, childConnectorProps);\r\n\r\n if (!connector) {\r\n childExpInfo.state = ExperienceState.Failed;\r\n return;\r\n }\r\n\r\n const milestoneDependencyToRenderChildExp = getExperienceRenderDelegate(experienceType);\r\n\r\n if (milestoneDependencyToRenderChildExp && milestoneDependencyToRenderChildExp.shouldResolve) {\r\n this.resolveDependency(\r\n childExpInfo,\r\n milestoneDependencyToRenderChildExp.shouldResolve, () => {\r\n childExpInfo.state = ExperienceState.ReadyToRender;\r\n this.addConnectorToChildMap(childExpInfo, connector);\r\n reRenderCallback();\r\n },\r\n true\r\n );\r\n } else {\r\n childExpInfo.state = ExperienceState.ReadyToRender;\r\n this.addConnectorToChildMap(childExpInfo, connector);\r\n if (delayLoaded) {\r\n reRenderCallback();\r\n }\r\n }\r\n } catch (error) {\r\n // On server side we need to rethrow error so client side rendering takes over, this is to prevent rendering a mismatched page\r\n if (!canUseDOM()) {\r\n throw error;\r\n }\r\n\r\n childExpInfo.state = ExperienceState.Failed;\r\n\r\n // Log an app error if the loader failed to delayload\r\n Telemetry.sendAppErrorEvent(\r\n createError(\r\n ComponentConnectorAppErrors.ChildDelayLoadError,\r\n `Attempted to delay load child ${experienceType} and failed as associated deferral promise returned an error`,\r\n stringifyError(error)\r\n )\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * add connector to child map\r\n * @param configInfo - the child experience config info\r\n * @param childConnector - child experience connector\r\n */\r\n private addConnectorToChildMap(configInfo: ChildExperienceConfigInfo, childConnector: IComponentConnector): void {\r\n // If the experience loaded, and we got the connected component, then add it to the child map,\r\n // as long as we have not seen this child before\r\n if (!this.childMap.has(configInfo.instanceId)) {\r\n this.childMap.set(configInfo.instanceId, childConnector);\r\n } else {\r\n // Log an app error\r\n Telemetry.sendAppErrorEvent({\r\n ...ComponentConnectorAppErrors.DuplicateChildInstanceFound,\r\n message: `Duplicate child instance found: ${childConnector.namespace}`,\r\n pb: {\r\n ...ComponentConnectorAppErrors.DuplicateChildInstanceFound.pb,\r\n customMessage: `href: ${getLocationHref()}, parentNamespace: ${this.fullNamespace}`\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Check if delay loaded experiences are ready to be rendered\r\n * @param children - the child experience config info array\r\n */\r\n private readyExperienceToRender(children: ChildExperienceConfigInfo[]): void {\r\n const config = this.config as BaseExperienceConfig;\r\n\r\n if (!config.childExperiencesRenderType || config.childExperiencesRenderType === ChildExperiencesDeferRenderType.batch) {\r\n for (const child of children) {\r\n if (child.state !== ExperienceState.ReadyToRender && child.state !== ExperienceState.Failed && child.state !== ExperienceState.Unknown) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n this.reRenderExperience();\r\n }\r\n\r\n /**\r\n * Resolves promise dependency with applicable timeout strategy\r\n * @param dependency - Delegate Promise to resolve dependency\r\n * @param callback - callback function to call when dependency is resolved\r\n */\r\n private resolveDependency(\r\n configInfo: ChildExperienceConfigInfo,\r\n dependency: () => Promise,\r\n callback: () => void,\r\n addTimeout: boolean\r\n ): void {\r\n\r\n let pending = true;\r\n let timer: NodeJS.Timer = null;\r\n\r\n if (addTimeout) {\r\n timer = setTimeout(\r\n () => {\r\n if (pending) {\r\n pending = false;\r\n callback();\r\n }\r\n },\r\n this.$maxWaitToBatchRenderChildExperiences\r\n );\r\n }\r\n\r\n dependency().then(() => {\r\n if (addTimeout) {\r\n clearTimeout(timer);\r\n }\r\n\r\n if (pending) {\r\n pending = false;\r\n callback();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * mock experience config through url override\r\n * @param experienceConfig - experience config\r\n */\r\n private mockStalenessConfig(experienceConfig: BaseExperienceConfig) {\r\n\r\n const searchParams = new URLSearchParams(getLocationSearch());\r\n const enableMockStalenessConfig = searchParams.get(\"debugstalerevalidation\");\r\n\r\n if (enableMockStalenessConfig) {\r\n if (this.experienceType === ExperienceIds.moneyCard) {\r\n experienceConfig.stalenessInfo = { isStaleCheckRequired: true, staleThreshold: 3 };\r\n }\r\n if (this.experienceType === ExperienceIds.weatherCard) {\r\n experienceConfig.stalenessInfo = { isStaleCheckRequired: true, staleThreshold: 2 };\r\n }\r\n if (this.experienceType === ExperienceIds.river) {\r\n experienceConfig.stalenessInfo = { isStaleCheckRequired: true, staleThreshold: 1 };\r\n }\r\n if (this.experienceType === ExperienceIds.topSitesEdgeNext) {\r\n experienceConfig.stalenessInfo = { isStaleCheckRequired: true };\r\n }\r\n if (this.experienceType === ExperienceIds.backgroundImageEdgeNext) {\r\n experienceConfig.stalenessInfo = { isStaleCheckRequired: true };\r\n }\r\n if (this.experienceType === ExperienceIds.searchBoxEdgeNext) {\r\n experienceConfig.stalenessInfo = { isStaleCheckRequired: true };\r\n }\r\n if (this.experienceType === ExperienceIds.headerEdgeNext) {\r\n experienceConfig.stalenessInfo = { isStaleCheckRequired: true };\r\n }\r\n }\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Telemetry, TelemetryAttrName, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nimport React from \"react\";\r\n\r\n/**\r\n * Returns an HOC for tracking telemetry of a React.Component.\r\n * @param WrappedComponent - the component to track telemetry.\r\n * @param telemetryObject - the telemetry object of the component.\r\n */\r\nexport function trackComponent(\r\n WrappedComponent: React.ComponentType,\r\n telemetryObject: TelemetryObjectBase\r\n): React.ComponentClass {\r\n\r\n return class ComponentTracker extends React.Component {\r\n /** Telemetry object for the component. */\r\n private telemetryObject: TelemetryObjectBase;\r\n\r\n constructor(props: TProps, context?: any) {\r\n super(props, context);\r\n this.telemetryObject = telemetryObject;\r\n }\r\n\r\n /** React render lifecycle handler */\r\n public render(): JSX.Element {\r\n return ;\r\n }\r\n };\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { dispatchAction, getActionPayload } from \"./ActionDispatchHelper\";\r\n\r\nimport { ConnectorConstants } from \"../constants/ConnectorConstants\";\r\nimport { IActionPayload } from \"./IActionPayload\";\r\nimport { Observer } from \"./ActionObserver\";\r\nimport { PerfTimeline } from \"@msnews/diagnostics\";\r\nimport { IDataConnector } from \"../connectors\";\r\n\r\n/**\r\n * Class that wraps the sending of a action to a connector (i.e. dispatch) with an explicit method, so that in the consuming code\r\n * it is obvious that the action is being \"sent\"\r\n * @class\r\n */\r\nexport abstract class ActionSenderBase {\r\n /**\r\n * Property which is a function that will send an action to the connector.\r\n */\r\n public get send(): TActionSignature {\r\n return (this.dispatchAction());\r\n }\r\n\r\n /**\r\n * Creates an instance of the `ActionSender` class.\r\n * @constructor\r\n * @param {string} type The action type.\r\n * @param {Observer[]} observers Array of registered action observers\r\n * @param {IDataConnector} connector Optional connector to send the action to\r\n */\r\n constructor(\r\n protected type: string,\r\n private observers: Observer[],\r\n protected connector?: IDataConnector) { }\r\n\r\n /**\r\n * Method to get dispatcher and payload\r\n * @param args - the arguments being dispatched\r\n * @returns dispatch result metadata\r\n */\r\n protected abstract getDispatchResult(args: any[]): { payload: IActionPayload, result: any };\r\n\r\n /**\r\n * Gets the perf timeline object if applicable\r\n */\r\n protected abstract tryGetPerfTimeline(): PerfTimeline;\r\n\r\n /**\r\n * Method that returns an action sender function to send the action.\r\n * @method\r\n * @return {TActionSignature} return value is a function to send to action.\r\n */\r\n private dispatchAction(): TActionSignature {\r\n return function (...args: unknown[]): unknown {\r\n const perfTimeline = this.tryGetPerfTimeline();\r\n const actionEndMeasure = perfTimeline && perfTimeline.startMeasure(\"action\", this.type).endMeasure;\r\n\r\n const { payload, result } = this.getDispatchResult(args);\r\n\r\n // Call any observers\r\n this.observers.forEach(o => {\r\n try {\r\n if (!o.filterConnector\r\n || this.connector === o.filterConnector) {\r\n\r\n // Call the observer\r\n o.observer(payload);\r\n }\r\n } catch (error) {\r\n console.log(`Error calling observer: ${JSON.stringify(o.observer)}, with error: ${error}`);\r\n }\r\n\r\n // If there is a dispatch connector, dispatch an action to it, forcing it to re-render\r\n if (o.dispatchConnector) {\r\n const renderActionPayload = getActionPayload(o.dispatchConnector, ConnectorConstants.renderAction, [], undefined);\r\n dispatchAction(o.dispatchConnector, renderActionPayload);\r\n }\r\n });\r\n\r\n if (actionEndMeasure) {\r\n actionEndMeasure();\r\n }\r\n\r\n // Return the dispatch result\r\n return result;\r\n };\r\n }\r\n\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { dispatchAction, getActionPayload } from \"./ActionDispatchHelper\";\r\n\r\nimport { ActionSenderBase } from \"./ActionSenderBase\";\r\nimport { IActionPayload } from \"./IActionPayload\";\r\nimport { IDataConnector } from \"../connectors\";\r\nimport { Observer } from \"./ActionObserver\";\r\nimport { PerfTimeline } from \"@msnews/diagnostics\";\r\n\r\n/**\r\n * Class that wraps the sending of a action to a connector (i.e. dispatch) with an explicit method, so that in the consuming code\r\n * it is obvious that the action is being \"sent\"\r\n * @class\r\n */\r\nexport class ActionSender extends ActionSenderBase {\r\n\r\n /**\r\n * Creates an instance of the `ActionSender` class.\r\n * @constructor\r\n * @param {string} type The action type.\r\n * @param {IDataConnector} connector The connector instance to dispatch the action to.\r\n */\r\n constructor(\r\n type: string,\r\n observers: Observer[],\r\n connector: IDataConnector) {\r\n\r\n super(type, observers, connector);\r\n }\r\n\r\n /**\r\n * Core dispatch implementation for {GlobalActionSender}\r\n * @param args - the arguments being dispatched\r\n * @returns dispatch result metadata\r\n */\r\n protected getDispatchResult(args: any[]): { payload: IActionPayload, result: any } {\r\n const payload = getActionPayload(this.connector, this.type, args, undefined);\r\n const result = dispatchAction(this.connector, payload);\r\n return { payload, result };\r\n }\r\n\r\n /**\r\n * Gets the perf timeline if applicable\r\n */\r\n protected tryGetPerfTimeline(): PerfTimeline {\r\n return this.connector.perfTimeline;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { PerfTimeline, tryGetPerfTimeline } from \"@msnews/diagnostics\";\r\nimport { dispatchAction, getActionPayload } from \"./ActionDispatchHelper\";\r\n\r\nimport { ActionSenderBase } from \"./ActionSenderBase\";\r\nimport { IActionPayload } from \"./IActionPayload\";\r\nimport { Observer } from \"./ActionObserver\";\r\n\r\n/**\r\n * Class that wraps the sending of a action globally to all connectors\r\n * @export\r\n * @class\r\n */\r\nexport class GlobalActionSender extends ActionSenderBase {\r\n\r\n /**\r\n * Creates an instance of the `GlobalActionSender` class.\r\n * @constructor\r\n * @param {string} type The action type.\r\n * @param {string} experienceInstanceId Optional experienceInstanceId of the experience that is originating the action.\r\n */\r\n constructor(\r\n type: string,\r\n observers: Observer[],\r\n private experienceInstanceId?: string) {\r\n\r\n super(type, observers, null);\r\n }\r\n\r\n /**\r\n * Core dispatch implementation for {GlobalActionSender}\r\n * @param args - the arguments being dispatched\r\n * @returns dispatch result metadata\r\n */\r\n protected getDispatchResult(args: any[]): { payload: IActionPayload, result: any } {\r\n const payload = getActionPayload(undefined, this.type, args, this.experienceInstanceId);\r\n const result = dispatchAction(undefined, payload);\r\n return { payload, result };\r\n }\r\n\r\n /**\r\n * Gets the perf timeline if applicable\r\n */\r\n protected tryGetPerfTimeline(): PerfTimeline {\r\n return tryGetPerfTimeline(\"GlobalActionSender\", this.experienceInstanceId || \"unknown\");\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActionObserver, Observer } from \".\";\r\n\r\nimport { ActionSender } from \"./ActionSender\";\r\nimport { GlobalActionSender } from \"./GlobalActionSender\";\r\nimport { IActionMap } from \"./IActionMap\";\r\nimport { IDataConnector } from \"../connectors/IDataConnector\";\r\nimport PageBase from \"../pages\";\r\n\r\n/**\r\n * Class that maps Action to its callback function type.\r\n * Provides the method to get action creator which returns callback function to send to action.\r\n * Callback function dispatches the action payload.\r\n * @class\r\n */\r\nexport class ActionMap implements IActionMap {\r\n\r\n /**\r\n * An array of registered action observers\r\n */\r\n private observers: Observer[] = [];\r\n\r\n /**\r\n * Creates an instance of the `ActionMap` class.\r\n * @constructor\r\n * @param {string} type The action type, which is part of the IActionMap contract.\r\n */\r\n constructor(public type: string) {\r\n }\r\n\r\n /**\r\n * Method that returns an action sender function that can be used to send/dispatch the action to a specific connector\r\n * @method\r\n * @param {IDataConnector | string} connector The connector instance to send the action to, or the connector namespace. If the param type\r\n * is string, then the connector instance will be looked up, and used if found.\r\n * @return {TActionSignature} return value is an object with a send method, which is used to send the action.\r\n */\r\n public getActionSender(connector: IDataConnector | string): ActionSender | undefined {\r\n let connectorInstance: IDataConnector = undefined;\r\n if (typeof (connector) === \"string\") {\r\n // Find the connector with the matching namespace\r\n connectorInstance = PageBase.getInstance().rootReducer.connector(connector);\r\n } else {\r\n connectorInstance = connector;\r\n }\r\n\r\n if (connectorInstance) {\r\n return new ActionSender(this.type, this.observers, connectorInstance);\r\n }\r\n }\r\n\r\n /**\r\n * Method that returns an action sender function that can be used to send/dispatch the action globally to all connectors\r\n * @method\r\n * @param {string} experienceInstanceId An optional experienceInstanceId, that will get passed along in the action payload.\r\n * It can then be used by the receiving reducer to determine if the action should be handled.\r\n * @return {TActionSignature} return value is an object with a send method, which is used to send the action.\r\n */\r\n public getGlobalActionSender(experienceInstanceId?: string): GlobalActionSender {\r\n return new GlobalActionSender(this.type, this.observers, experienceInstanceId);\r\n }\r\n\r\n /**\r\n * Method that registers a new observer for this action. The observer will be called after the action is dispatched\r\n * @method\r\n * @param {ActionObserver} observer The observer to be added to the list of observers that will be called when the action completes\r\n * @param {Object} connectors Option connectors associated to the observer that will be called by the observer\r\n */\r\n public registerObserver(observer: ActionObserver, connectors?: { dispatchConnector?: IDataConnector, filterConnector?: IDataConnector }): void {\r\n const { dispatchConnector, filterConnector } = (connectors || {});\r\n\r\n this.observers.push({ observer, dispatchConnector, filterConnector });\r\n }\r\n\r\n /**\r\n * Method that remove observer for this action.\r\n * @method\r\n * @param {ActionObserver} observer The observer to be removed to from the list of observers\r\n */\r\n public unregisterObserver(\r\n observer: ActionObserver): void {\r\n\r\n const indexToRemove: number = this.observers.findIndex((existObserver) => {\r\n return existObserver.observer === observer;\r\n });\r\n\r\n if (indexToRemove > -1) {\r\n this.observers.splice(indexToRemove, 1);\r\n }\r\n }\r\n\r\n /**\r\n * Method that unregisters all the observers for this action. Called on the server side to clean up observers between requests.\r\n */\r\n public unregisterObservers(): void {\r\n this.observers = [];\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * class defining perf trackers.\r\n */\r\nexport class PerfTracker {\r\n\r\n /** The perf tracker end time. */\r\n private endTime = -1;\r\n\r\n /** The perf tracker start time. */\r\n private startTime = -1;\r\n\r\n /**\r\n * Get perf tracker time duration\r\n */\r\n public getDuration(): number {\r\n let result = -1;\r\n if (this.startTime !== -1 && this.endTime !== -1) {\r\n result = this.endTime - this.startTime;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * get perf tracker end time\r\n */\r\n public getEnd(): number {\r\n return this.endTime;\r\n }\r\n\r\n /**\r\n * get perf tracker start time\r\n */\r\n public getStart(): number {\r\n return this.startTime;\r\n }\r\n\r\n /**\r\n * set perf tracker end time\r\n */\r\n public setEnd(): void {\r\n this.endTime = performance.now();\r\n }\r\n\r\n /**\r\n * set perf tracker start time\r\n */\r\n public setStart(): void {\r\n this.startTime = performance.now();\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport Foundation, { FoundationProps } from \"@microsoft/fast-components-foundation-react\";\r\nimport { IRequestContext, appEnvironment, headData } from \"@msnews/core\";\r\nimport { PerfTracker, getPageTimings, incrementCounter, logger, markTtf, markTtprRaf, markTtvr, markTtvrRaf } from \"@msnews/diagnostics\";\r\n\r\nimport { ExperienceMilestoneEventTypes } from \"@msnews/milestone-data\";\r\nimport { MnsCreatorDashboardAttributes } from \"./MnsCreatorDashboard.attributes\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\ndeclare global {\r\n interface Window {\r\n /**\r\n * Boolean flag to indicate if render cache hydration is happening\r\n */\r\n needsHydrate?: boolean;\r\n }\r\n}\r\n\r\n/** Type definition for the onExperienceMilestoneTimingUpdate callback */\r\nexport type ExperienceMilestoneTimingUpdate = (milestoneType: ExperienceMilestoneEventTypes,\r\n startTime?: number,\r\n endTime?: number) => void;\r\n\r\nconst pageTimings = getPageTimings();\r\n\r\n/** Type definition for the onExperienceMilestoneTimingUpdate callback */\r\nexport type ExperienceStaleRevalidationUpdate = (milestoneType: ExperienceMilestoneEventTypes) => void;\r\n\r\n/**\r\n * Internal interface used for detecting render counter related static properties\r\n * in Experience components. We use this to cast the object's constructor to see\r\n * if the custom render counter prefix is available to use to emit custom page timings.\r\n * Note that this interface is not meant to be explicitly extended, since we're trying to\r\n * to leverage static properties from the Experience component classes and interfaces are\r\n * not supported on static properties. This purely serves as a type definition so we can\r\n * access the static `renderCounterPrefix` property without typescript complaining about it.\r\n */\r\ninterface ExperienceStaticConstructor {\r\n /**\r\n * Optional custom render count marker prefix to use to log an additional count metric\r\n * in addition to the default render counters. Useful when you want to count a group of\r\n * similar experiences under a custom render counter group. Currently used by content\r\n * experiences to log the total number of content card renders before TTVR. This value\r\n * is used as an prefix value to form the final marker name. For example, a value of\r\n * \"XYZ\" would end up logging \"XYZExpRenderCount\" in addition to the default \"ExpRenderCount\"\r\n */\r\n renderCounterPrefix: string;\r\n}\r\n\r\n/**\r\n * Common props for all experiences\r\n */\r\nexport interface CommonExperienceProps {\r\n /** The experience name. */\r\n experienceName?: string;\r\n\r\n /** Custom Field per experience when sending beacon to Cosmos. */\r\n customField?: string;\r\n\r\n /** Request specific context */\r\n requestContext?: IRequestContext;\r\n\r\n /**\r\n * Handler function for Experience Milestone timing updates\r\n */\r\n onExperienceMilestoneTimingUpdate?: ExperienceMilestoneTimingUpdate;\r\n\r\n /**\r\n * boolean to indicate if experience is stale\r\n */\r\n isStale?: boolean;\r\n}\r\n\r\n/**\r\n * Helper to spread the default values for common experience props to all handled props fields.\r\n */\r\nexport const InitialCommonExperienceProps = {\r\n experienceName: undefined,\r\n customField: undefined,\r\n requestContext: undefined,\r\n onExperienceMilestoneTimingUpdate: undefined,\r\n isStale: undefined\r\n};\r\n\r\n/**\r\n * TODO: This class may need to be sampled collecting and sending Perf timings if the traffic goes beyond a certain reach.\r\n * Assessment will be performed later after analyzing the data.\r\n */\r\nexport class BaseExperience extends Foundation {\r\n /** Perf marker for tracking Visually Reading timing */\r\n protected visuallyReadyTracker: PerfTracker = new PerfTracker();\r\n\r\n protected componentRef: any;\r\n\r\n /** Perf marker for tracking Initialization timing */\r\n protected initializedTracker: PerfTracker = new PerfTracker();\r\n\r\n /** Perf marker for tracking DomComplete timing */\r\n protected domCompleteTracker: PerfTracker = new PerfTracker();\r\n\r\n /** boolean to indicate if stale state has been revalidated */\r\n private isStaleRevalidated = false;\r\n\r\n /**\r\n * The constructor.\r\n * @param props - The props\r\n * @param context - The context\r\n */\r\n constructor(props: H & U & CommonExperienceProps & FoundationProps, context?: any) {\r\n super(props);\r\n\r\n this.startInitializeMilestone();\r\n this.startVisuallyReadyMilestone();\r\n this.startDomCompleteMilestone();\r\n\r\n // This tracks the # of experiences that got instantiated on the page before TTVR marker happens.\r\n this.incrementExpCount(\"\");\r\n }\r\n\r\n /**\r\n * Default react hook.\r\n */\r\n public componentDidMount(): void {\r\n // End the domComplete milestone\r\n this.endDomCompleteMilestone();\r\n }\r\n\r\n /**\r\n * Default react hook.\r\n *\r\n * note: don't delete it, as it has different arity than the original react hook, and some components call it\r\n * with arity=0\r\n *\r\n * @param prevProps - previous component props\r\n * @param prevState - previous component state\r\n * @param snapshot - \"snapshot\" returned by getSnapshotBeforeUpdate() in React life cycle\r\n */\r\n public componentDidUpdate(\r\n prevProps: Readonly = undefined,\r\n prevState: Readonly = undefined,\r\n snapshot: any = undefined\r\n ): void {\r\n\r\n // End the domComplete milestone\r\n this.endDomCompleteMilestone();\r\n\r\n // complete stale revalidation\r\n this.completeStaleRevalidation();\r\n }\r\n\r\n /**\r\n * Default render function\r\n *\r\n * note: don't delete it, even if empty, as a bunch of code calls super.render()\r\n */\r\n public render(): any {\r\n if (canUseDOM()) {\r\n const needsHydrateLogString: string = \"\" + window.needsHydrate;\r\n logger.log(`Rendering ${(this.props as CommonExperienceProps).experienceName}. needsHydrate: ${needsHydrateLogString}`);\r\n }\r\n\r\n // End the initialized milestone, and start the domComplete milestone\r\n this.endInitializeMilestone();\r\n this.startDomCompleteMilestone();\r\n\r\n // This tracks the # of times all experiences on the page render before TTVR marker happens.\r\n this.incrementExpCount(\"Render\");\r\n }\r\n\r\n /**\r\n * Marks the Time To Visually Ready and optionally mark perf ttvr for telemetry.\r\n * @param shouldMarkTelemetryTtvr - Flag to opt out from from telemetry ttvr marker\r\n * @param time - Optional ttvr marker value, default value is current time\r\n * @param aliasName - Optional alias for TTVR marker name, default is no alias\r\n */\r\n public markTimeToVisuallyReady(shouldMarkTelemetryTtvr: boolean, time?: number, aliasName?: string): void {\r\n if (shouldMarkTelemetryTtvr) {\r\n if (time == undefined) {\r\n time = window.performance.now();\r\n }\r\n markTtvr(this.props.experienceName, false, time);\r\n if (aliasName) {\r\n markTtvr(aliasName, false, time);\r\n }\r\n }\r\n\r\n this.endVisuallyReadyMilestone();\r\n }\r\n\r\n /**\r\n * Mark perf ttf for telemetry.\r\n * @param aliasName - Optional alias for TTF marker name\r\n */\r\n public markTimeToFunctional(aliasName?: string): void {\r\n const t = window.performance.now();\r\n markTtf((this.props as CommonExperienceProps).experienceName, false, t);\r\n if (aliasName) {\r\n markTtf(aliasName, false, t);\r\n }\r\n }\r\n\r\n /**\r\n * Generate attributes for the mnsDashboard\r\n */\r\n protected mnsDashAttributes(): MnsCreatorDashboardAttributes {\r\n if (appEnvironment.ShowMnsCreatorDashboard) {\r\n const msnCreatorDashAttributes = {\r\n \"data-config-href\": this.props[\"data-config-href\"],\r\n \"data-experience-type\": this.props[\"data-experience-type\"]\r\n };\r\n return msnCreatorDashAttributes;\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n /** Start the initialized perf timer, and mark the Initialized milestone start time */\r\n protected startInitializeMilestone(): void {\r\n this.initializedTracker.setStart();\r\n this.updateStartTiming(this.initializedTracker, ExperienceMilestoneEventTypes.initialized);\r\n }\r\n\r\n /** End the initialized perf timer, and mark the Initialized milestone end time */\r\n protected endInitializeMilestone(): void {\r\n this.updateEndTiming(this.initializedTracker, ExperienceMilestoneEventTypes.initialized);\r\n }\r\n\r\n /** Start the Visually Reader perf timer, and mark the VisuallyReady milestone start time */\r\n protected startVisuallyReadyMilestone(): void {\r\n this.updateStartTiming(this.visuallyReadyTracker, ExperienceMilestoneEventTypes.visuallyReady);\r\n }\r\n\r\n /** Complete Stale Revalidation */\r\n protected completeStaleRevalidation(): void {\r\n const { isStale } = this.props;\r\n if (isStale && !this.isStaleRevalidated) {\r\n this.isStaleRevalidated = true;\r\n this.markTimeToRevalidateStaleState();\r\n\r\n const { onExperienceMilestoneTimingUpdate } = this.props;\r\n if (onExperienceMilestoneTimingUpdate) {\r\n onExperienceMilestoneTimingUpdate(ExperienceMilestoneEventTypes.staleRevalidationComplete);\r\n }\r\n }\r\n }\r\n\r\n /** End the Visually Reader perf timer, and mark the VisuallyReady milestone end time */\r\n protected endVisuallyReadyMilestone(): void {\r\n this.updateEndTiming(this.visuallyReadyTracker, ExperienceMilestoneEventTypes.visuallyReady);\r\n }\r\n\r\n /** Start the DomComplete perf timer, and mark the DomComplete milestone start time */\r\n protected startDomCompleteMilestone(): void {\r\n this.updateStartTiming(this.domCompleteTracker, ExperienceMilestoneEventTypes.domComplete);\r\n }\r\n\r\n /** End the DomComplete perf timer, and mark the DomComplete milestone end time */\r\n protected endDomCompleteMilestone(): void {\r\n this.updateEndTiming(this.domCompleteTracker, ExperienceMilestoneEventTypes.domComplete);\r\n }\r\n\r\n /**\r\n * Mark perf pageReveal ttvr\r\n * @param aliasName - Optional alias for TTF marker name\r\n */\r\n private markTimeToRevalidateStaleState(shouldMarkPageReveal = true): void {\r\n if (shouldMarkPageReveal) {\r\n markTtprRaf(this.props.experienceName);\r\n }\r\n }\r\n\r\n /**\r\n * Helper to update the start timing for a given tracker & event type\r\n * @param tracker - the {PerfTracker} to update the start time\r\n * @param eventType - the milestone event type\r\n */\r\n private updateStartTiming(tracker: PerfTracker, eventType: ExperienceMilestoneEventTypes): void {\r\n\r\n tracker.setStart();\r\n\r\n const { onExperienceMilestoneTimingUpdate } = this.props;\r\n if (onExperienceMilestoneTimingUpdate) {\r\n onExperienceMilestoneTimingUpdate(eventType, tracker.getStart());\r\n }\r\n }\r\n\r\n /**\r\n * Helper to update end timing for a given tracker & event type\r\n * @param tracker - the {PerfTracker} to update the start time\r\n * @param eventType - the milestone event type\r\n */\r\n private updateEndTiming(tracker: PerfTracker, eventType: ExperienceMilestoneEventTypes): void {\r\n\r\n if (tracker.getEnd() !== -1) {\r\n return;\r\n }\r\n\r\n tracker.setEnd();\r\n\r\n const { onExperienceMilestoneTimingUpdate } = this.props;\r\n if (onExperienceMilestoneTimingUpdate) {\r\n onExperienceMilestoneTimingUpdate(eventType, undefined, tracker.getEnd());\r\n }\r\n }\r\n\r\n /**\r\n * Helper to increment render counter statistics on the _pageTimings object for a given marker name\r\n * Note that if the `renderCounterPrefix` static property is present on the Experience's component class,\r\n * this method will update the render counters for that custom counter name as well.\r\n * @param markerPrefix - the prefix of the marker to increment.\r\n */\r\n protected incrementExpCount(markerPrefix: string): void {\r\n\r\n // prevent counting in post-TTVR scenarios\r\n if (!pageTimings || pageTimings[\"TTVR\"]) {\r\n return;\r\n }\r\n\r\n incrementCounter(`Exp.${markerPrefix}Count`);\r\n\r\n const renderCounterPrefix = (this.constructor as unknown as ExperienceStaticConstructor).renderCounterPrefix;\r\n if (renderCounterPrefix) {\r\n incrementCounter(`Exp.${renderCounterPrefix}${markerPrefix}Count`);\r\n }\r\n }\r\n\r\n /**\r\n * Helper to add masking props for clarity.microsoft.com analytics tool\r\n * for elements containing personally identifiable info\r\n */\r\n protected clarityProps(): Object {\r\n\r\n // only add clarity mask props if clarity script is enabled and user is not signed in and there is no cookie wall banner\r\n if (appEnvironment.ClarityEnabled && !headData.UserIsSignedIn && !headData.ClientSettings.functionalonly_cookie_experience) {\r\n return {\r\n \"data-clarity-mask\": true\r\n };\r\n }\r\n return {};\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { expPersistentDataChangeTrackerKey, forceReloadFlagName } from \"./PageLifecycleConstants\";\r\nimport { headData, getLocalStorage } from \"@msnews/core\";\r\n\r\nimport { PageInvalidationReasons } from \"./PageInvalidationReasons\";\r\nimport { getCurrentPerformanceTimeStamp } from \"./PrerenderActionHelpers\";\r\n\r\n/** Type for storing experiences with persistent data updates */\r\nexport type ExpWithPersistentDataUpdate = { [expType: string]: number };\r\n\r\n/**\r\n * return true if prerendered page is visible else false\r\n * @param expType - experience identifier\r\n */\r\nexport function hasExperiencePersistentDataUpdated(expType: string): boolean {\r\n if (headData.IsPrerender && document.visibilityState === \"visible\") {\r\n const storedExperiences = getLocalStorage().getObject(expPersistentDataChangeTrackerKey) || {};\r\n\r\n const timeStamp = storedExperiences[expType];\r\n if (!isNaN(timeStamp)) {\r\n delete storedExperiences[expType];\r\n getLocalStorage().setObject(expPersistentDataChangeTrackerKey, storedExperiences);\r\n\r\n if (timeStamp > performance.timing.navigationStart) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * update local storage to track experiences with updated persistent data/settings\r\n * @param expType - experience identifier\r\n */\r\nexport function trackExpWithPersistentDataUpdate(expType: string): void {\r\n const storedExperiences = getLocalStorage().getObject(expPersistentDataChangeTrackerKey) || {};\r\n const timeStamp = storedExperiences[expType];\r\n\r\n if (isNaN(timeStamp)) {\r\n storedExperiences[expType] = getCurrentPerformanceTimeStamp();\r\n getLocalStorage().setObject(expPersistentDataChangeTrackerKey, storedExperiences);\r\n }\r\n}\r\n\r\n/**\r\n * Track page invalidation, marks page to be reloaded on reveal.\r\n * @param expType - experience identifier\r\n */\r\nexport function trackPageInvalidation(invalidationReason: PageInvalidationReasons): void {\r\n // Write to local storage, current timestamp and invalidation requested reason\r\n getLocalStorage().setItem(forceReloadFlagName, JSON.stringify({ time: getCurrentPerformanceTimeStamp(), data: invalidationReason }));\r\n}","\r\n// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Defines the different reasons why the hidden page should be reloaded on reveal\r\n */\r\nexport enum PageInvalidationReasons {\r\n MuidChange = 1,\r\n MarketChange = 2,\r\n InterestsChange = 3,\r\n PivotSwitch = 4\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { requireAsync } from \"./RequireAsync\";\r\n\r\n/**\r\n * Integration function to retrieve the prime track object.\r\n *\r\n * @export\r\n * @return {Promise} - Resolves if the track object could be loaded, rejects otherwise.\r\n */\r\nexport const getTrack: IGetTrack = () => {\r\n return requireAsync(\"track\");\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError } from \"@msnews/diagnostics\";\r\nimport { getElementTrackingDecorator } from \"./PrimeElementTrackingDecorator\";\r\nimport { getTrack } from \"./PrimeTrack\";\r\nimport { getTrackExtCompleteCanary } from \"./PrimeTrackExtensionComplete\";\r\nimport { getTrackInfo } from \"./PrimeTrackInfo\";\r\n\r\ntype trackingEventCall = {event: Event, element: HTMLElement, destination: string, headline: string};\r\ntype trackPartialImpression = {elem?: HTMLElement, visibilityCheck?: boolean, mechanism?: TrackMechanism, topLevelContainerType?: string};\r\ntype trackingDecoratorCall = {elementTree: HTMLElement, parentElement?: HTMLElement, options?: any, disableImpressionUpdate?: boolean};\r\n\r\nlet trackingResolved = false;\r\nlet trackingObject: PrimeGlobal.ITrack = null;\r\nlet elementTrackingDecorator: PrimeGlobal.IElementTrackingDecorator = null;\r\nlet trackExtCompleted: any = null;\r\nlet trackEventBuffer: trackingEventCall[] = [];\r\nlet trackImpressionBuffer: trackPartialImpression[] = [];\r\nlet trackAppErrorEventBuffer: AppError[] = [];\r\nlet elementTrackingDecoratorBuffer: trackingDecoratorCall[] = [];\r\nlet trackingPromiseCalled = false;\r\n\r\n// Following code is to decouple Prime dependency from initial state of experience. Once tracking is ported to Peregrine, it would not be needed.\r\n/**\r\n * Sets the tracking attributes on the given element(s) (e.g. data-m={'i':10, 'o':6, 'p':2} data-id=10)\r\n * If any elements contain 'i', 'i' will not change.\r\n * Ordinal and parent will sync to correct values for each element.\r\n * Will send an impression update for the new elements when called.\r\n * @param {HTMLElement} elementTree The complete element tree to decorate\r\n * @param {HTMLElement} parentElement The parent of the given element(s)\r\n * @param {any} options The settings for this call.\r\n * options.defaults [optional] default attributes for any particular object as a JS TelemetryItem object.\r\n * options.elementOverride [Optional] A callback in the form of (element, trackingAttributes) =&rt;void.\r\n * The callback can be used to alter or change any of the attributes before they are applied onto the element.\r\n * options.visibilityCheck [Optional] Flag indicating whether element visibility checking should be performed or not. By default is true.\r\n * options.selector [Optional] The selector to use for determining elements to instrument.\r\n * @param {boolean} disableImpressionUpdate Send impression update only when it is not disabled, by default it is false\r\n * @HTMLElement\r\n */\r\nfunction setTrackingForSingleElement(elementTree: HTMLElement, parentElement?: HTMLElement, options?: any, disableImpressionUpdate?: boolean): HTMLElement {\r\n return elementTrackingDecorator.setTrackingForSingleElement(elementTree, parentElement, options, disableImpressionUpdate);\r\n}\r\n\r\n// Following code is to decouple Prime dependency from initial state of experience. Once tracking is ported to Peregrine, it would not be needed.\r\n/**\r\n * Send the tracking call\r\n * @param {Event} event event object\r\n * @param {HTMLElement} element form code\r\n * @param {string} destination text\r\n * @param {string} headline text\r\n * @void\r\n */\r\nfunction sendTrackingCall(event: Event, element: HTMLElement, destination: string, headline: string): void {\r\n trackingObject.trackEvent(event, element, destination, headline);\r\n}\r\n\r\n/**\r\n * Makes the partial page request\r\n * @param {HTMLElement} elem object\r\n * @param {boolean} visibilityCheck\r\n * @param {TrackMechanism} mechanism\r\n * @param {string} topLevelContainerType\r\n * @void\r\n */\r\nfunction sendPartialPageRequest(elem?: HTMLElement, visibilityCheck?: boolean, mechanism?: TrackMechanism, topLevelContainerType?: string): void {\r\n trackingObject.trackPartialImpression(elem, visibilityCheck, mechanism, topLevelContainerType);\r\n}\r\n\r\n/**\r\n * Converts the AppError object to the Prime AppError type and make the trackAppErrorEvent call\r\n * @param appError - App error object\r\n */\r\nfunction sendTrackAppErrorEvent(appError: AppError): void {\r\n trackingObject.trackAppErrorEvent({ errId: appError.id, errSource: appError.source, errMsg: appError.message });\r\n}\r\n\r\n/**\r\n * Processes the pending tracking and page impresssion calls for statics.\r\n * Dependencies: getTrack(), getTrackExtCompleteCanary(), getElementTrackingDecorator()\r\n * @void\r\n */\r\nfunction processPendingTrackingCall(): void {\r\n Promise.all([getTrack(), getTrackExtCompleteCanary(), getElementTrackingDecorator()])\r\n .then(modules => {\r\n [trackingObject, trackExtCompleted, elementTrackingDecorator] = modules;\r\n\r\n // at this point we will process any pending requests and resolve tracking\r\n trackingResolved = true;\r\n if (trackEventBuffer.length > 0) {\r\n trackEventBuffer.forEach(eventObj => {\r\n try {\r\n sendTrackingCall(eventObj.event, eventObj.element, eventObj.destination, eventObj.headline);\r\n } catch {\r\n // This catch block is meant to continue to next element in the loop.\r\n // We may remove this in future once Error Boundaries are added.\r\n }\r\n });\r\n\r\n // empty it again after processing\r\n trackEventBuffer = [];\r\n }\r\n\r\n if (trackImpressionBuffer.length > 0) {\r\n trackImpressionBuffer.forEach(eventObj => {\r\n sendPartialPageRequest(eventObj.elem, eventObj.visibilityCheck, eventObj.mechanism, eventObj.topLevelContainerType);\r\n });\r\n\r\n // empty it again after processing\r\n trackImpressionBuffer = [];\r\n }\r\n\r\n if (trackAppErrorEventBuffer.length > 0) {\r\n trackAppErrorEventBuffer.forEach(appError => {\r\n sendTrackAppErrorEvent(appError);\r\n });\r\n\r\n // empty it again after processing\r\n trackAppErrorEventBuffer = [];\r\n }\r\n\r\n if (elementTrackingDecoratorBuffer.length > 0) {\r\n elementTrackingDecoratorBuffer.forEach(decorator => {\r\n const {elementTree, parentElement, options, disableImpressionUpdate} = decorator;\r\n setTrackingForSingleElement(elementTree, parentElement, options, disableImpressionUpdate);\r\n });\r\n\r\n // empty it again after processing\r\n elementTrackingDecoratorBuffer = [];\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Callback function to pass to experience. It maintains an internal array to hold track calls until dependencies resolved.\r\n * @param {HTMLElement} element form code\r\n * @param {string} action (Type of action. Necessary to make it compatible with 1DS Telemetry SDK)\r\n * @param {number} behavior (Type of beavior. Necessary to make it compatible with 1DS Telemetry SDK)\r\n * @param {Event} event event object\r\n * @param {string} destination text\r\n * @param {string} headline text\r\n * @void\r\n */\r\nexport function handleTelemetryCall(element: HTMLElement, action?: string, behavior?: number, event?: Event, destination?: string, headline?: string): void {\r\n if (trackingResolved) {\r\n sendTrackingCall(event, element, destination, headline);\r\n } else {\r\n trackEventBuffer.push({ event: event, element: element, destination: destination, headline: headline });\r\n\r\n if (!trackingPromiseCalled) {\r\n trackingPromiseCalled = true;\r\n\r\n // only want to call this once\r\n processPendingTrackingCall();\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Makes the partial page request\r\n * @param {HTMLElement} elem object\r\n * @param {} viewType (Necessary to make it compatible with 1DS Telemetry SDK)\r\n * @param {boolean} visibilityCheck\r\n * @param {TrackMechanism} mechanism\r\n * @param {string} topLevelContainerType\r\n * @void\r\n */\r\nexport function handlePartialPageImpressionCall(elem?: HTMLElement, viewType?, visibilityCheck?: boolean, mechanism?: TrackMechanism, topLevelContainerType?: string): void {\r\n if (trackingResolved) {\r\n sendPartialPageRequest(elem, visibilityCheck, mechanism, topLevelContainerType);\r\n } else {\r\n trackImpressionBuffer.push({ elem: elem, visibilityCheck: visibilityCheck, mechanism: mechanism, topLevelContainerType: topLevelContainerType });\r\n\r\n if (!trackingPromiseCalled) {\r\n trackingPromiseCalled = true;\r\n\r\n // only want to call this once\r\n processPendingTrackingCall();\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Handler to log app errors\r\n * @param appError - App error object\r\n * @void\r\n */\r\nexport function handleAppErrorEventCall(appError: AppError): void {\r\n if (trackingResolved) {\r\n sendTrackAppErrorEvent(appError);\r\n } else {\r\n trackAppErrorEventBuffer.push({ ...appError });\r\n if (!trackingPromiseCalled) {\r\n trackingPromiseCalled = true;\r\n\r\n // only want to call this once\r\n processPendingTrackingCall();\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Decorates prime telemetry tags\r\n * @param decorator - Decorator object\r\n * @void\r\n */\r\nexport function handleSetTrackingAttrs(elementTree: HTMLElement, parentElement?: HTMLElement, options?: any, disableImpressionUpdate?: boolean): void {\r\n if (trackingResolved) {\r\n setTrackingForSingleElement(elementTree, parentElement, options, disableImpressionUpdate);\r\n } else {\r\n elementTrackingDecoratorBuffer.push({ elementTree, parentElement, options, disableImpressionUpdate });\r\n if (!trackingPromiseCalled) {\r\n trackingPromiseCalled = true;\r\n\r\n // only want to call this once\r\n processPendingTrackingCall();\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { requireAsync } from \"./RequireAsync\";\r\n\r\n/**\r\n * Integration function to wait on track extension complete canary.\r\n *\r\n * @export\r\n * @return {Promise} - Resolves if track extension canary is define, rejects otherwise.\r\n */\r\nexport const getTrackExtCompleteCanary: IGetTrackExtComplete = () => {\r\n return requireAsync(\"c.trackExtComplete\");\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { requireAsync } from \"./RequireAsync\";\r\n\r\n/**\r\n * Integration function to retrieve the prime track object.\r\n *\r\n * @export\r\n * @return {Promise} - Resolves if the track object could be loaded, rejects otherwise.\r\n */\r\nexport const getElementTrackingDecorator: IGetElementTrackingDecorator = () => {\r\n return requireAsync(\"elementTrackingDecorator\");\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ObjectTelemetryContract, TelemetryAttrName, TelemetryMetadataAttribute, TelemetryObjectBase, TrackingOptions } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { TelemetryContractCoverter } from \"./TelemetryContractCoverter\";\r\n\r\n/**\r\n * Object metadata class which combination of external contract and internal data\r\n * @class TelemetryObject\r\n */\r\nexport class TelemetryObject implements TelemetryObjectBase {\r\n // #region Public properties\r\n /**\r\n * External object contract.\r\n */\r\n public contract: ObjectTelemetryContract;\r\n // #endregion\r\n\r\n constructor(contract: ObjectTelemetryContract, parent?: TelemetryObject, isRoot?: boolean) {\r\n this.contract = contract;\r\n }\r\n\r\n /**\r\n * Render telemetry attribute.\r\n * @param contract Object contract.\r\n * @returns Telemetry attribute.\r\n */\r\n public static render(contract: ObjectTelemetryContract): any {\r\n const attr = TelemetryContractCoverter.compress(contract);\r\n return { [TelemetryAttrName]: JSON.stringify(attr) };\r\n }\r\n\r\n // #region Public functions\r\n /**\r\n * Add a new telemetry object as a child.\r\n * @param contract Object telemetry contract.\r\n * @returns New telemetry object.\r\n */\r\n public addChild(contract: ObjectTelemetryContract): TelemetryObject {\r\n return new TelemetryObject(contract, this);\r\n }\r\n\r\n /**\r\n * Add or update a child telemetry object.\r\n * @param contract Object telemetry contract.\r\n * @param savedChildObject Existing child telemetry object (if exist).\r\n * @returns New telemetry object.\r\n */\r\n public addOrUpdateChild(contract: ObjectTelemetryContract, savedChildObject?: TelemetryObject): TelemetryObject {\r\n if (savedChildObject) {\r\n savedChildObject.contract = contract;\r\n return savedChildObject;\r\n } else {\r\n return new TelemetryObject(contract, this);\r\n }\r\n }\r\n\r\n /**\r\n * Update telemetry contract.\r\n * @param contract Object contract.\r\n */\r\n public updateContract(contract: ObjectTelemetryContract): void {\r\n this.contract = contract;\r\n }\r\n\r\n /**\r\n * Render telemetry attribute.\r\n * @param option Tracking options.\r\n * @returns Telemetry attribute.\r\n */\r\n public render(option?: TrackingOptions): any {\r\n return TelemetryObject.render(this.contract);\r\n }\r\n\r\n /**\r\n * Produces a string version of the telemetry object's metadata\r\n * @returns Stringified json telemetry object\r\n */\r\n public getMetadataTag(): string {\r\n return JSON.stringify(this.getMetadata());\r\n }\r\n\r\n /**\r\n * Produces a string version of the telemetry object's metadata\r\n * @returns Stringified json telemetry object\r\n */\r\n public getMetadata(): TelemetryMetadataAttribute {\r\n return TelemetryContractCoverter.compress(this.contract);\r\n }\r\n // #endregion\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Mediator events\r\n * @export\r\n * @type {object}\r\n */\r\nexport const MediatorEventNames = {\r\n // Event fired when content actions attributes are updated (eg: new video is loaded)\r\n ContentActionsUpdated: \"contentActionsUpdated\",\r\n // Event fired when a feed is successfully followed\r\n FeedFollowed: \"feedFollowed\",\r\n // Event fired when a feed is successfully followed/un-followed to let pre-load\r\n // framework know it needs to refresh the page\r\n ForcePageReload: \"forcePageReload\",\r\n // Event fired when a feed is successfully followed/un-followed\r\n FollowedTopicsUpdated: \"followedTopicsUpdated\",\r\n // Event to fire to show a specific mediated coach mark\r\n MediatedCoachMark: \"mediated_coach_mark\",\r\n // Event fired by Prime when the tab is being changed\r\n TabNavigation: \"tab_navigation\",\r\n // Event that tells Prime feedsNav module to navigate to the specified URL\r\n TabNavigateTo: \"tab_navigate_to\",\r\n // Event fired when a topic is followed/unfollowed so SPA can re-act\r\n TopicAction: \"topic_action\",\r\n // Event fired when a 360 experience is launched\r\n Msn360: \"msn360\",\r\n // Event to fire to show card action menu\r\n CardActionInit: \"cardActionInit\",\r\n // Event to fire to post card action menu\r\n CardActionPost: \"cardActionPostEvent\",\r\n // Event to fire when interests render complete\r\n InterestsRenderComplete: \"interestsRenderCompleteEvent\",\r\n // Event to fire when an Xfeed needs to load\r\n RenderXFeed: \"show_xfeed_content\",\r\n // Event to fire when a pivot needs to load by id\r\n ShowPivotById: \"show_pivot_by_id\",\r\n // Event that tells Prime infopane module to resume the auto-rotation\r\n ResumeInfopaneAutoRotate: \"resumeInfopaneAutoRotate\",\r\n // Event fired when social actions attributes are updated (eg: new video is loaded)\r\n SocialActionsUpdated: \"socialActionsUpdated\"\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { requireAsync } from \"./RequireAsync\";\r\n\r\n/**\r\n * Integration function to retrieve the prime mediator object.\r\n *\r\n * @export\r\n * @return {Promise} - Resolves with the mediator if it could be loaded, rejects otherwise.\r\n */\r\nexport const getMediator: IGetMediator = () => {\r\n return requireAsync(\"mediator\");\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/// \r\n\r\nimport { MockLRUCache } from \"./ServerCacheMock\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * Clustered cache.\r\n * @type {LRUCache}\r\n */\r\nlet serverCache: LRUCache;\r\n\r\n/**\r\n * Initializes the serverCache with the LRUCache instance provided by the Render Service.\r\n * For testing it is initialized with a mock instance.\r\n * This needs to be called once on the server side.\r\n * @param cache\r\n */\r\nfunction initialize(cache: LRUCache): void {\r\n serverCache = cache;\r\n}\r\n\r\n/**\r\n * Reset the serverCache, clearing all data from the cache.\r\n * Currently only used for unit tests.\r\n * @returns {ServerCache}\r\n */\r\nasync function reset(): Promise {\r\n await serverCache.reset();\r\n}\r\n\r\n/**\r\n * Set cache. Update the \"recently used\"-ness of the key.\r\n * @param key Cache key to set.\r\n * @param value Cache value to set.\r\n * @param maxAge Optional maximum age in milliseconds.\r\n */\r\nasync function set(key: string, value: any, maxAge?: number): Promise {\r\n await serverCache.set(key, value, maxAge);\r\n}\r\n\r\n/**\r\n * Get cache. Update the \"recently used\"-ness of the key.\r\n * @param key Cache key to get.\r\n * @returns Cached object. If not found, return undefined.\r\n */\r\nasync function get(key: string): Promise {\r\n return await serverCache.get(key);\r\n}\r\n\r\n/**\r\n * Check if a key is in the cache, without updating the recent-ness or deleting it for being stale.\r\n * @param key Cache key to check.\r\n * @returns True if key exists.\r\n */\r\nasync function has(key: string): Promise {\r\n return await serverCache.has(key);\r\n}\r\n\r\n/**\r\n * Removes a value from the cache.\r\n * @param key Cache key to delete.\r\n * @returns Promise for completing the task\r\n */\r\nasync function del(key: string): Promise {\r\n return await serverCache.del(key);\r\n}\r\n\r\n/**\r\n * Return total quantity of objects currently in cache. Note, that stale (see options) items are returned as part of this item count.\r\n * @returns Total quantity of objects currently in cache.\r\n */\r\nasync function itemCount(): Promise {\r\n return await serverCache.itemCount();\r\n}\r\n\r\n/**\r\n * ServerCache is server side only data cache.\r\n * More detailed docs are in the following links\r\n * https://github.com/isaacs/node-lru-cache#readme\r\n * https://github.com/doublesharp/lru-cache-for-clusters-as-promised\r\n */\r\nexport const ServerCache = (!canUseDOM()) ? {\r\n initialize,\r\n reset,\r\n set,\r\n get,\r\n has,\r\n del,\r\n itemCount\r\n} : null;\r\n\r\n// Initialize ServerCache using mock cache for tests, we do it here so it works for relative imports\r\nif (global[\"TEST_ENV\"] && !canUseDOM()) {\r\n // MockLRUCache implements only a subset of LRUCache; it implements only the functions currently being used.\r\n // This was simply to avoid exhaustively reimplementing the whole API.\r\n // If more functions are utilized from the API a mock implmenting will need provided for in the MockServerCache class.\r\n // @ts-ignore\r\n ServerCache.initialize(new MockLRUCache());\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { WpoModel } from \".\";\r\nimport { ITargetScope } from \"cms-models-msn/configuration/ITargetScope\";\r\n\r\n/**\r\n * Get storage cache key used to store WPO service response.\r\n * @param {string} appType - The appType value.\r\n * @param {ITargetScope} targetScope - The current page request target scope.\r\n * @returns string - Cache key string.\r\n */\r\nexport function getWpoStorageCacheKey(appType: string, targetScope: ITargetScope): string {\r\n const { audienceMode = \"\", locale = {}, pageType = \"\" } = targetScope || {};\r\n const { language, market } = locale;\r\n\r\n return `wpo_data_ ${audienceMode}_${language}_${market}_${pageType}_${appType}`;\r\n}\r\n\r\n/**\r\n * Extracts the WPO flight ids from the WPOModel object.\r\n * @param {WpoModel} wpoData - The WPOModel object.\r\n * @returns string[] - Array of WPO recommended flight ids\r\n */\r\nexport function getWpoFlights(wpoData: WpoModel): string[] | null {\r\n if (!wpoData || !wpoData.treatments) {\r\n return null;\r\n }\r\n\r\n return wpoData.treatments.map(item => item.id);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Converts the given error object to its string representation based on\r\n * the type of the input object.\r\n * @param error - the error object to convert to a string.\r\n * @param tryIncludeErrorStack - If true, will try to get the stack of the error\r\n * if the error is an actual Error object that has a stack.\r\n * @returns {string} - The string representation of the error.\r\n */\r\nexport function stringifyError(error: string | object | Error, tryIncludeErrorStack?: boolean): string {\r\n if (error instanceof Error) {\r\n const message = error.toString();\r\n return tryIncludeErrorStack && error.stack\r\n ? `${message}, Stack: ${error.stack}`\r\n : message;\r\n } else if (typeof error === \"string\") {\r\n return error;\r\n } else {\r\n return JSON.stringify(error);\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Peregrine flights with prefix\r\n */\r\nexport const PeregrineFlightPrefix = \"prg-\";\r\n\r\n/**\r\n * OneService flights with prefix\r\n */\r\nexport const OneServiceFlightPrefix = \"1s-\";\r\n\r\n/**\r\n * Config Service v3 endpoint\r\n */\r\nexport const CrsV3Endpoint = \"v3\";\r\n\r\n/**\r\n * Git configs indexedDB caching flight\r\n */\r\nexport const GitConfigsIndexedDbTreatment = \"prg-gitconfigs-t\";\r\n\r\n/**\r\n * Git configs flight prefix\r\n */\r\nexport const GitConfigsFlightPrefix = \"prg-gitcfgs-\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppType, CrsV3Endpoint, GitConfigsFlightPrefix, GitConfigsIndexedDbTreatment, OneServiceFlightPrefix, PeregrineFlightPrefix } from \"@msnews/experiences-constants\";\r\n\r\n/**\r\n * Git configs supported app types in lower case\r\n */\r\nexport const supportedAppTypes = [AppType.EdgeChromium, AppType.Windows, AppType.WindowsShell];\r\n\r\n/**\r\n * Goes through the array of flights that is given and will filter out any flight that doesn't start with\r\n * prg-. It then sorts them and returns a new string[].\r\n * @param flights Array of flights that we will filter through and return only the peregrine\r\n * @returns specific flights\r\n */\r\nexport function getPeregrineFlights(flights: string[]): string[] {\r\n if (!flights || flights.length === 0) {\r\n return flights;\r\n }\r\n\r\n const cleanedUpFlights = [];\r\n flights.forEach((item) => {\r\n const lowercaseItem = item.toLocaleLowerCase().trim();\r\n // Including specific 1s- prefix to bypass flightID regards OneService's bing.news backfill. Will fill bug to track/remove this.\r\n if (lowercaseItem.startsWith(PeregrineFlightPrefix) || lowercaseItem.startsWith(OneServiceFlightPrefix)) {\r\n cleanedUpFlights.push(lowercaseItem);\r\n }\r\n });\r\n\r\n return cleanedUpFlights.sort();\r\n}\r\n\r\n/**\r\n * Check if Git configs should be used\r\n * @param {string} version - CRS version. Example: v2 or v3 (case sensitive)\r\n * @param {string[]} flights Array of flights. Example: [\"testFlight\", \"prg-abcd\"]\r\n * @param {string} configIndexDocId. Example: cms/api/amp/experienceConfigIndex/BBUsYQa\r\n * @param {string} apptype. Example: edgeChromium\r\n * @returns true if git configs are supported\r\n */\r\nexport function shouldUseGitConfigs(version: string, flights: string[], configIndexDocId: string, apptype: string): boolean {\r\n // If app type is not defined or empty, do not use Git configs.\r\n // For local dev scenarion of individual experiences running in standalone, app type is blank.\r\n // Also app type is MUST param in Git configs, if app type is not present, we do not want to attempt Git configs too in prod.\r\n // If version is not present or it is not v3, do not support Git configs\r\n if (!apptype || !version || version !== CrsV3Endpoint) {\r\n return false;\r\n }\r\n\r\n // Use Git configs if app type is from specified array\r\n return supportedAppTypes.includes(apptype as AppType)\r\n // Return true if this is Git configs flight treatment\r\n || containsGitConfigsFlight(getPeregrineFlights(flights))\r\n // Return true if this does not have configIndexDocId\r\n || !configIndexDocId;\r\n}\r\n\r\n/**\r\n * Return true if flight is Git configs treatment by specific flight IDs\r\n * @param flights array\r\n */\r\nfunction containsGitConfigsFlight(flights: string[]): boolean {\r\n if (flights && flights.length > 0) {\r\n return flights.some((item) => item.startsWith(GitConfigsIndexedDbTreatment) || item.startsWith(GitConfigsFlightPrefix));\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n// TODO: This should be considered for moving it to the Interests experience wrapper, once that\r\n// code arrives, since this is specific to that experience\r\n\r\n/**\r\n * Subnav TabId Enum object\r\n * @export\r\n * @type {enum}\r\n */\r\nexport enum SubnavTabId {\r\n None = 0,\r\n MyFeed = 1,\r\n XFeed = 2,\r\n Interests = 3\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Helper functions for all internal logic.\r\n */\r\n\r\n/**\r\n * Timestamp Seed.\r\n * @var timestampSeed Seed used to random timestamp.\r\n */\r\nlet timestampSeed: number = new Date().getTime();\r\n\r\n/**\r\n * clientId value\r\n * @var clientIdValue MUID value from the first read.\r\n */\r\nlet clientIdValue: string;\r\n\r\n/**\r\n * session storage\r\n * @var sessionStorage session storage object.\r\n */\r\nexport let sessionStorage;\r\n\r\ntry {\r\n sessionStorage = \"sessionStorage\" in window && window.sessionStorage;\r\n} catch (ex) {\r\n // Getting session storage failed. Can happen in Chrome when user has disabled cookies.\r\n}\r\n\r\n/**\r\n * Generate a random timestamp-seeded hex digit.\r\n * @param c Source.\r\n * @returns A random timestamp-seeded hex digit.\r\n */\r\nfunction getDigit(c: any): any {\r\n const seededRandom = (timestampSeed + Math.random() * 16) % 16 | 0;\r\n\r\n // adjust the timestamp seed so that it changes for the first thirteen characters\r\n timestampSeed = Math.floor(timestampSeed / 16);\r\n\r\n // if the position is an \"x\", just use the random number. If it's a \"y\", we\r\n // we want to make sure the value is only the lowest three bits of the random\r\n // number, with a 1 in the 4-bit position. See RFC4122 for more info.\r\n return (c === \"x\" ? seededRandom : (seededRandom & 0x7 | 0x8)).toString(16);\r\n}\r\n\r\n/**\r\n * Generate guid.\r\n * @returns Guid.\r\n */\r\nexport function generateGuid(): string {\r\n // generate an additional random timestamp-base seed.\r\n // the Math.random function is itself seeded, but if two clients happen to have\r\n // seeded their random number generator with the same value, then they will generate\r\n // duplicate guids and collide. With this added timestamp seed, the first thirteen characters\r\n // will be adjusted by the timestamp of the call as well, so even if the clients' random number generated\r\n // are seeded with the same value, they would have to call this method at the EXACT same millisecond\r\n // to generate the same GUID. Probably not a very high probability.\r\n return \"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx\".replace(/[xy]/g, getDigit);\r\n}\r\n\r\n/**\r\n * Generate current time.\r\n * @returns Current datetime in number format.\r\n */\r\nexport function getCurrentTime(): number {\r\n return +(new Date());\r\n}\r\n\r\n/**\r\n * Append OCID to the url.\r\n * @param ocid OCID value.\r\n * @param url Url.\r\n * @returns Url with OCID.\r\n */\r\nexport function appendOcid(ocid: string, url: string): string {\r\n if (url && ocid) {\r\n const hasQueryString = url.indexOf(\"?\") >= 0;\r\n url = hasQueryString ? url + \"&\" : url + \"?\";\r\n url = url + \"ocid=\" + ocid;\r\n }\r\n\r\n return url;\r\n}\r\n\r\n/**\r\n * Get browser width.\r\n * @returns Browser width.\r\n */\r\nexport function getBrowserWidth(): number {\r\n return isBrowserEnv && (window.outerWidth || document.documentElement.clientWidth);\r\n}\r\n\r\n/**\r\n * Get browser height.\r\n * @returns Browser height.\r\n */\r\nexport function getBrowserHeight(): number {\r\n return isBrowserEnv && (window.outerHeight || document.documentElement.clientHeight);\r\n}\r\n\r\n/**\r\n * Get scroll offset.\r\n * @returns Scroll offset.\r\n */\r\nexport function getScrollOffset() {\r\n const scrollOff = (isBrowserEnv ? (window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop || 0) : 0);\r\n return scrollOff;\r\n}\r\n\r\n/**\r\n * Safe get.\r\n * @param object Source object.\r\n * @param getFunction Function.\r\n * @param defaultValue Default value if it fails.\r\n * @returns Evaluated value of unsafe function if there is no error. Otherwise, return default value.\r\n */\r\nexport function safeGet(object: T1, getFunction: (x: T1) => T2, defaultValue: any = undefined): T2 {\r\n try {\r\n return getFunction(object);\r\n } catch (error) {\r\n return defaultValue;\r\n }\r\n}\r\n\r\n/**\r\n * Get current absolute document height.\r\n * @returns Doc height.\r\n */\r\nexport function getDocHeight(): number {\r\n // All of these below cause reflow which has high perf implication.\r\n // TODO: Optimize.\r\n return isBrowserEnv && Math.max(\r\n document.body.scrollHeight || 0,\r\n document.documentElement.scrollHeight || 0,\r\n document.body.offsetHeight || 0,\r\n document.documentElement.offsetHeight || 0,\r\n document.body.clientHeight || 0,\r\n document.documentElement.clientHeight || 0\r\n );\r\n}\r\n\r\n/**\r\n * Get MUID cookie.\r\n * @returns MUID value.\r\n */\r\nexport function getMuid(): string {\r\n if (!isBrowserEnv) {\r\n return \"\";\r\n }\r\n const cookieName = \"MUID\";\r\n const re = new RegExp(\"\\\\b\" + cookieName + \"\\\\s*=\\\\s*([^;]*)\", \"i\");\r\n const match = re.exec(document.cookie);\r\n return (match && match.length > 1 ? match[1] : \"\");\r\n}\r\n\r\n/**\r\n * Get static MUID cookie from the first read (might happen before MUID sync).\r\n * @param fallback fallback value in case muid is not available at the time.\r\n * @returns clientId value\r\n */\r\nexport function getClientId(fallback: any): string {\r\n if (!clientIdValue && clientIdValue !== \"\") {\r\n clientIdValue = getMuid() || fallback || \"\";\r\n }\r\n\r\n return clientIdValue;\r\n}\r\n\r\n/**\r\n * Checks if the DOM is available to access and use.\r\n * True if DOM is available, or false if it is not. This is typically true for\r\n * client side rendering and false for server side rendering.\r\n */\r\nexport const isBrowserEnv = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\r\n\r\n/**\r\n * Get page url with ocid.\r\n * @param locationHref Current locationHref\r\n * @param ocid OCID.\r\n * @returns page url with ocid.\r\n */\r\nexport function getPageUrl(locationHref: string, ocid: string): string {\r\n return appendOcid(ocid, locationHref);\r\n}\r\n\r\n/**\r\n * Add ocid ocid on clicked article urls on the target element.\r\n * @param target target element.\r\n * @param ocid ocid value.\r\n */\r\nexport function addOcid(target: HTMLElement, ocid: string): void {\r\n if (!target || !ocid) {\r\n return;\r\n }\r\n\r\n let newTarget = target as HTMLAnchorElement;\r\n if (newTarget.nodeName !== \"a\" && newTarget.closest(\"a\")) {\r\n newTarget = newTarget.closest(\"a\");\r\n }\r\n\r\n if (!newTarget) {\r\n return;\r\n }\r\n\r\n const { href } = newTarget as HTMLAnchorElement;\r\n\r\n if (href) {\r\n try {\r\n const url = new URL(href); // Url constructor throws if an href is invalid.\r\n const currentOcid = url.searchParams.get(\"ocid\");\r\n if (!currentOcid && (url.host.includes(\"msn.com\") || url.host.includes(\"msn.cn\"))) {\r\n url.searchParams.set(\"ocid\", ocid);\r\n newTarget.href = url.href;\r\n }\r\n } catch {\r\n // Suppress the error\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Get headline from element\r\n * @param element target element.\r\n * @param headline overriding headline value.\r\n * @return a headline\r\n */\r\nexport function getHeadline(element: Element, headline = \"\") {\r\n if (!element) {\r\n return;\r\n }\r\n\r\n // TODO: clean up how we find a headline. Depending on the markup of the page leads to bugs when we update it.\r\n // find headline value if needed, one may have been passed in through a data-hl attribute.\r\n const dataHlValue = element.getAttribute(\"data-hl\") || \"\";\r\n if (!headline && !dataHlValue) {\r\n // See if there is an h4 or h3 element, no more than 2 deep.\r\n const headlineElement = element.querySelector(\"h4\") || element.querySelector(\"h3\");\r\n const depth = getDepth(element, headlineElement);\r\n if (headlineElement && depth && depth <= 2) {\r\n headline = getText(headlineElement);\r\n }\r\n }\r\n\r\n // find headline by fetching the value of title class element from anchor element if available.\r\n const titleElement = element instanceof HTMLAnchorElement ? element.querySelector(\".title\") : \"\";\r\n if (!headline && titleElement) {\r\n headline = getText(titleElement as HTMLElement);\r\n }\r\n\r\n const titleText = element instanceof HTMLAnchorElement ? element.getAttribute(\"title\") : \"\";\r\n if (!headline && titleText) {\r\n headline = titleText;\r\n }\r\n\r\n const ariaLable = element instanceof HTMLAnchorElement ? element.getAttribute(\"aria-lable\") : \"\";\r\n if (!headline && ariaLable) {\r\n headline = ariaLable;\r\n }\r\n\r\n if (typeof headline !== \"string\") {\r\n headline = dataHlValue || element.getAttribute(\"data-piitxt\") ||\r\n (\"FORM\" == element.nodeName ? \"[form submit]\" :\r\n element.getAttribute(\"title\") ||\r\n depthFirstChildAttribute(element, \"title\", \"img\") ||\r\n getText(element as HTMLElement) ||\r\n element.getAttribute(\"alt\") ||\r\n depthFirstChildAttribute(element, \"alt\") || \"\");\r\n }\r\n\r\n // Added condition to call trim function only if it is defined, it fails for browsers <=IE8\r\n if (headline.trim != undefined) {\r\n headline = headline.trim();\r\n }\r\n\r\n return headline;\r\n}\r\n\r\n/**\r\n * Get depth between parent and child\r\n * @param parent parent.\r\n * @param child child.\r\n * @return depth\r\n */\r\nexport function getDepth(parent: Element, child: Element, limitDepth = 2) {\r\n if (!child) {\r\n return;\r\n }\r\n\r\n let elem = child;\r\n let i = 0;\r\n for (; elem && elem !== parent; elem = elem.parentElement, i++) {\r\n if (i > limitDepth) {\r\n return;\r\n }\r\n }\r\n\r\n return i;\r\n}\r\n\r\n/**\r\n * Get text from element\r\n * @param elem target element.\r\n * @return text.\r\n */\r\nconst trimRegex = /(^\\s+)|(\\s+$)/mg;\r\nexport function getText(elem: HTMLElement) {\r\n return (elem && (elem.textContent || elem.innerText) || \"\").replace(trimRegex, \"\");\r\n}\r\n\r\n/**\r\n * Find the first attribute from the element in the depthFirst manner skips the element if it is specified in elementName\r\n * @param elem target element.\r\n * @param attributeName attribute name.\r\n * @param skipElement element that would like to skip.\r\n * @return attribute.\r\n */\r\nfunction depthFirstChildAttribute(element: Element, attributeName: string, skipElement = \"\") {\r\n const children = element.children || [];\r\n let ndx = 0;\r\n let altValue;\r\n\r\n attributeName = attributeName || \"alt\";\r\n\r\n for (; ndx < children.length; ndx++) {\r\n altValue = children[ndx].getAttribute(attributeName)\r\n || depthFirstChildAttribute(children[ndx], attributeName, skipElement);\r\n\r\n if (altValue && !(skipElement == children[ndx].localName)) {\r\n return altValue;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Find closest element based on selector.\r\n * @param elem target element.\r\n * @param selector css selector.\r\n * @return closest element.\r\n */\r\nexport function closestElement(element, selector) {\r\n if (!element || element === document || element === window) {\r\n return null;\r\n }\r\n\r\n // found the closest parent with the selector (data-t)\r\n const found = element.closest(selector);\r\n\r\n // if not found, meaning that between element and data-t parent has shadow root somewhere.\r\n // get shadow root and find closest again\r\n if (found) {\r\n return found;\r\n }\r\n\r\n const root = getRootNode(element);\r\n if (root && (root as any).host) {\r\n return closestElement((root as any).host, selector);\r\n }\r\n}\r\n\r\n// https://github.com/webcomponents/polyfills/blob/d152fd4b436f51c708845b04b9826123ce6d93f3/packages/formdata-event/ts_src/environment_api/node.ts\r\n/**\r\n * Get root node.\r\n * @param element target element.\r\n * @return root node of target element.\r\n */\r\nexport function getRootNode(element: Node): Node {\r\n if (element.parentNode) {\r\n return getRootNode(element.parentNode);\r\n }\r\n\r\n return element;\r\n}\r\n\r\n/**\r\n * Function to get all telemetry elements including the one under shadow roots/webcomponent.\r\n * @param elems element array.\r\n * @return telemetry elements in array.\r\n */\r\nexport function getAllTelemetryElements(root: Element): Element[] {\r\n const telemetryElements: Element[] = [];\r\n if (!root) {\r\n return;\r\n }\r\n\r\n let elems: NodeListOf;\r\n if (isShadowRoot(root)) {\r\n elems = root.shadowRoot.querySelectorAll(\"*\");\r\n } else {\r\n elems = root.querySelectorAll(\"*\");\r\n }\r\n\r\n getAllTelemetryElementsInternal(Array.from(elems), telemetryElements);\r\n return telemetryElements;\r\n}\r\n\r\n/**\r\n * Internal function to get all telemetry elements including the one under shadow roots/webcomponent.\r\n * @param elems element array.\r\n * @param telemetryElements output telemetry elements array.\r\n */\r\nfunction getAllTelemetryElementsInternal(elems: Element[], telemetryElements = []) {\r\n for (let i = 0; i < elems.length; i++) {\r\n const elem = elems[i];\r\n if (isTelemetryElement(elem)) {\r\n // If it annotated with telemetry tag, add to output array.\r\n telemetryElements.push(elem);\r\n }\r\n if (isShadowRoot(elem)) {\r\n // since shadow root is considered self encapsulation and events do not get bubbled up,\r\n // need to process all elements under shadow root\r\n getAllTelemetryElementsInternal(Array.from(elem.shadowRoot.querySelectorAll(\"*\")), telemetryElements);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Check whether element is shadow root or not.\r\n * @param elem element.\r\n * @returns true if it is shadow root.\r\n */\r\nexport function isShadowRoot(elem: Element): boolean {\r\n return !!elem.shadowRoot;\r\n}\r\n\r\n/**\r\n * Check whether element contains telemetry attribute.\r\n * @param elem element.\r\n * @returns true if it is telemetry element.\r\n */\r\nexport function isTelemetryElement(elem: Element): boolean {\r\n return elem.hasAttribute && elem.hasAttribute(\"data-t\");\r\n}\r\n\r\n/**\r\n * Check whether string is valid url.\r\n * @param urlString url string.\r\n * @returns true if it is valid url.\r\n */\r\nexport function isValidUrl(urlString: string) {\r\n try {\r\n new URL(urlString);\r\n } catch (_) {\r\n return false;\r\n }\r\n\r\n return true;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Card sizes based on a 300W * 50H virtual grid with zero gutter\r\n */\r\nexport enum CardSizes {\r\n /** value when no cards sizes are supported/configured */\r\n None = 0,\r\n\r\n /** Prime legacy 1u card */\r\n Size1Wx2H = 0x00000001,\r\n\r\n /** Spartan legacy half-height card */\r\n Size1Wx3H = 0x00000002,\r\n\r\n /** Prime legacy 2u card */\r\n Size1Wx4H = 0x00000004,\r\n\r\n /** Prime legacy 300x250 ad */\r\n Size1Wx5H = 0x00000008,\r\n\r\n /** Prime legacy 3u card, Spartan legacy full-height card (including 1 SD card) */\r\n Size1Wx6H = 0x00000010,\r\n\r\n /** Big Image Card 1-wide 2u-high in Unified Mobile Framework (UMF) design for 1 column */\r\n Size1Wx7H = 0x00000020,\r\n\r\n /** Reserved */\r\n Size1Wx8H = 0x00000040,\r\n\r\n /** Spartan legacy one-and-a-half-height card */\r\n Size1Wx9H = 0x00000080,\r\n\r\n /** Reserved */\r\n Size1Wx10H = 0x00000100,\r\n\r\n /** Spartan legacy double height (2 SD cards) */\r\n Size1Wx12H = 0x00000200,\r\n\r\n /** Spartan legacy triple height (3 SD cards) */\r\n Size1Wx18H = 0x00000400,\r\n\r\n /** Minimum CSS Grid Card Size 300x50 */\r\n Size1Wx1H = 0x00000800,\r\n // Reserved = 0x00004000,\r\n // Reserved = 0x00008000,\r\n\r\n /** Prime legacy 2-column banner */\r\n Size2Wx2H = 0x00010000,\r\n\r\n /** 2-column banner with 3-u height */\r\n Size2Wx3H = 0x00020000,\r\n\r\n /** Spartan legacy double-wide card (probably Prime info-pane as well) */\r\n Size2Wx6H = 0x00040000,\r\n\r\n /** Prime Homepage stripe double-wide card */\r\n Size2Wx8H = 0x00080000,\r\n\r\n /** Partner Widget Experience 2-wide 2u-high */\r\n Size2Wx12H = 0x00100000,\r\n\r\n /** Partner Widget Experience 2-wide 3u-high */\r\n Size2Wx18H = 0x00200000,\r\n\r\n /** Prime legacy 3-column banner */\r\n Size3Wx2H = 0x00400000,\r\n\r\n /** 3-column banner with 3-u height */\r\n Size3Wx3H = 0x80000000,\r\n\r\n /** Partner Widget Experience 3-wide 1u-high */\r\n Size3Wx6H = 0x00800000,\r\n\r\n /** Partner Widget Experience 3-wide 2u-high */\r\n Size3Wx12H = 0x01000000,\r\n\r\n /** Partner Widget Experience 3-wide 3u-high */\r\n Size3Wx18H = 0x02000000,\r\n\r\n /** 4-column banner */\r\n Size4Wx2H = 0x04000000,\r\n\r\n /** 4-column banner with 3-u height */\r\n Size4Wx3H = 0x08000000,\r\n\r\n /** Partner Widget Experience 4-wide 1u-high */\r\n Size4Wx6H = 0x10000000,\r\n\r\n /** Partner Widget Experience 4-wide 2u-high */\r\n Size4Wx12H = 0x20000000,\r\n\r\n /** Partner Widget Experience 4-wide 3u-high */\r\n Size4Wx18H = 0x40000000,\r\n\r\n /** 5-column banner with 3-u height */\r\n Size5Wx3H = 0x00001000,\r\n\r\n /** 5-column banner with 6-u height */\r\n Size5Wx6H = 0x00002000\r\n}","module.exports = __webpack_public_path__ + \"AdChoices.svg\";","module.exports = __webpack_public_path__ + \"AlertWhite.svg\";","module.exports = __webpack_public_path__ + \"AllDone.svg\";","module.exports = __webpack_public_path__ + \"BingCardDefaultHotelImage.svg\";","module.exports = __webpack_public_path__ + \"BingHotelSeePrice.svg\";","module.exports = __webpack_public_path__ + \"BingLogo.svg\";","module.exports = __webpack_public_path__ + \"BingRatingDarkLightStar.svg\";","module.exports = __webpack_public_path__ + \"BingRatingDarkStar.svg\";","module.exports = __webpack_public_path__ + \"BingRatingLightStar.svg\";","module.exports = __webpack_public_path__ + \"BlowingHail.svg\";","module.exports = __webpack_public_path__ + \"BlowingHailWhite.svg\";","module.exports = __webpack_public_path__ + \"BlowingHailV2.svg\";","module.exports = __webpack_public_path__ + \"BlowingSnow.svg\";","module.exports = __webpack_public_path__ + \"BlowingSnowWhite.svg\";","module.exports = __webpack_public_path__ + \"BlowingSnowV2.svg\";","module.exports = __webpack_public_path__ + \"CardActionButton.svg\";","module.exports = __webpack_public_path__ + \"ChatBubbleIcon.svg\";","module.exports = __webpack_public_path__ + \"Check.svg\";","module.exports = __webpack_public_path__ + \"CheckmarkOutline.svg\";","module.exports = __webpack_public_path__ + \"Chevron.svg\";","module.exports = __webpack_public_path__ + \"ChevronDown.svg\";","module.exports = __webpack_public_path__ + \"ChevronDownV2.svg\";","module.exports = __webpack_public_path__ + \"ChevronDownV3.svg\";","module.exports = __webpack_public_path__ + \"ChevronRight.svg\";","module.exports = __webpack_public_path__ + \"PHChevronLeft.svg\";","module.exports = __webpack_public_path__ + \"PHChevronRight.svg\";","module.exports = __webpack_public_path__ + \"ChevronUp.svg\";","module.exports = __webpack_public_path__ + \"ChevronWhite.svg\";","module.exports = __webpack_public_path__ + \"CircleChevron.svg\";","module.exports = __webpack_public_path__ + \"CircleClose.svg\";","module.exports = __webpack_public_path__ + \"ClearNight.svg\";","module.exports = __webpack_public_path__ + \"ClearNightWhite.svg\";","module.exports = __webpack_public_path__ + \"ClearNightV2.svg\";","module.exports = __webpack_public_path__ + \"Close.svg\";","module.exports = __webpack_public_path__ + \"CloseV2.svg\";","module.exports = __webpack_public_path__ + \"CloseThin.svg\";","module.exports = __webpack_public_path__ + \"Cloudy.svg\";","module.exports = __webpack_public_path__ + \"CloudyWhite.svg\";","module.exports = __webpack_public_path__ + \"CloudyV2.svg\";","module.exports = __webpack_public_path__ + \"Comment.svg\";","module.exports = __webpack_public_path__ + \"CommentFill.svg\";","module.exports = __webpack_public_path__ + \"ConflictWarning.svg\";","module.exports = __webpack_public_path__ + \"Copy.svg\";","module.exports = __webpack_public_path__ + \"DarkModeHotel.svg\";","module.exports = __webpack_public_path__ + \"DataProvider.svg\";","module.exports = __webpack_public_path__ + \"DayTime.svg\";","module.exports = __webpack_public_path__ + \"Delete.svg\";","module.exports = __webpack_public_path__ + \"Discover.svg\";","module.exports = __webpack_public_path__ + \"Dislike.svg\";","module.exports = __webpack_public_path__ + \"DislikeText.svg\";","module.exports = __webpack_public_path__ + \"Disliked.svg\";","module.exports = __webpack_public_path__ + \"DislikedLight.svg\";","module.exports = __webpack_public_path__ + \"DislikedText.svg\";","module.exports = __webpack_public_path__ + \"Docx.svg\";","module.exports = __webpack_public_path__ + \"Download.svg\";","module.exports = __webpack_public_path__ + \"DownloadNoFill.svg\";","module.exports = __webpack_public_path__ + \"Edit.svg\";","module.exports = __webpack_public_path__ + \"EditNoFill.svg\";","module.exports = __webpack_public_path__ + \"Edited.svg\";","module.exports = __webpack_public_path__ + \"EditedNoFill.svg\";","module.exports = __webpack_public_path__ + \"Ellipses.svg\";","module.exports = __webpack_public_path__ + \"EllipsesLight.svg\";","module.exports = __webpack_public_path__ + \"EllipsesV2.svg\";","module.exports = __webpack_public_path__ + \"EmojiAngry.svg\";","module.exports = __webpack_public_path__ + \"EmojiHeart.svg\";","module.exports = __webpack_public_path__ + \"EmojiLike.svg\";","module.exports = __webpack_public_path__ + \"EmojiSad.svg\";","module.exports = __webpack_public_path__ + \"EmojiSurprised.svg\";","module.exports = __webpack_public_path__ + \"EmojiThinking.svg\";","module.exports = __webpack_public_path__ + \"EmptyDiscoverDark.svg\";","module.exports = __webpack_public_path__ + \"EmptyDiscoverLight.svg\";","module.exports = __webpack_public_path__ + \"ErrorRocketLight.svg\";","module.exports = __webpack_public_path__ + \"ErrorRocketDark.svg\";","module.exports = __webpack_public_path__ + \"Excel.svg\";","module.exports = __webpack_public_path__ + \"Facebook.svg\";","module.exports = __webpack_public_path__ + \"FacebookCircle.svg\";","module.exports = __webpack_public_path__ + \"FacebookText.svg\";","module.exports = __webpack_public_path__ + \"FacebookTextBlack.svg\";","module.exports = __webpack_public_path__ + \"Feedback.svg\";","module.exports = __webpack_public_path__ + \"Flag.svg\";","module.exports = __webpack_public_path__ + \"FluentArrowTrending.svg\";","module.exports = __webpack_public_path__ + \"FluentAttach.svg\";","module.exports = __webpack_public_path__ + \"FluentCalendar.svg\";","module.exports = __webpack_public_path__ + \"FluentComment.svg\";","module.exports = __webpack_public_path__ + \"FluentCompassNorthwest.svg\";","module.exports = __webpack_public_path__ + \"FluentEdit.svg\";","module.exports = __webpack_public_path__ + \"FluentFolderOpen.svg\";","module.exports = __webpack_public_path__ + \"FluentMention.svg\";","module.exports = __webpack_public_path__ + \"FluentNews.svg\";","module.exports = __webpack_public_path__ + \"FluentPeople.svg\";","module.exports = __webpack_public_path__ + \"FluentVideo.svg\";","module.exports = __webpack_public_path__ + \"Fog.svg\";","module.exports = __webpack_public_path__ + \"FogWhite.svg\";","module.exports = __webpack_public_path__ + \"FogV2.svg\";","module.exports = __webpack_public_path__ + \"Folder.svg\";","module.exports = __webpack_public_path__ + \"FolderNoFill.svg\";","module.exports = __webpack_public_path__ + \"FolderOpen.svg\";","module.exports = __webpack_public_path__ + \"Form.svg\";","module.exports = __webpack_public_path__ + \"Forward.svg\";","module.exports = __webpack_public_path__ + \"FreezingRain.svg\";","module.exports = __webpack_public_path__ + \"FreezingRainWhite.svg\";","module.exports = __webpack_public_path__ + \"FreezingRainV2.svg\";","module.exports = __webpack_public_path__ + \"FrequentSitesEmpty.svg\";","module.exports = __webpack_public_path__ + \"FrequentSitesError.svg\";","module.exports = __webpack_public_path__ + \"GalleryFullscreen.svg\";","module.exports = __webpack_public_path__ + \"GalleryMediaIcon.svg\";","module.exports = __webpack_public_path__ + \"GeneralErrorDark.svg\";","module.exports = __webpack_public_path__ + \"GeneralErrorLight.svg\";","module.exports = __webpack_public_path__ + \"GenericFile.svg\";","module.exports = __webpack_public_path__ + \"Glimmer.svg\";","module.exports = __webpack_public_path__ + \"GridView.svg\";","module.exports = __webpack_public_path__ + \"HailDay.svg\";","module.exports = __webpack_public_path__ + \"HailDayWhite.svg\";","module.exports = __webpack_public_path__ + \"HailDayV2.svg\";","module.exports = __webpack_public_path__ + \"HailNight.svg\";","module.exports = __webpack_public_path__ + \"HailNightWhite.svg\";","module.exports = __webpack_public_path__ + \"HailNightV2.svg\";","module.exports = __webpack_public_path__ + \"HazeSmoke.svg\";","module.exports = __webpack_public_path__ + \"HazeSmokeNightV2.svg\";","module.exports = __webpack_public_path__ + \"HazeSmokeNightV2_106.svg\";","module.exports = __webpack_public_path__ + \"HazeSmokeWhite.svg\";","module.exports = __webpack_public_path__ + \"HazySmokeV2.svg\";","module.exports = __webpack_public_path__ + \"HeavySnow.svg\";","module.exports = __webpack_public_path__ + \"HeavySnowWhite.svg\";","module.exports = __webpack_public_path__ + \"HeavySnowV2.svg\";","module.exports = __webpack_public_path__ + \"Hide.svg\";","module.exports = __webpack_public_path__ + \"HideV2.svg\";","module.exports = __webpack_public_path__ + \"HideStory.svg\";","module.exports = __webpack_public_path__ + \"HideStoryV2.svg\";","module.exports = __webpack_public_path__ + \"Home.svg\";","module.exports = __webpack_public_path__ + \"HomeOutline.svg\";","module.exports = __webpack_public_path__ + \"Hotel.svg\";","module.exports = __webpack_public_path__ + \"HurricaneFull.svg\";","module.exports = __webpack_public_path__ + \"Hurricane.svg\";","module.exports = __webpack_public_path__ + \"Hurricane1.svg\";","module.exports = __webpack_public_path__ + \"Hurricane2.svg\";","module.exports = __webpack_public_path__ + \"Hurricane3.svg\";","module.exports = __webpack_public_path__ + \"Hurricane4.svg\";","module.exports = __webpack_public_path__ + \"Hurricane5.svg\";","module.exports = __webpack_public_path__ + \"HurricaneTC.svg\";","module.exports = __webpack_public_path__ + \"HurricaneTD.svg\";","module.exports = __webpack_public_path__ + \"HurricaneTS.svg\";","module.exports = __webpack_public_path__ + \"IndustryBriefcase.svg\";","module.exports = __webpack_public_path__ + \"Information.svg\";","module.exports = __webpack_public_path__ + \"InteractionRequiredDark.svg\";","module.exports = __webpack_public_path__ + \"InteractionRequiredLight.svg\";","module.exports = __webpack_public_path__ + \"Interested.svg\";","module.exports = __webpack_public_path__ + \"LanguageAndContent.svg\";","module.exports = __webpack_public_path__ + \"LightBulb.svg\";","module.exports = __webpack_public_path__ + \"LightRain.svg\";","module.exports = __webpack_public_path__ + \"LightRainWhite.svg\";","module.exports = __webpack_public_path__ + \"LightRainV2.svg\";","module.exports = __webpack_public_path__ + \"LightSnow.svg\";","module.exports = __webpack_public_path__ + \"LightSnowWhite.svg\";","module.exports = __webpack_public_path__ + \"LightSnowV2.svg\";","module.exports = __webpack_public_path__ + \"Like.svg\";","module.exports = __webpack_public_path__ + \"LikeText.svg\";","module.exports = __webpack_public_path__ + \"Liked.svg\";","module.exports = __webpack_public_path__ + \"LikedText.svg\";","module.exports = __webpack_public_path__ + \"Line.svg\";","module.exports = __webpack_public_path__ + \"Link.svg\";","module.exports = __webpack_public_path__ + \"LinkedIn.svg\";","module.exports = __webpack_public_path__ + \"LinkedInBlack.svg\";","module.exports = __webpack_public_path__ + \"LinkedInText.svg\";","module.exports = __webpack_public_path__ + \"ListMenu.svg\";","module.exports = __webpack_public_path__ + \"LocaleLanguage.svg\";","module.exports = __webpack_public_path__ + \"Locate.svg\";","module.exports = __webpack_public_path__ + \"LocateWhite.svg\";","module.exports = __webpack_public_path__ + \"LocationDetect.svg\";","module.exports = __webpack_public_path__ + \"Lock.svg\";","module.exports = __webpack_public_path__ + \"Mail.svg\";","module.exports = __webpack_public_path__ + \"MailBlack.svg\";","module.exports = __webpack_public_path__ + \"MailRoundedCorners.svg\";","module.exports = __webpack_public_path__ + \"MailNoFill.svg\";","module.exports = __webpack_public_path__ + \"ManagedBriefcase.svg\";","module.exports = __webpack_public_path__ + \"ManagedBriefcaseNoFill.svg\";","module.exports = __webpack_public_path__ + \"MapEnterFullScreenMode.svg\";","module.exports = __webpack_public_path__ + \"MapExitFullScreenMode.svg\";","module.exports = __webpack_public_path__ + \"MapZoomIn.svg\";","module.exports = __webpack_public_path__ + \"MapZoomOut.svg\";","module.exports = __webpack_public_path__ + \"MediaIconSlideshow.svg\";","module.exports = __webpack_public_path__ + \"MediaIconVideo.svg\";","module.exports = __webpack_public_path__ + \"Message.svg\";","module.exports = __webpack_public_path__ + \"MessageNoFill.svg\";","module.exports = __webpack_public_path__ + \"Messages.svg\";","module.exports = __webpack_public_path__ + \"MicrosoftFullLogo.svg\";","module.exports = __webpack_public_path__ + \"MicrosoftLogo.svg\";","module.exports = __webpack_public_path__ + \"MicrosoftNews.svg\";","module.exports = __webpack_public_path__ + \"MicrosoftNewsFull.svg\";","module.exports = __webpack_public_path__ + \"MicrosoftNewsFull_FR.svg\";","module.exports = __webpack_public_path__ + \"MicrosoftNewsFull_ZH.svg\";","module.exports = __webpack_public_path__ + \"ModerateRain.svg\";","module.exports = __webpack_public_path__ + \"ModerateRainWhite.svg\";","module.exports = __webpack_public_path__ + \"ModerateRainV2.svg\";","module.exports = __webpack_public_path__ + \"More.svg\";","module.exports = __webpack_public_path__ + \"MostlySunny.svg\";","module.exports = __webpack_public_path__ + \"MoreV2.svg\";","module.exports = __webpack_public_path__ + \"Movie.svg\";","module.exports = __webpack_public_path__ + \"MsnLogo.svg\";","module.exports = __webpack_public_path__ + \"NightTime.svg\";","module.exports = __webpack_public_path__ + \"OfferTimer.svg\";","module.exports = __webpack_public_path__ + \"Office.svg\";","module.exports = __webpack_public_path__ + \"OfficeFormsLogo.svg\";","module.exports = __webpack_public_path__ + \"OneDrive.svg\";","module.exports = __webpack_public_path__ + \"OneNote.svg\";","module.exports = __webpack_public_path__ + \"Onetoc.svg\";","module.exports = __webpack_public_path__ + \"Open.svg\";","module.exports = __webpack_public_path__ + \"OpenSquared.svg\";","module.exports = __webpack_public_path__ + \"Outlook.svg\";","module.exports = __webpack_public_path__ + \"PartlyCloudyDay.svg\";","module.exports = __webpack_public_path__ + \"PartlyCloudyDayWhite.svg\";","module.exports = __webpack_public_path__ + \"PartlyCloudyDayV2.svg\";","module.exports = __webpack_public_path__ + \"PartlyCloudyNight.svg\";","module.exports = __webpack_public_path__ + \"PartlyCloudyNightWhite.svg\";","module.exports = __webpack_public_path__ + \"PartlyCloudyNightV2.svg\";","module.exports = __webpack_public_path__ + \"Pdf.svg\";","module.exports = __webpack_public_path__ + \"People.svg\";","module.exports = __webpack_public_path__ + \"Pencil.svg\";","module.exports = __webpack_public_path__ + \"PHAdd.svg\";","module.exports = __webpack_public_path__ + \"PHAlert.svg\";","module.exports = __webpack_public_path__ + \"PHArrowRight.svg\";","module.exports = __webpack_public_path__ + \"PHBlowingHailV2.svg\";","module.exports = __webpack_public_path__ + \"PHBlowingSnowV2.svg\";","module.exports = __webpack_public_path__ + \"PHCalendar.svg\";","module.exports = __webpack_public_path__ + \"PHClearNightV2.svg\";","module.exports = __webpack_public_path__ + \"PHCloudyV2.svg\";","module.exports = __webpack_public_path__ + \"PHEllipsis.svg\";","module.exports = __webpack_public_path__ + \"PHEmptyTasks.svg\";","module.exports = __webpack_public_path__ + \"PHFavorite.svg\";","module.exports = __webpack_public_path__ + \"PHFavoriteFilled.svg\";","module.exports = __webpack_public_path__ + \"PHExcel.svg\";","module.exports = __webpack_public_path__ + \"PHExcelFile.svg\";","module.exports = __webpack_public_path__ + \"PHFluidFile.svg\";","module.exports = __webpack_public_path__ + \"PHFog.svg\";","module.exports = __webpack_public_path__ + \"PHFogV2.svg\";","module.exports = __webpack_public_path__ + \"PHFormFile.svg\";","module.exports = __webpack_public_path__ + \"PHFreezingRainV2.svg\";","module.exports = __webpack_public_path__ + \"PHGenericFile.svg\";","module.exports = __webpack_public_path__ + \"PHHailDayV2.svg\";","module.exports = __webpack_public_path__ + \"PHHailNightV2.svg\";","module.exports = __webpack_public_path__ + \"PHHazeSmokeNightV2.svg\";","module.exports = __webpack_public_path__ + \"PHHazeSmokeV2.svg\";","module.exports = __webpack_public_path__ + \"PHHeavySnowV2.svg\";","module.exports = __webpack_public_path__ + \"PHLightRainV2.svg\";","module.exports = __webpack_public_path__ + \"PHLightSnowV2.svg\";","module.exports = __webpack_public_path__ + \"PHModerateRainV2.svg\";","module.exports = __webpack_public_path__ + \"PHMostlySunnyV2.svg\";","module.exports = __webpack_public_path__ + \"PHNoTask.svg\";","module.exports = __webpack_public_path__ + \"PHOutlook.svg\";","module.exports = __webpack_public_path__ + \"PHOneDrive.svg\";","module.exports = __webpack_public_path__ + \"PHOneNote.svg\";","module.exports = __webpack_public_path__ + \"PHOneNoteFile.svg\";","module.exports = __webpack_public_path__ + \"PHPartlyCloudyDayV2.svg\";","module.exports = __webpack_public_path__ + \"PHPartlyCloudyNightV2.svg\";","module.exports = __webpack_public_path__ + \"PHPDFFile.svg\";","module.exports = __webpack_public_path__ + \"PHPowerBIFile.svg\";","module.exports = __webpack_public_path__ + \"PHPowerPointFile.svg\";","module.exports = __webpack_public_path__ + \"PHProjectFile.svg\";","module.exports = __webpack_public_path__ + \"PHRaindrop.svg\";","module.exports = __webpack_public_path__ + \"PHRainShowersDayV2.svg\";","module.exports = __webpack_public_path__ + \"PHRainShowersNightV2.svg\";","module.exports = __webpack_public_path__ + \"PHRainSnowV2.svg\";","module.exports = __webpack_public_path__ + \"PHRainSnowShowersNightV2.svg\";","module.exports = __webpack_public_path__ + \"PHSharepoint.svg\";","module.exports = __webpack_public_path__ + \"PHSharePointFile.svg\";","module.exports = __webpack_public_path__ + \"PHSharePointNewsFile.svg\";","module.exports = __webpack_public_path__ + \"PHStream.svg\";","module.exports = __webpack_public_path__ + \"PHStreamFile.svg\";","module.exports = __webpack_public_path__ + \"PHSnowShowersDayV2.svg\";","module.exports = __webpack_public_path__ + \"PHSnowShowersNightV2.svg\";","module.exports = __webpack_public_path__ + \"PHSunnyDayV2.svg\";","module.exports = __webpack_public_path__ + \"PHSwayFile.svg\";","module.exports = __webpack_public_path__ + \"PHThunderstormsV2.svg\";","module.exports = __webpack_public_path__ + \"PHToDo.svg\";","module.exports = __webpack_public_path__ + \"PHVideoFile.svg\";","module.exports = __webpack_public_path__ + \"PHVisioFile.svg\";","module.exports = __webpack_public_path__ + \"PHWindyV2.svg\";","module.exports = __webpack_public_path__ + \"PHWord.svg\";","module.exports = __webpack_public_path__ + \"PHWordFile.svg\";","module.exports = __webpack_public_path__ + \"Pin.svg\";","module.exports = __webpack_public_path__ + \"Plus.svg\";","module.exports = __webpack_public_path__ + \"PopoverArrow.svg\";","module.exports = __webpack_public_path__ + \"PowerBI.svg\";","module.exports = __webpack_public_path__ + \"PowerPoint.svg\";","module.exports = __webpack_public_path__ + \"Pptx.svg\";","module.exports = __webpack_public_path__ + \"PresenceAvailable.svg\";","module.exports = __webpack_public_path__ + \"PresenceAway.svg\";","module.exports = __webpack_public_path__ + \"PresenceBusy.svg\";","module.exports = __webpack_public_path__ + \"PresenceOof.svg\";","module.exports = __webpack_public_path__ + \"PresenceOofAvailable.svg\";","module.exports = __webpack_public_path__ + \"PresenceOofBusy.svg\";","module.exports = __webpack_public_path__ + \"PresenceUnknown.svg\";","module.exports = __webpack_public_path__ + \"PriceDrop.svg\";","module.exports = __webpack_public_path__ + \"PriceDropBlue.svg\";","module.exports = __webpack_public_path__ + \"Project.svg\";","module.exports = __webpack_public_path__ + \"Radar.svg\";","module.exports = __webpack_public_path__ + \"Raindrop.svg\";","module.exports = __webpack_public_path__ + \"RainShowersDay.svg\";","module.exports = __webpack_public_path__ + \"RainShowersDayWhite.svg\";","module.exports = __webpack_public_path__ + \"RainShowersDayV2.svg\";","module.exports = __webpack_public_path__ + \"RainShowersNight.svg\";","module.exports = __webpack_public_path__ + \"RainShowersNightWhite.svg\";","module.exports = __webpack_public_path__ + \"RainShowersNightV2.svg\";","module.exports = __webpack_public_path__ + \"RainSnow.svg\";","module.exports = __webpack_public_path__ + \"RainSnowV2.svg\";","module.exports = __webpack_public_path__ + \"RainSnowShowersDay.svg\";","module.exports = __webpack_public_path__ + \"RainSnowShowersDayWhite.svg\";","module.exports = __webpack_public_path__ + \"RainSnowShowersNight.svg\";","module.exports = __webpack_public_path__ + \"RainSnowShowersNightWhite.svg\";","module.exports = __webpack_public_path__ + \"RainSnowShowersNightV2.svg\";","module.exports = __webpack_public_path__ + \"RainSnowWhite.svg\";","module.exports = __webpack_public_path__ + \"Rating.svg\";","module.exports = __webpack_public_path__ + \"RatingEmpty.svg\";","module.exports = __webpack_public_path__ + \"RatingEmptyDark.svg\";","module.exports = __webpack_public_path__ + \"RatingPartial.svg\";","module.exports = __webpack_public_path__ + \"RatingPartialDark.svg\";","module.exports = __webpack_public_path__ + \"RecommendedEmpty.svg\";","module.exports = __webpack_public_path__ + \"RecommendedError.svg\";","module.exports = __webpack_public_path__ + \"Refresh.svg\";","module.exports = __webpack_public_path__ + \"Remove.svg\";","module.exports = __webpack_public_path__ + \"Save.svg\";","module.exports = __webpack_public_path__ + \"Saved.svg\";","module.exports = __webpack_public_path__ + \"SetHome.svg\";","module.exports = __webpack_public_path__ + \"SevereWeather.svg\";","module.exports = __webpack_public_path__ + \"Search.svg\";","module.exports = __webpack_public_path__ + \"SearchV2.svg\";","module.exports = __webpack_public_path__ + \"Share.svg\";","module.exports = __webpack_public_path__ + \"ShareRoundedCorners.svg\";","module.exports = __webpack_public_path__ + \"ShareLight.svg\";","module.exports = __webpack_public_path__ + \"ShareNoFill.svg\";","module.exports = __webpack_public_path__ + \"Sharepoint.svg\";","module.exports = __webpack_public_path__ + \"Shopping.svg\";","module.exports = __webpack_public_path__ + \"ShoppingDealsDark.svg\";","module.exports = __webpack_public_path__ + \"ShoppingDealsLight.svg\";","module.exports = __webpack_public_path__ + \"Skype.svg\";","module.exports = __webpack_public_path__ + \"SkypeOffice.svg\";","module.exports = __webpack_public_path__ + \"SlugInfo.svg\";","module.exports = __webpack_public_path__ + \"SlugInfoDark.svg\";","module.exports = __webpack_public_path__ + \"SnowShowersDay.svg\";","module.exports = __webpack_public_path__ + \"SnowShowersDayWhite.svg\";","module.exports = __webpack_public_path__ + \"SnowShowersDayV2.svg\";","module.exports = __webpack_public_path__ + \"SnowShowersNight.svg\";","module.exports = __webpack_public_path__ + \"SnowShowersNightWhite.svg\";","module.exports = __webpack_public_path__ + \"SnowShowersNightV2.svg\";","module.exports = __webpack_public_path__ + \"Star.svg\";","module.exports = __webpack_public_path__ + \"StarFill.svg\";","module.exports = __webpack_public_path__ + \"StarFollow.svg\";","module.exports = __webpack_public_path__ + \"StarFollowBlue.svg\";","module.exports = __webpack_public_path__ + \"StarOutline.svg\";","module.exports = __webpack_public_path__ + \"Stars.svg\";","module.exports = __webpack_public_path__ + \"SunnyDay.svg\";","module.exports = __webpack_public_path__ + \"SunnyDayOutline.svg\";","module.exports = __webpack_public_path__ + \"SunnyDayWhite.svg\";","module.exports = __webpack_public_path__ + \"SunnyDayV2.svg\";","module.exports = __webpack_public_path__ + \"Sway.svg\";","module.exports = __webpack_public_path__ + \"SwayApp.svg\";","module.exports = __webpack_public_path__ + \"Teams.svg\";","module.exports = __webpack_public_path__ + \"ThumbnailView.svg\";","module.exports = __webpack_public_path__ + \"ThumbDown.svg\";","module.exports = __webpack_public_path__ + \"ThumbDownBlue.svg\";","module.exports = __webpack_public_path__ + \"ThumbUp.svg\";","module.exports = __webpack_public_path__ + \"ThumbUp2.svg\";","module.exports = __webpack_public_path__ + \"ThumbUp3.svg\";","module.exports = __webpack_public_path__ + \"ThumbUpBlue.svg\";","module.exports = __webpack_public_path__ + \"ThumbUpFill.svg\";","module.exports = __webpack_public_path__ + \"ThumbsUpAndDown.svg\";","module.exports = __webpack_public_path__ + \"Thunderstorms.svg\";","module.exports = __webpack_public_path__ + \"ThunderstormsWhite.svg\";","module.exports = __webpack_public_path__ + \"ThunderstormsV2.svg\";","module.exports = __webpack_public_path__ + \"TodaysEventsEmpty.svg\";","module.exports = __webpack_public_path__ + \"TodaysEventsError.svg\";","module.exports = __webpack_public_path__ + \"Trending.svg\";","module.exports = __webpack_public_path__ + \"Twitter.svg\";","module.exports = __webpack_public_path__ + \"TwitterBlack.svg\";","module.exports = __webpack_public_path__ + \"TwitterNoFill.svg\";","module.exports = __webpack_public_path__ + \"TwitterText.svg\";","module.exports = __webpack_public_path__ + \"Unpin.svg\";","module.exports = __webpack_public_path__ + \"Upload.svg\";","module.exports = __webpack_public_path__ + \"VerticalSeparator.svg\";","module.exports = __webpack_public_path__ + \"VideoMediaIcon.svg\";","module.exports = __webpack_public_path__ + \"VideoPlay.svg\";","module.exports = __webpack_public_path__ + \"VideoFallback.svg\";","module.exports = __webpack_public_path__ + \"Visio.svg\";","module.exports = __webpack_public_path__ + \"Vkcom.svg\";","module.exports = __webpack_public_path__ + \"Vsdx.svg\";","module.exports = __webpack_public_path__ + \"WaterDropL2.svg\";","module.exports = __webpack_public_path__ + \"WeatherAlert.svg\";","module.exports = __webpack_public_path__ + \"WeatherAQI.svg\";","module.exports = __webpack_public_path__ + \"WeatherBarometer.svg\";","module.exports = __webpack_public_path__ + \"WeatherCloud.svg\";","module.exports = __webpack_public_path__ + \"WeatherDaylight.svg\";","module.exports = __webpack_public_path__ + \"WeatherDewpoint.svg\";","module.exports = __webpack_public_path__ + \"WeatherWarning.svg\";","module.exports = __webpack_public_path__ + \"WeatherWatch.svg\";","module.exports = __webpack_public_path__ + \"WeatherAdvisory.svg\";","module.exports = __webpack_public_path__ + \"WeatherAlertV2.svg\";","module.exports = __webpack_public_path__ + \"WeatherExpand.svg\";","module.exports = __webpack_public_path__ + \"WeatherHumidity.svg\";","module.exports = __webpack_public_path__ + \"WeatherIcon.svg\";","module.exports = __webpack_public_path__ + \"WeatherMapPause.svg\";","module.exports = __webpack_public_path__ + \"WeatherMapPlay.svg\";","module.exports = __webpack_public_path__ + \"WeatherPrecipitation.svg\";","module.exports = __webpack_public_path__ + \"WeatherSatellite.svg\";","module.exports = __webpack_public_path__ + \"WeatherSunrise.svg\";","module.exports = __webpack_public_path__ + \"WeatherSunset.svg\";","module.exports = __webpack_public_path__ + \"WeatherTemperature.svg\";","module.exports = __webpack_public_path__ + \"WeatherUv.svg\";","module.exports = __webpack_public_path__ + \"WeatherVisiblity.svg\";","module.exports = __webpack_public_path__ + \"WeatherWind.svg\";","module.exports = __webpack_public_path__ + \"WeatherWildfire.svg\";","module.exports = __webpack_public_path__ + \"WeatherWindDir.svg\";","module.exports = __webpack_public_path__ + \"WeeklyAdsDark.svg\";","module.exports = __webpack_public_path__ + \"WeeklyAdsLight.svg\";","module.exports = __webpack_public_path__ + \"WhatsApp.svg\";","module.exports = __webpack_public_path__ + \"WhatsAppBlack.svg\";","module.exports = __webpack_public_path__ + \"Windy.svg\";","module.exports = __webpack_public_path__ + \"WindyWhite.svg\";","module.exports = __webpack_public_path__ + \"WindyV2.svg\";","module.exports = __webpack_public_path__ + \"Winterstorm.svg\";","module.exports = __webpack_public_path__ + \"Word.svg\";","module.exports = __webpack_public_path__ + \"World.svg\";","module.exports = __webpack_public_path__ + \"Xlsx.svg\";","module.exports = __webpack_public_path__ + \"Yammer.svg\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { initializeHybridPublicPath } from \"@msnews/core\";\r\n\r\ninitializeHybridPublicPath();","// © Microsoft Corporation. All rights reserved.\r\n\r\n// TODO: This should be considered for moving it to the Interests experience wrapper, once that\r\n// code arrives, since this is specific to that experience\r\n\r\n/**\r\n * Tab Names\r\n * @export\r\n * @type {object}\r\n */\r\nexport const SubnavTabName = {\r\n Interests: \"cinterests\",\r\n MyFeed: \"newsfeed\",\r\n XFeed: \"xfeed\"\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport const enums = {\r\n selectPpeParameter: \"oneservice_enable_ppe\",\r\n externalUrls: {\r\n api: \"https://api.msn.com/community/\",\r\n ppeApi: \"https://ppe-api.msn.com/community/\",\r\n guidelinePage: \"https://www.msn.com/en-us/community/guideline\",\r\n profilePage: \"https://www.msn.com/en-us/community/profile/\",\r\n privacySettings: \"https://www.msn.com/en-us/settings\",\r\n profileSettings: \"https://account.microsoft.com/profile\",\r\n feedbackForm: \"https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR-V3gf69zQlBm1dJVuXA8mtURVI4UlFHMDRIR0VCWDFWNUQyQU5HVzJJQi4u\",\r\n copyrightReportForm: \"https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbRziAYhqL1o9IrEi_GLF4l4hUQVFUVldIVFRCSzQ3NEVOTURNQ01BTE9YSi4u\",\r\n moderationEmail: \"Appealsprocessor@microsoft.com\",\r\n newPost: \"https://www.msn.com/en-us/community/post/new\"\r\n },\r\n userStateType: {\r\n existingUser: \"existingUser\",\r\n anonymous: \"anonymous\",\r\n newUser: \"newUser\"\r\n },\r\n userNameStatusType: {\r\n normal: \"Normal\",\r\n notAllow: \"NotAllow\",\r\n inReview: \"InReview\",\r\n unknown: \"Unknown\"\r\n },\r\n userAvatarStatusType: {\r\n normal: \"Normal\",\r\n notAllow: \"NotAllow\",\r\n inReview: \"InReview\",\r\n unknown: \"Unknown\"\r\n },\r\n userAgeGroup: {\r\n under18: \"Under18\",\r\n above18: \"Above18\"\r\n },\r\n activityType: {\r\n follow: \"Follow\",\r\n reply: \"Reply\",\r\n reaction: \"Reaction\",\r\n badge: \"Achievement\",\r\n moderation: \"Moderation\",\r\n commentDeleteAlert: \"CommentDeleteAlert\",\r\n profileBannedAlert: \"ProfileBannedAlert\",\r\n profileErrorAlert: \"ProfileErrorAlert\"\r\n },\r\n moderationErrorType: {\r\n takedown: \"Takedown\",\r\n ban: \"Ban\",\r\n notAllowName: \"NotAllowName\",\r\n notAllowPicture: \"NotAllowPicture\",\r\n approveUserAppeal: \"ApproveUserAppeal\",\r\n rejectUserAppeal: \"RejectUserAppeal\",\r\n approveProfilePicAppeal: \"ApproveProfilePicAppeal\",\r\n rejectProfilePicAppeal: \"RejectProfilePicAppeal\",\r\n approveCommentAppeal: \"ApproveCommentAppeal\",\r\n rejectCommentAppeal: \"RejectCommentAppeal\"\r\n },\r\n visibleStatusType: {\r\n Normal: \"Normal\",\r\n DeletedByUser: \"DeletedByUser\",\r\n DeletedByAI: \"DeletedByAI\",\r\n DeletedByHI: \"DeletedByHI\",\r\n InReview: \"InReview\"\r\n },\r\n visibleStatusMap: {\r\n DeletedByUser: \"VisibleStatusDeletedByUser\",\r\n DeletedByAI: \"VisibleStatusDeletedByAI\",\r\n DeletedByHI: \"VisibleStatusDeletedByHI\",\r\n InReview: \"VisibleStatusInReview\",\r\n Default: \"VisibleStatusOther\"\r\n },\r\n commentReportMap: {\r\n Spam: \"ReportOptSpam\",\r\n Profanity: \"ReportOptProfanity\",\r\n Abuse: \"ReportOptAbuse\",\r\n RiskyLowAuthority: \"ReportOptRiskyLowAuthority\",\r\n TechnicalAttack: \"ReportOptTechnicalAttack\",\r\n Copyright: \"ReportOptCopyright\",\r\n Trademark: \"ReportOptTrademark\",\r\n ChildRelated: \"ReportOptChildRelated\",\r\n Violent: \"ReportOptViolent\",\r\n Danger: \"ReportOptDanger\",\r\n PublicThreats: \"ReportOptPublicThreats\",\r\n Illegal: \"ReportOptIllegal\",\r\n Terrorism: \"ReportOptTerrorism\",\r\n Privacy: \"ReportOptPrivacy\",\r\n Inappropriate: \"ReportOptInappropriate\"\r\n },\r\n userNameReportMap: {\r\n Spam: \"ReportOptSpam\",\r\n Profanity: \"ReportOptProfanity\",\r\n Abuse: \"ReportOptAbuse\",\r\n RiskyLowAuthority: \"ReportOptRiskyLowAuthority\",\r\n TechnicalAttack: \"ReportOptTechnicalAttack\",\r\n Trademark: \"ReportOptTrademark\",\r\n ChildRelated: \"ReportOptChildRelated\",\r\n Violent: \"ReportOptViolent\",\r\n Danger: \"ReportOptDanger\",\r\n PublicThreats: \"ReportOptPublicThreats\",\r\n Illegal: \"ReportOptIllegal\",\r\n Terrorism: \"ReportOptTerrorism\",\r\n Privacy: \"ReportOptPrivacy\",\r\n Inappropriate: \"ReportOptInappropriate\"\r\n },\r\n userPictureReportMap: {\r\n Spam: \"ReportOptSpam\",\r\n Profanity: \"ReportOptProfanity\",\r\n Abuse: \"ReportOptAbuse\",\r\n RiskyLowAuthority: \"ReportOptRiskyLowAuthority\",\r\n TechnicalAttack: \"ReportOptTechnicalAttack\",\r\n Copyright: \"ReportOptCopyright\",\r\n Trademark: \"ReportOptTrademark\",\r\n ChildRelated: \"ReportOptChildRelated\",\r\n Violent: \"ReportOptViolent\",\r\n Danger: \"ReportOptDanger\",\r\n PublicThreats: \"ReportOptPublicThreats\",\r\n Illegal: \"ReportOptIllegal\",\r\n Terrorism: \"ReportOptTerrorism\",\r\n Privacy: \"ReportOptPrivacy\",\r\n Nudity: \"ReportOptNudity\",\r\n NonConsensualIntimateImagery: \"ReportOptNonConsensualIntimateImagery\",\r\n Inappropriate: \"ReportOptInappropriate\"\r\n },\r\n reactionOrder: [\r\n \"like\", \"love\", \"surprised\", \"thinking\", \"sad\", \"angry\"\r\n ],\r\n profileReportItemMap: {\r\n UserName: \"ReportUserName\",\r\n ProfilePicture: \"ReportProfilePicture\"\r\n },\r\n profilePageEmptyStates: {\r\n NoUser: \"NoUser\",\r\n NotSocialUser: \"NotSocialUser\"\r\n },\r\n reactionIconMap: {\r\n like: \"emj_like\",\r\n love: \"emj_love\",\r\n thinking: \"emj_thinking\",\r\n surprised: \"emj_surprised\",\r\n sad: \"emj_sad\",\r\n angry: \"emj_angry\"\r\n },\r\n reactions: {\r\n like: \"like\",\r\n love: \"love\",\r\n thinking: \"thinking\",\r\n surprised: \"surprised\",\r\n sad: \"sad\",\r\n angry: \"angry\"\r\n },\r\n responsiveLevels: {\r\n L0: \"cwtl-0\",\r\n MobilePopup: \"cwt-mobile-popup\"\r\n },\r\n newCommentErrorCodeMap: {\r\n 400: \"NewPostDeniedMsg\",\r\n 403: \"NewPostSessionExpiredMsg\",\r\n 500: \"NewPostWentWrongMsg\",\r\n bodyTooLong: \"NewPostTooLongMsg\",\r\n other: \"NewPostWentWrongMsg\",\r\n 0: \"NewPostWentWrongMsg\",\r\n 1: \"NewPostSessionExpiredMsg\",\r\n 4: \"NewPostDeniedMsg\",\r\n 6: \"NewPostWentWrongMsg\",\r\n 7: \"NewPostWentWrongMsg\",\r\n 8: \"NewPostWentWrongMsg\",\r\n 9: \"NewPostWentWrongMsg\",\r\n 10: \"NewPostWentWrongMsg\",\r\n 11: \"NewPostWentWrongMsg\",\r\n 12: \"NewPostTooManyCommentsMsg\",\r\n 20: \"NewPostTooLongMsg\",\r\n 21: \"NewPostMentionMsg\",\r\n 22: \"NewPostWentWrongMsg\",\r\n 23: \"NewPostWentWrongMsg\",\r\n 24: \"NewPostDeniedMsg\",\r\n 25: \"NewPostWentWrongMsg\",\r\n 26: \"NewPostWentWrongMsg\",\r\n 27: \"NewPostWentWrongMsg\",\r\n 28: \"NewPostDeniedMsg\",\r\n 29: \"NewPostDeniedMsg\",\r\n 30: \"NewPostDeniedMsg\",\r\n 31: \"NewPostDeniedMsg\",\r\n 32: {\r\n 1: \"NewPostDuplicatedMsg\",\r\n 2: \"NewPostDeniedMsg\",\r\n 3: \"NewPostDeniedMsg\",\r\n 4: \"NewPostDeniedMsg\",\r\n 5: \"NewPostDeniedMsg\",\r\n 6: \"NewPostDeniedMsg\",\r\n 7: \"NewPostDeniedMsg\",\r\n 8: \"NewPostDeniedMsg\",\r\n 9: \"NewPostDeniedMsg\",\r\n 10: \"NewPostDeniedMsg\",\r\n 11: \"NewPostDeniedMsg\",\r\n 12: \"NewPostDeniedMsg\",\r\n 13: \"NewPostDeniedMsg\",\r\n 14: \"NewPostDeniedMsg\",\r\n 15: \"NewPostDeniedMsg\",\r\n 16: \"NewPostDeniedMsg\",\r\n 17: \"NewPostLanguageErrorMsg\",\r\n 18: \"NewPostURLMsg\"\r\n }\r\n\r\n },\r\n ugcPublishStatusType: {\r\n normal: \"Normal\",\r\n notAllow: \"NotAllow\",\r\n inReview: \"InReview\"\r\n },\r\n theme: {\r\n default: {\r\n name: \"default\",\r\n disabledComponents: []\r\n },\r\n superappBase: {\r\n name: \"superapp\",\r\n disabledComponents: []\r\n },\r\n windowsBase: {\r\n name: \"windows\",\r\n disabledComponents: []\r\n },\r\n superappEmbed: {\r\n name: \"superapp-embed\",\r\n disabledComponents: [\"profilepage\", \"multiloginpage\", \"reactionbreakdowncomment\", \"reactionbreakdowncontent\", \"onboardingpage\", \"onboardingthirdpartypage\", \"onboardingunderagepage\", \"notificationtray\"]\r\n },\r\n superappFullpage: {\r\n name: \"superapp-fullpage\",\r\n disabledComponents: [\"profilepage\"]\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { BreakpointManager, BreakpointManagerCallback, ColumnArrangement, columnArrangements, updateColumnArrangementsForFiveCol } from \"./BreakpointManager\";\r\nimport { BreakpointTracker, BreakpointTrackerCallback, defaultBreakpoints } from \"@microsoft/fast-layouts-react\";\r\nimport { IRequestContext, getContextData } from \"@msnews/core\";\r\n\r\nimport { Breakpoint } from \"@microsoft/fast-layouts-react\";\r\nimport { pull as _pull } from \"lodash-es\";\r\n\r\n/**\r\n * This class establishes a standard breakpoint scheme that can be used by all experiences\r\n * to achieve a unified breakpoint strategy. The implementation is a glorified wrapper around\r\n * the FAST BreakpointTracker that standardizes on a set of specific number of column arrangements\r\n * that will then be exposed to clients via the {ColumnArrangement} enum.\r\n */\r\nexport class FastBreakpointManager implements BreakpointManager {\r\n\r\n /**\r\n * Map of BreakpointManager callbacks to Breakpoint Tracker callback.\r\n * Required to quickly get Breakpoint callback on unsubscribe.\r\n */\r\n private callbackMap: Map = new Map();\r\n\r\n /**\r\n * Gets the {ColumnArrangement} enum that maps to the current viewport width.\r\n */\r\n public get currentColumnArrangement(): ColumnArrangement {\r\n return this.indexToStandardConverter(BreakpointTracker.currentBreakpoint());\r\n }\r\n\r\n /**\r\n * Set a new default breakpoint, default to 0 if no requestContext provided\r\n * @param requestContext: used to access the current request's breakpoint\r\n */\r\n public constructor(requestContext: IRequestContext) {\r\n this.refreshBreakpoints(requestContext);\r\n }\r\n\r\n /**\r\n * Refreshes breakpoints from current column arrangements.\r\n */\r\n public refreshBreakpoints(requestContext: IRequestContext): void {\r\n const breakpoints: number[] = [0];\r\n updateColumnArrangementsForFiveCol();\r\n for (let i = 1; i < columnArrangements.length; i++) {\r\n breakpoints.push(columnArrangements[i].minViewportWidthPx);\r\n }\r\n\r\n BreakpointTracker.breakpoints = breakpoints;\r\n BreakpointTracker.defaultBreakpoint = requestContext !== undefined ?\r\n getContextData(requestContext.data.breakpoint, \"breakpoint\") : 0;\r\n }\r\n\r\n /** breakpoint values */\r\n public set breakpoints(breakpoints: number[]) {\r\n BreakpointTracker.breakpoints = breakpoints;\r\n\r\n // TODO: Remove this when https://github.com/microsoft/fast-dna/issues/2602 is solved\r\n if (defaultBreakpoints && Array.isArray(defaultBreakpoints)) {\r\n const count = defaultBreakpoints.length;\r\n for (let i = 0; i < count; i++) {\r\n defaultBreakpoints.pop();\r\n }\r\n breakpoints.forEach(breakpoint => defaultBreakpoints.push(breakpoint));\r\n }\r\n }\r\n\r\n public get breakpoints(): number[] {\r\n return BreakpointTracker.breakpoints;\r\n }\r\n\r\n /**\r\n * Clear all callbacks. Useful when handling multiple requests when server side rendering to prevent memory leak.\r\n */\r\n public static resetCallbacks(): void {\r\n if (_fastBreakpointManager && _fastBreakpointManager.callbackMap.size > 0) {\r\n for (const [key, _] of _fastBreakpointManager.callbackMap) {\r\n _fastBreakpointManager.unsubscribe(key);\r\n _fastBreakpointManager.callbackMap.delete(key);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Add a subscription to the breakpoint tracker changed notification list\r\n * @param callback - the callback to invoke when the breakpoint changes\r\n */\r\n public subscribe(callback: BreakpointManagerCallback): void {\r\n\r\n // Create callback with breakpoint value conversion.\r\n const managerCallback = (breakpoint: Breakpoint) => {\r\n callback(this.indexToStandardConverter(breakpoint));\r\n };\r\n\r\n this.callbackMap.set(callback, managerCallback);\r\n\r\n BreakpointTracker.subscribe(managerCallback);\r\n }\r\n\r\n /**\r\n * Removes an existing subscription from the breakpoint tracker notification list\r\n * @param callback - the callback to remove from the notification list\r\n */\r\n public unsubscribe(callback: BreakpointManagerCallback): void {\r\n BreakpointTracker.unsubscribe(this.callbackMap.get(callback));\r\n this.callbackMap.delete(callback);\r\n }\r\n\r\n /**\r\n * Converts an index-based breakpoint to a column arrangement.\r\n * @param breakpoint The breakpoint index to convert.\r\n * @returns The corresponding column arrangement.\r\n */\r\n private indexToStandardConverter(breakpoint: Breakpoint): ColumnArrangement {\r\n return columnArrangements[breakpoint].arrangement;\r\n }\r\n}\r\n\r\nlet _fastBreakpointManager: FastBreakpointManager;\r\n\r\n/**\r\n * Default instance of fastBreakpointManager\r\n * @param requestContext - The current request context\r\n * @param recreate - Flag specifying if we should create a new instance of fastBreakpointManager\r\n */\r\nexport const fastBreakpointManager = (requestContext?: IRequestContext, recreate?: boolean) => {\r\n if (!_fastBreakpointManager || recreate) {\r\n // First clear any subscribed to events from the callback map\r\n FastBreakpointManager.resetCallbacks();\r\n _fastBreakpointManager = new FastBreakpointManager(requestContext);\r\n }\r\n\r\n return _fastBreakpointManager;\r\n};\r\n\r\nlet viewType: string = null;\r\n\r\n/**\r\n * To get view type for Edgenext based on river column view\r\n */\r\nexport const viewTypeForEdgeNext = () => {\r\n switch (fastBreakpointManager().currentColumnArrangement) {\r\n case ColumnArrangement.c1:\r\n case ColumnArrangement.c2:\r\n viewType = \"size2column\";\r\n break;\r\n case ColumnArrangement.c3:\r\n viewType = \"size3column\";\r\n break;\r\n case ColumnArrangement.c4:\r\n viewType = \"size4column\";\r\n break;\r\n case ColumnArrangement.c5:\r\n viewType = \"size5column\";\r\n break;\r\n default:\r\n // leave EdgeNextTelemetry.viewType unchanged\r\n break;\r\n }\r\n return viewType;\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { pageRevealStartMarker, timeToVideoStart, timeToVisuallyReady } from \"./PerfMarkerConstants\";\r\n\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\nimport { isNullOrUndefined } from \"util\";\r\nimport { perfMarker } from \"./PerfMarker\";\r\n\r\n/** Collection of marker names grouped by marker type */\r\nexport interface MarkerNames {\r\n /** Array of timeToFunctional names */\r\n TTF?: string[];\r\n\r\n /** Array of timeToVisualReady names */\r\n TTVR?: string[];\r\n\r\n /** Array of timeToPageReveal names */\r\n TTPR?: string[];\r\n}\r\n\r\n/** Enum for PerfMarkersGroup */\r\nexport enum PerfMarkersGroup {\r\n Primary = \"primary\",\r\n Secondary = \"secondary\"\r\n}\r\n\r\nlet remainingMarkers: Set;\r\nlet remainingSecondaryMarkers: Set;\r\nlet remainingTtvrMarkers: Set;\r\nlet remainingTtprMarkers: Set;\r\nlet ttvrMarkers: Set;\r\n\r\nlet ttvrPromise: Promise<[string, number][]>;\r\nlet resolveTtvrCallback: (markers: [string, number][]) => void;\r\n\r\nlet perfMarkerPromise: Promise<[string, number][]>;\r\nlet perfMarkerResolveCallback: (markers: [string, number][]) => void;\r\nlet secondaryPerfMarkerPromise: Promise<[string, number][]>;\r\nlet secondaryPerfMarkerResolveCallback: (markers: [string, number][]) => void;\r\n\r\nlet ttvsMarkerPromise: Promise<[string, number][]>;\r\nlet resolveTtvsCallback: (ttvs: [string, number][]) => void;\r\n\r\nlet ttprMarkerPromise: Promise<[string, number][]>;\r\nlet resolveTtprCallback: (ttpr: [string, number][]) => void;\r\n\r\n/** The markers map. Key is the experience name, e.g. \"River\". Value is the number of milliseconds it took to reach that marker. */\r\nlet primaryMarkers: Map = new Map();\r\n\r\n/** The secondary markers map. Key is the experience name, e.g. \"TTS.NativeAd\". Value is the number of milliseconds it took to reach that marker. */\r\nlet secondaryMarkers: Map = new Map();\r\n\r\nconst ttfPrefix = \"TTF.\";\r\nconst ttvrPrefix = \"TTVR.\";\r\nconst ttvsPrefix = \"TTVS.\";\r\nconst ttprPrefix = \"TTPR.\";\r\nconst ttslPrefix = \"TTSL.\";\r\n\r\nlet isSetMarkersCalled = false;\r\n\r\n/**\r\n * Saves the Time To Functional timestamp for the given marker and also marks the performance timeline.\r\n * If the same marker is added again, it overrides with the original marker.\r\n * @param name - The marker name\r\n * @param markTimeNA - To set -1 mark time for the TTF to resolve the dependency.\r\n * @param time - The elapsed time since window.performance.timing.navigationStart\r\n */\r\nexport function markTtf(name = \"\", markTimeNA = false, time?: number): void {\r\n if (canUseDOM()) {\r\n time = time || window.performance.now();\r\n return setMark(ttfPrefix, name, markTimeNA, time);\r\n }\r\n}\r\n\r\n/**\r\n * Saves the Time To Visually Ready timestamp for the given marker and also marks the performance timeline.\r\n * If the same marker is added again, it overrides with the original marker.\r\n * @param name - The marker name\r\n * @param markTimeNA - To set -1 mark time for the TTVR to resolve the dependency.\r\n * @param time - The elapsed time since window.performance.timing.navigationStart\r\n */\r\nexport function markTtvr(name = \"\", markTimeNA = false, time?: number): void {\r\n if (canUseDOM()) {\r\n time = time || window.performance.now();\r\n return setMark(ttvrPrefix, name, markTimeNA, time);\r\n }\r\n}\r\n\r\n/**\r\n * Helper that wraps the markTtvr call inside a request animation frame and setTimeout\r\n * with the idea that this will allow the experience time to render before setting the mark\r\n * @param name The marker name\r\n * @param markTimeNA To set -1 mark time for the TTVR to resolve the dependency\r\n * @param time - The elapsed time since window.performance.timing.navigationStart\r\n */\r\nexport function markTtvrRaf(name = \"\", markTimeNA = false, time?: number): void {\r\n if (canUseDOM()) {\r\n time = time || window.performance.now();\r\n window.requestAnimationFrame(() => {\r\n setTimeout(() => {\r\n markTtvr(name, markTimeNA, time);\r\n }, 0);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Saves the Time To Page Reveal timestamp for the given marker.\r\n * The call is inside a request animation frame and setTimeout,\r\n * with the idea that this will allow the experience time to render before setting the mark.\r\n * @param name The marker name\r\n */\r\nexport function markTtprRaf(name = \"\"): void {\r\n window.requestAnimationFrame(() => {\r\n setTimeout(() => {\r\n const startMarker = getSinglePerfMarkStartTimeByName(pageRevealStartMarker);\r\n const time = startMarker === -1\r\n ? -1\r\n : performance.now() - startMarker;\r\n\r\n setMark(ttprPrefix, name, false, time);\r\n }, 0);\r\n });\r\n\r\n if (!ttprMarkerPromise) {\r\n // add the promise\r\n waitForTtprMarkers();\r\n }\r\n}\r\n\r\n/**\r\n * Saves the Time to Video Start timestamp for the given marker and also marks the performance timeline.\r\n * If the same marker is added again, it overrides with the original marker.\r\n * @param name - The marker name\r\n * @param markTimeNA - To set -1 mark time for the TTVR to resolve the dependency.\r\n * @param time - The elapsed time since window.performance.timing.navigationStart\r\n */\r\nexport function markTtvs(name = \"\", markTimeNA = false, time?: number): void {\r\n if (canUseDOM()) {\r\n time = time || window.performance.now();\r\n return setMark(ttvsPrefix, name, markTimeNA, time);\r\n }\r\n}\r\n\r\n/**\r\n * Saves the Time To Start Loading timestamp for the given marker and also marks the performance timeline.\r\n * If the same marker is added again, it overrides with the original marker.\r\n * @param name - The marker name\r\n * @param markTimeNA - To set -1 mark time for the TTVR to resolve the dependency.\r\n * @param time - The elapsed time since window.performance.timing.navigationStart\r\n */\r\nexport function markTtsl(name = \"\", markTimeNA = false, time?: number): void {\r\n if (canUseDOM()) {\r\n time = time || window.performance.now();\r\n return setMark(ttslPrefix, name, markTimeNA, time);\r\n }\r\n}\r\n\r\n/**\r\n * Saves the time stamp for a given secondary perf marker.\r\n * @param markerName - The marker name\r\n * @param time - Time in milliseconds\r\n */\r\nexport function setSecondaryPerfMarkerTime(markerName: string, time?: number) {\r\n // return if the marker already exists.\r\n if (secondaryMarkers.get(markerName)) {\r\n return;\r\n }\r\n\r\n const existingMarker = performance.getEntriesByName && performance.getEntriesByName(markerName);\r\n const isMarkerSet = Boolean(existingMarker && existingMarker.length);\r\n\r\n if (!isMarkerSet) {\r\n perfMarker.singleMark(markerName);\r\n\r\n if (isNullOrUndefined(time)) {\r\n secondaryMarkers.set(markerName, -1);\r\n } else {\r\n secondaryMarkers.set(markerName, Math.round(time));\r\n }\r\n } else {\r\n secondaryMarkers.set(markerName, Math.round(existingMarker[0].startTime));\r\n }\r\n\r\n // Notify any callers waiting for reports\r\n if (remainingSecondaryMarkers && remainingSecondaryMarkers.delete(markerName) && remainingSecondaryMarkers.size === 0 && secondaryPerfMarkerResolveCallback) {\r\n secondaryPerfMarkerResolveCallback(getSecondaryMarkers());\r\n }\r\n}\r\n\r\n/**\r\n * Saves the timestamp for the given marker and also marks the performance timeline.\r\n * If the same marker is added again, it overrides with the original marker.\r\n * @param name - The marker name\r\n * @param markTimeNA - To set -1 mark time for the ttvr to resolve the dependency.\r\n * @param time - The elapsed time since window.performance.timing.navigationStart\r\n */\r\nfunction setMark(prefix: string, name: string, markTimeNA: boolean, time: number): void {\r\n if (!(name && name.length)) {\r\n return;\r\n }\r\n\r\n if (!(prefix && prefix.length)) {\r\n return;\r\n }\r\n\r\n const markerFullName = prefix + name;\r\n\r\n // To check if the marker exists then return.\r\n if (primaryMarkers.get(markerFullName)) {\r\n return;\r\n }\r\n\r\n const existingMarker = performance.getEntriesByName && performance.getEntriesByName(markerFullName);\r\n const isMarkerSet = Boolean(existingMarker && existingMarker.length);\r\n\r\n if (!isMarkerSet) {\r\n perfMarker.singleMark(markerFullName);\r\n\r\n if (markTimeNA) {\r\n primaryMarkers.set(markerFullName, -1);\r\n } else {\r\n primaryMarkers.set(markerFullName, Math.round(time));\r\n }\r\n } else {\r\n primaryMarkers.set(markerFullName, Math.round(existingMarker[0].startTime));\r\n }\r\n\r\n // Notify any callers waiting for TTVR reports\r\n if (remainingTtvrMarkers && remainingTtvrMarkers.delete(markerFullName) && remainingTtvrMarkers.size === 0 && resolveTtvrCallback) {\r\n resolveTtvrCallback(getTtvrMarkers());\r\n }\r\n\r\n // Notify any callers waiting for reports\r\n if (remainingMarkers && remainingMarkers.delete(markerFullName) && remainingMarkers.size === 0 && perfMarkerResolveCallback) {\r\n perfMarkerResolveCallback(getMarkers());\r\n }\r\n\r\n // Resolve TTVS if this is ttvs. TTVS only need one time to mark instead of multiple markers.\r\n if (prefix === ttvsPrefix && resolveTtvsCallback) {\r\n resolveTtvsCallback(getTtvsMarkers());\r\n }\r\n\r\n // Notify any callers waiting for TTPR reports\r\n if (prefix === ttprPrefix\r\n && remainingTtprMarkers\r\n && remainingTtprMarkers.delete(markerFullName)\r\n && remainingTtprMarkers.size === 0 && resolveTtprCallback) {\r\n resolveTtprCallback(getMarkers());\r\n }\r\n}\r\n\r\n/**\r\n * Sets the collection of primary perf markers to use for waitForAllPerfMarkers, waitForTtvr .\r\n * @param markerNames The collection of primary TTF and TTVR perf markers.\r\n */\r\nexport function setMarkers(markerNames: MarkerNames): void {\r\n remainingMarkers = getRemainingMarkers(markerNames);\r\n remainingTtvrMarkers = getRemainingMarkers(markerNames, \"TTVR\");\r\n remainingTtprMarkers = getRemainingMarkers(markerNames, \"TTPR\");\r\n ttvrMarkers = new Set(flattenMarkerNames(markerNames, \"TTVR\"));\r\n\r\n if (resolveTtvrCallback && remainingTtvrMarkers.size === 0) {\r\n perfMarkerResolveCallback(getTtvrMarkers());\r\n }\r\n\r\n if (perfMarkerResolveCallback && remainingMarkers.size === 0) {\r\n perfMarkerResolveCallback(getMarkers());\r\n }\r\n\r\n isSetMarkersCalled = true;\r\n}\r\n\r\n/**\r\n * Sets the collection of secondary perf markers to use for waitForAllSecondaryPerfMarkers. Should be called only once.\r\n * @param markerNames The collection of secondary perf markers that are required.\r\n */\r\nexport function setRequiredSecondaryMarkers(markerNames: string[]): void {\r\n // Return if remainingSecondaryMarkers is already set. This means setRequiredSecondaryMarkers was already called.\r\n if (remainingSecondaryMarkers) {\r\n return;\r\n }\r\n\r\n remainingSecondaryMarkers = new Set();\r\n\r\n markerNames.forEach(markerName => {\r\n if (!secondaryMarkers.get(markerName)) {\r\n remainingSecondaryMarkers.add(markerName);\r\n }\r\n });\r\n\r\n // If there are no required secondary perf markers, immediately resolve the promise\r\n if (remainingSecondaryMarkers.size === 0 && secondaryPerfMarkerResolveCallback) {\r\n secondaryPerfMarkerResolveCallback(getSecondaryMarkers());\r\n }\r\n}\r\n\r\n/**\r\n * Determines whether setMarkers has been called.\r\n */\r\nexport function setMarkersCalled(): boolean {\r\n return isSetMarkersCalled;\r\n}\r\n\r\n/**\r\n * Adds marker to the remainingTtvrMarkers\r\n * Here for the case where the marker cannot be added in experience tracker\r\n * Example: Stripe layout - since we don't know if user has that layout selected\r\n * until later (in layoutPreferenceData connector)\r\n *\r\n * @export\r\n * @param {string} markerName\r\n * @returns {void}\r\n */\r\nexport function addTtvrMarker(markerName: string): void {\r\n if (!markerName || !isSetMarkersCalled || !remainingMarkers || !remainingTtvrMarkers) {\r\n return;\r\n }\r\n\r\n remainingMarkers.add(markerName);\r\n remainingTtvrMarkers.add(markerName);\r\n}\r\n\r\n/**\r\n * Waits for the all perf markers supplied to setMarkers() to be logged.\r\n * @returns A promise with all of the TTF and TTVR perf markers, including the overall page marker\r\n */\r\nexport function waitForAllPerfMarkers(): Promise<[string, number][]> {\r\n\r\n // Perf marker promises not supported on server side.\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n return waitForPerfMarkers();\r\n}\r\n\r\n/**\r\n * Waits for the all perf markers supplied to setMarkers() to be logged.\r\n * @returns A promise with all of the TTF and TTVR perf markers, including the overall page marker\r\n */\r\nexport function waitForAllSecondaryPerfMarkers(): Promise<[string, number][]> {\r\n\r\n // Perf marker promises not supported on server side.\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n // If we have a promise, return it. It may already be completed.\r\n if (secondaryPerfMarkerPromise) {\r\n return secondaryPerfMarkerPromise;\r\n }\r\n\r\n if (!remainingSecondaryMarkers || remainingSecondaryMarkers.size === 0) {\r\n return Promise.resolve(getSecondaryMarkers());\r\n }\r\n\r\n // If the markers are not yet declared or are incomplete, set up a promise to resolve when they are all done.\r\n secondaryPerfMarkerPromise = new Promise<[string, number][]>(resolve => {\r\n secondaryPerfMarkerResolveCallback = resolve;\r\n });\r\n\r\n return secondaryPerfMarkerPromise;\r\n}\r\n\r\n/**\r\n * Waits for the TTVR markers supplied to setMarkers() to be logged.\r\n * @returns A promise with the TTVR perf markers, including the overall page TTVR marker\r\n */\r\nexport function waitForTtvr(): Promise<[string, number][]> {\r\n\r\n // Perf marker promises not supported on server side.\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n // If we have a promise, return it. It may already be completed.\r\n if (ttvrPromise) {\r\n return ttvrPromise;\r\n }\r\n\r\n if (remainingTtvrMarkers && remainingTtvrMarkers.size === 0) {\r\n return Promise.resolve(getTtvrMarkers());\r\n }\r\n\r\n // If the markers are not yet declared or are incomplete, set up a promise to resolve when they are all done.\r\n ttvrPromise = new Promise<[string, number][]>(resolve => {\r\n resolveTtvrCallback = resolve;\r\n });\r\n\r\n return ttvrPromise;\r\n}\r\n\r\n/**\r\n * Waits for the perf markers supplied to setMarkers() to be logged.\r\n * @returns A promise with all of the TTF and TTVR perf markers, including the overall page marker\r\n */\r\nfunction waitForPerfMarkers(): Promise<[string, number][]> {\r\n\r\n // Perf marker promises not supported on server side.\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n // If we have a promise, return it. It may already be completed.\r\n if (perfMarkerPromise) {\r\n return perfMarkerPromise;\r\n }\r\n\r\n if (remainingMarkers && remainingMarkers.size === 0) {\r\n return Promise.resolve(getMarkers());\r\n }\r\n\r\n // If the markers are not yet declared or are incomplete, set up a promise to resolve when they are all done.\r\n perfMarkerPromise = new Promise<[string, number][]>(resolve => {\r\n perfMarkerResolveCallback = resolve;\r\n });\r\n\r\n return perfMarkerPromise;\r\n}\r\n\r\n/**\r\n * Wait for the ttvs marker to be logged\r\n * @returns A promise with TTVS perf time in ms\r\n */\r\nexport function waitForTtvsMarker(): Promise<[string, number][]> {\r\n\r\n // Perf marker promises not supported on server side.\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n if (ttvsMarkerPromise) {\r\n return ttvsMarkerPromise;\r\n }\r\n\r\n ttvsMarkerPromise = new Promise<[string, number][]>(resolve => {\r\n resolveTtvsCallback = resolve;\r\n });\r\n\r\n return ttvsMarkerPromise;\r\n}\r\n\r\n/**\r\n * Wait for the ttpr marker to be logged\r\n * @returns A promise with TTPR perf time in ms\r\n */\r\nexport function waitForTtprMarkers(): Promise<[string, number][]> {\r\n\r\n // Perf marker promises not supported on server side.\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n if (ttprMarkerPromise) {\r\n return ttprMarkerPromise;\r\n }\r\n\r\n ttprMarkerPromise = new Promise<[string, number][]>(resolve => {\r\n resolveTtprCallback = resolve;\r\n });\r\n\r\n return ttprMarkerPromise;\r\n}\r\n\r\n/**\r\n * Returns TTVR of given entry if exists in markers array\r\n * @param entryName the entry name for the marker eg. \"TTVR.xx\" or just \"TTVR\"\r\n * @returns the TTVR value for that entry name OR undefined if entry does not exist\r\n */\r\nexport function getTtvrOfEntry(entryName: string): number {\r\n const ttvrMarkers = getTtvrMarkers();\r\n const marker = ttvrMarkers.find((mark) => mark[0] === entryName) || [];\r\n\r\n return marker[1];\r\n}\r\n\r\n/**\r\n * Returns array of markers, including the page-level marker. For example:\r\n * Note: didn't add TTVS in getMarkers because TTVS only applies to specific page type and special cases.\r\n * It could be fired way after in the page cycle.\r\n * [[\"TTVR.Search\", 100], [\"TTVR.TopSites\", 100.123], [\"TTVR.River\", 100.504], [\"TTVR\", 100.504]]\r\n * @returns The array of markers\r\n */\r\nexport function getMarkers(): [string, number][] {\r\n const ttvrResults = getTtvrMarkers();\r\n const ttfResults = getTtfMarkers();\r\n const result: [string, number][] = [...ttvrResults, ...ttfResults];\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns array of markers as they are available. Do not write page level markers here.\r\n * This is used when waiting for remaining markers timed out.\r\n * [[\"TTVR.Search\", 100], [\"TTVR.TopSites\", 100.123]]\r\n * @returns The array of markers\r\n */\r\nexport function getAvailableMarkers(): [string, number][] {\r\n // Do not mark page TTVR as not all remaining markers have been satisfied.\r\n const ttvrResults = getTtvrMarkers(false);\r\n const ttfResults = getTtfMarkers();\r\n const result: [string, number][] = [...ttvrResults, ...ttfResults];\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns array of secondary markers. E.g.:\r\n * [[\"TTS.NativeAd\", 3300], [\"TTS.SearchHistory\", 2100]]\r\n * @returns The array of secondary markers\r\n */\r\nexport function getSecondaryMarkers(): [string, number][] {\r\n const result: [string, number][] = [];\r\n\r\n secondaryMarkers.forEach((value: number, key: string) => {\r\n result.push([key, value]);\r\n });\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns array of markers that are yet to be completed.\r\n * @returns The array of incomplete markers\r\n */\r\nexport function getIncompleteMarkers(perfMarkersGroup: PerfMarkersGroup): string[] {\r\n return perfMarkersGroup === PerfMarkersGroup.Primary\r\n ? Array.from(remainingMarkers || [])\r\n : Array.from(remainingSecondaryMarkers || []);\r\n}\r\n\r\n/**\r\n * Returns markers yet to be set\r\n * @param markerNames The names of the markers to check. e.g. { TTVR: [\"River\", \"TopSites\"], TTF: [\"SearchBox\"] }\r\n * @param markerType The type of markers to return \"TTVR\", \"TTF\", or if undefined all\r\n * @returns The set of markers that have not yet been set.\r\n */\r\nfunction getRemainingMarkers(markerNames: MarkerNames, markerType?: string): Set {\r\n const result: Set = new Set();\r\n for (const markerName of flattenMarkerNames(markerNames, markerType)) {\r\n if (!primaryMarkers.get(markerName)) {\r\n result.add(markerName);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n* Returns TTPR of given entry if exists in markers array\r\n* @param expType - key for experience\r\n* @returns the TTVR value for that entry name OR undefined if entry does not exist\r\n*/\r\nexport function getExperienceTtpr(expType: string): number {\r\n const ttprMarkers = getTtprMarkers();\r\n const marker = ttprMarkers.find((mark) => mark[0].includes(expType)) || [];\r\n\r\n return marker[1];\r\n}\r\n\r\n/**\r\n* Returns array of TTPR markers, time to page reveal. For example:\r\n* [[\"TTPR.SearchBoxEdgeNext\", 120], [\"BackgroundImageEdgeNext\", 120]]\r\n* @returns The array of markers\r\n*/\r\nexport function getTtprMarkers(): [string, number][] {\r\n return getMarkersWithType(ttprPrefix);\r\n}\r\n\r\n/**\r\n * Returns array of TTF markers, including the page-level marker. For example:\r\n * [[\"TTF.Search\", 100], [\"TTF\", 100]]\r\n * @returns The array of markers\r\n */\r\nfunction getTtfMarkers(): [string, number][] {\r\n return getMarkersWithType(ttfPrefix);\r\n}\r\n\r\n/**\r\n * Returns array of TTVR markers, including the page-level marker. For example:\r\n * [[\"TTVR.Search\", 100], [\"TTVR.TopSites\", 100.123], [\"TTVR.River\", 100.504], [\"TTVR\", 100.504]]\r\n * @param markPageTTVR flag to mark overall TTVR marker based on max TTVR markers\r\n * @returns The array of markers\r\n */\r\nfunction getTtvrMarkers(markPageTTVR = true): [string, number][] {\r\n return getMarkersWithType(ttvrPrefix, markPageTTVR ? timeToVisuallyReady : null);\r\n}\r\n\r\n/**\r\n * Returns array of TTVS markers, including the page-level marker. For example:\r\n * [[\"TTVS.VideoContent\", 1200], [\"TTVS\", 1200]]\r\n * @returns The array of markers\r\n */\r\nfunction getTtvsMarkers(): [string, number][] {\r\n return getMarkersWithType(ttvsPrefix, timeToVideoStart);\r\n}\r\n\r\n/**\r\n * Returns array of a provided markers based on markerName, optionally including the page-level marker.\r\n * @param markerPrefix the marker prefix for the markers\r\n * @param markerName the optional page-level markerName\r\n * @returns The array of markers\r\n */\r\nfunction getMarkersWithType(markerPrefix: string, markerName?: string) {\r\n const result: [string, number][] = [];\r\n let maxValue = 0;\r\n primaryMarkers.forEach((value: number, key: string) => {\r\n if (key.startsWith(markerPrefix)) {\r\n result.push([key, value]);\r\n\r\n // Only include value in max TTVR when added to ttvrMarkers in setMarkers()\r\n if (value > maxValue && (!key.startsWith(\"TTVR\") || ttvrMarkers.has(key))) {\r\n maxValue = value;\r\n }\r\n }\r\n });\r\n\r\n // Add the max, overall marker at the end\r\n if (markerName) {\r\n result.push([markerName, maxValue]);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Put marker names into a expanded/flattened array [ \"TTVR.River\", \"TTVR.TopSites\", \"TTF.SearchBox\" ]\r\n * @param markerNames The names of the markers to check. e.g. { TTVR: [ \"River\", \"TopSites\" ], TTF: [ \"SearchBox\" ] }\r\n * @param markerType The type of markers to return \"TTVR\", \"TTF\", or if undefined all\r\n */\r\nfunction flattenMarkerNames(markerNames: MarkerNames, markerType: string): string[] {\r\n let ttvr: string[] = [];\r\n let ttpr: string[] = [];\r\n let ttf: string[] = [];\r\n\r\n if (markerNames && markerNames.TTVR && (!markerType || markerType === \"TTVR\")) {\r\n ttvr = markerNames.TTVR.map((n) => { return ttvrPrefix + n; });\r\n }\r\n\r\n if (markerNames && markerNames.TTF && (!markerType || markerType === \"TTF\")) {\r\n ttf = markerNames.TTF.map((n) => { return ttfPrefix + n; });\r\n }\r\n\r\n if (markerNames && markerNames.TTPR && markerType === \"TTPR\") {\r\n ttpr = markerNames.TTPR.map((n) => { return ttprPrefix + n; });\r\n }\r\n\r\n return [...ttvr, ...ttf, ...ttpr];\r\n}\r\n\r\n/**\r\n * helper method to get performance mark name.\r\n * @param markerName - performance mark name\r\n */\r\nexport function getSinglePerfMarkStartTimeByName(markerName: string): number {\r\n const perfMarks = window.performance.getEntriesByName(markerName);\r\n if (perfMarks && perfMarks[0] && perfMarks[0].startTime) {\r\n return perfMarks[0].startTime;\r\n }\r\n\r\n return -1;\r\n}\r\n\r\n/**\r\n * Reset the markers object singleton for test environments\r\n */\r\nexport function resetMarkersForTest(): void {\r\n primaryMarkers = new Map();\r\n secondaryMarkers = new Map();\r\n isSetMarkersCalled = false;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * An enumeration of all experiences ID.\r\n * By convention the experience ID ***MUST*** match exactly (including case) the class name for the experience.\r\n * NOTE: Keep this list alphabetical\r\n */\r\nexport enum ExperienceIds {\r\n animator = \"Animator\",\r\n articlePage = \"ArticlePage\",\r\n autosCard = \"AutosCard\",\r\n backgroundGradient = \"BackgroundGradient\",\r\n backgroundImageCommon = \"BackgroundImageCommon\",\r\n backgroundImageEdge = \"BackgroundImageEdge\",\r\n backgroundImageEdgeNext = \"BackgroundImageEdgeNext\",\r\n backgroundImageWC = \"BackgroundImageWC\",\r\n bannerManager = \"BannerManager\",\r\n baseHeader = \"BaseHeader\",\r\n bingAnswers = \"BingAnswers\",\r\n bingCards = \"BingCardsExperience\",\r\n bingHealth = \"BingHealth\",\r\n bingShopping = \"BingShopping\",\r\n bingShoppingLifestyleCard = \"BingShoppingLifestyleCard\",\r\n bingShoppingMeStripe = \"BingShoppingMeStripe\",\r\n bingMiniShopping = \"BingMiniShopping\",\r\n bingVideoCard = \"BingVideoCard\",\r\n bingWebSSO = \"BingWebSSO\",\r\n blowout = \"Blowout\",\r\n breakingNews = \"BreakingNews\",\r\n cardAction = \"CardAction\",\r\n cardActionV2 = \"CardActionV2\",\r\n coachmark = \"Coachmark\",\r\n coldStart = \"ColdStart\",\r\n coldStartUpsellCard = \"ColdStartUpsellCard\",\r\n clarity = \"Clarity\",\r\n comments = \"Comments\",\r\n commonHeader = \"CommonHeader\",\r\n complexContentPreview = \"ComplexContentPreview\",\r\n conditionalBanner = \"ConditionalBanner\",\r\n contentPreview = \"ContentPreview\",\r\n contentProvider = \"ContentProvider\",\r\n contentRelated = \"ContentRelated\",\r\n contentActionsToolbar = \"ContentActionsToolbar\",\r\n contentSharingToolbar = \"ContentSharingToolbar\",\r\n cookieWall = \"CookieWall\",\r\n covidChatBot = \"CovidChatBot\",\r\n dailyBrief = \"DailyBrief\",\r\n dashboardSettings = \"DashboardSettings\",\r\n desktopFeed = \"DesktopFeed\",\r\n desktopFeedEdgeNext = \"DesktopFeedEdgeNext\",\r\n desktopFeedSingleColumn = \"DesktopFeedSingleColumn\",\r\n displayAds = \"DisplayAds\",\r\n displayAdsWC = \"DisplayAdsWC\",\r\n displayAdsWithContentFallback = \"DisplayAdsWithContentFallback\",\r\n edgeChromiumPage = \"EdgeChromiumPage\",\r\n edgeHeader = \"EdgeHeader\",\r\n edgeNextPage = \"EdgeNextPage\",\r\n edgePage = \"EdgePage\",\r\n edgePageSettings = \"PageSettings\",\r\n editorsChoicePromoCard = \"EditorsChoicePromoCard\",\r\n electionDelegateCounter = \"ElectionDelegateCounter\",\r\n electionEditorsNote = \"ElectionEditorsNote\",\r\n electionResultMap = \"ElectionResultMap\",\r\n electionResultsCard = \"ElectionResultsCard\",\r\n electionVisualizer = \"ElectionVisualizer\",\r\n enterpriseComplianceBanner = \"EnterpriseComplianceBanner\",\r\n enterpriseFeedContainer = \"EnterpriseFeedContainer\",\r\n enterpriseRightRail = \"EnterpriseRightRail\",\r\n enterpriseWaffle = \"EnterpriseWaffle\",\r\n entryPoint = \"EntryPoint\",\r\n entryPointEdgeNext = \"EntryPointEdgeNext\",\r\n entryPointOffice = \"EntryPointOffice\",\r\n eventHubHeroNav = \"EventHubHeroNav\",\r\n eventHubPage = \"EventHubPage\",\r\n externalContentPreview = \"ExternalContentPreview\",\r\n externalNativeAd = \"ExternalNativeAd\",\r\n feedToggle = \"FeedToggle\",\r\n feedToggleWC = \"FeedToggleWC\",\r\n feedVisualizer = \"FeedVisualizer\",\r\n financeCurrencyConverter = \"FinanceCurrencyConverter\",\r\n financePage = \"FinancePage\",\r\n firstPartyPage = \"FirstPartyPage\",\r\n flyoutCard = \"FlyoutCard\",\r\n feedbackDialog = \"FeedbackDialog\",\r\n feedbackLink = \"FeedbackLink\",\r\n feedEdgeNext = \"FeedEdgeNext\",\r\n financeCardCommon = \"FinanceCardCommon\",\r\n financeCompanyProfileCard = \"FinanceCompanyProfileCard\",\r\n financeDetailHeader = \"FinanceDetailHeader\",\r\n financeDetailNavigation = \"FinanceDetailNavigation\",\r\n financeDetailPage = \"FinanceDetailPage\",\r\n financeDetailPageV2 = \"FinanceDetailPageV2\",\r\n financeFeeds= \"FinanceFeeds\",\r\n financeFinancialsCard = \"FinanceFinancialsCard\",\r\n financeLandingPageV2 = \"FinanceLandingPageV2\",\r\n financeMarketCard = \"FinanceMarketCard\",\r\n financeMarketStatus = \"FinanceMarketStatus\",\r\n financeNewsCard = \"FinanceNewsCard\",\r\n financeNewsContent = \"FinanceNewsContent\",\r\n financeDetailsCard = \"FinanceDetailsCard\",\r\n financeIndicesCard = \"FinanceIndicesCard\",\r\n financeMarketMoversCard = \"FinanceMarketMoversCard\",\r\n financeRecentlyViewedCard = \"FinanceRecentlyViewedCard\",\r\n financeRecommendationCard = \"FinanceRecommendationCard\",\r\n financeWatchlistCard = \"FinanceWatchlistCard\",\r\n financeWatchlistPage = \"FinanceWatchlistPage\",\r\n financeSearchBox = \"FinanceSearchBox\",\r\n financeTrendCard = \"FinanceTrendCard\",\r\n footerWindowsShell = \"FooterWindowsShell\",\r\n freMarketSelector = \"FreMarketSelector\",\r\n frequentSitesCard = \"FrequentSitesCard\",\r\n frequentSitesCardWC = \"FrequentSitesCardWC\",\r\n galleryPage = \"GalleryPage\",\r\n generalElections = \"GeneralElections\",\r\n gmailEmailPreview = \"GmailEmailPreview\",\r\n headerEdgeNext = \"HeaderEdgeNext\",\r\n headerNavigationLogo = \"HeaderNavigationLogo\",\r\n headerWindowsShell = \"HeaderWindowsShell\",\r\n hiddenContent = \"HiddenContent\",\r\n homePage = \"HomePage\",\r\n horoscopeAnswerCard = \"HoroscopeAnswerCard\",\r\n horoscopeAnswerCardWC = \"HoroscopeAnswerCardWC\",\r\n iframe = \"IFrame\",\r\n imageSearch = \"ImageSearch\",\r\n industryNewsCard = \"IndustryNewsCard\",\r\n infopane = \"Infopane\",\r\n interests = \"Interests\",\r\n interestsLeftRail = \"InterestsLeftRail\",\r\n interestsSearch = \"InterestsSearch\",\r\n interestsV1Wrapper = \"InterestsV1Wrapper\",\r\n interestsV2 = \"InterestsV2\",\r\n interestsV3 = \"InterestsV3\",\r\n languageToggle = \"LanguageToggle\",\r\n layoutSwitcher = \"LayoutSwitcher\",\r\n legacySharingToolbar = \"LegacySharingToolbar\",\r\n localNews = \"LocalNews\",\r\n localNewsViewCard = \"LocalNewsViewCard\",\r\n locationContentCard = \"LocationContentCard\",\r\n locationSelector = \"LocationSelector\",\r\n locationTime = \"LocationTime\",\r\n marketAggregator = \"MarketAggregator\",\r\n marketSelector = \"MarketSelector\",\r\n meControl = \"MeControl\",\r\n meStripe = \"MeStripe\",\r\n meetNow = \"MeetNow\",\r\n microsoftLogo = \"MicrosoftLogo\",\r\n microsoftNewsPage = \"MicrosoftNewsPage\",\r\n migrationConsent = \"MigrationConsent\",\r\n miniApps = \"miniApps\",\r\n mmxPage = \"MMXPage\",\r\n mnsCreatorDashboard = \"MnsCreatorDashboard\",\r\n modernRightRail = \"ModernRightRail\",\r\n moneyCard = \"MoneyCard\",\r\n moneyInfoCard= \"MoneyInfoCard\",\r\n mobileFeed = \"MobileFeed\",\r\n msnSettingMenu = \"MsnSettingMenu\",\r\n msRewards = \"MsRewards\",\r\n msRewardsWC = \"MsRewardsWC\",\r\n myBriefRiverCard = \"MyBriefRiverCard\",\r\n nativeAd = \"NativeAd\",\r\n newsbarFeed = \"NewsbarFeed\",\r\n notificationBell = \"NotificationBell\",\r\n ocvFeedbackData = \"OcvFeedbackData\",\r\n office = \"Office\",\r\n officeContainer = \"OfficeContainer\",\r\n officeDocumentCard = \"OfficeDocumentCard\",\r\n officeDocumentsTable = \"OfficeDocumentsTable\",\r\n oneFooter = \"OneFooter\",\r\n overlay = \"Overlay\",\r\n outlookEmailPreview = \"OutlookEmailPreview\",\r\n onThisDayCard = \"OnThisDayCard\",\r\n onThisDayCardWC = \"OnThisDayCardWC\",\r\n pageRefresh = \"PageRefresh\",\r\n partnerWidget = \"PartnerWidget\",\r\n pivotContent = \"PivotContent\",\r\n pivotContentV2 = \"PivotContentV2\",\r\n pivotHover = \"PivotHover\",\r\n pivotsNav = \"PivotsNav\",\r\n pivotsNavV2 = \"PivotsNavV2\",\r\n pollsCard = \"PollsCard\",\r\n portugueseElectionExperience = \"PortugueseElectionExperience\",\r\n poweredByLegend = \"PoweredbyLegend\",\r\n proactiveCanvas = \"ProactiveCanvas\",\r\n productivityHubContainer = \"ProductivityHubContainer\",\r\n promoBanner = \"PromoBanner\",\r\n publishersManagement = \"PublishersManagement\",\r\n qnaFeed=\"QnaFeed\",\r\n recipesCards = \"RecipesCards\",\r\n recipesFeed = \"RecipesFeed\",\r\n recipesSearch = \"RecipesSearch\",\r\n recipesSingleDetail = \"RecipesSingleDetail\",\r\n recipesSingleVideo = \"RecipesSingleVideo\",\r\n recommendedCard = \"RecommendedCard\",\r\n recommendedCardWC = \"RecommendedCardWC\",\r\n recommendedCardFeed = \"RecommendedCardFeed\",\r\n recommendedDocuments = \"RecommendedDocuments\",\r\n recommendedSearch = \"RecommendedSearch\",\r\n recommendedSearchBelowSearchBox = \"RecommendedSearchBelowSearchBox\",\r\n recommendedSearchCarousel = \"RecommendedSearchCarousel\",\r\n recommendedSearchCarouselWC = \"RecommendedSearchCarouselWC\",\r\n recommendedSites = \"RecommendedSites\",\r\n recommendedTopics = \"RecommendedTopics\",\r\n relatedArticleBlock = \"RelatedArticleBlock\",\r\n relatedSearchesCard = \"RelatedSearchesCard\",\r\n rightRail = \"RightRail\",\r\n rightRailCards = \"RightRailCards\",\r\n rightRailCarousel = \"RightRailCarousel\",\r\n river = \"River\",\r\n riverPlaceholder = \"RiverPlaceholder\",\r\n searchBoxCommon = \"SearchBoxCommon\",\r\n searchBoxEdge = \"SearchBoxEdge\",\r\n searchBoxEdgeNext = \"SearchBoxEdgeNext\",\r\n searchBoxEdgeNextWC = \"SearchBoxEdgeNextWC\",\r\n searchHistoryCommon = \"SearchHistoryCommon\",\r\n searchHistoryEdge = \"SearchHistoryEdge\",\r\n searchHistoryEdgenext = \"SearchHistoryEdgenext\",\r\n seeMoreButtonWindowsShell = \"SeeMoreButtonWindowsShell\",\r\n sentimentBarChart = \"SentimentBarChart\",\r\n sentimentLineChart = \"SentimentLineChart\",\r\n sentimentMap = \"SentimentMap\",\r\n sentimentResultCard = \"SentimentResultCard\",\r\n serviceWaffle = \"ServiceWaffle\",\r\n settingsDialogEdgeNext = \"SettingsDialogEdgeNext\",\r\n settingsDialogMsNews = \"SettingsDialogMsNews\",\r\n sharedLinksCard = \"SharedLinksCard\",\r\n sharedState = \"SharedState\",\r\n sharePointSitesTable= \"SharePointSitesTable\",\r\n shopContentCarousel = \"ShopContentCarousel\",\r\n shoppingCarousel = \"ShoppingCarousel\",\r\n shoppingContentCard = \"ShoppingContentCard\",\r\n shoppingSmartList = \"ShoppingSmartList\",\r\n showFeed = \"ShowFeed\",\r\n showFeedPill = \"ShowFeedPill\",\r\n simpleBanner = \"SimpleBanner\",\r\n slideShow = \"SlideShow\",\r\n smartList = \"SmartList\",\r\n social = \"Social\",\r\n sportsCard = \"SportsCard\",\r\n sportsMatchupCard = \"SportsMatchupCard\",\r\n spotlight = \"Spotlight\",\r\n spotlightPreview = \"SpotlightPreview\",\r\n starterKit = \"StarterKit\",\r\n starterKitWC = \"StarterKitWC\",\r\n storyPage = \"StoryPage\",\r\n storySnippet = \"StorySnippet\",\r\n stripe = \"Stripe\",\r\n stripeFeed = \"StripeFeed\",\r\n stripeView = \"StripeView\",\r\n summaryCard = \"SummaryCard\",\r\n summaryCardWC = \"SummaryCardWC\",\r\n superAppPage = \"SuperAppHomepage\",\r\n superappHeaderData = \"SuperappHeaderData\",\r\n tabbedInfopane = \"TabbedInfopane\",\r\n tabbedInfopaneTabPreview = \"TabbedInfopaneTabPreview\",\r\n taboolaRiver = \"TaboolaRiver\",\r\n tasksCard = \"TasksCard\",\r\n themePicker = \"ThemePicker\",\r\n toast = \"Toast\",\r\n todaysEventsCard = \"TodaysEventsCard\",\r\n todaysEventsCardWC = \"TodaysEventsCardWC\",\r\n todoCard = \"TodoCard\",\r\n todoCardWC = \"TodoCardWC\",\r\n topicsHub = \"TopicsHub\",\r\n topSites = \"TopSites\",\r\n topSitesCommon = \"TopSitesCommon\",\r\n topSitesEdge = \"TopSitesEdge\",\r\n topSitesEdgeNext = \"TopSitesEdgeNext\",\r\n topSitesEdgeNextWC = \"TopSitesEdgeNextWC\",\r\n trafficCard = \"TrafficCard\",\r\n trafficCardWC = \"TrafficCardWC\",\r\n trafficMap = \"TrafficMap\",\r\n trafficPage = \"TrafficPage\",\r\n trendingNews = \"TrendingNews\",\r\n trendingNow = \"TrendingNow\",\r\n tripleCard = \"TripleCard\",\r\n userInitiatedPageRefresh = \"UserInitiatedPageRefresh\",\r\n userProfileDisplay = \"UserProfileDisplay\",\r\n verticalLeftNav =\"VerticalLeftNav\",\r\n videoCard = \"VideoCard\",\r\n videoCardWC = \"VideoCardWC\",\r\n videoContent = \"VideoContent\",\r\n videoList = \"VideoList\",\r\n viewsArticle = \"ViewsArticle\",\r\n viewsContentHeader = \"ViewsContentHeader\",\r\n viewsGallery = \"ViewsGallery\",\r\n viewsNativeAd = \"ViewsNativeAd\",\r\n viewsPaddles = \"ViewsPaddles\",\r\n voiceSearch = \"VoiceSearch\",\r\n watchlistCard = \"WatchlistCard\",\r\n watchlistView = \"WatchlistView\",\r\n weatherCard = \"WeatherCard\",\r\n weatherCarousel = \"WeatherCarousel\",\r\n weatherData = \"WeatherData\",\r\n weatherLocationSearch = \"WeatherLocationSearch\",\r\n weatherMap = \"WeatherMap\",\r\n weatherOverview = \"WeatherOverview\",\r\n weatherPage = \"WeatherPage\",\r\n weatherInfoCard = \"WeatherInfoCard\",\r\n weatherTodayCard = \"WeatherTodayCard\",\r\n weatherTodayMini = \"WeatherTodayMini\",\r\n welcomeGreeting = \"WelcomeGreeting\",\r\n windowsPage = \"WindowsPage\",\r\n ugcCreator = \"UgcCreator\",\r\n xfeed = \"Xfeed\"\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { registerResetCallback } from \"@msnews/core\";\r\n\r\n/**\r\n * Experiences being tracked for milestone data updates. This normally includes all experience\r\n * types being tracked under various trackers such as DOM, Visual Readiness & Deferral trackers.\r\n * It is used to prevent firing of certain general milestone events from base classes so that\r\n * we're not wasting CPU cycles processing unnecessary redux actions.\r\n */\r\nlet trackingExperiences: { [experienceType: string]: boolean } = {};\r\n\r\n/**\r\n * Helper to check whether we're tracking milestone events for the given experience and the event type\r\n */\r\nexport function shouldTrackExperience(experienceType: string, shouldTrack?: boolean): boolean {\r\n return shouldTrack != null\r\n ? trackingExperiences[experienceType] = shouldTrack\r\n : trackingExperiences[experienceType];\r\n}\r\n\r\n/**\r\n * Register a callback to reset the trackingExperiences.\r\n * The callback is registered once when the module is loaded and invoked once on the server side at the beginning of each request.\r\n */\r\nregisterResetCallback(() => {\r\n trackingExperiences = {};\r\n});\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Glyph, GlyphType } from \"@msnews/icon\";\r\n\r\nimport { IntraArticleComponentType } from \"./IntraArticle.types\";\r\nimport { KeyValueArray } from \"@msnews/core\";\r\n\r\n/**\r\n * Social media provider details interface\r\n */\r\ninterface SocialMediaProvider {\r\n apiUrl: string;\r\n attribution: string;\r\n name: string;\r\n}\r\n\r\n/**\r\n * Dictionary of social media provider configuration.\r\n */\r\nconst SocialMediaProviderConfig: KeyValueArray = [];\r\nSocialMediaProviderConfig[IntraArticleComponentType.Unknown] = { apiUrl: \"\", attribution: \"\", name: \"\" };\r\nSocialMediaProviderConfig[IntraArticleComponentType.FacebookEmbed] = { apiUrl: \"//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.5&appid=689384617806917\", attribution: \"Facebook Inc.\", name: \"Facebook\" };\r\nSocialMediaProviderConfig[IntraArticleComponentType.InstagramEmbed] = { apiUrl: \"//instagram.com/embed.js\", attribution: \"Instagram Inc.\", name: \"Instagram\" };\r\nSocialMediaProviderConfig[IntraArticleComponentType.TwitterEmbed] = { apiUrl: \"//platform.twitter.com/widgets.js\", attribution: \"Twitter Inc.\", name: \"Twitter\" };\r\n\r\n/**\r\n * Enumerates the available sharing option keys\r\n * @export\r\n */\r\nenum SocialMedia {\r\n Copy = \"copy\",\r\n Email = \"email\",\r\n Facebook = \"facebook\",\r\n Line = \"line\",\r\n LinkedIn = \"linkedin\",\r\n Skype = \"skype\",\r\n Twitter = \"twitter\",\r\n VK = \"vk\",\r\n WhatsApp = \"whatsapp\"\r\n}\r\n\r\n/**\r\n * Possible target attribute to open social media linked pages\r\n */\r\nenum SocialMediaTarget {\r\n _blank = \"_blank\",\r\n _self = \"_self\",\r\n _parent = \"_parent\",\r\n _top = \"_top\",\r\n newWindow = \"newWindow\",\r\n none = \"none\"\r\n}\r\n\r\n/**\r\n * A map of social media items and its config attributes\r\n * @export\r\n * @type {[key in SocialMedia]: SocialMediaItemConfigAttributes}\r\n */\r\ntype SocialMediaConfig = {[key in SocialMedia]?: SocialMediaItemConfigAttributes};\r\n\r\n/**\r\n * The default configuration values for social media. Those can be overriden per experience\r\n * @export\r\n * @type {SocialMediaConfig}\r\n */\r\nconst SocialMediaDefaultConfig: SocialMediaConfig = {\r\n [SocialMedia.Copy]: {\r\n ariaLabel: \"copy\",\r\n backgroundColor: \"white\",\r\n color: \"black\",\r\n icon: Glyph.Copy,\r\n label: \"Copy \",\r\n target: SocialMediaTarget.none\r\n },\r\n [SocialMedia.Email]: {\r\n ariaLabel: \"share via email\",\r\n backgroundColor: \"#0078D7\",\r\n color: \"white\",\r\n icon: Glyph.Mail,\r\n label: \"Mail\",\r\n target: SocialMediaTarget._self,\r\n url: \"mailto:?subject={title}&body={body}\"\r\n },\r\n [SocialMedia.Facebook]: {\r\n ariaLabel: \"share on facebook\",\r\n backgroundColor: \"#4267B2\",\r\n color: \"white\",\r\n icon: Glyph.Facebook,\r\n label: \"Facebook\",\r\n target: SocialMediaTarget._blank,\r\n url: \"https://www.facebook.com/sharer.php?u={url}&t={title}\"\r\n },\r\n [SocialMedia.Line]: {\r\n ariaLabel: \"share on line\",\r\n backgroundColor: \"#00C300\",\r\n color: \"white\",\r\n icon: Glyph.Line,\r\n label: \"Line\",\r\n target: SocialMediaTarget._blank,\r\n url: \"https://social-plugins.line.me/lineit/share?url={url}\"\r\n },\r\n [SocialMedia.LinkedIn]: {\r\n ariaLabel: \"share on linkedin\",\r\n backgroundColor: \"#0083BE\",\r\n color: \"white\",\r\n icon: Glyph.LinkedIn,\r\n label: \"LinkedIn\",\r\n target: SocialMediaTarget._blank,\r\n url: \"https://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}&source={refererUrl}\"\r\n },\r\n [SocialMedia.Skype]: {\r\n ariaLabel: \"share on skype\",\r\n backgroundColor: \"#33BFFC\",\r\n color: \"white\",\r\n icon: Glyph.Skype,\r\n label: \"Skype\",\r\n target: SocialMediaTarget._blank,\r\n url: \"https://web.skype.com/share?url={url}&flow_id={flowid}&source=msn\"\r\n },\r\n [SocialMedia.Twitter]: {\r\n ariaLabel: \"share on twitter\",\r\n backgroundColor: \"#20A2F2\",\r\n color: \"white\",\r\n icon: Glyph.Twitter,\r\n label: \"Twitter\",\r\n target: SocialMediaTarget._blank,\r\n url: \"https://twitter.com/share?url={url}&text={title}&original_referer={refererUrl}\"\r\n },\r\n [SocialMedia.WhatsApp]: {\r\n ariaLabel: \"share on whatsapp\",\r\n backgroundColor: \"#25D366\",\r\n color: \"white\",\r\n icon: Glyph.WhatsApp,\r\n label: \"WhatsApp\",\r\n target: SocialMediaTarget._blank,\r\n url: \"https://web.whatsapp.com/send?text={url}\"\r\n },\r\n [SocialMedia.VK]: {\r\n ariaLabel: \"share on vk.com\",\r\n backgroundColor: \"#4680C2\",\r\n color: \"white\",\r\n icon: Glyph.Vkcom,\r\n label: \"VK\",\r\n target: SocialMediaTarget._blank,\r\n url: \"http://vk.com/share.php?url={url}\"\r\n }\r\n};\r\n\r\n/**\r\n * The config attributed type for a given social media\r\n * @export\r\n */\r\ntype SocialMediaItemConfigAttributes = {\r\n /** Arial labe text */\r\n ariaLabel?: string,\r\n /** Attributes to be spread in the anchor tag element */\r\n attributes?: React.HTMLAttributes,\r\n /** Background color of the icon div */\r\n backgroundColor?: string,\r\n /** Foreground color of the icon div */\r\n color?: string,\r\n /** Fill colour for when using svg icons */\r\n fill?: string,\r\n /** Icon glyph to override default value */\r\n icon?: GlyphType,\r\n iconWidthInPixel?: number,\r\n iconHeightInPixel?: number,\r\n /** Label text to override default value */\r\n label?: string,\r\n /** To be used in js window.open features param if target = newWindow */\r\n newWindowOptions?: any,\r\n /** telemetry click event should be handled by the caller using this callback */\r\n newWindowTelemetryCall?: (event: any) => void,\r\n /** ocid to be appended in the shared link */\r\n ocid?: string,\r\n /** target to be placed in anchor tag. newWindow has a customized js method that can make use of newWindowOptions attribute */\r\n target?: SocialMediaTarget,\r\n /** Share url to be hard overriden */\r\n url?: string\r\n};\r\n\r\nexport {\r\n SocialMedia,\r\n SocialMediaProvider,\r\n SocialMediaProviderConfig,\r\n SocialMediaConfig,\r\n SocialMediaDefaultConfig,\r\n SocialMediaItemConfigAttributes,\r\n SocialMediaTarget\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError } from \"@msnews/core-contracts\";\r\nimport { Telemetry } from \"@msnews/telemetry-contracts\";\r\n\r\n/**\r\n * Logs the given exception to telemetry.\r\n * @param error The error thrown.\r\n * @param appError The app error entry to log under.\r\n * @param message A message about what failed. This is what the error will be bucketed under for reporting purposes. The WHY will be included in the exception details.\r\n * @param customMessage details message for debug purpose\r\n */\r\nexport function logException(error: Error, appError: AppError, message: string, customMessage?: string): void {\r\n const errorObj = createError(appError, message, customMessage || error && error.toString());\r\n errorObj.pb.stack = error && error.stack;\r\n Telemetry.sendAppErrorEvent(errorObj);\r\n}\r\n\r\n/**\r\n * Helper that updates the property bag message and then fires the app error\r\n * @param appError The apperror\r\n * @param message The message for the error\r\n * @param customMessage The custom message to add to the property bag\r\n */\r\nexport function logError(appError: AppError, message: string, customMessage?: string): void {\r\n Telemetry.sendAppErrorEvent(createError(appError, message, customMessage));\r\n}\r\n\r\n/**\r\n * Helper to create an error for logging with message and customMessage properties without having\r\n * to go manually clone the error object, or property bag, etc.\r\n * @param baseError - The base error object to use as prototype for creating the error\r\n * @param message - The custom message to use for the error\r\n * @param customMessage - The custom message that may contain strings that do not aggregate well (i.e., unique / per request data)\r\n */\r\nexport function createError(baseError: AppError, message: string, customMessage?: string): AppError {\r\n return {\r\n ...baseError,\r\n message: message || baseError.message,\r\n pb: customMessage\r\n ? { ...baseError.pb, customMessage }\r\n : baseError.pb\r\n };\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { IsForceTimestampExpired, getRenderCacheKeys } from \"./PersistHelpers\";\r\nimport { RenderCache, RenderCacheKeys } from \"./RenderCache\";\r\nimport { RenderCacheErrors, logger } from \"@msnews/diagnostics\";\r\nimport { appEnvironment, getLocalStorage } from \"@msnews/core\";\r\nimport { batchCSS, renderCacheKeyOfNormalizedKeys, scrapeDom, windowAvailable } from \"./Helper\";\r\nimport { defaultExpirationTimeMs, expirationPrefix, forceTimestampPrefix, jssMapSuffix, keysPrefix, storagePrefix } from \"./Constants\";\r\n\r\nimport { RenderCacheConfig } from \"./RenderCacheConfig\";\r\nimport { Telemetry } from \"@msnews/telemetry-contracts\";\r\nimport { userInteractionHappened } from \"./UserInteractionWatcher\";\r\n\r\nconst jssGeneratedClassesMap: { [instanceId: string]: Array } = {};\r\nlet jssCaptureCompleted = false;\r\n\r\n/**\r\n * Persist the complete render state (DOM and Styles) necessary to restore the rendered Peregrine SPA page, without needing to\r\n * first load all of the Peregrine experience bundles.\r\n * This is the equivalent of using Server Side Rendering to generate the initial DOM, though in this case the initial DOM elements and styles\r\n * are persisted and loaded locally on the client.\r\n * @param config Render cache configuration.\r\n * @param stateJson The state to persist in JSON form.\r\n * @param markers List of performance markers, which will be fired upon cache restore.\r\n * @param invokeFallback Canvas specific fallback function to be executed on jss exception.\r\n */\r\nexport function persistRenderCache(config: RenderCacheConfig, stateJson?: string, markers?: string[], invokeFallback?: (message: string) => void): void {\r\n jssCaptureCompleted = true;\r\n\r\n if (!config || !getLocalStorage().supported || !window.renderCacheEnabled) {\r\n return;\r\n }\r\n\r\n // Get normalized render cache keys\r\n const renderCacheKeys: RenderCacheKeys = getRenderCacheKeys(config && config.normalizeKeyParamsList);\r\n\r\n // Check if we need to refresh cache by force. Used as Failsafe if user stuck in broken render cache loop.\r\n if (IsForceTimestampExpired(config && config.forceExpirationTime)) {\r\n removeRenderCache();\r\n logger.log(\"[RC Info] Force timestamp expired: removing render cache\");\r\n return;\r\n }\r\n\r\n // Found an issue with User interaction check. Its inconsistent and as we are not deleting RC on this,\r\n // users may get stuck in this state.\r\n if (userInteractionHappened()) {\r\n return;\r\n }\r\n\r\n // When critical jss mismatch is detected - do not persist and based on config decide to purge and fallback\r\n if (criticalJssMismatchDetected(config, invokeFallback)) {\r\n return;\r\n }\r\n\r\n let { includeNewsFeed, expirationTime, newsFeedExpirationTime } = config;\r\n\r\n // Persist build version recorded for the page being render cached\r\n const buildVersion = appEnvironment.BuildVersion || \"\";\r\n\r\n // Form Cache Object\r\n const renderCacheStorageObj: RenderCache = {\r\n dom: scrapeDom(includeNewsFeed),\r\n batch_css: batchCSS(),\r\n build_version: buildVersion,\r\n markers,\r\n state: stateJson\r\n };\r\n\r\n expirationTime = (includeNewsFeed ? newsFeedExpirationTime : expirationTime)\r\n || defaultExpirationTimeMs;\r\n\r\n // Try to persist Render Cache and Timestamp\r\n const expiresOn: number = new Date().getTime() + expirationTime;\r\n\r\n getLocalStorage().setObject(renderCacheKeys.expn, expiresOn);\r\n getLocalStorage().setObject(renderCacheKeys.keyn, renderCacheStorageObj);\r\n}\r\n\r\n/**\r\n * Deletes render cache local storage for all domains\r\n */\r\nexport function removeRenderCache(): void {\r\n if (!getLocalStorage().supported) {\r\n return;\r\n }\r\n\r\n // The render cache Urls are currently not normalized, so we have different render\r\n // cache saved for DHP and NTP page. But, some of the properties (example: market)\r\n // is shared between those pages. To ensure a purge on render cache on one page,\r\n // does purge the other render cache as well, and avoid breaking the page layout,\r\n // we remove all render cache keys on removeRenderCache\r\n getLocalStorage().removeSubstringKeys(storagePrefix);\r\n getLocalStorage().removeSubstringKeys(expirationPrefix);\r\n getLocalStorage().removeSubstringKeys(forceTimestampPrefix);\r\n getLocalStorage().removeSubstringKeys(keysPrefix);\r\n getLocalStorage().removeSubstringKeys(jssMapSuffix);\r\n}\r\n\r\n/**\r\n * Deletes render cache local storage only for current href\r\n */\r\nexport function removeCurrentRenderCache(): void {\r\n if (!getLocalStorage().supported) {\r\n return;\r\n }\r\n\r\n const renderCacheKeys: RenderCacheKeys = getRenderCacheKeys();\r\n getLocalStorage().removeObject(renderCacheKeys.keyn);\r\n getLocalStorage().removeObject(renderCacheKeys.frcn);\r\n getLocalStorage().removeObject(renderCacheKeys.expn);\r\n getLocalStorage().removeObject(renderCacheKeys.jssn);\r\n getLocalStorage().removeObject(renderCacheKeyOfNormalizedKeys);\r\n}\r\n\r\n/**\r\n * Capture class names generated by JSS and maintain inside a dictionary.\r\n * @param key key for class name\r\n * @param val JSS val for class name\r\n */\r\nexport function captureJssGeneratedClasses(key: string, val: string): void {\r\n if (jssCaptureCompleted || !(windowAvailable && window.renderCacheEnabled)) {\r\n return;\r\n }\r\n\r\n if (jssGeneratedClassesMap[key]) {\r\n jssGeneratedClassesMap[key].push(val);\r\n } else {\r\n jssGeneratedClassesMap[key] = [val];\r\n }\r\n}\r\n\r\n/**\r\n * Compares stored JSS Map with current JSS Map and log corresponding app errors\r\n * @param config Render cache configuration.\r\n * @param invokeFallback Canvas specific fallback function to be executed on jss exception.\r\n * @returns boolean - returns true when there is critical jss mismatch, otherwise false\r\n */\r\nexport function criticalJssMismatchDetected(config: RenderCacheConfig, invokeFallback?: (message: string) => void): boolean {\r\n // if we haven't captured any generated classes log an app error and return\r\n if (Object.keys(jssGeneratedClassesMap).length === 0) {\r\n logJssMismatchAppError(RenderCacheErrors.JssStyleMismatchWarning, \"Generated classes map is empty. \");\r\n return false;\r\n }\r\n\r\n const { isJssIdentical, isCriticalJssIdentical, jssWarningMessage, jssErrorMessage } = compareJssMap(config);\r\n\r\n // in case of non critical JSS mismatch we just log an app warning\r\n if (!isJssIdentical) {\r\n if (config && config.enableJssMismatchWarningLogs) {\r\n logJssMismatchAppError(RenderCacheErrors.JssStyleMismatchWarning, jssWarningMessage);\r\n }\r\n } else {\r\n // in case there are no mismatches - write back the newly generated class map back to localstorage\r\n Object.keys(jssGeneratedClassesMap).length && getLocalStorage().setObject(getRenderCacheKeys().jssn, jssGeneratedClassesMap);\r\n logger.log(\"[RC Info] No style mismatch found\");\r\n }\r\n\r\n // in case of critical JSS mismatch, log an app error and based on config\r\n // decide to purge and invoke canvas specific fallback\r\n if (!isCriticalJssIdentical) {\r\n logJssMismatchAppError(RenderCacheErrors.JssStyleCriticalMismatchError, jssErrorMessage);\r\n\r\n if (config && config.enablePurgeOnJssMismatch) {\r\n removeRenderCache();\r\n\r\n if (config && config.enableFallbackOnJssMismatch && invokeFallback && typeof invokeFallback === \"function\") {\r\n invokeFallback(jssErrorMessage);\r\n }\r\n }\r\n }\r\n\r\n return !isCriticalJssIdentical;\r\n}\r\n\r\n/**\r\n * Compares stored JSS Map with current JSS Map and identifies if those are critical vs non critical error message with corresponding error message\r\n * @param config Render cache configuration.\r\n * @returns object - returns mismatch and error information\r\n */\r\nfunction compareJssMap(config: RenderCacheConfig): { isJssIdentical: boolean, isCriticalJssIdentical: boolean, jssWarningMessage: string, jssErrorMessage: string } {\r\n let jssErrorMessage = \"\";\r\n let jssWarningMessage = \"\";\r\n let isCriticalJssIdentical = true;\r\n let isJssIdentical = true;\r\n\r\n const jssCriticalClassListMap: { [className: string]: boolean } = getJssCriticalClassListMap(config && config.jssCriticalClassList || []);\r\n\r\n const storedMap = getLocalStorage().getObject(getRenderCacheKeys().jssn);\r\n if (storedMap && typeof storedMap === \"object\" && Object.keys(storedMap).length) {\r\n // this for loop compares every item in stored Map of Css class names to the current page instance map\r\n for (const key in storedMap) {\r\n const storedClasses = storedMap[key];\r\n\r\n // if stored class isn't correctly set, log a non critical app app warning and return\r\n if (!Array.isArray(storedClasses)) {\r\n return { isJssIdentical: false, isCriticalJssIdentical: true, jssWarningMessage: `Stored classes expected to be an array, but received something else. stored val: ${storedClasses}. `, jssErrorMessage: \"\" };\r\n }\r\n\r\n /*\r\n We only care about extra classes being present in the stored classes. If the current page\r\n instance has new class names not present in the stored map, we do not consider this a mismatch\r\n since the render cache snapshot won't be broken due to this scenario. Also if there are no\r\n classes corresponding to a key in the current map, detect that as a mismatch as well.\r\n\r\n --- Scenario 1: (detect as a mismatch) ---\r\n storedClasses : k1: { [c1, c2, c3] }\r\n currentClasses: k1: { [c1, c2] }\r\n\r\n --- Scenario 2: (do not detect as a mismatch) ---\r\n storedClasses : k1: { [c1, c2] }\r\n currentClasses: k1: { [c1, c2, c3] }\r\n\r\n --- Scenario 3: (detect as a mismatch) ---\r\n storedClasses : k1: { [c1, c2] }\r\n currentClasses: k2: { [c3, c4, c5] }\r\n */\r\n const currentClasses = jssGeneratedClassesMap[key];\r\n if (currentClasses) {\r\n if (storedClasses.some(className => currentClasses.indexOf(className) === -1)) {\r\n const errorMessage = `JSSError: val mismatch for key: ${key}, val stored: ${storedClasses}, new val: ${currentClasses}. `;\r\n if (jssCriticalClassListMap[key]) {\r\n jssErrorMessage += errorMessage;\r\n isCriticalJssIdentical = false;\r\n }\r\n\r\n jssWarningMessage += errorMessage;\r\n isJssIdentical = false;\r\n }\r\n } else {\r\n const errorMessage = `JSSError: val mismatch for key: ${key}, val stored: ${storedClasses}, new val: '' (empty). `;\r\n if (jssCriticalClassListMap[key]) {\r\n jssErrorMessage += errorMessage;\r\n isCriticalJssIdentical = false;\r\n }\r\n\r\n jssWarningMessage += errorMessage;\r\n isJssIdentical = false;\r\n }\r\n }\r\n }\r\n\r\n return {\r\n isJssIdentical: isJssIdentical,\r\n isCriticalJssIdentical: isCriticalJssIdentical,\r\n jssWarningMessage: jssWarningMessage,\r\n jssErrorMessage: jssErrorMessage\r\n };\r\n}\r\n\r\n/**\r\n * Helper function to log render cache jss mismatch app errors\r\n * @param errorParams The error params.\r\n * @param customMessage The custom message to be logged.\r\n */\r\nfunction logJssMismatchAppError(errorParams: any, customMessage: string): void {\r\n Telemetry.sendAppErrorEvent({\r\n ...errorParams,\r\n message: \"RC JSS mismatch issue\",\r\n pb: {\r\n ...errorParams.pb,\r\n customMessage: customMessage\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Helper function to generate critical class list map\r\n * @param jssCriticalClassList The critical class list array\r\n * @returns jssCriticalClassListMap The map of critical class list\r\n */\r\nfunction getJssCriticalClassListMap(jssCriticalClassList: [string?]) {\r\n const jssCriticalClassListMap: { [className: string]: boolean } = {};\r\n jssCriticalClassList.forEach((key) => {\r\n jssCriticalClassListMap[key] = true;\r\n jssCriticalClassListMap[key + \" - jssStyleSheet\"] = true;\r\n });\r\n\r\n return jssCriticalClassListMap;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Defines valid milestone event types\r\n */\r\nexport enum ExperienceMilestoneEventTypes {\r\n /**\r\n * Fired when all the initial DOM elements for the experience have been added (i.e. onComponentDidMount)\r\n * The DOM may not be completely rendered by the browser when then milestone is reached\r\n */\r\n domComplete,\r\n\r\n /**\r\n * Fired if the experience hits an unrecoverable error\r\n */\r\n error,\r\n\r\n /**\r\n * Fired when the experience is initialized\r\n */\r\n initialized,\r\n\r\n /**\r\n * Fired when the experience is initially rendered. This is after the browser has processed all of the DOM elements that were\r\n * added in the experience render function.\r\n */\r\n rendered,\r\n\r\n /**\r\n * Fired when the experience's stale state revalidation completes.\r\n */\r\n staleRevalidationComplete,\r\n\r\n /**\r\n * Fired when the experience is visually ready, which is a business metric and defined in the MSNews Performance Metrics documentation.\r\n */\r\n visuallyReady,\r\n\r\n /**\r\n * Fired when the experience starts loading\r\n */\r\n startLoading\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ExperienceLoadingState } from \"./ExperienceLoadingState\";\r\n\r\n/**\r\n * Defines custom deferral event types which is not part of page/experience lifecycle event types\r\n */\r\nexport enum CustomDeferralEventTypes {\r\n\r\n /**\r\n * The page level milestone when experiences outside the viewport are transitioning into viewport\r\n */\r\n belowTheFoldTransitionStart\r\n}\r\n\r\n/**\r\n * Defines valid deferral events used during milestone tracking\r\n * The event types should be mapped with loading types so that they have the exact same numeric value.\r\n */\r\nexport enum ExperienceDeferralEventTypes {\r\n /**\r\n * The startLoading milestone of dependent experience\r\n */\r\n startLoading = ExperienceLoadingState.startLoading,\r\n /**\r\n * The loaded milestone of dependent experience\r\n */\r\n loaded = ExperienceLoadingState.loaded,\r\n /**\r\n * The rendered milestone of dependent experience\r\n */\r\n rendered = ExperienceLoadingState.rendered,\r\n /**\r\n * The domComplete milestone of dependent experience\r\n */\r\n domComplete = ExperienceLoadingState.domComplete,\r\n /**\r\n * The visuallyReady milestone of dependent experience\r\n */\r\n visuallyReady = ExperienceLoadingState.visuallyReady,\r\n /**\r\n * The page level milestone when experiences in viewport are visuallyReady\r\n */\r\n aboveTheFoldVisuallyReady,\r\n /**\r\n * The page level milestone when experiences outside the viewport are transitioning into viewport\r\n */\r\n belowTheFoldTransitionStart = CustomDeferralEventTypes.belowTheFoldTransitionStart,\r\n /**\r\n * The page level milestone when hydration has completed\r\n */\r\n hydrationComplete\r\n}\r\n\r\n/**\r\n * Helper to lookup the equivalent deferrel event type given the experience loadings state\r\n */\r\nexport const ExperienceLoadingStateToDeferralEventType = new Map([\r\n [ExperienceLoadingState.loaded, ExperienceDeferralEventTypes.loaded],\r\n [ExperienceLoadingState.rendered, ExperienceDeferralEventTypes.rendered],\r\n [ExperienceLoadingState.domComplete, ExperienceDeferralEventTypes.domComplete],\r\n [ExperienceLoadingState.visuallyReady, ExperienceDeferralEventTypes.visuallyReady]\r\n]);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ExperienceDeferralEventTypes, ExperienceLoadingState } from \"../data-model\";\r\n\r\nimport { registerResetCallback } from \"@msnews/core\";\r\n\r\n/**\r\n * Identifies a referenced experience and its dependents\r\n */\r\nexport interface ExperienceDependents {\r\n /**\r\n * Determines the state of deferral identifier experience.\r\n */\r\n currentState: ExperienceLoadingState;\r\n\r\n /**\r\n * The dependent set of experiences and its associated state mapped to a deferred event type.\r\n * An experience moves from deferred to resolvedForLoad or resolvedForRender state when deferral identifier experienceType/Group currentState matches deferred state.\r\n */\r\n referencedDependentsDeferralMap: Map>\r\n}\r\n\r\n// Keeps track of Experience Identifier to its referenced dependents mapping for loadAfter/renderAfter scenario\r\n// Experience Identifier, acts as a reference to resolve its dependents.\r\n// The key (experienceIdentifier) should be either experienceType or experienceGroup\r\nexport let experienceDeferralDependencyMap: Map = new Map();\r\n\r\n/**\r\n * Register a callback to reset the experienceDeferralDependencyMap.\r\n * The callback is registered once when the module is loaded and invoked once on the server side at the beginning of each request.\r\n */\r\nregisterResetCallback(() => {\r\n experienceDeferralDependencyMap = new Map();\r\n});\r\n\r\n/**\r\n * Checks if experience's dependency is resolved\r\n * @returns true if dependent experience has been resolved.\r\n * @param experienceDependency - dependent experience\r\n * @param deferralEventType - deferral EventType\r\n */\r\nexport function isExperienceDependencyResolved(experienceDependency: string, deferralEventType: ExperienceDeferralEventTypes): boolean {\r\n\r\n const dependents = experienceDeferralDependencyMap.get(experienceDependency);\r\n return !dependents\r\n || dependents.currentState >= deferralEventType;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { CustomDeferralEventTypes, DeferralEventType, ExperienceDeferralEventTypes, ExperienceDeferralInfo, ExperienceDeferralMetadata, ExperienceLoadingState, ExperienceMilestoneEventTypes } from \"./data-model\";\r\nimport { IActionPayload, PageBase } from \"@msnews/experiences-redux\";\r\nimport { MilestoneDataActions, UpdateExperienceCurrentStateArgs, UpdateExperienceDeferralArgs, UpdateTimingArgs } from \"./MilestoneData.actions\";\r\nimport { defaultInstanceKeyName, defaultTimeValue } from \"./MilestoneData.constants\";\r\n\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\nimport { ExperienceInstanceMilestoneModel } from \"./data-model/ExperienceInstanceMilestoneModel\";\r\nimport { MilestoneDataConnector } from \"./MilestoneData.connector\";\r\nimport { MilestonePluginEvents } from \"./data-model/MilestonePluginEvents\";\r\nimport { headData } from \"@msnews/core\";\r\nimport { isExperienceDependencyResolved } from \"./data-management/ExperienceDeferralDependencyTrackerState\";\r\nimport { pluginUtils } from \"./utils/MilestonePluginUtils\";\r\n\r\n/**\r\n * Helper method to get the milestone data connector instance.\r\n * @returns Milestone data connector promise.\r\n */\r\nexport function getMilestoneDataConnector(): MilestoneDataConnector {\r\n return PageBase.getInstance().rootReducer.connector(\r\n ConnectorNamespaces.MilestoneData\r\n ) as MilestoneDataConnector;\r\n}\r\n\r\n/**\r\n * Helper method to get default instance of an experience.\r\n * @returns Experience Milestone instance data.\r\n */\r\nexport function getDefaultExperienceInstance(\r\n experienceType: string\r\n): ExperienceInstanceMilestoneModel {\r\n const connector = getMilestoneDataConnector();\r\n\r\n if (!connector) {\r\n return;\r\n }\r\n\r\n const milestones = connector.getCurrentState().perExperienceMilestones;\r\n const experience = milestones && milestones.get(experienceType);\r\n let instance: ExperienceInstanceMilestoneModel;\r\n\r\n if (experience) {\r\n instance = experience.perInstanceMilestones.get(defaultInstanceKeyName);\r\n }\r\n\r\n return instance;\r\n}\r\n\r\n/**\r\n * returns promise based experience load delegate, which resolves when experience dependent event is fired.\r\n * @returns A callback promise which resolves to boolean when associated experience is ready to be loaded\r\n * If null is returned experience is not deferred and should be loaded/rendered right away.\r\n */\r\nexport function getExperienceLoadDelegate(\r\n experienceType: string\r\n): ExperienceDeferralMetadata {\r\n\r\n const instance: ExperienceInstanceMilestoneModel = getDefaultExperienceInstance(experienceType);\r\n\r\n // return null if dependent deferral event has already been fired\r\n if (!instance || getDeferralLoadEventReadyState(instance)) {\r\n return null;\r\n }\r\n\r\n if (instance.shouldLoad && instance.loadAfter) {\r\n\r\n const deferralEventType = getDeferralEventMetadata(instance.loadAfter);\r\n return { deferralType: deferralEventType, shouldResolve: instance.shouldLoad };\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * returns a promise that is resolved when\r\n * Milestone data connector was not initialized\r\n * Milestone data connector has already fired the above the fold visual ready action\r\n * Milestone data connector hasn't fired above the fold visual ready action so an observer is\r\n * set on the action to resolve the promise when that callback is invoked\r\n */\r\nexport function waitForAboveTheFoldVisuallyReadyAsync(): Promise {\r\n const milestoneDataConnector = getMilestoneDataConnector();\r\n\r\n if (!milestoneDataConnector) {\r\n return Promise.resolve();\r\n }\r\n\r\n if (isAboveTheFoldVisuallyReady()) {\r\n return Promise.resolve();\r\n }\r\n\r\n return new Promise(resolve => {\r\n MilestoneDataActions.updateAboveTheFoldVisuallyReady.registerObserver(((actionPayload: IActionPayload) => {\r\n resolve();\r\n }));\r\n });\r\n}\r\n\r\n/**\r\n * returns a promise that is resolved when\r\n * Milestone data connector was not initialized\r\n * Milestone data connector has already fired the page reveal started action\r\n * Milestone data connector hasn't fired page reveal started action so an observer is\r\n * set on the action to resolve the promise when that callback is invoked\r\n */\r\nexport function requestPageRevealStartedAsync(): Promise {\r\n const milestoneDataConnector = getMilestoneDataConnector();\r\n\r\n if (!headData.IsPrerender || !milestoneDataConnector) {\r\n return Promise.resolve();\r\n }\r\n\r\n if (isPageRevealStarted()) {\r\n return Promise.resolve();\r\n }\r\n\r\n return new Promise(resolve => {\r\n MilestoneDataActions.updatePageRevealStart.registerObserver(((actionPayload: IActionPayload) => {\r\n resolve();\r\n }));\r\n });\r\n}\r\n\r\n/**\r\n * returns a promise that is resolved when\r\n * Milestone data connector was not initialized\r\n * Milestone data connector has already fired the page reveal completed action\r\n * Milestone data connector hasn't fired page reveal completed action so an observer is\r\n * set on the action to resolve the promise when that callback is invoked\r\n */\r\nexport function requestPageRevealCompletedAsync(): Promise {\r\n const milestoneDataConnector = getMilestoneDataConnector();\r\n\r\n if (!headData.IsPrerender || !milestoneDataConnector) {\r\n return Promise.resolve();\r\n }\r\n\r\n if (isPageRevealCompleted()) {\r\n return Promise.resolve();\r\n }\r\n\r\n return new Promise(resolve => {\r\n MilestoneDataActions.updatePageRevealComplete.registerObserver(((actionPayload: IActionPayload) => {\r\n resolve();\r\n }));\r\n });\r\n}\r\n\r\n/**\r\n * returns a promise that is resolved when\r\n * Milestone data connector was not initialized\r\n * Milestone data connector hasn't fired page reveal started action so an observer is\r\n * set on the action to resolve the promise when that callback is invoked\r\n */\r\nexport function pageRevealStartedObserver(): Promise {\r\n const milestoneDataConnector = getMilestoneDataConnector();\r\n\r\n if (!milestoneDataConnector) {\r\n return Promise.resolve();\r\n }\r\n\r\n return new Promise(resolve => {\r\n MilestoneDataActions.updatePageRevealStart.registerObserver(((actionPayload: IActionPayload) => {\r\n resolve();\r\n }));\r\n });\r\n}\r\n\r\n/**\r\n * returns promise based experience render delegate, which resolves when experience dependent event is fired.\r\n * @returns A callback promise which resolves to boolean when associated experience is ready to be rendered.\r\n * If null is returned experience is not deferred and should be loaded/rendered right away.\r\n */\r\nexport function getExperienceRenderDelegate(\r\n experienceType: string\r\n): ExperienceDeferralMetadata {\r\n\r\n const instance: ExperienceInstanceMilestoneModel = getDefaultExperienceInstance(experienceType);\r\n\r\n // return null if dependent deferral event has already been fired\r\n if (!instance || getDeferralRenderEventReadyState(instance)) {\r\n return null;\r\n }\r\n\r\n if (instance.shouldRender && instance.renderAfter) {\r\n\r\n const deferralEventType = getDeferralEventMetadata(instance.renderAfter);\r\n return { deferralType: deferralEventType, shouldResolve: instance.shouldRender };\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Execute milestone event hooks\r\n */\r\nexport async function executeMilestoneEventPlugins(eventType: MilestonePluginEvents): Promise {\r\n\r\n const connector = getMilestoneDataConnector();\r\n\r\n if (!connector) {\r\n return;\r\n }\r\n\r\n const plugins = connector.getCurrentState().plugins;\r\n\r\n if (!plugins || plugins.length === 0) {\r\n return;\r\n }\r\n\r\n const filteredPlugins = pluginUtils.filter(plugins, eventType);\r\n\r\n for (const plugin of filteredPlugins) {\r\n if (plugin[eventType] !== undefined) {\r\n await plugin[eventType].call(plugin);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Return dependent deferral event ready state\r\n * @param instance - Experience instance\r\n */\r\nfunction getDeferralLoadEventReadyState(instance: ExperienceInstanceMilestoneModel): boolean {\r\n\r\n let deferralEventReady: boolean;\r\n\r\n switch (instance.loadAfter.eventType) {\r\n case ExperienceDeferralEventTypes.aboveTheFoldVisuallyReady:\r\n deferralEventReady = isAboveTheFoldVisuallyReady();\r\n break;\r\n\r\n case ExperienceDeferralEventTypes.belowTheFoldTransitionStart:\r\n deferralEventReady = isBelowTheFoldTransitionStarted();\r\n break;\r\n\r\n case ExperienceDeferralEventTypes.hydrationComplete:\r\n deferralEventReady = isHydrationComplete();\r\n break;\r\n\r\n default:\r\n deferralEventReady = isExperienceDependencyResolved(instance.loadAfter.experienceType, instance.loadAfter.eventType);\r\n }\r\n\r\n return deferralEventReady;\r\n}\r\n\r\n/**\r\n * Return dependent deferral event ready state\r\n * @param instance - Experience instance\r\n */\r\nfunction getDeferralRenderEventReadyState(instance: ExperienceInstanceMilestoneModel): boolean {\r\n\r\n let deferralEventReady: boolean;\r\n\r\n switch (instance.renderAfter.eventType) {\r\n case ExperienceDeferralEventTypes.aboveTheFoldVisuallyReady:\r\n deferralEventReady = isAboveTheFoldVisuallyReady();\r\n break;\r\n\r\n case ExperienceDeferralEventTypes.belowTheFoldTransitionStart:\r\n deferralEventReady = isBelowTheFoldTransitionStarted();\r\n break;\r\n\r\n case ExperienceDeferralEventTypes.hydrationComplete:\r\n deferralEventReady = isHydrationComplete();\r\n break;\r\n\r\n default:\r\n deferralEventReady = isExperienceDependencyResolved(instance.loadAfter.experienceType, instance.renderAfter.eventType);\r\n }\r\n\r\n return deferralEventReady;\r\n}\r\n\r\n/**\r\n * Returns true if above the fold is ready\r\n */\r\nfunction isAboveTheFoldVisuallyReady(): boolean {\r\n const connector = getMilestoneDataConnector();\r\n\r\n if (!connector) {\r\n return false;\r\n }\r\n\r\n const { aboveTheFoldVisuallyReady } = connector.getCurrentState();\r\n return Boolean(\r\n aboveTheFoldVisuallyReady\r\n && aboveTheFoldVisuallyReady.endTime !== defaultTimeValue\r\n );\r\n}\r\n\r\n/**\r\n * Returns true if page reveal has started\r\n */\r\nfunction isPageRevealStarted(): boolean {\r\n const connector = getMilestoneDataConnector();\r\n\r\n if (!connector) {\r\n return false;\r\n }\r\n\r\n const { pageReveal } = connector.getCurrentState();\r\n return Boolean(\r\n pageReveal\r\n && pageReveal.startTime!== defaultTimeValue\r\n );\r\n}\r\n\r\n/**\r\n * Returns true if page reveal has completed\r\n */\r\nfunction isPageRevealCompleted(): boolean {\r\n const connector = getMilestoneDataConnector();\r\n\r\n if (!connector) {\r\n return false;\r\n }\r\n\r\n const { pageReveal } = connector.getCurrentState();\r\n return Boolean(\r\n pageReveal\r\n && pageReveal.endTime!== defaultTimeValue\r\n );\r\n}\r\n\r\n/**\r\n * Returns true if below the fold transition has started\r\n */\r\nfunction isBelowTheFoldTransitionStarted(): boolean {\r\n const connector = getMilestoneDataConnector();\r\n\r\n if (!connector) {\r\n return false;\r\n }\r\n\r\n return connector.getCurrentState().belowTheFoldTransitionStart;\r\n}\r\n\r\n/**\r\n * Update deferral event metadata\r\n * @param deferralInfo - Tracks deferral information used by an experience to determine when it should load/render\r\n * @returns - DeferralEventType, this can be either standard or custom depending upon what type of deferral has been used for experience deferral\r\n */\r\nfunction getDeferralEventMetadata(deferralInfo: ExperienceDeferralInfo): DeferralEventType {\r\n return deferralInfo.eventType in CustomDeferralEventTypes\r\n ? DeferralEventType.CustomEventBasedDeferral\r\n : DeferralEventType.StandardEventBasedDeferral;\r\n}\r\n\r\n/**\r\n * Return trues if hydration of SSR response is complete\r\n */\r\nfunction isHydrationComplete(): boolean {\r\n const connector = getMilestoneDataConnector();\r\n\r\n if (!connector) {\r\n return false;\r\n }\r\n\r\n return connector.getCurrentState().hydrationComplete;\r\n}\r\n\r\n/**\r\n * Helper to create deferral info\r\n * @param deferralInfo - Tracks deferral information used by an experience to determine when it should load/render\r\n * @param experienceType - Experience Type - Defines an experience\r\n * @param experienceGroup - Associated Experience Group\r\n * @param experienceInstance - Defines an instance of the Experience\r\n */\r\nexport function createDeferralInfo(\r\n deferralInfo: ExperienceDeferralInfo,\r\n experienceType: string,\r\n experienceGroup?: string,\r\n experienceInstance?: string\r\n): UpdateExperienceDeferralArgs {\r\n\r\n return {\r\n deferralInfo,\r\n experienceType,\r\n experienceGroup,\r\n experienceInstance\r\n };\r\n}\r\n\r\n/**\r\n * Helper to create experience state update arguments.\r\n * @param experienceType - Experience Type - Defines an experience\r\n * @param currentState - Current Milestone of the experience e.g initialized, loaded, deferred etc\r\n * @param experienceGroup - Associated Experience Group\r\n * @param experienceInstance - Defines an instance of the Experience\r\n */\r\nexport function createExperienceStateUpdate(\r\n experienceType: string,\r\n currentState: ExperienceLoadingState,\r\n experienceGroup?: string,\r\n experienceInstance?: string\r\n): UpdateExperienceCurrentStateArgs {\r\n\r\n return {\r\n experienceType,\r\n currentState,\r\n experienceGroup,\r\n experienceInstance\r\n };\r\n}\r\n\r\n/**\r\n * Creates a timing update arguments\r\n * @param experienceType - Experience Type - Defines an experience\r\n * @param experienceGroup - Associated Experience Group\r\n * @param experienceInstance - Defines an instance of the Experience\r\n * @param startTime - start time fo the milestone e.g. startTime of loaded milestone\r\n * @param endTime - end time fo the milestone e.g. endTime of loaded milestone\r\n */\r\nexport function createTimingUpdate(\r\n experienceType: string,\r\n experienceGroup?: string,\r\n experienceInstance?: string,\r\n startTime?: number,\r\n endTime?: number\r\n): UpdateTimingArgs {\r\n\r\n return {\r\n experienceType,\r\n experienceGroup,\r\n experienceInstance,\r\n startTime,\r\n endTime\r\n };\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Default key value for looking up experience instances\r\n */\r\nexport const defaultInstanceKeyName = \"default\";\r\n\r\n/**\r\n * Default time value for start/end time\r\n */\r\nexport const defaultTimeValue = -1;\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * The \"DeferralHandlerSignature\" is a callback signature is called used when an experience is deferred on the callback to be resolved.\r\n * This callback should return a Promise that resolves with a boolean.\r\n */\r\nexport type DeferralHandlerSignature = () => Promise;\r\n\r\n/**\r\n * Deferral type of an experience\r\n */\r\nexport enum DeferralEventType {\r\n /**\r\n * Standard Deferral Event Type based on page/experience lifecycle based events like AboveTheFoldReady or other experience available\r\n */\r\n StandardEventBasedDeferral = 0,\r\n\r\n /**\r\n * Custom Deferral Event Type based like belowTheFoldTransitionStart which hoooked to work with UI events like intersectionObserver.\r\n */\r\n CustomEventBasedDeferral = 1\r\n}\r\n\r\n/**\r\n * Type to resolve deferral info to calling code\r\n */\r\nexport interface ExperienceDeferralMetadata {\r\n /**\r\n * Deferral type of an experience\r\n */\r\n deferralType: DeferralEventType;\r\n\r\n /**\r\n * A callback that resolves with a bool to specify when the experience is ready to load/render\r\n */\r\n shouldResolve: DeferralHandlerSignature\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport namespace DynamicBundles {\r\n const dynamicBundles: { [experienceName: string]: () => Promise } = {};\r\n\r\n /**\r\n * lazy load the experience\r\n *\r\n * @param experienceName - the experience name\r\n * @return {Promise} - the experience wrapped by the promise\r\n */\r\n export const loadExperience = async (experienceName: string) => {\r\n const bundle = dynamicBundles[experienceName];\r\n if (!bundle) {\r\n throw new Error(`Attempted to load unknown dynamic bundle \"${experienceName}\". Make sure it's a registered dynamic experience bundle.`);\r\n }\r\n return bundle();\r\n };\r\n\r\n /**\r\n * register the experience for lazy loading\r\n *\r\n * @param experienceName - the experience name\r\n * @param es6Import - the import(\"@msnews/your/experience/path\")\r\n */\r\n export const registerExperience = (experienceName: string, es6Import: () => Promise) => {\r\n dynamicBundles[experienceName] = es6Import;\r\n };\r\n\r\n /**\r\n * check if an experience is registered\r\n * @param experienceName - the experience name\r\n * @return {boolean} - return true if experience is already registered, otherwise false\r\n */\r\n export const hasExperienceRegistered = (experienceName: string): boolean => {\r\n return !!dynamicBundles[experienceName];\r\n };\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { getLocationHref } from \"@msnews/isomorphic-util\";\r\nimport { ActivityData, CommentSummary, enums, OneServiceReactionCommentMetadata, ReactionBreakdownReactionCounts, ReactionSummary, Resource, SocialBarData, SocialReactions, Tag, UGContent, UGContentListView, UGContentPublishResponse } from \"../schema\";\r\nimport { getLocalContentReaction } from \"../service/SocialService\";\r\n\r\nexport class SocialServiceMapper {\r\n public static convertContent(contentData) {\r\n const reactionCounts = {};\r\n enums.reactionOrder.map(key => {\r\n if (contentData) {\r\n if (contentData.reactionSummary) {\r\n reactionCounts[key] = (contentData.reactionSummary.subReactionSummaries.find(x => x.type.toLowerCase() == key) || { totalCount: 0 }).totalCount;\r\n } else {\r\n reactionCounts[key] = 0;\r\n }\r\n }\r\n });\r\n return !contentData ?\r\n null :\r\n {\r\n comments: {\r\n skip: 0,\r\n top: 0,\r\n moreCount: 0,\r\n list: []\r\n },\r\n ...contentData,\r\n ...{\r\n totalCommentCount: contentData.commentSummary ? contentData.commentSummary.totalCount : 0,\r\n reactionCounts\r\n }\r\n };\r\n }\r\n public static convertUser(userData) {\r\n if (!userData) {\r\n return {\r\n state: enums.userStateType.anonymous\r\n };\r\n } else {\r\n let state: string;\r\n if (userData.isSocialUser) {\r\n state = enums.userStateType.existingUser;\r\n } else if (userData.id && !userData.id.startsWith(\"m-\")) {\r\n state = enums.userStateType.newUser;\r\n } else {\r\n state = enums.userStateType.anonymous;\r\n }\r\n\r\n let nameStatus: string = userData.nameStatus || enums.userNameStatusType.normal;\r\n if (state == enums.userStateType.newUser && (userData.primaryName == null || userData.primaryName.trim() === \"\")) {\r\n nameStatus = enums.userNameStatusType.notAllow;\r\n }\r\n\r\n return {\r\n ...userData,\r\n ...{\r\n name: userData.primaryName,\r\n avatarUrl: userData.notUseAvatar || !userData.primaryAvatar ?\r\n undefined :\r\n userData.primaryAvatar,\r\n likesCount: userData.reactionSummary ? userData.reactionSummary.totalCount : 0,\r\n postsCount: userData.commentSummary ? userData.commentSummary.totalCount : 0,\r\n followersCount: (userData.followSummary && userData.followSummary.subFollowSummaries.find(x => x.type == \"FollowBy\") || { totalCount: 0 }).totalCount,\r\n followingCount: (userData.followSummary && userData.followSummary.subFollowSummaries.find(x => x.type == \"Follow\") || { totalCount: 0 }).totalCount,\r\n reactionsCount: (userData.reactionSummary && userData.reactionSummary.totalCount) || 0,\r\n badge: \"Commenter\",\r\n state: state,\r\n avatarStatus: userData.avatarStatus || enums.userAvatarStatusType.normal,\r\n nameStatus,\r\n ageGroup: userData.ageGroup || enums.userAgeGroup.above18\r\n }\r\n };\r\n }\r\n }\r\n public static convertUserList(userListData) {\r\n if (!userListData) {\r\n return null;\r\n }\r\n return {\r\n skip: userListData.skip,\r\n top: userListData.top,\r\n hasMore: userListData.hasMore,\r\n moreCount: userListData.totalCount - (userListData.top + userListData.skip),\r\n totalCount: userListData.totalCount,\r\n list: userListData.items.map(item => this.convertUser(item.links.find(x => x.type == \"User\").item || null))\r\n };\r\n }\r\n\r\n public static convertComment(commentData) {\r\n if (!commentData) {\r\n return null;\r\n }\r\n\r\n let owner = null;\r\n let content = null;\r\n if (commentData.links) {\r\n const foundUser = commentData.links.find((link) => link.type == \"User\" && link.item.id == commentData.createdBy);\r\n owner = foundUser ? SocialServiceMapper.convertUser(foundUser.item) : null;\r\n\r\n const foundContent = commentData.links.find((link) => link.type == \"Content\");\r\n content = foundContent ? SocialServiceMapper.convertContent(foundContent.item) : null;\r\n }\r\n\r\n const isHidden = commentData.visibleStatus != enums.visibleStatusType.Normal;\r\n const isInReview = commentData.visibleStatus == enums.visibleStatusType.InReview;\r\n const isDeleted = [enums.visibleStatusType.DeletedByAI, enums.visibleStatusType.DeletedByHI, enums.visibleStatusType.DeletedByUser].includes(commentData.visibleStatus);\r\n // TODO: Remove this flag when API no longer show this\r\n const skipRender = isInReview;\r\n const reactionCounts = {};\r\n enums.reactionOrder.map(key => {\r\n if (commentData.reactionSummary) {\r\n reactionCounts[key] = (commentData.reactionSummary.subReactionSummaries.find(x => x.type.toLowerCase() == key) || { totalCount: 0 }).totalCount;\r\n } else {\r\n reactionCounts[key] = 0;\r\n }\r\n });\r\n\r\n return {\r\n ...commentData,\r\n ...{\r\n ownerId: commentData.createdBy,\r\n text: commentData.body.replace(/(?:\\r\\n|\\r|\\n)/g, \"
\"),\r\n createDatetime: commentData.createdTime,\r\n reactionCounts,\r\n user: owner,\r\n content: content,\r\n isHidden: isHidden,\r\n isInReview: isInReview,\r\n isDeleted: isDeleted,\r\n skipRender: skipRender,\r\n replies: [],\r\n replyCount: commentData.commentSummary ? commentData.commentSummary.totalCount : 0\r\n }\r\n };\r\n }\r\n public static convertCommentList(commentListData) {\r\n if (!commentListData) {\r\n return null;\r\n }\r\n return {\r\n commentStatus: \"On\",\r\n skip: commentListData.skip,\r\n top: commentListData.top,\r\n hasMore: commentListData.hasMore,\r\n hasPrevious: commentListData.hasPrevious,\r\n asc: commentListData.asc,\r\n moreCount: commentListData.totalCount - (commentListData.top - 1 + commentListData.skip - 1 + 2),\r\n totalCount: commentListData.totalCount,\r\n list: commentListData.items.map((item) => SocialServiceMapper.convertComment(item))\r\n };\r\n }\r\n public static convertReactionsResponseToReactionBreakdownData(reactionsResponse) {\r\n if (!reactionsResponse) {\r\n return null;\r\n }\r\n\r\n const reactionDetails = reactionsResponse.items;\r\n let reactionSummary;\r\n try {\r\n reactionSummary = reactionsResponse.links.find(x => x.type == \"Content\" || x.type == \"Comment\").item.reactionSummary.subReactionSummaries;\r\n } catch (e) {\r\n reactionSummary = null;\r\n }\r\n const reactionBreakdownData = { reactionCounts: { all: 0 }, items: { all: [] } };\r\n enums.reactionOrder.map(key => {\r\n reactionBreakdownData.reactionCounts[key] = 0;\r\n reactionBreakdownData.items[key] = [];\r\n });\r\n\r\n if (reactionSummary) {\r\n reactionSummary.map(x => {\r\n reactionBreakdownData.reactionCounts[x.type.toLowerCase()] = x.totalCount;\r\n reactionBreakdownData.reactionCounts.all += x.totalCount;\r\n });\r\n }\r\n\r\n if (reactionDetails) {\r\n reactionDetails.map(x => {\r\n const rateValue = x.subType.toLowerCase();\r\n const user = x.links.find(x => x.type == \"User\") ? x.links.find(x => x.type == \"User\").item : { state: enums.userStateType.anonymous, primaryName: \"You\" };\r\n user.isFollowingFetched = true;\r\n user.isFollowing = !!x.links.find(x => x.type == \"Follow\");\r\n reactionBreakdownData.items[x.subType.toLowerCase()].push({ user: user, rateValue });\r\n reactionBreakdownData.items.all.push({ user: user, rateValue });\r\n });\r\n }\r\n\r\n return reactionBreakdownData;\r\n }\r\n public static convertRatingToRateValue(ratingData) {\r\n if (ratingData && ratingData.items) {\r\n ratingData = ratingData.items[0];\r\n }\r\n const type = (ratingData && ratingData.subType) ? ratingData.subType.toLowerCase() : null;\r\n return type;\r\n }\r\n public static convertUserActivities(userActivitiesData) {\r\n if (!userActivitiesData) {\r\n return null;\r\n }\r\n return {\r\n skip: userActivitiesData.skip,\r\n top: userActivitiesData.top,\r\n hasMore: userActivitiesData.hasMore,\r\n moreCount: userActivitiesData.totalCount - (userActivitiesData.top - 1 + userActivitiesData.skip - 1 + 2),\r\n totalCount: userActivitiesData.totalCount,\r\n list: userActivitiesData.items.map(activity => this.convertUserActivity(activity))\r\n };\r\n }\r\n public static convertUserActivity(activity): ActivityData {\r\n if (!activity) {\r\n return null;\r\n }\r\n\r\n const baseActivity = {\r\n id: activity.id,\r\n type: activity.type,\r\n datetime: activity.createdDateTime,\r\n isSeen: activity.read,\r\n notification: activity.notification\r\n };\r\n switch (activity.type) {\r\n case enums.activityType.follow: {\r\n const userLink = activity.links.find(x => x.type == \"User\");\r\n return {\r\n ...baseActivity,\r\n user: this.convertUser(userLink && userLink.item)\r\n };\r\n }\r\n case enums.activityType.badge: {\r\n const achievementLink = activity.links.find(x => x.type == \"Achievement\");\r\n return {\r\n ...baseActivity,\r\n badgeType: achievementLink && achievementLink.item.subType\r\n };\r\n }\r\n case enums.activityType.reply: {\r\n const userLink = activity.links.find(x => x.type == \"User\");\r\n const contentLink = activity.links.find(x => x.type == \"Content\");\r\n const commentLink = activity.links.find(x => x.type == \"Comment\");\r\n return {\r\n ...baseActivity,\r\n user: this.convertUser(userLink && userLink.item),\r\n target: {\r\n url: contentLink && contentLink.item.url,\r\n body: commentLink && commentLink.item.body.replace(/(?:\\r\\n|\\r|\\n)/g, \"
\"),\r\n comment: commentLink && this.convertComment(commentLink.item)\r\n }\r\n };\r\n }\r\n case enums.activityType.reaction: {\r\n const userLink = activity.links.find(x => x.type == \"User\");\r\n const contentLink = activity.links.find(x => x.type == \"Content\");\r\n const commentLink = activity.links.find(x => x.type == \"Comment\");\r\n const reactionLink = activity.links.find(x => x.type == \"Reaction\");\r\n\r\n const targetReactionCounts = reactionLink && reactionLink.item.targetType == \"Comment\" ?\r\n this.convertSubReactionSummariesToReactionCounts(commentLink && commentLink.item.reactionSummary && commentLink.item.reactionSummary.subReactionSummaries) :\r\n this.convertSubReactionSummariesToReactionCounts(contentLink && contentLink.item.reactionSummary && contentLink.item.reactionSummary.subReactionSummaries);\r\n\r\n const targetBody = reactionLink && reactionLink.item.targetType == \"Comment\" ?\r\n commentLink && commentLink.item.body :\r\n contentLink && contentLink.item.title;\r\n\r\n return {\r\n ...baseActivity,\r\n user: this.convertUser(userLink && userLink.item),\r\n target: {\r\n url: contentLink && contentLink.item.url,\r\n reactionCounts: targetReactionCounts,\r\n body: targetBody.replace(/(?:\\r\\n|\\r|\\n)/g, \"
\"),\r\n comment: commentLink && this.convertComment(commentLink.item)\r\n }\r\n };\r\n }\r\n case enums.activityType.moderation: {\r\n const commentLink = activity.links.find(x => x.type == \"Comment\");\r\n const moderationRecordLink = activity.links.find(x => x.type == \"ModerationRecord\");\r\n const moderationErrorType = moderationRecordLink && moderationRecordLink.item.subType;\r\n let message: string;\r\n switch (moderationErrorType) {\r\n case enums.moderationErrorType.takedown:\r\n message = \"This comment was removed because it didn't meet our guidelines.\"; break;\r\n case enums.moderationErrorType.ban:\r\n message = \"You've been banned due to violations of our guidelines.\"; break;\r\n case enums.moderationErrorType.notAllowName:\r\n message = \"Your profile name didn't meet our guidelines.\"; break;\r\n case enums.moderationErrorType.notAllowPicture:\r\n message = \"Your profile picture didn't meet our guidelines.\"; break;\r\n case enums.moderationErrorType.approveUserAppeal:\r\n message = \"At your request, we've reviewed your case and reversed the prior decision. You should be able to post again soon. Thank you.\"; break;\r\n case enums.moderationErrorType.approveCommentAppeal:\r\n message = \"At your request, we've reviewed your post and reversed the decision to remove it. This post will be restored shortly. Thank you.\"; break;\r\n case enums.moderationErrorType.approveProfilePicAppeal:\r\n message = \"At your request, we've reviewed your profile picture and reversed the decision to remove it. Your profile picture will be restored shortly. Thank you.\"; break;\r\n case enums.moderationErrorType.rejectUserAppeal:\r\n message = \"At your request, we've reviewed your case and found that your posts violated our community guidelines.\"; break;\r\n case enums.moderationErrorType.rejectCommentAppeal:\r\n message = \"At your request, we've reviewed your post that was removed and found it violated our community guidelines.\"; break;\r\n case enums.moderationErrorType.rejectProfilePicAppeal:\r\n message = \"At your request, we've reviewed your case and found that your profile picture violated our community guidelines.\"; break;\r\n default:\r\n message = \"\";\r\n }\r\n return {\r\n ...baseActivity,\r\n moderationErrorType: moderationErrorType,\r\n message: message,\r\n target: commentLink && {\r\n id: commentLink.item.id,\r\n body: commentLink.item.body\r\n }\r\n };\r\n }\r\n }\r\n\r\n return baseActivity;\r\n }\r\n private static convertSubReactionSummariesToReactionCounts(subReactionSummaries): ReactionBreakdownReactionCounts {\r\n if (!subReactionSummaries) { return null; }\r\n const reactionCounts = { all: 0 };\r\n enums.reactionOrder.map(key => {\r\n reactionCounts[key] = 0;\r\n });\r\n subReactionSummaries.map(x => {\r\n reactionCounts[x.type.toLowerCase()] = x.totalCount;\r\n });\r\n return reactionCounts;\r\n }\r\n public static convertUGContentListView(data): UGContentListView {\r\n return !data ? null :\r\n {\r\n skip: data.skip,\r\n top: data.top,\r\n hasMore: data.hasMore,\r\n moreCount: data.totalCount - (data.top + data.skip),\r\n totalCount: data.totalCount,\r\n list: data.map(ugContent => this.convertUGContent(ugContent))\r\n };\r\n }\r\n public static convertUGContent(data): UGContent {\r\n return !data ? null :\r\n {\r\n id: data.id,\r\n type: data.type,\r\n title: data.title,\r\n abstract: data.abstract,\r\n body: data.body,\r\n market: data.market,\r\n tags: data.tags,\r\n categories: data.categories,\r\n locations: data.locations,\r\n resources: this.convertResources(data.resources),\r\n authorUserId: data.createdBy,\r\n isPublished: data.isPublished,\r\n createdDateTime: data.createdDateTime,\r\n lastEditedDateTime: data.lastEditedDateTime,\r\n lastPublishedDateTime: data.lastPublishedDateTime,\r\n displayPublishedDateTime: data.displayPublishedDateTime\r\n };\r\n }\r\n public static convertResources(resources): Array {\r\n return !resources ? null :\r\n resources.map((resource, index) => {\r\n return {\r\n id: resource.item.id,\r\n type: resource.item.type,\r\n url: resource.item.url,\r\n isCover: index == 0\r\n };\r\n });\r\n }\r\n public static convertTags(tags): Array {\r\n return !tags ? null :\r\n tags.map((tag) => {\r\n return {\r\n id: tag.id,\r\n title: tag.name,\r\n locale: tag.locale\r\n };\r\n });\r\n }\r\n public static convertUGContentPublishResponse(data): UGContentPublishResponse {\r\n return !data ? null :\r\n {\r\n id: data.id,\r\n status: data.status\r\n };\r\n }\r\n\r\n public static mapFeedResponseToSocialBarData(id: string, myReaction: string, reactionSummary: ReactionSummary, commentSummary: CommentSummary, localStorageGet?: (id: string) => string): SocialBarData {\r\n\r\n // test hook for injecting mock social reactions\r\n const locationHref = getLocationHref();\r\n if (locationHref && locationHref.indexOf(\"reactionstest\") > -1) {\r\n try {\r\n reactionSummary = { totalCount: 0, subReactionSummaries: [] };\r\n commentSummary = { totalCount: 0, subCommentSummaries: [] };\r\n reactionSummary.totalCount = Math.floor(Math.random() * 10000);\r\n commentSummary.totalCount = Math.floor(Math.random() * 10000);\r\n const reactionTypes = [\"angry\", \"like\", \"love\", \"sad\", \"surprised\", \"thinking\"].sort(() => 0.5 - Math.random()).slice(0, Math.floor(Math.random() * 3));\r\n reactionTypes.forEach(type => reactionSummary.subReactionSummaries.push({ totalCount: Math.floor(Math.random() * 10), type: type }));\r\n } catch {\r\n // noop\r\n }\r\n }\r\n\r\n const subReactionSummaries: OneServiceReactionCommentMetadata[] = reactionSummary && reactionSummary.subReactionSummaries ? reactionSummary.subReactionSummaries : [];\r\n\r\n const getSubReactionCounts = (reactionType: SocialReactions) => {\r\n const result = subReactionSummaries.filter(value => value.type === (reactionType as string));\r\n return result && (result.length > 0) ? result[0].totalCount : 0;\r\n };\r\n\r\n const reactionCounts = {\r\n angry: getSubReactionCounts(SocialReactions.angry),\r\n like: getSubReactionCounts(SocialReactions.like),\r\n love: getSubReactionCounts(SocialReactions.love),\r\n sad: getSubReactionCounts(SocialReactions.sad),\r\n surprised: getSubReactionCounts(SocialReactions.surprised),\r\n thinking: getSubReactionCounts(SocialReactions.thinking)\r\n };\r\n\r\n const myLocalReaction = !myReaction && getLocalContentReaction(id, localStorageGet);\r\n if (myLocalReaction) {\r\n myReaction = myLocalReaction;\r\n reactionCounts[myReaction]++;\r\n }\r\n\r\n return {\r\n myReaction,\r\n id,\r\n totalCommentsCount: commentSummary && commentSummary.totalCount,\r\n reactionCounts\r\n };\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Constants used for Prime Integration\r\n */\r\nexport const PrimeIntegrationConstants = {\r\n\r\n /**\r\n * Default value we use for the name of the cookie that holds the ANID\r\n */\r\n AnonCookieName: \"APP_ANON\",\r\n\r\n /** The ID of the coachmark to show for when a user performed follow/unfollow action fails */\r\n userActionErrorCoachMarkId: \"cm-spafeedsapp-user-action-error\"\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { MediatorEventNames } from \"./MediatorEventNames\";\r\nimport { PrimeIntegrationConstants } from \"./Constants\";\r\nimport { SubnavTabId } from \"./SubnavTabId\";\r\nimport { TabsHelper } from \"./SubnavTabHelper\";\r\nimport { getMediator } from \"mediator-integration\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\nexport namespace Mediator {\r\n /**\r\n * API to listen for tab change event from Prime\r\n *\r\n * @export\r\n * @param callback {(tabId: number) => void} - A callback method to handle the event\r\n * @param shouldCallTabChangeEventImmediately {Boolean} - if we should immediately call the callback in order to capture any changes between initialization and registration.\r\n * @return Promise\r\n */\r\n export async function registerForTabChangeEvent(callback: (tabId: number) => void, shouldCallCallbackImmediately = false): Promise {\r\n try {\r\n const mediator = await getMediator();\r\n\r\n function sendActiveTabToCallback(data: PrimeGlobal.INavigateEventData): void {\r\n let activeTab: SubnavTabId = getActiveTabValue();\r\n\r\n // This is only used if the caller of the mediator event neglected to set window.navigation and if the caller decides to use \"tab\" instead of \"tabId\"\r\n if (activeTab === SubnavTabId.None && data && data.tab) {\r\n activeTab = data.tab;\r\n }\r\n\r\n if (window._perfMarker) {\r\n window._perfMarker(\"TimeToTabClick_\" + TabsHelper.tabIdToTabName(activeTab), true);\r\n }\r\n\r\n callback(activeTab);\r\n }\r\n\r\n mediator.sub(MediatorEventNames.TabNavigation, sendActiveTabToCallback);\r\n if (shouldCallCallbackImmediately) {\r\n sendActiveTabToCallback(null);\r\n }\r\n } catch {\r\n logger.logError(\"Couldn't load the mediator object.\");\r\n }\r\n }\r\n\r\n /**\r\n * API to listen for content actions updates from Prime\r\n *\r\n * @export\r\n * @param callback {()) => void} - A callback method to handle the event\r\n * @return Promise\r\n */\r\n export async function registerContentActionsUpdatedEvent(callback: () => void): Promise {\r\n try {\r\n const mediator = await getMediator();\r\n mediator.sub(MediatorEventNames.ContentActionsUpdated, callback);\r\n } catch {\r\n logger.logError(\"Couldn't load the mediator object.\");\r\n }\r\n }\r\n\r\n /**\r\n * API to listen for card action enable event from Prime\r\n *\r\n * @export\r\n * @param callback {(initData PrimeGlobal.ICardActionInitEventData)) => void} - A callback method to handle the event\r\n * @return Promise\r\n */\r\n export async function registerCardActionEnableEvent(callback: (initData: PrimeGlobal.ICardActionInitEventData) => void): Promise {\r\n try {\r\n const mediator = await getMediator();\r\n mediator.sub(MediatorEventNames.CardActionInit, (initData: PrimeGlobal.ICardActionInitEventData): void => {\r\n callback(initData);\r\n });\r\n } catch {\r\n logger.logError(\"Couldn't load the mediator object.\");\r\n }\r\n }\r\n\r\n /**\r\n * API to listen for card action post event from Prime\r\n *\r\n * @export\r\n * @param callback {(initData PrimeGlobal.ICardActionPostEventData)) => void} - A callback method to handle the event\r\n * @return Promise\r\n */\r\n export async function registerCardActionPostEvent(callback: (postData: PrimeGlobal.ICardActionPostEventData) => void): Promise {\r\n try {\r\n const mediator = await getMediator();\r\n mediator.sub(MediatorEventNames.CardActionPost, (postData: PrimeGlobal.ICardActionPostEventData): void => {\r\n callback(postData);\r\n });\r\n } catch {\r\n logger.logError(\"Couldn't load the mediator object.\");\r\n }\r\n }\r\n\r\n /**\r\n * API to listen for follow button click event from Prime\r\n *\r\n * @export\r\n * @param callback {(topicId: string, isFollowed: boolean) => void} - A callback method to handle the event\r\n * @return Promise\r\n */\r\n export async function registerForFollowButtonClickEvent(callback: (topicId: string, isFollowed: boolean) => void): Promise {\r\n try {\r\n const mediator = await getMediator();\r\n mediator.sub(MediatorEventNames.TopicAction, function (followButtonData: PrimeGlobal.IFollowButtonClickData): void {\r\n if (followButtonData && followButtonData.topicId) {\r\n callback(followButtonData.topicId, followButtonData.isFollowed);\r\n }\r\n });\r\n } catch {\r\n logger.logError(\"Couldn't load the mediator object.\");\r\n }\r\n }\r\n\r\n /**\r\n * API to listen for Interests render complete event.\r\n *\r\n * @export\r\n * @return Promise\r\n */\r\n export async function registerForInterestsRenderCompleteEvent(callback: () => void): Promise {\r\n try {\r\n const mediator = await getMediator();\r\n mediator.sub(MediatorEventNames.InterestsRenderComplete, function (): void {\r\n callback();\r\n });\r\n } catch {\r\n logger.logError(\"Couldn't load the mediator object.\");\r\n }\r\n }\r\n\r\n /**\r\n * API to listen for social actions updates from Prime\r\n *\r\n * @export\r\n * @param callback {()) => void} - A callback method to handle the event\r\n * @return Promise\r\n */\r\n export async function registerSocialActionsUpdatedEvent(callback: () => void): Promise {\r\n try {\r\n const mediator = await getMediator();\r\n mediator.sub(MediatorEventNames.SocialActionsUpdated, callback);\r\n } catch {\r\n logger.logError(\"Couldn't load the mediator object.\");\r\n }\r\n }\r\n\r\n /**\r\n * Returns the active tab\r\n * @public\r\n * @return {SubnavTabId}\r\n */\r\n export function getActiveTabValue(): SubnavTabId {\r\n let activeTabValue = \"\";\r\n\r\n if (window.navigation && typeof window.navigation.activeTab === \"string\") {\r\n activeTabValue = window.navigation.activeTab.toLowerCase();\r\n }\r\n\r\n return TabsHelper.tabNameToTabId(activeTabValue);\r\n }\r\n\r\n /**\r\n * API to publish the event to Prime.\r\n *\r\n * @export\r\n * @param event - the mediator event name string\r\n * @param data - the event data\r\n * @return Promise\r\n */\r\n export async function publishEventForPrime(event: string, data?: any): Promise {\r\n try {\r\n const mediator = await getMediator();\r\n mediator.pub(event, data);\r\n } catch {\r\n logger.logError(\"Couldn't load the mediator object in publishEventForPrime.\");\r\n }\r\n }\r\n\r\n /**\r\n * Publishes a message to trigger rendering of a mediated coach mark from Prime page\r\n * @param refElement {Element} - the reference element next to which the coachmark should be rendered. This is optional for Overlay type of coachmarks\r\n * @param hideCoachMark {boolean} - flag to indicate whether to hide the coachmark. Default value of false indicates that the coachmark should be shown.\r\n * @returns Promise{void} - The promise that will return after the action has been completed.\r\n */\r\n export async function renderUserActionErrorCoachmark(\r\n args: { refElement?: Element, hideCoachMark?: boolean } = {}): Promise {\r\n\r\n args = {\r\n refElement: undefined,\r\n hideCoachMark: false,\r\n ...args\r\n };\r\n\r\n const mediator = await getMediator();\r\n mediator.pub(\r\n MediatorEventNames.MediatedCoachMark,\r\n {\r\n coachMarkId: PrimeIntegrationConstants.userActionErrorCoachMarkId,\r\n refElement: args.refElement,\r\n hideCoachMark: args.hideCoachMark\r\n });\r\n }\r\n}","\r\n// © Microsoft Corporation. All rights reserved.\r\n\r\n// TODO: This should be considered for moving it to the Interests experience wrapper, once that\r\n// code arrives, since this is specific to that experience\r\n\r\nimport { SubnavTabId } from \"./SubnavTabId\";\r\nimport { SubnavTabName } from \"./SubnavTabName\";\r\n\r\nexport namespace TabsHelper {\r\n /**\r\n * Converts from the tab enum to the tab names\r\n *\r\n * @export\r\n * @param {SubnavTabId} tabId - The tabId being converted\r\n * @return The tab name\r\n */\r\n export function tabIdToTabName(tabId: SubnavTabId): string {\r\n switch (tabId) {\r\n case SubnavTabId.Interests:\r\n return SubnavTabName.Interests;\r\n\r\n case SubnavTabId.MyFeed:\r\n return SubnavTabName.MyFeed;\r\n\r\n case SubnavTabId.XFeed:\r\n return SubnavTabName.XFeed;\r\n\r\n default:\r\n return \"\";\r\n }\r\n }\r\n\r\n /**\r\n * Converts from the tab name to the tab enum\r\n *\r\n * @export\r\n * @param {string} tabName - The tabName being converted\r\n * @return The tabId\r\n */\r\n export function tabNameToTabId(tabName: string): SubnavTabId {\r\n switch (tabName) {\r\n\r\n case SubnavTabName.MyFeed:\r\n return SubnavTabId.MyFeed;\r\n\r\n case SubnavTabName.XFeed:\r\n return SubnavTabId.XFeed;\r\n\r\n case SubnavTabName.Interests:\r\n return SubnavTabId.Interests;\r\n\r\n default:\r\n return SubnavTabId.None;\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./adapter\";\r\nexport * from \"./mapper\";\r\nexport * from \"./schema\";\r\nexport * from \"./service\";\r\nexport * from \"./utils/UrlHelper\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { CombinedObjectTelemetryContract, ObjectTelemetryContractInternal } from \"../types/TelemetryInternalContract\";\r\nimport { ObjectTelemetryContract, TelemetryAttrName, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { closestElement, getAllTelemetryElements, getHeadline } from \"../utilities/TelemetryHelper\";\r\n\r\nimport { TelemetryContractCoverter } from \"./TelemetryContractCoverter\";\r\nimport { TelemetryObject } from \"./TelemetryObject\";\r\nimport { merge } from \"lodash-es\";\r\n\r\n/**\r\n * Object metadata class which combination of external contract and internal data\r\n * @class TelemetryObject\r\n */\r\nexport class TelemetryDOM {\r\n /**\r\n * Flag specified whether layout need to be updated.\r\n */\r\n private static elementMap: WeakMap = new WeakMap();\r\n\r\n /**\r\n * Root object.\r\n */\r\n private static root: TelemetryDOM = new TelemetryDOM(\r\n { name: \"root\" }\r\n );\r\n\r\n /**\r\n * Last id.\r\n */\r\n private static lastId = 0;\r\n\r\n /**\r\n * Flag specified whether layout need to be updated.\r\n */\r\n private static needUpdate = false;\r\n\r\n // #region Public properties\r\n /**\r\n * External object contract.\r\n */\r\n public contract: ObjectTelemetryContract;\r\n\r\n /**\r\n * Reference to children's object.\r\n */\r\n public readonly children: TelemetryDOM[];\r\n\r\n /**\r\n * Flag for identifying whether object already is captured or not.\r\n */\r\n public isCaptured?: boolean;\r\n\r\n /**\r\n * Flag for identifying whether object is visible or not.\r\n */\r\n public isVisible?: boolean;\r\n // #endregion\r\n\r\n // #region Private properties\r\n /**\r\n * Ordinal of the object.\r\n */\r\n private element;\r\n\r\n /**\r\n * Id of current object.\r\n */\r\n private id: number;\r\n\r\n /**\r\n * Ordinal of the object.\r\n */\r\n private ordinal = 0;\r\n\r\n /**\r\n * Last ordinal of its children.\r\n */\r\n private ordinalCount = 0;\r\n\r\n /**\r\n * Reference to parent object in dom.\r\n */\r\n private parentDOM: TelemetryDOM;\r\n // #endregion\r\n\r\n /**\r\n * Contract getter.\r\n * @returns Combined contract between internal and external.\r\n */\r\n public get combinedContract(): CombinedObjectTelemetryContract {\r\n const headline = (this.contract.content = this.contract.content || {}).headline;\r\n this.contract.content.headline = headline || getHeadline(this.element);\r\n\r\n return merge({}, this.contract, this.internalContract);\r\n }\r\n\r\n /**\r\n * Internal contract getter.\r\n * @returns Internal contract.\r\n */\r\n private get internalContract(): ObjectTelemetryContractInternal {\r\n const { lineage, lineageOrdinal } = TelemetryDOM.getLineage(this);\r\n const contract = {\r\n placement: {\r\n id: this.id,\r\n lineage: lineage,\r\n lineageOrdinal: lineageOrdinal\r\n }\r\n } as ObjectTelemetryContractInternal;\r\n\r\n if (this.parentDOM && this.parentDOM.id && this.parentDOM.id !== 0) {\r\n contract.placement.parentId = this.parentDOM.id;\r\n contract.placement.ordinal = this.ordinal;\r\n }\r\n\r\n return contract;\r\n }\r\n\r\n constructor(contract: ObjectTelemetryContract) {\r\n this.contract = contract;\r\n this.ordinalCount = 0;\r\n }\r\n\r\n // #region Public static functions\r\n /**\r\n * Add new element to telemetry tree struture.\r\n * @params element Element being added.\r\n */\r\n public static addElement(element: Element) {\r\n if (!element) {\r\n return;\r\n }\r\n\r\n const contract = this.parseContract(element);\r\n let obj = this.get(element);\r\n\r\n // create object id for newly added element.\r\n if (!obj || !obj.id) {\r\n obj = new TelemetryDOM(contract);\r\n obj.id = this.generateId();\r\n this.set(element, obj);\r\n } else {\r\n obj.contract = contract;\r\n }\r\n\r\n if (!obj) {\r\n return;\r\n }\r\n\r\n let parentElement = element.parentElement;\r\n\r\n // In case the parent is shadow root.\r\n if (!parentElement && element.parentNode && (element.parentNode as ShadowRoot).host) {\r\n parentElement = (element.parentNode as ShadowRoot).host as HTMLElement;\r\n }\r\n\r\n let parent = parentElement && closestElement(parentElement, \"[\" + TelemetryAttrName + \"]\");\r\n let parentDOMObj = parent && this.get(parent);\r\n\r\n if (parent && !parentDOMObj) {\r\n parentDOMObj = this.addElement(parent);\r\n }\r\n\r\n if (obj === parentDOMObj) {\r\n parent = parent.closest(\"[\" + TelemetryAttrName + \"]\");\r\n parentDOMObj = this.get(parent);\r\n }\r\n\r\n obj.parentDOM = parentDOMObj && parentDOMObj !== obj ? parentDOMObj : TelemetryDOM.getRoot();\r\n this.needUpdate = true;\r\n\r\n return obj;\r\n }\r\n\r\n /**\r\n * Render telemetry attribute from the telemetry object.\r\n * @param telemetryObject Telemetry object.\r\n * @returns Telemetry attribute.\r\n */\r\n public static renderObject(telemetryObject: TelemetryObject): any {\r\n return telemetryObject.render();\r\n }\r\n\r\n /**\r\n * Render telemetry attribute from the contract.\r\n * @param contract Telemetry contract.\r\n * @returns Telemetry attribute.\r\n */\r\n public static renderContract(contract: ObjectTelemetryContract): any {\r\n return TelemetryObject.render(contract);\r\n }\r\n\r\n /**\r\n * Set telemetry attribute.\r\n * @param element html element.\r\n * @param contract telemetry contract.\r\n */\r\n public static setAttribute(element: HTMLElement, contract: ObjectTelemetryContract, object: TelemetryObjectBase = null): void {\r\n if (!element || !element.setAttribute) {\r\n return;\r\n }\r\n\r\n contract = contract || (object && object.contract);\r\n const attr = this.renderContract(contract);\r\n if (attr) {\r\n element.setAttribute(TelemetryAttrName, attr[TelemetryAttrName]);\r\n }\r\n }\r\n\r\n /**\r\n * Get telemetry dom object from an element.\r\n * @param element The element.\r\n * @returns Telemetry object.\r\n */\r\n public static get(element: Element): TelemetryDOM {\r\n const telemetryDOM = this.elementMap.get(element);\r\n const updatedContract = this.parseContract(element);\r\n if (telemetryDOM && updatedContract) {\r\n telemetryDOM.contract = updatedContract;\r\n }\r\n\r\n return telemetryDOM;\r\n }\r\n\r\n /**\r\n * Get lineage and lineageOrdinal strings.\r\n * Lineage is concatenation of telemetry object's name of the current object up to the root. It basically tells the placement of the object in the page.\r\n * Lineage ordinal is concatenation of ordinal. It tells which position of each object up to root in the hierachy is.\r\n * Lineage can be duplicated since object name can be the same in some cases e.g. slideshow. Lineage ordinal is used to distinguish that.\r\n * @params obj Target telemetry object.\r\n * @returns Lineage and lineageOrdinal strings.\r\n */\r\n public static getLineage(obj: TelemetryDOM, delimeter = \">\", includeRootElement = false): any {\r\n if (obj.parentDOM && obj.parentDOM !== TelemetryDOM.root) {\r\n let { lineage, lineageOrdinal } = this.getLineage(obj.parentDOM, delimeter, includeRootElement);\r\n lineage += delimeter + obj.contract.name;\r\n const newLineageOrdinal = (lineageOrdinal ? lineageOrdinal + delimeter : \"\") + obj.ordinal;\r\n return { lineage, lineageOrdinal: newLineageOrdinal };\r\n } else if (obj.parentDOM && obj.parentDOM === TelemetryDOM.root && includeRootElement) {\r\n const outputObj: any = { lineage: obj.contract.name };\r\n outputObj.lineageOrdinal = \"\" + obj.ordinal;\r\n return outputObj;\r\n } else {\r\n return { lineage: obj.contract.name };\r\n }\r\n }\r\n\r\n /**\r\n * Get root object\r\n * @returns Telemetry root object.\r\n */\r\n public static getRoot(): TelemetryDOM {\r\n return TelemetryDOM.root;\r\n }\r\n\r\n /**\r\n * Get telemetryObject\r\n * @returns Telemetry root object.\r\n */\r\n public static getTelemetryObject(element: HTMLElement): TelemetryObject {\r\n const obj = this.get(element);\r\n if (obj && obj.contract) {\r\n return new TelemetryObject(obj.contract);\r\n }\r\n }\r\n\r\n /**\r\n * Get telemetry contract from an element.\r\n * @param element The element.\r\n * @returns Telemetry object.\r\n */\r\n public static parseContract(element: Element): ObjectTelemetryContract {\r\n try {\r\n const metadataAttribute = element && element.getAttribute && element.getAttribute(TelemetryAttrName);\r\n return this.parseAttribute(metadataAttribute);\r\n } catch {\r\n // ignore json parsing error\r\n console.log(\"json parse error\");\r\n }\r\n }\r\n\r\n /**\r\n * Get telemetry contract from a metadata string.\r\n * @param metadataAttribute Metadata string\r\n * @returns Telemetry object.\r\n */\r\n public static parseAttribute(metadataAttribute: string): ObjectTelemetryContract {\r\n try {\r\n const jsonObj = metadataAttribute && JSON.parse(metadataAttribute);\r\n return this.parseMetadata(jsonObj);\r\n } catch {\r\n // ignore json parsing error\r\n }\r\n }\r\n\r\n /**\r\n * Get telemetry contract from a metadata object.\r\n * @param metadata Metadata object\r\n * @returns Telemetry object.\r\n */\r\n public static parseMetadata(metadata: any): ObjectTelemetryContract {\r\n try {\r\n return metadata && TelemetryContractCoverter.decompress(metadata) as ObjectTelemetryContract;\r\n } catch {\r\n // ignore json parsing error\r\n }\r\n }\r\n\r\n /**\r\n * Set telemetry dom object from an element.\r\n * @param element The element.\r\n * @param domObj Telemetry dom object.\r\n */\r\n public static set(element: Element, domObj: TelemetryDOM): void {\r\n domObj.element = element;\r\n this.elementMap.set(element, domObj);\r\n }\r\n\r\n /**\r\n * Update layout.\r\n */\r\n public static updateLayout(): void {\r\n if (!this.needUpdate) {\r\n return;\r\n }\r\n\r\n this.needUpdate = false;\r\n this.root.ordinalCount = 0;\r\n\r\n const elems = getAllTelemetryElements(document.documentElement);\r\n for (let i = 0; i < elems.length; i++) {\r\n const elem = elems[i];\r\n let obj = this.get(elem);\r\n if (!obj || obj.parentDOM === undefined) {\r\n // there is some cases parentDOM is not available since element does not get added to the memory yet (updateLayout get called before addElement).\r\n // so, we execute addElement here to ensure that.\r\n obj = this.addElement(elem);\r\n }\r\n\r\n obj.ordinal = ++obj.parentDOM.ordinalCount;\r\n obj.ordinalCount = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Create object id.\r\n * @param Object id.\r\n */\r\n private static generateId(): number {\r\n const id = ++this.lastId;\r\n\r\n return id;\r\n }\r\n // #endregion\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActionMap } from \"@msnews/experiences-redux\";\r\nimport { CardSizes } from \"@msnews/card-properties\";\r\n\r\nexport type ChangeCardSizeSignature = (virtualCardSize: CardSizes, width: number, height: number) => void;\r\n\r\n/**\r\n * Exposes the actions to update state on river child components\r\n * @class\r\n */\r\nexport class RiverCardActions {\r\n\r\n /**\r\n * Action for changing the size of the rendered card when rendering an experience in a river section\r\n */\r\n public static changeCardSize: ActionMap = new ActionMap(\"ChangeCardSize\");\r\n}","// © Microsoft Corporation. All rights reserved.\r\nfunction supportsIntersectionObserver(): boolean {\r\n return (\r\n \"IntersectionObserver\" in global &&\r\n \"IntersectionObserverEntry\" in global &&\r\n \"intersectionRatio\" in IntersectionObserverEntry.prototype\r\n );\r\n}\r\n\r\nfunction loadPolyfills(): Promise {\r\n const polyfills = [];\r\n\r\n if (!supportsIntersectionObserver()) {\r\n polyfills.push(import(\"intersection-observer\"));\r\n }\r\n\r\n return Promise.all(polyfills);\r\n}\r\n\r\nconst loadObserver = (observer) => {\r\n return loadPolyfills().then(observer);\r\n};\r\n\r\nexport default loadObserver;","// © Microsoft Corporation. All rights reserved.\r\nexport interface SocialBarData {\r\n totalCommentsCount?: number;\r\n reactionCounts?: {\r\n sad?: number;\r\n like?: number;\r\n surprised?: number;\r\n angry?: number;\r\n love?: number\r\n thinking?: number;\r\n },\r\n id: string;\r\n myReaction?: string;\r\n}\r\n\r\nexport interface SocialBarLocalizedStrings {\r\n ariaLabelsOpenReplies?: string;\r\n emojiLabellike?: string;\r\n emojiLabellove?: string;\r\n emojiLabelsurprised?: string;\r\n emojiLabelthinking?: string;\r\n emojiLabelsad?: string;\r\n emojiLabelangry?: string;\r\n thousandsShort?: string;\r\n reactionMenuAriaLabel?: string;\r\n ariaLabelShowReactions?: string;\r\n ariaLabelReactions?: string;\r\n ariaLabelCommentsCount?: string;\r\n ariaLabelReactionsCount?: string;\r\n ariaLabelReactionButtonSingular?: string;\r\n ariaLabelReactionButtonPlural?: string;\r\n}\r\n\r\nexport enum SocialReactions {\r\n like = \"like\",\r\n love = \"love\",\r\n surprised = \"surprised\",\r\n thinking = \"thinking\",\r\n sad = \"sad\",\r\n angry = \"angry\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n DesignSystemDefaults,\r\n neutralLayerCardContainer,\r\n neutralLayerFloating,\r\n neutralLayerL4\r\n} from \"@microsoft/fast-components-styles-msft\";\r\n\r\n/**\r\n * Hex string for black color\r\n * To be used in color recipes to define light/dark mode\r\n */\r\nexport const blackHexColor = \"#000000\";\r\n\r\n/**\r\n * Hex string for white color\r\n * To be used in color recipes to define light/dark mode\r\n */\r\nexport const whiteHexColor = \"#FFFFFF\";\r\n\r\n/**\r\n * Dark mode color for a canvas\r\n */\r\nexport const DarkModeBackgroundColor: string = neutralLayerL4(() => blackHexColor)(DesignSystemDefaults);\r\n\r\n/**\r\n * Dark mode color for Flyout elements\r\n */\r\nexport const FlyoutDarkModeBackgroundColor: string = neutralLayerFloating(() => blackHexColor)(DesignSystemDefaults);\r\n\r\n/**\r\n * Pallette offset color content cards with image backgrounds and a gradient overlay;\r\n * this number gives a white text color value over the gradient;\r\n * if background color starts to matter, we need to rethink how this is specified and applied\r\n * The higher the number, the darker the background; over 50 and we start to see white text instead of black,\r\n * but we don't want to go all the way to black, or the contrast rules will only give us off-white text which\r\n * doesn't show up very well over the gradient we use over images since they are more gray than black near the top\r\n */\r\nexport const ImageBackgroundColorOffset = 80;\r\n\r\n/**\r\n * Light mode color for a canvas\r\n */\r\nexport const LightModeBackgroundColor: string = neutralLayerCardContainer(() => whiteHexColor)(DesignSystemDefaults);\r\n\r\n/**\r\n * Helper function to determine light/dark mode for the browser.\r\n * @returns Undefined if matchMedia API is not available on the window object. True if browser is in dark mode, false otherwise.\r\n */\r\nexport function isDarkMode(): boolean {\r\n if (!window.matchMedia) {\r\n return undefined;\r\n }\r\n\r\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\");\r\n if (!media) {\r\n return undefined;\r\n }\r\n\r\n if (media.matches) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError } from \"@msnews/diagnostics\";\r\n\r\n/**\r\n * This is a global tracking object which is used to avoid\r\n * the need to have hard dependencies to a telemetry package.\r\n * Think of this as an interface which is overrided at runtime\r\n * by each app-type.\r\n */\r\n\r\ninterface TelemetryBase {\r\n trackAppErrorEvent(error: AppError): void;\r\n sendSinglePageViewBeacon(beaconId: string): void;\r\n trackPartialImpression(element?: any, viewType?: any, visibilityCheck?: boolean, mechanism?: string, topLevelContainerType?: string): void;\r\n trackEvent(element: HTMLElement,\r\n action?: string,\r\n behavior?: number,\r\n event?: any,\r\n destination?: any,\r\n headline?: string,\r\n module?: string,\r\n index?: string,\r\n campaign?: string,\r\n contentAction?: number): void;\r\n setTrackingAttrs(elementTree: HTMLElement, parentElement?: HTMLElement, options?: any, disableImpressionUpdate?: boolean): void;\r\n}\r\n\r\nexport const TelemetryBase: TelemetryBase = {\r\n trackAppErrorEvent: (): void => undefined,\r\n sendSinglePageViewBeacon: (): void => undefined,\r\n trackPartialImpression: (): void => undefined,\r\n trackEvent: (): void => undefined,\r\n setTrackingAttrs: null\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { SocialMedia, SocialMediaDefaultConfig } from \"./SocialMediaConfig\";\r\nimport { indexOf, uniqueId } from \"lodash-es\";\r\n\r\nimport { String } from \"typescript-string-operations\";\r\nimport { format } from \"@microsoft/fast-web-utilities\";\r\nimport { getAppEnvironment } from \"@msnews/core\";\r\nimport { getLocationOrigin } from \"@msnews/isomorphic-util\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\n/**\r\n * Document type being shared\r\n */\r\nexport enum SharedDocumentType {\r\n CMS = \"0\",\r\n SD = \"5\"\r\n}\r\n\r\n/**\r\n * Sharing details interface to build sharing items\r\n * @interface\r\n */\r\nexport interface SharingInfo {\r\n /**\r\n * CMS document id\r\n * @type {string}\r\n */\r\n documentId: string;\r\n\r\n /**\r\n * Document type\r\n * @type {SharedDocumentType}\r\n */\r\n documentType: SharedDocumentType;\r\n\r\n /**\r\n * Sharing url for the content\r\n * @type {string}\r\n */\r\n sharingUrl?: string;\r\n}\r\n\r\n/**\r\n * Helper for building sharing details\r\n * @class\r\n */\r\nexport class SharingHelper {\r\n /**\r\n * Base production url used in the sharing link\r\n */\r\n private static readonly SharingBaseUrlDefault: string = \"http://a.msn.com/\";\r\n\r\n /**\r\n * Path format used to build the sharing url\r\n */\r\n private static readonly shortUrlPathFormat: string = \"{0}{1}/{2}/{3}\";\r\n\r\n /**\r\n * List the available options that should be mapped to prod url\r\n */\r\n private static readonly SharingProductionHosts: string = \"bing.com|www.bing.com|preview.msn.com|www.msn.com\";\r\n\r\n /**\r\n * String used to map the AppId number to single char identifier required in the sharing url\r\n */\r\n private static readonly Base36AppIdString: string = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n\r\n /**\r\n * Path format used to append querystring to the sharing url\r\n */\r\n private static readonly appendQueryStringFormat: string = \"{0}?ocid={1}\";\r\n\r\n /**\r\n * List of available vertical keys to be mapped.\r\n * The order matter here as the AppId to be used is based on the array index of the key\r\n */\r\n private static readonly AppKeys: string[] = [\"finance\",\r\n \"news\",\r\n \"sports\",\r\n \"travel\",\r\n \"weather\",\r\n \"health\",\r\n \"foodanddrink\",\r\n \"entertainment\",\r\n \"autos\",\r\n \"video\",\r\n \"tv\",\r\n \"music\",\r\n \"movies\",\r\n \"games\",\r\n \"lifestyle\",\r\n \"kids\",\r\n \"sample\",\r\n \"asia\",\r\n \"africa\",\r\n \"australasia\",\r\n \"europe\",\r\n \"latinamerica\",\r\n \"middleeast\",\r\n \"northamerica\"];\r\n\r\n /**\r\n * Builds the short url that links to the article to be shared\r\n * @param sharingInfo The sharing data based on SharingInfo interface\r\n * @param locale The locale\r\n * @returns String with the short url to be shared\r\n */\r\n public static shortUrlBuilder(sharingInfo: SharingInfo, locale: string): string {\r\n const appId = this.getAppId();\r\n if (!appId) {\r\n return null;\r\n }\r\n\r\n const baseUrl = this.getSharingUrlBase(sharingInfo.sharingUrl);\r\n\r\n return baseUrl + format(this.shortUrlPathFormat, sharingInfo.documentType, appId, locale, sharingInfo.documentId);\r\n }\r\n\r\n /**\r\n * Gets the base36 AppId that is mapped from the vertical key identifier\r\n * @returns The mapped AppId\r\n */\r\n public static getAppId(): string {\r\n const { HostPage } = getAppEnvironment();\r\n const verticalKey: string = ((HostPage && HostPage.verticalKey) || \"news\").toLowerCase();\r\n let appId = indexOf(this.AppKeys, verticalKey);\r\n if (appId === -1 || appId >= this.Base36AppIdString.length) {\r\n appId = 1;\r\n }\r\n const base36Id = this.Base36AppIdString.substr(appId, 1);\r\n return base36Id;\r\n }\r\n\r\n /**\r\n * Gets the base url to be used in the shared link\r\n * @param articleUrl The full article url\r\n * @returns The base url to be used in the shared link\r\n */\r\n public static getSharingUrlBase(articleUrl: string): string {\r\n const url = new URL(articleUrl, getLocationOrigin());\r\n\r\n const host = url.host;\r\n const currentBaseUrl = url.origin + \"/\";\r\n\r\n const splitUrls = this.SharingProductionHosts.split(\"|\");\r\n\r\n const baseUrl = splitUrls.indexOf(host) > -1 ? this.SharingBaseUrlDefault : currentBaseUrl;\r\n\r\n return baseUrl;\r\n }\r\n\r\n /**\r\n * Strips off query string params\r\n * @param url Input url\r\n * @returns The plain url\r\n */\r\n public static getUrlWithoutQueryParams(url: string): string {\r\n if (url && url.length > 0) {\r\n return url.split(\"?\")[0];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Retrieves the URL for sharing with Social Media.\r\n * @param locationHref current window.location.href from requestContext\r\n * @param medias social media to be included\r\n * @param contentUrl The url of the content to be shared\r\n * @param contentTitle The title of the content\r\n * @param emailBody The body text to be used in the email\r\n * @param ocid The ocid to be included in the shared link\r\n * @returns The share url\r\n */\r\n public static getSocialMediaShareUrl(locationHref: string, media: string, contentUrl: string, contentTitle: string, emailBody?: string, ocid?: string, overrideShareUrl?: string): string {\r\n if (!locationHref || !media || !contentUrl || !contentTitle) {\r\n logger.logError(`SharingHelper: getSocialMediaShareUrl: Parameter missing: locationHref=${locationHref}, media=${media}, contentUrl=${contentUrl}, contentTitle=${contentTitle}`);\r\n return;\r\n }\r\n\r\n const socialMediaItemConfig = SocialMediaDefaultConfig[media];\r\n if (!socialMediaItemConfig) {\r\n logger.logError(`SharingHelper: getSocialMediaShareUrl: Cannot find media type: ${socialMediaItemConfig}`);\r\n return \"\";\r\n }\r\n\r\n let shareUrl = overrideShareUrl || socialMediaItemConfig.url;\r\n if (media === SocialMedia.Skype) {\r\n shareUrl = shareUrl.replace(\"{flowid}\", uniqueId());\r\n }\r\n\r\n if (ocid) {\r\n contentUrl = format(this.appendQueryStringFormat, contentUrl, ocid);\r\n }\r\n\r\n if (media === SocialMedia.Email && emailBody) {\r\n emailBody = format(emailBody, contentTitle, contentUrl);\r\n }\r\n\r\n shareUrl = String.Format(shareUrl, {\r\n url: encodeURIComponent(contentUrl),\r\n title: encodeURIComponent(contentTitle),\r\n body: emailBody ? encodeURIComponent(emailBody): \"\",\r\n refererUrl: locationHref\r\n });\r\n\r\n return shareUrl;\r\n }\r\n\r\n /**\r\n * Opens the social media sharing page in a new window\r\n * @param event Mouse event\r\n * @param shareUrl The complete url to be shared\r\n * @param options The features optional parameter in window.open\r\n */\r\n public static openNewWindow = (event: React.MouseEvent, shareUrl: string, options?: any): void => {\r\n const defaultOptions = { toolbar: 0, status: 0, resizable: 1, scrollbars: 1 };\r\n const finalOptions = Object.entries({ ...defaultOptions, ...options })\r\n .map(entry => entry.join(\"=\"))\r\n .join(\",\");\r\n\r\n window.open(shareUrl, null, finalOptions);\r\n };\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport * from \"./ActivityData\";\r\nexport * from \"./Comments\";\r\nexport * from \"./Content\";\r\nexport * from \"./enums\";\r\nexport * from \"./Reactions\";\r\nexport * from \"./SocialBarData\";\r\nexport * from \"./TypingUpdates\";\r\nexport * from \"./UGContent\";\r\nexport * from \"./User\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport function getParameter(key, defaultValue = null) {\r\n return getHashParameter(key) || getQueryParameter(key) || defaultValue;\r\n}\r\n\r\nfunction getQueryParameter (key) {\r\n const query = window.location.search.substring(1);\r\n const vars = query.split(\"&\");\r\n for (let i = 0; i < vars.length; i++) {\r\n const pair = vars[i].split(\"=\");\r\n if (pair[0].toLowerCase() == key.toLowerCase()) {\r\n return decodeURIComponent(pair[1]);\r\n }\r\n }\r\n return null;\r\n}\r\nfunction getHashParameter(key) {\r\n const query = window.location.hash.substring(1);\r\n const vars = query.split(\"&\");\r\n for (let i = 0; i < vars.length; i++) {\r\n const pair = vars[i].split(\"=\");\r\n if (pair[0].toLowerCase() == key.toLowerCase()) {\r\n return decodeURIComponent(pair[1]);\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nexport function generateQueryStringByKeyVals(keyVals) {\r\n return (keyVals && Object.keys(keyVals).length > 0) ? \"?\" + Object.keys(keyVals).map(function (key) {\r\n return `${key}=${encodeURIComponent(keyVals[key])}`;\r\n }).join(\"&\") : \"\";\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport async function fetchBlobClient(): Promise {\r\n const url = \"https://assets.msn.com/labs/views/CommentWidget/js/azure-storage.blob.min.js\";\r\n const id = \"azure-storage-blob-jssdk\";\r\n return new Promise((res, rej) => {\r\n if ((window as any).AzureStorage) {\r\n return res((window as any).AzureStorage);\r\n }\r\n fetchScript(url, id, () => {\r\n if ((window as any).AzureStorage) {\r\n return res((window as any).AzureStorage);\r\n }\r\n return rej();\r\n });\r\n });\r\n}\r\n\r\nfunction fetchScript(url: string, id: string, callback: () => void) {\r\n const d = document;\r\n const s = \"script\";\r\n if (!d.getElementById(id)) {\r\n const fjs = d.getElementsByTagName(s)[0];\r\n const js = d.createElement(s) as HTMLScriptElement; js.id = id;\r\n js.src = url;\r\n js.onload = callback;\r\n fjs.parentNode.insertBefore(js, fjs);\r\n }\r\n}\r\n\r\nexport interface AzureStorage {\r\n Blob: Blob;\r\n}\r\n\r\nexport interface Blob {\r\n createBlobServiceWithSas: (accountUrl: string, token: string) => BlobService;\r\n}\r\n\r\nexport interface BlobService {\r\n createBlockBlobFromBrowserFile: (container: string, blobName: string, file: any, callback: (error, result, response) => void) => void;\r\n}","// © Microsoft Corporation. All rights reserved.\r\nimport { SocialAPIRequestErrorComments, SocialAPIRequestErrorContents, SocialAPIRequestErrorUnknown, SocialAPIRequestErrorUsers } from \"@msnews/diagnostics\";\r\n\r\nexport const ApiErrors = {\r\n unknown: SocialAPIRequestErrorUnknown,\r\n contents: SocialAPIRequestErrorContents,\r\n users: SocialAPIRequestErrorUsers,\r\n comments: SocialAPIRequestErrorComments\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, logger } from \"@msnews/diagnostics\";\r\n\r\nclass AppErrorLogger {\r\n public onAppError: ((AppError) => void) = undefined;\r\n\r\n public log(error: AppError): void {\r\n if (this.onAppError) {\r\n try {\r\n this.onAppError(error);\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n }\r\n }\r\n\r\n public setOnAppError(onAppError: ((AppError) => void)): void {\r\n this.onAppError = onAppError;\r\n }\r\n}\r\n\r\nexport const appErrorLogger = new AppErrorLogger();","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ApiErrors, appErrorLogger, fetchBlobClient, generateQueryStringByKeyVals, getParameter } from \"../utils\";\r\nimport { AppError, logger } from \"@msnews/diagnostics\";\r\nimport { appEnvironment, Environment, getLocalStorage, getOcid } from \"@msnews/core\";\r\n\r\nimport { SocialReactions } from \"../schema/SocialBarData\";\r\nimport { SocialServiceMapper } from \"../mapper/SocialServiceMapper\";\r\nimport { UGContent } from \"../schema/UGContent\";\r\nimport { User } from \"../schema/User\";\r\nimport { enums } from \"../schema/enums\";\r\n\r\nexport enum ItemTypes {\r\n contents = \"contents\",\r\n comments = \"comments\",\r\n users = \"users\"\r\n}\r\nconst MY_REACTIONIDS = \"myReactionIds\";\r\nconst MY_REACTION_PREFIX = \"myReaction\";\r\n\r\nexport const getLocalContentReaction = (id: string, localStorageGet?: (id: string) => string): string => {\r\n if (localStorageGet) {\r\n return localStorageGet(id);\r\n } else if (getLocalStorage().supported && getLocalStorage().getItem(`${MY_REACTION_PREFIX}${id}`)) {\r\n return getLocalStorage().getItem(`${MY_REACTION_PREFIX}${id}`);\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nexport const saveLocalContentReaction = (id: string, reactionType: SocialReactions, reset: boolean, localStorageSave?: (id: string, reaction?: string) => void): void => {\r\n if (localStorageSave) {\r\n localStorageSave(id, reset ? null : reactionType);\r\n } else if (getLocalStorage().supported) {\r\n if (reset) {\r\n getLocalStorage().setItem(`${MY_REACTION_PREFIX}${id}`, \"\"); // Compatibility\r\n getLocalStorage().removeItem(`${MY_REACTION_PREFIX}${id}`);\r\n const myReactionIds = getLocalStorage().getItem(MY_REACTIONIDS);\r\n let ids = myReactionIds ? myReactionIds.split(\",\") : [];\r\n ids = ids.filter(x => x != id);\r\n getLocalStorage().setItem(MY_REACTIONIDS, ids.join(\",\"));\r\n } else if (reactionType) {\r\n const myReactionIds = getLocalStorage().getItem(MY_REACTIONIDS);\r\n let ids = myReactionIds ? myReactionIds.split(\",\") : [];\r\n // Cleanup local storage\r\n // If local storage exceed more than 200 ids remove the first half 100\r\n if (ids.length > 200) {\r\n ids = ids.filter((x, y) => {\r\n if (y < 100) {\r\n getLocalStorage().removeItem(`${MY_REACTION_PREFIX}${x}`);\r\n return false;\r\n }\r\n return true;\r\n });\r\n }\r\n ids.push(id);\r\n getLocalStorage().setItem(`${MY_REACTION_PREFIX}${id}`, reactionType);\r\n getLocalStorage().setItem(MY_REACTIONIDS, ids.join(\",\"));\r\n }\r\n }\r\n};\r\n\r\nexport const getXPayToken = async (): Promise => {\r\n if (getLocalStorage().supported) {\r\n const tokenStorageKey = \"community_xpay_token\";\r\n const tokenExpirationStorageKey = \"community_xpay_token_expires\";\r\n\r\n const storedToken = getLocalStorage().getItem(tokenStorageKey);\r\n if (storedToken) {\r\n const tokenExpires = getLocalStorage().getItem(tokenExpirationStorageKey);\r\n if (tokenExpires && ((new Date(parseInt(tokenExpires))).valueOf() - Date.now()) > 10000) { // more than ten seconds to expiration\r\n return storedToken;\r\n }\r\n }\r\n\r\n const response = await SocialService.getXPayTokenInfo();\r\n getLocalStorage().setItem(tokenStorageKey, response.accessToken);\r\n getLocalStorage().setItem(tokenExpirationStorageKey, (Date.now() + response.expiresIn*1000).toString());\r\n return response.accessToken;\r\n } else {\r\n const response = await SocialService.getXPayTokenInfo();\r\n return response.accessToken;\r\n }\r\n};\r\n\r\nexport class SocialService {\r\n private static domain = enums.externalUrls.api;\r\n private static testDomain = enums.externalUrls.ppeApi;\r\n private static sendAuthHeader: string;\r\n private static get msaAccessToken(): string {\r\n return getParameter(\"msaAccessToken\");\r\n }\r\n private static get muid(): string {\r\n return getParameter(\"muid\");\r\n }\r\n private static get fdhead(): string {\r\n return getParameter(\"fdhead\") || (appEnvironment.CurrentRequestTargetScope &&\r\n appEnvironment.CurrentRequestTargetScope.pageExperiments &&\r\n appEnvironment.CurrentRequestTargetScope.pageExperiments.join());\r\n }\r\n private static get ocid(): string {\r\n return getParameter(\"ocid\") || getOcid();\r\n }\r\n private static endpoints = {\r\n contents: SocialService.domain.concat(\"urls/\"),\r\n comments: SocialService.domain.concat(\"comments/\"),\r\n users: SocialService.domain.concat(\"users/\"),\r\n ugcontents: SocialService.testDomain.concat(\"ugcontents/\"),\r\n ugsastokens: SocialService.testDomain.concat(\"ugsastokens/\"),\r\n systags: \"https://api.msn.com/graph/systags\",\r\n typingUpdates: \"https://assets.msn.com/labs/api/\"\r\n };\r\n\r\n constructor(sendAuthHeader) {\r\n SocialService.sendAuthHeader = sendAuthHeader;\r\n }\r\n\r\n // SocialService Config\r\n public static setDomain(newDomain) {\r\n this.domain = newDomain;\r\n this.endpoints = {\r\n ...this.endpoints,\r\n contents: SocialService.domain.concat(\"urls/\"),\r\n comments: SocialService.domain.concat(\"comments/\"),\r\n users: SocialService.domain.concat(\"users/\")\r\n };\r\n }\r\n\r\n // USER\r\n public static async fetchMe(verify): Promise {\r\n return SocialService.getUserById(\"me\", verify);\r\n }\r\n\r\n public static async deleteMyData(deletingData): Promise {\r\n const queryParams = {\r\n ...deletingData,\r\n profile: \"social\"\r\n };\r\n return SocialService.DELETE(SocialService.endpoints.users + \"me/\", queryParams);\r\n }\r\n\r\n public static async getUserById(userId: string, verify = false) {\r\n return SocialService.GET(SocialService.endpoints.users + userId, { version: \"1.1\", profile: \"social\", verify: verify })\r\n .then((data) => SocialServiceMapper.convertUser(data || null));\r\n }\r\n\r\n public static async getXPayTokenInfo() {\r\n return SocialService.GET(SocialService.domain + \"xpaytoken\");\r\n }\r\n\r\n public static async getUserProfile(userId: string) {\r\n let user = {\r\n followers: undefined,\r\n following: undefined,\r\n comments: undefined\r\n };\r\n return Promise.all([\r\n SocialService.GET(SocialService.endpoints.users + userId, { version: \"1.1\", profile: \"social\" }) // get user\r\n .then((data) => {\r\n user = {\r\n ...user,\r\n ...SocialServiceMapper.convertUser(data || null)\r\n };\r\n }),\r\n SocialService.getFollowersByUserId(userId).then((data) => {\r\n user.followers = data;\r\n }),\r\n SocialService.getFollowingsByUserId(userId).then((data) => {\r\n user.following = data;\r\n }),\r\n SocialService.getCommentsByUserId(userId).then((data) => {\r\n user.comments = data;\r\n })\r\n ]).then((results) => {\r\n return user;\r\n }).catch((data) => {\r\n logger.logError(\"Error getting user profile: \" + data.statusText);\r\n });\r\n }\r\n\r\n public static async getUserContents(userId: string, market: string, premium?: boolean, args: any = {}) {\r\n const params: any = {\r\n market,\r\n $top: args.top || 20,\r\n $skip: args.skip || 0,\r\n $orderby: args.orderBy || \"Time\"\r\n };\r\n if (premium) {\r\n params.productType = \"premium\";\r\n }\r\n return SocialService.GET(SocialService.endpoints.users + userId + \"/contents\", params);\r\n }\r\n\r\n public static async appealMe() {\r\n return SocialService.POST(SocialService.endpoints.users + \"me/appeals\", {});\r\n }\r\n\r\n public static async appealMyPicture() {\r\n return SocialService.POST(SocialService.endpoints.users + \"me/pictureAppeals\", {});\r\n }\r\n\r\n public static async getFollowersByUserId(userId, top = 10, skip = 0): Promise {\r\n const queryParams = {\r\n $top: top,\r\n $skip: skip\r\n };\r\n return SocialService.GET(SocialService.endpoints.users + userId + \"/followers\", queryParams).then(data => SocialServiceMapper.convertUserList(data));\r\n }\r\n\r\n public static async getFollowingsByUserId(userId, top = 10, skip = 0): Promise {\r\n const queryParams = {\r\n $top: top,\r\n $skip: skip\r\n };\r\n return SocialService.GET(SocialService.endpoints.users + userId + \"/followings\", queryParams).then(data => SocialServiceMapper.convertUserList(data));\r\n }\r\n\r\n /** @param userInfo Used to create a matching user */\r\n public static async createUser(notUserAvatar?: boolean) {\r\n const postBody = { notUseAvatar: notUserAvatar || false };\r\n return SocialService.POST(SocialService.endpoints.users + \"me\", postBody, { profile: \"social\" }, undefined)\r\n .then((data) => SocialServiceMapper.convertUser(data || null))\r\n .catch(e => { return e.json().then(error => { throw error; }); });\r\n }\r\n\r\n /** @param isPrivateProfile Can be one of: true, false */\r\n public static async updateUserSettings(userId: string, isPrivateProfile: boolean) {\r\n const queryParams = {};\r\n const postBody = {};\r\n postBody[userId] = {\r\n isPrivateProfile: isPrivateProfile\r\n };\r\n return SocialService.PUT(SocialService.endpoints.users + userId + \"/settings\", postBody, queryParams, userId);\r\n }\r\n public static async followUser(userId: string, targetId: string) {\r\n return SocialService.POST(SocialService.endpoints.users + targetId + \"/followers/\" + userId, {}, {}, userId);\r\n }\r\n public static async unfollowUser(userId: string, targetId: string) {\r\n return SocialService.DELETE(SocialService.endpoints.users + targetId + \"/followers/\" + userId, {}, userId);\r\n }\r\n public static async getUserIsFollowed(userId: string, targetId: string) {\r\n return new Promise((resolve, reject) => {\r\n if (!userId) {\r\n resolve(null);\r\n return;\r\n }\r\n SocialService.GET(SocialService.endpoints.users + targetId + \"/followers/\" + userId, {})\r\n .then((data) => resolve(true))\r\n .catch((data) => resolve(false));\r\n });\r\n }\r\n public static async reportUser(userId: string, reportItemType: string, reportType: string, intellectualPropertyReportParams?: any) {\r\n const urlPart = reportItemType == \"ProfilePicture\" ? \"PictureAbusereports\" : \"NameAbusereports\";\r\n\r\n const { reportMessage, intellectualPropertyDetails } = intellectualPropertyReportParams || {};\r\n const postBody = {\r\n ReportType: reportType,\r\n ReportMessage: reportMessage || \"\",\r\n IntellectualPropertyDetails: intellectualPropertyDetails\r\n };\r\n try {\r\n return SocialService.POST(SocialService.endpoints.users + userId + \"/\" + urlPart, postBody, {});\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n }\r\n public static async getUserNotifications() {\r\n const queryParams = {\r\n onlynotification: true,\r\n read: false,\r\n $top: 5,\r\n $skip: 0\r\n };\r\n return SocialService.GET(SocialService.endpoints.users + \"me/activities\", queryParams)\r\n .then((data) => SocialServiceMapper.convertUserActivities(data || null));\r\n }\r\n public static async getUserActivities(top, skip) {\r\n const queryParams = {\r\n $top: top || 50,\r\n $skip: skip || 0\r\n };\r\n return SocialService.GET(SocialService.endpoints.users + \"me/activities\", queryParams)\r\n .then((data) => SocialServiceMapper.convertUserActivities(data || null));\r\n }\r\n public static async updateUserActivityStatus(id: string, read = true) {\r\n const postBody = {\r\n id: id,\r\n read: read\r\n };\r\n return SocialService.POST(SocialService.endpoints.users + \"me/activities\", postBody);\r\n }\r\n\r\n // CONTENT\r\n public static async getContentById(cmsid: string, market?: string) {\r\n const params = {\r\n cmsid,\r\n market,\r\n version: \"1.1\"\r\n };\r\n if (!market) {\r\n delete params.market;\r\n }\r\n return SocialService.GET(SocialService.endpoints.contents, params)\r\n .then((data) => SocialServiceMapper.convertContent(data || null));\r\n }\r\n /** @param contentInfo Used to create a matching content, must include: \"cmsId\" */\r\n public static async createContent(contentInfo: string) {\r\n const contentIdAndMarket = contentInfo.split(\"_\");\r\n const body = {\r\n cmsId: contentIdAndMarket[0],\r\n market: contentIdAndMarket[1]\r\n };\r\n return SocialService.POST(SocialService.endpoints.contents, body)\r\n .then((data) => SocialServiceMapper.convertContent(data || null));\r\n }\r\n\r\n // COMMENT\r\n public static async getCommentById(commentId) {\r\n return SocialService.GET(SocialService.endpoints.comments + commentId)\r\n .then((data) => SocialServiceMapper.convertComment(data || null));\r\n }\r\n public static async getCommentsByContentId(contentId, args) {\r\n const queryParams = {\r\n contentId: contentId,\r\n $top: args.top || 50,\r\n $skip: args.skip || 0,\r\n $orderby: args.orderBy || args.sortType || \"Rating\"\r\n };\r\n return SocialService.GET(SocialService.endpoints.comments, queryParams)\r\n .then((data) => {\r\n // Calculate comment status\r\n let commentStatus = \"On\";\r\n try {\r\n const contentCommentStatus = data.links.find((link) => link.type == \"Content\").item.commentStatus;\r\n commentStatus = contentCommentStatus || commentStatus;\r\n } catch (e) {\r\n logger.logError(\"Invalid content data in comments response.\");\r\n }\r\n\r\n // Crate commentsList with pagination info and commentStatus\r\n try {\r\n const commentsObj = SocialServiceMapper.convertCommentList(data || null);\r\n commentsObj.commentStatus = commentStatus;\r\n\r\n return commentsObj;\r\n } catch (e) {\r\n logger.logError(\"Invalid comment list data in comments response.\");\r\n\r\n return {\r\n commentStatus: \"Off\",\r\n list: []\r\n };\r\n }\r\n });\r\n }\r\n public static async getCommentsByParentId(parentCommentId, args) {\r\n const queryParams = {\r\n parentId: parentCommentId,\r\n $top: args.top || 10,\r\n $skip: args.skip || 0,\r\n $orderby: args.orderBy || \"Time\"\r\n };\r\n return SocialService.GET(SocialService.endpoints.comments, queryParams)\r\n .then((data) => SocialServiceMapper.convertCommentList(data || null));\r\n }\r\n public static async getCommentsByAnchorCommentId(anchorCommentId, args) {\r\n const queryParams = {\r\n anchorId: anchorCommentId,\r\n $top: args.top || 10,\r\n $skip: args.skip || 0,\r\n $orderby: args.orderBy || \"Time\"\r\n };\r\n return SocialService.GET(SocialService.endpoints.comments, queryParams)\r\n .then((data) => SocialServiceMapper.convertCommentList(data || null));\r\n }\r\n public static async getCommentsByUserId(userId, top = 10, skip = 0, orderBy = \"Time\"): Promise {\r\n const queryParams = {\r\n userId: userId,\r\n $top: top,\r\n $skip: skip,\r\n $orderby: orderBy\r\n };\r\n return SocialService.GET(SocialService.endpoints.comments, queryParams)\r\n .then((data) => SocialServiceMapper.convertCommentList(data || null));\r\n }\r\n public static async postComment(contentId, userId, commentBody, commentParentId = undefined, commentMentionReplyId = undefined) {\r\n const postBody = {\r\n ContentId: contentId,\r\n Body: commentBody,\r\n parentId: commentParentId && commentParentId != contentId ? commentParentId : undefined,\r\n mentionReply: commentMentionReplyId\r\n };\r\n return new Promise((resolve, reject) => {\r\n SocialService.POST(SocialService.endpoints.comments, postBody, {}, userId)\r\n .then((data) => {\r\n resolve(SocialServiceMapper.convertComment(data || null));\r\n }, (response) => {\r\n response.json().then(data => {\r\n reject(data);\r\n }).catch(e => {\r\n logger.logError(\"Error getting comment info: \" + response.statusText);\r\n reject();\r\n });\r\n });\r\n });\r\n }\r\n public static async deleteComment(commentId) {\r\n return SocialService.DELETE(SocialService.endpoints.comments + commentId, {});\r\n }\r\n public static async appealComment(commentId) {\r\n return SocialService.POST(SocialService.endpoints.comments + commentId + \"/appeals\", {});\r\n }\r\n public static async reportComment(commentId, reportType, intellectualPropertyReportParams?) {\r\n const { reportMessage, intellectualPropertyDetails } = intellectualPropertyReportParams || {};\r\n const postBody = {\r\n ReportType: reportType,\r\n ReportMessage: reportMessage || \"\",\r\n IntellectualPropertyDetails: intellectualPropertyDetails\r\n };\r\n try {\r\n return SocialService.POST(SocialService.endpoints.comments + commentId + \"/abusereports\", postBody, {});\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n }\r\n public static async uploadCopyrightFile(file): Promise {\r\n const sasTokenInfo = await SocialService.GET(SocialService.endpoints.users + \"me/UploadSasToken\", { type: \"ContentReport\" });\r\n const AzureStorage = await fetchBlobClient();\r\n const blobUri = `https://${sasTokenInfo.accountUrl.split(\"?\")[0]}`;\r\n const blobService = AzureStorage.Blob.createBlobServiceWithSas(blobUri, sasTokenInfo.sasString);\r\n return new Promise((res, rej) => {\r\n blobService.createBlockBlobFromBrowserFile(sasTokenInfo.container, sasTokenInfo.blobName, file, async (error, result, response) => {\r\n if (error) {\r\n return rej(error);\r\n }\r\n return res(sasTokenInfo.id);\r\n });\r\n });\r\n }\r\n\r\n // ITEMS\r\n public static async rate(item, id, rateValue, forceRate = false, localStorageSave?: (id: string, reaction?: string) => void) {\r\n const queryParams = {};\r\n const postBody = {\r\n subType: rateValue\r\n };\r\n try {\r\n const data = await SocialService.POST(SocialService.endpoints[item] + id + \"/reactions\", postBody, queryParams);\r\n saveLocalContentReaction(id, rateValue, false, localStorageSave);\r\n return SocialServiceMapper.convertRatingToRateValue(data || null);\r\n } catch (e) {\r\n logger.logError(e);\r\n // Create content if it doesn't exists\r\n if (e.status === 400 && forceRate) {\r\n await this.forceRate(item, id, rateValue, localStorageSave);\r\n }\r\n return rateValue;\r\n }\r\n }\r\n public static async resetRating(item, id, localStorageSave?: (id: string, reaction?: string) => void) {\r\n try {\r\n saveLocalContentReaction(id, null, true, localStorageSave);\r\n return SocialService.DELETE(SocialService.endpoints[item] + id + \"/reactions\", {});\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n }\r\n public static async forceRate(item, id, rateValue, localStorageSave?: (id: string, reaction?: string) => void) {\r\n try {\r\n await SocialService.createContent(id);\r\n } catch (e) {\r\n logger.logError(e);\r\n return rateValue;\r\n }\r\n SocialService.rate(item, id, rateValue, false, localStorageSave);\r\n }\r\n public static async getFriendRatings(item, id) {\r\n return SocialService.GET(SocialService.endpoints[item] + id + \"/reactions\", { friends: true, $top: 2 });\r\n }\r\n public static async getRating(item, id) {\r\n return SocialService.GET(SocialService.endpoints[item] + id + \"/reactions\", {})\r\n .then((data) => SocialServiceMapper.convertRatingToRateValue(data || null));\r\n }\r\n public static async getRatingBreakdown(item, id) {\r\n return SocialService.GET(SocialService.endpoints[item] + id + \"/reactions\", { others: true })\r\n .then((data) => SocialServiceMapper.convertReactionsResponseToReactionBreakdownData(data || null));\r\n }\r\n\r\n private static prepareHubString(contentId: string) {\r\n return contentId.replace(/-/g, \"_\"); // signalR won't accept hubs with dashes\r\n }\r\n\r\n // Realtime Typing Updates\r\n public static async getSignalRConnectionInfo(contentId: string) {\r\n const hub = this.prepareHubString(contentId);\r\n return SocialService.POST(SocialService.endpoints.typingUpdates + \"RealtimeTypingNegotiate\", {}, { hub });\r\n }\r\n\r\n public static async broadcastCommentNotification(contentId: string, commentId: string, commentParentId: string) {\r\n const hub = this.prepareHubString(contentId);\r\n const data = {\r\n type: \"comment-notification\",\r\n data: {\r\n commentId,\r\n commentParentId\r\n }\r\n };\r\n return SocialService.POST(SocialService.endpoints.typingUpdates + \"RealtimeTypingBroadcast\", data, { hub }).then(res => { }, err => { });\r\n }\r\n\r\n public static async broadcastTypingNotification(contentId: string, id: string, name: string, profileImageUrl: string) {\r\n const hub = this.prepareHubString(contentId);\r\n const data = {\r\n type: \"typing-notification\",\r\n data: {\r\n id,\r\n name,\r\n profileImageUrl\r\n }\r\n };\r\n return SocialService.POST(SocialService.endpoints.typingUpdates + \"RealtimeTypingBroadcast\", data, { hub }, id).then(res => { }, err => { });\r\n }\r\n\r\n // UGC\r\n public static async getUGContents(userId, top, skip) {\r\n const queryParams = {\r\n type: \"article\",\r\n userId: userId,\r\n $top: top,\r\n $skip: skip\r\n };\r\n return SocialService.GET(SocialService.endpoints.ugcontents, queryParams)\r\n .then((data) => SocialServiceMapper.convertUGContentListView(data || null));\r\n }\r\n public static async getUGContentById(id: string) {\r\n return SocialService.GET(SocialService.endpoints.ugcontents + id)\r\n .then((data) => SocialServiceMapper.convertUGContent(data || null));\r\n }\r\n public static async postUGContent(contentInfo: UGContent) {\r\n if (contentInfo.resources && contentInfo.resources.length > 0) {\r\n contentInfo.resources[0].isCover = undefined;\r\n }\r\n\r\n const resources = contentInfo.resources && contentInfo.resources.map(resource => {\r\n return {\r\n type: \"Ug\" + resource.type,\r\n item: {\r\n id: resource.id,\r\n type: resource.type,\r\n url: resource.url,\r\n isPublished: false\r\n }\r\n };\r\n });\r\n\r\n const headlines = [\r\n {\r\n title: contentInfo.title,\r\n subTitle: \"subTitle\",\r\n kicker: \"\",\r\n image: contentInfo.resources && contentInfo.resources.length > 0 && contentInfo.resources[0] && {\r\n type: \"Ug\" + contentInfo.resources[0].type,\r\n item: {\r\n id: contentInfo.resources[0].id,\r\n type: contentInfo.resources[0].type,\r\n url: contentInfo.resources[0].url,\r\n isPublished: false\r\n }\r\n }\r\n }\r\n ];\r\n\r\n const body = {\r\n id: contentInfo.id,\r\n type: contentInfo.type || \"article\",\r\n title: contentInfo.title,\r\n abstract: contentInfo.abstract,\r\n body: contentInfo.body,\r\n market: contentInfo.market,\r\n tags: contentInfo.tags,\r\n resources: resources,\r\n headlines: headlines\r\n };\r\n return SocialService.POST(SocialService.endpoints.ugcontents, body)\r\n .then((data) => SocialServiceMapper.convertUGContent(data || null));\r\n }\r\n public static async publishUGContent(id: string) {\r\n return SocialService.POST(SocialService.endpoints.ugcontents + id + \"/publish\", {})\r\n .then((data) => SocialServiceMapper.convertUGContentPublishResponse(data || null));\r\n }\r\n public static async unPublishUGContent(id: string) {\r\n // TODO: API is not ready yet\r\n return SocialService.POST(SocialService.endpoints.ugcontents + id + \"/publish\", {})\r\n .then((data) => SocialServiceMapper.convertUGContentPublishResponse(data || null));\r\n }\r\n public static async deleteUGContent(id: string) {\r\n // TODO: API is not ready yet\r\n return SocialService.POST(SocialService.endpoints.ugcontents + id + \"/delete\", {})\r\n .then((data) => SocialServiceMapper.convertUGContentPublishResponse(data || null));\r\n }\r\n public static async postUGContentResource(contentInfo: UGContent, file): Promise {\r\n const sasTokenInfo = await this.getUGSasToken();\r\n const AzureStorage = await fetchBlobClient();\r\n const blobUri = `https://${sasTokenInfo.accountUrl.split(\"?\")[0]}`;\r\n const blobService = AzureStorage.Blob.createBlobServiceWithSas(blobUri, sasTokenInfo.sasString);\r\n return new Promise((res, rej) => {\r\n blobService.createBlockBlobFromBrowserFile(sasTokenInfo.container, sasTokenInfo.blobName, file, async (error, result, response) => {\r\n if (error) {\r\n // Upload blob failed\r\n logger.logError(error);\r\n return rej(error);\r\n }\r\n const resourceCMSRequest = {\r\n type: \"Image\",\r\n title: contentInfo.title,\r\n market: contentInfo.market,\r\n attribution: \"\",\r\n altText: \"\",\r\n sasTokenId: sasTokenInfo.id\r\n };\r\n\r\n const resourceCMSResponse = await SocialService.POST(SocialService.endpoints.ugcontents, resourceCMSRequest);\r\n const newResource = {\r\n id: resourceCMSResponse.id,\r\n type: resourceCMSResponse.type,\r\n url: resourceCMSResponse.url\r\n };\r\n\r\n const contentInfoToBeUpdated = {\r\n ...contentInfo,\r\n resources: contentInfo.resources ? contentInfo.resources.concat(newResource) : [newResource]\r\n };\r\n return res(this.postUGContent(contentInfoToBeUpdated));\r\n });\r\n });\r\n }\r\n private static async getUGSasToken() {\r\n return SocialService.GET(SocialService.endpoints.ugsastokens);\r\n }\r\n public static async getTagsByTitle(title?, market?) {\r\n const queryParams = {\r\n ocid: \"oxfordblue\",\r\n apikey: \"fOZLW0C1nEyGDC2S7tbLaTBadX30QRkTIk7rOScoLc\",\r\n $filter: `locale eq '${market || \"en-us\"}'` + (title ? ` and contains(lowercaseName,'${title}')` : \"\"),\r\n $select: \"id,name,locale\"\r\n };\r\n return SocialService.GET(SocialService.endpoints.systags, queryParams)\r\n .then((data) => SocialServiceMapper.convertTags(data || null));\r\n }\r\n public static async getCategoriesByTitle(title?, market?) {\r\n const queryParams = {\r\n ocid: \"oxfordblue\",\r\n apikey: \"fOZLW0C1nEyGDC2S7tbLaTBadX30QRkTIk7rOScoLc\",\r\n $filter: `sourceType eq 'category' and locale eq '${market || \"en-us\"}'` + (title ? ` and contains(lowercaseName,'${title}')` : \"\"),\r\n $select: \"id,name,locale\"\r\n };\r\n return SocialService.GET(SocialService.endpoints.systags, queryParams)\r\n .then((data) => SocialServiceMapper.convertTags(data || null));\r\n }\r\n public static async getLocationsByTitle(title?, market?) {\r\n const queryParams = {\r\n ocid: \"oxfordblue\",\r\n apikey: \"fOZLW0C1nEyGDC2S7tbLaTBadX30QRkTIk7rOScoLc\",\r\n $filter: `isLocation eq true and locale eq '${market || \"en-us\"}'` + (title ? ` and contains(lowercaseName,'${title}')` : \"\"),\r\n $select: \"id,name,locale\"\r\n };\r\n return SocialService.GET(SocialService.endpoints.systags, queryParams)\r\n .then((data) => SocialServiceMapper.convertTags(data || null));\r\n }\r\n\r\n private static async GET(url, queryParams?, userId?) {\r\n queryParams = queryParams || {};\r\n const requestArgs = {\r\n queryParams: queryParams,\r\n authHeader: undefined,\r\n body: undefined,\r\n method: \"GET\"\r\n };\r\n if (userId && SocialService.sendAuthHeader) {\r\n requestArgs.authHeader = userId;\r\n }\r\n return this.xhr(url, requestArgs);\r\n }\r\n\r\n private static async POST(url, data, queryParams?, userId?, type = \"POST\") {\r\n queryParams = queryParams || {};\r\n const requestArgs = {\r\n method: type,\r\n queryParams: queryParams,\r\n body: data,\r\n authHeader: undefined\r\n };\r\n if (userId && SocialService.sendAuthHeader) {\r\n requestArgs.authHeader = userId;\r\n }\r\n return this.xhr(url, requestArgs);\r\n }\r\n\r\n private static async PUT(url, data, queryParams, userId?) {\r\n return SocialService.POST(url, data, queryParams, userId, \"PUT\");\r\n }\r\n\r\n private static async DELETE(url, queryParams, userId?) {\r\n queryParams = queryParams || {};\r\n const requestArgs = {\r\n method: \"DELETE\",\r\n queryParams: queryParams,\r\n authHeader: undefined,\r\n body: undefined\r\n };\r\n if (userId && SocialService.sendAuthHeader) {\r\n requestArgs.authHeader = userId;\r\n }\r\n return this.xhr(url, requestArgs);\r\n }\r\n\r\n private static cachedResponses: { [url: string]: Promise } = {};\r\n private static clearCache() {\r\n SocialService.cachedResponses = {};\r\n }\r\n private static fetchCachedResponse(url, options) {\r\n if (options && options.method == \"GET\" && url in SocialService.cachedResponses) {\r\n return SocialService.cachedResponses[url];\r\n }\r\n\r\n if (options && options.method != \"GET\") {\r\n SocialService.clearCache();\r\n }\r\n\r\n const result = fetch(url, options);\r\n if (options && options.method == \"GET\") {\r\n SocialService.cachedResponses[url] = result;\r\n setTimeout(() => {\r\n if (url in SocialService.cachedResponses) {\r\n delete SocialService.cachedResponses[url];\r\n }\r\n }, 500);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private static async xhr(url, args = {\r\n queryParams: undefined,\r\n method: undefined,\r\n authHeader: undefined,\r\n body: undefined\r\n }): Promise {\r\n // receives args: method, queryParams, headers, body\r\n args.queryParams.scn = \"MSNRPSAuth\";\r\n args.queryParams.wrapodata = \"false\";\r\n\r\n const headers = { \"Content-Type\": \"application/json\" };\r\n if (args.authHeader) {\r\n headers[\"X-MSN-SCP-Auth\"] = args.authHeader;\r\n }\r\n if (SocialService.msaAccessToken) {\r\n headers[\"UserTicketType\"] = \"2\";\r\n headers[\"UserAuthToken\"] = SocialService.msaAccessToken;\r\n headers[\"SiteName\"] = \"api.msn.com\";\r\n }\r\n if (SocialService.muid) {\r\n headers[\"muid\"] = \"m-\" + SocialService.muid;\r\n }\r\n if (SocialService.fdhead) {\r\n args.queryParams.fdhead = SocialService.fdhead;\r\n }\r\n if (SocialService.ocid) {\r\n args.queryParams.ocid = SocialService.ocid;\r\n }\r\n\r\n const queryString = generateQueryStringByKeyVals(args.queryParams);\r\n const fetchOptions: any = {\r\n method: args.method || \"GET\",\r\n headers,\r\n credentials: \"include\"\r\n };\r\n if (args.body) {\r\n fetchOptions.body = JSON.stringify(args.body);\r\n }\r\n\r\n return SocialService.fetchCachedResponse(url + queryString, fetchOptions).then(response => {\r\n if (response.status >= 200 && response.status < 300 || response.status == 401) {\r\n if (response.status == 204) {\r\n return {};\r\n }\r\n try {\r\n // Cloning for multiple consumers\r\n return response.clone().json().then(result => {\r\n if (result.value) {\r\n result = result.value[0];\r\n }\r\n return result;\r\n });\r\n } catch (e) {\r\n this.onRequestError(url, args);\r\n throw ({\r\n status: response.status,\r\n statusText: \"INVALID_RESPONSE\"\r\n });\r\n }\r\n } else {\r\n if (response.status > 499 || response.status == 400) {\r\n this.onRequestError(url, args);\r\n }\r\n throw response;\r\n }\r\n });\r\n }\r\n\r\n private static onRequestError(url, args): void {\r\n const resource = this.resourceForUrl(url);\r\n const appError: AppError = ApiErrors[resource] || ApiErrors.unknown;\r\n appErrorLogger.log({\r\n ...appError,\r\n message: \"Request failed\",\r\n pb: {\r\n ...appError.pb,\r\n customMessage: resource,\r\n url: url,\r\n method: args.method\r\n }\r\n } as AppError);\r\n }\r\n\r\n private static resourceForUrl(url): string {\r\n for (const [key, value] of Object.entries(ItemTypes)) {\r\n if (url.indexOf(`/${value}`) > 0) {\r\n return value;\r\n }\r\n }\r\n return \"unknown\";\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\nexport function dispatchBridgeEvent(bridgeEventName, data = {}) {\r\n try {\r\n document.dispatchEvent(new CustomEvent(bridgeEventName, {detail: {eventName: bridgeEventName, data: data}}));\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n}\r\n\r\nexport function handleBridgeEvent(customEvent: CustomEvent) {\r\n try {\r\n const data = {type: customEvent.detail.eventName,\r\n ...customEvent.detail.data\r\n };\r\n window.ReactNativeWebView && window.ReactNativeWebView.postMessage(JSON.stringify({type: \"community\", data: data}));\r\n logger.log(`Bridge message is sent. Message: ${JSON.stringify({type: \"community\", data: data})}`);\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n}\r\n\r\nexport const BridgeEventNames = {\r\n signInClicked: \"sign-in-clicked\",\r\n saveCachedMyReaction: \"save-cached-my-reaction\",\r\n commentsClicked: \"comments-clicked\",\r\n openDeepLink: \"open-deep-link\",\r\n requestBrowser: \"request-browser\",\r\n increaseBackStack: \"increase-back-stack\",\r\n openPopup: \"open-popup\",\r\n closePopup: \"close-popup\"\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Activities, Content, ReactionBreakdownData, TypingUser, UGContent, UGContentListView, User, UserList } from \"@msnews/social-data-service\";\r\n\r\nimport { ActionMap } from \"@msnews/experiences-redux\";\r\n\r\nexport type SetTheme = (theme?: string) => void;\r\nexport type UpdateMe = (me: User) => void;\r\nexport type UpdateNotifications = (notifications: Activities) => void;\r\nexport type UpdateActivities = (activities: Activities) => void;\r\nexport type DeleteActivities = () => void;\r\nexport type UpdateActivityStatus = (id: string, read: boolean) => void;\r\nexport type UpdateActivityAppeal = (id: string, appealSent: boolean) => void;\r\nexport type SetContent = (content: Content, id: string) => void;\r\nexport type UpdateContent = (contentId: string, data: any) => void;\r\nexport type UpdateContentRating = (contentId: string, rating: String) => void;\r\nexport type InsertComments = (contentId: string, comments: Object, page: boolean, parentId?: String, prepend?: boolean) => void;\r\nexport type ResetSpecificCommentId = () => void;\r\nexport type IncrementReplyCount = (contentId: string, commentId?: string) => void;\r\nexport type UpdateCommentRating = (contentId: string, commentId: string, rating: String, updateCounts: boolean) => void;\r\nexport type InsertComment = (contentId: string, comment: Object, parentId?: String, addedOffline?: boolean) => void;\r\nexport type UpdateUser = (userId: String, user: Object) => void;\r\nexport type UpdateUserFollowers = (userId: String, followers: UserList) => void;\r\nexport type UpdateUserFollowing = (userId: String, following: UserList) => void;\r\nexport type UpdateUserComments = (userId: String, comments: Array, reset: boolean) => void;\r\nexport type DeleteUserComment = (userId: String, commentId: string, parentId: string) => void;\r\nexport type SetReactionBreakdown = (data: ReactionBreakdownData) => void;\r\nexport type SetGradientOverlayData = (data: any) => void;\r\nexport type SetPublisherSubscribeFollowButtonData = (data: any) => void;\r\nexport type SetPopup = (moduleName: string, props: Object) => void;\r\nexport type AddTyper = (typer: TypingUser, contentId: string, id: string, market: string) => void;\r\nexport type UpdateTypers = (expireTime: number) => void;\r\nexport type RecordSignalRHub = (contentId: string) => void;\r\nexport type UpdateUGContents = (ugContents: UGContentListView, userId: string) => void;\r\nexport type UpdateUGContent = (ugContent: UGContent) => void;\r\nexport type PublishUGContent = () => void;\r\nexport type UnPublishUGContent = () => void;\r\nexport type DeleteUGContent = (id: string) => void;\r\nexport type UpdateResponsiveClass = (responsiveClass: string) => void;\r\nexport type DeleteMyData = () => void;\r\nexport type MapCmsIdToContentId = (cmsId: string, market: string, contentId: string) => void;\r\nexport type ResetError = () => void;\r\n\r\nexport const SocialDataActions = {\r\n setTheme: new ActionMap(\"SetTheme\"),\r\n updateMe: new ActionMap(\"UpdateMe\"),\r\n updateNotifications: new ActionMap(\"UpdateNotifications\"),\r\n updateActivities: new ActionMap(\"UpdateActivities\"),\r\n deleteActivities: new ActionMap(\"DeleteActivities\"),\r\n updateActivityStatus: new ActionMap(\"UpdateActivityStatus\"),\r\n setContent: new ActionMap(\"SetContent\"),\r\n updateContent: new ActionMap(\"UpdateContent\"),\r\n updateContentRating: new ActionMap(\"UpdateContentRating\"),\r\n insertComments: new ActionMap(\"FetchContentComments\"),\r\n resetSpecificCommentId: new ActionMap(\"ResetSpecificCommentid\"),\r\n updateCommentRating: new ActionMap(\"UpdateCommentRating\"),\r\n incrementReplyCount: new ActionMap(\"IncrementReplyCount\"),\r\n insertComment: new ActionMap(\"InsertComment\"),\r\n updateUser: new ActionMap(\"UpdateUser\"),\r\n updateUserFollowers: new ActionMap(\"UpdateUserFollowers\"),\r\n updateUserFollowing: new ActionMap(\"UpdateUserFollowing\"),\r\n updateUserComments: new ActionMap(\"UpdateUserComments\"),\r\n deleteUserComment: new ActionMap(\"DeleteUserComment\"),\r\n setReactionBreakdown: new ActionMap(\"SetReactionBreakdown\"),\r\n setGradientOverlayData: new ActionMap(\"SetGradientOverlayData\"),\r\n setPublisherSubscribeFollowButtonData: new ActionMap(\"SetPublisherSubscribeFollowButtonData\"),\r\n setPopup: new ActionMap(\"SetPopup\"),\r\n addTyper: new ActionMap(\"AddTyper\"),\r\n updateTypers: new ActionMap(\"UpdateTypers\"),\r\n recordSignalRHub: new ActionMap(\"RecordSignalRHub\"),\r\n updateUGContents: new ActionMap(\"UpdateUGContents\"),\r\n updateUGContent: new ActionMap(\"UpdateUGContent\"),\r\n publishUGContent: new ActionMap(\"PublishUGContent\"),\r\n unPublishUGContent: new ActionMap(\"UnPublishUGContent\"),\r\n deleteUGContent: new ActionMap(\"DeleteUGContent\"),\r\n updateResponsiveClass: new ActionMap(\"UpdateResponsiveClass\"),\r\n deleteMyData: new ActionMap(\"DeleteMyData\"),\r\n updateActivityAppeal: new ActionMap(\"UpdateActivityAppeal\"),\r\n mapCmsIdToContentId: new ActionMap(\"MapCmsIdToContentId\"),\r\n resetError: new ActionMap(\"ResetError\")\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActionMap } from \"@msnews/experiences-redux\";\r\nimport { SocialDataState } from \"@msnews/social-data-connector\";\r\n\r\nexport type SetComponent = (moduleName?: string, id?: string, market?: string, specificCommentId?: string, commentDisplayType?: string) => void;\r\n\r\nexport type SetSocialData = (socialData: SocialDataState) => void;\r\n\r\nexport const SocialActions = {\r\n setComponent: new ActionMap(\"SetComponent\"),\r\n setSocialData: new ActionMap(\"SetSocialData\")\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { InspectorArgs, InspectorResponse, appEnvironment } from \"@msnews/core\";\r\nimport { SocialConfig, SocialState } from \"./index\";\r\n\r\nimport { SocialProps } from \"./Social.props\";\r\n\r\nexport const SocialInspector = {\r\n inspect: (args: InspectorArgs): InspectorResponse => {\r\n\r\n const { config, state } = args;\r\n let { moduleName, market, theme, commentDisplayType, styleOverrides, enableSubscriptionFeatures } = config;\r\n const { id, specificCommentId } = state;\r\n if (state.moduleName) {\r\n moduleName = state.moduleName;\r\n }\r\n\r\n if (state.theme) {\r\n theme = state.theme;\r\n }\r\n\r\n if (state.commentDisplayType) {\r\n commentDisplayType = state.commentDisplayType;\r\n }\r\n\r\n if (state.market) {\r\n market = state.market;\r\n }\r\n\r\n if (!theme) {\r\n theme = \"default\";\r\n }\r\n\r\n if (!market) {\r\n market = appEnvironment ? appEnvironment.CurrentMarket : \"en-us\";\r\n }\r\n\r\n if (!commentDisplayType) {\r\n commentDisplayType = \"default\";\r\n }\r\n\r\n const props = { ...args.state, id, moduleName, market, t: config.localizedStrings, theme, commentDisplayType, specificCommentId, enableSubscriptionFeatures, jssStyleSheet: styleOverrides };\r\n return { props, missingChildren: [] };\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, logger } from \"@msnews/diagnostics\";\r\n\r\nclass AppErrorLogger {\r\n public onAppError: ((AppError) => void) = undefined;\r\n\r\n public log(error: AppError): void {\r\n if (this.onAppError) {\r\n try {\r\n this.onAppError(error);\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n }\r\n }\r\n\r\n public setOnAppError(onAppError: ((AppError) => void)): void {\r\n this.onAppError = onAppError;\r\n }\r\n}\r\n\r\nexport const appErrorLogger = new AppErrorLogger();","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport const enums = {\r\n selectPpeParameter: \"oneservice_enable_ppe\",\r\n flights: {\r\n contentCommentsOnly: \"prg-comv2\"\r\n },\r\n externalUrls: {\r\n api: \"https://api.msn.com/community/\",\r\n ppeApi: \"https://ppe-api.msn.com/community/\",\r\n guidelinePage: \"https://www.msn.com/en-us/community/guideline\",\r\n guidelinePageEmbed: \"https://www.msn.com/en-us/community/embed/guidelinepage\",\r\n profilePage: \"https://www.msn.com/en-us/community/profile/\",\r\n channelPage: \"https://www.msn.com/en-us/community/channel/\",\r\n privacySettings: \"https://www.msn.com/en-us/settings\",\r\n profileSettings: \"https://account.microsoft.com/profile\",\r\n feedbackForm: \"https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR-V3gf69zQlBm1dJVuXA8mtURVI4UlFHMDRIR0VCWDFWNUQyQU5HVzJJQi4u\",\r\n moderationEmail: \"Appealsprocessor@microsoft.com\",\r\n newPost: \"https://www.msn.com/en-us/community/post/new\"\r\n },\r\n userStateType: {\r\n existingUser: \"existingUser\",\r\n anonymous: \"anonymous\",\r\n newUser: \"newUser\"\r\n },\r\n userNameStatusType: {\r\n normal: \"Normal\",\r\n notAllow: \"NotAllow\",\r\n inReview: \"InReview\",\r\n unknown: \"Unknown\"\r\n },\r\n userAvatarStatusType: {\r\n normal: \"Normal\",\r\n notAllow: \"NotAllow\",\r\n inReview: \"InReview\",\r\n unknown: \"Unknown\"\r\n },\r\n userAgeGroup: {\r\n under18: \"Under18\",\r\n above18: \"Above18\"\r\n },\r\n activityType: {\r\n follow: \"Follow\",\r\n reply: \"Reply\",\r\n reaction: \"Reaction\",\r\n badge: \"Achievement\",\r\n moderation: \"Moderation\",\r\n commentDeleteAlert: \"CommentDeleteAlert\",\r\n profileBannedAlert: \"ProfileBannedAlert\",\r\n profileErrorAlert: \"ProfileErrorAlert\"\r\n },\r\n moderationErrorType: {\r\n takedown: \"Takedown\",\r\n ban: \"Ban\",\r\n notAllowName: \"NotAllowName\",\r\n notAllowPicture: \"NotAllowPicture\",\r\n approveUserAppeal: \"ApproveUserAppeal\",\r\n rejectUserAppeal: \"RejectUserAppeal\",\r\n approveProfilePicAppeal: \"ApproveProfilePicAppeal\",\r\n rejectProfilePicAppeal: \"RejectProfilePicAppeal\",\r\n approveCommentAppeal: \"ApproveCommentAppeal\",\r\n rejectCommentAppeal: \"RejectCommentAppeal\"\r\n },\r\n visibleStatusType: {\r\n Normal: \"Normal\",\r\n DeletedByUser: \"DeletedByUser\",\r\n DeletedByAI: \"DeletedByAI\",\r\n DeletedByHI: \"DeletedByHI\",\r\n InReview: \"InReview\"\r\n },\r\n visibleStatusMap: {\r\n DeletedByUser: \"VisibleStatusDeletedByUser\",\r\n DeletedByAI: \"VisibleStatusDeletedByAI\",\r\n DeletedByHI: \"VisibleStatusDeletedByHI\",\r\n InReview: \"VisibleStatusInReview\",\r\n Default: \"VisibleStatusOther\"\r\n },\r\n commentReportMap: {\r\n Spam: \"ReportOptSpam\",\r\n Profanity: \"ReportOptProfanity\",\r\n Abuse: \"ReportOptAbuse\",\r\n RiskyLowAuthority: \"ReportOptRiskyLowAuthority\",\r\n Copyright: \"ReportOptCopyright\",\r\n ChildRelated: \"ReportOptChildRelated\",\r\n Violent: \"ReportOptViolent\",\r\n Danger: \"ReportOptDanger\",\r\n PublicThreats: \"ReportOptPublicThreats\",\r\n Illegal: \"ReportOptIllegal\",\r\n Terrorism: \"ReportOptTerrorism\",\r\n Privacy: \"ReportOptPrivacy\",\r\n Inappropriate: \"ReportOptInappropriate\",\r\n OffTopic: \"ReportOptOffTopic\"\r\n },\r\n userNameReportMap: {\r\n Spam: \"ReportOptSpam\",\r\n Profanity: \"ReportOptProfanity\",\r\n Abuse: \"ReportOptAbuse\",\r\n RiskyLowAuthority: \"ReportOptRiskyLowAuthority\",\r\n ChildRelated: \"ReportOptChildRelated\",\r\n Violent: \"ReportOptViolent\",\r\n Danger: \"ReportOptDanger\",\r\n PublicThreats: \"ReportOptPublicThreats\",\r\n Illegal: \"ReportOptIllegal\",\r\n Terrorism: \"ReportOptTerrorism\",\r\n Privacy: \"ReportOptPrivacy\",\r\n Inappropriate: \"ReportOptInappropriate\",\r\n OffTopic: \"ReportOptOffTopic\"\r\n },\r\n userPictureReportMap: {\r\n Spam: \"ReportOptSpam\",\r\n Profanity: \"ReportOptProfanity\",\r\n Abuse: \"ReportOptAbuse\",\r\n RiskyLowAuthority: \"ReportOptRiskyLowAuthority\",\r\n Copyright: \"ReportOptCopyright\",\r\n ChildRelated: \"ReportOptChildRelated\",\r\n Violent: \"ReportOptViolent\",\r\n Danger: \"ReportOptDanger\",\r\n PublicThreats: \"ReportOptPublicThreats\",\r\n Illegal: \"ReportOptIllegal\",\r\n Terrorism: \"ReportOptTerrorism\",\r\n Privacy: \"ReportOptPrivacy\",\r\n Nudity: \"ReportOptNudity\",\r\n NonConsensualIntimateImagery: \"ReportOptNonConsensualIntimateImagery\",\r\n Inappropriate: \"ReportOptInappropriate\",\r\n OffTopic: \"ReportOptOffTopic\"\r\n },\r\n reactionOrder: [\r\n \"like\", \"love\", \"surprised\", \"thinking\", \"sad\", \"angry\"\r\n ],\r\n profileReportItemMap: {\r\n UserName: \"ReportUserName\",\r\n ProfilePicture: \"ReportProfilePicture\"\r\n },\r\n profilePageEmptyStates: {\r\n NoUser: \"NoUser\",\r\n NotSocialUser: \"NotSocialUser\"\r\n },\r\n reactionIconMap: {\r\n like: \"EmojiLike\",\r\n love: \"EmojiHeart\",\r\n thinking: \"EmojiThinking\",\r\n surprised: \"EmojiSurprised\",\r\n sad: \"EmojiSad\",\r\n angry: \"EmojiAngry\"\r\n },\r\n reactions: {\r\n like: \"like\",\r\n love: \"love\",\r\n thinking: \"thinking\",\r\n surprised: \"surprised\",\r\n sad: \"sad\",\r\n angry: \"angry\"\r\n },\r\n responsiveLevels: {\r\n L0: \"cwtl-0\",\r\n L1: \"cwtl-1\",\r\n L2: \"cwtl-2\",\r\n MobilePopup: \"cwt-mobile-popup\"\r\n },\r\n newCommentErrorCodeMap: {\r\n 400: \"NewPostDeniedMsg\",\r\n 403: \"NewPostSessionExpiredMsg\",\r\n 500: \"NewPostWentWrongMsg\",\r\n bodyTooLong: \"NewPostTooLongMsg\",\r\n other: \"NewPostWentWrongMsg\",\r\n 0: \"NewPostWentWrongMsg\",\r\n 1: \"NewPostSessionExpiredMsg\",\r\n 4: \"NewPostDeniedMsg\",\r\n 6: \"NewPostWentWrongMsg\",\r\n 7: \"NewPostWentWrongMsg\",\r\n 8: \"NewPostWentWrongMsg\",\r\n 9: \"NewPostWentWrongMsg\",\r\n 10: \"NewPostWentWrongMsg\",\r\n 11: \"NewPostWentWrongMsg\",\r\n 12: \"NewPostTooManyCommentsMsg\",\r\n 20: \"NewPostTooLongMsg\",\r\n 21: \"NewPostMentionMsg\",\r\n 22: \"NewPostWentWrongMsg\",\r\n 23: \"NewPostWentWrongMsg\",\r\n 24: \"NewPostDeniedMsg\",\r\n 25: \"NewPostWentWrongMsg\",\r\n 26: \"NewPostWentWrongMsg\",\r\n 27: \"NewPostWentWrongMsg\",\r\n 28: \"NewPostDeniedMsg\",\r\n 29: \"NewPostDeniedMsg\",\r\n 30: \"NewPostDeniedMsg\",\r\n 31: \"NewPostDeniedMsg\",\r\n 32: {\r\n 1: \"NewPostDuplicatedMsg\",\r\n 2: \"NewPostDeniedMsg\",\r\n 3: \"NewPostDeniedMsg\",\r\n 4: \"NewPostDeniedMsg\",\r\n 5: \"NewPostDeniedMsg\",\r\n 6: \"NewPostDeniedMsg\",\r\n 7: \"NewPostDeniedMsg\",\r\n 8: \"NewPostDeniedMsg\",\r\n 9: \"NewPostDeniedMsg\",\r\n 10: \"NewPostDeniedMsg\",\r\n 11: \"NewPostDeniedMsg\",\r\n 12: \"NewPostDeniedMsg\",\r\n 13: \"NewPostDeniedMsg\",\r\n 14: \"NewPostDeniedMsg\",\r\n 15: \"NewPostDeniedMsg\",\r\n 16: \"NewPostDeniedMsg\",\r\n 17: \"NewPostLanguageErrorMsg\",\r\n 18: \"NewPostURLMsg\"\r\n }\r\n\r\n },\r\n ugcPublishStatusType: {\r\n normal: \"Normal\",\r\n notAllow: \"NotAllow\",\r\n inReview: \"InReview\"\r\n },\r\n commentsStatusType: {\r\n zero: 0,\r\n minimal: 1,\r\n expanded: 2,\r\n notDetermined: 3\r\n },\r\n theme: {\r\n default: {\r\n name: \"default\",\r\n disabledComponents: []\r\n },\r\n superappBase: {\r\n name: \"superapp\",\r\n disabledComponents: []\r\n },\r\n windowsBase: {\r\n name: \"windows\",\r\n disabledComponents: []\r\n },\r\n superappEmbed: {\r\n name: \"superapp-embed\",\r\n modalComponents: [\"reactionbreakdowncomment\", \"reactionbreakdowncontent\", \"onboardingpage\", \"onboardingthirdpartypage\", \"onboardingunderagepage\", \"reportmenu\", \"profilereportmenu\", \"copyrightform\", \"trademarkform\"],\r\n disabledComponents: [\"profilepage\", \"guidelinepage\", \"articlepage\", \"multiloginpage\", \"reactionbreakdowncomment\", \"reactionbreakdowncontent\", \"onboardingpage\", \"onboardingthirdpartypage\", \"onboardingunderagepage\", \"notificationtray\", \"reportmenu\", \"profilereportmenu\", \"copyrightform\", \"trademarkform\"]\r\n },\r\n superappFullpage: {\r\n name: \"superapp-fullpage\",\r\n modalComponents: [\"reactionbreakdowncomment\", \"reactionbreakdowncontent\", \"onboardingpage\", \"onboardingthirdpartypage\", \"onboardingunderagepage\", \"reportmenu\", \"profilereportmenu\", \"copyrightform\", \"trademarkform\"],\r\n disabledComponents: [\"profilepage\", \"guidelinepage\", \"articlepage\", \"multiloginpage\", \"onboardingthirdpartypage\", \"notificationtray\"]\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { enums } from \"./enums\";\r\n\r\nexport function hasThemeBase(theme, targetTheme) {\r\n return theme && theme.startsWith(targetTheme.name);\r\n}\r\n\r\nexport function isThemeEqual(theme, targetTheme) {\r\n return theme == targetTheme.name;\r\n}\r\n\r\nexport function isComponentDisabled(theme, component) {\r\n let disabledComponents = [];\r\n for (const key in enums.theme) {\r\n if (enums.theme[key].name === theme) {\r\n disabledComponents = enums.theme[key].disabledComponents;\r\n break;\r\n }\r\n }\r\n return disabledComponents.includes(component);\r\n}\r\n\r\nexport function isComponentInModal(theme, component) {\r\n let modalComponents = [];\r\n for (const key in enums.theme) {\r\n if (enums.theme[key].name === theme) {\r\n modalComponents = enums.theme[key].modalComponents;\r\n break;\r\n }\r\n }\r\n return modalComponents && modalComponents.includes(component);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, SocialDataConnectorNotFound, SocialNoModuleName } from \"@msnews/diagnostics\";\r\nimport { BridgeEventNames, dispatchBridgeEvent } from \"./Social.bridge\";\r\nimport { ConnectorNamespaces, ExperienceIds } from \"@msnews/experiences-constants\";\r\nimport { DynamicReducer, IReducer, PageBase } from \"@msnews/experiences-redux\";\r\nimport { IRequestContext, InspectorResponse, ScreenWidth, appEnvironment, tryAddOrderedTelemetryChild } from \"@msnews/core\";\r\nimport { SocialDataActions, SocialDataConnector } from \"@msnews/social-data-connector\";\r\n\r\nimport { CardSizes } from \"@msnews/card-properties\";\r\nimport { ComponentConnector } from \"@msnews/experiences-connector\";\r\nimport { ExperienceInitialProps } from \"@msnews/experiences-base\";\r\nimport { RiverCardActions } from \"@msnews/river-data-types\";\r\nimport { SocialActions } from \"./Social.actions\";\r\nimport { SocialConfig } from \"./Social.config\";\r\nimport { SocialInspector } from \"./Social.inspector\";\r\nimport { SocialProps } from \"./index\";\r\nimport { SocialService } from \"@msnews/social-data-service\";\r\nimport { SocialState } from \"./Social.state\";\r\nimport { Store } from \"redux\";\r\nimport { appErrorLogger } from \"./utils/AppErrorLogger\";\r\nimport { enums } from \"./utils/enums\";\r\nimport { hasThemeBase } from \"./utils/themeHelpers\";\r\n\r\n// A partial config to ensure loading of social data connector.\r\n// This hard-coded config can be removed after making sure that all config documents contain the data connector.\r\nconst socialDataConnectorConfig: Partial = {\r\n dataConnectors: [\r\n {\r\n screenWidth: ScreenWidth.Any,\r\n children: [\r\n {\r\n experienceType: ConnectorNamespaces.SocialData,\r\n instanceId: \"\",\r\n href: \"cms/api/amp/experienceConfigIndex/BB1cKaeg\"\r\n }\r\n ]\r\n }\r\n ]\r\n};\r\n\r\n/**\r\n * The connector for the Social Experience.\r\n */\r\nexport class SocialConnector extends ComponentConnector {\r\n\r\n private socialDataConnector: SocialDataConnector;\r\n\r\n /** @inheritdoc */\r\n public constructor(namespace: string, parentNamespace: string, rootReducer: DynamicReducer, reducer: IReducer, store: Store, config: SocialConfig, requestContext: IRequestContext) {\r\n super(namespace, parentNamespace, rootReducer, reducer, store, {...socialDataConnectorConfig, ...config}, requestContext);\r\n }\r\n\r\n /** @inheritdoc */\r\n public async onComponentConnect(connectorProps?: ExperienceInitialProps): Promise {\r\n if (!appErrorLogger.onAppError) {\r\n appErrorLogger.setOnAppError(this.onAppError.bind(this));\r\n }\r\n await ComponentConnector.prototype.onComponentConnect.call(this, connectorProps);\r\n\r\n const market = connectorProps && connectorProps.context && connectorProps.context.market ? connectorProps.context.market : appEnvironment.CurrentMarket;\r\n const moduleName = connectorProps && connectorProps.context && connectorProps.context.moduleName || connectorProps.context && this.config.moduleName;\r\n if (!moduleName) {\r\n this.onAppError({\r\n ...SocialNoModuleName,\r\n message: \"No moduleName info not passed into the experience via connection props\",\r\n pb: {\r\n ...SocialNoModuleName.pb,\r\n customMessage: JSON.stringify(connectorProps)\r\n }\r\n } as AppError);\r\n }\r\n\r\n PageBase.getInstance().rootReducer.getDataConnector(ConnectorNamespaces.SocialData).then((socialDataConnector: SocialDataConnector) => {\r\n if (socialDataConnector) {\r\n this.socialDataConnector = socialDataConnector;\r\n this.registerObservers();\r\n this.updateSocialState();\r\n\r\n this.setComponent(moduleName, market, connectorProps.context.theme, connectorProps.context.id, connectorProps.context.commentDisplayType, connectorProps.context.specificCommentId);\r\n\r\n if (connectorProps && connectorProps.context && connectorProps.context.gradientOverlayDataPromise) {\r\n connectorProps.context.gradientOverlayDataPromise.then(gradientOverlayData => {\r\n this.socialDataConnector.setGradientOverlayData(gradientOverlayData);\r\n });\r\n }\r\n\r\n if (connectorProps && connectorProps.context && connectorProps.context.publisherSubscribeFollowButtonDataPromise) {\r\n connectorProps.context.publisherSubscribeFollowButtonDataPromise.then(publisherSubscribeFollowButtonData => {\r\n this.socialDataConnector.setPublisherSubscribeFollowButtonData(publisherSubscribeFollowButtonData);\r\n });\r\n }\r\n } else {\r\n this.onAppError({\r\n ...SocialDataConnectorNotFound,\r\n message: \"Social data connector not found in the root reducer\",\r\n pb: {\r\n ...SocialDataConnectorNotFound.pb,\r\n customMessage: \"Social data connector not found in the root reducer\"\r\n }\r\n } as AppError);\r\n }\r\n });\r\n\r\n // content-preview cards use card-action experience on the publisher profile page\r\n const cardActionConfig = this.config.publisherProfileChildren && this.config.publisherProfileChildren.cardAction;\r\n if (cardActionConfig) {\r\n await this.loadChildExperience(cardActionConfig);\r\n }\r\n }\r\n\r\n public registerObservers(): void {\r\n SocialDataActions.setTheme.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateMe.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateNotifications.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateActivities.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.deleteActivities.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateActivityStatus.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.setContent.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateContent.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateContentRating.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.insertComments.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.resetSpecificCommentId.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateCommentRating.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.incrementReplyCount.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.insertComment.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateUser.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateUserFollowers.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateUserFollowing.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateUserComments.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.deleteUserComment.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.setReactionBreakdown.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.setGradientOverlayData.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.setPublisherSubscribeFollowButtonData.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.setPopup.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.addTyper.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateTypers.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.recordSignalRHub.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateUGContents.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.publishUGContent.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.unPublishUGContent.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateResponsiveClass.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.deleteMyData.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.updateActivityAppeal.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.mapCmsIdToContentId.registerObserver(() => this.updateSocialState());\r\n SocialDataActions.resetError.registerObserver(() => this.updateSocialState());\r\n }\r\n\r\n public updateSocialState(): void {\r\n if (this.getSocialDataConnector()) {\r\n SocialActions.setSocialData.getActionSender(this).send(this.socialDataConnector.getCurrentState());\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n public mapStateToProps(state: SocialState): SocialProps {\r\n const inspectorResult: InspectorResponse = SocialInspector.inspect({\r\n config: this.config,\r\n children: this.childComponentInstanceList,\r\n state: state\r\n });\r\n\r\n let connectorFunctions = {};\r\n if (this.getSocialDataConnector()) {\r\n connectorFunctions = this.socialDataConnector.getDataConnectorFunctionsWithStateBindings();\r\n }\r\n\r\n return {\r\n ...inspectorResult.props,\r\n ...this.telemetryTags,\r\n children: this.childComponentInstanceList,\r\n mainTelemetryObject: this.telemetryObject,\r\n componentConnector: {\r\n setComponent: this.setComponent.bind(this),\r\n getContentCards: this.getContentCards.bind(this)\r\n },\r\n ...connectorFunctions\r\n };\r\n }\r\n\r\n public async setComponent(component: string, market: string, theme: string, id?: string, commentDisplayType?: string, specificCommentId?: string) {\r\n const popup = this.getCurrentState().popup;\r\n if (popup && popup.moduleName) {\r\n this.socialDataConnector.closePopup(popup);\r\n }\r\n SocialActions.setComponent.getActionSender(this).send(component, id, market, specificCommentId, commentDisplayType);\r\n this.socialDataConnector.setTheme(theme);\r\n this.manageHistory(component, market, theme, id);\r\n }\r\n\r\n private manageHistory(component: string, market: string, theme: string, id?: string) {\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n if (isSuperApp) {\r\n if (history.state == null) {\r\n history.replaceState({...{component, id, market, theme, initial: true}}, \"\");\r\n } else if (component !== history.state.component || market !== history.state.market || theme !== history.state.theme || id !== history.state.id) {\r\n history.pushState({...{component, id, market, theme, initial: false}}, \"\");\r\n dispatchBridgeEvent(BridgeEventNames.increaseBackStack);\r\n }\r\n if (!window.onpopstate) {\r\n window.onpopstate = this.setHistoryComponent.bind(this);\r\n }\r\n }\r\n }\r\n\r\n private async setHistoryComponent(event) {\r\n this.setComponent(event.state.component, event.state.market, event.state.theme, event.state.id);\r\n }\r\n\r\n private getSocialDataConnector() {\r\n if (!this.socialDataConnector) {\r\n this.onAppError({\r\n ...SocialDataConnectorNotFound,\r\n message: \"Social data connector not found in the root reducer\",\r\n pb: {\r\n ...SocialDataConnectorNotFound.pb,\r\n customMessage: \"Social data connector not found in the root reducer\"\r\n }\r\n } as AppError);\r\n }\r\n return this.socialDataConnector;\r\n }\r\n\r\n public async getContentCards(publisherId: string, market: string, premium?: boolean, args?: any) {\r\n const contentPreviewConfig = this.config.publisherProfileChildren && this.config.publisherProfileChildren.contentPreview;\r\n const cardData = await SocialService.getUserContents(publisherId, market, premium, args ? args: {});\r\n const cardType = premium ? \"premium\" : \"all\";\r\n\r\n const cardLoadInfo = [];\r\n cardData.items.forEach(card => {\r\n cardLoadInfo.push({\r\n initialProps: {\r\n serviceContextMetadata: {metadata: {}, ...card},\r\n parentTelemetry: this.telemetryObject,\r\n experienceTelemetry: tryAddOrderedTelemetryChild(this.telemetryObject, ExperienceIds.contentPreview)\r\n },\r\n config: {\r\n ...contentPreviewConfig,\r\n instanceId: `${cardType}-contentPreview-${card.id}`\r\n }\r\n });\r\n });\r\n\r\n await Promise.all(cardLoadInfo.map(loadInfo => {\r\n if (!this.childMap.get(loadInfo.config.instanceId)) { // if it is already loaded, do not load again\r\n return this.loadChildExperience(loadInfo.config, loadInfo.initialProps);\r\n }\r\n }));\r\n\r\n const cardConnectors = cardLoadInfo.map(\r\n loadInfo => this.childMap.get(loadInfo.config.instanceId)\r\n );\r\n cardConnectors.forEach(connector => {\r\n RiverCardActions.changeCardSize.getActionSender(connector).send(CardSizes.Size1Wx6H, 275, 325);\r\n });\r\n return cardConnectors.map(connector => connector.componentInstance);\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActionHandler, IActionPayload, IReducer } from \"@msnews/experiences-redux\";\r\nimport { SetComponent, SetSocialData, SocialActions } from \"./Social.actions\";\r\n\r\nimport { SocialState } from \"./Social.state\";\r\nimport { appEnvironment } from \"@msnews/core\";\r\n\r\n/**\r\n * The reducer for the Social connector, and the SocialState\r\n */\r\nexport class SocialReducer implements IReducer {\r\n /**\r\n * Update the state for the connector, based on the action being applied\r\n * @param state The previous state\r\n * @param actionPayload The action being applied\r\n */\r\n public reduce(state: SocialState, actionPayload: IActionPayload): SocialState {\r\n if (!state) { return {}; }\r\n if (!actionPayload) { return state; }\r\n\r\n let newState: SocialState;\r\n\r\n ActionHandler.handleAction(actionPayload, SocialActions.setComponent, (moduleName?: string, id?: string, market?: string, specificCommentId?: string, commentDisplayType?: string) => {\r\n moduleName = moduleName || state.moduleName;\r\n id = id || state.id;\r\n market = market || appEnvironment.CurrentMarket || state.market;\r\n specificCommentId = specificCommentId || state.specificCommentId;\r\n commentDisplayType = commentDisplayType || state.commentDisplayType;\r\n newState = {...state, moduleName, id, market, specificCommentId, commentDisplayType};\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialActions.setSocialData, (socialData) => {\r\n newState = { ...state, ...socialData };\r\n });\r\n\r\n return newState || state;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Telemetry, TelemetryActionType, TelemetryBehaviorType, TelemetryContentType, TelemetryContentViewType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { TelemetryBase, appEnvironment } from \"@msnews/core\";\r\n\r\nimport { PageType } from \"@msnews/experiences-constants\";\r\nimport ReactDOM from \"react-dom\";\r\nimport { enums } from \"./utils/enums\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\n/** Handle Loaded Event Telemetry.sendContentViewEvent(target, TelemetryContentViewType.Partial); */\r\n\r\nconst dispatchDedupe = {};\r\n\r\n// Do not send same event multiple times under .5 sec interval only send the latest one\r\nfunction applyDedupe(telemetryEvent, element, refreshDataAttribute) {\r\n const now = Date.now(); // current timestamp in ms.\r\n\r\n if (dispatchDedupe[telemetryEvent.eventName]) {\r\n if (dispatchDedupe[telemetryEvent.eventName] > 0 && now - dispatchDedupe[telemetryEvent.eventName] <= 500) {\r\n logger.log(\"Event deduped\");\r\n return;\r\n }\r\n }\r\n dispatchDedupe[telemetryEvent.eventName] = now;\r\n document.dispatchEvent(new CustomEvent(telemetryEvent.eventName, { detail: { element, telemetryEvent, refreshDataAttribute } }));\r\n}\r\n\r\n/** Telementry Event Dispatcher: used in components */\r\nexport function dispatchTelemetryEvent(telemetryEvent, element, telemetryAttributes = null, refreshDataAttribute = false) {\r\n try {\r\n if (telemetryAttributes && telemetryAttributes.content) {\r\n telemetryEvent.contract.content = {...telemetryEvent.contract.content, ...telemetryAttributes.content};\r\n }\r\n applyDedupe(telemetryEvent, element, refreshDataAttribute);\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n}\r\n\r\n/** Telementry Event Handler */\r\nexport function handleEvent(telemetryEvent, element, customClickHandler?, customImpressionHandler?) {\r\n try {\r\n const action = (telemetryEvent.subTypes && telemetryEvent.subTypes.action) || (telemetryEvent.contract && telemetryEvent.contract.action) || TelemetryActionType.Click;\r\n const behavior = (telemetryEvent.subTypes && telemetryEvent.subTypes.behavior) || (telemetryEvent.contract && telemetryEvent.contract.behavior) || TelemetryBehaviorType.Undefined;\r\n switch (telemetryEvent.eventType) {\r\n case UpperTelemetryType.ContentView:\r\n if (customImpressionHandler) {\r\n customImpressionHandler(element, telemetryEvent.subTypes.viewType);\r\n break;\r\n }\r\n\r\n if (telemetryEvent.sendPeregrine) {\r\n Telemetry.sendContentViewEvent(element, telemetryEvent.subTypes.viewType); // viewType: TelemetryContentViewType (Load, Partial etc.)\r\n }\r\n break;\r\n default:\r\n if (customClickHandler) {\r\n const headline = (telemetryEvent.contract && telemetryEvent.contract.content && telemetryEvent.contract.content.headline) || `UnknownTelemetryEventName:${telemetryEvent.eventName}`;\r\n const isNavigate = behavior == TelemetryBehaviorType.Navigate;\r\n const primeEventType = (telemetryEvent.subTypes && telemetryEvent.subTypes.action) || (telemetryEvent.contract && telemetryEvent.contract.action) || \"click_nonnav\";\r\n const destination = (telemetryEvent.contract && telemetryEvent.contract.destinationUrl) || null;\r\n\r\n customClickHandler(\r\n element,\r\n action,\r\n behavior,\r\n { type: isNavigate ? \"click\" : primeEventType, originalEvent: \"click\", target: element },\r\n destination,\r\n headline\r\n );\r\n break;\r\n }\r\n if (telemetryEvent.sendPeregrine == false) { break; }\r\n element.setAttribute(\"data-customhandled\", true);\r\n Telemetry.sendActionEvent(element, action, behavior);\r\n break;\r\n }\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n}\r\n\r\n/** Telemetry Types */\r\nexport const UpperTelemetryType = {\r\n ContentView: \"ContentView\",\r\n Action: \"Action\"\r\n};\r\n\r\nexport const TelemetryEventNames = {\r\n // event names used at component level\r\n genericLoaded: \"generic-loaded\",\r\n genericAction: \"generic-action\",\r\n genericHover: \"generic-hover\"\r\n\r\n};\r\n\r\n/** Social Event Types */\r\nexport const TelemetryEventMap = {\r\n // events used at component level\r\n genericLoaded: {\r\n eventName: TelemetryEventNames.genericLoaded,\r\n eventType: UpperTelemetryType.ContentView,\r\n contract: {},\r\n subTypes: {viewType: TelemetryContentViewType.Partial},\r\n sendPrime: true,\r\n sendPeregrine: false\r\n },\r\n genericHover: {\r\n eventName: TelemetryEventNames.genericHover,\r\n subTypes: {action: TelemetryActionType.Hover}\r\n }\r\n};\r\n\r\n/**\r\n * @param elementTelemetryObject Telemetry object reference to generate tags from\r\n * @return Telemetry data tags for prime\r\n */\r\nexport function convertToHybridTags(elementTelemetryObject: TelemetryObjectBase): any {\r\n if (!elementTelemetryObject || !TelemetryBase.setTrackingAttrs) {\r\n return null;\r\n }\r\n\r\n // Generate Tags for Hybrid pages\r\n const contract: any = elementTelemetryObject.contract || {};\r\n const content = contract.content || {};\r\n const customTelemetryTags = {\r\n n: contract.name,\r\n l: content.id,\r\n hl: content.headline,\r\n ct: content.type,\r\n c: content.category,\r\n v: content.vertical,\r\n b: contract.behavior\r\n };\r\n\r\n // Remove undefined keys\r\n Object.keys(customTelemetryTags).map(key => {\r\n if (!customTelemetryTags[key]) {\r\n delete customTelemetryTags[key];\r\n }\r\n });\r\n return customTelemetryTags;\r\n}\r\n\r\n/**\r\n * @param elementTelemetryObject Telemetry object reference to generate tags from\r\n * @param isVisible Flag that should set to true if impressions should be sent for given telemetry object\r\n * @return Telemetry data tags for prime or peregrine\r\n */\r\nexport function renderHybrid(elementTelemetryObject: TelemetryObjectBase, isVisible: boolean, refCallback?: (HTMLElement) => void) {\r\n if (!elementTelemetryObject) {\r\n return {};\r\n }\r\n\r\n // Attach content category and content vertical information to contract if applicable\r\n if (isArticlePage() || isGalleryPage() || isVideoPage()) {\r\n elementTelemetryObject.contract.content = {...elementTelemetryObject.contract.content, ...getPageContentCategoryAndVertical()};\r\n }\r\n\r\n // When Hybrid mode active\r\n const customTelemetryTags = convertToHybridTags(elementTelemetryObject);\r\n const finalAttributes = {ref: (elementRef: HTMLElement) => {\r\n const element = ReactDOM.findDOMNode(elementRef);\r\n try {\r\n if (refCallback) {\r\n refCallback(element);\r\n }\r\n } catch (e) {\r\n logger.logError(e);\r\n } finally {\r\n if (customTelemetryTags && element && !element.getAttribute(\"data-id\")) {\r\n TelemetryBase.setTrackingAttrs(element, element.parentElement, {defaults: customTelemetryTags}, !isVisible);\r\n }\r\n }\r\n }};\r\n\r\n if (!customTelemetryTags) {\r\n /** Generate Tags from telemetry object */\r\n const telemetryTagsObject = elementTelemetryObject.render();\r\n finalAttributes[\"data-t\"] = telemetryTagsObject[\"data-t\"];\r\n }\r\n return finalAttributes;\r\n}\r\n\r\n/**\r\n * @param parentTelemetryObject Telemetry object reference of parent element/context\r\n * @param telemetryContract The telemetry contract that is used when creating new telemetry object\r\n * @param dynamicContentObject Object passed to set/override dynamic fields of content if there are any e.g: id, headline\r\n * @param existingObject Previously created telemetry object if its wanted to be updated\r\n * @return Created or updated telemetry object\r\n */\r\nexport function addOrUpdateTelemetryObject(parentTelemetryObject, telemetryContract, dynamicContentObject, existingObject?): TelemetryObjectBase {\r\n const uniqueTelemetryContract = {...telemetryContract, content: {...telemetryContract.content, ...(dynamicContentObject || {})}};\r\n return parentTelemetryObject ? parentTelemetryObject.addOrUpdateChild(uniqueTelemetryContract, existingObject || null) : null;\r\n}\r\n\r\nexport function getHeadlineByReactionType(reactionType, isUndo?) {\r\n return `${isUndo ? \"Undo \" : \"\"}${reactionType[0].toUpperCase()}${reactionType.slice(1)}`;\r\n}\r\n\r\nexport function genericTelemetryClickDispatcher(element: any, telemetryObject: any): void {\r\n const telemetryEventDispatcherInfo = {\r\n eventName: TelemetryEventNames.genericAction,\r\n contract: {...(telemetryObject && telemetryObject.contract)}\r\n };\r\n\r\n dispatchTelemetryEvent(telemetryEventDispatcherInfo, element);\r\n}\r\n\r\nexport function getPageContentType() {\r\n if (isGalleryPage()) {\r\n return TelemetryContentType.Gallery;\r\n } else if (isArticlePage()) {\r\n return TelemetryContentType.Article;\r\n } else if (isVideoPage()) {\r\n return TelemetryContentType.Video;\r\n } else {\r\n return TelemetryContentType.Article;\r\n }\r\n}\r\n\r\nfunction isGalleryPage() {\r\n const pageType = appEnvironment.CurrentRequestTargetScope && appEnvironment.CurrentRequestTargetScope.pageType;\r\n return pageType && (\r\n pageType === PageType.Gallery || pageType === PageType.GalleryFullScreen || pageType === PageType.ArticleFullScreen || pageType.startsWith(\"gallery\")\r\n );\r\n}\r\n\r\nfunction isArticlePage() {\r\n const pageType = appEnvironment.CurrentRequestTargetScope && appEnvironment.CurrentRequestTargetScope.pageType;\r\n return pageType && pageType !== PageType.ArticleFullScreen && (\r\n pageType === PageType.Article || pageType.startsWith(\"article\")\r\n );\r\n}\r\n\r\nfunction isVideoPage() {\r\n const pageType = appEnvironment.CurrentRequestTargetScope && appEnvironment.CurrentRequestTargetScope.pageType;\r\n return pageType && (\r\n pageType === PageType.Video || pageType === \"channelplayerpage\" || pageType.startsWith(\"video\")\r\n );\r\n}\r\n\r\nfunction getPageContentCategoryAndVertical() {\r\n return {\r\n category: appEnvironment.HostPage && appEnvironment.HostPage.categoryKey,\r\n vertical: appEnvironment.HostPage && appEnvironment.HostPage.verticalKey\r\n };\r\n}\r\n\r\nexport const ReactionToBehaviorTypeMap = {\r\n [enums.reactions.angry]: TelemetryBehaviorType.Angry,\r\n [enums.reactions.like]: TelemetryBehaviorType.Like,\r\n [enums.reactions.love]: TelemetryBehaviorType.Love,\r\n [enums.reactions.sad]: TelemetryBehaviorType.Sad,\r\n [enums.reactions.surprised]: TelemetryBehaviorType.Surprised,\r\n [enums.reactions.thinking]: TelemetryBehaviorType.Thinking\r\n};","// © Microsoft Corporation. All rights reserved.\r\nexport default class AccessibilityHelpers {\r\n static style: HTMLStyleElement;\r\n\r\n static attachAccessibilityListeners = (document: Document, node?: HTMLElement) => {\r\n\r\n if (!node) {\r\n Array.from(document.getElementsByClassName(\"cwt-sort-list-item\")).map(AccessibilityHelpers.addTabIndex);\r\n Array.from(document.getElementsByClassName(\"cwt-link\")).map(AccessibilityHelpers.addTabIndex);\r\n Array.from(document.getElementsByClassName(\"cwt-access-li\")).map(AccessibilityHelpers.addTabIndex);\r\n Array.from(document.getElementsByClassName(\"cwt-button\")).map(AccessibilityHelpers.addTabIndex);\r\n Array.from(document.getElementsByTagName(\"a\")).map((AccessibilityHelpers.addTabIndex));\r\n } else {\r\n Array.from(node.getElementsByClassName(\"cwt-sort-list-item\")).map(AccessibilityHelpers.addTabIndex);\r\n Array.from(node.getElementsByClassName(\"cwt-link\")).map(AccessibilityHelpers.addTabIndex);\r\n Array.from(node.getElementsByClassName(\"cwt-access-li\")).map(AccessibilityHelpers.addTabIndex);\r\n Array.from(node.getElementsByClassName(\"cwt-button\")).map(AccessibilityHelpers.addTabIndex);\r\n Array.from(node.getElementsByClassName(\"cwt-privacy-checkbox\")).map(AccessibilityHelpers.addTabIndex);\r\n Array.from(node.getElementsByTagName(\"a\")).map((AccessibilityHelpers.addTabIndex));\r\n }\r\n\r\n !AccessibilityHelpers.style && AccessibilityHelpers.addAccessibilityOutlines();\r\n };\r\n\r\n private static simulateMouseClick = (targetNode) => {\r\n if (targetNode) {\r\n // --- Simulate a natural mouse-click sequence.\r\n triggerMouseEvent(targetNode, \"mousedown\");\r\n triggerMouseEvent(targetNode, \"click\");\r\n }\r\n\r\n function triggerMouseEvent(node, eventType) {\r\n const clickEvent = document.createEvent(\"MouseEvents\");\r\n clickEvent.initEvent(eventType, true, true);\r\n node.dispatchEvent(clickEvent);\r\n }\r\n };\r\n\r\n private static addTabIndex = (ele) => {\r\n if ((ele as HTMLElement).getAttribute(\"no-access\") == \"true\") {\r\n return null;\r\n }\r\n\r\n // Add tab-index\r\n !ele.hasAttribute(\"tabIndex\") && ele.setAttribute(\"tabIndex\", \"0\");\r\n\r\n // Add Enter key listener to fire click event\r\n if (!ele.hasAttribute(\"hasEnterKeydown\")) {\r\n ele.setAttribute(\"hasEnterKeydown\", \"1\");\r\n ele.addEventListener(\"keydown\", (e) => {\r\n if (e.keyCode === 13) { // checks whether the pressed key is \"Enter\"\r\n AccessibilityHelpers.simulateMouseClick(ele);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n });\r\n }\r\n };\r\n\r\n private static addAccessibilityOutlines = () => {\r\n let shouldHaveOutline = false;\r\n const focusKeys = [9, 37, 38, 39, 40];\r\n\r\n AccessibilityHelpers.style = document.createElement(\"style\");\r\n const targetNode = document.head;\r\n targetNode.append(AccessibilityHelpers.style);\r\n\r\n document.addEventListener(\"keydown\", (e) => {\r\n if (focusKeys.includes(e.keyCode) && !shouldHaveOutline) {\r\n shouldHaveOutline = true;\r\n }\r\n });\r\n document.addEventListener(\"mousedown\", (e) => {\r\n if (e.isTrusted) {\r\n shouldHaveOutline = false;\r\n }\r\n });\r\n document.addEventListener(\"focusin\", (e) => {\r\n if (!shouldHaveOutline && e.isTrusted) {\r\n AccessibilityHelpers.style.innerText = \"[hasEnterKeydown]:focus { outline: none; }\";\r\n } else {\r\n if (AccessibilityHelpers.style) {\r\n AccessibilityHelpers.style.innerText = \"[hasEnterKeydown]:focus { outline: \\\"black auto 1px\\\";}\";\r\n }\r\n }\r\n });\r\n };\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher, getPageContentType } from \"../Social.telemetry\";\r\n\r\nexport interface CommentTelemetryObjects {\r\n compactStartConversationButton: TelemetryObjectBase;\r\n compactJoinConversationButton: TelemetryObjectBase;\r\n overlayAddCommentButton: TelemetryObjectBase;\r\n overlayStartConversationButton: TelemetryObjectBase;\r\n overlayJoinConversationButton: TelemetryObjectBase;\r\n mobileFloaterButton: TelemetryObjectBase;\r\n overlayComments: TelemetryObjectBase;\r\n}\r\n\r\nexport const commentTelemetryContracts = {\r\n /** Scenario-1: view, Scenario-2:click*/\r\n compactStartConversationButton: {\r\n name: \"StartConversation\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType()\r\n }\r\n },\r\n /** Scenario-1: view, Scenario-3:click*/\r\n compactJoinConversationButton: {\r\n name: \"JoinConversation\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType()\r\n }\r\n },\r\n /** Scenario-4: view, Scenario-5:click*/\r\n overlayAddCommentButton: {\r\n name: \"AddCommentFloater\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType()\r\n }\r\n },\r\n /** Scenario-4: view, Scenario-6:click*/\r\n overlayStartConversationButton: {\r\n name: \"StartConversationFloater\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType()\r\n }\r\n },\r\n /** Scenario-4: view, Scenario-7:click*/\r\n overlayJoinConversationButton: {\r\n name: \"JoinConversationFloater\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType()\r\n }\r\n },\r\n /** Scenario-8: view, Scenario-8a:click*/\r\n mobileFloaterButton: {\r\n name: \"CommentFloater\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType()\r\n }\r\n },\r\n /** Scenario-9: view */\r\n overlayComments: {\r\n name: \"CommentOverlay\",\r\n content: {\r\n type: getPageContentType()\r\n }\r\n }\r\n};\r\n\r\nexport const commentTelemetryActionDispatchers = {\r\n genericClicked: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\nconst sourcePath = \"https://assets.msn.com/staticsb/statics/latest/community/\";\r\n\r\nexport const activityImages = {\r\n trophy: sourcePath+\"img/profile/activity/cup.svg\",\r\n commenter: sourcePath+\"img/profile/activity/commenter.png\"\r\n};\r\nexport const profileImages = {\r\n privateProfile: sourcePath+\"img/profile/private-profile.svg\",\r\n zeroComments: sourcePath+\"img/profile/zero_comments.svg\",\r\n zeroUsers: sourcePath+\"img/profile/zero_users.svg\",\r\n zeroActivity: sourcePath+\"img/profile/zero_activity.svg\"\r\n};\r\nexport const logoImages = {\r\n facebook: sourcePath+\"img/logo/facebook.svg\",\r\n google: sourcePath+\"img/logo/google.svg\",\r\n microsoft: sourcePath+\"img/logo/microsoft.svg\",\r\n microsoftText: sourcePath+\"img/logo/microsoft_text.png\",\r\n msNews: sourcePath+\"img/logo/msnews_logo.svg\"\r\n};\r\nexport const placeholderImages = {\r\n avatar: sourcePath+\"img/avatar-placeholder.svg\",\r\n peopleAvatar: sourcePath+\"img/people-avatar.svg\",\r\n notSocialAvatar: sourcePath+\"img/profile/not_social_avatar_placeholder.svg\",\r\n content: \"http://img-s-msn-com.akamaized.net/tenant/amp/entityid/AAdQPFo.img\"\r\n};\r\nexport const guidlineImages = {\r\n g1: sourcePath+\"img/guidelines/g1_2.png\",\r\n g2: sourcePath+\"img/guidelines/g2_2.png\",\r\n g3: sourcePath+\"img/guidelines/g3_2.png\",\r\n g4: sourcePath+\"img/guidelines/g4_2.png\",\r\n g5: sourcePath+\"img/guidelines/g5_2.png\"\r\n};\r\nexport const onboardingImages = {\r\n underageBg: sourcePath+\"img/onboard/underage_bg.png\",\r\n welcomeBg: sourcePath+\"img/onboard/welcoming_bg.png\"\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { placeholderImages } from \"./images\";\r\n\r\nexport default function avatarFallback(error) {\r\n error.target.onerror=null;\r\n error.target.src=placeholderImages.avatar;\r\n}\r\n\r\nexport function contentImageFallback(error) {\r\n error.target.onerror = null;\r\n error.target.src = placeholderImages.content;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport React from \"react\";\r\n\r\nexport const flag = ;\r\nexport const plus = ;\r\nexport const thumbs_down = ;\r\nexport const thumbs_up = ;\r\nexport const comment = ;\r\nexport const chevron_down = ;\r\nexport const chevron_up = ;\r\nexport const ellipsis = ;\r\nexport const ellipsis2 = ;\r\nexport const ellipsis3 = ;\r\nexport const users = ;\r\nexport const users2 = ;\r\nexport const users3 = ;\r\nexport const user_following = ;\r\nexport const user_locked = ;\r\nexport const trash = ;\r\nexport const pen = ;\r\nexport const close = ;\r\nexport const settings = ;\r\nexport const chevron_right = ;\r\nexport const info_fill = ;\r\nexport const shield = ;\r\nexport const feedback = ;\r\nexport const tick = ;\r\nexport const send = ;\r\nexport const close2 = ;\r\nexport const cup = ;\r\nexport const activity = ;\r\nexport const arrow_reply = ;\r\nexport const exclamation = ;\r\nexport const exclamation_small = ;\r\nexport const exclamation_round = ;\r\nexport const emj_like = ;\r\nexport const emj_love = ;\r\nexport const emj_thinking = ;\r\nexport const emj_surprised = ;\r\nexport const emj_sad = ;\r\nexport const emj_angry = ;\r\nexport const open_outside = ;\r\nexport const posts = ;\r\nexport const check = ;\r\nexport const check_small = ;\r\nexport const typing_animation = ;\r\nexport const chevron_left = ;\r\nexport const like = ;\r\nexport const facebook = ;\r\nexport const twitter = ;\r\nexport const linkedin = ;\r\nexport const email = ;\r\nexport const publisherTabAll = ;\r\nexport const publisherTabPremium = ;\r\nexport const subscriptions = ;\r\nexport const renew = ;\r\nexport const arrow_down = ;\r\nexport const credit_card = ;\r\nexport const check_circled = ;\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nexport interface CommentListTelemetryObjects {\r\n mainItem: TelemetryObjectBase\r\n}\r\n\r\nexport const commentListTelemetryContracts = {\r\n mainItem: {\r\n name: \"Comment\",\r\n content: {\r\n type: TelemetryContentType.Comment\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase, TelemetryType } from \"@msnews/telemetry-contracts\";\r\nimport { genericTelemetryClickDispatcher, getPageContentType } from \"../../Social.telemetry\";\r\n\r\nexport interface CommentBoxTelemetryObjects {\r\n postViolationAI: TelemetryObjectBase;\r\n postHumanReview: TelemetryObjectBase;\r\n sendComment: TelemetryObjectBase;\r\n signIn?: TelemetryObjectBase;\r\n}\r\n\r\nexport const commentBoxTelemetryContracts = {\r\n postViolationAI: {\r\n name: \"PostViolationAI\",\r\n content: {type: TelemetryContentType.Comment}\r\n },\r\n postHumanReview: {\r\n name: \"PostHumanReview\",\r\n content: {type: TelemetryContentType.Comment}\r\n },\r\n\r\n /** Comments-Scenario 5a */\r\n sendReply: {\r\n name: \"Reply\",\r\n behavior: TelemetryBehaviorType.Comment,\r\n content: {\r\n type: TelemetryContentType.Comment,\r\n headline: \"Post\"\r\n }\r\n },\r\n /** Comments-Scenario 5 */\r\n sendComment: {\r\n name: \"Post\",\r\n behavior: TelemetryBehaviorType.Comment,\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"Post\"\r\n }\r\n },\r\n /** Comments-Scenario 4a */\r\n signIn: {\r\n name: \"SignIn\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"SignIn\"\r\n }\r\n }\r\n};\r\n\r\nexport const commentBoxTelemetryActionDispatchers = {\r\n genericClick: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\nfunction getParameter(key, defaultValue = null) {\r\n return getHashParameter(key) || getQueryParameter(key) || defaultValue;\r\n}\r\nfunction getQueryParameter (key) {\r\n const query = window.location.search.substring(1);\r\n const vars = query.split(\"&\");\r\n for (let i = 0; i < vars.length; i++) {\r\n const pair = vars[i].split(\"=\");\r\n if (pair[0].toLowerCase() == key.toLowerCase()) {\r\n return decodeURIComponent(pair[1]);\r\n }\r\n }\r\n return null;\r\n}\r\nfunction getHashParameter(key) {\r\n const query = window.location.hash.substring(1);\r\n const vars = query.split(\"&\");\r\n for (let i = 0; i < vars.length; i++) {\r\n const pair = vars[i].split(\"=\");\r\n if (pair[0].toLowerCase() == key.toLowerCase()) {\r\n return decodeURIComponent(pair[1]);\r\n }\r\n }\r\n return null;\r\n}\r\nfunction generateQueryStringByKeyVals(keyVals) {\r\n return (keyVals && Object.keys(keyVals).length > 0) ? \"?\" + Object.keys(keyVals).map(function (key) {\r\n return `${key}=${encodeURIComponent(keyVals[key])}`;\r\n }).join(\"&\") : \"\";\r\n}\r\nfunction decodeHtml(html) {\r\n const txt = document.createElement(\"textarea\");\r\n txt.innerHTML = html;\r\n return txt.value;\r\n}\r\nfunction getExternalURL(externalURL, market?, hasSectionIndicator?: string) {\r\n const forwardableParameters = [\"fdhead\", \"item\", \"rt\", \"theme\", \"ocid\"];\r\n const queryParams = {};\r\n forwardableParameters.map(x => {\r\n const val = getQueryParameter(x);\r\n if (val) {\r\n queryParams[x] = val;\r\n }\r\n });\r\n const queryString = generateQueryStringByKeyVals(queryParams);\r\n if (market && externalURL.indexOf(\"/en-us/\") > 0) {\r\n externalURL = externalURL.replace(\"/en-us/\", `/${market}/`);\r\n }\r\n const segments = [externalURL];\r\n if (queryString && externalURL.indexOf(\"?\") != -1) {\r\n segments.push(`&${queryString.substring(1)}`);\r\n } else if (queryString) {\r\n segments.push(queryString);\r\n }\r\n segments.push(hasSectionIndicator ? `#comments&commentId=${hasSectionIndicator}` : \"\");\r\n return segments.join(\"\");\r\n}\r\nfunction commentsSectionIndicatorExist() {\r\n return window.location.hash.includes(\"comments\");\r\n}\r\n\r\nexport {getParameter, generateQueryStringByKeyVals, decodeHtml, getExternalURL, commentsSectionIndicatorExist};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { BridgeEventNames, dispatchBridgeEvent } from \"../Social.bridge\";\r\n\r\nimport { enums } from \"./enums\";\r\nimport { getExternalURL } from \"./urlHelper\";\r\nimport { isComponentDisabled } from \"./themeHelpers\";\r\n\r\nexport default function openGuidelinePage(componentConnector, theme, market, target = \"_self\") {\r\n const attributes = [];\r\n if (isComponentDisabled(theme, \"guidelinepage\")) {\r\n if (theme === enums.theme.superappFullpage.name) {\r\n attributes[\"onClick\"] = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n componentConnector.setComponent(\"guidelinepage\", market, theme);\r\n };\r\n } else {\r\n attributes[\"onClick\"] = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n dispatchBridgeEvent(BridgeEventNames.openPopup, {component: \"guidelinepage\", fullScreen: true});\r\n };\r\n }\r\n } else {\r\n attributes[\"onClick\"] = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n window.open(getExternalURL(enums.externalUrls.guidelinePage, market), target);\r\n };\r\n }\r\n return attributes;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ComponentConnector } from \"../../Social.props\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { exclamation_round } from \"../../utils/icons\";\r\nimport openGuidelinePage from \"../../utils/openGuidelinePage\";\r\nimport { renderHybrid } from \"../../Social.telemetry\";\r\n\r\nexport interface DisabledMessageProps {\r\n managedClasses?: SocialClassNameContract;\r\n message: string;\r\n showGuidelines?: boolean;\r\n hideIcon?: boolean;\r\n t?: SocialLocalizedStrings;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n componentConnector?: ComponentConnector;\r\n theme?: string;\r\n market?: string;\r\n}\r\n\r\nexport default class DisabledMessage extends React.Component {\r\n containerRef: HTMLDivElement;\r\n\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n const {t, message, managedClasses, mainTelemetryObject, showGuidelines, hideIcon, componentConnector, theme, market} = this.props;\r\n\r\n return (\r\n \r\n \r\n { message }\r\n { !hideIcon ? exclamation_round : \"\"}\r\n \r\n \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryActionType, TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { TelemetryEventNames, dispatchTelemetryEvent } from \"../Social.telemetry\";\r\n\r\nexport interface FollowButtonTelemetryObjects {\r\n followButton: TelemetryObjectBase;\r\n}\r\n\r\nexport const followButtonTelemetryContracts = {\r\n followButton: {\r\n name: \"FollowButton\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n};\r\n\r\nexport const followButtonTelemetryActionDispatchers = {\r\n followButton: (element: any, isFollow: boolean, telemetryObject: TelemetryObjectBase): void => {\r\n const telemetryEventDispatcherInfo = {\r\n eventName: TelemetryEventNames.genericAction,\r\n contract: telemetryObject.contract,\r\n subTypes: {action: TelemetryActionType.Click, behavior: isFollow ? TelemetryBehaviorType.Follow : TelemetryBehaviorType.Unfollow}\r\n };\r\n\r\n dispatchTelemetryEvent(telemetryEventDispatcherInfo, element, null, true);\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport { FollowButtonTelemetryObjects, followButtonTelemetryActionDispatchers, followButtonTelemetryContracts } from \"./FollowButton.telemetry\";\r\nimport { FollowInfo, UsersConnector } from \"../Social.props\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../Social.telemetry\";\r\n\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../Social.localizedStrings\";\r\nimport { SocialState } from \"../Social.state\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { User } from \"@msnews/social-data-service\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { hasThemeBase } from \"../utils/themeHelpers\";\r\n\r\nexport interface FollowButtonProps {\r\n me: User,\r\n userId: string,\r\n users: { [id: string]: FollowInfo;}, // dictionary definening\r\n managedClasses: SocialClassNameContract,\r\n usersConnector: UsersConnector,\r\n onClick?: (e, userid: string, isFollow: boolean) => void,\r\n mainTelemetryObject?: TelemetryObjectBase\r\n t: SocialLocalizedStrings\r\n theme: string\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n me: state.me,\r\n users: state.users,\r\n theme: state.theme\r\n };\r\n};\r\n\r\nexport class FollowButton extends React.Component {\r\n telemetryObjects: FollowButtonTelemetryObjects;\r\n\r\n componentDidMount() {\r\n if (!(this.props.users && this.props.users[this.props.userId])) {\r\n const fetchUser = this.props.usersConnector.fetchUser;\r\n const fetchIsUserFollowed = this.props.usersConnector.fetchIsUserFollowed;\r\n if (!fetchUser || !fetchIsUserFollowed) { return console.warn(\"Missing props 'usersConnector.fetchUser' or 'userConnector.fetchIsUserFollowed'\"); }\r\n fetchUser(this.props.userId)\r\n .then(_ => {\r\n fetchIsUserFollowed(this.props.userId);\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n const {me, users, userId, managedClasses, mainTelemetryObject, t, theme} = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n\r\n const user = users[userId] ? users[userId].data : null;\r\n if (!user) { return null; }\r\n const {isFollowing, isPrivateProfile, traceId} = user;\r\n const isSelf = me && me.id == userId;\r\n const isAnonymous = user.state == enums.userStateType.anonymous;\r\n\r\n /** Generate Telemetry Objects */\r\n if (mainTelemetryObject) {\r\n this.telemetryObjects = {\r\n followButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...followButtonTelemetryContracts.followButton}, { id: traceId, headline: !isFollowing ? \"Follow\" : \"Unfollow\"}, this.telemetryObjects && this.telemetryObjects.followButton)\r\n };\r\n }\r\n\r\n const FollowButtonWrapperComponent = isFollowing ? OutlineButton :AccentButton;\r\n\r\n return (\r\n \r\n {!isSelf && !isPrivateProfile && !isAnonymous &&\r\n this.toggleFollow(e, userId, isFollowing)}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.followButton, false)}\r\n >\r\n {isFollowing ? t.FollowButtonFollowingText :t.FollowButtonFollowText}\r\n }\r\n \r\n );\r\n }\r\n\r\n toggleFollow(e, userId, isFollowing) {\r\n if (this.props.onClick) { this.props.onClick(e, userId, !isFollowing); }\r\n e.stopPropagation();\r\n\r\n this.props.usersConnector.followUser(userId, !isFollowing);\r\n followButtonTelemetryActionDispatchers.followButton(e.currentTarget, !isFollowing, this.telemetryObjects.followButton);\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(FollowButton);","// © Microsoft Corporation. All rights reserved.\r\nconst mouseHandlers = {\r\n makeMouseOutFn: (elem, callback) => {\r\n const list = traverseChildren(elem);\r\n return function onMouseOut(event) {\r\n const e = event.toElement || event.relatedTarget;\r\n if (~list.indexOf(e)) {\r\n return;\r\n }\r\n callback();\r\n };\r\n },\r\n\r\n isElementHover: e => e.parentElement.querySelector(\":hover\") === e\r\n};\r\n\r\nfunction traverseChildren(elem) {\r\n const children = [];\r\n const q = [];\r\n q.push(elem);\r\n while (q.length > 0) {\r\n elem = q.pop();\r\n children.push(elem);\r\n pushAll(elem.children);\r\n }\r\n\r\n function pushAll(elemArray) {\r\n for (let i = 0; i < elemArray.length; i++) {\r\n q.push(elemArray[i]);\r\n }\r\n }\r\n return children;\r\n}\r\n\r\nfunction preventSelection(e) {\r\n document.body.style[\"-webkit-touch-callout\"] = \"none\";\r\n document.body.style[\"-webkit-user-select\"] = \"none\";\r\n document.body.style[\"-khtml-user-select\"] = \"none\";\r\n document.body.style[\"-moz-user-select\"] = \"none\";\r\n document.body.style[\"-ms-user-select\"] = \"none\";\r\n document.body.style[\"user-select\"] = \"none\";\r\n\r\n const removeNoSelect = () => {\r\n document.body.style[\"-webkit-touch-callout\"] = \"unset\";\r\n document.body.style[\"-webkit-user-select\"] = \"unset\";\r\n document.body.style[\"-khtml-user-select\"] = \"unset\";\r\n document.body.style[\"-moz-user-select\"] = \"unset\";\r\n document.body.style[\"-ms-user-select\"] = \"unset\";\r\n document.body.style[\"user-select\"] = \"unset\";\r\n };\r\n\r\n document.body.addEventListener(\"click\", removeNoSelect, {once: true});\r\n document.body.addEventListener(\"mouseup\", removeNoSelect, {once: true});\r\n document.body.addEventListener(\"touchend\", removeNoSelect, {once: true});\r\n}\r\n\r\nfunction stopPropagationAndPreventDefault(e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n}\r\n\r\nfunction getPointerCoordinatesByEvent(e) {\r\n let coords;\r\n if (e.type == \"touchstart\" || e.type == \"touchmove\" || e.type == \"touchend\" || e.type == \"touchcancel\") {\r\n const evt = (typeof e.originalEvent === \"undefined\") ? e : e.originalEvent;\r\n const touch = evt.touches[0] || evt.changedTouches[0];\r\n coords = {x: touch.clientX, y: touch.clientY};\r\n } else if (e.type == \"mousedown\" || e.type == \"mouseup\" || e.type == \"mousemove\" || e.type == \"mouseover\"|| e.type==\"mouseout\" || e.type==\"mouseenter\" || e.type==\"mouseleave\") {\r\n coords = {x: e.clientX, y: e.clientY};\r\n }\r\n\r\n return coords;\r\n}\r\n\r\nexport {mouseHandlers, preventSelection, stopPropagationAndPreventDefault, getPointerCoordinatesByEvent};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport React, { CSSProperties } from \"react\";\r\n\r\nimport FocusLock from \"react-focus-lock\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { mouseHandlers } from \"../../utils/mouseHandlers\";\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n responsiveClass: state.responsiveClass\r\n };\r\n};\r\n\r\nexport interface PopoverProps {\r\n visible?: boolean;\r\n isHover?: boolean;\r\n triggerRef?: React.RefObject;\r\n managedClasses?: SocialClassNameContract;\r\n onHide?: () => void;\r\n style?: CSSProperties;\r\n hasFocusLock?: boolean;\r\n className?: string;\r\n hideOnMobile?: boolean;\r\n responsiveClass?: string;\r\n focusLockStyle?: string;\r\n hoverDelay?: number;\r\n marginTop?: number;\r\n marginBottom?: number;\r\n onMoved?: () => void;\r\n}\r\n\r\ninterface PopoverState {\r\n isHovered: boolean,\r\n delayCompleted: boolean\r\n}\r\n\r\nexport class Popover extends React.Component {\r\n containerRef: React.RefObject;\r\n contentRef: React.RefObject;\r\n timeoutId: number;\r\n static hoverTriggeredPopover: Popover; // only one hover triggered popover should be rendered, this will hold the only instance\r\n shouldMove: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n isHovered: false,\r\n delayCompleted: false\r\n };\r\n\r\n this.containerRef = React.createRef();\r\n this.contentRef = React.createRef();\r\n this.onClickOutside = this.onClickOutside.bind(this);\r\n this.onLeaveTrigger = this.onLeaveTrigger.bind(this);\r\n this.escFunction = this.escFunction.bind(this);\r\n\r\n if (Popover.hoverTriggeredPopover && Popover.hoverTriggeredPopover != this) { Popover.hoverTriggeredPopover.hide(); }\r\n if (this.props.isHover) { Popover.hoverTriggeredPopover = this; }\r\n this.shouldMove = true;\r\n }\r\n\r\n escFunction(event) {\r\n if (event.keyCode === 27) {\r\n this.props.onHide();\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n try {\r\n this.movePopover();\r\n document.addEventListener(\"click\", this.onClickOutside);\r\n document.addEventListener(\"keydown\", this.escFunction);\r\n window.addEventListener(\"scroll\", this.props.onHide);\r\n\r\n if (this.props.isHover && this.props.triggerRef && this.props.triggerRef.current) {\r\n this.props.triggerRef.current.addEventListener(\"mouseleave\", this.onLeaveTrigger);\r\n\r\n if (this.props.hoverDelay) { this.timeoutId = window.setTimeout(() => this.setState({delayCompleted: true}), this.props.hoverDelay); }\r\n }\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n }\r\n componentDidUpdate () {\r\n this.movePopover();\r\n }\r\n componentWillUnmount() {\r\n window.clearTimeout(this.timeoutId);\r\n }\r\n\r\n onClickOutside(event) {\r\n try {\r\n const clickedIsNotTrigger = (this.props.triggerRef &&\r\n this.props.triggerRef.current &&\r\n !this.props.triggerRef.current.contains(event.target)) || !this.props.triggerRef;\r\n\r\n const clickedIsNotChild = this.containerRef &&\r\n this.containerRef.current &&\r\n !this.containerRef.current.contains(event.target);\r\n\r\n if (clickedIsNotChild && clickedIsNotTrigger) {\r\n this.hide();\r\n }\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n }\r\n\r\n onClickInside(e) {\r\n e.stopPropagation();\r\n }\r\n\r\n onLeaveTrigger() {\r\n this.hide();\r\n }\r\n\r\n hide() {\r\n if (this.timeoutId) { window.clearTimeout(this.timeoutId); }\r\n if (Popover.hoverTriggeredPopover == this) { Popover.hoverTriggeredPopover = null; }\r\n\r\n if (this.props.isHover && !this.props.hoverDelay) {\r\n window.setTimeout(() => {\r\n try {\r\n if (!mouseHandlers.isElementHover(this.props.triggerRef.current) &&\r\n !mouseHandlers.isElementHover(this.containerRef.current)) {\r\n this.props.triggerRef.current.removeEventListener(\"mouseleave\", this.onLeaveTrigger);\r\n this.props.onHide();\r\n }\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n }, 200);\r\n } else {\r\n this.props.onHide();\r\n }\r\n }\r\n\r\n movePopover() {\r\n if (!this.shouldMove || !this.contentRef || !this.contentRef.current) { return; }\r\n this.shouldMove = false;\r\n const {marginTop, marginBottom} = this.props;\r\n const popoverRect = (this.contentRef.current.firstChild as HTMLElement).getBoundingClientRect();\r\n const leftDiff = popoverRect.left;\r\n const rightDiff = popoverRect.right - document.documentElement.clientWidth;\r\n const topDiff = popoverRect.top;\r\n const botDiff = popoverRect.bottom - document.documentElement.clientHeight;\r\n if (topDiff<0 || botDiff>0 || leftDiff<0 || rightDiff>0) {\r\n const translateY = (topDiff < 0 ? topDiff-(marginTop || 10) : 0) + (botDiff > 0 ? botDiff+(marginBottom || 10) : 0);\r\n const translateX = (leftDiff < 0 ? leftDiff: 0) + (rightDiff > 0 ? rightDiff: 0);\r\n this.contentRef.current.style.transform = `translateX(${-translateX}px) translateY(${-translateY}px)`;\r\n }\r\n this.contentRef.current.setAttribute(\"data-show\", \"true\");\r\n this.props.onMoved && this.props.onMoved();\r\n }\r\n\r\n render() {\r\n\r\n if (this.props.hoverDelay && (!this.state.delayCompleted && this.props.isHover)) { return null; }\r\n\r\n const { visible, children, isHover, managedClasses, hideOnMobile, responsiveClass, className, style, hasFocusLock } = this.props;\r\n const shouldHideMobile = hideOnMobile && responsiveClass && responsiveClass.includes(enums.responsiveLevels.MobilePopup);\r\n\r\n if (shouldHideMobile) { this.props.onHide(); }\r\n\r\n let content;\r\n const innerContent =
\r\n
\r\n {children}\r\n
\r\n
;\r\n\r\n if (hasFocusLock) {\r\n content = \r\n {innerContent}\r\n ;\r\n } else {\r\n content = \r\n {innerContent}\r\n ;\r\n }\r\n\r\n return (\r\n visible && !shouldHideMobile ? content : \"\"\r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(Popover);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { BridgeEventNames, dispatchBridgeEvent } from \"../Social.bridge\";\r\n\r\nimport { enums } from \"./enums\";\r\nimport { getExternalURL } from \"./urlHelper\";\r\nimport { isComponentDisabled } from \"./themeHelpers\";\r\n\r\nexport default function openProfilePage(componentConnector, theme, userId, market, target = \"_self\") {\r\n const attributes = [];\r\n attributes[\"href\"] = getExternalURL(`${enums.externalUrls.profilePage}${userId}`, market);\r\n attributes[\"target\"] = target;\r\n if (isComponentDisabled(theme, \"profilepage\")) {\r\n if (theme === enums.theme.superappFullpage.name) {\r\n attributes[\"onClick\"] = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n componentConnector.setComponent(\"profilePage\", market, theme, userId);\r\n };\r\n } else {\r\n attributes[\"onClick\"] = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n dispatchBridgeEvent(BridgeEventNames.openPopup, {component: \"profilepage\", id: userId, fullScreen: true});\r\n };\r\n }\r\n }\r\n return attributes;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ComponentConnector, FollowInfo, UsersConnector } from \"../../Social.props\";\r\n\r\nimport FollowButton from \"../../follow-button/FollowButton\";\r\nimport Popover from \"../../common/popover/Popover\";\r\nimport { PopoverProps } from \"../../common/popover/Popover\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { User } from \"@msnews/social-data-service\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { connect } from \"react-redux\";\r\nimport openProfilePage from \"../../utils/openProfilePage\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\n\r\nexport interface UserCardProps extends PopoverProps {\r\n componentConnector: ComponentConnector;\r\n usersConnector: UsersConnector;\r\n me: User;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n id: string;\r\n t: SocialLocalizedStrings;\r\n managedClasses?: SocialClassNameContract;\r\n market: string;\r\n theme: string;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n}\r\n\r\ninterface UserCardState {\r\n hasMouseEnter: boolean\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n theme: state.theme\r\n };\r\n};\r\n\r\nexport class UserCard extends React.Component {\r\n containerRef: React.RefObject;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.containerRef = React.createRef();\r\n\r\n this.state = {\r\n hasMouseEnter: false\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const fetchUser = this.props.usersConnector.fetchUser;\r\n const fetchIsUserFollowed = this.props.usersConnector.fetchIsUserFollowed;\r\n if (!fetchUser || !fetchIsUserFollowed) { return console.warn(\"Missing props 'usersConnector.fetchUser' or 'userConnector.fetchIsUserFollowed'\"); }\r\n fetchUser(this.props.id)\r\n .then(_ => {\r\n fetchIsUserFollowed(this.props.id);\r\n });\r\n }\r\n\r\n mouseEnterHandler() {\r\n this.setState({hasMouseEnter: true});\r\n }\r\n\r\n render() {\r\n const {componentConnector, me, t, managedClasses, id, usersConnector, users, market, theme, mainTelemetryObject} = this.props;\r\n const user = this.props.users && this.props.users[id] ? this.props.users[id].data : undefined;\r\n if (!user || !users) { return null; }\r\n\r\n const {id: userId, name, postsCount, isFollowing, followersCount, likesCount, isBanned} = user || {};\r\n const avatarUrl = (user && user.avatarUrl ? user.avatarUrl : null) || placeholderImages.avatar;\r\n const isSelf = me.id == userId;\r\n\r\n const triggerRef = this.state.hasMouseEnter ? this.containerRef : this.props.triggerRef;\r\n return (\r\n \r\n
\r\n \r\n {t.AriaLabelsProfilePicture}{ avatarFallback(e); }}/>\r\n \r\n
\r\n
\r\n
\r\n {name}\r\n
\r\n\r\n {!isSelf && !isBanned &&\r\n \r\n }\r\n
\r\n
\r\n
\r\n
{t.UserCardPosts}
\r\n {postsCount || \"-\"}\r\n
\r\n
\r\n
{t.UserCardLikes}
\r\n {likesCount || \"-\"}\r\n
\r\n
\r\n
{t.ProfileFollowersLbl}
\r\n {followersCount || \"-\"}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(mapStateToProps)(UserCard);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { BridgeEventNames, dispatchBridgeEvent } from \"../Social.bridge\";\r\n\r\nimport { enums } from \"./enums\";\r\nimport { getExternalURL } from \"./urlHelper\";\r\nimport { hasThemeBase } from \"./themeHelpers\";\r\n\r\nexport default function openEditProfilePage(theme, market, target = \"_self\") {\r\n const url = getExternalURL(enums.externalUrls.profileSettings, market);\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n if (isSuperApp) {\r\n dispatchBridgeEvent(BridgeEventNames.requestBrowser, {url: url});\r\n } else {\r\n window.open(url, target);\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Comment, Content, User } from \"@msnews/social-data-service\";\r\nimport { CommentBoxTelemetryObjects, commentBoxTelemetryActionDispatchers, commentBoxTelemetryContracts } from \"./CommentBox.telemetry\";\r\nimport { ComponentConnector, FollowInfo, PopupConnector, UsersConnector } from \"../../Social.props\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\nimport { close2, ellipsis2, exclamation, send } from \"../../utils/icons\";\r\n\r\nimport AccessibilityHelpers from \"../../utils/AccessibilityHelpers\";\r\nimport DisabledMessage from \"../disabled-message/DisabledMessage\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport UserCard from \"../user-card/UserCard\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\nimport openEditProfilePage from \"../../utils/openEditProfilePage\";\r\nimport openProfilePage from \"../../utils/openProfilePage\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\n\r\nexport interface CommentBoxProps {\r\n componentConnector: ComponentConnector,\r\n isFirstCommenter: boolean,\r\n commentBoxType: string,\r\n parentType: string,\r\n parentUser: User,\r\n me: User,\r\n t: SocialLocalizedStrings;\r\n managedClasses?: SocialClassNameContract;\r\n usersConnector: UsersConnector;\r\n popupConnector: PopupConnector;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n submitCommentAndUpdateState: (value: string) => Promise;\r\n id: string;\r\n market: string;\r\n content: Content;\r\n broadcastAsTyping?: (id: string, market: string, content: Content) => void;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n theme: string;\r\n commentId?: string;\r\n onCommentBoxInitialized?: (commentBox: HTMLDivElement) => void\r\n}\r\n\r\ninterface CommentBoxState {\r\n value: string,\r\n showActions: boolean,\r\n userCardVisible: boolean,\r\n userCardUserId: string,\r\n lastTypedTime?: Date,\r\n lastBroadcastTypingTime?: Date,\r\n newCommentVisibleStatus: string,\r\n newCommentErrorMessage: string,\r\n remainingCharsCount: number,\r\n disabledHasClicked: boolean,\r\n disabled: boolean,\r\n focused: boolean,\r\n commentBoxFocusRoot: string,\r\n}\r\n\r\nclass CommentBox extends React.Component {\r\n _isMounted = false;\r\n commentBoxRef: HTMLDivElement;\r\n containerRef: React.RefObject;\r\n signInRef: HTMLAnchorElement;\r\n telemetryObjects: CommentBoxTelemetryObjects;\r\n\r\n private static maxCharsLimit = 2000;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n value: \"\",\r\n showActions: false,\r\n userCardVisible: false,\r\n userCardUserId: \"\",\r\n lastTypedTime: undefined,\r\n lastBroadcastTypingTime: undefined,\r\n newCommentVisibleStatus: enums.visibleStatusType.Normal,\r\n newCommentErrorMessage: null,\r\n remainingCharsCount: CommentBox.maxCharsLimit,\r\n disabledHasClicked: false,\r\n disabled: false,\r\n focused: false,\r\n commentBoxFocusRoot: \"keyboard\"\r\n };\r\n this.commentBoxRef = null;\r\n this.containerRef = React.createRef();\r\n this.signInRef = null;\r\n this.handleChange = this.handleChange.bind(this);\r\n }\r\n\r\n handleChange(e) {\r\n if (!e || !(this.commentBoxRef && this.state.focused)) { return; }\r\n\r\n e.stopPropagation();\r\n\r\n const charsCount = this.commentBoxRef.innerText.length;\r\n this.setState({showActions: charsCount > 0, remainingCharsCount: CommentBox.maxCharsLimit - charsCount});\r\n\r\n if (this.state.remainingCharsCount <= 0) {\r\n e.preventDefault();\r\n }\r\n\r\n if (!this.state.lastTypedTime || new Date().getTime() - this.state.lastTypedTime.getTime() > 20000) { // if 20sec passed since last recorded time\r\n this.setState({lastTypedTime: new Date()});\r\n }\r\n\r\n if (!this.state.lastBroadcastTypingTime || new Date().getTime() - this.state.lastBroadcastTypingTime.getTime() > 3000) {\r\n this.setState({lastBroadcastTypingTime: new Date()});\r\n if (this.props.broadcastAsTyping && this.props.me && this.props.me.isSocialUser) {\r\n this.props.broadcastAsTyping(this.props.id, this.props.market, this.props.content);\r\n }\r\n }\r\n }\r\n\r\n clear(keepCursorInBox) {\r\n if (this.commentBoxRef) {\r\n this.commentBoxRef.innerText = \"\";\r\n keepCursorInBox && this.commentBoxRef.focus();\r\n }\r\n this.setState({showActions: false, remainingCharsCount: CommentBox.maxCharsLimit });\r\n }\r\n\r\n async submitComment(e) {\r\n if (!this.state.disabled) {\r\n commentBoxTelemetryActionDispatchers.genericClick(e.currentTarget, this.telemetryObjects && this.telemetryObjects.sendComment);\r\n\r\n e.stopPropagation();\r\n\r\n this.commentBoxRef.innerHTML = this.commentBoxRef.innerHTML.replace(/()/g, \"\").trim();\r\n\r\n this.setState({disabled: true, newCommentErrorMessage: undefined});\r\n const comment = await this.props.submitCommentAndUpdateState(this.commentBoxRef.innerText);\r\n this.setState({disabled: undefined});\r\n\r\n if (comment && comment.errorCode !== undefined) {\r\n this.setState({ newCommentErrorMessage: this.getErrorMessageFromCodes(comment.errorCode, comment.errorSubCodes)});\r\n } else if (comment) {\r\n if (comment.visibleStatus == enums.visibleStatusType.Normal || comment.visibleStatus == enums.visibleStatusType.InReview) {\r\n this.clear(false);\r\n }\r\n\r\n this.setState({ newCommentVisibleStatus: comment.visibleStatus});\r\n }\r\n }\r\n }\r\n\r\n placeCaretAtEnd(el) {\r\n el.focus();\r\n if (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n const range = document.createRange();\r\n range.selectNodeContents(el);\r\n range.collapse(false);\r\n const sel = window.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n AccessibilityHelpers.attachAccessibilityListeners(document);\r\n }\r\n\r\n listenKeyEvents(el) {\r\n if (!el || this._isMounted) {\r\n return;\r\n }\r\n this._isMounted = true;\r\n const capture = {\r\n capture: true\r\n };\r\n this.commentBoxRef = el;\r\n this.commentBoxRef.addEventListener(\"keyup\", this.handleChange, capture);\r\n this.commentBoxRef.addEventListener(\"keyupCapture\", this.handleChange, capture);\r\n this.commentBoxRef.addEventListener(\"keypress\", this.handleChange, capture);\r\n this.commentBoxRef.addEventListener(\"keypressCapture\", this.handleChange, capture);\r\n if (this.props.commentBoxType == \"Reply\") {\r\n this.placeCaretAtEnd(this.commentBoxRef);\r\n }\r\n if (this.props.onCommentBoxInitialized) { this.props.onCommentBoxInitialized(this.commentBoxRef); }\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n if (this.commentBoxRef) {\r\n this.commentBoxRef.removeEventListener(\"keyup\", this.handleChange);\r\n this.commentBoxRef.removeEventListener(\"keyupCapture\", this.handleChange);\r\n this.commentBoxRef.removeEventListener(\"keypress\", this.handleChange);\r\n this.commentBoxRef.removeEventListener(\"keypressCapture\", this.handleChange);\r\n }\r\n }\r\n\r\n handleSignInClick(e) {\r\n\r\n commentBoxTelemetryActionDispatchers.genericClick(e.currentTarget, this.telemetryObjects && this.telemetryObjects.signIn);\r\n this.props.popupConnector.openPopup(\"multiLoginPage\", { contentId: this.props.content.id, focusBackRef: this.signInRef});\r\n }\r\n\r\n showUserCard(e, userId) {\r\n const me = this.props.me;\r\n if (me.state == enums.userStateType.anonymous) { return; }\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n if (isSuperApp) {\r\n return;\r\n }\r\n this.setState({userCardVisible: true, userCardUserId: userId});\r\n }\r\n\r\n commentBoxClickHandler(e, isDisabled) {\r\n const me = this.props.me;\r\n\r\n if (me.state == enums.userStateType.newUser) {\r\n this.props.popupConnector.openPopup(\"onboardingPage\", { contentId: this.props.content.id });\r\n } else if (me.state == enums.userStateType.anonymous) {\r\n this.handleSignInClick(e);\r\n } else if (isDisabled) {\r\n this.setState({ disabledHasClicked: true });\r\n }\r\n }\r\n\r\n commentBoxPasteHandler(e) {\r\n let content;\r\n e.preventDefault();\r\n\r\n if (e.clipboardData) {\r\n content = e.clipboardData.getData(\"text/plain\");\r\n document.execCommand(\"insertText\", false, content);\r\n } else if (window.clipboardData) {\r\n content = window.clipboardData.getData(\"Text\");\r\n if (window.getSelection) { window.getSelection().getRangeAt(0).insertNode(document.createTextNode(content)); }\r\n }\r\n\r\n this.commentBoxRef.innerText = this.commentBoxRef.innerText.substring(0, CommentBox.maxCharsLimit + 1);\r\n }\r\n\r\n getErrorMessageFromCodes(code, subCodes): string {\r\n const maxSubCode = subCodes && subCodes.length > 0 ? Math.max(...subCodes) : null;\r\n\r\n if (enums.newCommentErrorCodeMap[code] && enums.newCommentErrorCodeMap[code][maxSubCode]) {\r\n return enums.newCommentErrorCodeMap[code][maxSubCode];\r\n } else if (enums.newCommentErrorCodeMap[code]) {\r\n return enums.newCommentErrorCodeMap[code];\r\n } else {\r\n return enums.newCommentErrorCodeMap[0];\r\n }\r\n }\r\n\r\n getPlaceholderText() {\r\n const { me, t, commentBoxType, isFirstCommenter, content } = this.props;\r\n\r\n if (content.isExpired) {\r\n return t.CommentBoxPlaceholderExpired;\r\n }\r\n\r\n if (me.state == enums.userStateType.anonymous) {\r\n return t.CommentBoxPlaceholderAnonymousUser;\r\n } else if (me.state == enums.userStateType.newUser) {\r\n return t.CommentBoxPlaceholderNewUser;\r\n } else if (me.isBanned) {\r\n return t.CommentBoxPlaceholderBannedUser;\r\n } else if (me.nameStatus == enums.userNameStatusType.notAllow) {\r\n return t.CommentBoxPlaceholderNameNotAllow;\r\n } else if (commentBoxType == \"Comment\") {\r\n if (isFirstCommenter) {\r\n return t.CommentBoxPlaceholderFirstComment;\r\n }\r\n return t.CommentBoxPlaceholderMsg;\r\n } else {\r\n return t.CommentBoxPlaceholderReply;\r\n }\r\n }\r\n\r\n getAvatarAltText() {\r\n const { me, t } = this.props;\r\n\r\n if (me.nameStatus == enums.userNameStatusType.notAllow) {\r\n return t.NameNotAllowTip.replace(\"{#}\", me.name);\r\n } else if (me.avatarStatus == enums.userAvatarStatusType.notAllow) {\r\n return t.AvatarNotAllowTip;\r\n } else if (me.nameStatus == enums.userNameStatusType.inReview) {\r\n return t.NameInReviewTip;\r\n } else if (me.avatarStatus == enums.userAvatarStatusType.inReview) {\r\n return t.AvatarInReviewTip;\r\n } else if (me.isBanned) {\r\n return t.UserBannedTip;\r\n } else {\r\n return t.AvatarAltText;\r\n }\r\n }\r\n\r\n handleFocus(e) {\r\n this.setState({focused: true});\r\n\r\n if (this.state.commentBoxFocusRoot == \"keyboard\") {\r\n const el = e.target;\r\n const range = document.createRange();\r\n range.selectNodeContents(el);\r\n const sel = window.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n }\r\n }\r\n\r\n render() {\r\n const {componentConnector, commentBoxType, parentType, parentUser, me, t, managedClasses, usersConnector, users, market, content, mainTelemetryObject, theme, commentId} = this.props;\r\n\r\n if (!me || !content) { return null; }\r\n\r\n const avatarUrl = me.state != enums.userStateType.newUser && me.avatarStatus == enums.userAvatarStatusType.normal ? me.avatarUrl || placeholderImages.avatar : placeholderImages.avatar;\r\n const placeholderText = this.getPlaceholderText();\r\n const avatarAltText = this.getAvatarAltText();\r\n const meHasInReviewInfo = (me.avatarStatus == enums.userAvatarStatusType.inReview || me.nameStatus == enums.userNameStatusType.inReview);\r\n const meHasNotAllowInfo = (me.avatarStatus == enums.userAvatarStatusType.notAllow || me.nameStatus == enums.userNameStatusType.notAllow || (!meHasInReviewInfo && me.isBanned));\r\n const disabled = me.state != enums.userStateType.existingUser || content.isExpired || me.isBanned || this.state.disabled || me.nameStatus == enums.userNameStatusType.notAllow;\r\n const isDeleted = this.state.newCommentVisibleStatus != enums.visibleStatusType.Normal &&\r\n [enums.visibleStatusType.DeletedByAI,\r\n enums.visibleStatusType.DeletedByHI,\r\n enums.visibleStatusType.DeletedByUser].includes(this.state.newCommentVisibleStatus);\r\n const isInReview = this.state.newCommentVisibleStatus == enums.visibleStatusType.InReview;\r\n const hasDeniedMessage = this.state.newCommentErrorMessage && (t[this.state.newCommentErrorMessage] || t[enums.newCommentErrorCodeMap[0]]);\r\n\r\n /** Telemetry */\r\n this.telemetryObjects = {\r\n postViolationAI: addOrUpdateTelemetryObject(mainTelemetryObject, commentBoxTelemetryContracts.postViolationAI, { id: commentId || \"\" }, this.telemetryObjects && this.telemetryObjects.postViolationAI),\r\n postHumanReview: addOrUpdateTelemetryObject(mainTelemetryObject, commentBoxTelemetryContracts.postHumanReview, { id: commentId || \"\" }, this.telemetryObjects && this.telemetryObjects.postHumanReview),\r\n sendComment: commentBoxType == \"Comment\"\r\n ? addOrUpdateTelemetryObject(mainTelemetryObject, commentBoxTelemetryContracts.sendComment, { id: content && content.cmsId }, this.telemetryObjects && this.telemetryObjects.sendComment)\r\n : addOrUpdateTelemetryObject(mainTelemetryObject, commentBoxTelemetryContracts.sendReply, { id: commentId || \"\"}, this.telemetryObjects && this.telemetryObjects.sendComment),\r\n signIn: addOrUpdateTelemetryObject(mainTelemetryObject, commentBoxTelemetryContracts.signIn, { id: content && content.cmsId }, this.telemetryObjects && this.telemetryObjects.signIn)\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n { avatarFallback(e); }}\r\n onMouseEnter={(e) => this.showUserCard(e, me.id)}\r\n />\r\n \r\n { meHasInReviewInfo &&\r\n {ellipsis2} \r\n }\r\n {(meHasNotAllowInfo || content.isExpired) &&\r\n {exclamation} \r\n }\r\n
\r\n {this.state.userCardVisible &&\r\n this.setState({userCardVisible: false}),\r\n triggerRef: this.containerRef,\r\n isHover: true,\r\n mainTelemetryObject\r\n }}\r\n />\r\n }\r\n this.listenKeyEvents(el)}\r\n placeholder = { placeholderText}\r\n suppressContentEditableWarning={true}\r\n role=\"textbox\"\r\n aria-label={t.AriaLabelsCommentBox}\r\n aria-multiline={!disabled}\r\n aria-readonly={disabled}\r\n onClick={ e => this.commentBoxClickHandler(e, disabled)}\r\n onPaste={ e => this.commentBoxPasteHandler(e)}\r\n onFocus={ e => { this.handleFocus(e); }}\r\n onKeyDown={ e => { this.setState({commentBoxFocusRoot: \"keyboard\"}); }}\r\n onMouseEnter={ e => { this.setState({commentBoxFocusRoot: \"mouse\"}); }}\r\n onBlur={() => this.setState({focused: false})}\r\n >\r\n {commentBoxType == \"Comment\" || parentType == \"Comment\" ? \"\" :\r\n \r\n this.showUserCard(e, parentUser.id)} contentEditable={false}>{parentUser.name}\r\n  \r\n \r\n }\r\n
\r\n\r\n \r\n
\r\n\r\n {this.state.remainingCharsCount < 100 &&
{this.state.remainingCharsCount > 0 ? String.Format(t.CommentBoxCharsRemaining, {remainingCharsCount: this.state.remainingCharsCount}) : t.CommentBoxCharsLimitReached }
}\r\n\r\n { isDeleted && }\r\n\r\n { isInReview && }\r\n\r\n { hasDeniedMessage && }\r\n\r\n \r\n );\r\n }\r\n}\r\nconst mapStateToProps = (state: SocialState) => {\r\n return { id: state.id };\r\n};\r\n\r\nexport default connect(mapStateToProps)(CommentBox);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface CommentItemTelemetryObjects {\r\n commentItem: TelemetryObjectBase; // from contract: commentItem / deletedCommentItem / reportedCommentItem\r\n reportButton: TelemetryObjectBase;\r\n deleteButton: TelemetryObjectBase;\r\n reactionsCount: TelemetryObjectBase;\r\n reactionBreakdown: TelemetryObjectBase;\r\n}\r\n\r\nexport const commentItemTelemetryContracts = {\r\n commentItem: {\r\n name: \"Comment\",\r\n content: { type: TelemetryContentType.Comment }\r\n },\r\n deletedCommentItem: {\r\n name: \"CommentDeletedModerator\",\r\n content: { type: TelemetryContentType.Comment }\r\n },\r\n reportedCommentItem: {\r\n name: \"CommentReported\",\r\n content: { type: TelemetryContentType.Comment }\r\n },\r\n reactionBreakdown: {\r\n content: { type: TelemetryContentType.Comment }\r\n },\r\n reportButton: { // Comments-Scenario 10a click\r\n name: \"Report\",\r\n behavior: TelemetryBehaviorType.Report,\r\n content: {\r\n headline: \"Report\",\r\n type: TelemetryContentType.Comment\r\n }\r\n },\r\n deleteButton: { // Scenario 10b click\r\n name: \"Delete\",\r\n behavior: TelemetryBehaviorType.Remove,\r\n content: {\r\n type: TelemetryContentType.Comment,\r\n headline: \"Delete\"\r\n }\r\n },\r\n reactionsCount: { // CommentReactions>Scenario 1\r\n name: \"CommentReactions\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: TelemetryContentType.Comment,\r\n headline: \"Reactions\"\r\n }\r\n }\r\n};\r\n\r\nexport const commentItemTelemetryActionDispatchers = {\r\n genericClick: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase, TelemetryType } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface DeleteMenuTelemetryObjects {\r\n yesButton: TelemetryObjectBase;\r\n cancelButton: TelemetryObjectBase;\r\n deleteMenu: TelemetryObjectBase;\r\n}\r\n\r\nexport const deleteMenuTelemetryContracts = {\r\n /** Comments-Scenario-10d */\r\n yesButton: {\r\n name: \"CommentDelete\",\r\n behavior: TelemetryBehaviorType.Remove,\r\n content: {\r\n headline: \"Yes\",\r\n type: TelemetryContentType.Comment\r\n }\r\n },\r\n cancelButton: {\r\n name: \"CommentDelete\",\r\n behavior: TelemetryBehaviorType.Remove,\r\n content: {\r\n headline: \"Cancel\",\r\n type: TelemetryContentType.Comment\r\n }\r\n },\r\n /** Comments-Scenario-10c */\r\n deleteMenu: {\r\n name: \"CommentDelete\",\r\n content: { type: TelemetryContentType.Comment }\r\n }\r\n};\r\n\r\nexport const deleteMenuTelemetryActionDispatchers = {\r\n genericClick: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DeleteMenuTelemetryObjects, deleteMenuTelemetryActionDispatchers, deleteMenuTelemetryContracts } from \"./DeleteMenu.telemetry\";\r\nimport Popover, { PopoverProps } from \"../../common/popover/Popover\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\n\r\nimport AccessibilityHelpers from \"../../utils/AccessibilityHelpers\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nexport interface DeleteMenuProps extends PopoverProps {\r\n id: string;\r\n managedClasses?: SocialClassNameContract;\r\n onConfirmDelete?: (any) => void;\r\n t: SocialLocalizedStrings;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n}\r\n\r\ninterface DeleteMenuState {\r\n visible: boolean\r\n}\r\n\r\nexport default class DeleteMenu extends React.Component {\r\n telemetryObjects: DeleteMenuTelemetryObjects;\r\n containerRef: HTMLDivElement;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = { visible: true };\r\n this.containerRef = null;\r\n }\r\n\r\n componentDidMount() {\r\n AccessibilityHelpers.attachAccessibilityListeners(document);\r\n }\r\n\r\n cancelHandler(e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n this.props.onHide();\r\n deleteMenuTelemetryActionDispatchers.genericClick(e.currentTarget, this.telemetryObjects && this.telemetryObjects.cancelButton);\r\n const ref = window.document.getElementById(`deleteMenu_${this.props.id}`);\r\n if (ref) {\r\n window.setTimeout(() => { ref.focus(); }, 50);\r\n }\r\n }\r\n\r\n yesHandler(e) {\r\n deleteMenuTelemetryActionDispatchers.genericClick(e.currentTarget, this.telemetryObjects && this.telemetryObjects.yesButton);\r\n this.props.onConfirmDelete(e);\r\n }\r\n\r\n handleKeyDown(e) {\r\n if (e.keyCode == 27) { /* ESC key */\r\n const ref = window.document.getElementById(`deleteMenu_${this.props.id}`);\r\n if (ref) {\r\n window.setTimeout(() => { ref.focus(); }, 50);\r\n }\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.props.onHide();\r\n } else if (e.keyCode == 38) { /* Up arrow */\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const prev = e.target.previousElementSibling;\r\n if (prev) {\r\n prev.focus();\r\n } else {\r\n e.target.parentElement.lastElementChild.focus();\r\n }\r\n } else if (e.keyCode == 40) { /* Down arrow */\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const next = e.target.nextElementSibling;\r\n if (next) {\r\n next.focus();\r\n } else {\r\n e.target.parentElement.firstElementChild.focus();\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n const { managedClasses, t, id, mainTelemetryObject } = this.props;\r\n\r\n /** Generate Telemetry Objects */\r\n if (mainTelemetryObject) {\r\n this.telemetryObjects = {\r\n yesButton: addOrUpdateTelemetryObject(mainTelemetryObject, deleteMenuTelemetryContracts.yesButton, { id }, this.telemetryObjects && this.telemetryObjects.yesButton),\r\n cancelButton: addOrUpdateTelemetryObject(mainTelemetryObject, deleteMenuTelemetryContracts.cancelButton, { id }, this.telemetryObjects && this.telemetryObjects.cancelButton),\r\n deleteMenu: addOrUpdateTelemetryObject(mainTelemetryObject, deleteMenuTelemetryContracts.deleteMenu, { id }, this.telemetryObjects && this.telemetryObjects.deleteMenu)\r\n };\r\n }\r\n\r\n return (\r\n \r\n
{ this.containerRef = el; })}\r\n onKeyDown={(e) => { this.handleKeyDown(e); }}>\r\n \r\n {t.DeleteMenuDeleteComment}\r\n \r\n
    \r\n
  • this.yesHandler(e)} {...renderHybrid(this.telemetryObjects && this.telemetryObjects.yesButton, false)}>\r\n {t.DeleteMenuDeleteCommentConfirm}\r\n
  • \r\n
  • this.cancelHandler(e)} {...renderHybrid(this.telemetryObjects && this.telemetryObjects.cancelButton, false)}>\r\n {t.DeleteMenuDeleteCommentCancel}\r\n
  • \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport React from \"react\";\r\nimport { SocialReactions } from \"@msnews/social-data-service\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\n\r\nconst emojiSprite = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAAAiCAMAAAA+jia8AAAC8VBMVEUAAAC+XxK0aA3tqyjvtC7TkB60aA3foCSyZw77wTLytSuxZwvVSArdRzvOdCH2uzC0ag7LLxW2iDfusi7HeRjpYkP5vzIHCQnDYxDlYiLEeBbibCbRPQ7YTQ3KKRvzty7enia+bRL8wjPuXVH5vzLBHA7uXlLvXlKyZQ3nqSjKhRkXlczkpyvTjx3WPSe/GQvLhhoDIC7MLiHkUUTeaCGwZAvrrirUQRHwYFTPPAxpcW/CHhDOaxv6wDLmpie/dxOyZQzjpCfhXBzZRSq8cxMAAADwYFX9xTO3bA8Qib4Ocp3LlTV2RAgQm9cymb/tsiv/kYj////+wiz/xC/+xTT/yDv+xzf/xTH/ykD/wSj+kIbU8fn/0lv/zEj/02H7uib+13H/z1D/2nb5tSP/0FXzqh/zcmj/zUwDAgL/1WXu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7 8.8L0 23.2z\\\" fill=\\\"%23FFC700\\\"\",\r\n circleMaskImage: \"d=\\\"M1.3 28H28V0H1.3l1.4 1.3C6.2 4.6 8 9.3 8 14a17.2 17.2 0 01-6.7 14z\\\" fill=\\\"%23FFC700\\\"\",\r\n likeMaskImageRTL: \"d=\\\"M28 13.4432V0H0V28H28V27.9606H24.6812C23.9528 27.9606 23.2572 27.5051 23.0133 26.7486C22.8826 26.3432 22.7714 25.9262 22.6904 25.4899C22.258 23.965 22.0436 22.36 22.0005 20.8064L22 20.7898L22.0004 20.7732C22.043 19.0186 22.171 17.2069 22.4727 15.4315L22.4786 15.397L22.6553 14.7781C22.8814 13.9867 23.5867 13.4432 24.3877 13.4432H28Z\\\" fill=\\\"%23FFC700\\\"\",\r\n loveMaskImageRTL: \"d=\\\"M28 0H0V28H28V24.0646C26.6312 23.0066 25.2744 21.9085 23.9784 20.7129L23.9768 20.7114C21.7049 18.6011 19.7588 15.9392 19.1724 12.7661L19.1717 12.7619C18.635 9.73528 19.3673 6.65994 21.221 4.15415L21.2256 4.14796C22.8656 1.9878 25.2984 0.558465 28 0.13032V0Z\\\" fill=\\\"%23FFC700\\\"\",\r\n circleMaskImageRTL: \"d=\\\"M26.6749 0H0V28H26.6429C26.1637 27.6039 25.7043 27.1811 25.2673 26.7327C21.8516 23.4034 19.9163 18.7723 20.0028 14C19.9163 9.22999 21.8499 4.5982 25.2673 1.31048C25.7146 0.845747 26.1846 0.408516 26.6749 0Z\\\" fill=\\\"%23FFC700\\\"\"\r\n};\r\n\r\nexport const getEmojiStylesByWidth = (width: number): object => {\r\n const styles = {\r\n \"background-image\": `url(\"${emojiSprite}\")`,\r\n width: `${width}px`,\r\n height: `${width*1.125}px`,\r\n \"background-size\": `${width*Object.keys(SocialReactions).length}px auto`,\r\n \"background-repeat\": \"no-repeat\"\r\n };\r\n Object.keys(SocialReactions).map((key, i)=> {\r\n styles[`&[data-type=\"${key}\"]`] = { \"background-position\": `-${width*i}px 0`};\r\n });\r\n return styles;\r\n};\r\n\r\nexport const getEmojiMask = (maskName: string, width: number): string => {\r\n return `url('data:image/svg+xml,%3Csvg width=\"${width}\" height=\"${width}\" viewBox=\"0 0 28 28\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cpath fill-rule=\"evenodd\" clip-rule=\"evenodd\" ${maskPaths[maskName]} /%3E%3C/svg%3E')`;\r\n};\r\n\r\nexport function renderEmojiByType(reactionType: string, className?: string) {\r\n return
;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport Popover, { PopoverProps } from \"../popover/Popover\";\r\n\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport {enums} from \"../../utils/enums\";\r\nimport { renderEmojiByType } from \"../../utils/emojiIcons\";\r\n\r\nexport interface MiniReactionBreakdownProps extends PopoverProps {\r\n managedClasses?: SocialClassNameContract;\r\n counts: Object;\r\n}\r\n\r\nexport default class MiniReactionBreakdown extends React.Component {\r\n\r\n render() {\r\n return (\r\n \r\n
\r\n {Object.keys(enums.reactionIconMap).filter(key => this.props.counts[key] > 0).map(key =>\r\n \r\n {renderEmojiByType(key)}\r\n {this.props.counts[key]}\r\n \r\n )}\r\n
\r\n
\r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport MiniReactionBreakdown from \"../../common/mini-reaction-breakdown/MiniReactionBreakdown\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { chevron_down } from \"../../utils/icons\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\nimport { renderEmojiByType } from \"../../utils/emojiIcons\";\r\nimport { renderHybrid } from \"../../Social.telemetry\";\r\n\r\nexport interface MostReactionsProps {\r\n theme: string;\r\n t: SocialLocalizedStrings;\r\n managedClasses: SocialClassNameContract;\r\n reactionCounts: any;\r\n onReactionsClick: (target: any) => void;\r\n setReactionsCountRef?: (elemet: HTMLElement) => void;\r\n hideLabel?: boolean;\r\n customLabel?: string;\r\n containerClassName?: string;\r\n telemetryObject?: TelemetryObjectBase;\r\n hasSeperatorBefore?: boolean;\r\n hasSeperatorAfter?: boolean;\r\n}\r\n\r\ninterface MostReactionsState {\r\n miniReactionBreakdownVisible: boolean;\r\n isHoverMiniReactionBreakdown: boolean;\r\n}\r\n\r\nconst maskClassMap = {\r\n [enums.reactions.angry]: \"circleMask\",\r\n [enums.reactions.like]: \"likeMask\",\r\n [enums.reactions.love]: \"loveMask\",\r\n [enums.reactions.sad]: \"circleMask\",\r\n [enums.reactions.surprised]: \"circleMask\",\r\n [enums.reactions.thinking]: \"circleMask\"\r\n};\r\nexport default class MostReactions extends React.Component {\r\n isHoverHandlersAttached = false;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n miniReactionBreakdownVisible: false,\r\n isHoverMiniReactionBreakdown: false\r\n };\r\n\r\n }\r\n\r\n render() {\r\n const { containerClassName, t, managedClasses, theme, hideLabel, customLabel, telemetryObject, reactionCounts, onReactionsClick, hasSeperatorBefore, hasSeperatorAfter} = this.props;\r\n const { miniReactionBreakdownVisible } = this.state;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n\r\n // Reaction Counts\r\n let totalReactionCount = 0;\r\n let mostReactionKeys = [];\r\n if (reactionCounts) {\r\n totalReactionCount = Object.values(reactionCounts as number).reduce(($sum, $count) => $sum + $count, 0);\r\n mostReactionKeys = Object.keys(reactionCounts)\r\n .sort(($0, $1) => reactionCounts[$1] - reactionCounts[$0])\r\n .filter($ => reactionCounts[$] > 0)\r\n .slice(0, 3);\r\n }\r\n\r\n return totalReactionCount > 0 && (\r\n \r\n {miniReactionBreakdownVisible && (\r\n this.setState({ miniReactionBreakdownVisible: false })}\r\n isHover={this.state.isHoverMiniReactionBreakdown}\r\n managedClasses={managedClasses}\r\n />\r\n )}\r\n\r\n { hasSeperatorBefore && |}\r\n\r\n onReactionsClick(e.currentTarget)}\r\n aria-haspopup=\"true\"\r\n ref={instance => !(telemetryObject) && this.setRef(instance)}\r\n {...(telemetryObject ? renderHybrid(telemetryObject && telemetryObject, false, (el) => this.setRef(el)) : {})}\r\n >\r\n \r\n {mostReactionKeys.map((key, index) => (\r\n \r\n {renderEmojiByType(key, index > 0 && managedClasses[maskClassMap[mostReactionKeys[index-1]]])}\r\n \r\n ))}\r\n {!hideLabel && {customLabel || totalReactionCount}}\r\n \r\n \r\n\r\n { hasSeperatorAfter && |}\r\n\r\n { !isSuperApp &&\r\n {\r\n this.setState({\r\n miniReactionBreakdownVisible: false,\r\n isHoverMiniReactionBreakdown: false\r\n });\r\n }}\r\n onClick={() =>\r\n this.setState({\r\n miniReactionBreakdownVisible: !this.state.miniReactionBreakdownVisible,\r\n isHoverMiniReactionBreakdown: false\r\n })\r\n }>\r\n {chevron_down}\r\n \r\n }\r\n \r\n );\r\n }\r\n\r\n setRef(element) {\r\n if (!element) { return; }\r\n\r\n // forward ref\r\n this.props.setReactionsCountRef && this.props.setReactionsCountRef(element);\r\n\r\n // attach hover handlers\r\n !this.isHoverHandlersAttached && this.attachHoverHandlers(element);\r\n }\r\n\r\n attachHoverHandlers(element) {\r\n if (this.isHoverHandlersAttached) { return; }\r\n\r\n this.isHoverHandlersAttached = true;\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n if (!isSuperApp) {\r\n element.addEventListener(\"mouseenter\", () => {\r\n this.setState({\r\n miniReactionBreakdownVisible: true,\r\n isHoverMiniReactionBreakdown: true\r\n });\r\n });\r\n element.addEventListener(\"mouseleave\", () => {\r\n this.setState({\r\n miniReactionBreakdownVisible: false,\r\n isHoverMiniReactionBreakdown: false\r\n });\r\n });\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { TelemetryEventMap, dispatchTelemetryEvent, genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface ReactionPanelTelemetryObjects {\r\n likeButton: TelemetryObjectBase;\r\n activeReactionButton: TelemetryObjectBase;\r\n}\r\n\r\nexport const reactionPanelTelemetryContracts = {\r\n likeButton: { // Scenario 2 click, Scenario 2a hover\r\n name: \"Reaction\",\r\n behavior: TelemetryBehaviorType.Like, // dynamically updated\r\n content: {\r\n type: TelemetryContentType.Comment,\r\n headline: \"Like\" // dynamically updated\r\n }\r\n }\r\n};\r\n\r\nexport const reactionPanelTelemetryActionDispatchers = {\r\n likeButtonClick: genericTelemetryClickDispatcher,\r\n likeButtonHover: (element: any, telemetryObject: any): void => {\r\n const telemetryEventDispatcherInfo = {\r\n ...TelemetryEventMap.genericHover,\r\n contract: {...(telemetryObject && telemetryObject.contract)}\r\n };\r\n\r\n dispatchTelemetryEvent(telemetryEventDispatcherInfo, element);\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryObjectBase, TelemetryType } from \"@msnews/telemetry-contracts\";\r\nimport { genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface ReactionMenuTelemetryObjects {\r\n container: TelemetryObjectBase;\r\n emojis: TelemetryObjectBase[];\r\n}\r\n\r\nexport const reactionMenuTelemetryContracts = {\r\n container: { // ContentReaction>Scenario 2b impr\r\n name: \"ReactionsPopup\"\r\n },\r\n emojis: { // ContentReaction>Scenario 2c & CommentReactions Scenario 2x\r\n name: \"ReactionsPopup\",\r\n type: TelemetryType.ActionButton\r\n }\r\n};\r\n\r\nexport const reactionMenuTelemetryActionDispatchers = {\r\n emojiClick: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nfunction setBodyUserSelect(value: string) {\r\n document.body.style[\"-webkit-touch-callout\"] = value;\r\n document.body.style[\"-webkit-user-select\"] = value;\r\n document.body.style[\"-khtml-user-select\"] = value;\r\n document.body.style[\"-moz-user-select\"] = value;\r\n document.body.style[\"-ms-user-select\"] = value;\r\n document.body.style[\"user-select\"] = value;\r\n}\r\n\r\nfunction preventSelection(e) {\r\n setBodyUserSelect(\"none\");\r\n\r\n const removeNoSelect = () => setBodyUserSelect(\"unset\");\r\n\r\n document.body.addEventListener(\"click\", removeNoSelect, {once: true});\r\n document.body.addEventListener(\"mouseup\", removeNoSelect, {once: true});\r\n document.body.addEventListener(\"touchend\", removeNoSelect, {once: true});\r\n}\r\n\r\nfunction getPointerCoordinatesByEvent(e) {\r\n let coords;\r\n if (e.type == \"touchstart\" || e.type == \"touchmove\" || e.type == \"touchend\" || e.type == \"touchcancel\") {\r\n const evt = (typeof e.originalEvent === \"undefined\") ? e : e.originalEvent;\r\n const touch = evt.touches[0] || evt.changedTouches[0];\r\n coords = {x: touch.clientX, y: touch.clientY};\r\n } else if (e.type == \"mousedown\" || e.type == \"mouseup\" || e.type == \"mousemove\" || e.type == \"mouseover\"|| e.type==\"mouseout\" || e.type==\"mouseenter\" || e.type==\"mouseleave\") {\r\n coords = {x: e.clientX, y: e.clientY};\r\n }\r\n\r\n return coords;\r\n}\r\n\r\nfunction isPointerOnElement(e: Event, el: HTMLElement) {\r\n if (!e || !el) { return; }\r\n\r\n const rect = el.getBoundingClientRect();\r\n const pointerCoords = getPointerCoordinatesByEvent(e);\r\n return rect.left <= pointerCoords.x && rect.right >= pointerCoords.x && rect.top <= pointerCoords.y && rect.bottom >= pointerCoords.y;\r\n}\r\n\r\nexport {preventSelection, getPointerCoordinatesByEvent, isPointerOnElement};","\r\n// © Microsoft Corporation. All rights reserved.\r\n\r\ndeclare global {\r\n interface Window {\r\n ReactNativeWebView: any;\r\n }\r\n}\r\n\r\nfunction sendBridgeEvent(bridgeEventName, data: any = {}) {\r\n try {\r\n data = {\r\n type: bridgeEventName,\r\n ...data\r\n };\r\n window.ReactNativeWebView && window.ReactNativeWebView.postMessage(JSON.stringify({type: \"community\", data: data}));\r\n } catch (e) {\r\n // suppress error\r\n }\r\n}\r\n\r\nconst lockTouch = () => sendBridgeEvent(\"lock-touch\");\r\nconst unlockTouch = () => sendBridgeEvent(\"unlock-touch\");\r\n\r\nexport {lockTouch, unlockTouch};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { getPointerCoordinatesByEvent, isPointerOnElement, preventSelection } from \"./utils/EventHelpers\";\r\nimport { lockTouch, unlockTouch } from \"./utils/BridgeHelpers\";\r\n\r\nimport { enums } from \"@msnews/social-data-service\";\r\n\r\n/**\r\n * GENERIC TOUCH & SLIDE HANDLER\r\n */\r\ninterface TouchSlideCallbacks {\r\n onLongpress?: (target: HTMLElement) => void; // called when longpress mode activated (timeout is achieved)\r\n onLongpressEnd?: (e: Event) => void; // called at the first touch-end or touch-move after longpress mode activated\r\n onTouchStart?: (e: Event) => void;\r\n onTouchEnd?: (e: Event) => void;\r\n onTriggerClick?: (e: Event) => void;\r\n onSlide?: (coords: any, e: Event) => void;\r\n onSlideStart?: (target: HTMLElement) => void;\r\n onSlideEnd?: () => void;\r\n}\r\n\r\ninterface TouchSlideConfig {\r\n slideDisabled?: boolean;\r\n longpressDisabled?: boolean;\r\n}\r\n\r\nclass TouchSlideHandler {\r\n static readonly trackingPeriod = 16; // 60 Hz\r\n private static lastTouchEndTime = 0;\r\n\r\n // Configurable Parameters\r\n private longPressTimeout = 250; // [ms]\r\n private reopenTimeout = 50; // [ms] time period that must pass before another reactionmenu can open by touch\r\n private slideDisabled = false;\r\n private longpressDisabled = false;\r\n\r\n // Main Proporties\r\n private hasLongpressed: boolean;\r\n private isHandled: boolean; // true if event handlers are attached and not removed\r\n protected triggerElement: HTMLElement;\r\n private callbacks: TouchSlideCallbacks;\r\n\r\n constructor(callbacks: TouchSlideCallbacks, config?: TouchSlideConfig) {\r\n this.callbacks = callbacks;\r\n this.triggerTouchStartHandler = this.triggerTouchStartHandler.bind(this);\r\n this.triggerClickHandler = this.triggerClickHandler.bind(this);\r\n this.touchEndHandler = this.touchEndHandler.bind(this);\r\n\r\n this.slideDisabled = config && config.slideDisabled;\r\n this.longpressDisabled = config && config.longpressDisabled;\r\n }\r\n\r\n public setupTrigger(target: HTMLElement) {\r\n // Event captured from a NEW or DIFFERENT element\r\n if (this.triggerElement != target) {\r\n this.unregisterTriggerEventHandlers();\r\n this.triggerElement = target;\r\n }\r\n this.registerTriggerEventHandlers();\r\n }\r\n\r\n public setupTriggerAtTouchStart(e: Event) {\r\n this.setupTrigger(e.currentTarget as HTMLElement);\r\n this.triggerTouchStartHandler(e);\r\n }\r\n\r\n public dispose() {\r\n this.unregisterTriggerEventHandlers();\r\n this.triggerElement = null;\r\n }\r\n\r\n public releaseTouchEvents() {\r\n unlockTouch();\r\n this.unregisterTriggerEventHandlers();\r\n }\r\n\r\n // :: TOUCH HANDLERS\r\n private triggerTouchStartHandler(e: Event) {\r\n !this.longpressDisabled && this.listenLongpress(e.currentTarget as HTMLElement);\r\n !this.slideDisabled && this.listenSlideStart(e.currentTarget as HTMLElement);\r\n this.callbacks.onTouchStart && this.callbacks.onTouchStart(e);\r\n preventSelection(e);\r\n lockTouch();\r\n if (!this.enoughTimePassedSinceLastTouchEnd(e.timeStamp)) { return; }\r\n }\r\n\r\n private triggerClickHandler(e: Event) {\r\n // If long press activated right before this click\r\n if (this.hasLongpressed && isPointerOnElement(e, this.triggerElement)) {\r\n e.stopPropagation();\r\n return;\r\n }\r\n\r\n // Check if the event fired when touch point inside on trigger element\r\n if (isPointerOnElement(e, this.triggerElement)) {\r\n this.triggerElement.click();\r\n this.triggerElement.blur();\r\n unlockTouch();\r\n this.callbacks.onTriggerClick && this.callbacks.onTriggerClick(e);\r\n }\r\n }\r\n\r\n private touchEndHandler(e: Event) {\r\n this.callbacks.onTouchEnd && this.callbacks.onTouchEnd(e);\r\n this.releaseTouchEvents();\r\n }\r\n\r\n // :: LONGPRESS HANDLERS\r\n private listenLongpress = (target: HTMLElement) => {\r\n if (this.hasLongpressed) { return; } // if already in lonpress mode do nothing\r\n let isInterrupted = false;\r\n\r\n // Define functions to call for when timeout achieved or interrupted\r\n const stopLongpress = () => isInterrupted = true;\r\n const initiateLongpress = () => {\r\n if (isInterrupted) { return; }\r\n this.hasLongpressed = true;\r\n this.callbacks.onLongpress && this.callbacks.onLongpress(target);\r\n\r\n // Set the event handlers to get out of longpress mode\r\n document.addEventListener(\"touchstart\", () => {\r\n this.hasLongpressed = false;\r\n document.addEventListener(\"touchend\", this.callbacks.onLongpressEnd, {once: true});\r\n document.addEventListener(\"touchmove\", this.callbacks.onLongpressEnd, {once: true});\r\n }, {once: true});\r\n };\r\n\r\n // Set LongPress timer to initiate SLIDE event\r\n setTimeout(initiateLongpress, this.longPressTimeout);\r\n\r\n // Stop longpress timer if touchend fires before timeout\r\n target.addEventListener(\"touchend\", stopLongpress, {once: true});\r\n target.addEventListener(\"touchmove\", stopLongpress, {once: true});\r\n\r\n };\r\n\r\n // :: SLIDE HANDLERS\r\n private listenSlideStart = (target: HTMLElement) => {\r\n // Slide Event Initiation\r\n const initiateSlide = () => {\r\n this.triggerElement.removeEventListener(\"touchend\", this.triggerClickHandler);\r\n\r\n this.callbacks.onSlideStart && this.callbacks.onSlideStart(target);\r\n this.listenSliding(); // Start listening slide events\r\n };\r\n\r\n // Listen TouchMove to initiate SLIDE event\r\n document.addEventListener(\"touchmove\", initiateSlide, {once: true});\r\n\r\n // TERMINATE initiating SLIDE event\r\n document.addEventListener(\"touchend\", () => {\r\n document.removeEventListener(\"touchmove\", initiateSlide);\r\n }, {once: true});\r\n };\r\n\r\n private listenSliding() {\r\n this.hasLongpressed = false;\r\n\r\n let lastMoveTimeStamp = 0;\r\n const touchMoveHandler = (e: Event) => {\r\n e.stopPropagation();\r\n e.cancelable && e.preventDefault();\r\n\r\n // Skip if touch change period is shorter than [touchTrackingPeriod]\r\n if (e.timeStamp - lastMoveTimeStamp < TouchSlideHandler.trackingPeriod) { return; }\r\n lastMoveTimeStamp = e.timeStamp;\r\n\r\n const coords = getPointerCoordinatesByEvent(e); // Get last touch coordinates\r\n this.callbacks.onSlide && this.callbacks.onSlide(coords, e);\r\n };\r\n\r\n // Listen Slide Events\r\n document.addEventListener(\"touchmove\", touchMoveHandler, {capture: true, passive: false});\r\n\r\n // Stop Listening Slide Events\r\n document.addEventListener(\"touchend\", () => {\r\n document.removeEventListener(\"touchmove\", touchMoveHandler, {capture: true});\r\n this.callbacks.onSlideEnd && this.callbacks.onSlideEnd();\r\n }, {capture: true, once: true});\r\n }\r\n\r\n // :: ADD / REMOVE HANDLERS of TRIGGER ELEMENT\r\n // ADD EventListeners if triggerElement is set and handlers are not attached\r\n private registerTriggerEventHandlers() {\r\n setTimeout(() => {\r\n if (!this.triggerElement || this.isHandled) { return; }\r\n this.isHandled = true;\r\n this.triggerElement.addEventListener(\"touchstart\", this.triggerTouchStartHandler);\r\n this.triggerElement.addEventListener(\"touchend\", this.triggerClickHandler);\r\n document.addEventListener(\"touchend\", this.touchEndHandler);\r\n }, 10);\r\n }\r\n\r\n // REMOVE EventListeners if triggerElement is set and handlers are attached\r\n private unregisterTriggerEventHandlers() {\r\n if (!this.triggerElement || !this.isHandled) { return; }\r\n this.isHandled = false;\r\n this.triggerElement.removeEventListener(\"touchstart\", this.triggerTouchStartHandler);\r\n this.triggerElement.removeEventListener(\"touchend\", this.triggerClickHandler);\r\n document.removeEventListener(\"touchend\", this.touchEndHandler);\r\n }\r\n\r\n // UTIL\r\n private enoughTimePassedSinceLastTouchEnd(timeStamp: number) {\r\n return timeStamp - TouchSlideHandler.lastTouchEndTime > this.reopenTimeout;\r\n }\r\n}\r\n\r\n/**\r\n * REACTIONMENU TOUCH & SLIDE HANDLER\r\n */\r\ninterface ReactionMenuTouchSlideCallbacks{\r\n onEmojiFocus: (el: HTMLElement) => void;\r\n onEmojiBlur: (el: HTMLElement) => void;\r\n}\r\nclass ReactionMenuTouchSlideHandler extends TouchSlideHandler {\r\n readonly virtualTray = {\r\n height: 140,\r\n width: 100,\r\n hMargin: 20\r\n };\r\n\r\n // Main Properties\r\n private containerElement: HTMLElement;\r\n private emojiElementSelector: string;\r\n\r\n // Variables that change onSlide\r\n private touchFocusedEmojiElement: HTMLElement;\r\n\r\n // Focus / Blur callbacks\r\n private reactioMenuCallbacks: ReactionMenuTouchSlideCallbacks;\r\n\r\n constructor(callbacks: TouchSlideCallbacks, reactioMenuCallbacks: ReactionMenuTouchSlideCallbacks, emojiSelector: string, config?: TouchSlideConfig) {\r\n super({\r\n ...callbacks,\r\n onSlide: (coords: any, e: Event) => {\r\n this.reactionMenuSlideHandler(coords, e);\r\n callbacks.onSlide && callbacks.onSlide(coords, e);\r\n },\r\n onSlideEnd: () => {\r\n this.reactionHandler();\r\n callbacks.onSlideEnd && callbacks.onSlideEnd();\r\n },\r\n onLongpressEnd: (e: Event) => {\r\n if (isPointerOnElement(e, this.containerElement) || isPointerOnElement(e, this.triggerElement)) { return; }\r\n\r\n callbacks.onLongpressEnd && callbacks.onLongpressEnd(e);\r\n }\r\n }, config);\r\n this.reactioMenuCallbacks = reactioMenuCallbacks;\r\n this.emojiElementSelector = emojiSelector;\r\n }\r\n\r\n public setReactionMenuContainer(el: HTMLElement) {\r\n this.containerElement = el;\r\n }\r\n\r\n public dispose() {\r\n this.containerElement = null;\r\n super.dispose();\r\n }\r\n\r\n // :: MAIN HANDLERS\r\n private reactionHandler() {\r\n this.touchFocusedEmojiElement && this.touchFocusedEmojiElement.click();\r\n }\r\n private reactionMenuSlideHandler(coords: any, e: Event) {\r\n if (!this.containerElement) { return; }\r\n\r\n const reactionMenuRect: ClientRect = this.containerElement.getBoundingClientRect();\r\n\r\n // Calculate virtual tray ranges based on reactionmenu rect\r\n const yRange = {start: reactionMenuRect.top - this.virtualTray.height/2, end: reactionMenuRect.bottom + this.virtualTray.height/2};\r\n const xRange = {start: reactionMenuRect.left, end: reactionMenuRect.left + reactionMenuRect.width};\r\n\r\n // Calculate boundaries per emoji\r\n const virtualWidthPerEmoji = (xRange.end - xRange.start) / enums.reactionOrder.length;\r\n const matchingEmojiIndex = Math.min(Math.max(Math.floor((coords.x - xRange.start)/virtualWidthPerEmoji), 0), enums.reactionOrder.length - 1);\r\n\r\n // Check if touch point is inside any of the emoji boundaries then focus or blur\r\n if (coords.x < xRange.start - this.virtualTray.hMargin || coords.x > xRange.end + this.virtualTray.hMargin || coords.y < yRange.start || coords.y > yRange.end) {\r\n // Unselect focused emojis when touch leaves the virtual tray\r\n this.touchFocusedEmojiElement && this.reactioMenuCallbacks.onEmojiBlur(this.touchFocusedEmojiElement);\r\n this.touchFocusedEmojiElement = null;\r\n } else {\r\n // Focus on the emoji matching with the position inside the virtual tray\r\n const emojiToFocus = this.containerElement.querySelectorAll(this.emojiElementSelector)[matchingEmojiIndex];\r\n if (this.touchFocusedEmojiElement != emojiToFocus) {\r\n this.touchFocusedEmojiElement && this.reactioMenuCallbacks.onEmojiBlur(this.touchFocusedEmojiElement);\r\n this.touchFocusedEmojiElement = emojiToFocus as HTMLElement;\r\n this.reactioMenuCallbacks.onEmojiFocus(this.touchFocusedEmojiElement);\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport { TouchSlideHandler, ReactionMenuTouchSlideHandler };","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport Popover, { PopoverProps } from \"../popover/Popover\";\r\nimport { ReactionMenuTelemetryObjects, reactionMenuTelemetryActionDispatchers, reactionMenuTelemetryContracts } from \"./ReactionMenu.telemetry\";\r\nimport { ReactionToBehaviorTypeMap, TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, getHeadlineByReactionType, getPageContentType, renderHybrid } from \"../../Social.telemetry\";\r\n\r\nimport React from \"react\";\r\nimport { ReactionMenuTouchSlideHandler } from \"@msnews/social-interaction-helpers\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport {enums} from \"../../utils/enums\";\r\nimport { renderEmojiByType } from \"../../utils/emojiIcons\";\r\n\r\nexport interface ReactionMenuProps extends PopoverProps {\r\n onReaction: (key: string) => void;\r\n onShow?: (target: any, isHover: boolean) => void;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n t: SocialLocalizedStrings;\r\n rating?: string;\r\n triggerElements?: Array;\r\n visible?: boolean;\r\n}\r\nexport default class ReactionMenu extends React.Component {\r\n public static lastHiddenTime = 1;\r\n public static touchEnabled = false;\r\n\r\n telemetryObjects: ReactionMenuTelemetryObjects;\r\n containerRef: HTMLDivElement;\r\n triggerRef: HTMLElement;\r\n touchSlideHandler: ReactionMenuTouchSlideHandler;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.containerRef = null;\r\n this.triggerHoverHandler = this.triggerHoverHandler.bind(this);\r\n this.triggerTouchStartHandler = this.triggerTouchStartHandler.bind(this);\r\n this.triggerClickHandler = this.triggerClickHandler.bind(this);\r\n this.touchSlideHandler = new ReactionMenuTouchSlideHandler({\r\n onSlideStart: (target) => {\r\n ReactionMenu.touchEnabled = true;\r\n this.props.onShow && this.props.onShow(target, true);\r\n },\r\n onSlideEnd: () => this.hide(),\r\n onLongpress: (target) => {\r\n ReactionMenu.touchEnabled = true;\r\n this.props.onShow && this.props.onShow(target, true);\r\n },\r\n onLongpressEnd: () => this.hide(),\r\n onTouchEnd: () => { ReactionMenu.touchEnabled = false; }\r\n },\r\n {\r\n onEmojiFocus: (el: HTMLElement) => el.classList.add(\"touchFocused\"),\r\n onEmojiBlur: (el: HTMLElement) => el.classList.remove(\"touchFocused\")\r\n }, \".cwt-link.cwt-icon\");\r\n }\r\n\r\n componentDidMount() {\r\n if (this.containerRef) {\r\n dispatchTelemetryEvent({...TelemetryEventMap.genericLoaded, sendPeregrine: true}, this.containerRef);\r\n }\r\n\r\n this.registerHandlers(this.props.triggerElements);\r\n }\r\n\r\n componentDidUpdate(nextProps: ReactionMenuProps) {\r\n this.registerHandlers(this.props.triggerElements);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.touchSlideHandler.dispose();\r\n this.unregisterHandlers(this.props.triggerElements);\r\n }\r\n\r\n render() {\r\n if (!this.props.visible || (this.props.isHover && !this.triggerRef)) { return null; }\r\n const {t, isHover, managedClasses} = this.props;\r\n\r\n !this.telemetryObjects && this.generateOrUpdateTelemetryObjects();\r\n\r\n return (\r\n \r\n
{ this.containerRef = el; })}>\r\n {enums.reactionOrder.map((key) =>\r\n this.reactionClickHandler(e.currentTarget, key)}\r\n data-title={t[`EmojiLabel${key}`]}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.emojis && this.telemetryObjects.emojis[key], false)}\r\n >\r\n {renderEmojiByType(key)}\r\n \r\n )}\r\n
\r\n
\r\n );\r\n }\r\n\r\n // :: ReactionMenu specific methods\r\n reactionClickHandler(target, key) {\r\n if (!this.props.visible) { return; }\r\n\r\n reactionMenuTelemetryActionDispatchers.emojiClick(target, this.telemetryObjects && this.telemetryObjects.emojis[key]);\r\n this.props.onReaction(key);\r\n this.hide();\r\n }\r\n hide() {\r\n ReactionMenu.lastHiddenTime = (new Date()).getTime();\r\n this.props && this.props.onHide && setTimeout(() => { this.props.onHide(); }, 10);\r\n }\r\n\r\n // :: Trigger element handlers\r\n triggerHoverHandler(e) {\r\n this.triggerRef = e.currentTarget;\r\n this.setState({});\r\n\r\n if ((new Date()).getTime() - ReactionMenu.lastHiddenTime < 225) { return; }\r\n this.props && this.props.onShow && this.props.onShow(e.currentTarget, true);\r\n }\r\n triggerTouchStartHandler(e) {\r\n this.triggerRef = e.currentTarget;\r\n this.setState({});\r\n this.touchSlideHandler.setupTriggerAtTouchStart(e);\r\n }\r\n triggerClickHandler(e) {\r\n !ReactionMenu.touchEnabled && this.hide();\r\n }\r\n\r\n // :: Event attachers to trigger element\r\n registerHandlers(triggerRefs: Array) {\r\n this.containerRef && this.touchSlideHandler.setReactionMenuContainer(this.containerRef);\r\n\r\n setTimeout(() => {\r\n triggerRefs && triggerRefs.map(ref => {\r\n if (!ref || ref.getAttribute(\"data-trigger-reqistered\")) { return; }\r\n ref.setAttribute(\"data-trigger-reqistered\", \"1\");\r\n ref.addEventListener(\"mouseenter\", this.triggerHoverHandler);\r\n ref.addEventListener(\"click\", this.triggerClickHandler);\r\n ref.addEventListener(\"touchstart\", this.triggerTouchStartHandler);\r\n });\r\n }, 10);\r\n }\r\n unregisterHandlers(triggerRefs: Array) {\r\n this.touchSlideHandler.dispose();\r\n\r\n triggerRefs && triggerRefs.map(ref => {\r\n if (!ref || !ref.getAttribute(\"data-trigger-reqistered\")) { return; }\r\n ref.removeAttribute(\"data-trigger-reqistered\");\r\n ref.removeEventListener(\"mouseenter\", this.triggerHoverHandler);\r\n ref.removeEventListener(\"touchstart\", this.triggerTouchStartHandler);\r\n });\r\n }\r\n\r\n generateOrUpdateTelemetryObjects() {\r\n const { mainTelemetryObject, rating } = this.props;\r\n\r\n if (mainTelemetryObject) {\r\n const id = mainTelemetryObject.contract.content.id;\r\n const type = mainTelemetryObject.contract.content.type? mainTelemetryObject.contract.content.type : getPageContentType();\r\n\r\n this.telemetryObjects = {\r\n container: addOrUpdateTelemetryObject(mainTelemetryObject, {...reactionMenuTelemetryContracts.container}, { id, type }, this.telemetryObjects && this.telemetryObjects.container),\r\n emojis: []\r\n };\r\n\r\n enums.reactionOrder.map((key) => {\r\n if (!rating && (this.telemetryObjects && this.telemetryObjects.emojis && this.telemetryObjects.emojis[key])) { return; }\r\n\r\n const headline = getHeadlineByReactionType(key, key == rating);\r\n const behavior = ReactionToBehaviorTypeMap[key];\r\n this.telemetryObjects.emojis[key] = addOrUpdateTelemetryObject(mainTelemetryObject, {...reactionMenuTelemetryContracts.emojis, behavior}, { id, type, headline }, this.telemetryObjects && this.telemetryObjects.emojis && this.telemetryObjects.emojis[key]);\r\n });\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { enums } from \"./enums\";\r\n\r\nexport function getReactionColorClass (reaction: string) {\r\n if (!reaction) { return \"\"; }\r\n return (reaction === enums.reactions.love || reaction === enums.reactions.angry) ?\r\n \"cwt-red-reaction\" : \"cwt-yellow-reaction\";\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ReactionPanelTelemetryObjects, reactionPanelTelemetryActionDispatchers, reactionPanelTelemetryContracts } from \"./ReactionPanel.telemetry\";\r\nimport { ReactionToBehaviorTypeMap, addOrUpdateTelemetryObject, getHeadlineByReactionType, renderHybrid } from \"../../Social.telemetry\";\r\nimport { chevron_down, comment, thumbs_up } from \"../../utils/icons\";\r\n\r\nimport AccessibilityHelpers from \"../../utils/AccessibilityHelpers\";\r\nimport React from \"react\";\r\nimport ReactionMenu from \"../reaction-menu/ReactionMenu\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport {enums} from \"../../utils/enums\";\r\nimport { getReactionColorClass } from \"../../utils/styleHelpers\";\r\nimport { renderEmojiByType } from \"../../utils/emojiIcons\";\r\nimport { stopPropagationAndPreventDefault } from \"../../utils/mouseHandlers\";\r\n\r\nexport interface ReactionPanelProps {\r\n managedClasses?: SocialClassNameContract;\r\n rating: string;\r\n onReaction: (type: string) => void;\r\n t: SocialLocalizedStrings;\r\n replyLabel?: JSX.Element;\r\n onReplyClick: (target: HTMLElement) => void;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n showCommentsButton?: boolean;\r\n reactionMenuClassName?: string;\r\n responsiveClass?: string;\r\n}\r\n\r\ninterface ReactionPanelState {\r\n reactionMenuVisible: boolean;\r\n isHoverReactionPanel: boolean;\r\n}\r\n\r\nexport default class ReactionPanel extends React.Component {\r\n reactionMenuTriggerRefs: Array;\r\n containerRef: React.RefObject;\r\n telemetryObjects: ReactionPanelTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n reactionMenuVisible: false,\r\n isHoverReactionPanel: true\r\n };\r\n this.containerRef = React.createRef();\r\n this.reactionMenuTriggerRefs = [];\r\n }\r\n\r\n componentDidUpdate() {\r\n AccessibilityHelpers.attachAccessibilityListeners(document);\r\n }\r\n\r\n onLikeBtnClick(e, telemetryObject) {\r\n // Right Click Detection\r\n if (\"which\" in e && e.which == 3) { return; } else if (\"button\" in e && e.button == 2) { return; }\r\n\r\n const currentRating = this.props.rating || enums.reactions.like;\r\n this.props.onReaction(currentRating);\r\n\r\n this.setState({ reactionMenuVisible: false });\r\n reactionPanelTelemetryActionDispatchers.likeButtonClick(e.currentTarget, telemetryObject);\r\n }\r\n\r\n onReactionMenuShow(target, isHover) {\r\n this.setState({ reactionMenuVisible: true, isHoverReactionPanel: isHover });\r\n reactionPanelTelemetryActionDispatchers.likeButtonHover(target, this.telemetryObjects.likeButton);\r\n }\r\n\r\n onReactionMenuHide() {\r\n this.setState({reactionMenuVisible: false, isHoverReactionPanel: true});\r\n }\r\n\r\n reactionHandler(type) {\r\n this.props.onReaction(type);\r\n }\r\n\r\n render() {\r\n const {t, rating, replyLabel, onReplyClick, managedClasses, showCommentsButton, reactionMenuClassName, responsiveClass, mainTelemetryObject} = this.props;\r\n const {reactionMenuVisible, isHoverReactionPanel} = this.state;\r\n\r\n this.generateOrUpdateTelemetryObjects();\r\n\r\n return (\r\n stopPropagationAndPreventDefault(e)}\r\n onMouseMove={e => stopPropagationAndPreventDefault(e)}\r\n onTouchStart={e => stopPropagationAndPreventDefault(e)}\r\n onTouchMove={e => stopPropagationAndPreventDefault(e)}\r\n >\r\n { this.reactionMenuTriggerRefs.length > 0 &&\r\n this.reactionHandler(type)}\r\n onHide={() => this.onReactionMenuHide()}\r\n visible={reactionMenuVisible}\r\n onShow={(target, isHover) => this.onReactionMenuShow(target, isHover)}\r\n isHover={isHoverReactionPanel}\r\n triggerElements={ this.reactionMenuTriggerRefs}\r\n {...{managedClasses, mainTelemetryObject, t, rating}}\r\n />\r\n }\r\n !ReactionMenu.touchEnabled && this.onLikeBtnClick(e, this.telemetryObjects && this.telemetryObjects.likeButton)}\r\n data-has-over={reactionMenuVisible}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.likeButton, false, el => this.reactionMenuTriggerRefs[0] = el)}\r\n >\r\n {thumbs_up}\r\n {t.EmojiLabellike}\r\n \r\n !ReactionMenu.touchEnabled && this.onLikeBtnClick(e, this.telemetryObjects && this.telemetryObjects.activeReactionButton)}\r\n data-has-over={reactionMenuVisible}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.activeReactionButton, false, el => this.reactionMenuTriggerRefs[1] = el)}\r\n >\r\n {renderEmojiByType(rating)}\r\n {(rating ? t[`EmojiLabel${rating}`] : \"\")}\r\n \r\n this.setState({reactionMenuVisible: true, isHoverReactionPanel: false})}> {chevron_down} \r\n {showCommentsButton &&\r\n onReplyClick(e.currentTarget)}>\r\n {comment}\r\n {replyLabel || t.CommentReplyBtn}\r\n \r\n }\r\n \r\n );\r\n }\r\n\r\n generateOrUpdateTelemetryObjects() {\r\n const { mainTelemetryObject, rating } = this.props;\r\n\r\n if (mainTelemetryObject) {\r\n const id = mainTelemetryObject.contract.content.id;\r\n const headline = (rating && getHeadlineByReactionType(rating, true));\r\n const behavior = (rating && ReactionToBehaviorTypeMap[rating]);\r\n\r\n this.telemetryObjects = {\r\n likeButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...reactionPanelTelemetryContracts.likeButton}, { id }, this.telemetryObjects && this.telemetryObjects.likeButton),\r\n activeReactionButton: !rating && this.telemetryObjects ? this.telemetryObjects.activeReactionButton : addOrUpdateTelemetryObject(mainTelemetryObject, {...reactionPanelTelemetryContracts.likeButton, behavior}, { id, headline }, this.telemetryObjects && this.telemetryObjects.activeReactionButton)\r\n };\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Comment, Content, User } from \"@msnews/social-data-service\";\r\nimport { CommentConnector, ComponentConnector, FollowInfo, PopupConnector, UsersConnector } from \"../../Social.props\";\r\nimport { chevron_down, chevron_up } from \"../../utils/icons\";\r\n\r\nimport CommentBox from \"../comment-box/CommentBox\";\r\nimport CommentItem from \"../comment-item/CommentItem\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nexport interface ReplyListProps {\r\n componentConnector: ComponentConnector;\r\n id: string;\r\n parentId: string;\r\n user: User;\r\n commentItemType: string;\r\n replies: Array;\r\n replyCount: number;\r\n repliesHasPrevious: boolean;\r\n repliesHasMore: boolean;\r\n commentConnector: CommentConnector;\r\n managedClasses?: SocialClassNameContract;\r\n contentDisabled: boolean;\r\n me: User;\r\n usersConnector: UsersConnector;\r\n popupConnector: PopupConnector;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n t: SocialLocalizedStrings;\r\n hideReplyBox: () => void;\r\n showReplyBox: boolean;\r\n market: string;\r\n content: Content;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n theme: string;\r\n responsiveClass: string;\r\n specificCommentId?: string;\r\n}\r\n\r\nexport default class ReplyList extends React.Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.submitCommentAndUpdateState = this.submitCommentAndUpdateState.bind(this);\r\n }\r\n\r\n showReplies(e) {\r\n const top = 10;\r\n const skip = this.props.replies.filter($i => !$i.addedOffline).length || 0;\r\n const showMoreReplies = this.props.commentConnector.showMoreReplies;\r\n\r\n if (!showMoreReplies) { return console.warn(\"Props missing 'commentConnector.showMoreReplies'\"); }\r\n showMoreReplies(this.props.content.id, this.props.id, top, skip, \"Time asc\");\r\n }\r\n\r\n async submitCommentAndUpdateState(value) {\r\n const rootParentCommentId = this.props.parentId || this.props.id;\r\n const submitComment = this.props.commentConnector.submitComment;\r\n\r\n if (!submitComment) { return console.warn(\"Missing props 'commentConnector.submitComment'\"); }\r\n const comment = await submitComment(this.props.content, value, rootParentCommentId, this.props.parentId ? this.props.id : undefined);\r\n\r\n if (comment && !comment.errorCode) {\r\n this.props.hideReplyBox();\r\n }\r\n\r\n return comment;\r\n }\r\n\r\n render() {\r\n const { componentConnector, responsiveClass, contentDisabled, me, t, managedClasses, commentConnector, replies, replyCount, repliesHasPrevious, repliesHasMore, commentItemType: parentType, user: parentUser, usersConnector, popupConnector, users, market, content, mainTelemetryObject, theme, id, specificCommentId } = this.props;\r\n const moreReplyCount = replyCount - (replies ? replies.filter($i => !$i.addedOffline).length : 0);\r\n const submitCommentAndUpdateState = this.submitCommentAndUpdateState.bind(this);\r\n const broadcastAsTyping = this.props.commentConnector.broadcastAsTyping;\r\n const commentItemType=\"Reply\";\r\n const commentBoxType=\"Reply\";\r\n const specificCommentMode = !!specificCommentId;\r\n return (\r\n
\r\n {this.props.showReplyBox &&\r\n \r\n }\r\n\r\n {specificCommentMode && replies && repliesHasPrevious &&\r\n commentConnector.loadPreviousComments(content.id, replies[0].id, id)}\r\n >\r\n {chevron_up}\r\n {t.SpecificCommentModeSeePreviousRepliesTxt}\r\n \r\n }\r\n
    \r\n {replies && replies.map((item, index) =>\r\n \r\n )}\r\n
\r\n {specificCommentMode && replies && repliesHasMore &&\r\n commentConnector.loadMoreComments(content.id, replies[replies.length-1].id, id)}\r\n >\r\n {chevron_down}\r\n {t.SpecificCommentModeSeeMoreRepliesTxt}\r\n \r\n }\r\n {((specificCommentMode && replies.length === 0 && moreReplyCount > 0) || (!specificCommentMode && moreReplyCount > 0)) &&\r\n this.showReplies(e)}>\r\n {chevron_down}\r\n \r\n { moreReplyCount < 2 ?\r\n t.SeeMoreRepliesTxt.replace(\"{#}\", `${moreReplyCount}`) :\r\n t.SeeMoreRepliesPluralTxt.replace(\"{#}\", `${moreReplyCount}`)\r\n }\r\n \r\n \r\n }\r\n
\r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface ReportMenuTelemetryObjects {\r\n reportItems: TelemetryObjectBase[];\r\n reportMenu: TelemetryObjectBase;\r\n}\r\n\r\nexport const reportMenuTelemetryContracts = {\r\n /**\r\n * Comments-Scenario-10b\r\n * headline: dynamically set for each report reason\r\n * */\r\n reportItem: {\r\n name: \"Report\",\r\n behavior: TelemetryBehaviorType.Report,\r\n content: { type: TelemetryContentType.Comment }\r\n },\r\n /** Comments-Scenario-10ai */\r\n reportMenu: {\r\n name: \"ReportedReason\",\r\n content: { type: TelemetryContentType.Comment }\r\n }\r\n};\r\n\r\nexport const reportMenuTelemetryActionDispatchers = {\r\n reportItemClick: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport Popover, { PopoverProps } from \"../popover/Popover\";\r\nimport { PopupConnector, UsersConnector } from \"../../Social.props\";\r\nimport { ReportMenuTelemetryObjects, reportMenuTelemetryActionDispatchers, reportMenuTelemetryContracts } from \"./ReportMenu.telemetry\";\r\nimport { SocialService, User } from \"@msnews/social-data-service\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\n\r\nimport AccessibilityHelpers from \"../../utils/AccessibilityHelpers\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\n\r\nexport interface ReportMenuProps extends PopoverProps {\r\n managedClasses?: SocialClassNameContract;\r\n onReport?: (key: string, e: any) => void;\r\n t: SocialLocalizedStrings;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n theme?: string;\r\n popupConnector?: PopupConnector;\r\n usersConnector?: UsersConnector;\r\n id?: string;\r\n renderInPopover?: boolean;\r\n me?: User;\r\n}\r\n\r\nexport default class ReportMenu extends React.Component {\r\n telemetryObjects: ReportMenuTelemetryObjects;\r\n containerRef: HTMLUListElement;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.containerRef = null;\r\n }\r\n\r\n componentDidMount() {\r\n AccessibilityHelpers.attachAccessibilityListeners(document);\r\n\r\n if (!this.props.me) { this.props.usersConnector.fetchMe(); }\r\n }\r\n\r\n render() {\r\n if (!this.props.me) { return null; }\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n reportItems: (this.telemetryObjects && this.telemetryObjects.reportItems) || [],\r\n reportMenu: addOrUpdateTelemetryObject(this.props.mainTelemetryObject, reportMenuTelemetryContracts.reportMenu, { id: this.props.id || \"\"}, this.telemetryObjects && this.telemetryObjects.reportMenu)\r\n };\r\n\r\n return this.props.renderInPopover ? this.renderDefault() : this.renderMobile();\r\n }\r\n\r\n renderDefault() {\r\n return (\r\n \r\n
    { this.containerRef = el; })}\r\n >\r\n {this.renderReportItems()}\r\n
\r\n
\r\n );\r\n }\r\n\r\n renderMobile() {\r\n return (\r\n
    { this.containerRef = el; })}\r\n >\r\n \r\n { this.props.t.CommentReportText }\r\n \r\n {this.renderReportItems()}\r\n
\r\n );\r\n }\r\n\r\n renderReportItems() {\r\n return Object.keys(enums.commentReportMap).map(key => {\r\n if (this.telemetryObjects.reportItems) {\r\n this.telemetryObjects.reportItems[key] = addOrUpdateTelemetryObject(this.telemetryObjects.reportMenu, {...reportMenuTelemetryContracts.reportItem}, { id: this.props.id, headline: key }, this.telemetryObjects.reportItems[key]);\r\n }\r\n\r\n return
  • this.reportHandler(key, e) } onKeyDown={(e) => { this.handleKeyDown(e); }} {...renderHybrid(this.telemetryObjects && this.telemetryObjects.reportItems && this.telemetryObjects.reportItems[key], false)}>\r\n {this.props.t[enums.commentReportMap[key]]}\r\n
  • ;\r\n });\r\n }\r\n\r\n reportHandler(reportType, e) {\r\n reportMenuTelemetryActionDispatchers.reportItemClick(e.currentTarget, this.telemetryObjects && this.telemetryObjects.reportItems && this.telemetryObjects.reportItems[reportType]);\r\n const reportValue = enums.commentReportMap[reportType];\r\n if (reportValue == enums.commentReportMap.Copyright) {\r\n this.props.popupConnector.closePopup({disableBridge: true});\r\n if (this.props.me.state == enums.userStateType.anonymous) {\r\n this.props.popupConnector.openPopup(\"multiLoginPage\");\r\n } else {\r\n this.props.popupConnector.openPopup(\r\n reportValue == enums.commentReportMap.Copyright ? \"copyrightform\" : \"\",\r\n {id: this.props.id, fullScreen: false, onReport: this.props.onReport});\r\n }\r\n } else {\r\n SocialService.reportComment(this.props.id, reportType);\r\n this.props.onReport && this.props.onReport(reportType, e);\r\n this.props.popupConnector.closePopup();\r\n }\r\n }\r\n\r\n handleKeyDown(e) {\r\n if (e.keyCode == 27) { /* ESC key */\r\n const ref = window.document.getElementById(`reportMenu_${this.props.id}`);\r\n if (ref) {\r\n window.setTimeout(()=> { ref.focus(); }, 50);\r\n }\r\n e.stopPropagation();\r\n e.preventDefault();\r\n } else if (e.keyCode == 38) { /* Up arrow */\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const prev = e.target.previousElementSibling;\r\n if (prev) {\r\n prev.focus();\r\n } else {\r\n e.target.parentElement.lastElementChild.focus();\r\n }\r\n } else if (e.keyCode == 40) { /* Down arrow */\r\n const next = e.target.nextElementSibling;\r\n if (next) {\r\n next.focus();\r\n } else {\r\n e.target.parentElement.firstElementChild.focus();\r\n }\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\nexport default function getAgoText(dateTimeStr) {\r\n const monthNames = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\r\n let shortMonthStr;\r\n\r\n const date = new Date(dateTimeStr);\r\n const nowTs = new Date().getTime();\r\n const seconds = Math.floor((nowTs-date.getTime())/1000);\r\n\r\n if (seconds < 30) {\r\n return \"Just now\";\r\n }\r\n\r\n try {\r\n shortMonthStr = date.toLocaleString(\"default\", { month: \"short\" });\r\n } catch (e) {\r\n shortMonthStr = monthNames[date.getMonth()-1];\r\n }\r\n\r\n if (seconds > 604800*52) { // 1 year\r\n return `${shortMonthStr} ${date.getDate()}, ${date.getFullYear()}`;\r\n }\r\n if (seconds > 604800) { // 1 week\r\n return `${shortMonthStr} ${date.getDate()}`;\r\n }\r\n if (seconds > 86400) { // 1 day\r\n return `${Math.floor(seconds/(86400))}d`;\r\n }\r\n if (seconds > 3600) { // 1 hour\r\n return `${Math.floor(seconds/3600)}h`;\r\n }\r\n if (seconds >= 60) { // 1 min\r\n return `${Math.floor(seconds/60)}m`;\r\n }\r\n\r\n return `${seconds}s`;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Comment, Content, User } from \"@msnews/social-data-service\";\r\nimport { CommentConnector, ComponentConnector, FollowInfo, PopupConnector, UsersConnector } from \"../../Social.props\";\r\nimport { CommentItemTelemetryObjects, commentItemTelemetryActionDispatchers, commentItemTelemetryContracts } from \"./CommentItem.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\nimport { chevron_down, exclamation_round, flag, shield, trash } from \"../../utils/icons\";\r\nimport { hasThemeBase, isComponentDisabled } from \"../../utils/themeHelpers\";\r\n\r\nimport DeleteMenu from \"../../common/delete-menu/DeleteMenu\";\r\nimport DisabledMessage from \"../disabled-message/DisabledMessage\";\r\nimport MostReactions from \"../../common/most-reactions/MostReactions\";\r\nimport React from \"react\";\r\nimport ReactionPanel from \"../../common/reaction-panel/ReactionPanel\";\r\nimport ReplyList from \"../reply-list/ReplyList\";\r\nimport ReportMenu from \"../../common/report-menu/ReportMenu\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport UserCard from \"../user-card/UserCard\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport {enums} from \"../../utils/enums\";\r\nimport getAgoText from \"../../utils/getAgoText\";\r\nimport openGuidelinePage from \"../../utils/openGuidelinePage\";\r\nimport openProfilePage from \"../../utils/openProfilePage\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\n\r\nconst minFooterSingleLineWidth = 375;\r\n\r\nexport interface CommentItemProps {\r\n componentConnector: ComponentConnector;\r\n commentConnector: CommentConnector;\r\n item: Comment;\r\n contentDisabled: boolean,\r\n me: User,\r\n t: SocialLocalizedStrings;\r\n managedClasses?: SocialClassNameContract;\r\n commentItemType: string,\r\n usersConnector: UsersConnector;\r\n popupConnector: PopupConnector;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n market: string;\r\n content: Content;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n theme: string;\r\n responsiveClass: string;\r\n isBlury?: boolean;\r\n commentDisplayType?: string;\r\n specificCommentId?: string;\r\n}\r\n\r\ninterface CommentItemState {\r\n reportMenuVisible: boolean;\r\n deleteMenuVisible: boolean;\r\n selectedReportType: string;\r\n showReplyBox: boolean;\r\n reactionMenuVisible: boolean;\r\n userCardVisible: boolean;\r\n userCardUserId: string;\r\n nowDeleted: boolean;\r\n messageTruncated: boolean;\r\n isHoverUserCard: boolean;\r\n shouldFooterRenderTwoLines: boolean;\r\n mentionUserCardVisible: boolean;\r\n}\r\n\r\nclass CommentItem extends React.Component {\r\n\r\n ref: HTMLLIElement;\r\n messageRef: React.RefObject;\r\n telemetryObjects: CommentItemTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n reportMenuVisible: false,\r\n deleteMenuVisible: false,\r\n selectedReportType: null,\r\n showReplyBox: false,\r\n reactionMenuVisible: false,\r\n userCardVisible: false,\r\n userCardUserId: \"\",\r\n nowDeleted: false,\r\n messageTruncated: null,\r\n isHoverUserCard: false,\r\n shouldFooterRenderTwoLines: false,\r\n mentionUserCardVisible: false\r\n };\r\n\r\n this.hideReplyBox = this.hideReplyBox.bind(this);\r\n this.ref = null;\r\n this.messageRef = React.createRef();\r\n this.telemetryObjects = null;\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.item.mentionUser && !(this.props.users && this.props.users[this.props.item.mentionUser])) {\r\n this.props.usersConnector.fetchUser(this.props.item.mentionUser);\r\n }\r\n if (this.props.item.addedOffline && this.props.commentItemType == \"Reply\" && this.ref) {\r\n this.ref.scrollIntoView({\r\n behavior: \"smooth\",\r\n block: \"end\"\r\n });\r\n }\r\n\r\n this.checkMessageTruncated();\r\n this.checkContainerWidth();\r\n }\r\n\r\n componentDidUpdate() {\r\n this.checkMessageTruncated();\r\n this.checkContainerWidth();\r\n }\r\n\r\n checkMessageTruncated() {\r\n /** Check if message is truncated by webkit clamp */\r\n if (this.messageRef && this.messageRef.current && this.state.messageTruncated == null) {\r\n this.messageRef.current.scrollHeight > this.messageRef.current.clientHeight + 10\r\n ? this.setState({messageTruncated: true})\r\n : this.setState({messageTruncated: false});\r\n }\r\n }\r\n\r\n /* REPORT */\r\n showReportMenu(e) {\r\n const { theme, popupConnector, item } = this.props;\r\n const isMobile = this.props.responsiveClass.includes(enums.responsiveLevels.L1);\r\n const isEmbeded = isComponentDisabled(theme, \"reportmenu\");\r\n if (isEmbeded || isMobile) {\r\n popupConnector.openPopup(\"reportmenu\", { id: item.id });\r\n } else {\r\n this.setState({\r\n reportMenuVisible: true\r\n });\r\n }\r\n\r\n commentItemTelemetryActionDispatchers.genericClick(e.currentTarget, this.telemetryObjects && this.telemetryObjects.reportButton);\r\n }\r\n\r\n showDeleteMenu(e) {\r\n this.setState({\r\n deleteMenuVisible: true\r\n });\r\n\r\n commentItemTelemetryActionDispatchers.genericClick(e.currentTarget, this.telemetryObjects && this.telemetryObjects.deleteButton);\r\n }\r\n\r\n reportHandler(reportType, e) {\r\n this.setState({\r\n reportMenuVisible: false,\r\n selectedReportType: reportType\r\n });\r\n }\r\n\r\n /* REPLY-BOX */\r\n showReplyBox(target?) {\r\n this.setState({\r\n showReplyBox: true\r\n });\r\n }\r\n\r\n hideReplyBox() {\r\n this.setState({\r\n showReplyBox: false\r\n });\r\n }\r\n\r\n replyButtonClickHandler() {\r\n if (this.state.showReplyBox) {\r\n this.hideReplyBox();\r\n } else {\r\n this.showReplyBox();\r\n }\r\n }\r\n\r\n /* REACTION */\r\n reactionHandler(type) {\r\n const sendCommentReaction = this.props.commentConnector.sendCommentReaction;\r\n\r\n const reset = this.props.item && this.props.item.rating == type;\r\n sendCommentReaction(this.props.item, type, reset);\r\n }\r\n\r\n onReactionsClick(e) {\r\n commentItemTelemetryActionDispatchers.genericClick(e.currentTarget, this.telemetryObjects && this.telemetryObjects.reactionsCount);\r\n this.props.popupConnector.openPopup(\"reactionBreakdownComment\", {id: this.props.item.id, parentTelemetryObject: this.telemetryObjects && this.telemetryObjects.reactionBreakdown});\r\n }\r\n\r\n showUserCard(e, userId, isVisible=true, isHoverUserCard=true) {\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n if (isSuperApp) {\r\n return;\r\n }\r\n this.setState({userCardVisible: isVisible, userCardUserId: userId, isHoverUserCard: isHoverUserCard, mentionUserCardVisible: false});\r\n }\r\n\r\n showMentionUserCard(e, userId, isHoverUserCard=true) {\r\n this.setState({mentionUserCardVisible: true, userCardUserId: userId, isHoverUserCard: isHoverUserCard, userCardVisible: false});\r\n }\r\n\r\n userCardOnHide() {\r\n this.setState({userCardVisible: false, mentionUserCardVisible: false, isHoverUserCard: false});\r\n }\r\n\r\n deleteCommentHandler(e, commentId, parentId, userId) {\r\n this.setState({\r\n reportMenuVisible: false,\r\n nowDeleted: true\r\n });\r\n this.props.commentConnector.deleteComment(commentId, parentId, userId);\r\n }\r\n\r\n render() {\r\n const { id, parentId, replyCount, repliesHasPrevious, repliesHasMore, user, createDatetime, isHidden, isInReview, isDeleted, text, visibleStatus, rating, replies, mentionUser, addedOffline } = this.props.item;\r\n const { isBlury, componentConnector, responsiveClass, contentDisabled, me, t, managedClasses, commentItemType, commentConnector, usersConnector, popupConnector, users, market, content, mainTelemetryObject, theme, specificCommentId } = this.props;\r\n const {reportMenuVisible, selectedReportType, nowDeleted, messageTruncated, deleteMenuVisible, shouldFooterRenderTwoLines} = this.state;\r\n const isReply = parentId && parentId.length > 0;\r\n const hideReplyBox = this.hideReplyBox;\r\n const showAvatar = !selectedReportType && !isHidden;\r\n const showReplyBox = this.state.showReplyBox;\r\n const userCardVisible = me && !me.isBanned && !isHidden && !isDeleted;\r\n const reactionAllowed = me && !me.isBanned && !isHidden;\r\n const isSpecificComment = id === specificCommentId;\r\n\r\n if (!user) {\r\n return null;\r\n }\r\n\r\n if (mainTelemetryObject) {\r\n let commentItemContract;\r\n if (isDeleted) {\r\n commentItemContract = commentItemTelemetryContracts.deletedCommentItem;\r\n } else if (addedOffline) {\r\n commentItemContract = {...commentItemTelemetryContracts.commentItem, name: \"CommentPosted\"};\r\n } else {\r\n commentItemContract = commentItemTelemetryContracts.commentItem;\r\n }\r\n this.telemetryObjects = {\r\n commentItem: addOrUpdateTelemetryObject(mainTelemetryObject, commentItemContract, { id }, this.telemetryObjects && this.telemetryObjects.commentItem),\r\n deleteButton: addOrUpdateTelemetryObject(mainTelemetryObject, commentItemTelemetryContracts.deleteButton, { id }, this.telemetryObjects && this.telemetryObjects.deleteButton),\r\n reportButton: addOrUpdateTelemetryObject(mainTelemetryObject, commentItemTelemetryContracts.reportButton, { id }, this.telemetryObjects && this.telemetryObjects.reportButton),\r\n reactionsCount: addOrUpdateTelemetryObject(mainTelemetryObject, commentItemTelemetryContracts.reactionsCount, { id }, this.telemetryObjects && this.telemetryObjects.reactionsCount),\r\n reactionBreakdown: addOrUpdateTelemetryObject(mainTelemetryObject, commentItemTelemetryContracts.reactionBreakdown, { id }, this.telemetryObjects && this.telemetryObjects.reactionBreakdown)\r\n };\r\n }\r\n\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n\r\n /* SUB ELEMENTS */\r\n let commentBody; // message\r\n if (isDeleted || nowDeleted) {\r\n commentBody = \r\n {t[enums.visibleStatusMap[visibleStatus] || enums.visibleStatusMap.Default]}\r\n {exclamation_round}\r\n ;\r\n } else {\r\n commentBody =\r\n \r\n {mentionUser &&\r\n \r\n this.showMentionUserCard(e, mentionUser)}\r\n {...openProfilePage(componentConnector, theme, mentionUser, market, \"_blank\")}\r\n >{users && users[mentionUser] && users[mentionUser].data && users[mentionUser].data.name}\r\n  \r\n {this.state.mentionUserCardVisible &&\r\n this.userCardOnHide(),\r\n triggerRef: { current: this.ref } as React.RefObject,\r\n isHover: this.state.isHoverUserCard,\r\n mainTelemetryObject\r\n }}\r\n />\r\n }\r\n \r\n }\r\n
    \r\n ;\r\n }\r\n\r\n const isSelf = me && user && me.id == user.id;\r\n const avatarUrl = showAvatar && user.avatarStatus == enums.userAvatarStatusType.normal && user.avatarUrl || placeholderImages.avatar;\r\n\r\n let innerContent; // disabled message OR header, body, footer\r\n if (isInReview) { // IN REVIEW\r\n innerContent = ;\r\n } else if (selectedReportType) { // REPORTED\r\n const reportedCommentItemTelemetryObject = addOrUpdateTelemetryObject(mainTelemetryObject, commentItemTelemetryContracts.reportedCommentItem, { id });\r\n innerContent = ;\r\n } else if (nowDeleted) { // REPORTED\r\n innerContent = ;\r\n } else {\r\n innerContent = \r\n
    \r\n
    \r\n {isHidden\r\n ? {t.CommentItemDeletedUserName}\r\n : this.showUserCard(e, user.id, userCardVisible)}\r\n {...openProfilePage(componentConnector, theme, user.id, market, \"_blank\")}\r\n >{user.name}\r\n { !isSuperApp &&\r\n this.showUserCard(e, user.id, userCardVisible, false)}> {chevron_down} \r\n }\r\n \r\n }\r\n {getAgoText(createDatetime)}\r\n
    \r\n
    \r\n {this.state.userCardVisible &&\r\n this.userCardOnHide(),\r\n triggerRef: { current: this.ref } as React.RefObject,\r\n isHover: this.state.isHoverUserCard,\r\n mainTelemetryObject\r\n }}\r\n />\r\n }\r\n\r\n
    \r\n
    {commentBody}
    \r\n { messageTruncated && !isBlury && }\r\n
    \r\n\r\n {!isHidden && !isBlury &&\r\n
    \r\n
    \r\n {isHidden && (\r\n \r\n {shield}\r\n {t.CommentReactionDisabledMsg}\r\n \r\n )}\r\n\r\n {shouldFooterRenderTwoLines ? (\r\n \r\n {this.renderReactionsCount(false)}\r\n
    \r\n {this.renderReactionPanel({ reactionAllowed, contentDisabled, t, rating, managedClasses, responsiveClass })}\r\n
    \r\n ) : (\r\n \r\n {this.renderReactionPanel({ reactionAllowed, contentDisabled, t, rating, managedClasses, responsiveClass })}\r\n {this.renderReactionsCount(true)}\r\n \r\n )}\r\n\r\n {!isSelf ? (\r\n \r\n this.showReportMenu(e)}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.reportButton, false)}\r\n >\r\n {flag}\r\n {t.CommentReportText}\r\n {reportMenuVisible && (\r\n this.setState({ reportMenuVisible: false })}\r\n {...{\r\n t,\r\n managedClasses,\r\n id,\r\n me,\r\n visible: reportMenuVisible,\r\n mainTelemetryObject: this.telemetryObjects && this.telemetryObjects.commentItem,\r\n theme: theme,\r\n popupConnector: this.props.popupConnector,\r\n usersConnector: this.props.usersConnector,\r\n responsiveClass: this.props.responsiveClass,\r\n renderInPopover: true\r\n }}\r\n />\r\n )}\r\n \r\n \r\n ) : (\r\n \r\n this.showDeleteMenu(e)}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.deleteButton, false)}\r\n >\r\n {trash}\r\n {t.CommentDeleteText}\r\n \r\n {deleteMenuVisible && (\r\n this.deleteCommentHandler(e, id, parentId, user.id)}\r\n onHide={() => this.setState({ deleteMenuVisible: false })}\r\n {...{\r\n id,\r\n t,\r\n managedClasses,\r\n className: managedClasses.commentItemDeleteMenuPopover,\r\n visible: deleteMenuVisible,\r\n mainTelemetryObject: this.telemetryObjects && this.telemetryObjects.commentItem\r\n }}\r\n />\r\n )}\r\n \r\n\r\n )}\r\n
    \r\n
    \r\n }\r\n\r\n
    ;\r\n }\r\n\r\n const replyList = ;\r\n const userAvatar = { avatarFallback(e); }}\r\n width=\"40\" height=\"40\"\r\n />;\r\n return (\r\n
  • { this.ref = el; })}>\r\n
    \r\n {showAvatar ? this.showUserCard(e, user.id, userCardVisible)}\r\n {...openProfilePage(componentConnector, theme, user.id, market, \"_blank\")}\r\n >\r\n {userAvatar}\r\n : userAvatar}\r\n\r\n
    \r\n {innerContent}\r\n {!isReply && !isBlury ? replyList : \"\"}\r\n
    \r\n {isReply && !isBlury ? replyList : \"\"}\r\n
    \r\n
  • \r\n );\r\n }\r\n\r\n checkContainerWidth() {\r\n const dist = this.ref && this.ref && this.ref.offsetWidth - minFooterSingleLineWidth;\r\n if (dist > 5 && this.state.shouldFooterRenderTwoLines) {\r\n this.setState({\r\n shouldFooterRenderTwoLines: false\r\n });\r\n } else if (dist < -5 && !this.state.shouldFooterRenderTwoLines) {\r\n this.setState({\r\n shouldFooterRenderTwoLines: true\r\n });\r\n }\r\n }\r\n\r\n renderReactionPanel(renderReactionPanelParams) {\r\n const { reactionAllowed, contentDisabled, t, rating, managedClasses, responsiveClass } = renderReactionPanelParams;\r\n return reactionAllowed && !contentDisabled && (\r\n \r\n );\r\n }\r\n\r\n renderReactionsCount(showSeperator) {\r\n const { item: { reactionCounts }, t, managedClasses, theme } = this.props;\r\n\r\n return this.onReactionsClick(e)}\r\n hasSeperatorBefore={showSeperator}\r\n telemetryObject={this.telemetryObjects && this.telemetryObjects.reactionsCount}\r\n {...{ reactionCounts, t, managedClasses, theme}}\r\n />;\r\n }\r\n}\r\nexport default CommentItem;\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryType } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface SortBoxTelemetryObjects {\r\n sortItems: any;\r\n}\r\n\r\nexport const sortBoxTelemetryContracts = {\r\n /** Scenario 1 from ProfileComments\r\n * id: traceId || commentId\r\n * type: Profile or Comment comes from parent\r\n */\r\n sortItem: {\r\n name: \"Sort\",\r\n behavior: TelemetryBehaviorType.Sort\r\n }\r\n};\r\n\r\nexport const sortBoxTelemetryActionDispatchers = {\r\n /** Used for: Scenario 3a and Scenario 4a */\r\n genericClicked: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { SortBoxTelemetryObjects, sortBoxTelemetryActionDispatchers, sortBoxTelemetryContracts } from \"./SortBox.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\nimport { chevron_down, tick } from \"../../utils/icons\";\r\n\r\nimport AccessibilityHelpers from \"../../utils/AccessibilityHelpers\";\r\nimport Popover from \"../popover/Popover\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nexport interface SortBoxProps {\r\n id: string;\r\n onChange: (sortType: string) => void;\r\n managedClasses?: SocialClassNameContract;\r\n t: SocialLocalizedStrings;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n selectedSortType: string;\r\n sortTypes: object;\r\n dontShowLabel?: boolean;\r\n}\r\n\r\ninterface SortBoxState {\r\n listVisible: boolean\r\n}\r\n\r\nexport default class SortBox extends React.Component {\r\n sortMenuTriggerRef: React.RefObject;\r\n sortMenuListItemRef: HTMLLIElement;\r\n telemetryObjects: SortBoxTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n listVisible: false\r\n };\r\n\r\n this.sortMenuTriggerRef = React.createRef();\r\n this.sortMenuListItemRef = null;\r\n this.telemetryObjects = {\r\n sortItems: []\r\n };\r\n }\r\n\r\n onLinkClick(e) {\r\n this.setState({\r\n listVisible: true\r\n });\r\n }\r\n\r\n changeSortHandler(e, type) {\r\n\r\n this.props.onChange(type);\r\n this.setState({\r\n listVisible: false\r\n });\r\n\r\n sortBoxTelemetryActionDispatchers.genericClicked(e.currentTarget, this.telemetryObjects && this.telemetryObjects.sortItems && this.telemetryObjects.sortItems[type]);\r\n const ref = window.document.getElementById(`sortMenu_${this.props.id}`);\r\n if (ref) {\r\n window.setTimeout(() => { ref.focus(); }, 50);\r\n }\r\n }\r\n\r\n handleKeyDown(e) {\r\n if (e.keyCode == 27) { /* ESC key */\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const ref = window.document.getElementById(`sortMenu_${this.props.id}`);\r\n if (ref) {\r\n window.setTimeout(() => { ref.focus(); }, 50);\r\n }\r\n } else if (e.keyCode == 38) { /* Up arrow */\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const prev = e.target.previousElementSibling;\r\n if (prev) {\r\n prev.focus();\r\n } else {\r\n e.target.parentElement.lastElementChild.focus();\r\n }\r\n } else if (e.keyCode == 40) { /* Down arrow */\r\n const next = e.target.nextElementSibling;\r\n if (next) {\r\n next.focus();\r\n } else {\r\n e.target.parentElement.firstElementChild.focus();\r\n }\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n AccessibilityHelpers.attachAccessibilityListeners(document);\r\n }\r\n\r\n render() {\r\n const { id, t, managedClasses, mainTelemetryObject, selectedSortType, sortTypes, dontShowLabel } = this.props;\r\n const { listVisible } = this.state;\r\n\r\n return (\r\n
    \r\n {!dontShowLabel && t.CommentSortByTxt + \":\"}\r\n {listVisible &&\r\n this.setState({listVisible: false}),\r\n className: managedClasses.sortBoxPopover,\r\n managedClasses: managedClasses,\r\n hasFocusLock: true\r\n }}\r\n >\r\n
      \r\n {Object.keys(sortTypes).map((type, index) => {\r\n\r\n if (mainTelemetryObject) {\r\n this.telemetryObjects.sortItems[type] = addOrUpdateTelemetryObject(mainTelemetryObject, sortBoxTelemetryContracts.sortItem, { id: mainTelemetryObject.contract.content.id, headline: type, type: mainTelemetryObject.contract.content.type }, this.telemetryObjects && this.telemetryObjects.sortItems[type]);\r\n }\r\n return this.changeSortHandler(e, type)}\r\n onKeyDown={(e) => this.handleKeyDown(e)}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.sortItems && this.telemetryObjects.sortItems[type], false, (el) => { (index==0) && (this.sortMenuListItemRef = el); })}\r\n >\r\n \r\n {t[sortTypes[type]]}\r\n {type == selectedSortType && tick}\r\n \r\n ;\r\n }\r\n )}\r\n
    \r\n \r\n }\r\n
    \r\n \r\n {t[sortTypes[selectedSortType]]}\r\n {chevron_down}\r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { CommentConnector, ComponentConnector, FollowInfo, PopupConnector, UsersConnector } from \"../../Social.props\";\r\nimport { CommentListTelemetryObjects, commentListTelemetryContracts } from \"./CommentList.telemetry\";\r\nimport { Comments, Content, User } from \"@msnews/social-data-service\";\r\nimport { chevron_down, chevron_up } from \"../../utils/icons\";\r\n\r\nimport CommentBox from \"../comment-box/CommentBox\";\r\nimport CommentItem from \"../comment-item/CommentItem\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport SortBox from \"../../common/sort-box/SortBox\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { addOrUpdateTelemetryObject } from \"../../Social.telemetry\";\r\n\r\nexport interface CommentListProps {\r\n componentConnector: ComponentConnector;\r\n comments: Comments;\r\n totalCommentCount: number;\r\n commentConnector: CommentConnector;\r\n contentId: string;\r\n managedClasses?: SocialClassNameContract;\r\n contentDisabled: boolean;\r\n me: User;\r\n usersConnector: UsersConnector;\r\n popupConnector: PopupConnector;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n t: SocialLocalizedStrings;\r\n market: string;\r\n content: Content;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n theme: string;\r\n responsiveClass: string;\r\n isExpanded: boolean;\r\n commentDisplayType?: string;\r\n onCommentBoxInitialized?: (commentBox: HTMLDivElement) => void;\r\n specificCommentId?: string;\r\n}\r\n\r\ninterface CommentListState {\r\n sortType: string;\r\n showMoreClicked: boolean;\r\n}\r\n\r\nexport default class CommentList extends React.Component {\r\n telemetryObjects: CommentListTelemetryObjects;\r\n static sortTypes = {\r\n Rating: \"CommentSortByTopResponseTxt\",\r\n Time: \"CommentSortByNewestTxt\",\r\n \"Time asc\": \"CommentSortByOldestTxt\"\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n showMoreClicked: false,\r\n sortType: this.props.specificCommentId ? \"Time\" : \"Rating\"\r\n };\r\n\r\n this.submitCommentAndUpdateState = this.submitCommentAndUpdateState.bind(this);\r\n }\r\n\r\n showMoreClicked(e) {\r\n this.setState({\r\n showMoreClicked: true\r\n });\r\n const top = 10;\r\n const skip = this.props.comments.skip + this.props.comments.top;\r\n\r\n const showMoreComments = this.props.commentConnector.showMoreComments;\r\n if (!showMoreComments) { return console.warn(\"Missing props 'showMoreComments'\"); }\r\n\r\n showMoreComments(this.props.contentId, top, skip, this.state.sortType);\r\n }\r\n\r\n getSortedComments(sortType) {\r\n\r\n this.setState({\r\n showMoreClicked: false,\r\n sortType: sortType\r\n });\r\n const top = 2;\r\n const onSortTypeChanged = this.props.commentConnector.onSortTypeChanged;\r\n\r\n if (!onSortTypeChanged) { return console.warn(\"Missing props 'commentConnector.onSortTypeChanged\"); }\r\n onSortTypeChanged(this.props.contentId, top, sortType);\r\n }\r\n\r\n async submitCommentAndUpdateState(value) {\r\n return await this.props.commentConnector.submitComment(this.props.content, value);\r\n }\r\n\r\n render() {\r\n return this.props.isExpanded ? this.renderFull() : this.renderMinimal();\r\n }\r\n\r\n renderMinimal() {\r\n const { comments, managedClasses, mainTelemetryObject, content } = this.props;\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n mainItem: addOrUpdateTelemetryObject(mainTelemetryObject, {...commentListTelemetryContracts.mainItem}, {id: content && content.cmsId}, this.telemetryObjects && this.telemetryObjects.mainItem)\r\n };\r\n\r\n return (\r\n
      \r\n {comments && comments.list && this.renderCommentItem(comments.list[0], true)}\r\n
    \r\n );\r\n }\r\n\r\n renderFull() {\r\n const { onCommentBoxInitialized, componentConnector, comments, contentDisabled, me, t, managedClasses, usersConnector, popupConnector,\r\n users, market, totalCommentCount, content, mainTelemetryObject, theme, contentId, commentConnector } = this.props;\r\n const moreCommentCount = comments && comments.moreCount;\r\n const submitCommentAndUpdateState = this.submitCommentAndUpdateState.bind(this);\r\n const commentBoxType=\"Comment\";\r\n const isFirstCommenter = totalCommentCount < 1;\r\n const renderCommentSortList = comments && comments.list && comments.list.length > 0;\r\n const broadcastAsTyping = this.props.commentConnector.broadcastAsTyping;\r\n const specificCommentMode = !!this.props.specificCommentId;\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n mainItem: addOrUpdateTelemetryObject(mainTelemetryObject, commentListTelemetryContracts.mainItem, {id: content && content.cmsId}, this.telemetryObjects && this.telemetryObjects.mainItem)\r\n };\r\n\r\n return (\r\n \r\n\r\n {!contentDisabled &&\r\n \r\n }\r\n\r\n {renderCommentSortList &&\r\n
    \r\n \r\n
    \r\n }\r\n\r\n {specificCommentMode && comments && comments.hasPrevious &&\r\n commentConnector.loadPreviousComments(contentId, comments.list[0].id) }\r\n >\r\n {chevron_up}\r\n {t.SpecificCommentModeSeePreviousCommentsTxt}\r\n \r\n }\r\n
      \r\n {comments && comments.list && comments.list.map((item) => this.renderCommentItem(item))}\r\n
    \r\n {specificCommentMode && comments && comments.hasMore &&\r\n commentConnector.loadMoreComments(contentId, comments.list[comments.list.length-1].id) }\r\n >\r\n {chevron_down}\r\n {t.SpecificCommentModeSeeMoreCommentsTxt}\r\n \r\n }\r\n\r\n {!specificCommentMode && moreCommentCount > 0 &&\r\n
    \r\n {this.state.showMoreClicked ?\r\n this.showMoreClicked(e)}>\r\n {chevron_down}\r\n \r\n { moreCommentCount < 2 ?\r\n t.SeeMoreCommentsTxt :\r\n t.SeeMoreCommentsPluralTxt\r\n }\r\n \r\n \r\n :\r\n \r\n }\r\n
    \r\n }\r\n
    \r\n );\r\n }\r\n\r\n renderCommentItem(item, isBlury?: boolean) {\r\n const { commentDisplayType, componentConnector, responsiveClass, contentDisabled, me, t, managedClasses, commentConnector, usersConnector, popupConnector, users, market, content, mainTelemetryObject, theme, specificCommentId } = this.props;\r\n const commentItemType=\"Comment\";\r\n const commentItemProps = {\r\n componentConnector,\r\n commentItemType,\r\n item,\r\n contentDisabled,\r\n me,\r\n t,\r\n managedClasses,\r\n sortType: this.state.sortType,\r\n commentConnector,\r\n usersConnector,\r\n popupConnector,\r\n users,\r\n market,\r\n content,\r\n mainTelemetryObject,\r\n theme,\r\n responsiveClass,\r\n isBlury: isBlury || false,\r\n commentDisplayType,\r\n specificCommentId\r\n };\r\n if (item.skipRender) {\r\n return null;\r\n }\r\n\r\n return ;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase, TelemetryType } from \"@msnews/telemetry-contracts\";\r\nimport { genericTelemetryClickDispatcher, getPageContentType } from \"../../Social.telemetry\";\r\n\r\nexport interface ContentPanelTelemetryObjects {\r\n guidelinesLink: TelemetryObjectBase;\r\n}\r\n\r\nexport const contentPanelTelemetryContracts = {\r\n /** Comments-Scenario-3 */\r\n guidelinesLink: {\r\n name: \"CommunityGuidelines\",\r\n behavior: TelemetryBehaviorType.Navigate,\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"CommunityGuidelines\"\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Content, TypingUpdates, User } from \"@msnews/social-data-service\";\r\nimport React from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { typing_animation } from \"../../utils/icons\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\nimport { TypingUsersClassNameContract } from \"./TypingUsers.classnames\";\r\n\r\nexport interface TypingUsersProps {\r\n me?: User,\r\n typingUpdates?: TypingUpdates;\r\n managedClasses: TypingUsersClassNameContract;\r\n updateTypers: () => void;\r\n listenForTypers: (id: string, market: string, content: Content) => void;\r\n t: SocialLocalizedStrings;\r\n content: Content;\r\n noText?: boolean;\r\n id?: string;\r\n market?: string;\r\n}\r\n\r\ninterface TypingUsersState {\r\n timer?: any;\r\n}\r\n\r\nexport class TypingUsers extends React.Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n componentDidMount() {\r\n this.props.listenForTypers(this.props.id, this.props.market, this.props.content);\r\n this.setState({timer: setInterval(this.updateTypers.bind(this), 1000)});\r\n }\r\n\r\n componentWillUnmount() {\r\n if (this.state && this.state.timer) {\r\n clearInterval(this.state.timer);\r\n }\r\n }\r\n\r\n updateTypers() {\r\n const { typingUpdates, updateTypers } = this.props;\r\n if (typingUpdates) {\r\n updateTypers();\r\n }\r\n }\r\n\r\n render() {\r\n const { me, typingUpdates, managedClasses, t, noText } = this.props;\r\n if (!typingUpdates) {\r\n return null;\r\n }\r\n\r\n const myId = me && me.id;\r\n const { displayedTypers, numTypers } = typingUpdates;\r\n\r\n if (!displayedTypers || !numTypers ||\r\n numTypers === 0 ||\r\n numTypers < displayedTypers.length ||\r\n displayedTypers.length > 3 ||\r\n (numTypers < 3 && numTypers !== displayedTypers.length)) {\r\n return null; // either there's no one typing, or we have inconsistent props passed to us\r\n } else {\r\n return (\r\n
    \r\n \r\n { !noText && }\r\n {typing_animation} \r\n
    \r\n );\r\n }\r\n }\r\n}\r\n\r\n// Create DOM elements\r\nfunction TypingUsersImages(props) {\r\n const { displayedTypers, t } = props;\r\n const className = \"cwt-typing-user-images image-count-\" + displayedTypers.length;\r\n const images = displayedTypers.map((typer, index) => );\r\n return (\r\n
    \r\n {images}\r\n
    \r\n );\r\n}\r\n\r\nfunction TypingUserImage(props) {\r\n const { displayedTyper, index, t } = props;\r\n const className = \"cwt-typing-user-image image\" + index;\r\n return (\r\n
    \r\n {t.AriaLabelsProfilePicture}{ avatarFallback(e); }}>\r\n
    \r\n );\r\n}\r\n\r\nfunction TypingUsersText(props) {\r\n const { me, displayedTypers, numTypers, t} = props;\r\n let text;\r\n if (numTypers === 1) {\r\n const user1 = typingUserName({ displayedTyper: displayedTypers[0], me, t });\r\n text = me === displayedTypers[0].id\r\n ? t.YouTypingUserInfo\r\n : String.Format(t.SingleTypingUserInfo, { user1 });\r\n\r\n } else if (numTypers === 2) {\r\n const user1 = typingUserName({ displayedTyper: displayedTypers[0], me, t });\r\n const user2 = typingUserName({ displayedTyper: displayedTypers[1], me, t });\r\n text = String.Format(t.DoubleTypingUserInfo, { user1, user2 });\r\n\r\n } else if (numTypers >= 3 && numTypers <= displayedTypers.length) {\r\n const user1 = typingUserName({ displayedTyper: displayedTypers[0], me, t });\r\n const user2 = typingUserName({ displayedTyper: displayedTypers[1], me, t });\r\n const user3 = typingUserName({ displayedTyper: displayedTypers[2], me, t });\r\n text = String.Format(t.TripleTypingUserInfo, { user1, user2, user3 });\r\n\r\n } else if (numTypers > 3) {\r\n const user1 = typingUserName({ displayedTyper: displayedTypers[1], me, t });\r\n const user2 = typingUserName({ displayedTyper: displayedTypers[2], me, t });\r\n text = String.Format(t.PeopleTypingUserInfo, { user1, user2, numberOfUsers: numTypers - 2 });\r\n }\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction typingUserName(props) {\r\n const { me, displayedTyper, t } = props;\r\n return `${me === displayedTyper.id ? t.UserPlaceHolder : displayedTyper.name}`;\r\n}\r\n\r\nconst mapStateToProps = (state: SocialState, props: TypingUsersProps) => {\r\n const content: Content = props.content;\r\n const typingUpdates: TypingUpdates = content && content.typingUpdates;\r\n const me: User = state.me;\r\n const id: string = state.id;\r\n const market: string = state.market;\r\n return {\r\n typingUpdates,\r\n me,\r\n id,\r\n market\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps)(TypingUsers);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { CommentConnector, ComponentConnector } from \"../../Social.props\";\r\nimport { ContentPanelTelemetryObjects, contentPanelTelemetryContracts } from \"./ContentPanel.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\n\r\nimport { Content } from \"@msnews/social-data-service\";\r\nimport { ContentPanelClassNameContract } from \"./ContentPanel.classnames\";\r\nimport React from \"react\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport TypingUsers from \"../typing-users/TypingUsers\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { getExternalURL } from \"../../utils/urlHelper\";\r\nimport openGuidelinePage from \"../../utils/openGuidelinePage\";\r\n\r\nexport interface ContentPanelProps {\r\n managedClasses: ContentPanelClassNameContract;\r\n t: SocialLocalizedStrings;\r\n componentConnector: ComponentConnector;\r\n commentConnector: CommentConnector;\r\n content: Content;\r\n responsiveClass: string;\r\n isExpanded: boolean;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n commentDisplayType?: string;\r\n market?: string;\r\n theme: string;\r\n}\r\nexport default class ContentPanel extends React.Component {\r\n telemetryObjects: ContentPanelTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n const totalCommentCount = this.props.content.totalCommentCount;\r\n if (this.props.isExpanded) { return this.renderFullState(); }\r\n if (totalCommentCount == 0) {\r\n return this.renderZeroState();\r\n } else if (!this.props.isExpanded) {\r\n return this.renderMinimalState();\r\n } else {\r\n return this.renderFullState();\r\n }\r\n }\r\n\r\n renderZeroState() {\r\n const { t, content } = this.props;\r\n return (\r\n
    \r\n
    \r\n
    \r\n

    {content.conversationTitle}

    \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderMinimalState() {\r\n const { t, content, responsiveClass } = this.props;\r\n const { listenForTypers, updateTypers } = this.props.commentConnector;\r\n const typingUserProps = { listenForTypers, updateTypers, managedClasses: this.props.managedClasses, t, content, noText: true };\r\n\r\n return (\r\n
    \r\n \r\n
    BETA
    \r\n
    \r\n );\r\n }\r\n\r\n renderFullState() {\r\n const { t, content, mainTelemetryObject, commentDisplayType, market, componentConnector, theme} = this.props;\r\n const { conversationTitle, totalCommentCount } = content;\r\n const { listenForTypers, updateTypers } = this.props.commentConnector;\r\n const isCommentOverlay = commentDisplayType == \"overlay\";\r\n const isMobile = this.props.responsiveClass.includes(enums.responsiveLevels.MobilePopup);\r\n const typingUserProps = { listenForTypers, updateTypers, managedClasses: this.props.managedClasses, t, content, noText: isCommentOverlay || isMobile };\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n guidelinesLink: addOrUpdateTelemetryObject(mainTelemetryObject, {...contentPanelTelemetryContracts.guidelinesLink}, { id: this.props.content && this.props.content.cmsId }, this.telemetryObjects && this.telemetryObjects.guidelinesLink)\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n

    {conversationTitle}

    \r\n
    BETA
    \r\n
    \r\n
    \r\n

    {t.ContentPanelCommentsTxt} {totalCommentCount > 0 ? {totalCommentCount} : \"\"}

    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nexport interface NotificationCardTelemetryObjects {\r\n container: TelemetryObjectBase;\r\n closeButton: TelemetryObjectBase;\r\n messageLink: TelemetryObjectBase;\r\n}\r\n\r\nexport const notificationCardTelemetryContracts = {\r\n // Toast > Scenario-1 contentview\r\n reply: {\r\n name: \"CommentRespondToast\",\r\n content: { type: TelemetryContentType.Toast }\r\n },\r\n // Toast > Scenario-2 and Scenario-5 click\r\n closeButton: {\r\n name: \"Close\",\r\n behavior: TelemetryBehaviorType.Close,\r\n content: { headline: \"Close\", type: TelemetryContentType.Toast }\r\n },\r\n // Toast > Scenario-3 click\r\n commentLink: {\r\n name: \"GoToComment\",\r\n behavior: TelemetryBehaviorType.Navigate,\r\n content: { type: TelemetryContentType.Toast }\r\n },\r\n // Toast > Scenario-4 contentview\r\n achievement: {\r\n name: \"CommunityProfileAchievementBadge\",\r\n content: { type: TelemetryContentType.Toast }\r\n },\r\n // Toast > Scenario-6 click\r\n achievementLink: {\r\n name: \"Achievement\",\r\n behavior: TelemetryBehaviorType.Navigate,\r\n content: { type: TelemetryContentType.Toast }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { BridgeEventNames, dispatchBridgeEvent } from \"../Social.bridge\";\r\n\r\nimport { getExternalURL } from \"./urlHelper\";\r\nimport { isComponentDisabled } from \"./themeHelpers\";\r\n\r\nexport default function openArticlePage(theme, url, contentId, commentId, target = \"_self\") {\r\n const attributes = [];\r\n attributes[\"href\"] = getExternalURL(url, undefined, commentId);\r\n attributes[\"target\"] = target;\r\n if (isComponentDisabled(theme, \"articlepage\")) {\r\n attributes[\"onClick\"] = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n const idAndMarket = contentId.split(\"_\");\r\n dispatchBridgeEvent(BridgeEventNames.openDeepLink, {link: `msnnews://application/view?entitytype=Article&contentId=${idAndMarket[0]}&commentId=${commentId}&shouldScrollToComments=true`});\r\n };\r\n }\r\n return attributes;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActivityData, User } from \"@msnews/social-data-service\";\r\nimport { ComponentConnector, FollowInfo, UsersConnector } from \"../../Social.props\";\r\nimport { NotificationCardTelemetryObjects, notificationCardTelemetryContracts } from \"./NotificationCard.telemetry\";\r\nimport { TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, renderHybrid } from \"../../Social.telemetry\";\r\nimport { activityImages, placeholderImages } from \"../../utils/images\";\r\nimport { close, exclamation_round } from \"../../utils/icons\";\r\n\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport openArticlePage from \"../../utils/openArticlePage\";\r\nimport openGuidelinePage from \"../../utils/openGuidelinePage\";\r\nimport openProfilePage from \"../../utils/openProfilePage\";\r\nimport { renderToString } from \"react-dom/server\";\r\n\r\nexport interface NotificationCardProps {\r\n componentConnector: ComponentConnector;\r\n notification: ActivityData,\r\n managedClasses?: SocialClassNameContract;\r\n t: SocialLocalizedStrings;\r\n usersConnector: UsersConnector;\r\n users: { [id: string]: FollowInfo}; // dictionary definening\r\n market: string;\r\n me: User;\r\n theme: string;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n}\r\n\r\nexport default class NotificationCard extends React.Component {\r\n containerRef: HTMLDivElement;\r\n telemetryObjects: NotificationCardTelemetryObjects;\r\n private static AchievementTitles;\r\n private static AchievementMessages;\r\n isLoaded: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n // Initialize variables with localized strings.\r\n NotificationCard.AchievementTitles = {\r\n Member: props.t.AchievementTitlesMember,\r\n Commenter: props.t.AchievementTitlesCommenter,\r\n Networker: props.t.AchievementTitlesNetworker,\r\n ConversationStarter: props.t.AchievementTitlesConversationStarter\r\n };\r\n\r\n NotificationCard.AchievementMessages = {\r\n Member: props.t.AchievementMessagesMember,\r\n Commenter: props.t.AchievementMessagesCommenter,\r\n Networker: props.t.AchievementMessagesNetworker,\r\n ConversationStarter: props.t.AchievementMessagesConversationStarter\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.notification.target && this.props.notification.target.comment &&\r\n this.props.notification.target.comment.mentionUser && !(this.props.users && this.props.users[this.props.notification.target.comment.mentionUser])) {\r\n this.props.usersConnector.fetchUser(this.props.notification.target.comment.mentionUser);\r\n }\r\n\r\n this.sendContentView();\r\n }\r\n\r\n componentDidUpdate() {\r\n this.sendContentView();\r\n }\r\n\r\n closeHandler() {\r\n this.props.usersConnector.markActivityAsRead(this.props.notification.id, true);\r\n }\r\n\r\n getImageFromNotification(notification: ActivityData) {\r\n switch (notification.type) {\r\n case enums.activityType.follow:\r\n return notification.user && notification.user.avatarUrl || placeholderImages.avatar;\r\n\r\n case enums.activityType.badge:\r\n return activityImages.trophy;\r\n\r\n case enums.activityType.reply:\r\n return notification.user && notification.user.avatarUrl || placeholderImages.avatar;\r\n\r\n case enums.activityType.reaction:\r\n return placeholderImages.peopleAvatar;\r\n }\r\n }\r\n\r\n getTitleFromNotification(notification: ActivityData, t: SocialLocalizedStrings, theme: string, componentConnector: ComponentConnector) {\r\n switch (notification.type) {\r\n case enums.activityType.follow:\r\n return
    { notification.user.name } )\r\n })\r\n }} />;\r\n\r\n case enums.activityType.badge:\r\n return NotificationCard.AchievementTitles[notification.badgeType];\r\n\r\n case enums.activityType.reply:\r\n return
    { notification.user.name }),\r\n commentLink: renderToString({ t.NotificationYourComment })\r\n })\r\n }}/>;\r\n\r\n case enums.activityType.reaction: {\r\n let totalReactionCount = 0;\r\n if (notification.target.reactionCounts) {\r\n totalReactionCount = Object.values(notification.target.reactionCounts).reduce(($sum, $count) => $sum + $count, 0);\r\n }\r\n return
    { t.NotificationYourComment })\r\n })\r\n }}/>;\r\n }\r\n }\r\n }\r\n\r\n getMessageFromNotification(notification: ActivityData, users: { [id: string]: FollowInfo}, t: SocialLocalizedStrings, theme: string, componentConnector: ComponentConnector, market: string) {\r\n switch (notification.type) {\r\n case enums.activityType.follow:\r\n return \"\";\r\n\r\n case enums.activityType.badge:\r\n return
    \r\n {NotificationCard.AchievementMessages[notification.badgeType]}\r\n
    ;\r\n\r\n case enums.activityType.reply: {\r\n const mentionUser = notification.target.comment.mentionUser;\r\n return notification.target.comment.isDeleted ?\r\n
    \r\n \r\n {t[enums.visibleStatusMap[notification.target.comment.visibleStatus] || enums.visibleStatusMap.Default]}\r\n {exclamation_round}\r\n \r\n
    \r\n :\r\n
    \r\n {mentionUser &&\r\n \r\n {users && users[mentionUser] && users[mentionUser].data && users[mentionUser].data.name}\r\n  \r\n \r\n }\r\n \r\n
    \r\n \r\n
    ;\r\n }\r\n\r\n case enums.activityType.reaction: {\r\n let totalReactionCount = 0;\r\n if (notification.target.reactionCounts) {\r\n totalReactionCount = Object.values(notification.target.reactionCounts).reduce(($sum, $count) => $sum + $count, 0);\r\n }\r\n return
    { t.NotificationYourComment })\r\n })\r\n }}/>;\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n const {componentConnector, users, notification, managedClasses, t, theme, market} = this.props;\r\n const isImageClickable = notification.type === enums.activityType.follow || notification.type === enums.activityType.reply;\r\n const isAchievement = notification.type === enums.activityType.badge;\r\n\r\n this.generateTelemetryObjects();\r\n\r\n const notificationImg = (\r\n { avatarFallback(e); }}\r\n />\r\n );\r\n\r\n return (\r\n
    { this.containerRef = el; })}>\r\n \r\n {close} \r\n \r\n
    \r\n
    \r\n { isImageClickable ?\r\n { notificationImg }\r\n : notificationImg\r\n }\r\n
    \r\n
    {this.getTitleFromNotification(notification, t, theme, componentConnector)}
    \r\n
    \r\n
    {this.getMessageFromNotification(notification, users, t, theme, componentConnector, market)}
    \r\n
    \r\n );\r\n }\r\n\r\n generateTelemetryObjects() {\r\n const { notification, mainTelemetryObject } = this.props;\r\n if (!mainTelemetryObject) { return; }\r\n\r\n const containerTelemetryObject = addOrUpdateTelemetryObject(mainTelemetryObject, this.getContainerTelemetryContract(notification.type), { id: notification.id }, this.telemetryObjects && this.telemetryObjects.container);\r\n this.telemetryObjects = {\r\n container: containerTelemetryObject,\r\n closeButton: addOrUpdateTelemetryObject(containerTelemetryObject, notificationCardTelemetryContracts.closeButton, { id: notification.id }, this.telemetryObjects && this.telemetryObjects.closeButton),\r\n messageLink: addOrUpdateTelemetryObject(containerTelemetryObject, this.getMessageLinkTelemetryContract(notification.type), { id: notification.id }, this.telemetryObjects && this.telemetryObjects.messageLink)\r\n };\r\n }\r\n\r\n getContainerTelemetryContract(notificationType) {\r\n switch (notificationType) {\r\n case enums.activityType.badge: return notificationCardTelemetryContracts.achievement;\r\n case enums.activityType.reply: return notificationCardTelemetryContracts.reply;\r\n }\r\n }\r\n\r\n getMessageLinkTelemetryContract(notificationType) {\r\n switch (notificationType) {\r\n case enums.activityType.badge: return notificationCardTelemetryContracts.achievementLink;\r\n case enums.activityType.reply: return notificationCardTelemetryContracts.commentLink;\r\n }\r\n }\r\n\r\n sendContentView() {\r\n if (!this.containerRef || this.isLoaded) { return; }\r\n\r\n this.isLoaded = true;\r\n dispatchTelemetryEvent({...TelemetryEventMap.genericLoaded, sendPeregrine: true}, this.containerRef.parentElement);\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Activities } from \"@msnews/social-data-service\";\r\nimport NotificationCard from \"./NotificationCard\";\r\nimport React from \"react\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\n\r\nexport interface NotificationTrayProps extends SocialProps {\r\n notifications: Activities;\r\n t: SocialLocalizedStrings;\r\n alignment?: \"left\" | \"right\";\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n me: state.me,\r\n notifications: state.notifications,\r\n theme: state.theme\r\n };\r\n};\r\n\r\nexport class NotificationTray extends React.Component {\r\n fetchNotificationsJobId: NodeJS.Timer;\r\n\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n componentDidMount() {\r\n this.props.usersConnector.fetchNotifications();\r\n this.fetchNotificationsJobId = setInterval(() => { this.props.usersConnector.fetchNotifications(); }, 30000);\r\n }\r\n\r\n componentWillUnmount() {\r\n clearInterval(this.fetchNotificationsJobId);\r\n }\r\n\r\n render() {\r\n const { alignment, componentConnector, t, managedClasses, users, usersConnector, market, me, notifications, theme, mainTelemetryObject } = this.props;\r\n if (!notifications) { return null; }\r\n const isLeftAligned = alignment == \"left\";\r\n\r\n return (\r\n
    \r\n {notifications.list.map(notification => {\r\n return ;\r\n })}\r\n
    \r\n );\r\n }\r\n}\r\nexport default connect(mapStateToProps)(NotificationTray);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { getExternalURL } from \"./urlHelper\";\r\n\r\n// © Microsoft Corporation. All rights reserved.\r\nexport default function isValidURL(pageURL, contentURL, whitelist, blacklist) {\r\n if (!pageURL || (!whitelist && !blacklist) || pageURL.match(\"bypasslist=true\")) {\r\n return true;\r\n }\r\n\r\n const considerURL = pageURL.match(\"/community/embed/\") && contentURL && getExternalURL(contentURL) || pageURL;\r\n if (!considerURL) {\r\n return true;\r\n }\r\n\r\n // If whitelists exist at least 1 whitelist condition should be satisfied\r\n if (whitelist) {\r\n const whitelistTest = whitelist.split(\",\").map(x => {\r\n try {\r\n return new RegExp(x, \"g\");\r\n } catch (e) {\r\n return x;\r\n }\r\n });\r\n\r\n const testPass = whitelistTest.find(x => considerURL.match(x));\r\n if (!testPass) {\r\n return false;\r\n }\r\n }\r\n\r\n // If blacklists exist none of the blacklist conditions should be satisfied\r\n if (blacklist) {\r\n const blacklistTest = blacklist.split(\",\").map(x => {\r\n try {\r\n return new RegExp(x, \"g\");\r\n } catch (e) {\r\n return x;\r\n }\r\n });\r\n const testPass = blacklistTest.find(x => considerURL.match(x));\r\n if (testPass) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\nexport function contentIdKey(cmsId: string, market: string): string {\r\n return `${cmsId}_${market}`;\r\n}\r\n\r\nexport function selectContentId(contentIds: { [id: string]: string }, cmsId: string, market: string): string {\r\n const key = contentIdKey(cmsId, market);\r\n const contentId = contentIds && contentIds[key];\r\n\r\n if (contentId) {\r\n return contentId;\r\n } else {\r\n logger.log(\"Content id doesn't exist, falling back to key `${cmsId}_${market}`\");\r\n return key;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, LightweightButton } from \"@microsoft/fast-components-react-msft\";\r\nimport { CommentTelemetryObjects, commentTelemetryContracts } from \"./Comment.telemetry\";\r\nimport { TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, renderHybrid } from \"../Social.telemetry\";\r\nimport avatarFallback, { contentImageFallback } from \"../utils/avatarFallback\";\r\nimport { chevron_left, close2, comment } from \"../utils/icons\";\r\nimport { hasThemeBase, isComponentDisabled } from \"../utils/themeHelpers\";\r\n\r\nimport CommentList from \"./comment-list/CommentList\";\r\nimport { Content } from \"@msnews/social-data-service\";\r\nimport ContentPanel from \"./content-panel/ContentPanel\";\r\nimport DisabledMessage from \"./disabled-message/DisabledMessage\";\r\nimport NotificationTray from \"../common/notification/NotificationTray\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../Social.props\";\r\nimport { SocialState } from \"../Social.state\";\r\nimport UserCard from \"./user-card/UserCard\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { commentsSectionIndicatorExist } from \"../utils/urlHelper\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { getContextData } from \"@msnews/core\";\r\nimport isValidURL from \"../utils/isValidURL\";\r\nimport loadObserver from \"../utils/ObserverHelper\";\r\nimport { placeholderImages } from \"../utils/images\";\r\nimport { selectContentId } from \"../utils/contentIdKey\";\r\n\r\ninterface CommentState {\r\n commentsLoaded: boolean;\r\n showNotificationTray: boolean;\r\n userCardVisible: boolean;\r\n userCardUserId: string;\r\n displayState: number;\r\n isOverlayActive: boolean; // Toogle for swiping comments widget on flight-3\r\n isCompactFloatButtonVisible: boolean;\r\n isEntireComponentScrolled: boolean;\r\n buttonVisibilityTurnedOn: boolean;\r\n componentIsInView: boolean;\r\n}\r\n\r\nexport interface CommentProps extends SocialProps {\r\n content: Content;\r\n}\r\n\r\nconst mapStateToProps = function (state: SocialState, props: SocialProps) {\r\n const contentId = selectContentId(state.contentIds, props.id, props.market);\r\n return {\r\n responsiveClass: state.responsiveClass,\r\n content: state.contents && state.contents[contentId]\r\n };\r\n};\r\n\r\nexport class Comment extends React.Component {\r\n commentContainerRef: React.RefObject;\r\n commentBox: HTMLDivElement;\r\n minimalContainerRef: React.RefObject;\r\n minimalContainerObserver: IntersectionObserver;\r\n telemetryObjects: CommentTelemetryObjects;\r\n overlayObserver: IntersectionObserver;\r\n overlayContainerRef: HTMLDivElement;\r\n componentEndIndicatorRef: React.RefObject;\r\n isContainerLoaded: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.commentContainerRef = React.createRef();\r\n this.minimalContainerRef = React.createRef();\r\n this.componentEndIndicatorRef = React.createRef();\r\n loadObserver(() => {\r\n this.minimalContainerObserver = new IntersectionObserver(\r\n this.commentContainerIntersectionHandler.bind(this),\r\n { threshold: [0, .2, .4, .6, .8, 1]}\r\n );\r\n });\r\n\r\n // Overlay Comments Container\r\n this.overlayContainerRef = null;\r\n loadObserver(() => {\r\n this.overlayObserver = new IntersectionObserver(\r\n () => this.overlayContainerRef && dispatchTelemetryEvent({...TelemetryEventMap.genericLoaded, sendPeregrine: true}, this.overlayContainerRef.parentElement.parentElement),\r\n { threshold: .8}\r\n );\r\n });\r\n\r\n this.state = {\r\n commentsLoaded: false,\r\n showNotificationTray: !isComponentDisabled(props.theme, \"notificationtray\"),\r\n userCardVisible: false,\r\n userCardUserId: null,\r\n displayState: enums.commentsStatusType.notDetermined,\r\n isOverlayActive: false,\r\n isCompactFloatButtonVisible: true,\r\n isEntireComponentScrolled: false,\r\n buttonVisibilityTurnedOn: true,\r\n componentIsInView: false\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n document.addEventListener(\"cwt-comments-clicked\", (e) => this.toggleCommentsState(e));\r\n document.addEventListener(\"scroll\", this.trackScrolling.bind(this));\r\n this.prepareCommentConnector();\r\n }\r\n\r\n prepareCommentConnector() {\r\n const commentToBeFetchedCount = this.props.commentDisplayType == \"overlay\" ? 6 : 2;\r\n this.props.commentConnector && this.props.commentConnector.onCommentComponentConnect(\r\n { id: this.props.id, market: this.props.market, top: commentToBeFetchedCount },\r\n this.props.specificCommentId\r\n );\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.id != null && this.props.market != null && prevProps.id != this.props.id || prevProps.market != this.props.market || prevProps.commentDisplayType != this.props.commentDisplayType || prevProps.specificCommentId != this.props.specificCommentId) {\r\n this.prepareCommentConnector();\r\n this.setState({\r\n commentsLoaded: false,\r\n displayState: enums.commentsStatusType.notDetermined\r\n });\r\n }\r\n\r\n const { content, specificCommentId } = this.props;\r\n const { displayState, commentsLoaded } = this.state;\r\n if (content && !commentsLoaded) {\r\n if (specificCommentId) {\r\n this.expandComponent();\r\n } else if (this.props.commentDisplayType && this.props.commentDisplayType.indexOf(\"compact\") == 0) {\r\n this.setState({\r\n displayState: content.totalCommentCount > 0 ? enums.commentsStatusType.minimal : enums.commentsStatusType.zero\r\n });\r\n } else {\r\n this.expandComponent();\r\n }\r\n if (displayState !== enums.commentsStatusType.notDetermined) {\r\n this.setState({ commentsLoaded: true });\r\n if ((commentsSectionIndicatorExist() || specificCommentId)) {\r\n this.setState({displayState: enums.commentsStatusType.expanded}, () => {\r\n this.setFloatingButtonVisibility(false);\r\n const isDefault = this.props.commentDisplayType == \"default\"; // overlay and compact themes are handled onCommentBoxInitialized\r\n const isOverlay = this.props.commentDisplayType === \"overlay\";\r\n if (isDefault) { // setTimeout's are necessary to provide smooth transition on initial loading\r\n setTimeout(() => { this.jumpToCommentsSection(); }, 250);\r\n } else if (isOverlay) {\r\n setTimeout(() => { this.setState({isOverlayActive: true}); }, 250);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n // Observe Comments Container\r\n if (!this.isContainerLoaded && this.minimalContainerRef && this.minimalContainerRef.current) {\r\n this.isContainerLoaded = true;\r\n this.minimalContainerObserver.observe(this.minimalContainerRef.current);\r\n }\r\n\r\n // Observe Overlay Comments Container\r\n if (!this.isContainerLoaded && this.overlayContainerRef) {\r\n this.isContainerLoaded = true;\r\n this.overlayObserver.observe(this.overlayContainerRef);\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.isContainerLoaded = false;\r\n document.removeEventListener(\"scroll\", this.trackScrolling.bind(this));\r\n\r\n // Unobserve Comments Container\r\n if (this.minimalContainerRef && this.minimalContainerRef.current) {\r\n this.minimalContainerObserver.unobserve(this.minimalContainerRef.current);\r\n }\r\n\r\n // Unobserve Overlay Comments Container\r\n if (this.overlayContainerRef) {\r\n this.overlayObserver.unobserve(this.overlayContainerRef);\r\n }\r\n }\r\n\r\n render() {\r\n if (this.state.displayState == enums.commentsStatusType.notDetermined) { return null; }\r\n\r\n const { me, managedClasses, usersConnector, users, market, responsiveClass, t, content, mainTelemetryObject, requestContext, commentDisplayType, specificCommentId, componentConnector, theme} = this.props;\r\n if (!content) { return null; }\r\n\r\n const { commentStatus, url, commentWhiteListSegments, commentBlackListSegments } = content;\r\n if (commentStatus == \"Off\") { return null; }\r\n if (!isValidURL(getContextData(requestContext.data.locationHref, \"locationHref\"), url, commentWhiteListSegments, commentBlackListSegments)) { return null; }\r\n\r\n const isMobile = this.props.responsiveClass.includes(enums.responsiveLevels.MobilePopup);\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n const avatarUrl = me && (me.state != enums.userStateType.newUser && me.avatarStatus == enums.userAvatarStatusType.normal ? me.avatarUrl || placeholderImages.avatar : placeholderImages.avatar);\r\n const isExpanded = this.isComponentExpanded();\r\n const contentDisabled = commentStatus != \"On\";\r\n\r\n const renderParams = { me, managedClasses, usersConnector, users, market, responsiveClass, t, content, isSuperApp, isExpanded, contentDisabled, avatarUrl, isMobile, mainTelemetryObject, componentConnector, theme };\r\n const isOverlay = commentDisplayType === \"overlay\";\r\n const commmentView = isOverlay ? this.renderOverlay(renderParams) : this.renderDefaultOrCompact(renderParams);\r\n\r\n const notificationPosition = isOverlay ? \"left\" : \"right\";\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n compactStartConversationButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...commentTelemetryContracts.compactStartConversationButton}, { id: content.cmsId }, this.telemetryObjects && this.telemetryObjects.compactStartConversationButton),\r\n compactJoinConversationButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...commentTelemetryContracts.compactJoinConversationButton}, { id: content.cmsId }, this.telemetryObjects && this.telemetryObjects.compactJoinConversationButton),\r\n overlayAddCommentButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...commentTelemetryContracts.overlayAddCommentButton}, { id: content.cmsId }, this.telemetryObjects && this.telemetryObjects.overlayAddCommentButton),\r\n overlayStartConversationButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...commentTelemetryContracts.overlayStartConversationButton}, { id: content.cmsId }, this.telemetryObjects && this.telemetryObjects.overlayStartConversationButton),\r\n overlayJoinConversationButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...commentTelemetryContracts.overlayJoinConversationButton}, { id: content.cmsId }, this.telemetryObjects && this.telemetryObjects.overlayJoinConversationButton),\r\n mobileFloaterButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...commentTelemetryContracts.mobileFloaterButton}, { id: content.cmsId }, this.telemetryObjects && this.telemetryObjects.mobileFloaterButton),\r\n overlayComments: addOrUpdateTelemetryObject(mainTelemetryObject, {...commentTelemetryContracts.overlayComments}, { id: content.cmsId }, this.telemetryObjects && this.telemetryObjects.overlayComments)\r\n };\r\n\r\n return \r\n { commmentView }\r\n { this.state.showNotificationTray && }\r\n
    \r\n
    ;\r\n }\r\n\r\n renderContentPanel() {\r\n const { commentDisplayType, managedClasses, popupConnector, commentConnector, t, contents, content, mainTelemetryObject, responsiveClass, market, componentConnector, theme } = this.props;\r\n const isExpanded = this.isComponentExpanded();\r\n const props = { commentDisplayType, content, t, managedClasses, popupConnector, commentConnector, contents, responsiveClass, isExpanded, mainTelemetryObject, market, componentConnector, theme };\r\n return ;\r\n }\r\n\r\n renderCommentList() {\r\n const { componentConnector, commentConnector, responsiveClass, me, t, managedClasses, usersConnector, popupConnector, users, market, content, mainTelemetryObject, theme, commentDisplayType, specificCommentId } = this.props;\r\n const { commentStatus, comments, id: contentId, totalCommentCount } = content;\r\n const contentDisabled = commentStatus != \"On\";\r\n const isExpanded = this.isComponentExpanded();\r\n const isInZeroState = this.state.displayState == enums.commentsStatusType.zero;\r\n const displayNotInitialized = this.state.displayState == enums.commentsStatusType.notDetermined;\r\n const onCommentBoxInitialized = this.onCommentBoxInitialized.bind(this);\r\n\r\n if (!contentDisabled && !isInZeroState && !displayNotInitialized) {\r\n return ;\r\n }\r\n }\r\n\r\n handleKeyDown(e) {\r\n if (e.keyCode == 9) {\r\n const target = window.document.getElementById(`joinButton_${this.props.content.id}`);\r\n if (target != document.activeElement) {\r\n if (target) {\r\n target.focus();\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n }\r\n }\r\n }\r\n\r\n renderDefaultOrCompact(renderParams) {\r\n const {t, managedClasses, responsiveClass, isSuperApp, isExpanded, contentDisabled } = renderParams;\r\n const isCompactFloatMode = this.props.commentDisplayType === \"compactFloat\";\r\n const isMobile = this.props.responsiveClass.includes(enums.responsiveLevels.MobilePopup);\r\n const isZeroState = this.state.displayState == enums.commentsStatusType.zero;\r\n const buttonName = isZeroState ? t.CommentStartConversation : t.CommentJoinConversation;\r\n\r\n return (\r\n !isExpanded && this.compactCommentsClickHandler(e)}\r\n onKeyDown={(e) => this.handleKeyDown(e)}\r\n >\r\n { contentDisabled\r\n ? this.renderContentDisabledSection(renderParams)\r\n : \r\n { this.renderContentPanel() }\r\n { this.renderCommentList() }\r\n {
    {this.renderDefaultCTAButton()}
    }\r\n\r\n { isCompactFloatMode && !this.isComponentExpanded() &&\r\n (isMobile\r\n ? this.renderOverlayCTAButton()\r\n :
    {this.renderDefaultCTAButton()}
    \r\n )\r\n }\r\n
    \r\n }\r\n
    \r\n );\r\n }\r\n\r\n renderOverlay(renderParams) {\r\n const { managedClasses, responsiveClass, content, contentDisabled, isMobile } = renderParams;\r\n const contentThumbnailUrl = content.thumbnail ? content.thumbnail : placeholderImages.content;\r\n return (\r\n \r\n { contentDisabled\r\n ? this.renderContentDisabledSection(renderParams)\r\n : \r\n { !this.state.isOverlayActive && !this.isComponentScrolledDown() && this.renderOverlayCTAButton() }\r\n\r\n { this.state.isOverlayActive &&\r\n \r\n { !isMobile &&\r\n \r\n { this.renderContentPanel() }\r\n this.hideOverlayHandler(e)} className=\"cwt-close-button\" title = \"Close\">\r\n {close2} \r\n \r\n \r\n }\r\n\r\n { isMobile &&\r\n
    \r\n this.hideOverlayHandler(e)} className=\"cwt-fast-button cwt-navbar-button\" >\r\n {chevron_left} \r\n \r\n
    \r\n \"Content\r\n
    \r\n {content.title}\r\n
    \r\n }\r\n\r\n
    { this.overlayContainerRef = el; })}>\r\n {this.renderCommentList()}\r\n
    \r\n
    \r\n }\r\n
    \r\n }\r\n
    \r\n );\r\n }\r\n\r\n renderContentDisabledSection(renderParams) {\r\n const { me, avatarUrl, usersConnector, users, market, managedClasses, t, componentConnector, theme } = renderParams;\r\n return (\r\n
    \r\n {me &&\r\n
    \r\n { avatarFallback(e); }}\r\n onMouseEnter={(e) => this.showUserCard(e, me.id)}\r\n />\r\n
    \r\n }\r\n {this.state.userCardVisible &&\r\n this.setState({userCardVisible: false}),\r\n triggerRef: this.commentContainerRef,\r\n isHover: true,\r\n mainTelemetryObject: this.props.mainTelemetryObject\r\n }}\r\n />\r\n }\r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderDefaultCTAButton() {\r\n if (this.isComponentExpanded()) { return; }\r\n\r\n const { t, content } = this.props;\r\n const { totalCommentCount } = content || {};\r\n const isZeroState = this.state.displayState == enums.commentsStatusType.zero;\r\n const buttonName = isZeroState ? t.CommentStartConversation : t.CommentJoinConversation;\r\n const buttonText = isZeroState ? t.CommentStartConversation : `${t.CommentJoinConversation}${totalCommentCount && totalCommentCount > 0 && ` (${totalCommentCount}) `}`;\r\n const telemetryObject = this.telemetryObjects && (isZeroState ? this.telemetryObjects.compactStartConversationButton : this.telemetryObjects.compactJoinConversationButton);\r\n\r\n const showCommentsFloatButton = (\r\n this.showCompactCommentsHandler(e, telemetryObject)}\r\n id={`joinButton_${content.id}`}\r\n className=\"cwt-fast-button cwt-compact-cta-button\"\r\n aria-live=\"assertive\"\r\n type=\"button\"\r\n tabIndex={1}\r\n name={buttonName}\r\n {...renderHybrid(telemetryObject, true)}\r\n >\r\n \r\n {buttonText} \r\n {comment}\r\n \r\n \r\n );\r\n\r\n return
    {showCommentsFloatButton}
    ;\r\n }\r\n\r\n renderOverlayCTAButton() {\r\n const isMobile = this.props.responsiveClass.includes(enums.responsiveLevels.MobilePopup);\r\n if (isMobile && this.state.isOverlayActive) { return; }\r\n\r\n const { t, content, me, managedClasses } = this.props;\r\n const { totalCommentCount } = content || {};\r\n const isExistingUser = me && me.state && me.state != enums.userStateType.anonymous;\r\n const avatarUrl = me && (me.state != enums.userStateType.newUser && me.avatarStatus == enums.userAvatarStatusType.normal ? me.avatarUrl || placeholderImages.avatar : placeholderImages.avatar);\r\n const hasComment = totalCommentCount > 0;\r\n const showAddCommentMessage = !isMobile && hasComment && isExistingUser;\r\n const showProfilePicture = !isMobile && isExistingUser;\r\n const commentsCountLabel = totalCommentCount && {totalCommentCount} ;\r\n const isOverlay = this.props.commentDisplayType == \"overlay\";\r\n\r\n // Decide Button Message\r\n let buttonMessage = t.CommentStartConversation;\r\n if (hasComment) { buttonMessage = isExistingUser ? t.CommentAddComment : t.CommentJoinConversation; }\r\n\r\n // Decide Telemetry Object\r\n let telemetryObject;\r\n if (this.telemetryObjects) {\r\n if (isMobile) {\r\n telemetryObject = this.telemetryObjects.mobileFloaterButton;\r\n } else if (showAddCommentMessage) {\r\n telemetryObject = this.telemetryObjects.overlayAddCommentButton;\r\n } else if (hasComment) {\r\n telemetryObject = this.telemetryObjects.overlayJoinConversationButton;\r\n } else {\r\n telemetryObject = this.telemetryObjects.overlayStartConversationButton;\r\n }\r\n }\r\n\r\n const renderProfileImg = () =>\r\n showProfilePicture &&\r\n
    \r\n \"user{ avatarFallback(e); }}/>\r\n
    ;\r\n\r\n const renderButtonIcon = () => {comment} {hasComment && commentsCountLabel} ;\r\n\r\n const showCommentsButton = this.showOverlayCommentsHandler(e, telemetryObject)}\r\n className={classNames(\r\n \"cwt-fast-button\",\r\n \"cwt-overlay-cta-button\",\r\n [\"cwt-overlay-cta-button-desktop\", !isMobile],\r\n [managedClasses.buttonFadeInContainer, this.state.buttonVisibilityTurnedOn && isMobile && !isOverlay],\r\n [managedClasses.buttonFadeOutContainer, !this.state.buttonVisibilityTurnedOn && isMobile && !isOverlay]\r\n )}\r\n beforeContent={renderProfileImg}\r\n afterContent={renderButtonIcon}\r\n aria-live=\"assertive\"\r\n type=\"button\"\r\n name={t.CommentJoinConversation}\r\n {...renderHybrid(telemetryObject, true)}\r\n >\r\n { !isMobile &&
    {buttonMessage}
    }\r\n ;\r\n\r\n return
    {showCommentsButton}
    ;\r\n }\r\n\r\n expandComponent() {\r\n this.setState({\r\n displayState: enums.commentsStatusType.expanded\r\n });\r\n }\r\n\r\n showUserCard(e, userId) {\r\n const me = this.props.me;\r\n if (me.state == enums.userStateType.anonymous) { return; }\r\n this.setState({userCardVisible: true, userCardUserId: userId});\r\n }\r\n\r\n compactCommentsClickHandler(e) {\r\n this.expandComponent();\r\n }\r\n\r\n showCompactCommentsHandler(e, telemetryObject?) {\r\n this.expandComponent();\r\n this.jumpToCommentsSection();\r\n }\r\n\r\n showOverlayCommentsHandler(e, telemetryObject?) {\r\n this.setState({isOverlayActive: true}, () => this.jumpToCommentsSection());\r\n }\r\n\r\n jumpToCommentsSection() {\r\n this.addCommentsHashToUrl();\r\n this.scrollCommentContainerIntoView();\r\n this.focusToCommentBox();\r\n }\r\n\r\n addCommentsHashToUrl() {\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n if (!isSuperApp && !document.location.href.includes(\"#comments\")) {\r\n document.location.href = document.location.href.replace(\"#comments\", \"\")+\"#comments\";\r\n }\r\n }\r\n\r\n hideOverlayHandler(e) {\r\n this.setState({isOverlayActive: false});\r\n }\r\n\r\n toggleCommentsState(e) {\r\n const isOverlay = this.props.commentDisplayType == \"overlay\";\r\n if (isOverlay) {\r\n const isOverlayActive = this.state.isOverlayActive;\r\n return isOverlayActive ? this.hideOverlayHandler(e) : this.showOverlayCommentsHandler(e);\r\n } else {\r\n if (!this.isComponentExpanded()) { this.expandComponent(); }\r\n this.jumpToCommentsSection();\r\n }\r\n }\r\n\r\n commentContainerIntersectionHandler(entries) {\r\n this.setState({componentIsInView: entries[0].intersectionRatio >= .1});\r\n this.minimalContainerRef && this.minimalContainerRef.current && dispatchTelemetryEvent({...TelemetryEventMap.genericLoaded, sendPeregrine: true}, this.minimalContainerRef.current);\r\n }\r\n\r\n onCommentBoxInitialized(commentBox: HTMLDivElement) {\r\n this.commentBox = commentBox;\r\n const isOverlayOrCompact = this.props.commentDisplayType == \"overlay\" || this.props.commentDisplayType.includes(\"compact\");\r\n if (isOverlayOrCompact) {\r\n setTimeout(() => {\r\n this.jumpToCommentsSection();\r\n }, 250);\r\n }\r\n }\r\n\r\n trackScrolling() {\r\n const isEntireComponentScrolled = this.isComponentScrolledDown();\r\n const showButton = !this.state.componentIsInView && !isEntireComponentScrolled;\r\n this.setFloatingButtonVisibility(showButton);\r\n }\r\n\r\n isComponentScrolledDown() {\r\n return this.componentEndIndicatorRef.current ? this.componentEndIndicatorRef.current.getBoundingClientRect().top < 250 : false;\r\n }\r\n\r\n focusToCommentBox() {\r\n return this.commentBox && this.commentBox.focus({preventScroll: true});\r\n }\r\n\r\n isCommentContainerExist() {\r\n return !!((this.commentContainerRef && this.commentContainerRef.current) || (this.minimalContainerRef && this.minimalContainerRef.current));\r\n }\r\n\r\n scrollCommentContainerIntoView() {\r\n const containerExist = this.isCommentContainerExist();\r\n return containerExist && (this.commentContainerRef.current || this.minimalContainerRef.current).scrollIntoView({\r\n behavior: \"smooth\",\r\n block: \"start\"\r\n });\r\n }\r\n\r\n isComponentExpanded() {\r\n return this.state.displayState == enums.commentsStatusType.expanded;\r\n }\r\n\r\n setFloatingButtonVisibility(turnOn: boolean) {\r\n if (turnOn) {\r\n this.setState({isCompactFloatButtonVisible: true, buttonVisibilityTurnedOn: true});\r\n } else {\r\n this.setState({buttonVisibilityTurnedOn: false}, () => setTimeout(() => { this.setState({isCompactFloatButtonVisible: false}); }, 350));\r\n }\r\n }\r\n}\r\nexport default connect(mapStateToProps)(Comment);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../Social.telemetry\";\r\n\r\nexport interface CommunityGuidelinesTelemetryObjects {\r\n guidelinesBtnAtPrinciples: TelemetryObjectBase;\r\n guidelinesBtnAtEnforcement: TelemetryObjectBase;\r\n enforcementBtn: TelemetryObjectBase;\r\n principlesBtn: TelemetryObjectBase;\r\n tabs: any;\r\n}\r\n\r\nexport const communityGuidelinesTelemetryContracts = {\r\n /** Scenario 1 click tabs*/\r\n tabs: {\r\n Principles: { /** id: traceId */\r\n name: \"Principles\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Principles\"\r\n }\r\n },\r\n Guidelines: { /** id: traceId */\r\n name: \"Guidelines\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Guidelines\"\r\n }\r\n },\r\n Enforcement: { /** id: traceId */\r\n name: \"Enforcement\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Enforcement\"\r\n }\r\n }\r\n },\r\n /** Scenario 2 and Scenario 4 click guidelines btn\r\n * name: active tab (enforceement/principles)\r\n */\r\n guidelinesBtn: {\r\n name: \"Guidelines\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Guidelines\"\r\n }\r\n },\r\n /** Scenario 3 click enforcement btn on guidelines tab */\r\n enforcementBtn: {\r\n name: \"Enforcement\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Enforcement\"\r\n }\r\n },\r\n /** Scenario 3 click principles btn on guidelines tab */\r\n principlesBtn: {\r\n name: \"Principles\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Principles\"\r\n }\r\n }\r\n};\r\n\r\nexport const communityGuidelinesTelemetryActionDispatchers = {\r\n /** Used for: Scenario 3a and Scenario 4a */\r\n genericClicked: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { chevron_left, ellipsis3 } from \"../../utils/icons\";\r\n\r\nimport { Button } from \"@microsoft/fast-components-react-msft\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\n\r\nexport interface NavbarProps extends SocialProps{\r\n onBackClick?: (any) => void;\r\n onEllipsisClick?: (any) => void;\r\n whiteIcons?: boolean;\r\n}\r\n\r\nexport default class Navbar extends React.Component {\r\n containerRef: React.RefObject;\r\n\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n /**\r\n * We do not render icons if matching handler os not passed\r\n */\r\n render() {\r\n const { managedClasses, onBackClick, onEllipsisClick, whiteIcons, t } = this.props;\r\n\r\n return (\r\n
    \r\n { onBackClick\r\n ? \r\n : \r\n }\r\n { onEllipsisClick\r\n ? \r\n : \r\n }\r\n
    \r\n );\r\n }\r\n\r\n backClickHandler(e) {\r\n if (this.props.onBackClick) { this.props.onBackClick(e); }\r\n }\r\n\r\n ellipsisClickHandler(e) {\r\n if (this.props.onEllipsisClick) { this.props.onEllipsisClick(e); }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport { CommunityGuidelinesTelemetryObjects, communityGuidelinesTelemetryActionDispatchers, communityGuidelinesTelemetryContracts } from \"./CommunityGuidelinePage.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../Social.telemetry\";\r\nimport { guidlineImages, logoImages } from \"../utils/images\";\r\n\r\nimport Navbar from \"../common/navbar/Navbar\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../Social.props\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { getContextData } from \"@msnews/core\";\r\nimport { hasThemeBase } from \"../utils/themeHelpers\";\r\nimport { renderToString } from \"react-dom/server\";\r\n\r\nconst guidelineTabs = {\r\n Principles: \"Principles\",\r\n Guidelines: \"Guidelines\",\r\n Enforcement: \"Enforcement\"\r\n};\r\n\r\ninterface CommunityGuidelinePageState {\r\n activeTab: string;\r\n}\r\n\r\nexport default class CommunityGuidelinePage extends React.Component {\r\n telemetryObjects: CommunityGuidelinesTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n activeTab: null\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const requestContext = this.props.requestContext;\r\n const locationHref = getContextData(requestContext.data.locationHref, \"locationHref\");\r\n const tabNameFromUrl = Object.keys(guidelineTabs).filter(key => locationHref.toLowerCase().endsWith(key.toLowerCase())).pop();\r\n this.setState({ activeTab: tabNameFromUrl || guidelineTabs.Principles});\r\n this.props.markTtvr();\r\n }\r\n\r\n showTab(e, tab, telemetryObject?) {\r\n this.setState({\r\n activeTab: tab\r\n });\r\n\r\n if (telemetryObject) {\r\n communityGuidelinesTelemetryActionDispatchers.genericClicked(e.currentTarget, telemetryObject);\r\n }\r\n }\r\n\r\n navbarBackHandler() {\r\n if (history.state.initial) {\r\n this.props.popupConnector.closePopup();\r\n } else {\r\n history.back();\r\n }\r\n }\r\n\r\n render() {\r\n const {responsiveClass, t, mainTelemetryObject} = this.props;\r\n const {activeTab} = this.state;\r\n const isMobile = responsiveClass.includes(enums.responsiveLevels.L0);\r\n const mainTitle = isMobile ? t[`CommunityGuidelinePageTabs${activeTab}`] : t.OnboardingProceedingGuidelines;\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n tabs: {},\r\n guidelinesBtnAtPrinciples: addOrUpdateTelemetryObject(mainTelemetryObject, communityGuidelinesTelemetryContracts.guidelinesBtn, {}, this.telemetryObjects && this.telemetryObjects.guidelinesBtnAtPrinciples),\r\n guidelinesBtnAtEnforcement: addOrUpdateTelemetryObject(mainTelemetryObject, communityGuidelinesTelemetryContracts.guidelinesBtn, {}, this.telemetryObjects && this.telemetryObjects.guidelinesBtnAtEnforcement),\r\n enforcementBtn: addOrUpdateTelemetryObject(mainTelemetryObject, communityGuidelinesTelemetryContracts.enforcementBtn, {}, this.telemetryObjects && this.telemetryObjects.enforcementBtn),\r\n principlesBtn: addOrUpdateTelemetryObject(mainTelemetryObject, communityGuidelinesTelemetryContracts.principlesBtn, {}, this.telemetryObjects && this.telemetryObjects.principlesBtn)\r\n };\r\n\r\n return (\r\n
    \r\n { isSuperApp &&\r\n this.navbarBackHandler()}\r\n />\r\n }\r\n\r\n
    \r\n
    \r\n
    \r\n {t.ImgAltsMicrosoftNewsLogo}\r\n

    {t.GuidelinesPageSubHeading}

    \r\n
    \r\n

    { mainTitle }

    \r\n
    \r\n
    \r\n
      \r\n { Object.keys(guidelineTabs).map(key => {\r\n const tab = guidelineTabs[key];\r\n this.telemetryObjects.tabs[key] = addOrUpdateTelemetryObject(mainTelemetryObject, communityGuidelinesTelemetryContracts.tabs[key], {}, this.telemetryObjects && this.telemetryObjects.tabs[key]);\r\n\r\n return (\r\n\r\n
    • this.showTab(e, tab, this.telemetryObjects.tabs[key])}\r\n {...renderHybrid(this.telemetryObjects.tabs[key], false)}\r\n >\r\n \r\n {t[`CommunityGuidelinePageTabs${tab}`]}\r\n \r\n
    • \r\n );\r\n }\r\n )}\r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n { activeTab == guidelineTabs.Guidelines &&\r\n \r\n
      \r\n
    • \r\n {t.ImgAltsPeopleReactingContents}\r\n
      \r\n

      \r\n {t.GuidelinesPageGuidelinesTabAvoidPartText}\r\n

      \r\n
        \r\n
      • {t.GuidelinesPageGuidelinesTabAvoidPartHarassment}
      • \r\n
      • {t.GuidelinesPageGuidelinesTabAvoidPartBullying}
      • \r\n
      \r\n
      \r\n
    • \r\n\r\n
    • \r\n {t.ImgAltsPeopleSendingComments}\r\n
      \r\n

      \r\n {t.GuidelinesPageGuidelinesTabRespectPartText}\r\n

      \r\n
        \r\n
      • {t.GuidelinesPageGuidelinesTabRespectPartImpersonate}
      • \r\n
      • {t.GuidelinesPageGuidelinesTabRespectPartRespectOthers}
      • \r\n
      • {t.GuidelinesPageGuidelinesTabRespectPartNotShareContent}
      • \r\n
      \r\n
      \r\n
    • \r\n\r\n
    • \r\n {t.ImgAltsTwoPeopleInteractingSocialUI}\r\n
      \r\n

      \r\n {t.GuidelinesPageGuidelinesTabReportPartText}\r\n

      \r\n
        \r\n
      • {t.GuidelinesPageGuidelinesTabReportPartViolent}
      • \r\n
      • {t.GuidelinesPageGuidelinesTabReportPartIllegalAct}
      • \r\n
      • {t.GuidelinesPageGuidelinesTabReportPartRiskTo}
      • \r\n
      • {t.GuidelinesPageGuidelinesTabReportPartProfaneText}
      • \r\n
      • {t.GuidelinesPageGuidelinesTabReportPartHateSpeech}
      • \r\n
      \r\n
      \r\n
    • \r\n\r\n
    • \r\n {t.ImgAltsTwoPeopleShakingHands}\r\n
      \r\n

      \r\n {t.GuidelinesPageGuidelinesTabFinalPartText}\r\n

      \r\n
        \r\n
      • {t.GuidelinesPageGuidelinesTabFinalPartCopywrited}
      • \r\n
      • {t.GuidelinesPageGuidelinesTabFinalPartSpam}
      • \r\n
      \r\n
      \r\n
    • \r\n\r\n
    \r\n\r\n
    \r\n
    \r\n this.showTab(e, guidelineTabs.Principles)} {...renderHybrid(this.telemetryObjects.principlesBtn, false)}> {t.CommunityGuidelinePageTabsPrinciples} \r\n this.showTab(e, guidelineTabs.Enforcement)} {...renderHybrid(this.telemetryObjects.enforcementBtn, false)}> {t.CommunityGuidelinePageTabsEnforcement} \r\n
    \r\n
    \r\n
    \r\n }\r\n\r\n { activeTab == guidelineTabs.Principles &&\r\n
    \r\n
    \r\n

    \r\n {t.GuidelinesPagePrinciplesTabSupportText}\r\n

    \r\n

    \r\n {t.GuidelinesPagePrinciplesTabUpholdText}\r\n

    \r\n

    \r\n {t.GuidelinesPagePrinciplesTabRespectLawText}\r\n

    \r\n

    {t.CodeOfConduct}),\r\n MicrosoftServicesAgreement: renderToString({t.MicrosoftServicesAgreement})\r\n })\r\n }}/>\r\n

    \r\n
    \r\n this.showTab(e, guidelineTabs.Guidelines)} {...renderHybrid(this.telemetryObjects.guidelinesBtnAtPrinciples, false)}> {t.CommunityGuidelinePageTabsGuidelines} \r\n
    \r\n
    \r\n
    \r\n {t.ImgAltsPeopleReactingContents}\r\n
    \r\n }\r\n\r\n { activeTab == guidelineTabs.Enforcement &&\r\n
    \r\n
    \r\n

    \r\n {t.GuidelinesPageEnforcementTabFlaggedText}\r\n

    \r\n

    \r\n {t.GuidelinesPageEnforcementTabSupendText}\r\n

    \r\n

    \r\n {t.GuidelinesPageDeemedViolating}\r\n

    \r\n
    \r\n
    \r\n this.showTab(e, guidelineTabs.Guidelines)} {...renderHybrid(this.telemetryObjects.guidelinesBtnAtEnforcement, false)}> {t.CommunityGuidelinePageTabsGuidelines} \r\n
    \r\n
    \r\n
    \r\n
    \r\n }\r\n
    \r\n
    \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { getPageContentType } from \"../Social.telemetry\";\r\n\r\nexport interface ContentSocialBarTelemetryObjects {\r\n container: TelemetryObjectBase;\r\n reactionBreakdown: TelemetryObjectBase;\r\n}\r\n\r\nexport const contentSocialBarTelemetryContracts = {\r\n container: {\r\n name: \"ContentSocialBar\",\r\n type: getPageContentType()\r\n },\r\n reactionBreakdown: {\r\n type: getPageContentType()\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { TelemetryEventMap, dispatchTelemetryEvent, genericTelemetryClickDispatcher, getPageContentType } from \"../../Social.telemetry\";\r\n\r\nexport interface SocialBarPanelTelemetryObjects {\r\n likeButton: TelemetryObjectBase;\r\n activeReactionButton: TelemetryObjectBase;\r\n reactionsCount: TelemetryObjectBase;\r\n commentsButton: TelemetryObjectBase;\r\n}\r\n\r\nexport const socialBarPanelTelemetryContracts = {\r\n likeButton: {\r\n name: \"Reaction\",\r\n behavior: TelemetryBehaviorType.Like, // dynamically updated\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"Like\" // dynamically updated\r\n }\r\n },\r\n reactionsCount: {\r\n name: \"Reactions\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: TelemetryContentType.Comment,\r\n headline: \"Reactions\"\r\n }\r\n },\r\n commentsButton: {\r\n name: \"Comments\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n type: TelemetryContentType.Article,\r\n headline: \"Comments\"\r\n }\r\n }\r\n};\r\n\r\nexport const socialBarPanelTelemetryActionDispatchers = {\r\n likeButtonClick: genericTelemetryClickDispatcher,\r\n commentsButtonClick: genericTelemetryClickDispatcher,\r\n likeButtonHover: (element: any, telemetryObject: any): void => {\r\n const telemetryEventDispatcherInfo = {\r\n ...TelemetryEventMap.genericHover,\r\n contract: {...(telemetryObject && telemetryObject.contract)}\r\n };\r\n\r\n dispatchTelemetryEvent(telemetryEventDispatcherInfo, element);\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ReactionToBehaviorTypeMap, addOrUpdateTelemetryObject, getHeadlineByReactionType, renderHybrid } from \"../../Social.telemetry\";\r\nimport { SocialBarPanelTelemetryObjects, socialBarPanelTelemetryActionDispatchers, socialBarPanelTelemetryContracts } from \"./SocialBarPanel.telemetry\";\r\nimport { chevron_down, comment, thumbs_up } from \"../../utils/icons\";\r\n\r\nimport AccessibilityHelpers from \"../../utils/AccessibilityHelpers\";\r\nimport MostReactions from \"../most-reactions/MostReactions\";\r\nimport React from \"react\";\r\nimport ReactionMenu from \"../reaction-menu/ReactionMenu\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { getReactionColorClass } from \"../../utils/styleHelpers\";\r\nimport { renderEmojiByType } from \"../../utils/emojiIcons\";\r\n\r\nexport interface SocialBarPanelProps {\r\n managedClasses?: SocialClassNameContract;\r\n rating: string;\r\n onReaction: (type: string) => void;\r\n t: SocialLocalizedStrings;\r\n replyLabel?: JSX.Element;\r\n onCommentsClick: (target: HTMLElement) => void;\r\n onReactionsClick: (e: any, ref: HTMLElement) => void;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n showCommentsButton?: boolean;\r\n reactionMenuClassName?: string;\r\n responsiveClass?: string;\r\n reactionCounts?: number;\r\n label: string;\r\n theme?: string;\r\n reactionsDisabled?: boolean;\r\n}\r\n\r\ninterface SocialBarPanelState {\r\n reactionMenuVisible: boolean;\r\n isHoverSocialBarPanel: boolean;\r\n miniReactionBreakdownVisible: boolean;\r\n isHoverMiniReactionBreakdown: boolean;\r\n\r\n}\r\n\r\nexport default class SocialBarPanel extends React.Component {\r\n containerRef: React.RefObject;\r\n focusBackRef: HTMLElement;\r\n telemetryObjects: SocialBarPanelTelemetryObjects;\r\n reactionMenuTriggerRefs: Array;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n reactionMenuVisible: false,\r\n miniReactionBreakdownVisible: false,\r\n isHoverMiniReactionBreakdown: false,\r\n isHoverSocialBarPanel: true\r\n };\r\n\r\n this.containerRef = React.createRef();\r\n this.focusBackRef = null;\r\n this.reactionMenuTriggerRefs = [];\r\n }\r\n\r\n componentDidUpdate() {\r\n AccessibilityHelpers.attachAccessibilityListeners(document);\r\n }\r\n\r\n onLikeBtnClick(e, telemetryObject) {\r\n // Right Click Detection\r\n if (\"which\" in e && e.which == 3) { return; } else if (\"button\" in e && e.button == 2) { return; }\r\n\r\n const currentRating = this.props.rating || enums.reactions.like;\r\n this.props.onReaction(currentRating);\r\n\r\n this.setState({ reactionMenuVisible: false });\r\n socialBarPanelTelemetryActionDispatchers.likeButtonClick(e.currentTarget, telemetryObject);\r\n }\r\n\r\n onReactionMenuShow(target, isHover) {\r\n this.setState({ reactionMenuVisible: true, isHoverSocialBarPanel: isHover });\r\n socialBarPanelTelemetryActionDispatchers.likeButtonHover(target, this.telemetryObjects.likeButton);\r\n }\r\n\r\n onReactionMenuHide() {\r\n this.setState({reactionMenuVisible: false, isHoverSocialBarPanel: true});\r\n }\r\n\r\n reactionHandler(type) {\r\n this.props.onReaction(type);\r\n }\r\n\r\n onReactionsClick(e, ref, telemetryObject) {\r\n socialBarPanelTelemetryActionDispatchers.likeButtonClick(e.currentTarget, telemetryObject);\r\n this.setState({miniReactionBreakdownVisible: false, isHoverMiniReactionBreakdown: false});\r\n this.props.onReactionsClick(e, ref);\r\n }\r\n\r\n onReplyClick(e, telemetryObject) {\r\n document.dispatchEvent(new CustomEvent(\"cwt-comments-clicked\"));\r\n socialBarPanelTelemetryActionDispatchers.commentsButtonClick(e.currentTarget, telemetryObject);\r\n this.props.onCommentsClick(e.currentTarget);\r\n }\r\n\r\n render() {\r\n const {t, rating, replyLabel, managedClasses, showCommentsButton, reactionMenuClassName, responsiveClass, reactionCounts, label, mainTelemetryObject, theme, reactionsDisabled} = this.props;\r\n const {reactionMenuVisible, isHoverSocialBarPanel} = this.state;\r\n\r\n this.generateOrUpdateTelemetryObjects();\r\n\r\n return (\r\n \r\n { !reactionsDisabled &&\r\n \r\n { this.reactionMenuTriggerRefs.length > 0 &&\r\n this.onReactionMenuHide()}\r\n onShow={(target, isHover) => this.onReactionMenuShow(target, isHover)}\r\n isHover={isHoverSocialBarPanel}\r\n triggerElements={ this.reactionMenuTriggerRefs}\r\n {...{managedClasses, mainTelemetryObject, t, rating}}\r\n />\r\n }\r\n !ReactionMenu.touchEnabled && this.onLikeBtnClick(e, this.telemetryObjects && this.telemetryObjects.likeButton)}\r\n data-has-over={reactionMenuVisible}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.likeButton, false, el => this.reactionMenuTriggerRefs[0] = el)}\r\n >\r\n {thumbs_up}\r\n {t.EmojiLabellike}\r\n \r\n !ReactionMenu.touchEnabled && this.onLikeBtnClick(e, this.telemetryObjects && this.telemetryObjects.activeReactionButton)}\r\n data-has-over={reactionMenuVisible}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.activeReactionButton, false, el => this.reactionMenuTriggerRefs[1] = el)}\r\n >\r\n {renderEmojiByType(rating)}\r\n {(rating ? t[`EmojiLabel${rating}`] : \"\")}\r\n \r\n this.setState({reactionMenuVisible: true, isHoverSocialBarPanel: false})}> {chevron_down} \r\n \r\n }\r\n\r\n {showCommentsButton &&\r\n this.onReplyClick(e, this.telemetryObjects && this.telemetryObjects.commentsButton)}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.commentsButton, false)}\r\n >\r\n {comment}\r\n {replyLabel || t.CommentReplyBtn}\r\n \r\n }\r\n\r\n { !reactionsDisabled && this.onReactionsClick(e, this.focusBackRef, this.telemetryObjects && this.telemetryObjects.reactionsCount)}\r\n hasSeperatorBefore={true}\r\n telemetryObject={this.telemetryObjects && this.telemetryObjects.reactionsCount}\r\n customLabel={label}\r\n {...{ reactionCounts, t, managedClasses, theme}}\r\n /> }\r\n
    \r\n );\r\n }\r\n\r\n generateOrUpdateTelemetryObjects() {\r\n const { mainTelemetryObject, rating } = this.props;\r\n\r\n if (mainTelemetryObject) {\r\n const id = mainTelemetryObject.contract.content.id;\r\n const headline = (rating && getHeadlineByReactionType(rating, true));\r\n const behavior = (rating && ReactionToBehaviorTypeMap[rating]);\r\n\r\n this.telemetryObjects = {\r\n reactionsCount: addOrUpdateTelemetryObject(mainTelemetryObject, {...socialBarPanelTelemetryContracts.reactionsCount}, { id }, this.telemetryObjects && this.telemetryObjects.reactionsCount),\r\n likeButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...socialBarPanelTelemetryContracts.likeButton}, { id }, this.telemetryObjects && this.telemetryObjects.likeButton),\r\n activeReactionButton: !rating && this.telemetryObjects ? this.telemetryObjects.activeReactionButton : addOrUpdateTelemetryObject(mainTelemetryObject, {...socialBarPanelTelemetryContracts.likeButton, behavior}, { id, headline }, this.telemetryObjects && this.telemetryObjects.activeReactionButton),\r\n commentsButton: addOrUpdateTelemetryObject(mainTelemetryObject, {...socialBarPanelTelemetryContracts.commentsButton}, { id }, this.telemetryObjects && this.telemetryObjects.commentsButton)\r\n };\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { BridgeEventNames, dispatchBridgeEvent } from \"../Social.bridge\";\r\nimport { ContentSocialBarTelemetryObjects, contentSocialBarTelemetryContracts } from \"./ContentSocialBar.telemetry\";\r\nimport { hasThemeBase, isComponentDisabled } from \"../utils/themeHelpers\";\r\n\r\nimport { Content } from \"@msnews/social-data-service\";\r\nimport React from \"react\";\r\nimport SocialBarPanel from \"../common/social-bar-panel/SocialBarPanel\";\r\nimport { SocialProps } from \"../Social.props\";\r\nimport { SocialState } from \"../Social.state\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { addOrUpdateTelemetryObject } from \"../Social.telemetry\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { getContextData } from \"@msnews/core\";\r\nimport { getFlight } from \"../utils/getFlight\";\r\nimport isValidURL from \"../utils/isValidURL\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\nimport { selectContentId } from \"../utils/contentIdKey\";\r\n\r\ninterface ContentSocialBarState {\r\n loaded: boolean;\r\n}\r\n\r\nexport interface ContentSocialBarProps extends SocialProps {\r\n content?: Content;\r\n}\r\n\r\nconst mapStateToProps = function (state: SocialState, props: SocialProps) {\r\n const contentId = selectContentId(state.contentIds, props.id, props.market);\r\n return {\r\n content: state.contents && state.contents[contentId]\r\n };\r\n};\r\n\r\nexport class ContentSocialBar extends React.Component {\r\n containerRef: React.RefObject;\r\n telemetryObjects: ContentSocialBarTelemetryObjects;\r\n isReactionsDisabled: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n loaded: false\r\n };\r\n this.containerRef = React.createRef();\r\n this.isReactionsDisabled = this.isCommentsOnly();\r\n }\r\n\r\n componentDidMount() {\r\n this.props.socialBarConnector.onSocialBarComponentConnected({ id: this.props.id, market: this.props.market });\r\n this.disableSuperAppBodyScrollbar();\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.id != null && this.props.market != null && prevProps.id != this.props.id || prevProps.market != this.props.market) {\r\n this.props.socialBarConnector.onSocialBarComponentConnected({ id: this.props.id, market: this.props.market });\r\n }\r\n }\r\n\r\n render() {\r\n const { t, managedClasses, users, responsiveClass, mainTelemetryObject, id, content, theme } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n if (!content) { return null; }\r\n const { commentStatus, reactionCounts, totalCommentCount, rating, friendRatings, commentWhiteListSegments, commentBlackListSegments, url } = content;\r\n\r\n const showCommentsButton = commentStatus != \"Off\" &&\r\n isValidURL(getContextData(this.props.requestContext.data.locationHref, \"locationHref\"), url, commentWhiteListSegments, commentBlackListSegments);\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n container: addOrUpdateTelemetryObject(mainTelemetryObject, contentSocialBarTelemetryContracts.container, { id }, this.telemetryObjects && this.telemetryObjects.container),\r\n reactionBreakdown: addOrUpdateTelemetryObject(mainTelemetryObject, contentSocialBarTelemetryContracts.reactionBreakdown, { id }, this.telemetryObjects && this.telemetryObjects.reactionBreakdown)\r\n };\r\n\r\n // Reaction Counts\r\n const totalReactionCount = reactionCounts ? Object.values(reactionCounts).reduce(($sum, $count) => $sum + $count, 0) : 0;\r\n const reactionCountsVisible = totalReactionCount > 0;\r\n let label = `${totalReactionCount}`;\r\n const widthExists = (this.containerRef && this.containerRef.current) ? this.containerRef.current.offsetWidth > 700 : false;\r\n if (widthExists && users && friendRatings && Object.keys(friendRatings).length > 0) {\r\n const friendNames = Object.keys(friendRatings).slice(0, 2).map(x => users[x].data.primaryName);\r\n label = friendNames.join(\", \");\r\n if (totalReactionCount > friendNames.length) {\r\n label = String.Format(t.SocialBarNamesAndMoreTxt, {\r\n count: `${totalReactionCount - friendNames.length}`,\r\n names: friendNames.join(\", \")\r\n });\r\n }\r\n }\r\n\r\n return (\r\n \r\n \r\n {String.Format((!totalCommentCount || totalCommentCount > 1) ? t.SocialBarCommentsPlural : t.SocialBarCommentsSingular, {\r\n count: (totalCommentCount || \"\")\r\n })}\r\n }\r\n onCommentsClick={this.commentsClickHandler.bind(this)}\r\n onReactionsClick={this.onReactionsClick.bind(this)}\r\n showCommentsButton={showCommentsButton}\r\n reactionCounts={reactionCounts}\r\n label={label}\r\n reactionsDisabled={this.isReactionsDisabled}\r\n {...{t, rating, managedClasses, theme, mainTelemetryObject: this.telemetryObjects && this.telemetryObjects.container, responsiveClass}}\r\n />\r\n
    \r\n );\r\n }\r\n\r\n onReactionsClick(e, ref) {\r\n const contentId = this.props.content && this.props.content.id;\r\n this.props.popupConnector.openPopup(\"reactionBreakdownContent\", { id: contentId, cornerPosition: {top: \"36px\"}, focusBackRef: ref,\r\n parentTelemetryObject: this.telemetryObjects && this.telemetryObjects.reactionBreakdown});\r\n }\r\n\r\n /* REACTIONS */\r\n reactionHandler(type) {\r\n const content = this.props.content;\r\n if (!content) { return; }\r\n\r\n const sendContentReaction = this.props.socialBarConnector.sendContentReaction;\r\n const reset = content.rating == type;\r\n sendContentReaction(content, type, reset);\r\n }\r\n\r\n /* COMMENTS */\r\n commentsClickHandler(target) {\r\n if (isComponentDisabled(this.props.theme, \"reactionbreakdowncontent\")) {\r\n dispatchBridgeEvent(BridgeEventNames.commentsClicked);\r\n } else {\r\n document.location.href = document.location.href.replace(\"#comments\", \"\")+\"#comments\";\r\n }\r\n return false;\r\n }\r\n\r\n disableSuperAppBodyScrollbar() {\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n if (isSuperApp) { document.body.style.overflow = \"hidden\"; }\r\n }\r\n\r\n isCommentsOnly() {\r\n return getFlight(enums.flights.contentCommentsOnly);\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ContentSocialBar);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { appEnvironment } from \"@msnews/core\";\r\n\r\nexport function getFlight(flightId): boolean {\r\n if (appEnvironment.CurrentRequestTargetScope && appEnvironment.CurrentRequestTargetScope.pageExperiments && flightId) {\r\n const experiments = appEnvironment.CurrentRequestTargetScope.pageExperiments;\r\n return !!experiments.find(x => x && x.toLowerCase() == flightId.toLowerCase());\r\n }\r\n return false;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport function getExtension(fileName: string) {\r\n const parts = fileName.split(\".\");\r\n if (parts.length === 1 || (parts[0] === \"\" && parts.length === 2)) {\r\n return \"\";\r\n }\r\n return parts.pop().toLowerCase();\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, Button, OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\n\r\nimport React from \"react\";\r\nimport { SocialLocalizedStrings } from \"../Social.localizedStrings\";\r\nimport { SocialProps } from \"../Social.props\";\r\nimport { SocialService } from \"@msnews/social-data-service\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { close } from \"../utils/icons\";\r\nimport { getExtension } from \"../utils/fileHelpers\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\nexport interface CopyrightFormProps extends SocialProps {\r\n reportType: string;\r\n reportItemType?: string;\r\n onReport?: (key: string, e: any) => void;\r\n t: SocialLocalizedStrings;\r\n}\r\n\r\nconst MaxFileSize = 1024 * 1024 * 10; // bytes\r\nconst MaxFileCount = 10;\r\nconst AcceptedAttachmentTypes = [\".pdf\", \".txt\", \".docx\", \".msg\", \".xlsx\", \".xls\"];\r\n\r\nenum FileUploadState {\r\n waiting = \"waiting\",\r\n uploading = \"uploading\",\r\n uploaded = \"uploaded\",\r\n failed = \"failed\"\r\n}\r\nfunction getFileUploadStateString(uploadState: FileUploadState, t: SocialLocalizedStrings) {\r\n return {\r\n [FileUploadState.waiting]: t.CopyrightFormFileWaiting || \"Waiting\",\r\n [FileUploadState.uploading]: t.CopyrightFormFileUploading || \"Uploading\",\r\n [FileUploadState.uploaded]: t.CopyrightFormFileUploaded || \"Uploaded\",\r\n [FileUploadState.failed]: t.CopyrightFormFileUploadFailed || \"Failed\"\r\n }[uploadState];\r\n}\r\n\r\nenum FileUploadFailureReason {\r\n size = \"size\",\r\n format = \"format\",\r\n count = \"count\",\r\n other = \"other\"\r\n}\r\nfunction getFileUploadFailureString(failureReason: FileUploadFailureReason, t: SocialLocalizedStrings) {\r\n return {\r\n [FileUploadFailureReason.size]: t.CopyrightFormFileSizeFailure || \"File size exceeds 10MB\",\r\n [FileUploadFailureReason.format]: t.CopyrightFormFileFormatFailure || \"File format is not supported\",\r\n [FileUploadFailureReason.count]: t.CopyrightFormFileCountFailure || \"Maximum 10 files can be uploaded\",\r\n [FileUploadFailureReason.other]: t.CopyrightFormFileOtherFailure || \"Something went wrong, try again\"\r\n }[failureReason];\r\n}\r\n\r\ninterface FileState {\r\n fileName?: string\r\n uploadState?: FileUploadState,\r\n uploadFailureReason?: FileUploadFailureReason,\r\n fileId?: string,\r\n}\r\n\r\ninterface CopyrightFormState {\r\n step: number;\r\n contactInfo: {\r\n firstName: string;\r\n lastName: string;\r\n email: string\r\n },\r\n details: {\r\n authorizedExample: string;\r\n description: string\r\n },\r\n files: {[key: string]: FileState},\r\n formIsValid: boolean,\r\n validationErrors: {\r\n firstNameError: string;\r\n lastNameError: string;\r\n emailError: string;\r\n emailSyntaxError: string;\r\n authorizedError: string;\r\n descriptionError: string;\r\n }\r\n}\r\nconst step2DefaultState = {\r\n contactInfo: {\r\n firstName: \"\",\r\n lastName: \"\",\r\n email: \"\"\r\n },\r\n details: {\r\n authorizedExample: \"\",\r\n description: \"\"\r\n },\r\n files: {},\r\n formIsValid: false,\r\n validationErrors: {\r\n firstNameError: \"\",\r\n lastNameError: \"\",\r\n emailError: \"\",\r\n emailSyntaxError: \"\",\r\n authorizedError: \"\",\r\n descriptionError: \"\"\r\n }\r\n};\r\nexport default class CopyrightForm extends React.Component {\r\n fileUploadAction: React.RefObject;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state= {\r\n step: 0,\r\n ...step2DefaultState\r\n };\r\n this.fileUploadAction = React.createRef();\r\n }\r\n\r\n handleValidation() {\r\n const {contactInfo, details} = this.state;\r\n const {t} = this.props;\r\n\r\n const defaultInvalidMessage = t.CopyrightFormRequiredField;\r\n\r\n const getErrorValue = (field) => !field ? defaultInvalidMessage : \"\";\r\n\r\n const isEmailValid = (email) => {\r\n return typeof email !== \"undefined\" && !!email && /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$/.test(email);\r\n };\r\n\r\n const calculatedErrors = {\r\n firstNameError: getErrorValue(contactInfo.firstName),\r\n lastNameError: getErrorValue(contactInfo.lastName),\r\n emailError: getErrorValue(contactInfo.email),\r\n emailSyntaxError: !isEmailValid(contactInfo.email) ? t.CopyrightFormEmailValidation : \"\",\r\n authorizedError: getErrorValue(details.authorizedExample),\r\n descriptionError: getErrorValue(details.description)\r\n };\r\n\r\n const hasError = Object.values(calculatedErrors).some(err => err != \"\");\r\n\r\n this.setState({\r\n validationErrors: calculatedErrors,\r\n formIsValid: !hasError\r\n });\r\n\r\n return !hasError;\r\n }\r\n\r\n updateFileState(fileKey: string, fileName: string, uploadState?: FileUploadState, fileId?: string, uploadFailureReason?: FileUploadFailureReason) {\r\n this.setState(prevState => {\r\n const files = prevState.files;\r\n const fileState: FileState = files[fileKey] || {};\r\n return {\r\n files: {\r\n ...files,\r\n [fileKey]: {\r\n fileName: fileName,\r\n uploadState: uploadState ? uploadState : fileState.uploadState,\r\n fileId: fileId ? fileId : fileState.fileId,\r\n uploadFailureReason: uploadFailureReason ? uploadFailureReason : fileState.uploadFailureReason\r\n }\r\n }\r\n };\r\n });\r\n }\r\n\r\n async fileSelectHandler(e) {\r\n if (e && e.target && e.target.files && e.target.files.length > 0) {\r\n const eventTarget = e.target;\r\n const selectedFiles = eventTarget.files;\r\n const getFileKey = (file: File) => `${file.name}-${file.lastModified}-${file.size}`;\r\n\r\n Object.values(selectedFiles).forEach(\r\n (file: File) => {\r\n const fileKey = getFileKey(file);\r\n if (!this.state.files[fileKey]) {\r\n this.updateFileState(getFileKey(file), file.name, FileUploadState.waiting);\r\n }\r\n }\r\n );\r\n\r\n for (let i = 0; i < selectedFiles.length; i++) {\r\n const file = selectedFiles[i];\r\n const fileKey = getFileKey(file);\r\n const fileExtension = getExtension(file.name);\r\n const isFileAlreadyHandled = this.state.files[fileKey] && this.state.files[fileKey].uploadState !== FileUploadState.waiting;\r\n const uploadedFileCount = Object.values(this.state.files).filter(f => f.uploadState === FileUploadState.uploaded).length;\r\n const updateFileState = this.updateFileState.bind(this, fileKey, file.name);\r\n\r\n if (!isFileAlreadyHandled) {\r\n if (file.size > MaxFileSize) {\r\n updateFileState(FileUploadState.failed, undefined, FileUploadFailureReason.size);\r\n } else if (!AcceptedAttachmentTypes.includes(`.${fileExtension}`)) {\r\n updateFileState(FileUploadState.failed, undefined, FileUploadFailureReason.format);\r\n } else if (uploadedFileCount >= MaxFileCount) {\r\n updateFileState(FileUploadState.failed, undefined, FileUploadFailureReason.count);\r\n } else {\r\n try {\r\n updateFileState(FileUploadState.uploading);\r\n const fileId = await SocialService.uploadCopyrightFile(file);\r\n updateFileState(FileUploadState.uploaded, fileId);\r\n } catch (error) {\r\n logger.logError(`Social experience comment report copyright form file upload failed! The reason: ${error}`);\r\n updateFileState(FileUploadState.failed, undefined, FileUploadFailureReason.other);\r\n }\r\n }\r\n }\r\n }\r\n eventTarget.value = null; // This is necessary to able to select the same file twice. (See: https://stackoverflow.com/questions/12030686)\r\n }\r\n }\r\n\r\n submitForm(e) {\r\n e.preventDefault();\r\n if (this.handleValidation()) {\r\n const intellectualPropertyReportParams = {\r\n reportMessage: this.state.details.description,\r\n intellectualPropertyDetails: {\r\n FirstName: this.state.contactInfo.firstName,\r\n LastName: this.state.contactInfo.lastName,\r\n EmailAddress: this.state.contactInfo.email,\r\n AuthorizedExample: this.state.details.authorizedExample,\r\n AttachedFiles: Object.values(this.state.files).filter(file => file.uploadState === FileUploadState.uploaded).map(file => file.fileId)\r\n }\r\n };\r\n if (this.props.reportItemType) {\r\n SocialService.reportUser(this.props.id, this.props.reportItemType, this.props.reportType, intellectualPropertyReportParams);\r\n } else {\r\n SocialService.reportComment(this.props.id, this.props.reportType, intellectualPropertyReportParams);\r\n }\r\n this.props.onReport && this.props.onReport(this.props.reportType, e);\r\n this.props.popupConnector.closePopup();\r\n }\r\n }\r\n\r\n handleContactInfoOnChange(e) {\r\n const fieldName = e.target.name;\r\n this.setState({\r\n ...this.state,\r\n contactInfo: {\r\n ...this.state.contactInfo,\r\n [fieldName]: e.target.value\r\n },\r\n validationErrors: {\r\n ...this.state.validationErrors,\r\n [fieldName + \"Error\"]: \"\",\r\n emailSyntaxError: fieldName === \"email\" ? \"\" : this.state.validationErrors.emailSyntaxError\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n return (this.state.step == 0 && this.step0()) || (this.state.step == 1 && this.step1());\r\n }\r\n\r\n step0() {\r\n const {managedClasses, t, reportType, reportItemType} = this.props;\r\n return (\r\n
    \r\n
    \r\n
    \r\n

    {t.CopyrightFormCheckTxt}

    \r\n

    {t.CopyrightFormCheckSubTxt}

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n {this.renderButtonField(() => this.props.popupConnector.closePopup(), t.DeleteDataCancel, () => this.setState({...this.state, step: 1}), t.CopyrightFormYesContinueButton)}\r\n
    \r\n );\r\n }\r\n\r\n step1() {\r\n const {managedClasses, t}=this.props;\r\n const {firstName, lastName, email}=this.state.contactInfo;\r\n const {authorizedExample, description}=this.state.details;\r\n const {firstNameError, lastNameError, emailError, authorizedError, descriptionError} = this.state.validationErrors;\r\n const fileCount = Object.keys(this.state.files).length;\r\n const waitingOrUploadingFileCount = Object.values(this.state.files).filter(\r\n f => f.uploadState === FileUploadState.waiting || f.uploadState === FileUploadState.uploading\r\n ).length;\r\n const acceptedAttachmentTypes = AcceptedAttachmentTypes.join(\", \");\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n

    {t.CopyrightFormMainTxt}

    \r\n

    {t.CopyrightFormMainSubTxt}

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    {t.CopyrightFormContactInfoTitle}
    \r\n {this.renderInputField(t.CopyrightFormContactInfoFirstName, \"firstName\", firstName, firstNameError)}\r\n {this.renderInputField(t.CopyrightFormContactInfoLastName, \"lastName\", lastName, lastNameError)}\r\n {this.renderInputField(t.CopyrightFormContactInfoEmail, \"email\", email, emailError)}\r\n { (this.state.validationErrors.emailSyntaxError) && {t.CopyrightFormEmailValidation} }\r\n
    \r\n
    \r\n
    \r\n
    {t.CopyrightFormDetailsTitle}
    \r\n
    \r\n \r\n

    {t.CopyrightFormAuthorizedExampleSubTxt}

    \r\n this.setState({...this.state, details: {...this.state.details, [e.target.name]: e.target.value}, validationErrors: {...this.state.validationErrors, authorizedError: \"\"}})}>\r\n
    \r\n
    \r\n \r\n

    {t.CopyrightFormDescriptionSubTxt}

    \r\n \r\n
    \r\n
    \r\n \r\n

    {t.CopyrightFormAttachmentsSubTxt}

    \r\n
    \r\n \r\n this.fileUploadAction.current.click()}>{t.CopyrightFormUploadFileButton}\r\n {fileCount > 0 ?\r\n Object.keys(this.state.files).map(fileKey => {\r\n const fileState = this.state.files[fileKey];\r\n return (\r\n \r\n \r\n {fileState.fileName} ∙ {getFileUploadStateString(fileState.uploadState, t)} {fileState.uploadState === FileUploadState.failed && ` (${getFileUploadFailureString(fileState.uploadFailureReason, t)})`}\r\n \r\n \r\n \r\n );\r\n }) :\r\n { t.CopyrightFormNoFileChosen }\r\n }\r\n
    \r\n
    \r\n

    {t.CopyrightFormAttachmentsInfoTxt}

    \r\n
    \r\n
    \r\n this.setState({...this.state, ...step2DefaultState})}>{t.CopyrightFormResetButton}\r\n 0} className={classNames(\r\n \"cwt-fast-button\"\r\n )} onClick={this.submitForm.bind(this)}>{t.CopyrightFormSubmitButton}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderInputField(label, inputName, inputValue, error) {\r\n const {t} = this.props;\r\n return (\r\n
    \r\n \r\n this.handleContactInfoOnChange(e)}>\r\n
    \r\n );\r\n }\r\n\r\n renderButtonField(onClick, btnName, onClick1, btnName1) {\r\n return (\r\n
    \r\n {btnName}\r\n {btnName1}\r\n
    \r\n );\r\n }\r\n\r\n removeFile(fileKey: string) {\r\n const newFiles = {...this.state.files};\r\n delete newFiles[fileKey];\r\n this.setState({files: newFiles});\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { appEnvironment, Environment } from \"@msnews/core\";\r\n\r\nconst prodSdkUrl = \"https://webxtsvc.microsoft.com/js/pack/xpaySubscription.js\";\r\nconst intSdkUrl = \"https://xpay-int.microsoft.com/js/pack/xpaySubscription.js\";\r\n\r\nlet subscriptionContainerId: string;\r\nexport const getSubscriptionContainerId = () => subscriptionContainerId;\r\n\r\n// SDK is already initialized if `subscriptionContainerId` has a value\r\nconst isAlreadyInitialized = (): boolean => !!subscriptionContainerId;\r\n\r\n// `sdkLoaded` promise is resolved when the SDK source file is loaded\r\nlet sdkLoadedResolver: (value: boolean) => void;\r\nexport const sdkLoaded: Promise = new Promise(resolve => {\r\n sdkLoadedResolver = resolve;\r\n});\r\n\r\nfunction getSdkUrl (): string {\r\n switch (appEnvironment.Environment) {\r\n case Environment.int:\r\n case Environment.int1:\r\n case Environment.intpr:\r\n case Environment.intpef:\r\n return intSdkUrl;\r\n case Environment.prod:\r\n default:\r\n return prodSdkUrl;\r\n }\r\n}\r\n\r\nexport function initializeSubscriptionSdk () {\r\n if (!isAlreadyInitialized()) {\r\n const sdkScript = document.createElement(\"script\");\r\n sdkScript.onload = () => sdkLoadedResolver(true);\r\n sdkScript.src = getSdkUrl();\r\n sdkScript.defer = true;\r\n document.body.appendChild(sdkScript);\r\n\r\n subscriptionContainerId = \"subscription-sdk-container\";\r\n const subscriptionContainer = document.createElement(\"div\");\r\n subscriptionContainer.id = subscriptionContainerId;\r\n document.body.appendChild(subscriptionContainer);\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { appEnvironment, Environment } from \"@msnews/core\";\r\n\r\nimport {\r\n CreateSubscriptionParams, ManageSubscriptionParams, LinkToPublisherParams,\r\n GetSubscriptionStatusParams, GetSubscriptionStatusResponse,\r\n GetSubscriptionsParams, GetSubscriptionsResponse,\r\n GetTransactionHistoryParams, GetTransactionHistoryResponse,\r\n UnlinkPublisherParams\r\n} from \"./Interfaces\";\r\nimport { getSubscriptionContainerId, sdkLoaded } from \"./Initialization\";\r\n\r\nexport async function renderCreateSubscription (params: CreateSubscriptionParams) {\r\n return callSdkFunction(\"renderCreateSubscription\", params);\r\n}\r\n\r\nexport async function renderManageSubscription (params: ManageSubscriptionParams) {\r\n return callSdkFunction(\"renderManageSubscription\", params);\r\n}\r\n\r\nexport async function renderLinkToPublisher(params: LinkToPublisherParams) {\r\n return callSdkFunction(\"renderLinkToPublisher\", params);\r\n}\r\n\r\nexport async function getSubscriptionStatus (params: GetSubscriptionStatusParams): Promise {\r\n return callSdkFunction(\"getSubscriptionStatus\", params);\r\n}\r\n\r\nexport async function getSubscriptions (params: GetSubscriptionsParams): Promise {\r\n return callSdkFunction(\"getSubscriptions\", params);\r\n}\r\n\r\nexport async function getTransactionHistory (params: GetTransactionHistoryParams): Promise {\r\n return callSdkFunction(\"getTransactionHistory\", params);\r\n}\r\n\r\nexport async function unlinkPublisher (params: UnlinkPublisherParams): Promise {\r\n return callSdkFunction(\"unlinkPublisher\", params);\r\n}\r\n\r\nexport const ProductType = Object.freeze({\r\n Basic: 0,\r\n Advanced: 1,\r\n Premium: 2\r\n});\r\n\r\nexport const MsnProductType = Object.freeze({\r\n Undefined: 0,\r\n Basic: 1,\r\n Advanced: 2,\r\n Premium: 3\r\n});\r\n\r\nexport function mapSdkProductTypeToMsnProductType(sdkProductType: number) {\r\n return sdkProductType + 1;\r\n}\r\n\r\nexport function mapMsnProductTypeToSdkProductType(msnProductType: number) {\r\n return msnProductType - 1;\r\n}\r\n\r\nexport const EnvList = {\r\n PROD: 0,\r\n CI: 1,\r\n TEST: 2,\r\n INT: 3\r\n};\r\n\r\nasync function callSdkFunction (functionName: string, params) {\r\n await sdkLoaded;\r\n const func = window.xpaySubscription[functionName];\r\n params = await ensureRequiredParams(params);\r\n return func(params);\r\n}\r\n\r\nasync function ensureRequiredParams (params) {\r\n return {\r\n ...params,\r\n env: params.env ? params.env : getSdkEnv(),\r\n tileContainerId: getSubscriptionContainerId()\r\n };\r\n}\r\n\r\nfunction getSdkEnv (): number {\r\n switch (appEnvironment.Environment) {\r\n case Environment.int:\r\n case Environment.int1:\r\n case Environment.intpr:\r\n case Environment.intpef:\r\n return EnvList.INT;\r\n case Environment.prod:\r\n default:\r\n return EnvList.PROD;\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { getExternalURL } from \"../../utils/urlHelper\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { initializeSubscriptionSdk, renderCreateSubscription, MsnProductType, ProductType, getSubscriptionStatus } from \"@msnews/subscription-sdk-wrapper\";\r\nimport { getXPayToken } from \"@msnews/social-data-service\";\r\n\r\nexport interface GradientOverlayProps extends SocialProps {\r\n buttonText?: string;\r\n height?: string;\r\n}\r\n\r\ninterface GradientOverlayState {\r\n gradientActive: boolean;\r\n buttonVisible: boolean;\r\n componentActive: boolean;\r\n}\r\n\r\nexport default class GradientOverlay extends React.Component {\r\n private subscriptionChecked: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n gradientActive: true,\r\n buttonVisible: true,\r\n componentActive: false\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n initializeSubscriptionSdk();\r\n const { me, gradientOverlayData } = this.props;\r\n if (!me) {\r\n this.props.usersConnector.fetchMe();\r\n } else if (gradientOverlayData) {\r\n this.checkSubscription();\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n const { me, gradientOverlayData } = this.props;\r\n if (!this.subscriptionChecked && me && gradientOverlayData) {\r\n this.checkSubscription();\r\n }\r\n }\r\n\r\n async checkSubscription() {\r\n this.subscriptionChecked = true;\r\n const { me, gradientOverlayData } = this.props;\r\n if (gradientOverlayData.subscriptionProductType === MsnProductType.Premium) {\r\n const isAnonymous = me && me.state == enums.userStateType.anonymous;\r\n if (isAnonymous) {\r\n this.activateComponent();\r\n } else {\r\n if (!gradientOverlayData.publisherId) {\r\n this.activateComponent();\r\n }\r\n getSubscriptionStatus({\r\n authToken: await getXPayToken(),\r\n publisherId: gradientOverlayData.publisherId\r\n }).then(response => {\r\n if (!response.status) {\r\n console.error(\"Something went wrong while getting subscription status.\");\r\n this.activateComponent();\r\n } else if (response.status && !response.data) {\r\n this.activateComponent();\r\n }\r\n }).catch(() => {\r\n this.activateComponent();\r\n });\r\n }\r\n }\r\n }\r\n\r\n activateComponent() {\r\n document.body.style.overflow = \"hidden\";\r\n this.setState(() => ({ componentActive: true }));\r\n }\r\n\r\n async onButtonClick(e) {\r\n const { gradientOverlayData, me, market } = this.props;\r\n const isAnonymous = me && me.state == enums.userStateType.anonymous;\r\n if (isAnonymous) {\r\n return this.props.popupConnector.openPopup(\"multiLoginPage\");\r\n }\r\n renderCreateSubscription({\r\n publisherId: gradientOverlayData.publisherId,\r\n publisherName: gradientOverlayData.publisherName,\r\n publisherLogoUrl: gradientOverlayData.publisherLogoUrl,\r\n productType: ProductType.Premium,\r\n userProfilePageUrl: getExternalURL(`${enums.externalUrls.profilePage}${me.id}`, market),\r\n locale: market,\r\n authToken: await getXPayToken(),\r\n userProfileImageUrl: me.primaryAvatar,\r\n scenario: \"article\",\r\n onSuccess: () => {\r\n window.location.reload();\r\n }\r\n });\r\n this.setState(() => ({ componentActive: false }));\r\n }\r\n\r\n render() {\r\n const { t, managedClasses, buttonText, gradientOverlayData } = this.props;\r\n if (!gradientOverlayData || !this.state.componentActive) { return null; }\r\n\r\n const deactivateButtonText = buttonText || t.OverlayGradientSubscribeText;\r\n\r\n const maxHeightStyles = this.props.height ? {\r\n overflow: this.state.componentActive ? \"hidden\" : \"visible\",\r\n maxHeight: this.props.height,\r\n height: this.props.height\r\n } : {};\r\n\r\n return (\r\n \r\n
    this.onButtonClick(e)}\r\n onMouseEnter={(e) => this.hideOverlay(e) }\r\n onMouseLeave={(e) => this.setState({gradientActive: true && this.state.componentActive}\r\n )}>\r\n
    \r\n
    \r\n { this.state.buttonVisible && \r\n }\r\n
    \r\n );\r\n }\r\n\r\n hideOverlay(e) {\r\n this.setState({gradientActive: false});\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { genericTelemetryClickDispatcher, getPageContentType } from \"../Social.telemetry\";\r\n\r\nexport interface MultiLoginPageTelemetryObjects {\r\n main: TelemetryObjectBase;\r\n loginMicrosoft: TelemetryObjectBase;\r\n loginGoogle: TelemetryObjectBase;\r\n loginFacebook: TelemetryObjectBase;\r\n}\r\n\r\nexport const multiLoginPageTelemetryContracts = {\r\n /**\r\n * Comments-Scenario 4b\r\n * */\r\n main: {\r\n name: \"LoginSelectMethod\",\r\n content: {\r\n type: getPageContentType()\r\n }\r\n },\r\n /** Comments-Scenario 4ci */\r\n loginMicrosoft: {\r\n name: \"ContinueWithMicrosoft\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"ContinueWithMicrosoft\"\r\n }\r\n },\r\n /** Comments-Scenario 4cii */\r\n loginGoogle: {\r\n name: \"ContinueWithGoogle\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"ContinueWithGoogle\"\r\n }\r\n },\r\n /** Comments-Scenario 4cii */\r\n loginFacebook: {\r\n name: \"ContinueWithFacebook\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"ContinueWithFacebook\"\r\n }\r\n }\r\n};\r\n\r\nexport const multiLoginPageTelemetryActionDispatchers = {\r\n genericClick: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\nconst defaultIds = {\r\n fbClientId: \"223505105588011\",\r\n googleClientId: \"967108317934-brcub79f1q5gt8mniu3e912rtrdtmfor.apps.googleusercontent.com\"\r\n};\r\n\r\nasync function facebookLogin(fbClientId?: string): Promise {\r\n fbClientId = fbClientId || defaultIds.fbClientId;\r\n return new Promise((resolve, reject) => {\r\n const callback = function() {\r\n if (window.FB) {\r\n window.FB.login((response) => {\r\n if (response && response.authResponse) {\r\n window.FB.api(\"/me\", {fields: \"email\" }, (response) => {\r\n if (response && response.email) {\r\n return resolve(response.email);\r\n }\r\n return reject();\r\n }\r\n );\r\n } else {\r\n // User cancelled login or did not fully authorize.\r\n return reject();\r\n }\r\n }, {scope: \"email\"});\r\n return;\r\n }\r\n };\r\n\r\n if (window.FB) {\r\n window.FB.init({\r\n appId: fbClientId\r\n });\r\n callback();\r\n return;\r\n }\r\n window.fbAsyncInit = function() {\r\n window.FB.init({\r\n appId: fbClientId,\r\n cookie: true, // This is important, it's not enabled by default\r\n version: \"v7.0\"\r\n });\r\n callback();\r\n };\r\n\r\n (function(d, s, id) {\r\n const fjs = d.getElementsByTagName(s)[0];\r\n if (d.getElementById(id)) { return; }\r\n const js = d.createElement(s); js.id = id;\r\n js.src = \"https://connect.facebook.net/en_US/sdk.js\";\r\n fjs.parentNode.insertBefore(js, fjs);\r\n }(document, \"script\", \"facebook-jssdk\"));\r\n });\r\n}\r\n\r\nasync function googleLogin(googleClientId?: string): Promise {\r\n googleClientId = googleClientId || defaultIds.googleClientId;\r\n return new Promise((resolve, reject) => {\r\n const loginAndGetPassword = function() {\r\n window.auth2.signIn().then(() => {\r\n const email = getEmailFromActiveSession();\r\n if (email) {\r\n return resolve(email);\r\n }\r\n // Email consent is not given\r\n reject();\r\n }).catch((e) => {\r\n // Login failed\r\n reject(e);\r\n });\r\n };\r\n\r\n const getEmailFromActiveSession = function() {\r\n try {\r\n return window.auth2.currentUser.get().getBasicProfile().getEmail();\r\n } catch (e) {\r\n return null;\r\n }\r\n };\r\n\r\n if (window.auth2) {\r\n const email = getEmailFromActiveSession();\r\n if (email) {\r\n return resolve(email);\r\n }\r\n loginAndGetPassword();\r\n return;\r\n }\r\n\r\n window.googleInit = function() {\r\n window.gapi.load(\"auth2\", function() {\r\n window.auth2 = window.gapi.auth2.init({\r\n client_id: googleClientId,\r\n scope: \"email\"\r\n });\r\n loginAndGetPassword();\r\n });\r\n };\r\n\r\n (function(d, s, id) {\r\n const fjs = d.getElementsByTagName(s)[0];\r\n if (d.getElementById(id)) { return; }\r\n const js = d.createElement(s); js.id = id;\r\n js.src = \"https://apis.google.com/js/platform.js?onload=googleInit\";\r\n fjs.parentNode.insertBefore(js, fjs);\r\n }(document, \"script\", \"google-jssdk\"));\r\n });\r\n}\r\n\r\nfunction msaLogin(email?: string, market?: string, replyUrl?: string, isSignup?: boolean): Promise {\r\n market = market || \"en-us\";\r\n replyUrl = replyUrl || `https://www.msn.com/${market}/settings`;\r\n const redirectLink = `https://www.msn.com/${market}/homepage/Secure/Passport?ru=${encodeURIComponent(replyUrl)}?pfr=1`;\r\n const baseUrl = isSignup ? \"http://signup.live.com/signup.aspx\" : \"https://login.live.com/login.srf\";\r\n const url = `${baseUrl}?${email ? `username=${encodeURIComponent(email)}` : \"\"}&wa=wsignin1.0&wp=LBI&wreply=${encodeURIComponent(redirectLink)}`;\r\n\r\n window.msaLoginWindow = window.open(url, \"_blank\", \"width=400,height=450\");\r\n return new Promise((resolve, reject) => {\r\n window.listenMSALoginWindow = () => {\r\n if (!window.msaLoginWindow) {\r\n // Login window is not available anymore\r\n return reject();\r\n }\r\n try {\r\n if (window.msaLoginWindow &&\r\n window.msaLoginWindow.location.href &&\r\n window.msaLoginWindow.location.href.indexOf(replyUrl) == 0 &&\r\n window.msaLoginWindow.document.body) {\r\n // Login sucessfully completed.\r\n window.msaLoginWindow.close();\r\n return resolve();\r\n }\r\n } catch (e) {\r\n // Login in progress keep retrying\r\n }\r\n setTimeout(() => { window.listenMSALoginWindow(); }, 500);\r\n };\r\n window.listenMSALoginWindow();\r\n });\r\n}\r\n\r\nexport { facebookLogin, googleLogin, msaLogin };","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { MultiLoginPageTelemetryObjects, multiLoginPageTelemetryActionDispatchers, multiLoginPageTelemetryContracts } from \"./MultiLoginPage.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../Social.telemetry\";\r\nimport { facebookLogin, googleLogin, msaLogin } from \"../utils/socialMedia\";\r\nimport { logoImages, placeholderImages } from \"../utils/images\";\r\n\r\nimport { OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../Social.props\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { getContextData } from \"@msnews/core\";\r\nimport { renderToString } from \"react-dom/server\";\r\n\r\nexport default class MultiLoginPage extends React.Component {\r\n containerRef: HTMLDivElement;\r\n telemetryObjects: MultiLoginPageTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n async loginWith(event, loginType: string, telemetryObject): Promise {\r\n multiLoginPageTelemetryActionDispatchers.genericClick(event.currentTarget, telemetryObject);\r\n\r\n let email = null;\r\n try {\r\n if (loginType == \"facebook\") {\r\n email = await facebookLogin();\r\n } else if (loginType == \"google\") {\r\n email = await googleLogin();\r\n }\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n if (loginType != \"microsoft\" && !email) {\r\n return;\r\n } else if (loginType != \"microsoft\" && email) {\r\n this.props.popupConnector.openPopup(\"onboardingThirdPartyPage\", { email, loginType, contentId: this.props.contentId });\r\n return;\r\n }\r\n\r\n try {\r\n const requestContext = this.props.requestContext;\r\n const locationHref = getContextData(requestContext.data.locationHref, \"locationHref\");\r\n await msaLogin(email, this.props.market, locationHref.split(\"?\")[0]);\r\n this.props.usersConnector.fetchMe();\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.me.isSocialUser) {\r\n this.props.popupConnector.closePopup();\r\n } else if (this.props.me.name) {\r\n this.props.popupConnector.openPopup(\"onboardingPage\", { contentId: this.props.contentId });\r\n }\r\n }\r\n\r\n render() {\r\n const { managedClasses, market, t, mainTelemetryObject, contentId, contents } = this.props;\r\n const cmsId = contentId && contents && contents[contentId] && contents[contentId].cmsId;\r\n\r\n /** Generate Telemetry Objects */\r\n const containerTelemetryObject= addOrUpdateTelemetryObject(mainTelemetryObject, multiLoginPageTelemetryContracts.main, { id: cmsId }, this.telemetryObjects && this.telemetryObjects.main);\r\n this.telemetryObjects = {\r\n main: containerTelemetryObject,\r\n loginMicrosoft: addOrUpdateTelemetryObject(containerTelemetryObject, multiLoginPageTelemetryContracts.loginMicrosoft, { id: cmsId }, this.telemetryObjects && this.telemetryObjects.loginMicrosoft),\r\n loginGoogle: addOrUpdateTelemetryObject(containerTelemetryObject, multiLoginPageTelemetryContracts.loginGoogle, { id: cmsId }, this.telemetryObjects && this.telemetryObjects.loginGoogle),\r\n loginFacebook: addOrUpdateTelemetryObject(containerTelemetryObject, multiLoginPageTelemetryContracts.loginFacebook, { id: cmsId }, this.telemetryObjects && this.telemetryObjects.loginFacebook)\r\n };\r\n\r\n const renderLoginImage = (image) => ;\r\n\r\n return (\r\n
    \r\n {t.AriaLabelsProfilePicture}\r\n

    {t.MultiLoginTitle}

    \r\n renderLoginImage(logoImages.microsoft)} className=\"cwt-link cwt-fast-button cwt-image-button\" onClick={e => this.loginWith(e, \"microsoft\", this.telemetryObjects.loginMicrosoft)} {...renderHybrid(this.telemetryObjects.loginMicrosoft, false)}>\r\n {t.MultiLoginMicrosoft}\r\n \r\n renderLoginImage(logoImages.google)} className=\"cwt-link cwt-fast-button cwt-image-button\" onClick={e => this.loginWith(e, \"google\", this.telemetryObjects.loginGoogle)} {...renderHybrid(this.telemetryObjects.loginGoogle, false)}>\r\n {t.MultiLoginGoogle}\r\n \r\n renderLoginImage(logoImages.facebook)} className=\"cwt-link cwt-fast-button cwt-image-button\" onClick={ e => this.loginWith(e, \"facebook\", this.telemetryObjects.loginFacebook)} {...renderHybrid(this.telemetryObjects.loginFacebook, false)}>\r\n {t.MultiLoginFacebook}\r\n \r\n\r\n {t.MultiLoginFooterTerms}),\r\n MultiLoginFooterPrivacy: renderToString({t.MultiLoginFooterPrivacy})\r\n })\r\n }}/>\r\n
    \r\n );\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport ContentSocialBar from \"../content-social-bar/ContentSocialBar\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../Social.props\";\r\n\r\nconst testContentIds = [\r\n \"BB18FZrJ\",\r\n \"BBBMTFk\",\r\n \"BB18gTBG\",\r\n \"BB18tU9T\",\r\n \"BB18u3Q2\",\r\n \"BB18u9Ar\"\r\n];\r\n\r\nclass MultipleContentTest extends React.Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n const propsToPass = { ...this.props };\r\n return (\r\n
    \r\n

    MultipleContentTest

    \r\n
    \r\n {testContentIds.map((contentId, index) => {\r\n const props = { ...propsToPass };\r\n props.id = contentId;\r\n return
    \r\n \r\n
    ;\r\n })}\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default MultipleContentTest;","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { getPageContentType } from \"../Social.telemetry\";\r\n\r\nexport interface OnboardingPageTelemetryObjects {\r\n main: TelemetryObjectBase;\r\n step1Continue: TelemetryObjectBase;\r\n step1EditProfile: TelemetryObjectBase;\r\n step2ThanksPage: TelemetryObjectBase;\r\n step2LetsGo: TelemetryObjectBase;\r\n}\r\n\r\nexport interface OnboardingThirdPartyPageTelemetryObjects {\r\n main: TelemetryObjectBase;\r\n onboardingThirdPartyPageSignIn: TelemetryObjectBase;\r\n onboardingThirdPartyPageCreateAccount: TelemetryObjectBase;\r\n}\r\n\r\nexport const onboardingPageTelemetryContracts = {\r\n /** Comments-Scenario 4d */\r\n onboardingPage: {\r\n name: \"CommunityWelcomeStep1\",\r\n content: {\r\n type: getPageContentType()\r\n }\r\n },\r\n /** Comments-Scenario 4ciia */\r\n onboardingThirdPartyPage: {\r\n name: \"CommunityLinkAccount\",\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"ContinueWithMicrosoft\"\r\n }\r\n },\r\n /** Scenario 4ciia (scenario index has duplicate) */\r\n onboardingThirdPartyPageSignIn: {\r\n name: \"SignInWithThisAccount\",\r\n behavior: TelemetryBehaviorType.SignIn,\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"SignInWithThisAccount\"\r\n }\r\n },\r\n /** Scenario 4ciib*/\r\n onboardingThirdPartyPageCreateAccount: {\r\n name: \"CreateNewMSA\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"CreateNewMSA\"\r\n }\r\n },\r\n /** Comments-Scenario 4dii */\r\n step1Continue: {\r\n behavior: TelemetryBehaviorType.Close,\r\n name: \"Continue\",\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"Continue\"\r\n }\r\n },\r\n /** Comments-Scenario 4di */\r\n step1EditProfile: {\r\n behavior: TelemetryBehaviorType.Navigate,\r\n name: \"Edit Profile\",\r\n content: {\r\n type: getPageContentType(),\r\n headline: \"EditProfile\"\r\n }\r\n },\r\n /** Comments-Scenario 4d2 */\r\n step2ThanksPage: {\r\n name: \"CommunityWelcomeStep2\",\r\n content: {type: TelemetryContentType.Article}\r\n },\r\n /** Comments-Scenario 4d2a */\r\n step2LetsGo: {\r\n behavior: TelemetryBehaviorType.Navigate,\r\n name: \"LetsGo\",\r\n content: {\r\n type: TelemetryContentType.Article,\r\n headline: \"LetsGo\"\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport { OnboardingPageTelemetryObjects, onboardingPageTelemetryContracts } from \"./OnboardingPage.telemetry\";\r\nimport { TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, renderHybrid } from \"../Social.telemetry\";\r\n\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../Social.props\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport avatarFallback from \"../utils/avatarFallback\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { exclamation_round } from \"../utils/icons\";\r\nimport { getExternalURL } from \"../utils/urlHelper\";\r\nimport { hasThemeBase } from \"../utils/themeHelpers\";\r\nimport openEditProfilePage from \"../utils/openEditProfilePage\";\r\nimport { placeholderImages } from \"../utils/images\";\r\nimport { renderToString } from \"react-dom/server\";\r\n\r\ninterface OnboardingPageState {\r\n step: number;\r\n createUserInProgress: boolean;\r\n createUserErrorMessage?: string;\r\n}\r\nexport default class OnboardingPage extends React.Component {\r\n containerRef: HTMLDivElement;\r\n fetchAndVerifyMeTimerId: NodeJS.Timer;\r\n maxRetryCount: number;\r\n retryCount: number;\r\n telemetryObjects: OnboardingPageTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.containerRef = null;\r\n this.maxRetryCount = 3;\r\n this.retryCount = 0;\r\n this.state = {step: 0, createUserInProgress: false};\r\n }\r\n\r\n componentDidMount() {\r\n if (this.containerRef) {\r\n dispatchTelemetryEvent(TelemetryEventMap.genericLoaded, this.containerRef);\r\n }\r\n this.props.usersConnector.fetchMe(true);\r\n this.fetchAndVerifyMeTimerId = setInterval(this.fetchAndVerifyMe.bind(this), 10000);\r\n }\r\n\r\n fetchAndVerifyMe() {\r\n if (this.retryCount >= this.maxRetryCount || (this.props.me.nameStatus != enums.userNameStatusType.inReview && this.props.me.avatarStatus != enums.userAvatarStatusType.inReview)) {\r\n clearInterval(this.fetchAndVerifyMeTimerId);\r\n } else {\r\n this.props.usersConnector.fetchMe();\r\n this.retryCount++;\r\n }\r\n }\r\n\r\n editProfileHandler(e, theme, market) {\r\n e.preventDefault();\r\n openEditProfilePage(theme, market, \"_blank\");\r\n this.props.popupConnector.closePopup();\r\n }\r\n\r\n async continueOnboardingHandler(e) {\r\n this.setState({createUserInProgress: true, createUserErrorMessage: undefined});\r\n try {\r\n await this.props.usersConnector.createUser();\r\n this.setState({step: 1, createUserInProgress: false});\r\n } catch (error) {\r\n if (error.code == 22) {\r\n // Just ignore duplicate user error since me is already filled with the existing user in this case\r\n this.setState({step: 1, createUserInProgress: false});\r\n } else {\r\n this.setState({createUserErrorMessage: this.getCreateUserErrorMessage(error)});\r\n }\r\n }\r\n }\r\n\r\n getCreateUserErrorMessage(error) {\r\n switch (error.code) {\r\n case 0: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 1: return this.props.t.OnboardingErrorNotSignInMsg;\r\n case 2: return this.props.t.OnboardingErrorNotAllowMsg;\r\n case 3: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 4: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 5: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 6: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 7: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 8: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 9: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 10: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 20: return this.props.t.OnboardingErrorNoNameMsg;\r\n case 21: return this.props.t.OnboardingErrorUnknownMsg;\r\n case 23: return this.props.t.OnboardingFailChildMsg;\r\n }\r\n }\r\n\r\n letsGoHandler(e) {\r\n this.props.popupConnector.closePopup({refreshPage: true});\r\n }\r\n\r\n render() {\r\n\r\n const { managedClasses, market, me, t, mainTelemetryObject, contentId, theme, contents } = this.props;\r\n const cmsId = contentId && contents && contents[contentId] && contents[contentId].cmsId;\r\n const { step } = this.state;\r\n\r\n if (!me) { return null; }\r\n\r\n const { primaryAvatar, avatarStatus, ageGroup } = me;\r\n const isChild = ageGroup == enums.userAgeGroup.under18;\r\n\r\n /** Generate Telemetry Objects */\r\n if (mainTelemetryObject) {\r\n const onboardingStep2TelemetryObject = addOrUpdateTelemetryObject(mainTelemetryObject, onboardingPageTelemetryContracts.step2ThanksPage, {id: cmsId}, this.telemetryObjects && this.telemetryObjects.step2ThanksPage);\r\n const containerTelemetryObject = addOrUpdateTelemetryObject(mainTelemetryObject, onboardingPageTelemetryContracts.onboardingPage, {id: cmsId}, this.telemetryObjects && this.telemetryObjects.main);\r\n this.telemetryObjects = {\r\n main: containerTelemetryObject,\r\n step1Continue: addOrUpdateTelemetryObject(containerTelemetryObject, onboardingPageTelemetryContracts.step1Continue, { id: cmsId }, this.telemetryObjects && this.telemetryObjects.step1Continue),\r\n step1EditProfile: addOrUpdateTelemetryObject(containerTelemetryObject, {...onboardingPageTelemetryContracts.step1EditProfile}, { id: cmsId }, this.telemetryObjects && this.telemetryObjects.step1EditProfile),\r\n step2ThanksPage: onboardingStep2TelemetryObject,\r\n step2LetsGo: addOrUpdateTelemetryObject(onboardingStep2TelemetryObject, onboardingPageTelemetryContracts.step2LetsGo, {id: cmsId}, this.telemetryObjects && this.telemetryObjects.step2LetsGo)\r\n };\r\n }\r\n\r\n if (isChild) {\r\n return (
    { this.containerRef = el; }}>\r\n { avatarFallback(e); }}\r\n />\r\n\r\n

    {t.OnboardingUnderageTitle}

    \r\n

    {t.OnboardingUnderageMsg}

    \r\n\r\n
    \r\n {t.OnboardingCloseWindow} \r\n
    \r\n
    );\r\n }\r\n\r\n return ((step == 0 && this.step0()) || (step == 1 && this.step1()));\r\n }\r\n\r\n step0() {\r\n const { t, managedClasses, me, theme, market} = this.props;\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n const { primaryAvatar, primaryName, nameStatus, avatarStatus, ageGroup} = me;\r\n const hasNotAllowInfo = avatarStatus == enums.userAvatarStatusType.notAllow || nameStatus == enums.userNameStatusType.notAllow;\r\n const hasInReviewInfo = avatarStatus == enums.userAvatarStatusType.inReview || nameStatus == enums.userNameStatusType.inReview;\r\n const isChild = ageGroup == enums.userAgeGroup.under18;\r\n const isNoName = me.name == null || me.name.trim() === \"\";\r\n\r\n const EditButtonWrapperComponent = !hasNotAllowInfo ? OutlineButton : AccentButton;\r\n return (\r\n
    { this.containerRef = el; })}>\r\n
    \r\n \r\n
    \r\n

    {t.OnboardingTitle}

    \r\n

    {t.OnboardingSubTitle}

    \r\n { avatarFallback(e); }}\r\n />\r\n \r\n {primaryName}\r\n \r\n
    \r\n
    \r\n {!hasNotAllowInfo && !hasInReviewInfo && !isChild && !this.state.createUserErrorMessage && {t.OnboardingSuccessMsg}}\r\n {avatarStatus == enums.userAvatarStatusType.inReview && {t.OnboardingReviewImageMsg}}\r\n {nameStatus == enums.userNameStatusType.inReview && {t.OnboardingReviewNameMsg}}\r\n \r\n {this.state.createUserErrorMessage &&\r\n \r\n {exclamation_round}\r\n {this.state.createUserErrorMessage}\r\n \r\n }\r\n \r\n \r\n {avatarStatus == enums.userAvatarStatusType.notAllow &&\r\n \r\n {exclamation_round}\r\n {t.OnboardingFailImageMsg}\r\n \r\n }\r\n \r\n \r\n {nameStatus == enums.userNameStatusType.notAllow &&\r\n \r\n {exclamation_round}\r\n {t.OnboardingFailNameMsg}\r\n \r\n }\r\n \r\n \r\n {isChild &&\r\n \r\n {exclamation_round}\r\n {t.OnboardingFailChildMsg}\r\n \r\n }\r\n \r\n
    \r\n
    \r\n {!isSuperApp && !isChild && this.editProfileHandler(e, theme, market)} {...renderHybrid(this.telemetryObjects && this.telemetryObjects.step1EditProfile, false)}>\r\n {t.OnboardingEditProfile}\r\n }\r\n {!isChild && !isNoName && this.continueOnboardingHandler(e)} {...renderHybrid(this.telemetryObjects && this.telemetryObjects.step1Continue, false)}> {t.OnboardingContinue} }\r\n {isChild && {t.OnboardingOK} }\r\n
    \r\n {t.OnboardingProceedingGuidelines}),\r\n OnboardingProceedingTermsOfService: renderToString({t.OnboardingProceedingTermsOfService}),\r\n OnboardingProceedingPrivacyAndCookies: renderToString({t.OnboardingProceedingPrivacyAndCookies})\r\n })\r\n }}/>\r\n
    \r\n );\r\n }\r\n\r\n step1() {\r\n const { t, managedClasses, me} = this.props;\r\n const { primaryAvatar, name} = me;\r\n const thanksJoiningTitle = String.Format((t.OnboardingThanksJoiningTitle), {name: name});\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n

    {thanksJoiningTitle}

    \r\n

    {t.OnboardingThanksJoiningSubTitle}

    \r\n\r\n
    \r\n { this.letsGoHandler(e)} {...renderHybrid(this.telemetryObjects && this.telemetryObjects.step2LetsGo, false)}> {t.OnboardingOK} }\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { OnboardingThirdPartyPageTelemetryObjects, onboardingPageTelemetryContracts } from \"./OnboardingPage.telemetry\";\r\nimport { TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, renderHybrid } from \"../Social.telemetry\";\r\n\r\nimport { AccentButton } from \"@microsoft/fast-components-react-msft\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../Social.props\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { getContextData } from \"@msnews/core\";\r\nimport { logoImages } from \"../utils/images\";\r\nimport { msaLogin } from \"../utils/socialMedia\";\r\n\r\nexport default class OnboardingThirdPartyPage extends React.Component {\r\n containerRef: HTMLDivElement;\r\n telemetryObjects: OnboardingThirdPartyPageTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.containerRef = null;\r\n }\r\n\r\n async signInThirdPartyMsaHandler(e) {\r\n try {\r\n const requestContext = this.props.requestContext;\r\n const locationHref = getContextData(requestContext.data.locationHref, \"locationHref\");\r\n await msaLogin(this.props.email, this.props.market, locationHref.split(\"?\")[0]);\r\n this.props.usersConnector.fetchMe();\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n }\r\n\r\n async createNewMicrosoftAccountHandler(e) {\r\n const requestContext = this.props.requestContext;\r\n const locationHref = getContextData(requestContext.data.locationHref, \"locationHref\");\r\n await msaLogin(null, this.props.market, locationHref.split(\"?\")[0], true);\r\n this.props.usersConnector.fetchMe();\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.props.me.isSocialUser) {\r\n this.props.popupConnector.closePopup();\r\n } else if (this.props.me.name) {\r\n this.props.popupConnector.openPopup(\"onboardingPage\", { contentId: this.props.contentId });\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n if (this.containerRef) {\r\n dispatchTelemetryEvent(TelemetryEventMap.genericLoaded, this.containerRef);\r\n }\r\n }\r\n\r\n render() {\r\n const { managedClasses, email, loginType, t, mainTelemetryObject, contentId, contents } = this.props;\r\n const cmsId = contentId && contents && contents[contentId] && contents[contentId].cmsId;\r\n\r\n /** Generate Telemetry Objects */\r\n if (mainTelemetryObject) {\r\n const containerTelemetryObject = addOrUpdateTelemetryObject(mainTelemetryObject, onboardingPageTelemetryContracts.onboardingThirdPartyPage, { id: cmsId }, this.telemetryObjects && this.telemetryObjects.main);\r\n this.telemetryObjects = {\r\n main: containerTelemetryObject,\r\n onboardingThirdPartyPageSignIn: addOrUpdateTelemetryObject(containerTelemetryObject, onboardingPageTelemetryContracts.onboardingThirdPartyPageSignIn, { id: cmsId }, this.telemetryObjects && this.telemetryObjects.onboardingThirdPartyPageSignIn),\r\n onboardingThirdPartyPageCreateAccount: addOrUpdateTelemetryObject(containerTelemetryObject, onboardingPageTelemetryContracts.onboardingThirdPartyPageCreateAccount, { id: cmsId }, this.telemetryObjects && this.telemetryObjects.onboardingThirdPartyPageCreateAccount)\r\n };\r\n }\r\n\r\n return (\r\n
    { this.containerRef = el; })}>\r\n {t.ImgAltsMicrosoftLogo}/\r\n

    {t.OnboardingThirdPartyTitle}

    \r\n

    \r\n { t.OnboardingThirdPartySubTitle.replace(\"#provider#\", loginType) }\r\n

    \r\n \r\n {email}\r\n \r\n\r\n
    \r\n this.signInThirdPartyMsaHandler(e)}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.onboardingThirdPartyPageSignIn, false)}\r\n > {t.OnboardingThirdPartySignIn} \r\n
    \r\n\r\n \r\n this.createNewMicrosoftAccountHandler(e)}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.onboardingThirdPartyPageCreateAccount, false)}\r\n > {t.OnboardingThirdPartyCreate} \r\n \r\n
    \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton } from \"@microsoft/fast-components-react-msft\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../Social.props\";\r\nimport avatarFallback from \"../utils/avatarFallback\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { placeholderImages } from \"../utils/images\";\r\n\r\nexport default class OnboardingUnderagePage extends React.Component {\r\n containerRef: React.RefObject;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.containerRef = React.createRef();\r\n }\r\n\r\n closePopup() {\r\n this.props.popupConnector.closePopup();\r\n }\r\n\r\n render() {\r\n const { managedClasses, me, t } = this.props;\r\n\r\n const { primaryAvatar, avatarStatus } = me;\r\n\r\n return (\r\n
    \r\n { avatarFallback(e); }}\r\n />\r\n\r\n

    {t.OnboardingUnderageTitle}

    \r\n

    {t.OnboardingUnderageMsg}

    \r\n\r\n
    \r\n {t.OnboardingCloseWindow} \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nexport interface ProfileCardTelemetryObjects {\r\n profileCard: TelemetryObjectBase;\r\n reportUserMenu: TelemetryObjectBase;\r\n reportedMessage: TelemetryObjectBase;\r\n moreButton: TelemetryObjectBase;\r\n}\r\n\r\nexport const profileCardTelemetryContracts = {\r\n /** Scenario 0a Impr update */\r\n profileCard: {\r\n name: \"UserProfile\",\r\n content: {\r\n headline: \"UserProfile\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Scenario 2 click on report/more/ellipsis button*/\r\n moreButton: {\r\n name: \"MoreOptions\",\r\n behavior: TelemetryBehaviorType.Report,\r\n content: {\r\n headline: \"MoreOptions\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Scenario 3 Impr update of report user*/\r\n reportUserMenu: {\r\n name: \"ReportUser\",\r\n content: {\r\n headline: \"ReportUser\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Scenario 4 Impr update of report user reason*/\r\n reportUserMenuTypes: {\r\n name: \"ReportUserReason\",\r\n content: {\r\n headline: \"ReportUserReason\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Scenario 5 Impr update of user report complete*/\r\n reportedMessage: {\r\n name: \"UserReported\",\r\n content: {\r\n headline: \"UserReported\",\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { comment, thumbs_up, users3 } from \"../../../utils/icons\";\r\n\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../../Social.props\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../../utils/enums\";\r\nimport { hasThemeBase } from \"../../../utils/themeHelpers\";\r\n\r\nexport interface ProfileCardUserStatsProps extends SocialProps {\r\n postsCount: number;\r\n followersCount: number;\r\n likesCount: number;\r\n isSelf?: boolean;\r\n}\r\n\r\nexport default class ProfileCardUserStats extends React.Component {\r\n\r\n render() {\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n return isSuperApp ? this.renderSuperApp() : this.renderDefault();\r\n }\r\n\r\n renderDefault() {\r\n const { postsCount, followersCount, likesCount, t, responsiveClass, managedClasses } = this.props;\r\n\r\n return (\r\n
    \r\n
    1 ? String.Format(t.AriaLabelComments, postsCount) : String.Format(t.AriaLabelComment, postsCount)}>\r\n
    {t.UserCardPosts}
    \r\n {postsCount || \"-\"}\r\n
    \r\n
    1 ? String.Format(t.AriaLabelFollowers, followersCount) : String.Format(t.AriaLabelFollower, followersCount)}>\r\n
    {t.ProfileFollowersLbl}
    \r\n {followersCount || \"-\"}\r\n
    \r\n
    1 ? String.Format(t.AriaLabelReactions, likesCount) : String.Format(t.AriaLabelReaction, likesCount)}>\r\n
    {t.ProfileReactionsLbl}
    \r\n {likesCount || \"-\"}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderSuperApp() {\r\n const { postsCount, followersCount, likesCount, isSelf, responsiveClass, managedClasses, t } = this.props;\r\n\r\n return (\r\n
    \r\n
    1 ? String.Format(t.AriaLabelComments, postsCount) : String.Format(t.AriaLabelComment, postsCount)}>\r\n \r\n { comment }\r\n \r\n {postsCount || \"-\"}\r\n
    \r\n
    1 ? String.Format(t.AriaLabelFollowers, followersCount) : String.Format(t.AriaLabelFollower, followersCount)}>\r\n \r\n { users3 }\r\n \r\n {followersCount || \"-\"}\r\n
    \r\n
    1 ? String.Format(t.AriaLabelReactions, likesCount) : String.Format(t.AriaLabelReaction, likesCount)}>\r\n \r\n { thumbs_up }\r\n \r\n {likesCount || \"-\"}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { TelemetryEventNames, dispatchTelemetryEvent } from \"../../Social.telemetry\";\r\n\r\nexport interface ProfileReportMenuTelemetryObjects {\r\n reportUserMenuTypes: TelemetryObjectBase;\r\n}\r\n\r\nexport const profileReportMenuTelemetryContracts = {\r\n /** Scenario 4 Impr update of report user reason*/\r\n reportUserMenuTypes: {\r\n name: \"ReportUserReason\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n};\r\n\r\nexport const profileReportMenuTelemetryActionDispatchers = {\r\n /** Used for: Scenario 3a and Scenario 4a */\r\n reportTypeClicked: (element: any, telemetryObject: any): void => {\r\n const telemetryEventDispatcherInfo = {\r\n eventName: TelemetryEventNames.genericAction,\r\n contract: {...(telemetryObject && telemetryObject.contract)},\r\n subTypes: { behavior: TelemetryBehaviorType.Report }\r\n };\r\n\r\n dispatchTelemetryEvent(telemetryEventDispatcherInfo, element);\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport Popover, { PopoverProps } from \"../../common/popover/Popover\";\r\nimport { PopupConnector, UsersConnector } from \"../../Social.props\";\r\nimport { ProfileReportMenuTelemetryObjects, profileReportMenuTelemetryActionDispatchers, profileReportMenuTelemetryContracts } from \"./ProfileReportMenu.telemetry\";\r\nimport { SocialService, User } from \"@msnews/social-data-service\";\r\nimport { TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, renderHybrid } from \"../../Social.telemetry\";\r\n\r\nimport AccessibilityHelpers from \"../../utils/AccessibilityHelpers\";\r\nimport { IRequestContext } from \"@msnews/core\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { flag } from \"../../utils/icons\";\r\n\r\nexport interface ProfileReportMenuProps extends PopoverProps {\r\n managedClasses?: SocialClassNameContract;\r\n onReport?: (key: string, reportItemType: string) => void;\r\n t: SocialLocalizedStrings;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n theme?: string;\r\n popupConnector?: PopupConnector;\r\n id?: string;\r\n requestContext: IRequestContext;\r\n renderInPopover?: boolean;\r\n usersConnector?: UsersConnector;\r\n me?: User;\r\n}\r\n\r\ninterface ProfileReportMenuState{\r\n containerWidth: number,\r\n containerHeight: number,\r\n containerOffsetLeft: number,\r\n selectedReportItemType: string;\r\n activeListId: number;\r\n}\r\n\r\nexport default class ProfileReportMenu extends React.Component {\r\n containerRef: HTMLDivElement;\r\n listRefs: Array;\r\n telemetryObjects: ProfileReportMenuTelemetryObjects;\r\n isLoaded: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n containerWidth: null,\r\n containerHeight: null,\r\n containerOffsetLeft: null,\r\n selectedReportItemType: null,\r\n activeListId: 0\r\n };\r\n\r\n this.containerRef = null;\r\n this.listRefs = [];\r\n }\r\n\r\n componentDidMount() {\r\n this.showNextList(this.state.activeListId);\r\n AccessibilityHelpers.attachAccessibilityListeners(document);\r\n if (!this.props.me) { this.props.usersConnector.fetchMe(); }\r\n\r\n this.loadedHandler();\r\n }\r\n\r\n componentDidUpdate() {\r\n this.loadedHandler();\r\n }\r\n\r\n selectReportItemType(e, reportItemType, telemetryObject) {\r\n const nextListId = 1;\r\n\r\n this.setState({\r\n selectedReportItemType: reportItemType,\r\n activeListId: nextListId\r\n });\r\n\r\n this.showNextList(nextListId);\r\n profileReportMenuTelemetryActionDispatchers.reportTypeClicked(e.currentTarget, telemetryObject);\r\n }\r\n\r\n showNextList(activeListId) {\r\n this.setState({\r\n containerWidth: this.listRefs[activeListId].offsetWidth,\r\n containerHeight: this.listRefs[activeListId].offsetHeight,\r\n containerOffsetLeft: -1*this.listRefs[activeListId].offsetLeft\r\n });\r\n const firstChild = this.listRefs[activeListId].children[1] as HTMLElement;\r\n firstChild.focus();\r\n }\r\n\r\n render() {\r\n if (!this.props.me) { return null; }\r\n\r\n this.generateTelemetryObjects();\r\n\r\n return this.props.renderInPopover ? this.renderDefault() : this.renderMobile();\r\n }\r\n\r\n renderDefault() {\r\n const { managedClasses, t, mainTelemetryObject, responsiveClass } = this.props;\r\n const { containerWidth, containerHeight, containerOffsetLeft, selectedReportItemType } = this.state;\r\n\r\n return (\r\n \r\n { this.containerRef = el; })}\r\n >\r\n
    \r\n
      { this.listRefs[0] = instance; }}>\r\n \r\n {flag}\r\n { t.ProfileReportUserTitle }\r\n \r\n { Object.keys(enums.profileReportItemMap).map(key => {\r\n return
    • this.selectReportItemType(e, key, this.telemetryObjects && this.telemetryObjects[`reportUpperType-${key}`])} {...renderHybrid(this.telemetryObjects && this.telemetryObjects[`reportUpperType-${key}`], false)}>\r\n {t[enums.profileReportItemMap[key]]}\r\n
    • ;\r\n })\r\n }\r\n
    \r\n this.listRefs[1] = el)}\r\n >\r\n \r\n {flag}\r\n { t[enums.profileReportItemMap[selectedReportItemType]] }\r\n \r\n { Object.keys(selectedReportItemType == \"UserName\" ? enums.userNameReportMap : enums.userPictureReportMap).map(key => {\r\n return
  • this.reportHandler(e, key, this.telemetryObjects && this.telemetryObjects[`reportType-${key}`])} {...renderHybrid(this.telemetryObjects && this.telemetryObjects[`reportType-${key}`], false)}>\r\n {t[selectedReportItemType == \"UserName\" ? enums.userNameReportMap[key] : enums.userPictureReportMap[key]]}\r\n
  • ;\r\n })\r\n }\r\n \r\n
    \r\n
    \r\n \r\n );\r\n }\r\n\r\n renderMobile() {\r\n const { managedClasses, t, mainTelemetryObject, responsiveClass } = this.props;\r\n const { containerOffsetLeft, containerHeight, selectedReportItemType } = this.state;\r\n\r\n return (\r\n { this.containerRef = el; })}\r\n >\r\n
    \r\n
      { this.listRefs[0] = instance; }}>\r\n
      \r\n { Object.keys(enums.profileReportItemMap).map(key => {\r\n return
    • this.selectReportItemType(e, key, this.telemetryObjects && this.telemetryObjects[`reportUpperType-${key}`])} {...renderHybrid(this.telemetryObjects && this.telemetryObjects[`reportUpperType-${key}`], false)}>\r\n \r\n {flag}\r\n {t[enums.profileReportItemMap[key]]}\r\n \r\n
    • ;\r\n })\r\n }\r\n
    \r\n { this.listRefs[1] = instance; }}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.reportUserMenuTypes, true, (el) => this.listRefs[1] = el)}\r\n >\r\n \r\n { t[enums.profileReportItemMap[selectedReportItemType]] }\r\n \r\n { Object.keys(selectedReportItemType == \"UserName\" ? enums.userNameReportMap : enums.userPictureReportMap).map(key => {\r\n return
  • this.reportHandler(e, key, this.telemetryObjects && this.telemetryObjects[`reportType-${key}`])} {...renderHybrid(this.telemetryObjects && this.telemetryObjects[`reportType-${key}`], false)}>\r\n {t[selectedReportItemType == \"UserName\" ? enums.userNameReportMap[key] : enums.userPictureReportMap[key]]}\r\n
  • ;\r\n })\r\n }\r\n \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n generateTelemetryObjects() {\r\n const { mainTelemetryObject } = this.props;\r\n const commonContent = mainTelemetryObject.contract.content;\r\n this.telemetryObjects = {\r\n reportUserMenuTypes: addOrUpdateTelemetryObject(mainTelemetryObject, {...profileReportMenuTelemetryContracts.reportUserMenuTypes}, {...commonContent}, this.telemetryObjects && this.telemetryObjects.reportUserMenuTypes)\r\n };\r\n Object.keys(enums.profileReportItemMap).map(key => {\r\n this.telemetryObjects[`reportUpperType-${key}`] = addOrUpdateTelemetryObject(mainTelemetryObject, {...mainTelemetryObject.contract}, {...commonContent, headline: key}, this.telemetryObjects && this.telemetryObjects[`reportUpperType-${key}`]);\r\n });\r\n Object.keys(enums.userNameReportMap).map(key => {\r\n this.telemetryObjects[`reportType-${key}`] = addOrUpdateTelemetryObject(mainTelemetryObject, {...profileReportMenuTelemetryContracts.reportUserMenuTypes}, {...commonContent, headline: key}, this.telemetryObjects && this.telemetryObjects[`reportType-${key}`]);\r\n });\r\n Object.keys(enums.userPictureReportMap).map(key => {\r\n this.telemetryObjects[`reportType-${key}`] = addOrUpdateTelemetryObject(mainTelemetryObject, {...profileReportMenuTelemetryContracts.reportUserMenuTypes}, {...commonContent, headline: key}, this.telemetryObjects && this.telemetryObjects[`reportType-${key}`]);\r\n });\r\n }\r\n\r\n reportHandler(e, reportType, telemetryObject) {\r\n profileReportMenuTelemetryActionDispatchers.reportTypeClicked(e.currentTarget, telemetryObject);\r\n const reportValue = enums.commentReportMap[reportType];\r\n if (reportValue == enums.commentReportMap.Copyright) {\r\n this.props.popupConnector.closePopup({disableBridge: true});\r\n if (this.props.me.state == enums.userStateType.anonymous) {\r\n this.props.popupConnector.openPopup(\"multiLoginPage\");\r\n } else {\r\n this.props.popupConnector.openPopup(\r\n reportValue == enums.commentReportMap.Copyright ? \"copyrightform\" : \"\",\r\n {id: this.props.id, fullScreen: false, reportItemType: this.state.selectedReportItemType, onReport: this.props.onReport});\r\n }\r\n } else {\r\n SocialService.reportUser(this.props.id, this.state.selectedReportItemType, reportType);\r\n this.props.renderInPopover && this.props.onReport && this.props.onReport(reportType, this.state.selectedReportItemType);\r\n this.props.popupConnector.closePopup();\r\n }\r\n }\r\n\r\n loadedHandler() {\r\n if (this.isLoaded) { return; }\r\n\r\n if (this.containerRef) {\r\n dispatchTelemetryEvent({...TelemetryEventMap.genericLoaded, sendPeregrine: true}, this.containerRef);\r\n this.isLoaded = true;\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ProfileCardTelemetryObjects, profileCardTelemetryContracts } from \"./ProfileCard.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\nimport { ellipsis, ellipsis2, exclamation, open_outside, pen } from \"../../utils/icons\";\r\nimport { hasThemeBase, isComponentDisabled } from \"../../utils/themeHelpers\";\r\n\r\nimport DisabledMessage from \"../../comment/disabled-message/DisabledMessage\";\r\nimport FollowButton from \"../../follow-button/FollowButton\";\r\nimport { NeutralButton } from \"@microsoft/fast-components-react-msft\";\r\nimport ProfileCardUserStats from \"./profile-card-user-stats/ProfileCardUserStats\";\r\nimport ProfileReportMenu from \"../profile-report-menu/ProfileReportMenu\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { getContextData } from \"@msnews/core\";\r\nimport openEditProfilePage from \"../../utils/openEditProfilePage\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\n\r\nexport interface ProfileCardProps extends SocialProps {\r\n emptyState?: string;\r\n}\r\n\r\ninterface ProfileCardState {\r\n reportMenuVisible: boolean;\r\n selectedReportType: string;\r\n selectedReportItemType: string;\r\n isReported: boolean\r\n}\r\n\r\nexport default class ProfileCard extends React.Component {\r\n containerRef: HTMLDivElement;\r\n telemetryObjects: ProfileCardTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n reportMenuVisible: false,\r\n selectedReportType: null,\r\n selectedReportItemType: null,\r\n isReported: false\r\n };\r\n this.containerRef = null;\r\n this.telemetryObjects = null;\r\n }\r\n\r\n getAvatarAltText() {\r\n const { me, t } = this.props;\r\n\r\n if (me.nameStatus == enums.userNameStatusType.notAllow) {\r\n return t.NameNotAllowTip.replace(\"{#}\", me.name);\r\n } else if (me.avatarStatus == enums.userAvatarStatusType.notAllow) {\r\n return t.AvatarNotAllowTip;\r\n } else if (me.nameStatus == enums.userNameStatusType.inReview) {\r\n return t.NameInReviewTip;\r\n } else if (me.avatarStatus == enums.userAvatarStatusType.inReview) {\r\n return t.AvatarInReviewTip;\r\n } else if (me.isBanned) {\r\n return t.UserBannedTip;\r\n } else {\r\n return t.AvatarAltText;\r\n }\r\n }\r\n\r\n /* REPORTING */\r\n showReportMenu() {\r\n const { theme, popupConnector, id } = this.props;\r\n const isMobile = this.props.responsiveClass.includes(enums.responsiveLevels.L1);\r\n const isEmbeded = isComponentDisabled(theme, \"profilereportmenu\");\r\n\r\n if (isEmbeded || isMobile) {\r\n popupConnector.openPopup(\"profilereportmenu\", { id: id });\r\n } else {\r\n this.setState({\r\n reportMenuVisible: true\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * @param reportType: value from enums.userNameReportMap or enums.userPictureReportMap\r\n * @param reportItemType: value from enums.profileReportItemMap\r\n */\r\n reportHandler(reportType, reportItemType) {\r\n this.setState({\r\n isReported: true,\r\n reportMenuVisible: false,\r\n selectedReportType: reportType,\r\n selectedReportItemType: reportItemType\r\n });\r\n }\r\n\r\n openOnboardingPopup() {\r\n this.props.popupConnector.openPopup(\"onboardingPage\");\r\n }\r\n\r\n render() {\r\n const userId = this.props.id;\r\n const { me, t, responsiveClass, users, managedClasses, market, emptyState, mainTelemetryObject, theme } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n const isMobile = responsiveClass.includes(enums.responsiveLevels.L0);\r\n\r\n if (!me) { return null; }\r\n if (!users) { return null; }\r\n const user = users[userId] ? users[userId].data : null;\r\n\r\n if (!user || user.isBanned) { return null; }\r\n\r\n const { primaryAvatar, name, postsCount, followersCount, likesCount, traceId } = user;\r\n const isSelf = me && me.id == userId;\r\n\r\n let modifiedName: any;\r\n if (emptyState == enums.profilePageEmptyStates.NoUser) {\r\n modifiedName == t.ProfileNoUserUsername;\r\n } else if (emptyState == enums.profilePageEmptyStates.NotSocialUser) {\r\n modifiedName = t.ProfileNotSocialUsername;\r\n } else {\r\n modifiedName = name;\r\n }\r\n const avatarUrl = emptyState == enums.profilePageEmptyStates.NotSocialUser ? placeholderImages.notSocialAvatar : primaryAvatar || placeholderImages.avatar;\r\n const modifiedAvatarUrl = me.state != enums.userStateType.newUser && me.avatarStatus == enums.userAvatarStatusType.normal ? primaryAvatar || placeholderImages.avatar : placeholderImages.avatar;\r\n const avatarAltText = isSelf && this.getAvatarAltText();\r\n const meHasInReviewInfo = isSelf && (me.avatarStatus == enums.userAvatarStatusType.inReview || me.nameStatus == enums.userNameStatusType.inReview);\r\n const meHasNotAllowInfo = isSelf && (me.avatarStatus == enums.userAvatarStatusType.notAllow || me.nameStatus == enums.userNameStatusType.notAllow || (!meHasInReviewInfo && me.isBanned));\r\n\r\n /** Generate Telemetry Objects */\r\n const profileCardTelemetryObject = addOrUpdateTelemetryObject(mainTelemetryObject, profileCardTelemetryContracts.profileCard, { id: traceId }, this.telemetryObjects && this.telemetryObjects.profileCard);\r\n this.telemetryObjects = {\r\n profileCard: profileCardTelemetryObject,\r\n reportUserMenu: addOrUpdateTelemetryObject(profileCardTelemetryObject, profileCardTelemetryContracts.reportUserMenu, { id: traceId }, this.telemetryObjects && this.telemetryObjects.reportUserMenu),\r\n reportedMessage: addOrUpdateTelemetryObject(profileCardTelemetryObject, profileCardTelemetryContracts.reportedMessage, { id: traceId }, this.telemetryObjects && this.telemetryObjects.reportedMessage),\r\n moreButton: addOrUpdateTelemetryObject(profileCardTelemetryObject, profileCardTelemetryContracts.moreButton, { id: traceId }, this.telemetryObjects && this.telemetryObjects.moreButton)\r\n };\r\n\r\n const actionPanelHtml = this.calculateActionHTML({userId, isSelf, theme});\r\n\r\n return (\r\n { this.containerRef = el; })}\r\n >\r\n
    \r\n
    \r\n
    \r\n {t.AriaLabelsProfilePicture}{ avatarFallback(e); }}/>\r\n { meHasInReviewInfo && {ellipsis2} }\r\n { meHasNotAllowInfo && {exclamation} }\r\n
    \r\n
    \r\n
    {modifiedName}
    \r\n \r\n {(isMobile || isSuperApp) && actionPanelHtml}\r\n
    \r\n
    \r\n {!(isMobile || isSuperApp) && actionPanelHtml}\r\n
    \r\n \r\n );\r\n }\r\n\r\n calculateActionHTML(actionHTMLParams) {\r\n const {isSelf, userId, theme} = actionHTMLParams;\r\n const { reportMenuVisible, isReported } = this.state;\r\n const { t, managedClasses, usersConnector, market, emptyState } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n\r\n let profilePageEmptyStates: any;\r\n if (isSuperApp) {\r\n if (emptyState == enums.profilePageEmptyStates.NotSocialUser) {\r\n profilePageEmptyStates = (\r\n \r\n {t.ProfileCreateBtn}\r\n {open_outside}\r\n \r\n );\r\n } else if (emptyState == enums.profilePageEmptyStates.NoUser) {\r\n profilePageEmptyStates = null;\r\n } else if (isSelf) {\r\n profilePageEmptyStates = null;\r\n } else {\r\n profilePageEmptyStates = (
    \r\n \r\n
    );\r\n }\r\n } else {\r\n if (emptyState == enums.profilePageEmptyStates.NotSocialUser) {\r\n profilePageEmptyStates = (\r\n \r\n {t.ProfileCreateBtn}\r\n {open_outside}\r\n \r\n );\r\n } else if (emptyState == enums.profilePageEmptyStates.NoUser) {\r\n profilePageEmptyStates = null;\r\n } else if (isSelf) {\r\n profilePageEmptyStates = ( openEditProfilePage(theme, market, \"_blank\")}>\r\n \r\n {pen}\r\n {t.ProfileEditBtn}\r\n \r\n );\r\n } else if (isReported) {\r\n profilePageEmptyStates = (
    );\r\n } else {\r\n profilePageEmptyStates = (
    \r\n \r\n {reportMenuVisible &&\r\n this.setState({ reportMenuVisible: false })}\r\n managedClasses={managedClasses}\r\n mainTelemetryObject={this.telemetryObjects.reportUserMenu}\r\n theme={theme}\r\n popupConnector={this.props.popupConnector}\r\n responsiveClass={this.props.responsiveClass}\r\n requestContext={this.props.requestContext}\r\n renderInPopover={true}\r\n id={this.props.id}\r\n usersConnector={this.props.usersConnector}\r\n me={this.props.me}\r\n />\r\n }\r\n \r\n \r\n {ellipsis}\r\n \r\n \r\n
    );\r\n }\r\n }\r\n return profilePageEmptyStates &&
    {profilePageEmptyStates}
    ;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nexport interface ProfileManageDataPageTelemetryObjects {\r\n clearData: TelemetryObjectBase;\r\n clearDataConfirmation: TelemetryObjectBase;\r\n step0CancelBtn: TelemetryObjectBase;\r\n step0RemoveDataBtn: TelemetryObjectBase;\r\n step1YesRemoveDataBtn: TelemetryObjectBase;\r\n step1CancelDataBtn: TelemetryObjectBase;\r\n\r\n}\r\n\r\nexport const profileManageDataPageTelemetryContracts = {\r\n /** Profile Privacy > Scenario 3a */\r\n clearData: {\r\n name: \"ClearMyData\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Profile Privacy > Scenario 3c */\r\n clearDataConfirmation: {\r\n name: \"ClearDataConfirmation\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Profile Privacy > Scenario 3b cancel\r\n * id: traceId\r\n */\r\n step0CancelBtn: {\r\n name: \"Cancel\",\r\n behavior: TelemetryBehaviorType.Cancel,\r\n content: {\r\n headline: \"Cancel\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Profile Privacy > Scenario 3b removedata\r\n * id: traceId\r\n */\r\n step0RemoveDataBtn: {\r\n name: \"RemoveData\",\r\n behavior: TelemetryBehaviorType.Cancel,\r\n content: {\r\n headline: \"Remove Data\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Profile Privacy > Scenario 3d user clicks yes remove data\r\n * id: traceId\r\n */\r\n step1YesRemoveDataBtn: {\r\n name: \"RemoveDataConfirmation\",\r\n behavior: TelemetryBehaviorType.Cancel,\r\n content: {\r\n headline: \"Yes Remove It\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Profile Privacy > Scenario 3d user clicks cancel\r\n * id: traceId\r\n*/\r\n step1CancelDataBtn: {\r\n name: \"Cancel\",\r\n behavior: TelemetryBehaviorType.Cancel,\r\n content: {\r\n headline: \"Cancel\",\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport { ProfileManageDataPageTelemetryObjects, profileManageDataPageTelemetryContracts } from \"./ProfileManagaDataPage.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\n\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { check } from \"../../utils/icons\";\r\n\r\nenum DataType {\r\n activity = \"activity\",\r\n comment = \"comment\",\r\n reaction = \"reaction\",\r\n follow = \"follow\"\r\n}\r\n\r\ninterface ProfileManageDataPageState {\r\n deletingData: {\r\n activity: boolean;\r\n comment: boolean;\r\n reaction: boolean;\r\n follow: boolean;\r\n };\r\n step: number;\r\n}\r\n\r\nexport default class ProfileManageDataPage extends React.Component {\r\n telemetryObjects: ProfileManageDataPageTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n deletingData: {\r\n activity: true,\r\n comment: true,\r\n reaction: true,\r\n follow: true\r\n },\r\n step: 0\r\n };\r\n }\r\n\r\n toggleCheckState(stateKey: string) {\r\n this.setState({ deletingData: { ...this.state.deletingData, [stateKey]: !this.state.deletingData[stateKey] } });\r\n }\r\n\r\n submitClearData() {\r\n this.props.profileConnector.deleteMyData(this.state.deletingData);\r\n this.closePopup();\r\n }\r\n\r\n removeDataClickHandler(e) {\r\n this.setState({ step: 1});\r\n }\r\n\r\n cancelClickHandler(e) {\r\n this.closePopup();\r\n }\r\n\r\n closePopup() {\r\n this.props.popupConnector.closePopup();\r\n }\r\n\r\n render() {\r\n const { mainTelemetryObject, me} = this.props;\r\n const { step } = this.state;\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n clearData: addOrUpdateTelemetryObject(mainTelemetryObject, profileManageDataPageTelemetryContracts.clearData, { id: me.traceId }, this.telemetryObjects && this.telemetryObjects.clearData),\r\n clearDataConfirmation: addOrUpdateTelemetryObject(mainTelemetryObject, profileManageDataPageTelemetryContracts.clearDataConfirmation, { id: me.traceId }, this.telemetryObjects && this.telemetryObjects.clearDataConfirmation),\r\n step0CancelBtn: addOrUpdateTelemetryObject(mainTelemetryObject, profileManageDataPageTelemetryContracts.step0CancelBtn, { id: me.traceId }, this.telemetryObjects && this.telemetryObjects.step0CancelBtn),\r\n step0RemoveDataBtn: addOrUpdateTelemetryObject(mainTelemetryObject, profileManageDataPageTelemetryContracts.step0RemoveDataBtn, { id: me.traceId }, this.telemetryObjects && this.telemetryObjects.step0RemoveDataBtn),\r\n step1YesRemoveDataBtn: addOrUpdateTelemetryObject(mainTelemetryObject, profileManageDataPageTelemetryContracts.step1YesRemoveDataBtn, { id: me.traceId }, this.telemetryObjects && this.telemetryObjects.step1YesRemoveDataBtn),\r\n step1CancelDataBtn: addOrUpdateTelemetryObject(mainTelemetryObject, profileManageDataPageTelemetryContracts.step1CancelDataBtn, { id: me.traceId }, this.telemetryObjects && this.telemetryObjects.step1CancelDataBtn)\r\n\r\n };\r\n\r\n return ((step == 0 && this.step0()) || (step == 1 && this.step1()));\r\n }\r\n\r\n step0() {\r\n const { t, managedClasses} = this.props;\r\n const { activity: activityChecked, comment: commentsChecked, reaction: reactionsChecked, follow: followChecked } = this.state.deletingData;\r\n const uncheckedOptions = !activityChecked && !commentsChecked && !reactionsChecked && !followChecked;\r\n\r\n return (\r\n
    \r\n
    \r\n

    {t.ProfileManageDataDeleteProfileTxt}

    \r\n

    {t.ProfileManageDataDeleteProfileSubTxt}

    \r\n
    \r\n
    \r\n
      \r\n
    • \r\n
      \r\n {activityChecked && {check} }\r\n
      \r\n
      \r\n {t.ProfileManageDataDeleteMyActivityTitle}\r\n

      {t.ProfileManageDataDeleteMyActivityTxt}

      \r\n
      \r\n
    • \r\n
    • \r\n
      \r\n {commentsChecked && {check} }\r\n
      \r\n
      \r\n {t.ProfileManageDataDeleteMyCommentsTitle}\r\n

      \r\n {t.ProfileManageDataDeleteMyCommentsTxt}\r\n

      \r\n
      \r\n
    • \r\n
    • \r\n
      \r\n {reactionsChecked && {check} }\r\n
      \r\n
      \r\n {t.ProfileManageDataDeleteMyReactionsTitle}\r\n

      \r\n {t.ProfileManageDataDeleteMyReactionsTxt}\r\n

      \r\n
      \r\n
    • \r\n
    • \r\n
      \r\n {followChecked && {check} }\r\n
      \r\n
      \r\n {t.ProfileManageDataDeleteMyFollowersTitle}\r\n

      \r\n {t.ProfileManageDataDeleteMyFollowersTxt}\r\n

      \r\n
      \r\n
    • \r\n
    \r\n

    {t.DeleteDataFromCommunity}

    \r\n
    \r\n {t.DeleteDataCancel} \r\n {t.DeleteDataRemoveData}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n step1() {\r\n const {managedClasses, t} = this.props;\r\n return (\r\n
    \r\n
    \r\n

    {t.DeleteDataConfirmationQuestion}

    \r\n
    \r\n\r\n

    {t.ProfileManageDataDeleteDataMsg}

    \r\n\r\n
    \r\n {t.DeleteDataDeleteProfileCancel} \r\n {t.DeleteDataDeleteConfirm}\r\n
    \r\n
    \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface ProfileTabsTelemetryObjects {\r\n followers: TelemetryObjectBase;\r\n following: TelemetryObjectBase;\r\n tabs: any;\r\n}\r\n\r\nexport const profileTabsTelemetryContracts = {\r\n /** Profile Followers > Scenario 1a */\r\n followers: {\r\n name: \"Followers\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Profile Following > Scenario 1a */\r\n following: {\r\n name: \"Following\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Click Tab */\r\n tabs: {\r\n Activity: { /** id: traceId */\r\n name: \"Activity\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Activity\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n Comments: { /** id: traceId */\r\n name: \"Comments\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Comments\",\r\n type: TelemetryContentType.Comment\r\n }\r\n },\r\n Followers: { /** id: traceId */\r\n name: \"Followers\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Followers\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n Following: { /** id: traceId */\r\n name: \"Following\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Following\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n Privacy: { /** id: traceId */\r\n name: \"Privacy\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Privacy\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n Subscriptions: { /** id: traceId */\r\n name: \"Subscriptions\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Subscriptions\",\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport const profileTabsTelemetryActionDispatchers = {\r\n /** Used for: Scenario 3a and Scenario 4a */\r\n tabClicked: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActivityData } from \"@msnews/social-data-service\";\r\nimport React from \"react\";\r\nimport { UsersConnector } from \"../../Social.props\";\r\nimport loadObserver from \"../../utils/ObserverHelper\";\r\n\r\nexport interface ProfileActivityReadMarkerProps {\r\n activity: ActivityData;\r\n usersConnector: UsersConnector;\r\n activityItemRef: HTMLLIElement;\r\n}\r\n\r\ninterface ProfileActivityReadMarkerState {\r\n alreadyMarkedAsRead: boolean\r\n}\r\n\r\nexport default class ProfileActivityReadMarker extends React.Component {\r\n observer: IntersectionObserver;\r\n\r\n constructor(props) {\r\n super(props);\r\n loadObserver(() => {\r\n this.observer = !this.props.activity.isSeen && new IntersectionObserver(this.componentInView.bind(this), {\r\n threshold: 1.0\r\n });\r\n });\r\n\r\n this.state = {alreadyMarkedAsRead: false};\r\n }\r\n\r\n componentDidMount() {\r\n this.observer && this.observer.observe(this.props.activityItemRef);\r\n }\r\n\r\n componentInView(entries) {\r\n if (entries[0].isIntersecting && !this.state.alreadyMarkedAsRead) {\r\n this.props.usersConnector.markActivityAsRead(this.props.activity.id);\r\n this.setState({alreadyMarkedAsRead: true});\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.observer && this.observer.disconnect();\r\n }\r\n\r\n render() {\r\n return null;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActivityData, User } from \"@msnews/social-data-service\";\r\nimport { TelemetryEventMap, dispatchTelemetryEvent } from \"../../Social.telemetry\";\r\nimport { check_small, exclamation_small } from \"../../utils/icons\";\r\n\r\nimport ProfileActivityReadMarker from \"./ProfileActivityReadMarker\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { UsersConnector } from \"../../Social.props\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport getAgoText from \"../../utils/getAgoText\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\n\r\nexport interface ProfileAlertActivityProps {\r\n activity: ActivityData;\r\n managedClasses: SocialClassNameContract;\r\n t: SocialLocalizedStrings;\r\n me: User;\r\n usersConnector: UsersConnector;\r\n checkIcon?: boolean;\r\n theme?: string;\r\n responsiveClass: string;\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n theme: state.theme\r\n };\r\n};\r\n\r\nexport class ProfileAlertActivity extends React.Component {\r\n activityItemRef: React.RefObject;\r\n isLoaded: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.activityItemRef = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (this.activityItemRef && this.activityItemRef.current) {\r\n dispatchTelemetryEvent(TelemetryEventMap.genericLoaded, this.activityItemRef.current);\r\n }\r\n\r\n this.loadedHandler();\r\n }\r\n\r\n componentDidUpdate() {\r\n this.loadedHandler();\r\n }\r\n\r\n render() {\r\n const { responsiveClass, children, activity, managedClasses, usersConnector, checkIcon, theme } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n return (\r\n \r\n {this.activityItemRef.current && }\r\n
    \r\n \r\n {checkIcon ? check_small : exclamation_small}\r\n \r\n
    \r\n
    \r\n
    { activity.message }
    \r\n\r\n { children }\r\n\r\n
    {getAgoText(activity.datetime)}
    \r\n
    \r\n
    \r\n \r\n );\r\n }\r\n\r\n loadedHandler() {\r\n if (this.isLoaded) { return; }\r\n\r\n if (this.activityItemRef && this.activityItemRef.current) {\r\n dispatchTelemetryEvent({...TelemetryEventMap.genericLoaded, sendPeregrine: true}, this.activityItemRef.current);\r\n this.isLoaded = true;\r\n }\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ProfileAlertActivity);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActivityData, User } from \"@msnews/social-data-service\";\r\n\r\nimport ProfileActivityReadMarker from \"./ProfileActivityReadMarker\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { UsersConnector } from \"../../Social.props\";\r\nimport {activityImages} from \"../../utils/images\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport getAgoText from \"../../utils/getAgoText\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\n\r\nexport interface ProfileBadgeActivityProps {\r\n activity: ActivityData;\r\n managedClasses: SocialClassNameContract;\r\n me: User;\r\n usersConnector: UsersConnector;\r\n t: SocialLocalizedStrings;\r\n theme?: string;\r\n responsiveClass: string;\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n theme: state.theme\r\n };\r\n};\r\n\r\nclass ProfileBadgeActivity extends React.Component {\r\n activityItemRef: React.RefObject;\r\n\r\n private static AchievementMessages;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.activityItemRef = React.createRef();\r\n ProfileBadgeActivity.AchievementMessages = {\r\n Member: `${props.t.AchievementTitlesMember} ${props.t.AchievementMessagesMember}`,\r\n Commenter: `${props.t.AchievementTitlesCommenter} ${props.t.AchievementMessagesCommenter}`,\r\n Networker: `${props.t.AchievementTitlesNetworker} ${props.t.AchievementMessagesNetworker}`,\r\n ConversationStarter: `${props.t.AchievementTitlesConversationStarter} ${props.t.AchievementMessagesConversationStarter}`\r\n };\r\n }\r\n\r\n render() {\r\n const { responsiveClass, activity, managedClasses, usersConnector, t, theme } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n\r\n if (!activity || !(activity.badgeType in ProfileBadgeActivity.AchievementMessages)) {\r\n return null;\r\n }\r\n const messageText = ProfileBadgeActivity.AchievementMessages[activity.badgeType];\r\n\r\n return (\r\n \r\n {this.activityItemRef.current && }\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n {messageText}\r\n
    \r\n
    \r\n {getAgoText(activity.datetime)}\r\n
    \r\n
    \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ProfileBadgeActivity);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nexport interface ProfileActivityItemTelemetryObjects {\r\n activityItem: TelemetryObjectBase;\r\n reply?: TelemetryObjectBase;\r\n profileName?: TelemetryObjectBase;\r\n}\r\n\r\nexport const profileActivityItemTelemetryContracts = {\r\n /** Profile Activity > Scenario 1a */\r\n activityItem: {\r\n name: \"activity\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Profile Activity > Scenario 2 */\r\n reply: {\r\n name: \"activity\",\r\n content: {\r\n headline: \"Reply\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Profile Activity > Scenario 3 */\r\n profileName: {\r\n name: \"activity\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n commentReactionBreakdown: {\r\n name: \"CommentReactionsOverlay\",\r\n content: {\r\n type: TelemetryContentType.Comment\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActivityData, User } from \"@msnews/social-data-service\";\r\nimport { ComponentConnector, FollowInfo, UsersConnector } from \"../../Social.props\";\r\nimport { ProfileActivityItemTelemetryObjects, profileActivityItemTelemetryContracts } from \"./ProfileActivity.telemetry\";\r\n\r\nimport FollowButton from \"../../follow-button/FollowButton\";\r\nimport ProfileActivityReadMarker from \"./ProfileActivityReadMarker\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport UserCard from \"../../comment/user-card/UserCard\";\r\nimport { addOrUpdateTelemetryObject } from \"../../Social.telemetry\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { chevron_down } from \"../../utils/icons\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport getAgoText from \"../../utils/getAgoText\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\nimport openProfilePage from \"../../utils/openProfilePage\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\n\r\nexport interface ProfileFollowActivityProps {\r\n componentConnector: ComponentConnector;\r\n t: SocialLocalizedStrings;\r\n usersConnector: UsersConnector;\r\n activity: ActivityData;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n managedClasses: SocialClassNameContract;\r\n market: string;\r\n me: User;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n theme?: string;\r\n responsiveClass: string;\r\n}\r\n\r\ninterface ProfileFollowActivityState {\r\n userCardVisible: boolean;\r\n isHoverUserCard: boolean;\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n me: state.me,\r\n users: state.users,\r\n theme: state.theme\r\n };\r\n};\r\n\r\nclass ProfileFollowActivity extends React.Component {\r\n activityItemRef: React.RefObject;\r\n telemetryObjects: ProfileActivityItemTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n userCardVisible: false,\r\n isHoverUserCard: false\r\n };\r\n\r\n this.activityItemRef = React.createRef();\r\n this.telemetryObjects = null;\r\n }\r\n\r\n showUserCard(e, isHoverUserCard= true) {\r\n this.setState({userCardVisible: true, isHoverUserCard: isHoverUserCard});\r\n }\r\n\r\n render() {\r\n const { responsiveClass, componentConnector, activity, t, managedClasses, users, market, usersConnector, me, mainTelemetryObject, theme } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n activityItem: addOrUpdateTelemetryObject(mainTelemetryObject, profileActivityItemTelemetryContracts.activityItem, {id: activity.id}, this.telemetryObjects && this.telemetryObjects.activityItem)\r\n };\r\n\r\n return (\r\n \r\n {this.activityItemRef.current && }\r\n \r\n
    \r\n
    \r\n this.showUserCard(e)}\r\n {...openProfilePage(componentConnector, theme, activity.user.id, market)}\r\n >{activity.user.name} {t.ProfileActivityFollowMsg}\r\n { !isSuperApp &&\r\n this.showUserCard(e, false)}> {chevron_down} \r\n }\r\n {this.state.userCardVisible &&\r\n this.setState({userCardVisible: false, isHoverUserCard: false}),\r\n triggerRef: this.activityItemRef,\r\n isHover: this.state.isHoverUserCard,\r\n mainTelemetryObject\r\n }}\r\n />\r\n }\r\n
    \r\n
    \r\n {getAgoText(activity.datetime)}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ProfileFollowActivity);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActivityData, User } from \"@msnews/social-data-service\";\r\nimport { ComponentConnector, FollowInfo, PopupConnector, UsersConnector } from \"../../Social.props\";\r\nimport { ProfileActivityItemTelemetryObjects, profileActivityItemTelemetryContracts } from \"./ProfileActivity.telemetry\";\r\nimport { TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, renderHybrid } from \"../../Social.telemetry\";\r\nimport { chevron_down, exclamation_round } from \"../../utils/icons\";\r\n\r\nimport MostReactions from \"../../common/most-reactions/MostReactions\";\r\nimport ProfileActivityReadMarker from \"./ProfileActivityReadMarker\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport UserCard from \"../../comment/user-card/UserCard\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport {enums} from \"../../utils/enums\";\r\nimport getAgoText from \"../../utils/getAgoText\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\nimport openArticlePage from \"../../utils/openArticlePage\";\r\nimport openGuidelinePage from \"../../utils/openGuidelinePage\";\r\nimport openProfilePage from \"../../utils/openProfilePage\";\r\n\r\ninterface ProfileReactionActivityState {\r\n miniReactionBreakdownVisible: boolean;\r\n userCardVisible: boolean;\r\n userCardUserId: string;\r\n isHoverUserCard: boolean;\r\n isHoverMiniReactionBreakdown: boolean;\r\n messageTruncated: boolean;\r\n}\r\n\r\nexport interface ProfileReactionActivityProps {\r\n componentConnector: ComponentConnector;\r\n activity: ActivityData;\r\n me: User;\r\n managedClasses?: SocialClassNameContract;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n usersConnector: UsersConnector;\r\n t: SocialLocalizedStrings;\r\n popupConnector: PopupConnector;\r\n market: string;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n theme?: string;\r\n responsiveClass: string;\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n theme: state.theme\r\n };\r\n};\r\n\r\nclass ProfileReactionActivity extends React.Component {\r\n activityItemRef: HTMLLIElement;\r\n reactionMenuIconRef: React.RefObject;\r\n telemetryObjects: ProfileActivityItemTelemetryObjects;\r\n messageRef: React.RefObject;\r\n isLoaded: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n miniReactionBreakdownVisible: false,\r\n userCardVisible: false,\r\n userCardUserId: \"\",\r\n isHoverUserCard: false,\r\n isHoverMiniReactionBreakdown: false,\r\n messageTruncated: null\r\n };\r\n\r\n this.activityItemRef = null;\r\n this.reactionMenuIconRef = React.createRef();\r\n this.messageRef = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.activity.target.comment.mentionUser && !(this.props.users && this.props.users[this.props.activity.target.comment.mentionUser])) {\r\n this.props.usersConnector.fetchUser(this.props.activity.target.comment.mentionUser);\r\n }\r\n this.checkMessageTruncated();\r\n this.loadedHandler();\r\n }\r\n\r\n componentDidUpdate() {\r\n this.checkMessageTruncated();\r\n this.loadedHandler();\r\n }\r\n\r\n checkMessageTruncated() {\r\n /** Check if message is truncated by webkit clamp */\r\n if (this.messageRef && this.messageRef.current && this.state.messageTruncated == null) {\r\n this.messageRef.current.scrollHeight > this.messageRef.current.clientHeight + 10\r\n ? this.setState({messageTruncated: true})\r\n : this.setState({messageTruncated: false});\r\n }\r\n }\r\n\r\n onReactionsClick(id) {\r\n this.props.popupConnector.openPopup(\"reactionBreakdownComment\", {id, parentTelemetryObject: addOrUpdateTelemetryObject(this.props.mainTelemetryObject, profileActivityItemTelemetryContracts.commentReactionBreakdown, {}), focusBackRef: this.reactionMenuIconRef.current});\r\n }\r\n\r\n showUserCard(e, userId, isHoverUserCard=true) {\r\n this.setState({userCardVisible: true, userCardUserId: userId, isHoverUserCard: isHoverUserCard});\r\n }\r\n\r\n render() {\r\n const { responsiveClass, componentConnector, activity, managedClasses, t, me, usersConnector, users, market, mainTelemetryObject, theme } = this.props;\r\n const reactionCounts = activity.target.reactionCounts;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n const { messageTruncated } = this.state;\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n activityItem: addOrUpdateTelemetryObject(mainTelemetryObject, profileActivityItemTelemetryContracts.activityItem, { id: activity.id}, this.telemetryObjects && this.telemetryObjects.activityItem)\r\n };\r\n\r\n // Reaction Counts\r\n const totalReactionCount = reactionCounts ? Object.values(reactionCounts).reduce(($sum, $count) => $sum + $count, 0) : 0;\r\n\r\n let commentBody;\r\n if (activity.target.comment.isDeleted) {\r\n commentBody =\r\n
    \r\n \r\n {t[enums.visibleStatusMap[activity.target.comment.visibleStatus] || enums.visibleStatusMap.Default]}\r\n {exclamation_round}\r\n \r\n
    ;\r\n } else {\r\n const mentionUserId = activity.target.comment.mentionUser;\r\n commentBody =\r\n
    \r\n
    \r\n {mentionUserId &&\r\n \r\n this.showUserCard(e, mentionUserId)}\r\n {...openProfilePage(componentConnector, theme, mentionUserId, market)}\r\n >{users && users[mentionUserId] && users[mentionUserId].data && users[mentionUserId].data.name}\r\n { !isSuperApp &&\r\n this.showUserCard(e, mentionUserId, false)}> {chevron_down} \r\n }\r\n  \r\n \r\n }\r\n \r\n
    \r\n \r\n
    \r\n { messageTruncated && }\r\n
    ;\r\n }\r\n\r\n return (\r\n { this.activityItemRef = el; })}\r\n >\r\n {this.activityItemRef && }\r\n
    \r\n this.onReactionsClick(activity.target.comment.id)}\r\n hideLabel={true}\r\n {...{reactionCounts, t, managedClasses, theme}}\r\n />\r\n\r\n { !isSuperApp &&\r\n this.setState({miniReactionBreakdownVisible: !this.state.miniReactionBreakdownVisible, isHoverMiniReactionBreakdown: false})}\r\n onBlur={()=>{ this.setState({miniReactionBreakdownVisible: false, isHoverMiniReactionBreakdown: false}); }}>\r\n {chevron_down}\r\n \r\n }\r\n
    \r\n {this.state.userCardVisible &&\r\n this.setState({userCardVisible: false, isHoverUserCard: false}),\r\n triggerRef: { current: this.activityItemRef } as React.Ref,\r\n isHover: this.state.isHoverUserCard,\r\n mainTelemetryObject\r\n }}\r\n />\r\n }\r\n
    \r\n
    \r\n { `${totalReactionCount} ${totalReactionCount > 1 ? t.ProfileActivityReactionPluralMsg : t.ProfileActivityReactionMsg} `}\r\n {t.CommentLink} \r\n {commentBody}\r\n
    \r\n
    {getAgoText(activity.datetime)}
    \r\n
    \r\n
    \r\n \r\n );\r\n }\r\n\r\n loadedHandler() {\r\n if (this.isLoaded) { return; }\r\n\r\n if (this.activityItemRef) {\r\n dispatchTelemetryEvent({...TelemetryEventMap.genericLoaded, sendPeregrine: true}, this.activityItemRef);\r\n this.isLoaded = true;\r\n }\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ProfileReactionActivity);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActivityData, User } from \"@msnews/social-data-service\";\r\nimport { ComponentConnector, FollowInfo, UsersConnector } from \"../../Social.props\";\r\nimport { ProfileActivityItemTelemetryObjects, profileActivityItemTelemetryContracts } from \"./ProfileActivity.telemetry\";\r\nimport { TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, renderHybrid } from \"../../Social.telemetry\";\r\nimport { chevron_down, exclamation_round } from \"../../utils/icons\";\r\n\r\nimport ProfileActivityReadMarker from \"./ProfileActivityReadMarker\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport UserCard from \"../../comment/user-card/UserCard\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport {enums} from \"../../utils/enums\";\r\nimport getAgoText from \"../../utils/getAgoText\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\nimport openArticlePage from \"../../utils/openArticlePage\";\r\nimport openGuidelinePage from \"../../utils/openGuidelinePage\";\r\nimport openProfilePage from \"../../utils/openProfilePage\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\n\r\ninterface ProfileReplyActivityState {\r\n userCardVisible: boolean;\r\n userCardUserId: string;\r\n isHoverUserCard: boolean;\r\n messageTruncated: boolean;\r\n mentionUserCardVisible: boolean;\r\n}\r\n\r\nexport interface ProfileReplyActivityProps {\r\n componentConnector: ComponentConnector;\r\n activity: ActivityData;\r\n t: SocialLocalizedStrings;\r\n managedClasses: SocialClassNameContract;\r\n usersConnector: UsersConnector;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n market: string;\r\n me: User;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n theme?: string;\r\n responsiveClass: string;\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n theme: state.theme\r\n };\r\n};\r\n\r\nclass ProfileReplyActivity extends React.Component {\r\n activityItemRef: HTMLLIElement;\r\n telemetryObjects: ProfileActivityItemTelemetryObjects;\r\n messageRef: React.RefObject;\r\n isLoaded: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n userCardVisible: false,\r\n userCardUserId: \"\",\r\n isHoverUserCard: false,\r\n messageTruncated: null,\r\n mentionUserCardVisible: false\r\n };\r\n\r\n this.activityItemRef = null;\r\n this.telemetryObjects = null;\r\n this.messageRef = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.activity.target.comment.mentionUser && !(this.props.users && this.props.users[this.props.activity.target.comment.mentionUser])) {\r\n this.props.usersConnector.fetchUser(this.props.activity.target.comment.mentionUser);\r\n }\r\n this.checkMessageTruncated();\r\n this.loadedHandler();\r\n }\r\n\r\n componentDidUpdate() {\r\n this.checkMessageTruncated();\r\n this.loadedHandler();\r\n }\r\n\r\n checkMessageTruncated() {\r\n /** Check if message is truncated by webkit clamp */\r\n if (this.messageRef && this.messageRef.current && this.state.messageTruncated == null) {\r\n this.messageRef.current.scrollHeight > this.messageRef.current.clientHeight + 10\r\n ? this.setState({messageTruncated: true})\r\n : this.setState({messageTruncated: false});\r\n }\r\n }\r\n\r\n showUserCard(e, userId, isHoverUserCard=true) {\r\n this.setState({userCardVisible: true, userCardUserId: userId, isHoverUserCard: isHoverUserCard, mentionUserCardVisible: false});\r\n }\r\n\r\n showMentionUserCard(e, userId, isHoverUserCard=true) {\r\n this.setState({mentionUserCardVisible: true, userCardUserId: userId, isHoverUserCard: isHoverUserCard, userCardVisible: false});\r\n }\r\n\r\n userCardOnHide() {\r\n this.setState({userCardVisible: false, mentionUserCardVisible: false, isHoverUserCard: false});\r\n }\r\n\r\n render() {\r\n const { responsiveClass, componentConnector, activity, t, managedClasses, users, market, usersConnector, me, mainTelemetryObject, theme } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n const { messageTruncated } = this.state;\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n activityItem: addOrUpdateTelemetryObject(mainTelemetryObject, profileActivityItemTelemetryContracts.activityItem, {id: activity.id}, this.telemetryObjects && this.telemetryObjects.activityItem)\r\n };\r\n\r\n let commentBody; // message\r\n if (activity.target.comment.isDeleted) {\r\n commentBody =\r\n
    \r\n \r\n {t[enums.visibleStatusMap[activity.target.comment.visibleStatus] || enums.visibleStatusMap.Default]}\r\n {exclamation_round}\r\n \r\n
    ;\r\n } else {\r\n const mentionUser = activity.target.comment.mentionUser;\r\n commentBody =\r\n
    \r\n
    \r\n {mentionUser &&\r\n \r\n this.showMentionUserCard(e, mentionUser)}\r\n {...openProfilePage(componentConnector, theme, mentionUser, market)}\r\n >{users && users[mentionUser] && users[mentionUser].data && users[mentionUser].data.name}\r\n { !isSuperApp &&\r\n this.showUserCard(e, mentionUser, false)}> {chevron_down} \r\n }\r\n  \r\n {this.state.mentionUserCardVisible &&\r\n this.userCardOnHide(),\r\n triggerRef: { current: this.activityItemRef } as React.Ref,\r\n isHover: this.state.isHoverUserCard,\r\n mainTelemetryObject\r\n }}\r\n />\r\n }\r\n \r\n }\r\n \r\n
    \r\n \r\n
    \r\n { messageTruncated && }\r\n
    ;\r\n }\r\n\r\n return (\r\n { this.activityItemRef = el; })}\r\n >\r\n {this.activityItemRef && }\r\n \r\n
    \r\n
    \r\n this.showUserCard(e, activity.user.id)}\r\n {...openProfilePage(componentConnector, theme, activity.user.id, market)}\r\n >{ activity.user.name }\r\n { !isSuperApp &&\r\n this.showUserCard(e, activity.user.id, false)}> {chevron_down} \r\n }\r\n\r\n {t.ProfileActivityReplyMsg} {t.CommentLink} \r\n {this.state.userCardVisible &&\r\n this.userCardOnHide(),\r\n triggerRef: { current: this.activityItemRef } as React.Ref,\r\n isHover: this.state.isHoverUserCard,\r\n mainTelemetryObject\r\n }}\r\n />\r\n }\r\n {commentBody}\r\n
    \r\n
    {getAgoText(activity.datetime)}
    \r\n
    \r\n
    \r\n \r\n );\r\n }\r\n\r\n loadedHandler() {\r\n if (this.isLoaded) { return; }\r\n\r\n if (this.activityItemRef) {\r\n dispatchTelemetryEvent({...TelemetryEventMap.genericLoaded, sendPeregrine: true}, this.activityItemRef);\r\n this.isLoaded = true;\r\n }\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ProfileReplyActivity);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport { Activities, ActivityData, User } from \"@msnews/social-data-service\";\r\nimport { CommentConnector, ComponentConnector, FollowInfo, PopupConnector, UsersConnector } from \"../../Social.props\";\r\n\r\nimport ProfileAlertActivity from \"./ProfileAlertActivity\";\r\nimport ProfileBadgeActivity from \"./ProfileBadgeActivity\";\r\nimport ProfileFollowActivity from \"./ProfileFollowActivity\";\r\nimport ProfileReactionActivity from \"./ProfileReactionActivity\";\r\nimport ProfileReplyActivity from \"./ProfileReplyActivity\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\nimport loadObserver from \"../../utils/ObserverHelper\";\r\nimport openEditProfilePage from \"../../utils/openEditProfilePage\";\r\nimport openGuidelinePage from \"../../utils/openGuidelinePage\";\r\nimport { profileImages } from \"../../utils/images\";\r\n\r\nexport interface ProfileActivityProps {\r\n componentConnector: ComponentConnector;\r\n t: SocialLocalizedStrings;\r\n user: User;\r\n usersConnector: UsersConnector;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n empty: Array;\r\n managedClasses: SocialClassNameContract;\r\n market: string;\r\n me: User;\r\n activities: Activities;\r\n popupConnector: PopupConnector;\r\n commentConnector: CommentConnector;\r\n mainTelemetryObject: TelemetryObjectBase;\r\n theme?: string;\r\n responsiveClass: string;\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n me: state.me,\r\n activities: state.activities,\r\n theme: state.theme\r\n };\r\n};\r\n\r\nexport class ProfileActivity extends React.Component {\r\n profileActivityListContainerRef: React.RefObject;\r\n footerRef: React.RefObject;\r\n observer: IntersectionObserver;\r\n isLoading: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.profileActivityListContainerRef = React.createRef();\r\n this.footerRef = React.createRef();\r\n loadObserver(() => {\r\n this.observer = new IntersectionObserver(this.footerInView.bind(this), {\r\n threshold: 1.0\r\n });\r\n });\r\n }\r\n\r\n async componentDidMount() {\r\n this.isLoading = true;\r\n await this.props.usersConnector.fetchActivities();\r\n this.isLoading = false;\r\n\r\n this.footerRef.current && this.observer.observe(this.footerRef.current);\r\n }\r\n\r\n async footerInView(entries) {\r\n if (entries[0].isIntersecting && !this.isLoading && this.props.activities && this.props.activities.hasMore) {\r\n this.isLoading = true;\r\n await this.props.usersConnector.fetchActivities();\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.footerRef.current && this.observer.unobserve(this.footerRef.current);\r\n }\r\n\r\n requestReview(commentId, activityId) {\r\n this.props.commentConnector.appealComment(commentId, activityId);\r\n }\r\n\r\n requestUserAppeal(activityId) {\r\n this.props.usersConnector.appealMe(activityId);\r\n }\r\n\r\n requestUserPictureAppeal(activityId) {\r\n this.props.usersConnector.appealMyPicture(activityId);\r\n }\r\n\r\n render() {\r\n const { responsiveClass, componentConnector, user, t, managedClasses, users, usersConnector, market, me, activities, popupConnector, mainTelemetryObject, theme } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n if (!user || !activities) { return null; }\r\n\r\n return (\r\n activities.list.length > 0\r\n ?
      \r\n {activities.list.filter(x => !x.skipRender).map(activity => {\r\n const propsToPass = {responsiveClass, componentConnector, activity, t, managedClasses, users, usersConnector, me, market, popupConnector, mainTelemetryObject };\r\n switch (activity.type) {\r\n case enums.activityType.follow:\r\n return ;\r\n\r\n case enums.activityType.badge:\r\n return ;\r\n\r\n case enums.activityType.reply:\r\n return ;\r\n\r\n case enums.activityType.reaction:\r\n return ;\r\n\r\n case enums.activityType.moderation: {\r\n switch (activity.moderationErrorType) {\r\n case enums.moderationErrorType.takedown:\r\n return \r\n { activity.target && activity.target.body &&

      { activity.target.body }

      }\r\n
      \r\n {t.ProfileActivityViewGuidelines}\r\n {activity.appealSent\r\n ? \r\n {t.ProfileActivityRequestReceived}\r\n \r\n : \r\n {t.ProfileActivityRequestReview}\r\n \r\n }\r\n
      \r\n
      ;\r\n\r\n case enums.moderationErrorType.ban:\r\n return \r\n
      \r\n {t.ProfileActivityViewGuidelines}\r\n {activity.appealSent\r\n ? \r\n {t.ProfileActivityRequestReceived}\r\n \r\n : \r\n {t.ProfileActivityRequestReview}\r\n \r\n }\r\n
      \r\n
      ;\r\n\r\n case enums.moderationErrorType.notAllowName:\r\n return \r\n
      \r\n {t.ProfileActivityViewGuidelines}\r\n {activity.appealSent\r\n ? \r\n {t.ProfileActivityRequestReceived}\r\n \r\n : \r\n {t.ProfileActivityRequestReview}\r\n \r\n }\r\n\r\n openEditProfilePage(theme, market, \"_blank\")}> {t.ProfileActivityEditProfile}\r\n
      \r\n
      ;\r\n case enums.moderationErrorType.notAllowPicture:\r\n return \r\n
      \r\n {t.ProfileActivityViewGuidelines}\r\n {activity.appealSent\r\n ? \r\n {t.ProfileActivityRequestReceived}\r\n \r\n : \r\n {t.ProfileActivityRequestReview}\r\n \r\n }\r\n openEditProfilePage(theme, market, \"_blank\")}> {t.ProfileActivityEditProfile}\r\n
      \r\n
      ;\r\n case enums.moderationErrorType.rejectUserAppeal:\r\n case enums.moderationErrorType.rejectProfilePicAppeal:\r\n case enums.moderationErrorType.rejectCommentAppeal:\r\n return \r\n
      \r\n {t.ProfileActivityViewGuidelines}\r\n
      \r\n
      ;\r\n case enums.moderationErrorType.approveUserAppeal:\r\n case enums.moderationErrorType.approveCommentAppeal:\r\n case enums.moderationErrorType.approveProfilePicAppeal:\r\n return ;\r\n }\r\n }\r\n }\r\n })}\r\n
    • \r\n
    \r\n :
    \r\n {t.ImgAltsZeroActivityProfile}/\r\n
    {t.ProfileActivityZeroActivityMessage}
    \r\n
    {t.ProfileActivityZeroActivitySubMessage}
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ProfileActivity);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nexport interface ProfileCommentsTelemetryObjects {\r\n mainItem: TelemetryObjectBase\r\n}\r\n\r\nexport const profileCommentsTelemetryContracts = {\r\n mainItem: {\r\n name: \"Profile\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase, TelemetryType } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface ProfileCommentItemTelemetryObjects {\r\n commentItem: TelemetryObjectBase;\r\n replyLink: TelemetryObjectBase;\r\n reactionCountsBtn: TelemetryObjectBase;\r\n reactionBreakdown: TelemetryObjectBase;\r\n}\r\n\r\nexport const profileCommentItemTelemetryContracts = {\r\n /** Profile Comments > Scenario 0a */\r\n commentItem: {\r\n name: \"Comments\",\r\n content: {\r\n type: TelemetryContentType.Comment\r\n }\r\n },\r\n /** Scenario 2 click on reply/replies link */\r\n replyLink: {\r\n name: \"Comment\",\r\n behavior: TelemetryBehaviorType.Navigate,\r\n type: TelemetryType.ActionButton,\r\n content: {\r\n headline: \"Reply\",\r\n type: TelemetryContentType.Comment\r\n }\r\n },\r\n /** Scenario 3 click on reactoinCounts to open Reactionbreakdown */\r\n reactionCountsBtn: {\r\n name: \"CommentReactions\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n headline: \"Reactions\",\r\n type: TelemetryContentType.Comment\r\n }\r\n },\r\n reactionBreakdown: {\r\n content: {\r\n type: TelemetryContentType.Comment\r\n }\r\n }\r\n};\r\n\r\nexport const profileCommentItemTelemetryActionDispatchers = {\r\n /** Used for: Scenario 3a and Scenario 4a */\r\n reactionCountsClicked: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Comment, User } from \"@msnews/social-data-service\";\r\nimport { CommentConnector, ComponentConnector, FollowInfo, PopupConnector, UsersConnector } from \"../../Social.props\";\r\nimport { ProfileCommentItemTelemetryObjects, profileCommentItemTelemetryActionDispatchers, profileCommentItemTelemetryContracts } from \"./ProfileCommentItem.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\nimport { arrow_reply, chevron_down, ellipsis, exclamation_round, trash } from \"../../utils/icons\";\r\nimport { hasThemeBase, isComponentDisabled } from \"../../utils/themeHelpers\";\r\n\r\nimport DeleteMenu from \"../../common/delete-menu/DeleteMenu\";\r\nimport DisabledMessage from \"../../comment/disabled-message/DisabledMessage\";\r\nimport MostReactions from \"../../common/most-reactions/MostReactions\";\r\nimport React from \"react\";\r\nimport ReportMenu from \"../../common/report-menu/ReportMenu\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport UserCard from \"../../comment/user-card/UserCard\";\r\nimport { contentImageFallback } from \"../../utils/avatarFallback\";\r\nimport {enums} from \"../../utils/enums\";\r\nimport getAgoText from \"../../utils/getAgoText\";\r\nimport openArticlePage from \"../../utils/openArticlePage\";\r\nimport openGuidelinePage from \"../../utils/openGuidelinePage\";\r\nimport openProfilePage from \"../../utils/openProfilePage\";\r\n\r\nexport interface ProfileCommentItemProps {\r\n componentConnector: ComponentConnector;\r\n comment: Comment;\r\n user: User;\r\n t: SocialLocalizedStrings;\r\n me: User;\r\n managedClasses?: SocialClassNameContract;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n usersConnector: UsersConnector;\r\n commentConnector: CommentConnector;\r\n popupConnector: PopupConnector;\r\n market: string;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n theme: string;\r\n responsiveClass: string;\r\n}\r\n\r\ninterface ProfileCommentItemState {\r\n miniReactionBreakdownVisible: boolean,\r\n userCardVisible: boolean,\r\n userCardUserId: string,\r\n deleteMenuVisible: boolean,\r\n reportMenuVisible: boolean,\r\n selectedReportType: string,\r\n messageTruncated: boolean,\r\n isHoverUserCard: boolean,\r\n isHoverMiniReactionBreakdown: boolean\r\n}\r\n\r\nexport default class ProfileCommentItem extends React.Component {\r\n messageRef: React.RefObject;\r\n telemetryObjects: ProfileCommentItemTelemetryObjects;\r\n reactionsCountBtn: HTMLElement;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n miniReactionBreakdownVisible: false,\r\n userCardVisible: false,\r\n userCardUserId: \"\",\r\n deleteMenuVisible: false,\r\n reportMenuVisible: false,\r\n selectedReportType: null,\r\n messageTruncated: null,\r\n isHoverUserCard: false,\r\n isHoverMiniReactionBreakdown: false\r\n };\r\n\r\n this.messageRef = React.createRef();\r\n this.reactionsCountBtn = null;\r\n this.telemetryObjects = null;\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.comment.mentionUser && !(this.props.users && this.props.users[this.props.comment.mentionUser])) {\r\n this.props.usersConnector.fetchUser(this.props.comment.mentionUser);\r\n }\r\n this.checkMessageTruncated();\r\n }\r\n\r\n componentDidUpdate() {\r\n this.checkMessageTruncated();\r\n }\r\n\r\n checkMessageTruncated() {\r\n /** Check if message is truncated by webkit clamp */\r\n if (this.messageRef && this.messageRef.current && this.state.messageTruncated == null) {\r\n this.messageRef.current.scrollHeight > this.messageRef.current.clientHeight + 10\r\n ? this.setState({messageTruncated: true})\r\n : this.setState({messageTruncated: false});\r\n }\r\n }\r\n\r\n showUserCard(e, userId, isHoverUserCard=true) {\r\n this.setState({userCardVisible: true, userCardUserId: userId, isHoverUserCard: isHoverUserCard});\r\n }\r\n\r\n deleteComment(e, commentId, parentId, userId) {\r\n this.props.commentConnector.deleteComment(commentId, parentId, userId);\r\n }\r\n\r\n reportHandler(reportType, e) {\r\n this.setState({\r\n reportMenuVisible: false,\r\n selectedReportType: reportType\r\n });\r\n }\r\n\r\n showReportMenu(e) {\r\n const { theme, popupConnector, comment } = this.props;\r\n const isMobile = this.props.responsiveClass.includes(enums.responsiveLevels.L1);\r\n const isEmbeded = isComponentDisabled(theme, \"reportmenu\");\r\n const isSuperApp = theme && hasThemeBase(theme, enums.theme.superappBase);\r\n\r\n if (isEmbeded || isMobile || isSuperApp) {\r\n popupConnector.openPopup(\"reportmenu\", { id: comment.id });\r\n } else {\r\n this.setState({\r\n reportMenuVisible: true\r\n });\r\n }\r\n }\r\n\r\n onReactionsClick(e, id) {\r\n this.props.popupConnector.openPopup(\"reactionBreakdownComment\", {id, parentTelemetryObject: this.telemetryObjects && this.telemetryObjects.reactionBreakdown, focusBackRef: this.reactionsCountBtn});\r\n profileCommentItemTelemetryActionDispatchers.reactionCountsClicked(e.currentTarget, this.telemetryObjects && this.telemetryObjects.reactionCountsBtn);\r\n }\r\n\r\n render() {\r\n const {componentConnector, comment, user, me, managedClasses, t, users, usersConnector, market, mainTelemetryObject, theme} = this.props;\r\n const {id, createDatetime, content, text, parentId, reactionCounts, replyCount, mentionUser, isDeleted, isInReview, visibleStatus} = comment;\r\n const isReply = (!parentId || 0 === parentId.length);\r\n const isSelf = me && me.id == user.id;\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n\r\n /** Generate Telemetry Objects */\r\n const commentItemTelemetryObject = addOrUpdateTelemetryObject(mainTelemetryObject, profileCommentItemTelemetryContracts.commentItem, { id }, this.telemetryObjects && this.telemetryObjects.commentItem);\r\n this.telemetryObjects = {\r\n commentItem: commentItemTelemetryObject,\r\n replyLink: addOrUpdateTelemetryObject(commentItemTelemetryObject, profileCommentItemTelemetryContracts.replyLink, { id }, this.telemetryObjects && this.telemetryObjects.replyLink),\r\n reactionCountsBtn: addOrUpdateTelemetryObject(commentItemTelemetryObject, profileCommentItemTelemetryContracts.reactionCountsBtn, { id }, this.telemetryObjects && this.telemetryObjects.reactionCountsBtn),\r\n reactionBreakdown: addOrUpdateTelemetryObject(commentItemTelemetryObject, profileCommentItemTelemetryContracts.reactionBreakdown, { id }, this.telemetryObjects && this.telemetryObjects.reactionBreakdown)\r\n };\r\n\r\n // Reaction Counts\r\n const totalReactionCount = reactionCounts ? Object.values(reactionCounts).reduce(($sum, $count) => $sum + $count, 0) : 0;\r\n\r\n /* SUB ELEMENTS */\r\n let commentBody; // message\r\n if (isDeleted) {\r\n commentBody = \r\n {t[enums.visibleStatusMap[visibleStatus] || enums.visibleStatusMap.Default]}\r\n {exclamation_round}\r\n ;\r\n } else {\r\n commentBody =\r\n \r\n {mentionUser &&\r\n \r\n this.showUserCard(e, mentionUser)}\r\n {...openProfilePage(componentConnector, theme, mentionUser, market)}\r\n >{users && users[mentionUser] && users[mentionUser].data && users[mentionUser].data.name}\r\n { !isSuperApp &&\r\n this.showUserCard(e, mentionUser, false)}> {chevron_down} \r\n }\r\n  \r\n \r\n }\r\n
    \r\n ;\r\n }\r\n let innerContent;\r\n if (this.state.selectedReportType) {\r\n innerContent = ;\r\n } else if (isInReview) {\r\n innerContent = ;\r\n } else {\r\n innerContent =\r\n \r\n
    \r\n
    \r\n
    {commentBody}
    \r\n { this.state.messageTruncated && }\r\n
    \r\n {this.state.userCardVisible &&\r\n this.setState({userCardVisible: false, isHoverUserCard: false}),\r\n triggerRef: this.messageRef,\r\n isHover: this.state.isHoverUserCard,\r\n mainTelemetryObject\r\n }}\r\n />\r\n }\r\n { (totalReactionCount > 0 || replyCount > 0) &&\r\n
    \r\n this.onReactionsClick(e, comment.id)}\r\n setReactionsCountRef={element => this.reactionsCountBtn = element}\r\n {...{ reactionCounts, t, managedClasses, theme}}\r\n />\r\n\r\n { replyCount > 0 &&\r\n \r\n \r\n {arrow_reply}\r\n {\r\n replyCount == 1\r\n ? t.ProfileCommentsReplyLink.replace(\"{#}\", \"1\")\r\n : t.ProfileCommentsReplyPluralLink.replace(\"{#}\", replyCount.toString())\r\n }\r\n \r\n \r\n }\r\n
    \r\n }\r\n
    \r\n \r\n
    \r\n \"Content\r\n {content.title}\r\n
    \r\n
    \r\n
    ;\r\n }\r\n return (\r\n
  • \r\n
    \r\n {isReply ? t.ProfileCommentItemComment : t.ProfileCommentItemCommentReply}\r\n {getAgoText(createDatetime)}\r\n
    \r\n {!isDeleted &&\r\n (isSelf ?\r\n \r\n this.setState({deleteMenuVisible: true})}>\r\n {trash}\r\n \r\n {this.state.deleteMenuVisible &&\r\n this.deleteComment(e, comment.id, comment.parentId, user.id)}\r\n onHide={() => this.setState({deleteMenuVisible: false})}\r\n managedClasses={managedClasses}\r\n className={managedClasses.profileCommentsDeleteMenuPopover}\r\n mainTelemetryObject={this.telemetryObjects && this.telemetryObjects.commentItem}\r\n />\r\n }\r\n \r\n :\r\n \r\n this.showReportMenu(e)}>\r\n {ellipsis}\r\n \r\n {this.state.reportMenuVisible &&\r\n this.setState({reportMenuVisible: false})}\r\n focusLockStyle=\"cwt-report-profile-comments\"\r\n popupConnector={this.props.popupConnector}\r\n usersConnector={this.props.usersConnector}\r\n responsiveClass={this.props.responsiveClass}\r\n renderInPopover={true}\r\n mainTelemetryObject={this.telemetryObjects && this.telemetryObjects.commentItem}\r\n {...{t, managedClasses, id, theme, me}}\r\n />\r\n }\r\n \r\n )\r\n }\r\n
    \r\n
    \r\n\r\n { innerContent }\r\n
  • \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { CommentConnector, ComponentConnector, FollowInfo, PopupConnector, ProfileConnector, UsersConnector } from \"../../Social.props\";\r\nimport { Comments, User } from \"@msnews/social-data-service\";\r\nimport { ProfileCommentsTelemetryObjects, profileCommentsTelemetryContracts } from \"./ProfileComments.telemetry\";\r\n\r\nimport ProfileCommentItem from \"./ProfileCommentItem\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport SortBox from \"../../common/sort-box/SortBox\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { addOrUpdateTelemetryObject } from \"../../Social.telemetry\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\nimport { profileImages } from \"../../utils/images\";\r\n\r\nexport interface ProfileCommentsProps {\r\n componentConnector: ComponentConnector;\r\n comments: Comments;\r\n user: User;\r\n t: SocialLocalizedStrings;\r\n me: User;\r\n managedClasses?: SocialClassNameContract;\r\n users: { [id: string]: FollowInfo;}; // dictionary definening\r\n profileConnector: ProfileConnector;\r\n commentConnector: CommentConnector;\r\n usersConnector: UsersConnector;\r\n market: string;\r\n popupConnector: PopupConnector;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n theme?: string;\r\n responsiveClass?: string;\r\n}\r\n\r\ninterface ProfileCommentsState {\r\n sortType: string\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n theme: state.theme\r\n };\r\n};\r\n\r\nexport class ProfileComments extends React.Component {\r\n profileCommentListContainerRef: React.RefObject;\r\n isLoading: boolean;\r\n telemetryObjects: ProfileCommentsTelemetryObjects;\r\n static sortTypes = {\r\n Rating: \"CommentSortByTopResponseTxt\",\r\n Time: \"CommentSortByNewestTxt\",\r\n \"Time asc\": \"CommentSortByOldestTxt\"\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.profileCommentListContainerRef = React.createRef();\r\n this.state = {\r\n sortType: \"Time\"\r\n };\r\n }\r\n\r\n async handleScroll() {\r\n const elem = this.profileCommentListContainerRef.current;\r\n if (!this.props.user || !this.props.user.id || !elem || this.isLoading || !this.props.comments || !this.props.comments.moreCount) {\r\n return;\r\n }\r\n const scrollPosition = elem.offsetHeight - window.pageYOffset - window.innerHeight;\r\n if (scrollPosition < 100) {\r\n this.isLoading = true;\r\n await this.props.profileConnector.fetchUserComments(this.props.user.id, false, this.state.sortType);\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n async componentDidMount() {\r\n window.addEventListener(\"scroll\", this.handleScroll.bind(this));\r\n if (!this.props.user || !this.props.user.id) {\r\n return;\r\n }\r\n this.isLoading = true;\r\n await this.props.profileConnector.fetchUserComments(this.props.user.id, false, this.state.sortType);\r\n this.isLoading = false;\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener(\"scroll\", this.handleScroll.bind(this));\r\n }\r\n\r\n render() {\r\n const {componentConnector, comments, user, t, me, managedClasses, users, usersConnector, commentConnector, market, popupConnector, mainTelemetryObject, theme, responsiveClass} = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n let userId = undefined;\r\n if (user) { userId = user.id; }\r\n\r\n if (!user) { return null; }\r\n const isSelf = me && me.id == user.id;\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n mainItem: addOrUpdateTelemetryObject(mainTelemetryObject, profileCommentsTelemetryContracts.mainItem, {id: user.traceId}, this.telemetryObjects && this.telemetryObjects.mainItem)\r\n\r\n };\r\n\r\n return (\r\n (comments && comments.list.length > 0)\r\n ?
    \r\n { !isSuperApp && }\r\n
      \r\n {comments && comments.list && comments.list.map((comment) => )}\r\n
    \r\n
    \r\n :
    \r\n {t.ImgAltsNoComments}/\r\n
    {isSelf ? `${t.ProfilePageCommentsNoCommentForUserTitle}`: `${t.ProfilePageCommentsNoCommentForOthersTitle}`}
    \r\n
    {isSelf ? `${t.ProfilePageCommentsNoCommentForUserText}` : `${t.ProfilePageCommentsNoCommentForOthersText}`}
    \r\n
    \r\n );\r\n }\r\n\r\n getSortedComments(sortType) {\r\n this.setState({sortType});\r\n this.props.profileConnector.fetchUserComments(this.props.user.id, true, sortType);\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ProfileComments);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface ProfilePrivacyTelemetryObjects {\r\n privateSwitchTurnOff: TelemetryObjectBase;\r\n privateSwitchTurnOn: TelemetryObjectBase;\r\n manageYourDataBtn: TelemetryObjectBase;\r\n}\r\n\r\nexport const profilePrivacyTelemetryContracts = {\r\n /** Scenario 2a click on turnoff\r\n * id: traceId\r\n */\r\n privateSwitchTurnOff: {\r\n name: \"PrivacySwitch\",\r\n behavior: TelemetryBehaviorType.TurnOff,\r\n content: {\r\n headline: \"Turn Off\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Scenario 2b click on turnon\r\n * id: traceId\r\n */\r\n privateSwitchTurnOn: {\r\n name: \"PrivacySwitch\",\r\n behavior: TelemetryBehaviorType.TurnOn,\r\n content: {\r\n headline: \"Turn On\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Scenario 3 click on turnon\r\n * id: traceId\r\n */\r\n manageYourDataBtn: {\r\n name: \"ManageYourData\",\r\n behavior: TelemetryBehaviorType.Open,\r\n content: {\r\n headline: \"Continue\",\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n};\r\n\r\nexport const profilePrivacyTelemetryActionDispatchers = {\r\n /** Used for: Scenario 3a and Scenario 4a */\r\n genericClicked: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport { ProfilePrivacyTelemetryObjects, profilePrivacyTelemetryActionDispatchers, profilePrivacyTelemetryContracts } from \"./ProfilePrivacy.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\n\r\nimport AccessibilityHelpers from \"../../utils/AccessibilityHelpers\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { User } from \"@msnews/social-data-service\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\n\r\nexport interface ProfilePrivacyProps extends SocialProps {\r\n user: User;\r\n}\r\n\r\nexport default class ProfilePrivacy extends React.Component {\r\n divRef: React.RefObject;\r\n telemetryObjects: ProfilePrivacyTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.divRef = React.createRef();\r\n }\r\n\r\n togglePrivateChecked(e, isPrivateProfile, telemetryObject) {\r\n this.props.profileConnector.setProfilePrivate(this.props.user.id, !isPrivateProfile);\r\n profilePrivacyTelemetryActionDispatchers.genericClicked(e.currentTarget, telemetryObject);\r\n }\r\n\r\n clearDataClickHandler(e) {\r\n this.props.popupConnector.openPopup(\"manageDataPage\");\r\n }\r\n\r\n componentDidMount() {\r\n AccessibilityHelpers.attachAccessibilityListeners(document, this.divRef.current);\r\n }\r\n render() {\r\n const { responsiveClass, user, managedClasses, t, mainTelemetryObject, theme } = this.props;\r\n if (!user) { return null; }\r\n const { isPrivateProfile, traceId } = user;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n\r\n const ButtonWrapperComponent = isSuperApp ? AccentButton : OutlineButton;\r\n\r\n this.telemetryObjects = {\r\n privateSwitchTurnOff: addOrUpdateTelemetryObject(mainTelemetryObject, profilePrivacyTelemetryContracts.privateSwitchTurnOff, { id: traceId }, this.telemetryObjects && this.telemetryObjects.privateSwitchTurnOff),\r\n privateSwitchTurnOn: addOrUpdateTelemetryObject(mainTelemetryObject, profilePrivacyTelemetryContracts.privateSwitchTurnOn, { id: traceId }, this.telemetryObjects && this.telemetryObjects.privateSwitchTurnOn),\r\n manageYourDataBtn: addOrUpdateTelemetryObject(mainTelemetryObject, profilePrivacyTelemetryContracts.manageYourDataBtn, { id: traceId }, this.telemetryObjects && this.telemetryObjects.manageYourDataBtn)\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n
    {t.ProfilePagePrivateProfileTitle}
    \r\n \r\n \r\n { isPrivateProfile ? `${t.ProfilePagePrivacySwitchOn}` : `${t.ProfilePagePrivacySwitchOff}`}\r\n \r\n
    \r\n\r\n

    {t.ProfilePagePrivacySwitchText}

    \r\n\r\n
    \r\n\r\n
    \r\n
    {t.ProfilePagePrivacyManageTitle}
    \r\n

    {t.ProfilePagePrivacyManageText}

    \r\n\r\n {t.ProfilePagePrivacyClearDataButton}\r\n
    \r\n
    \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n ProductType,\r\n Subscription,\r\n TransactionHistoryItem,\r\n getSubscriptions,\r\n getTransactionHistory,\r\n renderCreateSubscription,\r\n renderManageSubscription,\r\n unlinkPublisher\r\n} from \"@msnews/subscription-sdk-wrapper\";\r\nimport { arrow_down, credit_card, renew } from \"../../utils/icons\";\r\n\r\nimport { OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { User } from \"@msnews/social-data-service\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { getExternalURL } from \"../../utils/urlHelper\";\r\nimport { getXPayToken } from \"@msnews/social-data-service\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\n\r\nexport interface ProfileSubscriptionsProps extends SocialProps {\r\n user: User;\r\n publishers: {[publisherId: string]: User};\r\n}\r\n\r\nexport interface ProfileSubscriptionsState {\r\n subscriptions: Subscription[];\r\n expandedSubscriptions: Set;\r\n transactions: {[subscriptionId: string]: TransactionHistoryItem[]};\r\n transactionFetchErrors: {[subscriptionId: string]: boolean};\r\n subscriptionsFetchFailed?: boolean;\r\n}\r\n\r\nexport default class ProfileSubscriptions extends React.Component {\r\n subscriptions: Subscription[] = [];\r\n constructor(props) {\r\n super(props);\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState(): ProfileSubscriptionsState {\r\n return {\r\n subscriptions: [],\r\n expandedSubscriptions: new Set(),\r\n transactions: {},\r\n transactionFetchErrors: {}\r\n };\r\n }\r\n\r\n isSubscriptionActive(subscription: Subscription) {\r\n return subscription.subscriptionStatus === \"Active\";\r\n }\r\n\r\n getUtcDate(timestring) {\r\n // Explicitly add time-zone info if it does not exist\r\n timestring = timestring.includes(\"Z\") ? timestring : timestring+\"Z\";\r\n return new Date(timestring);\r\n }\r\n\r\n isSubscriptionPrepaid(subscription: Subscription) {\r\n // TODO: Learn how to understand if a subscription is prepaid and implement it\r\n return false;\r\n }\r\n\r\n getPaymentMethodString(paymentInfoString: string) {\r\n const paymentInfo = JSON.parse(paymentInfoString);\r\n const cardType = paymentInfo.cardType.charAt(0).toUpperCase() + paymentInfo.cardType.slice(1);\r\n return `${cardType} **${paymentInfo.last4CardNumber}`;\r\n }\r\n\r\n async loadSubscriptions() {\r\n const { fetchUser } = this.props.usersConnector;\r\n const subscriptionsResponse = await getSubscriptions({ authToken: await getXPayToken() });\r\n if (subscriptionsResponse.status) {\r\n subscriptionsResponse.data.forEach(async subscription => {\r\n fetchUser(subscription.publisherIdFromMsn);\r\n const transactionResponse = await getTransactionHistory({\r\n subscriptionId: subscription.subscriptionId,\r\n authToken: await getXPayToken()\r\n });\r\n if (transactionResponse.status) {\r\n this.setState(state => ({\r\n transactions: {...state.transactions, [subscription.subscriptionId]: transactionResponse.data}\r\n }));\r\n } else {\r\n this.setState(state => ({\r\n transactionFetchErrors: {...state.transactionFetchErrors, [subscription.subscriptionId]: true}\r\n }));\r\n }\r\n });\r\n this.setState(() => ({ subscriptions: subscriptionsResponse.data }));\r\n } else {\r\n this.setState(() => ({ subscriptionsFetchFailed: true }));\r\n }\r\n }\r\n\r\n async reloadSubscriptions() {\r\n this.setState(() => this.getInitialState());\r\n this.loadSubscriptions();\r\n }\r\n\r\n componentDidMount() {\r\n this.loadSubscriptions();\r\n }\r\n\r\n render() {\r\n const { responsiveClass, managedClasses, t, theme, publishers } = this.props;\r\n const { subscriptions, subscriptionsFetchFailed } = this.state;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n\r\n if (!subscriptions || !publishers) { return; }\r\n\r\n if (subscriptionsFetchFailed) {\r\n return (\r\n
    \r\n

    {t.ProfilePageSubscriptionsFetchError}

    \r\n
    \r\n );\r\n }\r\n\r\n const activeSubscriptions = subscriptions.filter((subs) =>subs && this.isSubscriptionActive(subs));\r\n const expiredSubscriptions = subscriptions.filter((subs) => subs && !this.isSubscriptionActive(subs));\r\n\r\n const activeSubscriptionsTitle = t.ProfilePageSubscriptionsActiveSubscriptionsTitle;\r\n const expiredSubscriptionsTitle = t.ProfilePageSubscriptionsExpiredSubscriptionsTitle;\r\n\r\n return (\r\n
    \r\n { this.renderSubscriptionHistoryCard(activeSubscriptionsTitle, activeSubscriptions) }\r\n { expiredSubscriptions && expiredSubscriptions.length ? this.renderSubscriptionHistoryCard(expiredSubscriptionsTitle, expiredSubscriptions) : null }\r\n
    \r\n );\r\n }\r\n\r\n renderSubscriptionHistoryCard(title: string, subscriptions: Subscription[]) {\r\n const { managedClasses } = this.props;\r\n return this.state.subscriptions && (\r\n
    \r\n
    \r\n { title }\r\n
    \r\n
    \r\n {/* Use index as key for now, because all publishers are the same currently, the mock publisher */}\r\n { subscriptions && subscriptions.length ? subscriptions.map((subs, index) => this.renderSingleSubscription(subs, index)) : this.renderEmptyState()}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderEmptyState() {\r\n const { t } = this.props;\r\n return
    \r\n { t.ProfilePageSubscriptionsNoSubscription } \r\n
    ;\r\n }\r\n\r\n renderSingleSubscription(subscription: Subscription, index: number) {\r\n const { responsiveClass, managedClasses, publishers, t } = this.props;\r\n const { transactions, transactionFetchErrors } = this.state;\r\n\r\n const publisher = publishers[subscription.publisherIdFromMsn];\r\n if (!publisher) { return; }\r\n\r\n let actionButtonType: string;\r\n if (!this.isSubscriptionActive(subscription) && !subscription.isSyncedFromPublisher) {\r\n actionButtonType = \"renew\";\r\n } else if (!this.isSubscriptionActive(subscription) && subscription.isSyncedFromPublisher) {\r\n actionButtonType = \"delink\";\r\n } else if (this.isSubscriptionActive(subscription)) {\r\n actionButtonType = \"manage\";\r\n }\r\n\r\n return this.state.subscriptions && (\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n { publisher.primaryName }\r\n
    \r\n \r\n { publisher.otherProperties.siteUrl }\r\n \r\n
    \r\n
    \r\n { this.renderActionButton(actionButtonType, publisher, subscription) }\r\n
    \r\n
    \r\n
    \r\n { this.calculateFooterTag(subscription)} \r\n { this.isSubscriptionActive(subscription) && \r\n { this.calculatePaymentInfo(subscription) }\r\n }\r\n
    \r\n { this.renderFooterAction(subscription) }\r\n
    \r\n
    \r\n
    \r\n { transactionFetchErrors[subscription.subscriptionId] ?\r\n
    \r\n

    {t.ProfilePageSubscriptionsTransactionFetchError}

    \r\n
    :\r\n transactions[subscription.subscriptionId] && transactions[subscription.subscriptionId].map((trans, index) => (\r\n
    \r\n {credit_card}\r\n
    \r\n { String.Format(\r\n t.ProfilePageSubscriptionsTransactionInfo,\r\n {paymentAmount: `${trans.paidAmount}$`, paymentDate: this.getUtcDate(trans.paymentDateTimeUtc).toLocaleDateString()}\r\n ) }\r\n
    \r\n
    \r\n ))\r\n }\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderActionButton(actionButtonType, publisher, subscription: Subscription) {\r\n const { t, me, market } = this.props;\r\n\r\n let actionButtonIcon: JSX.Element;\r\n let actionButtonText: string;\r\n let action: () => Promise;\r\n if (actionButtonType === \"renew\") {\r\n actionButtonIcon = renew;\r\n actionButtonText= t.ProfilePageSubscriptionsRenewButtonTitle;\r\n action = async () => renderCreateSubscription({\r\n publisherId: subscription.publisherIdFromMsn,\r\n publisherName: publisher.primaryName,\r\n publisherLogoUrl: publisher.primaryAvatar,\r\n productType: ProductType.Premium,\r\n userProfilePageUrl: getExternalURL(`${enums.externalUrls.profilePage}${me.id}`, market),\r\n locale: market,\r\n authToken: await getXPayToken(),\r\n userProfileImageUrl: me.primaryAvatar,\r\n scenario: \"feed\",\r\n onSuccess: () => this.reloadSubscriptions()\r\n });\r\n } else if (actionButtonType === \"manage\") {\r\n actionButtonText = t.ProfilePageSubscriptionsManageButtonTitle;\r\n action = async () => renderManageSubscription({\r\n publisherId: subscription.publisherIdFromMsn,\r\n publisherName: publisher.primaryName,\r\n publisherLogoUrl: publisher.primaryAvatar,\r\n userProfilePageUrl: getExternalURL(`${enums.externalUrls.profilePage}${me.id}`, market),\r\n locale: market,\r\n authToken: await getXPayToken(),\r\n userProfileImageUrl: me.primaryAvatar,\r\n onSuccess: () => this.reloadSubscriptions()\r\n });\r\n } else if (actionButtonType === \"delink\") {\r\n actionButtonText = t.ProfilePageSubscriptionsDelinkButtonTitle;\r\n action = async () => {\r\n const success = await unlinkPublisher({\r\n publisherId: subscription.publisherIdFromMsn,\r\n authToken: await getXPayToken()\r\n });\r\n if (success) {\r\n this.reloadSubscriptions();\r\n }\r\n };\r\n }\r\n return actionButtonIcon && {actionButtonIcon} }\r\n onClick={action}\r\n className={classNames(\"button-active\")}\r\n >\r\n { actionButtonText }\r\n ;\r\n }\r\n\r\n renderFooterAction(subscription: Subscription) {\r\n const { t, publishers } = this.props;\r\n const { transactions } = this.state;\r\n const isExpanded = this.state.expandedSubscriptions.has(subscription);\r\n const subscriptionId = subscription.subscriptionId;\r\n const publisher = publishers[subscription.publisherIdFromMsn];\r\n\r\n const transactionAction = transactions[subscriptionId] && transactions[subscriptionId].length ?
    this.toggleExpand(subscription)} className=\"transaction-history-trigger\">\r\n {t.ProfilePageSubscriptionsTransactionsHistory} \r\n {arrow_down}\r\n
    : null;\r\n return !this.isSubscriptionActive(subscription) && subscription.isSyncedFromPublisher ?\r\n {t.ProfilePageSubscriptionsVisitSite} : transactionAction;\r\n }\r\n\r\n calculateFooterTag(subscription: Subscription) {\r\n const { t, publishers } = this.props;\r\n const publisher = publishers[subscription.publisherIdFromMsn];\r\n\r\n const expirationDate = this.getUtcDate(subscription.expireDateUtc).toLocaleDateString();\r\n if (this.isSubscriptionActive(subscription)) {\r\n return this.isSubscriptionPrepaid(subscription) ? String.Format(t.ProfilePageSubscriptionsFooterTagPrepaidPayment, {expirationDate}) : String.Format(t.ProfilePageSubscriptionsFooterTagPeriodicPayment, {price: `${subscription.chargeAmount}$`, period: subscription.chargeCycle.toLowerCase()});\r\n } else {\r\n return subscription.isSyncedFromPublisher ? String.Format(t.ProfilePageSubscriptionsFooterTagManagedByPublisher, {publisherName: publisher.primaryName}) : String.Format(t.ProfilePageSubscriptionsFooterTagExpired, {expirationDate});\r\n }\r\n }\r\n\r\n toggleExpand(key) {\r\n const newExpandedSubscriptions = new Set(this.state.expandedSubscriptions);\r\n if (this.state.expandedSubscriptions.has(key)) {\r\n newExpandedSubscriptions.delete(key);\r\n } else {\r\n newExpandedSubscriptions.add(key);\r\n }\r\n this.setState({expandedSubscriptions: newExpandedSubscriptions});\r\n\r\n }\r\n\r\n calculatePaymentInfo(subscription: Subscription) {\r\n const { t } = this.props;\r\n const nextChargeDate = this.getUtcDate(subscription.nextChargeDateUtc).toLocaleDateString();\r\n const paymentMethod = this.getPaymentMethodString(subscription.paymentInfo);\r\n return this.isSubscriptionPrepaid(subscription) ? String.Format(t.ProfilePageSubscriptionsFooterPaymentInfoPrepaid, {paymentMethod}) : String.Format(t.ProfilePageSubscriptionsFooterPaymentInfoNextCharge, {nextChargeDay: nextChargeDate, paymentMethod});\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryType } from \"@msnews/telemetry-contracts\";\r\n\r\nexport const profileUsersTelemetryContracts = {\r\n /** Scenario 2 click profile name\r\n * id: traceId\r\n * headline: username\r\n */\r\n nameLink: {\r\n name: \"Profile\",\r\n behavior: TelemetryBehaviorType.Navigate,\r\n type: TelemetryType.ActionButton,\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ComponentConnector, UsersConnector } from \"../../Social.props\";\r\nimport { TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, renderHybrid } from \"../../Social.telemetry\";\r\nimport { User, UserList } from \"@msnews/social-data-service\";\r\n\r\nimport FollowButton from \"../../follow-button/FollowButton\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { connect } from \"react-redux\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\nimport loadObserver from \"../../utils/ObserverHelper\";\r\nimport openProfilePage from \"../../utils/openProfilePage\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\nimport { profileUsersTelemetryContracts } from \"./ProfileUsers.telemetry\";\r\n\r\nexport interface ProfileUsersProps {\r\n componentConnector: ComponentConnector;\r\n user: User;\r\n t: SocialLocalizedStrings;\r\n users: UserList;\r\n managedClasses?: SocialClassNameContract;\r\n usersConnector: UsersConnector;\r\n fetchUsers: (userId: string) => void;\r\n market: string;\r\n mainTelemetryObject?: TelemetryObjectBase;\r\n theme?: string;\r\n responsiveClass: string;\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n theme: state.theme\r\n };\r\n};\r\n\r\nexport class ProfileUsers extends React.Component {\r\n containerRef: React.RefObject;\r\n footerRef: React.RefObject;\r\n observer: IntersectionObserver;\r\n isLoading: boolean;\r\n listItemTelemetryObjectMap: Array;\r\n isLoaded: boolean;\r\n isObservingFooter: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.containerRef = React.createRef();\r\n this.footerRef = React.createRef();\r\n loadObserver(() => {\r\n this.observer = new IntersectionObserver(this.footerInView.bind(this), {\r\n threshold: 1.0\r\n });\r\n });\r\n this.listItemTelemetryObjectMap = [];\r\n this.isLoaded = false;\r\n }\r\n\r\n async footerInView(entries) {\r\n if (entries[0].isIntersecting && !this.isLoading && this.props.users && this.props.users.hasMore) {\r\n this.isLoading = true;\r\n await this.props.fetchUsers(this.props.user.id);\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.footerRef.current && this.observer.unobserve(this.footerRef.current);\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.containerRef && this.containerRef.current && !this.isLoaded) {\r\n this.isLoaded = true;\r\n dispatchTelemetryEvent({...TelemetryEventMap.genericLoaded, sendPeregrine: true}, this.containerRef.current);\r\n }\r\n\r\n if (this.footerRef.current && this.observer && !this.isObservingFooter) {\r\n this.isObservingFooter = true;\r\n this.footerRef.current && this.observer.observe(this.footerRef.current);\r\n }\r\n }\r\n\r\n render() {\r\n const { responsiveClass, user, t, users, managedClasses, market, componentConnector, usersConnector, mainTelemetryObject, theme } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n if (!user) { return null; }\r\n\r\n return (\r\n \r\n {\r\n users.list.map((user)=>{\r\n this.listItemTelemetryObjectMap[user.id] = addOrUpdateTelemetryObject(mainTelemetryObject, {...mainTelemetryObject.contract}, { id: user.traceId }, this.listItemTelemetryObjectMap[user.id]);\r\n this.listItemTelemetryObjectMap[`nameLink-${user.id}-name`] = addOrUpdateTelemetryObject(mainTelemetryObject, {...profileUsersTelemetryContracts.nameLink}, { id: user.traceId, headline: user.name}, this.listItemTelemetryObjectMap[`nameLink-${user.id}-name`]);\r\n this.listItemTelemetryObjectMap[`nameLink-${user.id}-avatar`] = addOrUpdateTelemetryObject(mainTelemetryObject, {...profileUsersTelemetryContracts.nameLink}, { id: user.traceId, headline: user.name}, this.listItemTelemetryObjectMap[`nameLink-${user.id}-avatar`]);\r\n\r\n return (\r\n
  • \r\n \r\n { avatarFallback(e); }}\r\n />\r\n \r\n
    \r\n \r\n {user.name}\r\n \r\n
    \r\n
    {user.postsCount} {t.ProfileCommentsLbl}
    \r\n
    {user.followersCount} {t.ProfileFollowersLbl}
    \r\n
    {user.likesCount} {t.ProfileReactionsLbl}
    \r\n
    \r\n
    \r\n
    \r\n { !isSuperApp && }\r\n
    \r\n
  • );\r\n })\r\n }\r\n
  • \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ProfileUsers);","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ProfileTabsTelemetryObjects, profileTabsTelemetryActionDispatchers, profileTabsTelemetryContracts } from \"./ProfileTabs.telemetry\";\r\nimport {activity, comment, subscriptions, user_following, user_locked, users2} from \"../../utils/icons\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\n\r\nimport { AccentButton } from \"@microsoft/fast-components-react-msft\";\r\nimport ProfileActivity from \"../profile-activity/ProfileActivity\";\r\nimport ProfileComments from \"../profile-comments/ProfileComments\";\r\nimport ProfilePrivacy from \"../profile-privacy/ProfilePrivacy\";\r\nimport ProfileSubscriptions from \"../profile-subscriptions/ProfileSubscriptions\";\r\nimport ProfileUsers from \"../profile-users/ProfileUsers\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { getContextData } from \"@msnews/core\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\nimport { profileImages } from \"../../utils/images\";\r\n\r\nexport interface ProfileTabsProps extends SocialProps {\r\n emptyState?: string;\r\n activeTabs?: Array;\r\n}\r\n\r\ninterface ProfileTabsState {\r\n activeTab: Object;\r\n}\r\nexport default class ProfileTabs extends React.Component {\r\n telemetryObjects: ProfileTabsTelemetryObjects;\r\n tabContentRef: React.RefObject;\r\n\r\n private static profileTabs = {\r\n Activity: {label: \"Activity\", icon: activity},\r\n Comments: {label: \"Comments\", icon: comment},\r\n Followers: {label: \"Followers\", icon: users2},\r\n Following: {label: \"Following\", icon: user_following},\r\n Privacy: {label: \"Privacy\", icon: user_locked},\r\n Subscriptions: {label: \"Subscriptions\", icon: subscriptions}\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n activeTab: null\r\n };\r\n this.telemetryObjects = null;\r\n this.tabContentRef = React.createRef();\r\n\r\n ProfileTabs.profileTabs = {\r\n Activity: {label: props.t.ProfileTabsActivityTab, icon: activity},\r\n Comments: {label: props.t.ProfileTabsCommentsTab, icon: comment},\r\n Followers: {label: props.t.ProfileTabsFollowersTab, icon: users2},\r\n Following: {label: props.t.ProfileTabsFollowingTab, icon: user_following},\r\n Privacy: {label: props.t.ProfileTabsPrivacyTab, icon: user_locked},\r\n Subscriptions: {label: props.t.ProfileTabsSubscriptionsTab, icon: subscriptions}\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.activeTabs) {\r\n this.props.profileConnector && this.props.profileConnector.onProfilePageComponentConnected(this.props.id);\r\n }\r\n\r\n const requestContext = this.props.requestContext;\r\n const locationHref = getContextData(requestContext.data.locationHref, \"locationHref\");\r\n const tabNameFromUrl = Object.keys(ProfileTabs.profileTabs).filter(key => locationHref.toLowerCase().endsWith(key.toLowerCase())).pop();\r\n if (tabNameFromUrl) {\r\n this.setState({ activeTab: ProfileTabs.profileTabs[tabNameFromUrl] });\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.activeTabs && this.props.id != null && this.props.market != null && prevProps.id != this.props.id || prevProps.market != this.props.market) {\r\n this.props.profileConnector && this.props.profileConnector.onProfilePageComponentConnected(this.props.id);\r\n }\r\n\r\n /* when opened a new profile without rerendering component itself, reset the active tab */\r\n if (prevProps.id != this.props.id) {\r\n this.showTab(null, null, null);\r\n }\r\n }\r\n\r\n showTab(e, tab, telemetryObject) {\r\n this.setState({\r\n activeTab: tab\r\n });\r\n if (e) {\r\n document.getElementById(\"tabHeaders\").scrollLeft = document.getElementById(tab.label).offsetLeft;\r\n telemetryObject && profileTabsTelemetryActionDispatchers.tabClicked(e.currentTarget, telemetryObject);\r\n }\r\n this.onTabChange(e);\r\n }\r\n\r\n onTabChange(e) {\r\n this.scrollToTop();\r\n }\r\n\r\n scrollToTop() {\r\n const shouldMove = this.tabContentRef && this.tabContentRef.current && this.tabContentRef.current.getBoundingClientRect().top < 55;\r\n if (shouldMove) { this.tabContentRef.current.scrollIntoView({ behavior: \"smooth\", block: \"start\" }); }\r\n }\r\n\r\n openOnboardingPopup() {\r\n this.props.popupConnector.openPopup(\"onboardingPage\");\r\n }\r\n\r\n render() {\r\n if (this.props.id === \"me\" && !this.props.me) { return null; }\r\n const userId = this.props.id === \"me\" ? this.props.me.id : this.props.id;\r\n const {componentConnector, me, responsiveClass, t, users, managedClasses, usersConnector, profileConnector, commentConnector, market, popupConnector, emptyState, mainTelemetryObject, ugContentConnector, theme, enableSubscriptionFeatures, activeTabs } = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n if (!users) { return null; }\r\n const user = users[userId] ? users[userId].data : null;\r\n if (!user) { return null; }\r\n const {comments, postsCount, isPrivateProfile, name, followers, following, isBanned, traceId} = user;\r\n const isSelf = !activeTabs && me && me.id == userId;\r\n const profileExistsButNotSocial = emptyState == enums.profilePageEmptyStates.NotSocialUser;\r\n let activeTab: any;\r\n if (profileExistsButNotSocial) {\r\n activeTab = null;\r\n } else if (isSelf && this.state.activeTab == null) {\r\n activeTab = ProfileTabs.profileTabs.Activity;\r\n } else if (!isSelf && (this.state.activeTab == ProfileTabs.profileTabs.Activity || this.state.activeTab == ProfileTabs.profileTabs.Privacy || this.state.activeTab == ProfileTabs.profileTabs.Subscriptions)) {\r\n activeTab = ProfileTabs.profileTabs.Comments;\r\n } else if (this.state.activeTab == ProfileTabs.profileTabs.Subscriptions && !enableSubscriptionFeatures) {\r\n activeTab = ProfileTabs.profileTabs.Activity;\r\n } else if (activeTabs && activeTabs.length > 0) {\r\n Object.keys(ProfileTabs.profileTabs).forEach(key => {\r\n // First element of activeTabs list accepted as activeTab\r\n if (ProfileTabs.profileTabs[key].label == activeTabs[0]) { activeTab = ProfileTabs.profileTabs[key]; }\r\n });\r\n } else {\r\n activeTab = this.state.activeTab || ProfileTabs.profileTabs.Comments;\r\n }\r\n const publishers = Object.keys(users).reduce((publishers, userId) => {\r\n if (users[userId].data && users[userId].data.subType === \"Publisher\") {\r\n return {...publishers, [userId]: users[userId].data};\r\n } else {\r\n return publishers;\r\n }\r\n }, {});\r\n\r\n /** Generate Telemetry Objects */\r\n this.telemetryObjects = {\r\n tabs: {},\r\n followers: addOrUpdateTelemetryObject(mainTelemetryObject, {...profileTabsTelemetryContracts.followers}, {}, this.telemetryObjects && this.telemetryObjects.followers),\r\n following: addOrUpdateTelemetryObject(mainTelemetryObject, {...profileTabsTelemetryContracts.following}, {}, this.telemetryObjects && this.telemetryObjects.following)\r\n };\r\n\r\n if ((isBanned && !isSelf) || emptyState == enums.profilePageEmptyStates.NoUser) {\r\n return (
    \r\n {t.ImgAltPrivateProfile}\r\n
    \r\n {t.ProfileNotAvailableTxt}\r\n
    \r\n
    );\r\n } else if (isPrivateProfile && !isSelf) {\r\n return (
    \r\n {t.ImgAltPrivateProfile}\r\n
    \r\n {`${name} ${t.ProfilePrivateAccountMsg}`}\r\n
    \r\n
    );\r\n } else {\r\n let followersTab: any;\r\n if (activeTab == ProfileTabs.profileTabs.Followers) {\r\n if (followers && followers.list && followers.list.length > 0) {\r\n followersTab = ;\r\n } else {\r\n followersTab =
    \r\n {t.ImgAltNoFollowers}/\r\n
    {isSelf ? `${t.NoFollowersTitleForUser}` : `${t.NoFollowersTitleForOthers}`}
    \r\n
    {isSelf ? `${t.NoFollowersTextForUser}` : `${t.NoFollowersTextForOthers}`}
    \r\n
    ;\r\n }\r\n } else {\r\n followersTab = \"\";\r\n }\r\n\r\n let followingTab: any;\r\n if (activeTab == ProfileTabs.profileTabs.Following) {\r\n if (following && following.list && following.list.length > 0) {\r\n followingTab = ;\r\n } else {\r\n followingTab =
    \r\n {t.ImgAltNoFollowings}/\r\n
    {isSelf ? `${t.NoFollowingTitleForUser}` : `${t.NoFollowingTitleForOthers}`}
    \r\n
    {isSelf ? `${t.NoFollowingTextForUser}` : \"\"}
    \r\n
    ;\r\n }\r\n } else {\r\n followingTab = \"\";\r\n }\r\n\r\n return (
    \r\n
      \r\n { Object.keys(ProfileTabs.profileTabs).map(key => {\r\n const tab = ProfileTabs.profileTabs[key];\r\n if (tab == ProfileTabs.profileTabs.Activity && !isSelf && !profileExistsButNotSocial) { return \"\"; }\r\n if (tab == ProfileTabs.profileTabs.Privacy && !isSelf && !profileExistsButNotSocial) { return \"\"; }\r\n if (tab == ProfileTabs.profileTabs.Subscriptions && (!isSelf || !enableSubscriptionFeatures)) { return \"\"; }\r\n if (activeTabs && activeTab && activeTab != tab) { return \"\"; }\r\n\r\n this.telemetryObjects.tabs[key] = addOrUpdateTelemetryObject(mainTelemetryObject, profileTabsTelemetryContracts.tabs[key], {id: traceId}, this.telemetryObjects && this.telemetryObjects.tabs[key]);\r\n return (\r\n
    • this.showTab(e, tab, this.telemetryObjects.tabs[key])}\r\n aria-selected={activeTab == tab}\r\n {...renderHybrid(this.telemetryObjects.tabs[key], false)}\r\n >\r\n \r\n {tab.icon}\r\n {tab.label}\r\n \r\n
    • \r\n );\r\n }\r\n )}\r\n
    \r\n\r\n
    \r\n { activeTab == ProfileTabs.profileTabs.Activity &&\r\n \r\n }\r\n\r\n { activeTab == ProfileTabs.profileTabs.Comments &&\r\n \r\n }\r\n\r\n { followersTab }\r\n\r\n { followingTab }\r\n\r\n { activeTab == ProfileTabs.profileTabs.Subscriptions &&\r\n \r\n }\r\n\r\n { activeTab == ProfileTabs.profileTabs.Privacy &&\r\n \r\n }\r\n\r\n { !activeTab && profileExistsButNotSocial\r\n ?
    \r\n {t.ImgAltPrivateProfile}/\r\n
    {t.ProfileNotSocialUserJoinMessage}
    \r\n {t.ProfileNotSocialUserJoinButton}\r\n
    \r\n : \"\"\r\n }\r\n
    \r\n
    );\r\n }\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport Navbar from \"../../common/navbar/Navbar\";\r\nimport ProfileCard from \"../profile-card/ProfileCard\";\r\nimport ProfileTabs from \"../profile-tabs/ProfileTabs\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { initializeSubscriptionSdk } from \"@msnews/subscription-sdk-wrapper\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { getContextData } from \"@msnews/core\";\r\nimport { hasThemeBase } from \"../../utils/themeHelpers\";\r\n\r\nexport interface ProfilePageState {\r\n subscriptionSdkInitialized: boolean;\r\n}\r\n\r\nexport default class ProfilePage extends React.Component {\r\n\r\n constructor(props: SocialProps) {\r\n super(props);\r\n this.state = {\r\n subscriptionSdkInitialized: false\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.props.profileConnector && this.props.profileConnector.onProfilePageComponentConnected(this.props.id);\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.id != null && this.props.market != null && prevProps.id != this.props.id || prevProps.market != this.props.market) {\r\n this.props.profileConnector && this.props.profileConnector.onProfilePageComponentConnected(this.props.id);\r\n }\r\n\r\n // Mark the TTVR when the store is updated after the social api for user profile returned\r\n if (!prevProps.users && this.props.users) {\r\n this.props.markTtvr();\r\n }\r\n\r\n const { me, id, enableSubscriptionFeatures } = this.props;\r\n const isSelf = me && (me.id === id || id == \"me\");\r\n if (isSelf && enableSubscriptionFeatures && !this.state.subscriptionSdkInitialized) {\r\n initializeSubscriptionSdk();\r\n this.setState(() => ({ subscriptionSdkInitialized: true }));\r\n }\r\n }\r\n\r\n render() {\r\n const t = this.props.t;\r\n let emptyState = null;\r\n let props = { ...this.props, t, id: this.props.me && this.props.id == \"me\" ? this.props.me.id : this.props.id};\r\n\r\n const { me, id } = this.props;\r\n const isSelf = me && (me.id == id || id == \"me\");\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n\r\n if (this.props.users && this.props.users[props.id] && this.props.users[props.id].isFetched && this.props.users[props.id].data && !this.props.users[props.id].data.isSocialUser) {\r\n if (!this.props.me || this.props.me.state == enums.userStateType.anonymous) {\r\n // This profile does not exist\r\n emptyState = enums.profilePageEmptyStates.NoUser;\r\n } else if (this.props.me.state == enums.userStateType.existingUser) {\r\n // Redirect to my profile\r\n const requestContext = this.props.requestContext;\r\n const locationHref = getContextData(requestContext.data.locationHref, \"locationHref\");\r\n if (locationHref.includes(`id=${this.props.id}`)) {\r\n window.location.href = locationHref.replace(`id=${this.props.id}`, `id=${this.props.me.id}`);\r\n } else {\r\n props = { ...props, id: this.props.me.id };\r\n }\r\n } else {\r\n // Show Join Now design here since user is not a social user yet\r\n emptyState = enums.profilePageEmptyStates.NotSocialUser;\r\n }\r\n }\r\n\r\n return (\r\n
    \r\n { isSuperApp &&\r\n this.navbarEllipsisHandler())}\r\n onBackClick={() => this.navbarBackHandler()}\r\n whiteIcons={true}\r\n />\r\n }\r\n \r\n \r\n
    \r\n );\r\n }\r\n\r\n /**\r\n * SuperApp Function\r\n */\r\n navbarEllipsisHandler() {\r\n this.showReportMenu();\r\n }\r\n\r\n navbarBackHandler() {\r\n if (history.state.initial) {\r\n this.props.popupConnector.closePopup();\r\n } else {\r\n history.back();\r\n }\r\n }\r\n\r\n /* REPORTING */\r\n showReportMenu() {\r\n const { popupConnector, id } = this.props;\r\n popupConnector.openPopup(\"profilereportmenu\", { id: id });\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryActionType, TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport {TelemetryEventNames, dispatchTelemetryEvent} from \"../../Social.telemetry\";\r\n\r\nexport interface PublisherProfileCardTelemetryObjects {\r\n publisherProfileCard: TelemetryObjectBase;\r\n subscribeButton: TelemetryObjectBase;\r\n followButton: TelemetryObjectBase;\r\n}\r\n\r\nexport const publisherProfileCardTelemetryContracts = {\r\n\r\n publisherProfileCard: {\r\n name: \"PublisherUserProfile\",\r\n content: {\r\n headline: \"PublisherUserProfile\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n subscribeButton: {\r\n name: \"Subscribe\",\r\n behavior: TelemetryBehaviorType.Undefined,\r\n content: {\r\n headline: \"Subscribe\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n followButton: {\r\n name: \"FollowButton\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n\r\n};\r\n\r\nexport const buttonsTelemetryActionDispatchers = {\r\n subscribeButton: (element: any, isSubscribe: boolean, telemetryObject: TelemetryObjectBase): void => {\r\n const telemetryEventDispatcherInfo = {\r\n eventName: TelemetryEventNames.genericAction,\r\n contract: telemetryObject.contract,\r\n subTypes: {action: TelemetryActionType.Click, behavior: TelemetryBehaviorType.Undefined}\r\n };\r\n dispatchTelemetryEvent(telemetryEventDispatcherInfo, element, null, true);\r\n },\r\n followButton: (element: any, isFollow: boolean, telemetryObject: TelemetryObjectBase): void => {\r\n const telemetryEventDispatcherInfo = {\r\n eventName: TelemetryEventNames.genericAction,\r\n contract: telemetryObject.contract,\r\n subTypes: {action: TelemetryActionType.Click, behavior: isFollow ? TelemetryBehaviorType.Follow : TelemetryBehaviorType.Unfollow}\r\n };\r\n\r\n dispatchTelemetryEvent(telemetryEventDispatcherInfo, element, null, true);\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport Popover from \"../../../common/popover/Popover\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../../Social.props\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { abbreviateNumber } from \"@msnews/core\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\n\r\nexport interface PublisherProfileCardStatsProps extends SocialProps {\r\n followersCount: number;\r\n}\r\n\r\nexport interface PublisherProfileCardStatsState {\r\n followersDefinitionPopoverVisible: boolean;\r\n}\r\n\r\nexport default class PublisherProfileCardStats extends React.Component {\r\n followersTriggerRef: React.RefObject;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n followersDefinitionPopoverVisible: false\r\n };\r\n this.followersTriggerRef = React.createRef();\r\n }\r\n\r\n render() {\r\n return this.renderDefault();\r\n }\r\n\r\n renderDefault() {\r\n const { followersCount, t, responsiveClass, managedClasses } = this.props;\r\n\r\n return (\r\n
    \r\n this.setState({followersDefinitionPopoverVisible: true})}\r\n onMouseLeave={(e) => this.setState({followersDefinitionPopoverVisible: false})}\r\n className=\"cwt-stat\" ref={this.followersTriggerRef} aria-label={followersCount > 1 ? String.Format(t.AriaLabelFollowers, followersCount) : String.Format(t.AriaLabelFollower, followersCount)}\r\n >\r\n {this.abbreviate(followersCount) || \"-\"} {t.ProfileFollowersLbl} \r\n
    \r\n { this.state.followersDefinitionPopoverVisible && this.setState({followersDefinitionPopoverVisible: false}),\r\n className: managedClasses.followersDefinitionPopoverContainer,\r\n managedClasses: managedClasses,\r\n isHover: true,\r\n hoverDelay: 600\r\n }}>\r\n { this.renderPopoverContext(this.getFollowersDefinitionText()) }\r\n \r\n }\r\n
  • \r\n );\r\n }\r\n\r\n getLikesDefinitionText() {\r\n return this.props.t.PublisherProfilePageLikesDescription;\r\n }\r\n\r\n getFollowersDefinitionText() {\r\n return this.props.t.PublisherProfilePageFollowersDescription;\r\n }\r\n\r\n abbreviate(value) {\r\n return abbreviateNumber(value);\r\n }\r\n\r\n renderPopoverContext(definition: string) {\r\n return (\r\n
    \r\n

    { definition }

    \r\n
    \r\n );\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, Button, NeutralButton, OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport {\r\n ProductType,\r\n getSubscriptionStatus,\r\n renderCreateSubscription,\r\n renderLinkToPublisher,\r\n renderManageSubscription\r\n} from \"@msnews/subscription-sdk-wrapper\";\r\nimport {PublisherProfileCardTelemetryObjects, publisherProfileCardTelemetryContracts} from \"./PublisherProfileCard.telemetry\";\r\nimport { SharingHelper, SocialMedia } from \"@msnews/views-helpers\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\nimport { check, email, facebook, linkedin, plus, publisherTabPremium, twitter } from \"../../utils/icons\";\r\n\r\nimport Popover from \"../../common/popover/Popover\";\r\nimport PublisherProfileCardStats from \"./publisher-profile-card-stats/PublisherProfileCardStats\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport avatarFallback from \"../../utils/avatarFallback\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { getContextData } from \"@msnews/core\";\r\nimport { getExternalURL } from \"../../utils/urlHelper\";\r\nimport { getXPayToken } from \"@msnews/social-data-service\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\n\r\nexport interface PublisherProfileCardProps extends SocialProps {\r\n emptyState?: string;\r\n}\r\nexport interface PublisherProfileCardState {\r\n isSubscribed: boolean;\r\n showCannotUnfollowNotification: boolean;\r\n alreadySubscribedPopoverVisible: boolean;\r\n}\r\n\r\nexport default class PublisherProfileCard extends React.Component {\r\n\r\n alreadySubscribedTriggerRef: React.RefObject;\r\n activeSharePlatforms: SocialMedia[] = [SocialMedia.Facebook, SocialMedia.Twitter, SocialMedia.LinkedIn, SocialMedia.Email];\r\n telemetryObjects: PublisherProfileCardTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isSubscribed: false,\r\n showCannotUnfollowNotification: false,\r\n alreadySubscribedPopoverVisible: false\r\n };\r\n this.telemetryObjects = null;\r\n this.alreadySubscribedTriggerRef = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n this.checkSubscriptionStatus();\r\n }\r\n\r\n render() {\r\n const { responsiveClass, users, managedClasses, mainTelemetryObject } = this.props;\r\n const { isSubscribed } = this.state;\r\n\r\n const publisherId = this.props.id;\r\n const publisher = users && (users[publisherId] ? users[publisherId].data : null);\r\n if (!publisher) { return null; }\r\n const { isFollowing } = publisher;\r\n\r\n const publisherProfileCardTelemetryObject = addOrUpdateTelemetryObject(mainTelemetryObject, publisherProfileCardTelemetryContracts.publisherProfileCard, {}, this.telemetryObjects && this.telemetryObjects.publisherProfileCard);\r\n this.telemetryObjects = {\r\n publisherProfileCard: publisherProfileCardTelemetryObject,\r\n subscribeButton: addOrUpdateTelemetryObject(publisherProfileCardTelemetryObject, publisherProfileCardTelemetryContracts.subscribeButton, {headline: isSubscribed ? \"Subscribe\" : \"Unsubscribe\"}, this.telemetryObjects && this.telemetryObjects.subscribeButton),\r\n followButton: addOrUpdateTelemetryObject(publisherProfileCardTelemetryObject, publisherProfileCardTelemetryContracts.followButton, {headline: isFollowing ? \"Follow\" : \"Unfollow\"}, this.telemetryObjects && this.telemetryObjects.followButton)\r\n };\r\n\r\n return (\r\n \r\n
    \r\n
    { this.renderPublisherInfo(publisher, isFollowing, isSubscribed) }
    \r\n
    \r\n
    \r\n
    { this.renderActionPanel() }
    \r\n
    \r\n
    \r\n
    {this.renderAboutPanel() }
    \r\n
    {this.renderSocialPanel()}
    \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderPublisherInfo(publisher, isFollowing, isSubscribed) {\r\n const { managedClasses, t, emptyState} = this.props;\r\n const { followersCount, likesCount, primaryAvatar, primaryName } = publisher;\r\n const avatarUrl = emptyState == enums.profilePageEmptyStates.NotSocialUser ? placeholderImages.notSocialAvatar : primaryAvatar || placeholderImages.avatar;\r\n const followButtonText = isFollowing || isSubscribed ? t.PublisherProfilePageFollowing : t.PublisherProfilePageFollow;\r\n\r\n return (\r\n \r\n
    \r\n
    \r\n
    \r\n {t.AriaLabelsProfilePicture}{ avatarFallback(e); }}/>\r\n
    \r\n
    \r\n
    {primaryName}
    \r\n \r\n
    \r\n
    \r\n
    \r\n this.setState({alreadySubscribedPopoverVisible: true})}\r\n onMouseLeave={(e) => this.setState({alreadySubscribedPopoverVisible: false})}\r\n >\r\n { isFollowing || isSubscribed ? check : plus } }\r\n className={classNames(\r\n \"cwt-fast-button\",\r\n [\"outline-button-accent\", !isFollowing && !isSubscribed]\r\n )}\r\n onClick={this.handleFollowing.bind(this)}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.followButton, false)}\r\n >{followButtonText}\r\n \r\n
    \r\n { this.state.alreadySubscribedPopoverVisible && this.state.isSubscribed && this.setState({alreadySubscribedPopoverVisible: false}),\r\n className: managedClasses.alreadySubscribedPopoverContainer,\r\n managedClasses: managedClasses,\r\n isHover: true,\r\n hoverDelay: 600\r\n }}>\r\n

    { t.PublisherProfilePagePaidSubscriptionUnfollowBody }

    \r\n }\r\n
    \r\n );\r\n }\r\n\r\n renderActionPanel() {\r\n const { t, managedClasses, usersConnector } = this.props;\r\n const userId = this.props.id;\r\n const isSubscribed = this.state.isSubscribed;\r\n const subscribeButtonText = isSubscribed ? t.PublisherProfilePageSubscribed :t.PublisherProfilePageSubscribe;\r\n\r\n const SubscribeButtonWrapperComponent = isSubscribed ? OutlineButton : AccentButton;\r\n\r\n return (\r\n \r\n
    \r\n

    {t.ProfilePageSubscriptionsUnlockBenefits}

    \r\n
    \r\n
    \r\n
    \r\n {publisherTabPremium} }\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.subscribeButton, false)}>\r\n { subscribeButtonText }\r\n \r\n
    \r\n { !this.state.isSubscribed && }\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderAboutPanel() {\r\n const { t, users, id } = this.props;\r\n const publisher = users[id];\r\n const aboutText = publisher.data.otherProperties && publisher.data.otherProperties.about;\r\n return (\r\n \r\n

    { t.PublisherProfilePageAboutUs }

    \r\n

    {aboutText}

    \r\n
    \r\n );\r\n }\r\n\r\n renderSocialPanel() {\r\n const { t } = this.props;\r\n const icons = {\r\n email, facebook, linkedin, twitter\r\n };\r\n return (\r\n
    \r\n { t.PublisherProfilePageShareTo } \r\n
    \r\n {\r\n this.activeSharePlatforms.map((platform) => (\r\n \r\n ))\r\n }\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n async checkSubscriptionStatus() {\r\n const { me } = this.props;\r\n const isAnonymous = me && me.state == enums.userStateType.anonymous;\r\n if (!isAnonymous) {\r\n getSubscriptionStatus({\r\n publisherId: this.props.id,\r\n authToken: await getXPayToken()\r\n }).then(response => {\r\n if (response.status && response.data) {\r\n this.setState(() => ({ isSubscribed: true }));\r\n }\r\n });\r\n }\r\n }\r\n\r\n async handleAlreadySubscribedClick() {\r\n const { id, users, me, market } = this.props;\r\n const isAnonymous = me && me.state == enums.userStateType.anonymous;\r\n if (isAnonymous) {\r\n this.signIn();\r\n } else {\r\n const publisher = users[id] ? users[id].data : null;\r\n const { primaryAvatar, primaryName } = publisher;\r\n renderLinkToPublisher({\r\n publisherId: id,\r\n publisherName: primaryName,\r\n publisherLogoUrl: primaryAvatar,\r\n userProfilePageUrl: getExternalURL(`${enums.externalUrls.profilePage}${me.id}`, market),\r\n userProfileImageUrl: me.primaryAvatar,\r\n locale: market,\r\n authToken: await getXPayToken(),\r\n onSuccess: () => window.location.reload()\r\n });\r\n }\r\n }\r\n\r\n handleSubscription() {\r\n const { me } = this.props;\r\n const isAnonymous = me && me.state == enums.userStateType.anonymous;\r\n if (isAnonymous) { this.signIn(); return; }\r\n this.state.isSubscribed ? this.manageSubscription() : this.subscribeToPublisher();\r\n }\r\n\r\n handleFollowing() {\r\n const { me, id, users } = this.props;\r\n const isAnonymous = me && me.state == enums.userStateType.anonymous;\r\n if (isAnonymous) { this.signIn(); return; }\r\n if (this.state.isSubscribed) {\r\n this.setState({showCannotUnfollowNotification: true});\r\n return;\r\n }\r\n const publisher = users[id] ? users[id].data : null;\r\n this.props.usersConnector.followUser(id, !publisher.isFollowing);\r\n }\r\n\r\n async subscribeToPublisher() {\r\n const { id, users, me, market } = this.props;\r\n const publisher = users[id] ? users[id].data : null;\r\n const { primaryAvatar, primaryName } = publisher;\r\n\r\n renderCreateSubscription({\r\n publisherId: id,\r\n publisherName: primaryName,\r\n publisherLogoUrl: primaryAvatar,\r\n productType: ProductType.Premium,\r\n userProfilePageUrl: getExternalURL(`${enums.externalUrls.profilePage}${me.id}`, market),\r\n locale: market,\r\n authToken: await getXPayToken(),\r\n userProfileImageUrl: me.primaryAvatar,\r\n scenario: \"feed\",\r\n onSuccess: () => {\r\n this.props.usersConnector.followUser(id, true);\r\n window.location.reload();\r\n }\r\n });\r\n }\r\n\r\n async manageSubscription() {\r\n const { id, users, me, market } = this.props;\r\n const publisher = users[id] ? users[id].data : null;\r\n const { primaryAvatar, primaryName } = publisher;\r\n\r\n renderManageSubscription({\r\n publisherId: id,\r\n publisherName: primaryName,\r\n publisherLogoUrl: primaryAvatar,\r\n userProfilePageUrl: getExternalURL(`${enums.externalUrls.profilePage}${me.id}`, market),\r\n locale: market,\r\n authToken: await getXPayToken(),\r\n userProfileImageUrl: me.primaryAvatar,\r\n onSuccess: () => window.location.reload()\r\n });\r\n }\r\n\r\n signIn() {\r\n this.props.popupConnector.openPopup(\"multiLoginPage\");\r\n }\r\n\r\n share(e, platform: SocialMedia) {\r\n const title = \"Document Title\";\r\n const requestContext = this.props.requestContext;\r\n const pageUrl = \"msn.com\";\r\n const locationHref = getContextData(requestContext.data.locationHref, \"locationHref\");\r\n const shareUrl = SharingHelper.getSocialMediaShareUrl(locationHref, platform, pageUrl, title);\r\n SharingHelper.openNewWindow(e, shareUrl);\r\n }\r\n\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../../Social.telemetry\";\r\n\r\nexport interface PublisherProfileTabsTelemetryObjects {\r\n mainItem: TelemetryObjectBase;\r\n tabs: any;\r\n}\r\n\r\nexport const publisherProfileTabsTelemetryContracts = {\r\n mainItem: {\r\n name: \"PublisherProfile\",\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n /** Click Tab */\r\n tabs: {\r\n All: { /** id: traceId */\r\n name: \"All\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"All\",\r\n type: TelemetryContentType.Profile\r\n }\r\n },\r\n Premium: { /** id: traceId */\r\n name: \"Premium\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: {\r\n headline: \"Premium\",\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport const publisherProfileTabsTelemetryActionDispatchers = {\r\n /** Used for: Scenario 3a and Scenario 4a */\r\n tabClicked: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {PublisherProfileTabsTelemetryObjects, publisherProfileTabsTelemetryActionDispatchers, publisherProfileTabsTelemetryContracts} from \"./PublisherProfileTabs.telemetry\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../../Social.telemetry\";\r\nimport { publisherTabAll, publisherTabPremium } from \"../../utils/icons\";\r\n\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport SortBox from \"../../common/sort-box/SortBox\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { getContextData } from \"@msnews/core\";\r\n\r\ninterface PublisherProfileTabsState {\r\n activeTab: Object;\r\n sortType: string;\r\n contentCards: Array;\r\n}\r\nexport default class PublisherProfileTabs extends React.Component {\r\n telemetryObjects: PublisherProfileTabsTelemetryObjects;\r\n contentContainerRef: React.RefObject;\r\n isLoadingNewContent: boolean;\r\n\r\n private static tabs = {\r\n All: {label: \"All\", icon: publisherTabAll},\r\n Premium: {label: \"Premium\", icon: publisherTabPremium}\r\n };\r\n static sortTypes = {\r\n Recommend: \"PublisherProfilePageTabSortByRecommend\",\r\n Latest: \"PublisherProfilePageTabSortByLatest\",\r\n MostPopular: \"PublisherProfilePageTabSortByMostPopular\"\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.contentContainerRef = React.createRef();\r\n\r\n this.state = {\r\n activeTab: null,\r\n sortType: \"Recommend\",\r\n contentCards: []\r\n };\r\n this.telemetryObjects = null;\r\n\r\n PublisherProfileTabs.tabs = {\r\n All: {label: props.t.PublisherProfilePageTabsAllTab, icon: publisherTabAll},\r\n Premium: {label: props.t.PublisherProfilePageTabsPremiumTab, icon: publisherTabPremium}\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n window.addEventListener(\"scroll\", this.handleScroll.bind(this));\r\n const { requestContext } = this.props;\r\n\r\n const locationHref = getContextData(requestContext.data.locationHref, \"locationHref\");\r\n const tabNameFromUrl = Object.keys(PublisherProfileTabs.tabs).filter(key => locationHref.toLowerCase().endsWith(key.toLowerCase())).pop();\r\n if (tabNameFromUrl) {\r\n this.setState({ activeTab: PublisherProfileTabs.tabs[tabNameFromUrl] });\r\n }\r\n\r\n if (this.props.componentConnector && this.props.componentConnector.getContentCards) {\r\n this.loadMoreContent(tabNameFromUrl === \"premium\");\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener(\"scroll\", this.handleScroll.bind(this));\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n /* when opened a new publisher profile without rerendering component itself, reset the active tab */\r\n if (prevProps.id != this.props.id) {\r\n this.showTab(null, null, null);\r\n }\r\n }\r\n\r\n loadMoreContent(premium?: boolean, contentCards?) {\r\n const { id, market } = this.props;\r\n const currentContentCards = contentCards ? contentCards : this.state.contentCards;\r\n let cardsPromise;\r\n const args = {\r\n top: 15,\r\n skip: currentContentCards.length\r\n };\r\n if (premium) {\r\n cardsPromise = this.props.componentConnector.getContentCards(id, market, true, args);\r\n } else {\r\n cardsPromise = this.props.componentConnector.getContentCards(id, market, false, args);\r\n }\r\n return cardsPromise.then(cards => {\r\n const existingCardKeys = {};\r\n const newContentCards = [];\r\n [...currentContentCards, ...cards].forEach(card => {\r\n if (!existingCardKeys[card.key]) {\r\n newContentCards.push(card);\r\n existingCardKeys[card.key] = true;\r\n }\r\n });\r\n this.setState(() => ({ contentCards: newContentCards }));\r\n });\r\n }\r\n\r\n handleScroll() {\r\n const elem = this.contentContainerRef.current;\r\n if (!this.props.id || !elem || this.isLoadingNewContent) {\r\n return;\r\n }\r\n const scrollPosition = elem.offsetHeight - window.pageYOffset - window.innerHeight;\r\n if (scrollPosition < 100) {\r\n this.isLoadingNewContent = true;\r\n this.loadMoreContent(this.state.activeTab == PublisherProfileTabs.tabs.Premium)\r\n .then(() => { this.isLoadingNewContent = false; });\r\n }\r\n }\r\n\r\n showTab(e, tab, telemetryObject) {\r\n if (this.state.activeTab == tab) { return; }\r\n\r\n this.setState({\r\n activeTab: tab,\r\n contentCards: []\r\n });\r\n this.loadMoreContent(tab == PublisherProfileTabs.tabs.Premium, []);\r\n\r\n if (e) {\r\n document.getElementById(\"tabHeaders\").scrollLeft = document.getElementById(tab.label).offsetLeft;\r\n telemetryObject && publisherProfileTabsTelemetryActionDispatchers.tabClicked(e.currentTarget, telemetryObject);\r\n }\r\n }\r\n\r\n onSortTypeChange(newSortType) {\r\n this.setState({ sortType: newSortType });\r\n }\r\n\r\n render() {\r\n const { managedClasses, responsiveClass, children, mainTelemetryObject } = this.props;\r\n const activeTab = this.state.activeTab || PublisherProfileTabs.tabs.All;\r\n\r\n this.telemetryObjects = {\r\n mainItem: addOrUpdateTelemetryObject(mainTelemetryObject, publisherProfileTabsTelemetryContracts.mainItem, {}, this.telemetryObjects && this.telemetryObjects.mainItem),\r\n tabs: {}\r\n };\r\n\r\n return (\r\n
    \r\n
      \r\n { Object.keys(PublisherProfileTabs.tabs).map(key => {\r\n const tab = PublisherProfileTabs.tabs[key];\r\n this.telemetryObjects.tabs[key] = addOrUpdateTelemetryObject(mainTelemetryObject, publisherProfileTabsTelemetryContracts.tabs[key], {}, this.telemetryObjects && this.telemetryObjects.tabs[key]);\r\n return (\r\n
    • this.showTab(e, tab, this.telemetryObjects.tabs[key])}\r\n aria-selected={activeTab == tab}\r\n {...renderHybrid(this.telemetryObjects.tabs[key], false)}\r\n >\r\n \r\n {tab.icon}\r\n {tab.label}\r\n \r\n
    • \r\n );\r\n })}\r\n
    \r\n {this.renderSortBox()}\r\n
    \r\n {...this.state.contentCards}\r\n {children[\"cardAction\"]}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderSortBox() {\r\n const { mainTelemetryObject, t, id, managedClasses } = this.props;\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport PublisherProfileCard from \"../publisher-profile-card/PublisherProfileCard\";\r\nimport PublisherProfileTabs from \"../publisher-profile-tabs/PublisherProfileTabs\";\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { initializeSubscriptionSdk } from \"@msnews/subscription-sdk-wrapper\";\r\n\r\nexport default class PublisherProfilePage extends React.Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n initializeSubscriptionSdk();\r\n }\r\n\r\n componentDidMount() {\r\n this.props.profileConnector && this.props.profileConnector.onProfilePageComponentConnected(this.props.id);\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.id != null && this.props.market != null && prevProps.id != this.props.id || prevProps.market != this.props.market) {\r\n this.props.profileConnector && this.props.profileConnector.onProfilePageComponentConnected(this.props.id);\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n \r\n \r\n
    \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { check_circled, plus, publisherTabPremium } from \"../utils/icons\";\r\n\r\nimport { SocialProps } from \"../Social.props\";\r\nimport React from \"react\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { getExternalURL } from \"../utils/urlHelper\";\r\nimport { initializeSubscriptionSdk, getSubscriptionStatus } from \"@msnews/subscription-sdk-wrapper\";\r\nimport { getXPayToken } from \"@msnews/social-data-service\";\r\n\r\nexport enum SubscribeButtonStateEnum {\r\n Following = \"Following\",\r\n Follow = \"Follow\",\r\n Subscribed = \"Subscribed\"\r\n}\r\n\r\nexport interface PublisherSubscribeFollowButtonState {\r\n isSubscribed: Boolean\r\n}\r\n\r\nexport default class PublisherSubscribeFollowButton extends React.Component {\r\n buttonConfig = {\r\n [SubscribeButtonStateEnum.Follow]: {\r\n text: this.props.t.FollowButtonFollowText,\r\n icon: plus,\r\n container: this.props.managedClasses.publisherSubscribeFollowButtonInactiveContainer\r\n },\r\n [SubscribeButtonStateEnum.Following]: {\r\n text: this.props.t.FollowButtonFollowingText,\r\n icon: check_circled,\r\n container: this.props.managedClasses.publisherSubscribeFollowButtonActiveContainer\r\n },\r\n [SubscribeButtonStateEnum.Subscribed]: {\r\n text: this.props.t.PublisherProfilePageSubscribed,\r\n icon: publisherTabPremium,\r\n container: this.props.managedClasses.publisherSubscribeFollowButtonActiveContainer\r\n }\r\n };\r\n\r\n private subscriptionAndFollowChecked: boolean;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isSubscribed: false\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n initializeSubscriptionSdk();\r\n const { me, publisherSubscribeFollowButtonData } = this.props;\r\n if (!me) {\r\n this.props.usersConnector.fetchMe();\r\n } else if (publisherSubscribeFollowButtonData) {\r\n this.checkSubscriptionAndFollowStatus();\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n const { me, publisherSubscribeFollowButtonData } = this.props;\r\n if (!this.subscriptionAndFollowChecked && me && publisherSubscribeFollowButtonData) {\r\n if (publisherSubscribeFollowButtonData) {\r\n this.checkSubscriptionAndFollowStatus();\r\n }\r\n }\r\n }\r\n\r\n async checkSubscriptionAndFollowStatus() {\r\n this.subscriptionAndFollowChecked = true;\r\n const { me, publisherSubscribeFollowButtonData } = this.props;\r\n const { fetchUser, fetchIsUserFollowed } = this.props.usersConnector;\r\n const publisherId = publisherSubscribeFollowButtonData.publisherId;\r\n\r\n if (!publisherId) { return; }\r\n\r\n fetchUser(publisherId)\r\n .then(() => {\r\n fetchIsUserFollowed(publisherId);\r\n });\r\n\r\n const isAnonymous = me && me.state == enums.userStateType.anonymous;\r\n if (!isAnonymous) {\r\n getSubscriptionStatus({\r\n authToken: await getXPayToken(),\r\n publisherId\r\n }).then(response => {\r\n if (response.status) {\r\n this.setState(() => ({ isSubscribed: response.data }));\r\n }\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n const { managedClasses, t, publisherSubscribeFollowButtonData } = this.props;\r\n const currentState = this.getCurrentState();\r\n\r\n if (!publisherSubscribeFollowButtonData || !currentState) { return null; }\r\n\r\n const config = this.getButtonConfig(currentState);\r\n\r\n return (\r\n \r\n this.onButtonClick(e)}\r\n >\r\n { config.icon } \r\n { config.text }\r\n \r\n \r\n );\r\n }\r\n\r\n onButtonClick(e) {\r\n const currentState = this.getCurrentState();\r\n if (currentState == SubscribeButtonStateEnum.Following || currentState == SubscribeButtonStateEnum.Subscribed) {\r\n this.redirectToPublisherProfile();\r\n } else {\r\n this.followPublisher();\r\n }\r\n }\r\n\r\n redirectToPublisherProfile() {\r\n const { publisherSubscribeFollowButtonData: { publisherId }, market } = this.props;\r\n window.open(getExternalURL(`${enums.externalUrls.channelPage}${publisherId}`, market));\r\n }\r\n\r\n followPublisher() {\r\n const { me, publisherSubscribeFollowButtonData: { publisherId } } = this.props;\r\n const isAnonymous = me && me.state == enums.userStateType.anonymous;\r\n if (isAnonymous) {\r\n this.signIn();\r\n } else {\r\n this.props.usersConnector.followUser(publisherId, true);\r\n }\r\n }\r\n\r\n getCurrentState() {\r\n const { me, publisherSubscribeFollowButtonData, users } = this.props;\r\n\r\n const publisherId = publisherSubscribeFollowButtonData && publisherSubscribeFollowButtonData.publisherId;\r\n if (!publisherSubscribeFollowButtonData || !publisherId || !users || !users[publisherId] || !users[publisherId].isFollowingFetched) {\r\n return null;\r\n }\r\n\r\n const isAnonymous = me && me.state == enums.userStateType.anonymous;\r\n if (isAnonymous) {\r\n return SubscribeButtonStateEnum.Follow;\r\n }\r\n\r\n const { isFollowing } = users[publisherId].data;\r\n if (this.state.isSubscribed) {\r\n return SubscribeButtonStateEnum.Subscribed;\r\n } else {\r\n return isFollowing ? SubscribeButtonStateEnum.Following : SubscribeButtonStateEnum.Follow;\r\n }\r\n }\r\n\r\n getButtonConfig(state: SubscribeButtonStateEnum) {\r\n return this.buttonConfig[state];\r\n }\r\n\r\n signIn() {\r\n this.props.popupConnector.openPopup(\"multiLoginPage\");\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { TelemetryEventNames, dispatchTelemetryEvent, genericTelemetryClickDispatcher, getPageContentType } from \"../Social.telemetry\";\r\n\r\nexport interface ReactionBreakdownTelemetryObjects {\r\n container: TelemetryObjectBase;\r\n tabs: { [tabKey: string]: TelemetryObjectBase };\r\n}\r\n\r\nexport interface ReactionBreakdownListItemTelemetryObjects {\r\n container: TelemetryObjectBase;\r\n userName: TelemetryObjectBase;\r\n profilePicture: TelemetryObjectBase;\r\n}\r\n\r\nexport const reactionBreakdownTelemetryContracts = {\r\n /** Profile Followers > Scenario 1a */\r\n commentReactionBreakdown: {\r\n name: \"CommentReactionsOverlay\",\r\n content: { type: TelemetryContentType.Comment }\r\n },\r\n /** Profile Following > Scenario 1a */\r\n contentReactionBreakdown: {\r\n name: \"ReactionsOverlay\",\r\n content: { type: getPageContentType() }\r\n },\r\n /** Click Tab, Profile Comments > Scenario 4b */\r\n tab: {\r\n name: \"ReactionsButton\",\r\n behavior: TelemetryBehaviorType.Show,\r\n content: { type: getPageContentType() }\r\n }\r\n};\r\n\r\nexport const reactionBreakdownListItemTelemetryContracts = {\r\n userNameAndProfilePic: {\r\n name: \"Profile\",\r\n behavior: TelemetryBehaviorType.Navigate,\r\n content: {\r\n type: TelemetryContentType.Profile\r\n }\r\n }\r\n};\r\n\r\nexport const reactionBreakdownTelemetryActionDispatchers = {\r\n /** Used for: Scenario 3a and Scenario 4a */\r\n tabClicked: (element: any, telemetryObject: TelemetryObjectBase): void => {\r\n const telemetryEventDispatcherInfo = {\r\n eventName: TelemetryEventNames.genericAction,\r\n contract: {...(telemetryObject && telemetryObject.contract)}\r\n };\r\n\r\n dispatchTelemetryEvent(telemetryEventDispatcherInfo, element);\r\n },\r\n genericClick: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {ReactionBreakdownListItemTelemetryObjects, reactionBreakdownListItemTelemetryContracts} from \"./ReactionBreakdown.telemetry\";\r\nimport { TelemetryContentType, TelemetryObjectBase } from \"@msnews/telemetry-contracts\";\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../Social.telemetry\";\r\n\r\nimport { ComponentConnector } from \"../Social.props\";\r\nimport FollowButton from \"../follow-button/FollowButton\";\r\nimport React from \"react\";\r\nimport { SocialLocalizedStrings } from \"../Social.localizedStrings\";\r\nimport { User } from \"@msnews/social-data-service\";\r\nimport avatarFallback from \"../utils/avatarFallback\";\r\nimport openProfilePage from \"../utils/openProfilePage\";\r\nimport { placeholderImages } from \"../utils/images\";\r\nimport { renderEmojiByType } from \"../utils/emojiIcons\";\r\n\r\nexport interface ReactionBreakdownListItemProps {\r\n componentConnector: ComponentConnector;\r\n isAnonymous: boolean,\r\n user: User,\r\n rateValue: string,\r\n managedClasses,\r\n usersConnector,\r\n market,\r\n onFollow?: (e: any, userId: string, isFollow: boolean) => void,\r\n onLoad?: (target: any, userId: string) => void,\r\n mainTelemetryObject?: TelemetryObjectBase,\r\n t: SocialLocalizedStrings,\r\n theme: string\r\n}\r\n\r\nexport default class ReactionBreakdownListItem extends React.Component {\r\n containerRef: HTMLLIElement;\r\n isLoaded: boolean;\r\n telemetryObjects: ReactionBreakdownListItemTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.containerRef = null;\r\n this.isLoaded = false;\r\n }\r\n\r\n followClickHandler(e, userId, isFollow) {\r\n if (this.props.onFollow) { this.props.onFollow(e, userId, isFollow); }\r\n }\r\n\r\n render() {\r\n const {componentConnector, isAnonymous, user, rateValue, managedClasses, usersConnector, market, mainTelemetryObject, t, theme} = this.props;\r\n /** Generate telemetry objects */\r\n const containerTelemetryObject = addOrUpdateTelemetryObject(mainTelemetryObject, mainTelemetryObject.contract, { type: TelemetryContentType.Profile }, this.telemetryObjects && this.telemetryObjects.container);\r\n this.telemetryObjects = {\r\n container: containerTelemetryObject,\r\n userName: addOrUpdateTelemetryObject(containerTelemetryObject, reactionBreakdownListItemTelemetryContracts.userNameAndProfilePic, {id: user.traceId || user.id, headline: user.primaryName }, this.telemetryObjects && this.telemetryObjects.userName),\r\n profilePicture: addOrUpdateTelemetryObject(containerTelemetryObject, reactionBreakdownListItemTelemetryContracts.userNameAndProfilePic, { id: user.traceId || user.id, headline: user.primaryName }, this.telemetryObjects && this.telemetryObjects.profilePicture)\r\n };\r\n\r\n return (\r\n
  • \r\n
    \r\n { this.containerRef = el; })}\r\n >\r\n {t.AriaLabelsProfilePicture}{ avatarFallback(e); }} />\r\n \r\n \r\n {renderEmojiByType(rateValue)}\r\n \r\n {isAnonymous ?\r\n
    {user.primaryName}
    :\r\n
    \r\n { this.containerRef = el; })}\r\n {...openProfilePage(componentConnector, theme, user.id, market, \"_blank\")}>\r\n {user.primaryName}\r\n \r\n
    \r\n }\r\n
    \r\n\r\n
    \r\n \r\n
    \r\n
  • \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ReactionBreakdownTelemetryObjects, reactionBreakdownTelemetryActionDispatchers, reactionBreakdownTelemetryContracts } from \"./ReactionBreakdown.telemetry\";\r\nimport { TelemetryEventMap, addOrUpdateTelemetryObject, dispatchTelemetryEvent, renderHybrid } from \"../Social.telemetry\";\r\n\r\nimport React from \"react\";\r\nimport ReactionBreakdownListItem from \"./ReactionBreakdownListItem\";\r\nimport { SocialProps } from \"../Social.props\";\r\nimport { String } from \"typescript-string-operations\";\r\nimport { capitalize } from \"lodash-es\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport {enums} from \"../utils/enums\";\r\nimport { hasThemeBase } from \"../utils/themeHelpers\";\r\nimport { renderEmojiByType } from \"../utils/emojiIcons\";\r\n\r\ninterface ReactionBreakdownState {\r\n activeTab: string;\r\n}\r\n\r\nexport default class ReactionBreakdown extends React.Component {\r\n telemetryObjects: ReactionBreakdownTelemetryObjects;\r\n containerRef: HTMLDivElement;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n activeTab: props.activeTab || \"all\"\r\n };\r\n this.containerRef = null;\r\n }\r\n\r\n componentDidMount() {\r\n if (this.containerRef) {\r\n dispatchTelemetryEvent(TelemetryEventMap.genericLoaded, this.containerRef);\r\n }\r\n this.props.reactionBreakdownConnector.onReactionBreakdownComponentConnected({ commentId: this.props.commentId, contentId: this.props.contentId });\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.id != null && this.props.market != null && prevProps.id != this.props.id || prevProps.market != this.props.market) {\r\n this.props.reactionBreakdownConnector.onReactionBreakdownComponentConnected({ commentId: this.props.commentId, contentId: this.props.contentId });\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.reactionBreakdownConnector.onReactionBreakdownComponentDisconnected();\r\n }\r\n\r\n showTab(event, tabName) {\r\n this.sendTabClickedTelemetry(event.currentTarget, tabName);\r\n\r\n this.setState({\r\n activeTab: tabName\r\n });\r\n }\r\n\r\n prepareActiveTabItems(args) {\r\n if (!args.items || !args.activeTab || !args.users) { console.warn(\"ReactionBreakdown missing argument!\"); }\r\n const meId = args.me.id;\r\n\r\n const attachUserDataToItem = (item, userId) => {\r\n const userState = args.users[userId];\r\n return {...item, user: userState.data};\r\n };\r\n\r\n if (!args.breakdownWithTabs) {\r\n // self id is `meId` if the user is logged in, `undefined` if the user is anonymous\r\n const itemOfSelf = args.items.all.find(item => item.userId === meId || item.userId === undefined);\r\n const selfId = itemOfSelf && itemOfSelf.userId;\r\n return itemOfSelf ? [attachUserDataToItem(itemOfSelf, selfId)] : [];\r\n }\r\n\r\n return args.items[args.activeTab]\r\n .sort((a, b) => {\r\n if (a.userId == meId) {\r\n return -1;\r\n } else if (b.userId == meId) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n })\r\n .map(item => attachUserDataToItem(item, item.userId));\r\n }\r\n\r\n sendTabClickedTelemetry(target, tabName) {\r\n reactionBreakdownTelemetryActionDispatchers.tabClicked(target, this.telemetryObjects && this.telemetryObjects.tabs && this.telemetryObjects.tabs[tabName]);\r\n }\r\n\r\n getOtherReactionsString(reaction: string, otherCount: number) {\r\n if (otherCount < 1) {\r\n console.warn(`There is no reaction string for this reaction count: ${otherCount}`);\r\n return \"\";\r\n }\r\n const t = this.props.t;\r\n // {reaction: [, ]}\r\n const reactionStrings = {\r\n [enums.reactions.love]: [t.ReactionBreakDownOneOtherLoves, t.ReactionBreakDownSomeOthersLove],\r\n [enums.reactions.like]: [t.ReactionBreakDownOneOtherLikes, t.ReactionBreakDownSomeOthersLike],\r\n [enums.reactions.surprised]: [t.ReactionBreakDownOneOtherIsSurprised, t.ReactionBreakDownSomeOthersAreSurprised],\r\n [enums.reactions.angry]: [t.ReactionBreakDownOneOtherIsAngry, t.ReactionBreakDownSomeOthersAreAngry],\r\n [enums.reactions.sad]: [t.ReactionBreakDownOneOtherIsSad, t.ReactionBreakDownSomeOthersAreSad],\r\n [enums.reactions.thinking]: [t.ReactionBreakDownOneOtherIsThinking, t.ReactionBreakDownSomeOthersAreThinking]\r\n };\r\n return otherCount === 1 ? reactionStrings[reaction][0] : String.Format(reactionStrings[reaction][1], {otherCount: otherCount});\r\n }\r\n\r\n render() {\r\n const { componentConnector, reactionBreakdown, me, users, managedClasses, usersConnector, market, responsiveClass, t, mainTelemetryObject, theme, contentId, contents, commentId} = this.props;\r\n const isSuperApp = hasThemeBase(theme, enums.theme.superappBase);\r\n const isContentModerated = contentId && contents && contents[contentId] && contents[contentId].commentStatus === \"On\";\r\n const breakdownWithTabs: boolean = !!commentId || isContentModerated;\r\n const reactions = reactionBreakdown && reactionBreakdown.reactions;\r\n if (!reactions) { return null; }\r\n const {items, reactionCounts} = reactions;\r\n const {activeTab} = this.state;\r\n const activeTabItems = this.prepareActiveTabItems({items, users, activeTab, me, breakdownWithTabs});\r\n // Reaction Counts\r\n const moreCounts: {[key: string]: number} = {};\r\n reactionCounts.all = 0;\r\n if (reactionCounts) {\r\n reactionCounts.all = Object.values(reactionCounts).reduce(($sum, $count) => $sum + $count, 0);\r\n\r\n Object.keys(reactionCounts).filter(key => key !== \"all\").forEach(key => {\r\n if (breakdownWithTabs) {\r\n moreCounts[key] = reactionCounts[key] - items[key].length;\r\n } else {\r\n const selfReacted = activeTabItems.length === 1;\r\n const reactionType = selfReacted && activeTabItems[0].rateValue;\r\n moreCounts[key] = (reactionType === key) ? reactionCounts[key]-1 : reactionCounts[key];\r\n }\r\n });\r\n }\r\n\r\n /** Generate Telemetry Objects */\r\n const cmsId = (contentId && contents && contents[contentId] && contents[contentId].cmsId);\r\n this.telemetryObjects = {\r\n container: addOrUpdateTelemetryObject(\r\n mainTelemetryObject,\r\n this.props.commentId ? reactionBreakdownTelemetryContracts.commentReactionBreakdown : reactionBreakdownTelemetryContracts.contentReactionBreakdown,\r\n { id: commentId || cmsId},\r\n this.telemetryObjects && this.telemetryObjects.container\r\n ),\r\n tabs: {}\r\n };\r\n Object.keys(reactionCounts).map(key => {\r\n if (this.telemetryObjects && this.telemetryObjects.container) {\r\n this.telemetryObjects.tabs[key] = addOrUpdateTelemetryObject(\r\n this.telemetryObjects.container,\r\n {...reactionBreakdownTelemetryContracts.tab},\r\n { id: commentId || cmsId, headline: capitalize(key) },\r\n this.telemetryObjects && this.telemetryObjects.tabs && this.telemetryObjects.tabs[key]\r\n );\r\n }\r\n });\r\n\r\n const OtherReactionsItem = ({reaction}) => {\r\n if (!moreCounts[reaction]) { return null; }\r\n return (\r\n
  • \r\n
    \r\n \r\n {renderEmojiByType(reaction)}\r\n \r\n
    {this.getOtherReactionsString(reaction, moreCounts[reaction])}
    \r\n
    \r\n
  • \r\n );\r\n };\r\n\r\n return (\r\n \r\n
    \r\n
    \r\n

    {t.ReactionBreakDownTitle}

    \r\n
      \r\n
    • this.showTab(e, \"all\")}\r\n {...renderHybrid(this.telemetryObjects && this.telemetryObjects.tabs && this.telemetryObjects.tabs[\"all\"], true)}>\r\n \r\n
      {t.ReactionBreakDownTabText}
      \r\n {reactionCounts.all}\r\n
      \r\n
    • \r\n\r\n {\r\n breakdownWithTabs && Object.keys(reactionCounts).filter(key => key != \"all\").map(key =>\r\n reactionCounts[key] > 0 &&\r\n
    • this.showTab(e, key)} key={key}>\r\n \r\n {renderEmojiByType(key)}\r\n {reactionCounts[key]}\r\n \r\n
    • \r\n )\r\n }\r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
      \r\n {activeTabItems.map((item, index) => {\r\n const isAnonymous = item.user.state == enums.userStateType.anonymous;\r\n return ;\r\n })}\r\n {activeTab === \"all\" ?\r\n Object.entries(moreCounts).sort((t0, t1) => t1[1]-t0[1]).map(tab => ):\r\n \r\n }\r\n
    \r\n
    \r\n
    \r\n \r\n );\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { open_outside, plus, trash } from \"../../utils/icons\";\r\n\r\nimport React from \"react\";\r\nimport { Resource } from \"@msnews/social-data-service\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\n\r\ninterface MediaInputProps{\r\n className?: string,\r\n managedClasses?: SocialClassNameContract;\r\n placeholder?: string;\r\n onChange: (files) => void;\r\n onRemove: (id: string) => void;\r\n onSetCover: (id: string) => void;\r\n resources?: Array;\r\n t?: SocialLocalizedStrings;\r\n}\r\n\r\ninterface MediaInputState{\r\n files: object[];\r\n previewUrls: string[];\r\n}\r\n\r\nexport default class MediaInput extends React.Component {\r\n containerRef: React.RefObject;\r\n inputRef: React.RefObject;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.containerRef = React.createRef();\r\n this.inputRef = React.createRef();\r\n\r\n this.state = {\r\n files: [],\r\n previewUrls: []\r\n };\r\n }\r\n\r\n removeItem(id: string) {\r\n if (this.props.onRemove) { this.props.onRemove(id); }\r\n }\r\n\r\n setCoverItem(id: string) {\r\n if (this.props.onSetCover) { this.props.onSetCover(id); }\r\n }\r\n\r\n fileSelectHandler(event) {\r\n if (this.props.onChange && event && event.target && event.target.files && event.target.files.length > 0) { this.props.onChange(event.target.files); }\r\n }\r\n\r\n renderImage(url: string, id: string) {\r\n return (\r\n
    \r\n \"\"\r\n
    \r\n {open_outside} \r\n {trash} \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n render() {\r\n const { className, managedClasses, resources, t} = this.props;\r\n\r\n return (\r\n
    \r\n {this.state.files.length < 1 &&\r\n \r\n {plus}\r\n {t.MediaInputAddMedia}\r\n \r\n }\r\n\r\n
    \r\n {resources && resources.map((resource) => this.renderImage(resource.url, resource.id))}\r\n
    \r\n\r\n \r\n
    \r\n );\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport MediaInput from \"../media-input/MediaInput\";\r\nimport React from \"react\";\r\nimport { UGContentConnector } from \"../../Social.props\";\r\nimport { UGContent } from \"@msnews/social-data-service\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\n\r\ninterface UGContentCreateView1Props {\r\n managedClasses?: SocialClassNameContract;\r\n ugContent?: UGContent;\r\n ugContentConnector: UGContentConnector;\r\n t: SocialLocalizedStrings;\r\n}\r\n\r\ninterface UGContentCreateView1State extends UGContent { }\r\n\r\nexport default class UGContentCreateView1 extends React.Component {\r\n\r\n bodyContainerRef: React.RefObject;\r\n titleContainerRef: React.RefObject;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.bodyContainerRef = React.createRef();\r\n this.titleContainerRef = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n this.titleContainerRef.current.innerHTML = this.props.ugContent.title ? this.props.ugContent.title : \"\";\r\n this.bodyContainerRef.current.innerHTML = this.props.ugContent.body ? this.props.ugContent.body : \"\";\r\n const capture = {\r\n capture: true\r\n };\r\n\r\n window.addEventListener(\"keyup\", this.handleKeypress, capture);\r\n window.addEventListener(\"keyupCapture\", this.handleKeypress, capture);\r\n window.addEventListener(\"keypress\", this.handleKeypress, capture);\r\n window.addEventListener(\"keypressCapture\", this.handleKeypress, capture);\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.ugContent.id != prevProps.ugContent.id) {\r\n this.titleContainerRef.current.innerHTML = this.props.ugContent.title ? this.props.ugContent.title : \"\";\r\n this.bodyContainerRef.current.innerHTML = this.props.ugContent.body ? this.props.ugContent.body : \"\";\r\n }\r\n }\r\n\r\n mediaInputChangeHandler(files) {\r\n Array.from(files).forEach(file => {\r\n this.props.ugContentConnector.saveUGContentResource(this.props.ugContent, file);\r\n });\r\n }\r\n\r\n changeHandler(e) {\r\n e.stopPropagation();\r\n if (e.currentTarget.dataset && e.currentTarget.dataset.textOnly && e.currentTarget.innerHTML != e.currentTarget.innerText) {\r\n e.currentTarget.innerHTML = e.currentTarget.innerText;\r\n this.placeCaretAtEnd(e.currentTarget);\r\n }\r\n this.props.ugContentConnector.saveUGContent({body: this.bodyContainerRef.current.innerText, title: this.titleContainerRef.current.innerText});\r\n }\r\n\r\n onRemoveResource (id) {\r\n const resources = this.props.ugContent.resources.filter(x => x.id != id);\r\n this.props.ugContentConnector.saveUGContent({resources});\r\n }\r\n\r\n onSetCoverResource (id) {\r\n const resources = this.props.ugContent.resources;\r\n resources.map(x => x.isCover = false);\r\n resources.find(x => x.id == id).isCover = true;\r\n this.props.ugContentConnector.saveUGContent({resources});\r\n }\r\n\r\n handleKeypress(e) {\r\n e.stopPropagation();\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener(\"keyup\", this.handleKeypress);\r\n window.removeEventListener(\"keyupCapture\", this.handleKeypress);\r\n window.removeEventListener(\"keypress\", this.handleKeypress);\r\n window.removeEventListener(\"keypressCapture\", this.handleKeypress);\r\n }\r\n\r\n render() {\r\n const { managedClasses, ugContent, t } = this.props;\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n\r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n\r\n \r\n \r\n );\r\n }\r\n\r\n placeCaretAtEnd(el) {\r\n el.focus();\r\n if (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n const range = document.createRange();\r\n range.selectNodeContents(el);\r\n range.collapse(false);\r\n const sel = window.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n }\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { Tag } from \"@msnews/social-data-service\";\r\nimport { close2 } from \"../../utils/icons\";\r\n\r\ninterface TagInputProps{\r\n className?: string,\r\n managedClasses?: SocialClassNameContract;\r\n placeholder?: string;\r\n onChange?: (items: Array) => void;\r\n options: Array,\r\n items: Array\r\n}\r\n\r\nexport default class TagInput extends React.Component {\r\n containerRef: React.RefObject;\r\n inputRef: React.RefObject;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.containerRef = React.createRef();\r\n this.inputRef = React.createRef();\r\n }\r\n\r\n addItem(value: Tag) {\r\n if (this.props.items.find(item => item.id == value.id)) { return; }\r\n this.itemsChanged([...this.props.items, value]);\r\n }\r\n\r\n removeItem(value: Tag) {\r\n if (!this.props.items.find(item => item.id == value.id)) { return; }\r\n this.itemsChanged(this.props.items.filter(item => item.id != value.id));\r\n }\r\n\r\n itemsChanged(newItemList) {\r\n if (this.props.onChange) { this.props.onChange(newItemList); }\r\n }\r\n\r\n renderItem(item: Tag) {\r\n return (\r\n
    \r\n {item.title}\r\n {close2} \r\n
    \r\n );\r\n }\r\n\r\n containerClickHandler(event) {\r\n event.stopPropagation();\r\n if (event.currentTarget.classList.contains(this.props.managedClasses.tagInputContainer)) {\r\n this.inputRef.current.focus();\r\n }\r\n }\r\n\r\n inputKeyDownHandler(event) {\r\n event.stopPropagation();\r\n if (event.key === \"Enter\") {\r\n if (event.target.value.trim().length < 1) { return; }\r\n\r\n this.addItem(JSON.parse(event.target.value));\r\n event.target.value = \"\";\r\n }\r\n }\r\n\r\n render() {\r\n const { className, managedClasses, placeholder, options, items } = this.props;\r\n\r\n return (\r\n
    \r\n {items.map((item) => this.renderItem(item))}\r\n \r\n
    \r\n );\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Tag, UGContent } from \"@msnews/social-data-service\";\r\n\r\nimport React from \"react\";\r\nimport { UGContentConnector } from \"../../Social.props\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialLocalizedStrings } from \"../../Social.localizedStrings\";\r\nimport TagInput from \"../tag-input/TagInput\";\r\n\r\ninterface UGContentCreateView2Props {\r\n managedClasses?: SocialClassNameContract;\r\n ugContent?: UGContent;\r\n ugContentConnector: UGContentConnector;\r\n t?: SocialLocalizedStrings;\r\n}\r\n\r\ninterface UGContentCreateView2State {\r\n tagOptions: Array,\r\n categoryOptions: Array,\r\n locationOptions: Array\r\n}\r\n\r\nexport default class UGContentCreateView2 extends React.Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n async componentDidMount() {\r\n const tags = await this.props.ugContentConnector.fetchTags();\r\n const categories = await this.props.ugContentConnector.fetchCategories();\r\n const locations = await this.props.ugContentConnector.fetchLocations();\r\n this.setState({\r\n tagOptions: tags,\r\n categoryOptions: categories,\r\n locationOptions: locations\r\n });\r\n }\r\n\r\n tagsChangeHandler(items: Array) {\r\n this.props.ugContentConnector.saveUGContent({tags: items});\r\n }\r\n\r\n categoriesChangeHandler(items: Array) {\r\n this.props.ugContentConnector.saveUGContent({categories: items});\r\n }\r\n\r\n locationChangeHandler(items: Array) {\r\n this.props.ugContentConnector.saveUGContent({locations: items});\r\n }\r\n\r\n render() {\r\n const { managedClasses, ugContent, t} = this.props;\r\n if (!this.state) { return null; }\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccentButton, OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport { activity, pen } from \"../../utils/icons\";\r\n\r\nimport React from \"react\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { SocialState } from \"../../Social.state\";\r\nimport { UGContent } from \"@msnews/social-data-service\";\r\nimport UGContentCreateView1 from \"../ug-content-create-view1/UGContentCreateView1\";\r\nimport UGContentCreateView2 from \"../ug-content-create-view2/UGContentCreateView2\";\r\nimport { connect } from \"react-redux\";\r\n\r\nconst UGCreateSteps = {\r\n Step1: 0,\r\n Step2: 1\r\n};\r\n\r\ninterface UGContentCreatePageProps extends SocialProps {\r\n ugContent: UGContent;\r\n}\r\n\r\ninterface UGContentCreatePageState {\r\n currentStep: number;\r\n}\r\n\r\nconst mapStateToProps = function(state: SocialState) {\r\n return {\r\n ugContent: state.ugContent\r\n };\r\n};\r\n\r\nclass UGContentCreatePage extends React.Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n currentStep: UGCreateSteps.Step1\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.props.ugContentConnector.fetchUGContent(this.props.id);\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.id != null && prevProps.id != this.props.id) {\r\n this.props.ugContentConnector && this.props.ugContentConnector.fetchUGContent(this.props.id);\r\n }\r\n }\r\n\r\n publishContent() {\r\n this.props.ugContentConnector.publishUGContent(this.props.ugContent.id);\r\n }\r\n\r\n unpublishContent() {\r\n this.props.ugContentConnector.unPublishUGContent(this.props.ugContent.id);\r\n }\r\n\r\n saveContent() {\r\n this.props.ugContentConnector.saveUGContent(this.props.ugContent);\r\n }\r\n\r\n showMyArticles(id) {\r\n this.props.popupConnector.openPopup(\"myArticles\", {id});\r\n }\r\n\r\n showMyDrafts(id) {\r\n this.props.popupConnector.openPopup(\"myDrafts\", {id});\r\n }\r\n\r\n updateSaveStatus(saveStatus) {\r\n this.setState({\r\n ...saveStatus\r\n });\r\n }\r\n\r\n render() {\r\n const { managedClasses, ugContent, ugContentConnector, t } = this.props;\r\n const { currentStep } = this.state;\r\n if (!ugContent) { return null; }\r\n\r\n let saveLabelName = \"Save\";\r\n if (ugContent.isSaving) {\r\n saveLabelName = \"Saving..\";\r\n } else if (!ugContent.isSaving && ugContent.id) {\r\n saveLabelName = \"Saved\";\r\n }\r\n\r\n const navButtons = (step) => {\r\n if (step == UGCreateSteps.Step1) {\r\n return
    \r\n {saveLabelName} \r\n {t.UGContentCreatePageNextButton} \r\n
    ;\r\n } else if (step == UGCreateSteps.Step2) {\r\n return
    \r\n {t.UGContentCreatePagePreviousButton} \r\n {saveLabelName} \r\n {ugContent.isPublished ?\r\n {t.UGContentCreatePageUnPublishButton} :\r\n {t.UGContentCreatePagePublishButton} }\r\n
    ;\r\n }\r\n\r\n return \"\";\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n
      \r\n
    • \r\n {activity} {t.UGContentCreatePageMyArticles} \r\n
    • \r\n
    • \r\n {pen} {t.UGContentCreatePageMyDraft} \r\n
    • \r\n
    \r\n
    \r\n {navButtons(currentStep)}\r\n
    \r\n\r\n { currentStep == UGCreateSteps.Step1\r\n ? \r\n : \r\n }\r\n
    \r\n );\r\n }\r\n\r\n nextStep() {\r\n this.setState({\r\n currentStep: Math.min(Object.keys(UGCreateSteps).length -1, this.state.currentStep+1)\r\n });\r\n }\r\n\r\n prevStep() {\r\n this.setState({\r\n currentStep: Math.max(0, this.state.currentStep-1)\r\n });\r\n }\r\n}\r\nexport default connect(mapStateToProps)(UGContentCreatePage);\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { OutlineButton } from \"@microsoft/fast-components-react-msft\";\r\nimport React from \"react\";\r\nimport { SocialClassNameContract } from \"../../Social.classnames\";\r\nimport { SocialProps } from \"../../Social.props\";\r\nimport { placeholderImages } from \"../../utils/images\";\r\n\r\ninterface UGContentListProps extends SocialProps {\r\n managedClasses?: SocialClassNameContract;\r\n isDraft?: boolean;\r\n}\r\n\r\ninterface UGContentListState {\r\n isFetchingContents: boolean;\r\n}\r\n\r\nexport default class UGContentList extends React.Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isFetchingContents: false\r\n };\r\n }\r\n\r\n editContent(id) {\r\n this.props.ugContentConnector.fetchUGContent(id);\r\n this.props.popupConnector.closePopup();\r\n }\r\n\r\n async componentDidMount() {\r\n this.setState({isFetchingContents: true});\r\n await this.props.ugContentConnector.fetchUGContents(this.props.me.id);\r\n this.setState({isFetchingContents: false});\r\n }\r\n\r\n extractContents() {\r\n if (!(this.props.users && this.props.users[this.props.me.id] && this.props.users[this.props.me.id].data.ugContents)) { return; }\r\n\r\n return this.props.users[this.props.me.id].data.ugContents.list.\r\n filter(item => this.props.isDraft ? !item.isPublished : item.isPublished);\r\n }\r\n\r\n render() {\r\n const { managedClasses, isDraft, t } = this.props;\r\n const contents = this.extractContents();\r\n\r\n return (\r\n
    \r\n
    \r\n

    {isDraft ? `${t.UGContentCreatePageMyDraft}` : `${t.UGContentCreatePageMyArticles}`}

    \r\n
    \r\n
      \r\n { contents &&\r\n contents.map(content =>\r\n
    • \r\n \"Content\r\n
      \r\n {content.title}\r\n {content.lastEditedDateTime}\r\n
      \r\n
      \r\n {t.UGContentListEditButton} \r\n
      \r\n
    • \r\n )\r\n }\r\n\r\n {!contents && (this.state.isFetchingContents ? `${t.UGContentListLoading}` : `${t.UGContentListNoArticles}`)}\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { addOrUpdateTelemetryObject, renderHybrid } from \"../Social.telemetry\";\r\nimport { hasThemeBase, isComponentInModal } from \"../utils/themeHelpers\";\r\n\r\nimport AccessibilityHelpers from \"../utils/AccessibilityHelpers\";\r\nimport Comment from \"../comment/Comment\";\r\nimport CommunityGuidelinePage from \"../community-guideline/CommunityGuidelinePage\";\r\nimport ContentSocialBar from \"../content-social-bar/ContentSocialBar\";\r\nimport CopyrightForm from \"../copyright-form/CopyrightForm\";\r\nimport GradientOverlay from \"../common/gradient-overlay/GradientOverlay\";\r\nimport { IRequestContext } from \"@msnews/core\";\r\nimport MultiLoginPage from \"../multi-login-page/MultiLoginPage\";\r\nimport MultipleContentTest from \"../multiple-content-test/MultipleContentTest\";\r\nimport NotificationTray from \"../common/notification/NotificationTray\";\r\nimport OnboardingPage from \"../onboarding-page/OnboardingPage\";\r\nimport OnboardingThirdPartyMsaPage from \"../onboarding-page/OnboardingThirdPartyPage\";\r\nimport OnboardingUnderagePage from \"../onboarding-page/OnboardingUnderagePage\";\r\nimport ProfileCard from \"../profile/profile-card/ProfileCard\";\r\nimport ProfileManageDataPage from \"../profile/profile-manage-data-page/ProfileManageDataPage\";\r\nimport ProfilePage from \"../profile/profile-page/ProfilePage\";\r\nimport ProfileReportMenu from \"../profile/profile-report-menu/ProfileReportMenu\";\r\nimport ProfileTabs from \"../profile/profile-tabs/ProfileTabs\";\r\nimport PublisherProfilePage from \"../publisher-profile/publisher-profile-page/PublisherProfilePage\";\r\nimport PublisherSubscribeFollowButton from \"../publisher-subscribe-follow-button/PublisherSubscribeFollowButton\";\r\nimport React from \"react\";\r\nimport ReactionBreakdown from \"../reaction-breakdown/ReactionBreakdown\";\r\nimport ReportMenu from \"../common/report-menu/ReportMenu\";\r\nimport { SocialUnhandledProps } from \"../Social.props\";\r\nimport UGContentCreatePage from \"../ug-content/ug-content-create-page/UGContentCreatePage\";\r\nimport UGContentList from \"../ug-content/ug-content-list/UGContentList\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { preventSelection } from \"../utils/mouseHandlers\";\r\n\r\nconst usedProps = [\"component\"];\r\n\r\ninterface MainProps extends SocialUnhandledProps {\r\n requestContext: IRequestContext;\r\n}\r\n\r\nexport default class Main extends React.PureComponent {\r\n telemetryObjects: any;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.telemetryObjects = {};\r\n }\r\n\r\n componentDidMount() {\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n isSuperApp && this.preventSelectionInSuperapp();\r\n }\r\n\r\n preparePropsToPass(moduleName) {\r\n const propsToPass = {...this.props};\r\n usedProps.map(x => delete propsToPass[x]);\r\n\r\n // Add and pass a container telemetry object matching with the module\r\n const moduleTelemetryContract = { name: moduleName.toUpperCase() };\r\n this.telemetryObjects.module = addOrUpdateTelemetryObject(this.props.mainTelemetryObject, moduleTelemetryContract, {}, this.telemetryObjects.module);\r\n propsToPass.mainTelemetryObject = this.telemetryObjects.module;\r\n\r\n return propsToPass;\r\n }\r\n\r\n switchToComponent(moduleName, id) {\r\n const propsToPass = this.preparePropsToPass(moduleName);\r\n moduleName = moduleName.toLowerCase();\r\n\r\n switch (moduleName) {\r\n case \"profilepage\":\r\n return ;\r\n\r\n case \"profilecard\":\r\n return ;\r\n\r\n case \"profiletabs\":\r\n return ;\r\n\r\n case \"socialbar\":\r\n return ;\r\n\r\n case \"comment\":\r\n return ;\r\n\r\n case \"reactionbreakdowncomment\":\r\n return ;\r\n\r\n case \"reactionbreakdowncontent\":\r\n return ;\r\n\r\n case \"guidelinepage\":\r\n return ;\r\n\r\n case \"multiloginpage\":\r\n return ;\r\n\r\n case \"notificationtray\":\r\n return ;\r\n\r\n case \"onboardingpage\":\r\n return ;\r\n\r\n case \"onboardingthirdpartypage\":\r\n return ;\r\n\r\n case \"onboardingunderagepage\":\r\n return ;\r\n\r\n case \"contentgenerationpage\":\r\n return ;\r\n\r\n case \"myarticles\":\r\n return ;\r\n\r\n case \"mydrafts\":\r\n return ;\r\n\r\n case \"managedatapage\":\r\n return ;\r\n\r\n case \"multiplecontenttest\":\r\n return ;\r\n\r\n case \"copyrightform\":\r\n return ;\r\n\r\n case \"trademarkform\":\r\n return ;\r\n\r\n case \"profilereportmenu\":\r\n return ;\r\n\r\n case \"reportmenu\":\r\n return ;\r\n\r\n case \"channelpage\":\r\n return ;\r\n\r\n case \"followers\":\r\n return ;\r\n\r\n case \"publishersubscribefollowbutton\":\r\n return ;\r\n\r\n case \"gradientoverlay\":\r\n return ;\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n AccessibilityHelpers.attachAccessibilityListeners(document);\r\n }\r\n\r\n render() {\r\n const isSuperApp = hasThemeBase(this.props.theme, enums.theme.superappBase);\r\n const { mainContainer, mainSuperAppContainer, mainInSuperappModal} = this.props.managedClasses;\r\n const isRenderedInSuperappModal = isComponentInModal(this.props.theme, this.props.moduleName);\r\n\r\n return (\r\n \r\n {this.switchToComponent(this.props.moduleName, this.props.id)}\r\n \r\n );\r\n }\r\n\r\n preventSelectionInSuperapp() {\r\n document.addEventListener(\"touchstart\", preventSelection);\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryBehaviorType, TelemetryObjectBase, TelemetryType } from \"@msnews/telemetry-contracts\";\r\n\r\nimport { genericTelemetryClickDispatcher } from \"../Social.telemetry\";\r\n\r\nexport interface PopupTelemetryObjects {\r\n closeBtn: TelemetryObjectBase;\r\n}\r\n\r\nexport const popupTelemetryContracts = {\r\n closeBtn: {\r\n name: \"CloseDialog\",\r\n behavior: TelemetryBehaviorType.Close,\r\n content: {\r\n headline: \"Close\"\r\n }\r\n }\r\n};\r\n\r\nexport const popupTelemetryActionDispatchers = {\r\n /** Used for: Scenario 3a and Scenario 4a */\r\n genericClicked: genericTelemetryClickDispatcher\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { PopupData, SocialProps } from \"../Social.props\";\r\nimport { PopupTelemetryObjects, popupTelemetryActionDispatchers, popupTelemetryContracts } from \"./Popup.telemetry\";\r\nimport { addOrUpdateTelemetryObject, getPageContentType, renderHybrid } from \"../Social.telemetry\";\r\n\r\nimport FocusLock from \"react-focus-lock\";\r\nimport Main from \"../main/main\";\r\nimport React from \"react\";\r\nimport { SocialLocalizedStrings } from \"../Social.localizedStrings\";\r\nimport { TelemetryContentType } from \"@msnews/telemetry-contracts\";\r\nimport { close } from \"../utils/icons\";\r\n\r\nexport interface PopupProps extends SocialProps {\r\n popup?: PopupData;\r\n hideOverlay?: boolean;\r\n hideButtons?: boolean;\r\n t: SocialLocalizedStrings;\r\n}\r\n\r\nexport default class Popup extends React.PureComponent {\r\n telemetryObjects: PopupTelemetryObjects;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.escFunction = this.escFunction.bind(this);\r\n }\r\n\r\n escFunction(event) {\r\n if (event.keyCode === 27) {\r\n this.closePopup();\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n document.addEventListener(\"keydown\", this.escFunction);\r\n }\r\n\r\n closePopup() {\r\n if (this.props.popup && this.props.popup.popupProps && this.props.popup.popupProps[\"focusBackRef\"]) {\r\n const ref = this.props.popup.popupProps[\"focusBackRef\"];\r\n window.setTimeout(() => { ref.focus(); }, 50);\r\n }\r\n this.props.popupConnector.closePopup();\r\n }\r\n\r\n closeClickHandler(e) {\r\n popupTelemetryActionDispatchers.genericClicked(e.currentTarget, this.telemetryObjects && this.telemetryObjects.closeBtn);\r\n this.closePopup();\r\n }\r\n\r\n render() {\r\n const { popup, hideOverlay, hideButtons, responsiveClass, t, mainTelemetryObject } = this.props;\r\n if (!popup) { return null; }\r\n\r\n const { moduleName, popupProps } = popup;\r\n if (!moduleName) { return null; }\r\n // Override existing props from popup props\r\n const propsToPass = {...this.props, moduleName, ...popupProps };\r\n\r\n /** Generate Telemetry Objects */\r\n const parentTelemetryObject = popupProps && popupProps[\"parentTelemetryObject\"];\r\n const contentType = parentTelemetryObject && parentTelemetryObject.contract && parentTelemetryObject.contract.content && parentTelemetryObject.contract.content.type == TelemetryContentType.Comment ? TelemetryContentType.Comment : getPageContentType();\r\n this.telemetryObjects = {\r\n closeBtn: addOrUpdateTelemetryObject(mainTelemetryObject, {... popupTelemetryContracts.closeBtn }, {id: parentTelemetryObject && parentTelemetryObject.contract.content.id, type: contentType}, this.telemetryObjects && this.telemetryObjects.closeBtn)\r\n };\r\n\r\n return (\r\n \r\n
    \r\n { !hideOverlay &&\r\n
     
    \r\n }\r\n
    \r\n { !hideButtons &&\r\n
    \r\n {close}\r\n
    \r\n }\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\nimport { Comment } from \"./comment/Comment\";\r\nimport CommunityGuidelinePage from \"./community-guideline/CommunityGuidelinePage\";\r\nimport ProfileCard from \"./profile/profile-card/ProfileCard\";\r\nimport ProfilePage from \"./profile/profile-page/ProfilePage\";\r\nimport ProfileTabs from \"./profile/profile-tabs/ProfileTabs\";\r\nimport MultiLoginPage from \"./multi-login-page/MultiLoginPage\";\r\nimport { NotificationTray } from \"./common/notification/NotificationTray\";\r\nimport OnboardingThirdPartyPage from \"./onboarding-page/OnboardingThirdPartyPage\";\r\nimport OnboardingPage from \"./onboarding-page/OnboardingPage\";\r\nimport ReactionBreakdown from \"./reaction-breakdown/ReactionBreakdown\";\r\nimport { ContentSocialBar } from \"./content-social-bar/ContentSocialBar\";\r\n\r\nimport {\r\n SocialExperienceRenderErrorComment,\r\n SocialExperienceRenderErrorGuideline,\r\n SocialExperienceRenderErrorMultilineLogin,\r\n SocialExperienceRenderErrorNotificationTray,\r\n SocialExperienceRenderErrorOnbardingThirdParty,\r\n SocialExperienceRenderErrorOnboarding,\r\n SocialExperienceRenderErrorProfileCard,\r\n SocialExperienceRenderErrorProfilePage,\r\n SocialExperienceRenderErrorProfileTabs,\r\n SocialExperienceRenderErrorReactionBreakdown,\r\n SocialExperienceRenderErrorSocialBar,\r\n SocialExperienceRenderErrorUnknownComponent\r\n} from \"@msnews/diagnostics\";\r\n\r\nexport const RenderErrors = {\r\n [Comment.name]: SocialExperienceRenderErrorComment,\r\n [CommunityGuidelinePage.name]: SocialExperienceRenderErrorGuideline,\r\n [ProfileCard.name]: SocialExperienceRenderErrorProfileCard,\r\n [ProfilePage.name]: SocialExperienceRenderErrorProfilePage,\r\n [ProfileTabs.name]: SocialExperienceRenderErrorProfileTabs,\r\n [MultiLoginPage.name]: SocialExperienceRenderErrorMultilineLogin,\r\n [NotificationTray.name]: SocialExperienceRenderErrorNotificationTray,\r\n [OnboardingThirdPartyPage.name]: SocialExperienceRenderErrorOnbardingThirdParty,\r\n [OnboardingPage.name]: SocialExperienceRenderErrorOnboarding,\r\n [ReactionBreakdown.name]: SocialExperienceRenderErrorReactionBreakdown,\r\n [ContentSocialBar.name]: SocialExperienceRenderErrorSocialBar,\r\n UnknownComponent: SocialExperienceRenderErrorUnknownComponent\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, logger } from \"@msnews/diagnostics\";\r\nimport { BaseExperience, InitialCommonExperienceProps } from \"@msnews/experiences-base\";\r\nimport { BridgeEventNames, handleBridgeEvent } from \"./Social.bridge\";\r\nimport { HandledPropsKeys, TelemetryBase } from \"@msnews/core\";\r\nimport { SocialHandledProps, SocialUnhandledProps } from \"./Social.props\";\r\nimport { TelemetryEventNames, convertToHybridTags, handleEvent } from \"./Social.telemetry\";\r\n\r\nimport { ExperienceIds } from \"@msnews/experiences-constants\";\r\nimport Main from \"./main/main\";\r\nimport Popup from \"./popup/Popup\";\r\nimport React from \"react\";\r\nimport { RenderErrors } from \"./Social.errors\";\r\nimport { SocialService } from \"@msnews/social-data-service\";\r\nimport { TelemetryDOM } from \"@msnews/telemetry-core\";\r\nimport { appErrorLogger } from \"./utils/AppErrorLogger\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\nimport { enums } from \"./utils/enums\";\r\nimport { getContextData } from \"@msnews/core\";\r\n\r\ndeclare global {\r\n interface Window {\r\n loginWindow: any;\r\n trackFromWidget: any;\r\n sapphireBridge: any;\r\n msaLoginWindow: any;\r\n signalR: any;\r\n auth2: any;\r\n googleInit: any;\r\n gapi: any;\r\n FB: any;\r\n fbAsyncInit: any;\r\n listenMSALoginWindow: any;\r\n msaLogin: any;\r\n clipboardData: any;\r\n AzureStorage: any;\r\n require: (r: any, f: any) => void;\r\n ReactNativeWebView: any;\r\n }\r\n}\r\n\r\n/**\r\n * Starter kit experience\r\n */\r\nexport class Social extends BaseExperience {\r\n\r\n private responsiveClass = \"\";\r\n\r\n /** The Social default prop contract. Describes any default values for any component handled props */\r\n public static defaultProps: Partial = {\r\n experienceName: ExperienceIds.social\r\n };\r\n private handleTelemetryCall: Function;\r\n private handlePartialPageImpressionCall: Function;\r\n private handleAppErrorEventCall: (AppError) => void;\r\n\r\n constructor(props, context) {\r\n super(props, context);\r\n\r\n this.handleTelemetryCall = this.props.handleTelemetryCall;\r\n this.handlePartialPageImpressionCall = this.props.handlePartialPageImpressionCall;\r\n this.handleAppErrorEventCall = this.props.handleAppErrorEventCall;\r\n if (this.handleAppErrorEventCall) {\r\n appErrorLogger.setOnAppError(this.handleAppErrorEventCall);\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected handledProps: HandledPropsKeys = {\r\n ...InitialCommonExperienceProps,\r\n checkAndLogReducerError: undefined\r\n };\r\n\r\n /** @inheritdoc */\r\n public componentWillMount(): void {\r\n try {\r\n const locationHref = getContextData(this.props.requestContext.data.locationHref, \"locationHref\");\r\n const ppeEnvironmentSelected = locationHref.toLowerCase().indexOf(enums.selectPpeParameter) > -1;\r\n if (ppeEnvironmentSelected) { SocialService.setDomain(enums.externalUrls.ppeApi); }\r\n } catch (e) {\r\n logger.log(\"Error occured using requestContext.\");\r\n }\r\n }\r\n\r\n /** @ineritdoc */\r\n public componentDidMount(): void {\r\n this.setupTelemetry();\r\n this.setupBridge();\r\n this.listenMediaQueries();\r\n }\r\n\r\n /** @inheritdoc */\r\n public componentWillUnmount(): void {\r\n this.teardownTelemetry();\r\n this.teardownBridge();\r\n }\r\n\r\n public componentDidCatch(error, info): void {\r\n const componentRegex = new RegExp(\"in (.+) .created by\");\r\n const componentNameResult = info.componentStack.match(componentRegex);\r\n let componentName = componentNameResult && componentNameResult[1] || \"unknown\";\r\n const reduxResult = componentName.match(/Connect\\((.+)\\)/);\r\n const isRedux = (reduxResult && reduxResult[1]) != null;\r\n if (isRedux) {\r\n componentName = reduxResult[1];\r\n }\r\n const isPopup = info.componentStack.indexOf(\"created by Popup\") > 0;\r\n const appError = RenderErrors[componentName] || RenderErrors.UnknownComponent;\r\n\r\n const { moduleName, id } = this.props;\r\n\r\n appErrorLogger.log({\r\n ...appError,\r\n message: \"Social experience component failed to render\",\r\n pb: {\r\n ...appError.pb,\r\n customMessage: componentName + \" \" + error.name + \": \" + error.message,\r\n stack: error.stack,\r\n socialProps: { moduleName, id },\r\n isPopup,\r\n isRedux\r\n }\r\n } as AppError);\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.props.checkAndLogReducerError();\r\n }\r\n\r\n /** @inheritdoc */\r\n public render(): JSX.Element {\r\n super.render();\r\n\r\n const { t, theme, children } = this.props;\r\n const propsToPass = {...this.unhandledProps(), children, responsiveClass: this.responsiveClass, markTtvr: this.markTtvr, t, theme};\r\n return (\r\n \r\n
    \r\n \r\n \r\n );\r\n }\r\n\r\n /** Non nav event handler */\r\n private telemetryHandler = (e: CustomEvent) => {\r\n if (e.detail.consumed) { return; }\r\n\r\n e.detail.consumed = true;\r\n\r\n try {\r\n if (!e.detail.element) { return; }\r\n\r\n const element = e.detail.element as HTMLElement;\r\n const telemetryEvent = e.detail.telemetryEvent;\r\n const refreshDataAttribute = e.detail.refreshDataAttribute;\r\n\r\n if ((!element.hasAttribute(\"data-t\") && !element.hasAttribute(\"data-m\")) || refreshDataAttribute) {\r\n const elementTelemetryObject = this.props.mainTelemetryObject.addOrUpdateChild({...telemetryEvent.contract});\r\n const telemetryDomElement = TelemetryDOM.get(element);\r\n telemetryDomElement ? telemetryDomElement.isVisible = true : null;\r\n\r\n const customTelemetryTags = convertToHybridTags(elementTelemetryObject);\r\n // Render Hybrid tags\r\n if (customTelemetryTags) {\r\n TelemetryBase.setTrackingAttrs(element, element.parentElement, {defaults: customTelemetryTags});\r\n } else {\r\n // Render Peregrine tags\r\n const telemetryTagsObject = elementTelemetryObject.render();\r\n // Add other attributes if there are other than data-t\r\n Object.keys(telemetryTagsObject).map(key => {\r\n element.setAttribute(key, telemetryTagsObject[key]);\r\n });\r\n }\r\n }\r\n\r\n handleEvent(telemetryEvent, element, this.handleTelemetryCall, this.handlePartialPageImpressionCall);\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n };\r\n\r\n private setupTelemetry = () => {\r\n if (canUseDOM()) {\r\n Object.keys(TelemetryEventNames).forEach(eventName => document.addEventListener(TelemetryEventNames[eventName], this.telemetryHandler));\r\n }\r\n };\r\n\r\n private setupBridge = () => {\r\n if (canUseDOM()) {\r\n Object.keys(BridgeEventNames).forEach(eventName => document.addEventListener(BridgeEventNames[eventName], handleBridgeEvent));\r\n }\r\n };\r\n\r\n private teardownTelemetry = () => {\r\n if (canUseDOM()) {\r\n Object.keys(TelemetryEventNames).forEach(eventName => document.removeEventListener(TelemetryEventNames[eventName], this.telemetryHandler));\r\n }\r\n };\r\n\r\n private teardownBridge = () => {\r\n if (canUseDOM()) {\r\n Object.keys(BridgeEventNames).forEach(eventName => document.removeEventListener(BridgeEventNames[eventName], handleBridgeEvent));\r\n }\r\n };\r\n\r\n /** Helper to mark time to visually ready */\r\n private markTtvr = () => {\r\n window.requestAnimationFrame(() => {\r\n setTimeout(() => {\r\n super.markTimeToVisuallyReady(true);\r\n }, 0);\r\n });\r\n };\r\n\r\n /** CSS Media Queries */\r\n listenMediaQueries() {\r\n const queryLevels = [\r\n {\r\n query: window.matchMedia(\"(max-width: 640px)\"),\r\n className: enums.responsiveLevels.L0\r\n },\r\n {\r\n query: window.matchMedia(\"(max-width: 540px) and (max-aspect-ratio: 1/1)\"),\r\n className: enums.responsiveLevels.MobilePopup\r\n },\r\n {\r\n query: window.matchMedia(\"(max-width: 480px)\"),\r\n className: enums.responsiveLevels.L1\r\n },\r\n {\r\n query: window.matchMedia(\"(max-width: 340px)\"),\r\n className: enums.responsiveLevels.L2\r\n }\r\n ];\r\n\r\n // Add listeners for each query level\r\n queryLevels.map(queryLevel => queryLevel.query.addListener(() => this.checkMediaQueryLevel(queryLevel)));\r\n\r\n // Check all queryLevels after the next event tick\r\n setTimeout(() => {\r\n queryLevels.map(queryLevel => this.checkMediaQueryLevel(queryLevel));\r\n });\r\n }\r\n\r\n checkMediaQueryLevel(queryLevel) {\r\n let classNames= (this.responsiveClass || \"\").split(\" \");\r\n\r\n if (queryLevel.query.matches) {\r\n classNames.push(queryLevel.className);\r\n } else {\r\n classNames = classNames.filter(className => className != queryLevel.className);\r\n }\r\n\r\n this.responsiveClass = classNames.join(\" \");\r\n\r\n if (this.props.styleConnector) {\r\n this.props.styleConnector.updateResponsiveClass(this.responsiveClass);\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { HighContrastColor, highContrastSelector } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const primaryDarkerColor = \"#005CA4\"; // darken(accentFillRest, 10%)\r\nexport const primaryFocusColor = \"#3EAAFF\"; // lighten(accentFillRest, 20%)\r\nexport const dangerColor = \"#dc3545\";\r\nexport const dangerFocusColor = \"#BA0C1B\";\r\nexport const profileHrColor = \"rgba(143, 158, 205, 0.2)\";\r\nexport const secondaryBorderColor = \"#BEBEBE\";\r\n\r\n/* Text-Color */\r\nexport const midDarkerTextColor = \"#4F4F4F\";\r\nexport const darkTextColor = \"rgba(0, 0, 0, 0.83)\";\r\nexport const primaryTextColor= \"#0067B8\";\r\nexport const secondaryTextColor= \"#5E5E5E\";\r\nexport const placeholderColor = \"#949494\";\r\n\r\n/* Background Colors*/\r\nexport const darkerBgColor = \"#cccccc\"; // darken(lightBgColor,20%)\r\n\r\n/* Component Based */\r\n\r\n/* Shadow */\r\nexport const mainBoxShadow= \"0px 4px 10px rgba(0, 0, 0, 0.12)\"; // rgba(0, 0, 0, 0.12)\r\n\r\n/* FONT */\r\nexport const mainFontSize = \"16px\";\r\nexport const mainLineHeight = \"22px\";\r\n\r\n/* AVATAR */\r\nexport const avatarSize = \"40px\";\r\n\r\n/* PROFILE */\r\nexport const profileSidePadding = \"40px\";\r\nexport const profileAvatarSize = \"64px\";\r\n\r\n/* OTHER */\r\nexport const avatarPadding = \"51px\"; // calc(1.1rem + @avatar-size);\r\nexport const commentVPadding = \"20px\";\r\nexport const fontFamily = '\"Segoe UI\", \"Segoe WP\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", Arial, Sans-Serif';\r\n\r\n/* RESET STYLES */\r\nexport const reset = {\r\n margin: \"0\",\r\n padding: \"0\",\r\n border: \"0\",\r\n \"vertical-align\": \"baseline\",\r\n \"list-style\": \"none\",\r\n\r\n \"& *:not([class]),h1,h2,h3,h4,h5,h6\": {\r\n margin: \"0\",\r\n padding: \"0\",\r\n border: \"0\",\r\n \"vertical-align\": \"baseline\",\r\n \"list-style\": \"none\"\r\n },\r\n\r\n \"& ul, li\": {\r\n \"list-style\": \"none\"\r\n }\r\n};\r\n\r\n/* HIGH CONTRAST */\r\n\r\nexport const highContrastButton = {\r\n [highContrastSelector]: {\r\n background: HighContrastColor.selectedBackground,\r\n transition: \"none\",\r\n \"& *, &:focus *, &:hover *\": {\r\n fill: HighContrastColor.selectedText\r\n }\r\n }\r\n};\r\n\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, isDarkMode, neutralFillRest, neutralForegroundHint, neutralForegroundRest, neutralLayerCard, neutralOutlineActive } from \"@microsoft/fast-components-styles-msft\";\r\nimport { profileHrColor, reset } from \"../utils/commonJssConstants\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../utils/enums\";\r\n\r\nconst fontSize = \"13px\";\r\nconst borderRadius = \"2px\";\r\n\r\nexport const CopyrightFormStyles = (config: DesignSystem) => ({\r\n copyrightFormContainer: {\r\n ...reset,\r\n \"box-sizing\": \"border-box\",\r\n width: \"500px\",\r\n \"max-width\": \"100vw\",\r\n display: \"flex !important\",\r\n \"flex-direction\": \"column\",\r\n padding: \"19px\",\r\n \"padding-bottom\": \"20px\",\r\n background: neutralLayerCard,\r\n \"max-height\": \"85vh\",\r\n \"min-height\": \"550px\",\r\n \"overflow-y\": \"auto\",\r\n \"font-size\": fontSize,\r\n\r\n \"& .cwt-input-container\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\"\r\n },\r\n\r\n \"& .cwt-h-seperator\": {\r\n background: profileHrColor,\r\n height: \"0px\",\r\n border: \"1px solid\",\r\n \"border-color\": neutralOutlineActive,\r\n \"box-sizing\": \"border-box\",\r\n width: \"100%\",\r\n margin: \"20px 0\"\r\n },\r\n \"& .cwt-sub-text\": {\r\n \"font-weight\": \"normal\",\r\n \"margin-top\": \"8px\",\r\n \"margin-bottom\": \"12px\",\r\n color: isDarkMode(config) ? \"#D9D9D9\" : neutralForegroundHint\r\n },\r\n \"& .cwt-title\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"& .cwt-main-title\": {\r\n margin: \"16px 16px 8px\",\r\n \"font-weight\": \"600\",\r\n \"font-size\": \"24px\",\r\n color: neutralForegroundRest\r\n }\r\n },\r\n \"& div.cwt-buttons\": {\r\n display: \"flex\",\r\n \"flex-wrap\": \"wrap\",\r\n \"justify-content\": \"center\",\r\n margin: \"20px 0 0\",\r\n\r\n \"& .cwt-fast-button\": {\r\n \"min-width\": \"134px\",\r\n \"margin-bottom\": \"11px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"8px\"\r\n }\r\n },\r\n \"& .cwt-input-label\": {\r\n \"font-weight\": \"600\",\r\n margin: \"20px 2px 8px\",\r\n color: neutralForegroundRest,\r\n display: \"flex\",\r\n \"justify-content\": \"space-between\",\r\n\r\n \"& .cwt-input-label-asterisk\": {\r\n color: isDarkMode(config) ? \"#FFCCCC\" : \"#B30000\",\r\n \"&::before\": {\r\n content: \"'*'\"\r\n }\r\n }\r\n },\r\n \"& .cwt-required-text\": {\r\n color: isDarkMode(config) ? \"#FFCCCC\" : \"#B30000\"\r\n },\r\n \"& .cwt-input-box\": {\r\n background: neutralLayerCard,\r\n border: \"1px solid\",\r\n \"border-color\": neutralOutlineActive,\r\n \"box-shadow\": \"0px 4px 4px rgba(0, 0, 0, 0.02)\",\r\n \"border-radius\": borderRadius,\r\n color: isDarkMode(config) ? \"white\" : \"black\",\r\n padding: \"9px\"\r\n },\r\n \"& .cwt-input-disabled\": {\r\n background: neutralFillRest,\r\n \"font-weight\": \"400\",\r\n color: neutralForegroundRest\r\n },\r\n \"& .cwt-input-box-error\": {\r\n \"border-color\": isDarkMode(config) ? \"#FFCCCC\" : \"#B30000\",\r\n \"box-shadow\": isDarkMode(config) ? \"0px 1px 1px #FFCCCC\" : \"0px 1px 1px #B30000\"\r\n },\r\n \"& .cwt-header-sections\": {\r\n \"margin-bottom\": \"8px\",\r\n \"font-size\": `calc( ${fontSize} + (2px))`,\r\n color: neutralForegroundRest,\r\n \"font-weight\": \"600\"\r\n },\r\n \"& .cwt-header-comment-id\": {\r\n \"margin-top\": \"20px\",\r\n \"margin-bottom\": \"10px\",\r\n \"font-weight\": \"600\",\r\n color: isDarkMode(config) ? \"#D9D9D9\" : neutralForegroundHint\r\n },\r\n\r\n \"& .cwt-media-container\": {\r\n position: \"relative\",\r\n \"min-height\": \"36px\",\r\n display: \"flex\",\r\n \"flex-wrap\": \"wrap\",\r\n \"align-items\": \"center\",\r\n border: \"1px solid\",\r\n \"border-color\": neutralOutlineActive,\r\n padding: \"4px\",\r\n \"box-shadow\": \"0px 4px 4px rgba(0, 0, 0, 0.02)\",\r\n \"& .cwt-media-input\": {\r\n position: \"absolute\",\r\n height: \"100%\",\r\n opacity: \"0\",\r\n width: \"100%\",\r\n \"&:hover\": {\r\n cursor: \"pointer\"\r\n }\r\n },\r\n \"& .cwt-fast-button\": {\r\n \"min-width\": \"134px\",\r\n margin: \"4px 0px 4px\",\r\n \"z-index\": \"1\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"12px\"\r\n },\r\n \"& .cwt-media\": {\r\n margin: \"4px 0px 4px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"12px\",\r\n display: \"flex\",\r\n \"z-index\": \"10\",\r\n \"align-items\": \"center\",\r\n [applyLocalizedProperty(\"padding-left\", \"padding-right\", config.direction)]: \"10px\",\r\n \"border-radius\": \"4px\",\r\n \"background-color\": isDarkMode(config) ? \"#4D4D4D\" : \"#C2C2C2\",\r\n color: neutralForegroundRest,\r\n \"&.cwt-upload-failed\": {\r\n \"background-color\": isDarkMode(config) ? \"#FF493E\" : \"#FF7970\"\r\n },\r\n \"&.cwt-upload-succeed\": {\r\n \"background-color\": isDarkMode(config) ? \"#576F3C\" : \"#A4BE87\"\r\n }\r\n },\r\n \"& .cwt-media-status\": {\r\n \"font-style\": \"italic\"\r\n },\r\n \"& .cwt-media-span\": {\r\n \"z-index\": \"10\",\r\n color: isDarkMode(config) ? \"#D9D9D9\" : neutralForegroundHint\r\n }\r\n },\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n width: \"100vw\",\r\n \"max-width\": \"100vw\",\r\n \"max-height\": \"85vh\",\r\n \"& .cwt-input-label\": {\r\n \"flex-direction\": \"column\",\r\n \"cwt-required-text\": {\r\n \"margin-top\": \"10px\"\r\n }\r\n }\r\n }\r\n }\r\n});\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { neutralLayerCardContainer, neutralOutlineRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const DisabledMessageStyles = {\r\n\r\n disabledMessageContainer: {\r\n margin: \"16px 0\",\r\n padding: \"12px !important\",\r\n \"border-radius\": \"8px\",\r\n background: neutralLayerCardContainer,\r\n \"text-align\": \"center\",\r\n\r\n \"& .cwt-icon.cwt-disabled-message\": {\r\n display: \"inline\",\r\n color: neutralOutlineRest,\r\n fill: \"#ff0000\",\r\n opacity: \"1\",\r\n\r\n \"& .cwt-icon-vector\": {\r\n margin: \"-4px 8px 0\",\r\n display: \"inline-flex\",\r\n \"vertical-align\": \"middle\"\r\n }\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport const FollowButtonStyles = {\r\n followButtonContainer: {\r\n \"min-width\": \"100px\"\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nconst imageBgColor = \"#F2F2F2\";\r\nconst imageSize = \"150px\";\r\nconst imageMargin = \"4px\";\r\nconst mainPadding = \"8px\";\r\n\r\nexport const MediaInputStyles = {\r\n mediaInputContainer: {\r\n position: \"relative\",\r\n display: \"flex\",\r\n \"justify-content\": \"center\",\r\n \"min-height\": `calc(${imageSize} + ${mainPadding} * 2)`,\r\n padding: mainPadding,\r\n background: imageBgColor,\r\n \"box-sizing\": \"border-box\",\r\n \"& .cwt-media-container\": {\r\n display: \"flex\",\r\n \"flex-wrap\": \"wrap\",\r\n margin: imageMargin,\r\n \"z-index\": \"1\",\r\n\r\n \"& .cwt-image-container\": {\r\n display: \"flex\",\r\n position: \"relative\",\r\n \"justify-content\": \"center\",\r\n\r\n \"& .cwt-image\": {\r\n width: imageSize,\r\n height: imageSize,\r\n \"max-height\": imageSize,\r\n \"object-fit\": \"scale-down\",\r\n margin: imageMargin,\r\n background: neutralLayerCard,\r\n \"border-radius\": \"4px\"\r\n },\r\n\r\n \"& .cwt-button-container\": {\r\n display: \"none\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"space-around\",\r\n position: \"absolute\",\r\n bottom: imageMargin,\r\n width: `calc(100% - (${mainPadding} + ${imageMargin}) * 2)`,\r\n padding: mainPadding,\r\n background: \"rgba(255, 255, 255, .55)\",\r\n \"border-radius\": \"0\",\r\n\r\n \"& .cwt-icon\": {\r\n cursor: \"pointer\",\r\n \"font-size\": \"20px\",\r\n color: neutralForegroundRest\r\n }\r\n },\r\n\r\n \"&:hover\": {\r\n \"& .cwt-button-container\": {\r\n display: \"flex\"\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-media-input\": {\r\n position: \"absolute\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n opacity: \"0\"\r\n },\r\n\r\n \"& .cwt-add-image-icon\": {\r\n color: neutralForegroundRest,\r\n\r\n \"&:hover\": {\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-icon-vector\": {\r\n padding: \"4px\",\r\n border: \"2px solid \",\r\n \"border-color\": neutralForegroundRest,\r\n \"border-radius\": \"50%\"\r\n }\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { accentFillRest, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { reset } from \"../utils/commonJssConstants\";\r\n\r\nconst avatarSize = \"64px\";\r\n\r\nexport const MultiLoginPageStyles = {\r\n multiLoginPageContainer: {\r\n ...reset,\r\n overflow: \"hidden\",\r\n \"overflow-y\": \"auto\",\r\n position: \"relative\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"flex-start\",\r\n width: \"500px\",\r\n \"max-width\": \"calc(100vw - 40px)\",\r\n padding: \"40px 20px\",\r\n background: neutralLayerCard,\r\n\r\n \"&:before\": {\r\n content: \"' '\",\r\n position: \"absolute\",\r\n top: \"0\",\r\n height: \"8px\",\r\n width: \"100%\",\r\n background: accentFillRest\r\n },\r\n\r\n \"& p.cwt-title\": {\r\n margin: \"22px 0 28px\",\r\n \"font-size\": \"24px\",\r\n \"font-weight\": \"600\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-avatar\": {\r\n height: avatarSize,\r\n width: avatarSize,\r\n \"min-width\": avatarSize\r\n },\r\n\r\n \"& .cwt-fast-button.cwt-image-button\": {\r\n width: \"250px\",\r\n height: \"auto\",\r\n \"justify-content\": \"stretch\",\r\n \"max-width\": \"96%\",\r\n margin: \"5px 0\",\r\n padding: \"11px 0\",\r\n\r\n \"& .cwt-image\": {\r\n margin: \"0 25px\"\r\n }\r\n },\r\n\r\n \"& .cwt-privacy-text\": {\r\n margin: \"40px 16px 16px\",\r\n \"font-size\": \"13px\",\r\n color: neutralForegroundHint,\r\n\r\n \"& .cwt-link\": {\r\n padding: \"0 .1em\",\r\n color: accentFillRest\r\n }\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { neutralFillStealthHover, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { enums } from \"../utils/enums\";\r\n\r\nexport const PopupStyles = {\r\n overlayContainer: {\r\n display: \"flex !important\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n position: \"fixed\",\r\n left: \"0px\",\r\n right: \"0px\",\r\n top: \"0px\",\r\n bottom: \"0px\",\r\n \"z-index\": \"9999999999\",\r\n \"background-color\": \"transparent\",\r\n\r\n \"& .cwt-overlay\": {\r\n position: \"absolute\",\r\n left: \"0px\",\r\n right: \"0px\",\r\n top: \"0px\",\r\n bottom: \"0px\",\r\n \"background-color\": \"rgba(0,0,0,0.5)\"\r\n },\r\n\r\n \"& .cwt-content\": {\r\n position: \"fixed\",\r\n \"z-index\": \"10\",\r\n margin: \"0\",\r\n \"max-width\": \"100%\",\r\n \"max-height\": \"calc(100% + 16px)\",\r\n overflow: \"auto\",\r\n\r\n // 'Hide scrollbar'\r\n \"-ms-overflow-style\": \"none\",\r\n \"&::-webkit-scrollbar \": {\r\n display: \"none\"\r\n },\r\n\r\n \"& .cwt-corner-buttons\": {\r\n position: \"sticky\",\r\n top: \"40px\",\r\n margin: \"0 12px\",\r\n \"z-index\": \"9999\",\r\n display: \"flex\",\r\n \"font-size\": \"13px\",\r\n \"align-items\": \"center\",\r\n \"flex-direction\": \"row-reverse\",\r\n\r\n \"& .cwt-icon.cwt-link\": {\r\n padding: \"8px\",\r\n color: neutralForegroundRest,\r\n \"border-radius\": \"4px\",\r\n background: neutralLayerCard,\r\n \"box-shadow\": \"0 0 3px rgb(0 0 0 / 10%)\",\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthHover\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-content-container\": {\r\n display: \"block !important\",\r\n overflow: \"auto\",\r\n height: \"100%\",\r\n \"border-radius\": \"6px\",\r\n\r\n \"& > div\": {\r\n display: \"block !important\"\r\n }\r\n }\r\n },\r\n\r\n [\"&.\"+enums.responsiveLevels.MobilePopup]: {\r\n \"align-items\": \"flex-end\",\r\n\r\n \"& .cwt-content\": {\r\n width: \"100vw\",\r\n\r\n \"& .cwt-content-container\": {\r\n \"border-radius\": \"20px 20px 0 0 !important\"\r\n }\r\n\r\n }\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { backgroundColor } from \"@microsoft/fast-components-styles-msft\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { reset } from \"../../utils/commonJssConstants\";\r\n\r\nexport const ProfilePageStyles = {\r\n profilePageContainer: {\r\n ...reset,\r\n display: \"flex\",\r\n \"flex-direction\": \"row\",\r\n \"align-items\": \"flex-start\",\r\n \"justify-content\": \"stretch\",\r\n \"min-width\": \"360px\",\r\n background: backgroundColor,\r\n\r\n \"& .cwt-profile-tabs-container\": {\r\n margin: \"3px 27px 56px\",\r\n flex: \"1\",\r\n \"max-width\": \"960px\"\r\n },\r\n\r\n /* RESPONSIVE CLASSES */\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"stretch\",\r\n\r\n \"& .cwt-profile-tabs-container\": {\r\n margin: \"9px 3px 56px\",\r\n \"max-width\": \"100%\"\r\n }\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\nimport { neutralForegroundHint } from \"@microsoft/fast-components-styles-msft\";\r\nexport const ProfilePostsStyles = {\r\n profilePostsContainer: {\r\n display: \"flex\",\r\n \"flex-flow\": \"row wrap\",\r\n \"align-content\": \"space-between\",\r\n \"justify-content\": \"space-around\",\r\n \"align-items\": \"flex-start\",\r\n \"min-height\": \"580px\",\r\n\r\n /* Force new columns */\r\n \"&::before, &::after\": {\r\n content: \"''\",\r\n \"flex-basis\": \"100%\",\r\n width: \"0\",\r\n order: \"2\"\r\n },\r\n\r\n \"& .cwt-content-card\": {\r\n margin: \"10px\",\r\n width: \"30%\"\r\n },\r\n\r\n \"& .cwt-fetching-text\": {\r\n margin: \"10px\",\r\n color: neutralForegroundHint\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFillStealthHover, neutralForegroundHint, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { ComponentStyles } from \"@microsoft/fast-jss-manager\";\r\nimport { ProfileReportMenuClassNameContract } from \"./ProfileReportMenu.classnames\";\r\n\r\n/**\r\n * The ReportMenu styles\r\n * @type {ComponentStyles}\r\n */\r\nexport const ProfileReportMenuStyles: ComponentStyles < ProfileReportMenuClassNameContract, DesignSystem > = {\r\n profileReportMenuContainer: {\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n width: \"140px\",\r\n background: neutralLayerCard,\r\n \"border-radius\": \"8px\",\r\n \"box-shadow\": \"0px 0px 5.6px rgba(0, 0, 0, 0.11), 0px 6.4px 14.4px rgba(0, 0, 0, 0.13)\",\r\n transition: \".2s ease\",\r\n\r\n \"& .cwt-sliding-container\": {\r\n position: \"absolute\",\r\n bottom: \"0\",\r\n display: \"flex\",\r\n \"align-items\": \"flex-end\",\r\n transition: \".2s ease\"\r\n },\r\n\r\n \"& .cwt-report-list\": {\r\n \"min-width\": \"140px\",\r\n \"max-height\": \"188px\",\r\n margin: \"0\",\r\n padding: \"4px 0\",\r\n \"font-size\": \"12px\",\r\n \"letter-spacing\": \"-0.012em\",\r\n \"overflow-y\": \"auto\",\r\n\r\n \"& .cwt-menu-header\": {\r\n \"font-size\": \"16px\",\r\n \"margin-left\": \"auto\",\r\n padding: \"4px 12px\",\r\n color: neutralForegroundHint,\r\n fill: \"currentColor\",\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"12px\",\r\n \"font-weight\": \"bold\"\r\n }\r\n },\r\n\r\n \"& li\": {\r\n cursor: \"pointer\",\r\n padding: \"4px 12px\",\r\n color: neutralForegroundHint,\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthHover\r\n }\r\n }\r\n }\r\n },\r\n\r\n profileReportMenuPopover: {\r\n bottom: \"5px\"\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, accentForegroundRest, isDarkMode, neutralFillStealthActive, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { getEmojiStylesByWidth } from \"../utils/emojiIcons\";\r\nimport { reset } from \"../utils/commonJssConstants\";\r\n\r\nconst sidePadding = 20;\r\nconst avatarSize = \"28px\";\r\nconst width = 466;\r\n\r\nconst scrollGradientStyle = (config) => {\r\n return {\r\n content: \"''\",\r\n width: \"100%\",\r\n height: \"20px\",\r\n position: \"absolute\",\r\n \"background-repeat\": \"no-repeat\",\r\n \"z-index\": \"1\",\r\n left: \"0\",\r\n right: \"0\",\r\n background: isDarkMode(config) ? \"linear-gradient(180deg, rgba(66, 66, 66, 0), rgba(66, 66, 66, 1))\" : \"linear-gradient(180deg, rgba(255, 255, 255, 0), #FFFFFF)\"\r\n };\r\n};\r\n\r\nexport const ReactionBreakdownStyles = (config: DesignSystem) => ({\r\n reactionBreakdownContainer: {\r\n ...reset,\r\n \"box-sizing\": \"content-box !important\",\r\n display: \"block !important\",\r\n margin: \"0 auto\",\r\n\r\n [\"&.\"+enums.responsiveLevels.MobilePopup]: {\r\n display: \"flex !important\",\r\n \"max-width\": \"100vw\",\r\n \"overflow-x\": \"hidden\",\r\n\r\n \"& .cwt-reaction-breakdown-inner\": {\r\n width: \"100vw\",\r\n\r\n \"& .cwt-tab-content\": {\r\n height: \"unset\",\r\n \"min-height\": \"270px\",\r\n \"max-height\": `${screen.height*.9 - 120}px`\r\n }\r\n }\r\n },\r\n\r\n \"& div.emoji-icon\": {\r\n ...getEmojiStylesByWidth(16),\r\n transition: \"none\"\r\n },\r\n\r\n \"& .cwt-reaction-breakdown-inner\": {\r\n \"box-sizing\": \"content-box !important\",\r\n display: \"block !important\",\r\n width: `${width - 2*sidePadding}px`,\r\n margin: \"0 auto\",\r\n padding: \"0\",\r\n background: neutralLayerCard,\r\n \"overflow-x\": \"hidden\",\r\n\r\n \"& .cwt-reaction-breakdown-header\": {\r\n position: \"sticky\",\r\n top: \"0\",\r\n \"z-index\": \"5\",\r\n \"padding-top\": \"20px\",\r\n background: neutralLayerCard\r\n },\r\n\r\n \"& .cwt-title\": {\r\n color: neutralForegroundRest,\r\n margin: \"0 0 16px\",\r\n \"font-size\": \"16px !important\",\r\n \"font-weight\": \"bold\",\r\n \"text-align\": \"start\",\r\n padding: `0 ${sidePadding}px`\r\n },\r\n\r\n \"& .cwt-tabs\": {\r\n padding: `0 ${sidePadding}px`,\r\n \"align-items\": \"flex-start\",\r\n \"& .cwt-tab-item\": {\r\n position: \"relative\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"4px\",\r\n \"border-radius\": \"8px 8px 0 0\",\r\n \"min-height\": \"26px\",\r\n\r\n \"&.active > .cwt-icon > .cwt-icon-label\": {\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest\r\n },\r\n \"&.active:after\": {\r\n position: \"absolute\",\r\n content: \"' '\",\r\n height: \"3px\",\r\n width: \"100%\",\r\n bottom: \"0\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"0\",\r\n background: accentForegroundRest\r\n },\r\n\r\n \"&.cwt-link:hover\": {\r\n \"text-decoration\": \"none\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-h-seperator\": {\r\n height: \"1px\",\r\n margin: \"0\",\r\n background: \"rgba(0, 0, 0, 0.08)\",\r\n border: \"none\"\r\n },\r\n\r\n \"& .cwt-badge\": {\r\n \"font-size\": \"14px\",\r\n color: isDarkMode(config) ? \"#D1D1D1\" : \"#4D4D4D\"\r\n },\r\n\r\n \"& .cwt-tab-content\": {\r\n display: \"block !important\",\r\n height: \"280px\",\r\n margin: `0 -${sidePadding}px`,\r\n \"overflow-y\": \"auto\",\r\n \"&\": {\r\n // This is for cross-browser compatibility of scrollbar positioning,\r\n // overlay is not supported on all browsers\r\n \"overflow-y\": \"overlay\"\r\n },\r\n\r\n // Scrollbar\r\n \"scrollbar-width\": \"thin\",\r\n \"scrollbar-color\": \"rgba(0, 0, 0, 0.3) transparent\",\r\n \"&::-webkit-scrollbar\": {\r\n width: \"6px\"\r\n },\r\n \"&::-webkit-scrollbar-track\": {\r\n background: \"transparent\"\r\n },\r\n \"&::-webkit-scrollbar-thumb\": {\r\n \"background-color\": \"rgba(0, 0, 0, 0.3)\",\r\n \"border-radius\": \"6px\"\r\n },\r\n\r\n \"&:before\": {\r\n ...scrollGradientStyle(config),\r\n transform: \"translateY(-5px) scaleY(-.75)\"\r\n },\r\n\r\n \"&:after\": {\r\n ...scrollGradientStyle(config),\r\n bottom: \"0\"\r\n }\r\n },\r\n \"& .cwt-reaction\": {\r\n \"& div.emoji-icon\": {\r\n ...getEmojiStylesByWidth(16)\r\n }\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n \"& div.emoji-icon\": {\r\n ...getEmojiStylesByWidth(20)\r\n },\r\n \"font-size\": \"20px\",\r\n \"& .cwt-icon-label\": {\r\n \"margin-top\": \"-1.25px\",\r\n \"font-size\": \"16px\"\r\n }\r\n },\r\n\r\n \"& .cwt-reacting-users\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n padding: `0 ${sidePadding}px`,\r\n margin: \"8px 0 32px\",\r\n\r\n \"& li\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"space-between\",\r\n \"font-size\": \"14px\",\r\n padding: `0 ${sidePadding}px`,\r\n \"min-height\": \"42px\",\r\n \"max-height\": \"60px\",\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthActive\r\n },\r\n\r\n \"& .cwt-avatar\": {\r\n height: avatarSize,\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize\r\n },\r\n\r\n \"& .cwt-name\": {\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-reaction\": {\r\n margin: \"0 10px\",\r\n \"font-size\": \"16px\"\r\n },\r\n\r\n \"& .cwt-reaction-more\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"5px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"10px\",\r\n \"font-size\": \"16px\"\r\n },\r\n\r\n \"& .cwt-fast-button\": {\r\n height: \"21px\",\r\n \"min-width\": \"64px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"20px\",\r\n \"font-size\": \"12px\"\r\n },\r\n\r\n \"& .float-item\": {\r\n display: \"flex\",\r\n height: \"36px\",\r\n \"align-items\": \"center\",\r\n\r\n \"& a.cwt-link.cwt-avatar-link\": {\r\n display: \"flex\"\r\n }\r\n }\r\n },\r\n\r\n \"& li.cwt-rest-reactions\": {\r\n \"& .cwt-name\": {\r\n color: neutralForegroundHint\r\n }\r\n }\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, isDarkMode, neutralFocus, neutralForegroundHint } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { getEmojiStylesByWidth } from \"../../utils/emojiIcons\";\r\n\r\nexport const SocialBarPanelStyles = (config: DesignSystem) => ({\r\n socialBarPanelContainer: {\r\n \"touch-action\": \"none\",\r\n display: \"flex !important\",\r\n \"align-items\": \"center\",\r\n\r\n \"& .vertical-line\": {\r\n \"font-size\": \"10px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"13px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-2px\",\r\n color: neutralFocus\r\n },\r\n\r\n \"& div.emoji-icon\": {\r\n ...getEmojiStylesByWidth(16),\r\n transition: \"none\"\r\n },\r\n\r\n \"& > .cwt-icon\": {\r\n \"font-size\": \"16px\",\r\n padding: \"0\",\r\n margin: applyLocalizedProperty(\"0 12px 0 0\", \"0 0 0 12px\", config.direction),\r\n color: isDarkMode(config) ? \"#F5F5F5\" : \"#262626\",\r\n\r\n \"& + .cwt-visible-on-focus:focus\": {\r\n margin: applyLocalizedProperty(\"0 6px 0 -8px\", \"0 -8px 0 6px\", config.direction)\r\n },\r\n\r\n \"&.cwt-hide\": {\r\n display: \"none\",\r\n \"pointer-events\": \"none\",\r\n \"touch-events\": \"none\"\r\n },\r\n\r\n '&:hover, &[data-has-over=\"true\"]': {\r\n color: isDarkMode(config) ? \"#8D8D8D\" : \"#717272\",\r\n \"& .cwt-icon-label\": {\r\n color: isDarkMode(config) ? \"#8D8D8D\" : \"#717272\"\r\n }\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"13px\",\r\n padding: \"0 6px\",\r\n\r\n \"& a.cwt-link:not([href])\": {\r\n color: \"unset\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-reply-btn.cwt-icon\": {\r\n \"& .cwt-icon-vector\": {\r\n \"margin-top\": \"2px\"\r\n }\r\n },\r\n\r\n // 'RATING LABELS'\r\n \"& > .cwt-icon .cwt-icon-label.cwt-red-reaction\": {\r\n color: isDarkMode(config) ? \"#FF948F\" : \"#E02F19\"\r\n },\r\n \"& > .cwt-icon .cwt-icon-label.cwt-yellow-reaction\": {\r\n color: isDarkMode(config) ? \"#FF9333\" : \"#BD5B00\"\r\n },\r\n\r\n [\"&.\" + enums.responsiveLevels.MobilePopup]: {\r\n \"& > .cwt-icon:hover, .cwt-icon-label:hover \": {\r\n color: neutralForegroundHint\r\n }\r\n }\r\n },\r\n contentReactionCounts: {\r\n display: \"flex !important\",\r\n \"align-items\": \"center\",\r\n \"font-size\": \"16px !important\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"12px\",\r\n\r\n \"& > .cwt-icon\": {\r\n padding: \"0\",\r\n \"font-size\": \"16px !important\",\r\n \"align-items\": \"flex-start\",\r\n\r\n \"& .cwt-icon-label\": {\r\n padding: \"0 3px\",\r\n \"font-size\": \"13px\",\r\n \"margin-top\": \"0\"\r\n },\r\n\r\n \"& .cwt-icon-vector\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"4px\",\r\n \"margin-top\": \"2px\",\r\n \"&:last-child\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"0\"\r\n }\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { accentFillRest, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\nimport { placeholderColor, profileHrColor } from \"../../utils/commonJssConstants\";\r\n\r\nconst tagFontSize = \"12px\";\r\n\r\nexport const TagInputStyles = {\r\n tagInputContainer: {\r\n display: \"flex\",\r\n \"flex-wrap\": \"wrap\",\r\n padding: \"8px\",\r\n\r\n \"& .cwt-tag-input\": {\r\n \"flex-grow\": \"1\",\r\n margin: \"0 4px\",\r\n padding: \"4px\",\r\n \"font-size\": \"14px\",\r\n border: \"none\",\r\n\r\n \"&:focus\": {\r\n outline: \"none\"\r\n }\r\n },\r\n\r\n \"& .cwt-tag-item\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n margin: \"2px\",\r\n padding: \"1px 0 2px\",\r\n \"font-size\": tagFontSize,\r\n background: neutralLayerCard,\r\n color: accentFillRest,\r\n border: \"1px solid \"+profileHrColor,\r\n \"border-radius\": \"4px\",\r\n\r\n \"&:before\": {\r\n content: \"''\",\r\n width: \"8px\"\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n cursor: \"pointer\",\r\n margin: \"2px 0 0\",\r\n padding: \"3px 6px\",\r\n color: placeholderColor,\r\n opacity: \"1\",\r\n\r\n \"&:hover\": {\r\n color: neutralForegroundRest\r\n }\r\n }\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n SocialProps as BaseSocialProps,\r\n SocialUnhandledProps as BaseSocialUnhandledProps,\r\n SocialHandledProps,\r\n SocialManagedClasses\r\n} from \"./Social.props\";\r\nimport { SocialConfigSchema, mockConfig, mockDefaultState, mockState } from \"./experience-info\";\r\nimport manageJss, { ManagedJSSProps } from \"@microsoft/fast-jss-manager-react\";\r\n\r\nimport { Social as BaseSocial } from \"./Social\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { ExperienceInfo } from \"@msnews/core\";\r\nimport { SocialActions } from \"./Social.actions\";\r\nimport { SocialClassNameContract } from \"./Social.classnames\";\r\nimport { SocialConfig } from \"./Social.config\";\r\nimport { SocialConnector } from \"./Social.connector\";\r\nimport { SocialInspector } from \"./Social.inspector\";\r\nimport { SocialReducer } from \"./Social.reducer\";\r\nimport { SocialState } from \"./Social.state\";\r\nimport { SocialStyles } from \"./Social.styles\";\r\nimport { Subtract } from \"utility-types\";\r\n\r\n// The type returned by manageJss type is very complicated so we'll let the compiler infer the type instead of re-declaring just for the package export\r\nconst Social = manageJss(SocialStyles)(BaseSocial);\r\ntype Social = InstanceType;\r\n\r\n// Create a valid JSS managed interface that doesn't require managed classes which are provided by the manageJSS HOC\r\ntype SocialUnhandledProps = Subtract;\r\n\r\n// Create type for manageJSS HOC styled instance we are exporting\r\ntype SocialProps = ManagedJSSProps;\r\n\r\n// Define the ExperienceInfo object. This is used by tooling\r\nconst ToolingInfo: ExperienceInfo = {\r\n reactComponent: Social,\r\n experienceConfigSchema: SocialConfigSchema,\r\n defaultMockState: mockDefaultState,\r\n mockState: mockState,\r\n mockConfig: mockConfig,\r\n inspector: SocialInspector.inspect\r\n};\r\n\r\n// Export everything a user might need from this index file\r\nexport {\r\n Social,\r\n SocialActions,\r\n SocialConfig,\r\n SocialConnector,\r\n SocialProps,\r\n SocialReducer,\r\n SocialState,\r\n SocialClassNameContract,\r\n SocialHandledProps,\r\n SocialUnhandledProps,\r\n ToolingInfo\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {CommentBoxStyles} from \"./comment/comment-box/CommentBox.styles\";\r\nimport { CommentItemStyles } from \"./comment/comment-item/CommentItem.styles\";\r\nimport {CommentListStyles} from \"./comment/comment-list/CommentList.styles\";\r\nimport {CommentStyles} from \"./comment/Comment.styles\";\r\nimport { CommentSuperAppStyles } from \"./comment/themes/superapp/CommentSuperApp.styles\";\r\nimport {CommonStyles} from \"./utils/Common.styles\";\r\nimport { CommonSuperAppStyles } from \"./utils/themes/superapp/CommonSuperApp.styles\";\r\nimport { CommunityGuidelinePageSuperAppStyles } from \"./community-guideline/themes/superapp/CommunityGuidelinePageSuperApp.styles\";\r\nimport { CommunityGuidelineStyles } from \"./community-guideline/CommunityGuideline.styles\";\r\nimport { ComponentStyles } from \"@microsoft/fast-jss-manager\";\r\nimport { ContentCardStyles } from \"./common/content-card/ContentCard.styles\";\r\nimport {ContentPanelStyles} from \"./comment/content-panel/ContentPanel.styles\";\r\nimport { ContentSocialBarStyles } from \"./content-social-bar/ContentSocialBar.styles\";\r\nimport { ContentSocialBarSuperAppStyles } from \"./content-social-bar/themes/superapp/ContentSocialBarSuperApp.styles\";\r\nimport { CopyrightFormStyles } from \"./copyright-form/CopyrightForm.styles\";\r\nimport { DeleteMenuMenuStyles } from \"./common/delete-menu/DeleteMenu.styles\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport {DisabledMessageStyles} from \"./comment/disabled-message/DisabledMessage.styles\";\r\nimport { FollowButtonStyles } from \"./follow-button/FollowButton.styles\";\r\nimport { FollowButtonSuperAppStyles } from \"./follow-button/themes/superapp/FollowButtonSuperApp.styles\";\r\nimport { GradientOverlayStyles } from \"./common/gradient-overlay/GradientOverlay.styles\";\r\nimport { MediaInputStyles } from \"./ug-content/media-input/MediaInput.styles\";\r\nimport { MiniReactionBreakdownStyles } from \"./common/mini-reaction-breakdown/MiniReactionBreakdown.styles\";\r\nimport { MostReactionsStyles } from \"./common/most-reactions/MostReactions.styles\";\r\nimport { MultiLoginPageStyles } from \"./multi-login-page/MultiLoginPage.styles\";\r\nimport { NavbarStyles } from \"./common/navbar/Navbar.styles\";\r\nimport { NotificationCardStyles } from \"./common/notification/NotificationCard.styles\";\r\nimport { NotificationTrayStyles } from \"./common/notification/NotificationTray.styles\";\r\nimport { OnboardingPageStyles } from \"./onboarding-page/OnboardingPage.styles\";\r\nimport { PopoverStyles } from \"./common/popover/Popover.styles\";\r\nimport { PopupStyles } from \"./popup/Popup.styles\";\r\nimport { ProfileActivityStyles } from \"./profile/profile-activity/ProfileActivity.styles\";\r\nimport { ProfileActivitySuperAppStyles } from \"./profile/profile-activity/themes/superapp/ProfileActivitySuperApp.styles\";\r\nimport { ProfileCardStyles } from \"./profile/profile-card/ProfileCard.styles\";\r\nimport { ProfileCardSuperAppStyles } from \"./profile/profile-card/themes/superapp/ProfileCardSuperApp.styles\";\r\nimport { ProfileCardUserStatsStyles } from \"./profile/profile-card/profile-card-user-stats/ProfileCardUserStats.styles\";\r\nimport { ProfileCardUserStatsSuperAppStyles } from \"./profile/profile-card/profile-card-user-stats/themes/superapp/ProfileCardUserStatsSuperApp.styles\";\r\nimport { ProfileCommentsStyles } from \"./profile/profile-comments/ProfileComments.styles\";\r\nimport { ProfileCommentsSuperAppStyles } from \"./profile/profile-comments/themes/superapp/ProfileCommentsSuperApp.styles\";\r\nimport { ProfileManageDataPageStyles } from \"./profile/profile-manage-data-page/ProfileManageDataPage.styles\";\r\nimport { ProfilePageStyles } from \"./profile/profile-page/ProfilePage.styles\";\r\nimport { ProfilePageSuperAppStyles } from \"./profile/profile-page/themes/superapp/ProfilePageSuperApp.styles\";\r\nimport { ProfilePostsStyles } from \"./profile/profile-posts/ProfilePosts.styles\";\r\nimport { ProfilePrivacyStyles } from \"./profile/profile-privacy/ProfilePrivacy.styles\";\r\nimport { ProfilePrivacySuperAppStyles } from \"./profile/profile-privacy/themes/superapp/ProfilePrivacySuperApp.styles\";\r\nimport { ProfileReportMenuStyles } from \"./profile/profile-report-menu/ProfileReportMenu.styles\";\r\nimport { ProfileReportMenuSuperAppStyles } from \"./profile/profile-report-menu/themes/superapp/ProfileReportMenuSuperApp.styles\";\r\nimport { ProfileSubscriptionStyles } from \"./profile/profile-subscriptions/ProfileSubscriptions.styles\";\r\nimport { ProfileTabsStyles } from \"./profile/profile-tabs/ProfileTabs.styles\";\r\nimport { ProfileTabsSuperAppStyles } from \"./profile/profile-tabs/themes/superapp/ProfileTabsSuperApp.styles\";\r\nimport { ProfileUsersStyles } from \"./profile/profile-users/ProfileUsers.styles\";\r\nimport { ProfileUsersSuperAppStyles } from \"./profile/profile-users/themes/superapp/ProfileUsersSuperApp.styles\";\r\nimport { PublisherProfileCardStatsStyles } from \"./publisher-profile/publisher-profile-card/publisher-profile-card-stats/PublisherProfileCardStats.styles\";\r\nimport { PublisherProfileCardStyles } from \"./publisher-profile/publisher-profile-card/PublisherProfileCard.styles\";\r\nimport { PublisherProfilePageStyles } from \"./publisher-profile/publisher-profile-page/PublisherProfilePage.styles\";\r\nimport { PublisherProfileTabsStyles } from \"./publisher-profile/publisher-profile-tabs/PublisherProfileTabs.styles\";\r\nimport { PublisherSubscribeFollowButtonStyles } from \"./publisher-subscribe-follow-button/PublisherSubscribeFollowButton.styles\";\r\nimport { ReactionBreakdownStyles } from \"./reaction-breakdown/ReactionBreakdown.styles\";\r\nimport { ReactionBreakdownSuperAppStyles } from \"./reaction-breakdown/themes/superapp/ReactionBreakdownSuperApp.styles\";\r\nimport { ReactionMenuStyles } from \"./common/reaction-menu/ReactionMenu.styles\";\r\nimport { ReactionPanelStyles } from \"./common/reaction-panel/ReactionPanel.styles\";\r\nimport { ReplyListStyles } from \"./comment/reply-list/ReplyList.styles\";\r\nimport { ReportMenuStyles } from \"./common/report-menu/ReportMenu.styles\";\r\nimport { ReportMenuSuperAppStyles } from \"./common/report-menu/themes/superapp/ReportMenuSuperApp.styles\";\r\nimport { SocialBarPanelStyles } from \"./common/social-bar-panel/SocialBarPanel.styles\";\r\nimport { SocialClassNameContract } from \"./Social.classnames\";\r\nimport { SortBoxStyles } from \"./common/sort-box/SortBox.styles\";\r\nimport { TagInputStyles } from \"./ug-content/tag-input/TagInput.styles\";\r\nimport { TypingUsersStyles } from \"./comment/typing-users/TypingUsers.styles\";\r\nimport { UGContentCreatePageStyles } from \"./ug-content/ug-content-create-page/UGContentCreatePage.styles\";\r\nimport { UGContentCreateView1Styles } from \"./ug-content/ug-content-create-view1/UGContentCreateView1.styles\";\r\nimport { UGContentCreateView2Styles } from \"./ug-content/ug-content-create-view2/UGContentCreateView2.styles\";\r\nimport { UGContentListStyles } from \"./ug-content/ug-content-list/UGContentList.styles\";\r\nimport { UserCardStyles } from \"./comment/user-card/UserCard.styles\";\r\n\r\n/**\r\n * The Social styles\r\n * @type {ComponentStyles}\r\n */\r\nexport const SocialStyles: ComponentStyles < SocialClassNameContract, DesignSystem > = (config: DesignSystem) => ({\r\n ...CommonStyles(config),\r\n ...CommentStyles(config),\r\n ...ContentPanelStyles(config),\r\n ...CommentBoxStyles(config),\r\n ...CommentListStyles(config),\r\n ...CommentItemStyles(config),\r\n ...DisabledMessageStyles,\r\n ...ReplyListStyles(config),\r\n ...UserCardStyles(config),\r\n ...MiniReactionBreakdownStyles(config),\r\n ...PopoverStyles(config),\r\n ...ReactionMenuStyles(config),\r\n ...ReactionPanelStyles(config),\r\n ...ReportMenuStyles(config),\r\n ...SortBoxStyles(config),\r\n ...CommunityGuidelineStyles(config),\r\n ...ContentSocialBarStyles(config),\r\n ...ProfileUsersStyles(config),\r\n ...PopupStyles,\r\n ...NotificationCardStyles(config),\r\n ...NotificationTrayStyles(config),\r\n ...FollowButtonStyles,\r\n ...ReactionBreakdownStyles(config),\r\n ...ProfilePageStyles,\r\n ...ProfileActivityStyles(config),\r\n ...ProfileCardStyles(config),\r\n ...ProfileCommentsStyles(config),\r\n ...ProfilePrivacyStyles(config),\r\n ...ProfileTabsStyles(config),\r\n ...ProfilePostsStyles,\r\n ...MultiLoginPageStyles,\r\n ...ProfileReportMenuStyles,\r\n ...ProfileManageDataPageStyles(config),\r\n ...OnboardingPageStyles(config),\r\n ...DeleteMenuMenuStyles(config),\r\n ...UGContentCreatePageStyles(config),\r\n ...UGContentCreateView1Styles(config),\r\n ...UGContentCreateView2Styles(config),\r\n ...UGContentListStyles(config),\r\n ...TagInputStyles,\r\n ...MediaInputStyles,\r\n ...ContentCardStyles(config),\r\n ...TypingUsersStyles(config),\r\n ...GradientOverlayStyles(config),\r\n ...ProfileCardUserStatsStyles(config),\r\n ...CopyrightFormStyles(config),\r\n ...NavbarStyles(config),\r\n ...PublisherProfilePageStyles(config),\r\n ...PublisherProfileTabsStyles(config),\r\n ...PublisherProfileCardStyles(config),\r\n ...PublisherProfileCardStatsStyles(config),\r\n ...ProfileSubscriptionStyles(config),\r\n ...MostReactionsStyles(config),\r\n ...PublisherSubscribeFollowButtonStyles(config),\r\n\r\n /** SuperApp Styles */\r\n ...CommonSuperAppStyles(config),\r\n ...CommentSuperAppStyles(config),\r\n ...ProfilePageSuperAppStyles(config),\r\n ...ProfileCardUserStatsSuperAppStyles(config),\r\n ...ProfileTabsSuperAppStyles(config),\r\n ...ProfileCardSuperAppStyles(config),\r\n ...ProfileActivitySuperAppStyles(config),\r\n ...ProfileCommentsSuperAppStyles(config),\r\n ...FollowButtonSuperAppStyles(config),\r\n ...ProfileUsersSuperAppStyles(config),\r\n ...ProfilePrivacySuperAppStyles(config),\r\n ...ContentSocialBarSuperAppStyles(config),\r\n ...ReactionBreakdownSuperAppStyles(config),\r\n ...ProfileReportMenuSuperAppStyles(config),\r\n ...ReportMenuSuperAppStyles(config),\r\n ...CommunityGuidelinePageSuperAppStyles(config),\r\n ...SocialBarPanelStyles(config)\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, highContrastSelector, isDarkMode, neutralFocus, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\nimport { avatarSize, dangerColor, dangerFocusColor, darkerBgColor, fontFamily, primaryDarkerColor, reset, secondaryBorderColor } from \"./commonJssConstants\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst switchSize = \"20px\";\r\n\r\nexport const CommonStyles = (config: DesignSystem) => ({\r\n mainContainer: {\r\n ...reset,\r\n position: \"relative\",\r\n \"line-height\": \"initial\",\r\n \"font-size\": \"16px\",\r\n \"font-family\": fontFamily,\r\n // 'Hide scrollbar'\r\n \"-ms-overflow-style\": \"none\",\r\n \"&::-webkit-scrollbar\": {\r\n display: \"none\"\r\n },\r\n\r\n \"& textarea\": {\r\n \"font-family\": fontFamily\r\n },\r\n\r\n \"& *\": {\r\n \"-webkit-font-smoothing\": \"auto\",\r\n \"-moz-osx-font-smoothing\": \"grayscale\",\r\n \"font-smoothing\": \"auto\"\r\n },\r\n \"& label\": {\r\n \"vertical-align\": \"middle\"\r\n },\r\n \"& .no-select, &.no-select \": {\r\n \"-webkit-touch-callout\": \"none\",\r\n /* 'iOS Safari '*/\r\n \"-webkit-user-select\": \"none\",\r\n /* 'Safari '*/\r\n \"-khtml-user-select\": \"none\",\r\n /* 'Konqueror HTML '*/\r\n \"-moz-user-select\": \"none\",\r\n /* 'Old versions of Firefox '*/\r\n \"-ms-user-select\": \"none\",\r\n /* 'Internet Explorer'/'Edge '*/\r\n \"user-select\": \"none\"\r\n /* 'Non-prefixed version, currently'\r\n 'supported by Chrome, Opera and Firefox '*/\r\n },\r\n \"& .cwt-hide\": {\r\n display: \"none\"\r\n },\r\n \"& .cwt-hide-important\": {\r\n display: \"none !important\"\r\n },\r\n \"& .cwt-text-muted\": {\r\n color: neutralForegroundHint\r\n },\r\n \"& .text-center\": {\r\n \"text-align\": \"center\"\r\n },\r\n \"& .dot-before\": {\r\n \"&:before\": {\r\n content: \"'•'\",\r\n margin: \"0 8px\",\r\n \"font-size\": \"14px\",\r\n \"font-weight\": \"400\",\r\n \"line-height\": \"inherit\"\r\n }\r\n },\r\n \"& .cwt-capitalize\": {\r\n \"text-transform\": \"capitalize\"\r\n },\r\n\r\n /* 'Comment Highlighting '*/\r\n \"& @keyframes comment-highlight-animation\": {\r\n from: {\r\n \"margin-top\": \"-10px\",\r\n opacity: \"0.1\"\r\n },\r\n to: {\r\n \"margin-top\": \"0\",\r\n opacity: \"1\"\r\n }\r\n },\r\n \"& .cwt-comment-highlight\": {\r\n \"animation-name\": \"comment-highlight-animation\",\r\n \"animation-duration\": \".3s\",\r\n \"animation-timing-function\": \"ease\"\r\n },\r\n\r\n /* 'STANDALONE '*/\r\n \"& a, a:not([href])\": {\r\n color: isDarkMode(config) ? \"white\" : \"#717272\",\r\n cursor: \"pointer\",\r\n\r\n \"&:active\": {\r\n color: darkerBgColor\r\n }\r\n },\r\n \"& .cwt-link\": {\r\n cursor: \"pointer\"\r\n },\r\n \"& a:not(:hover)\": {\r\n \"text-decoration\": \"none\"\r\n },\r\n \"& a:hover, .cwt-link:hover:not(.cwt-button), .cwt-link.cwt-icon:hover\": {\r\n [`&:not(${highContrastSelector})`]: {\r\n \"text-decoration\": \"none\"\r\n }\r\n },\r\n \"& .cwt-select \": {\r\n padding: \"4px\",\r\n color: neutralForegroundHint,\r\n \"border-radius\": \"4px\"\r\n },\r\n\r\n /* 'BADGE '*/\r\n \"& .cwt-badge\": {\r\n padding: \"0 8px 0.8px\",\r\n \"font-size\": \"11px\",\r\n \"font-weight\": \"500\",\r\n background: \"rgba(0, 0, 0, 0.07)\",\r\n \"border-radius\": \"16px\"\r\n },\r\n\r\n /* 'ICONS '*/\r\n \"& .cwt-icon\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"font-style\": \"normal\",\r\n color: neutralForegroundRest,\r\n\r\n \"& .cwt-icon-label\": {\r\n padding: \"0 5px\",\r\n \"font-style\": \"inherit\",\r\n color: neutralForegroundRest,\r\n \"margin-top\": \"-.12em\"\r\n },\r\n\r\n \"&[disabled] \": {\r\n \"pointer-events\": \"none\",\r\n cursor: \"default\"\r\n },\r\n\r\n \"&.cwt-link:hover\": {\r\n \"text-decoration\": \"none\"\r\n }\r\n },\r\n \"& .cwt-icon, * & .cwt-icon\": {\r\n color: neutralForegroundRest,\r\n\r\n \"& .cwt-icon-vector\": {\r\n \"font-size\": \"inherit\"\r\n }\r\n },\r\n\r\n \"& .cwt-fast-icon-button\": {\r\n \"&, &:active, &:hover\": {\r\n background: \"none\",\r\n border: \"none\"\r\n }\r\n },\r\n\r\n // 'Vector Icons'\r\n \"& .cwt-icon-vector\": {\r\n width: \"1em\",\r\n fill: \"inherit\"\r\n },\r\n \"& a:hover\": {\r\n \"& .cwt-icon\": {\r\n color: accentFillRest\r\n }\r\n },\r\n /* 'SWITCH '*/\r\n \"& .cwt-switch\": {\r\n position: \"relative\",\r\n display: \"inline-block\",\r\n width: `calc(${switchSize} * 2)`,\r\n height: `calc(${switchSize})`,\r\n\r\n \"& input\": {\r\n opacity: \"0\",\r\n width: \"0\",\r\n height: \"0\",\r\n\r\n \"&:checked + .cwt-switch-slider\": {\r\n \"background-color\": \"#106EBE\",\r\n border: \"1px solid #106EBE\",\r\n\r\n \"&:before\": {\r\n \"-webkit-transform\": applyLocalizedProperty(`translateX(${switchSize})`, `translateX(-${switchSize})`, config.direction),\r\n \"-ms-transform\": applyLocalizedProperty(`translateX(${switchSize})`, `translateX(-${switchSize})`, config.direction),\r\n transform: applyLocalizedProperty(`translateX(${switchSize})`, `translateX(-${switchSize})`, config.direction),\r\n \"background-color\": \"white\"\r\n }\r\n },\r\n\r\n \"&:disabled + .cwt-switch-slider\": {\r\n opacity: \".5\"\r\n }\r\n }\r\n },\r\n \"& .cwt-switch-slider\": {\r\n position: \"absolute\",\r\n cursor: \"pointer\",\r\n top: \"0\",\r\n left: \"0\",\r\n right: \"0\",\r\n bottom: \"0\",\r\n \"background-color\": \"white\",\r\n border: \"1px solid #323130\",\r\n \"-webkit-transition\": \".3s\",\r\n transition: \".3s\",\r\n \"border-radius\": switchSize,\r\n\r\n \"&:before\": {\r\n position: \"absolute\",\r\n content: \"' '\",\r\n height: `calc(${switchSize} - 8px)`,\r\n width: `calc(${switchSize} - 8px)`,\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"calc(4px - 1px)\",\r\n bottom: \"calc(4px - 1px)\",\r\n \"background-color\": \"#323130\",\r\n \"-webkit-transition\": \".4s\",\r\n transition: \".4s\",\r\n \"border-radius\": \"50%\"\r\n }\r\n },\r\n\r\n /* 'TABS '/ 'TABBAR '*/\r\n \"& .cwt-tabs\": {\r\n margin: \"0 -4px\",\r\n padding: \"0\",\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"list-style\": \"none\",\r\n \"overflow-x\": \"auto\",\r\n \"overflow-y\": \"hidden\",\r\n\r\n // 'Hide scrollbar'\r\n \"-ms-overflow-style\": \"none\",\r\n \"&::-webkit-scrollbar \": {\r\n display: \"none\"\r\n },\r\n \"&:-moz-any(#content,#appcontent) browser\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"-14px !important\",\r\n \"overflow-y\": \"scroll\",\r\n \"margin-bottom\": \"-14px !important\",\r\n \"overflow-x\": \"scroll\"\r\n },\r\n\r\n \"& .cwt-tab-item\": {\r\n padding: \"4px\",\r\n cursor: \"pointer\",\r\n\r\n \"&:hover\": {\r\n \"background-color\": \"rgba(0, 0, 0, .05)\"\r\n }\r\n }\r\n },\r\n\r\n /* 'BUTTON '*/\r\n\r\n \"& .cwt-danger\": {\r\n background: dangerColor,\r\n\r\n \"&:hover\": {\r\n background: dangerFocusColor,\r\n color: neutralLayerCard\r\n }\r\n },\r\n /* 'AVATAR '*/\r\n \"& .cwt-avatar\": {\r\n cursor: \"pointer\",\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n height: avatarSize,\r\n\r\n \"box-sizing\": \"border-box\",\r\n \"object-fit\": \"cover\",\r\n \"border-radius\": \"50%\"\r\n },\r\n\r\n \"& input\": {\r\n font: \"unset\"\r\n },\r\n\r\n // ACCESSIBILITY HELPERS\r\n \"& .cwt-visible-on-focus\": {\r\n display: \"inline-flex !important\",\r\n width: \"0\",\r\n height: \"0\"\r\n },\r\n \"& .cwt-visible-on-focus:focus\": {\r\n width: \"1em\",\r\n background: \"transparent\",\r\n color: neutralForegroundRest,\r\n fill: neutralForegroundRest,\r\n border: \"none\",\r\n height: \"1em\",\r\n \"font-size\": \"16px\",\r\n opacity: \"1.0\",\r\n margin: \"0 3px\",\r\n \"&.mr-12\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"12px\"\r\n }\r\n }\r\n\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillHover, accentFillRest, accentForegroundCut, isDarkMode, neutralFillActive, neutralFillStealthActive, neutralFillStealthHover, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\nimport { avatarPadding, avatarSize, reset } from \"../utils/commonJssConstants\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../utils/enums\";\r\n\r\nexport const mainPadding = 15;\r\nconst overlayZIndex = \"99999\"; // for comments for overaly type and floating buttons\r\n\r\nexport const CommentStyles = (config: DesignSystem) => ({\r\n commentContainer: {\r\n ...reset,\r\n \"max-width\": \"1024px\",\r\n \"min-width\": \"260px\",\r\n margin: \"32px auto\",\r\n padding: `${mainPadding}px`,\r\n \"box-sizing\": \"border-box\",\r\n border: \"1px solid #F2F2F2\",\r\n \"border-color\": neutralFillActive,\r\n \"border-radius\": \"8px\",\r\n position: \"relative\",\r\n \"scroll-margin-top\": \"9rem\",\r\n\r\n \"&, &:focus\": {\r\n outline: \"none\"\r\n },\r\n\r\n \"&:focus\": {\r\n outline: \"none\"\r\n },\r\n\r\n /* CONTENT DISABLED MESSAGE */\r\n \"& .cwt-content-disabled-container\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"stretch\",\r\n\r\n \"& .cwt-avatar-container\": {\r\n position: \"relative\",\r\n display: \"flex\",\r\n margin: applyLocalizedProperty(\"0 13px 0 0\", \"0 0 0 13px\", config.direction),\r\n padding: \"3px 0\",\r\n\r\n \"& .cwt-commentbox-avatar\": {\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n height: avatarSize,\r\n \"border-radius\": \"50%\"\r\n }\r\n },\r\n\r\n \"& .cwt-col-stretch\": {\r\n width: \"100%\"\r\n }\r\n },\r\n\r\n \"& .compact-floating-button\": {\r\n position: \"fixed\",\r\n \"z-index\": overlayZIndex,\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"40px\",\r\n bottom: \"45px\"\r\n },\r\n\r\n // 'ROOT PAGINATION'\r\n \"& .cwt-show-more-comments-btn\": {\r\n margin: \"-4px 0 0px\",\r\n \"font-weight\": \"600\",\r\n color: accentFillRest,\r\n fill: \"currentColor\",\r\n opacity: \"1\",\r\n\r\n \"& .cwt-icon-label\": {\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest\r\n }\r\n },\r\n\r\n \"& .cwt-show-comments-btn\": {\r\n display: \"inline-flex\",\r\n padding: \"4px\",\r\n margin: \"-4px\",\r\n \"font-size\": \"13px\",\r\n \"font-weight\": \"500\",\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest,\r\n fill: \"currentColor\",\r\n opacity: \"1\",\r\n \"border-radius\": \"4px\",\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthHover\r\n },\r\n\r\n \"&.previous\": {\r\n \"margin-top\": \"20px\"\r\n },\r\n \"&.more\": {\r\n \"margin-bottom\": \"20px\"\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest\r\n }\r\n },\r\n\r\n /* 'JOIN-THE-CONVERSATION BUTTON '*/\r\n \"& .cwt-join-conversation-container\": {\r\n display: \"flex\",\r\n \"justify-content\": \"center\",\r\n\r\n \"& .cwt-link\": {\r\n width: \"80vw\",\r\n \"max-width\": \"480px\",\r\n padding: \"12px\",\r\n \"text-align\": \"center\",\r\n \"font-size\": \"16px\",\r\n \"font-weight\": \"600\",\r\n background: neutralLayerCard,\r\n color: isDarkMode(config) ? \"#5CB6FF\" :accentFillRest,\r\n border: \"1px solid \",\r\n \"border-color\": accentFillRest,\r\n \"border-radius\": \"2px\",\r\n transition: \"all .3s ease\",\r\n\r\n \"&:hover\": {\r\n color: \"white\",\r\n background: accentFillHover\r\n }\r\n }\r\n },\r\n\r\n // Compact floating button\r\n \"& .cwt-compact-cta-button\": {\r\n \"font-weight\": \"600\",\r\n padding: \"10px 40px\",\r\n \"max-width\": \"unset\",\r\n height: \"auto\",\r\n \"& .cwt-icon\": {\r\n \"font-size\": \"18px\",\r\n color: \"white\",\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"16px\",\r\n padding: \"0\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"10px\",\r\n color: \"white\"\r\n }\r\n }\r\n },\r\n\r\n // Overlay floating button\r\n \"& button.cwt-fast-button.cwt-overlay-cta-button\": {\r\n padding: \"12px 15px\",\r\n height: \"auto\",\r\n \"box-shadow\": \"0px 1.2px 3.6px rgba(0, 0, 0, 0.1), 0px 6.4px 14.4px rgba(0, 0, 0, 0.13)\",\r\n position: \"fixed\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"25px\",\r\n bottom: \"45px\",\r\n \"border-radius\": \"71px\",\r\n \"&:hover, &:focus\": {\r\n \"box-shadow\": \"0px 1.2px 3.6px rgba(0, 0, 0, 0.05), 0px 2.4px 6.4px rgba(0, 0, 0, 0.13)\"\r\n },\r\n \"& .cwt-icon\": {\r\n \"font-size\": \"20px\",\r\n \"font-weight\": \"bold\",\r\n \"align-items\": \"flex-end\",\r\n color: accentForegroundCut,\r\n \"& .cwt-icon-label\": {\r\n color: accentForegroundCut,\r\n \"line-height\": \"24px\"\r\n }\r\n },\r\n \"&.cwt-overlay-cta-button-desktop\": {\r\n height: \"69px\",\r\n padding: \"0 28px\",\r\n \"& .cwt-icon\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"15px\",\r\n \"font-weight\": \"normal\",\r\n \"& .cwt-icon-label\": {\r\n display: \"block\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"-8px\"\r\n }\r\n }\r\n }\r\n },\r\n\r\n [`&.${enums.responsiveLevels.L0}`]: {\r\n \"max-width\": \"100vw\"\r\n },\r\n\r\n [`&.${enums.responsiveLevels.MobilePopup}`]: {\r\n \"scroll-margin-top\": \"6rem\",\r\n \"margin-left\": \"10px\",\r\n \"margin-right\": \"10px\",\r\n \"& button.cwt-fast-button.cwt-overlay-cta-button\": {\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"50%\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"unset\",\r\n transform: applyLocalizedProperty(\"translateX(-50%)\", \"translateX(50%)\", config.direction),\r\n \"& .cwt-icon\": {\r\n \"& .cwt-icon-label\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"5px\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n commentMinimalContainer: {\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n margin: \"32px 5px\",\r\n padding: \"0 15px 0\",\r\n \"box-shadow\": \"0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13)\",\r\n background: isDarkMode(config) ? \"rgb(66, 66, 66)\" : \"white\",\r\n border: \"none\",\r\n \"& .cwt-content-disabled-container\": {\r\n padding: \"20px\"\r\n },\r\n \"& ul, li\": {\r\n margin: \"0px\"\r\n },\r\n \"& .cwt-join-container\": {\r\n margin: \"0 -15px\",\r\n\r\n \"& button.cwt-fast-button.cwt-compact-cta-button\": {\r\n width: \"100%\",\r\n \"padding-left\": \"0\",\r\n \"padding-right\": \"0\"\r\n }\r\n },\r\n \"& .cwt-message\": {\r\n \"max-height\": \"44px\",\r\n overflow: \"hidden\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n transition: \"background-position 0.2s ease-in, opacity 0.1s linear 0.1s\",\r\n width: \"100%\",\r\n height: \"60%\",\r\n position: \"absolute\",\r\n background: isDarkMode(config) ? \"linear-gradient(180deg, rgba(66, 66, 66, 0), rgba(66, 66, 66, 1))\" : \"linear-gradient(180deg, rgba(255, 255, 255, 0), #FFFFFF)\",\r\n \"background-repeat\": \"no-repeat\",\r\n opacity: \"100%\",\r\n \"z-index\": \"1\",\r\n left: \"0\",\r\n right: \"0\",\r\n bottom: \"44px\"\r\n },\r\n \"&:hover:before\": {\r\n cursor: \"pointer\",\r\n \"background-position\": \"0px 100px\",\r\n opacity: \"0%\"\r\n },\r\n\r\n [`&.${enums.responsiveLevels.MobilePopup}`]: {\r\n \"margin-left\": \"0\",\r\n \"margin-right\": \"0\",\r\n \"border-radius\": \"0\",\r\n \"box-shadow\": \"none\"\r\n }\r\n },\r\n commentZeroStateContainer: {\r\n padding: \"24px\",\r\n border: \"1px solid\",\r\n \"border-color\": neutralFillStealthHover,\r\n background: isDarkMode(config) ? \"rgb(66, 66, 66)\" : \"white\",\r\n display: \"flex\",\r\n \"flex-direction\": \"row\",\r\n \"justify-content\": \"space-between\",\r\n \"align-items\": \"center\",\r\n \"border-radius\": \"8px\",\r\n [`&.${enums.responsiveLevels.MobilePopup}`]: {\r\n \"padding-left\": \"0\",\r\n \"padding-right\": \"0\",\r\n \"margin-left\": \"0\",\r\n \"margin-right\": \"0\",\r\n \"border-top\": \"1px solid\",\r\n \"border-bottom\": \"1px solid\",\r\n \"border-color\": neutralFillActive,\r\n \"border-radius\": \"0\",\r\n \"flex-direction\": \"column\",\r\n \"justify-content\": \"start\",\r\n \"align-items\": \"center\",\r\n \"box-shadow\": \"none\",\r\n \"& button.cwt-start-button\": {\r\n \"margin-top\": \"5px\"\r\n }\r\n }\r\n },\r\n commentOverlayContainer: {\r\n position: \"fixed\",\r\n \"z-index\": overlayZIndex,\r\n background: neutralLayerCard,\r\n border: \"none\",\r\n top: \"0\",\r\n margin: \"0 auto\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"100vw\",\r\n width: \"550px\",\r\n height: \"100vh\",\r\n overflow: \"auto\",\r\n transition: \".2s ease-in\",\r\n \"& .cwt-close-button\": {\r\n \"z-index\": \"1\",\r\n position: \"fixed\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"32px\",\r\n top: \"18px\",\r\n \"& .cwt-icon\": {\r\n color: isDarkMode(config) ? \"white\" :\"black\",\r\n \"font-size\": \"16px\"\r\n }\r\n },\r\n \"& .cwt-avatar-container\": {\r\n height: \"32px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"10px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-13px\",\r\n \"& .cwt-avatar\": {\r\n \"min-width\": \"32px\",\r\n \"max-width\": \"32px\",\r\n height: \"32px\",\r\n \"border-radius\": \"50%\",\r\n border: \"1px solid white\"\r\n }\r\n },\r\n [`&.${enums.responsiveLevels.MobilePopup}`]: {\r\n margin: \"0\",\r\n width: \"100vw\",\r\n \"& .overlay-title-container\": {\r\n position: \"sticky\",\r\n \"z-index\": \"3\",\r\n top: `-${mainPadding}px`,\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n width: \"calc(100vw - 38px)\",\r\n \"margin-top\": `-${mainPadding}px`,\r\n \"margin-bottom\": \"30px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: `-${mainPadding}px`,\r\n padding: \"20px 8px 16px\",\r\n [applyLocalizedProperty(\"padding-right\", \"padding-left\", config.direction)]: \"30px\",\r\n background: neutralFillStealthActive,\r\n \"border-bottom\": \"1px solid\",\r\n \"border-color\": neutralFillActive,\r\n \"& .cwt-image-container\": {\r\n \"min-width\": \"40px\",\r\n width: \"40px\",\r\n height: \"40px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"12px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"16px\",\r\n \"& .cwt-content-image\": {\r\n \"object-fit\": \"cover\",\r\n \"border-radius\": \"2px\"\r\n }\r\n },\r\n \"& button.cwt-fast-button.cwt-navbar-button\": {\r\n padding: \"4px\",\r\n \"& .cwt-icon\": {\r\n color: neutralForegroundRest,\r\n \"font-size\": \"16px\"\r\n }\r\n },\r\n \"& .cwt-title\": {\r\n display: \"-webkit-box\",\r\n \"-webkit-line-clamp\": \"2\",\r\n \"-webkit-box-orient\": \"vertical\",\r\n overflow: \"hidden\",\r\n \"text-overflow\": \"ellipsis\",\r\n \"font-weight\": \"600\",\r\n \"line-height\": \"24px\",\r\n color: neutralForegroundRest\r\n }\r\n }\r\n }\r\n },\r\n\r\n commentOverlayActiveContainer: {\r\n padding: \"12px 32px\",\r\n \"box-shadow\": \"0px 9px 20px rgba(0, 0, 0, 0.12)\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"calc(100% - 550px)\",\r\n [`&.${enums.responsiveLevels.MobilePopup}`]: {\r\n padding: \"15px 15px 45px\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"0\"\r\n },\r\n \"& $commentItemContainer\": {\r\n \"&.cwt-specific-comment\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-32px !important\",\r\n \"padding-left\": \"32px !important\",\r\n \"padding-right\": \"32px !important\",\r\n \"&.cwt-specific-reply\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: `calc(0px - (${avatarPadding} + 32px)) !important`,\r\n [applyLocalizedProperty(\"padding-left\", \"padding-right\", config.direction)]: `calc(${avatarPadding} + 32px) !important`\r\n }\r\n }\r\n }\r\n },\r\n\r\n buttonFadeInContainer: {\r\n animation: \"button-fade-in .4s ease\",\r\n \"-webkit-animation-fill-mode\": \"forwards\"\r\n },\r\n\r\n buttonFadeOutContainer: {\r\n animation: \"button-fade-out .4s ease\",\r\n \"-webkit-animation-fill-mode\": \"forwards\"\r\n },\r\n\r\n \"@keyframes button-fade-in\": {\r\n from: { bottom: \"-45px\"},\r\n \"90%\": {bottom: \"50px\"},\r\n to: { bottom: \"45px\"}\r\n },\r\n\r\n \"@keyframes button-fade-out\": {\r\n from: { bottom: \"45px\", opacity: \"1\"},\r\n to: { bottom: \"-45px\", opacity: \"0\"}\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, HighContrastColor, accentFillRest, highContrastSelector, isDarkMode, neutralFillActive, neutralFillHover, neutralFillToggleHover, neutralForegroundHint, neutralForegroundRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\n\r\nconst leftRightPadding = \"15px\";\r\nexport const ContentPanelStyles = (config: DesignSystem) => ({\r\n contentPanelContainer: {\r\n margin: `-15px -${leftRightPadding} 0px -${leftRightPadding}`,\r\n \"scroll-margin-top\": \"150px\",\r\n\r\n \"& .cwt-content-panel-header\": {\r\n display: \"flex\",\r\n \"justify-content\": \"space-between\",\r\n color: neutralForegroundHint,\r\n \"border-bottom\": \"1px solid #F1F1F1\",\r\n \"border-color\": neutralFillActive,\r\n padding: `15px ${leftRightPadding} 18px ${leftRightPadding}`,\r\n \"& .cwt-title\": {\r\n margin: \"3.2px 0\",\r\n \"font-size\": \"24px\",\r\n \"font-weight\": \"bold\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-sub-title\": {\r\n margin: \"0 8px\",\r\n \"font-size\": \"13px\",\r\n \"vertical-align\": \"text-bottom\"\r\n }\r\n },\r\n \"& .cwt-beta-badge\": {\r\n display: \"inline-block\",\r\n padding: \"4.8px\",\r\n \"font-size\": \"10px\",\r\n \"font-weight\": \"bold\",\r\n \"line-height\": \"1em\",\r\n background: neutralFillHover,\r\n color: neutralForegroundRest,\r\n \"letter-spacing\": applyLocalizedProperty(\"-.01em\", \"0\", config.direction),\r\n \"border-radius\": \"4px\",\r\n height: \"1em\"\r\n },\r\n \"& .cwt-guideline-section\": {\r\n padding: `12px ${leftRightPadding} 22px ${leftRightPadding}`,\r\n display: \"flex\",\r\n \"justify-content\": \"space-between\",\r\n \"& .cwt-main-typing-indicator\": {\r\n height: \"22px\",\r\n \"min-width\": \"60px\"\r\n }\r\n },\r\n \"& .cwt-content-panel-content\": {\r\n padding: `16px ${leftRightPadding} 0px ${leftRightPadding}`,\r\n \"& .cwt-title\": {\r\n \"font-size\": \"20px\",\r\n \"font-weight\": \"600\",\r\n color: neutralForegroundRest,\r\n\r\n \"& .cwt-comment-count\": {\r\n \"font-weight\": \"normal\",\r\n color: neutralFillToggleHover\r\n }\r\n }\r\n },\r\n \"& .cwt-content-panel-footer\": {\r\n \"& .cwt-guidelines-message\": {\r\n \"font-size\": \"13px\",\r\n color: neutralForegroundHint,\r\n\r\n \"& .cwt-link\": {\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest\r\n }\r\n }\r\n }\r\n },\r\n\r\n contentPanelZeroStateContainer: {\r\n margin: `-${leftRightPadding}`,\r\n \"& .cwt-content-panel-header\": {\r\n margin: \"0px\",\r\n border: \"0px\"\r\n }\r\n },\r\n\r\n contentPanelMinimalStateContainer: {\r\n position: \"absolute\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"16px\",\r\n top: \"14px\",\r\n display: \"flex\",\r\n \"scroll-margin-top\": \"150px\",\r\n \"& .cwt-beta-badge\": {\r\n display: \"inline-block\",\r\n padding: \"4.8px\",\r\n \"font-size\": \"10px\",\r\n \"font-weight\": \"bold\",\r\n \"line-height\": \"1em\",\r\n background: neutralFillActive,\r\n color: neutralForegroundRest,\r\n \"letter-spacing\": applyLocalizedProperty(\"-.01em\", \"0\", config.direction),\r\n \"border-radius\": \"4px\",\r\n height: \"1em\"\r\n }\r\n },\r\n contentPanelOverlayContainer: {\r\n \"& .cwt-beta-badge\": {\r\n display: \"none\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\nimport { avatarSize, dangerColor } from \"../../utils/commonJssConstants\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst inputBorderColor = \"#DDDDDD\";\r\nconst inputShadowColor = \"rgba(0, 0, 0, 0.02)\";\r\nconst inputShadowFocusColor = \"rgba(0, 0, 0, 0.08)\";\r\nconst placeholderColor = \"#717272\";\r\nconst clearInputIconColor = \"#919191\";\r\nconst inReviewMarkColor = \"#FFB900\";\r\nconst notAllowMarkColor = \"#E22C3B\";\r\nconst markSize = 20;\r\n\r\nexport const CommentBoxStyles = (config: DesignSystem) => ({\r\n commentForm: {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n margin: \"0\",\r\n\r\n \"& a.disabled\": {\r\n \"pointer-events\": \"none\",\r\n cursor: \"default\"\r\n },\r\n\r\n \"& .cwt-comment-box-container\": {\r\n display: \"flex\",\r\n \"align-items\": \"flex-start\",\r\n position: \"relative\",\r\n width: \"100%\",\r\n margin: \"0\",\r\n padding: \"0\",\r\n \"border-radius\": \"4px\",\r\n\r\n \"& .cwt-avatar-container\": {\r\n position: \"relative\",\r\n display: \"flex\",\r\n margin: applyLocalizedProperty(\"0 13px 0 0\", \"0 0 0 13px\", config.direction),\r\n padding: \"3px 0\",\r\n height: avatarSize,\r\n\r\n \"& .cwt-commentbox-avatar\": {\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n height: avatarSize,\r\n \"border-radius\": \"50%\"\r\n },\r\n\r\n \"& .cwt-status-mark\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n position: \"absolute\",\r\n bottom: (-markSize/4)+\"px\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: (-markSize/4)+\"px\",\r\n width: markSize+\"px\",\r\n height: markSize+\"px\",\r\n color: neutralLayerCard,\r\n \"border-radius\": \"50%\",\r\n border: \"2px solid \",\r\n \"border-color\": neutralLayerCard,\r\n\r\n \"&.cwt-inreview\": {\r\n background: inReviewMarkColor\r\n },\r\n\r\n \"&.cwt-notallow\": {\r\n background: notAllowMarkColor\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-comment-box\": {\r\n overflow: \"auto\",\r\n width: \"calc(100% - 90px)\",\r\n \"max-height\": \"480px\",\r\n padding: \"12px 16px 11px\",\r\n \"font-size\": \"16px\",\r\n \"line-height\": \"20px\",\r\n background: neutralLayerCard,\r\n color: neutralForegroundRest,\r\n border: \"1px solid \",\r\n \"border-color\": inputBorderColor,\r\n \"border-radius\": \"8px\",\r\n \"-webkit-box-shadow\": \"0px 4px 4px \" + inputShadowColor,\r\n \"-moz-box-shadow\": \"0px 4px 4px \" + inputShadowColor,\r\n \"box-shadow\": \"0px 4px 4px \" + inputShadowColor,\r\n \"vertical-align\": \"bottom\",\r\n \"overflow-wrap\": \"anywhere\",\r\n \"&.cwt-warning\": {\r\n border: \"1px solid \",\r\n \"border-color\": notAllowMarkColor\r\n },\r\n // Make it always selectable\r\n \"-webkit-touch-callout\": \"default\",\r\n \"-webkit-user-select\": \"auto\",\r\n \"-khtml-user-select\": \"auto\",\r\n \"-moz-user-select\": \"auto\",\r\n \"-ms-user-select\": \"auto\",\r\n \"user-select\": \"auto\",\r\n\r\n // 'Hide scrollbar'\r\n \"-ms-overflow-style\": \"none\",\r\n \"&::-webkit-scrollbar \": {\r\n display: \"none\"\r\n },\r\n\r\n \"&:focus\": {\r\n \"-webkit-box-shadow\": \"0px 3px 8px \" + inputShadowFocusColor,\r\n \"-moz-box-shadow\": \"0px 3px 8px \" + inputShadowFocusColor,\r\n \"box-shadow\": \"0px 3px 8px \" + inputShadowFocusColor,\r\n \"-webkit-tap-highlight-color\": \"rgba(255, 255, 255, 0) !important;\",\r\n outline: \"none\"\r\n },\r\n\r\n \"&:empty\": {\r\n display: \"block\",\r\n \"&:before\": {\r\n content: \"attr(placeholder)\",\r\n \"pointer-events\": \"none\",\r\n display: \"block\",\r\n color: placeholderColor,\r\n \"line-height\": \"21px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"60px\"\r\n }\r\n },\r\n\r\n \"&:not(:empty)\": {\r\n \"&:after \": {\r\n content: \"''\",\r\n float: applyLocalizedProperty(\"right\", \"left\", config.direction),\r\n display: \"block\",\r\n height: \"1.325em\",\r\n width: \"56px\"\r\n },\r\n\r\n \"& .cwt-name.cwt-link\": {\r\n \"font-weight\": \"normal\",\r\n\r\n \"&:before\": {\r\n content: \"'@'\"\r\n }\r\n }\r\n },\r\n\r\n '&:not([contentEditable=\"true\"])': {\r\n \"font-style\": \"italic\",\r\n color: \"rgba(26, 26, 26, 0.75)\",\r\n\r\n \"& .cwt-icon-vector\": {\r\n fill: neutralForegroundHint\r\n },\r\n\r\n \"&:empty \": {\r\n \"&:before \": {\r\n content: \"attr(placeholder)\",\r\n \"pointer-events\": \"none\",\r\n display: \"block\",\r\n color: placeholderColor\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-button-container\": {\r\n position: \"absolute\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"2px\",\r\n bottom: \"0\",\r\n height: \"46px\",\r\n padding: \"0 8px\",\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n\r\n \"& .cwt-link\": {\r\n margin: \"0 8px\",\r\n \"font-size\": \"13px\",\r\n \"font-weight\": \"500\",\r\n color: accentFillRest\r\n },\r\n\r\n \"& .cwt-submit-comment-btn\": {\r\n \"& .cwt-icon\": {\r\n color: accentFillRest\r\n },\r\n\r\n \"&:hover\": {\r\n \"& .cwt-icon\": {\r\n color: \"#0b93ff\"\r\n }\r\n }\r\n },\r\n \"& .cwt-clear-comment-btn\": {\r\n \"& .cwt-icon\": {\r\n color: clearInputIconColor\r\n },\r\n\r\n \"&:hover\": {\r\n \"& .cwt-icon\": {\r\n color: neutralForegroundHint\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"& .cwt-character-remaining-msg\": {\r\n margin: \"6px 12px\",\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"flex-end\",\r\n \"font-size\": \"12px\",\r\n color: dangerColor\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, isDarkMode, neutralFillActive, neutralForegroundHint, neutralForegroundRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport {\r\n primaryTextColor\r\n} from \"../../utils/commonJssConstants\";\r\n\r\nexport const CommentListStyles = (config: DesignSystem) => ({\r\n commentListHeader: {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"space-between\",\r\n margin: \"24px 0 4px\",\r\n padding: \"24px 0 0\",\r\n \"border-top\": \"1px solid #DDDDDD\",\r\n \"border-color\": neutralFillActive,\r\n\r\n \"& .cwt-feedback-btn\": {\r\n \"font-size\": \"14px\",\r\n color: neutralForegroundHint,\r\n fill: \"currentColor\",\r\n\r\n \"&:hover\": {\r\n color: primaryTextColor,\r\n fill: \"currentColor\"\r\n }\r\n }\r\n },\r\n commentListContent: {\r\n padding: \"0\",\r\n color: neutralForegroundRest,\r\n \"list-style\": \"none\",\r\n \"margin-top\": \"16px\",\r\n \"margin-bottom\": \"16px\"\r\n },\r\n\r\n commentListContentBlury: {\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n padding: \"0 10px\",\r\n margin: \"0\",\r\n\r\n \"&:before\": {\r\n content: \"''\",\r\n transition: \"background-position 0.2s ease-in, opacity 0.1s linear 0.1s\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n position: \"absolute\",\r\n background: isDarkMode(config) ? \"linear-gradient(180deg, rgba(66, 66, 66, 0), rgba(66, 66, 66, 1))\" : \"linear-gradient(180deg, rgba(255, 255, 255, 0), #FFFFFF)\",\r\n \"background-repeat\": \"no-repeat\",\r\n opacity: \"100%\",\r\n \"z-index\": \"1\"\r\n },\r\n \"&:hover:before\": {\r\n cursor: \"pointer\",\r\n \"background-position\": \"0px 100px\",\r\n opacity: \"0%\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, isDarkMode, neutralFillActive, neutralForegroundHint, neutralForegroundRest } from \"@microsoft/fast-components-styles-msft\";\r\nimport {\r\n avatarPadding,\r\n commentVPadding,\r\n highContrastButton,\r\n mainFontSize,\r\n mainLineHeight\r\n} from \"../../utils/commonJssConstants\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { mainPadding as mainCommentPadding } from \"../Comment.styles\";\r\n\r\nconst messageMaxClampedLines = 4;\r\n\r\nexport const CommentItemStyles = (config: DesignSystem) => ({\r\n commentItemContainer: {\r\n position: \"relative\",\r\n width: \"100%\",\r\n padding: commentVPadding + \" 0\",\r\n border: \"none\",\r\n \"border-top\": \"1px solid #DDDDDD\",\r\n \"border-color\": neutralFillActive,\r\n\r\n \"&:first-child\": {\r\n border: \"none\"\r\n },\r\n\r\n \"& .cwt-comment-box-container\": {\r\n margin: commentVPadding + \" 0 0\"\r\n },\r\n\r\n \"& .cwt-comment-content\": {\r\n margin: \"0\",\r\n width: \"inherit\",\r\n\r\n \"& .cwt-avatar\": {\r\n float: applyLocalizedProperty(\"left\", \"right\", config.direction),\r\n position: \"relative\",\r\n \"z-index\": \"2\"\r\n },\r\n\r\n \"& .cwt-inner-content\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: avatarPadding\r\n },\r\n\r\n \"& .cwt-header\": {\r\n margin: \"0\",\r\n padding: \"0\",\r\n\r\n \"& .dot-before::before\": {\r\n opacity: \".8\"\r\n },\r\n \"& .cwt-posted-at\": {\r\n color: neutralForegroundHint,\r\n \"font-size\": mainFontSize\r\n }\r\n },\r\n \"& .cwt-name\": {\r\n \"font-size\": mainFontSize,\r\n \"font-weight\": \"600\",\r\n color: neutralForegroundRest,\r\n\r\n \"&.cwt-link\": {\r\n \"line-height\": mainLineHeight,\r\n height: mainLineHeight,\r\n display: \"inline-flex\",\r\n overflow: \"hidden\",\r\n \"text-overflow\": \"ellipsis\",\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest\r\n }\r\n },\r\n \"& .cwt-deleted-name\": {\r\n \"font-weight\": \"600\"\r\n },\r\n \"& .cwt-message\": {\r\n padding: \"0\",\r\n margin: \"3px 0 2px\",\r\n \"font-size\": \"16px\",\r\n \"line-height\": mainLineHeight,\r\n background: \"none\",\r\n border: \"none\",\r\n \"word-break\": \"break-word\",\r\n\r\n \"& .cwt-name.cwt-link\": {\r\n \"font-weight\": \"normal\",\r\n display: \"inline\",\r\n\r\n \"&:before\": {\r\n content: \"'@'\"\r\n }\r\n },\r\n\r\n \"& .cwt-comment-deleted-message\": {\r\n display: \"inline\",\r\n \"font-style\": \"italic\",\r\n color: neutralForegroundHint,\r\n\r\n \"& .cwt-icon\": {\r\n margin: \"-4px 4px 0\",\r\n color: neutralForegroundHint,\r\n fill: neutralForegroundHint,\r\n display: \"inline-flex\",\r\n \"vertical-align\": \"middle\"\r\n }\r\n },\r\n\r\n \"& > .cwt-clamp\": {\r\n display: \"-webkit-box\",\r\n \"-webkit-line-clamp\": messageMaxClampedLines,\r\n \"-webkit-box-orient\": \"vertical\",\r\n overflow: \"hidden\"\r\n },\r\n\r\n \"& .cwt-show-clamped-btn\": {\r\n color: accentFillRest,\r\n \"font-size\": \"12px\"\r\n }\r\n },\r\n \"& .cwt-footer\": {\r\n position: \"relative\",\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"min-height\": \"20px\",\r\n \"font-size\": \"12px\",\r\n margin: \"11px 0 0\",\r\n color: \"black\",\r\n\r\n \"& .cwt-thread-locked-message\": {\r\n \"letter-spacing\": applyLocalizedProperty(\"-.25pt\", \"0\", config.direction),\r\n fill: \"#09664f\"\r\n },\r\n\r\n \"& .cwt-report-btn\": {\r\n \"font-size\": \"16px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"auto\",\r\n color: neutralForegroundHint,\r\n fill: \"currentColor\",\r\n\r\n '&[data-is-active=\"true\"]': {\r\n color: accentFillRest\r\n },\r\n\r\n \"&:hover, &:focus \": {\r\n color: \"#5CB6FF\",\r\n \"& .cwt-icon-label\": {\r\n color: \"#5CB6FF\"\r\n },\r\n ...highContrastButton\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"13px\",\r\n color: neutralForegroundHint\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"&&.cwt-specific-comment\": {\r\n \"background-color\": isDarkMode(config) ? \"#323232\" : \"#F7F7F7\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: `calc(0px - ${mainCommentPadding}px)`,\r\n \"padding-right\": `${mainCommentPadding}px`,\r\n \"padding-left\": `${mainCommentPadding}px`,\r\n \"&.cwt-specific-reply\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: `calc(0px - (${avatarPadding} + ${mainCommentPadding}px))`,\r\n [applyLocalizedProperty(\"padding-left\", \"padding-right\", config.direction)]: `calc(${avatarPadding} + ${mainCommentPadding}px)`\r\n }\r\n },\r\n\r\n \"&:last-child\": {\r\n \"& .cwt-comment:last-child\": {\r\n border: \"none\",\r\n \"padding-bottom\": \"0\"\r\n }\r\n }\r\n },\r\n\r\n commentItemDeleteMenuPopover: {\r\n bottom: \"16px\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"0\"\r\n },\r\n\r\n commentItemFooterTwoLines: {\r\n \"& .cwt-comment-content\": {\r\n \"& .cwt-footer\": {\r\n \"flex-wrap\": \"wrap\",\r\n\r\n \"& .cwt-reaction-counts\": {\r\n padding: \"0 0 11px 0\"\r\n },\r\n\r\n \"& .cwt-report-btn\": {\r\n \"& .cwt-icon-label\": {\r\n display: \"none\"\r\n }\r\n },\r\n \"& .cwt-line-break\": {\r\n \"flex-basis\": \"100%\",\r\n width: \"0\",\r\n height: \"0\",\r\n overflow: \"hidden\"\r\n }\r\n }\r\n }\r\n },\r\n\r\n commentItemOverlayContainer: {\r\n [`&.${enums.responsiveLevels.MobilePopup}`]: {\r\n border: \"none\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillActive, isDarkMode, neutralFillStealthHover } from \"@microsoft/fast-components-styles-msft\";\r\nimport {\r\n commentVPadding,\r\n mainLineHeight\r\n} from \"../../utils/commonJssConstants\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nexport const ReplyListStyles = (config: DesignSystem) => ({\r\n replyListContainer: {\r\n margin: \"4px 0 0\",\r\n \"padding-top\": \"4px\",\r\n \"& .cwt-commenting-disabled-container\": {\r\n width: \"100%\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"0\"\r\n },\r\n \"& .cwt-show-replies-btn\": {\r\n display: \"inline-flex\",\r\n margin: \"-4px\",\r\n padding: \"4px\",\r\n \"font-size\": \"13px\",\r\n \"font-weight\": \"500\",\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillActive,\r\n fill: \"currentColor\",\r\n opacity: \"1\",\r\n \"border-radius\": \"4px\",\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthHover\r\n },\r\n\r\n \"&.cwt-specific-comment-mode\": {\r\n \"margin-top\": \"20px\"\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillActive\r\n }\r\n },\r\n\r\n \"& .cwt-list\": {\r\n padding: \"0\",\r\n margin: \"0\",\r\n\r\n \"& .cwt-comment-form\": {\r\n margin: commentVPadding + \" 0 0\"\r\n },\r\n\r\n \"& > li\": {\r\n padding: commentVPadding + \" 0\",\r\n margin: \"0 0 -1px\",\r\n\r\n \"&:first-child\": {\r\n \"padding-top\": commentVPadding\r\n },\r\n \"&:last-child\": {\r\n \"padding-bottom\": \"0\"\r\n },\r\n\r\n \"& .cwt-comment-content\": {\r\n \"& .cwt-avatar\": {\r\n \"margin-top\": \"0\"\r\n },\r\n \"& .cwt-message\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"1px\",\r\n padding: \"inherit\",\r\n \"font-size\": \"inherit\",\r\n \"line-height\": mainLineHeight,\r\n background: \"inherit\",\r\n border: \"inherit\"\r\n },\r\n \"& .cwt-footer\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"0\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst avatarSize = \"57px\";\r\n\r\nexport const UserCardStyles = (config: DesignSystem) => ({\r\n userCardContainer: {\r\n position: \"absolute\",\r\n \"z-index\": \"9999999999\",\r\n display: \"flex\",\r\n padding: \"8px\",\r\n background: neutralLayerCard,\r\n color: neutralForegroundRest,\r\n \"border-radius\": \"4px\",\r\n \"-webkit-box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.2), 0px 1.6px 12px rgba(0, 0, 0, 0.2)\",\r\n \"-moz-box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.2), 0px 1.6px 12px rgba(0, 0, 0, 0.2)\",\r\n \"box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.2), 0px 1.6px 12px rgba(0, 0, 0, 0.2)\",\r\n\r\n \"& .cwt-avatar\": {\r\n height: avatarSize,\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n margin: \"6px 8px\"\r\n },\r\n\r\n \"& .cwt-user-info\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"min-width\": \"250px\",\r\n margin: \"6px 8px\",\r\n\r\n \"& .cwt-user-header\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"space-between\",\r\n\r\n \"& .cwt-name.cwt-link\": {\r\n \"font-size\": \"20px\",\r\n \"font-weight\": \"600\",\r\n color: neutralForegroundRest\r\n }\r\n },\r\n\r\n \"& .cwt-user-stats\": {\r\n display: \"flex\",\r\n \"margin-top\": \"12px\",\r\n\r\n \"& .cwt-stat\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"flex-start\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"36px\",\r\n\r\n \"&:first-child\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\"\r\n },\r\n\r\n \"& h6\": {\r\n \"font-size\": \"13px\",\r\n \"font-weight\": \"normal\",\r\n opacity: \".65\"\r\n },\r\n\r\n \"& .cwt-stat-counter\": {\r\n \"margin-top\": \"4px\",\r\n \"font-size\": \"13px\",\r\n \"font-weight\": \"600\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n\r\n userCardPopover: {\r\n \"z-index\": \"25000 !important\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { getEmojiStylesByWidth } from \"../../utils/emojiIcons\";\r\n\r\nexport const MiniReactionBreakdownStyles = (config: DesignSystem) => ({\r\n miniReactionBreakdownContainer: {\r\n \"pointer-events\": \"none\",\r\n display: \"flex !important\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n padding: \"6px 8px\",\r\n background: neutralLayerCard,\r\n \"border-radius\": \"32px\",\r\n \"-webkit-box-shadow\": \"0px 3.2px 7.2px rgba(0, 0, 0, 0.13), 0px 0.6px 1.8px rgba(0, 0, 0, 0.1)\",\r\n \"-moz-box-shadow\": \"0px 3.2px 7.2px rgba(0, 0, 0, 0.13), 0px 0.6px 1.8px rgba(0, 0, 0, 0.1)\",\r\n \"box-shadow\": \"0px 3.2px 7.2px rgba(0, 0, 0, 0.13), 0px 0.6px 1.8px rgba(0, 0, 0, 0.1)\",\r\n\r\n \"& div.emoji-icon\": {\r\n ...getEmojiStylesByWidth(16),\r\n transition: \"none\"\r\n },\r\n\r\n \"& i.cwt-icon.cwt-count-icons\": {\r\n display: \"flex\",\r\n margin: \"0 0 !important\",\r\n padding: \"2px 2px !important\",\r\n \"font-size\": \"18px\",\r\n color: neutralForegroundRest,\r\n\r\n \"&:last-child\": {\r\n \"margin-bottom\": \"0 !important\"\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"14px\",\r\n \"font-weight\": \"normal\"\r\n }\r\n }\r\n },\r\n\r\n miniReactionBreakdownPopover: {\r\n top: \"-48px\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"-50%\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const PopoverStyles = (config: DesignSystem) => ({\r\n popoverContainer: {\r\n display: \"inline\",\r\n position: \"relative\",\r\n\r\n \"& .cwt-popover-overlay\": {\r\n position: \"absolute\",\r\n \"z-index\": \"-1\",\r\n background: \"transparent\",\r\n width: \"calc(100% + 8px)\",\r\n height: \"calc(100% + 8px)\",\r\n top: \"-4px\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"-4px\"\r\n },\r\n\r\n \"& .cwt-popover-content\": {\r\n position: \"absolute\",\r\n \"z-index\": \"99999999999\",\r\n opacity: \"0\",\r\n \"&[data-show]\": {\r\n opacity: \"1\"\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { ZIndex } from \"@msnews/core\";\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { getEmojiStylesByWidth } from \"../../utils/emojiIcons\";\r\n\r\nexport const ReactionMenuStyles = (config: DesignSystem) => ({\r\n reactionMenuContainer: {\r\n display: \"flex !important\",\r\n \"align-items\": \"flex-start\",\r\n \"justify-content\": \"center\",\r\n padding: \"6px 13px 0\",\r\n position: \"absolute\",\r\n height: \"42px\",\r\n background: neutralLayerCard,\r\n \"border-radius\": \"32px\",\r\n \"-webkit-box-shadow\": \"0px 3.2px 7.2px rgba(0, 0, 0, 0.13), 0px 0.6px 1.8px rgba(0, 0, 0, 0.1)\",\r\n \"-moz-box-shadow\": \"0px 3.2px 7.2px rgba(0, 0, 0, 0.13), 0px 0.6px 1.8px rgba(0, 0, 0, 0.1)\",\r\n \"box-shadow\": \"0px 3.2px 7.2px rgba(0, 0, 0, 0.13), 0px 0.6px 1.8px rgba(0, 0, 0, 0.1)\",\r\n animation: \"reaction-menu-fade-in .2s ease-out\",\r\n \"-webkit-animation-fill-mode\": \"forwards\",\r\n\r\n \"& div.emoji-icon\": {\r\n ...getEmojiStylesByWidth(16),\r\n transition: \"none\"\r\n },\r\n\r\n \"& > .cwt-icon\": {\r\n position: \"relative\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n margin: \"0 0 !important\",\r\n padding: \"4px !important\",\r\n \"font-size\": \"18px\",\r\n\r\n \"& div.emoji-icon\": {\r\n ...getEmojiStylesByWidth(28),\r\n transition: \"ease-out .15s\",\r\n width: \"28px\"\r\n },\r\n\r\n \"&:hover div.emoji-icon, &:focus div.emoji-icon, &.touchFocused div.emoji-icon\": {\r\n transform: \"scale(1.285) translateY(-4px)\"\r\n },\r\n\r\n \"&:hover:before, &:focus:before, &.touchFocused:before\": {\r\n position: \"absolute\",\r\n \"z-index\": ZIndex.Dialog.toString(),\r\n top: \"-28px\",\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n content: \"attr(data-title)\",\r\n \"white-space\": \"nowrap\",\r\n height: \"18px\",\r\n padding: \"0 8px 1px\",\r\n \"font-size\": \"13px\",\r\n \"text-transform\": \"capitalize\",\r\n background: neutralForegroundRest,\r\n color: neutralLayerCard,\r\n \"border-radius\": \"11px\"\r\n }\r\n }\r\n },\r\n\r\n reactionMenuPopover: {\r\n top: \"-46px\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"-10px\",\r\n \"padding-bottom\": \"4px\"\r\n },\r\n\r\n \"@keyframes reaction-menu-fade-in\": {\r\n from: { top: \"-6px\", opacity: \"0\" },\r\n to: { top: \"-13px\", opacity: \"1\" }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, isDarkMode, neutralForegroundHint } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { getEmojiStylesByWidth } from \"../../utils/emojiIcons\";\r\n\r\nexport const ReactionPanelStyles = (config: DesignSystem) => ({\r\n reactionPanelContainer: {\r\n \"touch-action\": \"none\",\r\n display: \"flex !important\",\r\n \"align-items\": \"center\",\r\n\r\n \"& div.emoji-icon\": {\r\n ...getEmojiStylesByWidth(16),\r\n transition: \"none\"\r\n },\r\n\r\n \"& > .cwt-icon\": {\r\n \"font-size\": \"16px\",\r\n padding: \"6px\",\r\n margin: applyLocalizedProperty(\"-6px 6px -6px -6px\", \"-6px -6px -6px 6px\", config.direction),\r\n\r\n \"&.cwt-hide\": {\r\n display: \"none\",\r\n \"pointer-events\": \"none\",\r\n \"touch-events\": \"none\"\r\n },\r\n\r\n '&:hover, &[data-has-over=\"true\"]': {\r\n color: isDarkMode ? \"#8D8D8D\" : \"#717272\",\r\n \"& .cwt-icon-label\": {\r\n color: isDarkMode ? \"#8D8D8D\" : \"#717272\"\r\n }\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"13px\",\r\n padding: \"0 6px\"\r\n }\r\n },\r\n\r\n \"& .cwt-reply-btn.cwt-icon\": {\r\n \"& .cwt-icon-vector\": {\r\n \"margin-top\": \"2px\"\r\n }\r\n },\r\n\r\n // 'RATING LABELS'\r\n \"& > .cwt-icon .cwt-icon-label.cwt-red-reaction\": {\r\n color: isDarkMode(config) ? \"#FF948F\" : \"#E02F19\"\r\n },\r\n \"& > .cwt-icon .cwt-icon-label.cwt-yellow-reaction\": {\r\n color: isDarkMode(config) ? \"#FF9333\" : \"#BD5B00\"\r\n },\r\n\r\n [\"&.\" + enums.responsiveLevels.MobilePopup]: {\r\n \"& > .cwt-icon:hover\": {\r\n color: neutralForegroundHint\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFillStealthHover, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nexport const ReportMenuStyles = (config: DesignSystem) => ({\r\n reportMenuContainer: {\r\n width: \"140px\",\r\n height: \"190px\",\r\n padding: \"4px 0 !important\",\r\n \"font-size\": \"14px\",\r\n \"letter-spacing\": applyLocalizedProperty(\"-0.012em\", \"0\", config.direction),\r\n background: neutralLayerCard,\r\n \"border-radius\": \"8px\",\r\n \"box-shadow\": \"0px 0px 5.6px rgba(0, 0, 0, 0.11), 0px 6.4px 14.4px rgba(0, 0, 0, 0.13)\",\r\n \"overflow-y\": \"scroll\",\r\n\r\n \"& li\": {\r\n padding: \"8px 14px !important\",\r\n color: neutralForegroundRest,\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthHover,\r\n cursor: \"pointer\"\r\n }\r\n },\r\n\r\n /* Hide Scrollbars */\r\n \"-ms-overflow-style\": \"none\",\r\n \"&::-webkit-scrollbar \": {\r\n display: \"none\"\r\n },\r\n \"&:-moz-any(#content,#appcontent) browser\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"-14px !important\",\r\n \"overflow-y\": \"scroll\",\r\n \"margin-bottom\": \"-14px !important\",\r\n \"overflow-x\": \"scroll\"\r\n }\r\n },\r\n\r\n reportMenuPopover: {\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"0\",\r\n top: \"10px\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { neutralFillStealthHover, neutralForegroundHint, neutralForegroundRest, neutralLayerCard, DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nexport const SortBoxStyles = (config: DesignSystem) => ({\r\n sortBoxContainer: {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"font-size\": \"14px\",\r\n color: neutralForegroundHint,\r\n cursor: \"pointer\",\r\n\r\n \"& .cwt-sort-value-container\": {\r\n position: \"relative\",\r\n margin: \"0 4px\",\r\n\r\n \"& .cwt-sort-value\": {\r\n display: \"inline-block\",\r\n \"font-weight\": \"bold\",\r\n color: neutralForegroundRest,\r\n fill: neutralForegroundHint,\r\n\r\n \"& .cwt-icon-vector\": {\r\n margin: \"0 2px -2px\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-sort-list\": {\r\n \"min-width\": \"128px\",\r\n margin: \"0\",\r\n padding: \"6px 0\",\r\n background: neutralLayerCard,\r\n border: \"1px solid rgba(0, 0, 0, 0.08)\",\r\n \"border-radius\": \"8px\",\r\n \"box-shadow\": \"0px 4px 24px rgba(0, 0, 0, 0.04)\",\r\n\r\n \"& .cwt-sort-list-item\": {\r\n padding: \"6px 12px\",\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthHover\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n \"font-size\": \"14px\",\r\n\r\n \"& .cwt-icon-label\": {\r\n \"white-space\": \"nowrap\"\r\n },\r\n\r\n \"& .cwt-icon-vector\": {\r\n \"font-size\": \"18px\",\r\n margin: \"-2px 4px\",\r\n fill: \"#107C10\"\r\n }\r\n },\r\n\r\n \"&.active .cwt-icon .cwt-icon-label\": {\r\n color: neutralForegroundRest\r\n }\r\n }\r\n }\r\n },\r\n\r\n sortBoxPopover: {\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"-6px\",\r\n top: \"10px\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillHover, accentFillRest, isDarkMode, neutralForegroundActive, neutralForegroundRest, neutralLayerCard, neutralLayerCardContainer } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../utils/enums\";\r\nimport { profileHrColor } from \"../utils/commonJssConstants\";\r\n\r\nconst bgColor = \"#F4F4F4\";\r\nconst sectionWidth = \"960px\";\r\nconst borderColor = \"#DDDDDD\";\r\nconst tabIconColor = \"#555555\";\r\nconst tabLabelColor = \"#333333\";\r\nconst mobileSidePadding = \"32px\";\r\n\r\nexport const CommunityGuidelineStyles = (config: DesignSystem) => ({\r\n communityGuidelinePageContainer: {\r\n \"padding-bottom\": \"48px\",\r\n background: neutralLayerCardContainer,\r\n \"border-bottom\": \"1px solid \"+borderColor,\r\n\r\n \"& .cwt-link\": {\r\n color: accentFillRest,\r\n\r\n \"&.cwt-big-link\": {\r\n \"font-weight\": \"bold\",\r\n \"text-transform\": \"uppercase\"\r\n }\r\n },\r\n\r\n \"& ul\": {\r\n \"list-style\": \"none\",\r\n padding: \"0\"\r\n },\r\n\r\n \"& .cwt-tab-content\": {\r\n position: \"relative\",\r\n \"min-height\": \"60vh\",\r\n \"margin-top\": \"48px\",\r\n padding: \"0 10px\",\r\n color: neutralForegroundActive\r\n },\r\n\r\n \"& .cwt-profile-tabs\": {\r\n position: \"sticky\",\r\n top: \"0\",\r\n \"z-index\": \"1\",\r\n margin: \"0\",\r\n padding: \"0 18px\",\r\n \"overflow-x\": \"scroll\",\r\n \"list-style\": \"none\",\r\n\r\n // 'Hide scrollbar'\r\n \"-ms-overflow-style\": \"none\",\r\n\r\n \"&::-webkit-scrollbar\": {\r\n display: \"none\"\r\n },\r\n\r\n \"& .cwt-tab-item\": {\r\n position: \"relative\",\r\n padding: \"15px 0\",\r\n color: tabIconColor,\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"24px\",\r\n\r\n \"&:first-child\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\"\r\n },\r\n\r\n \"&.active\": {\r\n color: accentFillRest,\r\n \"font-weight\": \"600\",\r\n\r\n \"&:after\": {\r\n position: \"absolute\",\r\n \"z-index\": \"10\",\r\n content: \"' '\",\r\n height: \"3px\",\r\n width: \"100%\",\r\n \"margin-top\": \"calc(15px - 3px)\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"0\",\r\n background: accentFillRest\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: isDarkMode(config) ? \"#BDDCFF\" : accentFillRest\r\n }\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n color: \"inherit\",\r\n \"white-space\": \"nowrap\",\r\n height: \"18px\"\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: neutralForegroundActive,\r\n \"font-size\": \"13px\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-section\": {\r\n \"max-width\": sectionWidth,\r\n margin: \"0 auto\",\r\n padding: \"0\",\r\n \"font-size\": \"13px\"\r\n },\r\n\r\n \"& .cwt-section-list\": {\r\n \"margin-bottom\": \"32px\"\r\n },\r\n\r\n \"& .cwt-main-header\": {\r\n position: \"relative\",\r\n background: neutralLayerCard,\r\n color: neutralForegroundActive,\r\n \"letter-spacing\": applyLocalizedProperty(\".5pt\", \"0\", config.direction),\r\n padding: \"0 10px\",\r\n\r\n \"& > .cwt-section\": {\r\n position: \"relative\",\r\n padding: \"32px 0 24px\",\r\n\r\n \"& .cwt-title\": {\r\n \"margin-top\": \"24px\",\r\n \"font-size\": \"38px\",\r\n \"font-weight\": \"600\"\r\n },\r\n \"& .cwt-image-title\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n\r\n \"& > .cwt-image\": {\r\n height: \"22px\"\r\n },\r\n\r\n \"& > .cwt-sub-title\": {\r\n margin: \"0 18px\",\r\n \"font-size\": \"11px\",\r\n \"font-weight\": \"bold\",\r\n \"text-transform\": \"uppercase\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-tabs-container\": {\r\n \"border-top\": \"1px solid \",\r\n \"border-color\": profileHrColor\r\n }\r\n },\r\n\r\n \"& .cwt-guideline-section\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n margin: \"28px 0 0\",\r\n \"padding-bottom\": \"42px\",\r\n color: neutralForegroundRest,\r\n \"border-bottom\": \"1px solid \"+borderColor,\r\n\r\n \"& > .cwt-image\": {\r\n width: \"200px\"\r\n },\r\n\r\n \"& > .cwt-content\": {\r\n margin: \"0 48px\",\r\n \"font-size\": \"16px\",\r\n\r\n \"& > .cwt-subject-list > li:before\": {\r\n content: \"'•'\",\r\n margin: \"3px\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-guideline-detail-container\": {\r\n display: \"flex\",\r\n \"justify-content\": \"space-between\",\r\n \"font-size\": \"16px\",\r\n\r\n \"& > .cwt-image\": {\r\n \"max-width\": \"50%\",\r\n margin: \"0 50px\",\r\n \"object-fit\": \"contain\"\r\n },\r\n\r\n \"& .cwt-principles-detail\": {\r\n \"max-width\": \"560px\",\r\n \"& a\": {\r\n color: isDarkMode(config) ? \"#BDDCFF\" : accentFillHover\r\n\r\n }\r\n },\r\n\r\n \"& .cwt-enforcement-detail\": {\r\n \"max-width\": \"640px\"\r\n }\r\n },\r\n\r\n \"& .cwt-inner-nav\": {\r\n \"margin-top\": \"30px\",\r\n\r\n \"& .cwt-buttons\": {\r\n display: \"flex\",\r\n padding: \"7px 0\",\r\n \"flex-wrap\": \"wrap\",\r\n\r\n \"& .cwt-fast-button\": {\r\n \"min-width\": \"130px\",\r\n \"margin-bottom\": \"5px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"9px\"\r\n }\r\n }\r\n },\r\n\r\n /** RESPONSIVE STYLES */\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"& .cwt-title-section\": {\r\n margin: \"0 \"+mobileSidePadding\r\n },\r\n \"& .cwt-tabs-container\": {\r\n padding: \"0 \"+mobileSidePadding\r\n },\r\n\r\n \"& .cwt-guideline-section\": {\r\n \"flex-direction\": \"column\",\r\n\r\n \"& > .cwt-content\": {\r\n padding: \"0 \" + mobileSidePadding,\r\n width: `calc(100% - ${mobileSidePadding} * 2)`\r\n }\r\n },\r\n\r\n \"& .cwt-guideline-detail-container\": {\r\n \"flex-direction\": \"column-reverse\",\r\n \"align-items\": \"center\",\r\n\r\n \"& > .cwt-content\": {\r\n margin: \"0 \"+mobileSidePadding\r\n },\r\n\r\n \"& > .cwt-image\": {\r\n \"max-width\": \"90%\",\r\n width: \"310px\"\r\n }\r\n },\r\n \"& .cwt-tab-content\": {\r\n \"& .cwt-inner-nav\": {\r\n \"& .cwt-buttons\": {\r\n margin: \"0 \" + mobileSidePadding\r\n }\r\n }\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFocus } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../utils/enums\";\r\n\r\nexport const ContentSocialBarStyles = (config: DesignSystem) => ({\r\n contentSocialBarContainer: {\r\n display: \"flex !important\",\r\n \"align-items\": \"center\",\r\n margin: \"8px 3px 0\",\r\n\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"margin-bottom\": \"8px\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFillSelected, neutralForegroundHint, neutralForegroundRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst avatarSize = \"48px\";\r\nconst borderColor = \"rgba(0, 0, 0, 0.09)\";\r\n\r\nexport const ProfileUsersStyles = (config: DesignSystem) => ({\r\n profileUsersContainer: {\r\n padding: \"0\",\r\n margin: \"0\",\r\n\r\n \"& .cwt-profile-user\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"flex-start\",\r\n padding: \"23px 15px\",\r\n \"border-bottom\": \"1px solid \",\r\n \"border-color\": neutralFillSelected,\r\n\r\n \"& .cwt-avatar\": {\r\n height: avatarSize,\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n margin: \"0 12px\"\r\n },\r\n\r\n \"& .cwt-user-info\": {\r\n margin: \"0 12px 0\",\r\n\r\n \"& .cwt-name\": {\r\n color: neutralForegroundRest,\r\n \"font-size\": \"18px\",\r\n \"font-weight\": \"600\"\r\n },\r\n\r\n \"& .cwt-stat\": {\r\n display: \"inline-flex\",\r\n \"margin-top\": \"6px\",\r\n \"font-size\": \"13px\",\r\n color: neutralForegroundHint,\r\n\r\n \"&:before\": {\r\n display: \"inline-block\",\r\n content: \"'|'\",\r\n margin: \"-1px 7.5px 0\"\r\n },\r\n\r\n \"&:first-child:before\": {\r\n content: \"none\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-end\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"auto\"\r\n }\r\n },\r\n\r\n \"& > *:last-child\": {\r\n width: \"100px\",\r\n height: \"1px\",\r\n opacity: 0\r\n }\r\n\r\n },\r\n\r\n profileEmptyMessageContainer: {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n \"margin-top\": \"110px\",\r\n\r\n \"& .cwt-profile-empty-message\": {\r\n \"font-size\": \"24px\",\r\n color: neutralForegroundHint\r\n },\r\n \"& .cwt-profile-empty-icon\": {\r\n \"margin-bottom\": \"24px\",\r\n fill: \"currentColor\",\r\n\r\n \"& .cwt-icon-vector\": {\r\n width: \"55px\",\r\n height: \"55px\"\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst avatarSize = \"32px\";\r\nconst shadowColor = \"rgba(50, 50, 50, 0.16)\";\r\nconst titleSize = \"14px\";\r\nconst messageSize = \"13px\";\r\nconst rootPadding = \"10px\";\r\nconst rightPadding = \"24px\";\r\nconst rootWidth = \"294px\";\r\nconst rootHeight = \"76px\";\r\n\r\nexport const NotificationCardStyles = (config: DesignSystem) => ({\r\n notificationCardContainer: {\r\n position: \"relative\",\r\n padding: rootPadding,\r\n [applyLocalizedProperty(\"padding-right\", \"padding-left\", config.direction)]: rightPadding,\r\n width: rootWidth,\r\n height: rootHeight,\r\n background: neutralLayerCard,\r\n \"box-shadow\": \"0px 0px 12px \" + shadowColor,\r\n \"border-radius\": \"6px\",\r\n \"box-sizing\": \"unset !important\",\r\n\r\n \"& .cwt-close-button\": {\r\n position: \"absolute\",\r\n top: \"16px\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"8px\",\r\n background: \"none\",\r\n border: \"none\"\r\n },\r\n\r\n \"& .cwt-notification-header\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n\r\n \"& .cwt-image-container\": {\r\n display: \"inline-flex\",\r\n\r\n \"& .cwt-avatar\": {\r\n height: avatarSize,\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n display: \"block\"\r\n },\r\n\r\n \"& .cwt-not-clickable\": {\r\n cursor: \"default\"\r\n },\r\n \"& .cwt-not-round\": {\r\n \"border-radius\": \"0\",\r\n \"object-fit\": \"contain\"\r\n }\r\n },\r\n\r\n \"& .cwt-title\": {\r\n margin: \"0 10px\",\r\n \"font-weight\": \"600\",\r\n \"font-size\": titleSize,\r\n color: neutralForegroundRest,\r\n \"white-space\": \"nowrap\",\r\n overflow: \"hidden\",\r\n \"text-overflow\": \"ellipsis\"\r\n }\r\n },\r\n\r\n \"& .cwt-message\": {\r\n margin: \"4px\",\r\n \"font-size\": messageSize,\r\n color: neutralForegroundHint,\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n height: \"42px\",\r\n \"& *\": {\r\n display: \"inline\"\r\n },\r\n \"& .cwt-name.cwt-link\": {\r\n \"font-weight\": \"600\",\r\n\r\n \"&::before\": {\r\n content: \"'@'\",\r\n display: \"inline\"\r\n }\r\n },\r\n \"& > .cwt-clamp\": {\r\n display: \"-webkit-box\",\r\n \"-webkit-line-clamp\": \"2\",\r\n \"-webkit-box-orient\": \"vertical\",\r\n overflow: \"hidden\",\r\n \"text-overflow\": \"ellipsis\",\r\n \"line-height\": \"17px\",\r\n \"max-height\": \"38px\"\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nexport const NotificationTrayStyles = (config: DesignSystem) => ({\r\n notificationTrayContainer: {\r\n position: \"fixed\",\r\n bottom: \"0\",\r\n margin: \"30px\",\r\n \"z-index\": \"99999999999999999 \",\r\n\r\n \"& > *\": {\r\n \"margin-bottom\": \"16px\"\r\n }\r\n },\r\n notificationTrayContainerLeftAligned: {\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"0\"\r\n },\r\n notificationTrayContainerRightAligned: {\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"0\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, accentForegroundRest, isDarkMode, neutralForegroundHint, neutralForegroundRest, neutralLayerCard, neutralLayerCardContainer, neutralOutlineRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst avatarSize = \"32px\";\r\nconst activityHighlightColor = \"#B7DDE9\";\r\nconst imgSize = \"55px\";\r\nconst alertIconSize = \"26px\";\r\nconst alertColor = \"#E22C3B\";\r\nconst checkColor = \"#6BB700\";\r\nconst messageMaxClampedLines = 2;\r\n\r\nexport const ProfileActivityStyles = (config: DesignSystem) => ({\r\n profileActivityListContainer: {\r\n padding: \"1px\",\r\n margin: \"0\",\r\n\r\n \"& .cwt-link.cwt-comment-deleted-message\": {\r\n display: \"inline\",\r\n \"font-style\": \"italic\",\r\n \"font-weight\": \"normal\",\r\n color: neutralForegroundHint,\r\n\r\n \"& .cwt-icon\": {\r\n margin: \"-4px 4px 0\",\r\n color: \"inherit\",\r\n display: \"inline-flex\",\r\n \"vertical-align\": \"middle\"\r\n }\r\n },\r\n\r\n \"& .cwt-name.cwt-link\": {\r\n color: accentForegroundRest\r\n }\r\n },\r\n\r\n profileActivityContainer: {\r\n display: \"flex\",\r\n \"min-height\": \"40px\",\r\n padding: \"20px 0\",\r\n background: neutralLayerCard,\r\n \"border-radius\": \"2px\",\r\n \"box-shadow\": \"0px 1.6px 3.6px rgba(0, 0, 0, 0.13), 0px 0px 2.9px rgba(0, 0, 0, 0.11)\",\r\n\r\n \"&.new\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-2px\",\r\n [applyLocalizedProperty(\"border-left\", \"border-right\", config.direction)]: \"4px solid \",\r\n \"border-color\": activityHighlightColor,\r\n \"border-radius\": \"0 2px 2px 0\"\r\n },\r\n \"& .cwt-start\": {\r\n display: \"flex\",\r\n \"align-items\": \"start\",\r\n \"justify-content\": \"center\",\r\n width: \"80px\",\r\n \"min-width\": \"80px\",\r\n \"text-align\": \"center\",\r\n\r\n \"& .cwt-img\": {\r\n \"max-width\": \"30px\",\r\n \"max-height\": \"30px\"\r\n }\r\n },\r\n \"& .cwt-mid\": {\r\n \"min-width\": \"0px\",\r\n \"font-size\": \"14px\",\r\n color: neutralForegroundRest\r\n },\r\n \"& .cwt-end\": {\r\n padding: \"0 26px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"auto\",\r\n \"text-align\": \"center\"\r\n },\r\n \"& .cwt-sub-text\": {\r\n \"margin-top\": \"6px\",\r\n color: isDarkMode(config) ? \"#D9D9D9\" : neutralForegroundHint,\r\n \"font-size\": \"12px\"\r\n },\r\n \"& .cwt-link\": {\r\n color: accentFillRest,\r\n \"font-weight\": \"600\"\r\n },\r\n \"& > .cwt-avatar\": {\r\n height: avatarSize,\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize\r\n },\r\n \"& .cwt-body\": {\r\n \"& > .cwt-clamp\": {\r\n display: \"-webkit-box\",\r\n \"-webkit-line-clamp\": messageMaxClampedLines,\r\n \"-webkit-box-orient\": \"vertical\",\r\n overflow: \"hidden\"\r\n },\r\n \"& .cwt-show-clamped-btn\": {\r\n color: accentFillRest,\r\n \"font-size\": \"12px\",\r\n background: neutralLayerCardContainer,\r\n bottom: \"11px\",\r\n display: \"inline\",\r\n position: \"absolute\",\r\n right: \"12px\",\r\n \"font-weight\": \"normal\",\r\n\r\n \"&:hover\": {\r\n \"text-decoration\": \"none\"\r\n },\r\n\r\n \"&::before\": {\r\n content: \"'...'\",\r\n display: \"inline-block\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"5px\",\r\n color: neutralForegroundHint\r\n }\r\n }\r\n },\r\n \"& .cwt-mention-body\": {\r\n position: \"relative\"\r\n }\r\n },\r\n\r\n profileActivityBadgeContainer: {\r\n \"& .cwt-end\": {\r\n height: imgSize\r\n },\r\n \"& .cwt-badge-img\": {\r\n width: imgSize,\r\n height: imgSize\r\n }\r\n },\r\n\r\n profileActivityFollowContainer: {\r\n },\r\n\r\n profileActivityReactionContainer: {\r\n \"& .cwt-body\": {\r\n margin: \"16px 0 10px\",\r\n padding: \"10px 12px\",\r\n position: \"relative\",\r\n color: neutralForegroundRest, // added nearest fast-color\r\n background: neutralLayerCardContainer,\r\n \"overflow-wrap\": \"anywhere\",\r\n \"border-radius\": \"8px\",\r\n \"& *\": {\r\n display: \"inline\",\r\n color: isDarkMode(config) ? \"#FFFFFF\" : \"#545454\"\r\n },\r\n \"& .cwt-name.cwt-link\": {\r\n color: accentFillRest,\r\n \"font-weight\": \"normal\",\r\n\r\n \"&::before\": {\r\n content: \"'@'\",\r\n display: \"inline\"\r\n }\r\n }\r\n },\r\n \"& .cwt-start > .cwt-icon\": {\r\n \"& .cwt-icon-vector\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"3px\",\r\n\r\n \"&:last-child-of-type\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"0\"\r\n }\r\n }\r\n },\r\n \"& .cwt-end\": {\r\n padding: \"10px\"\r\n },\r\n \"& > .cwt-icon\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n \"margin-top\": \"2px\"\r\n },\r\n \"& .cwt-body-link:hover\": {\r\n \"text-decoration\": \"none\",\r\n color: neutralForegroundRest\r\n }\r\n },\r\n\r\n profileActivityReplyContainer: {\r\n \"& .cwt-body\": {\r\n margin: \"16px 0 10px\",\r\n padding: \"10px 12px\",\r\n background: neutralLayerCardContainer,\r\n position: \"relative\",\r\n color: neutralForegroundRest,\r\n \"border-radius\": \"8px\",\r\n \"& > *\": {\r\n display: \"inline\"\r\n },\r\n\r\n \"& .cwt-mention.cwt-link\": {\r\n color: accentFillRest,\r\n display: \"inline-flex\",\r\n \"font-weight\": \"normal\",\r\n\r\n \"&::before\": {\r\n content: \"'@'\",\r\n display: \"inline\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-end\": {\r\n padding: \"10px\"\r\n },\r\n\r\n \"& .cwt-body-link\": {\r\n \"& *\": {\r\n display: \"inline\"\r\n },\r\n \"&:hover\": {\r\n \"text-decoration\": \"none\",\r\n color: neutralForegroundRest\r\n },\r\n \"& .cwt-message\": {\r\n \"word-break\": \"break-word\"\r\n }\r\n }\r\n },\r\n\r\n profileActivityTitleContainer: {\r\n \"& .cwt-text\": {\r\n \"line-height\": \"22px\"\r\n },\r\n \"& .cwt-title-label\": {\r\n margin: \"0 10px\",\r\n padding: \"4px 8px\",\r\n \"font-size\": \"14px\",\r\n \"font-weight\": \"600\",\r\n color: neutralLayerCard,\r\n \"border-radius\": \"4px\",\r\n \"letter-spacing\": applyLocalizedProperty(\"-0.02em\", \"0\", config.direction),\r\n \"white-space\": \"nowrap\"\r\n }\r\n },\r\n\r\n profileActivityAlertContainer: {\r\n \"& .cwt-icon.cwt-alert-icon\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n width: alertIconSize,\r\n height: alertIconSize,\r\n color: \"#FFFFFF\",\r\n background: alertColor,\r\n \"border-radius\": \"50%\"\r\n },\r\n \"& .cwt-icon.cwt-alert-icon.cwt-check-icon\": {\r\n background: checkColor\r\n },\r\n \"& .cwt-preview\": {\r\n margin: \"10px 0\",\r\n padding: \"10px 12px\",\r\n color: \"#777777\",\r\n background: neutralLayerCardContainer,\r\n \"border-radius\": \"8px\"\r\n },\r\n \"& .cwt-buttons\": {\r\n display: \"flex\",\r\n padding: \"7px 0\",\r\n \"flex-wrap\": \"wrap\",\r\n\r\n \"& .cwt-fast-button\": {\r\n \"min-width\": \"130px\",\r\n \"margin-bottom\": \"5px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"9px\"\r\n }\r\n },\r\n \"& .cwt-end\": {\r\n padding: \"10px\"\r\n }\r\n },\r\n\r\n profileReactionActivityMiniBreakdownPopover: {\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"-36px\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, isDarkMode, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\n\r\nconst avatarSize = \"54px\";\r\nconst avatarSizeL0 = \"78px\"; // responsıve level 0\r\nconst sidePadding = \"10px\";\r\nconst buttonHeight = \"36px\";\r\nconst borderColor = \"#DDDDDD\";\r\nconst inReviewMarkColor = \"#FFB900\";\r\nconst notAllowMarkColor = \"#E22C3B\";\r\nconst markSize = 20;\r\n\r\nexport const ProfileCardStyles = (config: DesignSystem) => ({\r\n profileCardContainer: {\r\n position: \"sticky\",\r\n \"z-index\": \"10\",\r\n top: \"123px\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"stretch\",\r\n width: \"calc(240px - 2 * \" + sidePadding + \")\",\r\n \"min-width\": \"calc(240px - 2 * \" + sidePadding + \")\",\r\n margin: \"3px\",\r\n padding: \"14px \" + sidePadding + \" 0\",\r\n background: neutralLayerCard,\r\n color: neutralForegroundRest,\r\n \"border-radius\": \"2px\",\r\n \"-webkit-box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.11), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)\",\r\n \"-moz-box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.11), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)\",\r\n \"box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.11), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)\",\r\n\r\n \"&.demo\": {\r\n top: \"0px\"\r\n },\r\n\r\n \"& .cwt-avatar-container\": {\r\n position: \"relative\",\r\n \"pointer-events\": \"none\", // disables flash events\r\n\r\n \"& .cwt-avatar\": {\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n height: avatarSize\r\n },\r\n\r\n \"& .cwt-status-mark\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n position: \"absolute\",\r\n bottom: (-markSize/4)+\"px\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: (-markSize/4)+\"px\",\r\n width: markSize+\"px\",\r\n height: markSize+\"px\",\r\n color: \"#FFFFFF\",\r\n \"border-radius\": \"50%\",\r\n border: \"2px solid \",\r\n \"border-color\": neutralLayerCard,\r\n\r\n \"&.cwt-inreview\": {\r\n background: inReviewMarkColor // No fast Color available\r\n },\r\n\r\n \"&.cwt-notallow\": {\r\n background: notAllowMarkColor // No fast Color available\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-user-info \": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"stretch\",\r\n\r\n \"& .cwt-user-header \": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"space-between\",\r\n\r\n \"& .cwt-name-title \": {\r\n width: \"100%\",\r\n \"text-align\": \"center\",\r\n\r\n \"& .cwt-name \": {\r\n \"margin-top\": \"5px\",\r\n \"font-size\": \"24px\",\r\n \"font-weight\": \"600\"\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-action-panel \": {\r\n margin: \"0 -\" + sidePadding,\r\n padding: \".75em\",\r\n \"border-top\": \"1px solid \",\r\n \"border-color\": borderColor,\r\n\r\n \"& .cwt-edit-profile-btn.cwt-icon\": {\r\n margin: \".175em .325em\",\r\n \"font-size\": \".8em\",\r\n color: neutralForegroundHint,\r\n\r\n \"& .cwt-icon-label\": {\r\n color: isDarkMode(config) ? \"#D9D9D9\" : neutralForegroundHint\r\n }\r\n },\r\n\r\n \"& .cwt-other-profile-settings\": {\r\n display: \"flex\",\r\n \"justify-content\": \"center\",\r\n width: \"100%\",\r\n\r\n \"& .cwt-fast-button\": {\r\n width: buttonHeight,\r\n margin: \"0 .175em\",\r\n overflow: \"hidden\",\r\n \"text-overflow\": \"ellipsis\",\r\n \"white-space\": \"nowrap\",\r\n\r\n \"& .cwt-icon\": {\r\n \"justify-content\": \"center\"\r\n }\r\n }\r\n }\r\n },\r\n\r\n /* RESPONSIVE CLASSES */\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n position: \"static\",\r\n width: \"auto\",\r\n \"min-width\": \"calc(320px - 2 * \" + sidePadding + \")\",\r\n padding: \"17px 10px 0\",\r\n\r\n \"& .cwt-avatar-container\": {\r\n\r\n \"& .cwt-avatar\": {\r\n \"min-width\": avatarSizeL0,\r\n \"max-width\": avatarSizeL0,\r\n height: avatarSizeL0\r\n }\r\n },\r\n\r\n \"& .cwt-user-info\": {\r\n \"& .cwt-user-header\": {\r\n \"flex-direction\": \"row\",\r\n \"align-items\": \"flex-start\",\r\n\r\n \"& .cwt-name-title\": {\r\n margin: \"0 10px 0\",\r\n \"text-align\": \"start\",\r\n\r\n \"& .cwt-name\": {\r\n \"margin-top\": \"0\"\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-action-panel \": {\r\n border: \"none\",\r\n margin: \"0 -18px\",\r\n\r\n \"& .cwt-other-profile-settings\": {\r\n \"justify-content\": \"flex-start\"\r\n }\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, accentFillSelected, neutralFillStealthActive, neutralFillToggleHover, neutralForegroundHint, neutralForegroundRest, neutralLayerCardContainer } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst messageMaxClampedLines = 3;\r\n\r\nexport const ProfileCommentsStyles = (config: DesignSystem) => ({\r\n profileCommentsContainer: {\r\n margin: \"16px 20px 24px\",\r\n padding: \"0\",\r\n \"list-style\": \"none\",\r\n\r\n \"& .cwt-profile-comment-item-list\": {\r\n padding: \"0\",\r\n margin: \"0\"\r\n },\r\n\r\n \"& .cwt-profile-comment\": {\r\n padding: \"20px 0\",\r\n \"border-bottom\": \"1px solid rgba(143, 158, 205, 0.2)\",\r\n\r\n \"&:last-of-type\": {\r\n border: \"none\"\r\n },\r\n\r\n \"& .cwt-open-content-link:hover\": {\r\n \"text-decoration\": \"none\"\r\n },\r\n\r\n \"& .cwt-header\": {\r\n \"margin-bottom\": \"4px\",\r\n\r\n \"& .cwt-title\": {\r\n \"font-size\": \"16px\",\r\n \"font-weight\": \"600\",\r\n color: neutralForegroundRest\r\n },\r\n \"& .cwt-posted-at\": {\r\n color: neutralFillToggleHover,\r\n \"font-size\": \"14px\"\r\n },\r\n \"& .dot-before:before\": {\r\n opacity: \".55\"\r\n },\r\n \"& .cwt-comment-config-container\": {\r\n float: applyLocalizedProperty(\"right\", \"left\", config.direction),\r\n \"margin-top\": \"3px\",\r\n\r\n \"& .cwt-icon\": {\r\n color: neutralForegroundHint,\r\n\r\n \"&:hover\": {\r\n color: neutralForegroundRest // #2b2b2b used instead of #000000\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-message-engagement-container\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n margin: \"0 -5px 8px\",\r\n padding: \"8px 5px 5px\",\r\n \"border-radius\": \"8px\",\r\n cursor: \"pointer\",\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthActive\r\n }\r\n },\r\n\r\n \"& .cwt-message\": {\r\n margin: \"0\",\r\n \"font-size\": \"14px\",\r\n \"line-height\": \"18px\",\r\n color: neutralForegroundRest, // #2b2b2b used instead of #3c4046\r\n \"word-break\": \"break-word\",\r\n\r\n \"& *\": {\r\n display: \"inline\"\r\n },\r\n\r\n \"& .cwt-name.cwt-link\": {\r\n color: accentFillRest,\r\n \"font-weight\": \"normal\",\r\n\r\n \"&::before\": {\r\n content: \"'@'\",\r\n display: \"inline\"\r\n }\r\n },\r\n\r\n \"& .cwt-comment-deleted-message\": {\r\n display: \"inline\",\r\n \"font-style\": \"italic\",\r\n color: neutralForegroundHint,\r\n\r\n \"& .cwt-icon\": {\r\n margin: \"-4px 4px 0\",\r\n color: neutralForegroundHint,\r\n fill: neutralForegroundHint,\r\n display: \"inline-flex\",\r\n \"vertical-align\": \"middle\"\r\n }\r\n },\r\n\r\n \"& > .cwt-clamp\": {\r\n display: \"-webkit-box\",\r\n \"-webkit-line-clamp\": messageMaxClampedLines,\r\n \"-webkit-box-orient\": \"vertical\",\r\n overflow: \"hidden\"\r\n },\r\n\r\n \"& .cwt-show-clamped-btn\": {\r\n color: accentFillRest,\r\n \"font-size\": \"12px\"\r\n }\r\n },\r\n\r\n \"& .cwt-engagements\": {\r\n display: \"inline-flex\",\r\n \"align-items\": \"center\",\r\n margin: \"10px -4px 0\",\r\n padding: \"0\",\r\n height: \"16px\",\r\n \"max-height\": \"16px\",\r\n \"min-height\": \"16px\",\r\n\r\n \"& .cwt-replies-link\": {\r\n margin: \"0 6px\",\r\n \"font-size\": \"14px\",\r\n color: accentFillSelected, // Changed from #0078D4 to #005393 because it was unreadable\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"12px\"\r\n }\r\n },\r\n\r\n \"& .cwt-reaction-counts\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n\r\n \"& > .cwt-icon\": {\r\n margin: \"0\",\r\n padding: \"0 4px\",\r\n \"font-size\": \"18px !important\",\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"14px\"\r\n },\r\n\r\n \"& .cwt-icon-vector\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"4px\",\r\n\r\n \"&:last-child\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"0\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-content-info\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n padding: \"12px\",\r\n border: \"1px solid #DDDDDD\",\r\n \"border-radius\": \"8px\",\r\n\r\n \"&:hover\": {\r\n background: neutralLayerCardContainer\r\n },\r\n\r\n \"& .cwt-content-image\": {\r\n margin: \"0\",\r\n \"object-fit\": \"cover\",\r\n width: \"68px\",\r\n height: \"45px\",\r\n border: \"none\",\r\n \"border-radius\": \"4px\"\r\n },\r\n\r\n \"& .cwt-content-title\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"14px\",\r\n \"font-size\": \"14px\",\r\n \"font-weight\": \"600\",\r\n color: neutralFillToggleHover\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-show-more-comments-btn\": {\r\n margin: \"16px 0 8px\",\r\n \"font-weight\": \"600\",\r\n color: \"#0076D6\",\r\n fill: \"currentColor\",\r\n opacity: \"1\"\r\n }\r\n },\r\n profileCommentsDeleteMenuPopover: {\r\n bottom: \"16px\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"-16px\"\r\n },\r\n\r\n profileCommentsMiniBreakdownPopover: {\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"-12px\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { profileHrColor } from \"../../utils/commonJssConstants\";\r\n\r\nexport const ProfilePrivacyStyles = (config: DesignSystem) => ({\r\n profilePrivacyContainer: {\r\n margin: \"25px 20px\",\r\n\r\n \"& .cwt-title\": {\r\n \"font-size\": \"15px\",\r\n \"font-weight\": \"600\",\r\n margin: \"0 0 2px 0\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-private-switch\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n color: neutralForegroundRest, // On/Off button color added\r\n\r\n \"& .cwt-switch-label\": {\r\n margin: \"0 0 2px 0\"\r\n },\r\n\r\n \"& .cwt-switch\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"27px\"\r\n },\r\n\r\n \"& .cwt-on-label\": {\r\n margin: \"0 8px\",\r\n \"font-size\": \"14px\"\r\n }\r\n },\r\n\r\n \"& .cwt-description\": {\r\n \"margin-top\": \"11px\",\r\n \"font-size\": \"13px\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-h-seperator\": {\r\n height: \"1px\",\r\n margin: \"20px -20px 20px\",\r\n background: profileHrColor,\r\n border: \"none\"\r\n }\r\n },\r\n\r\n profileDataContainer: {\r\n \"& .cwt-description\": {\r\n \"font-size\": \"13px\",\r\n \"line-height\": \"20px\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& button.cwt-fast-button\": {\r\n margin: \"8px 0\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, isDarkMode, neutralFillToggleHover, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { profileHrColor } from \"../../utils/commonJssConstants\";\r\n\r\nexport const ProfileTabsStyles = (config: DesignSystem) => ({\r\n profileTabsContainer: {\r\n \"min-width\": \"320px\",\r\n margin: \"3px 3px 16px\",\r\n \"background-color\": neutralLayerCard,\r\n \"border-radius\": \"2px\",\r\n \"box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.11), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)\",\r\n\r\n \"& .cwt-profile-tabs\": {\r\n position: \"sticky\",\r\n top: \"123px\",\r\n \"z-index\": \"5\",\r\n margin: \"0\",\r\n padding: \"0 18px\",\r\n background: neutralLayerCard,\r\n \"border-bottom\": \"1px solid \",\r\n \"border-color\": profileHrColor, // No fast Color available\r\n \"overflow-x\": \"scroll\",\r\n \"list-style\": \"none\",\r\n\r\n \"&.disabled\": {\r\n \"pointer-events\": \"none\"\r\n },\r\n\r\n \"&.demo\": {\r\n top: \"0px\"\r\n },\r\n\r\n // 'Hide scrollbar'\r\n \"-ms-overflow-style\": \"none\",\r\n\r\n \"&::-webkit-scrollbar\": {\r\n display: \"none\"\r\n },\r\n\r\n \"& .cwt-tab-item\": {\r\n position: \"relative\",\r\n padding: \"15px 10px\",\r\n color: neutralFillToggleHover,\r\n\r\n \"&:first-child\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\"\r\n },\r\n\r\n \"&.active\": {\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest,\r\n \"font-weight\": \"600\",\r\n\r\n \"&:after\": {\r\n position: \"absolute\",\r\n \"z-index\": \"10\",\r\n content: \"' '\",\r\n height: \"3px\",\r\n width: \"100%\",\r\n \"margin-top\": \"calc(15px - 3px)\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"0\",\r\n background: accentFillRest\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest\r\n }\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n color: \"inherit\",\r\n \"white-space\": \"nowrap\",\r\n height: \"18px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"4px\"\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: neutralForegroundRest,\r\n \"font-size\": \"13px\",\r\n\r\n \"&:before\": {\r\n display: \"inline-block\",\r\n content: \"' '\",\r\n width: \"8px\"\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-tab-content\": {\r\n position: \"relative\",\r\n \"min-height\": \"60vh\",\r\n \"scroll-margin-top\": \"50px\",\r\n \"padding-top\": \"5px\"\r\n },\r\n\r\n /* RESPONSIVE CLASSES */\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"& .cwt-profile-tabs\": {\r\n top: \"90px\"\r\n }\r\n }\r\n },\r\n\r\n profileLockedContainer: {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"justify-content\": \"center\",\r\n width: \"100%\",\r\n padding: \"12vw 0\",\r\n \"align-items\": \"center\",\r\n\r\n \"& .cwt-message\": {\r\n \"margin-top\": \"60px\",\r\n \"font-size\": \"24px\",\r\n \"font-weight\": \"600\",\r\n color: neutralForegroundRest, // #2b2b2b used instead of #000000\r\n \"text-align\": \"center\"\r\n }\r\n },\r\n\r\n profileLockedIcon: {\r\n \"max-width\": \"150px\"\r\n },\r\n\r\n profileEmptyTabContainer: {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n \"padding-top\": \"70px\",\r\n \"text-align\": \"center\",\r\n\r\n \"& .cwt-message\": {\r\n \"margin-top\": \"23px\",\r\n \"font-size\": \"18px\",\r\n \"margin-bottom\": \"16px\",\r\n color: neutralForegroundRest // #2b2b2b used instead of #000000\r\n },\r\n\r\n \"& .cwt-sub-message\": {\r\n \"touch-action\": \"none\",\r\n \"margin-top\": \"3px\",\r\n \"font-size\": \"13px\",\r\n color: neutralForegroundHint\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\nimport { profileHrColor, reset } from \"../../utils/commonJssConstants\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst sidePadding = \"36px\";\r\nconst containerWidth = \"470px\";\r\nconst checkBoxSize = \"22px\";\r\n\r\nexport const ProfileManageDataPageStyles = (config: DesignSystem) => ({\r\n profileManageDataPageContainer: {\r\n ...reset,\r\n \"box-sizing\": \"content-box !important\",\r\n display: \"flex !important\",\r\n \"flex-direction\": \"column\",\r\n \"justify-content\": \"space-between\",\r\n \"align-items\": \"center\",\r\n width: `calc( ${containerWidth} - (${sidePadding} * 2))`,\r\n \"max-width\": `calc( 100% - (${sidePadding} * 2))`,\r\n margin: \"0 auto\",\r\n padding: \"34px \" + sidePadding,\r\n \"min-height\": `calc( ${containerWidth} - (34px * 2))`,\r\n background: neutralLayerCard,\r\n\r\n \"& .cwt-h-seperator\": {\r\n height: \"1px\",\r\n margin: `0 -${sidePadding}`,\r\n background: profileHrColor,\r\n border: \"none\"\r\n },\r\n\r\n \"& .cwt-sub-text\": {\r\n \"font-weight\": \"normal\",\r\n \"font-size\": \"13px\",\r\n \"line-height\": \"18px\",\r\n color: neutralForegroundHint\r\n },\r\n\r\n \"& .cwt-header\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"margin-bottom\": \"16px\",\r\n\r\n \"& .cwt-title\": {\r\n margin: \"16px 16px 8px\",\r\n \"font-weight\": \"600\",\r\n \"font-size\": \"24px\"\r\n }\r\n },\r\n\r\n \"& div.cwt-buttons\": {\r\n display: \"flex\",\r\n \"flex-wrap\": \"wrap\",\r\n \"justify-content\": \"center\",\r\n margin: \"20px 0 0\",\r\n\r\n \"& .cwt-fast-button\": {\r\n \"min-width\": \"130px\",\r\n \"margin-bottom\": \"5px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"9px\"\r\n }\r\n },\r\n\r\n \"& .cwt-checklist\": {\r\n margin: \"16px 0 14px\",\r\n padding: \"0\",\r\n\r\n \"& .cwt-checklist-item\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n margin: \"0 0 14px\",\r\n\r\n \"& .cwt-checkbox\": {\r\n \"min-width\": checkBoxSize,\r\n \"min-height\": checkBoxSize,\r\n margin: \"0\",\r\n padding: \"4px\",\r\n background: neutralLayerCard,\r\n border: \"1px solid #DDDDDD\",\r\n \"border-radius\": \"2px\",\r\n\r\n \"& .cwt-icon\": {\r\n \"font-size\": checkBoxSize,\r\n color: neutralForegroundHint\r\n }\r\n },\r\n\r\n \"& div.cwt-checklist-item-content\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"justify-content\": \"center\",\r\n margin: \"0 16px\",\r\n\r\n \"& .cwt-label\": {\r\n margin: \"0\",\r\n padding: \"0\",\r\n \"font-size\": \"15px\",\r\n \"font-weight\": \"600\",\r\n \"line-height\": \"20px\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-sub-text\": {\r\n margin: \"0\",\r\n padding: \"0\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {DesignSystem, accentFillRest, isDarkMode, neutralFillToggleHover, neutralForegroundRest, neutralLayerCard} from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { onboardingImages } from \"../utils/images\";\r\nimport { reset } from \"../utils/commonJssConstants\";\r\n\r\nconst avatarSize = \"80px\";\r\nconst underageAvatarSize = \"50px\";\r\nconst successTextColor = \"#28623F\";\r\nconst failedTextColor = \"#E22C3B\";\r\nconst reviewTextColor = \"orange\";\r\n\r\nexport const OnboardingPageStyles = (config: DesignSystem) => ({\r\n onboardingPageContainer: {\r\n ...reset,\r\n overflow: \"hidden\",\r\n \"overflow-y\": \"auto\",\r\n position: \"relative\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"flex-start\",\r\n width: \"500px\",\r\n \"max-width\": \"calc(100vw - 40px)\",\r\n padding: \"40px 20px\",\r\n background: neutralLayerCard,\r\n \"text-align\": \"center\",\r\n \"box-shadow\": \"0px 1.2px 3.6px rgba(0, 0, 0, 0.1), 0px 6.4px 14.4px rgba(0, 0, 0, 0.13)\",\r\n\r\n \"&:before\": {\r\n content: \"' '\",\r\n position: \"absolute\",\r\n top: \"0\",\r\n height: \"8px\",\r\n width: \"100%\",\r\n background: accentFillRest\r\n },\r\n\r\n \"& .cwt-top-logo\": {\r\n height: \"24px\",\r\n margin: \"0 0 40px\"\r\n },\r\n\r\n \"& .cwt-ellipse-steps\": {\r\n \"text-align\": \"center\",\r\n \"margin-top\": \"-20px\",\r\n\r\n \"& .cwt-active-step\": {\r\n height: \"8px\",\r\n width: \"8px\",\r\n margin: \"0 4px\",\r\n display: \"inline-block\",\r\n \"border-radius\": \"50%\",\r\n \"background-color\": \"#929292\"\r\n },\r\n \"& .cwt-step\": {\r\n height: \"8px\",\r\n width: \"8px\",\r\n margin: \"0 4px\",\r\n display: \"inline-block\",\r\n \"border-radius\": \"50%\",\r\n \"background-color\": \"#EFEFEF\"\r\n }\r\n },\r\n\r\n \"& .cwt-title\": {\r\n margin: \"20px 0 0\",\r\n \"font-size\": \"24px\",\r\n padding: \"0 16px\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-sub-title\": {\r\n \"max-width\": \"400px\",\r\n margin: \"16px 0 0\",\r\n \"font-size\": \"13px\",\r\n color: isDarkMode(config) ? \"#D9D9D9\" : neutralFillToggleHover\r\n },\r\n\r\n \"& .cwt-avatar\": {\r\n \"touch-action\": \"none\",\r\n \"margin-top\": \"36px\",\r\n height: avatarSize,\r\n width: avatarSize,\r\n \"min-width\": avatarSize,\r\n\r\n \"&.cwt-error\": {\r\n border: \"1px solid \"+failedTextColor\r\n }\r\n },\r\n\r\n \"& .cwt-name\": {\r\n \"margin-top\": \"24px\",\r\n \"font-size\": \"24px\",\r\n color: neutralForegroundRest,\r\n\r\n \"&.cwt-error\": {\r\n color: failedTextColor\r\n }\r\n },\r\n\r\n \"& .cwt-email\": {\r\n \"margin-top\": \"30px\",\r\n \"font-size\": \"18px\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-h-seperator\": {\r\n width: \"100%\",\r\n \"max-width\": \"380px\",\r\n margin: \"24px 0 12px\",\r\n \"border-top\": \"1px solid #949494\"\r\n },\r\n\r\n \"& .cwt-status-message\": {\r\n \"margin-top\": \"8px\",\r\n \"max-width\": \"345px\",\r\n \"min-height\": \"36px\",\r\n \"font-size\": \"13px\",\r\n\r\n \"& .cwt-icon-vector\": {\r\n \"font-size\": \"16px\"\r\n },\r\n\r\n \"& .cwt-success-message\": {\r\n color: isDarkMode(config) ? \"#BAE3C8\" : successTextColor\r\n },\r\n\r\n \"& .cwt-review-message\": {\r\n display: \"block\",\r\n \"margin-top\": \"6px\",\r\n color: reviewTextColor\r\n },\r\n\r\n \"& .cwt-error-message\": {\r\n display: \"block\",\r\n \"margin-top\": \"6px\",\r\n\r\n \"& *\": {\r\n color: failedTextColor\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-buttons\": {\r\n \"margin-top\": \"30px\",\r\n display: \"flex\",\r\n padding: \"7px 0\",\r\n\r\n \"& .cwt-fast-button\": {\r\n margin: \"0 4px\"\r\n }\r\n },\r\n\r\n \"& .cwt-footer-text\": {\r\n \"margin-top\": \"14px\",\r\n \"max-width\": \"345px\",\r\n padding: \"0 16px\",\r\n \"font-size\": \"13px\",\r\n color: isDarkMode(config) ? \"#D9D9D9\" : neutralFillToggleHover,\r\n\r\n \"& .cwt-link\": {\r\n color: isDarkMode(config) ? \"#BDDCFF\" : accentFillRest\r\n }\r\n }\r\n },\r\n\r\n onboardingUnderagePageContainer: {\r\n ...reset,\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"flex-start\",\r\n width: \"540px\",\r\n \"max-width\": \"100%\",\r\n height: \"470px\",\r\n \"max-height\": \"90vh\",\r\n padding: \"40px 0 54px\",\r\n background: `center bottom no-repeat url('${onboardingImages.underageBg}')`,\r\n \"background-color\": neutralLayerCard,\r\n \"text-align\": \"center\",\r\n \"box-shadow\": \"0px 1.2px 3.6px rgba(0, 0, 0, 0.1), 0px 6.4px 14.4px rgba(0, 0, 0, 0.13)\",\r\n\r\n \"&:before\": {\r\n content: \"' '\",\r\n position: \"absolute\",\r\n top: \"0\",\r\n height: \"8px\",\r\n width: \"100%\",\r\n background: accentFillRest\r\n },\r\n\r\n \"& .cwt-title\": {\r\n \"font-size\": \"24px\",\r\n \"max-width\": \"380px\",\r\n padding: \"0 16px\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-sub-title\": {\r\n \"max-width\": \"400px\",\r\n margin: \"20px 16px 0\",\r\n \"font-size\": \"13px\",\r\n color: isDarkMode(config) ? \"#D9D9D9\" : neutralFillToggleHover\r\n },\r\n\r\n \"& .cwt-avatar\": {\r\n \"touch-action\": \"none\",\r\n margin: \"16px 0 36px\",\r\n height: underageAvatarSize,\r\n width: underageAvatarSize,\r\n \"min-width\": underageAvatarSize\r\n },\r\n\r\n \"& .cwt-buttons\": {\r\n \"margin-top\": \"40px\",\r\n display: \"flex\",\r\n padding: \"7px 0\",\r\n\r\n \"& .cwt-fast-button\": {\r\n margin: \"0 4px\"\r\n }\r\n }\r\n },\r\n onboardingWelcomePageStep2Container: {\r\n ...reset,\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"flex-start\",\r\n width: \"540px\",\r\n \"max-width\": \"100%\",\r\n \"max-height\": \"60vh\",\r\n height: \"470px\",\r\n padding: \"40px 0 54px\",\r\n background: `center bottom -130px no-repeat url('${onboardingImages.welcomeBg}')`,\r\n \"background-color\": neutralLayerCard,\r\n \"text-align\": \"center\",\r\n \"box-shadow\": \"0px 1.2px 3.6px rgba(0, 0, 0, 0.1), 0px 6.4px 14.4px rgba(0, 0, 0, 0.13)\",\r\n\r\n \"&:before\": {\r\n content: \"' '\",\r\n position: \"absolute\",\r\n top: \"0\",\r\n height: \"8px\",\r\n width: \"100%\",\r\n background: accentFillRest\r\n },\r\n\r\n \"& .cwt-ellipse-steps\": {\r\n \"text-align\": \"center\",\r\n \"margin-top\": \"-20px\",\r\n\r\n \"& .cwt-active-step\": {\r\n height: \"8px\",\r\n width: \"8px\",\r\n margin: \"8px 4px\",\r\n display: \"inline-block\",\r\n \"border-radius\": \"50%\",\r\n \"background-color\": \"#929292\"\r\n },\r\n \"& .cwt-step\": {\r\n height: \"8px\",\r\n width: \"8px\",\r\n margin: \"8px 4px\",\r\n display: \"inline-block\",\r\n \"border-radius\": \"50%\",\r\n \"background-color\": \"#EFEFEF\"\r\n }\r\n },\r\n\r\n \"& .cwt-title\": {\r\n \"font-size\": \"24px\",\r\n \"margin-top\": \"20px\",\r\n width: \"381px\",\r\n height: \"61px\",\r\n padding: \"0 16px\",\r\n color: neutralForegroundRest\r\n },\r\n\r\n \"& .cwt-sub-title\": {\r\n \"max-width\": \"400px\",\r\n margin: \"-10px 16px 0\",\r\n \"font-size\": \"13px\",\r\n color: isDarkMode(config) ? \"#D9D9D9\" : neutralFillToggleHover\r\n },\r\n\r\n \"& .cwt-avatar-step2\": {\r\n \"touch-action\": \"none\",\r\n \"margin-top\": \"12px\",\r\n height: underageAvatarSize,\r\n width: underageAvatarSize,\r\n \"border-radius\": \"50%\"\r\n },\r\n\r\n \"& .cwt-buttons\": {\r\n \"margin-top\": \"21px\",\r\n display: \"flex\",\r\n padding: \"7px 0\",\r\n\r\n \"& .cwt-fast-button\": {\r\n margin: \"0 4px\"\r\n },\r\n \"& .cwt-button-ok\": {\r\n width: \"136px\",\r\n height: \"40px\"\r\n }\r\n },\r\n\r\n \"& .cwt-image-container\": {\r\n \"margin-top\": \"-66px\",\r\n \"margin-bottom\": \"-60px\",\r\n\r\n \"& .cwt-image\": {\r\n width: \"350px\",\r\n \"object-fit\": \"center\",\r\n \"object-position\": \"0 130px\"\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFillRest, neutralForegroundHint, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nexport const DeleteMenuMenuStyles = (config: DesignSystem) => ({\r\n deleteMenuContainer: {\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n width: \"170px\",\r\n background: neutralLayerCard,\r\n \"border-radius\": \"8px\",\r\n \"box-shadow\": \"0px 0px 5.6px rgba(0, 0, 0, 0.11), 0px 6.4px 14.4px rgba(0, 0, 0, 0.13)\",\r\n transition: \".2s ease\",\r\n\r\n \"& .cwt-icon.cwt-menu-header\": {\r\n \"font-size\": \"16px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"auto\",\r\n padding: \"4px 8px 0\",\r\n color: neutralForegroundHint,\r\n fill: \"currentColor\",\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"12px\",\r\n \"font-weight\": \"bold\"\r\n }\r\n },\r\n\r\n \"& .cwt-delete-list\": {\r\n \"min-width\": \"140px\",\r\n \"max-height\": \"188px\",\r\n padding: \"4px 0\",\r\n \"font-size\": \"12px\",\r\n \"letter-spacing\": applyLocalizedProperty(\"-0.012em\", \"0\", config.direction),\r\n \"overflow-y\": \"auto\",\r\n\r\n \"& li\": {\r\n cursor: \"pointer\",\r\n padding: \"4px 12px\",\r\n color: neutralForegroundHint,\r\n\r\n \"&:hover\": {\r\n background: neutralFillRest\r\n }\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\nimport { dangerColor, primaryFocusColor, profileHrColor, reset } from \"../../utils/commonJssConstants\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst tabLabelColor = \"#333333\";\r\n\r\nexport const UGContentCreatePageStyles = (config: DesignSystem) => ({\r\n ugContentCreatePageContainer: {\r\n ...reset,\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"background-color\": \"#FFFFFF\",\r\n\r\n \"& .cwt-ugc-create-header\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"space-between\",\r\n \"border-bottom\": \"1px solid \",\r\n \"border-color\": profileHrColor,\r\n\r\n \"& .cwt-nav-buttons\": {\r\n display: \"flex\",\r\n padding: \"7px 0\",\r\n \"flex-wrap\": \"wrap\",\r\n \"align-items\": \"center\",\r\n\r\n \"& .cwt-fast-button\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"9px\"\r\n }\r\n },\r\n\r\n \"& .cwt-profile-tabs\": {\r\n position: \"sticky\",\r\n top: \"0\",\r\n \"z-index\": \"1\",\r\n margin: \"0\",\r\n padding: \"0 18px\",\r\n background: neutralLayerCard,\r\n \"overflow-x\": \"scroll\",\r\n \"list-style\": \"none\",\r\n\r\n // 'Hide scrollbar'\r\n \"-ms-overflow-style\": \"none\",\r\n\r\n \"&::-webkit-scrollbar\": {\r\n display: \"none\"\r\n },\r\n\r\n \"& .cwt-tab-item\": {\r\n cursor: \"pointer\",\r\n position: \"relative\",\r\n padding: \"15px 0\",\r\n \"font-size\": \"13px\",\r\n color: tabLabelColor,\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"24px\",\r\n background: \"none\",\r\n\r\n \"&:first-child\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\"\r\n },\r\n\r\n \"&:hover\": {\r\n color: accentFillRest,\r\n \"font-weight\": \"600\",\r\n\r\n \"&:after\": {\r\n position: \"absolute\",\r\n \"z-index\": \"10\",\r\n content: \"' '\",\r\n height: \"3px\",\r\n width: \"100%\",\r\n \"margin-top\": \"calc(15px - 3px)\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"0\",\r\n background: accentFillRest\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: accentFillRest\r\n }\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n color: \"inherit\",\r\n \"white-space\": \"nowrap\",\r\n height: \"18px\"\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: tabLabelColor,\r\n \"font-size\": \"13px\"\r\n }\r\n }\r\n }\r\n },\r\n \"& .cwt-status-text\": {\r\n padding: \"0px 10px\",\r\n \"line-height\": \"35px\",\r\n\r\n \"&.success\": {\r\n color: primaryFocusColor\r\n },\r\n\r\n \"&.pending\": {\r\n color: dangerColor\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\nimport { placeholderColor, reset } from \"../../utils/commonJssConstants\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst inputFontSize = \"14px\";\r\n\r\nexport const UGContentCreateView1Styles = (config: DesignSystem) => ({\r\n ugContentCreateView1Container: {\r\n ...reset,\r\n\r\n \"& .cwt-content-generation-form\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n height: \"100vh\"\r\n },\r\n\r\n \"& .cwt-media-input\": {\r\n width: \"100%\"\r\n },\r\n\r\n \"& .cwt-text-input-group\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n width: \"800px\",\r\n \"max-width\": \"100%\"\r\n },\r\n\r\n \"& .cwt-input\": {\r\n padding: \"2px 8px\",\r\n \"font-size\": inputFontSize,\r\n background: neutralLayerCard,\r\n color: neutralForegroundRest,\r\n border: \"none\",\r\n\r\n \"&::placeholder\": {\r\n \"font-weight\": \"normal\",\r\n color: placeholderColor,\r\n opacity: \"1\"\r\n },\r\n\r\n \"&:focus\": {\r\n outline: \"none !important\",\r\n [applyLocalizedProperty(\"border-left\", \"border-right\", config.direction)]: \"2px solid \",\r\n \"border-color\": neutralForegroundHint,\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-2px\"\r\n }\r\n },\r\n\r\n \"& .cwt-rich-text-input\": {\r\n\r\n \"&[contenteditable]\": {\r\n \"&:empty:before\": {\r\n content: \"attr(placeholder)\",\r\n \"pointer-events\": \"none\",\r\n display: \"block\",\r\n color: placeholderColor,\r\n \"font-weight\": \"normal\",\r\n \"font-size\": \"inherit\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-title, & .cwt-title *\": {\r\n \"margin-top\": \"32px\",\r\n \"font-size\": \"42px\",\r\n \"line-height\": \"48px\",\r\n \"font-weight\": \"600\",\r\n \"letter-spacing\": applyLocalizedProperty(\".02em\", \"0\", config.direction)\r\n },\r\n\r\n \"& .cwt-body\": {\r\n \"margin-top\": \"24px\",\r\n \"min-height\": \"3em\",\r\n \"font-size\": \"20px\",\r\n \"line-height\": \"32px\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { reset } from \"../../utils/commonJssConstants\";\r\n\r\nexport const UGContentCreateView2Styles = (config: DesignSystem)=> ({\r\n ugContentCreateView2Container: {\r\n ...reset,\r\n \"margin-top\": \"24px\",\r\n\r\n \"& .cwt-content-generation-form\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\"\r\n },\r\n\r\n \"& .cwt-text-input-group\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n width: \"800px\",\r\n \"max-width\": \"100%\"\r\n },\r\n\r\n \"& .cwt-label\": {\r\n \"font-size\": \"14px\",\r\n \"font-weight\": \"600\",\r\n\r\n \"& + .cwt-input\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-8px\"\r\n }\r\n },\r\n\r\n \"& .cwt-input\": {\r\n \"margin-bottom\": \"24px\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFillToggleHover, neutralForegroundHint, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { reset } from \"../../utils/commonJssConstants\";\r\n\r\nexport const UGContentListStyles = (config: DesignSystem) => ({\r\n ugContentListContainer: {\r\n ...reset,\r\n width: \"768px\",\r\n \"max-width\": \"calc(100% - 40px)\",\r\n padding: \"40px 20px\",\r\n background: neutralLayerCard,\r\n \"border-radius\": \"8px\",\r\n\r\n \"& .cwt-buttons\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"auto\",\r\n display: \"flex\",\r\n padding: \"7px 0\",\r\n \"flex-wrap\": \"wrap\",\r\n\r\n \"& .cwt-fast-button\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"9px\"\r\n }\r\n },\r\n\r\n \"& .cwt-ug-content-list\": {\r\n padding: \"0\"\r\n },\r\n\r\n \"& .cwt-content-info\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n margin: \"16px 0\",\r\n padding: \"12px\",\r\n border: \"1px solid #DDDDDD\",\r\n \"border-radius\": \"8px\",\r\n\r\n \"& .cwt-content-image\": {\r\n margin: \"0\",\r\n \"object-fit\": \"cover\",\r\n width: \"68px\",\r\n height: \"45px\",\r\n border: \"none\",\r\n \"border-radius\": \"4px\"\r\n },\r\n\r\n \"& .cwt-ug-content-details\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"14px\",\r\n color: neutralFillToggleHover,\r\n\r\n \"& .cwt-content-title\": {\r\n \"font-size\": \"14px\",\r\n \"font-weight\": \"600\",\r\n color: neutralFillToggleHover\r\n },\r\n\r\n \"& .cwt-datetime\": {\r\n \"font-size\": \"12px\",\r\n color: neutralForegroundHint\r\n }\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst avatarSize = \"34px\";\r\nconst sidePadding = \"14px\";\r\nconst minCardWidth = \"240px\";\r\nconst bodyTextColor = \"#404040\";\r\n\r\nexport const ContentCardStyles = (config: DesignSystem) => ({\r\n contentCardContainer: {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"min-width\": minCardWidth,\r\n padding: \"0 \",\r\n background: neutralLayerCard,\r\n color: neutralForegroundRest,\r\n \"border-radius\": \"6px\",\r\n \"-webkit-box-shadow\": \"0px 0px 1px rgba(0, 0, 0, 0.05), 0px 0px 12px rgba(0, 0, 0, 0.08);\",\r\n \"-moz-box-shadow\": \"0px 0px 1px rgba(0, 0, 0, 0.05), 0px 0px 12px rgba(0, 0, 0, 0.08);\",\r\n \"box-shadow\": \"0px 0px 1px rgba(0, 0, 0, 0.05), 0px 0px 12px rgba(0, 0, 0, 0.08);\",\r\n\r\n \"& *.no-link:hover\": {\r\n \"text-decoration\": \"none\",\r\n cursor: \"default\"\r\n },\r\n\r\n \"& .cwt-user-header\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n padding: \"13px 13px 11px\",\r\n\r\n \"& .cwt-avatar-container\": {\r\n width: avatarSize,\r\n height: avatarSize,\r\n\r\n \"& .cwt-avatar\": {\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n height: avatarSize\r\n }\r\n },\r\n\r\n \"& .cwt-header-content\": {\r\n margin: \"-5px 8px 0\",\r\n\r\n \"& .cwt-name\": {\r\n \"font-size\": \"14px\",\r\n \"line-height\": \"16px\",\r\n \"font-weight\": \"600\",\r\n color: accentFillRest\r\n },\r\n\r\n \"& .cwt-datetime\": {\r\n \"font-size\": \"12px\",\r\n \"font-weight\": \"normal\",\r\n color: neutralForegroundHint\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-content-detail\": {\r\n \"& .cwt-image-container\": {\r\n \"& .cwt-content-image\": {\r\n width: \"100%\",\r\n \"max-width\": \"100%\"\r\n }\r\n },\r\n\r\n \"& .cwt-content-body\": {\r\n margin: sidePadding,\r\n \"font-size\": \"12px\",\r\n \"font-weight\": \"normal\",\r\n \"line-height\": \"16px\",\r\n color: neutralForegroundHint,\r\n \"letter-spacing\": applyLocalizedProperty(\"-0.24px\", \"0\", config.direction)\r\n }\r\n },\r\n\r\n \"& .cwt-social-container\": {\r\n padding: \"12px 17px 20px\",\r\n \"border-top\": \"1px solid #949494\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundHint, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst avatarSize = \"16px\";\r\nconst typingDotColor = \"#6B6B6B\";\r\nconst typingDotBgColor = \"#F1F1F1\";\r\n\r\nexport const TypingUsersStyles = (config: DesignSystem) => ({\r\n typingUsersContainer: {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n\r\n \"& .cwt-typer-name\": {\r\n display: \"inline-block\",\r\n \"white-space\": \"pre\"\r\n },\r\n\r\n \"& .cwt-typing-user-images\": {\r\n display: \"flex\",\r\n position: \"relative\",\r\n \"align-content\": \"center\",\r\n \"flex-direction\": \"row\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"5px\",\r\n\r\n \"& .cwt-typing-user-image\": {\r\n display: \"inline-block\",\r\n \"border-radius\": \"50%\",\r\n overflow: \"hidden\",\r\n border: \"3px solid \",\r\n \"border-color\": neutralLayerCard,\r\n\r\n \"&:hover\": {\r\n \"z-index\": \"3\"\r\n },\r\n\r\n \"& img\": {\r\n \"border-radius\": \"50%\",\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n height: avatarSize,\r\n display: \"block\",\r\n \"align-items\": \"center\"\r\n }\r\n },\r\n\r\n \"& .image0\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\",\r\n \"z-index\": \"2\"\r\n },\r\n\r\n \"& .image1\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-5px\",\r\n \"z-index\": \"1\"\r\n },\r\n\r\n \"& .image2\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-5px\",\r\n \"z-index\": \"0\"\r\n }\r\n },\r\n\r\n \"& .cwt-typing-users-text\": {\r\n \"align-content\": \"center\",\r\n \"align-items\": \"center\",\r\n color: neutralForegroundHint,\r\n display: \"flex\",\r\n \"font-size\": \"12px\",\r\n \"white-space\": \"pre\"\r\n },\r\n\r\n \"& .cwt-icon.cwt-typing-animation\": {\r\n overflow: \"hidden\",\r\n height: \"12px\",\r\n color: typingDotColor,\r\n background: typingDotBgColor,\r\n padding: \"0 3px\",\r\n margin: \"0 5px -1px\",\r\n \"border-radius\": \"6px 8px\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, isDarkMode, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\n\r\nexport const GradientOverlayStyles = (config: DesignSystem) => ({\r\n gradientOverlayContainer: {\r\n \"& .cwt-overlay\": {\r\n position: \"fixed\",\r\n width: \"100vw\",\r\n height: \"50vh\",\r\n bottom: \"0\",\r\n transition: \"opacity .4s ease !important\",\r\n cursor: \"pointer\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"0\",\r\n background: isDarkMode(config) ? \"linear-gradient(180deg, rgba(66, 66, 66, 0), rgba(66, 66, 66, 1))\" : \"linear-gradient(180deg, rgba(255, 255, 255, 0), #FFFFFF)\",\r\n \"z-index\": \"2147483645\"\r\n },\r\n\r\n \"& .cwt-overlay-active\": {\r\n opacity: \"1\"\r\n },\r\n\r\n \"& .cwt-overlay-inactive\": {\r\n opacity: \"0\"\r\n }\r\n },\r\n\r\n overlayButton: {\r\n padding: \"10px 100px\",\r\n border: \"1px solid\",\r\n color: accentFillRest,\r\n background: neutralLayerCard,\r\n margin: \"20px 0\",\r\n cursor: \"pointer\",\r\n \"font-size\": \"16px\",\r\n \"border-color\": accentFillRest,\r\n \"border-radius\": \"30px\",\r\n position: \"fixed\",\r\n \"z-index\": \"999999\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"50%\",\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"unset\",\r\n transform: applyLocalizedProperty(\"translateX(-50%)\", \"translateX(50%)\", config.direction),\r\n bottom: \"20px\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n DesignSystem,\r\n neutralFillStealthHover,\r\n neutralForegroundHint,\r\n neutralForegroundRest,\r\n neutralLayerCard\r\n} from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../../utils/enums\";\r\n\r\nconst avatarSize = \"54px\";\r\nconst avatarSizeL0 = \"78px\"; // responsıve level 0\r\nconst sidePadding = \"10px\";\r\nconst buttonHeight = \"36px\";\r\nconst borderColor = \"#DDDDDD\";\r\nconst inReviewMarkColor = \"#FFB900\";\r\nconst notAllowMarkColor = \"#E22C3B\";\r\nconst markSize = 20;\r\n\r\nexport const ProfileCardUserStatsStyles = (config: DesignSystem) => ({\r\n profileCardUserStatsContainer: {\r\n display: \"flex\",\r\n \"justify-content\": \"space-between\",\r\n margin: \"20px 0 16px\",\r\n\r\n \"& .cwt-stat \": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"flex-start\",\r\n\r\n \"& h6 \": {\r\n \"font-size\": \"13px\",\r\n \"font-weight\": \"normal\",\r\n opacity: \".65\"\r\n },\r\n\r\n \"& .cwt-stat-counter \": {\r\n \"margin-top\": \"4px\",\r\n \"font-size\": \"14px\",\r\n \"font-weight\": \"600\"\r\n }\r\n },\r\n\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"justify-content\": \"flex-start\",\r\n margin: \"8px 0 0\",\r\n\r\n \"& .cwt-stat \": {\r\n [applyLocalizedProperty(\r\n \"margin-right\",\r\n \"margin-left\",\r\n config.direction\r\n )]: \"25px\",\r\n\r\n \"&:last-child\": {\r\n [applyLocalizedProperty(\r\n \"margin-right\",\r\n \"margin-left\",\r\n config.direction\r\n )]: \"0\"\r\n }\r\n }\r\n }\r\n }\r\n});\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, isDarkMode } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const NavbarStyles = (config: DesignSystem) => ({\r\n navbarContainer: {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"space-between\",\r\n padding: \"0 16px\",\r\n\r\n \"& button.cwt-fast-button.cwt-navbar-button\": {\r\n padding: \"4px\",\r\n\r\n \"& .cwt-icon\": {\r\n color: isDarkMode(config) ? \"white\" : \"black\",\r\n \"font-size\": \"16px\"\r\n },\r\n\r\n \"& .cwt-icon-white\": {\r\n color: \"white\"\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundHint, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { backgroundColor } from \"@microsoft/fast-components-styles-msft\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { reset } from \"../../utils/commonJssConstants\";\r\n\r\nexport const PublisherProfilePageStyles = (config: DesignSystem) => ({\r\n publisherProfilePageContainer: {\r\n ...reset,\r\n display: \"flex\",\r\n \"flex-direction\": \"row\",\r\n \"align-items\": \"flex-start\",\r\n \"justify-content\": \"stretch\",\r\n \"min-width\": \"360px\",\r\n background: backgroundColor,\r\n\r\n \"& .cwt-publisher-profile-tabs-container\": {\r\n margin: \"3px 27px 56px\",\r\n flex: \"1\",\r\n \"max-width\": \"960px\"\r\n },\r\n\r\n /* RESPONSIVE CLASSES */\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"stretch\",\r\n\r\n \"& .cwt-publisher-profile-tabs-container\": {\r\n margin: \"9px 0 56px\",\r\n width: \"100%\"\r\n }\r\n }\r\n },\r\n infoPopover: {\r\n \"min-width\": \"190px\",\r\n height: \"75px\",\r\n \"box-sizing\": \"border-box\",\r\n \"text-align\": \"left\",\r\n margin: \"0\",\r\n padding: \"12px\",\r\n \"font-size\": \"13px\",\r\n color: neutralForegroundHint,\r\n background: neutralLayerCard,\r\n \"border-radius\": \"4px\",\r\n \"-webkit-box-shadow\": \"0px 12.8px 28.8px rgba(0, 0, 0, 0.13), 0px 0px 9.2px rgba(0, 0, 0, 0.11)\",\r\n \"-moz-box-shadow\": \"0px 12.8px 28.8px rgba(0, 0, 0, 0.13), 0px 0px 9.2px rgba(0, 0, 0, 0.11)\",\r\n \"box-shadow\": \"0px 12.8px 28.8px rgba(0, 0, 0, 0.13), 0px 0px 9.2px rgba(0, 0, 0, 0.11)\"\r\n }\r\n});\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, isDarkMode, neutralFillToggleHover, neutralForegroundHint, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { profileHrColor } from \"../../utils/commonJssConstants\";\r\n\r\nexport const PublisherProfileTabsStyles = (config: DesignSystem) => ({\r\n publisherProfileTabsContainer: {\r\n \"min-width\": \"320px\",\r\n margin: \"3px 3px 16px\",\r\n \"background-color\": neutralLayerCard,\r\n \"border-radius\": \"2px\",\r\n \"box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.11), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)\",\r\n\r\n \"& .cwt-publisher-profile-tabs\": {\r\n position: \"sticky\",\r\n top: \"0px\",\r\n \"z-index\": \"5\",\r\n margin: \"0\",\r\n padding: \"0 18px\",\r\n background: neutralLayerCard,\r\n \"border-bottom\": \"1px solid \",\r\n \"border-color\": profileHrColor, // No fast Color available\r\n \"overflow-x\": \"scroll\",\r\n \"list-style\": \"none\",\r\n\r\n \"&.disabled\": {\r\n \"pointer-events\": \"none\"\r\n },\r\n\r\n // 'Hide scrollbar'\r\n \"-ms-overflow-style\": \"none\",\r\n\r\n \"&::-webkit-scrollbar\": {\r\n display: \"none\"\r\n },\r\n\r\n \"& .cwt-tab-item\": {\r\n position: \"relative\",\r\n padding: \"15px 10px\",\r\n color: neutralFillToggleHover,\r\n\r\n \"&:first-child\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\"\r\n },\r\n\r\n \"&.active\": {\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest,\r\n \"font-weight\": \"600\",\r\n\r\n \"&:after\": {\r\n position: \"absolute\",\r\n \"z-index\": \"10\",\r\n content: \"' '\",\r\n height: \"3px\",\r\n width: \"100%\",\r\n \"margin-top\": \"calc(15px - 3px)\",\r\n [applyLocalizedProperty(\"left\", \"right\", config.direction)]: \"0\",\r\n background: accentFillRest\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: isDarkMode(config) ? \"#5CB6FF\" : accentFillRest\r\n }\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n color: \"inherit\",\r\n \"white-space\": \"nowrap\",\r\n height: \"18px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"4px\"\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: neutralForegroundRest,\r\n \"font-size\": \"13px\",\r\n\r\n \"&:before\": {\r\n display: \"inline-block\",\r\n content: \"' '\",\r\n width: \"4px\"\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-sortbox-container\": {\r\n margin: \"10px 18px 5px\",\r\n display: \"flex\",\r\n \"justify-content\": \"flex-end\",\r\n \"& .cwt-sort-value\": {\r\n \"font-weight\": \"normal\",\r\n color: neutralForegroundHint\r\n }\r\n },\r\n\r\n \"& .cwt-tab-content\": {\r\n position: \"relative\",\r\n display: \"flex\",\r\n \"flex-wrap\": \"wrap\",\r\n \"min-height\": \"60vh\",\r\n padding: \"0px 12px 10px\",\r\n\r\n \"& > div\": {\r\n margin: \"10px\"\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, accentFillRest, neutralForegroundRest, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { secondaryBorderColor } from \"../../utils/commonJssConstants\";\r\n\r\nconst avatarSize = \"54px\";\r\nconst borderColor = \"#DDDDDD\";\r\n\r\nexport const PublisherProfileCardStyles = (config: DesignSystem) => ({\r\n publisherProfileCardContainer: {\r\n position: \"sticky\",\r\n \"z-index\": \"10\",\r\n top: \"0px\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"stretch\",\r\n width: \"240px\",\r\n \"min-width\": \"240px\",\r\n margin: \"3px 0\",\r\n padding: \"0\",\r\n \"& .cwt-box\": {\r\n \"border-radius\": \"2px\",\r\n \"-webkit-box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.11), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)\",\r\n \"-moz-box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.11), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)\",\r\n \"box-shadow\": \"0px 0px 2.9px rgba(0, 0, 0, 0.11), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)\",\r\n background: neutralLayerCard,\r\n color: neutralForegroundRest,\r\n \"margin-bottom\": \"10px\",\r\n \"& > [class$='-container'] > .cwt-inner-container\": {\r\n padding: \"16px\"\r\n }\r\n },\r\n\r\n \"& .cwt-section\": {\r\n \"border-top\": \"1px solid\",\r\n \"border-color\": borderColor\r\n },\r\n\r\n \"& .cwt-title\": {\r\n color: neutralForegroundRest,\r\n \"text-align\": \"center\",\r\n \"font-size\": \"14px\"\r\n },\r\n\r\n \"& .cwt-button-container\": {\r\n display: \"flex\",\r\n \"justify-content\": \"center\",\r\n \"& button.cwt-fast-button\": {\r\n \"min-width\": \"100px\",\r\n padding: \"8px 20px\",\r\n \"& .cwt-icon\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"10px\"\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-user-info-container\": {\r\n \"& .cwt-user-info\": {\r\n \"& .cwt-avatar-container\": {\r\n \"& .cwt-avatar\": {\r\n \"min-width\": avatarSize,\r\n \"max-width\": avatarSize,\r\n height: avatarSize\r\n }\r\n },\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n\r\n \"& .cwt-user-header\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"space-between\",\r\n\r\n \"& .cwt-name-title\": {\r\n width: \"100%\",\r\n \"text-align\": \"center\",\r\n\r\n \"& .cwt-name\": {\r\n \"margin-top\": \"5px\",\r\n \"font-size\": \"24px\",\r\n \"font-weight\": \"600\"\r\n }\r\n }\r\n }\r\n },\r\n \"& .cwt-button-container\": {\r\n \"& button.outline-button-accent\": {\r\n color: accentFillRest,\r\n \"border-color\": accentFillRest,\r\n \"& .cwt-icon\": {\r\n color: accentFillRest\r\n }\r\n }\r\n }\r\n },\r\n \"& .cwt-action-panel-container\": {\r\n \"& .action-panel-header\": {\r\n \"text-align\": \"center\"\r\n },\r\n \"& .cwt-action-panel\": {\r\n \"& .cwt-button-container\": {\r\n \"& button.cwt-fast-button\": {\r\n width: \"100%\"\r\n },\r\n \"& button.button-inactive\": {\r\n \"& .cwt-icon\": {\r\n color: \"white\"\r\n }\r\n }\r\n }\r\n },\r\n \"& .cwt-action-panel-text-container\": {\r\n display: \"flex\",\r\n \"justify-content\": \"center\",\r\n\r\n \"& .cwt-link\": {\r\n margin: \"8px 0 0\",\r\n \"font-size\": \"12px\",\r\n color: accentFillRest\r\n }\r\n }\r\n },\r\n \"& .cwt-about-panel-container\": {\r\n \"& .cwt-about-text\": {\r\n \"font-size\": \"12px\",\r\n \"line-height\": \"20px\",\r\n margin: \"0\"\r\n }\r\n },\r\n \"& .cwt-social-panel-container\": {\r\n \"& .cwt-social\": {\r\n display: \"flex\",\r\n \"& .cwt-share-text\": {\r\n \"font-size\": \"12px\",\r\n \"font-weight\": \"600\",\r\n color: \"#919191\",\r\n \"line-height\": \"16px\",\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"5px\"\r\n },\r\n \"& .cwt-share-buttons\": {\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"& .cwt-fast-icon-button\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"12px\",\r\n height: \"unset\",\r\n \"font-size\": \"16px\",\r\n padding: \"0\",\r\n \"min-width\": \"unset\",\r\n \"& .cwt-icon\": {\r\n color: \"#8A8886\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"& .cwt-fast-icon-button\": {\r\n \"& .cwt-icon\": {\r\n \"font-size\": \"16px\"\r\n }\r\n },\r\n [`&.${enums.responsiveLevels.L0}`]: {\r\n width: \"100%\",\r\n position: \"static\"\r\n }\r\n },\r\n alreadySubscribedPopoverContainer: {\r\n bottom: \"50px\",\r\n [applyLocalizedProperty(\r\n \"left\",\r\n \"right\",\r\n config.direction\r\n )]: \"180px\"\r\n }\r\n});\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n DesignSystem,\r\n neutralFillStealthHover,\r\n neutralForegroundHint,\r\n neutralForegroundRest,\r\n neutralLayerCard\r\n} from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../../utils/enums\";\r\n\r\nconst avatarSize = \"54px\";\r\nconst avatarSizeL0 = \"78px\"; // responsıve level 0\r\nconst sidePadding = \"10px\";\r\nconst buttonHeight = \"36px\";\r\nconst borderColor = \"#DDDDDD\";\r\nconst inReviewMarkColor = \"#FFB900\";\r\nconst notAllowMarkColor = \"#E22C3B\";\r\nconst markSize = 20;\r\n\r\nexport const PublisherProfileCardStatsStyles = (config: DesignSystem) => ({\r\n publisherProfileCardStatsContainer: {\r\n display: \"flex\",\r\n \"justify-content\": \"center\",\r\n\r\n \"& .cwt-stat\": {\r\n \"margin-top\": \"10px\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"flex-start\",\r\n\r\n \"& .cwt-stat-counter \": {\r\n \"font-size\": \"14px\"\r\n }\r\n }\r\n },\r\n\r\n followersDefinitionPopoverContainer: {\r\n bottom: \"25px\",\r\n [applyLocalizedProperty(\r\n \"left\",\r\n \"right\",\r\n config.direction\r\n )]: \"5px\"\r\n }\r\n});\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFillStealthActive, neutralForegroundHint, neutralForegroundRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../utils/enums\";\r\nimport { profileHrColor } from \"../../utils/commonJssConstants\";\r\n\r\nexport const ProfileSubscriptionStyles = (config: DesignSystem) => ({\r\n profileSubscriptionsContainer: {\r\n \"& .subs-history-title\": {\r\n padding: \"15px 24px\",\r\n \"font-size\": \"16px\",\r\n \"font-weight\": \"600\",\r\n display: \"flex\",\r\n \"border-top\": \"1px solid\",\r\n \"border-bottom\": \"1px solid\",\r\n \"border-color\": profileHrColor,\r\n color: neutralForegroundRest\r\n },\r\n \"& .cwt-subscriptions-fetch-error\": {\r\n padding: \"15px 24px\",\r\n color: neutralForegroundRest\r\n }\r\n },\r\n\r\n profileSubscriptionsSuperAppContainer: {},\r\n subscriptionHistoryContainer: {\r\n \"margin-bottom\": \"35px\",\r\n \"box-shadow\": \"0px 1.6px 3.6px rgba(0, 0, 0, 0.13), 0px 0px 2.9px rgba(0, 0, 0, 0.11)\",\r\n \"border-radius\": \"2px\",\r\n \"& .subs-empty-state-container\": {\r\n width: \"100%\",\r\n height: \"100px\",\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"justify-content\": \"center\",\r\n \"text-align\": \"center\",\r\n \"& .empty-state-text\": {\r\n \"font-size\": \"24px\",\r\n color: neutralForegroundHint\r\n }\r\n }\r\n },\r\n\r\n subscriptionContainer: {\r\n padding: \"20px 24px\",\r\n \"border-bottom\": \"1px solid\",\r\n \"border-color\": profileHrColor,\r\n \"& .subs-body\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"row\",\r\n \"align-items\": \"center\",\r\n \"& .publisher-info-container\": {\r\n \"font-size\": \"14px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"16px\",\r\n \"& .publisher-name\": {\r\n \"font-weight\": \"600\",\r\n color: neutralForegroundRest\r\n },\r\n \"& .publisher-address\": {\r\n color: neutralForegroundHint\r\n }\r\n },\r\n \"& .subs-image-container\": {\r\n height: \"42px\",\r\n width: \"42px\",\r\n \"& .publisher-profile-img\": {\r\n height: \"42px\",\r\n width: \"42px\",\r\n \"border-radius\": \"4px\"\r\n }\r\n },\r\n \"& .action-button-container\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"auto\",\r\n \"& button.button-active\": {\r\n \"& .cwt-icon\": {\r\n \"font-size\": \"18px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"10px\"\r\n }\r\n }\r\n }\r\n },\r\n \"& .subs-footer\": {\r\n \"margin-top\": \"20px\",\r\n color: neutralForegroundHint,\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"font-size\": \"12px\",\r\n \"& .footer-tag\": {\r\n padding: \"5px 10px\",\r\n background: neutralFillStealthActive,\r\n \"border-radius\": \"4px\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"12px\"\r\n },\r\n \"& .footer-action\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"auto\",\r\n \"& .transaction-history-trigger\": {\r\n cursor: \"pointer\",\r\n display: \"flex\",\r\n \"& .cwt-title\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"10px\"\r\n },\r\n \"& .cwt-icon\": {\r\n transition: \".2s ease-in-out\"\r\n },\r\n \"& .cwt-icon-rotated\": {\r\n transform: \"rotate(180deg)\"\r\n }\r\n }\r\n }\r\n },\r\n \"& .subs-transactions\": {\r\n margin: \"20px -24px 0\",\r\n padding: \"0 24px\",\r\n transition: \".4s ease-in-out\",\r\n \"overflow-y\": \"hidden\",\r\n \"& .transaction-container\": {\r\n margin: \"0 -24px\",\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n color: neutralForegroundHint,\r\n \"font-size\": \"13px\",\r\n \"border-top\": \"1px solid\",\r\n \"border-color\": profileHrColor,\r\n padding: \"20px 35px\",\r\n \"& .cwt-icon\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"16px\",\r\n \"font-size\": \"24px\"\r\n },\r\n \"&:last-child\": {\r\n \"padding-bottom\": \"0\"\r\n }\r\n }\r\n },\r\n \"& .transactions-collapsed\": {\r\n \"max-height\": \"0\",\r\n \"margin-top\": \"0\"\r\n },\r\n\r\n \"& .transactions-expanded\": {\r\n \"max-height\": \"500px\"\r\n },\r\n\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"& .subs-body\": {\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"& .publisher-info-container\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\",\r\n \"text-align\": \"center\",\r\n \"margin-top\": \"10px\"\r\n },\r\n \"& .action-button-container\": {\r\n \"margin-top\": \"10px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\"\r\n }\r\n },\r\n \"& .subs-footer\": {\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"& .payment-info\": {\r\n \"margin-top\": \"20px\"\r\n },\r\n \"& .footer-action\": {\r\n \"margin-top\": \"20px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\"\r\n }\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundHint } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { fontFamily } from \"../../utils/commonJssConstants\";\r\nimport { getEmojiMask, getEmojiStylesByWidth } from \"../../utils/emojiIcons\";\r\n\r\nconst emojiSize = 16;\r\n\r\nexport const MostReactionsStyles = (config: DesignSystem) => ({\r\n mostReactionsContainer: {\r\n \"font-family\": fontFamily,\r\n display: \"flex\",\r\n \"align-items\": \"center\",\r\n \"min-height\": \"20px\",\r\n background: \"none\",\r\n padding: \"0\",\r\n overflow: \"visible\",\r\n position: \"relative\",\r\n height: \"auto\",\r\n border: \"none\",\r\n cursor: \"pointer\",\r\n\r\n \"& div.emoji-icon\": {\r\n ...getEmojiStylesByWidth(16),\r\n transition: \"none\"\r\n },\r\n\r\n \"&:hover:enabled\": {\r\n background: \"none\"\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n padding: \"0 4px\",\r\n \"font-size\": `${emojiSize}px !important`,\r\n \"align-items\": \"flex-start\",\r\n\r\n \"& .cwt-icon-label\": {\r\n padding: \"0\",\r\n margin: \"1px 0 0\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"3px\",\r\n \"font-size\": \"13px\",\r\n \"line-height\": \"1\"\r\n },\r\n\r\n \"& .emoji-icon\": {\r\n \"&:last-child\": {\r\n },\r\n\r\n \"&:nth-child(1)\": {\r\n \"z-index\": 2\r\n },\r\n \"&:nth-child(2)\": {\r\n \"z-index\": 1\r\n },\r\n \"&:nth-child(3)\": {\r\n \"z-index\": 0\r\n }\r\n }\r\n }\r\n },\r\n seperatorV: {\r\n \"font-size\": \"11px\",\r\n \"font-weight\": \"100\",\r\n color: neutralForegroundHint,\r\n margin: applyLocalizedProperty(\"-5px 12px 0 -2px\", \"-5px -2px 0 12px\", config.direction),\r\n opacity: \".55\"\r\n },\r\n likeMask: {\r\n \"-webkit-mask-image\": `${getEmojiMask([applyLocalizedProperty(\"likeMaskImage\", \"likeMaskImageRTL\", config.direction)].join(), emojiSize)}`,\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-3px\"\r\n },\r\n loveMask: {\r\n \"-webkit-mask-image\": `${getEmojiMask([applyLocalizedProperty(\"loveMaskImage\", \"loveMaskImageRTL\", config.direction)].join(), emojiSize)}`,\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-3px\"\r\n },\r\n circleMask: {\r\n \"-webkit-mask-image\": `${getEmojiMask([applyLocalizedProperty(\"circleMaskImage\", \"circleMaskImageRTL\", config.direction)].join(), emojiSize)}`,\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"-3px\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFillHover, neutralForegroundHint, neutralForegroundRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { secondaryBorderColor } from \"../utils/commonJssConstants\";\r\n\r\nexport const PublisherSubscribeFollowButtonStyles = (config: DesignSystem) => ({\r\n publisherSubscribeFollowButtonContainer: {\r\n display: \"flex\",\r\n \"flex-direction\": \"row\",\r\n background: \"none\",\r\n padding: \"8px 16px\",\r\n \"font-size\": \"12px\",\r\n \"border-radius\": \"20px\",\r\n \"align-items\": \"center\",\r\n cursor: \"pointer\",\r\n \"& .cwt-icon\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"10px\"\r\n }\r\n },\r\n publisherSubscribeFollowButtonInactiveContainer: {\r\n border: \"1px solid\",\r\n color: \"white\",\r\n \"border-color\": secondaryBorderColor,\r\n\r\n \"&:hover\": {\r\n \"background-color\": neutralFillHover,\r\n \"border-color\": neutralForegroundRest,\r\n color: neutralForegroundHint\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n color: \"currentColor\"\r\n }\r\n },\r\n publisherSubscribeFollowButtonActiveContainer: {\r\n color: \"#63ADE5\",\r\n border: \"none\",\r\n \"& .cwt-icon\": {\r\n color: \"currentColor\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const CommonSuperAppStyles = (config: DesignSystem) => ({\r\n mainSuperAppContainer: {\r\n \"& .cwt-fast-button, input.cwt-fast-button, button.cwt-fast-button\": {\r\n \"border-radius\": \"20px\",\r\n \"background-color\": \"linear-gradient(87.44deg, #3D6CDC -5.38%, #625ABA 103.44%)\",\r\n \"font-weight\": \"600\"\r\n },\r\n\r\n \"& a:hover, .cwt-link:hover:not(.cwt-fast-button), .cwt-link.cwt-icon:hover\": {\r\n \"text-decoration\": \"none\"\r\n },\r\n\r\n \"& .cwt-switch\": {\r\n \"& input\": {\r\n \"&:checked + .cwt-switch-slider\": {\r\n background: \"linear-gradient(82.21deg, #3D6CDC -1.34%, #625ABA 97.29%)\"\r\n }\r\n }\r\n }\r\n },\r\n mainInSuperappModal: {\r\n \"overflow-y\": \"auto\",\r\n display: \"flex\",\r\n \"align-items\": \"flex-start\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { enums } from \"../../../utils/enums\";\r\n\r\nexport const CommentSuperAppStyles = (config: DesignSystem) => ({\r\n commentSuperAppContainer: {\r\n [`&.${enums.responsiveLevels.MobilePopup}`]: {\r\n \"margin-left\": \"0\",\r\n \"margin-right\": \"0\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { enums } from \"../../../../utils/enums\";\r\nimport { isDarkMode } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const ProfilePageSuperAppStyles = (config: DesignSystem) => ({\r\n profilePageSuperAppContainer: {\r\n\r\n /* RESPONSIVE CLASSES */\r\n [\"&, &.\" + enums.responsiveLevels.L0]: {\r\n height: \"calc(100vh - 20px)\",\r\n \"max-height\": \"calc(100vh - 20px)\",\r\n \"box-sizing\": \"border-box\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"stretch\",\r\n \"overflow-y\": \"scroll\",\r\n \"padding-top\": \"30px\",\r\n background: isDarkMode(config) ? \"#181818\" : \"linear-gradient(87.44deg, #3D6CDC -5.38%, #625ABA 103.44%)\",\r\n\r\n \"& .cwt-profile-tabs-container\": {\r\n margin: \"0\",\r\n \"max-width\": \"100%\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\"\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n DesignSystem\r\n} from \"@microsoft/fast-components-styles-msft\";\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../../../../utils/enums\";\r\n\r\nexport const ProfileCardUserStatsSuperAppStyles = (config: DesignSystem) => ({\r\n profileCardUserStatsSuperAppContainer: {\r\n \"justify-content\": \"center\",\r\n margin: \"8px 0 0\",\r\n \"& .cwt-stat\": {\r\n color: \"white\",\r\n \"flex-direction\": \"row\",\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"22px\",\r\n \"align-items\": \"flex-end\",\r\n\r\n \"&:last-child\": {\r\n [applyLocalizedProperty(\r\n \"margin-right\",\r\n \"margin-left\",\r\n config.direction\r\n )]: \"0\"\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n color: \"white\",\r\n opacity: \"0.6\"\r\n },\r\n\r\n \"& .cwt-stat-counter\": {\r\n \"margin-top\": \"0\",\r\n \"font-size\": \"15px\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"9px\",\r\n \"line-height\": \"20px\",\r\n \"font-weight\": \"500\"\r\n }\r\n\r\n },\r\n \"&.cwt-stats-others\": {\r\n \"& .cwt-stat\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"25px\",\r\n\r\n \"& .cwt-icon\": {\r\n \"font-size\": \"16px\"\r\n },\r\n \"& .cwt-stat-counter\": {\r\n \"font-size\": \"15px\",\r\n \"line-height\": \"20px\"\r\n }\r\n }\r\n },\r\n\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"& .cwt-stat\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"22px\"\r\n },\r\n \"&.cwt-stats-others\": {\r\n \"& .cwt-stat\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"22px\",\r\n\r\n \"& .cwt-icon\": {\r\n \"font-size\": \"13px\"\r\n },\r\n \"& .cwt-stat-counter\": {\r\n \"font-size\": \"12px\",\r\n \"line-height\": \"16px\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n});\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DarkModeBackgroundColor, LightModeBackgroundColor } from \"@msnews/experiences-base\";\r\nimport { DesignSystem, isDarkMode, neutralForegroundRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../../../utils/enums\";\r\n\r\nconst tabItemVerticalPadding = 13;\r\nconst tabItemIconSize = 18;\r\n\r\nexport const ProfileTabsSuperAppStyles = (config: DesignSystem) => ({\r\n profileTabsSuperAppContainer: {\r\n \"min-width\": \"320px\",\r\n margin: \"0px 3px 16px\",\r\n background: \"inherit\",\r\n \"box-shadow\": \"none\",\r\n\r\n \"& .cwt-profile-tabs\": {\r\n background: \"inherit\",\r\n \"min-height\": `${2 * tabItemVerticalPadding + tabItemIconSize}px`,\r\n \"border-bottom\": \"none\",\r\n padding: \"0 16px\",\r\n top: \"-30px\", // Profile page padding\r\n \"& .cwt-tab-item:hover\": {\r\n background: \"none\"\r\n },\r\n\r\n \"&.demo\": {\r\n top: \"-30px\" // Profile page padding\r\n },\r\n\r\n \"& .cwt-tab-item\": {\r\n padding: `${tabItemVerticalPadding}px 60px`,\r\n margin: \"0 3px\",\r\n\r\n \"&.active\": {\r\n\r\n \"&:after\": {\r\n background: \"#F6F9FF\",\r\n \"border-radius\": \"1.5px\",\r\n opacity: \"0.8\",\r\n \"margin-top\": \"calc(13px - 3px)\"\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: \"white\",\r\n opacity: \"1\",\r\n \"font-weight\": \"500\"\r\n }\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n \"text-transform\": \"uppercase\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\",\r\n\r\n \"& .cwt-icon-vector\": {\r\n display: \"none\"\r\n }\r\n },\r\n\r\n \"& .cwt-icon-label\": {\r\n color: \"white\",\r\n opacity: \"0.6\",\r\n \"font-size\": \"13px\",\r\n \"font-weight\": \"500\",\r\n padding: \"0\",\r\n\r\n \"&:before\": {\r\n width: \"0\"\r\n }\r\n }\r\n }\r\n },\r\n \"& .cwt-tab-content\": {\r\n background: isDarkMode(config) ? DarkModeBackgroundColor : LightModeBackgroundColor,\r\n \"border-radius\": \"0\",\r\n \"flex-grow\": \"1\",\r\n \"padding-top\": \"16px\"\r\n },\r\n\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"& .cwt-profile-tabs\": {\r\n top: \"-30px\", // Profile page padding\r\n \"& .cwt-tab-item\": {\r\n padding: `${tabItemVerticalPadding}px 9px`\r\n }\r\n },\r\n \"& .cwt-tab-content\": {\r\n background: isDarkMode(config) ? \"#181818\" : \"#FFFFFF\",\r\n \"border-radius\": \"20px 20px 0 0\",\r\n \"padding-top\": \"0\"\r\n }\r\n }\r\n },\r\n profileLockedSuperAppContainer: {\r\n \"border-radius\": \"20px 20px 0 0\",\r\n background: isDarkMode(config) ? \"#181818\" : \"#FFFFFF\",\r\n \"margin-top\": \"20px\",\r\n height: \"70vh\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"justify-content\": \"center\",\r\n \"align-items\": \"center\",\r\n padding: \"0 0px 12vw\",\r\n \"flex-grow\": \"1\",\r\n\r\n \"& .cwt-message\": {\r\n \"margin-top\": \"16px\",\r\n \"font-size\": \"15px\",\r\n \"line-height\": \"20px\",\r\n color: neutralForegroundRest\r\n }\r\n },\r\n\r\n profileEmptyTabSuperAppContainer: {\r\n \"padding-left\": \"16px\",\r\n \"padding-right\": \"16px\",\r\n \"flex-grow\": \"1\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, isDarkMode } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../../../utils/enums\";\r\n\r\nconst sidePadding = \"10px\";\r\n\r\nexport const ProfileCardSuperAppStyles = (config: DesignSystem) => ({\r\n profileCardSuperAppContainer: {\r\n \"-webkit-box-shadow\": \"none\",\r\n \"-moz-box-shadow\": \"none\",\r\n \"box-shadow\": \"none\",\r\n background: \"transparent\",\r\n margin: \"0\",\r\n position: \"static\",\r\n padding: \"17px 20px 0\",\r\n width: \"auto\",\r\n \"min-width\": \"calc(320px - 2 * \" + sidePadding + \")\",\r\n\r\n \"& .cwt-avatar-container\": {\r\n height: \"64px\",\r\n \"& .cwt-avatar\": {\r\n \"min-width\": \"64px\",\r\n \"max-width\": \"64px\",\r\n height: \"64px\"\r\n }\r\n },\r\n\r\n \"& .cwt-user-info\": {\r\n \"& .cwt-user-header\": {\r\n \"& .cwt-name-title\": {\r\n width: \"auto\",\r\n margin: \"8px 0\",\r\n \"& .cwt-name\": {\r\n \"margin-top\": \"0\",\r\n \"font-size\": \"26px\",\r\n color: \"white\",\r\n \"line-height\": \"31px\",\r\n \"letter-spacing\": applyLocalizedProperty(\"0.35px\", \"0\", config.direction)\r\n },\r\n \"&.cwt-name-title-self\": {\r\n \"margin-top\": \"9px\"\r\n }\r\n }\r\n }\r\n },\r\n \"& .cwt-action-panel\": {\r\n \"padding-bottom\": \"7px\",\r\n border: \"none\",\r\n margin: \"0 -18px\",\r\n display: \"flex\",\r\n \"justify-content\": \"center\",\r\n \"& .cwt-link\": {\r\n \"& .cwt-icon\": {\r\n color: \"white\",\r\n \"& .cwt-icon-label\": {\r\n color: \"white\"\r\n }\r\n }\r\n },\r\n \"& .cwt-other-profile-settings\": {\r\n \"justify-content\": \"center\",\r\n \"& .cwt-fast-button, .cwt-button-no-access\": {\r\n \"box-shadow\": \"0px 0px 4px rgba(0, 0, 0, 0.04)\",\r\n background: isDarkMode(config) ? \"#6794d7\": \"white\",\r\n color: isDarkMode(config) ? \"#FFFFFF\":\"#3D6CDC\"\r\n }\r\n }\r\n },\r\n\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n padding: \"17px 20px 0\",\r\n\r\n \"& .cwt-avatar-container\": {\r\n height: \"72px\",\r\n \"& .cwt-avatar\": {\r\n \"min-width\": \"72px\",\r\n \"max-width\": \"72px\",\r\n height: \"72px\"\r\n }\r\n },\r\n\r\n \"& .cwt-action-panel\": {\r\n \"justify-content\": \"flex-start\",\r\n \"& .cwt-other-profile-settings\": {\r\n \"justify-content\": \"flex-start\"\r\n }\r\n },\r\n\r\n \"& .cwt-user-info\": {\r\n \"& .cwt-user-header\": {\r\n \"& .cwt-name-title\": {\r\n width: \"100%\",\r\n margin: \"0 12px\",\r\n \"& .cwt-name\": {\r\n \"font-size\": \"22px\",\r\n \"line-height\": \"26px\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n});\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, isDarkMode } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../../../utils/enums\";\r\nimport { neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const ProfileActivitySuperAppStyles = (config: DesignSystem) => ({\r\n profileActivitySuperAppContainer: {\r\n background: neutralLayerCard,\r\n \"margin-bottom\": \"16px\",\r\n \"box-shadow\": \"0px 0px 1px rgba(0, 0, 0, 0.05), 0px 0px 12px rgba(0, 0, 0, 0.08)\",\r\n \"border-radius\": \"6px\",\r\n padding: \"16px\",\r\n \"max-width\": \"75vw\",\r\n width: \"75vw\",\r\n\r\n \"& .cwt-name.cwt-link\": {\r\n \"font-weight\": \"normal\"\r\n },\r\n\r\n \"& .cwt-link\": {\r\n \"font-weight\": \"normal\"\r\n },\r\n\r\n \"& .cwt-body\": {\r\n \"& .cwt-show-clamped-btn\": {\r\n background: isDarkMode(config) ? \"#343434\" : \"#f7f7f7\"\r\n }\r\n },\r\n\r\n \"&.new\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\",\r\n \"border-radius\": \"12px\"\r\n },\r\n\r\n \"& .cwt-start\": {\r\n width: \"32px\",\r\n \"justify-content\": \"center\",\r\n \"min-width\": \"32px\",\r\n \"& .cwt-avatar\": {\r\n height: \"32px\",\r\n \"min-width\": \"32px\",\r\n width: \"32px\"\r\n }\r\n },\r\n\r\n \"& .cwt-mid\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"12px\",\r\n width: \"100%\",\r\n \"& .cwt-text\": {\r\n \"& .cwt-body\": {\r\n background: isDarkMode(config) ? \"#343434\" : \"#f7f7f7\",\r\n margin: applyLocalizedProperty(\"12px 0 10px -12px\", \"12px -12px 10px 0\", config.direction),\r\n \"& .cwt-name.cwt-link\": {\r\n color: isDarkMode(config) ? \"#8AC9FF\" :\"#005599\"\r\n }\r\n }\r\n }\r\n },\r\n \"& .cwt-end\": {\r\n padding: \"0\"\r\n },\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n \"max-width\": \"100%\",\r\n width: \"auto\",\r\n \"border-radius\": \"12px\"\r\n }\r\n },\r\n\r\n profileActivityListSuperAppContainer: {\r\n padding: \"16px\",\r\n background: \"transparent\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n display: \"block\"\r\n }\r\n },\r\n\r\n profileActivityFollowSuperAppContainer: {\r\n \"& .cwt-end\": {\r\n \"padding-left\": \"12px\"\r\n }\r\n },\r\n profileActivityReactionSuperAppContainer: {},\r\n profileActivityReplySuperAppContainer: {}\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DarkModeBackgroundColor, LightModeBackgroundColor } from \"@msnews/experiences-base\";\r\nimport { DesignSystem, isDarkMode } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../../../utils/enums\";\r\nimport { neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const ProfileCommentsSuperAppStyles = (config: DesignSystem) => ({\r\n profileCommentsSuperAppContainer: {\r\n margin: \"0\",\r\n padding: \"16px\",\r\n \"border-radius\": \"20px 20px 0 0\",\r\n background: isDarkMode(config) ? DarkModeBackgroundColor : LightModeBackgroundColor,\r\n\r\n \"& .cwt-profile-comment-item-list\": {\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\"\r\n },\r\n\r\n \"& .cwt-profile-comment\": {\r\n \"max-width\": \"75vw\",\r\n width: \"75vw\",\r\n padding: \"16px\",\r\n border: \"none\",\r\n \"border-radius\": \"6px\",\r\n \"margin-bottom\": \"16px\",\r\n \"box-shadow\": applyLocalizedProperty(\"0px 0px 1px rgba(0, 0, 0, 0.05), 0px 0px 12px rgba(0, 0, 0, 0.08)\", \"0px 12.8px 28.8px rgba(0, 0, 0, 0.13), 0px 0px 9.2px rgba(0, 0, 0, 0.11)\", config.direction),\r\n background: neutralLayerCard,\r\n\r\n \"& .cwt-header\": {\r\n \"& .cwt-title\": {\r\n \"font-size\": \"15px\"\r\n },\r\n\r\n \"& .cwt-posted-at\": {\r\n color: isDarkMode(config) ? \"#ffffff\" : \"#212121\",\r\n \"font-size\": \"15px\"\r\n },\r\n\r\n \"& .dot-before:before\": {\r\n opacity: \"1\",\r\n margin: \"0 4px\"\r\n },\r\n\r\n \"& .cwt-comment-config-container\": {\r\n \"& .cwt-icon\": {\r\n color: \"#919191\"\r\n },\r\n margin: \"-5px\",\r\n padding: \"5px\"\r\n }\r\n },\r\n\r\n \"& .cwt-message\": {\r\n color: isDarkMode(config) ? \"white\" : \"#6E6E6E\",\r\n \"font-size\": \"15px\",\r\n \"letter-spacing\": applyLocalizedProperty(\"-0.24px\", \"0\", config.direction),\r\n\r\n \"& .cwt-show-clamped-btn\": {\r\n color: isDarkMode(config) ? \"#6794D7\" : \"#3D6CDC\"\r\n }\r\n },\r\n\r\n \"& .cwt-engagements\": {\r\n \"& .cwt-replies-link\": {\r\n color: isDarkMode(config) ? \"#6794D7\" : \"#3D6CDC\",\r\n \"font-size\": \"12px\"\r\n },\r\n\r\n \"& .cwt-reaction-counts\": {\r\n \"& > .cwt-icon\": {\r\n \"font-size\": \"15px !important\",\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"12px\"\r\n },\r\n \"& .cwt-icon-vector\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"0\"\r\n }\r\n }\r\n }\r\n },\r\n\r\n \"& .cwt-content-info\": {\r\n padding: \"8px\",\r\n border: \"1px solid\",\r\n \"border-color\": isDarkMode(config) ? \"rgba(255, 255, 255, 0.08)\" : \"#DDDDDD\",\r\n\r\n \"& .cwt-content-image\": {\r\n width: \"64px\"\r\n },\r\n\r\n \"& .cwt-content-title\": {\r\n color: isDarkMode(config) ? \"white\" : \"#212121\",\r\n \"font-weight\": \"normal\",\r\n \"font-size\": \"13px\"\r\n }\r\n }\r\n },\r\n\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n background: isDarkMode(config) ? \"#181818\" : \"#FFFFFF\",\r\n \"& .cwt-profile-comment-item-list\": {\r\n display: \"contents\"\r\n },\r\n \"& .cwt-profile-comment\": {\r\n \"border-radius\": \"12px\",\r\n \"max-width\": \"100%\",\r\n width: \"auto\"\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const FollowButtonSuperAppStyles = (config: DesignSystem) => ({\r\n followButtonSuperAppContainer: {\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DarkModeBackgroundColor, LightModeBackgroundColor } from \"@msnews/experiences-base\";\r\nimport { DesignSystem, isDarkMode, neutralFillSelected, neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { enums } from \"../../../../utils/enums\";\r\n\r\nexport const ProfileUsersSuperAppStyles = (config: DesignSystem) => ({\r\n profileUsersSuperAppContainer: {\r\n background: isDarkMode(config) ? DarkModeBackgroundColor : LightModeBackgroundColor,\r\n \"border-radius\": \"20px\",\r\n display: \"flex\",\r\n \"flex-direction\": \"column\",\r\n \"align-items\": \"center\",\r\n \"padding-bottom\": \"50px\",\r\n \"& .cwt-profile-user\": {\r\n background: neutralLayerCard,\r\n padding: \"16px 19px\",\r\n \"max-width\": \"75vw\",\r\n width: \"75vw\",\r\n border: \"none\",\r\n \"border-radius\": \"6px\",\r\n \"box-shadow\": \"0px 0px 0.8px rgba(0, 0, 0, 0.13), 0px 2px 10px rgba(0, 0, 0, 0.08)\",\r\n\r\n \"margin-top\": \"16px\",\r\n \"& .cwt-avatar\": {\r\n margin: \"0\"\r\n },\r\n\r\n \"& .cwt-user-info\": {\r\n\r\n \"& .cwt-name\": {\r\n \"font-size\": \"15px\",\r\n \"font-weight\": \"normal\"\r\n },\r\n \"& .cwt-stat\": {\r\n \"font-size\": \"12px\",\r\n \"margin-top\": \"8px\"\r\n }\r\n }\r\n },\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n display: \"block\",\r\n background: isDarkMode(config) ? \"#181818\" : \"#FFFFFF\",\r\n \"& .cwt-profile-user\": {\r\n \"border-bottom\": \"1px solid\",\r\n \"border-color\": neutralFillSelected,\r\n background: \"none\",\r\n \"margin-top\": \"0\",\r\n \"max-width\": \"100%\",\r\n width: \"auto\",\r\n \"box-shadow\": \"none\",\r\n \"border-radius\": \"0\"\r\n }\r\n }\r\n },\r\n profileEmptyMessageSuperAppContainer: {\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralForegroundRest } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../../../utils/enums\";\r\nimport { neutralLayerCard } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nconst padding = 19;\r\nexport const ProfilePrivacySuperAppStyles = (config: DesignSystem) => ({\r\n profilePrivacySuperAppContainer: {\r\n margin: \"16px auto\",\r\n \"border-radius\": \"6px\",\r\n padding: `${padding}px`,\r\n \"max-width\": \"75vw\",\r\n width: \"75vw\",\r\n background: neutralLayerCard,\r\n \"box-shadow\": \"0px 0px 0.8px rgba(0, 0, 0, 0.13), 0px 2px 10px rgba(0, 0, 0, 0.08)\",\r\n\r\n \"& .cwt-private-switch\": {\r\n display: \"block\",\r\n\r\n \"& .cwt-switch-label\": {\r\n margin: \"0 0 15px 0\",\r\n \"font-weight\": \"500\"\r\n },\r\n\r\n \"& .cwt-switch\": {\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: \"0\"\r\n }\r\n },\r\n \"& .cwt-h-seperator\": {\r\n margin: `${padding}px -${padding}px`,\r\n background: \"rgba(143, 158, 205, 0.2)\"\r\n },\r\n\r\n [\"&.\" + enums.responsiveLevels.L0]: {\r\n margin: \"0\",\r\n \"box-shadow\": \"none\",\r\n width: \"auto\",\r\n \"max-width\": \"initial\",\r\n background: \"none\",\r\n \"border-radius\": \"0\"\r\n }\r\n\r\n },\r\n\r\n profileDataSuperAppContainer: {\r\n \"& .cwt-title\": {\r\n \"font-weight\": \"500\"\r\n },\r\n\r\n \"& .cwt-description\": {\r\n color: neutralForegroundRest,\r\n margin: \"16px 0\"\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const ContentSocialBarSuperAppStyles = (config: DesignSystem) => ({\r\n contentSocialBarSuperAppContainer: {\r\n padding: \"72px 16px 0\",\r\n margin: \"5px 0 0\"\r\n },\r\n\r\n contentReactionPopoversSuperAppContainer: {\r\n left: \"0\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nexport const ReactionBreakdownSuperAppStyles = (config: DesignSystem) => ({\r\n reactionBreakdownSuperAppContainer: {\r\n \"& .cwt-reaction-breakdown-inner\": {\r\n \"& .cwt-tab-content\": {\r\n height: \"unset\",\r\n \"min-height\": \"280px\"\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFillActive, neutralFillStealthHover, neutralForegroundRest, neutralLayerCard, neutralOutlineActive } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { applyLocalizedProperty } from \"@microsoft/fast-jss-utilities\";\r\nimport { enums } from \"../../../../utils/enums\";\r\n\r\nexport const ProfileReportMenuSuperAppStyles = (config: DesignSystem) => ({\r\n profileReportMenuSuperAppContainer: {\r\n \"border-radius\": \"12px 12px 0 0\",\r\n width: \"540px\",\r\n \"max-width\": \"100vw\",\r\n\r\n \"& .spacer\": {\r\n \"padding-top\": \"30px\"\r\n },\r\n\r\n \"& .cwt-report-list\": {\r\n width: \"540px\",\r\n \"max-width\": \"100vw\",\r\n \"max-height\": \"540px\",\r\n \"padding-top\": \"0\",\r\n \"padding-bottom\": \"70px\",\r\n\r\n /* Hide Scrollbars */\r\n \"-ms-overflow-style\": \"none\",\r\n \"&::-webkit-scrollbar \": {\r\n display: \"none\"\r\n },\r\n \"&:-moz-any(#content,#appcontent) browser\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"-14px !important\",\r\n \"overflow-y\": \"scroll\",\r\n \"margin-bottom\": \"-14px !important\",\r\n \"overflow-x\": \"scroll\"\r\n },\r\n\r\n \"& .cwt-link\": {\r\n \"font-size\": \"16px\"\r\n },\r\n\r\n \"& .cwt-menu-header\": {\r\n padding: \"20px 27px\",\r\n \"border-bottom\": \"1px solid\",\r\n \"border-color\": neutralOutlineActive,\r\n background: neutralLayerCard,\r\n \"margin-bottom\": \"24px\",\r\n position: \"sticky\",\r\n top: \"0\",\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"22px\",\r\n color: neutralForegroundRest,\r\n padding: \"0\"\r\n }\r\n },\r\n\r\n \"& li\": {\r\n color: neutralForegroundRest,\r\n background: neutralLayerCard,\r\n padding: \"14px 24px\",\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthHover\r\n },\r\n\r\n \"& .cwt-icon\": {\r\n color: neutralForegroundRest\r\n }\r\n },\r\n \"& .cwt-access-li\": {\r\n \"font-size\": \"16px\",\r\n \"line-height\": \"20px\"\r\n }\r\n },\r\n \"& .cwt-report-list-final\": {\r\n background: neutralFillActive,\r\n \"padding-bottom\": \"70px\"\r\n }\r\n },\r\n\r\n profileReportMenuSuperAppPopover: {\r\n bottom: \"5px\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem, neutralFillActive, neutralFillStealthHover, neutralForegroundRest, neutralLayerCard, neutralOutlineActive } from \"@microsoft/fast-components-styles-msft\";\r\n\r\nimport { enums } from \"../../../../utils/enums\";\r\n\r\nexport const ReportMenuSuperAppStyles = (config: DesignSystem) => ({\r\n reportMenuSuperAppContainer: {\r\n \"max-height\": \"75vh\",\r\n \"max-width\": \"100vw\",\r\n width: \"500px\",\r\n height: \"100%\",\r\n \"font-size\": \"16px\",\r\n background: neutralFillActive,\r\n \"border-radius\": \"12px 12px 0 0\",\r\n margin: \"0\",\r\n \"padding-top\": \"0 !important\",\r\n \"padding-bottom\": \"70px !important\",\r\n \"min-height\": \"450px\",\r\n\r\n \"& .cwt-menu-header\": {\r\n padding: \"20px 27px\",\r\n \"border-bottom\": \"1px solid\",\r\n \"border-color\": neutralOutlineActive,\r\n background: neutralLayerCard,\r\n \"margin-bottom\": \"24px\",\r\n position: \"sticky\",\r\n top: \"0\",\r\n \"font-weight\": \"bold\",\r\n\r\n \"& .cwt-icon-label\": {\r\n \"font-size\": \"22px\",\r\n color: neutralForegroundRest,\r\n padding: \"0\"\r\n }\r\n },\r\n\r\n \"& li\": {\r\n cursor: \"pointer\",\r\n padding: \"14px 24px !important\",\r\n background: neutralLayerCard,\r\n \"font-size\": \"16px\",\r\n \"line-height\": \"20px\",\r\n\r\n \"&:hover\": {\r\n background: neutralFillStealthHover\r\n }\r\n }\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { enums } from \"../../../utils/enums\";\r\n\r\nexport const CommunityGuidelinePageSuperAppStyles = (config: DesignSystem) => ({\r\n communityGuidelinePageSuperAppContainer: {\r\n height: \"calc(100vh - 20px)\",\r\n \"max-height\": \"calc(100vh - 20px)\",\r\n \"box-sizing\": \"border-box\",\r\n \"overflow-y\": \"scroll\"\r\n }\r\n});","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\nexport function dispatchBridgeEvent(bridgeEventName, data = {}) {\r\n try {\r\n document.dispatchEvent(new CustomEvent(bridgeEventName, {detail: {eventName: bridgeEventName, data: data}}));\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n}\r\n\r\nexport const BridgeEventNames = {\r\n signInClicked: \"sign-in-clicked\",\r\n saveCachedMyReaction: \"save-cached-my-reaction\",\r\n openPopup: \"open-popup\",\r\n closePopup: \"close-popup\"\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport function fetchSignalR(callback: () => void) {\r\n const url = \"https://assets.msn.com/labs/views/CommentWidget/js/signalr.min.js\";\r\n const id = \"signalR-jssdk\";\r\n fetchScript(url, id, callback);\r\n}\r\n\r\nexport async function fetchBlobClient(): Promise {\r\n const url = \"https://assets.msn.com/labs/views/CommentWidget/js/azure-storage.blob.min.js\";\r\n const id = \"azure-storage-blob-jssdk\";\r\n return new Promise((res, rej) => {\r\n if (window.AzureStorage) {\r\n return res(window.AzureStorage);\r\n }\r\n fetchScript(url, id, () => {\r\n if (window.AzureStorage) {\r\n return res(window.AzureStorage);\r\n }\r\n return rej();\r\n });\r\n });\r\n}\r\n\r\nfunction fetchScript(url: string, id: string, callback: () => void) {\r\n const d = document;\r\n const s = \"script\";\r\n if (!d.getElementById(id)) {\r\n const fjs = d.getElementsByTagName(s)[0];\r\n const js = d.createElement(s) as HTMLScriptElement; js.id = id;\r\n js.src = url;\r\n js.onload = callback;\r\n fjs.parentNode.insertBefore(js, fjs);\r\n }\r\n}\r\n\r\nexport interface AzureStorage {\r\n Blob: Blob;\r\n}\r\n\r\nexport interface Blob {\r\n createBlobServiceWithSas: (accountUrl: string, token: string) => BlobService;\r\n}\r\n\r\nexport interface BlobService {\r\n createBlockBlobFromBrowserFile: (container: string, blobName: string, file: any, callback: (error, result, response) => void) => void;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { SocialService } from \"@msnews/social-data-service\";\r\nimport { fetchSignalR } from \"./fetchScripts\";\r\n\r\nexport interface SignalRMessage {\r\n type: string;\r\n data: any;\r\n}\r\n\r\nexport class WebSockets {\r\n private static signalRConnection: any;\r\n private static signalRHub: string;\r\n\r\n public static async open(hubName: string, onNewMessage: (message: SignalRMessage) => void, fetching = false) {\r\n if (WebSockets.signalRHub === hubName) {\r\n return;\r\n }\r\n\r\n if (window.signalR) {\r\n WebSockets.signalRHub = hubName;\r\n const info = await SocialService.getSignalRConnectionInfo(hubName);\r\n info.accessToken = info.accessToken || info.accessKey;\r\n info.url = info.url || info.endpoint;\r\n\r\n const options = {\r\n accessTokenFactory: () => info.accessToken\r\n };\r\n\r\n const connection = new window.signalR.HubConnectionBuilder()\r\n .withUrl(info.url, options)\r\n .configureLogging(window.signalR.LogLevel.Information)\r\n .build();\r\n\r\n connection.on(\"newMessage\", onNewMessage);\r\n\r\n if (WebSockets.signalRConnection) {\r\n WebSockets.signalRConnection.stop();\r\n }\r\n WebSockets.signalRConnection = connection;\r\n WebSockets.signalRConnection.start()\r\n .catch();\r\n\r\n return this.get();\r\n } else if (!fetching) {\r\n // set fetching=true to make sure we don't enter infinite recursion if script fails to load\r\n fetchSignalR(WebSockets.open.bind(this, hubName, onNewMessage, true));\r\n }\r\n }\r\n public static close() {\r\n if (WebSockets.signalRConnection) {\r\n WebSockets.signalRConnection.stop();\r\n WebSockets.signalRConnection = undefined;\r\n WebSockets.signalRHub = undefined;\r\n }\r\n }\r\n\r\n public static get() {\r\n return { connection: WebSockets.signalRConnection, hub: WebSockets.signalRHub };\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, logger } from \"@msnews/diagnostics\";\r\n\r\nclass AppErrorLogger {\r\n public onAppError: ((AppError) => void) = undefined;\r\n\r\n public log(error: AppError): void {\r\n if (this.onAppError) {\r\n try {\r\n this.onAppError(error);\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n }\r\n }\r\n\r\n public setOnAppError(onAppError: ((AppError) => void)): void {\r\n this.onAppError = onAppError;\r\n }\r\n}\r\n\r\nexport const appErrorLogger = new AppErrorLogger();","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Comment } from \"@msnews/social-data-service\";\r\n\r\nexport function commentExists(commentList: Array, commentId) {\r\n return commentList && commentList.find(comment => {\r\n return comment.id === commentId || (comment.replies && comment.replies.find(reply => {\r\n return reply.id === commentId;\r\n }));\r\n });\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport const enums = {\r\n selectPpeParameter: \"oneservice_enable_ppe\",\r\n externalUrls: {\r\n api: \"https://api.msn.com/community/\",\r\n ppeApi: \"https://ppe-api.msn.com/community/\",\r\n guidelinePage: \"https://www.msn.com/en-us/community/guideline\",\r\n profilePage: \"https://www.msn.com/en-us/community/profile/\",\r\n privacySettings: \"https://www.msn.com/en-us/settings\",\r\n profileSettings: \"https://account.microsoft.com/profile\",\r\n feedbackForm: \"https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR-V3gf69zQlBm1dJVuXA8mtURVI4UlFHMDRIR0VCWDFWNUQyQU5HVzJJQi4u\",\r\n moderationEmail: \"Appealsprocessor@microsoft.com\",\r\n newPost: \"https://www.msn.com/en-us/community/post/new\"\r\n },\r\n userStateType: {\r\n existingUser: \"existingUser\",\r\n anonymous: \"anonymous\",\r\n newUser: \"newUser\"\r\n },\r\n userNameStatusType: {\r\n normal: \"Normal\",\r\n notAllow: \"NotAllow\",\r\n inReview: \"InReview\",\r\n unknown: \"Unknown\"\r\n },\r\n userAvatarStatusType: {\r\n normal: \"Normal\",\r\n notAllow: \"NotAllow\",\r\n inReview: \"InReview\",\r\n unknown: \"Unknown\"\r\n },\r\n userAgeGroup: {\r\n under18: \"Under18\",\r\n above18: \"Above18\"\r\n },\r\n activityType: {\r\n follow: \"Follow\",\r\n reply: \"Reply\",\r\n reaction: \"Reaction\",\r\n badge: \"Achievement\",\r\n moderation: \"Moderation\",\r\n commentDeleteAlert: \"CommentDeleteAlert\",\r\n profileBannedAlert: \"ProfileBannedAlert\",\r\n profileErrorAlert: \"ProfileErrorAlert\"\r\n },\r\n moderationErrorType: {\r\n takedown: \"Takedown\",\r\n ban: \"Ban\",\r\n notAllowName: \"NotAllowName\",\r\n notAllowPicture: \"NotAllowPicture\",\r\n approveUserAppeal: \"ApproveUserAppeal\",\r\n rejectUserAppeal: \"RejectUserAppeal\",\r\n approveProfilePicAppeal: \"ApproveProfilePicAppeal\",\r\n rejectProfilePicAppeal: \"RejectProfilePicAppeal\",\r\n approveCommentAppeal: \"ApproveCommentAppeal\",\r\n rejectCommentAppeal: \"RejectCommentAppeal\"\r\n },\r\n visibleStatusType: {\r\n Normal: \"Normal\",\r\n DeletedByUser: \"DeletedByUser\",\r\n DeletedByAI: \"DeletedByAI\",\r\n DeletedByHI: \"DeletedByHI\",\r\n InReview: \"InReview\"\r\n },\r\n visibleStatusMap: {\r\n DeletedByUser: \"VisibleStatusDeletedByUser\",\r\n DeletedByAI: \"VisibleStatusDeletedByAI\",\r\n DeletedByHI: \"VisibleStatusDeletedByHI\",\r\n InReview: \"VisibleStatusInReview\",\r\n Default: \"VisibleStatusOther\"\r\n },\r\n commentReportMap: {\r\n Spam: \"ReportOptSpam\",\r\n Profanity: \"ReportOptProfanity\",\r\n Abuse: \"ReportOptAbuse\",\r\n RiskyLowAuthority: \"ReportOptRiskyLowAuthority\",\r\n TechnicalAttack: \"ReportOptTechnicalAttack\",\r\n Copyright: \"ReportOptCopyright\",\r\n Trademark: \"ReportOptTrademark\",\r\n ChildRelated: \"ReportOptChildRelated\",\r\n Violent: \"ReportOptViolent\",\r\n Danger: \"ReportOptDanger\",\r\n PublicThreats: \"ReportOptPublicThreats\",\r\n Illegal: \"ReportOptIllegal\",\r\n Terrorism: \"ReportOptTerrorism\",\r\n Privacy: \"ReportOptPrivacy\",\r\n Inappropriate: \"ReportOptInappropriate\"\r\n },\r\n userNameReportMap: {\r\n Spam: \"ReportOptSpam\",\r\n Profanity: \"ReportOptProfanity\",\r\n Abuse: \"ReportOptAbuse\",\r\n RiskyLowAuthority: \"ReportOptRiskyLowAuthority\",\r\n TechnicalAttack: \"ReportOptTechnicalAttack\",\r\n Trademark: \"ReportOptTrademark\",\r\n ChildRelated: \"ReportOptChildRelated\",\r\n Violent: \"ReportOptViolent\",\r\n Danger: \"ReportOptDanger\",\r\n PublicThreats: \"ReportOptPublicThreats\",\r\n Illegal: \"ReportOptIllegal\",\r\n Terrorism: \"ReportOptTerrorism\",\r\n Privacy: \"ReportOptPrivacy\",\r\n Inappropriate: \"ReportOptInappropriate\"\r\n },\r\n userPictureReportMap: {\r\n Spam: \"ReportOptSpam\",\r\n Profanity: \"ReportOptProfanity\",\r\n Abuse: \"ReportOptAbuse\",\r\n RiskyLowAuthority: \"ReportOptRiskyLowAuthority\",\r\n TechnicalAttack: \"ReportOptTechnicalAttack\",\r\n Copyright: \"ReportOptCopyright\",\r\n Trademark: \"ReportOptTrademark\",\r\n ChildRelated: \"ReportOptChildRelated\",\r\n Violent: \"ReportOptViolent\",\r\n Danger: \"ReportOptDanger\",\r\n PublicThreats: \"ReportOptPublicThreats\",\r\n Illegal: \"ReportOptIllegal\",\r\n Terrorism: \"ReportOptTerrorism\",\r\n Privacy: \"ReportOptPrivacy\",\r\n Nudity: \"ReportOptNudity\",\r\n NonConsensualIntimateImagery: \"ReportOptNonConsensualIntimateImagery\",\r\n Inappropriate: \"ReportOptInappropriate\"\r\n },\r\n reactionOrder: [\r\n \"like\", \"love\", \"surprised\", \"thinking\", \"sad\", \"angry\"\r\n ],\r\n profileReportItemMap: {\r\n UserName: \"ReportUserName\",\r\n ProfilePicture: \"ReportProfilePicture\"\r\n },\r\n profilePageEmptyStates: {\r\n NoUser: \"NoUser\",\r\n NotSocialUser: \"NotSocialUser\"\r\n },\r\n reactionIconMap: {\r\n like: \"EmojiLike\",\r\n love: \"EmojiHeart\",\r\n thinking: \"EmojiThinking\",\r\n surprised: \"EmojiSurprised\",\r\n sad: \"EmojiSad\",\r\n angry: \"EmojiAngry\"\r\n },\r\n reactions: {\r\n like: \"like\",\r\n love: \"love\",\r\n thinking: \"thinking\",\r\n surprised: \"surprised\",\r\n sad: \"sad\",\r\n angry: \"angry\"\r\n },\r\n responsiveLevels: {\r\n L0: \"cwtl-0\",\r\n L1: \"cwtl-1\",\r\n L2: \"cwtl-2\",\r\n MobilePopup: \"cwt-mobile-popup\"\r\n },\r\n newCommentErrorCodeMap: {\r\n 400: \"NewPostDeniedMsg\",\r\n 403: \"NewPostSessionExpiredMsg\",\r\n 500: \"NewPostWentWrongMsg\",\r\n bodyTooLong: \"NewPostTooLongMsg\",\r\n other: \"NewPostWentWrongMsg\",\r\n 0: \"NewPostWentWrongMsg\",\r\n 1: \"NewPostSessionExpiredMsg\",\r\n 4: \"NewPostDeniedMsg\",\r\n 6: \"NewPostWentWrongMsg\",\r\n 7: \"NewPostWentWrongMsg\",\r\n 8: \"NewPostWentWrongMsg\",\r\n 9: \"NewPostWentWrongMsg\",\r\n 10: \"NewPostWentWrongMsg\",\r\n 11: \"NewPostWentWrongMsg\",\r\n 12: \"NewPostTooManyCommentsMsg\",\r\n 20: \"NewPostTooLongMsg\",\r\n 21: \"NewPostMentionMsg\",\r\n 22: \"NewPostWentWrongMsg\",\r\n 23: \"NewPostWentWrongMsg\",\r\n 24: \"NewPostDeniedMsg\",\r\n 25: \"NewPostWentWrongMsg\",\r\n 26: \"NewPostWentWrongMsg\",\r\n 27: \"NewPostWentWrongMsg\",\r\n 28: \"NewPostDeniedMsg\",\r\n 29: \"NewPostDeniedMsg\",\r\n 30: \"NewPostDeniedMsg\",\r\n 31: \"NewPostDeniedMsg\",\r\n 32: {\r\n 1: \"NewPostDuplicatedMsg\",\r\n 2: \"NewPostDeniedMsg\",\r\n 3: \"NewPostDeniedMsg\",\r\n 4: \"NewPostDeniedMsg\",\r\n 5: \"NewPostDeniedMsg\",\r\n 6: \"NewPostDeniedMsg\",\r\n 7: \"NewPostDeniedMsg\",\r\n 8: \"NewPostDeniedMsg\",\r\n 9: \"NewPostDeniedMsg\",\r\n 10: \"NewPostDeniedMsg\",\r\n 11: \"NewPostDeniedMsg\",\r\n 12: \"NewPostDeniedMsg\",\r\n 13: \"NewPostDeniedMsg\",\r\n 14: \"NewPostDeniedMsg\",\r\n 15: \"NewPostDeniedMsg\",\r\n 16: \"NewPostDeniedMsg\",\r\n 17: \"NewPostLanguageErrorMsg\",\r\n 18: \"NewPostURLMsg\"\r\n }\r\n\r\n },\r\n ugcPublishStatusType: {\r\n normal: \"Normal\",\r\n notAllow: \"NotAllow\",\r\n inReview: \"InReview\"\r\n },\r\n commentsStatusType: {\r\n zero: 0,\r\n minimal: 1,\r\n expanded: 2,\r\n notDetermined: 3\r\n },\r\n theme: {\r\n default: {\r\n name: \"default\",\r\n disabledComponents: []\r\n },\r\n superappBase: {\r\n name: \"superapp\",\r\n disabledComponents: []\r\n },\r\n windowsBase: {\r\n name: \"windows\",\r\n disabledComponents: []\r\n },\r\n superappEmbed: {\r\n name: \"superapp-embed\",\r\n disabledComponents: [\"profilepage\", \"guidelinepage\", \"articlepage\", \"multiloginpage\", \"reactionbreakdowncomment\", \"reactionbreakdowncontent\", \"onboardingpage\", \"onboardingthirdpartypage\", \"onboardingunderagepage\", \"notificationtray\", \"reportmenu\", \"profilereportmenu\", \"copyrightform\", \"trademarkform\"]\r\n },\r\n superappFullpage: {\r\n name: \"superapp-fullpage\",\r\n disabledComponents: [\"profilepage\", \"guidelinepage\", \"articlepage\", \"multiloginpage\", \"onboardingthirdpartypage\", \"notificationtray\"]\r\n }\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\nexport function contentIdKey(cmsId: string, market: string): string {\r\n return `${cmsId}_${market}`;\r\n}\r\n\r\nexport function selectContentId(contentIds: { [id: string]: string }, cmsId: string, market: string): string {\r\n const key = contentIdKey(cmsId, market);\r\n const contentId = contentIds && contentIds[key];\r\n\r\n if (contentId) {\r\n return contentId;\r\n } else {\r\n logger.log(\"Content id doesn't exist, falling back to key `${cmsId}_${market}`\");\r\n return key;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, SocialExperienceReducerIncorrectArgumentError, logger } from \"@msnews/diagnostics\";\r\nimport { BridgeEventNames, dispatchBridgeEvent } from \"./SocialData.bridge\";\r\nimport { Content, ItemTypes, SocialService, SocialServiceMapper, TypingUpdates, TypingUser, UGContent, User, getParameter } from \"@msnews/social-data-service\";\r\nimport { SignalRMessage, WebSockets } from \"./utils/webSockets\";\r\n\r\nimport { DataConnector } from \"@msnews/experiences-redux\";\r\nimport { SocialDataActions } from \"./SocialData.actions\";\r\nimport { SocialDataState } from \"./SocialData.state\";\r\nimport { appErrorLogger } from \"./utils/AppErrorLogger\";\r\nimport { commentExists } from \"./utils/parseState\";\r\nimport { enums } from \"./utils/enums\";\r\nimport { isComponentDisabled } from \"./utils/themeHelpers\";\r\nimport { selectContentId } from \"./utils/contentIdKey\";\r\n\r\ndeclare global {\r\n interface Window {\r\n signalR: any;\r\n AzureStorage: any;\r\n ReactNativeWebView: any;\r\n }\r\n}\r\n\r\n/**\r\n * The connector for the SocialData Experience.\r\n */\r\nexport class SocialDataConnector extends DataConnector {\r\n\r\n public getDataConnectorFunctionsWithStateBindings() {\r\n const state = this.getCurrentState() as SocialDataState;\r\n return {\r\n styleConnector: {\r\n updateResponsiveClass: this.updateResponsiveClass.bind(this)\r\n },\r\n checkAndLogReducerError: this.checkAndLogReducerError.bind(this),\r\n commentConnector: {\r\n onCommentComponentConnect: this.onCommentComponentConnect.bind(this, state.me),\r\n submitComment: this.submitComment.bind(this, state.me, state.theme),\r\n deleteComment: this.deleteComment.bind(this, state.me, state.theme),\r\n appealComment: this.appealComment.bind(this),\r\n sendCommentReaction: this.sendCommentReaction.bind(this),\r\n showMoreComments: this.showMoreComments.bind(this),\r\n showMoreReplies: this.showMoreReplies.bind(this),\r\n loadMoreComments: this.loadMoreComments.bind(this),\r\n loadPreviousComments: this.loadPreviousComments.bind(this),\r\n onSortTypeChanged: this.onSortTypeChanged.bind(this),\r\n updateTypers: this.updateTypers.bind(this),\r\n broadcastAsTyping: this.broadcastAsTyping.bind(this, state.me),\r\n listenForTypers: this.listenForTypers.bind(this)\r\n },\r\n usersConnector: {\r\n fetchUser: this.fetchUser.bind(this, state.users),\r\n fetchIsUserFollowed: this.fetchIsUserFollowed.bind(this, state.users, state.me),\r\n followUser: this.followUser.bind(this, state.users, state.me, state.theme),\r\n createUser: this.createUser.bind(this, state.me),\r\n fetchMe: this.fetchMe.bind(this),\r\n appealMe: this.appealMe.bind(this),\r\n appealMyPicture: this.appealMyPicture.bind(this),\r\n fetchActivities: this.fetchActivities.bind(this, state.activities),\r\n fetchNotifications: this.fetchNotifications.bind(this, state.me),\r\n markActivityAsRead: this.markActivityAsRead.bind(this)\r\n },\r\n socialBarConnector: {\r\n onSocialBarComponentConnected: this.onSocialBarComponentConnected.bind(this, state.me),\r\n sendContentReaction: this.sendContentReaction.bind(this)\r\n },\r\n reactionBreakdownConnector: {\r\n onReactionBreakdownComponentConnected: this.onReactionBreakdownComponentConnected.bind(this, state.me),\r\n onReactionBreakdownComponentDisconnected: this.onReactionBreakdownComponentDisconnected.bind(this)\r\n },\r\n profileConnector: {\r\n onProfilePageComponentConnected: this.onProfilePageComponentConnected.bind(this, state.users, state.me),\r\n fetchUserFollowers: this.fetchUserFollowers.bind(this, state.users),\r\n fetchUserFollowings: this.fetchUserFollowings.bind(this, state.users),\r\n fetchUserComments: this.fetchUserComments.bind(this, state.users),\r\n setProfilePrivate: this.setProfilePrivate.bind(this),\r\n deleteMyData: this.deleteMyData.bind(this, state.me, state.users)\r\n },\r\n popupConnector: {\r\n openPopup: this.openPopup.bind(this, state.theme),\r\n closePopup: this.closePopup.bind(this, state.popup)\r\n },\r\n ugContentConnector: {\r\n fetchUGContents: this.fetchUGContents.bind(this, state.users),\r\n fetchUGContent: this.fetchUGContent.bind(this, state.me),\r\n saveUGContent: this.saveUGContent.bind(this, state.ugContent),\r\n saveUGContentResource: this.saveUGContentResource.bind(this),\r\n publishUGContent: this.publishUGContent.bind(this),\r\n unPublishUGContent: this.unPublishUGContent.bind(this),\r\n deleteUGContent: this.deleteUGContent.bind(this),\r\n fetchTags: this.fetchTags.bind(this),\r\n fetchCategories: this.fetchCategories.bind(this),\r\n fetchLocations: this.fetchLocations.bind(this)\r\n }\r\n };\r\n }\r\n\r\n public async setTheme(theme?: string) {\r\n SocialDataActions.setTheme.getActionSender(this).send(theme);\r\n }\r\n\r\n public async setGradientOverlayData(data) {\r\n SocialDataActions.setGradientOverlayData.getActionSender(this).send(data);\r\n }\r\n\r\n public async setPublisherSubscribeFollowButtonData(data) {\r\n SocialDataActions.setPublisherSubscribeFollowButtonData.getActionSender(this).send(data);\r\n }\r\n\r\n public async onCommentComponentConnect(me, contentInfo, specificCommentId?) {\r\n if (!me) {\r\n this.fetchMe();\r\n }\r\n\r\n const content = await this.getAndUpdateContent(contentInfo);\r\n if (content.notCreated) {\r\n return;\r\n }\r\n\r\n if (specificCommentId) {\r\n this.loadSpecificComment(content.id, specificCommentId).catch(\r\n () => SocialDataActions.resetSpecificCommentId.getActionSender(this).send()\r\n );\r\n } else {\r\n this.loadAllComments(content.id, contentInfo);\r\n }\r\n\r\n return content;\r\n }\r\n\r\n public async loadSpecificComment(contentId, commentId) {\r\n const comment = await SocialService.getCommentById(commentId);\r\n if (!comment || comment.contentId !== contentId) {\r\n throw new Error(\"The specific comment doesn't belong to this content\");\r\n }\r\n const isReply = comment.parentId;\r\n\r\n if (isReply) {\r\n const commentsBefore = await SocialService.getCommentsByAnchorCommentId(comment.id, {top: 2, orderBy: \"time desc\"});\r\n const commentsAfter = await SocialService.getCommentsByAnchorCommentId(comment.id, {top: 2, orderBy: \"time asc\"});\r\n const replies = {\r\n ...{...commentsBefore, hasPrevious: commentsBefore.hasMore}, // since it is reversed\r\n list: commentsBefore.list.reverse().concat(commentsAfter.list.slice(1)), // get rid of one of the anchor comments\r\n hasMore: commentsAfter.hasMore\r\n };\r\n\r\n const parentAndItsAround = await SocialService.getCommentsByAnchorCommentId(comment.parentId, {top: 1, orderBy: \"rating\"});\r\n SocialDataActions.insertComments.getActionSender(this).send(contentId, parentAndItsAround, false);\r\n SocialDataActions.insertComments.getActionSender(this).send(contentId, replies, false, comment.parentId);\r\n\r\n this.updateCommentRatings(contentId, parentAndItsAround.list.concat(replies.list));\r\n } else {\r\n const commentsBefore = await SocialService.getCommentsByAnchorCommentId(comment.id, {top: 2, orderBy: \"rating asc\"});\r\n const commentsAfter = await SocialService.getCommentsByAnchorCommentId(comment.id, {top: 2, orderBy: \"rating desc\"});\r\n const commentAndItsAround = {\r\n ...{...commentsBefore, hasPrevious: commentsBefore.hasMore}, // since it is reversed\r\n list: commentsBefore.list.reverse().concat(commentsAfter.list.slice(1)), // get rid of one of the anchor comments\r\n hasMore: commentsAfter.hasMore\r\n };\r\n SocialDataActions.insertComments.getActionSender(this).send(contentId, commentAndItsAround, false);\r\n\r\n this.updateCommentRatings(contentId, commentAndItsAround.list);\r\n }\r\n\r\n }\r\n\r\n public async loadAllComments(contentId, contentInfo) {\r\n const topCommentsToFetchCount = contentInfo.top || 2;\r\n const skippedCommentsCount = contentInfo.skip || 0;\r\n\r\n SocialService.getCommentsByContentId(contentId, {top: topCommentsToFetchCount, skip: skippedCommentsCount}).then(comments => {\r\n SocialDataActions.insertComments.getActionSender(this).send(contentId, comments, false);\r\n this.updateCommentRatings(contentId, comments.list);\r\n });\r\n }\r\n\r\n public showMoreComments(contentId, top, skip, sortType) {\r\n SocialService.getCommentsByContentId(contentId, {top, skip, sortType})\r\n .then(comments => {\r\n SocialDataActions.insertComments.getActionSender(this).send(contentId, comments, true);\r\n this.updateCommentRatings(contentId, comments.list);\r\n });\r\n }\r\n\r\n public onSortTypeChanged(contentId, top, sortType) {\r\n const params = {top, skip: 0, sortType};\r\n SocialService.getCommentsByContentId(contentId, params)\r\n .then(comments => {\r\n SocialDataActions.insertComments.getActionSender(this).send(contentId, comments, false);\r\n this.updateCommentRatings(contentId, comments.list);\r\n });\r\n SocialDataActions.resetSpecificCommentId.getActionSender(this).send();\r\n }\r\n\r\n public loadCommentsUsingAnchorComment(contentId, anchorCommentId, loadPrevious: boolean, parentCommentId?) {\r\n const isReply = parentCommentId;\r\n const orderBy = isReply ? \"time\" : \"rating\";\r\n // 'previous' definition of time and rating ordering is different since one of them is ascending and the other is descending\r\n const asc = orderBy === \"time\" ? !loadPrevious : loadPrevious;\r\n const prepending = (orderBy === \"time\" && !asc) || (orderBy === \"rating\" && asc);\r\n SocialService.getCommentsByAnchorCommentId(anchorCommentId, {top: 5, orderBy: `${orderBy} ${asc ? \"asc\" : \"desc\"}`})\r\n .then(comments => {\r\n let commentList = comments.list.slice(1); // get rid of anchor comment, since it is already loaded\r\n // `hasMore` and `hasPrevious` is meaningful only in the direction we are looking for\r\n // because starting point is the anchor comment\r\n if (prepending) {\r\n commentList = commentList.reverse();\r\n comments.hasPrevious = comments.hasMore;\r\n comments.hasMore = undefined;\r\n } else {\r\n comments.hasPrevious = undefined;\r\n }\r\n comments.list = commentList;\r\n SocialDataActions.insertComments.getActionSender(this).send(contentId, comments, true, parentCommentId, prepending);\r\n this.updateCommentRatings(contentId, comments.list);\r\n });\r\n }\r\n\r\n public loadMoreComments(contentId, lastCommentId, parentCommentId?) {\r\n this.loadCommentsUsingAnchorComment(contentId, lastCommentId, false, parentCommentId);\r\n }\r\n\r\n public loadPreviousComments(contentId, firstCommentId, parentCommentId?) {\r\n this.loadCommentsUsingAnchorComment(contentId, firstCommentId, true, parentCommentId);\r\n }\r\n\r\n public showMoreReplies(contentId, commentId, top, skip, orderBy) {\r\n const params = {top, skip, orderBy};\r\n\r\n SocialService.getCommentsByParentId(commentId, params)\r\n .then(comments => {\r\n SocialDataActions.insertComments.getActionSender(this).send(contentId, comments, true, commentId);\r\n this.updateCommentRatings(contentId, comments.list);\r\n });\r\n }\r\n\r\n public updateCommentRatings(contentId, commentList) {\r\n commentList.forEach(comment => {\r\n SocialService.getRating(ItemTypes.comments, comment.id)\r\n .then((rating) => {\r\n SocialDataActions.updateCommentRating.getActionSender(this).send(contentId, comment.id, rating, false);\r\n });\r\n });\r\n }\r\n\r\n public handleUserLoginFromState(me, theme): boolean {\r\n if (!me) {\r\n return false;\r\n }\r\n if (me.state == enums.userStateType.anonymous) {\r\n this.openPopup(theme, \"multiLoginPage\");\r\n return false;\r\n } else if (me.state == enums.userStateType.newUser) {\r\n this.openPopup(theme, \"onboardingPage\");\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n async submitComment(me, theme, content, body, commentParentId, commentMentionReplyId) {\r\n // If comment value is empty string then terminate\r\n if (body.trim().length < 1) {\r\n return;\r\n }\r\n\r\n if (!this.handleUserLoginFromState(me, theme)) {\r\n return;\r\n }\r\n\r\n // If content does not exist in commenting platform, create content\r\n content = await this.createContentIfNotExists(content);\r\n\r\n try {\r\n let responseComment;\r\n await SocialService\r\n .postComment(content.id, me.id, body, commentParentId, commentMentionReplyId)\r\n .then(response => Object.assign(response, { user: me }))\r\n .then(comment => {\r\n responseComment = comment;\r\n SocialDataActions.insertComment.getActionSender(this).send(content.id, comment, commentParentId, true);\r\n const hubName = (comment as any).contentId;\r\n SocialService.broadcastCommentNotification(hubName, (comment as any).id, commentParentId);\r\n })\r\n .catch(response => {\r\n try {\r\n if (response) {\r\n responseComment = { errorCode: response.code, errorSubCodes: response.subCodes };\r\n }\r\n } catch (e) {\r\n responseComment = { errorCode: 0 };\r\n }\r\n });\r\n return responseComment;\r\n } catch (error) {\r\n logger.logError(`Error: comment post failed => ${JSON.stringify(error)}`);\r\n return false;\r\n }\r\n }\r\n\r\n public async createContentIfNotExists(content) {\r\n if (content.notCreated) {\r\n const newContent = await SocialService.createContent(content.id);\r\n SocialDataActions.updateContent.getActionSender(this).send(newContent.id, newContent);\r\n return newContent;\r\n }\r\n return content;\r\n }\r\n\r\n public deleteComment(me, theme, commentId, parentId, userId) {\r\n if (!this.handleUserLoginFromState(me, theme)) {\r\n return;\r\n }\r\n\r\n SocialService.deleteComment(commentId)\r\n .then(_ => {\r\n SocialDataActions.deleteUserComment.getActionSender(this).send(userId, commentId, parentId);\r\n });\r\n }\r\n\r\n public sendCommentReaction(comment, rateValue, reset) {\r\n if (reset) {\r\n SocialService.resetRating(ItemTypes.comments, comment.id)\r\n .then(_ => {\r\n SocialDataActions.updateCommentRating.getActionSender(this).send(comment.contentId, comment.id, undefined, true);\r\n });\r\n } else {\r\n SocialService.rate(ItemTypes.comments, comment.id, rateValue, false)\r\n .then(rating => {\r\n SocialDataActions.updateCommentRating.getActionSender(this).send(comment.contentId, comment.id, rating, true);\r\n });\r\n }\r\n }\r\n\r\n public async sendContentReaction(content, rateValue, reset) {\r\n // If content does not exist in commenting platform, create content\r\n content = await this.createContentIfNotExists(content);\r\n\r\n if (reset) {\r\n SocialService.resetRating(ItemTypes.contents, content.id, window.ReactNativeWebView && this.saveReactionInSuperAppLocalStorage)\r\n .then(_ => {\r\n SocialDataActions.updateContentRating.getActionSender(this).send(content.id, undefined);\r\n });\r\n } else {\r\n SocialService.rate(ItemTypes.contents, content.id, rateValue, false, window.ReactNativeWebView && this.saveReactionInSuperAppLocalStorage)\r\n .then(rating => {\r\n SocialDataActions.updateContentRating.getActionSender(this).send(content.id, rating);\r\n });\r\n }\r\n }\r\n\r\n public async getContent(contentInfo) {\r\n const { id: cmsId, market } = contentInfo;\r\n let localContent = this.getLocalContent(cmsId, market);\r\n if (localContent) {\r\n return localContent;\r\n }\r\n\r\n const content = await SocialService.getContentById(cmsId, market);\r\n\r\n // Concurrency control\r\n localContent = this.getLocalContent(cmsId, market);\r\n if (localContent) {\r\n return localContent;\r\n }\r\n SocialDataActions.setContent.getActionSender(this).send(content, content.id || selectContentId({}, cmsId, market));\r\n SocialDataActions.mapCmsIdToContentId.getActionSender(this).send(cmsId, market, content.id || selectContentId({}, cmsId, market));\r\n return content;\r\n }\r\n\r\n private getLocalContent(cmsId: string, market: string) {\r\n const state: SocialDataState = this.getCurrentState();\r\n return state && state.contents && state.contents[selectContentId({}, cmsId, market)];\r\n }\r\n\r\n public async getAndUpdateContent(contentInfo) {\r\n const content = await this.getContent(contentInfo);\r\n if (!content.notCreated) {\r\n SocialService.getRating(ItemTypes.contents, content.id).then(rating => {\r\n SocialDataActions.updateContent.getActionSender(this).send(content.id, {rating});\r\n });\r\n }\r\n return content;\r\n }\r\n\r\n public fetchUser(users, userId, force=false) {\r\n const user = users && users[userId];\r\n if (!force && user && (user.isFetched || user.isFetching)) { return Promise.resolve(); }\r\n\r\n SocialDataActions.updateUser.getActionSender(this).send(userId, { isFetching: true });\r\n return SocialService.getUserById(userId)\r\n .then(user => {\r\n SocialDataActions.updateUser.getActionSender(this).send(userId, { data: user, isFetched: true, isFetching: false });\r\n })\r\n .catch(e => SocialDataActions.updateUser.getActionSender(this).send(userId, { isFetching: false }));\r\n }\r\n\r\n public fetchIsUserFollowed(users, me, userId, force=false) {\r\n const user = users && users[userId];\r\n if (!force && user && (user.isFollowingFetched || user.isFollowingFetching)) { return Promise.resolve(); }\r\n\r\n SocialDataActions.updateUser.getActionSender(this).send(userId, { isFollowingFetching: true });\r\n return SocialService.getUserIsFollowed(me.id, userId)\r\n .then(result => {\r\n const newUser = { data: { isFollowing: result }, isFollowingFetched: true, isFollowingFetching: false };\r\n SocialDataActions.updateUser.getActionSender(this).send(userId, newUser);\r\n })\r\n .catch(e => SocialDataActions.updateUser.getActionSender(this).send(userId, { isFollowingFetching: false }));\r\n }\r\n\r\n public async followUser(users, me, theme, userId, follow) {\r\n if (!this.handleUserLoginFromState(me, theme)) {\r\n return;\r\n }\r\n\r\n if (follow) {\r\n SocialService.followUser(me.id, userId)\r\n .then(_ => {\r\n const newUser = { data: { isFollowing: true,\r\n followers: users[userId].data.followers && {...users[userId].data.followers, list: users[userId].data.followers.list.concat(users[me.id].data)},\r\n followersCount: users[userId].data.followersCount + 1 }, isFollowingFetched: true, isFollowingFetching: false\r\n };\r\n const newMe = { data: {\r\n following: users[me.id].data.following && {...users[me.id].data.following, list: users[me.id].data.following.list.concat(users[userId].data)},\r\n followingCount: users[me.id].data.followingCount + 1 }, isFollowingFetched: true, isFollowingFetching: false\r\n };\r\n SocialDataActions.updateUser.getActionSender(this).send(userId, newUser);\r\n SocialDataActions.updateUser.getActionSender(this).send(me.id, newMe);\r\n });\r\n } else {\r\n SocialService.unfollowUser(me.id, userId)\r\n .then(_ => {\r\n const newUser = { data: { isFollowing: false,\r\n followers: users[userId].data.followers && {...users[userId].data.followers, list: users[userId].data.followers.list.filter(x => x.id != users[me.id].data.id)},\r\n followersCount: users[userId].data.followersCount - 1 }, isFollowingFetched: true, isFollowingFetching: false };\r\n const newMe = { data: {\r\n following: users[me.id].data.following && {...users[me.id].data.following, list: users[me.id].data.following.list.filter(x => x.id != users[userId].data.id)},\r\n followingCount: users[me.id].data.followingCount - 1 }, isFollowingFetched: true, isFollowingFetching: false\r\n };\r\n SocialDataActions.updateUser.getActionSender(this).send(userId, newUser);\r\n SocialDataActions.updateUser.getActionSender(this).send(me.id, newMe);\r\n });\r\n }\r\n }\r\n\r\n public async createUser(me) {\r\n let newUser = await SocialService.createUser();\r\n newUser = {...me, ...newUser};\r\n SocialDataActions.updateMe.getActionSender(this).send(newUser);\r\n }\r\n\r\n public async onSocialBarComponentConnected(me, contentInfo) {\r\n if (!me) {\r\n me = await this.fetchMe();\r\n }\r\n const content = await this.getContent(contentInfo);\r\n if (!content.notCreated) {\r\n const cachedMyReaction = getParameter(\"cachedMyReaction\");\r\n if (cachedMyReaction) {\r\n content.rating = cachedMyReaction;\r\n SocialDataActions.updateContent.getActionSender(this).send(content.id, {rating: cachedMyReaction});\r\n }\r\n SocialService.getFriendRatings(ItemTypes.contents, content.id).then(ratings => {\r\n this.processRatings(content.id, me, ratings, cachedMyReaction);\r\n });\r\n }\r\n return content;\r\n }\r\n\r\n public processRatings(contentId, me, ratings, cachedMyReaction) {\r\n if (!ratings || !ratings.items) {\r\n return;\r\n }\r\n const friendRatings = {};\r\n ratings.items.map(rating => {\r\n const userRecord = rating.links.find(x => x.type == \"User\");\r\n if (userRecord && userRecord.item) {\r\n SocialDataActions.updateUser.getActionSender(this).send(userRecord.item.id, { data: SocialServiceMapper.convertUser(userRecord.item), isFetched: true, isFetching: false });\r\n friendRatings[userRecord.item.id] = rating.subType.toLowerCase();\r\n }\r\n });\r\n if (!cachedMyReaction && me && me.id in friendRatings) {\r\n SocialDataActions.updateContent.getActionSender(this).send(contentId, {rating: friendRatings[me.id]});\r\n delete friendRatings[me.id];\r\n }\r\n if (!cachedMyReaction && me && me.id) {\r\n const myAnonReaction = ratings.items.find(x => x.sourceId == me.id);\r\n if (myAnonReaction && myAnonReaction.subType) {\r\n SocialDataActions.updateContent.getActionSender(this).send(contentId, {rating: myAnonReaction.subType.toLowerCase()});\r\n }\r\n }\r\n\r\n SocialDataActions.updateContent.getActionSender(this).send(contentId, {friendRatings});\r\n }\r\n\r\n public async fetchUserFollowers(users, userId) {\r\n const followers = users && users[userId] && users[userId].data && users[userId].data.followers;\r\n if (followers && followers.hasMore === false) { return; }\r\n return SocialService.getFollowersByUserId(userId, 10, (followers && followers.list) ? followers.list.length : 0)\r\n .then(followers => {\r\n return SocialDataActions.updateUserFollowers.getActionSender(this).send(userId, followers);\r\n });\r\n }\r\n\r\n public async fetchUserFollowings(users, userId) {\r\n const following = users && users[userId] && users[userId].data && users[userId].data.following;\r\n if (following && following.hasMore === false) { return; }\r\n return SocialService.getFollowingsByUserId(userId, 10, (following && following.list) ? following.list.length : 0)\r\n .then(following => {\r\n return SocialDataActions.updateUserFollowing.getActionSender(this).send(userId, following);\r\n });\r\n }\r\n\r\n public fetchUserComments(users, userId, reset, orderBy) {\r\n let skip = 0;\r\n if (!reset && users && users[userId] && users[userId].data && users[userId].data.comments && users[userId].data.comments.list) {\r\n skip = users[userId].data.comments.list.length;\r\n }\r\n return SocialService.getCommentsByUserId(userId, 10, skip, orderBy)\r\n .then(comments => {\r\n return SocialDataActions.updateUserComments.getActionSender(this).send(userId, comments, reset);\r\n });\r\n }\r\n\r\n public async fetchActivities(activities) {\r\n if (activities && activities.hasMore === false) { return; }\r\n return SocialService.getUserActivities(10, (activities && activities.list) ? activities.list.length : 0)\r\n .then(activities => {\r\n return SocialDataActions.updateActivities.getActionSender(this).send(activities);\r\n });\r\n }\r\n\r\n public async fetchNotifications(me) {\r\n return me && me.isSocialDataUser && SocialService.getUserNotifications()\r\n .then(notifications => {\r\n if (notifications && notifications.list && notifications.list.length > 0) {\r\n return SocialDataActions.updateNotifications.getActionSender(this).send(notifications);\r\n }\r\n });\r\n }\r\n\r\n public async markActivityAsRead(id, updateReduxStore = false) {\r\n return SocialService.updateUserActivityStatus(id, true)\r\n .then(_ => {\r\n if (updateReduxStore) {\r\n SocialDataActions.updateActivityStatus.getActionSender(this).send(id, true);\r\n }\r\n });\r\n }\r\n\r\n public async fetchMe(verify = false) {\r\n return new Promise((resolve, reject) => SocialService.fetchMe(verify).then((user) => {\r\n SocialDataActions.updateMe.getActionSender(this).send(user);\r\n resolve(user);\r\n }));\r\n }\r\n\r\n public async onReactionBreakdownComponentConnected(me, data) {\r\n if (!me) {\r\n this.fetchMe();\r\n }\r\n\r\n let reactions;\r\n if (data.commentId || data.contentId) {\r\n reactions = await SocialService.getRatingBreakdown(data.commentId ? ItemTypes.comments : ItemTypes.contents, data.commentId || data.contentId);\r\n } else {\r\n console.warn(\"Could not get reaction breakdown info. Missing input parameter; please provide commentId, contentId, pageUrl or canonicalUrl\");\r\n }\r\n\r\n const newItems = { };\r\n Object.keys(reactions.items).forEach(key => {\r\n newItems[key] = reactions.items[key].map(item => {\r\n const user = item.user;\r\n const userId = user.id;\r\n SocialDataActions.updateUser.getActionSender(this).send(userId, { data: SocialServiceMapper.convertUser(user), isFetched: true, isFetching: false });\r\n const newItem = { ...item, userId };\r\n delete newItem.user;\r\n return newItem;\r\n });\r\n });\r\n reactions.items = newItems;\r\n SocialDataActions.setReactionBreakdown.getActionSender(this).send({reactions});\r\n }\r\n\r\n public async onReactionBreakdownComponentDisconnected() {\r\n const emptyReactions = {reactions: {reactionCounts: {all: 0, like: 0, love: 0, angry: 0, surprised: 0, thinking: 0, sad: 0}, items: { all: [], like: [], love: [], angry: [], surprised: [], thinking: [], sad: []}}};\r\n SocialDataActions.setReactionBreakdown.getActionSender(this).send(emptyReactions);\r\n }\r\n\r\n public async onProfilePageComponentConnected(users, me, userId) {\r\n if (!me) {\r\n me = await this.fetchMe();\r\n }\r\n\r\n const id = userId == \"me\" ? me.id : userId;\r\n\r\n SocialService.getUserProfile(id)\r\n .then(data => {\r\n SocialDataActions.updateUser.getActionSender(this).send(id, { data: data, isFetched: true, isFetching: false });\r\n });\r\n\r\n this.fetchIsUserFollowed(users, me, id);\r\n }\r\n\r\n public setProfilePrivate(userId, isPrivate) {\r\n SocialService.updateUserSettings(userId, isPrivate)\r\n .then(_ => {\r\n const data = {isPrivateProfile: isPrivate};\r\n SocialDataActions.updateUser.getActionSender(this).send(userId, { data: data });\r\n });\r\n }\r\n\r\n public openPopup(theme, moduleName, props?) {\r\n if (isComponentDisabled(theme, moduleName.toLowerCase())) {\r\n if (moduleName.toLowerCase() === \"multiloginpage\") {\r\n dispatchBridgeEvent(BridgeEventNames.signInClicked);\r\n } else {\r\n dispatchBridgeEvent(BridgeEventNames.openPopup, {component: moduleName.toLowerCase(), id: props && props.id, fullScreen: props && props.fullScreen || false});\r\n }\r\n } else {\r\n SocialDataActions.setPopup.getActionSender(this).send(moduleName, props);\r\n }\r\n }\r\n\r\n public closePopup(popup, props?) {\r\n if (popup && popup.moduleName) {\r\n SocialDataActions.setPopup.getActionSender(this).send(undefined, undefined);\r\n } else {\r\n // Do not close the report menu modal in order to get the copyright form open message from web view\r\n if (!(props && props.disableBridge)) {\r\n dispatchBridgeEvent(BridgeEventNames.closePopup, {refreshPage: (props && props.refreshPage) || false});\r\n }\r\n }\r\n }\r\n\r\n public async fetchUGContents(users, userId) {\r\n const ugContents = users && users[userId] && users[userId].data && users[userId].data.ugContents;\r\n if (ugContents && ugContents.hasMore === false) { return; }\r\n return SocialService.getUGContents(userId, 10, (ugContents && ugContents.list) ? ugContents.list.length : 0)\r\n .then(ugContents => {\r\n return SocialDataActions.updateUGContents.getActionSender(this).send(ugContents, userId);\r\n });\r\n }\r\n\r\n public async fetchUGContent(me, id: string) {\r\n if (!me) {\r\n me = await this.fetchMe();\r\n }\r\n if (id == \"new\") {\r\n return SocialDataActions.updateUGContent.getActionSender(this).send({});\r\n }\r\n return SocialService.getUGContentById(id)\r\n .then(ugContent => {\r\n return SocialDataActions.updateUGContent.getActionSender(this).send(ugContent);\r\n });\r\n }\r\n\r\n public contentAutoSaver = null;\r\n public async saveUGContent(existingUGContent: UGContent, updatedFields: UGContent) {\r\n const ugContent = {\r\n ...existingUGContent,\r\n ...updatedFields\r\n };\r\n SocialDataActions.updateUGContent.getActionSender(this).send({\r\n ...ugContent,\r\n isSaving: true\r\n });\r\n if (this.contentAutoSaver) {\r\n clearTimeout(this.contentAutoSaver);\r\n }\r\n this.contentAutoSaver = setTimeout(() => {\r\n SocialService.postUGContent(ugContent)\r\n .then(savedUGContent => {\r\n return SocialDataActions.updateUGContent.getActionSender(this).send({\r\n ...savedUGContent,\r\n categories: ugContent.categories,\r\n locations: ugContent.locations,\r\n isPublished: ugContent.isPublished\r\n });\r\n });\r\n }, 2000);\r\n }\r\n\r\n public async saveUGContentResource(ugContent: UGContent, resourceBlob) {\r\n return SocialService.postUGContentResource(ugContent, resourceBlob)\r\n .then(ugContent => {\r\n return SocialDataActions.updateUGContent.getActionSender(this).send(ugContent);\r\n });\r\n }\r\n\r\n public async publishUGContent(id: string) {\r\n return SocialService.publishUGContent(id)\r\n .then(uGContentPublishResponse => {\r\n if (uGContentPublishResponse.status == enums.ugcPublishStatusType.normal) {\r\n return SocialDataActions.publishUGContent.getActionSender(this).send();\r\n }\r\n });\r\n }\r\n\r\n public async unPublishUGContent(id: string) {\r\n return SocialService.unPublishUGContent(id)\r\n .then(uGContentPublishResponse => {\r\n return SocialDataActions.unPublishUGContent.getActionSender(this).send();\r\n });\r\n }\r\n\r\n public async deleteUGContent(id: string) {\r\n return SocialService.deleteUGContent(id)\r\n .then(uGContentPublishResponse => {\r\n return SocialDataActions.deleteUGContent.getActionSender(this).send(id);\r\n });\r\n }\r\n\r\n public async fetchTags(title?: string) {\r\n return SocialService.getTagsByTitle(title);\r\n }\r\n\r\n public async fetchCategories(title?: string) {\r\n return SocialService.getCategoriesByTitle(title);\r\n }\r\n\r\n public async fetchLocations(title?: string) {\r\n return SocialService.getLocationsByTitle(title);\r\n }\r\n\r\n public async listenForTypers(id: string, market: string, content: Content) {\r\n const contentId = (content && content.id) || (id && market && id + \"_\" + market);\r\n if (contentId && (!content || !content.typingUpdates || !content.typingUpdates.hubName || content.typingUpdates.hubName !== contentId)) {\r\n SocialDataActions.recordSignalRHub.getActionSender(this).send(contentId);\r\n WebSockets.open(contentId, this.handleSignalRMessage.bind(this, contentId, id, market));\r\n }\r\n }\r\n\r\n public async handleSignalRMessage(contentId: string, id: string, market: string, message: SignalRMessage) {\r\n if (message.type === \"typing-notification\") {\r\n const typer: TypingUser = message.data;\r\n typer.lastTypingTime = Date.now();\r\n SocialDataActions.addTyper.getActionSender(this).send(typer, contentId, id, market);\r\n } else if (message.type === \"comment-notification\") {\r\n const state: SocialDataState = this.getCurrentState();\r\n const content = state && state.contents && state.contents[contentId];\r\n const { commentId } = message.data;\r\n const commentList = content.comments && content.comments.list;\r\n if (commentExists(commentList, commentId)) {\r\n // we've already loaded this comment\r\n return;\r\n }\r\n\r\n const newComment = await SocialService.getCommentById(commentId);\r\n if (!newComment) {\r\n // comment fetch failed\r\n return;\r\n }\r\n const { createdBy, contentId: commentContentId } = newComment;\r\n\r\n if (commentContentId !== contentId) {\r\n return;\r\n }\r\n // this comment is from the correct content\r\n\r\n const commentParentId = newComment.parentId;\r\n const parentComment = commentExists(commentList, commentParentId);\r\n if (commentParentId && !parentComment) {\r\n // parent comment isn't in the store, so we can't insert the new comment\r\n SocialDataActions.incrementReplyCount.getActionSender(this).send(contentId);\r\n return;\r\n }\r\n\r\n if (parentComment && parentComment.replies.length < parentComment.replyCount) {\r\n // we only want to increment the reply count because the whole reply list isn't expanded.\r\n SocialDataActions.incrementReplyCount.getActionSender(this).send(commentParentId);\r\n return;\r\n }\r\n\r\n if (!content || !content.id) {\r\n // no content info in store, fetch from api (should include new comment)\r\n await this.onCommentComponentConnect(state.me, { id: id, market: market });\r\n return;\r\n }\r\n if (!newComment.user) {\r\n await this.fetchUser(state.users, createdBy);\r\n const user = this.getCurrentState().users[createdBy];\r\n newComment.user = user.data;\r\n }\r\n SocialDataActions.insertComment.getActionSender(this).send(commentContentId, newComment, commentParentId);\r\n }\r\n }\r\n\r\n public isUpdateTypersChanged(expirationTime: number): boolean {\r\n const state: SocialDataState = this.getCurrentState();\r\n const contents = state.contents;\r\n for (const contentId in state.contents) {\r\n const typingUpdates: TypingUpdates = contents[contentId] && contents[contentId].typingUpdates || {typingUsers: {}} as TypingUpdates;\r\n const keysNeededToDelete = Object.keys(typingUpdates.typingUsers).filter(userId => typingUpdates.typingUsers[userId].lastTypingTime < expirationTime);\r\n if (keysNeededToDelete.length > 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n public async updateTypers() {\r\n const expireTime: number = Date.now() - 5000;\r\n if (this.isUpdateTypersChanged(expireTime)) {\r\n SocialDataActions.updateTypers.getActionSender(this).send(expireTime);\r\n }\r\n }\r\n\r\n public broadcastAsTyping(me: User, id: string, market: string, content: Content) {\r\n const contentId = (content && content.id) || (id && market && id + \"_\" + market);\r\n if (contentId && me) {\r\n SocialService.broadcastTypingNotification(contentId, me.id, me.name, me.avatarUrl);\r\n }\r\n }\r\n\r\n public updateResponsiveClass(relativeClass) {\r\n SocialDataActions.updateResponsiveClass.getActionSender(this).send(relativeClass);\r\n }\r\n\r\n public deleteMyData(me, users, deletingData) {\r\n SocialService.deleteMyData(deletingData);\r\n let newMe = {...users[me.id].data};\r\n if (deletingData.comment) {\r\n newMe = {...newMe, postsCount: 0,\r\n commentSummary: {\r\n totalCount: 0,\r\n subCommentSummaries: []\r\n },\r\n comments: {\r\n list: [],\r\n asc: false,\r\n commentStatus: \"On\",\r\n hasMore: false,\r\n hasPrevious: true,\r\n moreCount: 0,\r\n skip: 0,\r\n top: 10,\r\n totalCount: 0\r\n }};\r\n } if (deletingData.reaction) {\r\n newMe = {...newMe, likesCount: 0, reactionsCount: 0,\r\n reactionSummary: {\r\n totalCount: 0,\r\n subReactionSummaries: []\r\n }};\r\n } if (deletingData.follow) {\r\n newMe.followers.list.forEach(user => {\r\n const id = user.id;\r\n const newUser = { data: { isFollowing: false } };\r\n SocialDataActions.updateUser.getActionSender(this).send(id, newUser);\r\n }),\r\n newMe = {...newMe, followingCount: 0,\r\n following: {\r\n list: []\r\n },\r\n followSummary: {\r\n totalCount: 0,\r\n subFollowSummaries: []\r\n }};\r\n } if (deletingData.activity) {\r\n SocialDataActions.deleteActivities.getActionSender(this).send();\r\n }\r\n SocialDataActions.updateUser.getActionSender(this).send(me.id,\r\n {data: newMe});\r\n }\r\n\r\n public appealComment(commentId: string, activityId: string) {\r\n SocialService.appealComment(commentId).then(_ => {\r\n this.appealActivity(activityId);\r\n });\r\n }\r\n\r\n public appealMe(activityId: string) {\r\n SocialService.appealMe().then(_ => {\r\n this.appealActivity(activityId);\r\n });\r\n }\r\n\r\n public appealMyPicture(activityId: string) {\r\n SocialService.appealMyPicture().then(_ => {\r\n this.appealActivity(activityId);\r\n });\r\n }\r\n\r\n public appealActivity(activityId: string) {\r\n SocialDataActions.updateActivityAppeal.getActionSender(this).send(activityId, true);\r\n }\r\n\r\n public checkAndLogReducerError(): void {\r\n const state: SocialDataState = this.getCurrentState();\r\n const error = state.error;\r\n if (!error) { return; }\r\n SocialDataActions.resetError.getActionSender(this).send();\r\n const appError = SocialExperienceReducerIncorrectArgumentError;\r\n appErrorLogger.log({\r\n ...appError,\r\n message: \"Reducer incorrect argument\",\r\n pb: {\r\n ...appError.pb,\r\n customMessage: `Undefined argument \"${error.argument}\" for \"${error.action}\" action`\r\n }\r\n } as AppError);\r\n }\r\n\r\n public saveReactionInSuperAppLocalStorage(id: string, reaction?: string): void {\r\n dispatchBridgeEvent(BridgeEventNames.saveCachedMyReaction, {id: id, reaction: reaction});\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { enums } from \"./enums\";\r\n\r\nexport function hasThemeBase(theme, targetTheme) {\r\n return theme && theme.startsWith(targetTheme.name);\r\n}\r\n\r\nexport function isThemeEqual(theme, targetTheme) {\r\n return theme == targetTheme.name;\r\n}\r\n\r\nexport function isComponentDisabled(theme, component) {\r\n let disabledComponents = [];\r\n for (const key in enums.theme) {\r\n if (enums.theme[key].name === theme) {\r\n disabledComponents = enums.theme[key].disabledComponents;\r\n break;\r\n }\r\n }\r\n return disabledComponents.includes(component);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActionHandler, IActionPayload, IReducer } from \"@msnews/experiences-redux\";\r\nimport {\r\n AddTyper,\r\n DeleteActivities,\r\n DeleteUGContent,\r\n DeleteUserComment,\r\n IncrementReplyCount,\r\n InsertComment,\r\n InsertComments,\r\n MapCmsIdToContentId,\r\n PublishUGContent,\r\n RecordSignalRHub,\r\n ResetError,\r\n ResetSpecificCommentId,\r\n SetContent,\r\n SetGradientOverlayData,\r\n SetPopup,\r\n SetPublisherSubscribeFollowButtonData,\r\n SetReactionBreakdown,\r\n SetTheme,\r\n SocialDataActions,\r\n UnPublishUGContent,\r\n UpdateActivities,\r\n UpdateActivityAppeal,\r\n UpdateActivityStatus,\r\n UpdateCommentRating,\r\n UpdateContent,\r\n UpdateContentRating,\r\n UpdateMe,\r\n UpdateNotifications,\r\n UpdateResponsiveClass,\r\n UpdateTypers,\r\n UpdateUGContent,\r\n UpdateUGContents,\r\n UpdateUser,\r\n UpdateUserComments,\r\n UpdateUserFollowers,\r\n UpdateUserFollowing\r\n} from \"./SocialData.actions\";\r\nimport { Comment, Content, TypingUpdates, TypingUser, TypingUsers, User } from \"@msnews/social-data-service\";\r\n\r\nimport { SocialDataState } from \"./SocialData.state\";\r\nimport { contentIdKey } from \"./utils/contentIdKey\";\r\nimport { enums } from \"./utils/enums\";\r\n\r\n/**\r\n * The reducer for the SocialData connector, and the SocialDataState\r\n */\r\nexport class SocialDataReducer implements IReducer {\r\n /**\r\n * Update the state for the connector, based on the action being applied\r\n * @param state The previous state\r\n * @param actionPayload The action being applied\r\n */\r\n public reduce(state: SocialDataState, actionPayload: IActionPayload): SocialDataState {\r\n if (!state) { return {}; }\r\n if (!actionPayload) { return state; }\r\n\r\n let newState: SocialDataState;\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.setTheme, (theme) => {\r\n theme = theme || state.theme || \"default\";\r\n newState = { ...state, theme };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateMe, (me) => {\r\n newState = { ...state, me: me, users: updateUser(state.users, me.id, { data: me, isFetched: true, isFetching: false }), ...makeErrorIfUndefined(\"UpdateUser\", { userId: me.id }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateNotifications, (notifications) => {\r\n newState = { ...state, notifications: updateNotifications(state.notifications, notifications) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateActivities, (activities) => {\r\n newState = { ...state, activities: updateActivities(state.activities, activities) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.deleteActivities, () => {\r\n newState = { ...state, activities: { top: 0, skip: 0, hasMore: false, moreCount: 0, list: []} };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateActivityStatus, (id, read) => {\r\n newState = { ...state, activities: updateActivityStatus(state.activities, id, read), notifications: updateNotificationStatus(state.notifications, id, read) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateActivityAppeal, (id, appealSent) => {\r\n newState = { ...state, activities: updateActivityAppeal(state.activities, id, appealSent) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.setContent, (content, contentId) => {\r\n newState = { ...state, contents: { ...state.contents, [contentId]: content }, ...makeErrorIfUndefined(\"SetContent\", { contentId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateContent, (contentId, data) => {\r\n newState = { ...state, contents: { ...state.contents, [contentId]: { ...state.contents[contentId], ...data } }, ...makeErrorIfUndefined(\"UpdateContent\", { contentId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateContentRating, (contentId, rating) => {\r\n newState = { ...state, contents: { ...state.contents, [contentId]: updateContentRating(state.contents[contentId], rating) }, ...makeErrorIfUndefined(\"UpdateContentRating\", { contentId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.insertComments, (contentId, comments, page, parentId, prepend?) => {\r\n newState = { ...state, contents: { ...state.contents, [contentId]: insertComments(state.contents[contentId], comments, page, parentId, prepend) }, ...makeErrorIfUndefined(\"InsertComments\", { contentId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.resetSpecificCommentId, () => {\r\n newState = { ...state, specificCommentId: undefined };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateCommentRating, (contentId, commentId, rating, updateCounts) => {\r\n newState = { ...state, contents: { ...state.contents, [contentId]: updateCommentRating(state.contents[contentId], commentId, rating, updateCounts)}, ...makeErrorIfUndefined(\"updateCommentRating\", { contentId, commentId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.incrementReplyCount, (contentId, commentId) => {\r\n newState = { ...state, contents: { ...state.contents, [contentId]: incrementReplyCount(state.contents[contentId], commentId) }, ...makeErrorIfUndefined(\"IncrementReplyCount\", { contentId, commentId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.insertComment, (contentId, comment, parentId?, addedOffline?) => {\r\n newState = { ...state, contents: { ...state.contents, [contentId]: insertComment(state.contents[contentId], comment, parentId, addedOffline) }, ...makeErrorIfUndefined(\"InsertComment\", { contentId, comment }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateUser, (userId, user) => {\r\n newState = { ...state, users: updateUser(state.users, userId, user), ...makeErrorIfUndefined(\"UpdateUser\", { userId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateUserFollowers, (userId, followers) => {\r\n newState = { ...state, users: updateUserFollowers(state.users, userId, followers), ...makeErrorIfUndefined(\"UpdateUserFollowers\", { userId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateUserFollowing, (userId, following) => {\r\n newState = { ...state, users: updateUserFollowing(state.users, userId, following), ...makeErrorIfUndefined(\"UpdateUserFollowing\", { userId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateUserComments, (userId, comments, reset) => {\r\n newState = { ...state, users: updateUserComments(state.users, userId, comments, reset), ...makeErrorIfUndefined(\"UpdateUserComments\", { userId, comments }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.deleteUserComment, (userId, commentId, parentId) => {\r\n newState = { ...state, users: deleteUserComment(state.users, userId, commentId), contents: deleteComment(state.contents, commentId, parentId), ...makeErrorIfUndefined(\"DeleteUserComment\", { userId, commentId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.setReactionBreakdown, (data) => {\r\n newState = { ...state, reactionBreakdown: data };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.setGradientOverlayData, (data) => {\r\n newState = { ...state, gradientOverlayData: data };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.setPublisherSubscribeFollowButtonData, (data) => {\r\n newState = { ...state, publisherSubscribeFollowButtonData: data };\r\n });\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.setPopup, (moduleName, props) => {\r\n newState = { ...state, popup: { moduleName, popupProps: props } };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.addTyper, (typer: TypingUser, contentId: string, id: string, market: string) => {\r\n newState = { ...state, contents: addTyper(id, market, state.contents, state.me, typer, contentId) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateTypers, (expirationTime: number) => {\r\n newState = { ...state, contents: updateTypersIfNeeded(state.contents, state.me, expirationTime) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.recordSignalRHub, (contentId: string) => {\r\n newState = { ...state, contents: { ...state.contents, [contentId]: recordSignalRHub(state.contents[contentId], contentId) } };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateUGContents, (ugContents, userId) => {\r\n newState = { ...state, users: insertUserUGContents(state.users, ugContents, userId) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateUGContent, (ugContent) => {\r\n newState = { ...state, ugContent: ugContent };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.publishUGContent, () => {\r\n newState = { ...state, ugContent: {...state.ugContent, isPublished: true} };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.unPublishUGContent, () => {\r\n newState = { ...state, ugContent: {...state.ugContent, isPublished: false} };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.deleteUGContent, (id) => {\r\n newState = { ...state, users: deleteUserUGContents(state.users, state.me.id, id), ugContent: {} };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.updateResponsiveClass, (responsiveClass) => {\r\n newState = { ...state, responsiveClass: responsiveClass };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.mapCmsIdToContentId, (cmsId, market, contentId) => {\r\n newState = { ...state, contentIds: { ...state.contentIds, [contentIdKey(cmsId, market)]: contentId }, ...makeErrorIfUndefined(\"MapCmsIdToContentId\", { contentId, cmsId }) };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, SocialDataActions.resetError, () => {\r\n newState = { ...state, error: undefined };\r\n });\r\n\r\n return newState || state;\r\n }\r\n}\r\n\r\nfunction updateUser(users={}, userId, user) {\r\n const userSkeleton = {\r\n isFetched: false,\r\n isFetching: false,\r\n isFollowingFetched: false,\r\n isFollowingFetching: false,\r\n data: undefined\r\n };\r\n const oldUserState = users[userId] || userSkeleton;\r\n const newUsers = { ...users,\r\n [userId]: {\r\n ...oldUserState,\r\n ...user,\r\n data: {\r\n ...oldUserState.data,\r\n ...user.data\r\n }\r\n }\r\n };\r\n\r\n return newUsers;\r\n}\r\n\r\nfunction insertUserUGContents(users={}, newUGContents, userId) {\r\n const oldUserState = users[userId];\r\n if (!oldUserState) { return users; }\r\n const ugContentList = oldUserState.data.ugContents ? oldUserState.data.ugContents.list : [];\r\n\r\n return {...users,\r\n [userId]: {...oldUserState,\r\n data: {...oldUserState.data,\r\n ugContents: {\r\n ...newUGContents,\r\n list: ugContentList.concat(\r\n newUGContents.list.filter(cNew => ugContentList.filter(cOld => cOld.id == cNew.id).length < 1) // concatenating only unique ones\r\n )\r\n }\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction deleteUserUGContents(users={}, userId, id) {\r\n const oldUserState = users[userId];\r\n if (!oldUserState) { return users; }\r\n const ugContentList = oldUserState.data.ugContents ? oldUserState.data.ugContents.list : [];\r\n\r\n return {...users,\r\n [userId]: {...oldUserState,\r\n data: {...oldUserState.data,\r\n ugContents: {\r\n ...oldUserState.data.ugContents,\r\n list: ugContentList.filter(x => x.id != id)\r\n }\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction updateUserFollowers(users={}, userId, followers) {\r\n const oldUserState = users[userId];\r\n if (!oldUserState) { return users; }\r\n\r\n return {...users,\r\n [userId]: {...oldUserState,\r\n data: {...oldUserState.data,\r\n followers: {\r\n ...oldUserState.data.followers,\r\n ...followers,\r\n list: oldUserState.data.followers.list.concat(followers.list)\r\n }\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction updateUserFollowing(users={}, userId, following) {\r\n const oldUserState = users[userId];\r\n if (!oldUserState) { return users; }\r\n\r\n return {...users,\r\n [userId]: {...oldUserState,\r\n data: {...oldUserState.data,\r\n following: {\r\n ...oldUserState.data.following,\r\n ...following,\r\n list: oldUserState.data.following.list.concat(following.list)\r\n }\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction updateUserComments(users={}, userId, comments, reset=false) {\r\n const oldUserState = users[userId];\r\n if (!oldUserState) { return users; }\r\n\r\n return {...users,\r\n [userId]: {...oldUserState,\r\n data: {...oldUserState.data,\r\n comments: reset\r\n ? comments\r\n : {\r\n ...oldUserState.data.comments,\r\n ...comments,\r\n list: oldUserState.data.comments.list.concat(comments.list)\r\n }\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction deleteUserComment(users={}, userId, commentId) {\r\n const oldUserState = users[userId];\r\n if (!(oldUserState && oldUserState.data.comments)) { return users; }\r\n\r\n return {...users,\r\n [userId]: {...oldUserState,\r\n data: {...oldUserState.data,\r\n comments: {...oldUserState.data.comments,\r\n list: markCommentAsDeleted(oldUserState.data.comments.list, commentId)\r\n }\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction insertComments(content, comments, page, parentId, prepend?) {\r\n const list = (content && content.comments && content.comments.list) ? content.comments.list : [];\r\n\r\n if (parentId) {\r\n return mapAllComments(content, comment =>\r\n comment.id == parentId ? {\r\n ...comment,\r\n replies: insertReplies(comment.replies, comments.list),\r\n replyCount: comments.totalCount,\r\n repliesHasPrevious: comments.hasPrevious !== undefined ? comments.hasPrevious : comment.repliesHasPrevious,\r\n repliesHasMore: comments.hasMore !== undefined ? comments.hasMore : comment.repliesHasMore\r\n } :\r\n comment\r\n );\r\n } else {\r\n let commentList: Array;\r\n if (page) {\r\n commentList = prepend ? comments.list.concat(list) : list.concat(comments.list);\r\n } else {\r\n commentList = comments.list;\r\n }\r\n\r\n return {\r\n ...content,\r\n comments: {\r\n ...comments,\r\n list: commentList,\r\n hasPrevious: comments.hasPrevious !== undefined ? comments.hasPrevious : (content.comments && content.comments.hasPrevious),\r\n hasMore: comments.hasMore !== undefined ? comments.hasMore : (content.comments && content.comments.hasMore)\r\n }\r\n };\r\n }\r\n}\r\n\r\nfunction updateNotifications(existingNotifications, newNotifications) {\r\n const notificationList = existingNotifications ? existingNotifications.list : [];\r\n for (let index = 0; index < newNotifications.list.length; index++) {\r\n const newNotification = newNotifications.list[index];\r\n if (!notificationList.find(x => x.id == newNotification.id)) {\r\n notificationList.push(newNotification);\r\n }\r\n }\r\n notificationList.sort(function(a, b) {\r\n const keyA = new Date(a.datetime); const keyB = new Date(b.datetime);\r\n if (keyA < keyB) { return 1; }\r\n if (keyA > keyB) { return -1; }\r\n return 0;\r\n });\r\n return { ...newNotifications,\r\n list: notificationList.length > 3 ? notificationList.slice(0, 3) : notificationList\r\n };\r\n}\r\n\r\nfunction updateNotificationStatus(notifications, id, read) {\r\n if (!notifications) { return; }\r\n if (!read) { return notifications; }\r\n return { ...notifications,\r\n list: notifications.list.filter(x => x.id != id)\r\n };\r\n}\r\n\r\nfunction updateActivities(existingActivities, newActivities) {\r\n const activityList = existingActivities ? existingActivities.list : [];\r\n for (let index = 0; index < newActivities.list.length; index++) {\r\n const activity = newActivities.list[index];\r\n if (activity.type == enums.activityType.reaction) {\r\n const relatedActivity = activityList.find(x => x.type == enums.activityType.reaction && x.target.comment && x.target.comment.id == activity.target.comment.id);\r\n if (relatedActivity) {\r\n activity.skipRender = true;\r\n }\r\n }\r\n activityList.push(activity);\r\n }\r\n return { ...newActivities,\r\n list: activityList\r\n };\r\n}\r\n\r\nfunction updateActivityStatus(activities, id, read) {\r\n if (!activities) { return; }\r\n const activityList = activities ? activities.list : [];\r\n if (activityList.find(activity => activity.id == id)) {\r\n activityList.find(activity => activity.id == id).isSeen = read;\r\n }\r\n return { ...activities,\r\n list: activityList\r\n };\r\n}\r\n\r\nfunction updateActivityAppeal(activities, id, appealSent) {\r\n if (!activities) { return; }\r\n const activityList = activities ? activities.list : [];\r\n const index = activityList.findIndex(activity => activity.id == id);\r\n if (index >= 0) {\r\n activityList[index] = { ...activityList[index], appealSent: appealSent };\r\n }\r\n return { ...activities,\r\n list: activityList\r\n };\r\n}\r\n\r\nfunction updateCommentRating(content, commentId, rating, updateCounts) {\r\n return mapAllComments(content, $ => {\r\n if ($.id != commentId) { return $; }\r\n const comment = { ...$, rating: rating };\r\n if (updateCounts) {\r\n if ($.rating) {\r\n comment.reactionCounts[$.rating] = Math.max(0, comment.reactionCounts[$.rating] - 1);\r\n }\r\n if (rating) {\r\n comment.reactionCounts[rating] = Math.max(1, comment.reactionCounts[rating] + 1);\r\n }\r\n }\r\n return comment;\r\n });\r\n}\r\n\r\nfunction updateContentRating(content, rating) {\r\n content = content || { reactionCounts: {} };\r\n if (content.rating) {\r\n content.reactionCounts[content.rating] = Math.max(0, content.reactionCounts[content.rating] - 1);\r\n }\r\n if (rating) {\r\n content.reactionCounts[rating] = Math.max(1, content.reactionCounts[rating] + 1);\r\n }\r\n return {...content, rating: rating};\r\n}\r\n\r\nfunction mapAllComments(content: Content, mapFunc: (comment: Comment) => Comment): Content {\r\n function mapCommentAndReplies(comment: Comment): Comment {\r\n const newComment = mapFunc(comment);\r\n return {...newComment,\r\n replies: (newComment.replies ? newComment.replies.map(mapCommentAndReplies) : null)\r\n };\r\n }\r\n return {...content,\r\n comments: {...content.comments,\r\n list: (content.comments && content.comments.list)\r\n ? content.comments.list.map(mapCommentAndReplies)\r\n : null\r\n }\r\n };\r\n}\r\n\r\nfunction incrementReplyCount(content, commentId) {\r\n const newState = mapAllComments(content, $comment => {\r\n if ($comment.id !== commentId) { return $comment; }\r\n return {...$comment,\r\n replyCount: $comment.replyCount + 1\r\n };\r\n });\r\n if (newState.commentSummary) {\r\n newState.commentSummary.totalCount++;\r\n const replyCount = newState.commentSummary.subCommentSummaries.find(x => x.type == \"Reply\");\r\n if (replyCount) {\r\n replyCount.totalCount++;\r\n }\r\n }\r\n newState.totalCommentCount++;\r\n return newState;\r\n}\r\n\r\nfunction insertComment(content: Content, newComment, parentId?, addedOffline?: boolean): Content {\r\n newComment.addedOffline = Boolean(addedOffline);\r\n if (parentId) {\r\n const newState = mapAllComments(content, $comment => {\r\n if ($comment.id != parentId) { return $comment; }\r\n return {...$comment,\r\n replies: $comment.replies.concat(newComment)\r\n };\r\n });\r\n if (newState.commentSummary) {\r\n newState.commentSummary.totalCount++;\r\n const replyCount = newState.commentSummary.subCommentSummaries.find(x => x.type == \"Reply\");\r\n if (replyCount) {\r\n replyCount.totalCount++;\r\n }\r\n }\r\n newState.totalCommentCount++;\r\n return newState;\r\n } else {\r\n const newState = {\r\n ...content,\r\n comments: {...content.comments,\r\n list: [newComment].concat(content.comments.list)\r\n }\r\n };\r\n if (newState.commentSummary) {\r\n newState.commentSummary.totalCount++;\r\n const commentCount = newState.commentSummary.subCommentSummaries.find(x => x.type == \"Comment\");\r\n if (commentCount) {\r\n commentCount.totalCount++;\r\n }\r\n }\r\n newState.totalCommentCount++;\r\n return newState;\r\n }\r\n}\r\n\r\nfunction deleteComment(contents, commentId, parentId) {\r\n if (!contents) {\r\n return undefined;\r\n }\r\n\r\n function deleteCommentFromContent(content) {\r\n if (!content) {\r\n return undefined;\r\n }\r\n\r\n const list = (content && content.comments && content.comments.list) ? content.comments.list : [];\r\n\r\n if (parentId) {\r\n return mapAllComments(content, $comment => {\r\n if ($comment.id != parentId) { return $comment; }\r\n return {...$comment,\r\n replies: markCommentAsDeleted($comment.replies, commentId)\r\n };\r\n });\r\n } else {\r\n return {...content,\r\n comments: {...content.comments,\r\n list: markCommentAsDeleted(list, commentId)\r\n }\r\n };\r\n }\r\n }\r\n\r\n return mapAllContents(contents, deleteCommentFromContent);\r\n}\r\n\r\nfunction getDisplayedTypers(myId: string, typingUsers?: TypingUsers): TypingUser[] {\r\n const numDisplayed = 3; // configure to however many users you want to display\r\n if (!typingUsers) {\r\n return [];\r\n }\r\n const typingUserIds: Array = Object.keys(typingUsers);\r\n if (typingUserIds.length === 0) {\r\n return [];\r\n }\r\n\r\n const displayedTypers: Array = [];\r\n\r\n // If we are one of the typingUsers, we want ourselves to be at the front of the list.\r\n // this provides us with instant feedback from which we can infer that others are also\r\n // seeing that we're typing.\r\n if (myId && typingUsers[myId]) {\r\n displayedTypers.push(typingUsers[myId]);\r\n }\r\n\r\n for (const id of typingUserIds) {\r\n if (!myId || !typingUsers[myId] || typingUsers[myId].id !== id) {\r\n displayedTypers.push(typingUsers[id]);\r\n }\r\n if (displayedTypers.length >= numDisplayed) {\r\n return displayedTypers;\r\n }\r\n }\r\n\r\n return displayedTypers;\r\n}\r\n\r\nfunction mapAllContents(contents: { [id: string]: Content }, mapFunc: (content: Content) => Content): { [id: string]: Content } {\r\n const newContents: { [id: string]: Content } = {};\r\n for (const [contentId, content] of Object.entries(contents)) {\r\n newContents[contentId] = mapFunc(content);\r\n }\r\n return newContents;\r\n}\r\n\r\nfunction addTyper(currentId: string, currentMarket: string, contents: { [id: string]: Content }, me: User, typer: TypingUser, contentId: string): { [id: string]: Content } {\r\n return mapAllContents(contents, (content) => {\r\n const currentContentId = (content && content.id) || (currentId && currentMarket && currentId + \"_\" + currentMarket);\r\n if (currentContentId !== contentId || Object.keys(content.typingUpdates.typingUsers).includes(typer.id)) {\r\n return content;\r\n }\r\n const typingUpdates = { ...content.typingUpdates };\r\n const myId = me && me.id;\r\n const newTypingUsers: TypingUsers = { ...typingUpdates.typingUsers, [typer.id]: typer };\r\n typingUpdates.typingUsers = newTypingUsers;\r\n typingUpdates.displayedTypers = getDisplayedTypers(myId, newTypingUsers);\r\n typingUpdates.numTypers = Object.keys(newTypingUsers).length;\r\n return { ...content, typingUpdates };\r\n });\r\n}\r\n\r\nfunction updateTypersIfNeeded(contents: { [id: string]: Content }, me: User, expirationTime: number): { [id: string]: Content } {\r\n return mapAllContents(contents, (content) => {\r\n const typingUpdates: TypingUpdates = content && { ...content.typingUpdates };\r\n const myId: string = me && me.id;\r\n const cleaningStaleTypers = true; // set to false for testing\r\n if (typingUpdates && typingUpdates.typingUsers) {\r\n const newTypingUsers: TypingUsers = cleaningStaleTypers ? {} : { ...typingUpdates.typingUsers };\r\n for (const userId in typingUpdates.typingUsers) {\r\n const user = typingUpdates.typingUsers[userId];\r\n if (user.lastTypingTime >= expirationTime) {\r\n newTypingUsers[userId] = user;\r\n }\r\n }\r\n return Object.keys(newTypingUsers).length == Object.keys(typingUpdates.typingUsers).length ? content : {\r\n ...content,\r\n typingUpdates: {\r\n ...typingUpdates,\r\n typingUsers: newTypingUsers,\r\n displayedTypers: getDisplayedTypers(myId, newTypingUsers),\r\n numTypers: Object.keys(newTypingUsers).length\r\n }\r\n };\r\n }\r\n });\r\n}\r\n\r\nfunction recordSignalRHub(content: Content, contentId: string) {\r\n const typingUpdates = {\r\n typingUsers: {},\r\n displayedTypers: [],\r\n numTypers: 0,\r\n hubName: contentId\r\n };\r\n return { ...content, typingUpdates };\r\n}\r\n\r\nfunction markCommentAsDeleted(comments, commentId) {\r\n const newComments = [];\r\n for (let index = 0; index < comments.length; index++) {\r\n const comment = comments[index];\r\n if (comment.id == commentId) {\r\n comment.isDeleted = true;\r\n comment.isHidden = true;\r\n comment.visibleStatus = \"DeletedByUser\";\r\n }\r\n newComments.push(comment);\r\n }\r\n return newComments;\r\n}\r\n\r\nfunction insertReplies(existingReplies, newReplies) {\r\n const replies = existingReplies.concat(newReplies).map(x => { x.addedOffline = false; return x; });\r\n const replyIds = replies.map(x => x.id);\r\n const distinctReplies = replies.filter(function(item, index) {\r\n return replyIds.indexOf(item.id) >= index;\r\n });\r\n distinctReplies.sort(function(a, b) {\r\n const keyA = new Date(a.createDatetime); const keyB = new Date(b.createDatetime);\r\n if (keyA < keyB) { return -1; }\r\n if (keyA > keyB) { return 1; }\r\n return 0;\r\n });\r\n return distinctReplies;\r\n}\r\n\r\nfunction makeErrorIfUndefined(action: string, args: Object): { error: { action: string, argument: string } } {\r\n for (const [key, value] of Object.entries(args)) {\r\n if (!value) {\r\n return { error: { action: action, argument: key } };\r\n }\r\n }\r\n return { error: undefined };\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport \"../publicPath\";\r\n\r\nimport { DarkModeBackgroundColor, ExperienceInitialProps } from \"@msnews/experiences-base\";\r\nimport { RequestContext, TelemetryBase, UrlUtility, appEnvironment, resolver } from \"@msnews/core\";\r\nimport { SocialConnector, SocialReducer, ToolingInfo as SocialToolingInfo } from \"@msnews/social\";\r\nimport { SocialDataConnector, SocialDataReducer } from \"@msnews/social-data-connector\";\r\nimport { handleAppErrorEventCall, handlePartialPageImpressionCall, handleSetTrackingAttrs, handleTelemetryCall } from \"../integration/PrimeTelemetry\";\r\n\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\nimport { DesignSystemDefaults } from \"@microsoft/fast-components-styles-msft\";\r\nimport { DesignSystemProvider } from \"@microsoft/fast-jss-manager-react\";\r\nimport { Direction } from \"@microsoft/fast-web-utilities\";\r\nimport { IExperienceConfig } from \"cms-models-msn/configuration/IExperienceConfig\";\r\nimport { Mediator } from \"../integration/Mediator\";\r\nimport { PageBase } from \"@msnews/experiences-redux\";\r\nimport React from \"react\";\r\n\r\n// Containers for experiences\r\nconst roots: { [id: string]: HTMLElement; } = {};\r\nconst apps: { [id: string]: PageBase; } = {};\r\nlet experienceConfig: IExperienceConfig = null;\r\n\r\n// Map base telemetry to prime library for hybrid\r\nTelemetryBase.trackAppErrorEvent = handleAppErrorEventCall;\r\nTelemetryBase.trackPartialImpression = handlePartialPageImpressionCall;\r\nTelemetryBase.trackEvent = handleTelemetryCall;\r\nTelemetryBase.setTrackingAttrs = handleSetTrackingAttrs;\r\n\r\nfunction getFlight(flightId): boolean {\r\n if (appEnvironment.CurrentRequestTargetScope && appEnvironment.CurrentRequestTargetScope.pageExperiments && flightId) {\r\n const experiments = appEnvironment.CurrentRequestTargetScope.pageExperiments;\r\n return !!experiments.find(x => x && x.toLowerCase() == flightId.toLowerCase());\r\n }\r\n return false;\r\n}\r\n\r\nfunction getPageType() {\r\n const href = document.location && document.location.href;\r\n if (!href) {\r\n return undefined;\r\n }\r\n try {\r\n const market = href.split(\"/\").find(x => x.length === 5 && x[2] == \"-\").toLowerCase();\r\n const typeAndId = href.split(\"?\")[0].split(\"#\")[0].split(\"/\").pop();\r\n const pageType = typeAndId.indexOf(\"ar-\") === 0 && \"article\" || typeAndId.indexOf(\"ss-\") === 0 && \"slideshow\" || typeAndId.indexOf(\"vi-\") === 0 && \"video\";\r\n if (pageType && market) {\r\n const id = typeAndId.split(\"-\").pop();\r\n return {\r\n pageType,\r\n id,\r\n market\r\n };\r\n }\r\n } catch (e) {\r\n // no-op\r\n }\r\n return undefined;\r\n}\r\n\r\nfunction addSocialBarIntoArticle(id, market) {\r\n try {\r\n // Todo make sure it works with embedded articles\r\n const container = document.getElementsByClassName(\"authorinfo-flexar\")[0].parentElement;\r\n const newContainer = document.createElement(\"div\");\r\n newContainer.className = \"authorinfo-flexar\";\r\n newContainer.innerHTML = \"
    \";\r\n const exp = newContainer.children[0] as HTMLDivElement;\r\n exp.setAttribute(\"data-social-id\", id);\r\n exp.setAttribute(\"data-social-market\", market);\r\n const separator = container.getElementsByTagName(\"hr\")[0];\r\n if (separator) {\r\n container.insertBefore(newContainer, separator);\r\n } else {\r\n container.appendChild(newContainer);\r\n }\r\n } catch (e) {\r\n // no-op\r\n }\r\n}\r\n\r\n// Add social bar container into video page\r\nfunction addSocialBarIntoVideo(id, market) {\r\n try {\r\n // Todo make sure it works with embedded videos\r\n const container = document.getElementsByClassName(\"metadata\")[0].parentElement;\r\n const newContainer = document.createElement(\"div\");\r\n newContainer.className = \"metadata\";\r\n newContainer.innerHTML = \"
    \";\r\n const exp = newContainer.children[0] as HTMLDivElement;\r\n exp.setAttribute(\"data-social-id\", id);\r\n exp.setAttribute(\"data-social-market\", market);\r\n const separator = container.getElementsByClassName(\"share-container\")[0] || container.getElementsByClassName(\"btns-container\")[0] || container.getElementsByClassName(\"video-description\")[0];\r\n if (separator) {\r\n container.insertBefore(newContainer, separator);\r\n } else {\r\n container.appendChild(newContainer);\r\n }\r\n } catch (e) {\r\n // no-op\r\n }\r\n}\r\n\r\n// Add comment container into view page (body)\r\nfunction addOverlayCommentContainer(id, market) {\r\n const commentContainer = document.createElement(\"div\");\r\n commentContainer.className = \"microsoftNewsCommentModule\";\r\n commentContainer.innerHTML = \"
    \";\r\n const exp = commentContainer.children[0] as HTMLDivElement;\r\n exp.setAttribute(\"data-social-id\", id);\r\n exp.setAttribute(\"data-social-market\", market);\r\n document.body.appendChild(commentContainer);\r\n}\r\n\r\n// Create social bar and comments containers inside article, gallery, video pages\r\nfunction createContainers() {\r\n const pageConfig = getPageType();\r\n if (!pageConfig) {\r\n return;\r\n }\r\n if (pageConfig.pageType === \"video\") {\r\n addSocialBarIntoVideo(pageConfig.id, pageConfig.market);\r\n } else {\r\n addSocialBarIntoArticle(pageConfig.id, pageConfig.market);\r\n }\r\n addOverlayCommentContainer(pageConfig.id, pageConfig.market);\r\n}\r\n\r\n// Render experiences into existing containers\r\nfunction renderToContainers(): void {\r\n if (!experienceConfig) {\r\n return;\r\n }\r\n\r\n // Override the design system for dark mode and ltr/rtl\r\n const requestContext = new RequestContext();\r\n const ocid = UrlUtility.getQueryParameterByName(\"ocid\", document.location && document.location.href);\r\n const isHybridWindowsPage = ocid && (ocid.toLowerCase().indexOf(\"winp\") == 0 || ocid.toLowerCase().indexOf(\"win10newsapp\") == 0);\r\n const isDarkModeSupported = isHybridWindowsPage || getFlight(\"darkmodevvs\") || getFlight(\"prg-mobileappview\");\r\n\r\n // Todo support other flight types in future\r\n const commentDisplayType = \"overlay\";\r\n\r\n // This flight requires widget to be shown under Ad container\r\n if (commentDisplayType == \"overlay\") {\r\n const newStyle = document.createElement(\"style\");\r\n newStyle.innerHTML = `\r\n .videojsplayer .player-wrapper.shrunk {\r\n bottom: 125px;\r\n z-index: 2147483637;\r\n }\r\n `;\r\n document.body.appendChild(newStyle);\r\n }\r\n\r\n const darkModeQuery = matchMedia(\"(prefers-color-scheme:dark)\");\r\n const backgroundColor = isDarkModeSupported && darkModeQuery.matches ? DarkModeBackgroundColor : DesignSystemDefaults.backgroundColor;\r\n const direction = document.dir && document.dir.toLowerCase() === \"rtl\" ? Direction.rtl : Direction.ltr;\r\n\r\n const designSystem = {\r\n ...DesignSystemDefaults,\r\n backgroundColor,\r\n direction\r\n };\r\n\r\n // For each detected container, render corresponding experiences based on container definition.\r\n for (const key in roots) {\r\n const root = roots[key];\r\n // Root doesn't satisfy rendering conditions\r\n if (!root || !root.dataset || !root.dataset.socialId || !root.dataset.socialModule) {\r\n continue;\r\n }\r\n\r\n // We need a new store for each experience to isolate their redux per container.\r\n let app = null;\r\n\r\n // sticky and fixed roots are sharing the same redux store.\r\n if (key == \"sticky\" || key == \"fixed\") {\r\n app = apps[\"sticky\"] || apps[\"fixed\"];\r\n }\r\n\r\n if (!app) {\r\n PageBase.resetPageBaseInstance();\r\n app = PageBase.getInstance();\r\n app.start();\r\n apps[key] = app;\r\n }\r\n\r\n // Update app environment\r\n appEnvironment.HostPage = {\r\n originalUrl: location.href,\r\n hostName: location.hostname,\r\n topDomain: appEnvironment.HostPage.topDomain,\r\n verticalKey: root.dataset.verticalkey || (appEnvironment.HostPage && appEnvironment.HostPage.verticalKey) || \"news\",\r\n categoryKey: root.dataset.categorykey || (appEnvironment.HostPage && appEnvironment.HostPage.categoryKey) || \"other\"\r\n };\r\n\r\n // Create an instance of the social data connector\r\n const socialDataConnector = new SocialDataConnector(\r\n ConnectorNamespaces.SocialData,\r\n \"\",\r\n app.rootReducer,\r\n new SocialDataReducer(),\r\n app.store,\r\n undefined,\r\n requestContext\r\n );\r\n const socialConnector = new SocialConnector(\"Social\", \"\", app.rootReducer, new SocialReducer(), app.store, {...experienceConfig.properties, dataConnectors: []}, requestContext);\r\n const lowerCaseHref = document.location.href.toLowerCase();\r\n const specificCommentId = lowerCaseHref.indexOf(\"commentid=\") != -1 && lowerCaseHref.split(\"commentid=\").pop().split(\"&\")[0];\r\n const context = {\r\n handleTelemetryCall,\r\n handlePartialPageImpressionCall,\r\n handleAppErrorEventCall,\r\n id: root.dataset.socialId,\r\n moduleName: root.dataset.socialModule,\r\n market: root.dataset.socialMarket,\r\n commentDisplayType\r\n };\r\n if (specificCommentId && specificCommentId != \"undefined\") {\r\n context[\"specificCommentId\"] = specificCommentId;\r\n }\r\n const props: ExperienceInitialProps = {\r\n parentTelemetry: {},\r\n context\r\n };\r\n socialConnector.connectComponent(SocialToolingInfo.reactComponent, props).then((socialExperience) => {\r\n app.renderRootElement(\r\n React.createElement(\r\n DesignSystemProvider,\r\n { designSystem },\r\n React.createElement(socialExperience, {...props.context})\r\n ),\r\n root);\r\n });\r\n }\r\n}\r\n\r\nfunction findRoots(setupContainers: boolean, removeOldContainers?: boolean): void {\r\n const placeHolders = {\r\n sticky: \"social-experience-socialbar-sticky\",\r\n fixed: \"social-experience-socialbar-fixed\",\r\n comment: \"social-experience-comment\",\r\n spaTest: \"social\"\r\n };\r\n const keys = Object.keys(placeHolders);\r\n const mockContentId = \"BBBMTFk\";\r\n\r\n keys.map(key => {\r\n try {\r\n // When Prime view contain embedded content we need to handle multiple containers with the same id\r\n if (document.querySelectorAll) {\r\n const placeholders = document.querySelectorAll(`[id=${placeHolders[key]}]`);\r\n if (placeholders.length > 0) {\r\n roots[key] = placeholders[placeholders.length - 1] as HTMLElement;\r\n }\r\n }\r\n } catch (e) {\r\n // Suppress the error\r\n }\r\n if (!roots[key]) {\r\n roots[key] = document.getElementById(placeHolders[key]);\r\n }\r\n\r\n // Remove old container if we want to re-draw new widget for new id\r\n if (removeOldContainers && roots[key]) {\r\n roots[key].parentElement.removeChild(roots[key]);\r\n delete roots[key];\r\n }\r\n });\r\n\r\n // Prepare SPA test mode\r\n if (!roots.comment && !roots.sticky && !roots.fixed && roots.spaTest && location.hash.indexOf(\"debugviewonly\") != -1) {\r\n roots.spaTest.innerHTML = `\r\n ${placeHolders.comment}:
    \r\n ${placeHolders.sticky}:
    \r\n ${placeHolders.fixed}:
    \r\n `;\r\n keys.map(key => roots[key] = document.getElementById(placeHolders[key]));\r\n }\r\n delete roots.spaTest;\r\n\r\n if (setupContainers && !roots.comment && !roots.sticky && !roots.fixed) {\r\n createContainers();\r\n findRoots(false);\r\n }\r\n}\r\n\r\nfindRoots(true);\r\n\r\n// Currently hard coded the experience config index.\r\nresolver.getConfig(\"cms/api/amp/experienceConfigIndex/BB17RkNA\")\r\n .then((ec: IExperienceConfig) => {\r\n experienceConfig = ec;\r\n renderToContainers();\r\n });\r\n// Listen to update events from Prime (Necessary as video page auto updates current displayed video)\r\nMediator.registerSocialActionsUpdatedEvent(async () => {\r\n findRoots(true, true);\r\n renderToContainers();\r\n});"],"sourceRoot":""}