{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/visibility.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/trackInfo.ts","webpack:///D:/a/1/s/libs/diagnostics/src/AppError/AppErrorTracker.ts","webpack:///D:/a/1/s/libs/isomorphic-util/src/DOMHelpers.ts","webpack:///D:/a/1/s/libs/core/src/constants/Constants.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/telemetryDataTypes.ts","webpack:///D:/a/1/s/libs/core/src/app/HeadData.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/reducers/ActionDispatchHelper.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/reducers/ActionDispatchCancellationToken.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/reducers/ActionSenderBase.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/reducers/ActionSender.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/reducers/GlobalActionSender.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/reducers/ActionMap.ts","webpack:///D:/a/1/s/libs/render-cache/src/Constants.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/telemetryconstants.ts","webpack:///D:/a/1/s/libs/core/src/utilities/UrlUtility.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/dom.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/constants/ConnectorConstants.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/mediator.ts","webpack:///D:/a/1/s/libs/isomorphic-util/src/requestData.ts","webpack:///D:/a/1/s/libs/diagnostics/src/AppError/AppErrors.ts","webpack:///D:/a/1/s/libs/core/src/utilities/Parsing.ts","webpack:///D:/a/1/s/libs/core/src/app/AppEnvironment.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/extend.ts","webpack:///D:/a/1/s/libs/experiences-constants/src/AppTypes.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/pageInstance.ts","webpack:///D:/a/1/s/libs/experiences-constants/src/SignedInStatus.ts","webpack:///D:/a/1/s/libs/core/src/utilities/Utility.ts","webpack:///D:/a/1/s/libs/diagnostics/src/logging/Logger.ts","webpack:///D:/a/1/s/libs/core/src/utilities/WebStorage.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/telemetryReadyCallback.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/reducers/DynamicReducer.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/pages/PageHelper.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/pages/PageBase.ts","webpack:///D:/a/1/s/libs/core/src/utilities/CookieUtility.ts","webpack:///D:/a/1/s/libs/core/src/app/Enterprise.ts","webpack:///D:/a/1/s/libs/auth/src/AadAuthHelper.ts","webpack:///D:/a/1/s/libs/core/src/app/Environment.ts","webpack:///D:/a/1/s/libs/experiences-base/src/utilities/ColumnWidths.ts","webpack:///D:/a/1/s/libs/milestone-data/src/data-model/ExperienceLoadingState.ts","webpack:///D:/a/1/s/libs/experiences-base/src/utilities/BreakpointManager.ts","webpack:///D:/a/1/s/libs/diagnostics/src/performance/PageTimings.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/pages/index.ts","webpack:///./src/integration/RequireAsync.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/reducers/DataConnectorInjector.ts","webpack:///D:/a/1/s/libs/render-cache/src/Helper.ts","webpack:///D:/a/1/s/libs/experiences-constants/src/PageTypes.ts","webpack:///D:/a/1/s/libs/diagnostics/src/performance/PerfTimeline.ts","webpack:///D:/a/1/s/libs/diagnostics/src/performance/AppPerfTrace.ts","webpack:///D:/a/1/s/libs/diagnostics/src/performance/ExperienceDiagnostics.ts","webpack:///D:/a/1/s/libs/diagnostics/src/performance/AppPerfTraceConfig.ts","webpack:///D:/a/1/s/libs/oneservice/src/OneServiceUtility.ts","webpack:///D:/a/1/s/components/icon/src/icons/GlyphInline.ts","webpack:///D:/a/1/s/components/icon/src/Icon.props.ts","webpack:///D:/a/1/s/libs/core/src/app/Market.ts","webpack:///D:/a/1/s/libs/core/src/utilities/WebWorkerUtility.ts","webpack:///D:/a/1/s/components/icon/src/index.ts","webpack:///D:/a/1/s/components/icon/src/Icon.styles.ts","webpack:///D:/a/1/s/components/icon/src/Icon.tsx","webpack:///./src/integration/SubnavTabId.ts","webpack:///D:/a/1/s/libs/core/src/app/HostPage.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/guidGen.ts","webpack:///D:/a/1/s/libs/experiences-constants/src/AuthCookieNames.ts","webpack:///D:/a/1/s/libs/milestone-data/src/MilestoneData.actions.ts","webpack:///D:/a/1/s/libs/core/src/utilities/UserNavigation.ts","webpack:///D:/a/1/s/libs/core/src/utilities/ServerCacheMock.ts","webpack:///D:/a/1/s/libs/diagnostics/src/performance/PerfMarker.ts","webpack:///./src/integration/PrimeTrack.ts","webpack:///./src/integration/MediatorEventNames.ts","webpack:///D:/a/1/s/libs/views-helpers/src/IntraArticle.types.ts","webpack:///./src/integration/PrimeTrackExtensionComplete.ts","webpack:///./src/integration/PrimeTelemetry.ts","webpack:///./src/integration/PrimeMediator.ts","webpack:///D:/a/1/s/libs/experiences-constants/src/ConnectorNamespaces.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/reducers/ActionHandler.ts","webpack:///D:/a/1/s/libs/experiences-base/src/tracking/Telemetry.ts","webpack:///./src/integration/SubnavTabName.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/events.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/escape.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/navigation.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/trackingHelper.ts","webpack:///D:/a/1/s/libs/telemetry-transitional/src/msnews-telemetry-transitional/track.ts","webpack:///D:/a/1/s/libs/core/src/utilities/SingletonResetManager.ts","webpack:///D:/a/1/s/libs/views-helpers/src/ViewsStringResource.ts","webpack:///D:/a/1/s/components/icon/icons/AdChoices.svg","webpack:///D:/a/1/s/components/icon/icons/BingCardDefaultHotelImage.svg","webpack:///D:/a/1/s/components/icon/icons/BingHotelSeePrice.svg","webpack:///D:/a/1/s/components/icon/icons/BingLogo.svg","webpack:///D:/a/1/s/components/icon/icons/BingRatingDarkLightStar.svg","webpack:///D:/a/1/s/components/icon/icons/BingRatingDarkStar.svg","webpack:///D:/a/1/s/components/icon/icons/BingRatingLightStar.svg","webpack:///D:/a/1/s/components/icon/icons/BlowingHail.svg","webpack:///D:/a/1/s/components/icon/icons/BlowingHailWhite.svg","webpack:///D:/a/1/s/components/icon/icons/BlowingSnow.svg","webpack:///D:/a/1/s/components/icon/icons/BlowingSnowWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Check.svg","webpack:///D:/a/1/s/components/icon/icons/Chevron.svg","webpack:///D:/a/1/s/components/icon/icons/CircleClose.svg","webpack:///D:/a/1/s/components/icon/icons/ClearNight.svg","webpack:///D:/a/1/s/components/icon/icons/ClearNightWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Close.svg","webpack:///D:/a/1/s/components/icon/icons/CloseThin.svg","webpack:///D:/a/1/s/components/icon/icons/Cloudy.svg","webpack:///D:/a/1/s/components/icon/icons/CloudyWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Copy.svg","webpack:///D:/a/1/s/components/icon/icons/DarkModeHotel.svg","webpack:///D:/a/1/s/components/icon/icons/DayTime.svg","webpack:///D:/a/1/s/components/icon/icons/Delete.svg","webpack:///D:/a/1/s/components/icon/icons/Dislike.svg","webpack:///D:/a/1/s/components/icon/icons/DislikeText.svg","webpack:///D:/a/1/s/components/icon/icons/Disliked.svg","webpack:///D:/a/1/s/components/icon/icons/DislikedLight.svg","webpack:///D:/a/1/s/components/icon/icons/DislikedText.svg","webpack:///D:/a/1/s/components/icon/icons/Docx.svg","webpack:///D:/a/1/s/components/icon/icons/Download.svg","webpack:///D:/a/1/s/components/icon/icons/DownloadNoFill.svg","webpack:///D:/a/1/s/components/icon/icons/Edit.svg","webpack:///D:/a/1/s/components/icon/icons/EditNoFill.svg","webpack:///D:/a/1/s/components/icon/icons/Edited.svg","webpack:///D:/a/1/s/components/icon/icons/EditedNoFill.svg","webpack:///D:/a/1/s/components/icon/icons/Ellipses.svg","webpack:///D:/a/1/s/components/icon/icons/EllipsesLight.svg","webpack:///D:/a/1/s/components/icon/icons/Excel.svg","webpack:///D:/a/1/s/components/icon/icons/Facebook.svg","webpack:///D:/a/1/s/components/icon/icons/FacebookText.svg","webpack:///D:/a/1/s/components/icon/icons/FacebookTextBlack.svg","webpack:///D:/a/1/s/components/icon/icons/Fog.svg","webpack:///D:/a/1/s/components/icon/icons/FogWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Folder.svg","webpack:///D:/a/1/s/components/icon/icons/FolderNoFill.svg","webpack:///D:/a/1/s/components/icon/icons/FolderOpen.svg","webpack:///D:/a/1/s/components/icon/icons/Form.svg","webpack:///D:/a/1/s/components/icon/icons/FreezingRain.svg","webpack:///D:/a/1/s/components/icon/icons/FreezingRainWhite.svg","webpack:///D:/a/1/s/components/icon/icons/GalleryFullscreen.svg","webpack:///D:/a/1/s/components/icon/icons/GalleryMediaIcon.svg","webpack:///D:/a/1/s/components/icon/icons/GenericFile.svg","webpack:///D:/a/1/s/components/icon/icons/GridView.svg","webpack:///D:/a/1/s/components/icon/icons/HailDay.svg","webpack:///D:/a/1/s/components/icon/icons/HailDayWhite.svg","webpack:///D:/a/1/s/components/icon/icons/HailNight.svg","webpack:///D:/a/1/s/components/icon/icons/HailNightWhite.svg","webpack:///D:/a/1/s/components/icon/icons/HazeSmoke.svg","webpack:///D:/a/1/s/components/icon/icons/HazeSmokeWhite.svg","webpack:///D:/a/1/s/components/icon/icons/HeavySnow.svg","webpack:///D:/a/1/s/components/icon/icons/HeavySnowWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Hide.svg","webpack:///D:/a/1/s/components/icon/icons/HideStory.svg","webpack:///D:/a/1/s/components/icon/icons/Hotel.svg","webpack:///D:/a/1/s/components/icon/icons/Information.svg","webpack:///D:/a/1/s/components/icon/icons/InteractionRequiredDark.svg","webpack:///D:/a/1/s/components/icon/icons/InteractionRequiredLight.svg","webpack:///D:/a/1/s/components/icon/icons/Interested.svg","webpack:///D:/a/1/s/components/icon/icons/ListMenu.svg","webpack:///D:/a/1/s/components/icon/icons/LightRain.svg","webpack:///D:/a/1/s/components/icon/icons/LightRainWhite.svg","webpack:///D:/a/1/s/components/icon/icons/LightSnow.svg","webpack:///D:/a/1/s/components/icon/icons/LightSnowWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Like.svg","webpack:///D:/a/1/s/components/icon/icons/LikeText.svg","webpack:///D:/a/1/s/components/icon/icons/Liked.svg","webpack:///D:/a/1/s/components/icon/icons/LikedText.svg","webpack:///D:/a/1/s/components/icon/icons/Line.svg","webpack:///D:/a/1/s/components/icon/icons/LinkedIn.svg","webpack:///D:/a/1/s/components/icon/icons/LinkedInBlack.svg","webpack:///D:/a/1/s/components/icon/icons/LinkedInText.svg","webpack:///D:/a/1/s/components/icon/icons/Mail.svg","webpack:///D:/a/1/s/components/icon/icons/MailBlack.svg","webpack:///D:/a/1/s/components/icon/icons/MailNoFill.svg","webpack:///D:/a/1/s/components/icon/icons/ManagedBriefcase.svg","webpack:///D:/a/1/s/components/icon/icons/Message.svg","webpack:///D:/a/1/s/components/icon/icons/MessageNoFill.svg","webpack:///D:/a/1/s/components/icon/icons/Messages.svg","webpack:///D:/a/1/s/components/icon/icons/MicrosoftNews.svg","webpack:///D:/a/1/s/components/icon/icons/MicrosoftNewsFull.svg","webpack:///D:/a/1/s/components/icon/icons/MicrosoftNewsFull_FR.svg","webpack:///D:/a/1/s/components/icon/icons/MicrosoftNewsFull_ZH.svg","webpack:///D:/a/1/s/components/icon/icons/ModerateRain.svg","webpack:///D:/a/1/s/components/icon/icons/ModerateRainWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Movie.svg","webpack:///D:/a/1/s/components/icon/icons/NightTime.svg","webpack:///D:/a/1/s/components/icon/icons/OfficeFormsLogo.svg","webpack:///D:/a/1/s/components/icon/icons/OneDrive.svg","webpack:///D:/a/1/s/components/icon/icons/OneNote.svg","webpack:///D:/a/1/s/components/icon/icons/Onetoc.svg","webpack:///D:/a/1/s/components/icon/icons/Outlook.svg","webpack:///D:/a/1/s/components/icon/icons/PartlyCloudyDay.svg","webpack:///D:/a/1/s/components/icon/icons/PartlyCloudyDayWhite.svg","webpack:///D:/a/1/s/components/icon/icons/PartlyCloudyNight.svg","webpack:///D:/a/1/s/components/icon/icons/PartlyCloudyNightWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Pdf.svg","webpack:///D:/a/1/s/components/icon/icons/People.svg","webpack:///D:/a/1/s/components/icon/icons/Pin.svg","webpack:///D:/a/1/s/components/icon/icons/PowerPoint.svg","webpack:///D:/a/1/s/components/icon/icons/Pptx.svg","webpack:///D:/a/1/s/components/icon/icons/RainShowersDay.svg","webpack:///D:/a/1/s/components/icon/icons/RainShowersDayWhite.svg","webpack:///D:/a/1/s/components/icon/icons/RainShowersNight.svg","webpack:///D:/a/1/s/components/icon/icons/RainShowersNightWhite.svg","webpack:///D:/a/1/s/components/icon/icons/RainSnow.svg","webpack:///D:/a/1/s/components/icon/icons/RainSnowShowersDay.svg","webpack:///D:/a/1/s/components/icon/icons/RainSnowShowersDayWhite.svg","webpack:///D:/a/1/s/components/icon/icons/RainSnowShowersNight.svg","webpack:///D:/a/1/s/components/icon/icons/RainSnowShowersNightWhite.svg","webpack:///D:/a/1/s/components/icon/icons/RainSnowWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Refresh.svg","webpack:///D:/a/1/s/components/icon/icons/Remove.svg","webpack:///D:/a/1/s/components/icon/icons/Save.svg","webpack:///D:/a/1/s/components/icon/icons/Saved.svg","webpack:///D:/a/1/s/components/icon/icons/Search.svg","webpack:///D:/a/1/s/components/icon/icons/Share.svg","webpack:///D:/a/1/s/components/icon/icons/ShareLight.svg","webpack:///D:/a/1/s/components/icon/icons/Sharepoint.svg","webpack:///D:/a/1/s/components/icon/icons/Shopping.svg","webpack:///D:/a/1/s/components/icon/icons/ShoppingDealsDark.svg","webpack:///D:/a/1/s/components/icon/icons/ShoppingDealsLight.svg","webpack:///D:/a/1/s/components/icon/icons/Skype.svg","webpack:///D:/a/1/s/components/icon/icons/SkypeOffice.svg","webpack:///D:/a/1/s/components/icon/icons/SnowShowersDay.svg","webpack:///D:/a/1/s/components/icon/icons/SnowShowersDayWhite.svg","webpack:///D:/a/1/s/components/icon/icons/SnowShowersNight.svg","webpack:///D:/a/1/s/components/icon/icons/SnowShowersNightWhite.svg","webpack:///D:/a/1/s/components/icon/icons/SunnyDay.svg","webpack:///D:/a/1/s/components/icon/icons/SunnyDayWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Sway.svg","webpack:///D:/a/1/s/components/icon/icons/SwayApp.svg","webpack:///D:/a/1/s/components/icon/icons/Teams.svg","webpack:///D:/a/1/s/components/icon/icons/ThumbnailView.svg","webpack:///D:/a/1/s/components/icon/icons/Thunderstorms.svg","webpack:///D:/a/1/s/components/icon/icons/ThunderstormsWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Trending.svg","webpack:///D:/a/1/s/components/icon/icons/Twitter.svg","webpack:///D:/a/1/s/components/icon/icons/TwitterBlack.svg","webpack:///D:/a/1/s/components/icon/icons/TwitterText.svg","webpack:///D:/a/1/s/components/icon/icons/Unpin.svg","webpack:///D:/a/1/s/components/icon/icons/Upload.svg","webpack:///D:/a/1/s/components/icon/icons/VerticalSeparator.svg","webpack:///D:/a/1/s/components/icon/icons/VideoMediaIcon.svg","webpack:///D:/a/1/s/components/icon/icons/VideoPlay.svg","webpack:///D:/a/1/s/components/icon/icons/Visio.svg","webpack:///D:/a/1/s/components/icon/icons/Vkcom.svg","webpack:///D:/a/1/s/components/icon/icons/Vsdx.svg","webpack:///D:/a/1/s/components/icon/icons/WeatherAlert.svg","webpack:///D:/a/1/s/components/icon/icons/WeeklyAdsDark.svg","webpack:///D:/a/1/s/components/icon/icons/WeeklyAdsLight.svg","webpack:///D:/a/1/s/components/icon/icons/WhatsApp.svg","webpack:///D:/a/1/s/components/icon/icons/WhatsAppBlack.svg","webpack:///D:/a/1/s/components/icon/icons/Windy.svg","webpack:///D:/a/1/s/components/icon/icons/WindyWhite.svg","webpack:///D:/a/1/s/components/icon/icons/Word.svg","webpack:///D:/a/1/s/components/icon/icons/World.svg","webpack:///D:/a/1/s/components/icon/icons/Xlsx.svg","webpack:///D:/a/1/s/components/icon/icons/Yammer.svg","webpack:///D:/a/1/s/libs/core/src/telemetry-base/TelemetryBase.ts","webpack:///D:/a/1/s/libs/experiences-base/src/tracking/Telemetry.types.ts","webpack:///D:/a/1/s/libs/core/src/PublicPath/index.ts","webpack:///./src/publicPath.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/actions/CommonActions.ts","webpack:///D:/a/1/s/libs/core/src/config/configs/ExperienceState.ts","webpack:///D:/a/1/s/libs/core/src/config/configs/ChildExperiencesDeferRenderType.ts","webpack:///D:/a/1/s/libs/core/src/config/configs/ChildExperienceValidator.ts","webpack:///D:/a/1/s/libs/config-validator/src/ConfigProcessor.ts","webpack:///D:/a/1/s/libs/experiences-connector/src/experience-loader/ExperienceLoader.ts","webpack:///D:/a/1/s/libs/experiences-connector/src/connectors/ComponentConnector.ts","webpack:///D:/a/1/s/libs/experiences-connector/src/connectors/ExperiencePerfTimeline.tsx","webpack:///./src/integration/Constants.ts","webpack:///./src/integration/Mediator.ts","webpack:///D:/a/1/s/libs/core/src/app/ScreenWidth.ts","webpack:///D:/a/1/s/libs/core/src/utilities/IndexedDb.ts","webpack:///D:/a/1/s/libs/core/src/services/ExponentialBackoffRetry.ts","webpack:///D:/a/1/s/libs/oneservice/src/ServiceRequest.ts","webpack:///D:/a/1/s/libs/experiences-base/src/utilities/FastBreakpointManager.ts","webpack:///D:/a/1/s/libs/oneservice/src/UrlUtility.ts","webpack:///./src/integration/SubnavTabHelper.ts","webpack:///D:/a/1/s/libs/milestone-data/src/data-management/MilestoneTrackerHelper.ts","webpack:///D:/a/1/s/libs/render-cache/src/PersistHelpers.ts","webpack:///D:/a/1/s/libs/render-cache/src/PersistRenderCache.ts","webpack:///D:/a/1/s/libs/core/src/utilities/ServerCache.ts","webpack:///D:/a/1/s/libs/experiences-redux/src/connectors/DataConnector.ts","webpack:///D:/a/1/s/libs/milestone-data/src/data-model/ExperienceDeferralHandlerSignature.ts","webpack:///D:/a/1/s/libs/milestone-data/src/data-model/ExperienceMilestoneEventTypes.ts","webpack:///D:/a/1/s/libs/core/src/config/configs/ExperienceCompositionTypes.ts","webpack:///D:/a/1/s/libs/core/src/config/configs/composition/ChildrenTypes.ts","webpack:///D:/a/1/s/libs/core/src/bundles/Bundles.ts","webpack:///D:/a/1/s/libs/milestone-data/src/data-model/ExperienceDeferralEventTypes.ts","webpack:///D:/a/1/s/libs/milestone-data/src/MilestoneData.Constants.ts","webpack:///D:/a/1/s/libs/milestone-data/src/data-management/ExperienceDeferralDependencyTrackerState.ts","webpack:///D:/a/1/s/libs/milestone-data/src/MilestoneData.Helper.ts","webpack:///D:/a/1/s/libs/experimentation-helpers/src/GetPeregrineFlights.ts","webpack:///D:/a/1/s/libs/core/src/config/Resolver.ts","webpack:///D:/a/1/s/libs/views-helpers/src/SocialMediaConfig.ts","webpack:///D:/a/1/s/libs/diagnostics/src/performance/PerfTracker.ts","webpack:///D:/a/1/s/libs/experiences-base/src/base/BaseExperience.tsx","webpack:///D:/a/1/s/libs/diagnostics/src/performance/PerfMarkerConstants.ts","webpack:///D:/a/1/s/libs/diagnostics/src/performance/PerfMarkerWait.ts","webpack:///D:/a/1/s/libs/core/src/image-url-generator/ImageUrlGenerator.ts","webpack:///D:/a/1/s/libs/views-helpers/src/ViewsUtility.ts","webpack:///D:/a/1/s/libs/core/src/services/ImageServiceConfig.ts","webpack:///D:/a/1/s/libs/core/src/utilities/UrlSearchParamsHelper.ts","webpack:///D:/a/1/s/components/pop-over/src/PopOver.tsx","webpack:///D:/a/1/s/components/pop-over/src/PopOver.styles.ts","webpack:///D:/a/1/s/components/pop-over/src/index.ts","webpack:///D:/a/1/s/libs/core/src/utilities/ZIndex.ts","webpack:///D:/a/1/s/components/card-context-menu/src/index.ts","webpack:///D:/a/1/s/components/card-context-menu/src/CardContextMenu.style.ts","webpack:///D:/a/1/s/components/card-context-menu/src/CardContextMenu.tsx","webpack:///D:/a/1/s/components/social-media-icon/src/SocialMediaIcon.styles.ts","webpack:///D:/a/1/s/components/social-media-icon/src/index.ts","webpack:///D:/a/1/s/components/social-media-icon/src/SocialMediaIcon.tsx","webpack:///D:/a/1/s/libs/core/src/utilities/ShallowCompare.ts","webpack:///D:/a/1/s/components/share-dialog/src/ShareDialog.styles.ts","webpack:///D:/a/1/s/components/share-dialog/src/StringResource.ts","webpack:///D:/a/1/s/components/share-dialog/src/ShareDialog.tsx","webpack:///D:/a/1/s/components/share-dialog/src/index.ts","webpack:///D:/a/1/s/components/article-card/src/ArticleCard.tsx","webpack:///D:/a/1/s/libs/views-helpers/src/SocialMediaHelper.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/ContentActionsToolbar.constants.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/components/sharing-toolbar/SharingToolbar.props.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/ContentActionsToolbar.actions.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/components/sharing-toolbar/SharingToolbar.constants.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/ContentActionsToolbar.inspector.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/services/ContentActionsToolbarServiceClient.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/ContentActionsToolbar.telemetry.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/ContentActionsToolbar.connector.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/ContentActionsToolbar.props.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/ContentActionsToolbar.reducer.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/components/sharing-toolbar/SharingToolbar.styles.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/components/dialog-article-card/DialogArticleCard.styles.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/components/dialog-article-card/index.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/components/dialog-article-card/DialogArticleCard.tsx","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/components/sharing-toolbar/index.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/components/sharing-toolbar/SharingToolbar.tsx","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/ContentActionsToolbar.tsx","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/ContentActionsToolbar.styles.ts","webpack:///D:/a/1/s/experiences/content-actions-toolbar/src/index.ts","webpack:///./src/content-actions-toolbar/ContentActionsToolbar.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","15","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","Deferred","callbacks","isResolved","resolvedArgs","flushCallbacks","errors","index","then","callback","always","this","arguments","visibilityDeferred","visibilityProperty","prefixes","hidden","prospectivePropertyName","getHiddenPropertyName","isUnloadEventInProgress","addEventListener","wasBrowserHidden","evtname","replace","visibilityChanged","isHidden","clientClientId","browserWidth","browserHeight","notifyWhenPageVisible","isElementTrulyVisible","element","windowRight","windowLeft","windowHeight","contentArea","getElementById","contentRect","getBoundingClientRect","right","left","rec","elementHeightVisible","top","bottom","elementWidthVisible","height","width","wasBrowserHiddenAtLeastOnce","clientIdTypeValue","eventIndex","isFirstEventIndex","eventTransientCustomTags","baseUrl","userDefinedCustomTags","Module","visible","compress","moduleTelemetryData","getAttribute","JSON","parse","getBrowserSize","outerWidth","documentElement","clientWidth","outerHeight","clientHeight","joinTelemetryValuesForTmpl","separator","currentTmplValue","newTmplValue","combinedTelemetryVal","isDuplicateKeyExist","newTmplValueSplited","split","newKeyVal","indexOf","currentTmplValueSplited","currentKeyVal","val","defaultCustomTags","trackInfo","notrack","cmSeparator","defaultModule","defaultFormHeadline","piitxt","piiurl","wrapperId","MUIDCookie","gestureKey","gestureType","tap","rightclick","eventTypes","click","nonNavClckEvt","submit","contextmenu","mouseenter","imprUpdate","adPlay","contentPlay","videoClickNonNav","imprUpdateMechanisms","load","scroll","auto","resize","swipe","partial","view","sitePage","userStatic","overrideClientParams","persistOverriddenParams","customTags","adsEnabled","adoni","trackingDisabled","shouldFireTelemetry","appErrorEnabled","shouldFireAppError","getCurrentTime","Date","timeToInteract","eventTime","eventTiming","performance","timing","navigationStart","telemetryModuleTypes","Undefined","Header","Footer","topNavBar","navBar","dropDown","Section","Carousel","searchBox","inputBox","actionButton","Interaction","Headline","Navigation","Entity","structuredData","appStore","appLaunch","cmsPromotions","microsoftWebStore","xboxStore","officeStore","appInstall","PartnerLinks","SponsoredContent","contentPlacedBySource","Editorial","PersonalizationAlgo","BingAlgo","Taboola","Outbrain","telemetryDataAttribute","telemetryHLAttribute","client","clientId","requestId","clientIdType","gesture","dom","getTarget","trackInfoEvent","originalEvent","ctrlKey","shiftKey","getMuid","getAnonCookieName","AnonCookieName","AuthCookieName","getSsoComplete","SsoComplete","toLowerCase","getAadAuthentication","AadState","AadAccount","NonAadAccount","AccountType","AAD","orientation","screen","OTFTelemetry","mechanism","telemetryData","body","querySelectorAll","innerHeight","innerWidth","infopane","querySelector","infopaneVisible","telemetryTracking","isVisible","visibles","context","formatModules","vc","sendImprUpdateEvent","pageTitle","title","pageUrl","ocid","msnocid","hasQueryString","referrer","referrerOverride","screenResolution","join","userAgent","navigator","visibility","userDynamic","timeStamp","slideType","elem","containsClass","parent","firstEventIndex","currentEventIndex","pageInstance","getRequestId","resetEventIndex","custom","addCustomTags","combinedTags","extend","stringify","addCustomTagsForClickEvent","setupParameters","evt","trackInfoSitePage","anonckName","rid","di","domainId","clid","issso","aadState","afd","anoncknm","page_product","page_type","page_name","page_configuration","topLevelContainerType","parameters","winht","docht","Math","max","scrollHeight","offsetHeight","scrollOff","pageYOffset","scrollTop","wbh","tmpl","templ","mkt","localeCode","TTI","feedId","fid","fn","feedName","ft","feedType","flightid","tlcType","sendUpdate","formattedModules","mData","y","ct","telemetryDataTypes","getTelemetryContentType","telemetryReadyCallback","otfURL","idx","beaconData","url","requestType","POST","eventType","impressionUpdate","params","trackingType","OTF","mediator","pub","FireTelemetry","updateTemplValue","templToAdd","updateSitePage","flightId","currentSitePage","leftTmplValue","rightTemplValue","currentFlightIds","updatePageName","pageName","overridePageType","doOverridePageType","telemetryPageName","getTelemetryPageInfo","PageName","PageType","updateFeedMetadata","updatePagePivot","pagePivot","TelemetryPagePivot","validateTelemetryDataType","updateReferrer","referrerType","TelemetryContentType","setCustomTagsForClickEvent","updatePageUserTypeAndUserId","userType","userId","pageUserId","pageUserType","TelemetryUserType","trackCustomProperty","updateExtendedFlightId","namespace","flightIds","TelemetryPartnerNamespace","extflightid","Severity","canUseDOM","getLocationHref","location","href","getLocationHostname","hostname","getLocationHost","host","getLocationOrigin","origin","getLocationSearch","search","getLocationProtocol","protocol","getDocumentElementById","elementId","getDocumentElementsByTagName","tagName","getElementsByTagName","getIndexedDB","indexedDB","getInnerWidth","getInnerHeight","getDevicePixelRatio","devicePixelRatio","ariaLabelAttribute","rootElementId","htmlElementIds","html","applicationCacheConstants","manifestAttributeName","pagesRefreshData","storedHeadDataKey","storedLastUsedActivityIdKey","clientSettings","pagetypeSettings","info","js","lang","dir","serviceUrl","telemetryId","trackPageProduct","trackPageType","minimumHostPagePathSegments","anonCookieName","appAnonCookieExistsCookieName","childCookieName","oneServiceHeaders","activityId","authorization","oneServiceQueryStringKeys","apiKey","complexInfoPaneEnabled","contentType","delta","disableTypeSerialization","infopaneCount","fdhead","feedLayoutRequestType","filter","ids","market","parentContentId","parentNamespace","parentTitle","queryQ","query","queryType","qScope","responseSchema","select","session","signInCookieName","skip","source","timeOut","user","wrapOData","AriaRoles","DeviceOrientation","EnterpriseOneServiceApi","CoreLocalStorageKeys","pageVersions","PageNamePageTypeMappingList","TelemetryTypeContentTypeMappingList","TelemetryTypeBehaviorTypeMappingList","TelemetryPageType","Unspecified","DHP","NTP","HomePage","VerticalHomePage","StructuredDataPage","SectionFront","SiteSearch","Article","Gallery","Video","SubjectSection","CustomColumn","TelemetryType","TopNavBar","NavBar","DropDown","SearchBox","InputBox","ActionButton","StructuredData","AppStore","AppLaunch","CmsPromotions","MicrosoftWebStore","XboxStore","OfficeStore","AppInstall","Follow","Unfollow","MoreFrom","Topic","Provider","Spotlight","ShareClose","Share","Like","Dislike","Unlike","Undislike","Mute","Unmute","MuteCancel","Manage","NewStories","AutoSuggest","BingCard","Tile","TrendingNews","AllCoverage","Report","AdChoice","Hide","Unhide","App","Feed","AppStorePromo","Settings","StructuredDataCard","Webview","Activity","Win32","OfficeDocument","LocalFile","CardAction","TelemetryBehaviorType","Navigate","ContextMenu","Pin","Unpin","Rearrange","Remove","Add","Open","View","More","Close","Cancel","Launch","Install","Show","Save","Customize","TelemetryPageName","StartPage","DefaultPage","EduPage","ChildModePage","Office","Discover","MyInterests","CombinedInterests","ArticlePageNames","ArticleVNext","ArticleListicle","ArticleCollection","ArticleFullScreen","FlexibleArticle","FlexibleArticleMobile","ArticleGalleryFullScreen","GalleryPageNames","GalleryVNext","GalleryFullScreen","GalleryClassic","GalleryClassicFullScreen","GallerySearch","GallerySearchFullScreen","FlexibleGallery","FlexibleGalleryMobile","GalleryImmersive","GalleryImmersiveFullScreen","GallerySponsored","GallerySponsoredFullScreen","GalleryInline","VideoPageNames","ChannelPlayerPage","PartnerPlayerPage","VerticalHomePageNames","HomePageToday","StructuredDataPageNames","Gamecenter","Schedule","Scores","Stocksummary","Stocksummaryoneriver","Weatherxplatmaps","Standings","Markets","Watchlistpage","Data_modelpage","Immersivechartspage","Currencies","Indexdetailspage","Data_makepage","Weatherfullscreenmaps","Weatherthresholdmaps","Stockanalysisdetails","Data_yearoverview","Data_segmenthub","Weathermaps","Playerstats","Funddetailspage","Exercisedetails","Teams","Etfdetailspage","Binganswermaps","Workoutdetails","Competitionstats","Polls","Data_photos","Videocategorylistpage","Stockfinancialsdetails","Commoditydetailspage","Data_yearoverview_trim","Worldwidepage","Data_photos_trim","Stockcompanydetails","Retirementplanner","Livecoverage","Teamroster","Stockhistorydetails","Filterresultspage","Data_carcompare","Stockownershipdetails","Driverstandings","Timevalueofmoney","Savingscalculator","Iccmatches","Other_flightsearchresult","Stockrelateddetails","Data_specs_trim","Stockoptionsdetails","HomepageAlerts","HomepageRecordsandAverages","HomepageWeatherTraffic","Data_specs","Data_pricing","Mortgagecalculator","Data_performance_trim","Theatershowtimes","Data_pricing_trim","Data_photosInterior","Indexdetailsanalysispage","Data_photosInterior_trim","Data_photosColors","Data_carReviews_trim","Data_carReviews","Racecalendar","Teamstandings","Data_photosColors_trim","Stockdetails","Data_interiorFeatures_trim","Data_exteriorFeatures_trim","Calendar","TeamStats","Movieshowtimes","Drafts","Data_technologyFeatures_trim","Data_workoutdetails_collection","Data_photosExterior","Data_photosExterior_trim","Data_photos360Interior","Immersivechartsmarketspage","Returnoninvestment","Indexdetailsrelatedpage","Gonepage","Data_compare","Data_compare_trim","Data_options_trim","Entitiespage","Workoutdetailsprint","Data_photos360Exterior","HomepageDatacarfinder","Data_photos360Interior_trim","Data_skeleton","Mortgagerates","Brackets","Data_photos360Exterior_trim","Data_photocompare","HomepageWeather10day","Data_performance","HomepageWeatherextendedforecast","Savings","Data_exteriorFeatures","Data_interiorFeatures","Data_options","Travelgonepage","Recipe","Getportfoliodatapage","Brokercenterpage","Data_technologyFeatures","Tvlistings","Ownerstandings","Entitydetailspage","Creditcards","Cmssitemap","Externalnativeadpage","Autoloans","Externalcontent","Htmlsitemap","CustomColumnPageNames","TrendingTopics","GlobalSettingsPage","MyTopics","WeatherPlaces","MyFavorites","TopicResult","Collections","Rouxbe","ShoppingList","MyHealthReportsPage","Error404page","AppsPromotion","Error500page","DietTrackerPreSigninPage","ExerciseTrackerPreSigninPage","WebSlicePage","Error200Page","AboutUsPage","UnSupport","Disclaimer","TermsOfService","SevereWeather","SubjectSectionPageNames","TeamhomePage","PlayerPage","MarketMoversPage","CommoditiesPage","ChefPage","NutritionIndexPage","FinanceTechnologyPage","MedicalindexPage","SiteSearchPageNames","SearchResultsPage","VideoSearchResultsPage","PartnerVideolistPage","HomepageBingserpIframepage","SitesearchSitesearch","SearchResults","SerpPage","FindaMoviePage","SectionFrontPageNames","Competitionhub","Local","Stockscreener","Toolslandingpage","Showtimes","FinanceRealEstatepage","CookingSchool","Allcompetitions","Newspage","CocktailHub","Travelflightsearchhubpage","Hotelshubpage","WineHub","ChefHub","Travelflightstatushubpage","HomepageCompetitionhub","SecfrontHotel","SecfrontTNews","TelemetryProduct","Spartan","Prime","PrimeMobile","IEext","SpartanMobile","TabbedShell","ChromeExt","Downlevel","Xbox","ContentPlacedBySource","Editor","Bing","AutoCuration","User","AppNexus","OtherSponconProvider","TelemetryPageConfiguration","NoContent","OneBox","TopSites","Suggested","ContentFeed","WinFre","StripeLayout","TelemetryPageMode","Default","Trial","Subscription","Apps","News","Timeline","StartMenu","MMX","Shell","Edge","Cortana","Aad","Msa","MsaKids","telemetryType","prop","getTelemetryBehavior","TelemetryActionType","Click","Hover","Submit","RightClick","pageType","telemetryPageNameObject","EnterpiseFlightId","OfficeDefaultPivotFlightId","HeadData","clientData","enableCMSPPEConfigs","initializeHeadData","locale","marketDir","currentFlights","userIsSignedIn","isPreload","isAppcache","isEnterprise","isOfficeDefaultPivot","isServiceWorkerCache","lastKnownAppVersion","ssoComplete","_instance","headData","initializeFromData","locationSearch","htmlElement","headElement","initializeFromDom","initializeFromStorage","serviceWorker","controller","updateStorageActivityId","language","toLocaleLowerCase","setQueryItemProvidedValues","headDataJs","headJs","anonckname","signedin","getQueryParameterByName","setIsEnterprise","setIsOfficeDefaultPivot","storedActivities","getItem","storedActivityIds","ClientSettings","pagetype","setFlights","clientInfo","dataClientSettings","pageTypeFromSettings","storedVersions","getObject","v","currentDomVersion","setObject","responseFromStorage","parsedResponseFromStorage","currentPageStoredHeadData","storedClientSettings","storedFlights","currentPageVersion","aid","existingLastUsedActivityIds","currentPageLastUsedActivityId","id","previouslyUsed","activityIdToStore","ts","getTime","setItem","flightString","exec","IsEnterprise","includes","audienceMode","Enterprise","queryItems","getParamsWithItems","cmsItem","find","item","setCurrentFlightsTestOverride","flights","IsOfficeDefaultPivot","getHeadData","getInstance","resetInstance","getActionPayload","connector","args","experienceInstanceId","stateKey","dispatchAction","payload","store","dispatch","PageBase","ActionDispatchCancellationToken","isCancelled","cancellationToken","isCancellationRequested","observers","perfTimeline","tryGetPerfTimeline","actionEndMeasure","startMeasure","endMeasure","dispatchResult","getDispatchResult","Array","forEach","observer","log","renderActionPayload","ConnectorConstants","renderAction","super","connectorInstance","rootReducer","locationHref","storagePrefix","expirationPrefix","jssMapKey","renderCacheKey","renderCacheExpirationKey","defaultExpirationTimeMs","riverRcClassName","logSamplingRate","GET","Ctag","Comscore","Exp","ResetIdx","UrlUtility","primeForbiddenCharacters","getParamsFromUrl","decodeComponents","getParams","decodeURIComponentWithPlusSign","decodeURIComponent","queryString","startsWith","substring","queryArray","ndx","parts","queryKey","queryValue","newParam","existingParam","entry","encodeURIComponentForPrime","uriComponent","encodeURIComponent","findIndex","paramsObj","paramArray","keyValuePair","getParamsObj","isValidUrl","validateScheme","keyValueArrayToQueryString","kv","isKeyValuePair","map","joinSubpathToURL","subPath","trimmedEndSlashFromHref","trimmedStartSlashFromSubpath","URL","updateSearchParam","searchParams","set","appendSearchParam","fallback","append","getAbsoluteUrl","partialUrl","doc","otherWhitespaceRegex","trimRegex","attr","nodeName","text","textContent","innerText","children","parentNode","className","customTarget","srcElement","connectorStateKey","dataConnectorMergeInitAction","defaultPubSub","PublishSubscribe","channels","getChannel","channel","pubMap","sub","listeners","unsub","pubChannel","subChannel","unsubChannel","RequestData","canUseCssGrid","global","resetRequestData","getRequestData","severity","Alert","pb","build","BUILD_NUMBER","ServiceUiError","OneServiceCardProviderAppErrors","NoAlert","OneServiceResponseWasNullOrErroneous","ErrorFetchingOneServiceResponse","HighImpact","InvalidJsonInOneServiceResponse","InvalidFeedListInOneServiceResponse","RiverConfigurationIssue","QueryInterestContentFetchError","StaticContentLoaded","ContentPreviewAppErrors","ErrorWhileFetchingContentPreviewContent","InvalidResponseFromContentPreviewFetch","InvalidResponseFromContentPreviewResponseJson","ErrorWhileInitializingAsyncContentPreviewContent","InvalidOrMissingContentId","MissingDataForExternalContent","RiverAppErrors","UnknownMetadataReceivedFromRiverCardProvider","RiverContentProviderFetchException","UnableToSelectSectionTemplateForGivenChildExperiences","InvalidConfig","ChildLoadError","InitialDataLoadError","DuplicateInstanceIdWarning","UserInitiatedPageRefreshErrors","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","PageClickTrackerErrors","InvalidResponse","FetchFailure","CoachmarkAppErrors","GeneralError","NotPlaceable","NotFoundComponent","CoachmarkDataConnectorUndefined","CoachmarkDataAppErrors","InvalidCoachmarkMessage","IrisDataConnectorUndefined","NoSurfaceFoundForCampaign","ErrorFoundForSurface","TelemetryInfoUndefined","EventTypeUndefined","IrisActionUndefined","SpotlightPreviewAppErrors","ErrorWhileFetchingSpotlightPreviewCardInfo","NoServiceContextMetadata","SpotlightErrors","UnknownError","ContentFetchError","CardActionErrors","CardActionBaseExperienceError","CardActionPostActionError","CardActionDeleteActionError","CardActionGetActionError","CookieRelatedErrors","SharedStateConnectorNull","OverlayErrors","LoadExperienceError","ViewsCommonAppErrors","InvalidIntraArticleDataError","InvalidDocumentContentError","ViewsPaddleDataLoadError","ViewsErrorPage","ProviderMapperError","ContentActionsToolbarAppErrors","ContentActionsSharingToolbarLoadError","ContentActionsArticleDatafetchError","ContentActionsBaseExperienceError","ContentActionsGetDocumentDataError","ContentActionsGetContentStatusActionError","ContentActionsDeleteActionError","ContentActionsPostActionError","ContentActionsExperienceLoadError","ContentActionsFlipToolbarError","ContentActionsContentStatusFetchError","ContentActionsContentPreviewFetchError","ContentSharingToolbarAppErrors","ContentSharingToolbarInitializationError","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","ComponentConnectorAppErrors","DuplicateChildInstanceFound","BundleLoadError","ChildConfigInfoListNull","ListStartPositionInvalid","ChildDelayLoadError","ExperienceDependencyTimeout","ExperienceLoaderAppErrors","InsufficientLoadArgs","SearchError","PollsCardAppErrors","PollsListFetchError","PollDataFetchError","PollsCardInvalidPoll","PollsCardInvalidQuizPoll","PollsCardVoteError","PollsCardMapStateToPropsError","PollsUnknownError","MonetizationAppErrors","PlacementManagerLoadError","ArrangementPositionLoadError","GetCMSContentError","GetSAMRTBResponseError","MediaNetEOABError","InvalidPromoModuleConfig","CookieSyncDownloadExternalScriptError","CookieSyncMissingExternalScriptUrl","CookieSyncTimeout","CookieSyncPartnerScriptError","CookieSyncPixelPartnerDownloadError","CMSOrBackfillNativeAdLoadError","MissingRequiredPropertyPlacementManagerConfig","NativeAdTargetScopeError","RiverVideoAdPartnerError","JsTrackerPartnerScriptLoadError","ViglinkError","MissingTopicId","TopicIdNotFound","GetSAMRTBResponseErrorNoAlert","DisplayAdsOathLoadError","DisplayAdsApnLoadError","DisplayAdsApnEmptyProvider","DisplayAdsAdsDetectionNotInit","DisplayAdsMoatLoadError","DisplayAdsNoAdObjects","DisplayAdsProviderIdEncode","TaboolaRiverAppErrors","TaboolaRiverFetchError","CoreLibAppErrors","DeprecatedCompositionLayoutUsed","InvalidColumnInGridConfig","ErrorLoadingBundle","GenericJSException","LocalStorageDoesntExist","SessionStorageDoesntExist","ResolverAppErrors","IndexedDbWriteFailed","IndexedDbReadFailed","CrsFetchFailed","ReceivedConfigFromCdnAsCrsFetchFailed","GetConfigException","IndexedDbBulkReadFailed","IndexedDbFailedToRemoveCachedConfig","IndexedDbFailedToClearAllCachedConfigs","RenderCachePurgedDueToChangesInConfig","FailedToPurgeRenderCache","RefreshConfigCacheFailed","IndexedDbInitFailed","DifferentCbid","BingCardsAppErrors","BingCardGetHotelAnswersError","BingCardGetHotelErrorFromService","BingCardGetAnswersError","BingCardInvalidEntityType","BingCardErrorOut","BingAnswersAppErrors","FailedToLoadData","NoCardsContentType","NoCardsRelated","BingShoppingLifestyleCardError","LifestyleShopCardServiceFetchError","LifestyleShopCardServiceFetchInvalidResponse","LifestyleShopCardServiceEmptyResponse","LifestyleShopCardServiceInvalidResponse","LifestyleShopCardCdnServiceFetchError","LifestyleShopCardCdnServiceFetchInvalidResponse","LifestyleShopCardCdnServiceInvalidResponse","LifestyleShopAutosuggestServiceFetchError","LifestyleShopAutosuggestServiceFetchInvalidResponse","LifestyleShopAutosuggestServiceEmptyResponse","LifestyleShopAutosuggestServiceInvalidResponse","LifestyleShopAutosuggestInvalidSuggestionUrl","OneServiceContentDataConnector","FailedToUpdateBypassValueConnectorNotInitialized","FailedToGetBypassValueConnectorNotInitialized","NotificationBellErrors","JsonParseError","NewsItemDataFetchError","MalformedNewsItemResponseError","RecommendedSearchErrors","ResponseParsingFailed","InvalidJsonResponse","ServiceCallFailed","RenderFailed","Timeout","ElectionResultMapConnectorErrors","ElectionResultMapInspectorErrors","EmptyResultSummaryError","ElectionResultMapErrors","FetchAndUpdateElectionDataError","ElectionDelegateCounterErrors","WebWorkerErrors","FileNotFound","RuntimeError","MessageTimeout","HandledError","IrisErrors","IrisUnknown","InvalidQParams","ArcCallFailed","ArcResponseNotOk","ArcResponseUnparsable","MissingAppEnv","UnknownIrisErrorFound","TimeoutIrisErrorFound","TemplateIrisErrorFound","ClientErrorIrisErrorFound","DSourceIrisErrorFound","ActionCallFailure","ActionFetchFailure","ActionResponseFailure","UncaughtErrorDetected","UnconvertableCreative","InvalidResponseFormat","AbortErrorDiscovered","UnparsableSingleResponseJSON","IrisDataConnectorErrors","SubscriberNotFound","CreativeCountNegativeOrZero","ErrorFetchingSurfaceInfo","SubscriberNotFoundInIrisPlacementDictionary","RenderCacheErrors","JssStyleMismatchWarning","JssStyleCriticalMismatchError","PreloadReportingMessages","TtvrMissing","TfprMissing","TtvrSearchBoxMissing","TtfSearchBoxMissing","PushNotificationsLibErrors","FetchKeyError","SubscribeUnsubscribeError","ContentTruncationErrors","OverTruncationError","tryParseJson","jsonString","tryParseInt","defaultValue","parseInt","isNaN","AppEnvironment","_serviceUrl","_configServiceUrlBase","initializeAppEnvironment","environmentConfigUrl","process","env","WEBPACK_DEV_SERVER","URLSearchParams","searchParam","contentServiceUrlBase","currentRequestTargetScope","currentMarket","environment","assetsHost","hostPage","appType","authCookieName","accountType","accountInfoPromise","buildVersion","isDebug","showMnsCreatorDashboard","currentContentLinkHost","serviceUrlBase","feedServiceUrlBase","isFrePage","rootTelemetryId","getUserMuid","disableCachingConfigs","enableConfigService","EnableCMSPPEConfigs","isMultiConfigRetrievalEnabled","disableContentPreviewCache","sendFeedCallActivityIdInHeader","queryParamOverride","disableContentCacheIDBRead","disableContentListCache","disableContentListCacheIDBRead","configServiceBaseUrl","featureFlags","configRootUrl","cacheBustingIdentifier","countryCode","latitude","longitude","configServiceUrlBase","appEnvironment","environmentFromHeadData","tryReformatGuid","Locale","apps_locale","geo_country","geo_lat","geo_long","setAccountType","setAccountInfoPromise","apptype","getAuthCookieName","disableActivityIdInHeader","cbid","rootElement","locationOrigin","envQSOverwrite","prod","feedBaseDomain","getHostPageFromUrl","endsWith","Number","trackPageProd","trackPageTypeVal","createContentLinkHost","setTargetScope","useMultiConfigsRetrieval","getConfigServiceBaseUrl","muid","muidCookie","relativePath","int","urlQuery","param","FirstParty","Hub","MicrosoftNews","Views","Anon","EdgeChromium","AppAnon","chrome","authPrivate","getPrimaryAccountInfo","accountInfo","SignedOut","account_type","MSA","AccountInfoPromise","ZHCN","guid","matches","match","Kids","Adult","browser","deviceFormFactor","domain","os","platform","Web","stringHasData","CurrentFlights","pageExperiments","getAppEnvironment","obj","isRecursive","arr","isArray","toString","AppType","updatePageInstance","form","refigInputs","setRequestId","newRequestId","eventName","SignedInStatus","AadAccountType","Utility","isNotNullOrUndefined","isDefined","potentialKeyValuePair","isKey","isValue","isNonNullObject","isNotNull","isNullOrWhiteSpace","trim","toNumber","arrayHasData","constructor","objectToString","firstRun","attribute","Logger","setupBrowserEnvironment","isDebugEnabled","webpackRequire","setupNodeEnvironment","windowObj","logger","Info","Browser","setupLogLevel","NodeJs","getMessage","infoCallback","setLevel","setupAppenders","removeAllAppenders","addAppender","getLevel","nameRegEx","queryNameValueMatches","RegExp","defaultInstance","WebStorage","storage","supported","parsedObj","removeItem","logError","matchingKeys","storageKey","localStorage","ex","trackAppErrorEvent","sessionStorage","queuedCalls","pageRevealed","trackValuesUpdated","checkAndFireQueuedCalls","visibilityState","onVisibilityChange","removeEventListener","_connectorMap","_globalConnectors","_allConnectors","_getDataConnectorPendingPromises","Map","reduce","dataConnector","pendingPromise","resolveCallback","rejectCallback","state","actionPayload","newState","stateChanged","typeIsString","statePropertyKey","connectorState","experienceFullNamespace","dataConnectorName","initializeExperience","isGlobal","merge","connectorReducerResult","computeNextStateForConnector","reportStateChange","keys","fullNamespace","has","delete","connectorPreviousState","nextStateForConnector","subReduce","reducer","connectorStateChanged","previousState","reducedState","designSystemMap","WeakMap","designSystemIndexMap","createGenerateClassName","designSystem","dsName","dsIndex","rulesMap","rule","sheet","initialState","enhancer","middlewares","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","trace","traceLimit","_rootReducer","needsHydrate","_store","connectors","onApplicationStart","connectedTopLevelElement","hostElement","updateJssManagerInstance","pageTimings","hydrate","SSR","startMark","render","jssInstance","plugins","jss","getCookie","cookie","getMuidCookie","setRequireFunctionalCookie","expiryDays","path","secure","expiryDate","builder","date","setTime","toUTCString","oneServiceScope","aadTokenQsKey","aadTokenQsVal","useEnterpriseCompliance","sharedStateConnector","ConnectorNamespaces","SharedState","getCurrentState","getAadData","resolveAccountInfo","tokenAcquireParameters","account_id","client_id","scope_or_resource","acquireAccessTokenSilently","acquireResult","token","access_token","errorInfo","error_info","isSuccess","is_success","isValid","is_token_valid","useEnterpriseDomain","Environment","getEnvironmentFromString","int1","intpr","intpef","Size1ColumnWidth","Size2ColumnWidth","Size3ColumnWidth","Size4ColumnWidth","GutterSize","ExperienceLoadingState","ColumnArrangement","minViewportWidthOverrides","ColumnArrangementDefinition","arrangement","contentSizePx","isFirstBreakpoint","widthOverride","contentBufferPx","columnArrangements","c1","c2","c3","c4","columnArrangementMap","columnArrangementDefinition","getMediaQuery","minArragement","maxArrangement","queries","minWidthPx","minViewportWidthPx","maxArrangementDefinition","maxArrangementIndex","getMediaQueryFor","columnArrangement","getMediaQuerySelector","mediaQuery","getMediaQuerySelectorFor","_pageTimings","getPageTimings","incrementCounter","counterName","existingCount","requireAsync","moduleName","require","dataConnectorToExperienceKeyMap","createStatePropertyKey","dataConnectorInjector","registerInjection","experienceSet","Set","add","appState","experienceStatePropertyKey","initialDataConnectorState","dataConnectorNamespace","newDataConnectorState","experienceKeys","experienceKey","experiencePreviousState","renderCacheObject","batchCSS","batchCss","styles","dataset","innerHTML","scrapeDom","includeNewsFeed","root","rivers","getElementsByClassName","river","outerHTML","getStateFromRenderCache","renderCache","cacheExpirationTimestamp","parsedCacheExpirationTimestamp","renderCacheStorage","batch_css","getRenderCache","reduxStoreStringifyReviver","dataType","AudienceModeType","KeyCounter","timelineCount","timelineName","count","getCount","timelineKeyCount","startSuffix","endSuffix","instanceId","addPerfMarks","addPageTimings","async","markerCount","measures","qualifyKey","measure","oldMeasureName","qualifyMeasureName","measureName","newMeasureName","from","to","coreMarkerName","dynamicMeasureName","startTime","now","timelineNameAtStart","measureNameCore","formatMeasureName","startMarkerName","singleMark","updatedDynamicMeasureName","endTime","endMarkerName","funcName","func","bindingContext","_this","promiseName","getPromise","coreMeasureName","dynamicMeasureSuffix","markerName","mark","startMarker","endMarker","chromeMetadata","metadataType","pid","threadId","metadata","ph","tid","chromeInstantMarker","category","timeStampMs","chromeMarker","auxData","marker","cat","convertToMicroseconds","calculateTimelines","timelineGroups","groupBy","checkTime","timelineList","maxValue","groupName","timeline","sort","info1","info2","timeline1","timeline2","mergePageTimings","asyncExperiences","matchRegex","startSuffixRegex","endSuffixLookup","processedKeysToRemove","startSuffixMatch","endKey","endValue","thisTimelineName","prefixSuffixMatch","fromValue","keyToRemove","tryCreateAsyncPID","nextPID","round","fromMs","toMs","uploadTrace","maxTime","configOverrides","perfTimelineInstances","config","experienceName","enablePerfTimeline","experiencesForPerf","experiencesExcludedForPerf","trackAllExp","shouldTrackPerfTimeline","instanceKey","getInstanceKeyCore","addPerformanceMarks","getPerfTimeline","renamePerfTimeline","newExperienceName","oldInstanceKey","getInstanceKey","rename","newInstanceKey","getExperienceMeasures","pageMeasures","getPageMeasures","assign","expPerfQsp","expPerfSkipQsp","parsedConfig","sampleRate","minimumTTVR","expName","tryParseAppTraceConfig","setAppPerfTraceConfigOverrides","_getAppPerfTrace","nonZeroResources","getEntriesByType","duration","regex","resourceGroup","remainingResources","entryIndex","pathname","mergeResourceTimings","destinationMeasures","sourceMeasures","mergeExperienceTimings","appTimings","_appTimings","chromeTrace","key1","key2","sort_index","timelineIndex","measureIndex","substr","lastPathIndex","lastIndexOf","truncateName","showInParentThread","chromeAsyncMeasure","durationMis","dur","chromeSyncMeasure","OneServiceUtility","getOneServiceParamsWithoutAuth","ocidSpecifier","addPageInfoToOcid","ActivityId","getOneServiceOCID","TrackInfo","CurrentMarket","runningExperiments","getOneServiceHeaders","headers","aadData","authenticationTicketType","signedInCookieNameHeader","userLocationHeader","serviceRequestOnComplete","serviceRequest","callbackMethod","getOneServiceParamsWithAuth","toUpperCase","getOneServiceFeedCallHeaders","SendFeedCallActivityIdInHeader","getLocationParams","Latitude","Longitude","getBaseRequestData","method","getCommonParams","UserIsSignedIn","UserId","DoubleTap","EmptyMruDark","EmptyMruLight","EmptyPinnedDark","EmptyPinnedLight","EmptySharedDark","EmptySharedLight","NotificationFivePlusSign","NotificationRefreshArrow","PollResults","Market","isWebWorkerPresent","messages","logAppError","standbyMessages","getFromWebWorker","timeoutInMs","defaultResponse","fetched","endGetFromWebWorker","standbyMessageData","promiseTimeout","timeOutPromise","errorMessage","customMessage","webWorkerPromise","response","webWorker","postMessage","race","sendToWebWorker","subscribeWebWorkerNotification","override","_isWebWorkerPresent","onmessage","pendingMessage","icon","icon_inline","props","handledProps","ariaLabel","fill","glyphType","managedClasses","onError","wrapperClassName","svgComponent","setState","ReactComponent","prevProps","LazyLoadedSvgComponent","attrProps","generateClassNames","role","style","wrapperCss","renderSvgComponent","SubnavTabId","HostPage","pathnameSegments","topDomainName","originalUrl","categoryKey","verticalKey","hostName","topDomain","indexOffset","subcategoryKey","guidGen","timestampSeed","seededRandom","random","floor","AuthCookieExistsCookieName","MilestoneDataActionsImpl","updateAboveTheFoldVisuallyReady","updateBelowTheFoldTransitionStart","updateExperienceLoadDeferralState","updateExperienceCurrentState","updateExperienceRenderDeferralState","updateInitTiming","updatePageComplete","updateRenderTiming","updateVisuallyReadyTiming","updateDomCompleteTiming","updateMilestonePlugins","MilestoneDataActions","userNavigatingAway","isUserNavigatingAway","MockLRUCache","cacheMap","maxAge","StartMarkSuffix","PerfMarker","endMarkSuffix","initialize","instance","measureStartEnd","endMark","perfMarkers","perfEntries","perfMarkerDetail","PerfMarkerDetail","processPerfEntry","perfMarker","perfEntry","firstStartTime","getTrack","MediatorEventNames","ContentActionsUpdated","FeedFollowed","ForcePageReload","FollowedTopicsUpdated","MediatedCoachMark","TabNavigation","TabNavigateTo","TopicAction","Msn360","CardActionInit","CardActionPost","InterestsRenderComplete","RenderXFeed","ShowPivotById","ResumeInfopaneAutoRotate","IntraArticleComponentPosition","IntraArticleComponentType","getTrackExtCompleteCanary","trackingResolved","trackingObject","trackExtCompleted","trackEventBuffer","trackImpressionBuffer","trackAppErrorEventBuffer","trackingPromiseCalled","sendTrackingCall","destination","headline","trackEvent","sendPartialPageRequest","visibilityCheck","trackPartialImpression","sendTrackAppErrorEvent","appError","errId","errSource","errMsg","processPendingTrackingCall","eventObj","handleTelemetryCall","handlePartialPageImpressionCall","handleAppErrorEventCall","getMediator","ActionHandler","actionMap","actionMaps","actionPayloadType","String","Telemetry","parentTelemetry","childTelemetry","parentIndex","telemetryName","initTelemetryProps","resultTelemetryProps","createProps","setChildProps","rootTelemetryIndex","rootIndex","getNewIndex","ordinalTracker","ordinal","childIndices","childOrdinalCounter","savedProps","componentProps","initializationProps","resetChildProps","f","h","headlineIndex","vertical","filteredResult","tags","userFacingText","telemetryIndex","oldProps","newProps","telemetry","0","SubnavTabName","Interests","MyFeed","XFeed","handler","unbind","sequenceTokens","sequenceValues","\"","urlPart","ch","navigation","getUrl","relativeUrl","navigate","getHostName","parseUrl","isLocal","supportMultiple","mergeQueryStringParams","newParams","urlParts","decodeURIComponentAndPlusSign","anchor","port","hash","locationHost","domainParts","reverse","hostDomain","windowsStoreHost","domainMatchPattern","ocidMatchPattern","ccidMatchPattern","msnOcid","storeOcid","storeocid","addCcidToStoreUrl","tHref","emsAdId","ccidMatch","ccidOnUrl","hashIndex","hashValue","storeUrl","ccidData","webig","addOcidToHref","emsOnUrl","endOfScheme","locationOfStore","isStoreUrl","ocidMatch","ocidOnUrl","initStoreUrl","emsMatch","domainMatch","hrefHostName","linkUrl","modifyValuesForTrackPage","preventComscore","personalization","attachTaglineClickHandler","getActionResult","action","isSuccessful","refreshPageLoad","domName","getParent","getChildren","recipients","lastClickedTarget","clickTargetResetTimeoutInMs","tEvtTag","regExpEventName","impressionCache","trackAll","implementationMethod","implementation","defOpts","defaultOpts","disableOnAutoRefresh","names","isInList","AR","isGeneratedEarly","depthFirstChildAttribute","attributeName","skipElement","altValue","localName","countAllTrackableLinks","getChildByTargetElement","depth","dataLength","subChild","trackAppErrorEventInternal","errorParams","report","msg","isError","setAppErrorTrackInfo","trackFormSubmitEvent","campaign","getSearchTerm","contentAction","jquery","customHandled","elemHref","dataHlValue","headlineElement","findCMValue","previousCM","curId","getContentElementIndex","clsGT1","$1","moduleInfo","nameLineage","ordinalLineage","lineageDelimiter","actionType","behaviorType","moduleInfoJson","elementTelemetryLineage","nameLineageArray","ordinalLineageArray","telemetryObject","parseDomAttributeJson","getLineage","time","duHostname","track","filterUrlParams","destinationUrl","contentModule","contentElement","campaignId","sourceIndex","nLineage","oLineage","trackPageInternal","overrideParams","telemetryPageType","ar","trackingHelper","preventBeacon","errorObject","onContextMenu","trackClickEvents","onClick","button","trackAdEvent","adParams","adWidth","w","adHeight","dst","den","pg","status","anAd","seqid","sdk","fen","trackVideoEvent","isInline","defaultParams","canvas","serverImpressionGuid","department","subDepartment","cleanParam","removeNullOrEmptyParams","eventSource","trackFeedbackEvent","feedbackParams","submitValue","otfPackage","getFeedbackTrackingParams","createEvent","createEvt","sendPageViewCandidate","pvUrl","sendSinglePageViewBeacon","beaconId","clearImpressionCache","blackList","splitedUrl","outputUrl","paramsString","contains","trackPartialImpressionInternal","trackPage","trackThirdPartyUpdate","register","trackingImplementation","samplingRate","getCurrentPageRequestId","mapTelemetryParams","common","commonMap","paramsMap","groupKey","groupValue","trackInfoGroupKey","clientParams","formElem","events","trackPageRefresh","dataAttr","array","elements","domElement","telemetryChildren","findTelemetryElements","impressionContent","mech","getClickEventFromUrl","targetUrl","evtName","curUrl","getEventFromUrl","targetElem","initEvent","createEventObject","useMap","activeElement","ServiceWaffleAutomaticClickTrackingDisabled","appLauncherElement","hasAttribute","currentTarget","isClickedTwice","preventDefault","returnValue","preventEventDefault","isPropagationStopped","overrideClickTelemetry","scr","d_dgk","subcvs","cvs","contentid","entityId","cu","isSignedIn","resetCallbacks","registerResetCallback","ViewsStringResource","article","image","video","gallery","exitFullscreen","fullscreen","nextSlide","previousSlide","publishedSecondAgo","publishedSecondsAgo","publishedMinuteAgo","publishedMinutesAgo","publishedHourAgo","publishedHoursAgo","publishedDayAgo","publishedDaysAgo","gallerySlideError","sharingToolbarLoadFailure","invalidCMSIdErrorFormat","documentDataFetchErrorFormat","intraArticleComponentErrorFormat","gallerySlideCountFormat","gallerySlideCountFullScreenFormat","seeOnProviderSite","socialFeedNotSupported","articleReadMoreText","TelemetryBase","TelemetryTypes","ContentTypes","prodAssets","cnProdAssets","ENV","segments","initializeHybridPublicPath","CommonActions","renderExperience","ActionMap","dataConnectorMergeInit","ExperienceState","ChildExperiencesDeferRenderType","ValidatorSectionName","apptypeValidator","expValidatorMap","getAllValidators","expConfig","size","childExpValidatorMap","expMap","originalConfig","tempConfig","validatorName","childExpValidator","validator","expConfigMap","cloneDeep","filterConfig","riverGridChildren","childElems","childExp","configInfo","childExperienceConfigInfo","experienceType","sectionName","removeFromRiverGridChildren","configIndexHref","parentStore","experienceConnector","experienceComponent","$experienceType","isDataConnector","uniqueId","configResult","configPromise","instrumentPromise","getConfig","properties","loaderPromises","bundlePromise","loadExperience","bundleModule","initMeasureEnd","updateExperienceLoadedMilestone","ExperienceConnector","ExperienceReducer","app","experienceNamespace","experienceConfigInfo","experienceParentNamespace","experienceStore","configHref","connectorProps","loadConnector","connectComponent","milestoneDataConnector","getActionSender","send","loaded","ConfiglessConnectors","BingImageData","OneServiceContent","TelemetryData","TopicData","PageClickTrackerData","DataConnector","childMap","telemetryProps","telemetryTags","$experienceGroup","$connectedComponent","$componentInstance","$renderIfOffline","$maxWaitToBatchRenderChildExperiences","$milestoneDataConnector","onExperienceMilestoneTimingUpdate","milestoneType","ExperienceMilestoneEventTypes","domComplete","updateTiming","initialized","rendered","visuallyReady","onAppError","selectComponentState","namespaceArray","configNamespace","processConfig","childComponentList","componentInstance","ownProps","stateProps","dispatchProps","mnsDashBoardProps","ShowMnsCreatorDashboard","componentToConnect","onLine","connectMeasureEnd","WrappedComponent","onComponentConnect","Component","lastRenderEndMeasure","mapStateToProps","instrumentFunc","mapDispatchToProps","mergeProps","connectedComponent","pure","experienceInfoList","mergeStartPosition","additionalChildExperiences","ordinalBlockForCurrentColumn","getOrdinalObjectForCurrentBreakpoint","mergeEndPos","childArrangementMetadata","childExpArrangement","positionProps","experienceArrangement","startPosition","insertAt","experienceInfo","initialProps","$connectorProps","isEmpty","getChildTelemetryItem","onAppErrorCallback","loadDataConnectors","injectedDataConnector","injectedDataConnectors","onLoadChildExperiences","baseExperienceConfig","childrenConfigInfo","composition","ExperienceCompositionTypes","horizontalStack","layout","page","grid","column","childType","ChildrenTypes","peregrineExperience","child","rows","row","columns","itemType","customExperience","customConfig","experience","loadChildrenExperiences","childConnectorProps","childExpsToLoadImmediately","reRenderCallback","readyExperienceToRender","promiseDependency","startProcessingChildExperience","dataConnectors","dataConnectorForCurrentScreenType","loadDataConnector","childConnector","getChildExperienceConnector","addConnectorToChildMap","Failed","childExperienceType","childExperienceInstanceId","screenTypeObjList","currentColumnArrangement","getMetadataByScreenWidth","ScreenWidth","OneColumn","TwoColumn","ThreeColumn","FourColumn","Any","screenWidth","loader","getConnectedExperience","getChildExperienceConnectorProps","getNewComponentInstance","removeCachedConfig","milestoneDependencyToLoadChildExp","shouldResolve","addTimeout","deferralType","CustomEventBasedDeferral","Unknown","resolveDependency","loadAndRenderExperience","childExpInfo","delayLoaded","milestoneDependencyToRenderChildExp","ReadyToRender","reRender","childExperiencesRenderType","batch","reRenderExperience","dependency","pending","timer","PrimeIntegrationConstants","userActionErrorCoachMarkId","Mediator","getActiveTabValue","activeTabValue","activeTab","tabNameToTabId","registerForTabChangeEvent","shouldCallCallbackImmediately","sendActiveTabToCallback","None","tab","_perfMarker","tabIdToTabName","registerContentActionsUpdatedEvent","registerCardActionEnableEvent","initData","registerCardActionPostEvent","postData","registerForFollowButtonClickEvent","followButtonData","topicId","isFollowed","registerForInterestsRenderCompleteEvent","publishEventForPrime","renderUserActionErrorCoachmark","refElement","hideCoachMark","coachMarkId","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","db","endOperation","transaction","oncomplete","onabort","objectStore","loggingService","maxRetries","baseRetryDelayInMs","maxRetryDelayInMs","factor","minOffsetInMs","maxOffsetInMs","loggedExceptionManager","LoggedExceptionManager","logInvalidParams","defaultMaxRetries","defaultBaseRetryDelayInMs","maxAllowedRetryDelayInMs","defaultFactor","defaultMinOffsetInMs","defaultMaxOffsetInMs","minTimeout","maxTimeout","serviceCall","requestInfo","activity","tryRequest","maxAllowedRetries","fatal","currentRetry","timeoutServiceRequest","fractionDigit","offset","parseFloat","toFixed","half","plusOrMinus","delayWithOffset","min","pow","warnCallback","errorCallback","timeoutId","instrumentationService","exponentialBackoffRetry","retryCount","sendRequest","activityName","getInstrumentationService","activityLoggingService","createActivity","getExponentialBackoffRetry","executeRequest","endActivity","activityService","ActivityLoggingService","BrowserConsoleAppender","LogLevel","InstrumentationService","getLoggingService","FastBreakpointManager","callbackMap","refreshBreakpoints","defaultBreakpoint","breakpoints","indexToStandardConverter","currentBreakpoint","pop","breakpoint","update","managerCallback","subscribe","unsubscribe","_fastBreakpointManager","fastBreakpointManager","recreate","feedServiceUrl","getServiceUrl","initializationLogs","initializeServiceRequest","EnterpriseServiceUrlBase","ServiceUrlBase","getFeedServiceUrl","initializeFeedServiceRequest","FeedServiceUrlBase","getServiceUrlForSubpath","getFeedServiceUrlForSubpath","authEnabled","TabsHelper","tabId","tabName","trackingExperiences","shouldTrackExperience","shouldTrack","forceStorageTimestampKey","jssGeneratedClassesMap","jssCaptureCompleted","removeRenderCache","removeSubstringKeys","captureJssGeneratedClasses","renderCacheEnabled","serverCache","ServerCache","cache","reset","del","itemCount","_fullNamespace","selectState","_subspace","_perfTimeline","addSubReducerForConnector","_configHref","getState","globalConnectors","globalConnector","namespaceParts","connectorType","DeferralEventType","DynamicBundles","dynamicBundles","bundle","registerExperience","es6Import","CustomDeferralEventTypes","ExperienceDeferralEventTypes","defaultInstanceKeyName","defaultTimeValue","experienceDeferralDependencyMap","isExperienceDependencyResolved","experienceDependency","deferralEventType","dependents","currentState","getMilestoneDataConnector","MilestoneData","getDefaultExperienceInstance","milestones","perExperienceMilestones","perInstanceMilestones","getExperienceLoadDelegate","deferralEventReady","loadAfter","aboveTheFoldVisuallyReady","isAboveTheFoldVisuallyReady","belowTheFoldTransitionStart","isBelowTheFoldTransitionStarted","getDeferralLoadEventReadyState","shouldLoad","getDeferralEventMetadata","waitForAboveTheFoldVisuallyReadyAsync","registerObserver","getExperienceRenderDelegate","renderAfter","getDeferralRenderEventReadyState","shouldRender","Boolean","deferralInfo","StandardEventBasedDeferral","createExperienceStateUpdate","experienceGroup","experienceInstance","createTimingUpdate","peregrineFlightPrefix","getPeregrineFlights","cleanedUpFlights","lowercaseItem","SERVER_CACHE_TTL","SERVER_CACHE_CONFIG_STALENESS_TIMEOUT","currentTargetScope","CurrentRequestTargetScope","configMap","promiseMap","stalenessCheckTimestamp","localOverrideMap","initializeIndexedDb","memoize","_initializeIndexedDb","populateConfigMapFromIndexedDbAsync","_populateConfigMapFromIndexedDbAsync","initializeCaching","cdnConfigBaseUrl","ConfigRootUrl","EnvironmentConfigUrl","ConfigServiceBaseUrl","resolverErrors","configTimings","useWebWorkerToCache","indexedDb","useIndexedDb","enableIndexedDbInMainResolver","DisableCachingConfigs","isCachingAllowed","useServerCache","useConfigService","scopeWithPeregrineFlights","configServiceParameters","IsMultiConfigRetrievalEnabled","CacheBustingIdentifier","getConfigRetrievalMaxDepth","_cbid","containsDevOnlyQueryParameters","generateKey","configs","mergeWith","customizer","configIndex","configPaths","experienceRef","targetScopeMatched","overrideConfig","targetScope","audienceModeMatched","browserTypeMatched","deviceTypeMatched","domainMatched","experimentMatched","marketMatched","osMatched","pageTypeMatched","platformMatched","browserType","version","isString","experimentId","lhs","rhs","localeCompare","sensitivity","targetLocale","currentLocale","stringsEqualCaseInsensitive","srcValue","objValue","overrideEnv","typeVersion","_name","cacheKey","getCacheKey","startGetConfig","configFromMemory","addConfigTiming","existingPromise","processed","configEndMeasure","configSource","serializedConfig","configFromServerCache","cacheFetchDuration","isServerCacheConfigStale","storageTimestamp","logPrefix","networkReadPromise","getConfigFromNetwork","networkConfig","readPromises","configFromMemoryAfterRace","mergedConfigsMap","configServiceRelativeUrl","removeCmsPathFromRelativeUrl","crsResponse","downloadFile","rootConfigIndexId","crsMergedConfig","configIndexKey","addConfigToConfigMap","crsConfig","cdnConfig","downloadMergeConfig","areConfigsEqual","experienceIndex","resolveConfigIndex","configObjects","downloadExperienceConfig","mergeConfig","baseConfigUrl","hrefs","promiseArray","fetch","ok","statusText","json","EnableConfigService","FeatureFlags","crsMaxDepth","segment","wwResponse","refreshConfigResponse","purgeRenderCacheUponConfigChanges","configsEqual","liveCbId","liveCbid","writeCbidInLocalStorage","pcsCbid","highestCbid","clearConfigCache","clearObjects","getAllConfigTimingsOverride","allConfigsCacheDuration","allConfigsNetworkDuration","configTiming","networkFetchDuration","IsDebug","configFetchTimings","clientSettingsCbid","cachedCbid","cacheSource","startBulkConfig","cachedConfigs","_idbConfigReadPromise","_idbConfigLookup","populateConfigMapFromCachedConfigs","_idbConfigOpenPromise","unusableCount","cachedConfig","isConfigStale","cbidKey","resolver","getConfigTimings","getResolverErrors","refreshConfigCache","overrideCurrentRequestTargetScope","overrideCurrentRequestEnvironment","clearInternalState","getConfigServiceParameters","setConfigTimingsObject","getHighestCbid","SocialMediaProviderConfig","SocialMedia","SocialMediaTarget","apiUrl","attribution","FacebookEmbed","InstagramEmbed","TwitterEmbed","SocialMediaDefaultConfig","Email","backgroundColor","color","Mail","label","_self","Facebook","_blank","Line","LinkedIn","Skype","Twitter","WhatsApp","VK","Vkcom","PerfTracker","visuallyReadyTracker","initializedTracker","domCompleteTracker","startInitializeMilestone","startVisuallyReadyMilestone","startDomCompleteMilestone","incrementExpCount","endDomCompleteMilestone","prevState","snapshot","endInitializeMilestone","shouldMarkTelemetryTtvr","aliasName","endVisuallyReadyMilestone","setStart","updateStartTiming","updateEndTiming","tracker","getStart","getEnd","setEnd","markerPrefix","renderCounterPrefix","timeToVisuallyReady","timeToVideoStart","remainingMarkers","remainingTtvrMarkers","resolveTtvrCallback","perfMarkerResolveCallback","resolveTtvsCallback","markers","ttfPrefix","ttvrPrefix","ttvsPrefix","markTtf","markTimeNA","setMark","markTtvr","markTtvrRaf","requestAnimationFrame","prefix","markerFullName","existingMarker","getEntriesByName","getTtvrMarkers","getMarkers","getMarkersWithType","cachedDevicePixelRatio","ImageResizeMode","generateImageUrlFromId","generateImageUrlFromBaseUrl","focalRegion","auxQsp","focusX","midPoint","x1","x2","focusY","y1","y2","enableDpiScaling","pixelRatio","ceil","quality","defaultImageWidth","htmlTagsRegEx","ViewsUtility","imgObj","alt","caption","imageCaption","altPrefix","altText","stripHtmlTags","linksCount","markup","partnerLinksCount","additionalProps","safeAny","list","dateTime","currentTime","publishTime","timeSpanInSeconds","trunc","timeSpanInMinutes","timeSpanInHours","timeSpanInDays","toLocaleDateString","cmsId","parser","nsParts","sections","charReplaceTable","charRegExp","pair","removeRegExp","dashRegExp","urlTitle","cc","urlData","getFriendlyTitleForUrl","q","input","replaceWith","applyTextTruncationStyles","numLines","display","inViewportPercentage","inViewportTopOffset","inViewportBottomOffset","allowZeroHeight","currentReference","current","bounds","ImageServiceConfig","UrlSearchParamsHelper","parseQueryString","charAt","keyValuePairs","autoFlipX","autoFocus","enable","onDismiss","staticPosition","zIndex","keyDownHandler","keyCode","focus","tabEventHandler","popOverRef","tabbable","determinePosition","scrollY","scrollX","createRef","zIndexStyle","direction","unhandledProps","onKeyDown","tabIndex","ref","popOver","getPlacementStyle","popOverPlaceholder","createPortal","pageDirection","position","windowWidth","documentHeight","displayOnLeft","displayOnRight","displayOnPrioritySide","displayOnNonPrioritySide","rtl","canFitPrioritySide","canFitNonPrioritySide","PopOverStyles","Flyout","outline","opacity","transform","ZIndex","settingButton","border","background","padding","outlineWidth","settingButtonIcon","contextMenuItem","margin","contextMenuItem_contentRegion","contextMenuItem_image","contextMenu","menuItems","enabled","buttonLabel","positionOffset","telemetryTag","handleUnfocus","node","containerRef","buttonContainerContainsNode","menuRef","menuPopoverContainsNode","closeMenu","buttonRef","menuOpened","menuContainer","onSettingClick","renderPopOver","dropDownLocation","isNil","enableAutoFocus","renderContextMenu","itemProps","onInvoke","onMenuItemClick","onSelect","onSelectCallback","posOffset","offsetX","x","offsetY","ButtonStyle","button__justified","iconContainer","iconImage","iconLabel","socialMedia","contentUrl","contentTitle","emailBody","hideLabel","socialMediaItemConfigOverride","onClickNewWindow","shareUrl","newWindowOptions","newWindowTelemetryCall","openNewWindow","itemConfig","getSocialMediaShareUrl","targetRelatedAtributes","newWindow","attributes","appearance","justified","jssStyleSheet","ShallowCompare","a","b","ShareDialogColors","setStyleByZIndex","overrides","dialog_modalOverlay","dialog_contentRegion","StringResource","dialogStrings","dialogButtonClose","dialogTitle","copyButton","copiedButton","copyButtonAriaLabel","copiedButtonAriaLabel","Dialog","dialog","Above","linkCopiedDisplayDuration","fallbackStyles","backgroundStyle","closeButton","closeIcon","copyLinkButton","copyLinkInput","dialogContainer","header","headerText","semibold","iconListContainer","iconListItem","float","inputContainer","baseDialogProps","closeButtonTelemetryTags","copyButtonAttributes","copyButtonTelemetryProps","copyButtonTelemetryTags","copyLinkOcid","onClose","renderOneColLayout","socialMediaConfigOverride","socialMediaItems","shareIconTelemetryProps","shareIconTelemetryTags","baseDialogStyleOverride","inputRef","onCopyLinkToClipboard","isLinkCopied","execCommand","setSocialMediaItemsConfig","coerceDialogProps","_7","tag","h3","renderSocialIconsList","renderCopyLink","buttonText","copyTelemetryTag","readOnly","socialMediaIcons","renderSocialIcon","socialMediaItem","media","mediaKey","iconTelemetryTags","socialMediaItemsConfig","keyLower","modal","contentHeight","contentWidth","anchorRef","headlineTitle","provider","nextProps","articleCard","renderContent","content","articleCard_content","renderImage","articleCard_textWrapper","renderTitle","renderProvider","articleCard_imageWrapper","articleCard_image","articleCard_imageOverlay","articleCard_headline","articleCard_headlineText","articleCard_headlineMask","providerImage","articleCard_providerImage","articleCard_provider","articleCard_providerTitle","SharedDocumentType","SharingHelper","sharingInfo","appId","getAppId","getSharingUrlBase","sharingUrl","shortUrlPathFormat","documentType","documentId","AppKeys","Base36AppIdString","articleUrl","currentBaseUrl","SharingProductionHosts","SharingBaseUrlDefault","overrideShareUrl","socialMediaItemConfig","appendQueryStringFormat","Format","refererUrl","options","finalOptions","entries","BreakpointIndexToPx","ToolbarBreakpoints","TelemetryConstants","PlaceHolderId","LikeDislikeActionKey","SelectPropKey","Status","ButtonType","ContentActionsToolbarActions","initializeToolbar","ContentStatuReady","documentDataReady","likeContent","unlikeContent","dislikeContent","undislikeContent","sharingToolbarError","ViewportUpdate","moreOptionsIconColors","likeDislikeIconBackroundColor","moreOptionsMenuDefaultOffsetPos","OptionItemLike","like","OptionItemDislike","dislike","Disliked","OptionItemUndoLike","undoliked","OptionItemUndoDislike","undodisliked","inspect","localizedStrings","sharingToolbar","sharingButtons","contentStatus","sharingError","sharingShortUrl","documentData","articleTitle","articleImageUrl","providerName","providerLogoUrl","buttonItem","newButtonItem","buttonType","buttonData","emailBodyText","ShareDialog","shareDialogProps","shareDialogTitleText","shareDialogCopyButtonText","shareDialogCopyButtonAriaLabelText","shareDialogCopiedButtonText","shareDialogCopiedButtonAriaLabelText","dialogArticleCardProps","articleId","shareDialogButtonAriaLabelText","LikeDislike","likeDislikeButtonAriaLabelText","MoreOptions","moreOptionsUnlikeText","moreOptionsUnlikeAriaLabelText","moreOptionsDislikeText","moreOptionsDislikeAriaLabelText","DisLike","moreOptionsUndislikeText","moreOptionsUndislikeAriaLabelText","moreOptionsLikeText","moreOptionsLikeAriaLabelText","moreOptionsButtonAriaLabelText","offsetPos","missingChildren","fetchImpl","contentActionsServiceEndpoint","contentPreviewApiEndpoint","targetId","GetContentStatusRequest","isLike","isDislike","contentPreviewData","GetContentPreviewData","TranslateContentPreviewDocumentData","PostContentActionRequest","DeleteContentActionRequest","requestParams","credentials","contentStatusData","ContentServiceUrlBase","deleteQueryParam","deleteResponse","targetType","postResponse","articleDataResponse","articleImageId","providerLogoId","sharingToolbarTelemetryProps","buttonTelemetryName","mediaType","mediaTelemetryProps","copyLinkTelemetryName","closeButtonTelemetryProps","closeDialogTelemetryName","mediaItem","mediaItemOverride","shareDialogTelemetryProps","shareDialogTelemetryName","articleTelemetryTags","shareArticleTelemetryName","ComponentConnector","inspectorArgs","contentActionsToolbarProps","inspectorResponse","BuildLikeDislikeCallbacks","InjectCallbacksToMoreOptionsMenu","InjectTelemetry","onDislike","onLike","rootTelemetryTags","sharingToolbarTelemetryTags","contentId","isRSThree","CMS","actionServiceClient","generateTelemetryTags","getContentStatus","getDocumentData","initializeBreakpointTracker","GetPreferenceInitialState","GetDocumentData","shortUrlBuilder","moreOptionsButton","socialToolbarTelemetryName","moreOptionsTelemetryTags","UndoLike","UndoDislike","ToolbarPosition","handleAction","breakpointIndex","isRSThreeDevice","getToolbarPosition","Breakpoint3_2","Breakpoint3_3","horizontal","SharingToolbarStyles","icon_none","icon_like","icon_dislike","iconListHorizontal","iconListVertical","shareDialog","highContrast","moreOptions","iconContainerDimension","contextMenuStyles","e11","flex","articleCard_noImage","Scale","ArticleCard","coerceTitleProps","coerceProviderProps","coercedProps","_6","coercedProviderNameProps","_8","h5","onShareDialogOpen","shareDialogOpened","onShareDialogClose","managedClass","appendHighContrastStyle","getPositioningClassName","renderSharingButtons","renderShareDialog","buttonId","listItem","renderSocialMediaIcon","renderShareDialogIcon","renderLikeDislikeIcon","renderMoreOptionsIcon","shareDialogItem","articleCardStylesheet","LikedText","LikeText","DislikeText","iconClassName","BaseExperience","customField","firstRenderCompleted","contentActionsToolbar","componentDidUpdate","shouldFlip","flipToolbar","stack","contentActionsToolbar_horizontal","contentActionsToolbar_vertical","currentHostId","hostElem","prevHostId","newHostId","prevHostElem","newHostElem","childNodes","defaultProps","mockDocumentId","start","appTelemetry","createRootProps","RootTelemetryId","setupContentActionsInitialState","cmsDocumentId","documentid","isrsthree","verticalkey","categorykey","connectContentActionsComponent","contentActionsToolbarConfig","contentActionsExperience","renderRootElement","contentActionsConfig","experienceConfig","catch"],"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,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAA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c,6CAElB9zE,KAAMk7G,IACH,IAAKA,EACD,MAAMx+G,MAAM,+EAIhB,OAFAu+G,GAAuBC,EAAiBnnC,WACxCwmC,KACOM,GAA+BI,MACvCj7G,KAAKuxE,IACH4pC,MAAM1+G,IACH,aAAwB,OAAD,wBAChB,IAA+BinC,mCAAiC,CACnEtmC,QAAS,qDACT+/B,GAAI,OAAF,wBACK,IAA+BuG,kCAAkCvG,IAAE,CACtEm4B,sBAAwBxgD,SAASC,gBAAgBkmG,aAA+Bx+G,WAQpG2hF,GAAA,EAASY,mCAAmC,IAAY,6CACpDu7B,KACAM,GAA+BI,IAC1Bj7G,KAAKuxE","file":"content-actions-toolbar.9f9009a288a0903a76ea.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\t15: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"88\":\"icon-assets-AdChoices\",\"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-BlowingHailWhite\",\"97\":\"icon-assets-BlowingSnow\",\"98\":\"icon-assets-BlowingSnowWhite\",\"99\":\"icon-assets-Check\",\"100\":\"icon-assets-Chevron\",\"101\":\"icon-assets-CircleClose\",\"102\":\"icon-assets-ClearNight\",\"103\":\"icon-assets-ClearNightWhite\",\"104\":\"icon-assets-Close\",\"105\":\"icon-assets-CloseThin\",\"106\":\"icon-assets-Cloudy\",\"107\":\"icon-assets-CloudyWhite\",\"108\":\"icon-assets-Copy\",\"109\":\"icon-assets-DarkModeHotel\",\"110\":\"icon-assets-DayTime\",\"111\":\"icon-assets-Delete\",\"112\":\"icon-assets-Dislike\",\"113\":\"icon-assets-DislikeText\",\"114\":\"icon-assets-Disliked\",\"115\":\"icon-assets-DislikedLight\",\"116\":\"icon-assets-DislikedText\",\"117\":\"icon-assets-Docx\",\"118\":\"icon-assets-DoubleTap\",\"119\":\"icon-assets-Download\",\"120\":\"icon-assets-DownloadNoFill\",\"121\":\"icon-assets-Edit\",\"122\":\"icon-assets-EditNoFill\",\"123\":\"icon-assets-Edited\",\"124\":\"icon-assets-EditedNoFill\",\"125\":\"icon-assets-Ellipses\",\"126\":\"icon-assets-EllipsesLight\",\"127\":\"icon-assets-EmptyMruDark\",\"128\":\"icon-assets-EmptyMruLight\",\"129\":\"icon-assets-EmptyPinnedDark\",\"130\":\"icon-assets-EmptyPinnedLight\",\"131\":\"icon-assets-EmptySharedDark\",\"132\":\"icon-assets-EmptySharedLight\",\"133\":\"icon-assets-Excel\",\"134\":\"icon-assets-Facebook\",\"135\":\"icon-assets-FacebookText\",\"136\":\"icon-assets-FacebookTextBlack\",\"137\":\"icon-assets-Fog\",\"138\":\"icon-assets-FogWhite\",\"139\":\"icon-assets-Folder\",\"140\":\"icon-assets-FolderNoFill\",\"141\":\"icon-assets-FolderOpen\",\"142\":\"icon-assets-Form\",\"143\":\"icon-assets-FreezingRain\",\"144\":\"icon-assets-FreezingRainWhite\",\"145\":\"icon-assets-GalleryFullscreen\",\"146\":\"icon-assets-GalleryMediaIcon\",\"147\":\"icon-assets-GenericFile\",\"148\":\"icon-assets-GridView\",\"149\":\"icon-assets-HailDay\",\"150\":\"icon-assets-HailDayWhite\",\"151\":\"icon-assets-HailNight\",\"152\":\"icon-assets-HailNightWhite\",\"153\":\"icon-assets-HazeSmoke\",\"154\":\"icon-assets-HazeSmokeWhite\",\"155\":\"icon-assets-HeavySnow\",\"156\":\"icon-assets-HeavySnowWhite\",\"157\":\"icon-assets-Hide\",\"158\":\"icon-assets-HideStory\",\"159\":\"icon-assets-Hotel\",\"160\":\"icon-assets-Information\",\"161\":\"icon-assets-InteractionRequiredDark\",\"162\":\"icon-assets-InteractionRequiredLight\",\"163\":\"icon-assets-Interested\",\"164\":\"icon-assets-LightRain\",\"165\":\"icon-assets-LightRainWhite\",\"166\":\"icon-assets-LightSnow\",\"167\":\"icon-assets-LightSnowWhite\",\"168\":\"icon-assets-Like\",\"169\":\"icon-assets-LikeText\",\"170\":\"icon-assets-Liked\",\"171\":\"icon-assets-LikedText\",\"172\":\"icon-assets-Line\",\"173\":\"icon-assets-LinkedIn\",\"174\":\"icon-assets-LinkedInBlack\",\"175\":\"icon-assets-LinkedInText\",\"176\":\"icon-assets-ListMenu\",\"177\":\"icon-assets-Mail\",\"178\":\"icon-assets-MailBlack\",\"179\":\"icon-assets-MailNoFill\",\"180\":\"icon-assets-ManagedBriefcase\",\"181\":\"icon-assets-Message\",\"182\":\"icon-assets-MessageNoFill\",\"183\":\"icon-assets-Messages\",\"184\":\"icon-assets-MicrosoftNews\",\"185\":\"icon-assets-MicrosoftNews_FR\",\"186\":\"icon-assets-MicrosoftNews_ZH\",\"187\":\"icon-assets-ModerateRain\",\"188\":\"icon-assets-ModerateRainWhite\",\"189\":\"icon-assets-Movie\",\"190\":\"icon-assets-NightTime\",\"191\":\"icon-assets-Notification-Five-Plus-Sign\",\"192\":\"icon-assets-OfficeFormsLogo\",\"193\":\"icon-assets-OneDrive\",\"194\":\"icon-assets-OneNote\",\"195\":\"icon-assets-Onetoc\",\"196\":\"icon-assets-Outlook\",\"197\":\"icon-assets-PartlyCloudyDay\",\"198\":\"icon-assets-PartlyCloudyDayWhite\",\"199\":\"icon-assets-PartlyCloudyNight\",\"200\":\"icon-assets-PartlyCloudyNightWhite\",\"201\":\"icon-assets-Pdf\",\"202\":\"icon-assets-People\",\"203\":\"icon-assets-Pin\",\"204\":\"icon-assets-PowerPoint\",\"205\":\"icon-assets-Pptx\",\"206\":\"icon-assets-RainShowersDay\",\"207\":\"icon-assets-RainShowersDayWhite\",\"208\":\"icon-assets-RainShowersNight\",\"209\":\"icon-assets-RainShowersNightWhite\",\"210\":\"icon-assets-RainSnow\",\"211\":\"icon-assets-RainSnowShowersDay\",\"212\":\"icon-assets-RainSnowShowersDayWhite\",\"213\":\"icon-assets-RainSnowShowersNight\",\"214\":\"icon-assets-RainSnowShowersNightWhite\",\"215\":\"icon-assets-RainSnowWhite\",\"216\":\"icon-assets-Refresh\",\"217\":\"icon-assets-Remove\",\"218\":\"icon-assets-Save\",\"219\":\"icon-assets-Saved\",\"220\":\"icon-assets-Search\",\"221\":\"icon-assets-Share\",\"222\":\"icon-assets-ShareLight\",\"223\":\"icon-assets-Sharepoint\",\"224\":\"icon-assets-Shopping\",\"225\":\"icon-assets-ShoppingDealsDark\",\"226\":\"icon-assets-ShoppingDealsLight\",\"227\":\"icon-assets-Skype\",\"228\":\"icon-assets-SkypeOffice\",\"229\":\"icon-assets-SnowShowersDay\",\"230\":\"icon-assets-SnowShowersDayWhite\",\"231\":\"icon-assets-SnowShowersNight\",\"232\":\"icon-assets-SnowShowersNightWhite\",\"233\":\"icon-assets-SunnyDay\",\"234\":\"icon-assets-SunnyDayWhite\",\"235\":\"icon-assets-Sway\",\"236\":\"icon-assets-SwayApp\",\"237\":\"icon-assets-Teams\",\"238\":\"icon-assets-ThumbnailView\",\"239\":\"icon-assets-Thunderstorms\",\"240\":\"icon-assets-ThunderstormsWhite\",\"241\":\"icon-assets-Trending\",\"242\":\"icon-assets-Twitter\",\"243\":\"icon-assets-TwitterBlack\",\"244\":\"icon-assets-TwitterText\",\"245\":\"icon-assets-Unpin\",\"246\":\"icon-assets-VerticalSeparator\",\"247\":\"icon-assets-VideoMediaIcon\",\"248\":\"icon-assets-VideoPlay\",\"249\":\"icon-assets-Visio\",\"250\":\"icon-assets-Vkcom\",\"251\":\"icon-assets-Vsdx\",\"252\":\"icon-assets-WeatherAlert\",\"253\":\"icon-assets-WeeklyAdsDark\",\"254\":\"icon-assets-WeeklyAdsLight\",\"255\":\"icon-assets-WhatsApp\",\"256\":\"icon-assets-WhatsAppBlack\",\"257\":\"icon-assets-Windy\",\"258\":\"icon-assets-WindyWhite\",\"259\":\"icon-assets-Word\",\"260\":\"icon-assets-World\",\"261\":\"icon-assets-Xlsx\",\"262\":\"icon-assets-Yammer\",\"263\":\"icon-poll-results\"}[chunkId]||chunkId) + \".\" + {\"88\":\"7e8bc84cbd4aa6401949\",\"89\":\"98415c32646c42bbd481\",\"90\":\"5ebd4ccf95cda4014a79\",\"91\":\"045ce866b051a093a81d\",\"92\":\"db9eb1c47548f1f7c235\",\"93\":\"506ef7faa454b8d1221e\",\"94\":\"5aeb18a0176e4d7fb35a\",\"95\":\"56aac76fa956cc7e6440\",\"96\":\"fb5f84898477ee3bf79b\",\"97\":\"7ddebbe88c647028f1e2\",\"98\":\"dbb17e5661e7892fb71b\",\"99\":\"56a41af89f0fc710f748\",\"100\":\"44fcd0a70d890c9eaae9\",\"101\":\"c9b40376f182953124f1\",\"102\":\"b5510686cb3d7f0d869c\",\"103\":\"34bae9a624d7f508d5df\",\"104\":\"ae6e1a83aaf2eea9edc5\",\"105\":\"0c4ea413156d6ae1ee19\",\"106\":\"bc5409e8c2a1107222f2\",\"107\":\"1b69ae9e416b7bca8602\",\"108\":\"5d9f996a8e92731baef2\",\"109\":\"16de72cef21c7b0f17f5\",\"110\":\"fddc29a3951669d4f05d\",\"111\":\"8ee1973df05a7354e8f8\",\"112\":\"9354e381d5b90dde8724\",\"113\":\"2aa0282ad73f1d3409a9\",\"114\":\"d1cb3416a57f511222ef\",\"115\":\"e7ce7680f3f106ef687a\",\"116\":\"228b5587d5dfe869f245\",\"117\":\"087d61f60cdda3404633\",\"118\":\"b16208ac6563ecd12539\",\"119\":\"80bec3a88fd534cb4e40\",\"120\":\"4495bfebb81548042c35\",\"121\":\"2a186070caa73310d538\",\"122\":\"ea365c0cc559155259a8\",\"123\":\"d8c69a6ad0d3844dd893\",\"124\":\"b12c4706a1ded6104273\",\"125\":\"a0d83bb8ee2c81b036f0\",\"126\":\"71924433adbfed9d9aa2\",\"127\":\"0e63d034165065f39bc4\",\"128\":\"36c395a73325e3b21480\",\"129\":\"359c31dd1e600e2251af\",\"130\":\"3ebb1cfb453f40f17a06\",\"131\":\"ab70caceb9f5a35f538b\",\"132\":\"41577f4702d78e9ac9c2\",\"133\":\"424bd122605ee7315956\",\"134\":\"83f868a22cb3fe90fc8c\",\"135\":\"60cf22ff211d6aa139ba\",\"136\":\"b7bb39df0b0ca0c4d5aa\",\"137\":\"174164cf72ad33982dc3\",\"138\":\"59cb974bfac088b17e0d\",\"139\":\"e5a9b28f18caa3ce4edb\",\"140\":\"14e0848047e3cf53d004\",\"141\":\"1ce13b32692c4cf588d3\",\"142\":\"f1e3a341f843a1e7abf6\",\"143\":\"2af3dfaff6fd93cb8616\",\"144\":\"4b6fbb318754442b0e36\",\"145\":\"686809dc3806a8b946be\",\"146\":\"b51d95d45e7367dd5c8f\",\"147\":\"450f3c56bb1fc6120d56\",\"148\":\"86352ae5afa3955ac0f6\",\"149\":\"53b75a14b000e29f69ba\",\"150\":\"27de92f1985d0a0fbe34\",\"151\":\"59edf1be863f77a8ca1d\",\"152\":\"1ec8ce5a85d6d1636038\",\"153\":\"cf0884c675f948c0a577\",\"154\":\"af605d2c6bbe6472f3da\",\"155\":\"43a5182e62f8faa64dd2\",\"156\":\"a2e44460888832145c25\",\"157\":\"f5a4a5dbf8ac753de2b7\",\"158\":\"c4b0b647898b5c870416\",\"159\":\"39461c7c1319c8119111\",\"160\":\"c2650f0c861f26209487\",\"161\":\"59be7549be5e738dad1e\",\"162\":\"442523136581b8286ad6\",\"163\":\"41df21e70cc7ce906451\",\"164\":\"b2a9872d91ddead04dfe\",\"165\":\"b8de00ff5da4bafad6c9\",\"166\":\"b1880deb374f93728a35\",\"167\":\"4c876c363d00ca125f85\",\"168\":\"7dd64a6614860cb1e88a\",\"169\":\"fa731bfe83dfbc8699ea\",\"170\":\"57374c683c7e8b330ee6\",\"171\":\"1b84f2d4d536a1e6e5e9\",\"172\":\"6e03a3cdcdcfc8ebffdb\",\"173\":\"8432013db963a578c001\",\"174\":\"95f5b610ad015ceb62a4\",\"175\":\"58d8d2eeb59a031edd51\",\"176\":\"5a659d36c7de7162bd0b\",\"177\":\"c81b93b9a90c1922358b\",\"178\":\"fd36fbbfc9f805e1baac\",\"179\":\"7147d404ee6c21a93ec5\",\"180\":\"3b102455f046df04f8b8\",\"181\":\"889de850f33e608ce690\",\"182\":\"e6b357b47b484eaa619c\",\"183\":\"820041460480ca1dda66\",\"184\":\"c7aeb32408b32ede769e\",\"185\":\"446c4564a88e1109f6a9\",\"186\":\"8256b378e730d60b796a\",\"187\":\"9ca6fe4fcf8f4c3ce90b\",\"188\":\"d80a4837067a097ab977\",\"189\":\"69975beaabfd6cdde831\",\"190\":\"fc752fc07457bacd1d48\",\"191\":\"20641be70677363188d7\",\"192\":\"e85413aae46b009f9799\",\"193\":\"47e37ef7f54355b890b9\",\"194\":\"59a7305a3a395f9c75bc\",\"195\":\"80b5b9cc56779a595b0e\",\"196\":\"399dcc95628ed0792135\",\"197\":\"ba1cdbd658140140fde8\",\"198\":\"41f532373d23540e065d\",\"199\":\"51f574dbf49551096a1b\",\"200\":\"73a04a1abf5644f92082\",\"201\":\"7e5ed230b736325b71d0\",\"202\":\"b62dcf2c13c7bc822e04\",\"203\":\"5ef025c4a60da5a0ff50\",\"204\":\"8dc512e468cf1fab73e7\",\"205\":\"0e7044a068c3152b9743\",\"206\":\"d441f9edea9885045384\",\"207\":\"8fe972b886730edeb9d8\",\"208\":\"0f9296a2a2ad92be03ff\",\"209\":\"505b1c8a85a47fe0c39f\",\"210\":\"9af767b9bd27b2b6a161\",\"211\":\"17526157407afa753833\",\"212\":\"f8d7a8f2de3f554251c7\",\"213\":\"1d3833cb6438ea2ac232\",\"214\":\"113906fe5c16161b8ef1\",\"215\":\"a8c89c47e80270eb4ae8\",\"216\":\"2e11381bad119283a827\",\"217\":\"a9f3bb3de173a7e57593\",\"218\":\"6e82533009da8c028a0c\",\"219\":\"176bd08199d2468f6ac8\",\"220\":\"2cb69a568066283869b2\",\"221\":\"486ea4dba6a851832889\",\"222\":\"9fc3e0b4af3cf3d03d10\",\"223\":\"88dea3c13365be220cdc\",\"224\":\"b61f27ffe63eefa4a551\",\"225\":\"99c89e25065272e3e1f0\",\"226\":\"0017f123eda023267f87\",\"227\":\"50e2874dc0479e0de2f3\",\"228\":\"9fac75b91a355a4a8508\",\"229\":\"7ec3f1edeb2d5d5fd452\",\"230\":\"f55356a8f7bc5d098125\",\"231\":\"b8363202d62ff764fad2\",\"232\":\"22db62f74e1496530df7\",\"233\":\"44f8585beabe8b5b2174\",\"234\":\"14c80c9369ad9952c45f\",\"235\":\"d2568a78f8d9cac586ee\",\"236\":\"f82344fa3f8f0d7d4647\",\"237\":\"4fb5105bd999ce380a89\",\"238\":\"0dc0f1ca6b64439f2543\",\"239\":\"d5e7f83d1090797810bf\",\"240\":\"8c7200158a3d78db9bc4\",\"241\":\"f401af89a72d9683845a\",\"242\":\"80758876c6297e6de1e8\",\"243\":\"f84b43259af85ae89b45\",\"244\":\"4d732a022a4829fad6b1\",\"245\":\"dc096e44f4a655e91ba0\",\"246\":\"9adb70b0e3a162e5cb0a\",\"247\":\"b48e10d3e383899abb7d\",\"248\":\"21ea6fdcacb8b3264faf\",\"249\":\"ac374cc2d67e7d04017b\",\"250\":\"3193303d5e52d0381b31\",\"251\":\"edce6c324f005743208a\",\"252\":\"b727921029a2d177b339\",\"253\":\"8122e1338d8b2328edf8\",\"254\":\"0df96d42530058eacaaa\",\"255\":\"ab8587f46c0e4a5799ba\",\"256\":\"061650bb868e014c6352\",\"257\":\"af76fd6b947dae6f4e14\",\"258\":\"44ae6557d37ce91e4922\",\"259\":\"bb0da1e0b2c93c311d3c\",\"260\":\"392e02e0cb5ce0494650\",\"261\":\"8db90965718f74962c52\",\"262\":\"fa1efeb167d67d9dfdcb\",\"263\":\"5d79a950949a7ec5b262\"}[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/20200529.107/\";\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([949,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { canUseDOM, getInnerHeight, getInnerWidth } from \"@msnews/isomorphic-util\";\r\n\r\n// Wraps modern visibility api, as well as defines visibility for elements based on viewbox.\r\n\r\n// a simple deferred promise object that delays execution of callbacks until the owner resolves. (see $.Deferred for jQuery's implementation, this is a subset)\r\nfunction Deferred() {\r\n // the callbacks to execute when resolved\r\n var callbacks = [];\r\n\r\n // the state of the promise. If we have already resolved we execute the delegates immediately.\r\n var isResolved = false;\r\n\r\n // the arguments used to resolve the promise.\r\n var resolvedArgs = null;\r\n\r\n // executes all the callbacks that need to be notified, giving them a ref to the arguments supplied.\r\n function flushCallbacks() {\r\n // we only flush if we are resolved\r\n if (isResolved) {\r\n var errors = [];\r\n\r\n // loop through the callbacks and execute.\r\n for (var index = 0; index < callbacks.length; index++) {\r\n try {\r\n callbacks[index](resolvedArgs);\r\n } catch (e) {\r\n // delay propagation of errors until all callbacks have been notified\r\n errors.push(e);\r\n }\r\n }\r\n\r\n // clear the callbacks array\r\n callbacks = [];\r\n\r\n // throw the error collection if we received any.\r\n if (errors.length) {\r\n throw errors;\r\n }\r\n }\r\n }\r\n\r\n // resolves the promise\r\n function resolve() {\r\n isResolved = true;\r\n resolvedArgs = arguments;\r\n flushCallbacks();\r\n }\r\n\r\n // the promise function\r\n function promise() {\r\n return {\r\n\r\n // the happy path for callbacks\r\n then:\r\n function (callback) {\r\n callbacks.push(callback);\r\n flushCallbacks();\r\n },\r\n\r\n // subscribers listen here for when the promise was denied or resolved.\r\n always:\r\n function () {\r\n return this.then(arguments);\r\n }\r\n };\r\n }\r\n\r\n // lets return our deferred object that.\r\n return {\r\n // the promise object\r\n promise: promise,\r\n // the resolve method.\r\n resolve: resolve\r\n };\r\n}\r\n\r\n// create our visibility deferred\r\n// @ts-ignore\r\nvar visibilityDeferred = new Deferred();\r\n\r\n// initialize the visibility property name\r\nvar visibilityProperty = getHiddenPropertyName();\r\n\r\n// Flag to check if unload event has been triggered\r\n// Page Visibility API removed 'unloaded' visbility state and now reports 'hidden' when browser is being unloaded.This breaks the wasBrowserHiddenAtLeastOnce logic.\r\n// Flag is used to detect & ignore state change if unload event caused the 'hidden' visibilityState.\r\n// Chrome 56 (as of 2/21/2017) has implemented the spec change and would probably land in Edge in the future releases.\r\n// Link to spec - https://w3c.github.io/page-visibility/\r\n\r\nvar isUnloadEventInProgress = false;\r\n\r\nif (canUseDOM() && window.addEventListener) {\r\n window.addEventListener('beforeunload', function () {\r\n isUnloadEventInProgress = true;\r\n });\r\n}\r\n\r\n//flag to indicate if Browser was hidden even once in a page impression\r\nvar wasBrowserHidden = false;\r\n\r\nif (canUseDOM() && visibilityProperty) {\r\n // this preserves our vendor prefix\r\n var evtname = visibilityProperty.replace(/[H|h]idden/, '') + 'visibilitychange';\r\n document.addEventListener(evtname, visibilityChanged);\r\n}\r\n\r\n// call it immediately to prime the deferred if we are already visibile.\r\nvisibilityChanged();\r\n\r\n// returns the property name for document.hidden, which can contain the browser specific prefix, or null if not defined.\r\n// hidden is part of modern browsers visibility api.\r\nfunction getHiddenPropertyName() {\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n var prefixes = ['webkit', 'moz', 'ms', 'o'];\r\n\r\n // if 'hidden' is natively supported just return it\r\n if (typeof document.hidden !== 'undefined') {\r\n return 'hidden';\r\n }\r\n\r\n // otherwise loop over all the known prefixes until we find one\r\n for (var index = 0; index < prefixes.length; index++) {\r\n var prospectivePropertyName = prefixes[index] + 'Hidden';\r\n if ((prospectivePropertyName) in document) {\r\n return prospectivePropertyName;\r\n }\r\n }\r\n}\r\n\r\n// determines if the page is hidden.\r\nfunction isHidden() {\r\n if (!canUseDOM() || !visibilityProperty) {\r\n return false;\r\n }\r\n\r\n return document[visibilityProperty];\r\n}\r\n\r\n// handler for visibility changes. Determines if we should resolve the promise.\r\nfunction visibilityChanged() {\r\n if (!isHidden()) {\r\n visibilityDeferred.resolve();\r\n } else {\r\n // create a new one so we can fire when we are back.\r\n // @ts-ignore\r\n visibilityDeferred = new Deferred();\r\n //flag indicates that browser was minimised or hidden during the page impression\r\n\r\n if (!isUnloadEventInProgress) {\r\n wasBrowserHidden = true;\r\n }\r\n }\r\n}\r\n\r\n// returns if the browser was hidden at least once\r\nfunction wasBrowserHiddenAtLeastOnce() {\r\n return (wasBrowserHidden ? 1 : 0);\r\n}\r\n\r\n// determines if an element is currently visible to the user\r\nfunction isElementTrulyVisible(element, windowRight, windowLeft, windowHeight) {\r\n if (isHidden() || !element) {\r\n return false;\r\n }\r\n\r\n windowHeight = windowHeight || getInnerHeight();\r\n windowRight = windowRight || getInnerWidth();\r\n\r\n if (!windowLeft && windowLeft !== 0) {\r\n windowLeft = 0;\r\n var contentArea = document.getElementById('content');\r\n\r\n if (contentArea) {\r\n var contentRect = contentArea.getBoundingClientRect();\r\n windowRight = contentRect.right;\r\n windowLeft = contentRect.left;\r\n }\r\n }\r\n\r\n var boxVisible = false;\r\n\r\n var rec = element.getBoundingClientRect();\r\n\r\n var elementHeightVisible = (rec.top >= 0 || rec.bottom >= 0) && (rec.top < windowHeight || rec.bottom < windowHeight);\r\n var elementWidthVisible = (rec.left >= windowLeft || rec.right > windowLeft) && (rec.left < windowRight || rec.right <= windowRight);\r\n\r\n boxVisible = rec.height !== 0 || rec.width !== 0;\r\n\r\n return boxVisible && (elementHeightVisible && elementWidthVisible);\r\n}\r\n\r\n///Notifies the callee when we return to visibile state. Returns immediately if we are currently visible\r\n///A JQuery Promise that resolves when visible\r\nfunction notifyWhenPageVisible() {\r\n // return our current promise.\r\n return visibilityDeferred.promise();\r\n}\r\n\r\n// return the visibility object being returned\r\nexport default {\r\n // returns true if the document is hidden\r\n isHidden: isHidden,\r\n // returns a jquery promise that resolves the next time (or immediately) the page becomes visible\r\n notifyWhenPageVisible: notifyWhenPageVisible,\r\n // returns true if the page is visible && element within viewport\r\n isElementTrulyVisible: isElementTrulyVisible,\r\n //returns true if page was hidden even once\r\n wasBrowserHiddenAtLeastOnce: wasBrowserHiddenAtLeastOnce\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n// Tracking information aggregate object.\r\n// used by all the tracking systems to get common info sent via tracking\r\n\r\nimport dom from \"./dom\";\r\nimport extend from \"./extend\";\r\nimport { headData, getCookie, appEnvironment } from \"@msnews/core\";\r\nimport mediator from \"./mediator\";\r\nimport pageInstance from \"./pageInstance\";\r\nimport telemetryConstants from \"./telemetryconstants\";\r\nimport { telemetryDataTypes } from \"./telemetryDataTypes\";\r\nimport { telemetryReadyCallback } from \"./telemetryReadyCallback\";\r\nimport visibilityService from \"./visibility\";\r\nimport { AccountType, AadAccountType } from \"@msnews/experiences-constants\";\r\nimport { canUseDOM, getLocationHref } from \"@msnews/isomorphic-util\";\r\n\r\nvar clientClientId;\r\nvar browserWidth;\r\nvar browserHeight;\r\n// eventIndex[0] is for the first rid and eventIndex[1] is for the current rid\r\nvar eventIndex = [0, 0];\r\nvar isFirstEventIndex = true;\r\nvar eventTransientCustomTags = {}; //eventTransientCustomTags is applied to each specific events.\r\n\r\nvar modules = [];\r\nvar baseUrl = \"\";\r\nvar clientIdTypeValue;\r\n\r\nvar userDefinedCustomTags = {};\r\n\r\nfunction Module(element, visible) {\r\n this.element = element;\r\n this.visible = visible;\r\n\r\n if (this.visible) {\r\n this.compress = function () {\r\n var moduleTelemetryData = this.element.getAttribute(\"data-m\");\r\n try {\r\n return JSON.parse(moduleTelemetryData);\r\n } catch (e) {\r\n return moduleTelemetryData;\r\n }\r\n };\r\n }\r\n}\r\n\r\nfunction getBrowserSize() {\r\n /// \r\n /// Helper function used to get the browser height and width\r\n /// \r\n\r\n browserWidth = (canUseDOM()) ? (window.outerWidth || document.documentElement.clientWidth) : 0;\r\n browserHeight = (canUseDOM()) ? (window.outerHeight || document.documentElement.clientHeight) : 0;\r\n\r\n}\r\n\r\nfunction getWindowHeight() {\r\n /// \r\n /// Get current browser viewpane height\r\n /// \r\n\r\n if (!canUseDOM()) {\r\n return 0;\r\n }\r\n\r\n return window.innerHeight ||\r\n document.documentElement.clientHeight ||\r\n document.body.clientHeight || 0;\r\n}\r\n\r\nfunction getWindowYscroll() {\r\n /// \r\n /// Get current absolute window scroll position\r\n /// \r\n\r\n if (!canUseDOM()) {\r\n return 0;\r\n }\r\n\r\n return window.pageYOffset ||\r\n document.body.scrollTop ||\r\n document.documentElement.scrollTop || 0;\r\n}\r\n\r\nfunction getDocHeight() {\r\n /// \r\n /// Get current absolute document height\r\n /// \r\n\r\n if (!canUseDOM()) {\r\n return 0;\r\n }\r\n\r\n return 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\nfunction getDefaultCustomTags() {\r\n /// \r\n /// Get the default custom tags.\r\n /// \r\n var defaultCustomTags = {};\r\n\r\n if (!canUseDOM()) {\r\n return defaultCustomTags;\r\n }\r\n\r\n // @ts-ignore\r\n if (window && window.adsEnabled != null) {\r\n // @ts-ignore\r\n defaultCustomTags.adoni = +window.adsEnabled;\r\n }\r\n\r\n return defaultCustomTags;\r\n}\r\n\r\nfunction joinTelemetryValues(separator, leftTmplValue, rightTemplValue) {\r\n /// Composes a new template value from an exisiting one and a new one.\r\n /// The separator.\r\n /// The left tmpl value string, may be null or empty.\r\n /// The right tmpl value string, may be null or empty.\r\n /// \r\n /// A new string composed of the right and left values with a semi-colon separator if both values are non-null and not empty.\r\n /// If the right templ value is null or empty (or otherwise falsey), the left templ value is returned.\r\n /// If only the left templ value is falsey, only the right templ value is returned.\r\n /// \r\n\r\n return rightTemplValue\r\n ? leftTmplValue\r\n ? [leftTmplValue, rightTemplValue].join(separator)\r\n : rightTemplValue\r\n : leftTmplValue;\r\n}\r\n\r\nfunction joinTelemetryValuesForTmpl(separator, currentTmplValue, newTmplValue) {\r\n /// Composes a new template value from an exisiting one and a new one.\r\n /// The separator.\r\n /// The currentTmplValue, may be null or empty.\r\n /// The newTmplValue, may be null or empty.\r\n /// \r\n /// A new string composed of the newTmplValue and currentTmplValue with a semi-colon separator if both values are non-null and not empty.\r\n /// If the newTmplValue is null or empty (or otherwise falsey), the currentTmplValue is returned.\r\n /// If only the currentTmplValue is falsey, only the newTmplValue is returned.\r\n /// Duplicate key will override the value even if the value is empty string.\r\n /// Value without any key will be ignored.\r\n /// \r\n\r\n if (!newTmplValue) {\r\n return currentTmplValue ? currentTmplValue : \"\";\r\n }\r\n if (!currentTmplValue) {\r\n return newTmplValue ? newTmplValue : \"\";\r\n }\r\n var combinedTelemetryVal = {};\r\n var array = [];\r\n var isDuplicateKeyExist = false;\r\n var newTmplValueSplited = newTmplValue.split(separator);\r\n for (var i = 0; i < newTmplValueSplited.length; i++) {\r\n var newKeyVal = newTmplValueSplited[i].split(\":\");\r\n if (newKeyVal[0]) {\r\n if (!isDuplicateKeyExist) {\r\n // 'currentTmplValue' will be split out only if 'newTmplValue' contains any key which is exist in 'currentTmplValue'\r\n if (newKeyVal[0] && (currentTmplValue.indexOf(newKeyVal[0]) != -1)) {\r\n var currentTmplValueSplited = currentTmplValue.split(separator);\r\n for (var j = 0; j < currentTmplValueSplited.length; j++) {\r\n if (currentTmplValueSplited[j]) {\r\n var currentKeyVal = currentTmplValueSplited[j].split(\":\");\r\n combinedTelemetryVal[currentKeyVal[0]] = currentKeyVal[1];\r\n }\r\n }\r\n isDuplicateKeyExist = true;\r\n }\r\n }\r\n combinedTelemetryVal[newKeyVal[0]] = newKeyVal[1];\r\n }\r\n }\r\n\r\n var val = \"\";\r\n for (var key in combinedTelemetryVal) {\r\n if (key) {\r\n if (val !== \"\") {\r\n val += separator;\r\n }\r\n\r\n val += key;\r\n if (combinedTelemetryVal[key]) {\r\n val += \":\" + combinedTelemetryVal[key];\r\n }\r\n }\r\n }\r\n\r\n if (!isDuplicateKeyExist && currentTmplValue) {\r\n val = val ? val + separator + currentTmplValue : currentTmplValue;\r\n }\r\n\r\n return val;\r\n}\r\n\r\nexport var trackInfo = {\r\n notrack: \"notrack\",\r\n cmSeparator: \">\",\r\n // TODO: (nubenja) To be removed. Make sure all dependecies get removed\r\n defaultModule: \"body\",\r\n defaultFormHeadline: \"[form submit]\",\r\n piitxt: \"data-piitxt\",\r\n piiurl: \"piiurl\",\r\n wrapperId: \"wrapper\",\r\n MUIDCookie: \"MUID\", // This is used for client id. If MUID exists, then we will use MUID as client id otherwise use request id.\r\n gestureKey: \"touch_gesture\",\r\n gestureType:\r\n {\r\n tap: \"tap\",\r\n rightclick: \"rightclick\"\r\n },\r\n eventTypes:\r\n {\r\n click: \"click\",\r\n nonNavClckEvt: \"click_nonnav\",\r\n submit: \"submit\",\r\n contextmenu: \"contextmenu\",\r\n mouseenter: \"mouseenter\",\r\n imprUpdate: \"impr_update\",\r\n adPlay: \"AdPlay\",\r\n contentPlay: \"ContentPlay\",\r\n videoClickNonNav: \"Click_Non-nav\"\r\n },\r\n imprUpdateMechanisms:\r\n {\r\n load: \"load\",\r\n scroll: \"scroll\",\r\n auto: \"auto\",\r\n tap: \"tap\",\r\n resize: \"resize\",\r\n swipe: \"swipe\",\r\n partial: \"partial\",\r\n view: \"view\"\r\n },\r\n event: {},\r\n sitePage: {},\r\n userStatic: {},\r\n overrideClientParams: {},\r\n persistOverriddenParams: false,\r\n customTags: getDefaultCustomTags() || {}, //customTags is applied to all events.\r\n trackingDisabled: false, // used by NTP/DHP to disable tracking in \"enterprise mode\",\r\n shouldFireTelemetry: function () {\r\n /// \r\n /// Return whether telemetry beacons should get fired or not.\r\n /// \r\n\r\n return !this.trackingDisabled;\r\n },\r\n appErrorEnabled: true, // should not send app error when user is navigating away from page.\r\n shouldFireAppError: function () {\r\n /// \r\n /// Return whether app error beacons should get fired or not.\r\n /// \r\n\r\n return this.appErrorEnabled;\r\n },\r\n getCurrentTime: function () {\r\n /// \r\n /// gets the current timestamp\r\n /// \r\n /// \r\n /// \r\n return +new Date();\r\n },\r\n timeToInteract: function (eventTime?) {\r\n /// \r\n /// gets the time to interact for the event by substracting it from navigationStart.\r\n /// https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming/navigationStart\r\n /// \r\n /// \r\n /// \r\n if (!canUseDOM()) {\r\n return 0;\r\n }\r\n\r\n var eventTiming;\r\n if (eventTime) {\r\n eventTiming = eventTime;\r\n } else {\r\n eventTiming = trackInfo.getCurrentTime();\r\n }\r\n if (eventTiming && window.performance && window.performance.timing && window.performance.timing.navigationStart) {\r\n return (eventTiming - window.performance.timing.navigationStart);\r\n }\r\n },\r\n // This will be deprecated in upcoming iterations, so please use telemetryDataTypes.TelemetryType. Please follow these new definitions: https://microsoft.sharepoint.com/:x:/t/IDXTelemetryandDatafabric/EbMw_1_6OCtNtyXkbb2YcjoBxY2iFtWOW-kfQZLJmnErEw\r\n telemetryModuleTypes:\r\n {\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 Navigation: 14,\r\n Entity: 15,\r\n structuredData: 16,\r\n appStore: 17,\r\n appLaunch: 18,\r\n cmsPromotions: 19,\r\n microsoftWebStore: 20,\r\n xboxStore: 21,\r\n officeStore: 22,\r\n appInstall: 23,\r\n PartnerLinks: 24,\r\n SponsoredContent: 25\r\n },\r\n contentPlacedBySource:\r\n {\r\n Editorial: 0,\r\n PersonalizationAlgo: 1,\r\n BingAlgo: 2,\r\n Taboola: 3,\r\n Outbrain: 4\r\n },\r\n telemetryDataAttribute: \"data-m\",\r\n telemetryHLAttribute: \"data-hl\",\r\n client:\r\n {\r\n // client id\r\n clientId: function () {\r\n if (!clientClientId && clientClientId !== \"\") {\r\n // @ts-ignore\r\n clientClientId = getCookie(trackInfo.MUIDCookie) || trackInfo.sitePage.requestId || \"\";\r\n }\r\n\r\n return clientClientId;\r\n },\r\n clientIdType: function () {\r\n // @ts-ignore\r\n if (clientClientId === trackInfo.sitePage.requestId) {\r\n clientIdTypeValue = \"activityId\";\r\n } else if (clientClientId !== \"\") {\r\n clientIdTypeValue = \"muid\";\r\n }\r\n\r\n return clientIdTypeValue;\r\n },\r\n gesture: function () {\r\n var element = dom.getTarget(trackInfo.event);\r\n if (element && element[trackInfo.gestureKey]) {\r\n return element[trackInfo.gestureKey]\r\n }\r\n var trackInfoEvent: any = trackInfo.event;\r\n if (trackInfoEvent) {\r\n if ((trackInfoEvent.originalEvent && trackInfoEvent.originalEvent == 'contextmenu') || trackInfoEvent.ctrlKey || trackInfoEvent.shiftKey) {\r\n return trackInfo.gestureType.rightclick\r\n }\r\n }\r\n return ''\r\n },\r\n\r\n getMuid: function () {\r\n return getCookie(trackInfo.MUIDCookie);\r\n },\r\n\r\n getAnonCookieName: function () {\r\n /// \r\n /// Gets the anonCookieName from the headData (hybrid) or the appEnvironment. ANON for Pages with manual sign in, else APP_ANON.\r\n /// \r\n /// \r\n /// \r\n return headData.AnonCookieName || appEnvironment.AuthCookieName;\r\n },\r\n\r\n getSsoComplete: function () {\r\n /// \r\n /// Gets the SsoComplete state from the headData. true if sso completes otherwise false.\r\n /// Used only for prime. DHP/NTP does not have anon.\r\n /// \r\n /// \r\n /// \r\n\r\n if (headData.SsoComplete && (headData.SsoComplete + '').toLowerCase() === 'true') {\r\n return 1;\r\n }\r\n\r\n return 0;\r\n },\r\n\r\n /**\r\n * Gets the Aad state from the headData or appEnvironment\r\n * @returns {number} The AAD authenticated state.\r\n */\r\n getAadAuthentication: function (): AadAccountType {\r\n // Check the head data for the hybrid page\r\n if (headData.AadState === true) {\r\n // AAD AuthenticatedState\r\n return AadAccountType.AadAccount;\r\n } else if (headData.AadState === false) {\r\n // AAD UnauthenticatedState\r\n return AadAccountType.NonAadAccount;\r\n }\r\n\r\n // Check the headData first for the Hybrid page, else use appEnvironment\r\n const accountType: AccountType = appEnvironment.AccountType;\r\n const isAadAccount: boolean = (accountType === AccountType.AAD)\r\n return isAadAccount ? AadAccountType.AadAccount : AadAccountType.NonAadAccount;\r\n },\r\n\r\n /**\r\n * Gets the device orientation\r\n */\r\n orientation: function () {\r\n if (!canUseDOM()) {\r\n return \"\";\r\n }\r\n return screen.width > screen.height ? \"landscape\" : \"portrait\";\r\n },\r\n\r\n OTFTelemetry: function (mechanism?: string): void {\r\n {\r\n if (!canUseDOM()) {\r\n return;\r\n }\r\n\r\n if (typeof mechanism === \"undefined\") {\r\n // mechanism is only undefined on page load.\r\n // Peregrine already sends an impression update on page load through\r\n // EntryPoint.connector#onVisuallyReady, so this one can be skipped.\r\n return;\r\n }\r\n\r\n if (mechanism == null) {\r\n mechanism = \"\";\r\n }\r\n\r\n modules = [];\r\n var telemetryData = document.body.querySelectorAll(\"[data-m]\");\r\n\r\n // calculate windowRight, windowLeft, and windowHeight upfront to avoid multiple calls to getBoundingClientRect() and\r\n // reduce performance impact\r\n var windowHeight;\r\n var windowRight;\r\n\r\n windowHeight = window.innerHeight;\r\n windowRight = window.innerWidth;\r\n\r\n var windowLeft = 0;\r\n var contentArea = document.getElementById(\"content\");\r\n\r\n if (contentArea) {\r\n var contentRect = contentArea.getBoundingClientRect();\r\n windowRight = contentRect.right;\r\n windowLeft = contentRect.left;\r\n }\r\n\r\n // Everything inside infopane is considered visible as long as infopane itself is visible due to auto rotation\r\n // First get infopane itself (\"mip\" is for infopane in mid-level, \"sip\" is for spartan infopane).\r\n var infopane = document.body.querySelector(\".ip\") || document.body.querySelector(\".mip\") || document.body.querySelector(\".sip\");\r\n var infopaneVisible = infopane && trackInfo.telemetryTracking.isVisible(infopane, windowRight, windowLeft, windowHeight);\r\n\r\n // cache result of IsVisible() to reduce performance impact caused by getBoundingClientRect()\r\n var visibles = [];\r\n for (var i = 0; i < telemetryData.length; i++) {\r\n // if otfUseViewportForVisibility is true, we will use the whole viewport to determine the visibility of the element\r\n if (telemetryData[i].getAttribute(\"data-otfUseViewportForVisibility\") === \"true\") {\r\n // @ts-ignore window.width\r\n visibles.push(trackInfo.telemetryTracking.isVisible(telemetryData[i], window.width, 0, windowHeight, infopaneVisible));\r\n } else {\r\n visibles.push(trackInfo.telemetryTracking.isVisible(telemetryData[i], windowRight, windowLeft, windowHeight, infopaneVisible));\r\n }\r\n }\r\n\r\n for (var j = 0; j < telemetryData.length; j++) {\r\n modules.push(new Module(telemetryData[j], visibles[j]));\r\n }\r\n var context = trackInfo.telemetryTracking.formatModules();\r\n // @ts-ignore\r\n if (context && ((context.e && context.e.length > 0) || (context.vc && context.vc.length > 0))) {\r\n trackInfo.telemetryTracking.sendImprUpdateEvent(mechanism, context);\r\n }\r\n }\r\n },\r\n\r\n // browser height\r\n height: function () {\r\n if (!browserHeight) {\r\n getBrowserSize();\r\n }\r\n return browserHeight;\r\n },\r\n\r\n pageTitle: function () {\r\n /**\r\n * returns the page title\r\n */\r\n if (!canUseDOM()) {\r\n return \"\";\r\n }\r\n\r\n return document.title;\r\n },\r\n\r\n // entire url of the current page\r\n // use a function because we may virtually change the page by manipulating the history stack\r\n // (for example, in a gallery when changing slides).\r\n pageUrl: function () {\r\n var pageUrl = getLocationHref();\r\n // @ts-ignore\r\n var ocid = trackInfo.sitePage.msnocid;\r\n if (ocid) {\r\n // This is the DHP or NTP page - need to add the OCID to pageUrl.\r\n var hasQueryString = pageUrl.indexOf(\"?\") >= 0;\r\n pageUrl = hasQueryString ? pageUrl + \"&\" : pageUrl + \"?\";\r\n pageUrl = pageUrl + \"ocid=\" + ocid;\r\n }\r\n\r\n return pageUrl;\r\n },\r\n\r\n // URL of the document that loaded the current document\r\n // first check for an override property that we may set during virtual page changes, and if\r\n // that's not set, use the real referrer.\r\n // @ts-ignore\r\n referrer: function () {\r\n if (!canUseDOM()) {\r\n return \"\";\r\n }\r\n\r\n // @ts-ignore\r\n return document.referrerOverride || document.referrer;\r\n },\r\n // screen resolution\r\n screenResolution: function () {\r\n if (!canUseDOM()) {\r\n return \"\";\r\n }\r\n\r\n var screenResolution = [screen.width, screen.height].join(\"x\");\r\n\r\n return screenResolution;\r\n },\r\n\r\n userAgent: function () {\r\n /**\r\n * gets the user agent\r\n */\r\n if (!canUseDOM()) {\r\n return \"\";\r\n }\r\n\r\n return navigator.userAgent;\r\n },\r\n\r\n // browser width\r\n width: function () {\r\n if (!browserWidth) {\r\n getBrowserSize();\r\n }\r\n return browserWidth;\r\n },\r\n //sends the Browser Hidden Field on window\r\n wasBrowserHiddenAtLeastOnce: function () {\r\n return visibilityService.wasBrowserHiddenAtLeastOnce();\r\n }\r\n },\r\n userDynamic:\r\n {\r\n timeStamp: function () {\r\n /// \r\n /// generates the timestamp for the url\r\n /// \r\n /// \r\n /// \r\n return trackInfo.getCurrentTime();\r\n },\r\n slideType: function () {\r\n /// \r\n /// Finds the slide type if any (and if a slide)\r\n /// \r\n /// \"halfpane\" or null\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n // @ts-ignore\r\n var elem = trackInfo.event.target;\r\n var halfpaneClass = \"halfpane\";\r\n while (elem && dom.name(elem) != \"SECTION\") {\r\n if (dom.name(elem) == \"LI\" && dom.containsClass(elem, halfpaneClass)) {\r\n return halfpaneClass;\r\n }\r\n elem = dom.parent(elem);\r\n }\r\n return null;\r\n },\r\n firstEventIndex: function () {\r\n /// \r\n /// The first rid event index.\r\n /// This value gets incremented for each event of the first rid that is triggered\r\n /// \r\n /// \r\n /// Sequential number of the current event\r\n /// \r\n\r\n return ++eventIndex[0];\r\n },\r\n currentEventIndex: function () {\r\n /// \r\n /// The current event index.\r\n /// This value gets incremented for each event that is triggered\r\n /// \r\n /// \r\n /// Sequential number of the current event\r\n /// \r\n if (isFirstEventIndex) {\r\n return ++eventIndex[0];\r\n } else {\r\n return ++eventIndex[1];\r\n }\r\n },\r\n requestId: function () {\r\n /// \r\n /// return the requestId\r\n /// \r\n return pageInstance.getRequestId() || (trackInfo.sitePage).requestId;\r\n },\r\n resetEventIndex: function () {\r\n /// \r\n /// reset the event index\r\n /// \r\n eventIndex[1] = 0;\r\n isFirstEventIndex = false;\r\n }\r\n },\r\n custom:\r\n {\r\n addCustomTags: function () {\r\n /// \r\n /// Adds the custom tags inside the otf beacon url.\r\n /// \r\n /// \r\n /// \r\n\r\n var combinedTags = trackInfo.customTags;\r\n combinedTags = extend({}, trackInfo.customTags, eventTransientCustomTags);\r\n //reset so the next events gets its own transient custom tags\r\n eventTransientCustomTags = {};\r\n return JSON.stringify(combinedTags);\r\n },\r\n addCustomTagsForClickEvent: function () {\r\n /// \r\n /// Adds the custom tags for click event inside the otf beacon url.\r\n /// \r\n /// \r\n /// \r\n\r\n var customTags = \"\";\r\n if (typeof userDefinedCustomTags === \"object\") {\r\n for (var key in userDefinedCustomTags) {\r\n customTags = JSON.stringify(userDefinedCustomTags);\r\n break;\r\n }\r\n }\r\n //reset so the next events gets its own custom tags\r\n userDefinedCustomTags = {};\r\n return customTags;\r\n }\r\n },\r\n telemetryTracking:\r\n {\r\n setupParameters: function (evt) {\r\n var trackInfoSitePage = trackInfo.sitePage;\r\n const anonckName: string = appEnvironment.AuthCookieName as string;\r\n\r\n var result = {\r\n evt: evt,\r\n // @ts-ignore\r\n rid: pageInstance.getRequestId() || trackInfoSitePage.requestId,\r\n // @ts-ignore\r\n di: trackInfoSitePage.domainId,\r\n clid: trackInfo.client.clientId(),\r\n issso: trackInfo.client.getSsoComplete(),\r\n aadState: trackInfo.client.getAadAuthentication()\r\n };\r\n\r\n // @ts-ignore\r\n if (trackInfoSitePage.afd) {\r\n // @ts-ignore\r\n result.afd = trackInfoSitePage.afd;\r\n }\r\n\r\n if (anonckName) {\r\n // @ts-ignore\r\n result.anoncknm = anonckName;\r\n }\r\n\r\n // Set the new page parameters for all post events\r\n // @ts-ignore\r\n result[\"pg.p\"] = trackInfo.sitePage.page_product;\r\n // @ts-ignore\r\n result[\"pg.t\"] = trackInfo.sitePage.page_type;\r\n // @ts-ignore\r\n result[\"pg.n\"] = trackInfo.sitePage.page_name;\r\n // @ts-ignore\r\n result[\"pg.c\"] = trackInfo.sitePage.page_configuration;\r\n\r\n return result;\r\n },\r\n sendImprUpdateEvent: function (mechanism, modules, topLevelContainerType?) {\r\n // Prevent empty impr_update\r\n if (!canUseDOM() || modules == undefined || ((modules.e == undefined || modules.e.length <= 0) && (modules.vc == undefined || modules.vc.length <= 0))) {\r\n return;\r\n }\r\n\r\n var parameters = this.setupParameters(trackInfo.eventTypes.imprUpdate);\r\n if (parameters) {\r\n // mechanism to trigger the viewability event. ex: load, swipe, click, tap, scroll, and resize\r\n parameters[\"mech\"] = mechanism;\r\n\r\n parameters.winht = getWindowHeight();\r\n parameters.docht = getDocHeight();\r\n parameters.scrollOff = getWindowYscroll();\r\n\r\n parameters.wbh = visibilityService.wasBrowserHiddenAtLeastOnce();\r\n parameters[\"e1\"] = modules;\r\n // @ts-ignore\r\n parameters.tmpl = trackInfo.sitePage.templ;\r\n // @ts-ignore\r\n parameters.mkt = trackInfo.sitePage.localeCode;\r\n if (mechanism === trackInfo.imprUpdateMechanisms.scroll) {\r\n parameters.TTI = trackInfo.timeToInteract();\r\n }\r\n\r\n // @ts-ignore\r\n if (window && window.adsEnabled != null) {\r\n // @ts-ignore\r\n parameters.adoni = +window.adsEnabled;\r\n }\r\n\r\n // Feed parameters\r\n // @ts-ignore\r\n if (trackInfo.sitePage.feedId) {\r\n // @ts-ignore\r\n parameters.fid = trackInfo.sitePage.feedId;\r\n // @ts-ignore\r\n parameters.fn = trackInfo.sitePage.feedName;\r\n // @ts-ignore\r\n parameters.ft = trackInfo.sitePage.feedType;\r\n }\r\n\r\n // @ts-ignore\r\n if (trackInfo.sitePage.flightid) {\r\n // @ts-ignore\r\n parameters.flightid = trackInfo.sitePage.flightid;\r\n }\r\n\r\n // If toplevel container is passed to impression update then create a new parameter which will eventually be replaced by tlc.\r\n if (topLevelContainerType) {\r\n parameters.tlcType = topLevelContainerType;\r\n }\r\n\r\n this.sendUpdate(parameters);\r\n }\r\n },\r\n isVisible: function (element, windowRight?, windowLeft?, windowHeight?, infopaneVisible?) {\r\n if (!element) {\r\n return false;\r\n }\r\n\r\n return visibilityService.isElementTrulyVisible(element, windowRight, windowLeft, windowHeight);\r\n },\r\n formatModules: function () {\r\n var formattedModules = [];\r\n\r\n for (var index in modules) {\r\n var module = modules[index];\r\n if (module && module.compress) {\r\n var mData = module.compress();\r\n\r\n // TODO: (nubenja) Remove this once data-m.y is deprecated\r\n // Convertion from telemetryType (data-m.y) to telemetryContentType and telemetryContentAction (data-m.ct/ca)\r\n if (mData && mData.y && !mData.ct) {\r\n var ct = telemetryDataTypes.getTelemetryContentType(mData.y);\r\n\r\n if (ct) {\r\n mData.ct = ct;\r\n }\r\n }\r\n\r\n formattedModules.push(mData);\r\n }\r\n\r\n }\r\n\r\n var context = {};\r\n if (formattedModules && formattedModules.length > 0) {\r\n // @ts-ignore\r\n context.e = formattedModules;\r\n }\r\n\r\n return context;\r\n },\r\n sendUpdate: function (parameters) {\r\n // For the preloaded pages, the code inside requestPageRevealAsync is called when page is revealed,\r\n // otherwise it is called right away.\r\n telemetryReadyCallback((): void => {\r\n if (!trackInfo.shouldFireTelemetry()) {\r\n return;\r\n }\r\n\r\n // An ad call may send this without setting up the baseUrl correctly.\r\n // @ts-ignore\r\n baseUrl = baseUrl || (trackInfo.sitePage || {}).otfURL;\r\n if (!baseUrl) {\r\n // The value of sitePage.otfURL was empty!\r\n return;\r\n }\r\n\r\n if (!parameters) {\r\n return;\r\n }\r\n\r\n // increment the event index and set the idx parameter\r\n parameters.idx = trackInfo.userDynamic.currentEventIndex();\r\n\r\n // An ad call may send this without setting up the baseUrl correctly.\r\n var beaconData = {\r\n url: baseUrl,\r\n requestType: telemetryConstants.POST,\r\n // @ts-ignore\r\n eventType: parameters.evt || trackInfo.eventTypes.impressionUpdate,\r\n params: parameters,\r\n trackingType: telemetryConstants.OTF\r\n };\r\n\r\n mediator.pub(telemetryConstants.FireTelemetry, beaconData);\r\n });\r\n }\r\n },\r\n updateTemplValue: function (templToAdd) {\r\n /// Updates the templ value with the specified value\r\n /// The templ value to add\r\n\r\n trackInfo.updateSitePage(templToAdd);\r\n },\r\n updateSitePage: function (templ, flightId?, requestId?) {\r\n /// Updates the trackInfo.sitePage values with the specified values\r\n /// The new templ value to add\r\n /// The new flightId to add\r\n /// The new trackInfo object\r\n\r\n var currentSitePage = trackInfo.sitePage;\r\n if (!currentSitePage) {\r\n currentSitePage = trackInfo.sitePage = {};\r\n }\r\n\r\n // @ts-ignore\r\n var currentFlightIds = currentSitePage.flightid;\r\n if (flightId && (!currentFlightIds || (currentFlightIds.indexOf(flightId) < 0))) {\r\n // @ts-ignore\r\n currentSitePage.flightid = joinTelemetryValues(\",\", currentFlightIds, flightId);\r\n }\r\n // @ts-ignore\r\n currentSitePage.templ = joinTelemetryValuesForTmpl(\";\", currentSitePage.templ, templ);\r\n\r\n if (requestId) {\r\n // @ts-ignore\r\n currentSitePage.requestId = requestId;\r\n }\r\n },\r\n updatePageName: function (pageName, overridePageType) {\r\n /// Updates the pageName and pageType in the trackInfo.SitePage for the given pageName\r\n /// The pageName to update\r\n /// Boolean flag to determine to override pagetype or not. Default is true\r\n var doOverridePageType = overridePageType;\r\n if (overridePageType === undefined) {\r\n doOverridePageType = true;\r\n }\r\n\r\n var telemetryPageName = telemetryDataTypes.getTelemetryPageInfo(pageName);\r\n if (telemetryPageName && trackInfo.sitePage) {\r\n // @ts-ignore\r\n trackInfo.sitePage.page_name = telemetryPageName.PageName;\r\n if (doOverridePageType) {\r\n // @ts-ignore\r\n trackInfo.sitePage.page_type = telemetryPageName.PageType;\r\n }\r\n }\r\n },\r\n updateFeedMetadata: function (feedId, feedName, feedType) {\r\n /// Updates the feedid, feedname and feedType in the trackInfo.SitePage for the given feed\r\n /// The feedId to update\r\n /// The feedName to update\r\n /// The feedType to update\r\n if (feedId) {\r\n // @ts-ignore\r\n trackInfo.sitePage.feedId = feedId;\r\n if (feedName) {\r\n // @ts-ignore\r\n trackInfo.sitePage.feedName = feedName;\r\n }\r\n\r\n if (feedType) {\r\n // @ts-ignore\r\n trackInfo.sitePage.feedType = feedType;\r\n }\r\n }\r\n },\r\n updatePagePivot: function (pagePivot) {\r\n /// Updates the pagePivot in the trackInfo.SitePage\r\n /// The pagePivot to update\r\n if (pagePivot === telemetryDataTypes.TelemetryPagePivot.Undefined) {\r\n // @ts-ignore\r\n trackInfo.sitePage.pagePivot = null;\r\n } else if (telemetryDataTypes.validateTelemetryDataType(telemetryDataTypes.TelemetryPagePivot, pagePivot)) {\r\n // @ts-ignore\r\n trackInfo.sitePage.pagePivot = pagePivot;\r\n }\r\n },\r\n updateReferrer: function (referrer, referrerType) {\r\n /// Updates referrer and referrerType\r\n /// referrer\r\n /// TelemetryContentType of the referrer\r\n if (canUseDOM() && referrer) {\r\n // @ts-ignore\r\n document.referrerOverride = referrer;\r\n\r\n if (referrerType && telemetryDataTypes.validateTelemetryDataType(telemetryDataTypes.TelemetryContentType, referrerType) &&\r\n referrerType != telemetryDataTypes.TelemetryContentType.Undefined) {\r\n // @ts-ignore\r\n trackInfo.sitePage.referrerType = referrerType;\r\n }\r\n }\r\n },\r\n setCustomTagsForClickEvent: function (key, value) {\r\n /// \r\n /// Set user defined custom tags.\r\n /// \r\n /// The key\r\n /// The value\r\n if (key && value && value != undefined) {\r\n userDefinedCustomTags[key] = value;\r\n }\r\n },\r\n updatePageUserTypeAndUserId: function (userType, userId) {\r\n /// \r\n /// Set user id and user id type.\r\n /// \r\n /// The user id type\r\n /// The user id\r\n\r\n // @ts-ignore\r\n trackInfo.sitePage.pageUserId = null;\r\n // @ts-ignore\r\n trackInfo.sitePage.pageUserType = null;\r\n\r\n if (telemetryDataTypes.validateTelemetryDataType(telemetryDataTypes.TelemetryUserType, userType)) {\r\n // @ts-ignore\r\n trackInfo.sitePage.pageUserType = userType;\r\n\r\n if (userId) {\r\n // @ts-ignore\r\n trackInfo.sitePage.pageUserId = userId;\r\n }\r\n }\r\n },\r\n trackCustomProperty: function (key, value) {\r\n /// Adds or updates the transient per event custom tags properties\r\n /// key to add\r\n /// value to add\r\n if (key && value != undefined) {\r\n key = key.toLowerCase();\r\n eventTransientCustomTags[key] = value;\r\n }\r\n },\r\n updateExtendedFlightId: function (namespace, flightIds) {\r\n /// Adds or updates extended flightId\r\n /// Partner namespace enum\r\n /// flightIds to add\r\n\r\n var currentSitePage = trackInfo.sitePage;\r\n\r\n if (currentSitePage && flightIds && namespace &&\r\n telemetryDataTypes.validateTelemetryDataType(telemetryDataTypes.TelemetryPartnerNamespace, namespace)) {\r\n // @ts-ignore\r\n currentSitePage.extflightid = joinTelemetryValuesForTmpl(\"|\", currentSitePage.extflightid, namespace + \":\" + flightIds);\r\n }\r\n }\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * The app error object that contains the data of an app error\r\n */\r\nexport interface AppError {\r\n /** error id */\r\n id: number,\r\n\r\n /** source file */\r\n source?: string,\r\n\r\n /** Message or data */\r\n message?: string,\r\n\r\n /** severity */\r\n severity?: Severity,\r\n\r\n /** Property Bag */\r\n pb?: AppErrorPropertyBag\r\n}\r\n\r\n/**\r\n * The app error property bag that will be used for build number etc.\r\n */\r\nexport interface AppErrorPropertyBag {\r\n /** build number */\r\n build?: string,\r\n\r\n /** custom message */\r\n customMessage?: string\r\n}\r\n\r\n/**\r\n * The interface that defines a generic app error tracker\r\n */\r\nexport interface AppErrorTracker {\r\n /**\r\n * Report an app error\r\n * @param {AppError} error - the app error to report\r\n */\r\n trackError(error: AppError): Promise;\r\n}\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 Alert,\r\n NoAlert,\r\n HighImpact\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { getRequestData } from \"./requestData\";\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 * 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 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 localStorage in an isomorphic manner.\r\n * Todo (http://osgvsowi/23753462), provide actual functionality for localStorage on the server side.\r\n */\r\nexport function getLocalStorage(): Storage {\r\n return canUseDOM() ? window.localStorage : null;\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.innerWidth 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 getInnerWidth(): number {\r\n return canUseDOM() ? window.innerWidth : getRequestData().innerWidth;\r\n}\r\n\r\n/**\r\n * Get window.innerWidth 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","// © 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: string = \"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: string = \"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 * Local storage key that holds the appcache stored head data entries\r\n */\r\n storedHeadDataKey: \"ac_shd\",\r\n\r\n /**\r\n * Local storage key that holds the appcache stored activity IDs\r\n */\r\n storedLastUsedActivityIdKey: \"ac_sai\"\r\n\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 m = \"data-m\";\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: number = 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: number = 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 * 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 * 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\",\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};\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 * Enterprise compliant domain for One Service api\r\n */\r\nexport const EnterpriseOneServiceApi = \"https://ent-api.msn.com/\";\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","// © Microsoft Corporation. All rights reserved.\r\n\r\n// Defines constants used in telemetry beacons\r\n// \r\n// This is a auto-generated file using MSNTelemetryCodeGen (https://microsoft.visualstudio.com/DefaultCollection/Universal%20Store/_git/MSN.Tool.Telemetry?path=%2FMSNTelemetryDimensionsCodeGen/)\r\n// \r\n\r\n// \r\n// This is a auto-generated file using MSNTelemetryDimensionsCodeGen (https://microsoft.visualstudio.com/DefaultCollection/Universal%20Store/_git/MSN.Tool.Telemetry?path=%2FMSNTelemetryDimensionsCodeGen/)\r\n// \r\nvar PageNamePageTypeMappingList = {};\r\nvar TelemetryTypeContentTypeMappingList = {};\r\nvar TelemetryTypeBehaviorTypeMappingList = {};\r\n\r\n/// Telemetry Product \r\nvar TelemetryProduct = {\r\n Spartan: \"spartan\",\r\n Prime: \"prime\",\r\n PrimeMobile: \"prime_mobile\",\r\n IEext: \"ieext\",\r\n SpartanMobile: \"spartan_mobile\",\r\n TabbedShell: \"tabbedshell\",\r\n ChromeExt: \"chromeext\",\r\n Downlevel: \"downlevel\",\r\n Xbox: \"xbox\"\r\n};\r\n\r\n/// Telemetry PageType \r\nvar TelemetryPageType = {\r\n Unspecified: \"unspecified\",\r\n DHP: \"dhp\",\r\n NTP: \"ntp\",\r\n HomePage: \"hp\",\r\n VerticalHomePage: \"verthp\",\r\n StructuredDataPage: \"data\",\r\n SectionFront: \"secfront\",\r\n SiteSearch: \"sitesearch\",\r\n Article: \"article\",\r\n Gallery: \"gallery\",\r\n Video: \"video\",\r\n SubjectSection: \"subjectsec\",\r\n CustomColumn: \"custcol\"\r\n};\r\n\r\n// TODO: (nubenja) Remove this once all partners moves from TelemetryType to ContentType and ContentAction\r\n/// Telemetry Type \r\nvar 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 Navigation: 14,\r\n Entity: 15,\r\n StructuredData: 16,\r\n AppStore: 17,\r\n AppLaunch: 18,\r\n CmsPromotions: 19,\r\n MicrosoftWebStore: 20,\r\n XboxStore: 21,\r\n OfficeStore: 22,\r\n AppInstall: 23,\r\n PartnerLinks: 24,\r\n SponsoredContent: 25,\r\n Follow: 26,\r\n Unfollow: 27,\r\n MoreFrom: 28,\r\n Topic: 29,\r\n Provider: 30,\r\n Spotlight: 33,\r\n ShareClose: 36,\r\n Share: 37,\r\n Like: 38,\r\n Dislike: 39,\r\n Unlike: 40,\r\n Undislike: 41,\r\n Mute: 42,\r\n Unmute: 43,\r\n MuteCancel: 44,\r\n Manage: 45,\r\n NewStories: 46,\r\n AutoSuggest: 47,\r\n BingCard: 48,\r\n Tile: 49,\r\n TrendingNews: 50,\r\n AllCoverage: 51,\r\n Report: 52,\r\n AdChoice: 53,\r\n Hide: 55,\r\n Unhide: 56\r\n};\r\n\r\n/// Telemetry Content Type \r\nvar TelemetryContentType = {\r\n Undefined: 0,\r\n App: 1,\r\n Article: 2,\r\n Feed: 3,\r\n Gallery: 4,\r\n AppStorePromo: 5,\r\n Settings: 6,\r\n SponsoredContent: 7,\r\n StructuredDataCard: 8,\r\n Video: 9,\r\n Webview: 10,\r\n Activity: 11,\r\n Win32: 12,\r\n OfficeDocument: 13,\r\n LocalFile: 14,\r\n CardAction: 15\r\n};\r\n\r\n/// Telemetry Behavior Type \r\nconst 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};\r\n\r\n/// Telemetry ContentPlacedBySource \r\nvar ContentPlacedBySource = {\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/// Telemetry Page Configuration \r\nvar TelemetryPageConfiguration = {\r\n NoContent: 0,\r\n OneBox: 1,\r\n TopSites: 2,\r\n Suggested: 4,\r\n ContentFeed: 8,\r\n WinFre: 16,\r\n StripeLayout: 1024\r\n};\r\n\r\n/// Telemetry Partner Namespace \r\nvar TelemetryPartnerNamespace = {\r\n MMX: \"m\",\r\n Shell: \"s\",\r\n Edge: \"e\",\r\n Office: \"o\",\r\n Activity: \"a\",\r\n Cortana: \"c\"\r\n};\r\n\r\n/// Telemetry PageName \r\nvar TelemetryPageName = {\r\n StartPage: telemetryPageName(\"startpage\", TelemetryPageType.HomePage),\r\n // @ts-ignore\r\n DefaultPage: telemetryPageName(\"default\"),\r\n // @ts-ignore\r\n EduPage: telemetryPageName(\"edu\"),\r\n // @ts-ignore\r\n ChildModePage: telemetryPageName(\"child\"),\r\n // @ts-ignore\r\n Office: telemetryPageName(\"office\"),\r\n // @ts-ignore\r\n Feed: telemetryPageName(\"xfeed\"),\r\n // @ts-ignore\r\n Discover: telemetryPageName(\"discover\"),\r\n // @ts-ignore\r\n MyInterests: telemetryPageName(\"myinterests\"),\r\n // @ts-ignore\r\n CombinedInterests: telemetryPageName(\"cinterests\"),\r\n ArticlePageNames:\r\n {\r\n Article: telemetryPageName(\"article\", TelemetryPageType.Article),\r\n ArticleVNext: telemetryPageName(\"articlevnext\", TelemetryPageType.Article),\r\n ArticleListicle: telemetryPageName(\"article_listicle\", TelemetryPageType.Article),\r\n ArticleCollection: telemetryPageName(\"articlecollection\", TelemetryPageType.Article),\r\n ArticleFullScreen: telemetryPageName(\"articlefullscreen\", TelemetryPageType.Article),\r\n FlexibleArticle: telemetryPageName(\"articleflex\", TelemetryPageType.Article),\r\n FlexibleArticleMobile: telemetryPageName(\"articleflexmobile\", TelemetryPageType.Article),\r\n ArticleGalleryFullScreen: telemetryPageName(\"article_galleryfs\", TelemetryPageType.Article)\r\n },\r\n GalleryPageNames:\r\n {\r\n Gallery: telemetryPageName(\"gallery\", TelemetryPageType.Gallery),\r\n GalleryVNext: telemetryPageName(\"galleryvnext\", TelemetryPageType.Gallery),\r\n GalleryFullScreen: telemetryPageName(\"gallery_fullscreen\", TelemetryPageType.Gallery),\r\n GalleryClassic: telemetryPageName(\"gallery_classic\", TelemetryPageType.Gallery),\r\n GalleryClassicFullScreen: telemetryPageName(\"gallery_classicfs\", TelemetryPageType.Gallery),\r\n GallerySearch: telemetryPageName(\"gallery_search\", TelemetryPageType.Gallery),\r\n GallerySearchFullScreen: telemetryPageName(\"gallery_searchfs\", TelemetryPageType.Gallery),\r\n FlexibleGallery: telemetryPageName(\"galleryflex\", TelemetryPageType.Gallery),\r\n FlexibleGalleryMobile: telemetryPageName(\"galleryflexmobile\", TelemetryPageType.Gallery),\r\n GalleryImmersive: telemetryPageName(\"gallery_immersive\", TelemetryPageType.Gallery),\r\n GalleryImmersiveFullScreen: telemetryPageName(\"gallery_immersivefs\", TelemetryPageType.Gallery),\r\n GallerySponsored: telemetryPageName(\"gallery_sponsor\", TelemetryPageType.Gallery),\r\n GallerySponsoredFullScreen: telemetryPageName(\"gallery_sponsorfs\", TelemetryPageType.Gallery),\r\n GalleryInline: telemetryPageName(\"gallery_inline\", TelemetryPageType.Gallery)\r\n },\r\n VideoPageNames:\r\n {\r\n ChannelPlayerPage: telemetryPageName(\"channelplayerpage\", TelemetryPageType.Video),\r\n PartnerPlayerPage: telemetryPageName(\"partnerplayerpage\", TelemetryPageType.Video)\r\n },\r\n VerticalHomePageNames:\r\n {\r\n HomePage: telemetryPageName(\"homepage\", TelemetryPageType.VerticalHomePage),\r\n HomePageToday: telemetryPageName(\"homepage-today\", TelemetryPageType.VerticalHomePage)\r\n },\r\n StructuredDataPageNames:\r\n {\r\n Gamecenter: telemetryPageName(\"gamecenter\", TelemetryPageType.StructuredDataPage),\r\n Schedule: telemetryPageName(\"schedule\", TelemetryPageType.StructuredDataPage),\r\n Scores: telemetryPageName(\"scores\", TelemetryPageType.StructuredDataPage),\r\n Stocksummary: telemetryPageName(\"stocksummary\", TelemetryPageType.StructuredDataPage),\r\n Stocksummaryoneriver: telemetryPageName(\"stocksummaryoneriver\", TelemetryPageType.StructuredDataPage),\r\n Weatherxplatmaps: telemetryPageName(\"weatherxplatmaps\", TelemetryPageType.StructuredDataPage),\r\n Standings: telemetryPageName(\"standings\", TelemetryPageType.StructuredDataPage),\r\n Markets: telemetryPageName(\"markets\", TelemetryPageType.StructuredDataPage),\r\n Watchlistpage: telemetryPageName(\"watchlistpage\", TelemetryPageType.StructuredDataPage),\r\n Data_modelpage: telemetryPageName(\"data_modelpage\", TelemetryPageType.StructuredDataPage),\r\n Immersivechartspage: telemetryPageName(\"immersivechartspage\", TelemetryPageType.StructuredDataPage),\r\n Currencies: telemetryPageName(\"currencies\", TelemetryPageType.StructuredDataPage),\r\n Indexdetailspage: telemetryPageName(\"indexdetailspage\", TelemetryPageType.StructuredDataPage),\r\n Data_makepage: telemetryPageName(\"data_makepage\", TelemetryPageType.StructuredDataPage),\r\n Weatherfullscreenmaps: telemetryPageName(\"weatherfullscreenmaps\", TelemetryPageType.StructuredDataPage),\r\n Weatherthresholdmaps: telemetryPageName(\"weatherthresholdmaps\", TelemetryPageType.StructuredDataPage),\r\n Stockanalysisdetails: telemetryPageName(\"stockanalysisdetails\", TelemetryPageType.StructuredDataPage),\r\n Data_yearoverview: telemetryPageName(\"data_yearoverview\", TelemetryPageType.StructuredDataPage),\r\n Data_segmenthub: telemetryPageName(\"data_segmenthub\", TelemetryPageType.StructuredDataPage),\r\n Weathermaps: telemetryPageName(\"weathermaps\", TelemetryPageType.StructuredDataPage),\r\n Playerstats: telemetryPageName(\"playerstats\", TelemetryPageType.StructuredDataPage),\r\n Funddetailspage: telemetryPageName(\"funddetailspage\", TelemetryPageType.StructuredDataPage),\r\n Exercisedetails: telemetryPageName(\"exercisedetails\", TelemetryPageType.StructuredDataPage),\r\n Teams: telemetryPageName(\"teams\", TelemetryPageType.StructuredDataPage),\r\n Etfdetailspage: telemetryPageName(\"etfdetailspage\", TelemetryPageType.StructuredDataPage),\r\n Binganswermaps: telemetryPageName(\"binganswermaps\", TelemetryPageType.StructuredDataPage),\r\n Workoutdetails: telemetryPageName(\"workoutdetails\", TelemetryPageType.StructuredDataPage),\r\n Competitionstats: telemetryPageName(\"competitionstats\", TelemetryPageType.StructuredDataPage),\r\n Polls: telemetryPageName(\"polls\", TelemetryPageType.StructuredDataPage),\r\n Data_photos: telemetryPageName(\"data_photos\", TelemetryPageType.StructuredDataPage),\r\n Videocategorylistpage: telemetryPageName(\"videocategorylistpage\", TelemetryPageType.StructuredDataPage),\r\n Stockfinancialsdetails: telemetryPageName(\"stockfinancialsdetails\", TelemetryPageType.StructuredDataPage),\r\n Commoditydetailspage: telemetryPageName(\"commoditydetailspage\", TelemetryPageType.StructuredDataPage),\r\n Data_yearoverview_trim: telemetryPageName(\"data_yearoverview_trim\", TelemetryPageType.StructuredDataPage),\r\n Worldwidepage: telemetryPageName(\"worldwidepage\", TelemetryPageType.StructuredDataPage),\r\n Data_photos_trim: telemetryPageName(\"data_photos_trim\", TelemetryPageType.StructuredDataPage),\r\n Stockcompanydetails: telemetryPageName(\"stockcompanydetails\", TelemetryPageType.StructuredDataPage),\r\n Retirementplanner: telemetryPageName(\"retirementplanner\", TelemetryPageType.StructuredDataPage),\r\n Livecoverage: telemetryPageName(\"livecoverage\", TelemetryPageType.StructuredDataPage),\r\n Teamroster: telemetryPageName(\"teamroster\", TelemetryPageType.StructuredDataPage),\r\n Stockhistorydetails: telemetryPageName(\"stockhistorydetails\", TelemetryPageType.StructuredDataPage),\r\n Filterresultspage: telemetryPageName(\"filterresultspage\", TelemetryPageType.StructuredDataPage),\r\n Data_carcompare: telemetryPageName(\"data_carcompare\", TelemetryPageType.StructuredDataPage),\r\n Stockownershipdetails: telemetryPageName(\"stockownershipdetails\", TelemetryPageType.StructuredDataPage),\r\n Driverstandings: telemetryPageName(\"driverstandings\", TelemetryPageType.StructuredDataPage),\r\n Timevalueofmoney: telemetryPageName(\"timevalueofmoney\", TelemetryPageType.StructuredDataPage),\r\n Savingscalculator: telemetryPageName(\"savingscalculator\", TelemetryPageType.StructuredDataPage),\r\n Iccmatches: telemetryPageName(\"iccmatches\", TelemetryPageType.StructuredDataPage),\r\n Other_flightsearchresult: telemetryPageName(\"other_flightsearchresult\", TelemetryPageType.StructuredDataPage),\r\n Stockrelateddetails: telemetryPageName(\"stockrelateddetails\", TelemetryPageType.StructuredDataPage),\r\n Data_specs_trim: telemetryPageName(\"data_specs_trim\", TelemetryPageType.StructuredDataPage),\r\n Stockoptionsdetails: telemetryPageName(\"stockoptionsdetails\", TelemetryPageType.StructuredDataPage),\r\n HomepageAlerts: telemetryPageName(\"homepage-alerts\", TelemetryPageType.StructuredDataPage),\r\n HomepageRecordsandAverages: telemetryPageName(\"homepage-recordsandaverages\", TelemetryPageType.StructuredDataPage),\r\n HomepageWeatherTraffic: telemetryPageName(\"homepage-weathertraffic\", TelemetryPageType.StructuredDataPage),\r\n Data_specs: telemetryPageName(\"data_specs\", TelemetryPageType.StructuredDataPage),\r\n Data_pricing: telemetryPageName(\"data_pricing\", TelemetryPageType.StructuredDataPage),\r\n Mortgagecalculator: telemetryPageName(\"mortgagecalculator\", TelemetryPageType.StructuredDataPage),\r\n Data_performance_trim: telemetryPageName(\"data_performance_trim\", TelemetryPageType.StructuredDataPage),\r\n Theatershowtimes: telemetryPageName(\"theatershowtimes\", TelemetryPageType.StructuredDataPage),\r\n Data_pricing_trim: telemetryPageName(\"data_pricing_trim\", TelemetryPageType.StructuredDataPage),\r\n Data_photosInterior: telemetryPageName(\"data_photos-interior\", TelemetryPageType.StructuredDataPage),\r\n Indexdetailsanalysispage: telemetryPageName(\"indexdetailsanalysispage\", TelemetryPageType.StructuredDataPage),\r\n Data_photosInterior_trim: telemetryPageName(\"data_photos-interior_trim\", TelemetryPageType.StructuredDataPage),\r\n Data_photosColors: telemetryPageName(\"data_photos-colors\", TelemetryPageType.StructuredDataPage),\r\n Data_carReviews_trim: telemetryPageName(\"data_car-reviews_trim\", TelemetryPageType.StructuredDataPage),\r\n Data_carReviews: telemetryPageName(\"data_car-reviews\", TelemetryPageType.StructuredDataPage),\r\n Racecalendar: telemetryPageName(\"racecalendar\", TelemetryPageType.StructuredDataPage),\r\n Teamstandings: telemetryPageName(\"teamstandings\", TelemetryPageType.StructuredDataPage),\r\n Data_photosColors_trim: telemetryPageName(\"data_photos-colors_trim\", TelemetryPageType.StructuredDataPage),\r\n Stockdetails: telemetryPageName(\"stockdetails\", TelemetryPageType.StructuredDataPage),\r\n Data_interiorFeatures_trim: telemetryPageName(\"data_interior-features_trim\", TelemetryPageType.StructuredDataPage),\r\n Data_exteriorFeatures_trim: telemetryPageName(\"data_exterior-features_trim\", TelemetryPageType.StructuredDataPage),\r\n Calendar: telemetryPageName(\"calendar\", TelemetryPageType.StructuredDataPage),\r\n TeamStats: telemetryPageName(\"teamstats\", TelemetryPageType.StructuredDataPage),\r\n Movieshowtimes: telemetryPageName(\"movieshowtimes\", TelemetryPageType.StructuredDataPage),\r\n Drafts: telemetryPageName(\"drafts\", TelemetryPageType.StructuredDataPage),\r\n Data_technologyFeatures_trim: telemetryPageName(\"data_technology-features_trim\", TelemetryPageType.StructuredDataPage),\r\n Data_workoutdetails_collection: telemetryPageName(\"data_workoutdetails_collection\", TelemetryPageType.StructuredDataPage),\r\n Data_photosExterior: telemetryPageName(\"data_photos-exterior\", TelemetryPageType.StructuredDataPage),\r\n Data_photosExterior_trim: telemetryPageName(\"data_photos-exterior_trim\", TelemetryPageType.StructuredDataPage),\r\n Data_photos360Interior: telemetryPageName(\"data_photos-360-interior\", TelemetryPageType.StructuredDataPage),\r\n Immersivechartsmarketspage: telemetryPageName(\"immersivechartsmarketspage\", TelemetryPageType.StructuredDataPage),\r\n Returnoninvestment: telemetryPageName(\"returnoninvestment\", TelemetryPageType.StructuredDataPage),\r\n Indexdetailsrelatedpage: telemetryPageName(\"indexdetailsrelatedpage\", TelemetryPageType.StructuredDataPage),\r\n Gonepage: telemetryPageName(\"gonepage\", TelemetryPageType.StructuredDataPage),\r\n Data_compare: telemetryPageName(\"data_compare\", TelemetryPageType.StructuredDataPage),\r\n Data_compare_trim: telemetryPageName(\"data_compare_trim\", TelemetryPageType.StructuredDataPage),\r\n Data_options_trim: telemetryPageName(\"data_options_trim\", TelemetryPageType.StructuredDataPage),\r\n Entitiespage: telemetryPageName(\"entitiespage\", TelemetryPageType.StructuredDataPage),\r\n Workoutdetailsprint: telemetryPageName(\"workoutdetailsprint\", TelemetryPageType.StructuredDataPage),\r\n Data_photos360Exterior: telemetryPageName(\"data_photos-360-exterior\", TelemetryPageType.StructuredDataPage),\r\n HomepageDatacarfinder: telemetryPageName(\"homepage-datacarfinder\", TelemetryPageType.StructuredDataPage),\r\n Data_photos360Interior_trim: telemetryPageName(\"data_photos-360-interior_trim\", TelemetryPageType.StructuredDataPage),\r\n Data_skeleton: telemetryPageName(\"data_skeleton\", TelemetryPageType.StructuredDataPage),\r\n Mortgagerates: telemetryPageName(\"mortgagerates\", TelemetryPageType.StructuredDataPage),\r\n Brackets: telemetryPageName(\"brackets\", TelemetryPageType.StructuredDataPage),\r\n Data_photos360Exterior_trim: telemetryPageName(\"data_photos-360-exterior_trim\", TelemetryPageType.StructuredDataPage),\r\n Data_photocompare: telemetryPageName(\"data_photocompare\", TelemetryPageType.StructuredDataPage),\r\n HomepageWeather10day: telemetryPageName(\"homepage-weather10day\", TelemetryPageType.StructuredDataPage),\r\n Data_performance: telemetryPageName(\"data_performance\", TelemetryPageType.StructuredDataPage),\r\n HomepageWeatherextendedforecast: telemetryPageName(\"homepage-weatherextendedforecast\", TelemetryPageType.StructuredDataPage),\r\n Savings: telemetryPageName(\"savings\", TelemetryPageType.StructuredDataPage),\r\n Data_exteriorFeatures: telemetryPageName(\"data_exterior-features\", TelemetryPageType.StructuredDataPage),\r\n Data_interiorFeatures: telemetryPageName(\"data_interior-features\", TelemetryPageType.StructuredDataPage),\r\n Data_options: telemetryPageName(\"data_options\", TelemetryPageType.StructuredDataPage),\r\n Travelgonepage: telemetryPageName(\"travelgonepage\", TelemetryPageType.StructuredDataPage),\r\n Recipe: telemetryPageName(\"recipe\", TelemetryPageType.StructuredDataPage),\r\n Getportfoliodatapage: telemetryPageName(\"getportfoliodatapage\", TelemetryPageType.StructuredDataPage),\r\n Brokercenterpage: telemetryPageName(\"brokercenterpage\", TelemetryPageType.StructuredDataPage),\r\n Data_technologyFeatures: telemetryPageName(\"data_technology-features\", TelemetryPageType.StructuredDataPage),\r\n Tvlistings: telemetryPageName(\"tvlistings\", TelemetryPageType.StructuredDataPage),\r\n Ownerstandings: telemetryPageName(\"ownerstandings\", TelemetryPageType.StructuredDataPage),\r\n Entitydetailspage: telemetryPageName(\"entitydetailspage\", TelemetryPageType.StructuredDataPage),\r\n Creditcards: telemetryPageName(\"creditcards\", TelemetryPageType.StructuredDataPage),\r\n Cmssitemap: telemetryPageName(\"cmssitemap\", TelemetryPageType.StructuredDataPage),\r\n Externalnativeadpage: telemetryPageName(\"externalnativeadpage\", TelemetryPageType.StructuredDataPage),\r\n Autoloans: telemetryPageName(\"autoloans\", TelemetryPageType.StructuredDataPage),\r\n Externalcontent: telemetryPageName(\"externalcontent\", TelemetryPageType.StructuredDataPage),\r\n Htmlsitemap: telemetryPageName(\"htmlsitemap\", TelemetryPageType.StructuredDataPage)\r\n },\r\n CustomColumnPageNames:\r\n {\r\n TrendingTopics: telemetryPageName(\"topic_tt\", TelemetryPageType.CustomColumn),\r\n GlobalSettingsPage: telemetryPageName(\"globalsettingspage\", TelemetryPageType.CustomColumn),\r\n MyTopics: telemetryPageName(\"mytopics\", TelemetryPageType.CustomColumn),\r\n WeatherPlaces: telemetryPageName(\"weatherplaces\", TelemetryPageType.CustomColumn),\r\n MyFavorites: telemetryPageName(\"myfavorites\", TelemetryPageType.CustomColumn),\r\n TopicResult: telemetryPageName(\"topicresult\", TelemetryPageType.CustomColumn),\r\n Collections: telemetryPageName(\"collections\", TelemetryPageType.CustomColumn),\r\n Rouxbe: telemetryPageName(\"rouxbe\", TelemetryPageType.CustomColumn),\r\n ShoppingList: telemetryPageName(\"shopping list\", TelemetryPageType.CustomColumn),\r\n MyHealthReportsPage: telemetryPageName(\"myhealthreportspage\", TelemetryPageType.CustomColumn),\r\n Error404page: telemetryPageName(\"error404page\", TelemetryPageType.CustomColumn),\r\n AppsPromotion: telemetryPageName(\"appspromotion\", TelemetryPageType.CustomColumn),\r\n Error500page: telemetryPageName(\"error500page\", TelemetryPageType.CustomColumn),\r\n DietTrackerPreSigninPage: telemetryPageName(\"diettrackerpresigninpage\", TelemetryPageType.CustomColumn),\r\n ExerciseTrackerPreSigninPage: telemetryPageName(\"exercisetrackerpresigninpage\", TelemetryPageType.CustomColumn),\r\n WebSlicePage: telemetryPageName(\"other_webslice\", TelemetryPageType.CustomColumn),\r\n Error200Page: telemetryPageName(\"error200page\", TelemetryPageType.CustomColumn),\r\n AboutUsPage: telemetryPageName(\"aboutus\", TelemetryPageType.CustomColumn),\r\n UnSupport: telemetryPageName(\"unsupport\", TelemetryPageType.CustomColumn),\r\n Disclaimer: telemetryPageName(\"disclaimer\", TelemetryPageType.CustomColumn),\r\n TermsOfService: telemetryPageName(\"termsofservice\", TelemetryPageType.CustomColumn),\r\n SevereWeather: telemetryPageName(\"severeweather\", TelemetryPageType.CustomColumn)\r\n },\r\n SubjectSectionPageNames:\r\n {\r\n TeamhomePage: telemetryPageName(\"teamhome\", TelemetryPageType.SubjectSection),\r\n PlayerPage: telemetryPageName(\"player\", TelemetryPageType.SubjectSection),\r\n MarketMoversPage: telemetryPageName(\"marketmovers\", TelemetryPageType.SubjectSection),\r\n CommoditiesPage: telemetryPageName(\"commoditiespage\", TelemetryPageType.SubjectSection),\r\n ChefPage: telemetryPageName(\"chef\", TelemetryPageType.SubjectSection),\r\n NutritionIndexPage: telemetryPageName(\"nutritionindex\", TelemetryPageType.SubjectSection),\r\n FinanceTechnologyPage: telemetryPageName(\"finance-technologypage\", TelemetryPageType.SubjectSection),\r\n MedicalindexPage: telemetryPageName(\"medicalindex\", TelemetryPageType.SubjectSection)\r\n },\r\n SiteSearchPageNames:\r\n {\r\n SearchResultsPage: telemetryPageName(\"searchresultspage\", TelemetryPageType.SiteSearch),\r\n VideoSearchResultsPage: telemetryPageName(\"videosearchresultspage\", TelemetryPageType.SiteSearch),\r\n PartnerVideolistPage: telemetryPageName(\"partnervideolistpage\", TelemetryPageType.SiteSearch),\r\n HomepageBingserpIframepage: telemetryPageName(\"homepage-bingserpiframepage\", TelemetryPageType.SiteSearch),\r\n SitesearchSitesearch: telemetryPageName(\"sitesearch_sitesearch\", TelemetryPageType.SiteSearch),\r\n SearchResults: telemetryPageName(\"search results\", TelemetryPageType.SiteSearch),\r\n SerpPage: telemetryPageName(\"serppage\", TelemetryPageType.SiteSearch),\r\n FindaMoviePage: telemetryPageName(\"findamoviepage\", TelemetryPageType.SiteSearch)\r\n },\r\n SectionFrontPageNames:\r\n {\r\n Competitionhub: telemetryPageName(\"competitionhub\", TelemetryPageType.SectionFront),\r\n Local: telemetryPageName(\"local\", TelemetryPageType.SectionFront),\r\n Stockscreener: telemetryPageName(\"stockscreener\", TelemetryPageType.SectionFront),\r\n Toolslandingpage: telemetryPageName(\"toolslandingpage\", TelemetryPageType.SectionFront),\r\n Showtimes: telemetryPageName(\"showtimes\", TelemetryPageType.SectionFront),\r\n FinanceRealEstatepage: telemetryPageName(\"finance-real-estatepage\", TelemetryPageType.SectionFront),\r\n CookingSchool: telemetryPageName(\"cooking school\", TelemetryPageType.SectionFront),\r\n Allcompetitions: telemetryPageName(\"allcompetitions\", TelemetryPageType.SectionFront),\r\n Newspage: telemetryPageName(\"newspage\", TelemetryPageType.SectionFront),\r\n CocktailHub: telemetryPageName(\"cocktail hub\", TelemetryPageType.SectionFront),\r\n Travelflightsearchhubpage: telemetryPageName(\"travelflightsearchhubpage\", TelemetryPageType.SectionFront),\r\n Hotelshubpage: telemetryPageName(\"hotelshubpage\", TelemetryPageType.SectionFront),\r\n WineHub: telemetryPageName(\"wine hub\", TelemetryPageType.SectionFront),\r\n ChefHub: telemetryPageName(\"chef hub\", TelemetryPageType.SectionFront),\r\n Travelflightstatushubpage: telemetryPageName(\"travelflightstatushubpage\", TelemetryPageType.SectionFront),\r\n HomepageCompetitionhub: telemetryPageName(\"homepage-competitionhub\", TelemetryPageType.SectionFront),\r\n Editorial: telemetryPageName(\"editorial\", TelemetryPageType.SectionFront),\r\n SecfrontHotel: telemetryPageName(\"secfront_hotel\", TelemetryPageType.SectionFront),\r\n SecfrontTNews: telemetryPageName(\"secfront_tnews\", TelemetryPageType.SectionFront)\r\n }\r\n};\r\n\r\n/// Telemetry PageMode \r\nvar TelemetryPageMode = {\r\n Default: 0,\r\n Trial: 1,\r\n Subscription: 2\r\n};\r\n\r\n/// Telemetry Page Pivot \r\nvar TelemetryPagePivot = {\r\n Undefined: \"undefined\",\r\n Office: \"office\",\r\n Apps: \"apps\",\r\n News: \"news\",\r\n Timeline: \"timeline\",\r\n StartMenu: \"startmenu\"\r\n};\r\n\r\n/// Telemetry User Id Type \r\nvar TelemetryUserType = {\r\n Aad: \"aad\",\r\n Msa: \"msa\",\r\n MsaKids: \"msa-kids\",\r\n Local: \"local\"\r\n};\r\n\r\nconst TelemetryActionType = {\r\n Click: \"click\",\r\n Hover: \"mouseenter\",\r\n Submit: \"submit\",\r\n View: \"view\",\r\n RightClick: \"rightclick\"\r\n};\r\n\r\nexport var telemetryDataTypes = {\r\n TelemetryProduct: TelemetryProduct,\r\n TelemetryPageType: TelemetryPageType,\r\n TelemetryType: TelemetryType,\r\n TelemetryContentType: TelemetryContentType,\r\n TelemetryBehaviorType: TelemetryBehaviorType,\r\n ContentPlacedBySource: ContentPlacedBySource,\r\n TelemetryPageConfiguration: TelemetryPageConfiguration,\r\n TelemetryPageName: TelemetryPageName,\r\n TelemetryPageMode: TelemetryPageMode,\r\n TelemetryPagePivot: TelemetryPagePivot,\r\n TelemetryPartnerNamespace: TelemetryPartnerNamespace,\r\n TelemetryUserType: TelemetryUserType,\r\n getTelemetryContentType: getTelemetryContentType,\r\n getTelemetryPageInfo: getTelemetryPageInfo,\r\n validateTelemetryDataType: validateTelemetryDataType,\r\n getTelemetryBehavior: getTelemetryBehavior,\r\n TelemetryActionType: TelemetryActionType\r\n};\r\n\r\n/// \r\n/// This function gets the telemetry page info object from the given pageName string.\r\n/// \r\n/// PageName string\r\n/// The Telemetry Page Name object\r\nfunction getTelemetryPageInfo(pageName) {\r\n if (pageName && PageNamePageTypeMappingList) {\r\n pageName = pageName.toLowerCase();\r\n if (PageNamePageTypeMappingList[pageName] !== undefined) {\r\n return PageNamePageTypeMappingList[pageName];\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/// \r\n/// This function validates and returns the telemetry data type from the given string of the data type.\r\n/// \r\n/// DataType enum e.g. telemetryDataType.TelemetryPageType\r\n/// value of the type to validate\r\n/// The Telemetry Page type\r\nfunction validateTelemetryDataType(type, value) {\r\n if (type && value) {\r\n for (var prop in type) {\r\n if (type.hasOwnProperty(prop)) {\r\n if ((typeof value == \"string\" && type[prop] === value.toLowerCase()) ||\r\n type[prop] === value) {\r\n return type[prop];\r\n }\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/// \r\n/// Private class to define the telemetry Page Name. This class is purposefully not exposed to public.\r\n/// Public should use getTelemetryPageName to get the telemetrypagename object from the given pagename string.\r\n/// All the telemetry page names should be defined as part of this javascript file.\r\n/// \r\n/// PageName string\r\n/// PageType should be of type TelemetryPageType\r\n/// The Telemetry Page Name object\r\nfunction telemetryPageName(pageName, pageType) {\r\n if (pageName) {\r\n var name = pageName.toLowerCase();\r\n var pType = pageType || TelemetryPageType.Unspecified;\r\n var telemetryPageNameObject = { PageName: name, PageType: pType };\r\n PageNamePageTypeMappingList[name] = telemetryPageNameObject;\r\n\r\n return telemetryPageNameObject;\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/// \r\n/// This function gets the telemetry contentType from the given telemetryType.\r\n/// \r\n/// TelemetryType enum value\r\n/// ContentType enum.\r\nfunction getTelemetryContentType(telemetryType) {\r\n if (TelemetryTypeContentTypeMappingList[telemetryType]) {\r\n return TelemetryTypeContentTypeMappingList[telemetryType];\r\n }\r\n}\r\n\r\n/// \r\n/// This function gets the telemetry contentAction from the given telemetryType.\r\n/// \r\n/// TelemetryType enum value\r\n/// ContentAction enum.\r\nfunction getTelemetryBehavior(telemetryType) {\r\n if (TelemetryTypeBehaviorTypeMappingList[telemetryType]) {\r\n return TelemetryTypeBehaviorTypeMappingList[telemetryType];\r\n } else {\r\n return TelemetryBehaviorType.Undefined;\r\n }\r\n}\r\n\r\n/// \r\n/// Private function for initializing mapping between telemetryType and telemetryContentType.\r\n/// This will be removed after telemetryType deprecated.\r\n/// \r\nfunction initTelemetryTypeContentTypeMappingList() {\r\n TelemetryTypeContentTypeMappingList[TelemetryType.AppInstall] = TelemetryContentType.App;\r\n TelemetryTypeContentTypeMappingList[TelemetryType.AppLaunch] = TelemetryContentType.App;\r\n TelemetryTypeContentTypeMappingList[TelemetryType.SponsoredContent] = TelemetryContentType.SponsoredContent;\r\n TelemetryTypeContentTypeMappingList[TelemetryType.StructuredData] = TelemetryContentType.StructuredDataCard;\r\n TelemetryTypeContentTypeMappingList[TelemetryType.AppStore] = TelemetryContentType.AppStorePromo;\r\n}\r\n\r\n/// \r\n/// Private function for initializing mapping between telemetryType and TelemetryBehaviorType.\r\n/// This will be removed after telemetryType deprecated.\r\n/// \r\nfunction initTelemetryTypeBehaviorTypeMappingList() {\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.AppInstall] = TelemetryBehaviorType.Install;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.AppLaunch] = TelemetryBehaviorType.Launch;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Follow] = TelemetryBehaviorType.Follow;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Unfollow] = TelemetryBehaviorType.Unfollow;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Like] = TelemetryBehaviorType.Like;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Dislike] = TelemetryBehaviorType.Dislike;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Unlike] = TelemetryBehaviorType.Unlike;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Undislike] = TelemetryBehaviorType.Undislike;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Mute] = TelemetryBehaviorType.Mute;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Unmute] = TelemetryBehaviorType.Unmute;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.MuteCancel] = TelemetryBehaviorType.MuteCancel;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Manage] = TelemetryBehaviorType.Manage;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Hide] = TelemetryBehaviorType.Hide;\r\n TelemetryTypeBehaviorTypeMappingList[TelemetryType.Unhide] = TelemetryBehaviorType.Unhide;\r\n}\r\n\r\n// Init telemetryType mapping\r\ninitTelemetryTypeContentTypeMappingList();\r\ninitTelemetryTypeBehaviorTypeMappingList();","// © 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 { AudienceModeType } from \"@msnews/experiences-constants\";\r\nimport { DeviceFormFactorType } from \"cms-models-msn/configuration/types/DeviceFormFactorType\";\r\nimport { Environment } from \"./Environment\";\r\nimport { ILocale } from \"cms-models-msn/configuration/ILocale\";\r\nimport { IPcsBrowserScope } from \"../types/PcsBrowsersType\";\r\nimport { MarketProperties } from \"./MarketProperties\";\r\nimport { WebClientData } from \"./WebClientData\";\r\nimport { OperatingSystemType } from \"cms-models-msn/configuration/types/OperatingSystemType\";\r\nimport { UrlUtility } from \"../utilities/UrlUtility\";\r\nimport { localStorage } from \"../utilities/WebStorage\";\r\nimport { tryParseJson } from \"../utilities/Parsing\";\r\nimport { KeyValueArray } from \"../utilities\";\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\n * Flag inidicating if the ID was used in a previous page (stale)\r\n */\r\n previouslyUsed?: boolean\r\n};\r\n\r\n/**\r\n * JSON data contract / interface for settings in the element that are part of the data-client-settings attribute.\r\n */\r\nexport interface IClientSettings {\r\n aid: string,\r\n apptype: string,\r\n apps_locale: string,\r\n audienceMode?: AudienceModeType,\r\n browser?: IPcsBrowserScope,\r\n configRootUrl?: string,\r\n deviceFormFactor?: DeviceFormFactorType,\r\n domain?: string,\r\n env: Environment,\r\n featureFlags?: any,\r\n contentId?: string,\r\n\r\n /** The schema://domain to be used for the main feed URL */\r\n feedBaseDomain?: string,\r\n\r\n categoryKey?: string,\r\n functionalonly_cookie_experience: boolean,\r\n functional_cookie_patterns: string,\r\n functional_cookies: string,\r\n geo_city?: string,\r\n geo_country?: string,\r\n geo_countryname?: string;\r\n geo_lat: string,\r\n geo_long: string,\r\n geo_subdivision?: string,\r\n geo_zip?: string,\r\n locale?: ILocale,\r\n market?: MarketProperties,\r\n os?: OperatingSystemType,\r\n pagetype?: string,\r\n\r\n /** Query params in the format \"?key=value&...\" as observed from the PCS origin server */\r\n queryparams?: string,\r\n\r\n static_page?: string,\r\n verticalKey?: string,\r\n\r\n /** cache busting identifier sent by pcs */\r\n cbid?: string\r\n\r\n /** Peregrine Build version sent by PCS */\r\n v?: string\r\n}\r\n\r\nexport const EnterpiseFlightId = \"prg-enterpriseblended-t\";\r\nexport const OfficeDefaultPivotFlightId = \"prg-officedefault-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: boolean = 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 headElement: any;\r\n private htmlElement: any;\r\n private isAppcache: boolean;\r\n private isEnterprise: boolean;\r\n private isOfficeDefaultPivot: 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 public get MarketDir(): string { return this.marketDir; }\r\n public get CurrentFlights(): string { return this.currentFlights || \"\"; }\r\n public get ClientSettings(): IClientSettings { return this.clientSettings; }\r\n public get EnableCMSPPEConfigs(): boolean { return this.enableCMSPPEConfigs; }\r\n public get UserIsSignedIn(): boolean { return this.userIsSignedIn; }\r\n public get IsPreload(): boolean { return this.isPreload; }\r\n public get IsAppCache(): boolean { return this.isAppcache; }\r\n public get IsEnterprise(): boolean { return this.isEnterprise; }\r\n public get IsOfficeDefaultPivot(): boolean { return this.isOfficeDefaultPivot; }\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 clientSetings.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 get SsoComplete(): boolean { return this.ssoComplete; }\r\n public get AadState(): boolean { return this.aadState; }\r\n\r\n // For testing purposes add setters\r\n public set AnonCookieName(value: string) { this.anonCookieName = value; }\r\n public set LocaleName(value: string) { this.locale = value; }\r\n public set MarketDir(value: string) { this.marketDir = value; }\r\n public set CurrentFlights(value: string) { this.currentFlights = value; }\r\n public set ClientSettings(value: IClientSettings) { this.clientSettings = value; }\r\n public set IsEnterprise(value: boolean) { this.isEnterprise = value; }\r\n public set IsOfficeDefaultPivot(value: boolean) { this.isOfficeDefaultPivot = value; }\r\n public set UserIsSignedIn(value: boolean) { this.userIsSignedIn = value; }\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\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.locationSearch = getLocationSearch();\r\n this.htmlElement = canUseDOM() ? getDocumentElementsByTagName(htmlElementIds.html)[0] : null;\r\n this.headElement = canUseDOM() ? getDocumentElementsByTagName(htmlElementIds.head)[0] : 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.htmlElement.getAttribute(applicationCacheConstants.manifestAttributeName)) {\r\n this.isAppcache = true;\r\n this.initializeFromStorage();\r\n } else if (window && window.navigator && window.navigator.serviceWorker && window.navigator.serviceWorker.controller) {\r\n this.isServiceWorkerCache = true;\r\n this.updateStorageActivityId();\r\n }\r\n\r\n // Below items are common for both scenarios\r\n const language = this.htmlElement.getAttribute(lang);\r\n this.locale = language && language.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 let 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 request\r\n if (UrlUtility.getQueryParameterByName(\"backgroundpreload\", this.locationSearch)) {\r\n this.isPreload = true;\r\n }\r\n\r\n // Determine if we are in Enterprise version or not\r\n this.setIsEnterprise();\r\n\r\n // Determine if Office is the default pivot\r\n this.setIsOfficeDefaultPivot();\r\n }\r\n\r\n /**\r\n * Helper that gets the current's page stored last used activityID (if there is one)\r\n */\r\n public getCurrentPageTypeStoredActivityId(): StoredActivityId {\r\n const storedActivities = localStorage.getItem(applicationCacheConstants.storedLastUsedActivityIdKey) || \"\";\r\n const storedActivityIds = tryParseJson(storedActivities);\r\n\r\n return (storedActivityIds && storedActivityIds[headData.ClientSettings.pagetype]) || null;\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 = tryParseJson(clientData.clientSettings);\r\n\r\n this.setFlights(clientData.clientInfo);\r\n\r\n this.setQueryItemProvidedValues();\r\n\r\n this.locale = clientData.language && clientData.language.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.setIsEnterprise();\r\n\r\n // Determine if Office is the default pivot\r\n this.setIsOfficeDefaultPivot();\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 let 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 let { 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 const storedVersions = localStorage.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 { v: currentDomVersion } = this.clientSettings;\r\n if (this.lastKnownAppVersion !== currentDomVersion) {\r\n storedVersions[pagetype] = currentDomVersion;\r\n localStorage.setObject(CoreLocalStorageKeys.pageVersions, storedVersions);\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, fallbacks to using the DOM element\r\n */\r\n private initializeFromStorage(): void {\r\n const responseFromStorage = localStorage.getItem(applicationCacheConstants.storedHeadDataKey);\r\n const parsedResponseFromStorage = tryParseJson(responseFromStorage);\r\n\r\n // If there is nothing store, then fallback to the DOM\r\n if (!parsedResponseFromStorage) {\r\n return;\r\n }\r\n\r\n const currentPageStoredHeadData = parsedResponseFromStorage[this.clientSettings.pagetype];\r\n\r\n // We don't have an entry for the current page\r\n if (!currentPageStoredHeadData) {\r\n return;\r\n }\r\n\r\n const storedClientSettings = currentPageStoredHeadData[\"clientSettings\"];\r\n const storedFlights = currentPageStoredHeadData[\"info\"];\r\n\r\n // The stored head data is corrupt so we fallback to DOM\r\n if (!storedClientSettings || !storedFlights) {\r\n return;\r\n }\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.v;\r\n this.clientSettings = storedClientSettings;\r\n\r\n // restore the version after the object update\r\n this.clientSettings.v = currentPageVersion;\r\n\r\n this.setFlights(storedFlights);\r\n this.updateStorageActivityId();\r\n }\r\n\r\n /**\r\n * Update the last used activity ID in storage\r\n */\r\n private updateStorageActivityId(): void {\r\n if (!this.clientSettings.aid) {\r\n return;\r\n }\r\n\r\n const existingLastUsedActivityIds = tryParseJson(localStorage.getItem(applicationCacheConstants.storedLastUsedActivityIdKey)) || {};\r\n const currentPageLastUsedActivityId: StoredActivityId = existingLastUsedActivityIds[this.clientSettings.pagetype];\r\n\r\n // If the current pages last used activity ID matches the one for the current page head data\r\n // then we have re-used this. Mark it as such but don't override the timestamp\r\n if (currentPageLastUsedActivityId && (currentPageLastUsedActivityId.id === this.clientSettings.aid)) {\r\n currentPageLastUsedActivityId.previouslyUsed = true;\r\n existingLastUsedActivityIds[this.clientSettings.pagetype] = currentPageLastUsedActivityId;\r\n } else {\r\n // If they don't match then that means we haven't used this so store the new value.\r\n const activityIdToStore: StoredActivityId = { id: this.clientSettings.aid, ts: (new Date()).getTime() };\r\n existingLastUsedActivityIds[this.clientSettings.pagetype] = activityIdToStore;\r\n }\r\n\r\n // Update the last used activity ID in storage\r\n localStorage.setItem(applicationCacheConstants.storedLastUsedActivityIdKey, JSON.stringify(existingLastUsedActivityIds));\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 Enterprise version based on clientSettings and currentFlights\r\n */\r\n private setIsEnterprise(): void {\r\n // We know we are in the Enterpise version of the page when both the audience mode is set to Enterprise\r\n // and the correct flight id is set.\r\n this.IsEnterprise = this.clientSettings &&\r\n this.currentFlights &&\r\n this.currentFlights.includes(EnterpiseFlightId) &&\r\n this.clientSettings.audienceMode === AudienceModeType.Enterprise;\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 * Determines if Office is the default pivot based on flight id.\r\n */\r\n private setIsOfficeDefaultPivot(): void {\r\n // There is work scheduled to have \"sticky\" pivots stored in some form of local storage which will\r\n // replace this check. Until then, the only way to know if Office is the default pivot is to check\r\n // for this flight id\r\n this.IsOfficeDefaultPivot = this.currentFlights && this.currentFlights.includes(OfficeDefaultPivotFlightId);\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 { 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 { IActionDispatchCancellationToken } from \"./IActionDispatchCancellationToken\";\r\n\r\n/**\r\n * Cancellation Token class.\r\n * @class\r\n */\r\nexport class ActionDispatchCancellationToken implements IActionDispatchCancellationToken {\r\n /** Backing variable for the isCancellationRequested property\r\n * @type {boolean}\r\n */\r\n private isCancelled: boolean;\r\n\r\n /**\r\n * Creates an instance of the `ActionDispatchCancellationToken` class.\r\n * @constructor\r\n */\r\n constructor() {\r\n this.isCancelled = false;\r\n }\r\n\r\n /**\r\n * Helper method to cater for a null or undefined token.\r\n * A null or undefined token means cancellation cannot be requested, so it is equivalent to false\r\n * @method\r\n * @param {IActionDispatchCancellationToken} cancellationToken Optional cancellation token to be checked for undefined, null or cancellation requested\r\n * @returns {boolean}\r\n */\r\n public static isCancellationRequested(cancellationToken?: IActionDispatchCancellationToken): boolean {\r\n return !(cancellationToken === undefined || cancellationToken === null || !cancellationToken.isCancellationRequested);\r\n }\r\n\r\n /** The cancel method.\r\n * @method\r\n */\r\n public cancel(): void {\r\n this.isCancelled = true;\r\n }\r\n\r\n /** getter for the isCancellationRequested property\r\n * @property\r\n * @returns {boolean} Whether cancellation has been requested or not.\r\n */\r\n public get isCancellationRequested(): boolean {\r\n return this.isCancelled;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { dispatchAction, getActionPayload } from \"./ActionDispatchHelper\";\r\n\r\nimport { ActionDispatchCancellationToken } from \"./ActionDispatchCancellationToken\";\r\nimport { ConnectorConstants } from \"../constants/ConnectorConstants\";\r\nimport { IActionDispatchCancellationToken } from \"./IActionDispatchCancellationToken\";\r\nimport { IActionPayload } from \"./IActionPayload\";\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 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 {IActionDispatchCancellationToken} cancellationToken Optional cancellation token, which can be used to cancel an in flight action\r\n */\r\n constructor(\r\n protected type: string,\r\n private observers: Observer[],\r\n private cancellationToken?: IActionDispatchCancellationToken) { }\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 (): any {\r\n if (!ActionDispatchCancellationToken.isCancellationRequested(this.cancellationToken)) {\r\n\r\n const perfTimeline = this.tryGetPerfTimeline();\r\n let actionEndMeasure = perfTimeline && perfTimeline.startMeasure(\"action\", this.type).endMeasure;\r\n\r\n const { payload, dispatchResult } = this.getDispatchResult(Array.prototype.slice.call(arguments));\r\n\r\n // Call any observers\r\n this.observers.forEach(o => {\r\n try {\r\n // Call the observer\r\n o.observer(payload);\r\n } catch (error) {\r\n console.log(`Error calling observer: ${JSON.stringify(o)}, with error: ${error}`);\r\n }\r\n\r\n // If there is a connector, dispatch an action to it, forcing it to re-render\r\n if (o.connector) {\r\n let renderActionPayload = getActionPayload(o.connector, ConnectorConstants.renderAction, [], undefined);\r\n dispatchAction(o.connector, 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 dispatchResult;\r\n } else {\r\n // Don't dispatch the action because it has been canceled\r\n return;\r\n }\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 { IActionDispatchCancellationToken } from \"./IActionDispatchCancellationToken\";\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 * @param {IActionDispatchCancellationToken} cancellationToken Optional cancellation token, which can be used to cancel an in flight action\r\n */\r\n constructor(\r\n type: string,\r\n observers: Observer[],\r\n private connector: IDataConnector,\r\n cancellationToken?: IActionDispatchCancellationToken) {\r\n\r\n super(type, observers, cancellationToken);\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 let payload = getActionPayload(this.connector, this.type, args, undefined);\r\n let 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 { IActionDispatchCancellationToken } from \"./IActionDispatchCancellationToken\";\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 * @param {IActionDispatchCancellationToken} cancellationToken Optional cancellation token, which can be used to cancel an in flight action.\r\n */\r\n constructor(\r\n type: string,\r\n observers: Observer[],\r\n private experienceInstanceId?: string,\r\n cancellationToken?: IActionDispatchCancellationToken) {\r\n\r\n super(type, observers, cancellationToken);\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 let payload = getActionPayload(undefined, this.type, args, this.experienceInstanceId);\r\n let 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 { IActionDispatchCancellationToken } from \"./IActionDispatchCancellationToken\";\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 * @param {IActionDispatchCancellationToken} cancellationToken If passed in and cancellation has been requested, then nothing is dispatched.\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, cancellationToken?: IActionDispatchCancellationToken): 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, cancellationToken);\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 * @param {IActionDispatchCancellationToken} cancellationToken If passed in and cancellation has been requested, then nothing is dispatched.\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, cancellationToken?: IActionDispatchCancellationToken): GlobalActionSender {\r\n return new GlobalActionSender(this.type, this.observers, experienceInstanceId, cancellationToken);\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 */\r\n public registerObserver(observer: ActionObserver, connector?: IDataConnector): void {\r\n this.observers.push({ observer: observer, connector: connector });\r\n }\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 * localStorage key prefix for render cache object\r\n */\r\nexport const storagePrefix = `lastKnown_`;\r\n\r\n/**\r\n * localStorage key prefix for render cache expiration timestamp\r\n */\r\nexport const expirationPrefix = `timestamp_`;\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\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 * River Render Cache ClassName\r\n */\r\nexport const riverRcClassName = \"river-rc\";","// © Microsoft Corporation. All rights reserved.\r\n\r\n// Defines constants used in telemetry beacons\r\n\r\nexport default {\r\n // logSamplingRate was configured via %app_error_log_sampling_rate% in Prime. Hardcoding \"0\" here.\r\n logSamplingRate: \"0\",\r\n FireTelemetry: \"fireTelemetryBeacon\",\r\n GET: \"GET\",\r\n POST: \"POST\",\r\n Ctag: \"ctag\",\r\n Comscore: \"scorecard\",\r\n OTF: \"udc\",\r\n Exp: \"EX:\",\r\n ResetIdx: \"resetTelemetryEventIndex\"\r\n};\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: RegExp = /[^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: boolean = false): KeyValueArray {\r\n if (!isString(url)) {\r\n return null;\r\n }\r\n\r\n let 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: boolean = false): KeyValueArray {\r\n let 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 let queryArray = queryString.split(\"&\");\r\n for (let ndx = 0; ndx < queryArray.length; ndx++) {\r\n let 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 let newParam: KeyValuePair = { key: queryKey, value: queryValue };\r\n let 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 * @returns {KeyValueArray} - the parsed query key/value collection\r\n */\r\n export function getParamsWithItems(queryString: string): KeyValueArray {\r\n let 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 let queryArray = queryString.split(\"&\");\r\n for (let ndx = 0; ndx < queryArray.length; ndx++) {\r\n let parts = queryArray[ndx].split(\"=\");\r\n let queryKey = parts[0];\r\n let queryValue = parts[1];\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 let 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 let newParam: KeyValuePair = { key: queryKey, value: queryValue };\r\n let 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 * Utility method to extract query string param in url.\r\n *\r\n * @export\r\n * @param {string} name - query param name\r\n * @returns {string} - query param value\r\n */\r\n export function getQueryParameterByName(name: string, href: string): string {\r\n\r\n // TODO: exposing this method for accessing a single parameter can be used\r\n // extremely inefficiently (for example if invoked multiple times to get parameters\r\n // from a single URL). Instead we should deprecate this and export getParamsObj\r\n // and use that throughout.\r\n\r\n let value = getParamsObj(href)[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 function getParamsObj(url: string): StringMap {\r\n let paramsObj = {};\r\n let 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/// Adds basic dom manipulation functions to an object defined as \"dom\"\r\n\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\nvar doc = canUseDOM() ? document : null;\r\nvar otherWhitespaceRegex = /[\\n\\t]/g;\r\nvar trimRegex = /(^\\s+)|(\\s+$)/mg;\r\n\r\n// curly brace needs to be on the return line otherwise build with throw an error\r\nexport default {\r\n attr: function (elem, attr) {\r\n // getAttribute(attr, 2) causes IE to only report correct values for href.\r\n // IE reports href values for IMG tags without an href property\r\n // see http://reference.sitepoint.com/javascript/Element/getAttribute\r\n // see bug #1131443\r\n return elem && (elem.getAttribute ? elem.getAttribute(attr, 2) : elem[attr]) || \"\";\r\n },\r\n name: function (elem) {\r\n return elem && elem.nodeName || \"\";\r\n },\r\n text: function (elem) {\r\n return (elem && (elem.textContent || elem.innerText) || \"\").replace(trimRegex, \"\");\r\n },\r\n children: function (elem) {\r\n return elem && elem.children || [];\r\n },\r\n parent: function (elem) {\r\n return elem && elem.parentNode;\r\n },\r\n getElementsByTagName: function (name) {\r\n return doc ? doc.getElementsByTagName(name) : [];\r\n },\r\n create: function (name) {\r\n return doc ? doc.createElement(name) : null;\r\n },\r\n containsClass: function (element, className) {\r\n /// \r\n /// Looks for the className in element and returns true/false based on result.\r\n /// \r\n /// element - Element where className to be searched for.\r\n /// className - Class name to be looked for.\r\n /// \r\n /// \r\n return element && ((\" \" + (element.className || element.getAttribute(\"class\")) + \" \")\r\n .replace(otherWhitespaceRegex, \" \").indexOf(\" \" + className + \" \") > -1);\r\n },\r\n getTarget: function (event) {\r\n return event && (event.customTarget || event.target || event.srcElement) || doc;\r\n }\r\n};\r\n","// © 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: string = \"_@STATE@_\";\r\n\r\n export const renderAction: string = \"@@connector-view/RENDER\";\r\n\r\n export const dataConnectorMergeInitAction: string = \"@@data-connector/MERGE-INIT\";\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n// Usage:\r\n// pass data to any callback that has subscribed to the event\r\n// mediator.pub(event, data);\r\n//\r\n// call the callback whenever this event is published\r\n// mediator.sub(event, callback)\r\n//\r\n// pass data to any callback that has subscribed to this event and channel\r\n// mediator.pubChannel(event, channel, data);\r\n//\r\n// call the callback whenever this event is published to this channel\r\n// mediator.subChannel(event, channel, callback)\r\n//\r\n// Think of pub/sub as using their own channel, useful for 1 ofs or app communication.\r\n// Channels are useful when multiple copies of the same widget want to communicate.\r\n\r\n/// Constructor for mediator object\r\n/// Mediator object\r\n\r\n/// Default publish subscribe where all non-channel-specific events are managed\r\n// @ts-ignore\r\nvar defaultPubSub = new PublishSubscribe();\r\nvar channels = {};\r\nexport default {\r\n pub: defaultPubSub.pub,\r\n sub: defaultPubSub.sub,\r\n unsub: defaultPubSub.unsub,\r\n pubChannel: function (event, channel, data) {\r\n /// Publishes event to channel subscribers only\r\n /// Event to subscribe to\r\n /// Name of the channel\r\n /// Data to pass to the callback\r\n getChannel(channel).pub(event, data);\r\n },\r\n subChannel: function (event, channel, callback) {\r\n /// Subscribes to event published on a specific channel\r\n /// Event to subscribe to\r\n /// Name of the channel\r\n /// Function to call when the event is fired\r\n getChannel(channel).sub(event, callback);\r\n },\r\n unsubChannel: function (event, channel, callback) {\r\n /// Unsubscribe from an event published on a specific channel\r\n /// Event to subscribe to\r\n /// Name of the channel\r\n /// Function to call when the event is fired\r\n getChannel(channel).unsub(event, callback);\r\n }\r\n};\r\n\r\nfunction getChannel(channel) {\r\n /// Gets a channel from the collection of mediator channels\r\n /// ID of the channel\r\n /// Channel requested or new channel if not exist\r\n if (!channels[channel]) {\r\n // @ts-ignore\r\n channels[channel] = new PublishSubscribe();\r\n }\r\n return channels[channel];\r\n}\r\n\r\nfunction PublishSubscribe() {\r\n /// PublishSubscribe factory\r\n /// PubSub Object\r\n var pubMap = {};\r\n return {\r\n pub: function (event, data) {\r\n /// Passes data to any callback that has subscribed to the event\r\n /// Event being published\r\n /// Data to pass to the callback\r\n var callbacks = pubMap[event];\r\n\r\n if (callbacks) {\r\n for (var ndx = 0; ndx < callbacks.length; ndx++) {\r\n callbacks[ndx](data);\r\n }\r\n }\r\n },\r\n sub: function (event, callback) {\r\n /// Subscribes the callback to this event\r\n /// Event to subscribe to\r\n /// Function to call when the event is fired\r\n if (typeof callback == \"function\") {\r\n var listeners = pubMap[event];\r\n\r\n if (!listeners) {\r\n listeners = [];\r\n pubMap[event] = listeners;\r\n }\r\n listeners.push(callback);\r\n }\r\n },\r\n unsub: function (event, callback) {\r\n /// Unsubscribes a callback from an event\r\n /// Event to unsubscribe from\r\n /// Function to unsubscribe from the event\r\n var listeners = pubMap[event];\r\n\r\n if (listeners) {\r\n for (var ndx = 0; ndx < listeners.length; ndx++) {\r\n if (listeners[ndx] === callback) {\r\n listeners.splice(ndx--, 1);\r\n }\r\n }\r\n }\r\n }\r\n };\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 * Width of client browser window.\r\n */\r\n innerWidth: number;\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: number;\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 width of browser from the original request.\r\n */\r\n public readonly innerWidth: number;\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: number;\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.innerWidth = data.innerWidth;\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 }\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 innerWidth: 1024,\r\n innerHeight: 768,\r\n devicePixelRatio: 1,\r\n canUseCssGrid: false,\r\n requestId: 0\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 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\nimport { AppError, AppErrorPropertyBag, Severity } from \"./AppErrorTracker\";\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// Webpack defines the BUILD_NUMBER of client code build number.\r\ndeclare var BUILD_NUMBER: string;\r\n\r\n/**\r\n * Get build number from web pack. If not present, return empty\r\n */\r\nconst pb: AppErrorPropertyBag = {\r\n build: typeof BUILD_NUMBER === \"undefined\"\r\n ? \"\"\r\n : BUILD_NUMBER\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: string = \"TopSitesEdge.connector.tsx\";\r\nconst TopSitesEdgeStorageFileName: string = \"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: string = \"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: string = \"OneServiceCardProvider.ts\";\r\n\r\nexport const OneServiceCardProviderAppErrors = {\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: string = \"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\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 UnableToSelectSectionTemplateForGivenChildExperiences: {\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 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\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 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\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\nexport const WeatherDataAppErrors = {\r\n /** Failed to fetch weather summary */\r\n WeatherSummaryFetchError: {\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\n WeatherLocationEmpty: {\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\n WeatherPDPReadFailed: {\r\n id: 8102,\r\n source: WeatherDataConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Not able to write home location to PDP */\r\n WeatherPDPHomeLocationWriteFailed: {\r\n id: 8103,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Not able to write display Unit to PDP */\r\n WeatherPDPDisplayUnitWriteFailed: {\r\n id: 8104,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Not able to localize Location */\r\n WeatherLocalizeLocationFailed: {\r\n id: 8105,\r\n source: WeatherDataConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst WeatherCardConnectorSourceFile = \"WeatherCard.connector.ts\";\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\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\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: \"MoneyPdpServiceClient.ts\",\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: \"MoneyPdpServiceClient.ts\",\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: \"MoneyQuotesServiceClient.ts\",\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: \"MoneyQuotesServiceClient.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const TrendingNewsErrors = {\r\n /** Failed to fetch the trending news stories */\r\n DataFetchError: {\r\n id: 8140,\r\n source: \"TrendingNews.connector.ts\",\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: \"TrendingNews.connector.ts\",\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};\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: string = \"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: \"page.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst irisImageHotspotsFile = \"ImageHotspots.manager.ts\";\r\nexport const BackgroundImageAppErrors = {\r\n /** The Bing Image of the Day failed to load properly */\r\n BingIOTDFailedToLoad: {\r\n id: 8180,\r\n source: \"BingImageOfTheDayProvider.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Error when Iris fails to return Hotspots Data to the client. */\r\n FailedHotspotsDataDelivery: {\r\n id: 8181,\r\n source: irisImageHotspotsFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Hotspots data that was returned failed to validate. */\r\n IncompleteHotspotsContract: {\r\n id: 8182,\r\n source: irisImageHotspotsFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Hotspots data found for the off page navigation failed inspection. */\r\n InvalidOffPageNavCTA: {\r\n id: 8183,\r\n source: irisImageHotspotsFile,\r\n severity,\r\n pb\r\n }\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\nexport const EdgePageSettingsAppErrors = {\r\n ServiceUiError: {\r\n id: 8192,\r\n source: \"EdgeSettingsProvider.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\nconst ShowFeedConnectorFileName = \"ShowFeed.connector.ts\";\r\n\r\nexport const ShowFeedAppErrors = {\r\n MissingPageSettings: {\r\n id: 8199,\r\n source: ShowFeedConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n ExpectedDataMissing: {\r\n id: 8198,\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 source: InfopaneSourceFile,\r\n id: 8201,\r\n severity,\r\n pb\r\n },\r\n InvalidConfig: {\r\n source: InfopaneSourceFile,\r\n id: 8202,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const FeedbackDialogAppErrors = {\r\n /** Failed to get feedback data connector */\r\n FailedToGetFeedbackDataConnector: {\r\n id: 8211,\r\n source: \"FeedbackDialog.connector.ts\",\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\nexport const OneFooterErrors = {\r\n InvalidConfig: {\r\n source: \"OneFooter.connector.ts\",\r\n id: 8220,\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: \"OneFooter.connector.ts\",\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 TabbedInfopaneSourceFile = \"TabbedInfopane.connector.ts\";\r\nexport const TabbedInfopaneErrors = {\r\n InitializeError: {\r\n source: TabbedInfopaneSourceFile,\r\n id: 8250,\r\n severity,\r\n pb\r\n },\r\n InvalidConfig: {\r\n source: TabbedInfopaneSourceFile,\r\n id: 8251,\r\n severity,\r\n pb\r\n },\r\n ChildLoadError: {\r\n source: TabbedInfopaneSourceFile,\r\n id: 8252,\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 source: TabbedInfopaneTabPreviewSourceFile,\r\n id: 8270,\r\n severity,\r\n pb\r\n },\r\n InvalidConfig: {\r\n source: TabbedInfopaneTabPreviewSourceFile,\r\n id: 8271,\r\n severity,\r\n pb\r\n },\r\n LoadError: {\r\n source: TabbedInfopaneTabPreviewSourceFile,\r\n id: 8272,\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\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: CoachmarkSourceFile,\r\n severity,\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};\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: 8324,\r\n source: CoachmarkPayloadSourceFile,\r\n severity,\r\n pb\r\n },\r\n IrisDataConnectorUndefined: {\r\n id: 8325,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n NoSurfaceFoundForCampaign: {\r\n id: 8326,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n ErrorFoundForSurface: {\r\n id: 8327,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n TelemetryInfoUndefined: {\r\n id: 8328,\r\n source: CoachmarkDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n EventTypeUndefined: {\r\n id: 8329,\r\n source: CoachmarkDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n IrisActionUndefined: {\r\n id: 8330,\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 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\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 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\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 recieved by event listener not from expected origin */\r\n IFrameUnallowedOriginMessage: {\r\n id: 8820,\r\n source: IFrameSourceFile,\r\n severity,\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\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: \"page.ts\",\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 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/RefreshHeadData.ts\";\r\nconst edgeAppCacheHelperFile = \"Appcache/EdgeApplicationCacheHelper.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,\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,\r\n pb\r\n },\r\n FailedToReadFromStorage: {\r\n id: 9315,\r\n source: refreshHeadDataFile,\r\n severity,\r\n pb\r\n },\r\n FailedToWriteToStorage: {\r\n id: 9316,\r\n source: refreshHeadDataFile,\r\n severity,\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};\r\n\r\nconst RewardsDataConnectorSourceFile = \"RewardsData.connector.ts\";\r\nconst RewardsPayloadSourceFile = \"RewardsPayload.ts\";\r\nconst RewardsServiceClientSourceFile = \"RewardsServiceClient.ts\";\r\nexport const RewardsDataAppErrors = {\r\n InvalidCreative: {\r\n id: 9420,\r\n source: RewardsPayloadSourceFile,\r\n severity,\r\n pb\r\n },\r\n IrisDataConnectorUndefined: {\r\n id: 9421,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n NoSurfaceFoundForCampaign: {\r\n id: 9422,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n ErrorFoundForSurface: {\r\n id: 9423,\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 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: string = \"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 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\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 EdgeHeaderConnectorFileName: string = \"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: string = \"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: string = \"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 InterestsConnectorFileName: string = \"Interests.connector.ts\";\r\nconst TopicCacheFileName: string = \"TopicCache.ts\";\r\nconst XfeedConnectorFileName: string = \"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/** {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.ts\",\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.ts\",\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.ts\",\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.ts\",\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.ts\",\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.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/** App errors for {ExperienceLoader} */\r\nexport const ExperienceLoaderAppErrors = {\r\n\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/** 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 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\nconst PollsCardConnectorSourceFile = \"PollsCard.connector.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\nexport const EdgeNextAppErrors = {\r\n /**\r\n * Error during app initialization for EdgeNext page experience.\r\n */\r\n EdgeNextErrorPage: {\r\n id: 19000,\r\n source: \"page.ts\",\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: \"page.ts\",\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: \"page.ts\",\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: \"page.ts\",\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: \"page.ts\",\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 EdgeNextLocalNTPPageShownJSSMismatchExceptionError: {\r\n id: 19005,\r\n source: \"page.ts\",\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: \"page.ts\",\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\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 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 /** 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: 20500,\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: 20501,\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: 20502,\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: 20503,\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: 20504,\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: 20505,\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: 20506,\r\n source: DisplayAdsConnectorSourceFile,\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 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/** 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\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 failed.\r\n */\r\n CrsFetchFailed: {\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.HighImpact,\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\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: \"page.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst EdgePageFileName: string = \"Edge/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/** 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 Edge page experience.\r\n */\r\n EstablishSignedInState: {\r\n id: 1405,// need to mimic the prime one since telemetry cooking logic looks for this\r\n source: \"\",\r\n severity: Severity.NoAlert,\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\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\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: string = \"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: Severity.NoAlert,\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: Severity.NoAlert,\r\n pb\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/**\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\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 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 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\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/** 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\nexport const ElectionRegionNewsAppErrors = {\r\n TopicByNameFetchFailed: {\r\n id: 28780,\r\n source: \"ElectionRegionNews.connector.ts\",\r\n severity,\r\n pb\r\n }\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 EntryPointConnector = \"EntryPointConnector\";\r\nexport const EntryPointConnectorEvents = {\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\n WaitForAllPerfMarkersTimeoutInvoked: {\r\n id: 29100,\r\n source: EntryPointConnector,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst FirstPartyEntryPointFileName: string = \"FirstParty.connector.ts\";\r\nconst FirstPartyPageFileName: string = \"page.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: FirstPartyPageFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst HomePageEntryPointFileName: string = \"HomePage.connector.ts\";\r\nconst HomePageFileName: string = \"page.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: HomePageFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WindowsEntryPointFileName: string = \"Windows.connector.ts\";\r\nconst WindowsPageFileName: string = \"page.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: WindowsPageFileName,\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: WindowsPageFileName,\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: WindowsPageFileName,\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\nconst irisArcCallerFileName = \"Iris.arcCaller.ts\";\r\nconst irisArcParserFileName = \"Iris.arcParser.ts\";\r\nconst irisMasterFileName = \"Iris.master.ts\";\r\nexport const IrisErrors = {\r\n /** Generic Unknown related to the Iris system. Investigate. */\r\n IrisUnknown: {\r\n id: 35000,\r\n source: \"Iris\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** The query parameters presented to the arc caller were found to be invalid. */\r\n InvalidQParams: {\r\n id: 35001,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n },\r\n ArcCallFailed: {\r\n id: 35002,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n },\r\n ArcResponseNotOk: {\r\n id: 35003,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n },\r\n ArcResponseUnparsable: {\r\n id: 35004,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n },\r\n MissingAppEnv: {\r\n id: 35005,\r\n source: irisArcCallerFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n UnknownIrisErrorFound: {\r\n id: 35006,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n },\r\n TimeoutIrisErrorFound: {\r\n id: 35007,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n },\r\n TemplateIrisErrorFound: {\r\n id: 35008,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n },\r\n ClientErrorIrisErrorFound: {\r\n id: 35009,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n },\r\n DSourceIrisErrorFound: {\r\n id: 35010,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n },\r\n ActionCallFailure: {\r\n id: 35011,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n },\r\n ActionFetchFailure: {\r\n id: 35012,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n },\r\n ActionResponseFailure: {\r\n id: 35013,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n },\r\n UncaughtErrorDetected: {\r\n id: 35014,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n },\r\n UnconvertableCreative: {\r\n id: 35015,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n },\r\n InvalidResponseFormat: {\r\n id: 35016,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n },\r\n AbortErrorDiscovered: {\r\n id: 35017,\r\n source: irisMasterFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n UnparsableSingleResponseJSON: {\r\n id: 35018,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n }\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\nexport const IrisDataConnectorErrors = {\r\n SubscriberNotFound: {\r\n id: 35117,\r\n source: SubscriberValidatorSourceFile,\r\n severity,\r\n pb\r\n },\r\n CreativeCountNegativeOrZero: {\r\n id: 35118,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ErrorFetchingSurfaceInfo: {\r\n id: 35119,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ErrorFoundForSurface: {\r\n id: 35120,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n SubscriberNotFoundInIrisPlacementDictionary: {\r\n id: 35121,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents AccessTokens related App errors */\r\nconst AccessTokensSourceFile = \"AccessTokens.ts\";\r\nconst PivotContentErrorPlaceholderFile = \"AadErrorPlaceholder.tsx\";\r\nexport const AccessTokensErrors = {\r\n EdgeChromiumAPIsNotAvailable: {\r\n id: 35200,\r\n source: AccessTokensSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n AcquireAccessTokenFailed: {\r\n id: 35201,\r\n source: AccessTokensSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n AcquireAccessTokenFailedForPivotContent: {\r\n id: 35202,\r\n source: PivotContentErrorPlaceholderFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\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,\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\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: string = \"SuperAppPage.connector.ts\";\r\n\r\nexport const SuperAppEntryPointAppErrors = {\r\n /**\r\n * Super app river 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 the APP_ANON cookie on super app page load\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 33001,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n }\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/** 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 let n = parseInt(value);\r\n return isNaN(n) ? defaultValue : n;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AccountType, AppType, AudienceModeType, AuthCookieName } from \"@msnews/experiences-constants\";\r\nimport { EnterpriseOneServiceApi, appAnonCookieExistsCookieName, childCookieName, rootElementId, serviceUrl, telemetryId, trackPageProduct, trackPageType } from \"../constants\";\r\nimport { Environment, getEnvironmentFromString } from \"./Environment\";\r\nimport { HostPage, IHostPage } from \"./HostPage\";\r\nimport { canUseDOM, getDocumentElementById, getLocationHostname, getLocationHref, getLocationOrigin, getLocationSearch } from \"@msnews/isomorphic-util\";\r\nimport { getCookie, getMuidCookie } from \"../utilities/CookieUtility\";\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 { logger } from \"@msnews/diagnostics\";\r\n\r\n/**\r\n * chrome\r\n * The chrome API is not defined in Typescript\r\n */\r\ndeclare global {\r\n // tslint:disable-next-line: completed-docs\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\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 /**\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 * The account type of the page user\r\n * Currently this is only implemented for the Anaheim New Tab Pages\r\n */\r\n private accountType: AccountType;\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 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 assetsHost: string;\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 disableContentListCache: boolean;\r\n private disableContentListCacheIDBRead: boolean;\r\n private sendFeedCallActivityIdInHeader: boolean;\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 /**\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\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 get CurrentMarket(): Market { return this.currentMarket; }\r\n public get Environment(): Environment { return this.environment; }\r\n public get AssetsHost(): string { return this.assetsHost; }\r\n public get HostPage(): IHostPage { return this.hostPage; }\r\n public get AppType(): string { return this.appType; }\r\n public get AuthCookieName(): AuthCookieName { return this.authCookieName; }\r\n public get AccountType(): AccountType { return this.accountType; }\r\n public get AccountInfoPromise(): Promise { return this.accountInfoPromise; }\r\n public get BuildVersion(): string { return this.buildVersion; }\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 /**\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 const url = new URL(\"\", EnterpriseOneServiceApi);\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 public get IsFrePage(): boolean { return this.isFrePage; }\r\n\r\n public get RootTelemetryId(): number { return this.rootTelemetryId; }\r\n public get TrackInfo(): ITrackInfo { return this.trackInfo; }\r\n public get UserId(): string { return this.getUserMuid() || this.userId; }\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 in Resolver.ts\r\n */\r\n public get EnableConfigService(): boolean { return this.enableConfigService; }\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 * This is the switch to turn on/off content list caching in core/cache/ContentPreview.ts\r\n */\r\n public get DisableContentListCache(): boolean {\r\n return this.disableContentListCache;\r\n }\r\n\r\n /**\r\n * This is the switch to turn off hydrating content list cache from IndexedDB.\r\n * Default is false\r\n */\r\n public get DisableContentListCacheIDBRead(): boolean {\r\n const queryParamOverride = UrlUtility.getQueryParameterByName(\"disableContentListCacheIDBRead\", getLocationSearch());\r\n\r\n if (queryParamOverride) {\r\n return queryParamOverride === \"true\";\r\n }\r\n\r\n return this.disableContentListCacheIDBRead;\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 * Returns the country code. For example \"br\"\r\n */\r\n public get CountryCode(): string { return this.countryCode; }\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 public set ActivityId(value: string) { this.activityId = value; }\r\n public set CountryCode(value: string) { this.countryCode = value; }\r\n public set CurrentMarket(value: Market) { this.currentMarket = value; }\r\n public set CurrentRequestTargetScope(value: PageRequestTargetScope) { this.currentRequestTargetScope = value; }\r\n public set Environment(value: Environment) { this.environment = value; }\r\n public set HostPage(value: IHostPage) { this.hostPage = value; }\r\n public set RootTelemetryId(value: number) { this.rootTelemetryId = value; }\r\n public set TrackInfo(value: ITrackInfo) { this.trackInfo = value; }\r\n public set UserId(value: string) { this.userId = value; }\r\n public set AuthCookieName(value: AuthCookieName) { this.authCookieName = value; }\r\n public set AccountType(value: AccountType) { this.accountType = value; }\r\n public set AccountInfoPromise(value: Promise) { this.accountInfoPromise = value; }\r\n\r\n /**\r\n * Initialize the AppEnvironment singleton instance.\r\n * @param _serviceUrl Optional URL to initialize the ServiceUrlBase.\r\n * @param _configServiceUrlBase ConfigServiceUrlBase provided during server side rendering this is the ServiceFabric ClusterRegionUrl.\r\n */\r\n private constructor(_serviceUrl: URL, _configServiceUrlBase: string) {\r\n this.initializeAppEnvironment(_serviceUrl, _configServiceUrlBase);\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, configServiceUrlBase: string = null): AppEnvironment {\r\n return AppEnvironment._instance || (AppEnvironment._instance = new AppEnvironment(serviceUrl, configServiceUrlBase));\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 configServiceUrlBase Config service url to initialize to.\r\n * @returns {AppEnvironment}\r\n */\r\n public static resetInstance(serviceUrl: URL = null, configServiceUrlBase: string = null): AppEnvironment {\r\n AppEnvironment._instance = new AppEnvironment(serviceUrl, configServiceUrlBase);\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, configServiceUrlBase?: string): void {\r\n\r\n let environmentFromHeadData: Environment = null;\r\n const clientSettings = headData && headData.ClientSettings;\r\n\r\n if (clientSettings) {\r\n this.activityId = this.tryReformatGuid(clientSettings.aid);\r\n this.buildVersion = clientSettings.v;\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.env);\r\n\r\n this.setAccountType();\r\n this.setAccountInfoPromise();\r\n this.appType = clientSettings.apptype || \"\";\r\n this.authCookieName = this.getAuthCookieName();\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 this.disableContentListCache =\r\n this.featureFlags && this.featureFlags.disableContentListCache\r\n ? this.featureFlags.disableContentListCache === \"true\"\r\n : false;\r\n\r\n this.disableContentListCacheIDBRead = this.featureFlags && this.featureFlags.disableContentListCacheIDBRead\r\n ? this.featureFlags.disableContentListCacheIDBRead === \"true\"\r\n : false;\r\n\r\n // Hardcode flight details for experimentation sake\r\n // Use feature flag as a switch to disable the feature, since we may not be able to stop the flight itself (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;\r\n\r\n this.cacheBustingIdentifier = clientSettings.cbid;\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.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 this.serviceUrlBase = _serviceUrl || (rootElement && rootElement.getAttribute(serviceUrl) && new URL(\"\", rootElement.getAttribute(serviceUrl))) || new URL(\"\", \"https://assets.msn.com/service/\");\r\n\r\n // If PCS sent the feed base domain, use it for the feed URL base\r\n // or else default to host page rooted URL.\r\n this.feedServiceUrlBase = new URL(\"./service/\", clientSettings && clientSettings.feedBaseDomain ? clientSettings.feedBaseDomain : locationOrigin);\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 // Find the host for the Akamai assets store.\r\n this.assetsHost = getLocationHostname().endsWith(\".cn\") ? \"assets.msn.cn\" : \"assets.msn.com\";\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.contentServiceUrlBase = new URL(\"\", \"https://assets.msn.com/content/\");\r\n\r\n this.currentContentLinkHost = this.createContentLinkHost();\r\n\r\n this.setTargetScope();\r\n\r\n this.isMultiConfigRetrievalEnabled = this.useMultiConfigsRetrieval();\r\n\r\n const baseUrl = this.getConfigServiceBaseUrl(this.isMultiConfigRetrievalEnabled, configServiceUrlBase);\r\n this.configServiceBaseUrl = baseUrl ? new URL(\"\", baseUrl) : null;\r\n\r\n this.environmentConfigUrl = new URL(\"\", \"https://assets.msn.com/config/v1/\");\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\r\n this.showMnsCreatorDashboard = UrlUtility.getQueryParameterByName(\"mnsDash\", locationHref) != null;\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 configServiceUrlBase externally configured config service url (from SSR environment)\r\n * @returns {string} - config service base url.\r\n */\r\n private getConfigServiceBaseUrl(isMultiConfigRetrievalEnabled: boolean = true, configServiceUrlBase?: string): string {\r\n const relativePath = `/resolver/api/resolve/${isMultiConfigRetrievalEnabled ? `v2/` : ``}configindex/`;\r\n\r\n if (configServiceUrlBase) {\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 configServiceUrlBase + relativePath;\r\n } else if (process.env.WEBPACK_DEV_SERVER || this.environment === Environment.int) {\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 * 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.FirstParty:\r\n case AppType.Hub:\r\n case AppType.MicrosoftNews:\r\n case AppType.Views:\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 AccountType for the current user\r\n */\r\n private setAccountType(): void {\r\n // TODO: Currently signed in status is not available on the server side\r\n // Tracking work item: https://dev.azure.com/microsoft/OS/_workitems/edit/24489062\r\n if (!canUseDOM() || !window.chrome || !window.chrome.authPrivate || !window.chrome.authPrivate.getPrimaryAccountInfo) {\r\n this.AccountType = AccountType.SignedOut;\r\n return;\r\n }\r\n window.chrome.authPrivate.getPrimaryAccountInfo((accountInfo) => {\r\n if (!accountInfo) {\r\n this.AccountType = AccountType.SignedOut;\r\n return;\r\n }\r\n\r\n const accountType: string = accountInfo.account_type;\r\n if (accountType === \"AAD\") {\r\n this.AccountType = AccountType.AAD;\r\n return;\r\n }\r\n\r\n if (accountType === \"MSA\") {\r\n this.AccountType = AccountType.MSA;\r\n return;\r\n }\r\n\r\n this.AccountType = AccountType.SignedOut;\r\n });\r\n }\r\n\r\n /**\r\n * Sets the AccountInfoPromise for the current user\r\n */\r\n private setAccountInfoPromise(): void {\r\n this.AccountInfoPromise = new Promise((resolve) => {\r\n if (!canUseDOM() || !window.chrome || !window.chrome.authPrivate || !window.chrome.authPrivate.getPrimaryAccountInfo) {\r\n resolve(null);\r\n }\r\n\r\n window.chrome.authPrivate.getPrimaryAccountInfo((accountInfo) => {\r\n resolve(accountInfo);\r\n });\r\n })\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\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 {\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}\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;","// © Microsoft Corporation. All rights reserved.\r\n\r\n/// Creates a function defined as \"extend\" that functions similiar to jQuery's extend function.\r\n\r\nfunction isArray(arr) {\r\n // Check support for isArray\r\n if (Array.isArray) {\r\n return Array.isArray(arr);\r\n } else {\r\n return Object.prototype.toString.call(arr).toLowerCase() === \"[object array]\";\r\n }\r\n}\r\n\r\nfunction extend(...args: any[]) {\r\n var target = args[0] || {};\r\n var ndx = 1;\r\n var key;\r\n var obj;\r\n var isRecursive;\r\n var src;\r\n\r\n if (typeof target == \"boolean\" || typeof target == \"number\") {\r\n isRecursive = !!target;\r\n target = args[1];\r\n ndx = 2;\r\n }\r\n for (; ndx < args.length; ndx++) {\r\n obj = args[ndx];\r\n for (key in obj) {\r\n if (obj[key] !== undefined && obj[key] !== null) {\r\n if (isRecursive && typeof obj[key] == \"object\") {\r\n src = target[key];\r\n if (typeof src != \"object\") {\r\n if (isArray(obj[key])) {\r\n src = [];\r\n } else {\r\n src = {};\r\n }\r\n }\r\n\r\n extend(true, src, obj[key]);\r\n target[key] = src;\r\n } else {\r\n target[key] = obj[key];\r\n }\r\n }\r\n }\r\n }\r\n return target;\r\n};\r\n\r\nexport default extend;\r\n","// © 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 FirstParty = \"firstParty\",\r\n Hub = \"hub\",\r\n MicrosoftNews = \"microsoftNews\",\r\n MMX = \"mmx\",\r\n Office = \"office\",\r\n Views = \"views\",\r\n Windows = \"windows\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n// Front Door issues an activityID (which we refer to as a RID) per page view and we use this ID in tracking and ad calls,\r\n// There are specific circumstances where we need a unique GUID for every event, for example when navigating between slideshow images or refreshing ads withoug a page refresh\r\n// example usage:\r\n// mediator.pub(\"updatePageInstance\");\r\n// var trackInfoRequestId = pageInstance.getRequestId() || trackInfo.sitePage.requestId;\r\n\r\nimport guidGen from \"./guidGen\";\r\nimport mediator from \"./mediator\";\r\nimport telemetryConstants from \"./telemetryconstants\";\r\n\r\nvar rid;\r\nvar pageInstanceEventName = \"updatePageInstance\";\r\nvar updatePageInstance = function () {\r\n rid = guidGen().replace(/-/g, \"\");\r\n\r\n mediator.pub(telemetryConstants.ResetIdx);\r\n\r\n // replace the impression guid for bing search box\r\n var form = document.body.querySelector(\"#srchfrm\");\r\n if (form) {\r\n var refigInputs = form.querySelectorAll(\"input[name='refig']\");\r\n var length = refigInputs.length;\r\n for (var i = 0; i < length; i++) {\r\n // @ts-ignore\r\n refigInputs[i].value = rid;\r\n }\r\n }\r\n};\r\n\r\nmediator.sub(pageInstanceEventName, updatePageInstance);\r\n\r\nexport default {\r\n getRequestId: function() { return rid; },\r\n setRequestId: function (newRequestId) {\r\n rid = newRequestId;\r\n\r\n // Reset eventIndex (telemetry related params) everytime requestId gets set\r\n mediator.pub(telemetryConstants.ResetIdx);\r\n },\r\n eventName: pageInstanceEventName,\r\n\r\n // exposing direct call to updatePageInstance to eliminate delay rid update\r\n // when executed via mediator.pub\r\n updatePageInstance: updatePageInstance\r\n };\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 * 0 - MSA\r\n * 1 - AAD\r\n * 2 - SignedOut\r\n */\r\nexport enum AccountType {\r\n MSA = 0,\r\n AAD = 1,\r\n SignedOut = 2\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 { 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: number = -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 // tslint:disable-next-line:forin\r\n for (let 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}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { BrowserConsoleAppender } from \"clientcore-infrastructure-analytics/appenders/BrowserConsoleAppender\";\r\nimport { ILoggingService } from \"clientcore-infrastructure-analytics/ILoggingService\";\r\nimport { LogLevel } from \"clientcore-infrastructure-analytics/models/LogLevel\";\r\nimport { LoggingService } from \"clientcore-infrastructure-analytics/LoggingService\";\r\nimport { NodeConsoleAppender } from \"clientcore-infrastructure-analytics/appenders/NodeConsoleAppender\";\r\nimport { RuntimeEnvironment } from \"clientcore-infrastructure-analytics/RuntimeEnvironment\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/** The Logger class */\r\nexport class Logger {\r\n /** A default instance of the Logger class. */\r\n public static readonly defaultInstance: Logger = new Logger();\r\n\r\n /** Backing field for the isDebug function */\r\n private isDebugEnabled: boolean;\r\n\r\n /** The common logger for the application. The logging level for this is updated in initialize */\r\n private logger: ILoggingService;\r\n\r\n /** Backing field to hold reference to the window object */\r\n private windowObj?: Window;\r\n\r\n /**\r\n * The constructor\r\n */\r\n private constructor() {\r\n if (canUseDOM()) {\r\n this.setupBrowserEnvironment(window);\r\n\r\n if (this.isDebugEnabled) {\r\n // @ts-ignore\r\n window.webpackRequire = __webpack_require__;\r\n }\r\n } else {\r\n this.setupNodeEnvironment();\r\n }\r\n }\r\n\r\n /**\r\n * Setup client side logging environment - this sets / overrides the Window obj\r\n * @param windowObj - The Window obj to use\r\n */\r\n public setupBrowserEnvironment(windowObj: Window): void {\r\n this.logger = LoggingService.getInstance(\"ExperienceLogger\", LogLevel.Info, RuntimeEnvironment.Browser);\r\n\r\n this.windowObj = windowObj;\r\n\r\n // Once we have a WindowObj, we can determine if debug mode is enabled\r\n this.isDebugEnabled = ((this.getQueryParameterByName(windowObj.location.href, \"debug\") || \"\").toLowerCase() in { \"1\": 1, \"true\": 1 });\r\n\r\n this.setupLogLevel();\r\n }\r\n\r\n /**\r\n * Setup server side logging environment\r\n */\r\n public setupNodeEnvironment(): void {\r\n this.logger = LoggingService.getInstance(\"ExperienceLogger\", LogLevel.Info, RuntimeEnvironment.NodeJs);\r\n this.isDebugEnabled = false; // isDebugEnabled should be set explictly using the setDebug method\r\n this.setupLogLevel();\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 this.logger;\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 this.setupLogLevel();\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 */\r\n public log(message: string): void {\r\n if (this.isDebug()) {\r\n if (!canUseDOM()) {\r\n // currently the logger is incredibly verbose when printing on the server side.\r\n // For now just directly print to console.\r\n // Work Item to address this: http://osgvsowi/24861651\r\n console.log(\"logger.info:\", message);\r\n } else {\r\n this.logger.info(message);\r\n }\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 this.logger.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 this.logger.infoCallback(getMessage);\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 if (canUseDOM() && this.windowObj) {\r\n this.windowObj.console.log(...message);\r\n } else {\r\n console.log(\"logger.logObjects:\", ...message);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Set logger log level.\r\n */\r\n private setupLogLevel(): void {\r\n // Note that we need to set the level at the root logger level or else the callback versions of the logging\r\n // methods will still be invoked to disseminate the message to the appenders.\r\n this.logger.setLevel(this.isDebug() ? LogLevel.Info : LogLevel.Error);\r\n this.setupAppenders();\r\n }\r\n\r\n /**\r\n * Add relevant appenders to the logger depending.\r\n */\r\n private setupAppenders(): void {\r\n this.logger.removeAllAppenders();\r\n if (canUseDOM()) {\r\n this.logger.addAppender(new BrowserConsoleAppender(this.logger.getLevel()));\r\n } else {\r\n this.logger.addAppender(new NodeConsoleAppender(this.logger.getLevel()));\r\n }\r\n }\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\n private 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 let queryValue = queryNameValueMatches[2];\r\n\r\n return decodeURIComponent(queryValue.replace(/\\+/g, \" \")) || \"\";\r\n }\r\n}\r\n\r\nexport const logger = Logger.defaultInstance;","// © 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 { AppError, CoreLibAppErrors, logger } from \"@msnews/diagnostics\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * Base class for localeStorage and sessionStorage abstractions\r\n */\r\nexport class WebStorage {\r\n /**\r\n * Local storage object for persistent storage\r\n */\r\n constructor(private readonly storage: Storage) {\r\n }\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 * 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 let value = this.getItem(key);\r\n if (value != null) {\r\n let 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 let 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 let 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 let 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\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;\r\n\r\n try {\r\n storage = \"localStorage\" in window && window.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 super(storage);\r\n }\r\n\r\n /**\r\n * Checks whether localStorage is available or not.\r\n * Need to aggressively check because iOS5 & Safari Private Browsing mode will throw error.\r\n * This is how the library Modernizr does localStorage check. (MIT License)\r\n * For more details:\r\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/storage/localstorage.js\r\n */\r\n public localStorageExists(trackAppErrorEvent: (data: AppError) => void): boolean {\r\n if(canUseDOM()){\r\n var storageTest = \"storageTest\";\r\n try {\r\n window.localStorage.setItem(storageTest, storageTest);\r\n window.localStorage.removeItem(storageTest);\r\n return true;\r\n } catch(e) {\r\n if (trackAppErrorEvent || typeof trackAppErrorEvent === \"function\") {\r\n trackAppErrorEvent({\r\n ...CoreLibAppErrors.LocalStorageDoesntExist,\r\n message: `Local Storage is not defined ${e}`\r\n });\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Session storage class for persistent storage\r\n */\r\nexport class SessionStorage extends WebStorage {\r\n constructor() {\r\n let storage: Storage;\r\n\r\n try {\r\n storage = \"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 super(storage);\r\n }\r\n\r\n /**\r\n * Checks whether sessionStorage is available or not.\r\n * Need to aggressively check because iOS5 & Safari Private Browsing mode will throw error.\r\n * This is how the library Modernizr does sessionStorage check. (MIT License)\r\n * For more details:\r\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/storage/sessionstorage.js\r\n */\r\n public sessionStorageExists(trackAppErrorEvent: (data: AppError) => void): boolean {\r\n if(canUseDOM()){\r\n var storageTest = \"storageTest\";\r\n try {\r\n window.sessionStorage.setItem(storageTest, storageTest);\r\n window.sessionStorage.removeItem(storageTest);\r\n return true;\r\n } catch(e) {\r\n if (trackAppErrorEvent || typeof trackAppErrorEvent === \"function\") {\r\n trackAppErrorEvent({\r\n ...CoreLibAppErrors.SessionStorageDoesntExist,\r\n message: `Session Storage is not defined: ${e}`\r\n });\r\n }\r\n }\r\n } \r\n return false;\r\n }\r\n}\r\n\r\nexport const localStorage = new LocalStorage();\r\nexport const sessionStorage = new SessionStorage();","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { canUseDOM, getLocationSearch } from \"@msnews/isomorphic-util/\";\r\n\r\n/**\r\n * Defines telemetryReadyCallback() which queues a function to be called after the page is revealed.\r\n * This is specific for telemetry package and should not be used for preload dependent features.\r\n * Telemetry can't have a reference to preload since preload references experiences-redux which\r\n * then references telemetry which causes a problem.\r\n * This helper is specific to queuing telemetry calls when needed and invoking the queued calls once\r\n * the preload page is revealed.\r\n */\r\n\r\nlet queuedCalls: Function[] = [];\r\nconst locationSearch = getLocationSearch();\r\nlet isPreload = locationSearch.match(/backgroundpreload/) ? true : false;\r\nlet pageRevealed = false;\r\n\r\nlet trackValuesUpdated = true;\r\n\r\n// Check and add an event listener if page has been pre-loaded but not yet revealed.\r\nif (canUseDOM() && isPreload && document.visibilityState !== \"visible\") {\r\n document.addEventListener(\"visibilitychange\", onVisibilityChange);\r\n} else {\r\n pageRevealed = true;\r\n}\r\n\r\n/** Event handler for page visibility change */\r\nfunction onVisibilityChange(): void {\r\n if (canUseDOM()) {\r\n document.removeEventListener(\"visibilitychange\", onVisibilityChange);\r\n }\r\n pageRevealed = true;\r\n checkAndFireQueuedCalls();\r\n}\r\n\r\n/** Event handler to run once track values have been updated by respective entities */\r\nfunction onTrackValuesUpdated(): void {\r\n if (canUseDOM()) {\r\n document.removeEventListener(\"trackvaluesupdated\", onTrackValuesUpdated);\r\n }\r\n trackValuesUpdated = true;\r\n checkAndFireQueuedCalls();\r\n}\r\n\r\n/** Helper method to check if all conditions have been satisfied and then fire queued up telemetry beacons */\r\nfunction checkAndFireQueuedCalls(): void {\r\n if (trackValuesUpdated && pageRevealed) {\r\n while (queuedCalls.length) {\r\n let item = queuedCalls.shift();\r\n if (typeof item === \"function\") {\r\n item();\r\n }\r\n }\r\n }\r\n}\r\n\r\n/** If config dictates to wait for page settings to update track values, set trackValuesUpdated to false and add an event listener for trackvaluesupdated. */\r\nexport function waitForPageSettingsTrackUpdate(waitForPageSettingsToUpdateTrack: boolean): void {\r\n if (!waitForPageSettingsToUpdateTrack) {\r\n return;\r\n }\r\n\r\n trackValuesUpdated = false;\r\n\r\n if (canUseDOM()) {\r\n // Add an event listener to listen for a signal indicating track values have been updated.\r\n document.addEventListener(\"trackvaluesupdated\", onTrackValuesUpdated);\r\n }\r\n}\r\n\r\n/**\r\n * If the page is revealed then just call the callback, if not then queue it up\r\n *\r\n * @param {function(object): void} callback - The callback function.\r\n * @returns {void}\r\n */\r\nexport function telemetryReadyCallback(callback: Function): void {\r\n\r\n if (pageRevealed && trackValuesUpdated) {\r\n callback();\r\n } else {\r\n queuedCalls.push(callback);\r\n }\r\n}\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 { dataConnectorInjector } from \"./DataConnectorInjector\";\r\nimport { isNullOrUndefined } from \"util\";\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\r\n // See if we need to reduce for a specific connector. This is the common case.\r\n if (actionPayload !== undefined && actionPayload.key !== undefined) {\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 typeIsString: boolean = typeof actionPayload.type === \"string\";\r\n if (typeIsString && actionPayload.type.endsWith(ConnectorConstants.renderAction)) {\r\n const statePropertyKey = actionPayload.key + \".\" + 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 const experienceFullNamespace: string = actionPayload.key;\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 // 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 (this._connectorMap[actionPayload.key].isGlobal) {\r\n newState = merge({}, newState);\r\n }\r\n\r\n const connectorReducerResult = this.computeNextStateForConnector(newState, actionPayload.key, 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, actionPayload.key, connectorReducerResult.newState);\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 { captureJssGeneratedClasses } from \"@msnews/render-cache\";\r\nimport { registerResetCallback } from \"@msnews/core\";\r\n\r\n/**\r\n * Weak map which is used to store DesignSystem to GenerateClassName Callback.\r\n */\r\nlet designSystemMap = new WeakMap();\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 WeakMap();\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 let callback = designSystemMap.get(designSystem);\r\n\r\n if (!callback) {\r\n const dsName = designSystem.name || \"unknown\";\r\n const dsIndex = designSystemIndexMap.get(dsName) + 1 || 1;\r\n let 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(designSystem, 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\";\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 * Boolean flag to indicate if this is an SSR page or not\r\n */\r\n SSR: boolean;\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\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() && 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\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 (usuall 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 * @method\r\n */\r\n public renderRootElement(connectedTopLevelElement: React.ReactElement, hostElement: HTMLElement, callback?: Function): void {\r\n // Update the base JSS manager instance\r\n this.updateJssManagerInstance();\r\n\r\n // Create a ReactElement, that contains the Redux provider with the store, passing the incomming 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 let pageTimings = getPageTimings();\r\n\r\n if (window.needsHydrate) {\r\n ReactDom.hydrate(rootElement, hostElement);\r\n pageTimings[\"isRenderCachePresent\"] = 1;\r\n window.needsHydrate = false;\r\n } else if (window.SSR) {\r\n pageTimings[\"isRenderCachePresent\"] = 0;\r\n perfMarker.startMark(\"SSR.Hydrate\");\r\n ReactDom.hydrate(rootElement, hostElement, callback);\r\n } else {\r\n pageTimings[\"isRenderCachePresent\"] = 0;\r\n ReactDom.render(rootElement, hostElement);\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\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\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 if (canUseDOM() && document && document.cookie) {\r\n var re = new RegExp(\"\\\\b\" + name + \"\\\\s*=\\\\s*([^;]*)\", \"i\");\r\n var match = re.exec(document.cookie);\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 */\r\nexport function setRequireFunctionalCookie(name: string, value: string, expiryDays?: number, domain?: string, path?: string, secure?: boolean): 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\r\n if (canUseDOM() && document) {\r\n document.cookie = builder.join(\"\");\r\n }\r\n}","// © 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/**\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/**\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/**\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 = \"f920ab6b-8a48-4438-9255-1650179a3a0f\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AadData, AccountInfo, clientId, getAppEnvironment, oneServiceScope } from \"@msnews/core\";\r\n\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\nimport { ExperiencesSharedStateConnector } from \"@msnews/experiences-shared-state\";\r\nimport { PageBase } from \"@msnews/experiences-redux\";\r\n\r\n/**\r\n * chrome\r\n * The chrome API is not defined in Typescript\r\n */\r\ndeclare global {\r\n // tslint:disable-next-line: completed-docs\r\n interface Window { chrome: any; }\r\n}\r\n\r\n/** The aadToken QS key */\r\nexport const aadTokenQsKey = \"stn\";\r\n\r\n/** The aadToken QS value */\r\nexport const aadTokenQsVal = \"aad\";\r\n\r\n/**\r\n * Gets a value to indicate if we are in an enterprise scenario\r\n * eg. whether we should append the AAD Token as part of the call to oneservice endpoints\r\n * The default value is false, so we don't need to wait until the value is explicitly set\r\n */\r\nexport function useEnterpriseCompliance(): boolean {\r\n // Obtain the current value of useEnterpriseCompliance from the ExperiencesSharedState connector\r\n const sharedStateConnector: ExperiencesSharedStateConnector = PageBase.getInstance().rootReducer.connector(ConnectorNamespaces.SharedState) as ExperiencesSharedStateConnector;\r\n return sharedStateConnector ? sharedStateConnector.getCurrentState().useEnterpriseCompliance : false;\r\n}\r\n\r\n/**\r\n * Checks if aad token is invalid for user\r\n */\r\nexport function isInvalidAadToken(aadData: AadData): boolean {\r\n return !aadData || !aadData.isSuccess || !aadData.isValid;\r\n}\r\n\r\nexport async function getAadData(): Promise {\r\n const accountInfo = await resolveAccountInfo();\r\n\r\n if (!accountInfo) {\r\n return null;\r\n }\r\n\r\n return new Promise((resolve) => {\r\n const tokenAcquireParameters = {\r\n account_id: accountInfo.account_id,\r\n account_type: accountInfo.account_type,\r\n client_id: clientId,\r\n scope_or_resource: oneServiceScope\r\n };\r\n\r\n window.chrome.authPrivate.acquireAccessTokenSilently(tokenAcquireParameters, (acquireResult) => {\r\n resolve({\r\n token: acquireResult.access_token,\r\n errorInfo: acquireResult.error_info,\r\n isSuccess: acquireResult.is_success,\r\n isValid: acquireResult.is_token_valid\r\n });\r\n });\r\n });\r\n}\r\n\r\n/**\r\n * Resolve account info promise\r\n */\r\nexport async function resolveAccountInfo(): Promise {\r\n const appEnvironment = getAppEnvironment();\r\n\r\n if (!appEnvironment.AccountInfoPromise) {\r\n return null;\r\n }\r\n\r\n return await appEnvironment.AccountInfoPromise;\r\n}\r\n\r\n/**\r\n * Gets a value to indicate if we should use enterprise domain\r\n * eg. whether we should use the Falcon domain vs. consumer domain for oneservice requests\r\n * The default value is false, so we don't need to wait until the value is explicitly set\r\n */\r\nexport function useEnterpriseDomain(): boolean {\r\n // Obtain the current value of useEnterpriseDomain from the ExperiencesSharedState connector\r\n const sharedStateConnector: ExperiencesSharedStateConnector = PageBase.getInstance().rootReducer.connector(ConnectorNamespaces.SharedState) as ExperiencesSharedStateConnector;\r\n return sharedStateConnector ? sharedStateConnector.getCurrentState().useEnterpriseDomain : false;\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\nexport const Size1ColumnWidth: number = 300;\r\nexport let Size2ColumnWidth: number = 624;\r\nexport let Size3ColumnWidth: number = 948;\r\nexport let Size4ColumnWidth: number = 1272;\r\nexport let GutterSize: number = 24;\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 Size4ColumnWidth = (Size1ColumnWidth * 4) + (gutterSize * 3);\r\n Size3ColumnWidth = (Size1ColumnWidth * 3) + (gutterSize * 2);\r\n Size2ColumnWidth = (Size1ColumnWidth * 2) + gutterSize;\r\n}","// © 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","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Size1ColumnWidth, Size2ColumnWidth, Size3ColumnWidth, Size4ColumnWidth } from \"./ColumnWidths\";\r\n\r\nimport { findIndex } from \"lodash-es\";\r\nimport { toPx } from \"@microsoft/fast-jss-utilities\";\r\n\r\n/**\r\n * Describes possible arragements 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}\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 * 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\r\n/**\r\n * A map of column arrangements to definitions.\r\n */\r\nconst columnArrangementMap: { [columnArrangement in ColumnArrangement]?: ColumnArrangementDefinition } = {};\r\nfor (let 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: number = 32;\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 conjuction 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 minArragement 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(minArragement: ColumnArrangement | null, maxArrangement: ColumnArrangement | null): string {\r\n const queries = [];\r\n\r\n if (minArragement) {\r\n const minArrangementDefinition = columnArrangementMap[minArragement];\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 conjuction 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 minArragement 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(minArragement: ColumnArrangement | null, maxArrangement: ColumnArrangement | null): string {\r\n const mediaQuery = getMediaQuery(minArragement, 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 { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\nconst pageTimings = canUseDOM() ? (window._pageTimings || (window._pageTimings = {})) : null;\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 * 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 let existingCount = pageTimings[counterName] || (pageTimings[counterName] = 0);\r\n pageTimings[counterName] = existingCount + 1;\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\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\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 (let 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","\r\n// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { renderCacheExpirationKey, renderCacheKey, riverRcClassName } from \"./Constants\";\r\n\r\nimport { RenderCache } from \"./RenderCache\";\r\n\r\nlet renderCacheObject: RenderCache;\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 if (!(window && window.localStorage)) {\r\n return null;\r\n }\r\n\r\n const cacheExpirationTimestamp = window.localStorage.getItem(renderCacheExpirationKey);\r\n\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\r\n if (currentTimestamp >= parsedCacheExpirationTimestamp) {\r\n return null; // cache expired.\r\n }\r\n\r\n const renderCacheStorage = window.localStorage.getItem(renderCacheKey);\r\n\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 (var 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 { 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 * 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}","// © 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 MMX = \"mmx\",\r\n NTP = \"ntp\",\r\n Video = \"video\",\r\n Windows = \"windowshp\"\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 { 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/** 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 * 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 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 protected 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(this.timelineName);\r\n }\r\n\r\n /**\r\n * Helper 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 public static create(\r\n timelineName: string,\r\n instanceId: string,\r\n addPerfMarks: boolean = false,\r\n addPageTimings: boolean = false,\r\n async?: boolean\r\n ): PerfTimeline {\r\n return new PerfTimeline(timelineName, instanceId, addPerfMarks, addPageTimings, async);\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 let 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 // tslint:disable-next-line:no-shadowed-variable\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\r\n const _this = this;\r\n\r\n let wrapper = function (): any {\r\n const endMeasure = _this.startMeasure(funcName).endMeasure;\r\n try {\r\n return func.apply(bindingContext, arguments);\r\n } finally {\r\n endMeasure();\r\n }\r\n };\r\n\r\n return wrapper as any 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}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { PageMeasure } from \"./PerfTimeline\";\r\nimport { getExperienceMeasures } from \"./ExperienceDiagnostics\";\r\nimport { getPageTimings } from \"./PageTimings\";\r\nimport { groupBy } from \"lodash-es\";\r\n\r\n/** The type that encapsulates the data for a single aggregated timeline object */\r\ninterface Timeline {\r\n\r\n /** Name of the timeline */\r\n name: string,\r\n\r\n /** The data for the timeline */\r\n measures: Array\r\n}\r\n\r\n/** Describes a single Process ID */\r\ninterface PID {\r\n /** The pid value */\r\n pid: number;\r\n}\r\n\r\n/** Type for easily looking up if a given timeline should be considered async */\r\ninterface AsyncTimelineGroups {\r\n /** The incrementing async PID */\r\n nextPID: PID,\r\n\r\n /** The async PID for the given timeline */\r\n [timelineName: string]: PID\r\n}\r\n\r\n/** All input arguments for the app trace generation process */\r\nexport interface AppTraceMappingArgs {\r\n\r\n /** Flag to indicate whether we're generating the app trace for upload purposes */\r\n uploadTrace?: boolean;\r\n\r\n /** Max time limit to limit the data collection to */\r\n maxTime?: number;\r\n}\r\n\r\n/**\r\n * Calculates and returns the JSON that can be used in the chrome://tracing tool to render an\r\n * experience-centric perf timeline for various tracked page measurements in the pageMeasures object.\r\n * See https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview# for more details.\r\n * @param args - input arguments for the app trace generation.\r\n * @returns Array object with chrome trace event data that can be serialized and saved to a JSON file\r\n * to be loaded inside the chrome://tracing tool.\r\n */\r\nexport function getAppPerfTrace(args: AppTraceMappingArgs = {}): Array {\r\n\r\n const pageTimings = { ...getPageTimings() };\r\n\r\n // create a shallow copy since we don't want to mutate the original data from the page object\r\n const measures: Array = [];\r\n\r\n const asyncExperiences = {\r\n\r\n // Web-Worker\r\n \"WW\": { pid: 0 },\r\n\r\n // Config resolver on the render thread\r\n \"Resolver\": { pid: 1 },\r\n\r\n // Various resource timing categories.\r\n \"Ads\": { pid: 2 },\r\n \"Telemetry\": { pid: 3 },\r\n \"Content Preview\": { pid: 4 },\r\n \"Images\": { pid: 5 },\r\n \"JS\": { pid: 6 },\r\n \"Configs\": { pid: 7 },\r\n \"Services\": { pid: 8 },\r\n\r\n // The async process ID counter, which will be used to group similar timelines under virtual process IDs to\r\n // identify and group a list of related timelines. The timeline groups will render in order of smallest to\r\n // larges process ID in the chrome trace.\r\n nextPID: { pid: 20 }\r\n };\r\n\r\n // this is the process ID which will identify the main timeline (that renders last in the tool)\r\n const defaultPID = 100;\r\n\r\n // merge resource timings\r\n mergeResourceTimings(args, measures, asyncExperiences);\r\n\r\n // merge experience timeline measures.\r\n mergeExperienceTimings(args, measures, getExperienceMeasures(), asyncExperiences);\r\n\r\n // merge other page timings\r\n mergePageTimings(args, measures, pageTimings, asyncExperiences, /^WW\\./, \"WW\");\r\n\r\n // merge timings from window._appTimings object if it exists (used to get timeline measurements\r\n // out of band from non-typescript enabled code)\r\n const appTimings = { ...(window._appTimings || {}) };\r\n mergePageTimings(args, measures, appTimings, asyncExperiences, /.*/);\r\n\r\n // build chrome trace object\r\n const chromeTrace = [];\r\n\r\n // zero start instance marker to indicate nav start\r\n chromeTrace.push(chromeInstantMarker(args, \"Global\", \"NavStart\", defaultPID, 0, \"g\"));\r\n\r\n // Other well known instance markers\r\n Object.keys(pageTimings)\r\n .filter(name => name.match(/TT/) && checkTime(args, pageTimings[name]))\r\n .sort((key1, key2) => pageTimings[key1] - pageTimings[key2])\r\n .forEach(name =>\r\n chromeTrace.push(chromeInstantMarker(args, \"Global\", name, defaultPID, pageTimings[name], \"g\"))\r\n );\r\n\r\n // web-worker instant markers\r\n Object.keys(pageTimings)\r\n .filter(name => name.match(/^WW\\./i) && checkTime(args, pageTimings[name]))\r\n .sort((key1, key2) => pageTimings[key1] - pageTimings[key2])\r\n .forEach(name =>\r\n chromeTrace.push(chromeInstantMarker(args, \"WW\", name, asyncExperiences[\"WW\"].pid, pageTimings[name], \"p\"))\r\n );\r\n\r\n // Main process name metadata\r\n chromeTrace.push(chromeMetadata(\"process_name\", defaultPID, { name: \"Main\" }));\r\n chromeTrace.push(chromeMetadata(\"process_sort_index\", defaultPID, { sort_index: defaultPID }));\r\n\r\n const { uploadTrace } = args;\r\n\r\n // async timelines\r\n calculateTimelines(args, measures, true)\r\n .forEach((timeline, timelineIndex) => {\r\n\r\n const { pid } = asyncExperiences[timeline.name];\r\n\r\n // for async timelines, we need to create a separate process so the individual\r\n // measurements can start on their own line as async events should\r\n timeline.measures.forEach((measure, measureIndex) => {\r\n\r\n const { timelineName, measureName, from, to } = measure;\r\n const measureIndexPrefix = (\"000\" + measureIndex).substr(-3, 3);\r\n const normalizedName = uploadTrace ? truncateName(measureName) : measureName;\r\n let name = `${measureIndexPrefix}-${normalizedName}`;\r\n\r\n // async begin/end\r\n chromeTrace.push(...chromeAsyncMeasure(args, timelineName, name, pid, timelineIndex, measureIndex, from, to));\r\n });\r\n\r\n // since we're creating a new process id for async experiences, put the name metadata for the process\r\n chromeTrace.push(chromeMetadata(\"process_name\", pid, { name: timeline.name }));\r\n chromeTrace.push(chromeMetadata(\"process_sort_index\", pid, { sort_index: pid }));\r\n chromeTrace.push(chromeMetadata(\"thread_name\", pid, { name: timeline.name }, timelineIndex));\r\n chromeTrace.push(chromeMetadata(\"thread_sort_index\", pid, { sort_index: timelineIndex }, timelineIndex));\r\n });\r\n\r\n // sync timelines\r\n calculateTimelines(args, measures, false)\r\n .forEach((timeline, timelineIndex) => {\r\n\r\n const pid = defaultPID;\r\n\r\n timeline.measures.forEach(measure => {\r\n const { timelineName, measureName, from, to } = measure;\r\n chromeTrace.push(chromeSyncMeasure(args, timelineName, measureName, pid, timelineIndex, from, to));\r\n });\r\n\r\n chromeTrace.push(chromeMetadata(\"thread_name\", pid, { name: timeline.name }, timelineIndex));\r\n chromeTrace.push(chromeMetadata(\"thread_sort_index\", pid, { sort_index: timelineIndex }, timelineIndex));\r\n });\r\n\r\n return chromeTrace;\r\n}\r\n\r\n/**\r\n * Creates a chrome metadata entry object\r\n * @param metadataType - the metadata type\r\n * @param pid - the process id\r\n * @param args - contextual properties for the metadata\r\n * @param threadId - the thread id\r\n */\r\nfunction chromeMetadata(metadataType: string, pid: number, args: object, threadId?: number): object {\r\n\r\n const metadata: any = {\r\n name: metadataType,\r\n ph: \"M\",\r\n pid,\r\n args\r\n };\r\n\r\n if (threadId != null) {\r\n metadata.tid = threadId;\r\n }\r\n\r\n return metadata;\r\n}\r\n\r\n/**\r\n * Returns two markers that signifiy the measurement of an asynchronous event\r\n * @param args - input arguments for the app trace generation.\r\n * @param category - the event category\r\n * @param name - the event name\r\n * @param pid - the process id of the event\r\n * @param threadId - the thread id of the event\r\n * @param id - the unique id that will distinguish the begin/end of this async event from others\r\n * @param fromMs - start time of the event\r\n * @param toMs - end time of the event\r\n * @param showInParentThread - flag to indicate whether the event should be nestable.\r\n */\r\nfunction chromeAsyncMeasure(args: AppTraceMappingArgs, category: string, name: string, pid: number, threadId: number, id: number, fromMs: number, toMs: number, showInParentThread?: boolean): Array {\r\n return [\r\n chromeMarker(args, category, name, showInParentThread ? \"B\" : \"b\", pid, threadId, fromMs, { id }),\r\n chromeMarker(args, category, name, showInParentThread ? \"E\" : \"e\", pid, threadId, toMs, { id })\r\n ];\r\n}\r\n\r\n/**\r\n * Returns two markers that signifiy the measurement of an synchronous event\r\n * @param args - input arguments for the app trace generation.\r\n * @param category - the event category\r\n * @param name - the event name\r\n * @param pid - the process id of the event\r\n * @param threadId - the thread id of the event\r\n * @param fromMs - start time of the event\r\n * @param toMs - end time of the event\r\n */\r\nfunction chromeSyncMeasure(args: AppTraceMappingArgs, category: string, name: string, pid: number, threadId: number, fromMs: number, toMs: number): object {\r\n let durationMis = convertToMicroseconds(toMs - fromMs);\r\n return chromeMarker(args, category, name, \"X\", pid, threadId, fromMs, { dur: durationMis });\r\n}\r\n\r\n/**-\r\n * Returns an instance marker\r\n * @param args - input arguments for the app trace generation.\r\n * @param category - the event category\r\n * @param name - the event name\r\n * @param pid - the process id of the event\r\n * @param timeStampMs - the time when the instant occurred\r\n * @param type - the scope type of the instant event\r\n */\r\nfunction chromeInstantMarker(args: AppTraceMappingArgs, category: string, name: string, pid: number, timeStampMs: number, type: string): object {\r\n return chromeMarker(args, category, name, \"i\", pid, null, timeStampMs, { s: type });\r\n}\r\n\r\n/**\r\n * Creates a generic Chrome marker entry\r\n * @param args - input arguments for the app trace generation.\r\n * @param category - the event category\r\n * @param name - the event name\r\n * @param type - the scope type of the instant event\r\n * @param pid - the process id of the event\r\n * @param threadId - the thread id of the event\r\n * @param timeStampMs - the time when the instant occurred\r\n * @param auxData - any generic properties to add to the marker JSON\r\n */\r\nfunction chromeMarker(args: AppTraceMappingArgs, category: string, name: string, type: string, pid: number, threadId: number = null, timeStampMs: number, auxData: any): object {\r\n\r\n const marker: any = {\r\n cat: category,\r\n name,\r\n ph: type,\r\n pid,\r\n tid: threadId,\r\n ts: convertToMicroseconds(timeStampMs),\r\n ...auxData\r\n };\r\n\r\n if (threadId != null) {\r\n marker.tid = threadId;\r\n }\r\n\r\n return marker;\r\n}\r\n\r\n/**\r\n * Iterates through the given measure data, parses, groups timeline data and creates\r\n * a sorted array of {Timeline} objects to render in the Chrome trace\r\n * @param args - input arguments for the app trace generation.\r\n * @param measures - the measure data object to which to append new measurements.\r\n * @param async - if this measure is asynchronous or not.\r\n * @param ttvr - the time to visually ready metric used to filter out measures that occur it if necessary.\r\n * @returns the array of aggregated, sorted {Timeline} objects.\r\n */\r\nfunction calculateTimelines(args: AppTraceMappingArgs, measures: Array, async: boolean): Array {\r\n\r\n // group info objects by experience name\r\n const timelineGroups = groupBy(\r\n measures.filter(measure =>\r\n !!measure.async === async\r\n && checkTime(args, measure.from, measure.to)\r\n ),\r\n info => info.timelineName\r\n );\r\n\r\n // create a list of sub-timelines where each sub-timeline is sorted by metric value\r\n const timelineList: Array = [];\r\n let maxValue = 0;\r\n\r\n Object.keys(timelineGroups).forEach(groupName => {\r\n\r\n // sort each timeline by start metric value\r\n const timeline = timelineGroups[groupName].sort(\r\n (info1, info2) => info1.from - info2.from\r\n );\r\n\r\n // get the running max value from the last metric on each sorted timeline\r\n maxValue = Math.max(maxValue, timeline[timeline.length - 1].to);\r\n\r\n timelineList.push({\r\n name: groupName,\r\n measures: timeline\r\n });\r\n });\r\n\r\n // sort the list of timelines by first appearing metric for each timeline.\r\n // This is the order we will render the timeline view from top to bottom,\r\n // so that each line represents a single experience's timeline.\r\n return timelineList.sort(\r\n (timeline1, timeline2) => timeline1.measures[0].from - timeline2.measures[0].from\r\n );\r\n}\r\n\r\n/**\r\n * Attempts to map measures from the given object bag that contains related start/end markers\r\n * and adds to the given measures array.\r\n * @param args - input arguments for the app trace generation.\r\n * @param measures - the measure data object to which to append new measurements.\r\n * @param pageTimings - the page timings object from which to parse data from.\r\n * @param asyncExperiences - the async info object containing the currently allocated PID info\r\n * @param matchRegex - regex to use to filter the metric names.\r\n * @param timelineName - Optional name to use for the timeline. If not specified the measure name will\r\n * be parsed to attempt to derive the timeline name dynamically.\r\n */\r\nfunction mergePageTimings(\r\n args: AppTraceMappingArgs,\r\n measures: Array,\r\n pageTimings: object,\r\n asyncExperiences: AsyncTimelineGroups,\r\n matchRegex: RegExp,\r\n timelineName?: string\r\n): void {\r\n\r\n // work out other WW markers\r\n const startSuffixRegex = /\\-?[Ss]tart$/;\r\n\r\n // we have a range of start/end marker styles in WW code :-/\r\n const endSuffixLookup = {\r\n \"-Start\": \"-End\",\r\n \"-start\": \"-end\",\r\n \"Start\": \"End\",\r\n \"start\": \"end\"\r\n };\r\n\r\n const processedKeysToRemove = [];\r\n\r\n Object.keys(pageTimings)\r\n .filter(key => key.match(matchRegex))\r\n .forEach(key => {\r\n\r\n const startSuffixMatch = key.match(startSuffixRegex);\r\n if (!startSuffixMatch) {\r\n return;\r\n }\r\n\r\n let measureName = key.replace(startSuffixRegex, \"\");\r\n const endKey = `${measureName}${endSuffixLookup[startSuffixMatch[0]]}`;\r\n const endValue = startSuffixMatch && pageTimings[endKey];\r\n\r\n if (!endValue) {\r\n return;\r\n }\r\n\r\n processedKeysToRemove.push(key);\r\n processedKeysToRemove.push(endKey);\r\n\r\n let thisTimelineName = timelineName;\r\n\r\n // if we're not given an explicit timeline name, then see if we can try to derive the\r\n // timeline name from the measurement (i.e., see if the measure name is formatted as\r\n // [timeline name].[measure name]), and if so, use that instead. This is useful for aggregating\r\n // related timeline measures across code that use the PerfTimeline class as well as the global\r\n // window._appTimings object to generate a unified timeline.\r\n if (!thisTimelineName) {\r\n const prefixSuffixMatch = measureName.match(/(.+)\\.(.+)/);\r\n if (prefixSuffixMatch) {\r\n thisTimelineName = prefixSuffixMatch[1];\r\n measureName = prefixSuffixMatch[2];\r\n } else {\r\n // no explicit timeline name, and no timeline name could be derived from the measure name\r\n return;\r\n }\r\n }\r\n\r\n const fromValue = pageTimings[key];\r\n\r\n if (!checkTime(args, fromValue, endValue)) {\r\n return;\r\n }\r\n\r\n measures.push({\r\n async: !!asyncExperiences[thisTimelineName],\r\n timelineName: thisTimelineName,\r\n measureName,\r\n from: fromValue,\r\n to: endValue\r\n });\r\n });\r\n\r\n // remove the keys we used for detecting start/end from the measures so we don't attempt\r\n // to process them again for something else\r\n for (const keyToRemove of processedKeysToRemove) {\r\n delete pageTimings[keyToRemove];\r\n }\r\n}\r\n\r\n/**\r\n * Parses various resource timings that are of interest and merges into the measure data object\r\n * @param args - input arguments for the app trace generation.\r\n * @param measures - the destination array into which we will add the resource timings.\r\n * @param asyncExperiences - the async info object containing the currently allocated PID info\r\n */\r\nfunction mergeResourceTimings(args: AppTraceMappingArgs, measures: Array, asyncExperiences: AsyncTimelineGroups): void {\r\n\r\n // interesting groups from resource timings.\r\n // IMPORTANT!! Put from most specific to less specific, so dupes don't appear in multiple groups.\r\n let resourceGroupings = [\r\n\r\n // Ads\r\n { name: \"Ads\", regex: /(\\/srtb\\.|taboola|outbrain)/i },\r\n\r\n // Config service calls (CRS or Config)\r\n { name: \"Telemetry\", regex: /(otf\\.|\\/c\\.gif)/i },\r\n\r\n // Content preview calls.\r\n // Note: put before services to avoid capture of /content/\r\n { name: \"Content Preview\", regex: /\\/content\\/view\\/v[0-9]\\/Preview\\//i },\r\n\r\n // Content service calls (i.e., content preview)\r\n { name: \"Images\", regex: /(img-s-msn-com|\\.svg)/i },\r\n\r\n // Javascript resources.\r\n // Note: put before configs, to avoid capture of web-worker hash, which contains config stuff\r\n { name: \"JS\", regex: /\\.js/i },\r\n\r\n // Config service calls (CRS or Config)\r\n { name: \"Configs\", regex: /\\/config/i },\r\n\r\n // Various known service calls to 1S (i.e., feed, structure data, etc.)\r\n { name: \"Services\", regex: /(\\/service\\/|apiKey|\\/getappanoncookie|content)/i }\r\n ];\r\n\r\n let nonZeroResources = performance.getEntriesByType(\"resource\")\r\n .filter(entry => {\r\n const { duration, startTime } = entry;\r\n return (duration > 0)\r\n && checkTime(args, startTime, startTime + duration)\r\n });\r\n\r\n resourceGroupings.forEach(resourceGroup => {\r\n\r\n // add the resource group names to the async experiences list\r\n tryCreateAsyncPID(resourceGroup.name, asyncExperiences);\r\n\r\n let remainingResources = [];\r\n\r\n nonZeroResources\r\n .filter(entry => {\r\n const match = entry.name.match(resourceGroup.regex);\r\n if (!match) {\r\n remainingResources.push(entry);\r\n }\r\n return match;\r\n })\r\n .forEach((entry, entryIndex) => {\r\n\r\n const url = new URL(entry.name);\r\n const measureName = url.pathname.length > 1\r\n ? url.pathname\r\n : url.hostname;\r\n\r\n measures.push({\r\n async: true,\r\n timelineName: resourceGroup.name,\r\n measureName: `${measureName}-${entryIndex}`,\r\n from: entry.startTime,\r\n to: entry.startTime + entry.duration\r\n });\r\n });\r\n\r\n // don't re-process the ones we already matched for a previous group.\r\n nonZeroResources = remainingResources;\r\n });\r\n}\r\n\r\n/**\r\n * Appends the given measure to the target array\r\n * @param args - input arguments for the app trace generation.\r\n * @param destinationMeasures - the destination array to which to add the measures\r\n * @param sourceMeasures - the source list of measures to process and add\r\n * @param asyncExperiences - the async info object containing the currently allocated PID info\r\n */\r\nfunction mergeExperienceTimings(\r\n args: AppTraceMappingArgs,\r\n destinationMeasures: Array,\r\n sourceMeasures: Array,\r\n asyncExperiences: AsyncTimelineGroups\r\n): void {\r\n\r\n sourceMeasures.forEach(measure => {\r\n const { async, timelineName } = measure;\r\n if (async) {\r\n tryCreateAsyncPID(timelineName, asyncExperiences);\r\n }\r\n\r\n if (checkTime(args, measure.from, measure.to)) {\r\n destinationMeasures.push(measure);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Attempts to create a new async PID for the given timeline name if it does not already exist\r\n * @param timelineName - the name of the async timeline to allocate a new PID if it does not exist.\r\n * @param asyncExperiences - the async info object containing the currently allocated PID info\r\n * @returns {boolean} Indicating whether an async PID exists for the given timeline or not.\r\n */\r\nfunction tryCreateAsyncPID(timelineName: string, asyncExperiences: AsyncTimelineGroups): boolean {\r\n if (!asyncExperiences[timelineName]) {\r\n asyncExperiences[timelineName] = { pid: asyncExperiences.nextPID.pid++ };\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Takes a timestamp in milliseconds and returns the value in rounded microseconds.\r\n * @param timeStampMs - the millisecond number that needs to be converted to microseconds\r\n * @returns {number} the equivalent rounded microsecond value.\r\n */\r\nfunction convertToMicroseconds(timeStampMs: number): number {\r\n return Math.round(timeStampMs * 1000);\r\n}\r\n\r\n/**\r\n * Check if the given timestamp is within the limits of the app trace generation parameters\r\n * @param args - input arguments for the app trace generation.\r\n * @param timeStampMs - the timestamp to check\r\n */\r\nfunction checkTime(args: AppTraceMappingArgs, fromMs: number, toMs?: number): boolean {\r\n return !args.uploadTrace\r\n || !args.maxTime\r\n || ((!fromMs || fromMs <= args.maxTime)\r\n && (!toMs || toMs <= args.maxTime));\r\n}\r\n\r\n/**\r\n * Takes the name and removes everything that is between either the first and last slash or period\r\n * depending upon whether or not there is more than one slash in the name.\r\n * @param name the name to be truncated.\r\n * @param slashes flag to determine if we're truncating between slashes or not.\r\n */\r\nfunction truncateName(name: string): string {\r\n // Find the last occurence of the slash in the string. If it exists then we'll keep everything\r\n // after it. If it doesn't exist then keep the entire string.\r\n let lastPathIndex = name.lastIndexOf(\"/\");\r\n return (lastPathIndex >= 0)\r\n ? name.substr(lastPathIndex + 1)\r\n : name;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppPerfTraceConfig, tryParseAppTraceConfig } from \"./AppPerfTraceConfig\";\r\nimport { PageMeasure, PerfTimeline } from \"./PerfTimeline\";\r\nimport { canUseDOM, getLocationHref } from \"@msnews/isomorphic-util\";\r\n\r\nimport { getAppPerfTrace } from \"./AppPerfTrace\";\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\nlet 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 * Note: This method should not be called explicitly (other than from UTs.)\r\n * It is already called by default below.\r\n * @param locationHref - the value of window.location.href from which to parse options.\r\n */\r\nexport function initExperienceDiagnostics(locationHref: string): void {\r\n perfTimelineInstances = {};\r\n setAppPerfTraceConfigOverrides(locationHref);\r\n}\r\n\r\nif (canUseDOM()) {\r\n // initialize experience diagnostics config\r\n // TODO (http://osgvsowi/24596752): This needs reinitialized on each request when server side rendering\r\n initExperienceDiagnostics(getLocationHref());\r\n\r\n // Note that we're setting the _getAppPerfTrace function here so that it doesn't get tree shaken out\r\n // since it's not actually referenced from any PROD code anywhere. However since the tryGetPerfTimeline function\r\n // is referenced, having this code run here makes it work.\r\n //\r\n // TODO: This creates a circular dependency which is fine for actual functionality as ES modules know\r\n // how to deal with it. However this can cause issues when debugging UTs sometimes.\r\n (window)._getAppPerfTrace = getAppPerfTrace;\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 function tryGetPerfTimeline(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] = PerfTimeline.create(\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 { PerfTimeline } from \"./PerfTimeline\";\r\nimport { logger } from \"../logging\";\r\n\r\nexport interface AppPerfTraceConfig {\r\n /** Flag to indicate what we're tracking all experiences. */\r\n trackAllExp?: boolean;\r\n\r\n /** Top-level flag to enable perf timeline features. */\r\n enablePerfTimeline?: boolean;\r\n\r\n /**\r\n * In case we're excluding specific experiences from tracking. Useful when\r\n * we want to track all experiences, except for a few noisy ones, for example.\r\n */\r\n experiencesForPerf?: { [key: string]: boolean };\r\n\r\n /**\r\n * In case we're excluding specific experiences from tracking. Useful when\r\n * we want to track all experiences, except for a few noisy ones, for example.\r\n */\r\n experiencesExcludedForPerf?: { [key: string]: boolean };\r\n\r\n /**\r\n * Flag to enable performance marks in the F12 timeline.\r\n */\r\n addPerformanceMarks?: boolean;\r\n\r\n /**\r\n * Flag to enable adding the page measurements to the _pageTimings object.\r\n */\r\n addPageTimings?: boolean;\r\n\r\n /**\r\n * Swtich to determine if we will upload the trace or not using the telemetry\r\n * API.\r\n */\r\n uploadTrace?: boolean;\r\n\r\n /** Specify interval after TTVR at when to start the app trace calculation & upload process */\r\n uploadTraceDelay?: number;\r\n\r\n /** The sampling rate at which we are going to collect this data from users */\r\n sampleRate?: number;\r\n\r\n /** The minimum ttvr for which we are going to send the collected data up */\r\n minimumTTVR?: number;\r\n}\r\n\r\n/**\r\n * Parses app perf diagnostic configuration from the given URL.\r\n * @param locationHref the value of window.location.href form which to parse options.\r\n */\r\nexport function tryParseAppTraceConfig(locationHref: string): Partial {\r\n try {\r\n const searchParams = (new URL(locationHref)).searchParams;\r\n const expPerfQsp = searchParams.get(\"expPerf\");\r\n\r\n // if we were explicitly asked to skip everything, return early with\r\n // explicitly set disabled flag so this override will supercede everything.\r\n const expPerfSkipQsp = searchParams.get(\"expPerfSkip\");\r\n if (expPerfSkipQsp == \"all\") {\r\n return {\r\n enablePerfTimeline: false\r\n };\r\n }\r\n\r\n // If nothing explicit was requested, return early with empty config,\r\n // so any config level overrides can continue to get applied.\r\n if (!expPerfSkipQsp && !expPerfQsp) {\r\n return {};\r\n }\r\n\r\n const parsedConfig: Partial = {\r\n enablePerfTimeline: true,\r\n\r\n // since we know that someone is trying to collect data via QSPs,\r\n // we explicitly set few properties so that we override any base config values.\r\n uploadTrace: false,\r\n sampleRate: 1,\r\n minimumTTVR: 0\r\n };\r\n\r\n if (expPerfQsp === \"all\") {\r\n\r\n parsedConfig.trackAllExp = true\r\n parsedConfig.experiencesExcludedForPerf = {};\r\n\r\n } else if (expPerfQsp) {\r\n\r\n // If an explicit experience name list was specified, ,convert it to a boolean map\r\n // for efficient lookup so that we can create or avoid creation of the timeline object\r\n // for whatever experience needs instrumentation.\r\n const experiencesForPerf = parsedConfig.experiencesForPerf = {};\r\n expPerfQsp.split(\",\").forEach(expName =>\r\n experiencesForPerf[expName] = true\r\n );\r\n }\r\n\r\n // Parse explicit exclusions from perf timeline\r\n if (expPerfSkipQsp) {\r\n const experiencesExcludedForPerf = parsedConfig.experiencesExcludedForPerf = {};\r\n expPerfSkipQsp.split(\",\").forEach(expName =>\r\n experiencesExcludedForPerf[expName] = true\r\n );\r\n }\r\n\r\n if (searchParams.get(\"expPerfMarks\") === \"true\") {\r\n parsedConfig.addPerformanceMarks = true;\r\n }\r\n\r\n if (searchParams.get(\"expPerfTimings\") === \"true\") {\r\n parsedConfig.addPageTimings = true;\r\n }\r\n\r\n return parsedConfig;\r\n\r\n } catch (error) {\r\n\r\n logger.logError(\"Error parsing URL for detecting experience diagnostic switches: \" + error);\r\n return {};\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n ITrackInfo,\r\n KeyValueArray,\r\n KeyValuePair,\r\n Utility,\r\n getAppEnvironment,\r\n getHeadData,\r\n oneServiceHeaders,\r\n oneServiceQueryStringKeys\r\n} from \"@msnews/core\";\r\nimport { aadTokenQsKey, aadTokenQsVal, getAadData, useEnterpriseCompliance } from \"@msnews/auth\";\r\n\r\nimport { isString } from \"lodash-es\";\r\n\r\n/**\r\n * A namespace that provides OneService utility functionality\r\n */\r\nexport namespace OneServiceUtility {\r\n\r\n /**\r\n * Authentication ticket type - Header value required by back-end service\r\n * Specifies what type of authentication to do\r\n */\r\n export const authenticationTicketType = \"10\";\r\n\r\n /**\r\n * Header name that holds which ANON cookie to use\r\n */\r\n export const signedInCookieNameHeader = \"signedInCookieName\";\r\n\r\n /**\r\n * Header name that holds the user-location value.\r\n */\r\n export const userLocationHeader = \"user-location\";\r\n\r\n /**\r\n * The api-key we'll be sending to OneService.\r\n */\r\n export const apiKey = \"0QfOX3Vn51YCzitbLaRkTTBadtWpgTN8NZLW0C1SEM\";\r\n\r\n /**\r\n * Executes a callback on completing of a service request\r\n *\r\n * @param {() => Promise} serviceRequest - The service request\r\n * @param {() => void} callbackMethod - The callback method\r\n * @return {Promise} - A promise of the service response\r\n */\r\n export async function serviceRequestOnComplete(serviceRequest: () => Promise, callbackMethod: () => void): Promise {\r\n try {\r\n const result = await serviceRequest();\r\n callbackMethod();\r\n\r\n return result;\r\n } catch (error) {\r\n callbackMethod();\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * Gets common parameters used in service requests to OneService, when there is no personalization involved\r\n * @param {string} userId - The user id for the request\r\n * @param {string} ocidSpecifier - The OCID\r\n * @param {string} addPageInfoToOcid - If true, page_product and page_type are added to the ocid. Defaults to true\r\n * @returns {KeyValueArray}\r\n */\r\n export function getOneServiceParamsWithoutAuth(userId: string = null, ocidSpecifier: string, addPageInfoToOcid: boolean = true): KeyValueArray {\r\n const appEnvironment = getAppEnvironment();\r\n const params = [\r\n {\r\n key: oneServiceQueryStringKeys.apiKey,\r\n value: apiKey\r\n },\r\n {\r\n // TODO Bug 22266910: clarify use of activityId vs rid in this spot\r\n key: oneServiceQueryStringKeys.activityId,\r\n value: appEnvironment.ActivityId\r\n },\r\n {\r\n key: oneServiceQueryStringKeys.ocid,\r\n value: addPageInfoToOcid ? getOneServiceOCID(appEnvironment.TrackInfo, ocidSpecifier) : ocidSpecifier\r\n },\r\n {\r\n key: oneServiceQueryStringKeys.market,\r\n value: appEnvironment.CurrentMarket\r\n }\r\n ];\r\n\r\n // 21527208 - remove this after upgrading experiences to use shared lib.\r\n if (userId) {\r\n params.push({\r\n key: oneServiceQueryStringKeys.user,\r\n value: userId\r\n });\r\n }\r\n\r\n let runningExperiments = getHeadData().CurrentFlights;\r\n if (runningExperiments) {\r\n params.push({\r\n key: oneServiceQueryStringKeys.fdhead,\r\n value: runningExperiments\r\n });\r\n }\r\n\r\n if (useEnterpriseCompliance()) {\r\n params.push({\r\n key: aadTokenQsKey,\r\n value: aadTokenQsVal\r\n });\r\n }\r\n\r\n return params;\r\n }\r\n\r\n /**\r\n * Gets common parameters used in service requests to OneService,\r\n * plus authentication params in the form of the sign in cookie name\r\n * Note: This should only be called if the user is known to be signed in, else use getOneServiceParamsWithoutAuth\r\n *\r\n * @export\r\n * @param {string} userId - The user id for the request\r\n * @param {string} ocidSpecifier - The OCID\r\n * @param {string} addPageInfoToOcid - If true, page_product and page_type are added to the ocid. Defaults to true\r\n * @returns {KeyValueArray}\r\n */\r\n export function getOneServiceParamsWithAuth(userId: string = null, ocidSpecifier: string, addPageInfoToOcid: boolean = true): KeyValueArray {\r\n const appEnvironment = getAppEnvironment();\r\n const authCookieName: string = appEnvironment.AuthCookieName as string;\r\n let params = [...getOneServiceParamsWithoutAuth(userId, ocidSpecifier, addPageInfoToOcid)];\r\n if (authCookieName) {\r\n params.push({\r\n key: oneServiceQueryStringKeys.signInCookieName, // sign-in cookie name\r\n value: authCookieName.toUpperCase()\r\n });\r\n }\r\n\r\n return params;\r\n }\r\n\r\n /**\r\n * Gets common headers used in service requests to OneService\r\n *\r\n * @export\r\n * @returns {Promise}\r\n */\r\n export async function getOneServiceHeaders(): Promise {\r\n const headers = {};\r\n\r\n if (useEnterpriseCompliance()) {\r\n const aadData = await getAadData();\r\n if (aadData && aadData.token) {\r\n headers[oneServiceHeaders.authorization] = `Bearer ${aadData.token}`;\r\n }\r\n }\r\n\r\n return headers;\r\n }\r\n\r\n /**\r\n * Gets headers specifically used in service requests to OneService /feed endpoint\r\n * @export\r\n * @returns {Promise}\r\n */\r\n export async function getOneServiceFeedCallHeaders(): Promise {\r\n const headers = await getOneServiceHeaders();\r\n const appEnvironment = getAppEnvironment();\r\n const activityId = appEnvironment.ActivityId;\r\n\r\n if (appEnvironment.SendFeedCallActivityIdInHeader && activityId) {\r\n headers[oneServiceHeaders.activityId] = activityId;\r\n }\r\n\r\n return headers;\r\n }\r\n\r\n /**\r\n * Gets the location query string parameters\r\n */\r\n export function getLocationParams(): KeyValuePair {\r\n const appEnvironment = getAppEnvironment();\r\n const latitude = appEnvironment.Latitude;\r\n const longitude = appEnvironment.Longitude;\r\n\r\n if (latitude && longitude) {\r\n return { key: oneServiceQueryStringKeys.location, value: `${latitude}|${longitude}` };\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the OCID generated from the telemetry TrackInfo if it is valid, otherwise returns the ocid specifier\r\n * @param trackInfo The track info\r\n * @param ocidSpecifier The OCID\r\n * @returns The OCID to use.\r\n */\r\n export function getOneServiceOCID(trackInfo: ITrackInfo, ocidSpecifier: string): string {\r\n if (Utility.isNonNullObject(trackInfo) &&\r\n Utility.isNonNullObject(trackInfo.sitePage) &&\r\n isString(trackInfo.sitePage.page_product) &&\r\n isString(trackInfo.sitePage.page_type)) {\r\n return trackInfo.sitePage.page_product + \"-\" + trackInfo.sitePage.page_type + (ocidSpecifier ? \"-\" + ocidSpecifier : \"\");\r\n } else {\r\n return ocidSpecifier;\r\n }\r\n }\r\n\r\n /**\r\n * Sets up base request data for One Service calls\r\n * @param method\r\n * @returns - RequestInit\r\n */\r\n export async function getBaseRequestData(method): Promise {\r\n const requestObj: RequestInit = {\r\n headers: await OneServiceUtility.getOneServiceHeaders(),\r\n method\r\n };\r\n\r\n return requestObj;\r\n }\r\n\r\n /**\r\n * Populates the request init and return commonParams\r\n * @param ocid -- the ocid for this request\r\n * @returns {KeyValueArray} - parameters as a key/value array\r\n */\r\n export function getCommonParams(ocid: string): KeyValueArray {\r\n if (getHeadData().UserIsSignedIn) {\r\n return this.getOneServiceParamsWithAuth(getAppEnvironment().UserId, ocid);\r\n }\r\n\r\n return this.getOneServiceParamsWithoutAuth(getAppEnvironment().UserId, ocid);\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 AdChoices = () => import(/* webpackChunkName: \"icon-assets-AdChoices\" */\"@svgr/webpack?-svgo!../../icons/AdChoices.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 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 Check = () => import(/* webpackChunkName: \"icon-assets-Check\" */\"@svgr/webpack?-svgo!../../icons/Check.svg\");\r\nexport const Chevron = () => import(/* webpackChunkName: \"icon-assets-Chevron\" */\"@svgr/webpack?-svgo!../../icons/Chevron.svg\");\r\nexport const CircleClose = () => import(/* webpackChunkName: \"icon-assets-CircleClose\" */\"@svgr/webpack?-svgo!../../icons/CircleClose.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 Close = () => import(/* webpackChunkName: \"icon-assets-Close\" */\"@svgr/webpack?-svgo!../../icons/Close.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 Copy = () => import(/* webpackChunkName: \"icon-assets-Copy\" */\"@svgr/webpack?-svgo!../../icons/Copy.svg\");\r\nexport const DarkModeHotel = () => import(/* webpackChunkName: \"icon-assets-DarkModeHotel\" */\"@svgr/webpack?-svgo!../../icons/DarkModeHotel.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 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 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 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 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 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 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 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 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 GenericFile = () => import(/* webpackChunkName: \"icon-assets-GenericFile\" */\"@svgr/webpack?-svgo!../../icons/GenericFile.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 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 HazeSmoke = () => import(/* webpackChunkName: \"icon-assets-HazeSmoke\" */\"@svgr/webpack?-svgo!../../icons/HazeSmoke.svg\");\r\nexport const HazeSmokeWhite = () => import(/* webpackChunkName: \"icon-assets-HazeSmokeWhite\" */\"@svgr/webpack?-svgo!../../icons/HazeSmokeWhite.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 Hide = () => import(/* webpackChunkName: \"icon-assets-Hide\" */\"@svgr/webpack?-svgo!../../icons/Hide.svg\");\r\nexport const HideStory = () => import(/* webpackChunkName: \"icon-assets-HideStory\" */\"@svgr/webpack?-svgo!../../icons/HideStory.svg\");\r\nexport const Hotel = () => import(/* webpackChunkName: \"icon-assets-Hotel\" */\"@svgr/webpack?-svgo!../../icons/Hotel.svg\");\r\nexport const Information = () => import(/* webpackChunkName: \"icon-assets-Information\" */\"@svgr/webpack?-svgo!../../icons/Information.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 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 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 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 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 Mail = () => import(/* webpackChunkName: \"icon-assets-Mail\" */\"@svgr/webpack?-svgo!../../icons/Mail.svg\");\r\nexport const MailNoFill = () => import(/* webpackChunkName: \"icon-assets-MailNoFill\" */\"@svgr/webpack?-svgo!../../icons/MailNoFill.svg\");\r\nexport const MailBlack = () => import(/* webpackChunkName: \"icon-assets-MailBlack\" */\"@svgr/webpack?-svgo!../../icons/MailBlack.svg\");\r\nexport const ManagedBriefcase = () => import(/* webpackChunkName: \"icon-assets-ManagedBriefcase\" */\"@svgr/webpack?-svgo!../../icons/ManagedBriefcase.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 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 Movie = () => import(/* webpackChunkName: \"icon-assets-Movie\" */\"@svgr/webpack?-svgo!../../icons/Movie.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 OneDrive = () => import(/* webpackChunkName: \"icon-assets-OneDrive\" */\"@svgr/webpack?-svgo!../../icons/OneDrive.svg\");\r\nexport const OfficeFormsLogo = () => import(/* webpackChunkName: \"icon-assets-OfficeFormsLogo\" */\"@svgr/webpack?-svgo!../../icons/OfficeFormsLogo.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 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 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 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 Pin = () => import(/* webpackChunkName: \"icon-assets-Pin\" */\"@svgr/webpack?-svgo!../../icons/Pin.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 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 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 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 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 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 Search = () => import(/* webpackChunkName: \"icon-assets-Search\" */\"@svgr/webpack?-svgo!../../icons/Search.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 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 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 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 SunnyDay = () => import(/* webpackChunkName: \"icon-assets-SunnyDay\" */\"@svgr/webpack?-svgo!../../icons/SunnyDay.svg\");\r\nexport const SunnyDayWhite = () => import(/* webpackChunkName: \"icon-assets-SunnyDayWhite\" */\"@svgr/webpack?-svgo!../../icons/SunnyDayWhite.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 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 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 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 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 WeatherAlert = () => import(/* webpackChunkName: \"icon-assets-WeatherAlert\" */\"@svgr/webpack?-svgo!../../icons/WeatherAlert.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 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 { ManagedClasses } from \"@microsoft/fast-jss-manager\";\r\n\r\nimport { IconCssClasses } from \"./Icon.styles\";\r\nimport * as Glyph from \"./icons\";\r\nimport * as GlyphInline from \"./icons/GlyphInline\";\r\n\r\nexport interface IconManagedClasses extends ManagedClasses { }\r\n\r\nexport type GlyphType = (() => Promise) | string;\r\n\r\nexport { Glyph, GlyphInline };\r\n\r\n/**\r\n * Property contract for the {CardAction} component\r\n */\r\nexport interface IconHandledProps extends IconManagedClasses {\r\n /** Icon type props */\r\n glyphType: GlyphType,\r\n /** Aria label optional type props */\r\n ariaLabel?: string,\r\n width?: string,\r\n height?: string,\r\n fill?: string,\r\n onError?: (error: Error) => void,\r\n wrapperClassName?: string\r\n}\r\n\r\nexport interface IconUnhandledProps extends React.HTMLAttributes {\r\n}\r\n\r\nexport type IconProps = IconHandledProps & IconUnhandledProps;","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport enum Market {\r\n BR = \"pt-br\",\r\n ENCA = \"en-ca\",\r\n FRCA = \"fr-ca\",\r\n FRFR = \"fr-fr\",\r\n IN = \"en-in\",\r\n ENUS = \"en-us\",\r\n ZHCN = \"zh-cn\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, WebWorkerErrors, logger, tryGetPerfTimeline } from \"@msnews/diagnostics\";\r\n\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\nimport { isUserNavigatingAway } from \"../utilities/UserNavigation\";\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}\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: any;\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 // TODO: Update inline script to save the messages that were received prior to initialization\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\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(track.trackAppErrorEvent) from @msnews/telemetry-transitional\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 // Do not fire app error if user is navigating away.\r\n if (isUserNavigatingAway()) {\r\n return;\r\n }\r\n\r\n trackAppErrorEvent(data);\r\n } catch (ex) {\r\n logger.logError(`Failed to log web worker AppError. Error: ${JSON.stringify(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 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 subscribeWebWorkerNotification({ id: \"WebWorkerError\", type: \"subscription\" }, onWorkerErrorMessage);\r\n\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 * 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 { IconHandledProps as BaseHandledProps, IconProps as BaseIconProps, IconManagedClasses, IconUnhandledProps } from \"./Icon.props\";\r\nimport { Glyph, GlyphInline, GlyphType } from \"./Icon.props\";\r\nimport manageJss, { ManagedJSSProps } from \"@microsoft/fast-jss-manager-react\";\r\n\r\nimport { Icon as BaseIcon } from \"./Icon\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { IconCssClasses as IconClassNameContract } from \"./Icon.styles\";\r\nimport { IconStyles } from \"./Icon.styles\";\r\nimport { Subtract } from \"utility-types\";\r\n\r\nconst Icon = manageJss(IconStyles)(BaseIcon);\r\ntype Icon = InstanceType;\r\ninterface IconHandledProps extends Subtract { }\r\ntype IconProps = ManagedJSSProps;\r\n\r\nexport {\r\n Icon,\r\n IconProps,\r\n IconClassNameContract,\r\n IconHandledProps,\r\n IconUnhandledProps,\r\n GlyphType,\r\n Glyph,\r\n GlyphInline\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ComponentStyles } from \"@microsoft/fast-jss-manager\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\n\r\n/** CSS class names to apply to various {CardAction} components */\r\nexport interface IconCssClasses {\r\n /** CSS class for the image icon */\r\n icon?: string,\r\n /** CSS class for the inline icon */\r\n icon_inline?: string\r\n}\r\n\r\n/**\r\n * The main JSS stylesheet for {CardAction}\r\n */\r\nexport const IconStyles: ComponentStyles = {\r\n icon: {\r\n \"max-height\": \"100%\",\r\n \"max-width\": \"100%\"\r\n },\r\n icon_inline: {\r\n \"&&\": {\r\n width: \"auto\",\r\n height: \"auto\"\r\n }\r\n }\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { IconHandledProps, IconProps, IconUnhandledProps } from \"./Icon.props\";\r\nimport React, { CSSProperties } from \"react\";\r\n\r\nimport Foundation from \"@microsoft/fast-components-foundation-react\";\r\nimport { Glyph } from \".\";\r\nimport { HandledPropsKeys } from \"@msnews/core\";\r\n\r\n/**\r\n * Icon state\r\n */\r\ninterface IconState {\r\n /**\r\n * Svg component that we are lazy loading. Normally, we would use React.lazy and React.suspense, but those are not recommended for \r\n * production with Preact. Using them will cause CardActions to break.\r\n */\r\n svgComponent?: React.ComponentType>;\r\n}\r\n\r\n/**\r\n * Icon component\r\n * @class - Icon\r\n * @classdesc - The Icon component. Renders the image with respective glyph icon\r\n * @default\r\n */\r\nexport class Icon extends Foundation {\r\n /**\r\n * Component HandledProps enumeration. Anything not enumerated here will be included in the experience root HTML tag via unhandledProps()\r\n */\r\n protected handledProps: HandledPropsKeys = {\r\n ariaLabel: undefined,\r\n fill: undefined,\r\n glyphType: undefined,\r\n height: undefined,\r\n managedClasses: undefined,\r\n onError: undefined,\r\n width: undefined,\r\n wrapperClassName: undefined\r\n };\r\n\r\n constructor(props: IconProps) {\r\n super(props);\r\n this.state = {\r\n svgComponent: null\r\n };\r\n }\r\n\r\n /**\r\n * If glyphType is a promise, lazy load the component with the promise. Once loaded, update state with the new\r\n * component.\r\n * @method\r\n */\r\n public componentDidMount() {\r\n const { glyphType } = this.props;\r\n\r\n if (typeof glyphType === \"function\") {\r\n glyphType().then((m) => {\r\n this.setState({ svgComponent: m.ReactComponent });\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * If glyphType is a promise and has changed, lazy load the new component with the promise. Once loaded, update\r\n * state with the new component.\r\n * @method\r\n * @param {IconProps} prevProps - props before update\r\n */\r\n public componentDidUpdate(prevProps: IconProps) {\r\n const { glyphType } = this.props;\r\n\r\n if (typeof glyphType === \"function\" && glyphType !== prevProps.glyphType) {\r\n glyphType().then((m) => {\r\n this.setState({ svgComponent: m.ReactComponent });\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Updating state before render. If there is no glyphType, we can set this.state.svgComponent to null. This avoids\r\n * an extra render if we tried to use setState in componentDidUpdate to set this.state.svgComponent to null.\r\n * @method\r\n * @param {IconProps} props - props to be used in the upcoming render\r\n * @param {IconState} state - state to be used in the upcoming render\r\n * @returns {IconState} - updated state to be used in the next render\r\n */\r\n public static getDerivedStateFromProps(props: IconProps, state: IconState): IconState {\r\n const { glyphType } = props;\r\n\r\n if (!glyphType) {\r\n return {\r\n svgComponent: null\r\n }\r\n } else {\r\n return state;\r\n }\r\n }\r\n\r\n /**\r\n * Render our lazy loaded svg component\r\n * @method\r\n * @param {React.ComponentType} LazyLoadedSvgComponent - the lazy loaded svg component we're going to render\r\n * @returns {JSX.Element} A JSX element with a span wrapping our lazy loaded svg component\r\n */\r\n private renderSvgComponent(LazyLoadedSvgComponent: React.ComponentType): JSX.Element {\r\n const { height, width, fill, managedClasses } = this.props;\r\n const attrProps: React.SVGAttributes = {};\r\n\r\n if (width) {\r\n attrProps.width = width;\r\n }\r\n\r\n if (height) {\r\n attrProps.height = height;\r\n }\r\n\r\n return ();\r\n }\r\n\r\n /**\r\n * Component renderer\r\n * @public\r\n * @method\r\n * @returns {JSX.Element} the image component containing a glyph icon\r\n */\r\n public render(): JSX.Element {\r\n const { ariaLabel, height, managedClasses, glyphType, width, wrapperClassName, fill } = this.props;\r\n if (!glyphType) {\r\n return (null);\r\n }\r\n const role = ariaLabel ? \"img\" : \"presentation\";\r\n\r\n if (typeof glyphType === \"string\") {\r\n // when glyphType is string, use img tag\r\n let icon = glyphType as string;\r\n if (Glyph[icon]) {\r\n icon = Glyph[icon];\r\n }\r\n return ();\r\n }\r\n\r\n let wrapperCss: CSSProperties = {};\r\n if (width) {\r\n wrapperCss.width = width;\r\n }\r\n if (height) {\r\n wrapperCss.height = height;\r\n }\r\n\r\n if (!wrapperCss.width && !wrapperCss.height) {\r\n wrapperCss = undefined;\r\n }\r\n\r\n return (\r\n \r\n { this.state.svgComponent ? this.renderSvgComponent(this.state.svgComponent) : () }\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\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\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 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 let 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\n// define function to generate valid rfc4122 \"Version 4\"-compliant randomized guid value\r\n// http://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\r\n\r\nexport default function guidGen() {\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 var timestampSeed = new Date().getTime();\r\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, getDigit);\r\n\r\n function getDigit(c) {\r\n // generate a random timestmp-seeded hex digit\r\n var 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","// © 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}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActionMap } from \"@msnews/experiences-redux\";\r\nimport { ExperienceDeferralInfo } from \"./data-model/ExperienceDeferralInfo\";\r\nimport { ExperienceLoadingState } from \"./data-model/ExperienceLoadingState\";\r\nimport { MilestonePlugin } from \"./data-model\";\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 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 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 = (endTime?: number) => void;\r\n\r\nexport type UpdateBelowTheFoldTransitionSignature = (start?: boolean) => 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 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 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 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 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 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\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * If user is navigating away or not.\r\n */\r\nlet userNavigatingAway: boolean = false;\r\n\r\nif (canUseDOM()) {\r\n // Sets isUserNavigatingAway = true when user is navigating away.\r\n window.addEventListener(\"beforeunload\", function () {\r\n userNavigatingAway = true;\r\n });\r\n}\r\n\r\n/**\r\n * Is user navigating away.\r\n * @returns true if user is navigating away.\r\n */\r\nexport function isUserNavigatingAway(): boolean {\r\n return userNavigatingAway;\r\n}","// © 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 { logger } from \"../logging\";\r\n\r\n/** Perf marker start suffix */\r\nconst StartMarkSuffix: string = \"-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 this.initialize(performance);\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 let performance = this.performance;\r\n if (performance && performance.mark) {\r\n performance.mark(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 let 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 let perfMarkers: { [id: string]: PerfMarkerDetail; } = {};\r\n\r\n // Get all perf markers from browser.\r\n let 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 let 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 let 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: number = 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\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 let getTrack: IGetTrack = () => {\r\n return requireAsync(\"track\");\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};","// © 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\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 let getTrackExtCompleteCanary: IGetTrackExtComplete = () => {\r\n return requireAsync(\"c.trackExtComplete\");\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { getTrack } from \"./PrimeTrack\";\r\nimport { getTrackExtCompleteCanary } from \"./PrimeTrackExtensionComplete\";\r\nimport { getTrackInfo } from \"./PrimeTrackInfo\";\r\nimport { AppError } from \"@msnews/diagnostics\";\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\n\r\nlet trackingResolved: boolean = false;\r\nlet trackingObject: PrimeGlobal.ITrack = null;\r\nlet trackExtCompleted: any = null;\r\nlet trackEventBuffer: trackingEventCall[] = [];\r\nlet trackImpressionBuffer: trackPartialImpression[] = [];\r\nlet trackAppErrorEventBuffer: AppError[] = [];\r\nlet trackingPromiseCalled: boolean = 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 * 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()\r\n * @void\r\n */\r\nfunction processPendingTrackingCall(): void {\r\n Promise.all([getTrack(), getTrackExtCompleteCanary()])\r\n .then(modules => {\r\n [trackingObject, trackExtCompleted] = 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}\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 {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\nexport function handleTelemetryCall(event: Event, element: HTMLElement, 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 {boolean} visibilityCheck\r\n * @param {TrackMechanism} mechanism\r\n * @param {string} topLevelContainerType\r\n * @void\r\n */\r\nexport function handlePartialPageImpressionCall(elem?: HTMLElement, 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}","// © 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 let getMediator: IGetMediator = () => {\r\n return requireAsync(\"mediator\");\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 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 ExperienceTrackerData = \"ExperienceTrackerData\",\r\n ExperienceTrackerEdgeData = \"ExperienceTrackerEdgeData\",\r\n ExperienceTrackerEdgeNextData = \"ExperienceTrackerEdgeNextData\",\r\n ExperienceTrackerFirstPartyData = \"ExperienceTrackerFirstPartyData\",\r\n ExperienceTrackerHomePageData = \"ExperienceTrackerHomePageData\",\r\n ExperienceTrackerHubData = \"ExperienceTrackerHubData\",\r\n ExperienceTrackerMicrosoftNewsData = \"ExperienceTrackerMicrosoftNewsData\",\r\n ExperienceTrackerOfficeData = \"ExperienceTrackerOfficeData\",\r\n ExperienceTrackerViewsData = \"ExperienceTrackerViewsData\",\r\n ExperienceTrackerWindowsData = \"ExperienceTrackerWindowsData\",\r\n FeedbackData = \"FeedbackData\",\r\n IrisData = \"IrisData\",\r\n LayoutPreferenceData = \"LayoutPreferenceData\",\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 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 SmartListSharedData = \"SmartListSharedData\",\r\n TelemetryData = \"TelemetryData\",\r\n TelemetryDataEdgeChromium = \"TelemetryDataEdgeChromium\",\r\n TopicData = \"TopicData\",\r\n VerticalPropertyData = \"VerticalPropertyData\",\r\n VideoDataManager = \"VideoDataManager\",\r\n WeatherData = \"WeatherData\"\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 let 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 { 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: number = 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 let 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\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\n/// Adds functions events.bind and events.unbind that bind and unbind events\r\n\r\nexport default {\r\n bind: bindEvent,\r\n unbind: unbindEvent\r\n};\r\n\r\nfunction bindEvent(element, type, handler) {\r\n if (element.addEventListener) {\r\n element.addEventListener(type, handler, false);\r\n }\r\n}\r\n\r\nfunction unbindEvent(element, type, handler) {\r\n if (element.removeEventListener) {\r\n element.removeEventListener(type, handler, false);\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n// /**\r\n// * Provides common XSS escaping implementations.\r\n// * @returns {Escape}\r\n// */\r\n// regex that looks for all the various dangerous HTML characters that we want to escape.\r\n// every character in this match MUST have a corresponding map entry in sequenceValues,\r\n// or it will be removed from the string we are escaping.\r\nvar sequenceTokens = /[\"&'\\/<>]/g;\r\n\r\n// mapping object from the character we want to replace to the escape sequence for it.\r\n// make sure that every character in the above regex is represented with an escape\r\n// sequence in this object.\r\nvar sequenceValues = {\r\n \"\\\"\": \""\",\r\n \"&\": \"&\",\r\n \"'\": \"'\",\r\n \"/\": \"/\",\r\n \"<\": \"<\",\r\n \">\": \">\"\r\n};\r\n\r\nexport default {\r\n url: encodeURI,\r\n urlPart: encodeURIComponent,\r\n html: escapeHtml\r\n};\r\n\r\n/**\r\n * Encodes a text string as a valid Uniform Resource Identifier (URI)\r\n * @param {string} text - A value representing an encoded URI.\r\n * @return {string}\r\n */\r\nfunction encodeURI(text) {\r\n // be sure to use a NON-STRICT comparison here so we get both null AND undefined.\r\n // will ALWAYS return a string; empty string if passed null or undefined.\r\n return (text != null && encodeURI(text)) || \"\";\r\n}\r\n\r\n/**\r\n * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).\r\n * @param {string} text - A value representing an encoded URI component.\r\n * @returns {string}\r\n */\r\nfunction encodeURIComponent(text) {\r\n // be sure to use a NON-STRICT comparison here so we get both null AND undefined.\r\n // will ALWAYS return a string; empty string if passed null or undefined.\r\n // @ts-ignore\r\n return (text != null && window.encodeURIComponent(text)) || \"\";\r\n}\r\n\r\n/**\r\n * Encodes a text string as a valid html, by mapping object from the character we want to replace to the escape sequence for it.\r\n * @param {string} text - The text\r\n * @returns {string}\r\n */\r\nfunction escapeHtml(text) {\r\n // make sure text is a string (string concate with an empty string forces the type),\r\n // and then run a regex that finds all the characters we want to escape, and passes\r\n // each character to a function expression that looks up the appropriate replacement\r\n // sequence from an object map (key = character to replace, value = escaped sequence).\r\n // be sure to use a NON-STRICT comparison here so we get both null AND undefined.\r\n // will ALWAYS return a string; empty string if passed null or undefined.\r\n return (text != null && (\"\" + text).replace(sequenceTokens, function (ch) {\r\n return sequenceValues[ch] || \"\";\r\n })) || \"\";\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n// /**\r\n// * The navigatio module\r\n// * @param {Escape} escape - The escape.\r\n// * @param {Document} document - The document.\r\n// * @returns {Navigation}\r\n// */\r\nimport escape from \"./escape\";\r\n\r\n/** @type {Navigation} - The navigation object. */\r\nvar navigation = {\r\n getUrl: function(relativeUrl) {\r\n if (navigation.filter) {\r\n // @ts-ignore\r\n return navigation.filter(relativeUrl);\r\n }\r\n\r\n return relativeUrl;\r\n },\r\n navigate: function (url, replace) {\r\n if (navigation.filter) {\r\n // @ts-ignore\r\n url = navigation.filter(url);\r\n }\r\n if (replace) {\r\n location.replace(url);\r\n } else {\r\n location.href = url;\r\n }\r\n },\r\n getHostName: getHostName,\r\n parseUrl: parseUrl,\r\n isLocal: function (url) {\r\n var hostname = getHostName(url);\r\n return !hostname || (location.hostname == hostname);\r\n },\r\n getParams: getParams,\r\n getParamsFromUrl: function (url, supportMultiple?, decodeComponents?) {\r\n var queryString = url.split(\"?\")[1];\r\n return getParams(queryString, supportMultiple, decodeComponents);\r\n },\r\n // merge query string parameters with a set of new parameters. This does not support duplicate keys\r\n mergeQueryStringParams: function (url, newParams) {\r\n if (newParams) {\r\n var urlParts = url.split(\"?\");\r\n var params;\r\n if (urlParts[1]) {\r\n // get the existing parameters, then merge in the\r\n // new ones, overwriting any values that previously existed.\r\n params = getParams(urlParts[1], false, true);\r\n for (var param in newParams) {\r\n params[param] = newParams[param];\r\n }\r\n } else {\r\n // no existing parameters, so just use the new ones directly\r\n params = newParams;\r\n }\r\n\r\n // now rebuild the url from the parameters\r\n url = urlParts[0];\r\n var separator = \"?\";\r\n for(var param in params) {\r\n if (params[param]) {\r\n url += separator + escape.urlPart(param) + \"=\" + escape.urlPart(params[param]);\r\n } else {\r\n url += separator + escape.urlPart(param);\r\n }\r\n separator = \"&\";\r\n }\r\n }\r\n\r\n return url;\r\n },\r\n filter: null\r\n};\r\n\r\nexport default navigation;\r\n\r\nfunction getParams(queryString, supportMultiple?, decodeComponents?) {\r\n var decodeURIComponentAndPlusSign = function (val) {\r\n val = val.replace(/\\+/g, \" \");\r\n val = decodeURIComponent(val);\r\n return val;\r\n };\r\n\r\n var params = {};\r\n if (queryString) {\r\n // remove hash part.\r\n queryString = queryString.split(\"#\")[0];\r\n var queryArray = queryString.split(\"&\");\r\n for (var ndx = 0; ndx < queryArray.length; ndx++) {\r\n var parts = queryArray[ndx].split(\"=\");\r\n var key = parts[0];\r\n var value = parts[1];\r\n\r\n if (decodeComponents) {\r\n key = decodeURIComponentAndPlusSign(key);\r\n if (value) {\r\n value = decodeURIComponentAndPlusSign(value);\r\n }\r\n }\r\n\r\n if (supportMultiple) {\r\n if (!params[key]) {\r\n params[key] = [];\r\n }\r\n\r\n params[key].push(value);\r\n } else {\r\n params[key] = value;\r\n }\r\n }\r\n }\r\n\r\n return params;\r\n}\r\n\r\n/**\r\n * Parse the given URL.\r\n * For example, \"http://example.com:3000/pathname/?search=test#hash\" returns:\r\n * {\r\n * protocol: \"http:\",\r\n * host: \"example.com:3000\",\r\n * hostName: \"example.com\",\r\n * port: \"3000\",\r\n * path: \"/pathname/\",\r\n * hash: \"#hash\",\r\n * query: \"?search=test\",\r\n * origin: \"http://example.com:3000\"\r\n * }\r\n * @param {string} url\r\n * @returns {{ protocol: string, host: string, hostName: string, port: string, path: string, hash: string, query: string, origin: string }}\r\n */\r\nfunction parseUrl(url) {\r\n var anchor = document.createElement(\"a\");\r\n anchor.href = url;\r\n\r\n return {\r\n protocol: anchor.protocol,\r\n host: anchor.host,\r\n hostName: anchor.hostname,\r\n port: anchor.port,\r\n path: anchor.pathname,\r\n hash: anchor.hash,\r\n query: anchor.search,\r\n origin: anchor.origin\r\n };\r\n}\r\n\r\nfunction getHostName(url) {\r\n return parseUrl(url).hostName;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n// Provides Tracking helper methods unique to the NTP and DHP pages.\r\n//\r\n// Need to add OCID to all links that go to the MSN page.\r\n// Also need to add the OCID, CCID and TDUID values to all links that launch the store.\r\n//\r\n// Provide method to modify trackInfo data prior to TrackPage call usage.\r\n\r\nimport { getLocationHost } from \"@msnews/isomorphic-util\";\r\nimport pageInstance from \"./pageInstance\";\r\nimport { trackInfo } from \"./trackInfo\";\r\n\r\nvar displayOptionsHelper = {};\r\nvar browserAccess = {};\r\n\r\nconst locationHost = getLocationHost();\r\nvar domainParts = locationHost ? locationHost.split(\".\").reverse() : [];\r\nvar hostDomain = domainParts.length > 1 ? domainParts[1] + \".\" + domainParts[0] : locationHost; // handle an internal address\r\nvar windowsStoreHost = \"ms-windows-store\";\r\nvar domainMatchPattern = /[a-z][a-z0-9+\\-.]*:\\/\\/([a-z0-9\\-._~%!$&'()*+,;=]+@)?([a-z0-9\\-._~%]+|\\[[a-z0-9\\-._~%!$&'()*+,;=:]+\\])/i;\r\nvar ocidMatchPattern = /[&?]ocid=([^&]+)/i;\r\nvar ccidMatchPattern = /[&?]ccid=([^&]+)/i;\r\nvar classIdentifierForHlTrackingInApps = \".hltxt\";\r\n\r\n// The following values will not change during the life of the page.\r\n// @ts-ignore\r\nvar msnOcid = trackInfo.sitePage.msnocid || \"\";\r\n// @ts-ignore\r\nvar storeOcid = trackInfo.sitePage.storeocid || \"\";\r\n\r\nfunction addOcidToHref(tHref, target, event) {\r\n /// Adds OCID value to MSN URLs and to Store URLs\r\n /// The href found in track.js\r\n /// The DOM element being tracked.\r\n /// The event.\r\n\r\n // MSN OCID is only applied on NTP and DHP pages.\r\n if (!tHref || !target) {\r\n return;\r\n }\r\n\r\n // in case sitePage was not filled when this resolved, get and save the msnocid and storeocid values.\r\n if (!msnOcid) {\r\n // @ts-ignore\r\n msnOcid = trackInfo.sitePage.msnocid;\r\n }\r\n\r\n if (!storeOcid) {\r\n // @ts-ignore\r\n storeOcid = trackInfo.sitePage.storeocid;\r\n }\r\n\r\n // For the store (Prime and ServiceUI), we need to test the scheme - URL portion before \"://\".\r\n var endOfScheme = tHref.indexOf(\"://\");\r\n var locationOfStore = tHref.indexOf(windowsStoreHost);\r\n var isStoreUrl = endOfScheme > 0 && locationOfStore >= 0 && locationOfStore < endOfScheme;\r\n\r\n // Need to account for ocid and ccid being of mixed case. e.g. parameters.ocid returns null if the\r\n // param is \"Ocid\".\r\n var ocidMatch = tHref.match(ocidMatchPattern);\r\n var ccidMatch = tHref.match(ccidMatchPattern);\r\n\r\n // Fix 1764836. Ad links (e.g. EMS Ads) already contain their own ocid (not ours) on the URL. We need to make sure to keep their ocid value\r\n // and add the ccid value. Some Ads use uppercase OCID parameter.\r\n // NOTE: JS doesn't have negative lookback so selecting values directly doesn't work. Using [1]\r\n // to read the second match which will be the value.\r\n var ocidOnUrl = ocidMatch && ocidMatch[1];\r\n var ccidOnUrl = ccidMatch && ccidMatch[1];\r\n var emsOnUrl;\r\n\r\n if (ocidOnUrl && ccidOnUrl) {\r\n // If this is an EMS Ad it will already have the ocid and ccid values. We need to add our other values.\r\n var initStoreUrl = tHref;\r\n var emsMatch = tHref.match(/[&?]ocid=(ems\\.)/i);\r\n emsOnUrl = emsMatch && emsMatch[1];\r\n\r\n // See if we are an EMS link and do not have emsadid on the URL. If already have one do not add another.\r\n if (emsOnUrl && !initStoreUrl.match(/[=_]emsadid\\./i)) {\r\n initStoreUrl = addCcidToStoreUrl(initStoreUrl.replace(ccidMatchPattern, ''), ccidMatch[1]);\r\n }\r\n\r\n // This has already been modified.\r\n return;\r\n }\r\n\r\n var hashIndex = tHref.indexOf(\"#\");\r\n var hashValue = \"\";\r\n\r\n // Do not modify Prime page URLs - maintain this as only DHP/NTP code.\r\n // If we do not have an ocid on the url.\r\n if (!ocidOnUrl) {\r\n // TopSites uses an href of \"#\" to indicate it should not be a navigation, but it gets changed to the NTP Url with # at the end.\r\n // Some Prime websites also use the # character and we should not affect them, so make this check within the ServiceUI IFDEF.\r\n if (hashIndex === tHref.length - 1) {\r\n return;\r\n }\r\n\r\n // We need the msnocid value if this is the NTP/DHP page.\r\n if (msnOcid) {\r\n var domainMatch = domainMatchPattern.exec(tHref);\r\n var hrefHostName = domainMatch && domainMatch[2];\r\n var linkUrl = tHref;\r\n if (hrefHostName) {\r\n var isMsnDomain = hrefHostName.indexOf(hostDomain) >= 0;\r\n if (isMsnDomain) {\r\n if (hashIndex >= 0) {\r\n hashValue = tHref.substring(hashIndex, tHref.length);\r\n linkUrl = tHref.substring(0, hashIndex);\r\n }\r\n\r\n linkUrl += linkUrl.indexOf('?') > 0 ? \"&\" : \"?\";\r\n linkUrl = linkUrl + \"ocid=\" + msnOcid;\r\n target.href = linkUrl + (hashValue || \"\");\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // If we don't have the store OCID value, just return. We can't add the ocid if we don't have the correct value.\r\n if (!ocidOnUrl && !storeOcid) {\r\n return;\r\n }\r\n\r\n if (isStoreUrl) {\r\n // Bug 1763626 - clicking Top Sites Open App link multiple times added OCID/CCID multiple times.\r\n // If there was a hash at the end of the URL, we used to add the parameters after the hash, and it was\r\n // not recognized as parameters by navigation.getParamsFromUrl(tHref).\r\n // If there is a hash value, save it, and re-add it at the end.\r\n if (hashIndex >= 0) {\r\n hashValue = tHref.substring(hashIndex, tHref.length);\r\n tHref = tHref.substring(0, hashIndex);\r\n }\r\n\r\n // We know that the store URL will have a query string parameter (the ID or PFN).\r\n // If the url already has an ocid on it, don't add another.\r\n var storeUrl = tHref;\r\n if (!ocidOnUrl) {\r\n storeUrl += \"&ocid=\" + storeOcid;\r\n }\r\n\r\n storeUrl = addCcidToStoreUrl(storeUrl, emsOnUrl);\r\n target.href = storeUrl + hashValue;\r\n }\r\n}\r\n\r\nfunction addCcidToStoreUrl(tHref, emsAdId) {\r\n ///Adds Ccid to the Store url.\r\n /// The href found in track.js\r\n /// The optional value for the emsid ccid value\r\n /// Returns Store Url with ccid.\r\n\r\n var ccidMatch = tHref.match(ccidMatchPattern);\r\n var ccidOnUrl = ccidMatch && ccidMatch[1];\r\n var hashIndex = tHref.indexOf(\"#\");\r\n var hashValue = \"\";\r\n\r\n // If the url already has an ccid on it, don't add another, but make sure it has MUID and RID. EMS Ads already have a ocid and ccid values.\r\n if (!ccidOnUrl) {\r\n // TODO: refactor this code , so we don't have to calculate index at different places\r\n if (hashIndex >= 0) {\r\n hashValue = tHref.substring(hashIndex, tHref.length);\r\n tHref = tHref.substring(0, hashIndex);\r\n }\r\n\r\n // We know that the store URL will have a query string parameter (the ID or PFN).\r\n // If the url already has an ocid on it, don't add another.\r\n var storeUrl = tHref;\r\n storeUrl += \"&ccid=\";\r\n\r\n var ccidData = [];\r\n\r\n // If sent an emsAdId value add it first.\r\n if (emsAdId) {\r\n ccidData.push(\"emsadid.\" + emsAdId);\r\n }\r\n\r\n // @ts-ignore\r\n var webig = pageInstance.getRequestId() || trackInfo.sitePage.requestId;\r\n if (webig) {\r\n ccidData.push(\"webig.\" + webig);\r\n }\r\n\r\n var muid = trackInfo.client.clientId();\r\n if (muid) {\r\n ccidData.push(\"muid.\" + muid);\r\n }\r\n\r\n return storeUrl + ccidData.join(\"_\") + hashValue;\r\n }\r\n\r\n return tHref;\r\n}\r\n\r\nfunction modifyValuesForTrackPage() {\r\n ///Modifies specific trackInfo values for TrackPage, to identify user settings.\r\n /// Returns whether we need to prevent the ComScore beacon from firing.\r\n var noContent = \"_NoContent\";\r\n var topSites = \"-topsites\";\r\n var oneBox = \"-onebox\";\r\n\r\n // If we need to prevent sending a beacon, return true.\r\n var preventComscore = false;\r\n\r\n if (trackInfo.sitePage) {\r\n var hasContent = true;\r\n // when there is rive content\r\n\r\n if (!hasContent) {\r\n // We cannot send a ComScore beacon if we have no content.\r\n preventComscore = true;\r\n }\r\n }\r\n\r\n // add personalization specific properties if they haven't been created before.\r\n if (trackInfo.client\r\n // @ts-ignore\r\n && !trackInfo.client.personalization) {\r\n // add any Spartan DHP/NTP specific personalization related properties to this object\r\n var props;\r\n\r\n // write out the value only if we have any properties set in the property bag\r\n if (props) {\r\n // @ts-ignore\r\n trackInfo.client.personalization = JSON.stringify(props);\r\n }\r\n }\r\n\r\n return { preventComscore: preventComscore };\r\n}\r\n\r\nfunction attachTaglineClickHandler(element) {\r\n /// Modify \"hl\" before the trackEvent.\r\n /// The element (or jquery collection) to process.\r\n /// We do not want to require jquery.\r\n\r\n // If this code becomes needed for Prime, change the IFDEF. Also using a switch if this is a perf issue.\r\n}\r\n\r\nfunction getActionResult(action, isSuccessful) {\r\n /// \r\n /// Gets the action result name based on the action and the fact whether it was successfully executed or not\r\n /// \r\n /// \r\n /// The name of the action (e.g. sethome, addfavorite,...)\r\n /// \r\n /// \r\n /// Flag to indicate whether the action was successfully executed or not\r\n /// \r\n return isSuccessful ? action + \"_succeeded\" : action + \"_failed\";\r\n}\r\n\r\nexport default {\r\n addOcidToHref: addOcidToHref,\r\n modifyValuesForTrackPage: modifyValuesForTrackPage,\r\n attachTaglineClickHandler: attachTaglineClickHandler,\r\n addCcidToStoreUrl: addCcidToStoreUrl,\r\n getActionResult: getActionResult\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n// Implements multiple parallel tracking engine which gets its tracking\r\n// url from the specific implementation using defined functions.\r\n//\r\n// if called multiple times during page interaction (representing significant content\r\n// update), the trackPage method will also publish a \"pageView\" mediator event that third-party\r\n// tracking code can hook to register their refresh page-view beacons.\r\n\r\n/// \r\n/// This function implements multiple parallel tracking engine which gets its tracking\r\n/// url from the specific implementation using defined functions.\r\n/// \r\n/// The tracking info JS library\r\n/// The JS library that provides functionality similar to jQuery's extend function\r\n/// The dom manipulation JS library\r\n/// The JS library for getting cookies\r\n/// The JS library for setting cookies\r\n/// The events object\r\n/// The window object\r\n/// The document object.\r\n/// The mediator JS library\r\n/// Provides access to current navigation URL and helpers\r\n/// Collection of data passed from the server\r\n/// The page instance object\r\n/// Cross browser support for json parse\r\n/// The tracking helper object\r\n/// The storage object\r\n/// The performance marker object\r\n/// The telemetry constant object\r\n/// The JS library that provides functionality for callback when page is revealed. Used for preload scenarios.\r\n/// The datatypes for telemetry library\r\n/// The webStorage object\r\n/// The track object\r\n\r\nimport { Severity, logger } from \"@msnews/diagnostics\";\r\nimport { canUseDOM, getLocationHost, getLocationHref, getLocationProtocol } from \"@msnews/isomorphic-util\";\r\n\r\nimport dom from \"./dom\";\r\nimport events from \"./events\";\r\nimport extend from \"./extend\";\r\nimport mediator from \"./mediator\";\r\nimport navigation from \"./navigation\";\r\nimport pageInstance from \"./pageInstance\";\r\nimport { sessionStorage } from \"@msnews/core\";\r\nimport telemetryConstants from \"./telemetryconstants\";\r\nimport { telemetryDataTypes } from \"./telemetryDataTypes\";\r\nimport { telemetryReadyCallback } from \"./telemetryReadyCallback\";\r\nimport { trackInfo } from \"./trackInfo\";\r\nimport trackingHelper from \"./trackingHelper\";\r\n\r\n// shortcuts to dom functions\r\nvar attr = dom.attr;\r\nvar domName = dom.name;\r\nvar getParent = dom.parent;\r\nvar getChildren = dom.children;\r\nvar recipients = [];\r\nvar refreshPageLoad;\r\nvar doc = canUseDOM() ? document : null;\r\nvar errorLogInterval = 5 * 60 * 1000;\r\n\r\nvar lastClickedTarget = null;\r\n\r\n// After 500 ms, lastClickedTarget will be set as null.\r\nvar clickTargetResetTimeoutInMs = 500;\r\n\r\n// Token to find the custom event token passed on the url. the format would be like this - http://www.msn.com/#tevt=click_nonnav;tobjid=....;...\r\nvar tEvtTag = 'tevt=';\r\n\r\n// If there are more than one tags(name value pair), then the name value pair should be separated with ;\r\nvar regExpEventName = /#tevt=([A-Za-z0-9]+_[A-Za-z0-9]+)(;*)/g;\r\n\r\n// an array of ids that represent what we've already sent to the service as updates\r\n// TODO (rohjain): Remove this cache as we don't need two caches one in trackInfo and another here to maintain for impression updates cache.\r\nvar impressionCache = [];\r\n\r\n// error report interval in milliseconds (5 min = 5 * 60 * 1000)\r\nvar errorReportInterval = telemetryConstants.logSamplingRate || 5 * 60 * 1000;\r\n\r\nmediator.sub(\"logerror\", logErrorEvent);\r\n\r\nfunction trackAll(implementationMethod) {\r\n /// After createReport returns a report, this method fires tracking call for each registered tracking system\r\n\r\n var implementation;\r\n\r\n var parameters = canUseDOM() ? navigation.getParamsFromUrl(getLocationHref()) : {};\r\n\r\n // loop through each implementation\r\n for (var ndx = 0; ndx < recipients.length; ndx++) {\r\n implementation = recipients[ndx];\r\n var defOpts = implementation.defaultOpts;\r\n if (defOpts.disableOnAutoRefresh) {\r\n var names = defOpts.disableOnAutoRefresh.split(';');\r\n var isInList = false;\r\n for (var i = 0; i < names.length; i++) {\r\n if (names[i] == defOpts.id) {\r\n isInList = true;\r\n break;\r\n }\r\n }\r\n\r\n // @ts-ignore\r\n if (isInList && parameters.AR) {\r\n // In case this was generated early, reset to false so the next pageTrack() call will generate the beacon.\r\n defOpts.isGeneratedEarly = false;\r\n continue;\r\n }\r\n }\r\n\r\n if (defOpts.isGeneratedEarly) {\r\n // Don't generate this time, but reset to false so the next pageTrack() call will generate the beacon.\r\n defOpts.isGeneratedEarly = false;\r\n } else if (implementation) {\r\n // TODO: (nubenja) Remove samplingRate everywhere (implementation.samplingRate)\r\n var result = implementation[implementationMethod]();\r\n }\r\n }\r\n\r\n}\r\n\r\nfunction logErrorEvent(errorObject) {\r\n // /// Track error event\r\n // ///\r\n // /// errorObject- defined in errorCategory\r\n // ///\r\n // if (!errorObject)\r\n // {\r\n // return;\r\n // }\r\n // var cacheKey = errorObject.errId + errorObject.errSource;\r\n\r\n // var lastErrorTime = storage.getItem(cacheKey, true);\r\n // var currentTime = new Date().getTime();\r\n // if (lastErrorTime && (currentTime - lastErrorTime) <= errorLogInterval)\r\n // {\r\n // return;\r\n // }\r\n\r\n // trackInfo.event = {\r\n // type: \"app_error\"\r\n // };\r\n // trackInfo.report = errorObject;\r\n // logDiag(JSON.stringify(errorObject), true);\r\n\r\n // trackAll(\"getEventTrackingUrl\");\r\n // storage.setItem(cacheKey, currentTime, true);\r\n}\r\n\r\nfunction depthFirstChildAttribute(element, attributeName, skipElement?) {\r\n /// \r\n /// find the first attribute from the element in the depthFirst manner\r\n /// skips the element if it is specified in elementName\r\n /// \r\n var children = getChildren(element) || [];\r\n var ndx = 0;\r\n var altValue;\r\n\r\n attributeName = attributeName || \"alt\";\r\n\r\n for (; ndx < children.length; ndx++) {\r\n altValue = attr(children[ndx], 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\nfunction findCMValue(element) {\r\n /// \r\n /// create a list of id values separated with '>'\r\n /// walking from generic to specific\r\n /// ending at (not including) wrapper on the generic side\r\n /// \r\n if (element) {\r\n var parent = getParent(element);\r\n var curId = attr(parent, \"id\");\r\n var previousCM;\r\n if (trackInfo.wrapperId == curId) {\r\n return;\r\n }\r\n previousCM = findCMValue(parent);\r\n if (previousCM && curId) {\r\n return [previousCM, curId].join(trackInfo.cmSeparator);\r\n }\r\n return curId || previousCM;\r\n }\r\n}\r\n\r\nfunction getContentElementIndex(element) {\r\n /// \r\n /// count number of trackable elements upto and including the\r\n /// element passed into the function\r\n /// stop at the first parent with an id\r\n /// do not use anything with a new id\r\n /// indexing all elements with the same CM value\r\n /// indexing starts at 1\r\n /// 0 means there is no parent with an id\r\n /// \r\n\r\n if (!element) {\r\n return;\r\n }\r\n\r\n var parent = getParent(element);\r\n var children;\r\n var count = 0;\r\n var ndx = 0;\r\n\r\n // go up first, incase there is no parent id so we don't have to waste a lot of work\r\n if (!attr(parent, \"id\")) {\r\n count = getContentElementIndex(parent);\r\n if (count) {\r\n // by default getContentElementIndex will count the element passed in\r\n // subtract 1 to offset this\r\n count--;\r\n } else {\r\n // only stays 0 if there is no parent or no parent with an id\r\n // bubble up the expected 0 value\r\n return 0;\r\n }\r\n }\r\n\r\n children = getChildren(parent) || [];\r\n for (; ndx < children.length; ndx++) {\r\n if (children[ndx] == element) {\r\n count++;\r\n break;\r\n }\r\n count += countAllTrackableLinks(children[ndx]);\r\n }\r\n\r\n return count;\r\n}\r\n\r\nfunction countAllTrackableLinks(element) {\r\n /// \r\n /// returns count of all trackable elements[contains href and notrack]\r\n /// \r\n var count = 0;\r\n var ndx = 0;\r\n var children;\r\n if (element && !attr(element, \"id\")) {\r\n children = getChildren(element) || [];\r\n if (attr(element, \"href\") && !attr(element, trackInfo.notrack)) {\r\n count++;\r\n }\r\n for (; ndx < children.length; ndx++) {\r\n count += countAllTrackableLinks(children[ndx]);\r\n }\r\n }\r\n return count;\r\n}\r\n\r\nfunction getChildByTargetElement(element, tagName, depth) {\r\n /// \r\n /// Finds the first child element within the provided element with the desired tagName.\r\n /// Goes through all the children/grandchildren to the provided depth (1 = children, 2 = first grandchildren)\r\n /// \r\n /// Element with tagName if found, null if not\r\n if (depth && element && tagName) {\r\n if (element.tagName == tagName) {\r\n // They passed in an element with the correct tagName value.\r\n return element;\r\n }\r\n\r\n var children = getChildren(element) || [];\r\n for (var ndx = 0, dataLength = children.length; ndx < dataLength; ndx++) {\r\n if (children[ndx].tagName == tagName) {\r\n return children[ndx];\r\n } else {\r\n var subChild = getChildByTargetElement(children[ndx], tagName, depth - 1);\r\n if (subChild) {\r\n return subChild;\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nfunction sendSinglePageViewBeacon(beaconId) {\r\n /// \r\n /// This method generates a single beacon without firing any other beacons.\r\n /// Do NOT call track.trackPage() if this is used, or you will generate two of these beacons.\r\n /// \r\n /// \r\n /// The single beacon to generate.\r\n /// \r\n\r\n if (beaconId) {\r\n // loop through each implementation\r\n var implementation;\r\n var implementationMethod = \"getPageViewTrackingUrl\";\r\n var ndx = 0;\r\n\r\n for (; ndx < recipients.length; ndx++) {\r\n implementation = recipients[ndx];\r\n if (implementation.defaultOpts.id === beaconId) {\r\n var result = implementation[implementationMethod]();\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction sendPageViewCandidate() {\r\n /// \r\n /// This fires a request for a page view candidate file required by ComScore.\r\n /// Call this directly, if you are generating new page views which include ComScore and\r\n /// need to identify it as a page view candidate.\r\n /// \r\n\r\n var pvUrl = getLocationProtocol() + \"//\" + getLocationHost(); + \"/pv.xml\";\r\n if (!trackInfo.shouldFireTelemetry()) {\r\n return;\r\n }\r\n\r\n var beaconData = {\r\n url: pvUrl,\r\n requestType: telemetryConstants.GET,\r\n trackingType: telemetryConstants.Comscore\r\n };\r\n\r\n mediator.pub(telemetryConstants.FireTelemetry, beaconData);\r\n}\r\n\r\nfunction trackAdEvent(adParams) {\r\n ///\r\n /// This method tracks the adimpr_update event.\r\n /// Call getEventTrackingUrl to fire the tracking call.\r\n ///\r\n ///\r\n /// adParams- defined as follows\r\n /// adParams = {\r\n /// dst: dapStartTime,\r\n /// den: dapEndTime,\r\n /// id: placementId,\r\n /// pg: pageGroup\r\n /// w: width,\r\n /// h: height,\r\n /// status: status,\r\n /// anAd: appNexusId\r\n /// seqid: sequenceId\r\n /// sdk: sdk\r\n /// fen: finalEndTime\r\n /// };\r\n ///\r\n\r\n trackInfo.event = { type: \"adimpr_update\" };\r\n var adWidth = parseInt(adParams.w);\r\n var adHeight = parseInt(adParams.h);\r\n\r\n // @ts-ignore\r\n trackInfo.report =\r\n {\r\n ///\r\n /// This creates a tracking report.\r\n /// It does NOT send the report, nor does it perform any navigation.\r\n ///\r\n ///\r\n /// Report object that is structured as follows:\r\n /// report = {\r\n /// dst: dapStartTime,\r\n /// den: dapEndTime,\r\n /// id: placementId,\r\n /// pg: pageGroup\r\n /// w: width,\r\n /// h: height,\r\n /// status: status,\r\n /// anAd: appNexusId\r\n /// seqid: sequenceId\r\n /// sdk: sdk\r\n /// fen: finalEndTime\r\n /// };\r\n /// \r\n\r\n dst: adParams.dst,\r\n den: adParams.den,\r\n id: adParams.id,\r\n pg: adParams.pg,\r\n w: isNaN(adWidth) ? 0 : adWidth,\r\n h: isNaN(adHeight) ? 0 : adHeight,\r\n status: adParams.status,\r\n anAd: adParams.anAd,\r\n seqid: adParams.seqid,\r\n sdk: adParams.sdk,\r\n fen: adParams.fen\r\n };\r\n\r\n trackAll(\"getEventTrackingUrl\");\r\n}\r\n\r\nfunction trackAppErrorEventInternal(errorParams) {\r\n ///\r\n /// This method tracks the app_error event.\r\n /// Call getEventTrackingUrl to fire\r\n /// the tracking call.\r\n ///\r\n ///\r\n /// errorParams- defined in errorCategory\r\n ///\r\n\r\n if (!errorParams) {\r\n return;\r\n }\r\n\r\n // Check if it should fire app error.\r\n if (!trackInfo.shouldFireAppError()) {\r\n return;\r\n }\r\n\r\n if (!errorParams.severity) {\r\n errorParams.severity = Severity.Alert;\r\n }\r\n\r\n setAppErrorTrackInfo(errorParams);\r\n trackAll(\"getEventTrackingUrl\");\r\n}\r\n\r\nfunction setAppErrorTrackInfo(errorParams) {\r\n ///Sets the track information object\r\n\r\n var errEventObj = { type: \"app_error\" };\r\n trackInfo.event = errEventObj;\r\n\r\n // @ts-ignore\r\n var report = trackInfo.report =\r\n {\r\n ///\r\n /// This creates a tracking report.\r\n /// It does NOT send the report, nor does it perform any navigation.\r\n ///\r\n ///\r\n ///\r\n /// Error Id - defined in errorCategory\r\n ///\r\n ///\r\n /// Error Message - defined in errorCategory\r\n ///\r\n ///\r\n /// Error Source - defined in errorCategory\r\n ///\r\n //\r\n /// severity - defined in AppErrorTracker.ts\r\n ///\r\n ///\r\n /// Pb (property bag) - defined in AppErrorTracker.ts\r\n ///\r\n ///\r\n /// Report object that is structured as follows:\r\n /// report = {\r\n /// errId: ErrorId,\r\n /// errMsg: ErrorMsg,\r\n /// errMsg: ErrorSource,\r\n /// severity: severity,\r\n /// pb: pb\r\n /// };\r\n /// \r\n errId: errorParams.id,\r\n errMsg: errorParams.message,\r\n errSource: errorParams.source,\r\n severity: errorParams.severity,\r\n pb: errorParams.pb\r\n };\r\n\r\n logDiag(JSON.stringify(report), true);\r\n}\r\n\r\nfunction trackFormSubmitEvent(event, element, destination, headline, module, index, campaign) {\r\n /// \r\n /// This method tracks form events.\r\n /// This methods try to gets the search term.\r\n /// Call trackEvent\r\n /// \r\n /// \r\n /// Event object\r\n /// \r\n /// \r\n /// element that was clicked or target of the event. Passed to createReport.\r\n /// \r\n /// \r\n /// destination url to use instead of computing. Passed to createReport.\r\n /// \r\n /// \r\n /// headline to use instead of computing. Passed to createReport.\r\n ///\t\r\n ///\t\r\n /// content module string to be used instead of computing. Passed to createReport.\r\n /// \r\n /// \r\n /// content index string to be used instead of computing. Passed to createReport.\r\n /// \r\n /// \r\n /// campaign id to be used instead of computing. Passed to createReport.\r\n /// \r\n\r\n ///Helper functions.\r\n function isSearchForm() {\r\n var searchFormId = \"srchfrm\";\r\n if (!element && event) {\r\n element = event.target;\r\n }\r\n\r\n // if element not does not exist or is non trackable\r\n if (!element || attr(element, trackInfo.notrack)) {\r\n return false;\r\n }\r\n return element.id === searchFormId;\r\n }\r\n\r\n function getSearchTerm() {\r\n var searchBox = document.getElementById(\"q\");\r\n if (searchBox) {\r\n // @ts-ignore\r\n return searchBox.value;\r\n }\r\n }\r\n //End of helper functions\r\n\r\n if (isSearchForm()) {\r\n headline = getSearchTerm();\r\n }\r\n\r\n trackEvent(event, element, destination, headline, module, index, campaign);\r\n}\r\n\r\nfunction trackEvent(event, element?, destination?, headline?, module?, index?, campaign?, contentAction?) {\r\n /// \r\n /// This method tracks events.\r\n /// This methods loops through each implementation,\r\n /// Call getEventTrackingUrl and call that url to fire\r\n /// the tracking call.\r\n /// \r\n /// \r\n /// Event object\r\n /// \r\n /// \r\n /// element that was clicked or target of the event. Passed to createReport.\r\n /// \r\n /// \r\n /// destination url to use instead of computing. Passed to createReport.\r\n /// \r\n /// \r\n /// headline to use instead of computing. Passed to createReport.\r\n /// \r\n /// \r\n /// content module string to be used instead of computing. Passed to createReport.\r\n /// \r\n /// \r\n /// content index string to be used instead of computing. Passed to createReport.\r\n /// \r\n /// \r\n /// campaign id to be used instead of computing. Passed to createReport.\r\n /// \r\n /// contentAction enum of the event. Please see list of enum values under telemetryDatatypes.js\r\n /// \r\n\r\n // if element is not passed in, try to get it from event\r\n if (!element && event) {\r\n element = event.target;\r\n }\r\n\r\n // if element not does not exist or is non trackable\r\n if (!element || attr(element, trackInfo.notrack)) {\r\n return;\r\n }\r\n\r\n // for bug 1114449\r\n // element is a jQuery object, not an element\r\n // break out element from jQuery wrapper\r\n if (element.jquery) {\r\n element = element[0];\r\n }\r\n\r\n // Make sure that the trackInfo event does not have a jQuery object for target, or AOP will fail to find a parent.\r\n event = event || {};\r\n // Mark the event that it is already custom handled.\r\n event.customHandled = true;\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Read-only\r\n // event.target = element;\r\n trackInfo.event = event;\r\n var elemHref = element.href || attr(element, \"href\");\r\n\r\n // Temp. Fix: element.getAttribute(attr, 2) returns # only for non-navigational url. Need to get destination with full domain path.\r\n if (elemHref == \"#\") {\r\n elemHref = element[\"href\"];\r\n }\r\n\r\n // find destination value if needed\r\n destination = destination || attr(element, trackInfo.piiurl) ||\r\n elemHref || attr(element, \"action\") || \"\";\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 var dataHlValue = attr(element, \"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 var headlineElement = getChildByTargetElement(element, \"H4\", 2) || getChildByTargetElement(element, \"H3\", 2);\r\n if (headlineElement) {\r\n headline = dom.text(headlineElement);\r\n }\r\n }\r\n\r\n if (typeof headline !== \"string\") {\r\n headline = dataHlValue || attr(element, trackInfo.piitxt) ||\r\n (\"FORM\" == domName(element)\r\n ? trackInfo.defaultFormHeadline\r\n : attr(element, \"title\") || depthFirstChildAttribute(element, \"title\", \"img\") || dom.text(element) || attr(element, \"alt\") || 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 // find module value if needed\r\n module = module || findCMValue(element) || trackInfo.defaultModule;\r\n\r\n // find index value if needed\r\n index = index || (attr(element, \"id\") ? 1 : getContentElementIndex(element));\r\n\r\n // find campaign value if needed\r\n // Added backward compatibility for Old GT1 implementation. If \"GT1-xxxx\" not defined in class, look it into href attribute.\r\n // Example when GT1 defined in a class: class=\"GT1-12345\"\r\n // Example when GT1 is a part of href attribute: href=\"www.msn.com?GT1=12345\"\r\n var clsGT1 = element.className || attr(element, \"class\");\r\n campaign = campaign || (/GT1-(\\d+)\\b/i.exec(clsGT1) ? RegExp.$1 : \"\") ||\r\n (/[?&]GT1=(\\d+)\\b/i.exec(elemHref) ? RegExp.$1 : \"\");\r\n\r\n var moduleInfo = \"\";\r\n var nameLineage = '';\r\n var ordinalLineage = '';\r\n var lineageDelimiter = trackInfo.cmSeparator;\r\n var eventTime;\r\n\r\n if (event && (event.type == trackInfo.eventTypes.click || event.type == trackInfo.eventTypes.nonNavClckEvt || event.type == trackInfo.eventTypes.submit || event.type == trackInfo.eventTypes.contextmenu || event.type == trackInfo.eventTypes.mouseenter)) {\r\n var moduleInfoHeader = \"data-m\";\r\n moduleInfo = attr(element, moduleInfoHeader);\r\n if (!moduleInfo) {\r\n var parent = getParent(element);\r\n moduleInfo = parent ? attr(parent, moduleInfoHeader) : \"\";\r\n }\r\n\r\n try {\r\n // TODO: (nubenja) Remove this once data-m.y is deprecated\r\n // Convertion from telemetryType (e1.y) to telemetryContentType (e1.ct) and telemetryContentAction (ca)\r\n var moduleInfoJson = JSON.parse(moduleInfo);\r\n if (moduleInfoJson && moduleInfoJson.y && !moduleInfoJson.ct) {\r\n var ct = telemetryDataTypes.getTelemetryContentType(moduleInfoJson.y);\r\n\r\n if (ct) {\r\n moduleInfoJson.ct = ct;\r\n }\r\n }\r\n\r\n var actionType;\r\n var behaviorType;\r\n\r\n // Map behavior\r\n if (moduleInfoJson && moduleInfoJson.y) {\r\n behaviorType = telemetryDataTypes.getTelemetryBehavior(moduleInfoJson.y);\r\n }\r\n\r\n // Map action type\r\n if (event.originalEvent === trackInfo.eventTypes.contextmenu) {\r\n actionType = telemetryDataTypes.TelemetryActionType.RightClick;\r\n behaviorType = telemetryDataTypes.TelemetryBehaviorType.ContextMenu;\r\n } else if (event.type === trackInfo.eventTypes.click) {\r\n actionType = telemetryDataTypes.TelemetryActionType.Click;\r\n behaviorType = telemetryDataTypes.TelemetryBehaviorType.Navigate;\r\n } else if (event.type === trackInfo.eventTypes.nonNavClckEvt) {\r\n actionType = telemetryDataTypes.TelemetryActionType.Click;\r\n } else if (event.type === trackInfo.eventTypes.submit) {\r\n actionType = telemetryDataTypes.TelemetryActionType.Submit;\r\n }\r\n } catch (e) {\r\n moduleInfoJson = null;\r\n }\r\n\r\n var elementTelemetryLineage = getLineage(element);\r\n if (elementTelemetryLineage) {\r\n nameLineage = elementTelemetryLineage.nameLineage.reverse().join(lineageDelimiter);\r\n ordinalLineage = elementTelemetryLineage.ordinalLineage.reverse().join(lineageDelimiter);\r\n }\r\n\r\n // assign the time if event already has time field. (added from trackClickEvents)\r\n eventTime = event.time;\r\n }\r\n\r\n // check if destination url is bing or not. if it is, remove all telemetry sensitive data\r\n var duHostname = navigation.getHostName(destination);\r\n if (duHostname && duHostname.toLowerCase().indexOf(\"bing.com\") > -1) {\r\n // filter out privacy sensitive params\r\n destination = track.filterUrlParams(destination, [\"q\", \"pq\"]);\r\n\r\n // remove headline\r\n headline = \"\";\r\n }\r\n\r\n // @ts-ignore\r\n trackInfo.report =\r\n {\r\n /// \r\n /// This method creates a tracking report.\r\n /// It does NOT send the report, nor does it perform any navigation.\r\n ///\r\n /// \r\n /// \r\n /// element that was clicked or target of the event.\r\n /// \r\n /// \r\n /// destination url to use instead of computing.\r\n /// \r\n /// \r\n /// headline to use instead of computing.\r\n /// \r\n /// \r\n /// content module string to be used instead of computing.\r\n /// \r\n /// \r\n /// content index string to be used instead of computing.\r\n /// \r\n /// \r\n /// campaign id to be used instead of computing.\r\n /// \r\n /// \r\n /// data-m section to be used instead of computing.\r\n /// \r\n /// \r\n /// Report object that is structured as follows:\r\n /// report = {\r\n /// destinationUrl: destination,\r\n /// campaignId: '',\r\n /// contentElement: index,\r\n /// contentModule: module,\r\n /// headline: headline,\r\n /// sourceIndex,\r\n /// nodeName,\r\n /// module: moduleInfo,\r\n /// nLineage: nameLineage,\r\n /// oLineage: ordinalLineage,\r\n /// timeToInteract: trackInfo.timeToInteract()\r\n /// };\r\n /// \r\n destinationUrl: destination,\r\n headline: headline,\r\n contentModule: module,\r\n contentElement: index,\r\n campaignId: campaign,\r\n module: moduleInfoJson,\r\n sourceIndex: element.sourceIndex || \"\",\r\n nodeName: element.nodeName || \"\",\r\n nLineage: nameLineage,\r\n oLineage: ordinalLineage,\r\n timeToInteract: trackInfo.timeToInteract(eventTime),\r\n actionType: actionType,\r\n behaviorType: behaviorType\r\n };\r\n\r\n trackAll(\"getEventTrackingUrl\");\r\n}\r\n\r\nfunction trackPageInternal(overrideParams, persistOverriddenParams) {\r\n /// \r\n /// Fires page view call for each registered tracking system at the top of tag\r\n /// \r\n /// override client side params\r\n /// if true overridden params are persisted for other events otherwise false. Default is false\r\n\r\n var perfMarkerTrackingPageViewStart = \"TimeToTrackingPageViewStart\";\r\n var perfMarkerTrackingPageViewEnd = \"TimeToTrackingPageViewEnd\";\r\n\r\n // initialize params and assign default as false.\r\n persistOverriddenParams = !!persistOverriddenParams;\r\n\r\n // clear event in case trackPage is called more than once on a page\r\n delete trackInfo.event;\r\n\r\n // Clear the request id to generate the new request id\r\n // @ts-ignore\r\n delete trackInfo.userStatic.requestId;\r\n\r\n // Clear the override Client Params for every track page request and reassign the parameter.\r\n delete trackInfo.overrideClientParams;\r\n\r\n var paramPageName = \"pg.n\";\r\n var pageName = overrideParams && overrideParams[paramPageName];\r\n if (pageName) {\r\n var paramPageType = \"pg.t\";\r\n var telemetryPageName = telemetryDataTypes.getTelemetryPageInfo(pageName);\r\n if (telemetryPageName) {\r\n overrideParams[paramPageName] = telemetryPageName.PageName;\r\n\r\n var pageType = overrideParams[paramPageType];\r\n var telemetryPageType = telemetryDataTypes.validateTelemetryDataType(telemetryDataTypes.TelemetryPageType, pageType);\r\n if (telemetryPageType) {\r\n overrideParams[paramPageType] = telemetryPageType;\r\n } else if (telemetryPageName.PageType === telemetryDataTypes.TelemetryPageType.Unspecified) {\r\n // @ts-ignore\r\n overrideParams[paramPageType] = trackInfo.sitePage.page_type;\r\n } else {\r\n overrideParams[paramPageType] = telemetryPageName.PageType;\r\n }\r\n }\r\n }\r\n\r\n // This is needed since in prime we include this so that\r\n // telemetry team knows that the page should be ignored due to\r\n // automatic refresh\r\n var signInRefreshedPageKey = \"sign-in-refreshed-page\";\r\n if (sessionStorage.getItem(signInRefreshedPageKey)) {\r\n sessionStorage.removeItem(signInRefreshedPageKey);\r\n (overrideParams = overrideParams || {}).ar = 1;\r\n }\r\n\r\n trackInfo.overrideClientParams = overrideParams;\r\n trackInfo.persistOverriddenParams = persistOverriddenParams;\r\n\r\n var result = trackingHelper.modifyValuesForTrackPage();\r\n if (result && result.preventComscore) {\r\n track.preventBeacon(telemetryConstants.Comscore);\r\n }\r\n\r\n trackAll(\"getPageViewTrackingUrl\");\r\n\r\n // the refreshPageLoad value is undefined (false) at first page load request, and\r\n // we then set it to one (true).\r\n // subsequent calls to trackPage will then publish the mediator pageView event\r\n // that code can listen for to know when the page is generating a \"page view\"\r\n // due to significant content change.\r\n if (refreshPageLoad) {\r\n mediator.pub(\"pageView\");\r\n } else {\r\n refreshPageLoad = 1;\r\n mediator.pub(\"pageViewOnLoad\");\r\n }\r\n\r\n // Clear the override Client Params once the trackPage is fired so that other events don't use the overridden params from memory.\r\n delete trackInfo.overrideClientParams;\r\n}\r\n\r\nexport var track =\r\n{\r\n onContextMenu: onContextMenu,\r\n onClick: onClick,\r\n\r\n trackEvent: trackEvent,\r\n trackFormSubmitEvent: trackFormSubmitEvent,\r\n trackAdEvent: trackAdEvent,\r\n trackVideoEvent: trackVideoEvent,\r\n trackFeedbackEvent: trackFeedbackEvent,\r\n\r\n createEvent: createEvt,\r\n sendPageViewCandidate: sendPageViewCandidate,\r\n sendSinglePageViewBeacon: sendSinglePageViewBeacon,\r\n\r\n clearImpressionCache: clearImpressionCache,\r\n\r\n getFeedbackTrackingParams: getFeedbackTrackingParams,\r\n filterUrlParams: filterUrlParams,\r\n\r\n trackAppErrorEvent: function (errorParams) {\r\n /// \r\n /// This method tracks the app_error event.\r\n /// Call getEventTrackingUrl to fire the tracking call\r\n /// \r\n /// \r\n /// errorParams- defined in errorCategory\r\n /// \r\n\r\n telemetryReadyCallback((): void => {\r\n trackAppErrorEventInternal(errorParams);\r\n });\r\n },\r\n\r\n trackPartialImpression: function (elem, visibilityCheck, mechanism, topLevelContainerType) {\r\n /// The track partial impression will fire an impression update for the element graph.\r\n /// The element graph that contains the data-m attributes\r\n /// Conduct the visibility checking. By default is false\r\n /// Mechanism to capture for impression update. By Default is load. Mechanism load is used whenever the module is loaded and rendered to the user.\r\n /// TopLevelContainer type for impression update\r\n\r\n telemetryReadyCallback((): void => {\r\n trackPartialImpressionInternal(elem, visibilityCheck, mechanism, topLevelContainerType);\r\n });\r\n },\r\n\r\n trackPage: function (overrideParams?, persistOverriddenParams?) {\r\n /// \r\n /// Fires page view call for each registered tracking system at the top of tag\r\n /// \r\n /// override client side params\r\n /// if true overridden params are persisted for other events otherwise false. Default is false\r\n\r\n telemetryReadyCallback((): void => {\r\n trackPageInternal(overrideParams, persistOverriddenParams);\r\n });\r\n },\r\n\r\n trackThirdPartyUpdate: function () {\r\n /// \r\n /// Fires the third party tracking call for Ajax page refresh scenarios like slide refresh.\r\n /// \r\n\r\n mediator.pub(\"thirdPartyTrackingUpdate\");\r\n },\r\n\r\n register: function (...args: any[]) {\r\n /// \r\n /// Registers an implementation with the main Tracking function\r\n /// \r\n /// \r\n /// Implementation of tracking,\r\n /// must implement the following functions\r\n /// GetEventTrackingUrl(trackInfo) - generates url for tracking\r\n /// \r\n /// \r\n /// Implementation of tracking\r\n /// \r\n /// \r\n /// Returns the current object to enable cascading calls\r\n /// \r\n var ndx = 0;\r\n var trackingImplementation;\r\n\r\n // use double-parens to tell the validator that yes, we INTEND this to be an assignment (=)\r\n // and not a mistyped equals (==) conditional test.\r\n while ((trackingImplementation = arguments[ndx++])) {\r\n if (isNaN(trackingImplementation.samplingRate)) {\r\n trackingImplementation.samplingRate = 99;\r\n }\r\n recipients.push(trackingImplementation);\r\n }\r\n },\r\n\r\n getCurrentPageRequestId: function () {\r\n /// \r\n /// Utility function to return the current page request Id. Empty value will be returned if this method is called before\r\n /// telemetry initialization.\r\n /// \r\n /// the current page request Id\r\n /// \r\n\r\n // @ts-ignore\r\n return pageInstance.getRequestId() || trackInfo.sitePage.requestId || \"\";\r\n },\r\n\r\n mapTelemetryParams: function (common, commonMap, params, paramsMap) {\r\n /// \r\n /// Utility function to gather all the telemetry Params.\r\n /// \r\n /// \r\n /// Object contains common parameters.\r\n /// \r\n /// \r\n /// Object contains common param to property mapping\r\n /// E.g. map.sitePage:{ a1: \"page_name\"}\r\n /// this will create a querystring a1=\"value of trackInfo.sitePage.page_name\"\r\n /// \r\n /// \r\n /// Object contains custom parameters.\r\n /// \r\n /// \r\n /// Object contains param to property mapping\r\n /// E.g. map.sitePage:{ a1: \"page_name\"}\r\n /// this will create a querystring a1=\"value of trackInfo.sitePage.page_name\"\r\n /// \r\n /// \r\n /// url that will be called to do the tracking\r\n /// \r\n\r\n var groupKey; \r\n var groupValue; \r\n var key; \r\n var value;\r\n params = extend({}, common, params);\r\n // Get params from commonMap\r\n paramsMap = extend(true, {}, commonMap, paramsMap);\r\n for (groupKey in paramsMap) {\r\n var trackInfoGroupKey = trackInfo[groupKey];\r\n if (trackInfoGroupKey) {\r\n groupValue = paramsMap[groupKey];\r\n for (key in groupValue) {\r\n // check the override client params first\r\n var clientParams = trackInfo.overrideClientParams;\r\n if (key && clientParams && clientParams[key] !== undefined) {\r\n value = clientParams[key];\r\n // if persisting overridden params then override trackInfo group key with value from overridden client params.\r\n if (trackInfo.persistOverriddenParams) {\r\n trackInfoGroupKey[groupValue[key]] = value;\r\n }\r\n } else {\r\n value = trackInfoGroupKey[groupValue[key]];\r\n\r\n if (typeof value == \"function\") {\r\n value = value();\r\n }\r\n }\r\n\r\n // allow for empty strings but use null or undefined to ignore the parameter entirely\r\n if (value != null) {\r\n params[key] = value;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return params;\r\n },\r\n\r\n extend: function (obj) {\r\n extend(true, trackInfo, obj);\r\n },\r\n\r\n form: function (elem) {\r\n /// \r\n /// Helper function to bind Form elements that are part of element for tracking\r\n /// \r\n\r\n if (!elem || !elem.length) {\r\n elem = [elem];\r\n }\r\n var formElem;\r\n var ndx = 0;\r\n\r\n // use double-parens to tell the validator that yes, we INTEND this to be an assignment (=)\r\n // and not a mistyped equals (==) conditional test.\r\n while ((formElem = elem[ndx++])) {\r\n // if element is a form element and has not attr \"data-customformtrack\", bind the submit to it.\r\n // if the attr \"data-customformtrack\" is included, it is entirely reponsible for firing its own\r\n // tracking beacons\r\n if (\"FORM\" == domName(formElem) && !attr(formElem, \"data-customformtrack\")) {\r\n events.bind(formElem, \"submit\", trackFormSubmitEvent);\r\n }\r\n }\r\n },\r\n\r\n preventBeacon: function (beaconId) {\r\n /// Set the value isGeneratedEarly to prevent the sending of a beacon.\r\n /// The name of the beacon as listed in the markets.config file.\r\n if (beaconId) {\r\n beaconId = beaconId.toLowerCase();\r\n\r\n // loop through each implementation\r\n for (var ndx = 0; ndx < recipients.length; ndx++) {\r\n var defOpts = recipients[ndx].defaultOpts;\r\n if (beaconId === defOpts.id.toLowerCase()) {\r\n defOpts.isGeneratedEarly = true;\r\n break;\r\n }\r\n }\r\n }\r\n },\r\n\r\n trackPageRefresh: function (overrideParams?, persistOverriddenParams?) {\r\n /// \r\n /// Fires page view call for each registered tracking system at the top of tag and resets activity Id.\r\n /// \r\n /// override client side params\r\n /// if true overridden params are persisted for other events otherwise false. Default is false\r\n\r\n // calling pageInstance.updatePageInstance() instead of using mediator\r\n // to eliminate delay rid update when executed via mediator.pub\r\n pageInstance.updatePageInstance();\r\n clearImpressionCache();\r\n trackPageInternal(overrideParams, persistOverriddenParams);\r\n\r\n setTimeout(\r\n () => {\r\n trackPartialImpressionInternal(document.getElementById(\"root\"), true, \"load\", null);\r\n },\r\n 1000);\r\n }\r\n};\r\n\r\n// find's all the children dom elements that have the 'data-m' attribute defined.\r\n// also returns the current element if it meets the criteria.\r\nfunction findTelemetryElements(domElement) {\r\n var elements = [];\r\n\r\n // for modern browsers I can use querySelectorAll to find the child elements.\r\n if (domElement && domElement.querySelectorAll) {\r\n var telemetryChildren = domElement.querySelectorAll('[data-m]');\r\n\r\n // include the root if applicable\r\n if (attr(domElement, 'data-m')) {\r\n elements.push(domElement);\r\n }\r\n\r\n // do the children\r\n for (var index = 0; index < telemetryChildren.length; index++) {\r\n elements.push(telemetryChildren[index]);\r\n }\r\n }\r\n\r\n // return the elements\r\n return elements;\r\n}\r\n\r\n// a helper function that will parse json contained within attributes\r\nfunction parseDomAttributeJson(element, attributeName) {\r\n var dataAttr = attr(element, attributeName);\r\n if (dataAttr) {\r\n try {\r\n return JSON.parse(dataAttr);\r\n } catch (e) {\r\n return null;\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\n// a helper function to check if an array contains an element.\r\nfunction contains(item, array) {\r\n if (array.indexOf) {\r\n return array.indexOf(item) !== -1;\r\n } else {\r\n // for IE8\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] === item) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n\r\nfunction trackPartialImpressionInternal(elem, visibilityCheck, mechanism, topLevelContainerType) {\r\n /// The track partial impression will fire an OTF impression update for the element graph.\r\n /// The element graph that contains the data-m attributes\r\n /// Conduct the visibility checking. By default is false\r\n /// Mechanism to capture for impression update. By Default is load\r\n /// TopLevelContainer type for impression update. By Default is load\r\n\r\n var perfMarkerTrackingPartialImprUpdateStart = \"TimeToTrackingPartialImprUpdateStart\";\r\n var perfMarkerTrackingPartialImprUpdateEnd = \"TimeToTrackingPartialImprUpdateEnd\";\r\n\r\n if (elem) {\r\n if (elem.jquery) {\r\n elem = elem[0];\r\n }\r\n\r\n // retrieve the telemetry elements.\r\n var elements = findTelemetryElements(elem);\r\n var formattedModules = [];\r\n\r\n for (var index = 0; index < elements.length; index++) {\r\n var element = elements[index];\r\n if (visibilityCheck && !trackInfo.telemetryTracking.isVisible(element)) {\r\n continue;\r\n }\r\n\r\n var impressionContent = parseDomAttributeJson(element, 'data-m');\r\n var id = impressionContent ? impressionContent.i : undefined;\r\n\r\n // ensure we haven't already sent the payload\r\n if (id !== undefined && !contains(id, impressionCache)) {\r\n // add it to our cache\r\n impressionCache.push(id);\r\n formattedModules.push(impressionContent);\r\n\r\n // TODO: (nubenja) Remove this once data-m.y is deprecated\r\n // Convertion from telemetryType (data-m.y) to telemetryContentType and telemetryContentAction (data-m.ct/ca)\r\n if (impressionContent.y && !impressionContent.ct) {\r\n var ct = telemetryDataTypes.getTelemetryContentType(impressionContent.y);\r\n\r\n if (ct) {\r\n impressionContent.ct = ct;\r\n }\r\n }\r\n }\r\n }\r\n\r\n var context = {};\r\n if (formattedModules && formattedModules.length > 0) {\r\n // @ts-ignore\r\n context.e = formattedModules;\r\n }\r\n\r\n // fire the telemetry event if we were able to get any impression data.\r\n // @ts-ignore\r\n if (context && context.e && context.e.length > 0) {\r\n var mech = (mechanism) ? mechanism : trackInfo.imprUpdateMechanisms.partial;\r\n trackInfo.telemetryTracking.sendImprUpdateEvent(mech, context, topLevelContainerType);\r\n }\r\n }\r\n}\r\n\r\nfunction clearImpressionCache() {\r\n impressionCache = [];\r\n}\r\n\r\nfunction getEventFromUrl(targetUrl) {\r\n /// \r\n /// Check the Current Url and get the event name from the targetUrl.\r\n /// The URL format for the specifying the event name is - url#tevt=EVENTNAME;OTHER_NAME_VALUE_PAIRS\r\n /// \r\n /// \r\n /// The target Url for the event.\r\n /// \r\n /// event name, if it is specified, else null. \r\n\r\n /*\r\n For input value : \"http://www.bing.com/videos/search?q=&mkt=en-GB#tevt=click_nonnav;\"\r\n The result will be like this-\r\n [#tevt=click_nonnav;,click_nonnav,;]\r\n [0] : \"#tevt=click_nonnav;\",\r\n [1] : \"click_nonnav\",\r\n [2] : \";\",\r\n\r\n The 1st element contains the event name.\r\n */\r\n\r\n // If event name is not found, return null, the original event name will be kept.\r\n var result = new RegExp(regExpEventName).exec(targetUrl);\r\n return (result && result.length && result[1]) || null;\r\n};\r\n\r\nfunction getClickEventFromUrl(targetUrl) {\r\n /// \r\n /// Check the Current Url -\r\n /// Case 1- if the Url format is - baseurl/#, then treat it as nonNav event.\r\n /// Match Domain name.\r\n /// If the Url of current page and target page is same and only # is at the end, then it is not navigating away from the page.\r\n ///\r\n /// Case 2 - the Url format is url#tevt=EVENTNAME;OTHER_NAME_VALUE_PAIRS,\r\n /// extract the event name from the Url. the event name is terminated with ;\r\n /// \r\n /// \r\n /// The target Url for the event.\r\n /// \r\n /// \r\n /// event name; if it is a non nav url and no event name is specified then return the default non nav click event name,\r\n /// otherwise, return the event name specified in the url.\r\n /// \r\n\r\n var evtName = null;\r\n if (targetUrl) {\r\n // if the target url contains tevt=, then this url contains the event name. We will extract the event name from url.\r\n if (targetUrl.indexOf(tEvtTag) == -1) {\r\n // If the Url format is - http://www.msn.com/#, then categorize it as nonnav click.\r\n // Convert the baseurl and currentUrl in lowercase for comparison.\r\n var baseUrl = targetUrl.substring(0, targetUrl.indexOf('#')).toLowerCase();\r\n var curUrl = getLocationHref().toLowerCase();\r\n if (curUrl == baseUrl || curUrl.substring(0, curUrl.indexOf('#')) == baseUrl) {\r\n evtName = trackInfo.eventTypes.nonNavClckEvt;\r\n }\r\n } else {\r\n // extract the event name from url.\r\n evtName = getEventFromUrl(targetUrl);\r\n }\r\n }\r\n // Return null, so that the original event is kept.\r\n return evtName;\r\n};\r\n\r\nfunction createEvt(event, eventName, targetElem) {\r\n /// \r\n /// Creates an event based upon the properties of the base event.\r\n /// \r\n /// \r\n /// This is a an input event parameter. Some basic properties are copied from this param to the the event created.\r\n /// \r\n /// \r\n /// Name of the event to be created.\r\n /// \r\n /// \r\n /// Target element that need to be attached to the event being created in this method.\r\n /// \r\n /// An object is created with base properties from the event passed as param. This object is then returned. \r\n\r\n var evt = null;\r\n\r\n if (doc && doc.createEvent) { // Supported by non-IE based browsers.\r\n evt = doc.createEvent(\"Events\");\r\n evt.initEvent(eventName, false, true, targetElem || window,\r\n 0, 0, 0, 0, 0, false, false, false, false, 0, null);\r\n // @ts-ignore\r\n } else if (doc && doc.createEventObject) { // Supported by IE based browsers.\r\n // @ts-ignore\r\n evt = doc.createEventObject(event);\r\n evt.type = eventName;\r\n }\r\n\r\n if (evt) {\r\n evt.customTarget = targetElem;\r\n\r\n // Store the original event type in a field\r\n evt.originalEvent = event && event.type;\r\n }\r\n\r\n return evt;\r\n};\r\n\r\nfunction preventEventDefault(event) {\r\n /// \r\n /// Cancels the event and prevents from being passed further.\r\n /// \r\n /// \r\n /// Input event parameter that need to be canceled.\r\n /// \r\n if (event.preventDefault) { // For Non IE\r\n event.preventDefault();\r\n } else { // For IE\r\n event.returnValue = false;\r\n }\r\n};\r\n\r\nfunction onContextMenu(event) {\r\n /// \r\n /// onContextMenu Handler\r\n /// we'll only track context menu events if the target is a link (A or AREA)\r\n /// This event is used to keep track of when the context menu opens....\r\n /// Right click does not generate onClick events, so we are tracking context menu on all the form factors.\r\n /// \r\n trackClickEvents(event);\r\n};\r\n\r\nfunction onClick(event) {\r\n /// \r\n /// OnClick Handler\r\n /// we'll only track clicks if the target is a link (A or AREA)\r\n /// AND the mouse button isn't the RIGHT button.\r\n /// MOST browsers think the mouse button value is 2. For those that don't, this\r\n /// might have to be revisited.\r\n /// \r\n if (2 == event.button) {\r\n return;\r\n }\r\n\r\n trackClickEvents(event);\r\n};\r\n\r\n/// \r\n/// Computes the lineage of a particular element, passing back the object containing array of 'n's and array of 'o's on the dom tree.\r\n/// \r\n/// An object containing the array of 'n's and array of 'o's on the dom tree starting with the current element, or an empty array if none are found.\r\nfunction getLineage(element) {\r\n var result: any = {};\r\n var nameLineageArray = [];\r\n var ordinalLineageArray = [];\r\n\r\n while (element) {\r\n var telemetryObject = parseDomAttributeJson(element, 'data-m');\r\n if (telemetryObject) {\r\n if (telemetryObject.n) {\r\n nameLineageArray.push(telemetryObject.n);\r\n }\r\n\r\n if (telemetryObject.o) {\r\n ordinalLineageArray.push(telemetryObject.o);\r\n }\r\n }\r\n element = getParent(element);\r\n }\r\n\r\n result.nameLineage = nameLineageArray;\r\n result.ordinalLineage = ordinalLineageArray;\r\n return result;\r\n}\r\n\r\nfunction isClickedTwice(currentTarget) {\r\n /// \r\n /// isClickedTwice method\r\n /// Identify if more than one click event happened on the same element in short span of time.\r\n /// \r\n /// Return true if the user click on the same element twice in short span of time, otherwise false.\r\n\r\n // if lastClickedTarget is same as currentTarget means user clicked on same elements twice to be considered as double click.\r\n try {\r\n if (currentTarget && lastClickedTarget && lastClickedTarget === currentTarget) {\r\n return true;\r\n }\r\n lastClickedTarget = currentTarget;\r\n setTimeout(function () {\r\n // Reset 'lastClickedTarget' after a ceratin time period to avoid any kind of unexpected situation.\r\n lastClickedTarget = null;\r\n }, clickTargetResetTimeoutInMs);\r\n } catch (ex) {\r\n lastClickedTarget = null;\r\n return false;\r\n }\r\n return false;\r\n}\r\n\r\nfunction trackClickEvents(event) {\r\n /// \r\n /// trackClickEvents method\r\n /// Tracks all the click events on links.\r\n /// \r\n\r\n // handle error scenarios.\r\n if (!event) {\r\n return;\r\n }\r\n\r\n // If the event or in the originalEvent the developer has set customHandled=true, which means its been already explicitly fired.\r\n // In those cases, don't fire the implicit event.\r\n if (event.customHandled || (event.originalEvent && event.originalEvent.customHandled)) {\r\n return;\r\n }\r\n\r\n // Temp. Hack for Image Map: In IE9, srcElement associated with window.event is not returning correct element.\r\n // Instead of returning a element, it is returning element. element has no href attribute, neither it's parents do have.\r\n // For this reason, Tracking calls are not fired in IE9.\r\n // This hack will check if the event belongs to ImageMap. If so, it will pick activeElement from document and assign it as target/customTarget.\r\n try {\r\n // Passing the time parameter inside event object with timestamp as a value.\r\n event.time = trackInfo.getCurrentTime();\r\n if (event.customTarget && event.customTarget.useMap) {\r\n event.customTarget = event.customTarget.document.activeElement;\r\n event.target = event.customTarget;\r\n }\r\n } catch (ex) { }\r\n\r\n // we assume that an element with an href (and or an ) is the click-tracking element.\r\n // we also want to target \r\n {this.renderPopOver()}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Renders the pop over menu\r\n * @method\r\n * @returns {JSX.Element} The pop over menu JSX Element\r\n */\r\n private renderPopOver(): JSX.Element {\r\n const { menuOpened, dropDownLocation } = this.state;\r\n const enabled = menuOpened && dropDownLocation && !isNil(dropDownLocation.left) && !isNil(dropDownLocation.top);\r\n\r\n return (\r\n \r\n
\r\n \r\n {this.renderContextMenu()}\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * Renders the context menu items\r\n * @method\r\n * @returns {JSX.Element} The pcontext menu items JSX Element\r\n */\r\n private renderContextMenu(): JSX.Element[] {\r\n const { menuItems } = this.props;\r\n const { contextMenuItem, contextMenuItem_contentRegion, contextMenuItem_image } = this.props.managedClasses;\r\n return menuItems.map(itemProps => (\r\n | React.KeyboardEvent): void => {\r\n e.preventDefault();\r\n this.onMenuItemClick(e, itemProps.onSelect);\r\n }}>\r\n
\r\n {itemProps.icon && (\r\n )}\r\n {itemProps.text}\r\n
\r\n \r\n ));\r\n }\r\n\r\n /**\r\n * Handles unfocusing the Context Menu or Esc key down\r\n * @method\r\n */\r\n private handleUnfocus = (e: Event) => {\r\n const buttonContainerContainsNode = (node: Node) => !this.containerRef.current || this.containerRef.current.contains(node);\r\n // Can't put ref on the PopOver react element, so we attach to a ref div and check its immediate parent\r\n // Must check parent because focus goes to PopOver, which is outside menuRef (otherwise menu closes when you try tab to it)\r\n const menuPopoverContainsNode = (node: Node) => !this.menuRef.current || this.menuRef.current.parentNode.contains(node);\r\n\r\n if (e.target && !buttonContainerContainsNode(e.target as Node) && !menuPopoverContainsNode(e.target as Node)) {\r\n this.closeMenu();\r\n } else if (e.type === \"keydown\") {\r\n const keyEvent = e as KeyboardEvent;\r\n if (keyEvent.keyCode === keyCodeEscape) {\r\n e.preventDefault();\r\n this.closeMenu();\r\n this.buttonRef.current.focus();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Handles closing the menu\r\n * @method\r\n */\r\n private closeMenu = (): void => {\r\n this.setState({ menuOpened: false });\r\n }\r\n\r\n /**\r\n * Handles the click on the menuitems\r\n * @method\r\n */\r\n private onMenuItemClick(event: any, onSelectCallback: (e) => void): void {\r\n if (onSelectCallback) {\r\n onSelectCallback(event);\r\n }\r\n this.closeMenu();\r\n }\r\n\r\n /**\r\n * Handles the click on the settings button to show the context menu\r\n * @method\r\n */\r\n private onSettingClick(e: any): void {\r\n const posOffset = this.props.positionOffset;\r\n const offsetX = posOffset ? posOffset.x : 0;\r\n const offsetY = posOffset ? posOffset.y : 0;\r\n\r\n let dropDownLocation = {};\r\n if (e.target) {\r\n const { top, left, width } = e.target.getBoundingClientRect();\r\n dropDownLocation = { top: top + offsetY + window.scrollY, left: left + offsetX + window.scrollX, offset: width };\r\n }\r\n this.setState({ menuOpened: !this.state.menuOpened, dropDownLocation });\r\n }\r\n}\r\n\r\nexport { CardContextMenu as CardContextMenu };\r\nexport * from \"./CardContextMenu.props\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n DesignSystem,\r\n applyTypeRampConfig,\r\n highContrastSelector,\r\n neutralForegroundRest\r\n} from \"@microsoft/fast-components-styles-msft\";\r\nimport { applyLocalizedProperty, toPx } from \"@microsoft/fast-jss-utilities\";\r\n\r\nimport { ButtonClassNameContract } from \"@microsoft/fast-components-class-name-contracts-msft\";\r\nimport { ComponentStyles } from \"@microsoft/fast-jss-manager\";\r\nimport { SocialMediaIconClassNameContract } from \"./SocialMediaIcon.classnames\";\r\n\r\n/** Value for border radius on icons */\r\nconst borderRadiusIcons = 2;\r\n\r\n/** icon height */\r\nconst iconHeight = 40;\r\n\r\n/** icon width */\r\nconst iconWidth = 40;\r\n\r\n/** label width */\r\nconst labelWidth = 60;\r\n\r\n/**\r\n * The JSS stylesheet for the social media icon\r\n * @type {ComponentStyles}\r\n * @param {DesignSystem} config - The design system configuration interface\r\n */\r\nexport const SocialMediaIconStyles: ComponentStyles = (config: DesignSystem) => {\r\n return {\r\n iconContainer: {\r\n \"border-radius\": toPx(borderRadiusIcons),\r\n height: toPx(iconHeight),\r\n width: toPx(iconWidth),\r\n \"line-height\": toPx(iconHeight),\r\n position: \"relative\",\r\n \"&:hover\": {\r\n cursor: \"pointer\"\r\n }\r\n },\r\n iconImage: {\r\n bottom: \"0\",\r\n left: \"0\",\r\n margin: \"auto\",\r\n position: \"absolute\",\r\n right: \"0\",\r\n top: \"0\"\r\n },\r\n iconLabel: {\r\n \"&&\": {\r\n ...applyTypeRampConfig(\"t8\"),\r\n \"line-height\": \"20px\",\r\n \"text-align\": \"center\",\r\n [applyLocalizedProperty(\"margin-left\", \"margin-right\", config.direction)]: toPx(-(labelWidth - iconHeight) / 2),\r\n \"margin-top\": \"4px\",\r\n padding: \"3px 0\",\r\n width: toPx(labelWidth),\r\n \"&:hover\": {\r\n cursor: \"pointer\"\r\n },\r\n [highContrastSelector]: {\r\n background: \"ButtonFace\",\r\n color: \"LinkText\"\r\n }\r\n }\r\n }\r\n };\r\n};\r\n\r\n/** style to override button existing style */\r\nexport const ButtonStyle: Partial> = (config: DesignSystem) => {\r\n return {\r\n button__justified: {\r\n \"&&\": {\r\n \"background-color\": \"transparent\",\r\n \"text-decoration\": \"none\",\r\n height: \"inherit\",\r\n \"min-width\": \"unset\",\r\n [applyLocalizedProperty(\"padding-left\", \"padding-right\", config.direction)]: toPx((labelWidth - iconHeight) / 2),\r\n \"&:focus\": {\r\n \"outline\": `1px solid ${neutralForegroundRest(config)}`\r\n }\r\n }\r\n }\r\n };\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n SocialMediaIconHandledProps as BaseComponentHandledProps,\r\n SocialMediaIconProps as BaseComponentProps,\r\n SocialMediaIconManagedClasses,\r\n SocialMediaIconUnHandledProps\r\n} from \"./SocialMediaIcon.props\";\r\nimport manageJss, { ManagedJSSProps } from \"@microsoft/fast-jss-manager-react\";\r\n\r\nimport { SocialMediaIcon as BaseComponent } from \"./SocialMediaIcon\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { SocialMediaIconClassNameContract } from \"./SocialMediaIcon.classnames\";\r\nimport { SocialMediaIconStyles } from \"./SocialMediaIcon.styles\";\r\nimport { Subtract } from \"utility-types\";\r\n\r\n/*\r\n * The type returned by manageJss type is very complicated so we'll let the\r\n * compiler infer the type instead of re-declaring just for the package export\r\n */\r\n/* tslint:disable-next-line:typedef */\r\nconst SocialMediaIcon = manageJss(SocialMediaIconStyles)(BaseComponent);\r\ntype SocialMediaIcon = 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\ninterface SocialMediaIconHandledProps extends Subtract { }\r\n\r\n// Create type for manageJSS HOC styled instance we are exporting\r\ntype SocialMediaIconProps = ManagedJSSProps;\r\n\r\n// Export everything a user might need from this index file\r\nexport {\r\n SocialMediaIcon,\r\n SocialMediaIconProps,\r\n SocialMediaIconClassNameContract,\r\n SocialMediaIconHandledProps,\r\n SocialMediaIconUnHandledProps\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Button, ButtonAppearance, Label } from \"@microsoft/fast-components-react-msft\";\r\nimport {\r\n SharingHelper,\r\n SocialMediaDefaultConfig,\r\n SocialMediaItemConfigAttributes,\r\n SocialMediaTarget\r\n} from \"@msnews/views-helpers\";\r\nimport {\r\n SocialMediaIconHandledProps,\r\n SocialMediaIconProps,\r\n SocialMediaIconUnHandledProps\r\n} from \"./SocialMediaIcon.props\";\r\n\r\nimport { ButtonStyle } from \"./SocialMediaIcon.styles\";\r\nimport Foundation from \"@microsoft/fast-components-foundation-react\";\r\nimport { HandledPropsKeys } from \"@msnews/core\";\r\nimport { Icon } from \"@msnews/icon\";\r\nimport React from \"react\";\r\nimport { merge } from \"lodash-es\";\r\n\r\n/**\r\n * Social medial icon component\r\n * @class - The Social Media Icon class\r\n * @classdesc - Renders the visual Social Media Icon used to share links without major social media solutions.\r\n * @export\r\n * @default\r\n */\r\nexport class SocialMediaIcon extends Foundation {\r\n /**\r\n * Social media icon handled props contract\r\n * @protected\r\n * @type { HandledPropsKeys }\r\n */\r\n protected handledProps: HandledPropsKeys = {\r\n managedClasses: undefined,\r\n socialMedia: undefined,\r\n contentUrl: undefined,\r\n contentTitle: undefined,\r\n emailBody: undefined,\r\n hideLabel: undefined,\r\n socialMediaItemConfigOverride: undefined\r\n };\r\n\r\n /**\r\n * Render social media icon\r\n *\r\n * @public\r\n * @return {JSX.Element}\r\n */\r\n public render(): JSX.Element {\r\n const { managedClasses, contentUrl, contentTitle, emailBody, hideLabel, socialMedia, socialMediaItemConfigOverride } = this.props;\r\n const itemConfig = merge({}, SocialMediaDefaultConfig[socialMedia], socialMediaItemConfigOverride);\r\n if (!itemConfig) {\r\n return null;\r\n }\r\n\r\n const shareUrl = SharingHelper.getSocialMediaShareUrl(socialMedia, contentUrl, contentTitle, emailBody, itemConfig.ocid, itemConfig.url);\r\n if (!shareUrl) {\r\n return null;\r\n }\r\n\r\n const target = itemConfig.target.toString();\r\n const targetRelatedAtributes = target === SocialMediaTarget.newWindow ?\r\n { onClick: (event: any) => this.onClickNewWindow(event, shareUrl, itemConfig.newWindowOptions, itemConfig.newWindowTelemetryCall), role: \"button\", \"data-customhandled\": true } :\r\n { href: shareUrl, target: target };\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Handles custom on click when targeting new windows\r\n * @public\r\n * @return {JSX.Element}\r\n */\r\n private onClickNewWindow = (event: any, shareUrl: string, newWindowOptions: any, newWindowTelemetryCall: (event: any) => void): void => {\r\n SharingHelper.openNewWindow(event, shareUrl, newWindowOptions);\r\n if (newWindowTelemetryCall) {\r\n newWindowTelemetryCall(event);\r\n }\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 (let 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 (let 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\nimport { CSSRules, ComponentStyleSheet, ComponentStyles } from \"@microsoft/fast-jss-manager\";\r\nimport {\r\n DesignSystem,\r\n DesignSystemDefaults,\r\n applyAcrylicMaterial,\r\n applyTypeRampConfig,\r\n fontWeight,\r\n highContrastSelector,\r\n neutralForegroundRest\r\n} from \"@microsoft/fast-components-styles-msft\";\r\nimport { applyLocalizedProperty, toPx } from \"@microsoft/fast-jss-utilities\";\r\nimport { get, memoize } from \"lodash-es\";\r\n\r\nimport { DialogClassNameContract } from \"@microsoft/fast-components-react-base\";\r\nimport { ShareDialogClassNameContract } from \"./ShareDialog.classnames\";\r\nimport { ZIndex } from \"@msnews/core\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/** Default values for border radius */\r\nconst borderRadiusCopyLink = 2;\r\nconst borderRadiusDialog = 4;\r\n\r\n/**\r\n * Default color values for the share dialog\r\n */\r\nconst ShareDialogColors = {\r\n dividerLine: \"rgba(0,0,0, 0.05)\",\r\n inputText: \"rgba(0, 1, 0, 0.6)\",\r\n inputBorder: \"rgba(0, 0, 0, 0.2)\",\r\n copyLinkButtonBackground: \"#0078D4\",\r\n copyLinkButtonBackgroundActive: \"#1B64B0\",\r\n copyLinkButtonText: \"#FFF\",\r\n dialogOverlayBackground: \"rgba(0, 0, 0, 0.4)\"\r\n};\r\n\r\n/**\r\n * The JSS stylesheet for the base dialog\r\n * @type {ComponentStyles}\r\n * @param {DesignSystem} config - The design system configuration interface\r\n */\r\nexport const baseDialogStyles: ComponentStyles = (config: DesignSystem) => {\r\n const backgroundColor: string = get(config, \"backgroundColor\", DesignSystemDefaults.backgroundColor);\r\n\r\n return {\r\n dialog: {\r\n display: \"none\",\r\n '&[aria-hidden=\"false\"]': {\r\n display: \"block\"\r\n }\r\n },\r\n dialog_modalOverlay: {\r\n position: \"fixed\",\r\n background: ShareDialogColors.dialogOverlayBackground,\r\n top: \"0\",\r\n left: \"0\",\r\n right: \"0\",\r\n bottom: \"0\",\r\n \"z-index\": `${ZIndex.Above}`\r\n },\r\n dialog_contentRegion: {\r\n position: \"fixed\",\r\n left: \"50%\",\r\n top: \"50%\",\r\n transform: \"translate(-50%, -50%)\",\r\n \"border-radius\": toPx(borderRadiusDialog),\r\n \"box-shadow\": \"none\",\r\n \"z-index\": `${ZIndex.Above + 1}`,\r\n ...applyAcrylicMaterial(backgroundColor, 0.7, 0.7, true)\r\n }\r\n };\r\n};\r\n\r\n /**\r\n * Gets the override style for base dialog based on ZIndex\r\n * @private\r\n * @method\r\n * @return {>} the result style to be passed to base dialog\r\n */\r\nexport const setStyleByZIndex = memoize((overrides: ComponentStyleSheet = {}, zIndex: number = null) => {\r\n return zIndex == null ? overrides : {\r\n ...overrides,\r\n dialog_modalOverlay: {\r\n ...overrides.dialog_modalOverlay,\r\n \"z-index\": zIndex.toString()\r\n },\r\n dialog_contentRegion: {\r\n ...overrides.dialog_contentRegion,\r\n \"z-index\": (zIndex + 1).toString()\r\n }\r\n };\r\n});\r\n\r\n/**\r\n * The JSS stylesheet for the share dialog\r\n * @type {ComponentStyles}\r\n * @param {DesignSystem} config - The design system configuration interface\r\n */\r\nexport const ShareDialogStyles: ComponentStyles = (config: DesignSystem) => {\r\n const iconWidth = 40;\r\n const headerLineHeight = 24;\r\n const backdropFilterStyles: CSSRules = {\r\n background: \"none\"\r\n };\r\n const fallbackStyles: CSSRules = {\r\n background: get(config, \"backgroundColor\", DesignSystemDefaults.backgroundColor)\r\n };\r\n const backdropFilterSupport: boolean = canUseDOM() && (\"backdrop-filter\" in document.documentElement.style || \"-webkit-backdrop-filter\" in document.documentElement.style);\r\n const backgroundStyle: CSSRules = backdropFilterSupport ? backdropFilterStyles : fallbackStyles;\r\n return {\r\n closeButton: {\r\n background: \"transparent !important\",\r\n border: \"none\",\r\n height: `${headerLineHeight}px !important`,\r\n padding: \"0\",\r\n position: \"absolute\",\r\n \"min-width\": toPx(headerLineHeight),\r\n [applyLocalizedProperty(\"right\", \"left\", config.direction)]: \"4px\",\r\n \"&:hover, &:focus, &:active\": {\r\n cursor: \"pointer\"\r\n },\r\n [highContrastSelector]: {\r\n background: \"ButtonFace !important\",\r\n \"& svg\": {\r\n fill: \"ButtonText\"\r\n },\r\n \"&:hover, &:focus, &:active\": {\r\n background: \"Highlight !important\",\r\n \"& svg\": {\r\n fill: \"HighlightText\"\r\n }\r\n }\r\n }\r\n },\r\n closeIcon: {\r\n fill: neutralForegroundRest\r\n },\r\n copyLinkButton: {},\r\n copyLinkInput: {},\r\n dialogContainer: {\r\n ...backgroundStyle,\r\n \"border-radius\": toPx(borderRadiusDialog),\r\n \"box-sizing\": \"content-box\",\r\n padding: \"0 12px\",\r\n \"text-align\": \"center\",\r\n \"& $inputContainer\": {\r\n \"& $copyLinkInput\": {\r\n [applyLocalizedProperty(\"border-top-left-radius\", \"border-top-right-radius\", config.direction)]: toPx(borderRadiusCopyLink),\r\n [applyLocalizedProperty(\"border-bottom-left-radius\", \"border-bottom-right-radius\", config.direction)]: toPx(borderRadiusCopyLink)\r\n }\r\n },\r\n [highContrastSelector]: {\r\n border: \"1px solid Highlight\"\r\n }\r\n },\r\n header: {\r\n \"border-bottom\": `${config.outlineWidth}px solid ${ShareDialogColors.dividerLine}`,\r\n display: \"flex\",\r\n \"line-height\": toPx(headerLineHeight),\r\n padding: \"12px 0\",\r\n \"text-align\": \"center\"\r\n },\r\n headerText: {\r\n ...applyTypeRampConfig(\"t7\"),\r\n \"font-weight\": `${fontWeight.semibold}`,\r\n margin: \"0\",\r\n width: \"100%\"\r\n },\r\n iconListContainer: {\r\n display: \"inline-block\",\r\n \"list-style\": \"none\",\r\n \"text-align\": \"center\",\r\n margin: \"36px 11px 0 11px\",\r\n padding: \"0\"\r\n },\r\n iconListItem: {\r\n float: applyLocalizedProperty(\"left\", \"right\", config.direction),\r\n width: toPx(iconWidth),\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: \"40px\",\r\n \"&:nth-child(4)\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: 0\r\n },\r\n \"&:nth-child(n+5)\": {\r\n \"margin-top\": \"24px\"\r\n },\r\n \"&:nth-child(4n+1)\": {\r\n clear: \"both\"\r\n }\r\n },\r\n inputContainer: {\r\n \"box-sizing\": \"content-box\",\r\n \"padding-top\": \"24px\",\r\n \"padding-bottom\": \"32px\",\r\n \"text-align\": \"center\",\r\n \"& $copyLinkInput\": {\r\n border: `2px solid ${ShareDialogColors.inputBorder}`,\r\n \"box-sizing\": \"content-box\",\r\n color: ShareDialogColors.inputText,\r\n ...applyTypeRampConfig(\"t8\"),\r\n padding: \"1px 0 1px 5px\",\r\n height: \"28px\",\r\n width: \"191px\"\r\n },\r\n \"& $copyLinkButton\": {\r\n background: ShareDialogColors.copyLinkButtonBackground,\r\n [applyLocalizedProperty(\"border-top-right-radius\", \"border-top-left-radius\", config.direction)]: toPx(borderRadiusCopyLink),\r\n [applyLocalizedProperty(\"border-bottom-right-radius\", \"border-bottom-left-radius\", config.direction)]: toPx(borderRadiusCopyLink),\r\n border: \"none\",\r\n color: ShareDialogColors.copyLinkButtonText,\r\n ...applyTypeRampConfig(\"t8\"),\r\n height: \"32px\",\r\n \"vertical-align\": \"middle\",\r\n width: \"89px\",\r\n \"&:hover\": {\r\n cursor: \"pointer\"\r\n },\r\n \"&:active\": {\r\n background: ShareDialogColors.copyLinkButtonBackgroundActive\r\n },\r\n [highContrastSelector]: {\r\n background: \"ButtonFace\",\r\n color: \"ButtonText\",\r\n \"&:hover, &:focus, &:active\": {\r\n background: \"Highlight\",\r\n color: \"HighlightText\"\r\n }\r\n }\r\n }\r\n }\r\n };\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\n/** String resource to be used in the Card Action components */\r\nexport const StringResource = {\r\n dialogStrings: {\r\n dialogButtonClose: \"close dialog\",\r\n dialogTitle: \"Share\",\r\n copyButton: \"Copy\",\r\n copiedButton: \"Link Copied\",\r\n copyButtonAriaLabel: \"copy link to clipboard\",\r\n copiedButtonAriaLabel: \"link copied to clipboard\"\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n AccentButton,\r\n Heading,\r\n HeadingSize,\r\n HeadingTag,\r\n StealthButton\r\n} from \"@microsoft/fast-components-react-msft\";\r\nimport {\r\n DialogProps,\r\n Dialog as MSFTBaseDialog\r\n} from \"@microsoft/fast-components-react-base\";\r\nimport { GlyphInline, Icon } from \"@msnews/icon\" ;\r\nimport { ShareDialogHandledProps, ShareDialogProps, ShareDialogStrings } from \"./ShareDialog.props\";\r\nimport {\r\n SocialMedia,\r\n SocialMediaConfig,\r\n SocialMediaDefaultConfig\r\n} from \"@msnews/views-helpers\";\r\nimport { Telemetry, TelemetryTags } from \"@msnews/experiences-base\";\r\nimport { baseDialogStyles, setStyleByZIndex } from \"./ShareDialog.styles\";\r\n\r\nimport Foundation from \"@microsoft/fast-components-foundation-react\";\r\nimport { HandledPropsKeys } from \"@msnews/core\";\r\nimport React from \"react\";\r\nimport { SocialMediaIcon } from \"@msnews/social-media-icon\";\r\nimport { StringResource } from \"./StringResource\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\nimport manageJss from \"@microsoft/fast-jss-manager-react\";\r\n\r\n/** Base MSFT dialog with overriden style */\r\nconst Dialog = manageJss(baseDialogStyles)(MSFTBaseDialog);\r\n\r\n/** Duration the button should present the \"link copied\" text after a user click */\r\nconst linkCopiedDisplayDuration = 1600;\r\n\r\n/**\r\n * Share dialog state interface\r\n * @export\r\n * @interface ShareDialogState\r\n */\r\nexport interface ShareDialogState {\r\n isLinkCopied: boolean\r\n}\r\n/**\r\n * ShareDialog Component\r\n * @class - ShareDialog\r\n * @classdesc - The ShareDialog component. Renders the dialog that provides social media sharing options\r\n * @default\r\n */\r\nexport class ShareDialog extends Foundation {\r\n /**\r\n * Component HandledProps enumeration. Anything not enumerated here will be included in the experience root HTML tag via unhandledProps()\r\n */\r\n protected handledProps: HandledPropsKeys = {\r\n baseDialogProps: undefined,\r\n closeButtonTelemetryTags: undefined,\r\n contentTitle: undefined,\r\n contentUrl: undefined,\r\n emailBody: undefined,\r\n copyButtonAttributes: undefined,\r\n copyButtonTelemetryProps: undefined,\r\n copyButtonTelemetryTags: undefined,\r\n copyLinkOcid: undefined,\r\n dialogStrings: undefined,\r\n enabled: undefined,\r\n managedClasses: undefined,\r\n onClose: undefined,\r\n renderOneColLayout: undefined,\r\n socialMediaConfigOverride: undefined,\r\n socialMediaItems: undefined,\r\n shareIconTelemetryProps: undefined,\r\n shareIconTelemetryTags: undefined,\r\n baseDialogStyleOverride: undefined,\r\n zIndex: undefined\r\n };\r\n\r\n /**\r\n * Stores the strings to be used in the dialog. Merged default strings with passed from props\r\n * @type {ShareDialogStrings}\r\n */\r\n private dialogStrings: ShareDialogStrings;\r\n\r\n /**\r\n * Social media items config that stores merged values from default and props\r\n * @type {SocialMediaConfig}\r\n */\r\n private socialMediaItemsConfig: SocialMediaConfig;\r\n\r\n /**\r\n * Ref to input field with shared url\r\n * @type {React.RefObject}\r\n */\r\n private readonly inputRef: React.RefObject = React.createRef();\r\n\r\n /**\r\n * Constructs a ShareDialog component\r\n * @constructor\r\n * @param { ShareDialogProps } props props contract\r\n */\r\n constructor(props: ShareDialogProps) {\r\n super(props);\r\n this.state = {\r\n isLinkCopied: false\r\n };\r\n\r\n // Merges some values from props with default values\r\n this.dialogStrings = { ...StringResource.dialogStrings, ...props.dialogStrings };\r\n\r\n this.setSocialMediaItemsConfig();\r\n }\r\n\r\n /**\r\n * Component renderer\r\n * @public\r\n * @method\r\n * @returns {JSX.Element} the ShareDialog component\r\n */\r\n public render(): JSX.Element {\r\n const { managedClasses, enabled, contentUrl, baseDialogProps, onClose, children, closeButtonTelemetryTags, baseDialogStyleOverride, zIndex } = this.props;\r\n if (!enabled || !contentUrl) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n {this.dialogStrings.dialogTitle}\r\n \r\n \r\n \r\n \r\n
\r\n {children}\r\n {this.renderSocialIconsList()}\r\n {this.renderCopyLink()}\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Renders the copy link input and button part of the share dialog\r\n * @private\r\n * @method\r\n * @returns {JSX.Element} the content part of the ShareDialog component\r\n */\r\n private renderCopyLink(): JSX.Element {\r\n const { managedClasses, copyLinkOcid, contentUrl, copyButtonAttributes, copyButtonTelemetryProps, copyButtonTelemetryTags } = this.props;\r\n\r\n const url = copyLinkOcid ? `${contentUrl}?ocid=${copyLinkOcid}` : contentUrl;\r\n const buttonText = this.state.isLinkCopied ? this.dialogStrings.copiedButton : this.dialogStrings.copyButton;\r\n const ariaLabel = this.state.isLinkCopied ? this.dialogStrings.copiedButtonAriaLabel : this.dialogStrings.copyButtonAriaLabel;\r\n\r\n const copyTelemetryTag = copyButtonTelemetryTags || Telemetry.render(copyButtonTelemetryProps);\r\n\r\n return (\r\n
\r\n \r\n \r\n {buttonText}\r\n \r\n
\r\n );\r\n }\r\n\r\n /**\r\n * Copy share url to clipboard and set timer to update the copy link button text\r\n * @private\r\n * @method\r\n */\r\n private onCopyLinkToClipboard = () => {\r\n if (!this.state.isLinkCopied) {\r\n this.setState({ isLinkCopied: true });\r\n this.inputRef.current.select();\r\n document.execCommand(\"copy\");\r\n setTimeout(() => {\r\n /* istanbul ignore next */\r\n this.setState({ isLinkCopied: false });\r\n },\r\n linkCopiedDisplayDuration\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Renders the social items list part of the share dialog\r\n * @private\r\n * @method\r\n * @returns {JSX.Element} the social media list element of the ShareDialog component\r\n */\r\n private renderSocialIconsList(): JSX.Element {\r\n const { managedClasses, socialMediaItems } = this.props;\r\n if (!socialMediaItems || !socialMediaItems.length) {\r\n return null;\r\n }\r\n\r\n const socialMediaIcons = socialMediaItems.map((item) => {\r\n return this.renderSocialIcon(item);\r\n });\r\n\r\n return (\r\n
    \r\n {socialMediaIcons}\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * Renders each individual social media icon of the social media list\r\n * @private\r\n * @method\r\n * @param { string } socialMediaItem The social media item as string\r\n * @returns {JSX.Element} the icon part of the social media list\r\n */\r\n private renderSocialIcon(socialMediaItem: string): JSX.Element {\r\n const { managedClasses, shareIconTelemetryProps, shareIconTelemetryTags, contentTitle, contentUrl, emailBody } = this.props;\r\n const media: SocialMedia = SocialMedia[Object.keys(SocialMedia).find(key => SocialMedia[key] === socialMediaItem.toLowerCase())];\r\n if (!media) {\r\n logger.logError(`ShareDialog: renderSocialIcon: Invalid param: socialMediaItem = ${socialMediaItem}`);\r\n return null;\r\n }\r\n const mediaKey = media.toString();\r\n\r\n const iconTelemetryTags: TelemetryTags = (shareIconTelemetryTags && shareIconTelemetryTags[mediaKey]) ||\r\n (shareIconTelemetryProps && Telemetry.render(shareIconTelemetryProps[mediaKey]));\r\n\r\n return (\r\n
  • \r\n \r\n
  • \r\n );\r\n }\r\n\r\n /**\r\n * Sets configuration specs for social media items based on default and override props values\r\n * @method\r\n */\r\n private setSocialMediaItemsConfig(): void {\r\n this.socialMediaItemsConfig = { ...SocialMediaDefaultConfig };\r\n\r\n // merge default config with override props\r\n if (this.props.socialMediaConfigOverride) {\r\n Object.keys(this.props.socialMediaConfigOverride).forEach((key) => {\r\n const keyLower = key.toLowerCase();\r\n this.socialMediaItemsConfig[keyLower] = { ...this.socialMediaItemsConfig[keyLower], ...this.props.socialMediaConfigOverride[key] };\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Gets the final props to apply to the dialog component\r\n * @private\r\n * @method\r\n * @param {DialogProps} props - the default dialog props\r\n * @returns {DialogProps} the resulting props to be passed to base dialog\r\n */\r\n private coerceDialogProps(props: DialogProps): DialogProps {\r\n return {\r\n visible: this.props.enabled,\r\n modal: true,\r\n contentHeight: \"auto\",\r\n contentWidth: this.props.renderOneColLayout ? \"100%\" : \"346px\",\r\n ...props\r\n };\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n ShareDialogHandledProps as BaseShareDialogHandledProps,\r\n ShareDialogProps as BaseShareDialogProps,\r\n ShareDialogManagedClasses,\r\n ShareDialogStrings,\r\n ShareDialogUnhandledProps\r\n} from \"./ShareDialog.props\";\r\nimport manageJss, { ManagedJSSProps } from \"@microsoft/fast-jss-manager-react\";\r\n\r\nimport { ShareDialog as BaseShareDialog } from \"./ShareDialog\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { ShareDialogClassNameContract } from \"./ShareDialog.classnames\";\r\nimport { ShareDialogStyles } from \"./ShareDialog.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\r\n* compiler infer the type instead of re-declaring just for the package export\r\n*/\r\nconst ShareDialog = manageJss(ShareDialogStyles)(BaseShareDialog);\r\ntype ShareDialog = 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\ninterface ShareDialogHandledProps\r\n extends Subtract {}\r\n\r\n// Create type for manageJSS HOC styled instance we are exporting\r\ntype ShareDialogProps = ManagedJSSProps<\r\n BaseShareDialogProps,\r\n ShareDialogClassNameContract,\r\n DesignSystem\r\n>;\r\n\r\n// Export everything a user might need from this index file\r\nexport {\r\n ShareDialog,\r\n ShareDialogProps,\r\n ShareDialogHandledProps,\r\n ShareDialogUnhandledProps,\r\n ShareDialogManagedClasses,\r\n ShareDialogClassNameContract,\r\n ShareDialogStrings\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ArticleCardHandledProps, ArticleCardProps, ArticleCardUnhandledProps } from \"./ArticleCard.props\";\r\nimport { HandledPropsKeys, ShallowCompare } from \"@msnews/core\";\r\nimport { Heading, Image, Typography } from \"@microsoft/fast-components-react-msft\";\r\n\r\nimport Foundation from \"@microsoft/fast-components-foundation-react\";\r\nimport React from \"react\";\r\n\r\n/**\r\n * Article card state interface\r\n */\r\nexport interface ArticleCardState {}\r\n\r\n/**\r\n * Article card component\r\n * @class - Article card\r\n * @classdesc - Article card component base; provides semantic structure of a basic article card.\r\n * @export\r\n * @default\r\n */\r\nclass ArticleCard extends Foundation {\r\n /**\r\n * Article card handled props contract\r\n * @protected\r\n * @type { HandledPropsKeys}\r\n */\r\n protected handledProps: HandledPropsKeys = {\r\n anchorRef: undefined,\r\n headlineTitle: undefined,\r\n href: undefined,\r\n image: undefined,\r\n managedClasses: undefined,\r\n provider: undefined\r\n };\r\n\r\n /**\r\n * Construct a new article card\r\n * @constructor\r\n * @param { ArticleCardHandledProps } props the props contract for ArticleCard\r\n */\r\n constructor(props: ArticleCardHandledProps) {\r\n super(props);\r\n }\r\n\r\n /**\r\n * Performs a shallow comparison on the props\r\n * @param nextProps Incoming props\r\n * @param nextState Incoming state. Ignored as component is stateless\r\n */\r\n public shouldComponentUpdate(nextProps: ArticleCardProps): boolean {\r\n return !ShallowCompare(this.props, nextProps);\r\n }\r\n\r\n /**\r\n * Renders the component\r\n * @method\r\n * @returns {JSX.Element} the ArticleCard JSX element\r\n */\r\n public render(): JSX.Element {\r\n return (\r\n \r\n {this.renderContent()}\r\n {this.props.children}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Renders the content component of the article\r\n * @method\r\n * @returns {JSX.Element} the content of an article\r\n */\r\n private renderContent(): JSX.Element {\r\n let content: JSX.Element;\r\n const { href, managedClasses } = this.props;\r\n\r\n if (href) {\r\n content = (\r\n \r\n {this.renderImage()}\r\n
    \r\n {this.renderTitle()}\r\n {this.renderProvider()}\r\n
    \r\n
    \r\n );\r\n } else {\r\n content = (\r\n
    \r\n {this.renderImage()}\r\n
    \r\n {this.renderTitle()}\r\n {this.renderProvider()}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n return content;\r\n }\r\n\r\n /**\r\n * Renders the card image component of the article\r\n * @method\r\n * @returns {JSX.Element} the image component of an article\r\n */\r\n private renderImage(): JSX.Element {\r\n if (!this.props.image) {\r\n return;\r\n }\r\n\r\n const { articleCard_imageWrapper, articleCard_image, articleCard_imageOverlay } = this.props.managedClasses;\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n /**\r\n * Renders the headline title component of the article\r\n * @method\r\n * @returns {JSX.Element} the headline title component of an article\r\n */\r\n private renderTitle(): JSX.Element {\r\n const { articleCard_headline, articleCard_headlineText, articleCard_headlineMask } = this.props.managedClasses;\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n /**\r\n * Renders the article provider component of an article\r\n * @method\r\n * @returns {JSX.Element} the article provider component if it exists\r\n */\r\n private renderProvider(): JSX.Element {\r\n if (!this.props.provider) {\r\n return;\r\n }\r\n\r\n let providerImage: JSX.Element;\r\n if (this.props.provider.image && this.props.provider.image.src) {\r\n providerImage = (\r\n \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n {providerImage}\r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default ArticleCard;\r\nexport * from \"./ArticleCard.props\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { SocialMedia, SocialMediaDefaultConfig } from \"./SocialMediaConfig\";\r\nimport { getLocationHref, getLocationOrigin } from \"@msnews/isomorphic-util\";\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 { 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 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(media: string, contentUrl: string, contentTitle: string, emailBody?: string, ocid?: string, overrideShareUrl?: string): string {\r\n if (!media || !contentUrl || !contentTitle) {\r\n logger.logError(`SharingHelper: getSocialMediaShareUrl: Parameter missing: media=${media}, contentUrl=${contentUrl}, contentTitle=${contentTitle}`);\r\n return;\r\n }\r\n\r\n let 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: getLocationHref()\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\n/**\r\n * Default name for the content action toolbar experience\r\n */\r\nexport const experienceDefaultName = \"ContentActionsToolbar\";\r\n\r\n/**\r\n * Windows sizes to trigger breakpoint tracker\r\n */\r\nexport const BreakpointIndexToPx = [0, 1152, 1263];\r\n\r\n/**\r\n * The breakpoint indexes to be maped by breakpoint tracker\r\n */\r\nexport enum ToolbarBreakpoints {\r\n Breakpoint3_1 = 0,\r\n Breakpoint3_2 = 1,\r\n Breakpoint3_3 = 2\r\n}\r\n\r\n/**\r\n * Constant names for telemetry data\r\n */\r\nexport enum TelemetryConstants {\r\n socialToolbarTelemetryName = \"socialtoolbar\",\r\n closeDialogTelemetryName = \"Close\",\r\n copyLinkTelemetryName = \"CopyLink\",\r\n shareArticleTelemetryName = \"ShareArticle\",\r\n shareDialogTelemetryName = \"ShareDialog\"\r\n}\r\n\r\n/**\r\n * Spa placeholders Ids\r\n */\r\nexport enum PlaceHolderId {\r\n vertical = \"content-actions-toolbar-vert\",\r\n horizontal = \"content-actions-toolbar-horiz\"\r\n}\r\n\r\n/**\r\n * Action keys for like/dislike\r\n */\r\nexport enum LikeDislikeActionKey {\r\n like = \"like\",\r\n dislike = \"dislike\",\r\n undoliked = \"undoliked\",\r\n undodisliked = \"undodisliked\"\r\n}\r\n\r\n/**\r\n * action keys available in content action\r\n */\r\nexport enum SelectPropKey {\r\n onLike = \"onLike\",\r\n onDislike = \"onDislike\",\r\n onOpenOptions = \"onOpenOptions\",\r\n onShareDialogOpen = \"onShareDialogOpen\"\r\n}\r\n\r\n/**\r\n * Content Status\r\n */\r\nexport enum Status {\r\n None = \"none\",\r\n Like = \"like\",\r\n DisLike = \"dislike\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { SocialMedia, SocialMediaTarget } from \"@msnews/views-helpers\";\r\n\r\nimport { CardContextMenuItem } from \"@msnews/card-context-menu\";\r\nimport { DialogArticleCardProps } from \"../dialog-article-card\";\r\nimport { GlyphType } from \"@msnews/icon\";\r\nimport { ManagedClasses } from \"@microsoft/fast-components-class-name-contracts-msft\";\r\nimport { ShareDialogProps } from \"@msnews/share-dialog\";\r\nimport { SharingToolbarClassNames } from \"./\";\r\nimport { Status } from \"../../ContentActionsToolbar.constants\";\r\nimport { TelemetryTags } from \"@msnews/experiences-base\";\r\nimport { ToolbarPosition } from \"../..\";\r\n\r\n/**\r\n * Enumeration of available button type options\r\n * @type {enum}\r\n */\r\nexport enum ButtonType {\r\n SocialMedia = \"SocialMedia\",\r\n ShareDialog = \"ShareDialog\",\r\n LikeDislike = \"LikeDislike\",\r\n MoreOptions = \"MoreOptions\"\r\n}\r\n\r\n/**\r\n * Coordinate position type\r\n */\r\nexport type CoordinatePos = {\r\n /**\r\n * A horizontal coordinate position\r\n * @type {number}\r\n */\r\n x: number;\r\n\r\n /**\r\n * A vertical coordinate position\r\n * @type {number}\r\n */\r\n y: number;\r\n};\r\n\r\n/**\r\n * The social media type button\r\n */\r\nexport type SocialMediaType = {\r\n /**\r\n * Optional HTML anchor attributes\r\n * @type {React.HTMLAttributes}\r\n */\r\n attributes?: React.HTMLAttributes;\r\n\r\n /**\r\n * The social media enum type\r\n * @type {SocialMedia}\r\n */\r\n mediaType: SocialMedia;\r\n\r\n /**\r\n * The shared content url\r\n * @type {string}\r\n */\r\n contentUrl: string;\r\n\r\n /**\r\n * The shared content title\r\n * @type {string}\r\n */\r\n contentTitle: string;\r\n\r\n /**\r\n * The localized email body text\r\n * @type {string}\r\n */\r\n emailBody?: string;\r\n\r\n /**\r\n * The icon to be used instead of default one\r\n * @type {GlyphType}\r\n */\r\n icon?: GlyphType;\r\n\r\n /**\r\n * The ocid value to be used\r\n * @type {string}\r\n */\r\n ocid?: string;\r\n\r\n /**\r\n * The social media anchor target attribute option to be used\r\n * @type {SocialMediaTarget}\r\n */\r\n target?: SocialMediaTarget;\r\n\r\n /**\r\n * The telemetry callback to triggered when new window is used as the anchor target\r\n * @type {(event: any) => void}\r\n */\r\n newWindowTelemetryCall?: (event: any) => void;\r\n};\r\n\r\n/**\r\n * The share dialog type button\r\n */\r\nexport type ShareDialogType = {\r\n /**\r\n * Optional HTML button attributes\r\n * @type {React.HTMLAttributes}\r\n */\r\n attributes?: React.HTMLAttributes;\r\n\r\n /**\r\n * The share dialog component props\r\n * @type {ShareDialogProps}\r\n */\r\n shareDialogProps: ShareDialogProps;\r\n\r\n /**\r\n * The dialog article card component props\r\n * @type {DialogArticleCardProps}\r\n */\r\n dialogArticleCardProps: DialogArticleCardProps;\r\n\r\n /**\r\n * The telemetry tags\r\n * @type {TelemetryTags}\r\n */\r\n articleTelemetryTags?: TelemetryTags;\r\n\r\n /**\r\n * Callback to be triggered at user click\r\n * @type {(event: any) => void}\r\n */\r\n onSelect?: (event: any) => void;\r\n};\r\n\r\n/**\r\n * The like/dislike type button\r\n */\r\nexport type LikeDislikeType = {\r\n /**\r\n * Optional HTML button attributes\r\n * @type {React.HTMLAttributes}\r\n */\r\n attributes?: React.HTMLAttributes;\r\n\r\n /**\r\n * Current status (like/dislike/none) of the content\r\n * @type {Status}\r\n */\r\n status: Status;\r\n\r\n /**\r\n * Callback to be triggered at user click\r\n * @type {(event: any) => void}\r\n */\r\n onSelect?: (event: any) => void;\r\n};\r\n\r\n/**\r\n * The more options type button\r\n */\r\nexport type MoreOptionsType = {\r\n /**\r\n * Optional HTML div attributes\r\n * @type {React.HTMLAttributes}\r\n */\r\n attributes?: React.HTMLAttributes;\r\n\r\n /**\r\n * Current status (like/dislike/none) of the content\r\n * @type {Status}\r\n */\r\n status: Status;\r\n\r\n /**\r\n * The array of items to be displayed in the menu\r\n * @type {CardContextMenuItem[]}\r\n */\r\n menuItems: CardContextMenuItem[];\r\n\r\n /**\r\n * The offset position of the menu to open in relation to its button\r\n * Default to (0,0)\r\n * @type {CoordinatePos}\r\n */\r\n offsetPos?: CoordinatePos;\r\n\r\n /**\r\n * The override zIndex to be used by the menu\r\n * @type {number}\r\n */\r\n zIndex?: number;\r\n};\r\n\r\n/**\r\n * The button item common type\r\n */\r\nexport type ButtonItemType = {\r\n /**\r\n * The content actions toolbar button type\r\n * @type {ButtonType}\r\n */\r\n buttonType: ButtonType;\r\n\r\n /**\r\n * The content actions toolbar button data type\r\n * @type {ButtonDataType}\r\n */\r\n buttonData?: ButtonDataType;\r\n\r\n /**\r\n * The telemetry tags\r\n * @type {TelemetryTags}\r\n */\r\n telemetryTags?: TelemetryTags;\r\n};\r\n\r\nexport type ButtonDataType = Partial;\r\n\r\n/**\r\n * An interface to represent the SharingToolbar jss managed classes.\r\n *\r\n * @export\r\n * @interface SharingToolbarManagedClasses\r\n */\r\nexport interface SharingToolbarManagedClasses extends ManagedClasses { }\r\n\r\n/**\r\n * An interface to represent the SharingToolbar handled props.\r\n *\r\n * @export\r\n * @interface SharingToolbarHandledProps\r\n */\r\nexport interface SharingToolbarHandledProps extends SharingToolbarManagedClasses {\r\n\r\n /**\r\n * The toolbar position (vertical/horizontal)\r\n * @type {ToolbarPosition}\r\n */\r\n position: ToolbarPosition;\r\n\r\n /**\r\n * The sharing buttons configuration array\r\n * @type {ButtonItemType[]}\r\n */\r\n sharingButtons: ButtonItemType[];\r\n}\r\n\r\n/**\r\n * An interface to represent the SharingToolbar unhandled props.\r\n * @export\r\n * @interface SharingToolbarUnHandledProps\r\n */\r\nexport interface SharingToolbarUnHandledProps extends React.HTMLAttributes { }\r\n\r\n/**\r\n * The SharingToolbar props type\r\n */\r\nexport type SharingToolbarProps = SharingToolbarHandledProps & SharingToolbarUnHandledProps;","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActionMap } from \"@msnews/experiences-redux\";\r\nimport { DocumentData } from \"./ContentActionsToolbar.state\";\r\nimport { Status } from \"./ContentActionsToolbar.constants\";\r\nimport { ToolbarPosition } from \"./ContentActionsToolbar.props\";\r\n\r\ntype InitializeToolbar = (breakpointIndex: number, isRSThreeDevice: boolean, documentId: string, staticPosition: ToolbarPosition) => void;\r\ntype ContentStatuReady = (status: Status) => void;\r\ntype DocumentDataReady = (documentData: DocumentData) => void;\r\ntype LikeContent = () => void;\r\ntype UnlikeContent = () => void;\r\ntype DislikeContent = () => void;\r\ntype UndislikeContent = () => void;\r\ntype ViewportUpdate = (breakpointIndex: number, isRSThreeDevice: boolean) => void;\r\ntype SharingToolbarError = (error: Error) => void;\r\n\r\n/**\r\n * Class containing actions that apply to the ContentActionsToolbar connector\r\n * @class\r\n */\r\nexport class ContentActionsToolbarActions {\r\n public static initializeToolbar: ActionMap = new ActionMap(\"InitializeToolbar\");\r\n public static ContentStatuReady: ActionMap = new ActionMap(\"ContentStatuReady\");\r\n public static documentDataReady: ActionMap = new ActionMap(\"DocumentDataReady\");\r\n public static likeContent: ActionMap = new ActionMap(\"LikeContent\");\r\n public static unlikeContent: ActionMap = new ActionMap(\"UnlikeContent\");\r\n public static dislikeContent: ActionMap = new ActionMap(\"DislikeContent\");\r\n public static undislikeContent: ActionMap = new ActionMap(\"UndislikeContent\");\r\n public static sharingToolbarError: ActionMap = new ActionMap(\"SharingToolbarError\");\r\n public static ViewportUpdate: ActionMap = new ActionMap(\"ViewportUpdate\");\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { CardContextMenuItem } from \"@msnews/card-context-menu\";\r\nimport { CoordinatePos } from \"./SharingToolbar.props\";\r\nimport { Glyph } from \"@msnews/icon\";\r\nimport { LikeDislikeActionKey } from \"../../ContentActionsToolbar.constants\";\r\n\r\n/**\r\n * Default color for the icon container\r\n */\r\nexport const iconContainerDefaultColor = \"#EEE\";\r\n\r\n/**\r\n * Colors for the more options icon\r\n */\r\nexport const moreOptionsIconColors = {\r\n background: iconContainerDefaultColor,\r\n foreground: \"#666\"\r\n};\r\n\r\n/**\r\n * Background colors for the like dislike icon\r\n */\r\nexport const likeDislikeIconBackroundColor = {\r\n none: iconContainerDefaultColor,\r\n like: \"#FF4343\",\r\n dislike: \"#666\"\r\n};\r\n\r\n/**\r\n * Default offset position to display the more options context menu\r\n */\r\nexport const moreOptionsMenuDefaultOffsetPos: CoordinatePos = {\r\n x: 0,\r\n y: -80\r\n};\r\n\r\n/**\r\n * Menu items to render the like option\r\n */\r\nexport const OptionItemLike: CardContextMenuItem = {\r\n key: LikeDislikeActionKey.like,\r\n text: null,\r\n onSelect: null,\r\n icon: Glyph.Like,\r\n telemetryTag: null\r\n};\r\n\r\n/**\r\n * Menu items to render the dislike option\r\n */\r\nexport const OptionItemDislike: CardContextMenuItem = {\r\n key: LikeDislikeActionKey.dislike,\r\n text: null,\r\n onSelect: null,\r\n icon: Glyph.Disliked,\r\n telemetryTag: null\r\n};\r\n\r\n/**\r\n * Menu items to render the undo like option\r\n */\r\nexport const OptionItemUndoLike: CardContextMenuItem = {\r\n key: LikeDislikeActionKey.undoliked,\r\n text: null,\r\n onSelect: null,\r\n icon: Glyph.Like,\r\n telemetryTag: null\r\n};\r\n\r\n/**\r\n * Menu items to render the undo dislike option\r\n */\r\nexport const OptionItemUndoDislike: CardContextMenuItem = {\r\n key: LikeDislikeActionKey.undodisliked,\r\n text: null,\r\n onSelect: null,\r\n icon: Glyph.Dislike,\r\n telemetryTag: null\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ContentActionsToolbarConfig, ContentActionsToolbarProps, ContentActionsToolbarState, Status } from \".\";\r\nimport { InspectorArgs, InspectorResponse } from \"@msnews/core\";\r\nimport { OptionItemDislike, OptionItemLike, OptionItemUndoDislike, OptionItemUndoLike } from \"./components/sharing-toolbar/SharingToolbar.constants\";\r\n\r\nimport { ButtonType } from \"./components/sharing-toolbar/SharingToolbar\";\r\nimport { CardContextMenuItem } from \"@msnews/card-context-menu\";\r\nimport { SocialMediaTarget } from \"@msnews/views-helpers\";\r\nimport { cloneDeep } from \"lodash-es\";\r\n\r\n/**\r\n * Type for ContentActionsToolbar connectorArgs\r\n *\r\n * @export\r\n * @type {ContentActionsToolbarConnectorArgs}\r\n */\r\nexport type ContentActionsToolbarConnectorArgs = {};\r\n\r\nexport type ContentActionsToolbarInspectorArgs = InspectorArgs;\r\n\r\nexport namespace ContentActionsToolbarInspector {\r\n export function inspect(args: ContentActionsToolbarInspectorArgs): InspectorResponse {\r\n const { config, state, config: { localizedStrings } } = args;\r\n\r\n const newProps: ContentActionsToolbarProps = {\r\n staticPosition: state.staticPosition,\r\n position: state.position,\r\n sharingToolbar: {\r\n position: state.position,\r\n sharingButtons: []\r\n },\r\n contentStatus: args.state.status,\r\n sharingError: args.state.sharingError\r\n };\r\n\r\n const sharingShortUrl = state.documentData ? state.documentData.sharingShortUrl : undefined;\r\n const articleTitle = state.documentData ? state.documentData.articleTitle : undefined;\r\n const articleImageUrl = state.documentData ? state.documentData.articleImageUrl : undefined;\r\n const providerName = state.documentData ? state.documentData.providerName : undefined;\r\n const providerLogoUrl = state.documentData ? state.documentData.providerLogoUrl : undefined;\r\n\r\n if (state.status && state.documentData) {\r\n newProps.sharingToolbar.sharingButtons = config.sharingButtons.map(buttonItem => {\r\n let newButtonItem = cloneDeep(buttonItem);\r\n switch (buttonItem.buttonType) {\r\n case ButtonType.SocialMedia:\r\n if (newButtonItem.buttonData) {\r\n newButtonItem.buttonData.contentUrl = sharingShortUrl;\r\n newButtonItem.buttonData.contentTitle = articleTitle;\r\n newButtonItem.buttonData.emailBody = localizedStrings.emailBodyText;\r\n newButtonItem.buttonData.target = buttonItem.buttonData.target ? SocialMediaTarget[buttonItem.buttonData.target] : undefined;\r\n } else {\r\n newButtonItem = undefined;\r\n }\r\n break;\r\n case ButtonType.ShareDialog:\r\n if (newButtonItem.buttonData && newButtonItem.buttonData.shareDialogProps && newButtonItem.buttonData.shareDialogProps.socialMediaItems) {\r\n const { shareDialogProps } = newButtonItem.buttonData;\r\n shareDialogProps.enabled = true;\r\n shareDialogProps.contentUrl = sharingShortUrl;\r\n shareDialogProps.contentTitle = articleTitle;\r\n shareDialogProps.emailBody = localizedStrings.emailBodyText;\r\n shareDialogProps.dialogStrings = {\r\n dialogTitle: localizedStrings.shareDialogTitleText,\r\n copyButton: localizedStrings.shareDialogCopyButtonText,\r\n copyButtonAriaLabel: localizedStrings.shareDialogCopyButtonAriaLabelText,\r\n copiedButton: localizedStrings.shareDialogCopiedButtonText,\r\n copiedButtonAriaLabel: localizedStrings.shareDialogCopiedButtonAriaLabelText\r\n };\r\n\r\n newButtonItem.buttonData.dialogArticleCardProps = {\r\n articleId: state.documentId,\r\n headlineTitle: {\r\n tag: undefined,\r\n children: articleTitle\r\n },\r\n href: sharingShortUrl,\r\n image: {\r\n alt: articleTitle,\r\n src: articleImageUrl\r\n },\r\n provider: {\r\n name: {\r\n title: providerName,\r\n children: providerName\r\n },\r\n image: {\r\n src: providerLogoUrl,\r\n alt: providerName\r\n }\r\n }\r\n };\r\n\r\n newButtonItem.buttonData.attributes = {\r\n \"aria-label\": localizedStrings.shareDialogButtonAriaLabelText,\r\n \"aria-hidden\": false,\r\n \"title\": localizedStrings.shareDialogButtonAriaLabelText\r\n };\r\n } else {\r\n newButtonItem = undefined;\r\n }\r\n break;\r\n case ButtonType.LikeDislike:\r\n newButtonItem.buttonData = {\r\n attributes: {\r\n \"aria-label\": localizedStrings.likeDislikeButtonAriaLabelText,\r\n \"aria-hidden\": false,\r\n \"title\": localizedStrings.likeDislikeButtonAriaLabelText\r\n },\r\n status: state.status\r\n };\r\n break;\r\n case ButtonType.MoreOptions:\r\n let menuItems: CardContextMenuItem[] = [];\r\n if (state.status === Status.Like) {\r\n OptionItemUndoLike.text = localizedStrings.moreOptionsUnlikeText;\r\n OptionItemUndoLike.attr = {\r\n \"aria-label\": localizedStrings.moreOptionsUnlikeAriaLabelText,\r\n \"aria-hidden\": false,\r\n \"title\": localizedStrings.moreOptionsUnlikeAriaLabelText\r\n };\r\n menuItems.push(OptionItemUndoLike);\r\n\r\n OptionItemDislike.text = localizedStrings.moreOptionsDislikeText;\r\n OptionItemDislike.attr = {\r\n \"aria-label\": localizedStrings.moreOptionsDislikeAriaLabelText,\r\n \"aria-hidden\": false,\r\n \"title\": localizedStrings.moreOptionsDislikeAriaLabelText\r\n };\r\n menuItems.push(OptionItemDislike);\r\n } else if (state.status === Status.DisLike) {\r\n OptionItemUndoDislike.text = localizedStrings.moreOptionsUndislikeText;\r\n OptionItemUndoDislike.attr = {\r\n \"aria-label\": localizedStrings.moreOptionsUndislikeAriaLabelText,\r\n \"aria-hidden\": false,\r\n \"title\": localizedStrings.moreOptionsUndislikeAriaLabelText\r\n };\r\n menuItems.push(OptionItemUndoDislike);\r\n\r\n OptionItemLike.text = localizedStrings.moreOptionsLikeText;\r\n OptionItemLike.attr = {\r\n \"aria-label\": localizedStrings.moreOptionsLikeAriaLabelText,\r\n \"aria-hidden\": false,\r\n \"title\": localizedStrings.moreOptionsLikeAriaLabelText\r\n };\r\n menuItems.push(OptionItemLike);\r\n } else {\r\n OptionItemDislike.text = localizedStrings.moreOptionsDislikeText;\r\n OptionItemDislike.attr = {\r\n \"aria-label\": localizedStrings.moreOptionsDislikeAriaLabelText,\r\n \"aria-hidden\": false,\r\n \"title\": localizedStrings.moreOptionsDislikeAriaLabelText\r\n };\r\n menuItems.push(OptionItemDislike);\r\n }\r\n newButtonItem.buttonData = {\r\n attributes: {\r\n \"aria-label\": localizedStrings.moreOptionsButtonAriaLabelText,\r\n \"aria-hidden\": false,\r\n \"title\": localizedStrings.moreOptionsButtonAriaLabelText\r\n },\r\n menuItems: menuItems,\r\n status: state.status,\r\n offsetPos: buttonItem.buttonData ? buttonItem.buttonData.offsetPos : undefined,\r\n zIndex: buttonItem.buttonData ? buttonItem.buttonData.zIndex : undefined\r\n };\r\n break;\r\n default:\r\n break;\r\n }\r\n return newButtonItem;\r\n }).filter(value => value);\r\n }\r\n\r\n return {\r\n props: newProps,\r\n missingChildren: []\r\n };\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n KeyValuePair,\r\n TelemetryBase,\r\n appEnvironment,\r\n headData,\r\n oneServiceQueryStringKeys\r\n} from \"@msnews/core\";\r\nimport { OneServiceUtility, getServiceUrlForSubpath, sendRequest } from \"@msnews/oneservice\";\r\n\r\nimport { ContentActionsToolbarAppErrors } from \"@msnews/diagnostics\";\r\nimport { DocumentData } from \"../ContentActionsToolbar.state\";\r\nimport { Status } from \"../ContentActionsToolbar.constants\";\r\nimport { get } from \"lodash-es\";\r\n\r\n/**\r\n * Class to fetch data for the content actions toolbar experience\r\n * @class ContentActionsToolbarServiceClient\r\n */\r\nexport class ContentActionsToolbarServiceClient {\r\n /**\r\n * The actions service end point\r\n */\r\n private contentActionsServiceEndpoint: string = \"Graph/Actions\";\r\n\r\n /**\r\n * The content preview endpoint\r\n */\r\n private contentPreviewApiEndpoint: string = \"view/v1/Preview\";\r\n\r\n /**\r\n * The template url for article images\r\n */\r\n private articleImageUrl: string = \"https://img-s-msn-com.akamaized.net/tenant/amp/entityid/${imageId}.img?h=100&w=100&m=6&q=60&u=t&o=t&l=f&f=png\";\r\n\r\n /**\r\n * The template url for provider logo images\r\n */\r\n private providerLogoUrl: string = \"https://img-s-msn-com.akamaized.net/tenant/amp/entityid/${logoId}.img?h=16&w=16&m=6&q=60&u=t&o=t&l=f&f=png\";\r\n\r\n /**\r\n * the ocid for request\r\n */\r\n private ocid: string = \"feeds\";\r\n\r\n /**\r\n * Initializes a new instance of the `ContentActionsToolbarServiceClient` class.\r\n * @constructor\r\n * @public\r\n * @param {any} fetchImpl - The fetch implementation\r\n */\r\n public constructor(private fetchImpl: any) {\r\n }\r\n\r\n /**\r\n * Get content preference initial state\r\n * @param {string} targetId target id\r\n */\r\n public async GetPreferenceInitialState(targetId: string): Promise {\r\n let initialState: Status = undefined;\r\n try {\r\n const response = await this.GetContentStatusRequest(targetId);\r\n const isLike = response && response[\"value\"] && response[\"value\"].find(obj => obj.actionType === \"Like\");\r\n const isDislike = response && response[\"value\"] && response[\"value\"].find(obj => obj.actionType === \"Dislike\");\r\n initialState = isLike ? Status.Like : (isDislike ? Status.DisLike : Status.None);\r\n } catch (error) {\r\n TelemetryBase.trackAppErrorEvent({\r\n ...ContentActionsToolbarAppErrors.ContentActionsGetContentStatusActionError,\r\n message: \"Failed obtaining content status\",\r\n pb: {\r\n ...ContentActionsToolbarAppErrors.ContentActionsGetContentStatusActionError.pb,\r\n customMessage: `Error: ${error}`\r\n }\r\n });\r\n }\r\n return initialState;\r\n }\r\n\r\n /**\r\n * Get required document data\r\n * @param {string} targetId target id\r\n */\r\n public async GetDocumentData(targetId: string): Promise {\r\n let documentData: DocumentData = undefined;\r\n try {\r\n const contentPreviewData = await this.GetContentPreviewData(targetId);\r\n documentData = this.TranslateContentPreviewDocumentData(contentPreviewData);\r\n if (!documentData) {\r\n throw new Error(`Failed to map content preview data to DocumentData. TargetId: ${targetId}`);\r\n }\r\n } catch (error) {\r\n TelemetryBase.trackAppErrorEvent({\r\n ...ContentActionsToolbarAppErrors.ContentActionsGetDocumentDataError,\r\n message: \"Failed obtaining document data\",\r\n pb: {\r\n ...ContentActionsToolbarAppErrors.ContentActionsGetDocumentDataError.pb,\r\n customMessage: `Error: ${error}`\r\n }\r\n });\r\n }\r\n return documentData;\r\n }\r\n\r\n /**\r\n * The dislike target service call\r\n * @param targetId target id to be disliked\r\n */\r\n public async Dislike(targetId: string): Promise {\r\n return this.PostContentActionRequest(targetId, \"Dislike\");\r\n }\r\n\r\n /**\r\n * The undislike target service call\r\n * @param targetId target id to be undislike\r\n */\r\n public async Undislike(targetId: string): Promise {\r\n return this.DeleteContentActionRequest(targetId, \"Dislike\");\r\n }\r\n\r\n /**\r\n * The like target service call\r\n * @param targetId target id to be like\r\n */\r\n public async Like(targetId: string): Promise {\r\n return this.PostContentActionRequest(targetId, \"Like\");\r\n }\r\n\r\n /**\r\n * The like target service call\r\n * @param targetId target id to be like\r\n */\r\n public async Unlike(targetId: string): Promise {\r\n return this.DeleteContentActionRequest(targetId, \"Like\");\r\n }\r\n\r\n /**\r\n * Set request to service to get the metadata about content status\r\n * @param targetId target id\r\n */\r\n private async GetContentStatusRequest(targetId: string): Promise {\r\n const requestParams = await OneServiceUtility.getBaseRequestData(\"GET\");\r\n requestParams.credentials = headData.UserIsSignedIn ? \"include\" : undefined;\r\n\r\n const serviceUrl = getServiceUrlForSubpath(this.contentActionsServiceEndpoint);\r\n const commonParams = OneServiceUtility.getCommonParams(this.ocid);\r\n [\r\n ...commonParams,\r\n {\r\n key: \"$filter\",\r\n value: `targetId eq '${targetId}'`\r\n }\r\n ].forEach(pair => pair.value && serviceUrl.searchParams.set(pair.key, pair.value));\r\n\r\n let contentStatusData: any;\r\n try {\r\n contentStatusData = await (sendRequest(\r\n async () => {\r\n const response: Response = await this.fetchImpl(serviceUrl.href, requestParams);\r\n if (response.status >= 400) {\r\n throw new Error(response.statusText);\r\n }\r\n return response.json();\r\n },\r\n `getContentAction`\r\n ));\r\n } catch (error) {\r\n TelemetryBase.trackAppErrorEvent({\r\n ...ContentActionsToolbarAppErrors.ContentActionsContentStatusFetchError,\r\n message: \"Failed to fetch from content status data endpoint\",\r\n pb: {\r\n ...ContentActionsToolbarAppErrors.ContentActionsContentStatusFetchError.pb,\r\n customMessage: `Service URL: ${serviceUrl}, error: ${error}`\r\n }\r\n });\r\n }\r\n\r\n return contentStatusData;\r\n }\r\n\r\n /**\r\n * Gets article content data from ContentPreview endpoint\r\n * @param articleId the article id\r\n * @returns Primise The article details data\r\n */\r\n private async GetContentPreviewData(articleId: string): Promise {\r\n const requestParams = await OneServiceUtility.getBaseRequestData(\"GET\");\r\n requestParams.credentials = headData.UserIsSignedIn ? \"include\" : undefined;\r\n\r\n // Build the url\r\n const serviceUrl = new URL(`${this.contentPreviewApiEndpoint}/${articleId}${appEnvironment.ContentServiceUrlBase.search}`, appEnvironment.ContentServiceUrlBase);\r\n\r\n let contentPreviewData: any;\r\n try {\r\n contentPreviewData = await (sendRequest(\r\n async () => {\r\n const response: Response = await this.fetchImpl(serviceUrl.href, requestParams);\r\n if (response.status >= 400) {\r\n throw new Error(response.statusText);\r\n }\r\n return response.json();\r\n },\r\n `getContentAction`\r\n ));\r\n } catch (error) {\r\n TelemetryBase.trackAppErrorEvent({\r\n ...ContentActionsToolbarAppErrors.ContentActionsContentPreviewFetchError,\r\n message: \"Failed to fetch from content views data endpoint\",\r\n pb: {\r\n ...ContentActionsToolbarAppErrors.ContentActionsContentPreviewFetchError.pb,\r\n customMessage: `Service URL: ${serviceUrl}, error: ${error}`\r\n }\r\n });\r\n }\r\n\r\n return contentPreviewData;\r\n }\r\n\r\n /**\r\n * Delete an action from target\r\n * @param targetId target to be deleted\r\n * @param actionType type of the action\r\n */\r\n private async DeleteContentActionRequest(targetId: string, actionType: string): Promise {\r\n const requestParams = await OneServiceUtility.getBaseRequestData(\"DELETE\");\r\n requestParams.credentials = headData.UserIsSignedIn ? \"include\" : undefined;\r\n\r\n const deleteQueryParam: KeyValuePair = {\r\n key: oneServiceQueryStringKeys.filter,\r\n value: `actionType eq '${actionType}' and targetId eq '${targetId}'`\r\n };\r\n\r\n const serviceUrl = getServiceUrlForSubpath(this.contentActionsServiceEndpoint);\r\n const commonParams = OneServiceUtility.getCommonParams(this.ocid);\r\n [\r\n deleteQueryParam,\r\n ...commonParams\r\n ].forEach((pair) => pair.value && serviceUrl.searchParams.set(pair.key, pair.value));\r\n\r\n let deleteResponse: Response;\r\n try {\r\n deleteResponse = await (sendRequest(\r\n async () => {\r\n const response: Response = await this.fetchImpl(serviceUrl.href, requestParams);\r\n if (response.status >= 400) {\r\n throw new Error(response.statusText);\r\n }\r\n return response;\r\n },\r\n `deleteContentAction${actionType}`\r\n ));\r\n } catch (error) {\r\n TelemetryBase.trackAppErrorEvent({\r\n ...ContentActionsToolbarAppErrors.ContentActionsDeleteActionError,\r\n message: \"Error while calling delete action for content actions toolbar\",\r\n pb: {\r\n ...ContentActionsToolbarAppErrors.ContentActionsDeleteActionError.pb,\r\n customMessage: `URL: ${serviceUrl.href}, error: ${error}`\r\n }\r\n });\r\n }\r\n\r\n return deleteResponse;\r\n }\r\n\r\n /**\r\n * create an action from target\r\n * @param targetId target to be created\r\n * @param actionType type of the action\r\n */\r\n private async PostContentActionRequest(targetId: string, actionType: string, targetType?: string): Promise {\r\n const requestParams: RequestInit = {\r\n method: \"POST\",\r\n body: JSON.stringify({\r\n actionType,\r\n targetId,\r\n targetType\r\n }),\r\n credentials: headData.UserIsSignedIn ? \"include\" : undefined,\r\n headers: await OneServiceUtility.getOneServiceHeaders()\r\n };\r\n\r\n const serviceUrl = getServiceUrlForSubpath(this.contentActionsServiceEndpoint);\r\n const commonParams = OneServiceUtility.getCommonParams(this.ocid);\r\n commonParams.forEach((pair) => {\r\n pair.value && serviceUrl.searchParams.set(pair.key, pair.value);\r\n });\r\n\r\n let postResponse: Response;\r\n try {\r\n postResponse = await (sendRequest(\r\n async () => {\r\n const response: Response = await this.fetchImpl(serviceUrl.href, requestParams);\r\n if (response.status >= 400) {\r\n throw new Error(response.statusText);\r\n }\r\n return response;\r\n },\r\n `getContentAction${actionType}`\r\n ));\r\n } catch (error) {\r\n TelemetryBase.trackAppErrorEvent({\r\n ...ContentActionsToolbarAppErrors.ContentActionsPostActionError,\r\n message: \"Error while posting action for content actions toolbar\",\r\n pb: {\r\n ...ContentActionsToolbarAppErrors.ContentActionsPostActionError.pb,\r\n customMessage: `URL: ${serviceUrl.href}, error: ${error}`\r\n }\r\n });\r\n }\r\n\r\n return postResponse;\r\n }\r\n\r\n /**\r\n * Schema Translator for content preview data\r\n * @param {any} articleDataResponse response data from content preview api\r\n * @returns {DocumentData} translated document data\r\n */\r\n private TranslateContentPreviewDocumentData(articleDataResponse: any): DocumentData {\r\n const articleImageId = get(articleDataResponse, \"images[0].id\", undefined);\r\n const providerLogoId = get(articleDataResponse, \"provider.logo.id\", undefined);\r\n\r\n return {\r\n articleTitle: get(articleDataResponse, \"title\", undefined),\r\n articleImageUrl: articleImageId ? this.articleImageUrl.replace(\"${imageId}\", articleImageId) : undefined,\r\n providerName: get(articleDataResponse, \"provider.name\", undefined),\r\n providerLogoUrl: providerLogoId ? this.providerLogoUrl.replace(\"${logoId}\", providerLogoId) : undefined\r\n };\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ButtonItemType, ButtonType } from \"./components/sharing-toolbar/SharingToolbar\";\r\nimport { LikeDislikeActionKey, TelemetryConstants } from \"./ContentActionsToolbar.constants\";\r\nimport { OptionItemDislike, OptionItemLike, OptionItemUndoDislike, OptionItemUndoLike } from \"./components/sharing-toolbar/SharingToolbar.constants\";\r\nimport { SocialMediaItemConfigAttributes, SocialMediaTarget, ViewsUtility } from \"@msnews/views-helpers\";\r\nimport { Telemetry, TelemetryProps, TelemetryTypes } from \"@msnews/experiences-base\";\r\n\r\nimport { Status } from \".\";\r\nimport { TelemetryBase } from \"@msnews/core\";\r\n\r\n/**\r\n * Helper class to implement telemetry for content actions toolbar\r\n * @export\r\n * @class\r\n */\r\nexport class ContentActionsToolbarTelemetryHelper {\r\n\r\n /**\r\n * Injects telemetry data into sharing buttons array\r\n * @param {ButtonItemType[]} sharingButtons The sharing buttons array\r\n * @param {Status} status The current content status\r\n * @param {TelemetryProps} sharingToolbarTelemetryProps The sharing toolbar telemetry props\r\n * @param {TrackTelemetryEventSignature} handleTelemetryCall Dispatches click telemetry events\r\n */\r\n public static InjectTelemetry(sharingButtons: ButtonItemType[], status: Status, sharingToolbarTelemetryProps: TelemetryProps): void {\r\n sharingButtons.map(button => {\r\n let buttonTelemetryName: string;\r\n switch (button.buttonType) {\r\n case ButtonType.SocialMedia:\r\n buttonTelemetryName = button.buttonData.mediaType.toUpperCase();\r\n button.buttonData.newWindowTelemetryCall = (event: any) => {\r\n TelemetryBase.trackEvent({ type: \"click\", target: event.currentTarget }, null, null, buttonTelemetryName);\r\n return;\r\n };\r\n break;\r\n case ButtonType.ShareDialog:\r\n if (button.buttonData.shareDialogProps && button.buttonData.shareDialogProps.socialMediaItems) {\r\n buttonTelemetryName = button.buttonType.toUpperCase();\r\n let { shareDialogProps } = button.buttonData;\r\n button.buttonData.onSelect = (event: any) => {\r\n TelemetryBase.trackEvent({ type: \"click_nonnav\", target: event.currentTarget }, null, null, buttonTelemetryName);\r\n return;\r\n };\r\n if (button.buttonData.target === SocialMediaTarget.newWindow) {\r\n button.buttonData.newWindowTelemetryCall = (event: any) => {\r\n TelemetryBase.trackEvent({ type: \"click\", target: event.currentTarget }, null, null, buttonTelemetryName);\r\n return;\r\n };\r\n }\r\n\r\n let mediaTelemetryProps: { [s: string]: TelemetryProps } = shareDialogProps.socialMediaItems.reduce(\r\n (result, value) => {\r\n if (value) {\r\n result[value.toLowerCase()] = Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, value.toUpperCase(), TelemetryTypes.Share);\r\n result[value.toLowerCase()].userFacingText = `tmx-stb-sd-${value.toLowerCase()}`;\r\n }\r\n return result;\r\n },\r\n {}\r\n );\r\n shareDialogProps.copyButtonTelemetryProps = Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, TelemetryConstants.copyLinkTelemetryName, TelemetryTypes.Share);\r\n const closeButtonTelemetryProps = Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, TelemetryConstants.closeDialogTelemetryName, TelemetryTypes.Close);\r\n shareDialogProps.closeButtonTelemetryTags = Telemetry.render(closeButtonTelemetryProps);\r\n shareDialogProps.shareIconTelemetryProps = mediaTelemetryProps;\r\n shareDialogProps.socialMediaConfigOverride = shareDialogProps.socialMediaItems.reduce((result, mediaItem) => {\r\n let mediaItemOverride: SocialMediaItemConfigAttributes = {};\r\n if (shareDialogProps.socialMediaConfigOverride && shareDialogProps.socialMediaConfigOverride[mediaItem]) {\r\n mediaItemOverride = {...shareDialogProps.socialMediaConfigOverride[mediaItem]};\r\n }\r\n mediaItemOverride.newWindowTelemetryCall = event => TelemetryBase.trackEvent({ type: \"click\", target: event.currentTarget }, null, null, mediaItem.toUpperCase());\r\n result[mediaItem] = mediaItemOverride;\r\n return result;\r\n }, {}\r\n );\r\n const shareDialogTelemetryProps = Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, TelemetryConstants.shareDialogTelemetryName, TelemetryTypes.Interaction);\r\n button.buttonData.shareDialogProps = {\r\n ...shareDialogProps,\r\n ...Telemetry.render(shareDialogTelemetryProps)\r\n\r\n };\r\n button.buttonData.articleTelemetryTags = Telemetry.render(Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, TelemetryConstants.shareArticleTelemetryName, TelemetryTypes.Share));\r\n }\r\n break;\r\n case ButtonType.LikeDislike:\r\n if (status === Status.Like) {\r\n buttonTelemetryName = OptionItemUndoLike.key.toUpperCase();\r\n } else if (status === Status.DisLike) {\r\n buttonTelemetryName = OptionItemUndoDislike.key.toUpperCase();\r\n } else {\r\n buttonTelemetryName = OptionItemLike.key.toUpperCase();\r\n }\r\n break;\r\n case ButtonType.MoreOptions:\r\n buttonTelemetryName = button.buttonType.toUpperCase();\r\n const menuItems = button.buttonData.menuItems;\r\n if (status === Status.Like) {\r\n menuItems.find(e => e.key === LikeDislikeActionKey.undoliked).telemetryTag = Telemetry.render(Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, OptionItemUndoLike.key.toUpperCase(), TelemetryTypes.Unlike));\r\n menuItems.find(e => e.key === LikeDislikeActionKey.dislike).telemetryTag = Telemetry.render(Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, OptionItemDislike.key.toUpperCase(), TelemetryTypes.Dislike));\r\n } else if (status === Status.DisLike) {\r\n menuItems.find(e => e.key === LikeDislikeActionKey.undodisliked).telemetryTag = Telemetry.render(Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, OptionItemUndoDislike.key.toUpperCase(), TelemetryTypes.Undislike));\r\n menuItems.find(e => e.key === LikeDislikeActionKey.like).telemetryTag = Telemetry.render(Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, OptionItemLike.key.toUpperCase(), TelemetryTypes.Like));\r\n } else {\r\n menuItems.find(e => e.key === LikeDislikeActionKey.dislike).telemetryTag = Telemetry.render(Telemetry.getChildTelemetryItem(sharingToolbarTelemetryProps, OptionItemDislike.key.toUpperCase(), TelemetryTypes.Dislike));\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n button.telemetryTags = Telemetry.render(ViewsUtility.getChildTelemetryItem(sharingToolbarTelemetryProps, buttonTelemetryName, TelemetryTypes.Share));\r\n if (button.telemetryTags) {\r\n // Keeping same telemetry headline data as found today in Prime for AB testing\r\n button.telemetryTags[\"data-hl\"] = `tmx-stb-${buttonTelemetryName.toLowerCase()}`;\r\n }\r\n });\r\n }\r\n\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { BreakpointIndexToPx, LikeDislikeActionKey, Status, TelemetryConstants } from \"./ContentActionsToolbar.constants\";\r\nimport { BreakpointTracker, identifyBreakpoint } from \"@microsoft/fast-layouts-react\";\r\nimport { ButtonItemType, ButtonType } from \"./components/sharing-toolbar/SharingToolbar\";\r\nimport { ContentActionsToolbarActions, ContentActionsToolbarConfig, ContentActionsToolbarProps, ContentActionsToolbarState } from \".\";\r\nimport { ContentActionsToolbarInspector, ContentActionsToolbarInspectorArgs } from \"./ContentActionsToolbar.inspector\";\r\nimport { DynamicReducer, IReducer } from \"@msnews/experiences-redux\";\r\nimport { ExperienceInitialProps, Telemetry, TelemetryProps, TelemetryTags, TelemetryTypes } from \"@msnews/experiences-base\";\r\nimport { InspectorResponse, TelemetryBase, getAppEnvironment } from \"@msnews/core\";\r\nimport { OptionItemDislike, OptionItemLike, OptionItemUndoDislike, OptionItemUndoLike } from \"./components/sharing-toolbar/SharingToolbar.constants\";\r\nimport { SharedDocumentType, SharingHelper, ViewsStringResource } from \"@msnews/views-helpers\";\r\n\r\nimport { ComponentConnector } from \"@msnews/experiences-connector\";\r\nimport { ContentActionsToolbarAppErrors } from \"@msnews/diagnostics\";\r\nimport { ContentActionsToolbarServiceClient } from \"./services\";\r\nimport { ContentActionsToolbarTelemetryHelper } from \"./ContentActionsToolbar.telemetry\";\r\nimport { Store } from \"redux\";\r\nimport { getInnerWidth } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * An interface to represent the more options menu callbacks\r\n * @interface MoreOptionsCallbacks\r\n */\r\ninterface MoreOptionsCallbacks {\r\n /** On like event handler */\r\n onLike: (event: any) => void;\r\n\r\n /** On dislike evewnt hander */\r\n onDislike: (event: any) => void;\r\n}\r\n\r\n/**\r\n * The connector for the ContentActionsToolbar Experience\r\n * @class\r\n */\r\nexport class ContentActionsToolbarConnector extends ComponentConnector {\r\n\r\n /**\r\n * Telemetry related props for the experience.\r\n * @type {TelemetryProps}\r\n */\r\n private sharingToolbarTelemetryProps: TelemetryProps;\r\n\r\n /**\r\n * Telemetry related tags for the experience.\r\n * @type {TelemetryProps}\r\n */\r\n private sharingToolbarTelemetryTags: TelemetryTags;\r\n\r\n /**\r\n * An instance of the content action service client\r\n * @type {ContentActionsToolbarServiceClient}\r\n */\r\n private actionServiceClient: ContentActionsToolbarServiceClient;\r\n\r\n /**\r\n * Telemetry related tags for the more option button.\r\n */\r\n private moreOptionsTelemetryTags: {\r\n Like: TelemetryTags,\r\n Dislike: TelemetryTags,\r\n UndoLike: TelemetryTags,\r\n UndoDislike: TelemetryTags\r\n };\r\n\r\n /**\r\n * Initializes the ContentActionsToolbar connector\r\n * @param {string} namespace Redux subspace name for the connector\r\n * @param {string} parentNamespace Redux subspace name for the parent connector\r\n * @param {DynamicReducer} rootReducer Application root reducer\r\n * @param {IReducer} reducer The connector reducer\r\n * @param {Store} store The store or redux subspace that the connector will be connected to\r\n * @param {ContentActionsToolbarConfig} config The configuration properties from config index\r\n */\r\n public constructor( namespace: string,\r\n parentNamespace: string,\r\n rootReducer: DynamicReducer,\r\n reducer: IReducer,\r\n store: Store,\r\n config?: ContentActionsToolbarConfig) {\r\n super(namespace, parentNamespace, rootReducer, reducer, store, config);\r\n }\r\n\r\n /**\r\n * State mapper\r\n * @param state The current state for the connector\r\n */\r\n public mapStateToProps(state: ContentActionsToolbarState): ContentActionsToolbarProps {\r\n const inspectorArgs: ContentActionsToolbarInspectorArgs = {\r\n config: this.config,\r\n children: {},\r\n state: state\r\n };\r\n\r\n let contentActionsToolbarProps: ContentActionsToolbarProps = {};\r\n\r\n if (state.status && state.documentId && state.documentData) {\r\n const inspectorResponse: InspectorResponse = ContentActionsToolbarInspector.inspect(inspectorArgs);\r\n\r\n const status = inspectorResponse.props.contentStatus;\r\n const callbacks = this.BuildLikeDislikeCallbacks(status, state.documentId);\r\n\r\n if (inspectorResponse.props.sharingToolbar && inspectorResponse.props.sharingToolbar.sharingButtons && inspectorResponse.props.sharingToolbar.sharingButtons.length > 0) {\r\n const sharingButtons = inspectorResponse.props.sharingToolbar.sharingButtons;\r\n\r\n this.InjectCallbacksToMoreOptionsMenu(sharingButtons.find(m => m.buttonType === ButtonType.MoreOptions), status, callbacks);\r\n\r\n ContentActionsToolbarTelemetryHelper.InjectTelemetry(sharingButtons, status, this.sharingToolbarTelemetryProps);\r\n\r\n const likeDislikeButton = sharingButtons.find(m => m.buttonType === ButtonType.LikeDislike);\r\n if (likeDislikeButton) {\r\n sharingButtons.find(m => m.buttonType === ButtonType.LikeDislike).buttonData\r\n .onSelect = (event: any) => status === Status.DisLike ? callbacks.onDislike(event) : callbacks.onLike(event);\r\n }\r\n }\r\n\r\n contentActionsToolbarProps = {\r\n ...inspectorResponse.props,\r\n rootTelemetryTags: this.sharingToolbarTelemetryTags,\r\n ...this.telemetryTags,\r\n ...callbacks\r\n };\r\n }\r\n\r\n return contentActionsToolbarProps;\r\n }\r\n\r\n /**\r\n * Perform one time initialization of the connector, including getting initial state from config\r\n * @param {ExperienceInitialProps} connectorProps Application initial props\r\n */\r\n public async onComponentConnect(initialProps?: ExperienceInitialProps): Promise {\r\n await ComponentConnector.prototype.onComponentConnect.call(this, initialProps);\r\n\r\n const { contentId, context: { staticPosition, isRSThree = false, documentType = SharedDocumentType.CMS } } = initialProps;\r\n if (!contentId) {\r\n ContentActionsToolbarActions.sharingToolbarError.getActionSender(this).send(new Error(ViewsStringResource.sharingToolbarLoadFailure));\r\n this.onAppError({\r\n ...ContentActionsToolbarAppErrors.ContentActionsSharingToolbarLoadError,\r\n message: `Error while initializing content actions toolbar. Requried initial props is not available: InitialProps = ${initialProps}`\r\n });\r\n return;\r\n }\r\n\r\n this.actionServiceClient = new ContentActionsToolbarServiceClient(window.fetch.bind(window));\r\n\r\n this.generateTelemetryTags();\r\n\r\n this.getContentStatus(contentId);\r\n this.getDocumentData(contentId, documentType);\r\n\r\n const currentBreakpoint = this.initializeBreakpointTracker(isRSThree);\r\n ContentActionsToolbarActions.initializeToolbar.getActionSender(this).send(currentBreakpoint, isRSThree, contentId, staticPosition);\r\n }\r\n\r\n /**\r\n * Initialize and subscribe Breakpoint tracker to detect change in toolbar position\r\n */\r\n private initializeBreakpointTracker(isRSThree: boolean): number {\r\n BreakpointTracker.defaultBreakpoint = identifyBreakpoint(getInnerWidth());\r\n BreakpointTracker.breakpoints = BreakpointIndexToPx;\r\n BreakpointTracker.update();\r\n BreakpointTracker.subscribe(breakpoint => {\r\n ContentActionsToolbarActions.ViewportUpdate.getActionSender(this).send(breakpoint, isRSThree);\r\n });\r\n\r\n return BreakpointTracker.currentBreakpoint();\r\n }\r\n\r\n /**\r\n * Fetches the current status (like/dislike/none) of the document\r\n * @param {ExperienceInitialProps} documentId The document Id\r\n */\r\n private async getContentStatus(documentId: string): Promise {\r\n const contentStatus = await this.actionServiceClient.GetPreferenceInitialState(documentId);\r\n if (!contentStatus) {\r\n ContentActionsToolbarActions.sharingToolbarError.getActionSender(this).send(new Error(ViewsStringResource.sharingToolbarLoadFailure));\r\n this.onAppError({\r\n ...ContentActionsToolbarAppErrors.ContentActionsSharingToolbarLoadError,\r\n message: `Error while retrieving content status data from API`\r\n });\r\n return;\r\n }\r\n ContentActionsToolbarActions.ContentStatuReady.getActionSender(this).send(contentStatus);\r\n }\r\n\r\n /**\r\n * Fetches the required document data for the experience\r\n * @param {ExperienceInitialProps} documentId The document Id\r\n */\r\n private async getDocumentData(documentId: string, documentType: SharedDocumentType): Promise {\r\n let documentData = await this.actionServiceClient.GetDocumentData(documentId);\r\n if (!documentData) {\r\n ContentActionsToolbarActions.sharingToolbarError.getActionSender(this).send(new Error(ViewsStringResource.sharingToolbarLoadFailure));\r\n this.onAppError({\r\n ...ContentActionsToolbarAppErrors.ContentActionsSharingToolbarLoadError,\r\n message: `Error while retrieving content status data from API`\r\n });\r\n return;\r\n }\r\n\r\n documentData.sharingShortUrl = SharingHelper.shortUrlBuilder({documentId, documentType}, getAppEnvironment().CurrentMarket);\r\n ContentActionsToolbarActions.documentDataReady.getActionSender(this).send(documentData);\r\n }\r\n\r\n /**\r\n * Builds the like and dislike callbacks\r\n * @param {Status} The content status\r\n * @param {DocumentId} The document id\r\n * @returns {MoreOptionsCallbacks} The MoreOptionsCallbacks interface implementation\r\n */\r\n private BuildLikeDislikeCallbacks(status: Status, documentId: string): MoreOptionsCallbacks {\r\n return {\r\n onLike: (event: Event) => {\r\n if (status !== Status.Like) {\r\n this.actionServiceClient.Like(documentId);\r\n TelemetryBase.trackEvent({ type: \"click_nonnav\", target: event.currentTarget }, null, null, OptionItemLike.key.toUpperCase());\r\n ContentActionsToolbarActions.likeContent.getActionSender(this).send();\r\n } else {\r\n this.actionServiceClient.Unlike(documentId);\r\n TelemetryBase.trackEvent({ type: \"click_nonnav\", target: event.currentTarget }, null, null, OptionItemUndoLike.key.toUpperCase());\r\n ContentActionsToolbarActions.unlikeContent.getActionSender(this).send();\r\n }\r\n return;\r\n },\r\n onDislike: (event: Event) => {\r\n if (status !== Status.DisLike) {\r\n this.actionServiceClient.Dislike(documentId);\r\n TelemetryBase.trackEvent({ type: \"click_nonnav\", target: event.currentTarget }, null, null, OptionItemDislike.key.toUpperCase());\r\n ContentActionsToolbarActions.dislikeContent.getActionSender(this).send();\r\n } else {\r\n this.actionServiceClient.Undislike(documentId);\r\n TelemetryBase.trackEvent({ type: \"click_nonnav\", target: event.currentTarget }, null, null, OptionItemUndoDislike.key.toUpperCase());\r\n ContentActionsToolbarActions.undislikeContent.getActionSender(this).send();\r\n }\r\n return;\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Injects callbacks to more options menu buttons\r\n * @param {ButtonItemType} moreOptionsButton The more option button\r\n * @param {Status} status The current content status\r\n * @param {MoreOptionsCallbacks} The more options menu callbacks interface\r\n */\r\n private InjectCallbacksToMoreOptionsMenu(moreOptionsButton: ButtonItemType, status: Status, callbacks: MoreOptionsCallbacks): void {\r\n if (!moreOptionsButton || !moreOptionsButton.buttonData || !moreOptionsButton.buttonData.menuItems) {\r\n return;\r\n }\r\n const { menuItems } = moreOptionsButton.buttonData;\r\n\r\n if (status === Status.Like) {\r\n menuItems.find(e => e.key === LikeDislikeActionKey.undoliked).onSelect = (event: any) => callbacks.onLike(event);\r\n menuItems.find(e => e.key === LikeDislikeActionKey.dislike).onSelect = (event: any) => callbacks.onDislike(event);\r\n } else if (status === Status.DisLike) {\r\n menuItems.find(e => e.key === LikeDislikeActionKey.undodisliked).onSelect = (event: any) => callbacks.onDislike(event);\r\n menuItems.find(e => e.key === LikeDislikeActionKey.like).onSelect = (event: any) => callbacks.onLike(event);\r\n } else {\r\n menuItems.find(e => e.key === LikeDislikeActionKey.dislike).onSelect = (event: any) => callbacks.onDislike(event);\r\n }\r\n }\r\n\r\n /**\r\n * Sets base telemetry data for Content Actions Toolbar\r\n */\r\n private generateTelemetryTags(): void {\r\n this.sharingToolbarTelemetryProps = Telemetry.getChildTelemetryItem(this.telemetryProps, TelemetryConstants.socialToolbarTelemetryName, TelemetryTypes.Module);\r\n this.sharingToolbarTelemetryTags = Telemetry.render(this.sharingToolbarTelemetryProps);\r\n this.moreOptionsTelemetryTags = {\r\n Like: Telemetry.render(Telemetry.getChildTelemetryItem(this.sharingToolbarTelemetryProps, OptionItemLike.key.toUpperCase(), TelemetryTypes.Like)),\r\n Dislike: Telemetry.render(Telemetry.getChildTelemetryItem(this.sharingToolbarTelemetryProps, OptionItemDislike.key.toUpperCase(), TelemetryTypes.Dislike)),\r\n UndoLike: Telemetry.render(Telemetry.getChildTelemetryItem(this.sharingToolbarTelemetryProps, OptionItemUndoLike.key.toUpperCase(), TelemetryTypes.Unlike)),\r\n UndoDislike: Telemetry.render(Telemetry.getChildTelemetryItem(this.sharingToolbarTelemetryProps, OptionItemUndoDislike.key.toUpperCase(), TelemetryTypes.Undislike))\r\n };\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { CommonExperienceProps, TelemetryTags } from \"@msnews/experiences-base\";\r\n\r\nimport { AppError } from \"@msnews/diagnostics\";\r\nimport { ContentActionsToolbarClassNames } from \".\";\r\nimport { ManagedClasses } from \"@microsoft/fast-components-class-name-contracts-msft\";\r\nimport { SharingToolbarProps } from \"./components/sharing-toolbar\";\r\nimport { Status } from \"./ContentActionsToolbar.constants\";\r\n\r\n/**\r\n * Toolbar positioning options\r\n */\r\nexport enum ToolbarPosition {\r\n horizontal = \"horizontal\",\r\n vertical = \"vertical\"\r\n}\r\n\r\n/**\r\n * An interface to represent the ContentActionsToolbar jss managed classes.\r\n * @export\r\n * @interface ContentActionsToolbarManagedClasses\r\n */\r\nexport interface ContentActionsToolbarManagedClasses extends ManagedClasses { }\r\n\r\n/**\r\n * An interface to represent the ContentActionsToolbar handled props.\r\n * @export\r\n * @interface ContentActionsToolbarHandledProps\r\n */\r\nexport interface ContentActionsToolbarHandledProps extends CommonExperienceProps, ContentActionsToolbarManagedClasses {\r\n /**\r\n * Defines the toolbar position in case of single static position. Undefined otherwise.\r\n */\r\n staticPosition?: ToolbarPosition;\r\n\r\n /**\r\n * Position to render toolbar in\r\n * @type {ToolbarPosition}\r\n */\r\n position?: ToolbarPosition;\r\n\r\n /**\r\n * Sharing toolbar props\r\n * @type {SharingToolbarProps}\r\n */\r\n sharingToolbar?: SharingToolbarProps;\r\n\r\n /**\r\n * Content Status\r\n * @type {Status}\r\n */\r\n contentStatus?: Status;\r\n\r\n /**\r\n * Sharing toolbar error\r\n * @type {Error}\r\n */\r\n sharingError?: Error;\r\n\r\n /**\r\n * Root element telemetry tags\r\n * @type {TelemetryTags}\r\n */\r\n rootTelemetryTags?: TelemetryTags;\r\n}\r\n\r\n/**\r\n * An interface to represent the ContentActionsToolbar unhandled props.\r\n * @export\r\n * @interface ContentActionsToolbarUnhandledProps\r\n */\r\nexport interface ContentActionsToolbarUnhandledProps extends React.HTMLAttributes {}\r\n\r\n/**\r\n * The ContentActionsToolbar props type\r\n */\r\nexport type ContentActionsToolbarProps = ContentActionsToolbarHandledProps & ContentActionsToolbarUnhandledProps;\r\n\r\n/**\r\n * App Error Event Tracking Callback Signature\r\n */\r\nexport type TrackAppErrorEventSignature = (error: AppError) => void;\r\n\r\n/**\r\n * Click event tracking callback signature\r\n */\r\nexport type TrackTelemetryEventSignature = (event: Object, element: HTMLElement, destination: string, headline: string) => void;","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ActionHandler, IActionPayload, IReducer } from \"@msnews/experiences-redux\";\r\nimport { ContentActionsToolbarActions, ContentActionsToolbarState, ToolbarPosition } from \".\";\r\nimport { Status, ToolbarBreakpoints } from \"./ContentActionsToolbar.constants\";\r\n\r\nimport { DocumentData } from \"./ContentActionsToolbar.state\";\r\n\r\n/**\r\n * Experience initial state.\r\n */\r\nconst initialState: ContentActionsToolbarState = {\r\n documentData: undefined,\r\n documentId: undefined,\r\n position: undefined,\r\n sharingError: undefined,\r\n staticPosition: undefined,\r\n status: undefined\r\n};\r\n\r\n/**\r\n * The reducer for the ContentActionsToolbar connector, and the ContentActionsToolbarState\r\n * @export\r\n * @class\r\n */\r\nexport class ContentActionsToolbarReducer 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: ContentActionsToolbarState, actionPayload: IActionPayload): ContentActionsToolbarState {\r\n // Return the initial state for this experience, including the config.\r\n if (!state) {\r\n return initialState;\r\n }\r\n\r\n // Return the passed in state, if there is no action specified\r\n if (!actionPayload) {\r\n return state;\r\n }\r\n\r\n let newState: ContentActionsToolbarState;\r\n\r\n // handle actions\r\n ActionHandler.handleAction(actionPayload, ContentActionsToolbarActions.initializeToolbar, (breakpointIndex: number,\r\n isRSThreeDevice: boolean,\r\n documentId: string,\r\n staticPosition: ToolbarPosition) => {\r\n newState = initialState;\r\n newState.position = this.getToolbarPosition(staticPosition, isRSThreeDevice, breakpointIndex);\r\n newState.documentId = documentId;\r\n newState.staticPosition = staticPosition;\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, ContentActionsToolbarActions.ContentStatuReady, (status: Status) => {\r\n newState = {\r\n ...state,\r\n status\r\n };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, ContentActionsToolbarActions.documentDataReady, (documentData: DocumentData) => {\r\n newState = {\r\n ...state,\r\n documentData\r\n };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, ContentActionsToolbarActions.likeContent, () => {\r\n newState = {\r\n ...state,\r\n status: Status.Like\r\n };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, ContentActionsToolbarActions.unlikeContent, () => {\r\n newState = {\r\n ...state,\r\n status: Status.None\r\n };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, ContentActionsToolbarActions.dislikeContent, () => {\r\n newState = {\r\n ...state,\r\n status: Status.DisLike\r\n };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, ContentActionsToolbarActions.undislikeContent, () => {\r\n newState = {\r\n ...state,\r\n status: Status.None\r\n };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, ContentActionsToolbarActions.ViewportUpdate, (breakpointIndex: number, isRSThreeDevice: boolean) => {\r\n newState = {\r\n ...state,\r\n position: this.getToolbarPosition(state.staticPosition, isRSThreeDevice, breakpointIndex)\r\n };\r\n });\r\n\r\n ActionHandler.handleAction(actionPayload, ContentActionsToolbarActions.sharingToolbarError, (error: Error) => {\r\n newState = {\r\n ...state,\r\n sharingError: error\r\n };\r\n });\r\n\r\n return newState || state;\r\n }\r\n\r\n /**\r\n * Calculates current toolbar position\r\n * @param staticPosition Defines orientation for static position if single position. Undefined otherwise.\r\n * @param isRSThreeDevice Indicates if device is RSThree\r\n * @param breakpointIndex Current breakpoint index.\r\n * @returns Toolbar current position\r\n */\r\n private getToolbarPosition(staticPosition: ToolbarPosition, isRSThreeDevice: boolean, breakpointIndex: number): ToolbarPosition {\r\n if (staticPosition) {\r\n return staticPosition;\r\n } else {\r\n const currentBreakpointIndex = isRSThreeDevice ? ToolbarBreakpoints.Breakpoint3_2 : ToolbarBreakpoints.Breakpoint3_3;\r\n return breakpointIndex >= currentBreakpointIndex ? ToolbarPosition.vertical : ToolbarPosition.horizontal;\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n DesignSystem,\r\n ElevationMultiplier,\r\n applyElevation,\r\n highContrastSelector,\r\n neutralFillActive,\r\n neutralFillHover,\r\n neutralForegroundRest,\r\n neutralLayerCard\r\n} from \"@microsoft/fast-components-styles-msft\";\r\nimport { applyLocalizedProperty, toPx } from \"@microsoft/fast-jss-utilities\";\r\nimport { iconContainerDefaultColor, likeDislikeIconBackroundColor, moreOptionsIconColors } from \"./SharingToolbar.constants\";\r\n\r\nimport { CardContextMenuClassNameContract } from \"@msnews/card-context-menu\";\r\nimport { ComponentStyles } from \"@microsoft/fast-jss-manager\";\r\nimport { SharingToolbarClassNames } from \"./\";\r\n\r\n// reduce listItem dimension to 32, remove margin for iconListHorizontal (3px) and add list icon margin (in between) dinamically hor/vert\r\nconst iconListItemDimension = 32;\r\nconst iconContainerDimension = 32;\r\nconst iconImageDimension = 18;\r\nconst iconPadding = 10;\r\n\r\n/**\r\n * The SharingToolbar styles\r\n * @type {ComponentStyles}\r\n */\r\nexport const SharingToolbarStyles: ComponentStyles = (config: DesignSystem) => {\r\n return {\r\n icon_none: {},\r\n icon_like: {},\r\n icon_dislike: {},\r\n iconListHorizontal: {\r\n \"list-style\": \"none\",\r\n padding: \"0\",\r\n margin: \"0\",\r\n \"text-align\": \"center\",\r\n \"& $iconListItem\": {\r\n [applyLocalizedProperty(\"margin-right\", \"margin-left\", config.direction)]: toPx(iconPadding)\r\n }\r\n },\r\n iconListVertical: {\r\n float: \"left\",\r\n height: \"auto\",\r\n width: toPx(iconListItemDimension),\r\n position: \"absolute\",\r\n \"& $iconListItem\": {\r\n \"margin-bottom\": toPx(iconPadding)\r\n }\r\n },\r\n iconListItem: {\r\n \"align-items\": \"center\",\r\n display: \"inline-flex\",\r\n height: toPx(iconListItemDimension),\r\n \"justify-content\": \"center\",\r\n width: toPx(iconListItemDimension),\r\n \"&:hover\": {\r\n cursor: \"pointer\"\r\n }\r\n },\r\n shareDialog: {\r\n \"background-color\": \"#f00\"\r\n },\r\n iconContainer: {\r\n cursor: \"pointer\",\r\n border: \"unset\",\r\n padding: \"unset\",\r\n \"background-color\": iconContainerDefaultColor,\r\n \"border-radius\": \"50%\",\r\n color: neutralForegroundRest,\r\n height: toPx(iconContainerDimension),\r\n \"justify-content\": \"center\",\r\n position: \"relative\",\r\n width: toPx(iconContainerDimension),\r\n \"$icon_none &\": {\r\n \"background-color\": likeDislikeIconBackroundColor.none\r\n },\r\n \"$icon_like &\": {\r\n \"background-color\": likeDislikeIconBackroundColor.like\r\n },\r\n \"$icon_dislike &\": {\r\n \"background-color\": likeDislikeIconBackroundColor.dislike\r\n },\r\n \"& img\": {\r\n \"vertical-align\": \"unset\"\r\n }\r\n },\r\n highContrast: {\r\n [highContrastSelector]: {\r\n background: \"Highlight\",\r\n border: \"1px solid Highlight\",\r\n \"border-radius\": \"50%\",\r\n \"& svg\" : {\r\n fill: \"Highlight\"\r\n }\r\n }\r\n },\r\n iconImage: {\r\n bottom: \"0\",\r\n left: \"0\",\r\n margin: \"7px\",\r\n right: \"0\",\r\n top: \"0\",\r\n height: toPx(iconImageDimension),\r\n width: toPx(iconImageDimension)\r\n },\r\n moreOptions: {\r\n height: toPx(iconContainerDimension),\r\n width: toPx(iconContainerDimension),\r\n [highContrastSelector]: {\r\n width: toPx(iconContainerDimension - 2),\r\n height: toPx(iconContainerDimension - 2)\r\n }\r\n }\r\n };\r\n};\r\n\r\n/**\r\n * The context menu styles\r\n * @type {ComponentStyles}\r\n */\r\nexport const contextMenuStyles: Partial> = {\r\n menuContainer: {\r\n \"background-color\": moreOptionsIconColors.background,\r\n \"border-radius\": \"50%\",\r\n height: toPx(iconContainerDimension),\r\n width: toPx(iconContainerDimension),\r\n [highContrastSelector]: {\r\n width: toPx(iconContainerDimension - 2),\r\n height: toPx(iconContainerDimension - 2)\r\n }\r\n },\r\n settingButton: {\r\n background: \"none\",\r\n border: \"0\",\r\n cursor: \"pointer\",\r\n display: \"flex\",\r\n padding: \"0\",\r\n height: toPx(iconContainerDimension),\r\n margin: \"0\",\r\n width: toPx(iconContainerDimension),\r\n \"& svg\": {\r\n color: moreOptionsIconColors.foreground,\r\n display: \"flex\",\r\n margin: \"auto\",\r\n height: \"inherit\",\r\n width: toPx(iconImageDimension),\r\n \"& path\": {\r\n fill: \"currentColor\"\r\n }\r\n }\r\n },\r\n contextMenu: {\r\n ...applyElevation(ElevationMultiplier.e11),\r\n \"background-color\": neutralLayerCard,\r\n border: \"none\",\r\n display: \"grid\",\r\n padding: \"8px 0\",\r\n margin: \"0 14px\",\r\n width: \"240px\"\r\n },\r\n contextMenuItem: {\r\n background: neutralLayerCard,\r\n \"box-sizing\": \"border-box\",\r\n border: \"none\",\r\n display: \"inline-block\",\r\n padding: \"6px 16px\",\r\n width: \"auto\",\r\n \"&:hover, &:focus\": {\r\n background: neutralFillHover(neutralLayerCard),\r\n border: \"none\"\r\n },\r\n \"&:active\": {\r\n background: neutralFillActive(neutralLayerCard)\r\n }\r\n },\r\n contextMenuItem_contentRegion: {\r\n color: neutralForegroundRest(neutralLayerCard),\r\n \"grid-column-start\": \"1\"\r\n }\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { applyFontWeightNormal, applyFontWeightSemiBold, applyTypeRampConfig, getLineHeight, neutralFillStealthRest, neutralForegroundHover } from \"@microsoft/fast-components-styles-msft\";\r\nimport { applyLocalizedProperty, applyMaxLines, toPx } from \"@microsoft/fast-jss-utilities\";\r\n\r\nimport { ComponentStyles } from \"@microsoft/fast-jss-manager\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { DialogArticleCardClassNameContract } from \"./DialogArticleCard.classnames\";\r\n\r\nconst ArticleCardImageBorderRadius = 2;\r\nconst RelatedCardHeight = 100;\r\nconst RelatedCardImageSize = 100;\r\nconst HeadlineTextMargin = 16;\r\n\r\nconst borderColor = \"rgba(0,0,0, 0.05)\";\r\nconst DialogArticleCardTypeRamp = \"t7\";\r\n\r\n/**\r\n * The DialogArticleCard styles\r\n * @type {ComponentStyles}\r\n */\r\nexport const DialogArticleCardStyles: ComponentStyles = (config: DesignSystem) => {\r\n return {\r\n articleCard: {\r\n background: \"none\",\r\n \"border-bottom\": `1px solid ${borderColor}`,\r\n cursor: \"pointer\",\r\n display: \"flex\",\r\n padding: \"15px 0\",\r\n position: \"relative\"\r\n },\r\n articleCard_content: {\r\n display: \"flex\",\r\n \"text-decoration\": \"none\",\r\n \"&:hover\": {\r\n \"& $articleCard_headline\": {\r\n color: neutralForegroundHover(neutralFillStealthRest),\r\n \"text-decoration\": \"underline\"\r\n },\r\n \"& $articleCard_imageOverlay\": {\r\n opacity: 0.1\r\n }\r\n }\r\n },\r\n articleCard_imageWrapper: {\r\n position: \"relative\",\r\n \"& $articleCard_image\": {\r\n height: toPx(RelatedCardImageSize)\r\n }\r\n },\r\n articleCard_image: {\r\n \"border-radius\": toPx(ArticleCardImageBorderRadius),\r\n \"object-fit\": \"cover\",\r\n width: toPx(RelatedCardImageSize)\r\n },\r\n articleCard_imageOverlay: {\r\n height: \"100%\",\r\n opacity: \"0\",\r\n position: \"absolute\",\r\n top: \"0\",\r\n width: \"100%\"\r\n },\r\n articleCard_textWrapper: {\r\n \"box-sizing\": \"border-box\",\r\n flex: \"1\",\r\n height: toPx(RelatedCardHeight),\r\n padding: applyLocalizedProperty(`0 0 0 ${toPx(HeadlineTextMargin)}`, `0 ${toPx(HeadlineTextMargin)} 0 0`, config.direction)\r\n },\r\n articleCard_headline: {\r\n \"& $articleCard_headlineText\": {\r\n ...applyFontWeightSemiBold(),\r\n ...applyMaxLines(3, getLineHeight(DialogArticleCardTypeRamp)),\r\n ...applyTypeRampConfig(DialogArticleCardTypeRamp)\r\n }\r\n },\r\n articleCard_headlineText: {\r\n \"padding-top\": \"3px\"\r\n },\r\n articleCard_headlineMask: {},\r\n articleCard_provider: {\r\n bottom: \"23px\",\r\n display: \"inline-flex\",\r\n position: \"absolute\",\r\n \"& $articleCard_providerImage\": {\r\n height: \"16px\"\r\n },\r\n \"& $articleCard_providerTitle\": {\r\n \"line-height\": \"16px\"\r\n }\r\n },\r\n articleCard_providerImage: {\r\n display: \"inline-block\",\r\n [applyLocalizedProperty(\"padding-right\", \"padding-left\", config.direction)]: \"8px\"\r\n },\r\n articleCard_providerTitle: {\r\n display: \"inline-block\",\r\n \"vertical-align\": \"top\",\r\n ...applyFontWeightNormal()\r\n },\r\n articleCard_noImage: {\r\n \"& $articleCard_textWrapper\": {\r\n height: \"auto\",\r\n \"text-align\": applyLocalizedProperty(\"left\", \"right\", config.direction)\r\n },\r\n \"& $articleCard_provider\": {\r\n \"margin-top\": \"15px\",\r\n position: \"static\"\r\n },\r\n \"& $articleCard_headlineText\": {\r\n \"padding-top\": \"0\"\r\n }\r\n }\r\n };\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n DialogArticleCard as BaseDialogArticleCard,\r\n DialogArticleCardHandledProps as BaseDialogArticleCardHandledProps,\r\n DialogArticleCardProps as BaseDialogArticleCardProps,\r\n DialogArticleCardManagedClasses,\r\n DialogArticleCardUnhandledProps\r\n} from \"./DialogArticleCard\";\r\nimport manageJss, { ManagedJSSProps } from \"@microsoft/fast-jss-manager-react\";\r\n\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { DialogArticleCardClassNameContract } from \"./DialogArticleCard.classnames\";\r\nimport { DialogArticleCardStyles } from \"./DialogArticleCard.styles\";\r\nimport { Subtract } from \"utility-types\";\r\n\r\n/*\r\n * The type returned by manageJss type is very complicated so we'll let the\r\n * compiler infer the type instead of re-declaring just for the package export\r\n */\r\n/* tslint:disable-next-line:typedef */\r\nconst DialogArticleCard = manageJss(DialogArticleCardStyles)(BaseDialogArticleCard);\r\ntype DialogArticleCard = 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\ninterface DialogArticleCardHandledProps\r\n extends Subtract {}\r\n\r\n// Create type for manageJSS HOC styled instance we are exporting\r\ntype DialogArticleCardProps = ManagedJSSProps<\r\n BaseDialogArticleCardProps,\r\n DialogArticleCardClassNameContract,\r\n DesignSystem\r\n>;\r\n\r\nexport {\r\n DialogArticleCard,\r\n DialogArticleCardProps,\r\n DialogArticleCardHandledProps,\r\n DialogArticleCardUnhandledProps,\r\n DialogArticleCardManagedClasses,\r\n DialogArticleCardClassNameContract\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport * as React from \"react\";\r\n\r\nimport { ArticleCard, ArticleProviderProps } from \"@msnews/article-card\";\r\nimport {\r\n DialogArticleCardHandledProps,\r\n DialogArticleCardManagedClasses,\r\n DialogArticleCardUnhandledProps\r\n} from \"./DialogArticleCard.props\";\r\nimport { HandledPropsKeys, ImageResizeMode, generateImageUrlFromBaseUrl } from \"@msnews/core\";\r\nimport { HeadingProps, HeadingSize, HeadingTag } from \"@microsoft/fast-components-react-msft\";\r\nimport { TypographyProps, TypographySize, TypographyTag } from \"@microsoft/fast-components-react-base\";\r\n\r\nimport Foundation from \"@microsoft/fast-components-foundation-react\";\r\n\r\n/**\r\n * Dialog article card\r\n * @class - Dialog Article Card\r\n * @classdesc - An dialog article Card composed from the base article card.\r\n */\r\nexport class DialogArticleCard extends Foundation {\r\n /**\r\n * Handled props contract\r\n * @protected\r\n * @type { HandledPropsKeys }\r\n */\r\n protected handledProps: HandledPropsKeys = {\r\n anchorRef: undefined,\r\n articleId: undefined,\r\n headlineTitle: undefined,\r\n href: undefined,\r\n image: undefined,\r\n managedClasses: undefined,\r\n provider: undefined\r\n };\r\n\r\n /**\r\n * Constructs an DialogArticleCard component\r\n * @constructor\r\n * @param { DialogArticleCardHandledProps & DialogArticleCardManagedClasses } props props contract\r\n */\r\n constructor(props: DialogArticleCardHandledProps & DialogArticleCardManagedClasses) {\r\n super(props);\r\n }\r\n\r\n /**\r\n * Component rendered\r\n * @method\r\n * @returns {JSX.Element} the DialogArticleCard component\r\n */\r\n public render(): JSX.Element {\r\n let { href, image, managedClasses } = this.props;\r\n\r\n if (image && image.src) {\r\n image.src = generateImageUrlFromBaseUrl(\r\n image.src,\r\n {\r\n width: 100,\r\n height: 100,\r\n enableDpiScaling: false,\r\n mode: ImageResizeMode.Scale\r\n });\r\n }\r\n\r\n const articleCard = (\r\n \r\n );\r\n\r\n if (image) {\r\n return (\r\n articleCard\r\n );\r\n } else {\r\n return (\r\n
    \r\n {articleCard}\r\n
    \r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Coerces the title props to enforce visual level\r\n * @method\r\n * @returns {HeadingProps} the headline title props\r\n */\r\n private coerceTitleProps(): any {\r\n const coercedProps: Partial = {\r\n size: HeadingSize._6,\r\n tag: HeadingTag.h3\r\n };\r\n\r\n return { ...this.props.headlineTitle, ...coercedProps };\r\n }\r\n\r\n /**\r\n * Coerces the provider props to enforce visual level of the name\r\n * @method\r\n * @returns {ArticleProviderProps} the provider props\r\n */\r\n private coerceProviderProps(): ArticleProviderProps {\r\n const { provider } = this.props;\r\n if (!provider) {\r\n return;\r\n }\r\n\r\n const coercedProviderNameProps: Partial = {\r\n size: TypographySize._8,\r\n tag: TypographyTag.h5\r\n };\r\n\r\n const coercedProps: Partial = {\r\n name: { ...provider.name, ...coercedProviderNameProps }\r\n };\r\n\r\n const coerceProviderProps = { ...provider, ...coercedProps };\r\n if (!coerceProviderProps.image || !coerceProviderProps.image.src) {\r\n coerceProviderProps.image = undefined;\r\n }\r\n\r\n return coerceProviderProps;\r\n }\r\n}\r\n\r\nexport * from \"./DialogArticleCard.props\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n SharingToolbarHandledProps as BaseComponentHandledProps,\r\n SharingToolbarProps as BaseComponentProps,\r\n ButtonItemType,\r\n ButtonType,\r\n SharingToolbarManagedClasses,\r\n SharingToolbarUnHandledProps\r\n} from \"./SharingToolbar.props\";\r\nimport manageJss, { ManagedJSSProps } from \"@microsoft/fast-jss-manager-react\";\r\n\r\nimport { SharingToolbar as BaseComponent } from \"./SharingToolbar\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { SharingToolbarClassNames } from \"./SharingToolbar.classnames\";\r\nimport { SharingToolbarStyles } from \"./SharingToolbar.styles\";\r\nimport { Subtract } from \"utility-types\";\r\n\r\n/*\r\n * The type returned by manageJss type is very complicated so we'll let the\r\n * compiler infer the type instead of re-declaring just for the package export\r\n */\r\n/* tslint:disable-next-line:typedef */\r\nconst SharingToolbar = manageJss(SharingToolbarStyles)(BaseComponent);\r\ntype SharingToolbar = 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\ninterface SharingToolbarHandledProps extends Subtract { }\r\n\r\n// Create type for manageJSS HOC styled instance we are exporting\r\ntype SharingToolbarProps = ManagedJSSProps;\r\n\r\n// Export everything a user might need from this index file\r\nexport {\r\n ButtonType,\r\n ButtonItemType,\r\n SharingToolbar,\r\n SharingToolbarProps,\r\n SharingToolbarClassNames,\r\n SharingToolbarHandledProps,\r\n SharingToolbarUnHandledProps\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport * as ReactDOM from \"react-dom\";\r\n\r\nimport {\r\n ButtonItemType,\r\n ButtonType,\r\n SharingToolbarHandledProps,\r\n SharingToolbarProps,\r\n SharingToolbarUnHandledProps\r\n} from \"./SharingToolbar.props\";\r\nimport { Glyph, Icon } from \"@msnews/icon\";\r\nimport { SharingToolbarStyles, contextMenuStyles } from \"./SharingToolbar.styles\";\r\nimport { get, merge } from \"lodash-es\";\r\n\r\nimport { CardContextMenu } from \"@msnews/card-context-menu\";\r\nimport { ComponentStyles } from \"@microsoft/fast-jss-manager\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { DialogArticleCard } from \"../dialog-article-card\";\r\nimport { DialogClassNameContract } from \"@microsoft/fast-components-react-base\";\r\nimport Foundation from \"@microsoft/fast-components-foundation-react\";\r\nimport { HandledPropsKeys } from \"@msnews/core\";\r\nimport React from \"react\";\r\nimport { Share } from \"@edge-web-ui/news-icons\";\r\nimport { ShareDialog } from \"@msnews/share-dialog\";\r\nimport { SharingToolbarClassNames } from \".\";\r\nimport { SocialMediaIcon } from \"@msnews/social-media-icon\";\r\nimport { Status } from \"../../ContentActionsToolbar.constants\";\r\nimport { ToolbarPosition } from \"../../ContentActionsToolbar.props\";\r\nimport { moreOptionsMenuDefaultOffsetPos } from \"./SharingToolbar.constants\";\r\n\r\n/**\r\n * The local state interface of the component\r\n */\r\nexport interface SharingToolbarState {\r\n /** Flag to determine if share dialog should be displayed */\r\n shareDialogOpened: boolean\r\n}\r\n\r\n/**\r\n * Social media sharing toolbar component\r\n * @class - SharingToolbar\r\n * @classdesc - Sharing toolbar component class\r\n */\r\nexport class SharingToolbar extends Foundation {\r\n /**\r\n * Describes the object that enumerates all handled props for a component.\r\n * @protected\r\n * @type { HandledPropsKeys }\r\n */\r\n protected handledProps: HandledPropsKeys = {\r\n managedClasses: undefined,\r\n position: undefined,\r\n sharingButtons: undefined\r\n };\r\n\r\n /**\r\n * Stylesheet to apply to article card\r\n * @type {Partial>}\r\n */\r\n private articleCardStylesheet: Partial>;\r\n\r\n /**\r\n * Constructs a SharingToolbar component\r\n * @constructor\r\n * @param { SharingToolbarProps } props props contract\r\n */\r\n constructor(props: SharingToolbarProps) {\r\n super(props);\r\n this.state = {\r\n shareDialogOpened: false\r\n };\r\n }\r\n\r\n /**\r\n * Render sharing toolbar component\r\n * @public\r\n * @return {JSX.Element}\r\n */\r\n public render(): JSX.Element {\r\n return (\r\n
    \r\n
      \r\n {this.renderSharingButtons()}\r\n
    \r\n {this.renderShareDialog()}\r\n
    \r\n );\r\n }\r\n\r\n /**\r\n * Get the classname based on positioning of the toolbar\r\n */\r\n private getPositioningClassName(): string {\r\n const positionClass: string = this.props.position === ToolbarPosition.horizontal ?\r\n this.managedClass(\"iconListHorizontal\") :\r\n this.managedClass(\"iconListVertical\");\r\n\r\n return positionClass;\r\n }\r\n\r\n /**\r\n * Render the toolbar sharing buttons\r\n * @private\r\n * @return {JSX.Element} The sharing buttons element\r\n */\r\n private renderSharingButtons(): JSX.Element[] {\r\n if (!this.props.sharingButtons) {\r\n return ([]);\r\n }\r\n\r\n return this.props.sharingButtons.map(buttonItem => {\r\n if (!buttonItem.buttonData) {\r\n return null;\r\n }\r\n\r\n const buttonId: string = buttonItem.buttonType === ButtonType.SocialMedia ? buttonItem.buttonData.mediaType.toString() : buttonItem.buttonType.toString();\r\n let listItem: JSX.Element;\r\n\r\n switch (buttonItem.buttonType) {\r\n case ButtonType.SocialMedia:\r\n listItem = this.renderSocialMediaIcon(buttonItem);\r\n break;\r\n case ButtonType.ShareDialog:\r\n listItem = this.renderShareDialogIcon(buttonItem);\r\n break;\r\n case ButtonType.LikeDislike:\r\n listItem = this.renderLikeDislikeIcon(buttonItem);\r\n break;\r\n case ButtonType.MoreOptions:\r\n listItem = this.renderMoreOptionsIcon(buttonItem);\r\n break;\r\n default:\r\n return (null);\r\n }\r\n\r\n return (\r\n
  • \r\n {listItem}\r\n
  • \r\n );\r\n });\r\n }\r\n\r\n /**\r\n * Renders the share dialog\r\n * @private\r\n * @return {JSX.Element} The share dialog element\r\n */\r\n private renderShareDialog(): JSX.Element {\r\n const shareDialogItem = this.props.sharingButtons.find(x => x.buttonType === ButtonType.ShareDialog);\r\n if (!shareDialogItem || !shareDialogItem.buttonData) {\r\n return null;\r\n }\r\n\r\n const { shareDialogProps, dialogArticleCardProps, articleTelemetryTags } = shareDialogItem.buttonData;\r\n if (!this.state.shareDialogOpened || !shareDialogProps || !dialogArticleCardProps) {\r\n return null;\r\n }\r\n\r\n const shareDialog = (\r\n \r\n \r\n \r\n );\r\n\r\n return ReactDOM.createPortal(\r\n shareDialog,\r\n document.body\r\n );\r\n }\r\n\r\n /**\r\n * Renders the social media icon element\r\n * @private\r\n * @param {ButtonItemType} buttonItem The button item data\r\n * @return {JSX.Element} The share dialog element\r\n */\r\n private renderSocialMediaIcon(buttonItem: ButtonItemType): JSX.Element {\r\n const { attributes, mediaType, contentUrl, contentTitle, emailBody, icon, ocid, target, newWindowTelemetryCall } = buttonItem.buttonData;\r\n if (!mediaType || !contentUrl || !contentTitle) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Renders the share dialog icon element\r\n * @private\r\n * @param {ButtonItemType} buttonItem The button item data\r\n * @return {JSX.Element} The share dialog icon element\r\n */\r\n private renderShareDialogIcon(buttonItem: ButtonItemType): JSX.Element {\r\n const { attributes, shareDialogProps, dialogArticleCardProps, onSelect } = buttonItem.buttonData;\r\n if (!shareDialogProps || !dialogArticleCardProps || !shareDialogProps.enabled || !shareDialogProps.contentTitle || !shareDialogProps.contentUrl) {\r\n return null;\r\n }\r\n\r\n return (\r\n this.onShareDialogOpen(event, onSelect)}\r\n {...attributes}\r\n {...buttonItem.telemetryTags}\r\n >\r\n \r\n \r\n);\r\n }\r\n\r\n /**\r\n * Renders the like/dislike icon element\r\n * @private\r\n * @param {ButtonItemType} buttonItem The button item data\r\n * @return {JSX.Element} The like/dislike icon element\r\n */\r\n private renderLikeDislikeIcon(buttonItem: ButtonItemType): JSX.Element {\r\n if (!buttonItem.buttonData.status) {\r\n return;\r\n }\r\n const { attributes, status, onSelect } = buttonItem.buttonData;\r\n\r\n const glyphType = status !== Status.DisLike ?\r\n (status === Status.Like ? Glyph.LikedText : Glyph.LikeText) :\r\n Glyph.DislikeText;\r\n\r\n const iconClassName = this.managedClass(\"icon_\" + status.toString() as keyof SharingToolbarClassNames);\r\n return (\r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n }\r\n\r\n /**\r\n * Renders the more options icon element\r\n * @private\r\n * @param {ButtonItemType} buttonItem The button item data\r\n * @return {JSX.Element} The more options icon element\r\n */\r\n private renderMoreOptionsIcon(buttonItem: ButtonItemType): JSX.Element {\r\n if (!buttonItem.buttonData || !buttonItem.buttonData.status || !buttonItem.buttonData.menuItems) {\r\n return;\r\n }\r\n const { attributes, menuItems, offsetPos, zIndex } = buttonItem.buttonData;\r\n\r\n const positionOffset = this.props.position === ToolbarPosition.vertical\r\n ? { ...moreOptionsMenuDefaultOffsetPos, ...offsetPos }\r\n : undefined;\r\n\r\n return (\r\n \r\n \r\n
    \r\n );\r\n }\r\n\r\n /**\r\n * Enables and open the share dialog\r\n * @private\r\n * @param {any} event Event\r\n * @param {(e: any) => void)} onSelect Telemetry callback\r\n */\r\n private onShareDialogOpen = (event: any, onSelect: (e: any) => void): void => {\r\n this.setState({ shareDialogOpened: true });\r\n if (onSelect) {\r\n onSelect(event);\r\n }\r\n }\r\n\r\n /**\r\n * Disables and close the share dialog\r\n * @private\r\n */\r\n private onShareDialogClose = (): void => {\r\n this.setState({ shareDialogOpened: false });\r\n }\r\n\r\n /**\r\n * Utility function to simplify getting class name from managedClasses.\r\n * @param className - The class to get from managedClasses\r\n * @returns The managed class name\r\n */\r\n private managedClass = (className: keyof SharingToolbarClassNames): string => {\r\n return get(this.props.managedClasses, className);\r\n }\r\n\r\n /**\r\n * Utility function to obtain the highContrast styles for non social media content actions buttons\r\n * @returns The high contrast styles to append\r\n */\r\n private appendHighContrastStyle = (): string => {\r\n return this.managedClass(\"highContrast\") ? \" \" + this.managedClass(\"highContrast\") : \"\";\r\n }\r\n}\r\n\r\nexport * from \"./SharingToolbar.props\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n ContentActionsToolbarHandledProps,\r\n ContentActionsToolbarUnhandledProps\r\n} from \"./ContentActionsToolbar.props\";\r\nimport { ContentActionsToolbarProps, ToolbarPosition } from \".\";\r\nimport { PlaceHolderId, experienceDefaultName } from \"./ContentActionsToolbar.constants\";\r\n\r\nimport { BaseExperience } from \"@msnews/experiences-base\";\r\nimport { ContentActionsToolbarAppErrors } from \"@msnews/diagnostics\";\r\nimport { HandledPropsKeys } from \"@msnews/core\";\r\nimport React from \"react\";\r\nimport { SharingToolbar } from \"./components/sharing-toolbar\";\r\nimport { TelemetryBase } from \"@msnews/core\";\r\nimport { classNames } from \"@microsoft/fast-web-utilities\";\r\nimport { markTtvr } from \"@msnews/diagnostics\";\r\n\r\n/**\r\n * Content Action toolbar base experience class\r\n * @class - ContentActionsToolbar\r\n * @classdesc - ContentActionsToolbar\r\n */\r\nexport class ContentActionsToolbar extends BaseExperience {\r\n /**\r\n * The ContentActionsToolbar default prop contract\r\n * Describes any default values for any component handled props\r\n * @public\r\n * @type { Partial }\r\n */\r\n public static defaultProps: Partial = {\r\n experienceName: experienceDefaultName\r\n };\r\n\r\n /**\r\n * The content action toolbar handled prop contract\r\n * Describes the object that enumerates all handled props for a component. This\r\n * object includes all props that can in some way consumed or manipulated by component\r\n * code.\r\n * @protected\r\n * @type { HandledPropsKeys }\r\n */\r\n protected handledProps: HandledPropsKeys = {\r\n contentStatus: undefined,\r\n customField: undefined,\r\n experienceName: undefined,\r\n managedClasses: undefined,\r\n onExperienceMilestoneTimingUpdate: undefined,\r\n position: undefined,\r\n rootTelemetryTags: undefined,\r\n sharingError: undefined,\r\n sharingToolbar: undefined,\r\n staticPosition: undefined\r\n };\r\n\r\n /**\r\n * Flag to confirm first render is completed\r\n * @type {boolean}\r\n */\r\n private firstRenderCompleted: boolean = false;\r\n\r\n /**\r\n * Constructs a ContentActionsToolbar component\r\n * @constructor\r\n * @param { ContentActionsToolbarProps } props props contract\r\n */\r\n constructor(props: ContentActionsToolbarProps) {\r\n super(props);\r\n }\r\n\r\n /**\r\n * Render App component.\r\n *\r\n * @public\r\n * @return {JSX.Element}\r\n */\r\n public render(): JSX.Element {\r\n super.render();\r\n\r\n if (this.props.position && this.props.sharingToolbar && this.props.sharingToolbar.sharingButtons && !this.props.sharingError) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Trigger after component update\r\n */\r\n public componentDidUpdate(prevProps: ContentActionsToolbarHandledProps): void {\r\n super.componentDidUpdate(prevProps);\r\n\r\n if (!prevProps.staticPosition && this.shouldFlip()) {\r\n this.flipToolbar();\r\n }\r\n\r\n if (!this.firstRenderCompleted) {\r\n markTtvr(this.props.experienceName);\r\n this.firstRenderCompleted = true;\r\n }\r\n }\r\n\r\n /**\r\n * A handler that gets invoked for unhandled errors.\r\n * @param error error object.\r\n */\r\n public componentDidCatch(error: Error): void {\r\n const appError = { ...ContentActionsToolbarAppErrors.ContentActionsBaseExperienceError, message: `${error.message}\\n${error.stack}` };\r\n TelemetryBase.trackAppErrorEvent(appError);\r\n }\r\n\r\n /**\r\n * Get the classname based on positioning of the toolbar\r\n */\r\n private getPositioningClassName(): string {\r\n const managedClasses = this.props.managedClasses;\r\n const positionClass: string = this.props.position === ToolbarPosition.horizontal ?\r\n managedClasses.contentActionsToolbar_horizontal :\r\n managedClasses.contentActionsToolbar_vertical;\r\n\r\n return positionClass;\r\n }\r\n\r\n /**\r\n * Check if toolbar needs to flip from one position to another\r\n * @method\r\n * @returns {boolean} True if toolbar should flip. False otherwise.\r\n */\r\n private shouldFlip(): boolean {\r\n const { position } = this.props;\r\n\r\n const currentHostId = position === ToolbarPosition.vertical ? PlaceHolderId.vertical : PlaceHolderId.horizontal;\r\n const hostElem = document.getElementById(currentHostId);\r\n if (!hostElem) {\r\n TelemetryBase.trackAppErrorEvent({\r\n ...ContentActionsToolbarAppErrors.ContentActionsFlipToolbarError,\r\n message: \"Missing toolbar placeholder while checking shouldFlip\",\r\n pb: {\r\n ...ContentActionsToolbarAppErrors.ContentActionsFlipToolbarError.pb,\r\n customMessage: `CurrentHostId: ${currentHostId}`\r\n }\r\n });\r\n return false;\r\n }\r\n return hostElem.getElementsByTagName(\"ul\").length === 0;\r\n }\r\n\r\n /**\r\n * Move toolbar from one placeholder to another, depending on the toolbar position\r\n * @method\r\n */\r\n private flipToolbar(): void {\r\n const { position } = this.props;\r\n const prevHostId = position === ToolbarPosition.vertical ? PlaceHolderId.horizontal : PlaceHolderId.vertical;\r\n const newHostId = position === ToolbarPosition.vertical ? PlaceHolderId.vertical : PlaceHolderId.horizontal;\r\n\r\n const prevHostElem = document.getElementById(prevHostId);\r\n const newHostElem = document.getElementById(newHostId);\r\n\r\n if (!prevHostElem || !newHostElem) {\r\n return null;\r\n }\r\n\r\n while (prevHostElem.childNodes.length > 0) {\r\n newHostElem.appendChild(prevHostElem.childNodes[0]);\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ComponentStyles } from \"@microsoft/fast-jss-manager\";\r\nimport { ContentActionsToolbarClassNames } from \".\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { toPx } from \"@microsoft/fast-jss-utilities\";\r\n\r\nconst toolbarMinDim = 40;\r\nconst iconHeight = 32;\r\n\r\n/**\r\n * The ContentActionsToolbar styles\r\n * @type {ComponentStyles}\r\n */\r\nexport const ContentActionsToolbarStyles: ComponentStyles = (config: DesignSystem) => {\r\n return {\r\n contentActionsToolbar: {\r\n \"background-color\": \"none\"\r\n },\r\n contentActionsToolbar_vertical: {\r\n width: toPx(toolbarMinDim)\r\n },\r\n contentActionsToolbar_horizontal: {\r\n width: \"auto\"\r\n }\r\n };\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport {\r\n ContentActionsToolbarHandledProps as BaseExperienceHandledProps,\r\n ContentActionsToolbarProps as BaseExperienceProps,\r\n ContentActionsToolbarManagedClasses,\r\n ContentActionsToolbarUnhandledProps,\r\n ToolbarPosition\r\n} from \"./ContentActionsToolbar.props\";\r\nimport {\r\n ContentActionsToolbarConfigSchema,\r\n ContentActionsToolbarMockConfig,\r\n ContentActionsToolbarMockState\r\n} from \"./experience-info\";\r\nimport { ContentActionsToolbarConnectorArgs, ContentActionsToolbarInspector } from \"./ContentActionsToolbar.inspector\";\r\nimport { PlaceHolderId, Status } from \"./ContentActionsToolbar.constants\";\r\nimport manageJss, { ManagedJSSProps } from \"@microsoft/fast-jss-manager-react\";\r\n\r\nimport {\r\n ContentActionsToolbar as BaseExperience\r\n} from \"./ContentActionsToolbar\";\r\nimport { ComponentClass } from \"react-redux\";\r\nimport { ContentActionsToolbarActions } from \"./ContentActionsToolbar.actions\";\r\nimport { ContentActionsToolbarClassNames } from \"./ContentActionsToolbar.classnames\";\r\nimport { ContentActionsToolbarConfig } from \"./ContentActionsToolbar.config\";\r\nimport { ContentActionsToolbarConnector } from \"./ContentActionsToolbar.connector\";\r\nimport { ContentActionsToolbarReducer } from \"./ContentActionsToolbar.reducer\";\r\nimport { ContentActionsToolbarState } from \"./ContentActionsToolbar.state\";\r\nimport { ContentActionsToolbarStyles } from \"./ContentActionsToolbar.styles\";\r\nimport { DesignSystem } from \"@microsoft/fast-components-styles-msft\";\r\nimport { ExperienceInfo } from \"@msnews/core\";\r\nimport { Subtract } from \"utility-types\";\r\n\r\n/*\r\n * The type returned by manageJss type is very complicated so we'll let the\r\n * compiler infer the type instead of re-declaring just for the package export\r\n */\r\n/* tslint:disable-next-line:typedef */\r\nconst ContentActionsToolbar = manageJss(ContentActionsToolbarStyles)(BaseExperience);\r\ntype ContentActionsToolbar = 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\ninterface ContentActionsToolbarHandledProps extends Subtract {}\r\n\r\n// Create type for manageJSS HOC styled instance we are exporting\r\ntype ContentActionsToolbarProps = ManagedJSSProps;\r\n\r\nconst ToolingInfo: ExperienceInfo<\r\n ContentActionsToolbarConfig,\r\n ContentActionsToolbarState,\r\n ContentActionsToolbarProps,\r\n ContentActionsToolbarConnectorArgs\r\n> = {\r\n reactComponent: ContentActionsToolbar,\r\n experienceConfigSchema: ContentActionsToolbarConfigSchema,\r\n mockState: ContentActionsToolbarMockState,\r\n mockConfig: ContentActionsToolbarMockConfig,\r\n inspector: ContentActionsToolbarInspector.inspect\r\n};\r\n\r\n// type for ContentActionsToolbar experience to be invoked by other experiences\r\ntype ContentActionsToolbarExp = ComponentClass;\r\n\r\n// Export everything a user might need from this index file\r\nexport {\r\n ContentActionsToolbar,\r\n ContentActionsToolbarActions,\r\n ContentActionsToolbarConfig,\r\n ContentActionsToolbarConnector,\r\n ContentActionsToolbarExp,\r\n ContentActionsToolbarProps,\r\n ContentActionsToolbarReducer,\r\n ContentActionsToolbarState,\r\n ContentActionsToolbarClassNames,\r\n ContentActionsToolbarHandledProps,\r\n ContentActionsToolbarUnhandledProps,\r\n PlaceHolderId,\r\n Status,\r\n ToolbarPosition,\r\n ToolingInfo\r\n};","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport \"../publicPath\";\r\n\r\nimport {\r\n ContentActionsToolbar,\r\n ContentActionsToolbarConfig,\r\n ContentActionsToolbarConnector,\r\n ContentActionsToolbarReducer,\r\n PlaceHolderId\r\n} from \"@msnews/content-actions-toolbar\";\r\nimport { ExperienceConfigWrapper, TelemetryBase, appEnvironment, resolver } from \"@msnews/core\";\r\nimport { ExperienceInitialProps, Telemetry } from \"@msnews/experiences-base\";\r\nimport { handleAppErrorEventCall, handlePartialPageImpressionCall, handleTelemetryCall } from \"../integration/PrimeTelemetry\";\r\n\r\nimport { ContentActionsToolbarAppErrors } from \"@msnews/diagnostics\";\r\nimport { DesignSystemDefaults } from \"@microsoft/fast-components-styles-msft\";\r\nimport { DesignSystemProvider } from \"@microsoft/fast-jss-manager-react\";\r\nimport { Mediator } from \"../integration/Mediator\";\r\nimport { PageBase } from \"@msnews/experiences-redux\";\r\nimport React from \"react\";\r\nimport { SharedDocumentType } from \"@msnews/views-helpers\";\r\nimport { ToolbarPosition } from \"@msnews/content-actions-toolbar\";\r\nimport { isNullOrUndefined } from \"util\";\r\n\r\n// export default function bootstrapPrimeHybrid(): void {\r\n// Get an instance of the PageBase for this app, and start the app\r\nconst app = PageBase.getInstance();\r\n\r\n// Mock documentId to be used when running hybrid locally for testing purposes\r\nconst mockDocumentId = \"BBKJJOS\";\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\n\r\n// Start the App\r\napp.start();\r\n\r\nlet hostElement: HTMLElement;\r\n\r\nconst appTelemetry = Telemetry.createRootProps(\"spaContentActionsToolbarExperienceContainer\", undefined, appEnvironment.RootTelemetryId);\r\nconst initialProps: ExperienceInitialProps = {\r\n contentId: mockDocumentId,\r\n parentTelemetry: appTelemetry,\r\n context: {\r\n handleTelemetryCall: handleTelemetryCall\r\n }\r\n};\r\n\r\n/**\r\n * Otains document data properties from Prime placeholder and sets up the initial props and appEnv variables\r\n */\r\nfunction setupContentActionsInitialState(): void {\r\n // For Content Actions the placeholder can be in vertical in one prime region or horizontal in another prime region (depending on pagetype and column size)\r\n hostElement = document.getElementById(PlaceHolderId.vertical) || document.getElementById(PlaceHolderId.horizontal) || document.getElementById(\"content-actions-toolbar\");\r\n\r\n const dataset = hostElement.dataset || {};\r\n const cmsDocumentId: string = dataset.documentid || mockDocumentId;\r\n const isRSThree: string = dataset.isrsthree || \"false\";\r\n\r\n // Check for the existence of second position and sets staticsPosition accordingly\r\n var staticPosition = hostElement.id === PlaceHolderId.vertical ?\r\n document.getElementById(PlaceHolderId.horizontal) ? undefined : ToolbarPosition.vertical :\r\n document.getElementById(PlaceHolderId.vertical) ? undefined : ToolbarPosition.horizontal;\r\n\r\n // Set initital props\r\n initialProps.contentId = cmsDocumentId;\r\n initialProps.context.staticPosition = staticPosition;\r\n initialProps.context.isRSThree = (isRSThree.toLowerCase() === \"true\");\r\n initialProps.context.documentType = SharedDocumentType.CMS;\r\n\r\n // Update app environment\r\n appEnvironment.HostPage = {\r\n originalUrl: location.href,\r\n hostName: location.hostname,\r\n verticalKey: dataset.verticalkey || \"news\",\r\n categoryKey: dataset.categorykey || \"other\",\r\n topDomain: appEnvironment.HostPage.topDomain\r\n };\r\n}\r\n\r\n/**\r\n * Connected the component to the Redux store passing initial props data\r\n * @param {any} experienceConfig\r\n * @returns The Redux connected component\r\n */\r\nfunction connectContentActionsComponent(contentActionsToolbarConfig: ContentActionsToolbarConfig): Promise> {\r\n const contentActionsToolbarConnector = new ContentActionsToolbarConnector(\"ContentActionsToolbar\",\r\n \"\",\r\n app.rootReducer,\r\n new ContentActionsToolbarReducer(),\r\n app.store,\r\n contentActionsToolbarConfig);\r\n return contentActionsToolbarConnector.connectComponent(ContentActionsToolbar, initialProps);\r\n}\r\n\r\n/**\r\n * Render the experience on hostElement placeholder\r\n * @param contentActionsExperience\r\n */\r\nfunction renderExperience(contentActionsExperience: any): void {\r\n app.renderRootElement(\r\n React.createElement(\r\n DesignSystemProvider,\r\n { designSystem: DesignSystemDefaults },\r\n React.createElement(contentActionsExperience)\r\n ),\r\n hostElement\r\n );\r\n}\r\n\r\nlet contentActionsConfig: ContentActionsToolbarConfig;\r\nconst configFilePath = \"cms/api/amp/experienceConfigIndex/BBWebZe\";\r\nresolver.getConfig(configFilePath)\r\n .then((experienceConfig: ExperienceConfigWrapper) => {\r\n if (!experienceConfig) {\r\n throw Error(`Failed to load config file. Path: ${configFilePath}`);\r\n }\r\n contentActionsConfig = experienceConfig.properties;\r\n setupContentActionsInitialState();\r\n return connectContentActionsComponent(contentActionsConfig);\r\n }).then(renderExperience)\r\n .catch(error => {\r\n handleAppErrorEventCall({\r\n ...ContentActionsToolbarAppErrors.ContentActionsExperienceLoadError,\r\n message: `Error in hybrid loading Content Actions experience`,\r\n pb: {\r\n ...ContentActionsToolbarAppErrors.ContentActionsExperienceLoadError.pb,\r\n customMessage: `Url: ${location.href} Config: ${contentActionsConfig} Error: ${error}`\r\n }\r\n });\r\n return;\r\n }\r\n );\r\n\r\n// Listen to update events from Prime (Necessary as video page auto updates current displayed video)\r\nMediator.registerContentActionsUpdatedEvent(async () => {\r\n setupContentActionsInitialState();\r\n connectContentActionsComponent(contentActionsConfig)\r\n .then(renderExperience);\r\n});"],"sourceRoot":""}