{"version":3,"sources":["webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:////home/vsts/work/1/s/node_modules/resolve-pathname/esm/resolve-pathname.js","webpack:////home/vsts/work/1/s/node_modules/value-equal/esm/value-equal.js","webpack:////home/vsts/work/1/s/node_modules/history/esm/history.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/descriptors.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-react-router-scroll/index.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/mergeClasses/mergeClasses.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/hidden-keys.js","webpack:///./.cache/normalize-page-path.js","webpack:///./.cache/find-path.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/inspect-source.js","webpack:////home/vsts/work/1/s/node_modules/is-in-browser/dist/module.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/object-property-is-enumerable.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:////home/vsts/work/1/s/node_modules/@reach/router/es/lib/history.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:////home/vsts/work/1/s/node_modules/mitt/dist/mitt.es.js","webpack:///./.cache/emitter.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/is-forced.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-plugin-manifest/gatsby-browser.js","webpack:////home/vsts/work/1/s/node_modules/clsx/dist/clsx.m.js","webpack:////home/vsts/work/1/s/node_modules/@reach/router/es/lib/utils.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-plugin-material-ui/utils.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/engine-is-node.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/has.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/document-create-element.js","webpack:///./.cache/react-lifecycles-compat.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/extends.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/global.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/styled/styled.js","webpack:////home/vsts/work/1/s/node_modules/jss/dist/jss.esm.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-react-router-scroll/scroll-handler.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/to-primitive.js","webpack:////home/vsts/work/1/s/node_modules/@mikaelkristiansson/domready/ready.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/makeStyles/indexCounter.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/is-pure.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-react-router-scroll/use-scroll-restoration.js","webpack:////home/vsts/work/1/s/node_modules/hoist-non-react-statics/node_modules/react-is/index.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-plugin-manifest/get-manifest-pathname.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/an-object.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/EnvUtils.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/CoreUtils.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/dynamicproto-js/lib/dist/esm/dynamicproto-js.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/DiagnosticLogger.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/PerfManager.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/TelemetryPluginChain.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/TelemetryHelpers.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/ChannelController.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Enums.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/BaseCore.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/NotificationManager.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/AppInsightsCore.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/RequestResponseHeaders.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/Common/DataSanitizer.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Util.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Constants.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/ConnectionStringParser.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/Base.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/Data.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/Common/Envelope.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/Envelope.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/Domain.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/EventData.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/Event.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/StackFrame.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/Exception.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/DataPointType.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/MetricData.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/DataPoint.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/Common/DataPoint.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/Metric.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/PageViewData.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/PageView.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/RemoteDependencyData.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/Trace.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/MessageData.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/PageViewPerformance.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Telemetry/Common/Data.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/IConfig.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/TelemetryItemCreator.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/Interfaces/PartAExtensions.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-common/dist-esm/applicationinsights-common.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-analytics-js/dist-esm/JavaScriptSDK/Telemetry/PageViewManager.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-analytics-js/dist-esm/JavaScriptSDK/Telemetry/PageVisitTimeManager.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-analytics-js/dist-esm/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-analytics-js/dist-esm/JavaScriptSDK/ApplicationInsights.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-channel-js/dist-esm/SendBuffer.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-channel-js/dist-esm/EnvelopeCreator.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-channel-js/dist-esm/Serializer.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-channel-js/dist-esm/Offline.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-channel-js/dist-esm/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-channel-js/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-channel-js/dist-esm/TelemetryProcessors/Sample.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-channel-js/dist-esm/Sender.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Session.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Application.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Device.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Internal.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/User.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Location.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/TelemetryTrace.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-properties-js/dist-esm/TelemetryContext.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-properties-js/dist-esm/PropertiesPlugin.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-core-js/dist-esm/JavaScriptSDK/InstrumentHooks.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-dependencies-js/dist-esm/ajaxRecord.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-dependencies-js/dist-esm/TraceParent.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-dependencies-js/dist-esm/ajax.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-web/dist-esm/Initialization.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-react-js/dist-esm/ReactPlugin.js","webpack:///./src/AppInsights.ts","webpack:///./gatsby-browser.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/array-includes.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/uid.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack:////home/vsts/work/1/s/node_modules/invariant/browser.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./.cache/page-renderer.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/object-get-own-property-symbols.js","webpack:////home/vsts/work/1/s/node_modules/core-js/modules/es.array.reduce.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-plugin-google-analytics/gatsby-browser.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./.cache/api-runner-browser-plugins.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/shared-key.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/to-indexed-object.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/to-object.js","webpack:///./.cache/register-service-worker.js","webpack:///./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-link/index.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/set-global.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/path.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-link/parse-path.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/engine-v8-version.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/typeof.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/shared.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/utils/esm/deepmerge.js","webpack:///./.cache/route-announcer-props.js","webpack:///./.cache/navigation.js","webpack:////home/vsts/work/1/s/node_modules/shallow-compare/es/index.js","webpack:///./.cache/ensure-resources.js","webpack:///./.cache/production-app.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/get-built-in.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/create-non-enumerable-property.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/StylesProvider/index.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/withTheme/withTheme.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/engine-user-agent.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/object-get-own-property-names.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/classof-raw.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/export.js","webpack:///./.cache/strip-prefix.js","webpack:////home/vsts/work/1/s/node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/createStyles/createStyles.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/native-weak-map.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/fails.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/require-object-coercible.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/extends.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/is-object.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js","webpack:///./.cache/prefetch.js","webpack:///./.cache/loader.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/array-method-is-strict.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/ie8-dom-define.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///(webpack)/buildin/global.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/indexed-object.js","webpack:////home/vsts/work/1/s/node_modules/tiny-invariant/dist/tiny-invariant.esm.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/a-function.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/to-integer.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-plugin-material-ui/gatsby-browser.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-react-router-scroll/scroll-container.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/create-property-descriptor.js","webpack:///./.cache/public-page-renderer.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/ThemeProvider/nested.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/array-reduce.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/to-absolute-index.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js","webpack:///./.cache/create-react-context.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/own-keys.js","webpack:////home/vsts/work/1/s/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/object-define-property.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/useTheme/useTheme.js","webpack:///./.cache/public-page-renderer-prod.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/enum-bug-keys.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/to-length.js","webpack:////home/vsts/work/1/s/node_modules/@reach/router/es/index.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/copy-constructor-properties.js","webpack:////home/vsts/work/1/s/node_modules/@microsoft/applicationinsights-shims/dist-esm/applicationinsights-shims.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/redefine.js","webpack:////home/vsts/work/1/s/node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js","webpack:////home/vsts/work/1/s/node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js","webpack:////home/vsts/work/1/s/node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js","webpack:////home/vsts/work/1/s/node_modules/hyphenate-style-name/index.js","webpack:////home/vsts/work/1/s/node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js","webpack:////home/vsts/work/1/s/node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js","webpack:////home/vsts/work/1/s/node_modules/css-vendor/dist/css-vendor.esm.js","webpack:////home/vsts/work/1/s/node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js","webpack:////home/vsts/work/1/s/node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/jssPreset/jssPreset.js","webpack:////home/vsts/work/1/s/node_modules/tiny-warning/dist/tiny-warning.esm.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/withStyles/withStyles.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/shared-store.js","webpack:///./.cache/api-runner-browser.js","webpack:////home/vsts/work/1/s/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/createGenerateClassName/createGenerateClassName.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/object-keys-internal.js","webpack:////home/vsts/work/1/s/node_modules/@babel/runtime/helpers/interopRequireWildcard.js","webpack:///./.cache/caches/gatsby-plugin-material-ui/styles-provider-props.js","webpack:////home/vsts/work/1/s/node_modules/gatsby-react-router-scroll/session-storage.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/internal-state.js","webpack:////home/vsts/work/1/s/node_modules/@material-ui/styles/esm/ServerStyleSheets/ServerStyleSheets.js","webpack:////home/vsts/work/1/s/node_modules/core-js/internals/array-method-uses-to-length.js"],"names":["_objectWithoutPropertiesLoose","source","excluded","key","i","target","sourceKeys","Object","keys","length","indexOf","isAbsolute","pathname","charAt","spliceOne","list","index","k","n","pop","to","from","undefined","hasTrailingSlash","toParts","split","fromParts","isToAbs","isFromAbs","mustEndAbs","concat","last","up","part","unshift","result","join","substr","obj","valueOf","prototype","call","valueEqual","a","b","Array","isArray","every","item","aValue","bValue","assign","addLeadingSlash","path","stripLeadingSlash","stripBasename","prefix","toLowerCase","hasBasename","stripTrailingSlash","slice","createPath","location","search","hash","createLocation","state","currentLocation","hashIndex","searchIndex","parsePath","decodeURI","e","URIError","locationsAreEqual","createTransitionManager","prompt","listeners","setPrompt","nextPrompt","confirmTransitionTo","action","getUserConfirmation","callback","appendListener","fn","isActive","listener","apply","arguments","push","filter","notifyListeners","_len","args","_key","forEach","canUseDOM","window","document","createElement","getConfirmation","message","confirm","getHistoryState","history","createBrowserHistory","props","ua","globalHistory","canUseHistory","navigator","userAgent","needsHashChangeListener","_props","_props$forceRefresh","forceRefresh","_props$getUserConfirm","_props$keyLength","keyLength","basename","getDOMLocation","historyState","_ref","_window$location","createKey","Math","random","toString","transitionManager","setState","nextState","handlePopState","event","isExtraneousPopstateEvent","handlePop","handleHashChange","forceNextPop","ok","fromLocation","toLocation","toIndex","allKeys","fromIndex","delta","go","revertPop","initialLocation","createHref","listenerCount","checkDOMListeners","addEventListener","removeEventListener","isBlocked","href","pushState","prevIndex","nextKeys","replace","replaceState","goBack","goForward","block","unblock","listen","unlisten","HashPathCoders","hashbang","encodePath","decodePath","noslash","slash","stripHash","url","getHashPath","substring","replaceHashPath","createHashHistory","_props$hashType","hashType","_HashPathCoders$hashT","ignorePath","encodedPath","prevLocation","allPaths","lastIndexOf","baseTag","querySelector","getAttribute","pushHashPath","nextPaths","clamp","lowerBound","upperBound","min","max","createMemoryHistory","_props$initialEntries","initialEntries","_props$initialIndex","initialIndex","entries","map","entry","nextIndex","nextEntries","splice","canGo","fails","module","exports","defineProperty","get","self","ReferenceError","__esModule","useScrollRestoration","ScrollContainer","ScrollContext","_scrollHandler","ScrollHandler","_scrollContainer","_useScrollRestoration","mergeClasses","options","baseClasses","newClasses","Component","nextClasses","pathCache","Map","matchPaths","trimPathname","rawPathname","decodeURIComponent","stripPrefix","__BASE_PATH__","absolutify","startsWith","URL","endsWith","setMatchPaths","value","findMatchPath","trimmedPathname","cleanPath","pickPaths","matchPath","originalPath","pick","normalizePagePath","route","grabMatchParams","params","findPath","has","foundPath","set","store","functionToString","Function","inspectSource","it","_typeof","Symbol","iterator","constructor","isBrowser","nodeType","nativePropertyIsEnumerable","propertyIsEnumerable","getOwnPropertyDescriptor","NASHORN_BUG","1","f","V","descriptor","this","enumerable","_extends","hasOwnProperty","getLocation","_source$location","origin","protocol","host","hostname","port","encodeURI","createHistory","transitioning","resolveTransition","_onTransitionComplete","popstateListener","navigate","_ref$replace","Date","now","transition","Promise","res","createMemorySource","initialPath","stack","states","name","_","uri","_uri$split","_uri$split$","_uri$split2","_uri$split2$","newIndex","_iterableToArray","iter","emitter","all","create","on","type","handler","off","emit","evt","mitt","replacement","isForced","feature","detection","data","normalize","POLYFILL","NATIVE","string","String","_interopRequireDefault","require","toVal","mix","y","str","tmp","x","routes","match","default_","uriPathname","uriSegments","segmentize","isRootUri","ranked","rankRoutes","l","missed","default","routeSegments","routeSegment","uriSegment","isSplat","dynamicMatch","paramRe","exec","reservedNames","resolve","base","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","addQuery","allSegments","segments","segment","insertParams","_path$split","pathBase","_path$split$","query","constructedPath","_params$location","_params$location$sear","searchSplit","validateRedirect","isDynamic","sort","test","rankRoute","score","reduce","isRootSegment","SEGMENT_POINTS","q","shallowCompare","obj1","obj2","obj1Keys","hasEntries","object","classof","global","process","isObject","EXISTS","polyfill","check","globalThis","_classCallCheck","instance","Constructor","TypeError","omit","input","fields","output","prop","styled","style","stylesOptions","filterProps","classNamePrefix","stylesOrCreator","theme","root","useStyles","displayName","propTypes","StyledComponent","forwardRef","ref","children","classNameProp","className","clone","ComponentProp","component","other","classes","spread","cloneElement","FinalComponent","plainObjectConstrurctor","cloneStyle","newStyle","createRule","decl","jss","declCopy","rule","plugins","onCreateRule","by","toCssValue","ignoreImportant","cssValue","indentStr","indent","toCss","selector","_options$indent","fallbacks","fallback","_prop","_value","_prop2","_value2","allowEmpty","escapeRegex","nativeEscape","CSS","escape","BaseStyleRule","isProcessed","renderer","renderable","sheet","Renderer","force","newValue","onChangeValue","isEmpty","isDefined","remove","removeProperty","setProperty","attached","StyleRule","_BaseStyleRule","_this","selectorText","id","scoped","generateId","_proto2","applyTo","json","toJSON","opts","link","setSelector","replaceRule","pluginStyleRule","parent","defaultToStringOptions","atRegExp","ConditionalRule","styles","at","rules","atMatch","RuleList","add","_proto","getRule","addRule","onProcessRule","keyRegExp","pluginConditionalRule","defaultToStringOptions$1","nameRegExp","KeyframesRule","frames","nameMatch","keyRegExp$1","refRegExp","findReferencedKeyframe","val","keyframes","replaceRef","refKeyframe","plugin","onProcessStyle","KeyframeRule","pluginKeyframeRule","FontFaceRule","keyRegExp$2","pluginFontFaceRule","ViewportRule","pluginViewportRule","SimpleRule","keysMap","defaultUpdateOptions","forceUpdateOptions","raw","counter","ruleOptions","_this$options","register","unregister","update","updateOne","_this$options2","styleRule","onUpdate","nextValue","_nextValue","_prevValue","css","StyleSheet","deployed","queue","attach","deploy","detach","insertRule","addRules","added","deleteRule","_this$rules","PluginsRegistry","internal","external","registry","onProcessSheet","processedValue","use","newPlugin","SheetsRegistry","reset","_temp","ns","moduleId","createGenerateId","ruleCounter","jssId","minify","memoize","getPropertyValue","cssRule","attributeStyleMap","err","delete","getHead","findPrevNode","registry$1","insertionPoint","findHigherSheet","element","parentNode","node","findHighestSheet","nextSibling","comment","text","head","childNodes","nodeValue","trim","findCommentNode","getNonce","_insertRule","container","appendRule","cssRules","getValidRuleInsertionIndex","maxIndex","DomRenderer","hasInsertedRules","el","media","meta","textContent","setAttribute","nonce","nextNode","insertBefore","insertionPointElement","appendChild","insertStyle","Boolean","removeChild","insertRules","nativeParent","latestNativeParent","_insertionIndex","refCssRule","ruleStr","insertionIndex","nativeRule","getRules","instanceCounter","Jss","version","setup","createStyleSheet","removeStyleSheet","getDynamicStyles","extracted","hasCSSTOMSupport","_interopRequireWildcard","_assertThisInitialized2","_inheritsLoose2","React","_propTypes","_sessionStorage","createContext","SessionStorage","_React$Component","_stateStorage","scrollListener","save","scrollY","windowScroll","position","prevProps","shouldUpdateScroll","scrollTo","scrollToHash","getElementById","scrollIntoView","prevRouterProps","routerProps","componentDidMount","scrollPosition","_this$props$location","read","componentWillUnmount","componentDidUpdate","_this$props$location2","render","Provider","func","isRequired","_inheritsLoose","subClass","superClass","__proto__","PREFERRED_STRING","ie10","appVersion","fns","doc","hack","documentElement","doScroll","loaded","readyState","shift","setTimeout","definition","cache","key1","key2","subCache","indexCounter","increment","getStylesCreator","themingEnabled","overrides","stylesWithOverrides","deepmerge","getClasses","disableGeneration","cacheClasses","lastProp","lastJSS","generate","_ref2","stylesCreator","sheetManager","sheetsManager","refs","staticSheet","dynamicStyles","flip","direction","serverGenerateClassName","generateClassName","sheetsRegistry","sheetsCache","dynamicSheet","_ref3","_ref4","useSynchronousEffect","values","useRef","currentKey","useMemo","current","useEffect","makeStyles","classNamePrefixOption","_options$defaultTheme","defaultTheme","stylesOptions2","useTheme","useContext","shouldUpdate","identifier","_router","useLocation","_react","useLayoutEffect","onScroll","scrollTop","localizedManifests","localizedManifest","find","app","start_url","lang","DESCRIPTORS","propertyIsEnumerableModule","createPropertyDescriptor","toIndexedObject","toPrimitive","IE8_DOM_DEFINE","nativeGetOwnPropertyDescriptor","O","P","error","strUndefined","strObject","strPrototype","strFunction","getGlobal","getGlobalInst","gbl","hasWindow","getWindow","hasDocument","getDocument","getNavigator","getHistory","getPerformance","hasJSON","JSON","getJSON","_isTrident","_mwcSeeded","_mwcW","_mwcZ","_mwcSeed","seedValue","_autoSeedMwc","getTime","_isTypeof","theType","_isUndefined","_isNullOrUndefined","_hasOwnProperty","_isObject","_isFunction","_attachEvent","eventNameWithoutOn","handlerRef","useCapture","_detachEvent","objDefineAccessors","getProp","setProp","defineProp","configurable","objForEachKey","callbackfn","LoggingSeverity","CoreUtils","isDate","isError","isString","isNumber","isBoolean","disableCookies","_canUseCookies","newGuid","GuidRegex","c","r","randomValue","toISOString","date","pad","num","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","arrForEach","arr","thisArg","len","idx","arrIndexOf","searchElement","lp","abs","arrMap","results","arrReduce","initialValue","strTrim","objKeys","hasDontEnumBug","dontEnums","dontEnumsLength","addEventHandler","eventName","w","EventHelper","Attach","dateNow","dt","perfNow","perf","newId","maxLength","number","random32","chars","isIE","maxValue","floor","signed","getRandomValues","Uint32Array","mwcRandom32","mwcRandomSeed","generateW3CId","hexValues","oct","clockSequenceHi","isTypeof","isUndefined","isNullOrUndefined","isFunction","objCreate","AttachEvent","Detach","DetachEvent","_InternalMessageId","_objGetPrototypeOf","_dynamicNames","_isObjectOrArrayPrototype","_isObjectArrayOrFunctionPrototype","_getObjProto","newProto","_isDynamicCandidate","funcName","skipOwn","_throwTypeError","_hasVisited","_getInstFunc","proto","currentDynProtoProxy","instFunc","instFuncTable","canAddInst","objProto","visited","protoFunc","_getProtoFunc","_getObjName","unknownValue","dynamicProto","theClass","delegateFunc","classProto","thisTarget","thisProto","_checkPrototype","perfOptions","useBaseInst","instFuncs","_getInstanceFuncs","_instFuncProxy","funcHost","theFunc","baseFuncs","baseProto","_getBaseFuncs","setInstanceFunc","baseInstFuncs","_createDynamicPrototype","dynProtoProxy","_populatePrototype","setInstFuncs","_sanitizeDiagnosticText","_InternalLogMessage","msgId","msg","isUserAct","properties","messageId","strProps","stringify","diagnosticText","dataType","DiagnosticLogger","config","_messageCount","_messageLogged","_self","_getConfigValue","defValue","consoleLoggingLevel","telemetryLoggingLevel","maxInternalMessageLimit","enableDebugExceptions","throwInternal","severity","messageKey","WARNING","warnToConsole","logInternalMessage","theConsole","console","logFunc","warn","resetInternalMessageCount","logMessage","throttleLimitMessage","throttleMessage","PerfEvent","payloadDetails","isAsync","theDetails_1","accessorDefined","start","isChildEvt","getCtx","ParentContextKey","ChildrenContextKey","setCtx","complete","childTime","childEvts","childEvt","time","exTime","payload","PerfManager","manager","ctx","src","fire","perfEvent","doPerf","mgrSource","getSource","details","perfMgr","perfEvt","currentActive","ex","defItemCtx","_nextProxy","_hasProcessTelemetry","processTelemetry","_hasSetNext","setNextPlugin","_hasRun","getPlugin","getNext","setNext","nextPlugin","env","itemCtx","core","hasRun","diagLog","CRITICAL","sync","_createProxyChain","proxies","lastProxy","thePlugin","newProxy","ProcessTelemetryContext","startAt","proxy","_copyProxyChain","srcPlugins","_copyPluginChain","logger","getCfg","getExtCfg","defaultValue","theConfig","extConfig","extensionConfig","getConfig","field","theValue","hasNext","processNext","createNew","BaseTelemetryPlugin","_isinitialized","_rootCtx","_nextPlugin","_getTelCtx","isInitialized","setInitialized","next","currentCtx","rootCtx","_baseTelInit","extensions","pluginChain","getProcessTelContext","initialize","initializePlugins","processContext","initPlugins","lastPlugin","sortPlugins","extA","extB","bHasProcess","StorageType","FieldType","DistributedTracingModes","_objDefineAccessors","_super","ChannelController","priority","_channelQueue","_arrForEach","_addChannelQueue","queueItem","Error","_checkQueuePriority","_base","queues","getChannelControls","isCookieUseDisabled","channels","extensionQueue_1","_createChannelQueues","__extends","_staticInit","BaseCore","_eventQueue","_channelController","_notificationManager","_perfManager","_isInitialized","_extensions","notificationManager","instrumentationKey","NotificationManager","allExtensions","coreExtensions","channelExtensions","extPriorities","ext","extPriority","getTransmissionControls","releaseQueue","track","telemetryItem","iKey","ver","thePlugins","getNotifyMgr","addNotificationListener","removeNotificationListener","eventsSent","events","eventsDiscarded","reason","eventsSendRequest","sendReason","getPerfMgr","enablePerfMgr","setPerfMgr","eventCnt","EventsDiscardedReason","perfEvtsSendAll","AppInsightsCore","_notifyInvalidEvent","_validateTelemetryItem","pollInternalLogs","interval","diagnosticLogInterval","setInterval","baseType","baseData","RequestHeaders","requestContextHeader","requestContextTargetKey","requestContextAppIdFormat","requestIdHeader","traceParentHeader","sdkContextHeader","sdkContextHeaderAppIdRequest","requestContextHeaderLowerCase","DataSanitizer","sanitizeKeyAndAddUniqueness","origLength","sanitizeKey","uniqueField","MAX_NAME_LENGTH","padNumber","nameTrunc","sanitizeString","valueTrunc","MAX_STRING_LENGTH","sanitizeUrl","sanitizeInput","MAX_URL_LENGTH","sanitizeMessage","messageTrunc","MAX_MESSAGE_LENGTH","sanitizeException","exception","exceptionTrunc","MAX_EXCEPTION_LENGTH","sanitizeProperties","tempProps_1","MAX_PROPERTY_LENGTH","sanitizeMeasurements","measurements","tempMeasurements_1","measure","sanitizeId","MAX_ID_LENGTH","_msgId","inputTrunc","s","_uaDisallowsSameSiteNone","Util","createDomEvent","Event","createEvent","initEvent","disableStorage","_canUseLocalStorage","_canUseSessionStorage","_getLocalStorageObject","canUseLocalStorage","_getVerifiedStorageObject","LocalStorage","storageType","fail","uid","storage","setItem","getItem","removeItem","isInternalApplicationInsightsEndpoint","endpointUrl","_internalEndpoints","getStorage","getExceptionName","dump","setStorage","removeStorage","_getSessionStorageObject","canUseSessionStorage","getSessionStorageKeys","getSessionStorage","setSessionStorage","removeSessionStorage","canUseCookies","cookie","disallowsSameSiteNone","setCookie","domain","domainAttrib","secureAttrib","location_1","stringToBoolOrDefault","getCookie","cookieName","cookies","deleteCookie","getIEVersion","userAgentStr","myNav","parseInt","tridentVer","msToTimeSpan","totalms","isNaN","ms","round","sec","hour","days","isCrossOriginError","lineNumber","columnNumber","objectTypeDump","propertyValueDump","IsBeaconApiSupported","sendBeacon","getExtension","extension","extIx","NotSpecified","toISOStringForIE8","UrlHelper","parseUrl","anchorIdx","_htmlAnchorIdx","anchorCache","_htmlAnchorElement","tempAnchor","parseHost","getAbsoluteUrl","getPathName","getCompleteUrl","method","absoluteUrl","toUpperCase","inclPort","fullHost","parseFullHost","CorrelationIdHelper","canIncludeCorrelationHeader","requestUrl","currentHost","disableCorrelationHeaders","correlationHeaderExcludePatterns","requestHost","enableCorsCorrelation","matchExists_1","includedDomains","correlationHeaderDomains","regex","RegExp","excludedDomains","correlationHeaderExcludedDomains","getCorrelationContext","responseHeader","correlationId","getCorrelationContextValue","correlationIdPrefix","keyValues","keyValue","AjaxHelper","ParseDependencyPath","commandName","parsedUrl","pathName","DateTimeUtils","Now","timing","navigationStart","GetDuration","end","DisabledPropertyName","SampleRate","ProcessLegacy","HttpMethod","DEFAULT_BREEZE_ENDPOINT","ConnectionStringParser","parse","connectionString","kvPairs","_FIELDS_SEPARATOR","kv","kvParts","_FIELD_KEY_VALUE_SEPARATOR","endpointsuffix","locationPrefix","ingestionendpoint","Base","Data","Envelope","aiDataContract","Required","sampleRate","Hidden","tags","Domain","EventData","Default","envelopeType","StackFrame","ExceptionData","exceptions","ExceptionDetails","hasFullStack","parsedStack","DataPointType","Exception","severityLevel","problemGroup","isManual","CreateFromInterface","__assign","toInterface","_a","CreateSimpleException","typeName","assembly","fileName","line","_ExceptionDetails","outerId","errorType","_getErrorType","parseStack","frame","frames_1","level","totalSizeInBytes","parsedFrame","sizeInBytes","left","right","size","acceptedLeft","acceptedRight","howMany","_StackFrame","sourceFrame","matches","baseSize","MetricData","metrics","SeverityLevel","DataPoint","kind","count","stdDev","Measurement","Metric","dataPoint","PageViewData","PageView","durationMs","duration","RemoteDependencyData","success","resultCode","requestAPI","correlationContext","dependencyKind","dependencySource","dependencyTypeName","dependencyFields","Trace","MessageData","PageViewPerformance","unused","cs4BaseData","perfTotal","networkConnect","sentRequest","receivedResponse","domProcessing","PageViewPerfData","ConfigurationManager","configValue","ContextTagKeys","applicationVersion","applicationBuild","applicationTypeId","applicationId","applicationLayer","deviceId","deviceIp","deviceLanguage","deviceLocale","deviceModel","deviceFriendlyName","deviceNetwork","deviceNetworkName","deviceOEMName","deviceOS","deviceOSVersion","deviceRoleInstance","deviceRoleName","deviceScreenResolution","deviceType","deviceMachineName","deviceVMName","deviceBrowser","deviceBrowserVersion","locationIp","locationCountry","locationProvince","locationCity","operationId","operationName","operationParentId","operationRootId","operationSyntheticSource","operationCorrelationVector","sessionId","sessionIsFirst","sessionIsNew","userAccountAcquisitionDate","userAccountId","userId","userStoreRegion","userAuthUserId","userAnonymousUserAcquisitionDate","userAuthenticatedUserAcquisitionDate","cloudName","cloudRole","cloudRoleVer","cloudRoleInstance","cloudEnvironment","cloudLocation","cloudDeploymentUnit","internalNodeName","internalSdkVersion","internalAgentVersion","internalSnippet","internalSdkSrc","TelemetryItemCreator","envelopeName","customProperties","systemProperties","Extensions","UserExt","DeviceExt","TraceExt","WebExt","AppExt","OSExt","SessionExt","SDKExt","CtxTagKeys","PropertiesPluginIdentifier","BreezeChannelIdentifier","AnalyticsPluginIdentifier","PageViewManager","appInsights","overridePageViewDuration","pageViewPerformanceManager","_logger","intervalHandle","itemQueue","pageViewPerformanceSent","_flushChannels","flush","trackPageView","pageView","title","isPerformanceTimingSupported","sendPageViewInternal","customDuration","cb","pageViewSent","getPerformanceTiming","shouldCollectDuration","processed","isPerformanceTimingDataReady","pageViewPerformance","populatePageViewPerformanceEvent","isValid","sendPageViewPerformanceInternal","allItems","doFlush","clearInterval","PageVisitTimeManager","pageVisitTimeTrackingHandler","prevPageVisitDataKeyName","trackPreviousPageVisit","currentPageName","currentPageUrl","prevPageVisitTimeData","restartPageVisitTimer","pageName","pageUrl","pageVisitTime","prevPageVisitData","stopPageVisitTimer","startPageVisitTimer","currPageVisitData","currPageVisitDataStr","pageVisitEndTime","pageVisitDataJsonStr","pageVisitStartTime","PageViewPerformanceManager","MAX_DURATION_ALLOWED","navigationTiming","getPerformanceNavigationTiming","total","network","startTime","connectEnd","request","requestStart","responseStart","response","responseEnd","dom","loadEventEnd","isPerformanceNavigationTimingSupported","getEntriesByType","domainLookupStart","domLoading","durations","_i","_navigator","botAgentNames","isGoogleBot","_dispatchEvent","evnt","dispatchEvent","ApplicationInsights","autoRoutePVDelay","_trackAjaxAttempts","_prevUri","getDefaultConfig","sessionRenewalMs","sessionExpirationMs","disableExceptionTracking","autoTrackPageVisitTime","enableUnhandledPromiseRejectionTracking","samplingPercentage","isStorageUseDisabled","isBrowserLinkTrackingEnabled","enableAutoRouteTracking","namePrefix","doNotSendItem","telemetryInitializersCount","_telemetryInitializers","telemetryInitializer","trackEvent","startTrackEvent","_eventTracking","stopTrackEvent","stop","trackTrace","trace","trackMetric","metric","inPv","_pageViewManager","_pageVisitTimeManager","refUri","referrer","trackPageViewPerformance","_pageViewPerformanceManager","startTrackPage","_pageTracking","stopTrackPage","measurement","loc","sendExceptionInternal","exceptionPartB","trackException","_onerror","properties_1","_sendCORSException","errorString","addTelemetryInitializer","_globalconfig","defaults","configGetters","accountId","cookieDomain","sdkExtension","appId","trackPageVisitTime","_addDefaultTelemetryInitializers","pageViewItem","_window","_history","_location","autoExceptionInstrumented","originalOnError_1","onerror","handled","autoUnhandledPromiseInstrumented","originalOnUnhandledRejection_1","_self_1","_properties","ret","context","telemetryTrace","traceID","_currUri","bind","PageName","PageUrl","average","sampleCount","browserLinkPaths_1","_addTelemetryInitializer","envelope","remoteData","Version","Timing","_name","_events","ArraySendBuffer","_buffer","enqueue","clear","getItems","batchPayloads","emitLineDelimitedJson","markAsSent","clearSent","SessionStorageSendBuffer","_bufferFullMessageSent","bufferItems","_getBuffer","BUFFER_KEY","notDeliveredItems","SENT_BUFFER_KEY","_removePayloadsFromBuffer","payloads","buffer","remaining","prefixedKey","bufferJson","_setBuffer","MAX_BUFFER_SIZE","sentElements","_setValueIf","EnvelopeCreator","extractPropsAndMeasurements","createEnvelope","iKeyNoDashes","extractPartAExtensions","envTags","itmExt","itmTags","extUser","user","authId","localId","extApp","sesId","extDevice","device","deviceClass","ip","model","web","browserLang","browserVer","browser","envData","envBaseData","envProps","screenRes","userConsent","extOs","os","extTrace","parentID","tgs","tg","Init","DependencyEnvelopeCreator","Create","customMeasurements","bd","remoteDepData","responseCode","EventEnvelopeCreator","eventData","ExceptionEnvelopeCreator","exData","MetricEnvelopeCreator","baseMetricData","PageViewEnvelopeCreator","currentContextId","pageType","isLoggedIn","pageViewData","PageViewPerformanceEnvelopeCreator","TraceEnvelopeCreator","Serializer","_serializeObject","_serializeStringMap","_serializeArray","contract","isHidden","isPresent","sources","expectedType","parseFloat","serialize","Offline","OfflineListener","_document","isListening","_onlineStatus","_setOnline","_setOffline","body","ononline","onoffline","isOnline","onLine","isOffline","HashCodeScoreGenerator","getHashCodeScore","getHashCode","INT_MAX_VALUE","MIN_INPUT_LENGTH","charCodeAt","SamplingScoreGenerator","hashCodeGeneragor","getSamplingScore","Sample","samplingRate","samplingScoreGenerator","isSampledIn","xhr","responseText","Sender","_consecutiveErrors","_retryAt","_timeoutHandle","_serializer","_XMLHttpRequestSupported","_notImplemented","_beaconSender","_senderConfig","batch","plainTextBatch","Blob","_onSuccess","_xhrSender","XMLHttpRequest","endPointUrl","open","setRequestHeader","onreadystatechange","_xhrReadyStateChange","_onError","_formatErrorMessageXhr","send","_parseResponse","itemsReceived","itemsAccepted","errors","_resendPayload","linearFactor","payload_1","delayInSeconds","backOffSlot","pow","backOffDelay","retryAfterTimeSpan","_setRetryTime","_setupTimer","retryInterval","timerValue","maxBatchInterval","triggerSend","_isRetriable","statusCode","status","_xdrSender","xdr","XDomainRequest","onload","_xdrOnLoad","_formatErrorMessageXdr","hostingProtocol","pause","resume","onunloadFlush","onunloadDisableBeacon","isBeaconApiDisabled","teardown","_sender","defaultConfig","_getDefaultAppInsightsChannelConfig","_getEmptyAppInsightsChannelConfig","enableSessionStorageBuffer","_sample","disableInstrumentationKeyValidation","_validateInstrumentationKey","disableTelemetry","aiEnvelope_1","constructEnvelope","doNotSendItem_1","callBack","bufferPayload","maxBatchSizeInBytes","countOfItemsInPayload","_appId","isRetryDisabled","_onPartialSuccess","async","forcedSender","sendRequest","_getNotifyMgr","_notifySendRequest","clearTimeout","ieVer","failed","retry","errors_1","reverse","orig","Session","_SessionManager","acquisitionSpan","renewalSpan","_storageNamePrefix","cookieNameConst","automaticSession","initializeAutomaticSession","acquisitionExpired","acquisitionDate","renewalExpired","renewalDate","renew","cookieUpdatedTimestamp","cookieUpdateInterval","backup","initializeAutomaticSessionWithData","sessionData","acq","renewal","idLength","guid","acquisitionExpiry","renewalExpiry","cookieExpiry","setTime","UTCString","toUTCString","Application","Device","Internal","sdkVersion","User","isNewUser","userCookieName","cookieSeparator","acqStr","accountAcquisitionDate","newCookie","name_1","authCookie","authUserCookieName","authCookieString","authenticatedId","setAuthenticatedUserContext","authenticatedUserId","storeInCookie","validateUserInput","clearAuthenticatedUserContext","Location","parentId","TelemetryContext","application","sessionManager","session","applySessionContext","sessionContext","applyOperatingSystemContxt","applyApplicationContext","build","applyDeviceContext","applyInternalContext","agentVersion","snippetVer","sdkSrc","applyLocationContext","applyOperationContext","applyWebContext","applyUserContext","cleanUp","PropertiesPlugin","_extensionConfig","_breezeChannel","_processTelemetryInternal","cbNames","_arrLoop","_doCallbacks","hooks","callDetails","cbArgs","hookCtx","hook","cbks","inst","orgEx","hookErrorCb","_getOwner","checkPrototype","owner","InstrumentFunc","callbacks","aiHook_1","newFunc","aiHook","h","funcThis","orgArgs","funcArgs","_replaceArg","_createArgs","theArgs","arg","rslt","theHook","rm","_objKeys","_calcPerfDuration","resourceEntry","_setPerfDuration","_setPerfValue","XHRMonitoringState","openDone","setRequestHeaderDone","sendDone","abortDone","stateChangeAttached","ajaxRecord","spanID","perfMark","completed","requestHeadersSize","requestHeaders","responseReceivingDuration","callbackDuration","ajaxTotalDuration","aborted","requestSize","requestSentTime","responseStartedTime","responseFinishedTime","callbackFinishedTime","endTime","xhrMonitoringState","clientFailure","CreateTrackItem","ajaxType","enableRequestHeaderTracking","getResponse","dependency","ajaxData","perfTiming","propsSet","_isString","strRedirect","strRedirectStart","strRedirectEnd","strDomainLookup","strConnect","strRequest","strResponse","serverTiming","server_1","normalizeJsName","perfAttempts","_populatePerfData","headerMap","responseHeaders","responseType","statusText","Traceparent","traceId","spanId","traceFlag","DEFAULT_TRACE_FLAG","DEFAULT_VERSION","isValidTraceId","isValidSpanId","_markCount","_getFailedAjaxDiagnosticsMessage","_throwInternalCritical","ajaxMonitorInstance","_throwInternalWarning","_createErrorCallbackFunc","internalMessage","ajaxDiagnosticsMessage","_indexOf","_internalSdkSrc","AjaxMonitor","_context","_isUsingW3CHeaders","_isUsingAIHeaders","_markPrefix","_fetchInitialized","_xhrInitialized","_currentWindowHost","_config","getEmptyConfig","_enableRequestHeaderTracking","_enableAjaxPerfTracking","_maxAjaxCallsPerView","_enableResponseHeaderTracking","_hooks","_disabledUrls","_hookProto","InstrumentProto","_isDisabledRequest","init","isDisabled","theUrl","idx2","_isMonitoredXhrInstance","excludeAjaxDataValidation","ajaxValidation","initialized","_getResponseText","_getAjaxCorrelationContext","responseHeadersString","getAllResponseHeaders","getResponseHeader","_createMarkId","performance_1","mark","markId","getEntriesByName","_findPerfResourceEntry","initiatorType","trackCallback","reportError","performance","maxAttempts","maxAjaxPerfLookupAttempts","retryDelay","ajaxPerfLookupDelay","attempt","locateResourceTiming","getEntries","entryType","clearMarks","_getFailedFetchDiagnosticsMessage","_reportFetchMetrics","_reportFetchError","failedProps","errorProps","_getFetchCorrelationContext","headers","fetchDiagnosticsMessage","ctx_1","distributedTracingMode","enableAjaxPerfTracking","maxAjaxCallsPerView","enableResponseHeaderTracking","AI","AI_AND_W3C","W3C","disableAjaxTracking","abort","theOpen","_supportsAjaxMonitoring","req","_reportXhrError","ajaxResponse","responseHeaderMap_2","parts","header","_onAjaxComplete","exceptionText","_attachToOnReadyStateChange","_openHandler","hkErr","includeCorrelationHeaders","fetch","_global","Request","isPolyfill","disableFetchTracking","fetchData","Headers","_createFetchRecord","newInit","rsp","then","responseHeaderMap_1","_instrumentFetch","propExt","trackDependencyData","currentWindowHost","traceparent","enableAjaxErrorStatusText","emptyConfig","_ignoreUpdateSnippetProperties","Initialization","snippet","_snippetVersion","sv","cs","ingest","instrumentationkey","dependencies","getSKUDefaults","inPvp","channel","loadAppInsights","legacyMode","appInsightsChannel","_updateSnippetProperties","emptyQueue","addHousekeepingBeforeUnload","updateSnippetDefinitions","chkSet","_loop_1","originalArguments","proxyAssign","length_1","appInsightsInstance","performHousekeeping","_sessionManager","disableFlushOnBeforeUnload","nav","product","disableFlushOnUnload","cdns","scrpt","currentScript","ReactPlugin","_analyticsPlugin","addHistoryListener","pageViewTelemetry","browserHistory","reactPlugin","onRouteUpdate","toLength","toAbsoluteIndex","createMethod","IS_INCLUDES","$this","includes","_unsupportedIterableToArray","o","minLen","postfix","_objectWithoutProperties","getOwnPropertySymbols","sourceSymbolKeys","condition","format","d","argIndex","framesToPop","PageRenderer","pageResources","pageContext","__params","pathContext","pageElement","apiRunner","loader","publicLoader","page","ThemeContext","$","$reduce","arrayMethodIsStrict","arrayMethodUsesToLength","CHROME_VERSION","IS_NODE","STRICT_METHOD","USES_TO_LENGTH","forced","pluginOptions","ga","excludeGAPaths","some","rx","delay","pageTransitionDelay","pagePath","_defineProperties","writable","_createClass","protoProps","staticProps","shared","IndexedObject","requireObjectCoercible","argument","serviceWorker","reg","installingWorker","installing","log","controller","___swUpdated","___failedResources","reload","catch","components","withPrefix","withAssetPrefix","getGlobalPathPrefix","navigateTo","_objectWithoutPropertiesLoose2","_extends2","_utils","_parsePath","isAbsolutePath","_prefix","getGlobalBasePrefix","isLocalLink","rewriteLinkPath","relativeTo","NavLinkPropTypes","activeClassName","activeStyle","partiallyActive","bool","GatsbyLinkLocationWrapper","GatsbyLink","defaultGetProps","isPartiallyCurrent","isCurrent","IOSupported","IntersectionObserver","handleRef","_prefetch","currentPath","rewrittenPath","newPathName","___loader","prevState","io","_this$io","unobserve","disconnect","_this2","innerRef","isIntersecting","intersectionRatio","observe","_this3","_this$props","_this$props$getProps","getProps","_onClick","onClick","_onMouseEnter","onMouseEnter","rest","prefixedTo","Link","hovering","button","defaultPrevented","metaKey","altKey","ctrlKey","shiftKey","preventDefault","shouldReplace","___navigate","showDeprecationWarning","functionName","altFunctionName","_default","___push","___replace","createNonEnumerableProperty","versions","v8","IS_PURE","mode","copyright","isPlainObject","RouteAnnouncerProps","top","width","height","padding","overflow","clip","whiteSpace","border","redirectMap","redirects","redirect","fromPath","maybeRedirect","toPath","onPreRouteUpdate","timeoutId","loadPage","PageResourceStatus","webpackCompilationHash","___webpackCompilationHash","postMessage","gatsbyApi","reachNavigate","getSavedScrollPosition","RouteAnnouncer","announcementRef","createRef","nextProps","requestAnimationFrame","pageHeadings","querySelectorAll","newAnnouncement","innerText","RouteUpdates","shouldComponentUpdate","Fragment","shallowDiffers","EnsureResources","loadPageSync","getDerivedStateFromProps","loadResources","rawPath","ProdLoader","asyncRequires","setLoader","setApiRunner","___emitter","apiRunnerAsync","RouteHandler","baseuri","basepath","DataContext","GatsbyRoot","staticQueryResults","getStaticQueryResults","LocationHandler","Consumer","browserLoc","SiteRoot","App","ReactDOM","hydrate","domReady","aFunction","variable","namespace","getThemeProps","propName","defaultProps","prefetchPathname","StaticQueryContext","StaticQueryDataRenderer","staticQueryData","finalData","StaticQuery","useStaticQuery","Number","graphql","unstable_collectionGraphql","definePropertyModule","withThemeCreator","withTheme","WithTheme","getBuiltIn","internalObjectKeys","hiddenKeys","getOwnPropertyNames","redefine","setGlobal","copyConstructorProperties","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","stat","noTargetGet","sham","createStyles","WeakMap","injectFirstNode","defaultOptions","StylesContext","StylesProvider","_props$injectFirst","injectFirst","_props$disableGenerat","localOptions","outerOptions","createComment","firstChild","supportedPrefetchStrategy","fakeLink","relList","supports","support","reject","getElementsByTagName","getElementsByName","preFetched","prefetch","Success","preferDefault","m","createPageDataUrl","doFetch","toPageResources","pageData","componentChunkName","staticQueryHashes","BaseLoader","loadComponent","inFlightNetworkRequests","pageDb","inFlightDb","staticQueryDb","pageDataDb","prefetchTriggered","Set","prefetchCompleted","memoizedGet","inFlightPromise","prefetchDisabled","fetchPageDataJson","loadObj","retries","jsonPayload","notFound","loadPageDataJson","loadAppData","allData","finalResult","componentChunkPromise","createdAt","staticQueryBatchPromise","staticQueryHash","staticQueryResultsMap","shouldPrefetch","connection","effectiveType","saveData","doesConnectionSupportPrefetch","realPath","doPrefetch","getResourceURLsForPathname","createComponentUrls","isPageNotFound","appData","___chunkMapping","chunk","__PATH_PREFIX__","chunkName","pageDataUrl","prefetchHelper","crossOrigin","as","componentUrls","_loader","getResourcesForPathname","getResourcesForPathnameSync","METHOD_NAME","_toConsumableArray","arrayLikeToArray","iterableToArray","unsupportedIterableToArray","g","ceil","wrapRootElement","onInitialClientRender","_styles","_materialUiPluginCacheEndpoint","jssStyles","stylesProvider","_reactDom","scrollKey","ScrollContainerImplementation","findDOMNode","_arrayLikeToArray","arr2","bitmap","hasSymbol","for","toObject","IS_RIGHT","that","argumentsLength","memo","toInteger","integer","localTheme","outerTheme","mergeOuterLocalTheme","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","anObject","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","getDefaultProps","getDerivedStateFromError","mixins","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","isMemo","ForwardRef","Memo","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","_assertThisInitialized","nativeDefineProperty","Attributes","ProdPageRenderer","InternalPageRenderer","_possibleConstructorReturn","_inherits","setPrototypeOf","createNamedContext","Ctx","LocationContext","LocationProvider","getContext","_props$history","componentDidCatch","info","isRedirect","_navigate","unmounted","ServerLocation","BaseContext","Router","baseContext","locationContext","RouterImpl","_React$PureComponent","_navigate2","primary","_props$component","domProps","Children","toArray","array","child","createRoute","FocusWrapper","FocusHandler","wrapperProps","PureComponent","FocusContext","requestFocus","FocusHandlerImpl","initialRender","focusHandlerCount","_React$Component2","_temp2","_this4","_len2","_key2","shouldFocus","focus","myURIChanged","navigatedUpToMe","contains","activeElement","_this5","_props2","_props2$component","Comp","outline","tabIndex","C","_ref5","_ref6","_props$getProps","anchorProps","encodedHref","shouldNavigate","_location$state","restState","RedirectRequest","redirectTo","RedirectImpl","_React$Component3","_props3","_props3$replace","noThrow","resolvedTo","_props4","Redirect","_ref7","Match","_ref8","_ref9","_ref10","resolvedPath","useNavigate","useParams","useMatch","stripSlashes","elementPath","ownKeys","getOwnPropertyDescriptorModule","strShimFunction","strShimObject","strShimUndefined","strShimPrototype","objCreateFn","tmpFunc","_extendStaticsFn","p","assignFn","extendsFn","globalObj","t","__","InternalStateModule","getInternalState","enforceInternalState","enforce","TEMPLATE","unsafe","simple","fnValuesNs","fnRuleNs","fnValues","fnRule","GlobalContainerRule","GlobalPrefixedRule","separatorRegExp","addScope","scope","handleNestedGlobalContainerRule","handlePrefixedGlobalRule","parentRegExp","getReplaceRef","replaceParentRefs","nestedProp","parentProp","parentSelectors","nestedSelectors","j","nested","getOptions","prevOptions","nestingLevel","isNested","isNestedConditional","uppercasePattern","msPattern","toHyphenLower","hName","convertCase","converted","hyphenatedProp","px","percent","addCamelCasedVersion","regExp","newObj","units","margin","bottom","inset","motion","perspective","gap","grid","iterate","innerProp","_innerProp","unit","camelCasedOptions","js","vendor","isTouch","jsCssMap","Moz","Webkit","appearence","noPrefill","supportedProperty","colorAdjust","toUpper","camelize","pascalize","mask","textOrientation","transform","writingMode","userSelect","breakPropsOld","inlineLogicalOld","newProp","unprefixed","prefixed","pascalized","scrollSnap","overscrollBehavior","propMap","order","flex2012","propMap$1","flex","propKeys","prefixCss","multiple","propertyDetectors","computed","getComputedStyle","key$1","el$1","cache$1","transitionProperties","transPropsRegExp","prefixTransitionCallback","p1","p2","prefixedValue","supportedValue","property","cacheKey","prefixStyle","changeProp","supportedProp","changeValue","supportedValue$1","atRule","prop0","prop1","jssPreset","_options$withTheme","WithStyles","more","api","defaultReturn","argTransform","previous","v","z","u","$$typeof","A","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","pseudoClasses","createGenerateClassName","_options$disableGloba","disableGlobal","_options$productionPr","productionPrefix","_options$seed","seed","seedPrefix","getNextCounterId","styleSheet","names","_getRequireWildcardCache","hasPropertyDescriptor","desc","stateKey","getStateKey","sessionStorage","storedValue","stateKeyBase","NATIVE_WEAK_MAP","objectHas","sharedKey","wmget","wmhas","wmset","metadata","facade","STATE","getterFor","TYPE","ServerStyleSheets","dangerouslySetInnerHTML","__html","thrower","ACCESSORS","argument0","argument1"],"mappings":";4iCAAe,SAASA,EAA8BC,EAAQC,GAC5D,GAAc,MAAVD,EAAgB,MAAO,GAC3B,IAEIE,EAAKC,EAFLC,EAAS,GACTC,EAAaC,OAAOC,KAAKP,GAG7B,IAAKG,EAAI,EAAGA,EAAIE,EAAWG,OAAQL,IACjCD,EAAMG,EAAWF,GACbF,EAASQ,QAAQP,IAAQ,IAC7BE,EAAOF,GAAOF,EAAOE,IAGvB,OAAOE,EAZT,mC,gQCAA,SAASM,EAAWC,GAClB,MAA8B,MAAvBA,EAASC,OAAO,GAIzB,SAASC,EAAUC,EAAMC,GACvB,IAAK,IAAIZ,EAAIY,EAAOC,EAAIb,EAAI,EAAGc,EAAIH,EAAKN,OAAQQ,EAAIC,EAAGd,GAAK,EAAGa,GAAK,EAClEF,EAAKX,GAAKW,EAAKE,GAGjBF,EAAKI,MAwDQ,MApDf,SAAyBC,EAAIC,QACdC,IAATD,IAAoBA,EAAO,IAC/B,IAgBIE,EAhBAC,EAAUJ,GAAMA,EAAGK,MAAM,MAAQ,GACjCC,EAAYL,GAAQA,EAAKI,MAAM,MAAQ,GACvCE,EAAUP,GAAMT,EAAWS,GAC3BQ,EAAYP,GAAQV,EAAWU,GAC/BQ,EAAaF,GAAWC,EAW5B,GATIR,GAAMT,EAAWS,GAEnBM,EAAYF,EACHA,EAAQf,SAEjBiB,EAAUP,MACVO,EAAYA,EAAUI,OAAON,KAG1BE,EAAUjB,OAAQ,MAAO,IAG9B,GAAIiB,EAAUjB,OAAQ,CACpB,IAAIsB,EAAOL,EAAUA,EAAUjB,OAAS,GACxCc,EAA4B,MAATQ,GAAyB,OAATA,GAA0B,KAATA,OAEp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AQqkF,UAChDC,EAAYviF,EAAI/B,EAAS,GAAKA,EAAQ,GAAKokF,EAC3CG,EAAYxiF,EAAI/B,EAAS,GAAKA,EAAQ,QAAK1M,EAE/C,OAAOuqB,EAAMqwD,KAAiB9sC,IAAWpiC,GAAM,WAC7C,GAAIqlF,IAAc3iE,EAAa,OAAO,EACtC,IAAIO,EAAI,CAAExvB,QAAS,GAEf4xF,EAAWllF,EAAe8iB,EAAG,EAAG,CAAE3e,YAAY,EAAMlE,IAAKglF,IACxDniE,EAAE,GAAK,EAEZmf,EAAO3sC,KAAKwtB,EAAGqiE,EAAWC,S","file":"app-b70376a7a5e78cce00e9.js","sourcesContent":["export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n} // About 1.5x faster than the two-arg version of Array#splice()\n\n\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n} // This implementation is based heavily on node's url.parse\n\n\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n var hasTrailingSlash;\n\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }\n if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n var result = fromParts.join('/');\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n return result;\n}\n\nexport default resolvePathname;","function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true; // Otherwise, if either of them == null they are not equal.\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n return Object.keys(Object.assign({}, a, b)).every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\n\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\n\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\n\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\n\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\n\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\n\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\n\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = exports.ScrollContainer = exports.ScrollContext = void 0;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nexports.ScrollContext = _scrollHandler.ScrollHandler;\n\nvar _scrollContainer = require(\"./scroll-container\");\n\nexports.ScrollContainer = _scrollContainer.ScrollContainer;\n\nvar _useScrollRestoration = require(\"./use-scroll-restoration\");\n\nexports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getDisplayName } from '@material-ui/utils';\nexport default function mergeClasses() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var baseClasses = options.baseClasses,\n newClasses = options.newClasses,\n Component = options.Component;\n\n if (!newClasses) {\n return baseClasses;\n }\n\n var nextClasses = _extends({}, baseClasses);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof newClasses === 'string') {\n console.error([\"Material-UI: The value `\".concat(newClasses, \"` \") + \"provided to the classes prop of \".concat(getDisplayName(Component), \" is incorrect.\"), 'You might want to use the className prop instead.'].join('\\n'));\n return baseClasses;\n }\n }\n\n Object.keys(newClasses).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!baseClasses[key] && newClasses[key]) {\n console.error([\"Material-UI: The key `\".concat(key, \"` \") + \"provided to the classes prop is not implemented in \".concat(getDisplayName(Component), \".\"), \"You can only override one of the following: \".concat(Object.keys(baseClasses).join(','), \".\")].join('\\n'));\n }\n\n if (newClasses[key] && typeof newClasses[key] !== 'string') {\n console.error([\"Material-UI: The key `\".concat(key, \"` \") + \"provided to the classes prop is not valid for \".concat(getDisplayName(Component), \".\"), \"You need to provide a non empty string instead of: \".concat(newClasses[key], \".\")].join('\\n'));\n }\n }\n\n if (newClasses[key]) {\n nextClasses[key] = \"\".concat(baseClasses[key], \" \").concat(newClasses[key]);\n }\n });\n return nextClasses;\n}","module.exports = {};\n","export default path => {\n if (path === undefined) {\n return path\n }\n if (path === `/`) {\n return `/`\n }\n if (path.charAt(path.length - 1) === `/`) {\n return path.slice(0, -1)\n }\n return path\n}\n","import { pick } from \"@reach/router/lib/utils\"\nimport stripPrefix from \"./strip-prefix\"\nimport normalizePagePath from \"./normalize-page-path\"\n\nconst pathCache = new Map()\nlet matchPaths = []\n\nconst trimPathname = rawPathname => {\n const pathname = decodeURIComponent(rawPathname)\n // Remove the pathPrefix from the pathname.\n const trimmedPathname = stripPrefix(pathname, __BASE_PATH__)\n // Remove any hashfragment\n .split(`#`)[0]\n // Remove search query\n .split(`?`)[0]\n\n return trimmedPathname\n}\n\nfunction absolutify(path) {\n // If it's already absolute, return as-is\n if (\n path.startsWith(`/`) ||\n path.startsWith(`https://`) ||\n path.startsWith(`http://`)\n ) {\n return path\n }\n // Calculate path relative to current location, adding a trailing slash to\n // match behavior of @reach/router\n return new URL(\n path,\n window.location.href + (window.location.href.endsWith(`/`) ? `` : `/`)\n ).pathname\n}\n\n/**\n * Set list of matchPaths\n *\n * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths\n */\nexport const setMatchPaths = value => {\n matchPaths = value\n}\n\n/**\n * Return a matchpath url\n * if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n * `/foo?bar=far` => `/page1`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string|null}\n */\nexport const findMatchPath = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return normalizePagePath(path.route.originalPath)\n }\n\n return null\n}\n\n/**\n * Return a matchpath params from reach/router rules\n * if `match-paths.json` contains `{ \":bar/*foo\" }`, and the path is /baz/zaz/zoo\n * then it returns\n * { bar: baz, foo: zaz/zoo }\n *\n * @param {string} rawPathname A raw pathname\n * @return {object}\n */\nexport const grabMatchParams = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return path.params\n }\n\n return {}\n}\n\n// Given a raw URL path, returns the cleaned version of it (trim off\n// `#` and query params), or if it matches an entry in\n// `match-paths.json`, its matched path is returned\n//\n// E.g. `/foo?bar=far` => `/foo`\n//\n// Or if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n// `/foo?bar=far` => `/page1`\nexport const findPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n if (pathCache.has(trimmedPathname)) {\n return pathCache.get(trimmedPathname)\n }\n\n let foundPath = findMatchPath(trimmedPathname)\n\n if (!foundPath) {\n foundPath = cleanPath(rawPathname)\n }\n\n pathCache.set(trimmedPathname, foundPath)\n\n return foundPath\n}\n\n/**\n * Clean a url and converts /index.html => /\n * E.g. `/foo?bar=far` => `/foo`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string}\n */\nexport const cleanPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n\n let foundPath = trimmedPathname\n if (foundPath === `/index.html`) {\n foundPath = `/`\n }\n\n foundPath = normalizePagePath(foundPath)\n\n return foundPath\n}\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nexport var isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\nexport default isBrowser;","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({ location: location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, { key: Date.now() + \"\" });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({ location: location, action: \"PUSH\" });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({ pathname: pathname, search: search.length ? \"?\" + search : search });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = { pathname: pathname, search: search };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","// \n// An event handler can take an optional event argument\n// and should not return a value\n \n \n\n// An array of all currently registered event handlers for a type\n \n \n// A map of event types and their corresponding event handlers.\n \n \n \n \n\n/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nfunction mitt(all ) {\n\tall = all || Object.create(null);\n\n\treturn {\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @memberOf mitt\n\t\t */\n\t\ton: function on(type , handler ) {\n\t\t\t(all[type] || (all[type] = [])).push(handler);\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @memberOf mitt\n\t\t */\n\t\toff: function off(type , handler ) {\n\t\t\tif (all[type]) {\n\t\t\t\tall[type].splice(all[type].indexOf(handler) >>> 0, 1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked after type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler\n\t\t * @memberOf mitt\n\t\t */\n\t\temit: function emit(type , evt ) {\n\t\t\t(all[type] || []).slice().map(function (handler) { handler(evt); });\n\t\t\t(all['*'] || []).slice().map(function (handler) { handler(type, evt); });\n\t\t}\n\t};\n}\n\nexport default mitt;\n//# sourceMappingURL=mitt.es.js.map\n","import mitt from \"mitt\"\n\nconst emitter = mitt()\nexport default emitter\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _gatsby = require(\"gatsby\");\n\nvar _getManifestPathname = _interopRequireDefault(require(\"./get-manifest-pathname\"));\n\n/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\n// when we don't have localisation in our manifest, we tree shake everything away\nif (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n exports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n var localize = pluginOptions.localize;\n var manifestFilename = (0, _getManifestPathname.default)(location.pathname, localize);\n var manifestEl = document.head.querySelector(\"link[rel=\\\"manifest\\\"]\");\n\n if (manifestEl) {\n manifestEl.setAttribute(\"href\", (0, _gatsby.withPrefix)(manifestFilename));\n }\n };\n}","function toVal(mix) {\n var k,\n y,\n str = '';\n\n if (typeof mix === 'string' || typeof mix === 'number') {\n str += mix;\n } else if (typeof mix === 'object') {\n if (Array.isArray(mix)) {\n for (k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (y = toVal(mix[k])) {\n str && (str += ' ');\n str += y;\n }\n }\n }\n } else {\n for (k in mix) {\n if (mix[k]) {\n str && (str += ' ');\n str += k;\n }\n }\n }\n }\n\n return str;\n}\n\nexport default function () {\n var i = 0,\n tmp,\n x,\n str = '';\n\n while (i < arguments.length) {\n if (tmp = arguments[i++]) {\n if (x = toVal(tmp)) {\n str && (str += ' ');\n str += x;\n }\n }\n }\n\n return str;\n}","import invariant from \"invariant\";\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{ path: path }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\n\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return { route: route, score: score, index: index };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","\"use strict\";\n\nexports.__esModule = true;\nexports.hasEntries = hasEntries;\n\nfunction hasEntries(object) {\n if (!object) return false;\n return Object.entries(object).length > 0;\n}","var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","exports.polyfill = Component => Component\n","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n (function () { return this; })() || Function('return this')();\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport clsx from 'clsx';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport makeStyles from '../makeStyles';\n\nfunction omit(input, fields) {\n var output = {};\n Object.keys(input).forEach(function (prop) {\n if (fields.indexOf(prop) === -1) {\n output[prop] = input[prop];\n }\n });\n return output;\n} // styled-components's API removes the mapping between components and styles.\n// Using components as a low-level styling construct can be simpler.\n\n\nexport default function styled(Component) {\n var componentCreator = function componentCreator(style) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n stylesOptions = _objectWithoutProperties(options, [\"name\"]);\n\n if (process.env.NODE_ENV !== 'production' && Component === undefined) {\n throw new Error(['You are calling styled(Component)(style) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n\n var classNamePrefix = name;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = getDisplayName(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var stylesOrCreator = typeof style === 'function' ? function (theme) {\n return {\n root: function root(props) {\n return style(_extends({\n theme: theme\n }, props));\n }\n };\n } : {\n root: style\n };\n var useStyles = makeStyles(stylesOrCreator, _extends({\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var filterProps;\n var propTypes = {};\n\n if (style.filterProps) {\n filterProps = style.filterProps;\n delete style.filterProps;\n }\n /* eslint-disable react/forbid-foreign-prop-types */\n\n\n if (style.propTypes) {\n propTypes = style.propTypes;\n delete style.propTypes;\n }\n /* eslint-enable react/forbid-foreign-prop-types */\n\n\n var StyledComponent = /*#__PURE__*/React.forwardRef(function StyledComponent(props, ref) {\n var children = props.children,\n classNameProp = props.className,\n clone = props.clone,\n ComponentProp = props.component,\n other = _objectWithoutProperties(props, [\"children\", \"className\", \"clone\", \"component\"]);\n\n var classes = useStyles(props);\n var className = clsx(classes.root, classNameProp);\n var spread = other;\n\n if (filterProps) {\n spread = omit(spread, filterProps);\n }\n\n if (clone) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n className: clsx(children.props.className, className)\n }, spread));\n }\n\n if (typeof children === 'function') {\n return children(_extends({\n className: className\n }, spread));\n }\n\n var FinalComponent = ComponentProp || Component;\n return /*#__PURE__*/React.createElement(FinalComponent, _extends({\n ref: ref,\n className: className\n }, spread), children);\n });\n process.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n StyledComponent.displayName = \"Styled(\".concat(classNamePrefix, \")\");\n }\n\n hoistNonReactStatics(StyledComponent, Component);\n return StyledComponent;\n };\n\n return componentCreator;\n}","import \"core-js/modules/es.array.reduce.js\";\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport isInBrowser from 'is-in-browser';\nimport warning from 'tiny-warning';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nvar plainObjectConstrurctor = {}.constructor;\n\nfunction cloneStyle(style) {\n if (style == null || typeof style !== 'object') return style;\n if (Array.isArray(style)) return style.map(cloneStyle);\n if (style.constructor !== plainObjectConstrurctor) return style;\n var newStyle = {};\n\n for (var name in style) {\n newStyle[name] = cloneStyle(style[name]);\n }\n\n return newStyle;\n}\n/**\n * Create a rule instance.\n */\n\n\nfunction createRule(name, decl, options) {\n if (name === void 0) {\n name = 'unnamed';\n }\n\n var jss = options.jss;\n var declCopy = cloneStyle(decl);\n var rule = jss.plugins.onCreateRule(name, declCopy, options);\n if (rule) return rule; // It is an at-rule and it has no instance.\n\n if (name[0] === '@') {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Unknown rule \" + name) : void 0;\n }\n\n return null;\n}\n\nvar join = function join(value, by) {\n var result = '';\n\n for (var i = 0; i < value.length; i++) {\n // Remove !important from the value, it will be readded later.\n if (value[i] === '!important') break;\n if (result) result += by;\n result += value[i];\n }\n\n return result;\n};\n/**\n * Converts array values to string.\n *\n * `margin: [['5px', '10px']]` > `margin: 5px 10px;`\n * `border: ['1px', '2px']` > `border: 1px, 2px;`\n * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`\n * `color: ['red', !important]` > `color: red !important;`\n */\n\n\nvar toCssValue = function toCssValue(value, ignoreImportant) {\n if (ignoreImportant === void 0) {\n ignoreImportant = false;\n }\n\n if (!Array.isArray(value)) return value;\n var cssValue = ''; // Support space separated values via `[['5px', '10px']]`.\n\n if (Array.isArray(value[0])) {\n for (var i = 0; i < value.length; i++) {\n if (value[i] === '!important') break;\n if (cssValue) cssValue += ', ';\n cssValue += join(value[i], ' ');\n }\n } else cssValue = join(value, ', '); // Add !important, because it was ignored.\n\n\n if (!ignoreImportant && value[value.length - 1] === '!important') {\n cssValue += ' !important';\n }\n\n return cssValue;\n};\n/**\n * Indent a string.\n * http://jsperf.com/array-join-vs-for\n */\n\n\nfunction indentStr(str, indent) {\n var result = '';\n\n for (var index = 0; index < indent; index++) {\n result += ' ';\n }\n\n return result + str;\n}\n/**\n * Converts a Rule to CSS string.\n */\n\n\nfunction toCss(selector, style, options) {\n if (options === void 0) {\n options = {};\n }\n\n var result = '';\n if (!style) return result;\n var _options = options,\n _options$indent = _options.indent,\n indent = _options$indent === void 0 ? 0 : _options$indent;\n var fallbacks = style.fallbacks;\n if (selector) indent++; // Apply fallbacks first.\n\n if (fallbacks) {\n // Array syntax {fallbacks: [{prop: value}]}\n if (Array.isArray(fallbacks)) {\n for (var index = 0; index < fallbacks.length; index++) {\n var fallback = fallbacks[index];\n\n for (var prop in fallback) {\n var value = fallback[prop];\n\n if (value != null) {\n if (result) result += '\\n';\n result += \"\" + indentStr(prop + \": \" + toCssValue(value) + \";\", indent);\n }\n }\n }\n } else {\n // Object syntax {fallbacks: {prop: value}}\n for (var _prop in fallbacks) {\n var _value = fallbacks[_prop];\n\n if (_value != null) {\n if (result) result += '\\n';\n result += \"\" + indentStr(_prop + \": \" + toCssValue(_value) + \";\", indent);\n }\n }\n }\n }\n\n for (var _prop2 in style) {\n var _value2 = style[_prop2];\n\n if (_value2 != null && _prop2 !== 'fallbacks') {\n if (result) result += '\\n';\n result += \"\" + indentStr(_prop2 + \": \" + toCssValue(_value2) + \";\", indent);\n }\n } // Allow empty style in this case, because properties will be added dynamically.\n\n\n if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.\n\n if (!selector) return result;\n indent--;\n if (result) result = \"\\n\" + result + \"\\n\";\n return indentStr(selector + \" {\" + result, indent) + indentStr('}', indent);\n}\n\nvar escapeRegex = /([[\\].#*$><+~=|^:(),\"'`\\s])/g;\nvar nativeEscape = typeof CSS !== 'undefined' && CSS.escape;\n\nvar escape = function escape(str) {\n return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\\\$1');\n};\n\nvar BaseStyleRule = /*#__PURE__*/function () {\n function BaseStyleRule(key, style, options) {\n this.type = 'style';\n this.key = void 0;\n this.isProcessed = false;\n this.style = void 0;\n this.renderer = void 0;\n this.renderable = void 0;\n this.options = void 0;\n var sheet = options.sheet,\n Renderer = options.Renderer;\n this.key = key;\n this.options = options;\n this.style = style;\n if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();\n }\n /**\n * Get or set a style property.\n */\n\n\n var _proto = BaseStyleRule.prototype;\n\n _proto.prop = function prop(name, value, options) {\n // It's a getter.\n if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed.\n\n var force = options ? options.force : false;\n if (!force && this.style[name] === value) return this;\n var newValue = value;\n\n if (!options || options.process !== false) {\n newValue = this.options.jss.plugins.onChangeValue(value, name, this);\n }\n\n var isEmpty = newValue == null || newValue === false;\n var isDefined = (name in this.style); // Value is empty and wasn't defined before.\n\n if (isEmpty && !isDefined && !force) return this; // We are going to remove this value.\n\n var remove = isEmpty && isDefined;\n if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true.\n\n if (this.renderable && this.renderer) {\n if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);\n return this;\n }\n\n var sheet = this.options.sheet;\n\n if (sheet && sheet.attached) {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Rule is not linked. Missing sheet option \"link: true\".') : void 0;\n }\n\n return this;\n };\n\n return BaseStyleRule;\n}();\n\nvar StyleRule = /*#__PURE__*/function (_BaseStyleRule) {\n _inheritsLoose(StyleRule, _BaseStyleRule);\n\n function StyleRule(key, style, options) {\n var _this;\n\n _this = _BaseStyleRule.call(this, key, style, options) || this;\n _this.selectorText = void 0;\n _this.id = void 0;\n _this.renderable = void 0;\n var selector = options.selector,\n scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n\n if (selector) {\n _this.selectorText = selector;\n } else if (scoped !== false) {\n _this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);\n _this.selectorText = \".\" + escape(_this.id);\n }\n\n return _this;\n }\n /**\n * Set selector string.\n * Attention: use this with caution. Most browsers didn't implement\n * selectorText setter, so this may result in rerendering of entire Style Sheet.\n */\n\n\n var _proto2 = StyleRule.prototype;\n /**\n * Apply rule to an element inline.\n */\n\n _proto2.applyTo = function applyTo(renderable) {\n var renderer = this.renderer;\n\n if (renderer) {\n var json = this.toJSON();\n\n for (var prop in json) {\n renderer.setProperty(renderable, prop, json[prop]);\n }\n }\n\n return this;\n }\n /**\n * Returns JSON representation of the rule.\n * Fallbacks are not supported.\n * Useful for inline styles.\n */\n ;\n\n _proto2.toJSON = function toJSON() {\n var json = {};\n\n for (var prop in this.style) {\n var value = this.style[prop];\n if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);\n }\n\n return json;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto2.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? _extends({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.selectorText, this.style, opts);\n };\n\n _createClass(StyleRule, [{\n key: \"selector\",\n set: function set(selector) {\n if (selector === this.selectorText) return;\n this.selectorText = selector;\n var renderer = this.renderer,\n renderable = this.renderable;\n if (!renderable || !renderer) return;\n var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule.\n\n if (!hasChanged) {\n renderer.replaceRule(renderable, this);\n }\n }\n /**\n * Get selector string.\n */\n ,\n get: function get() {\n return this.selectorText;\n }\n }]);\n\n return StyleRule;\n}(BaseStyleRule);\n\nvar pluginStyleRule = {\n onCreateRule: function onCreateRule(name, style, options) {\n if (name[0] === '@' || options.parent && options.parent.type === 'keyframes') {\n return null;\n }\n\n return new StyleRule(name, style, options);\n }\n};\nvar defaultToStringOptions = {\n indent: 1,\n children: true\n};\nvar atRegExp = /@([\\w-]+)/;\n/**\n * Conditional rule for @media, @supports\n */\n\nvar ConditionalRule = /*#__PURE__*/function () {\n function ConditionalRule(key, styles, options) {\n this.type = 'conditional';\n this.at = void 0;\n this.key = void 0;\n this.query = void 0;\n this.rules = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n this.key = key;\n var atMatch = key.match(atRegExp);\n this.at = atMatch ? atMatch[1] : 'unknown'; // Key might contain a unique suffix in case the `name` passed by user was duplicate.\n\n this.query = options.name || \"@\" + this.at;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = ConditionalRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions;\n }\n\n if (options.indent == null) options.indent = defaultToStringOptions.indent;\n if (options.children == null) options.children = defaultToStringOptions.children;\n\n if (options.children === false) {\n return this.query + \" {}\";\n }\n\n var children = this.rules.toString(options);\n return children ? this.query + \" {\\n\" + children + \"\\n}\" : '';\n };\n\n return ConditionalRule;\n}();\n\nvar keyRegExp = /@media|@supports\\s+/;\nvar pluginConditionalRule = {\n onCreateRule: function onCreateRule(key, styles, options) {\n return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null;\n }\n};\nvar defaultToStringOptions$1 = {\n indent: 1,\n children: true\n};\nvar nameRegExp = /@keyframes\\s+([\\w-]+)/;\n/**\n * Rule for @keyframes\n */\n\nvar KeyframesRule = /*#__PURE__*/function () {\n function KeyframesRule(key, frames, options) {\n this.type = 'keyframes';\n this.at = '@keyframes';\n this.key = void 0;\n this.name = void 0;\n this.id = void 0;\n this.rules = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n var nameMatch = key.match(nameRegExp);\n\n if (nameMatch && nameMatch[1]) {\n this.name = nameMatch[1];\n } else {\n this.name = 'noname';\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Bad keyframes name \" + key) : void 0;\n }\n\n this.key = this.type + \"-\" + this.name;\n this.options = options;\n var scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n this.id = scoped === false ? this.name : escape(generateId(this, sheet));\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var name in frames) {\n this.rules.add(name, frames[name], _extends({}, options, {\n parent: this\n }));\n }\n\n this.rules.process();\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = KeyframesRule.prototype;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions$1;\n }\n\n if (options.indent == null) options.indent = defaultToStringOptions$1.indent;\n if (options.children == null) options.children = defaultToStringOptions$1.children;\n\n if (options.children === false) {\n return this.at + \" \" + this.id + \" {}\";\n }\n\n var children = this.rules.toString(options);\n if (children) children = \"\\n\" + children + \"\\n\";\n return this.at + \" \" + this.id + \" {\" + children + \"}\";\n };\n\n return KeyframesRule;\n}();\n\nvar keyRegExp$1 = /@keyframes\\s+/;\nvar refRegExp = /\\$([\\w-]+)/g;\n\nvar findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) {\n if (typeof val === 'string') {\n return val.replace(refRegExp, function (match, name) {\n if (name in keyframes) {\n return keyframes[name];\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Referenced keyframes rule \\\"\" + name + \"\\\" is not defined.\") : void 0;\n return match;\n });\n }\n\n return val;\n};\n/**\n * Replace the reference for a animation name.\n */\n\n\nvar replaceRef = function replaceRef(style, prop, keyframes) {\n var value = style[prop];\n var refKeyframe = findReferencedKeyframe(value, keyframes);\n\n if (refKeyframe !== value) {\n style[prop] = refKeyframe;\n }\n};\n\nvar plugin = {\n onCreateRule: function onCreateRule(key, frames, options) {\n return typeof key === 'string' && keyRegExp$1.test(key) ? new KeyframesRule(key, frames, options) : null;\n },\n // Animation name ref replacer.\n onProcessStyle: function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style' || !sheet) return style;\n if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes);\n if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes);\n return style;\n },\n onChangeValue: function onChangeValue(val, prop, rule) {\n var sheet = rule.options.sheet;\n\n if (!sheet) {\n return val;\n }\n\n switch (prop) {\n case 'animation':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n case 'animation-name':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n default:\n return val;\n }\n }\n};\n\nvar KeyframeRule = /*#__PURE__*/function (_BaseStyleRule) {\n _inheritsLoose(KeyframeRule, _BaseStyleRule);\n\n function KeyframeRule() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _BaseStyleRule.call.apply(_BaseStyleRule, [this].concat(args)) || this;\n _this.renderable = void 0;\n return _this;\n }\n\n var _proto = KeyframeRule.prototype;\n /**\n * Generates a CSS string.\n */\n\n _proto.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? _extends({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.key, this.style, opts);\n };\n\n return KeyframeRule;\n}(BaseStyleRule);\n\nvar pluginKeyframeRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n if (options.parent && options.parent.type === 'keyframes') {\n return new KeyframeRule(key, style, options);\n }\n\n return null;\n }\n};\n\nvar FontFaceRule = /*#__PURE__*/function () {\n function FontFaceRule(key, style, options) {\n this.type = 'font-face';\n this.at = '@font-face';\n this.key = void 0;\n this.style = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = FontFaceRule.prototype;\n\n _proto.toString = function toString(options) {\n if (Array.isArray(this.style)) {\n var str = '';\n\n for (var index = 0; index < this.style.length; index++) {\n str += toCss(this.at, this.style[index]);\n if (this.style[index + 1]) str += '\\n';\n }\n\n return str;\n }\n\n return toCss(this.at, this.style, options);\n };\n\n return FontFaceRule;\n}();\n\nvar keyRegExp$2 = /@font-face/;\nvar pluginFontFaceRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null;\n }\n};\n\nvar ViewportRule = /*#__PURE__*/function () {\n function ViewportRule(key, style, options) {\n this.type = 'viewport';\n this.at = '@viewport';\n this.key = void 0;\n this.style = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = ViewportRule.prototype;\n\n _proto.toString = function toString(options) {\n return toCss(this.key, this.style, options);\n };\n\n return ViewportRule;\n}();\n\nvar pluginViewportRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return key === '@viewport' || key === '@-ms-viewport' ? new ViewportRule(key, style, options) : null;\n }\n};\n\nvar SimpleRule = /*#__PURE__*/function () {\n function SimpleRule(key, value, options) {\n this.type = 'simple';\n this.key = void 0;\n this.value = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n this.key = key;\n this.value = value;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n // eslint-disable-next-line no-unused-vars\n\n\n var _proto = SimpleRule.prototype;\n\n _proto.toString = function toString(options) {\n if (Array.isArray(this.value)) {\n var str = '';\n\n for (var index = 0; index < this.value.length; index++) {\n str += this.key + \" \" + this.value[index] + \";\";\n if (this.value[index + 1]) str += '\\n';\n }\n\n return str;\n }\n\n return this.key + \" \" + this.value + \";\";\n };\n\n return SimpleRule;\n}();\n\nvar keysMap = {\n '@charset': true,\n '@import': true,\n '@namespace': true\n};\nvar pluginSimpleRule = {\n onCreateRule: function onCreateRule(key, value, options) {\n return key in keysMap ? new SimpleRule(key, value, options) : null;\n }\n};\nvar plugins = [pluginStyleRule, pluginConditionalRule, plugin, pluginKeyframeRule, pluginFontFaceRule, pluginViewportRule, pluginSimpleRule];\nvar defaultUpdateOptions = {\n process: true\n};\nvar forceUpdateOptions = {\n force: true,\n process: true\n /**\n * Contains rules objects and allows adding/removing etc.\n * Is used for e.g. by `StyleSheet` or `ConditionalRule`.\n */\n\n};\n\nvar RuleList = /*#__PURE__*/function () {\n // Rules registry for access by .get() method.\n // It contains the same rule registered by name and by selector.\n // Original styles object.\n // Used to ensure correct rules order.\n function RuleList(options) {\n this.map = {};\n this.raw = {};\n this.index = [];\n this.counter = 0;\n this.options = void 0;\n this.classes = void 0;\n this.keyframes = void 0;\n this.options = options;\n this.classes = options.classes;\n this.keyframes = options.keyframes;\n }\n /**\n * Create and register rule.\n *\n * Will not render after Style Sheet was rendered the first time.\n */\n\n\n var _proto = RuleList.prototype;\n\n _proto.add = function add(name, decl, ruleOptions) {\n var _this$options = this.options,\n parent = _this$options.parent,\n sheet = _this$options.sheet,\n jss = _this$options.jss,\n Renderer = _this$options.Renderer,\n generateId = _this$options.generateId,\n scoped = _this$options.scoped;\n\n var options = _extends({\n classes: this.classes,\n parent: parent,\n sheet: sheet,\n jss: jss,\n Renderer: Renderer,\n generateId: generateId,\n scoped: scoped,\n name: name,\n keyframes: this.keyframes,\n selector: undefined\n }, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but\n // `sheet.addRule()` opens the door for any duplicate rule name. When this happens\n // we need to make the key unique within this RuleList instance scope.\n\n\n var key = name;\n\n if (name in this.raw) {\n key = name + \"-d\" + this.counter++;\n } // We need to save the original decl before creating the rule\n // because cache plugin needs to use it as a key to return a cached rule.\n\n\n this.raw[key] = decl;\n\n if (key in this.classes) {\n // E.g. rules inside of @media container\n options.selector = \".\" + escape(this.classes[key]);\n }\n\n var rule = createRule(key, decl, options);\n if (!rule) return null;\n this.register(rule);\n var index = options.index === undefined ? this.index.length : options.index;\n this.index.splice(index, 0, rule);\n return rule;\n }\n /**\n * Get a rule.\n */\n ;\n\n _proto.get = function get(name) {\n return this.map[name];\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.remove = function remove(rule) {\n this.unregister(rule);\n delete this.raw[rule.key];\n this.index.splice(this.index.indexOf(rule), 1);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.index.indexOf(rule);\n }\n /**\n * Run `onProcessRule()` plugins on every rule.\n */\n ;\n\n _proto.process = function process() {\n var plugins = this.options.jss.plugins; // We need to clone array because if we modify the index somewhere else during a loop\n // we end up with very hard-to-track-down side effects.\n\n this.index.slice(0).forEach(plugins.onProcessRule, plugins);\n }\n /**\n * Register a rule in `.map`, `.classes` and `.keyframes` maps.\n */\n ;\n\n _proto.register = function register(rule) {\n this.map[rule.key] = rule;\n\n if (rule instanceof StyleRule) {\n this.map[rule.selector] = rule;\n if (rule.id) this.classes[rule.key] = rule.id;\n } else if (rule instanceof KeyframesRule && this.keyframes) {\n this.keyframes[rule.name] = rule.id;\n }\n }\n /**\n * Unregister a rule.\n */\n ;\n\n _proto.unregister = function unregister(rule) {\n delete this.map[rule.key];\n\n if (rule instanceof StyleRule) {\n delete this.map[rule.selector];\n delete this.classes[rule.key];\n } else if (rule instanceof KeyframesRule) {\n delete this.keyframes[rule.name];\n }\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var name;\n var data;\n var options;\n\n if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') {\n name = arguments.length <= 0 ? undefined : arguments[0]; // $FlowFixMe[invalid-tuple-index]\n\n data = arguments.length <= 1 ? undefined : arguments[1]; // $FlowFixMe[invalid-tuple-index]\n\n options = arguments.length <= 2 ? undefined : arguments[2];\n } else {\n data = arguments.length <= 0 ? undefined : arguments[0]; // $FlowFixMe[invalid-tuple-index]\n\n options = arguments.length <= 1 ? undefined : arguments[1];\n name = null;\n }\n\n if (name) {\n this.updateOne(this.map[name], data, options);\n } else {\n for (var index = 0; index < this.index.length; index++) {\n this.updateOne(this.index[index], data, options);\n }\n }\n }\n /**\n * Execute plugins, update rule props.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n if (options === void 0) {\n options = defaultUpdateOptions;\n }\n\n var _this$options2 = this.options,\n plugins = _this$options2.jss.plugins,\n sheet = _this$options2.sheet; // It is a rules container like for e.g. ConditionalRule.\n\n if (rule.rules instanceof RuleList) {\n rule.rules.update(data, options);\n return;\n }\n\n var styleRule = rule;\n var style = styleRule.style;\n plugins.onUpdate(data, rule, sheet, options); // We rely on a new `style` ref in case it was mutated during onUpdate hook.\n\n if (options.process && style && style !== styleRule.style) {\n // We need to run the plugins in case new `style` relies on syntax plugins.\n plugins.onProcessStyle(styleRule.style, styleRule, sheet); // Update and add props.\n\n for (var prop in styleRule.style) {\n var nextValue = styleRule.style[prop];\n var prevValue = style[prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (nextValue !== prevValue) {\n styleRule.prop(prop, nextValue, forceUpdateOptions);\n }\n } // Remove props.\n\n\n for (var _prop in style) {\n var _nextValue = styleRule.style[_prop];\n var _prevValue = style[_prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (_nextValue == null && _nextValue !== _prevValue) {\n styleRule.prop(_prop, null, forceUpdateOptions);\n }\n }\n }\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n var str = '';\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n\n for (var index = 0; index < this.index.length; index++) {\n var rule = this.index[index];\n var css = rule.toString(options); // No need to render an empty rule.\n\n if (!css && !link) continue;\n if (str) str += '\\n';\n str += css;\n }\n\n return str;\n };\n\n return RuleList;\n}();\n\nvar StyleSheet = /*#__PURE__*/function () {\n function StyleSheet(styles, options) {\n this.options = void 0;\n this.deployed = void 0;\n this.attached = void 0;\n this.rules = void 0;\n this.renderer = void 0;\n this.classes = void 0;\n this.keyframes = void 0;\n this.queue = void 0;\n this.attached = false;\n this.deployed = false;\n this.classes = {};\n this.keyframes = {};\n this.options = _extends({}, options, {\n sheet: this,\n parent: this,\n classes: this.classes,\n keyframes: this.keyframes\n });\n\n if (options.Renderer) {\n this.renderer = new options.Renderer(this);\n }\n\n this.rules = new RuleList(this.options);\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Attach renderable to the render tree.\n */\n\n\n var _proto = StyleSheet.prototype;\n\n _proto.attach = function attach() {\n if (this.attached) return this;\n if (this.renderer) this.renderer.attach();\n this.attached = true; // Order is important, because we can't use insertRule API if style element is not attached.\n\n if (!this.deployed) this.deploy();\n return this;\n }\n /**\n * Remove renderable from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n if (!this.attached) return this;\n if (this.renderer) this.renderer.detach();\n this.attached = false;\n return this;\n }\n /**\n * Add a rule to the current stylesheet.\n * Will insert a rule also after the stylesheet has been rendered first time.\n */\n ;\n\n _proto.addRule = function addRule(name, decl, options) {\n var queue = this.queue; // Plugins can create rules.\n // In order to preserve the right order, we need to queue all `.addRule` calls,\n // which happen after the first `rules.add()` call.\n\n if (this.attached && !queue) this.queue = [];\n var rule = this.rules.add(name, decl, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n\n if (this.attached) {\n if (!this.deployed) return rule; // Don't insert rule directly if there is no stringified version yet.\n // It will be inserted all together when .attach is called.\n\n if (queue) queue.push(rule);else {\n this.insertRule(rule);\n\n if (this.queue) {\n this.queue.forEach(this.insertRule, this);\n this.queue = undefined;\n }\n }\n return rule;\n } // We can't add rules to a detached style node.\n // We will redeploy the sheet once user will attach it.\n\n\n this.deployed = false;\n return rule;\n }\n /**\n * Insert rule into the StyleSheet\n */\n ;\n\n _proto.insertRule = function insertRule(rule) {\n if (this.renderer) {\n this.renderer.insertRule(rule);\n }\n }\n /**\n * Create and add rules.\n * Will render also after Style Sheet was rendered the first time.\n */\n ;\n\n _proto.addRules = function addRules(styles, options) {\n var added = [];\n\n for (var name in styles) {\n var rule = this.addRule(name, styles[name], options);\n if (rule) added.push(rule);\n }\n\n return added;\n }\n /**\n * Get a rule by name.\n */\n ;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Delete a rule by name.\n * Returns `true`: if rule has been deleted from the DOM.\n */\n ;\n\n _proto.deleteRule = function deleteRule(name) {\n var rule = typeof name === 'object' ? name : this.rules.get(name);\n\n if (!rule || // Style sheet was created without link: true and attached, in this case we\n // won't be able to remove the CSS rule from the DOM.\n this.attached && !rule.renderable) {\n return false;\n }\n\n this.rules.remove(rule);\n\n if (this.attached && rule.renderable && this.renderer) {\n return this.renderer.deleteRule(rule.renderable);\n }\n\n return true;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Deploy pure CSS string to a renderable.\n */\n ;\n\n _proto.deploy = function deploy() {\n if (this.renderer) this.renderer.deploy();\n this.deployed = true;\n return this;\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var _this$rules;\n\n (_this$rules = this.rules).update.apply(_this$rules, arguments);\n\n return this;\n }\n /**\n * Updates a single rule.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n this.rules.updateOne(rule, data, options);\n return this;\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n return this.rules.toString(options);\n };\n\n return StyleSheet;\n}();\n\nvar PluginsRegistry = /*#__PURE__*/function () {\n function PluginsRegistry() {\n this.plugins = {\n internal: [],\n external: []\n };\n this.registry = void 0;\n }\n\n var _proto = PluginsRegistry.prototype;\n /**\n * Call `onCreateRule` hooks and return an object if returned by a hook.\n */\n\n _proto.onCreateRule = function onCreateRule(name, decl, options) {\n for (var i = 0; i < this.registry.onCreateRule.length; i++) {\n var rule = this.registry.onCreateRule[i](name, decl, options);\n if (rule) return rule;\n }\n\n return null;\n }\n /**\n * Call `onProcessRule` hooks.\n */\n ;\n\n _proto.onProcessRule = function onProcessRule(rule) {\n if (rule.isProcessed) return;\n var sheet = rule.options.sheet;\n\n for (var i = 0; i < this.registry.onProcessRule.length; i++) {\n this.registry.onProcessRule[i](rule, sheet);\n }\n\n if (rule.style) this.onProcessStyle(rule.style, rule, sheet);\n rule.isProcessed = true;\n }\n /**\n * Call `onProcessStyle` hooks.\n */\n ;\n\n _proto.onProcessStyle = function onProcessStyle(style, rule, sheet) {\n for (var i = 0; i < this.registry.onProcessStyle.length; i++) {\n // $FlowFixMe[prop-missing]\n rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet);\n }\n }\n /**\n * Call `onProcessSheet` hooks.\n */\n ;\n\n _proto.onProcessSheet = function onProcessSheet(sheet) {\n for (var i = 0; i < this.registry.onProcessSheet.length; i++) {\n this.registry.onProcessSheet[i](sheet);\n }\n }\n /**\n * Call `onUpdate` hooks.\n */\n ;\n\n _proto.onUpdate = function onUpdate(data, rule, sheet, options) {\n for (var i = 0; i < this.registry.onUpdate.length; i++) {\n this.registry.onUpdate[i](data, rule, sheet, options);\n }\n }\n /**\n * Call `onChangeValue` hooks.\n */\n ;\n\n _proto.onChangeValue = function onChangeValue(value, prop, rule) {\n var processedValue = value;\n\n for (var i = 0; i < this.registry.onChangeValue.length; i++) {\n processedValue = this.registry.onChangeValue[i](processedValue, prop, rule);\n }\n\n return processedValue;\n }\n /**\n * Register a plugin.\n */\n ;\n\n _proto.use = function use(newPlugin, options) {\n if (options === void 0) {\n options = {\n queue: 'external'\n };\n }\n\n var plugins = this.plugins[options.queue]; // Avoids applying same plugin twice, at least based on ref.\n\n if (plugins.indexOf(newPlugin) !== -1) {\n return;\n }\n\n plugins.push(newPlugin);\n this.registry = [].concat(this.plugins.external, this.plugins.internal).reduce(function (registry, plugin) {\n for (var name in plugin) {\n if (name in registry) {\n registry[name].push(plugin[name]);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Unknown hook \\\"\" + name + \"\\\".\") : void 0;\n }\n }\n\n return registry;\n }, {\n onCreateRule: [],\n onProcessRule: [],\n onProcessStyle: [],\n onProcessSheet: [],\n onChangeValue: [],\n onUpdate: []\n });\n };\n\n return PluginsRegistry;\n}();\n/**\n * Sheets registry to access them all at one place.\n */\n\n\nvar SheetsRegistry = /*#__PURE__*/function () {\n function SheetsRegistry() {\n this.registry = [];\n }\n\n var _proto = SheetsRegistry.prototype;\n /**\n * Register a Style Sheet.\n */\n\n _proto.add = function add(sheet) {\n var registry = this.registry;\n var index = sheet.options.index;\n if (registry.indexOf(sheet) !== -1) return;\n\n if (registry.length === 0 || index >= this.index) {\n registry.push(sheet);\n return;\n } // Find a position.\n\n\n for (var i = 0; i < registry.length; i++) {\n if (registry[i].options.index > index) {\n registry.splice(i, 0, sheet);\n return;\n }\n }\n }\n /**\n * Reset the registry.\n */\n ;\n\n _proto.reset = function reset() {\n this.registry = [];\n }\n /**\n * Remove a Style Sheet.\n */\n ;\n\n _proto.remove = function remove(sheet) {\n var index = this.registry.indexOf(sheet);\n this.registry.splice(index, 1);\n }\n /**\n * Convert all attached sheets to a CSS string.\n */\n ;\n\n _proto.toString = function toString(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n attached = _ref.attached,\n options = _objectWithoutPropertiesLoose(_ref, [\"attached\"]);\n\n var css = '';\n\n for (var i = 0; i < this.registry.length; i++) {\n var sheet = this.registry[i];\n\n if (attached != null && sheet.attached !== attached) {\n continue;\n }\n\n if (css) css += '\\n';\n css += sheet.toString(options);\n }\n\n return css;\n };\n\n _createClass(SheetsRegistry, [{\n key: \"index\",\n\n /**\n * Current highest index number.\n */\n get: function get() {\n return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index;\n }\n }]);\n\n return SheetsRegistry;\n}();\n/**\n * This is a global sheets registry. Only DomRenderer will add sheets to it.\n * On the server one should use an own SheetsRegistry instance and add the\n * sheets to it, because you need to make sure to create a new registry for\n * each request in order to not leak sheets across requests.\n */\n\n\nvar registry = new SheetsRegistry();\n/* eslint-disable */\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n\nvar globalThis = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nvar ns = '2f1acc6c3a606b082e5eef5e54414ffb';\nif (globalThis[ns] == null) globalThis[ns] = 0; // Bundle may contain multiple JSS versions at the same time. In order to identify\n// the current version with just one short number and use it for classes generation\n// we use a counter. Also it is more accurate, because user can manually reevaluate\n// the module.\n\nvar moduleId = globalThis[ns]++;\nvar maxRules = 1e10;\n/**\n * Returns a function which generates unique class names based on counters.\n * When new generator function is created, rule counter is reseted.\n * We need to reset the rule counter for SSR for each request.\n */\n\nvar createGenerateId = function createGenerateId(options) {\n if (options === void 0) {\n options = {};\n }\n\n var ruleCounter = 0;\n return function (rule, sheet) {\n ruleCounter += 1;\n\n if (ruleCounter > maxRules) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] You might have a memory leak. Rule counter is at \" + ruleCounter + \".\") : void 0;\n }\n\n var jssId = '';\n var prefix = '';\n\n if (sheet) {\n if (sheet.options.classNamePrefix) {\n prefix = sheet.options.classNamePrefix;\n }\n\n if (sheet.options.jss.id != null) {\n jssId = String(sheet.options.jss.id);\n }\n }\n\n if (options.minify) {\n // Using \"c\" because a number can't be the first char in a class name.\n return \"\" + (prefix || 'c') + moduleId + jssId + ruleCounter;\n }\n\n return prefix + rule.key + \"-\" + moduleId + (jssId ? \"-\" + jssId : '') + \"-\" + ruleCounter;\n };\n};\n/**\n * Cache the value from the first time a function is called.\n */\n\n\nvar memoize = function memoize(fn) {\n var value;\n return function () {\n if (!value) value = fn();\n return value;\n };\n};\n/**\n * Get a style property value.\n */\n\n\nvar getPropertyValue = function getPropertyValue(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop);\n }\n\n return cssRule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n};\n/**\n * Set a style property.\n */\n\n\nvar setProperty = function setProperty(cssRule, prop, value) {\n try {\n var cssValue = value;\n\n if (Array.isArray(value)) {\n cssValue = toCssValue(value, true);\n\n if (value[value.length - 1] === '!important') {\n cssRule.style.setProperty(prop, cssValue, 'important');\n return true;\n }\n } // Support CSSTOM.\n\n\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.set(prop, cssValue);\n } else {\n cssRule.style.setProperty(prop, cssValue);\n }\n } catch (err) {\n // IE may throw if property is unknown.\n return false;\n }\n\n return true;\n};\n/**\n * Remove a style property.\n */\n\n\nvar removeProperty = function removeProperty(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.delete(prop);\n } else {\n cssRule.style.removeProperty(prop);\n }\n } catch (err) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] DOMException \\\"\" + err.message + \"\\\" was thrown. Tried to remove property \\\"\" + prop + \"\\\".\") : void 0;\n }\n};\n/**\n * Set the selector.\n */\n\n\nvar setSelector = function setSelector(cssRule, selectorText) {\n cssRule.selectorText = selectorText; // Return false if setter was not successful.\n // Currently works in chrome only.\n\n return cssRule.selectorText === selectorText;\n};\n/**\n * Gets the `head` element upon the first call and caches it.\n * We assume it can't be null.\n */\n\n\nvar getHead = memoize(function () {\n return document.querySelector('head');\n});\n/**\n * Find attached sheet with an index higher than the passed one.\n */\n\nfunction findHigherSheet(registry, options) {\n for (var i = 0; i < registry.length; i++) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find attached sheet with the highest index.\n */\n\n\nfunction findHighestSheet(registry, options) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find a comment with \"jss\" inside.\n */\n\n\nfunction findCommentNode(text) {\n var head = getHead();\n\n for (var i = 0; i < head.childNodes.length; i++) {\n var node = head.childNodes[i];\n\n if (node.nodeType === 8 && node.nodeValue.trim() === text) {\n return node;\n }\n }\n\n return null;\n}\n/**\n * Find a node before which we can insert the sheet.\n */\n\n\nfunction findPrevNode(options) {\n var registry$1 = registry.registry;\n\n if (registry$1.length > 0) {\n // Try to insert before the next higher sheet.\n var sheet = findHigherSheet(registry$1, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element\n };\n } // Otherwise insert after the last attached.\n\n\n sheet = findHighestSheet(registry$1, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element.nextSibling\n };\n }\n } // Try to find a comment placeholder if registry is empty.\n\n\n var insertionPoint = options.insertionPoint;\n\n if (insertionPoint && typeof insertionPoint === 'string') {\n var comment = findCommentNode(insertionPoint);\n\n if (comment) {\n return {\n parent: comment.parentNode,\n node: comment.nextSibling\n };\n } // If user specifies an insertion point and it can't be found in the document -\n // bad specificity issues may appear.\n\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Insertion point \\\"\" + insertionPoint + \"\\\" not found.\") : void 0;\n }\n\n return false;\n}\n/**\n * Insert style element into the DOM.\n */\n\n\nfunction insertStyle(style, options) {\n var insertionPoint = options.insertionPoint;\n var nextNode = findPrevNode(options);\n\n if (nextNode !== false && nextNode.parent) {\n nextNode.parent.insertBefore(style, nextNode.node);\n return;\n } // Works with iframes and any node types.\n\n\n if (insertionPoint && typeof insertionPoint.nodeType === 'number') {\n // https://stackoverflow.com/questions/41328728/force-casting-in-flow\n var insertionPointElement = insertionPoint;\n var parentNode = insertionPointElement.parentNode;\n if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Insertion point is not in the DOM.') : void 0;\n return;\n }\n\n getHead().appendChild(style);\n}\n/**\n * Read jss nonce setting from the page if the user has set it.\n */\n\n\nvar getNonce = memoize(function () {\n var node = document.querySelector('meta[property=\"csp-nonce\"]');\n return node ? node.getAttribute('content') : null;\n});\n\nvar _insertRule = function insertRule(container, rule, index) {\n try {\n if ('insertRule' in container) {\n var c = container;\n c.insertRule(rule, index);\n } // Keyframes rule.\n else if ('appendRule' in container) {\n var _c = container;\n\n _c.appendRule(rule);\n }\n } catch (err) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] \" + err.message) : void 0;\n return false;\n }\n\n return container.cssRules[index];\n};\n\nvar getValidRuleInsertionIndex = function getValidRuleInsertionIndex(container, index) {\n var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong\n\n if (index === undefined || index > maxIndex) {\n // eslint-disable-next-line no-param-reassign\n return maxIndex;\n }\n\n return index;\n};\n\nvar createStyle = function createStyle() {\n var el = document.createElement('style'); // Without it, IE will have a broken source order specificity if we\n // insert rules after we insert the style tag.\n // It seems to kick-off the source order specificity algorithm.\n\n el.textContent = '\\n';\n return el;\n};\n\nvar DomRenderer = /*#__PURE__*/function () {\n // HTMLStyleElement needs fixing https://github.com/facebook/flow/issues/2696\n // Will be empty if link: true option is not set, because\n // it is only for use together with insertRule API.\n function DomRenderer(sheet) {\n this.getPropertyValue = getPropertyValue;\n this.setProperty = setProperty;\n this.removeProperty = removeProperty;\n this.setSelector = setSelector;\n this.element = void 0;\n this.sheet = void 0;\n this.hasInsertedRules = false;\n this.cssRules = []; // There is no sheet when the renderer is used from a standalone StyleRule.\n\n if (sheet) registry.add(sheet);\n this.sheet = sheet;\n\n var _ref = this.sheet ? this.sheet.options : {},\n media = _ref.media,\n meta = _ref.meta,\n element = _ref.element;\n\n this.element = element || createStyle();\n this.element.setAttribute('data-jss', '');\n if (media) this.element.setAttribute('media', media);\n if (meta) this.element.setAttribute('data-meta', meta);\n var nonce = getNonce();\n if (nonce) this.element.setAttribute('nonce', nonce);\n }\n /**\n * Insert style element into render tree.\n */\n\n\n var _proto = DomRenderer.prototype;\n\n _proto.attach = function attach() {\n // In the case the element node is external and it is already in the DOM.\n if (this.element.parentNode || !this.sheet) return;\n insertStyle(this.element, this.sheet.options); // When rules are inserted using `insertRule` API, after `sheet.detach().attach()`\n // most browsers create a new CSSStyleSheet, except of all IEs.\n\n var deployed = Boolean(this.sheet && this.sheet.deployed);\n\n if (this.hasInsertedRules && deployed) {\n this.hasInsertedRules = false;\n this.deploy();\n }\n }\n /**\n * Remove style element from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n if (!this.sheet) return;\n var parentNode = this.element.parentNode;\n if (parentNode) parentNode.removeChild(this.element); // In the most browsers, rules inserted using insertRule() API will be lost when style element is removed.\n // Though IE will keep them and we need a consistent behavior.\n\n if (this.sheet.options.link) {\n this.cssRules = [];\n this.element.textContent = '\\n';\n }\n }\n /**\n * Inject CSS string into element.\n */\n ;\n\n _proto.deploy = function deploy() {\n var sheet = this.sheet;\n if (!sheet) return;\n\n if (sheet.options.link) {\n this.insertRules(sheet.rules);\n return;\n }\n\n this.element.textContent = \"\\n\" + sheet.toString() + \"\\n\";\n }\n /**\n * Insert RuleList into an element.\n */\n ;\n\n _proto.insertRules = function insertRules(rules, nativeParent) {\n for (var i = 0; i < rules.index.length; i++) {\n this.insertRule(rules.index[i], i, nativeParent);\n }\n }\n /**\n * Insert a rule into element.\n */\n ;\n\n _proto.insertRule = function insertRule(rule, index, nativeParent) {\n if (nativeParent === void 0) {\n nativeParent = this.element.sheet;\n }\n\n if (rule.rules) {\n var parent = rule;\n var latestNativeParent = nativeParent;\n\n if (rule.type === 'conditional' || rule.type === 'keyframes') {\n var _insertionIndex = getValidRuleInsertionIndex(nativeParent, index); // We need to render the container without children first.\n\n\n latestNativeParent = _insertRule(nativeParent, parent.toString({\n children: false\n }), _insertionIndex);\n\n if (latestNativeParent === false) {\n return false;\n }\n\n this.refCssRule(rule, _insertionIndex, latestNativeParent);\n }\n\n this.insertRules(parent.rules, latestNativeParent);\n return latestNativeParent;\n }\n\n var ruleStr = rule.toString();\n if (!ruleStr) return false;\n var insertionIndex = getValidRuleInsertionIndex(nativeParent, index);\n\n var nativeRule = _insertRule(nativeParent, ruleStr, insertionIndex);\n\n if (nativeRule === false) {\n return false;\n }\n\n this.hasInsertedRules = true;\n this.refCssRule(rule, insertionIndex, nativeRule);\n return nativeRule;\n };\n\n _proto.refCssRule = function refCssRule(rule, index, cssRule) {\n rule.renderable = cssRule; // We only want to reference the top level rules, deleteRule API doesn't support removing nested rules\n // like rules inside media queries or keyframes\n\n if (rule.options.parent instanceof StyleSheet) {\n this.cssRules[index] = cssRule;\n }\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.deleteRule = function deleteRule(cssRule) {\n var sheet = this.element.sheet;\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n sheet.deleteRule(index);\n this.cssRules.splice(index, 1);\n return true;\n }\n /**\n * Get index of a CSS Rule.\n */\n ;\n\n _proto.indexOf = function indexOf(cssRule) {\n return this.cssRules.indexOf(cssRule);\n }\n /**\n * Generate a new CSS rule and replace the existing one.\n *\n * Only used for some old browsers because they can't set a selector.\n */\n ;\n\n _proto.replaceRule = function replaceRule(cssRule, rule) {\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n this.element.sheet.deleteRule(index);\n this.cssRules.splice(index, 1);\n return this.insertRule(rule, index);\n }\n /**\n * Get all rules elements.\n */\n ;\n\n _proto.getRules = function getRules() {\n return this.element.sheet.cssRules;\n };\n\n return DomRenderer;\n}();\n\nvar instanceCounter = 0;\n\nvar Jss = /*#__PURE__*/function () {\n function Jss(options) {\n this.id = instanceCounter++;\n this.version = \"10.5.0\";\n this.plugins = new PluginsRegistry();\n this.options = {\n id: {\n minify: false\n },\n createGenerateId: createGenerateId,\n Renderer: isInBrowser ? DomRenderer : null,\n plugins: []\n };\n this.generateId = createGenerateId({\n minify: false\n });\n\n for (var i = 0; i < plugins.length; i++) {\n this.plugins.use(plugins[i], {\n queue: 'internal'\n });\n }\n\n this.setup(options);\n }\n /**\n * Prepares various options, applies plugins.\n * Should not be used twice on the same instance, because there is no plugins\n * deduplication logic.\n */\n\n\n var _proto = Jss.prototype;\n\n _proto.setup = function setup(options) {\n if (options === void 0) {\n options = {};\n }\n\n if (options.createGenerateId) {\n this.options.createGenerateId = options.createGenerateId;\n }\n\n if (options.id) {\n this.options.id = _extends({}, this.options.id, options.id);\n }\n\n if (options.createGenerateId || options.id) {\n this.generateId = this.options.createGenerateId(this.options.id);\n }\n\n if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint;\n\n if ('Renderer' in options) {\n this.options.Renderer = options.Renderer;\n } // eslint-disable-next-line prefer-spread\n\n\n if (options.plugins) this.use.apply(this, options.plugins);\n return this;\n }\n /**\n * Create a Style Sheet.\n */\n ;\n\n _proto.createStyleSheet = function createStyleSheet(styles, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n index = _options.index;\n\n if (typeof index !== 'number') {\n index = registry.index === 0 ? 0 : registry.index + 1;\n }\n\n var sheet = new StyleSheet(styles, _extends({}, options, {\n jss: this,\n generateId: options.generateId || this.generateId,\n insertionPoint: this.options.insertionPoint,\n Renderer: this.options.Renderer,\n index: index\n }));\n this.plugins.onProcessSheet(sheet);\n return sheet;\n }\n /**\n * Detach the Style Sheet and remove it from the registry.\n */\n ;\n\n _proto.removeStyleSheet = function removeStyleSheet(sheet) {\n sheet.detach();\n registry.remove(sheet);\n return this;\n }\n /**\n * Create a rule without a Style Sheet.\n * [Deprecated] will be removed in the next major version.\n */\n ;\n\n _proto.createRule = function createRule$1(name, style, options) {\n if (style === void 0) {\n style = {};\n }\n\n if (options === void 0) {\n options = {};\n } // Enable rule without name for inline styles.\n\n\n if (typeof name === 'object') {\n // $FlowFixMe[incompatible-call]\n return this.createRule(undefined, name, style);\n } // $FlowFixMe[incompatible-type]\n\n\n var ruleOptions = _extends({}, options, {\n name: name,\n jss: this,\n Renderer: this.options.Renderer\n });\n\n if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId;\n if (!ruleOptions.classes) ruleOptions.classes = {};\n if (!ruleOptions.keyframes) ruleOptions.keyframes = {};\n var rule = createRule(name, style, ruleOptions);\n if (rule) this.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Register plugin. Passed function will be invoked with a rule instance.\n */\n ;\n\n _proto.use = function use() {\n var _this = this;\n\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n plugins.forEach(function (plugin) {\n _this.plugins.use(plugin);\n });\n return this;\n };\n\n return Jss;\n}();\n/**\n * Extracts a styles object with only props that contain function values.\n */\n\n\nfunction getDynamicStyles(styles) {\n var to = null;\n\n for (var key in styles) {\n var value = styles[key];\n var type = typeof value;\n\n if (type === 'function') {\n if (!to) to = {};\n to[key] = value;\n } else if (type === 'object' && value !== null && !Array.isArray(value)) {\n var extracted = getDynamicStyles(value);\n\n if (extracted) {\n if (!to) to = {};\n to[key] = extracted;\n }\n }\n }\n\n return to;\n}\n/**\n * SheetsManager is like a WeakMap which is designed to count StyleSheet\n * instances and attach/detach automatically.\n */\n\n\nvar SheetsManager = /*#__PURE__*/function () {\n function SheetsManager() {\n this.length = 0;\n this.sheets = new WeakMap();\n }\n\n var _proto = SheetsManager.prototype;\n\n _proto.get = function get(key) {\n var entry = this.sheets.get(key);\n return entry && entry.sheet;\n };\n\n _proto.add = function add(key, sheet) {\n if (this.sheets.has(key)) return;\n this.length++;\n this.sheets.set(key, {\n sheet: sheet,\n refs: 0\n });\n };\n\n _proto.manage = function manage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs === 0) {\n entry.sheet.attach();\n }\n\n entry.refs++;\n return entry.sheet;\n }\n\n warning(false, \"[JSS] SheetsManager: can't find sheet to manage\");\n return undefined;\n };\n\n _proto.unmanage = function unmanage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs > 0) {\n entry.refs--;\n if (entry.refs === 0) entry.sheet.detach();\n }\n } else {\n warning(false, \"SheetsManager: can't find sheet to unmanage\");\n }\n };\n\n _createClass(SheetsManager, [{\n key: \"size\",\n get: function get() {\n return this.length;\n }\n }]);\n\n return SheetsManager;\n}();\n/**\n * A better abstraction over CSS.\n *\n * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present\n * @website https://github.com/cssinjs/jss\n * @license MIT\n */\n\n/**\n * Export a constant indicating if this browser has CSSTOM support.\n * https://developers.google.com/web/updates/2018/03/cssom\n */\n\n\nvar hasCSSTOMSupport = typeof CSS === 'object' && CSS != null && 'number' in CSS;\n/**\n * Creates a new instance of Jss.\n */\n\nvar create = function create(options) {\n return new Jss(options);\n};\n/**\n * A global Jss instance.\n */\n\n\nvar jss = create();\nexport default jss;\nexport { RuleList, SheetsManager, SheetsRegistry, create, createGenerateId, createRule, getDynamicStyles, hasCSSTOMSupport, registry as sheets, toCssValue };","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollHandler = exports.ScrollContext = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _sessionStorage = require(\"./session-storage\");\n\nvar ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());\nexports.ScrollContext = ScrollContext;\nScrollContext.displayName = \"GatsbyScrollContext\";\n\nvar ScrollHandler = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollHandler, _React$Component);\n\n function ScrollHandler() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._stateStorage = new _sessionStorage.SessionStorage();\n\n _this.scrollListener = function () {\n var key = _this.props.location.key;\n\n if (key) {\n _this._stateStorage.save(_this.props.location, key, window.scrollY);\n }\n };\n\n _this.windowScroll = function (position, prevProps) {\n if (_this.shouldUpdateScroll(prevProps, _this.props)) {\n window.scrollTo(0, position);\n }\n };\n\n _this.scrollToHash = function (hash, prevProps) {\n var node = document.getElementById(hash.substring(1));\n\n if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {\n node.scrollIntoView();\n }\n };\n\n _this.shouldUpdateScroll = function (prevRouterProps, routerProps) {\n var shouldUpdateScroll = _this.props.shouldUpdateScroll;\n\n if (!shouldUpdateScroll) {\n return true;\n } // Hack to allow accessing this._stateStorage.\n\n\n return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);\n };\n\n return _this;\n }\n\n var _proto = ScrollHandler.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n window.addEventListener(\"scroll\", this.scrollListener);\n var scrollPosition;\n var _this$props$location = this.props.location,\n key = _this$props$location.key,\n hash = _this$props$location.hash;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n\n if (scrollPosition) {\n this.windowScroll(scrollPosition, undefined);\n } else if (hash) {\n this.scrollToHash(decodeURI(hash), undefined);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.scrollListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props$location2 = this.props.location,\n hash = _this$props$location2.hash,\n key = _this$props$location2.key;\n var scrollPosition;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n /** There are two pieces of state: the browser url and\n * history state which keeps track of scroll position\n * Native behaviour prescribes that we ought to restore scroll position\n * when a user navigates back in their browser (this is the `POP` action)\n * Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228\n * So we _always_ stick to the url as a source of truth — if the url\n * contains a hash, we scroll to it\n */\n\n\n if (hash) {\n this.scrollToHash(decodeURI(hash), prevProps);\n } else {\n this.windowScroll(scrollPosition, prevProps);\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(ScrollContext.Provider, {\n value: this._stateStorage\n }, this.props.children);\n };\n\n return ScrollHandler;\n}(React.Component);\n\nexports.ScrollHandler = ScrollHandler;\nScrollHandler.propTypes = {\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired,\n location: _propTypes.default.object.isRequired\n};","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","/*!\n * domready (c) Dustin Diaz 2014 - License MIT\n * ie10 fix - Mikael Kristiansson 2019\n */\n!(function(name, definition) {\n if (typeof module != \"undefined\") module.exports = definition();\n else if (typeof define == \"function\" && typeof define.amd == \"object\")\n define(definition);\n else this[name] = definition();\n})(\"domready\", function() {\n var ie10 = false;\n if (navigator.appVersion.indexOf(\"MSIE 10\") !== -1) {\n ie10 = true;\n }\n\n var fns = [],\n listener,\n doc = typeof document === \"object\" && document,\n hack = ie10\n ? doc.documentElement.doScroll(\"left\")\n : doc.documentElement.doScroll,\n domContentLoaded = \"DOMContentLoaded\",\n loaded =\n doc && (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);\n\n if (!loaded && doc)\n doc.addEventListener(\n domContentLoaded,\n (listener = function() {\n doc.removeEventListener(domContentLoaded, listener);\n loaded = 1;\n while ((listener = fns.shift())) listener();\n })\n );\n\n return function(fn) {\n loaded ? setTimeout(fn, 0) : fns.push(fn);\n };\n});\n","// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\nexport default multiKeyStore;","/* eslint-disable import/prefer-default-export */\n// Global index counter to preserve source order.\n// We create the style sheet during the creation of the component,\n// children are handled after the parents, so the order of style elements would be parent->child.\n// It is a problem though when a parent passes a className\n// which needs to override any child's styles.\n// StyleSheet of the child has a higher specificity, because of the source order.\n// So our solution is to render sheets them in the reverse order child->sheet, so\n// that parent has a higher specificity.\nvar indexCounter = -1e9;\nexport function increment() {\n indexCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (indexCounter >= 0) {\n console.warn(['Material-UI: You might have a memory leak.', 'The indexCounter is not supposed to grow that much.'].join('\\n'));\n }\n }\n\n return indexCounter;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { deepmerge } from '@material-ui/utils';\nimport noopTheme from './noopTheme';\nexport default function getStylesCreator(stylesOrCreator) {\n var themingEnabled = typeof stylesOrCreator === 'function';\n\n if (process.env.NODE_ENV !== 'production') {\n if (_typeof(stylesOrCreator) !== 'object' && !themingEnabled) {\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You need to provide a function generating the styles or a styles object.'].join('\\n'));\n }\n }\n\n return {\n create: function create(theme, name) {\n var styles;\n\n try {\n styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n if (themingEnabled === true && theme === noopTheme) {\n // TODO: prepend error message/name instead\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n throw err;\n }\n\n if (!name || !theme.overrides || !theme.overrides[name]) {\n return styles;\n }\n\n var overrides = theme.overrides[name];\n\n var stylesWithOverrides = _extends({}, styles);\n\n Object.keys(overrides).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!stylesWithOverrides[key]) {\n console.warn(['Material-UI: You are trying to override a style that does not exist.', \"Fix the `\".concat(key, \"` key of `theme.overrides.\").concat(name, \"`.\")].join('\\n'));\n }\n }\n\n stylesWithOverrides[key] = deepmerge(stylesWithOverrides[key], overrides[key]);\n });\n return stylesWithOverrides;\n },\n options: {}\n };\n}","// We use the same empty object to ref count the styles that don't need a theme object.\nvar noopTheme = {};\nexport default noopTheme;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { getDynamicStyles } from 'jss';\nimport mergeClasses from '../mergeClasses';\nimport multiKeyStore from './multiKeyStore';\nimport useTheme from '../useTheme';\nimport { StylesContext } from '../StylesProvider';\nimport { increment } from './indexCounter';\nimport getStylesCreator from '../getStylesCreator';\nimport noopTheme from '../getStylesCreator/noopTheme';\n\nfunction getClasses(_ref, classes, Component) {\n var state = _ref.state,\n stylesOptions = _ref.stylesOptions;\n\n if (stylesOptions.disableGeneration) {\n return classes || {};\n }\n\n if (!state.cacheClasses) {\n state.cacheClasses = {\n // Cache for the finalized classes value.\n value: null,\n // Cache for the last used classes prop pointer.\n lastProp: null,\n // Cache for the last used rendered classes pointer.\n lastJSS: {}\n };\n } // Tracks if either the rendered classes or classes prop has changed,\n // requiring the generation of a new finalized classes object.\n\n\n var generate = false;\n\n if (state.classes !== state.cacheClasses.lastJSS) {\n state.cacheClasses.lastJSS = state.classes;\n generate = true;\n }\n\n if (classes !== state.cacheClasses.lastProp) {\n state.cacheClasses.lastProp = classes;\n generate = true;\n }\n\n if (generate) {\n state.cacheClasses.value = mergeClasses({\n baseClasses: state.cacheClasses.lastJSS,\n newClasses: classes,\n Component: Component\n });\n }\n\n return state.cacheClasses.value;\n}\n\nfunction attach(_ref2, props) {\n var state = _ref2.state,\n theme = _ref2.theme,\n stylesOptions = _ref2.stylesOptions,\n stylesCreator = _ref2.stylesCreator,\n name = _ref2.name;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n\n if (!sheetManager) {\n sheetManager = {\n refs: 0,\n staticSheet: null,\n dynamicStyles: null\n };\n multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);\n }\n\n var options = _extends({}, stylesCreator.options, stylesOptions, {\n theme: theme,\n flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'\n });\n\n options.generateId = options.serverGenerateClassName || options.generateClassName;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n var staticSheet;\n\n if (stylesOptions.sheetsCache) {\n staticSheet = multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme);\n }\n\n var styles = stylesCreator.create(theme, name);\n\n if (!staticSheet) {\n staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends({\n link: false\n }, options));\n staticSheet.attach();\n\n if (stylesOptions.sheetsCache) {\n multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);\n }\n }\n\n if (sheetsRegistry) {\n sheetsRegistry.add(staticSheet);\n }\n\n sheetManager.staticSheet = staticSheet;\n sheetManager.dynamicStyles = getDynamicStyles(styles);\n }\n\n if (sheetManager.dynamicStyles) {\n var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({\n link: true\n }, options));\n dynamicSheet.update(props);\n dynamicSheet.attach();\n state.dynamicSheet = dynamicSheet;\n state.classes = mergeClasses({\n baseClasses: sheetManager.staticSheet.classes,\n newClasses: dynamicSheet.classes\n });\n\n if (sheetsRegistry) {\n sheetsRegistry.add(dynamicSheet);\n }\n } else {\n state.classes = sheetManager.staticSheet.classes;\n }\n\n sheetManager.refs += 1;\n}\n\nfunction update(_ref3, props) {\n var state = _ref3.state;\n\n if (state.dynamicSheet) {\n state.dynamicSheet.update(props);\n }\n}\n\nfunction detach(_ref4) {\n var state = _ref4.state,\n theme = _ref4.theme,\n stylesOptions = _ref4.stylesOptions,\n stylesCreator = _ref4.stylesCreator;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n sheetManager.refs -= 1;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme);\n stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(sheetManager.staticSheet);\n }\n }\n\n if (state.dynamicSheet) {\n stylesOptions.jss.removeStyleSheet(state.dynamicSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(state.dynamicSheet);\n }\n }\n}\n\nfunction useSynchronousEffect(func, values) {\n var key = React.useRef([]);\n var output; // Store \"generation\" key. Just returns a new object every time\n\n var currentKey = React.useMemo(function () {\n return {};\n }, values); // eslint-disable-line react-hooks/exhaustive-deps\n // \"the first render\", or \"memo dropped the value\"\n\n if (key.current !== currentKey) {\n key.current = currentKey;\n output = func();\n }\n\n React.useEffect(function () {\n return function () {\n if (output) {\n output();\n }\n };\n }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps\n );\n}\n\nexport default function makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n classNamePrefixOption = options.classNamePrefix,\n Component = options.Component,\n _options$defaultTheme = options.defaultTheme,\n defaultTheme = _options$defaultTheme === void 0 ? noopTheme : _options$defaultTheme,\n stylesOptions2 = _objectWithoutProperties(options, [\"name\", \"classNamePrefix\", \"Component\", \"defaultTheme\"]);\n\n var stylesCreator = getStylesCreator(stylesOrCreator);\n var classNamePrefix = name || classNamePrefixOption || 'makeStyles';\n stylesCreator.options = {\n index: increment(),\n name: name,\n meta: classNamePrefix,\n classNamePrefix: classNamePrefix\n };\n\n var useStyles = function useStyles() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var theme = useTheme() || defaultTheme;\n\n var stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2);\n\n var instance = React.useRef();\n var shouldUpdate = React.useRef();\n useSynchronousEffect(function () {\n var current = {\n name: name,\n state: {},\n stylesCreator: stylesCreator,\n stylesOptions: stylesOptions,\n theme: theme\n };\n attach(current, props);\n shouldUpdate.current = false;\n instance.current = current;\n return function () {\n detach(current);\n };\n }, [theme, stylesCreator]);\n React.useEffect(function () {\n if (shouldUpdate.current) {\n update(instance.current, props);\n }\n\n shouldUpdate.current = true;\n });\n var classes = getClasses(instance.current, props.classes, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(classes);\n }\n\n return classes;\n };\n\n return useStyles;\n}","module.exports = false;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = useScrollRestoration;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _react = require(\"react\");\n\nvar _router = require(\"@reach/router\");\n\nfunction useScrollRestoration(identifier) {\n var location = (0, _router.useLocation)();\n var state = (0, _react.useContext)(_scrollHandler.ScrollContext);\n var ref = (0, _react.useRef)();\n (0, _react.useLayoutEffect)(function () {\n if (ref.current) {\n var position = state.read(location, identifier);\n ref.current.scrollTo(0, position || 0);\n }\n }, []);\n return {\n ref: ref,\n onScroll: function onScroll() {\n if (ref.current) {\n state.save(location, identifier, ref.current.scrollTop);\n }\n }\n };\n}","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @return string\n */\nvar _default = function _default(pathname, localizedManifests) {\n var defaultFilename = \"manifest.webmanifest\";\n\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n\n var localizedManifest = localizedManifests.find(function (app) {\n return pathname.startsWith(app.start_url);\n });\n\n if (!localizedManifest) {\n return defaultFilename;\n }\n\n return \"manifest_\" + localizedManifest.lang + \".webmanifest\";\n};\n\nexports.default = _default;","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\"use strict\";\n\nimport { getGlobal as shimsGetGlobal, strShimUndefined, strShimObject, strShimPrototype, strShimFunction } from \"@microsoft/applicationinsights-shims\";\n/**\r\n * This file exists to hold environment utilities that are requied to check and\r\n * validate the current operating environment. Unless otherwise required, please\r\n * only defined methods (functions) in this class so that users of these\r\n * functions/properties only need to include those that are used within their own modules.\r\n */\n\nexport var strUndefined = strShimUndefined;\nexport var strObject = strShimObject;\nexport var strPrototype = strShimPrototype;\nexport var strFunction = strShimFunction;\nvar strWindow = \"window\";\nvar strDocument = \"document\";\nvar strNavigator = \"navigator\";\nvar strHistory = \"history\";\nvar strLocation = \"location\";\nvar strConsole = \"console\";\nvar strPerformance = \"performance\";\nvar strJSON = \"JSON\";\nvar strCrypto = \"crypto\";\nvar strMsCrypto = \"msCrypto\";\nvar strReactNative = \"ReactNative\";\n/**\r\n * Returns the current global scope object, for a normal web page this will be the current\r\n * window, for a Web Worker this will be current worker global scope via \"self\". The internal\r\n * implementation returns the first available instance object in the following order\r\n * - globalThis (New standard)\r\n * - self (Will return the current window instance for supported browsers)\r\n * - window (fallback for older browser implementations)\r\n * - global (NodeJS standard)\r\n * - (When all else fails)\r\n * While the return type is a Window for the normal case, not all environments will support all\r\n * of the properties or functions.\r\n */\n\nexport var getGlobal = shimsGetGlobal;\n/**\r\n * Return the named global object if available, will return null if the object is not available.\r\n * @param name The globally named object\r\n */\n\nexport function getGlobalInst(name) {\n var gbl = getGlobal();\n\n if (gbl && gbl[name]) {\n return gbl[name];\n } // Test workaround, for environments where .window (when global == window) doesn't return the base window\n\n\n if (name === strWindow && hasWindow()) {\n // tslint:disable-next-line: no-angle-bracket-type-assertion\n return window;\n }\n\n return null;\n}\n/**\r\n * Checks if window object is available, this is required as we support the API running without a\r\n * window /document (eg. Node server, electron webworkers) and if we attempt to assign a window\r\n * object to a local variable or pass as an argument an \"Uncaught ReferenceError: window is not defined\"\r\n * exception will be thrown.\r\n * Defined as a function to support lazy / late binding environments.\r\n */\n\nexport function hasWindow() {\n return Boolean(typeof window === strObject && window);\n}\n/**\r\n * Returns the global window object if it is present otherwise null.\r\n * This helper is used to access the window object without causing an exception\r\n * \"Uncaught ReferenceError: window is not defined\"\r\n */\n\nexport function getWindow() {\n if (hasWindow()) {\n return window;\n } // Return the global instance or null\n\n\n return getGlobalInst(strWindow);\n}\n/**\r\n * Checks if document object is available, this is required as we support the API running without a\r\n * window /document (eg. Node server, electron webworkers) and if we attempt to assign a document\r\n * object to a local variable or pass as an argument an \"Uncaught ReferenceError: document is not defined\"\r\n * exception will be thrown.\r\n * Defined as a function to support lazy / late binding environments.\r\n */\n\nexport function hasDocument() {\n return Boolean(typeof document === strObject && document);\n}\n/**\r\n * Returns the global document object if it is present otherwise null.\r\n * This helper is used to access the document object without causing an exception\r\n * \"Uncaught ReferenceError: document is not defined\"\r\n */\n\nexport function getDocument() {\n if (hasDocument()) {\n return document;\n }\n\n return getGlobalInst(strDocument);\n}\n/**\r\n * Checks if navigator object is available, this is required as we support the API running without a\r\n * window /document (eg. Node server, electron webworkers) and if we attempt to assign a navigator\r\n * object to a local variable or pass as an argument an \"Uncaught ReferenceError: navigator is not defined\"\r\n * exception will be thrown.\r\n * Defined as a function to support lazy / late binding environments.\r\n */\n\nexport function hasNavigator() {\n return Boolean(typeof navigator === strObject && navigator);\n}\n/**\r\n * Returns the global navigator object if it is present otherwise null.\r\n * This helper is used to access the navigator object without causing an exception\r\n * \"Uncaught ReferenceError: navigator is not defined\"\r\n */\n\nexport function getNavigator() {\n if (hasNavigator()) {\n return navigator;\n }\n\n return getGlobalInst(strNavigator);\n}\n/**\r\n * Checks if history object is available, this is required as we support the API running without a\r\n * window /document (eg. Node server, electron webworkers) and if we attempt to assign a history\r\n * object to a local variable or pass as an argument an \"Uncaught ReferenceError: history is not defined\"\r\n * exception will be thrown.\r\n * Defined as a function to support lazy / late binding environments.\r\n */\n\nexport function hasHistory() {\n return Boolean(typeof history === strObject && history);\n}\n/**\r\n * Returns the global history object if it is present otherwise null.\r\n * This helper is used to access the history object without causing an exception\r\n * \"Uncaught ReferenceError: history is not defined\"\r\n */\n\nexport function getHistory() {\n if (hasHistory()) {\n return history;\n }\n\n return getGlobalInst(strHistory);\n}\n/**\r\n * Returns the global location object if it is present otherwise null.\r\n * This helper is used to access the location object without causing an exception\r\n * \"Uncaught ReferenceError: location is not defined\"\r\n */\n\nexport function getLocation() {\n if (typeof location === strObject && location) {\n return location;\n }\n\n return getGlobalInst(strLocation);\n}\n/**\r\n * Returns the global console object\r\n */\n\nexport function getConsole() {\n if (typeof console !== strUndefined) {\n return console;\n }\n\n return getGlobalInst(strConsole);\n}\n/**\r\n * Returns the performance object if it is present otherwise null.\r\n * This helper is used to access the performance object from the current\r\n * global instance which could be window or globalThis for a web worker\r\n */\n\nexport function getPerformance() {\n return getGlobalInst(strPerformance);\n}\n/**\r\n * Checks if JSON object is available, this is required as we support the API running without a\r\n * window /document (eg. Node server, electron webworkers) and if we attempt to assign a history\r\n * object to a local variable or pass as an argument an \"Uncaught ReferenceError: JSON is not defined\"\r\n * exception will be thrown.\r\n * Defined as a function to support lazy / late binding environments.\r\n */\n\nexport function hasJSON() {\n return Boolean(typeof JSON === strObject && JSON || getGlobalInst(strJSON) !== null);\n}\n/**\r\n * Returns the global JSON object if it is present otherwise null.\r\n * This helper is used to access the JSON object without causing an exception\r\n * \"Uncaught ReferenceError: JSON is not defined\"\r\n */\n\nexport function getJSON() {\n if (hasJSON()) {\n return JSON || getGlobalInst(strJSON);\n }\n\n return null;\n}\n/**\r\n * Returns the crypto object if it is present otherwise null.\r\n * This helper is used to access the crypto object from the current\r\n * global instance which could be window or globalThis for a web worker\r\n */\n\nexport function getCrypto() {\n return getGlobalInst(strCrypto);\n}\n/**\r\n * Returns the crypto object if it is present otherwise null.\r\n * This helper is used to access the crypto object from the current\r\n * global instance which could be window or globalThis for a web worker\r\n */\n\nexport function getMsCrypto() {\n return getGlobalInst(strMsCrypto);\n}\n/**\r\n * Returns whether the environment is reporting that we are running in a React Native Environment\r\n */\n\nexport function isReactNative() {\n // If running in React Native, navigator.product will be populated\n var nav = getNavigator();\n\n if (nav && nav.product) {\n return nav.product === strReactNative;\n }\n\n return false;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\"use strict\";\n\nimport { objCreateFn, strShimObject, strShimUndefined, strShimFunction, strShimPrototype } from \"@microsoft/applicationinsights-shims\";\nimport { getWindow, getDocument, getCrypto, getPerformance, getMsCrypto, getNavigator } from './EnvUtils'; // Added to help with minfication\n\nexport var Undefined = strShimUndefined;\nvar strOnPrefix = \"on\";\nvar strAttachEvent = \"attachEvent\";\nvar strAddEventHelper = \"addEventListener\";\nvar strDetachEvent = \"detachEvent\";\nvar strRemoveEventListener = \"removeEventListener\";\nvar UInt32Mask = 0x100000000;\nvar MaxUInt32 = 0xffffffff;\nvar _isTrident = null; // MWC based Random generator (for IE)\n\nvar _mwcSeeded = false;\nvar _mwcW = 123456789;\nvar _mwcZ = 987654321; // Takes any integer\n\nfunction _mwcSeed(seedValue) {\n if (seedValue < 0) {\n // Make sure we end up with a positive number and not -ve one.\n seedValue >>>= 0;\n }\n\n _mwcW = 123456789 + seedValue & MaxUInt32;\n _mwcZ = 987654321 - seedValue & MaxUInt32;\n _mwcSeeded = true;\n}\n\nfunction _autoSeedMwc() {\n // Simple initialization using default Math.random() - So we inherit any entropy from the browser\n // and bitwise XOR with the current milliseconds\n _mwcSeed(Math.random() * UInt32Mask ^ new Date().getTime());\n}\n\nfunction _isTypeof(value, theType) {\n return typeof value === theType;\n}\n\n;\n\nfunction _isUndefined(value) {\n return _isTypeof(value, strShimUndefined) || value === undefined;\n}\n\n;\n\nfunction _isNullOrUndefined(value) {\n return _isUndefined(value) || value === null;\n}\n\nfunction _hasOwnProperty(obj, prop) {\n return obj && Object[strShimPrototype].hasOwnProperty.call(obj, prop);\n}\n\n;\n\nfunction _isObject(value) {\n return _isTypeof(value, strShimObject);\n}\n\n;\n\nfunction _isFunction(value) {\n return _isTypeof(value, strShimFunction);\n}\n\n;\n/**\r\n * Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n * @param obj Object to add the event too.\r\n * @param eventNameWithoutOn String that specifies any of the standard DHTML Events without \"on\" prefix\r\n * @param handlerRef Pointer that specifies the function to call when event fires\r\n * @param useCapture [Optional] Defaults to false\r\n * @returns True if the function was bound successfully to the event, otherwise false\r\n */\n\nfunction _attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {\n if (useCapture === void 0) {\n useCapture = false;\n }\n\n var result = false;\n\n if (!_isNullOrUndefined(obj)) {\n try {\n if (!_isNullOrUndefined(obj[strAddEventHelper])) {\n // all browsers except IE before version 9\n obj[strAddEventHelper](eventNameWithoutOn, handlerRef, useCapture);\n result = true;\n } else if (!_isNullOrUndefined(obj[strAttachEvent])) {\n // IE before version 9 \n obj[strAttachEvent](strOnPrefix + eventNameWithoutOn, handlerRef);\n result = true;\n }\n } catch (e) {// Just Ignore any error so that we don't break any execution path\n }\n }\n\n return result;\n}\n/**\r\n * Removes an event handler for the specified event\r\n * @param Object to remove the event from\r\n * @param eventNameWithoutOn {string} - The name of the event\r\n * @param handlerRef {any} - The callback function that needs to be executed for the given event\r\n * @param useCapture [Optional] Defaults to false\r\n */\n\n\nfunction _detachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {\n if (useCapture === void 0) {\n useCapture = false;\n }\n\n if (!_isNullOrUndefined(obj)) {\n try {\n if (!_isNullOrUndefined(obj[strRemoveEventListener])) {\n obj[strRemoveEventListener](eventNameWithoutOn, handlerRef, useCapture);\n } else if (!_isNullOrUndefined(obj[strDetachEvent])) {\n obj[strDetachEvent](strOnPrefix + eventNameWithoutOn, handlerRef);\n }\n } catch (e) {// Just Ignore any error so that we don't break any execution path\n }\n }\n}\n/**\r\n * Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with\r\n * existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded\r\n * and executed in an ES3 container, providing basic IE8 compatibility.\r\n * @param target The object on which to define the property.\r\n * @param prop The name of the property to be defined or modified.\r\n * @param getProp The getter function to wire against the getter.\r\n * @param setProp The setter function to wire against the setter.\r\n * @returns True if it was able to create the accessors otherwise false\r\n */\n\n\nexport function objDefineAccessors(target, prop, getProp, setProp) {\n var defineProp = Object[\"defineProperty\"];\n\n if (defineProp) {\n try {\n var descriptor = {\n enumerable: true,\n configurable: true\n };\n\n if (getProp) {\n descriptor.get = getProp;\n }\n\n if (setProp) {\n descriptor.set = setProp;\n }\n\n defineProp(target, prop, descriptor);\n return true;\n } catch (e) {// IE8 Defines a defineProperty on Object but it's only supported for DOM elements so it will throw\n // We will just ignore this here.\n }\n }\n\n return false;\n}\n/**\r\n * Validates that the string name conforms to the JS IdentifierName specification and if not\r\n * normalizes the name so that it would. This method does not identify or change any keywords\r\n * meaning that if you pass in a known keyword the same value will be returned.\r\n * This is a simplified version\r\n * @param name The name to validate\r\n */\n\nexport function normalizeJsName(name) {\n var value = name;\n var match = /([^\\w\\d_$])/g;\n\n if (match.test(name)) {\n value = name.replace(match, \"_\");\n }\n\n return value;\n}\n/**\r\n * This is a helper function for the equivalent of arForEach(objKeys(target), callbackFn), this is a\r\n * performance optimization to avoid the creation of a new array for large objects\r\n * @param target The target object to find and process the keys\r\n * @param callbackfn The function to call with the details\r\n */\n\nexport function objForEachKey(target, callbackfn) {\n if (target && _isObject(target)) {\n for (var prop in target) {\n if (_hasOwnProperty(target, prop)) {\n callbackfn.call(target, prop, target[prop]);\n }\n }\n }\n}\n/**\r\n * Effectively assigns all enumerable properties (not just own properties) and functions (including inherited prototype) from\r\n * the source object to the target, it attempts to use proxy getters / setters (if possible) and proxy functions to avoid potential\r\n * implementation issues by assigning prototype functions as instance ones\r\n *\r\n * This method is the primary method used to \"update\" the snippet proxy with the ultimate implementations.\r\n *\r\n * Special ES3 Notes:\r\n * Updates (setting) of direct property values on the target or indirectly on the source object WILL NOT WORK PROPERLY, updates to the\r\n * properties of \"referenced\" object will work (target.context.newValue = 10 => will be reflected in the source.context as it's the\r\n * same object). ES3 Failures: assigning target.myProp = 3 -> Won't change source.myProp = 3, likewise the reverse would also fail.\r\n * @param target - The target object to be assigned with the source properties and functions\r\n * @param source - The source object which will be assigned / called by setting / calling the targets proxies\r\n * @param chkSet - An optional callback to determine whether a specific property/function should be proxied\r\n * @memberof Initialization\r\n */\n\nexport function proxyAssign(target, source, chkSet) {\n if (target && source && target !== source && _isObject(target) && _isObject(source)) {\n var _loop_1 = function _loop_1(field) {\n if (CoreUtils.isString(field)) {\n var value = source[field];\n\n if (_isFunction(value)) {\n if (!chkSet || chkSet(field, true, source, target)) {\n // Create a proxy function rather than just copying the (possible) prototype to the new object as an instance function\n target[field] = function (funcName) {\n return function () {\n // Capture the original arguments passed to the method\n var originalArguments = arguments;\n return source[funcName].apply(source, originalArguments);\n };\n }(field);\n }\n } else if (!chkSet || chkSet(field, false, source, target)) {\n if (_hasOwnProperty(target, field)) {\n // Remove any previous instance property\n delete target[field];\n }\n\n if (!objDefineAccessors(target, field, function () {\n return source[field];\n }, function (theValue) {\n source[field] = theValue;\n })) {\n // Unable to create an accessor, so just assign the values as a fallback\n // -- this will (mostly) work for objects\n // -- but will fail for accessing primitives (if the source changes it) and all types of \"setters\" as the source won't be modified\n target[field] = value;\n }\n }\n }\n }; // effectively apply/proxy full source to the target instance\n\n\n for (var field in source) {\n _loop_1(field);\n }\n }\n\n return target;\n}\n\nvar CoreUtils =\n/** @class */\nfunction () {\n function CoreUtils() {}\n /**\r\n * Check if an object is of type Date\r\n */\n\n\n CoreUtils.isDate = function (obj) {\n return Object[strShimPrototype].toString.call(obj) === \"[object Date]\";\n };\n /**\r\n * Check if an object is of type Array\r\n */\n\n\n CoreUtils.isArray = function (obj) {\n return Object[strShimPrototype].toString.call(obj) === \"[object Array]\";\n };\n /**\r\n * Check if an object is of type Error\r\n */\n\n\n CoreUtils.isError = function (obj) {\n return Object[strShimPrototype].toString.call(obj) === \"[object Error]\";\n };\n /**\r\n * Checks if the type of value is a string.\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a string, false otherwise.\r\n */\n\n\n CoreUtils.isString = function (value) {\n return _isTypeof(value, \"string\");\n };\n /**\r\n * Checks if the type of value is a number.\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a number, false otherwise.\r\n */\n\n\n CoreUtils.isNumber = function (value) {\n return _isTypeof(value, \"number\");\n };\n /**\r\n * Checks if the type of value is a boolean.\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a boolean, false otherwise.\r\n */\n\n\n CoreUtils.isBoolean = function (value) {\n return _isTypeof(value, \"boolean\");\n };\n /**\r\n * Creates a new GUID.\r\n * @return {string} A GUID.\r\n */\n\n\n CoreUtils.disableCookies = function () {\n CoreUtils._canUseCookies = false;\n };\n\n CoreUtils.newGuid = function () {\n function randomHexDigit() {\n return CoreUtils.randomValue(15); // Get a random value from 0..15\n }\n\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(GuidRegex, function (c) {\n var r = randomHexDigit() | 0,\n v = c === 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n };\n /**\r\n * Convert a date to I.S.O. format in IE8\r\n */\n\n\n CoreUtils.toISOString = function (date) {\n if (CoreUtils.isDate(date)) {\n var pad = function pad(num) {\n var r = String(num);\n\n if (r.length === 1) {\n r = \"0\" + r;\n }\n\n return r;\n };\n\n return date.getUTCFullYear() + \"-\" + pad(date.getUTCMonth() + 1) + \"-\" + pad(date.getUTCDate()) + \"T\" + pad(date.getUTCHours()) + \":\" + pad(date.getUTCMinutes()) + \":\" + pad(date.getUTCSeconds()) + \".\" + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5) + \"Z\";\n }\n };\n /**\r\n * Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers\r\n * that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype\r\n * implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would\r\n * cause a testing requirement to test with and without the implementations\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.\r\n * @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\n\n\n CoreUtils.arrForEach = function (arr, callbackfn, thisArg) {\n var len = arr.length;\n\n for (var idx = 0; idx < len; idx++) {\n if (idx in arr) {\n callbackfn.call(thisArg || arr, arr[idx], idx, arr);\n }\n }\n };\n /**\r\n * Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers\r\n * that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype\r\n * implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would\r\n * cause a testing requirement to test with and without the implementations\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.\r\n */\n\n\n CoreUtils.arrIndexOf = function (arr, searchElement, fromIndex) {\n var len = arr.length;\n var from = fromIndex || 0;\n\n for (var lp = Math.max(from >= 0 ? from : len - Math.abs(from), 0); lp < len; lp++) {\n if (lp in arr && arr[lp] === searchElement) {\n return lp;\n }\n }\n\n return -1;\n };\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists\r\n * to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page\r\n * checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx\r\n * implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\n\n\n CoreUtils.arrMap = function (arr, callbackfn, thisArg) {\n var len = arr.length;\n\n var _this = thisArg || arr;\n\n var results = new Array(len);\n\n for (var lp = 0; lp < len; lp++) {\n if (lp in arr) {\n results[lp] = callbackfn.call(_this, arr[lp], arr);\n }\n }\n\n return results;\n };\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is\r\n * provided as an argument in the next call to the callback function. This helper exists to avoid adding a polyfil for older browsers that do not define\r\n * Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency\r\n * this will not use the Array.prototype.xxxx implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\n\n\n CoreUtils.arrReduce = function (arr, callbackfn, initialValue) {\n var len = arr.length;\n var lp = 0;\n var value; // Specifically checking the number of passed arguments as the value could be anything\n\n if (arguments.length >= 3) {\n value = arguments[2];\n } else {\n while (lp < len && !(lp in arr)) {\n lp++;\n }\n\n value = arr[lp++];\n }\n\n while (lp < len) {\n if (lp in arr) {\n value = callbackfn(value, arr[lp], lp, arr);\n }\n\n lp++;\n }\n\n return value;\n };\n /**\r\n * helper method to trim strings (IE8 does not implement String.prototype.trim)\r\n */\n\n\n CoreUtils.strTrim = function (str) {\n if (!CoreUtils.isString(str)) {\n return str;\n }\n\n return str.replace(/^\\s+|\\s+$/g, \"\");\n };\n /**\r\n * Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers\r\n * that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.\r\n * Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.\r\n */\n\n\n CoreUtils.objKeys = function (obj) {\n var hasDontEnumBug = !{\n toString: null\n }.propertyIsEnumerable('toString');\n\n if (!_isFunction(obj) && (!_isObject(obj) || obj === null)) {\n throw new TypeError('objKeys called on non-object');\n }\n\n var result = [];\n\n for (var prop in obj) {\n if (_hasOwnProperty(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n var dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'];\n var dontEnumsLength = dontEnums.length;\n\n for (var lp = 0; lp < dontEnumsLength; lp++) {\n if (_hasOwnProperty(obj, dontEnums[lp])) {\n result.push(dontEnums[lp]);\n }\n }\n }\n\n return result;\n };\n /**\r\n * Trys to add an event handler for the specified event to the window, body and document\r\n * @param eventName {string} - The name of the event\r\n * @param callback {any} - The callback function that needs to be executed for the given event\r\n * @return {boolean} - true if the handler was successfully added\r\n */\n\n\n CoreUtils.addEventHandler = function (eventName, callback) {\n var result = false;\n var w = getWindow();\n\n if (w) {\n result = _attachEvent(w, eventName, callback);\n result = _attachEvent(w[\"body\"], eventName, callback) || result;\n }\n\n var doc = getDocument();\n\n if (doc) {\n result = EventHelper.Attach(doc, eventName, callback) || result;\n }\n\n return result;\n };\n /**\r\n * Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)\r\n * https://caniuse.com/#search=Date.now\r\n */\n\n\n CoreUtils.dateNow = function () {\n var dt = Date;\n\n if (dt.now) {\n return dt.now();\n }\n\n return new dt().getTime();\n };\n /**\r\n * Return the current value of the Performance Api now() function (if available) and fallback to CoreUtils.dateNow() if it is unavailable (IE9 or less)\r\n * https://caniuse.com/#search=performance.now\r\n */\n\n\n CoreUtils.perfNow = function () {\n var perf = getPerformance();\n\n if (perf && perf.now) {\n return perf.now();\n }\n\n return CoreUtils.dateNow();\n };\n /**\r\n * Generate random base64 id string.\r\n * The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)\r\n * @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22\r\n */\n\n\n CoreUtils.newId = function (maxLength) {\n if (maxLength === void 0) {\n maxLength = 22;\n }\n\n var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Start with an initial random number, consuming the value in reverse byte order\n\n var number = CoreUtils.random32() >>> 0; // Make sure it's a +ve number\n\n var chars = 0;\n var result = \"\";\n\n while (result.length < maxLength) {\n chars++;\n result += base64chars.charAt(number & 0x3F);\n number >>>= 6; // Zero fill with right shift\n\n if (chars === 5) {\n // 5 base64 characters === 30 bits so we don't have enough bits for another base64 char\n // So add on another 30 bits and make sure it's +ve\n number = (CoreUtils.random32() << 2 & 0xFFFFFFFF | number & 0x03) >>> 0;\n chars = 0; // We need to reset the number every 5 chars (30 bits)\n }\n }\n\n return result;\n };\n /**\r\n * Identifies whether the current environment appears to be IE\r\n */\n\n\n CoreUtils.isIE = function () {\n if (_isTrident === null) {\n var navigator_1 = getNavigator() || {};\n var userAgent = (navigator_1.userAgent || \"\").toLowerCase();\n _isTrident = userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident/\") !== -1;\n }\n\n return _isTrident;\n };\n /**\r\n * Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum.\r\n * So maxValue(16) will produce a number from 0..16 (range of 17)\r\n * @param maxValue\r\n */\n\n\n CoreUtils.randomValue = function (maxValue) {\n if (maxValue > 0) {\n return Math.floor(CoreUtils.random32() / MaxUInt32 * (maxValue + 1)) >>> 0;\n }\n\n return 0;\n };\n /**\r\n * generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\n\n\n CoreUtils.random32 = function (signed) {\n var value;\n var c = getCrypto() || getMsCrypto();\n\n if (c && c.getRandomValues) {\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\n value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;\n } else if (CoreUtils.isIE()) {\n // For IE 6, 7, 8 (especially on XP) Math.random is not very random\n if (!_mwcSeeded) {\n // Set the seed for the Mwc algorithm\n _autoSeedMwc();\n } // Don't use Math.random for IE\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\n\n\n value = CoreUtils.mwcRandom32() & MaxUInt32;\n } else {\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\n value = Math.floor(UInt32Mask * Math.random() | 0);\n }\n\n if (!signed) {\n // Make sure we end up with a positive number and not -ve one.\n value >>>= 0;\n }\n\n return value;\n };\n /**\r\n * Seed the MWC random number generator with the specified seed or a random value\r\n * @param value - optional the number to used as the seed, if undefined, null or zero a random value will be chosen\r\n */\n\n\n CoreUtils.mwcRandomSeed = function (value) {\n if (!value) {\n _autoSeedMwc();\n } else {\n _mwcSeed(value);\n }\n };\n /**\r\n * Generate a random 32-bit number between (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), using MWC (Multiply with carry)\r\n * instead of Math.random() defaults to un-signed.\r\n * Used as a replacement random generator for IE to avoid issues with older IE instances.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\n\n\n CoreUtils.mwcRandom32 = function (signed) {\n _mwcZ = 36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16) & MaxUInt32;\n _mwcW = 18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16) & MaxUInt32;\n var value = (_mwcZ << 16) + (_mwcW & 0xFFFF) >>> 0 & MaxUInt32 | 0;\n\n if (!signed) {\n // Make sure we end up with a positive number and not -ve one.\n value >>>= 0;\n }\n\n return value;\n };\n /**\r\n * generate W3C trace id\r\n */\n\n\n CoreUtils.generateW3CId = function () {\n var hexValues = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]; // rfc4122 version 4 UUID without dashes and with lowercase letters\n\n var oct = \"\",\n tmp;\n\n for (var a = 0; a < 4; a++) {\n tmp = CoreUtils.random32();\n oct += hexValues[tmp & 0xF] + hexValues[tmp >> 4 & 0xF] + hexValues[tmp >> 8 & 0xF] + hexValues[tmp >> 12 & 0xF] + hexValues[tmp >> 16 & 0xF] + hexValues[tmp >> 20 & 0xF] + hexValues[tmp >> 24 & 0xF] + hexValues[tmp >> 28 & 0xF];\n } // \"Set the two most significant bits (bits 6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively\"\n\n\n var clockSequenceHi = hexValues[8 + (CoreUtils.random32() & 0x03) | 0];\n return oct.substr(0, 8) + oct.substr(9, 4) + \"4\" + oct.substr(13, 3) + clockSequenceHi + oct.substr(16, 3) + oct.substr(19, 12);\n };\n\n CoreUtils.isTypeof = _isTypeof;\n CoreUtils.isUndefined = _isUndefined;\n CoreUtils.isNullOrUndefined = _isNullOrUndefined;\n CoreUtils.hasOwnProperty = _hasOwnProperty;\n /**\r\n * Checks if the passed of value is a function.\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a boolean, false otherwise.\r\n */\n\n CoreUtils.isFunction = _isFunction;\n /**\r\n * Checks if the passed of value is a function.\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a boolean, false otherwise.\r\n */\n\n CoreUtils.isObject = _isObject;\n /**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil\r\n * for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.\r\n * Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @param obj Object to use as a prototype. May be null\r\n */\n // tslint:disable-next-line: member-ordering\n\n CoreUtils.objCreate = objCreateFn;\n /**\r\n * Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with\r\n * existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded\r\n * and executed in an ES3 container, providing basic IE8 compatibility.\r\n * @param target The object on which to define the property.\r\n * @param prop The name of the property to be defined or modified.\r\n * @param getProp The getter function to wire against the getter.\r\n * @param setProp The setter function to wire against the setter.\r\n * @returns True if it was able to create the accessors otherwise false\r\n */\n\n CoreUtils.objDefineAccessors = objDefineAccessors;\n return CoreUtils;\n}();\n\nexport { CoreUtils };\nvar GuidRegex = /[xy]/g;\n\nvar EventHelper =\n/** @class */\nfunction () {\n function EventHelper() {}\n /**\r\n * Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n * @param obj Object to add the event too.\r\n * @param eventNameWithoutOn String that specifies any of the standard DHTML Events without \"on\" prefix\r\n * @param handlerRef Pointer that specifies the function to call when event fires\r\n * @returns True if the function was bound successfully to the event, otherwise false\r\n */\n\n\n EventHelper.Attach = _attachEvent;\n /**\r\n * Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n * @deprecated Use {@link EventHelper#Attach} as we are already in a class call EventHelper the extra \"Event\" just causes a larger result\r\n * @param obj Object to add the event too.\r\n * @param eventNameWithoutOn String that specifies any of the standard DHTML Events without \"on\" prefix\r\n * @param handlerRef Pointer that specifies the function to call when event fires\r\n * @returns True if the function was bound successfully to the event, otherwise false\r\n */\n\n EventHelper.AttachEvent = _attachEvent;\n /**\r\n * Removes an event handler for the specified event\r\n * @param eventName {string} - The name of the event\r\n * @param callback {any} - The callback function that needs to be executed for the given event\r\n * @return {boolean} - true if the handler was successfully added\r\n */\n\n EventHelper.Detach = _detachEvent;\n /**\r\n * Removes an event handler for the specified event\r\n * @deprecated Use {@link EventHelper#Detach} as we are already in a class call EventHelper the extra \"Event\" just causes a larger result\r\n * @param eventName {string} - The name of the event\r\n * @param callback {any} - The callback function that needs to be executed for the given event\r\n * @return {boolean} - true if the handler was successfully added\r\n */\n\n EventHelper.DetachEvent = _detachEvent;\n return EventHelper;\n}();\n\nexport { EventHelper };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nexport var LoggingSeverity;\n\n(function (LoggingSeverity) {\n /**\r\n * Error will be sent as internal telemetry\r\n */\n LoggingSeverity[LoggingSeverity[\"CRITICAL\"] = 1] = \"CRITICAL\";\n /**\r\n * Error will NOT be sent as internal telemetry, and will only be shown in browser console\r\n */\n\n LoggingSeverity[LoggingSeverity[\"WARNING\"] = 2] = \"WARNING\";\n})(LoggingSeverity || (LoggingSeverity = {}));\n/**\r\n * Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered\r\n */\n\n\nexport var _InternalMessageId = {\n // Non user actionable\n BrowserDoesNotSupportLocalStorage: 0,\n BrowserCannotReadLocalStorage: 1,\n BrowserCannotReadSessionStorage: 2,\n BrowserCannotWriteLocalStorage: 3,\n BrowserCannotWriteSessionStorage: 4,\n BrowserFailedRemovalFromLocalStorage: 5,\n BrowserFailedRemovalFromSessionStorage: 6,\n CannotSendEmptyTelemetry: 7,\n ClientPerformanceMathError: 8,\n ErrorParsingAISessionCookie: 9,\n ErrorPVCalc: 10,\n ExceptionWhileLoggingError: 11,\n FailedAddingTelemetryToBuffer: 12,\n FailedMonitorAjaxAbort: 13,\n FailedMonitorAjaxDur: 14,\n FailedMonitorAjaxOpen: 15,\n FailedMonitorAjaxRSC: 16,\n FailedMonitorAjaxSend: 17,\n FailedMonitorAjaxGetCorrelationHeader: 18,\n FailedToAddHandlerForOnBeforeUnload: 19,\n FailedToSendQueuedTelemetry: 20,\n FailedToReportDataLoss: 21,\n FlushFailed: 22,\n MessageLimitPerPVExceeded: 23,\n MissingRequiredFieldSpecification: 24,\n NavigationTimingNotSupported: 25,\n OnError: 26,\n SessionRenewalDateIsZero: 27,\n SenderNotInitialized: 28,\n StartTrackEventFailed: 29,\n StopTrackEventFailed: 30,\n StartTrackFailed: 31,\n StopTrackFailed: 32,\n TelemetrySampledAndNotSent: 33,\n TrackEventFailed: 34,\n TrackExceptionFailed: 35,\n TrackMetricFailed: 36,\n TrackPVFailed: 37,\n TrackPVFailedCalc: 38,\n TrackTraceFailed: 39,\n TransmissionFailed: 40,\n FailedToSetStorageBuffer: 41,\n FailedToRestoreStorageBuffer: 42,\n InvalidBackendResponse: 43,\n FailedToFixDepricatedValues: 44,\n InvalidDurationValue: 45,\n TelemetryEnvelopeInvalid: 46,\n CreateEnvelopeError: 47,\n // User actionable\n CannotSerializeObject: 48,\n CannotSerializeObjectNonSerializable: 49,\n CircularReferenceDetected: 50,\n ClearAuthContextFailed: 51,\n ExceptionTruncated: 52,\n IllegalCharsInName: 53,\n ItemNotInArray: 54,\n MaxAjaxPerPVExceeded: 55,\n MessageTruncated: 56,\n NameTooLong: 57,\n SampleRateOutOfRange: 58,\n SetAuthContextFailed: 59,\n SetAuthContextFailedAccountName: 60,\n StringValueTooLong: 61,\n StartCalledMoreThanOnce: 62,\n StopCalledWithoutStart: 63,\n TelemetryInitializerFailed: 64,\n TrackArgumentsNotSpecified: 65,\n UrlTooLong: 66,\n SessionStorageBufferFull: 67,\n CannotAccessCookie: 68,\n IdTooLong: 69,\n InvalidEvent: 70,\n FailedMonitorAjaxSetRequestHeader: 71,\n SendBrowserInfoOnUserInit: 72,\n PluginException: 73,\n NotificationException: 74,\n SnippetScriptLoadFailure: 99,\n InvalidInstrumentationKey: 100,\n CannotParseAiBlobValue: 101,\n InvalidContentBlob: 102,\n TrackPageActionEventFailed: 103\n};","/*!\n * Microsoft Dynamic Proto Utility, 1.1.0\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\nvar Constructor = 'constructor';\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\n\nvar Prototype = 'prototype';\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\n\nvar strFunction = 'function';\n/**\r\n * Used to define the name of the instance function lookup table\r\n * @ignore\r\n */\n\nvar DynInstFuncTable = '_dynInstFuncs';\n/**\r\n * Name used to tag the dynamic prototype function\r\n * @ignore\r\n */\n\nvar DynProxyTag = '_isDynProxy';\n/**\r\n * Name added to a prototype to define the dynamic prototype \"class\" name used to lookup the function table\r\n * @ignore\r\n */\n\nvar DynClassName = '_dynClass';\n/**\r\n * Prefix added to the classname to avoid any name clashes with other instance level properties\r\n * @ignore\r\n */\n\nvar DynClassNamePrefix = '_dynCls$';\n/**\r\n * A tag which is used to check if we have already to attempted to set the instance function if one is not present\r\n * @ignore\r\n */\n\nvar DynInstChkTag = '_dynInstChk';\n/**\r\n * A tag which is used to check if we are allows to try and set an instance function is one is not present. Using the same\r\n * tag name as the function level but a different const name for readability only.\r\n */\n\nvar DynAllowInstChkTag = DynInstChkTag;\n/**\r\n * The global (imported) instances where the global performance options are stored\r\n */\n\nvar DynProtoDefaultOptions = '_dfOpts';\n/**\r\n * Value used as the name of a class when it cannot be determined\r\n * @ignore\r\n */\n\nvar UnknownValue = '_unknown_';\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\n\nvar str__Proto = \"__proto__\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\n\nvar strUseBaseInst = 'useBaseInst';\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\n\nvar strSetInstFuncs = 'setInstFuncs';\n/**\r\n * Pre-lookup to check if we are running on a modern browser (i.e. not IE8)\r\n * @ignore\r\n */\n\nvar _objGetPrototypeOf = Object[\"getPrototypeOf\"];\n/**\r\n * Internal Global used to generate a unique dynamic class name, every new class will increase this value\r\n * @ignore\r\n */\n\nvar _dynamicNames = 0;\n/**\r\n * Helper to check if the object contains a property of the name\r\n * @ignore\r\n */\n\nfunction _hasOwnProperty(obj, prop) {\n return obj && Object[Prototype].hasOwnProperty.call(obj, prop);\n}\n/**\r\n * Checks if the passed of value is a function.\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a boolean, false otherwise.\r\n * @ignore\r\n */\n\n\nfunction _isFunction(value) {\n return typeof value === strFunction;\n}\n/**\r\n * Helper used to check whether the target is an Object prototype or Array prototype\r\n * @ignore\r\n */\n\n\nfunction _isObjectOrArrayPrototype(target) {\n return target && (target === Object[Prototype] || target === Array[Prototype]);\n}\n/**\r\n * Helper used to check whether the target is an Object prototype, Array prototype or Function prototype\r\n * @ignore\r\n */\n\n\nfunction _isObjectArrayOrFunctionPrototype(target) {\n return _isObjectOrArrayPrototype(target) || target === Function[Prototype];\n}\n/**\r\n * Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.\r\n * @ignore\r\n */\n\n\nfunction _getObjProto(target) {\n if (target) {\n // This method doesn't existing in older browsers (e.g. IE8)\n if (_objGetPrototypeOf) {\n return _objGetPrototypeOf(target);\n } // target[Constructor] May break if the constructor has been changed or removed\n\n\n var newProto = target[str__Proto] || target[Prototype] || target[Constructor];\n\n if (newProto) {\n return newProto;\n }\n }\n\n return null;\n}\n/**\r\n * Helper function to check whether the provided function name is a potential candidate for dynamic\r\n * callback and prototype generation.\r\n * @param target The target object, may be a prototype or class object\r\n * @param funcName The function name\r\n * @param skipOwn Skips the check for own property\r\n * @ignore\r\n */\n\n\nfunction _isDynamicCandidate(target, funcName, skipOwn) {\n return funcName !== Constructor && _isFunction(target[funcName]) && (skipOwn || _hasOwnProperty(target, funcName));\n}\n/**\r\n * Helper to throw a TypeError exception\r\n * @param message the message\r\n * @ignore\r\n */\n\n\nfunction _throwTypeError(message) {\n throw new TypeError(\"DynamicProto: \" + message);\n}\n/**\r\n * Returns a collection of the instance functions that are defined directly on the thisTarget object, it does\r\n * not return any inherited functions\r\n * @param thisTarget The object to get the instance functions from\r\n * @ignore\r\n */\n\n\nfunction _getInstanceFuncs(thisTarget) {\n // Get the base proto\n var instFuncs = {}; // Save any existing instance functions\n\n for (var name in thisTarget) {\n // Don't include any dynamic prototype instances - as we only want the real functions\n if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {\n // Create an instance callback for passing the base function to the caller\n instFuncs[name] = thisTarget[name];\n }\n }\n\n return instFuncs;\n}\n/**\r\n * Returns whether the value is included in the array\r\n * @param values The array of values\r\n * @param value The value\r\n */\n\n\nfunction _hasVisited(values, value) {\n for (var lp = values.length - 1; lp >= 0; lp--) {\n if (values[lp] === value) {\n return true;\n }\n }\n\n return false;\n}\n/**\r\n * Returns an object that contains callback functions for all \"base/super\" functions, this is used to \"save\"\r\n * enabling calling super.xxx() functions without requiring that the base \"class\" has defined a prototype references\r\n * @param target The current instance\r\n * @ignore\r\n */\n\n\nfunction _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {\n function _instFuncProxy(target, funcHost, funcName) {\n var theFunc = funcHost[name];\n\n if (theFunc[DynProxyTag] && useBaseInst) {\n // grab and reuse the hosted looking function (if available) otherwise the original passed function\n var instFuncTable = target[DynInstFuncTable] || {};\n\n if (instFuncTable[DynAllowInstChkTag] !== false) {\n theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;\n }\n }\n\n return function () {\n return theFunc.apply(target, arguments);\n };\n } // Start creating a new baseFuncs by creating proxies for the instance functions (as they may get replaced)\n\n\n var baseFuncs = {};\n\n for (var name in instFuncs) {\n // Create an instance callback for passing the base function to the caller\n baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);\n } // Get the base prototype functions\n\n\n var baseProto = _getObjProto(classProto);\n\n var visited = []; // Don't include base object functions for Object, Array or Function\n\n while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {\n // look for prototype functions\n for (var name in baseProto) {\n // Don't include any dynamic prototype instances - as we only want the real functions\n // For IE 7/8 the prototype lookup doesn't provide the full chain so we need to bypass the \n // hasOwnProperty check we get all of the methods, main difference is that IE7/8 doesn't return\n // the Object prototype methods while bypassing the check\n if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {\n // Create an instance callback for passing the base function to the caller\n baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);\n }\n } // We need to find all possible functions that might be overloaded by walking the entire prototype chain\n // This avoids the caller from needing to check whether it's direct base class implements the function or not\n // by walking the entire chain it simplifies the usage and issues from upgrading any of the base classes.\n\n\n visited.push(baseProto);\n baseProto = _getObjProto(baseProto);\n }\n\n return baseFuncs;\n}\n\nfunction _getInstFunc(target, funcName, proto, currentDynProtoProxy) {\n var instFunc = null; // We need to check whether the class name is defined directly on this prototype otherwise\n // it will walk the proto chain and return any parent proto classname.\n\n if (target && _hasOwnProperty(proto, DynClassName)) {\n var instFuncTable = target[DynInstFuncTable] || {};\n instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];\n\n if (!instFunc) {\n // Avoid stack overflow from recursive calling the same function\n _throwTypeError(\"Missing [\" + funcName + \"] \" + strFunction);\n } // We have the instance function, lets check it we can speed up further calls\n // by adding the instance function back directly on the instance (avoiding the dynamic func lookup)\n\n\n if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {\n // If the instance already has an instance function we can't replace it\n var canAddInst = !_hasOwnProperty(target, funcName); // Get current prototype\n\n var objProto = _getObjProto(target);\n\n var visited = []; // Lookup the function starting at the top (instance level prototype) and traverse down, if the first matching function\n // if nothing is found or if the first hit is a dynamic proto instance then we can safely add an instance shortcut\n\n while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {\n var protoFunc = objProto[funcName];\n\n if (protoFunc) {\n canAddInst = protoFunc === currentDynProtoProxy;\n break;\n } // We need to find all possible initial functions to ensure that we don't bypass a valid override function\n\n\n visited.push(objProto);\n objProto = _getObjProto(objProto);\n }\n\n try {\n if (canAddInst) {\n // This instance doesn't have an instance func and the class hierarchy does have a higher level prototype version\n // so it's safe to directly assign for any subsequent calls (for better performance)\n target[funcName] = instFunc;\n } // Block further attempts to set the instance function for any\n\n\n instFunc[DynInstChkTag] = 1;\n } catch (e) {\n // Don't crash if the object is readonly or the runtime doesn't allow changing this\n // And set a flag so we don't try again for any function\n instFuncTable[DynAllowInstChkTag] = false;\n }\n }\n }\n\n return instFunc;\n}\n\nfunction _getProtoFunc(funcName, proto, currentDynProtoProxy) {\n var protoFunc = proto[funcName]; // Check that the prototype function is not a self reference -- try to avoid stack overflow!\n\n if (protoFunc === currentDynProtoProxy) {\n // It is so lookup the base prototype\n protoFunc = _getObjProto(proto)[funcName];\n }\n\n if (!_isFunction(protoFunc)) {\n _throwTypeError(\"[\" + funcName + \"] is not a \" + strFunction);\n }\n\n return protoFunc;\n}\n/**\r\n * Add the required dynamic prototype methods to the the class prototype\r\n * @param proto - The class prototype\r\n * @param className - The instance classname\r\n * @param target - The target instance\r\n * @param baseInstFuncs - The base instance functions\r\n * @param setInstanceFunc - Flag to allow prototype function to reset the instance function if one does not exist\r\n * @ignore\r\n */\n\n\nfunction _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {\n function _createDynamicPrototype(proto, funcName) {\n var dynProtoProxy = function dynProtoProxy() {\n // Use the instance or prototype function\n var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);\n\n return instFunc.apply(this, arguments);\n }; // Tag this function as a proxy to support replacing dynamic proxy elements (primary use case is for unit testing\n // via which can dynamically replace the prototype function reference)\n\n\n dynProtoProxy[DynProxyTag] = 1;\n return dynProtoProxy;\n }\n\n if (!_isObjectOrArrayPrototype(proto)) {\n var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};\n var instFuncs = instFuncTable[className] = instFuncTable[className] || {}; // fetch and assign if as it may not exist yet\n // Set whether we are allow to lookup instances, if someone has set to false then do not re-enable\n\n if (instFuncTable[DynAllowInstChkTag] !== false) {\n instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;\n }\n\n for (var name in target) {\n // Only add overridden functions\n if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {\n // Save the instance Function to the lookup table and remove it from the instance as it's not a dynamic proto function\n instFuncs[name] = target[name];\n delete target[name]; // Add a dynamic proto if one doesn't exist or if a prototype function exists and it's not a dynamic one\n\n if (!_hasOwnProperty(proto, name) || proto[name] && !proto[name][DynProxyTag]) {\n proto[name] = _createDynamicPrototype(proto, name);\n }\n }\n }\n }\n}\n/**\r\n * Checks whether the passed prototype object appears to be correct by walking the prototype hierarchy of the instance\r\n * @param classProto The class prototype instance\r\n * @param thisTarget The current instance that will be checked whether the passed prototype instance is in the hierarchy\r\n * @ignore\r\n */\n\n\nfunction _checkPrototype(classProto, thisTarget) {\n var thisProto = _getObjProto(thisTarget);\n\n while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto)) {\n if (thisProto === classProto) {\n return true;\n }\n\n thisProto = _getObjProto(thisProto);\n }\n\n return false;\n}\n/**\r\n * Gets the current prototype name using the ES6 name if available otherwise falling back to a use unknown as the name.\r\n * It's not critical for this to return a name, it's used to decorate the generated unique name for easier debugging only.\r\n * @param target\r\n * @param unknownValue\r\n * @ignore\r\n */\n\n\nfunction _getObjName(target, unknownValue) {\n if (_hasOwnProperty(target, Prototype)) {\n // Look like a prototype\n return target.name || unknownValue || UnknownValue;\n }\n\n return ((target || {})[Constructor] || {}).name || unknownValue || UnknownValue;\n}\n/**\r\n * Helper function when creating dynamic (inline) functions for classes, this helper performs the following tasks :-\r\n * - Saves references to all defined base class functions\r\n * - Calls the delegateFunc with the current target (this) and a base object reference that can be used to call all \"super\" functions.\r\n * - Will populate the class prototype for all overridden functions to support class extension that call the prototype instance.\r\n * Callers should use this helper when declaring all function within the constructor of a class, as mentioned above the delegateFunc is\r\n * passed both the target \"this\" and an object that can be used to call any base (super) functions, using this based object in place of\r\n * super.XXX() (which gets expanded to _super.prototype.XXX()) provides a better minification outcome and also ensures the correct \"this\"\r\n * context is maintained as TypeScript creates incorrect references using super.XXXX() for dynamically defined functions i.e. Functions\r\n * defined in the constructor or some other function (rather than declared as complete typescript functions).\r\n * ### Usage\r\n * ```typescript\r\n * import dynamicProto from \"@microsoft/dynamicproto-js\";\r\n * class ExampleClass extends BaseClass {\r\n * constructor() {\r\n * dynamicProto(ExampleClass, this, (_self, base) => {\r\n * // This will define a function that will be converted to a prototype function\r\n * _self.newFunc = () => {\r\n * // Access any \"this\" instance property\r\n * if (_self.someProperty) {\r\n * ...\r\n * }\r\n * }\r\n * // This will define a function that will be converted to a prototype function\r\n * _self.myFunction = () => {\r\n * // Access any \"this\" instance property\r\n * if (_self.someProperty) {\r\n * // Call the base version of the function that we are overriding\r\n * base.myFunction();\r\n * }\r\n * ...\r\n * }\r\n * _self.initialize = () => {\r\n * ...\r\n * }\r\n * // Warnings: While the following will work as _self is simply a reference to\r\n * // this, if anyone overrides myFunction() the overridden will be called first\r\n * // as the normal JavaScript method resolution will occur and the defined\r\n * // _self.initialize() function is actually gets removed from the instance and\r\n * // a proxy prototype version is created to reference the created method.\r\n * _self.initialize();\r\n * });\r\n * }\r\n * }\r\n * ```\r\n * @typeparam DPType This is the generic type of the class, used to keep intellisense valid\r\n * @typeparam DPCls The type that contains the prototype of the current class\r\n * @param theClass - This is the current class instance which contains the prototype for the current class\r\n * @param target - The current \"this\" (target) reference, when the class has been extended this.prototype will not be the 'theClass' value.\r\n * @param delegateFunc - The callback function (closure) that will create the dynamic function\r\n * @param options - Additional options to configure how the dynamic prototype operates\r\n */\n\n\nfunction dynamicProto(theClass, target, delegateFunc, options) {\n // Make sure that the passed theClass argument looks correct\n if (!_hasOwnProperty(theClass, Prototype)) {\n _throwTypeError(\"theClass is an invalid class definition.\");\n } // Quick check to make sure that the passed theClass argument looks correct (this is a common copy/paste error)\n\n\n var classProto = theClass[Prototype];\n\n if (!_checkPrototype(classProto, target)) {\n _throwTypeError(\"[\" + _getObjName(theClass) + \"] is not in class hierarchy of [\" + _getObjName(target) + \"]\");\n }\n\n var className = null;\n\n if (_hasOwnProperty(classProto, DynClassName)) {\n // Only grab the class name if it's defined on this prototype (i.e. don't walk the prototype chain)\n className = classProto[DynClassName];\n } else {\n // As not all browser support name on the prototype creating a unique dynamic one if we have not already\n // assigned one, so we can use a simple string as the lookup rather than an object for the dynamic instance\n // function table lookup.\n className = DynClassNamePrefix + _getObjName(theClass, \"_\") + \"$\" + _dynamicNames;\n _dynamicNames++;\n classProto[DynClassName] = className;\n }\n\n var perfOptions = dynamicProto[DynProtoDefaultOptions];\n var useBaseInst = !!perfOptions[strUseBaseInst];\n\n if (useBaseInst && options && options[strUseBaseInst] !== undefined) {\n useBaseInst = !!options[strUseBaseInst];\n } // Get the current instance functions\n\n\n var instFuncs = _getInstanceFuncs(target); // Get all of the functions for any base instance (before they are potentially overridden)\n\n\n var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst); // Execute the delegate passing in both the current target \"this\" and \"base\" function references\n // Note casting the same type as we don't actually have the base class here and this will provide some intellisense support\n\n\n delegateFunc(target, baseFuncs); // Don't allow setting instance functions for older IE instances\n\n var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];\n\n if (setInstanceFunc && options) {\n setInstanceFunc = !!options[strSetInstFuncs];\n } // Populate the Prototype for any overridden instance functions\n\n\n _populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);\n}\n/**\r\n * Exposes the default global options to allow global configuration, if the global values are disabled these will override\r\n * any passed values. This is primarily exposed to support unit-testing without the need for individual classes to expose\r\n * their internal usage of dynamic proto.\r\n */\n\n\nvar perfDefaults = {\n setInstFuncs: true,\n useBaseInst: true\n}; // And expose for testing\n\ndynamicProto[DynProtoDefaultOptions] = perfDefaults;\nexport default dynamicProto;","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\"use strict\";\n\nimport { _InternalMessageId, LoggingSeverity } from \"../JavaScriptSDK.Enums/LoggingEnums\";\nimport { CoreUtils } from \"./CoreUtils\";\nimport { hasJSON, getJSON, getConsole } from \"./EnvUtils\";\nimport dynamicProto from '@microsoft/dynamicproto-js';\n/**\r\n * For user non actionable traces use AI Internal prefix.\r\n */\n\nvar AiNonUserActionablePrefix = \"AI (Internal): \";\n/**\r\n * Prefix of the traces in portal.\r\n */\n\nvar AiUserActionablePrefix = \"AI: \";\n/**\r\n * Session storage key for the prefix for the key indicating message type already logged\r\n */\n\nvar AIInternalMessagePrefix = \"AITR_\";\n\nfunction _sanitizeDiagnosticText(text) {\n if (text) {\n return \"\\\"\" + text.replace(/\\\"/g, \"\") + \"\\\"\";\n }\n\n return \"\";\n}\n\nvar _InternalLogMessage =\n/** @class */\nfunction () {\n function _InternalLogMessage(msgId, msg, isUserAct, properties) {\n if (isUserAct === void 0) {\n isUserAct = false;\n }\n\n var _self = this;\n\n _self.messageId = msgId;\n _self.message = (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) + msgId;\n var strProps = \"\";\n\n if (hasJSON()) {\n strProps = getJSON().stringify(properties);\n }\n\n var diagnosticText = (msg ? \" message:\" + _sanitizeDiagnosticText(msg) : \"\") + (properties ? \" props:\" + _sanitizeDiagnosticText(strProps) : \"\");\n _self.message += diagnosticText;\n }\n\n _InternalLogMessage.dataType = \"MessageData\";\n return _InternalLogMessage;\n}();\n\nexport { _InternalLogMessage };\n\nvar DiagnosticLogger =\n/** @class */\nfunction () {\n function DiagnosticLogger(config) {\n this.identifier = 'DiagnosticLogger';\n /**\r\n * The internal logging queue\r\n */\n\n this.queue = [];\n /**\r\n * Count of internal messages sent\r\n */\n\n var _messageCount = 0;\n /**\r\n * Holds information about what message types were already logged to console or sent to server.\r\n */\n\n var _messageLogged = {};\n dynamicProto(DiagnosticLogger, this, function (_self) {\n var isNullOrUndefined = CoreUtils.isNullOrUndefined;\n var isUndefined = CoreUtils.isUndefined;\n var isFunction = CoreUtils.isFunction;\n\n if (isNullOrUndefined(config)) {\n config = {};\n }\n\n _self.consoleLoggingLevel = function () {\n return _getConfigValue('loggingLevelConsole', 0);\n };\n\n _self.telemetryLoggingLevel = function () {\n return _getConfigValue('loggingLevelTelemetry', 1);\n };\n\n _self.maxInternalMessageLimit = function () {\n return _getConfigValue('maxMessageLimit', 25);\n };\n\n _self.enableDebugExceptions = function () {\n return _getConfigValue('enableDebugExceptions', false);\n };\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The log message.\r\n */\n\n\n _self.throwInternal = function (severity, msgId, msg, properties, isUserAct) {\n if (isUserAct === void 0) {\n isUserAct = false;\n }\n\n var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);\n\n if (_self.enableDebugExceptions()) {\n throw message;\n } else {\n if (!isUndefined(message) && !!message) {\n if (!isUndefined(message.message)) {\n if (isUserAct) {\n // check if this message type was already logged to console for this page view and if so, don't log it again\n var messageKey = +message.messageId;\n\n if (!_messageLogged[messageKey] && _self.consoleLoggingLevel() >= LoggingSeverity.WARNING) {\n _self.warnToConsole(message.message);\n\n _messageLogged[messageKey] = true;\n }\n } else {\n // don't log internal AI traces in the console, unless the verbose logging is enabled\n if (_self.consoleLoggingLevel() >= LoggingSeverity.WARNING) {\n _self.warnToConsole(message.message);\n }\n }\n\n _self.logInternalMessage(severity, message);\n }\n }\n }\n };\n /**\r\n * This will write a warning to the console if possible\r\n * @param message {string} - The warning message\r\n */\n\n\n _self.warnToConsole = function (message) {\n var theConsole = getConsole();\n\n if (!!theConsole) {\n var logFunc = 'log';\n\n if (theConsole.warn) {\n logFunc = 'warn';\n }\n\n if (isFunction(theConsole[logFunc])) {\n theConsole[logFunc](message);\n }\n }\n };\n /**\r\n * Resets the internal message count\r\n */\n\n\n _self.resetInternalMessageCount = function () {\n _messageCount = 0;\n _messageLogged = {};\n };\n /**\r\n * Logs a message to the internal queue.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The message to log.\r\n */\n\n\n _self.logInternalMessage = function (severity, message) {\n if (_areInternalMessagesThrottled()) {\n return;\n } // check if this message type was already logged for this session and if so, don't log it again\n\n\n var logMessage = true;\n var messageKey = AIInternalMessagePrefix + message.messageId; // if the session storage is not available, limit to only one message type per page view\n\n if (_messageLogged[messageKey]) {\n logMessage = false;\n } else {\n _messageLogged[messageKey] = true;\n }\n\n if (logMessage) {\n // Push the event in the internal queue\n if (severity <= _self.telemetryLoggingLevel()) {\n _self.queue.push(message);\n\n _messageCount++;\n } // When throttle limit reached, send a special event\n\n\n if (_messageCount === _self.maxInternalMessageLimit()) {\n var throttleLimitMessage = \"Internal events throttle limit per PageView reached for this app.\";\n var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);\n\n _self.queue.push(throttleMessage);\n\n _self.warnToConsole(throttleLimitMessage);\n }\n }\n };\n\n function _getConfigValue(name, defValue) {\n var value = config[name];\n\n if (!isNullOrUndefined(value)) {\n return value;\n }\n\n return defValue;\n }\n\n function _areInternalMessagesThrottled() {\n return _messageCount >= _self.maxInternalMessageLimit();\n }\n });\n }\n /**\r\n * When this is true the SDK will throw exceptions to aid in debugging.\r\n */\n\n\n DiagnosticLogger.prototype.enableDebugExceptions = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return false;\n };\n /**\r\n * 0: OFF (default)\r\n * 1: CRITICAL\r\n * 2: >= WARNING\r\n */\n\n\n DiagnosticLogger.prototype.consoleLoggingLevel = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return 0;\n };\n /**\r\n * 0: OFF\r\n * 1: CRITICAL (default)\r\n * 2: >= WARNING\r\n */\n\n\n DiagnosticLogger.prototype.telemetryLoggingLevel = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return 1;\n };\n /**\r\n * The maximum number of internal messages allowed to be sent per page view\r\n */\n\n\n DiagnosticLogger.prototype.maxInternalMessageLimit = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return 25;\n };\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The log message.\r\n */\n\n\n DiagnosticLogger.prototype.throwInternal = function (severity, msgId, msg, properties, isUserAct) {\n if (isUserAct === void 0) {\n isUserAct = false;\n } // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n\n };\n /**\r\n * This will write a warning to the console if possible\r\n * @param message {string} - The warning message\r\n */\n\n\n DiagnosticLogger.prototype.warnToConsole = function (message) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Resets the internal message count\r\n */\n\n\n DiagnosticLogger.prototype.resetInternalMessageCount = function () {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Logs a message to the internal queue.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The message to log.\r\n */\n\n\n DiagnosticLogger.prototype.logInternalMessage = function (severity, message) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n\n return DiagnosticLogger;\n}();\n\nexport { DiagnosticLogger };","import dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { CoreUtils } from \"./CoreUtils\";\nvar strExecutionContextKey = \"ctx\";\n\nvar PerfEvent =\n/** @class */\nfunction () {\n function PerfEvent(name, payloadDetails, isAsync) {\n var _self = this;\n\n var accessorDefined = false;\n _self.start = CoreUtils.dateNow();\n _self.name = name;\n _self.isAsync = isAsync;\n\n _self.isChildEvt = function () {\n return false;\n };\n\n if (CoreUtils.isFunction(payloadDetails)) {\n // Create an accessor to minimize the potential performance impact of executing the payloadDetails callback\n var theDetails_1;\n accessorDefined = CoreUtils.objDefineAccessors(_self, 'payload', function () {\n // Delay the execution of the payloadDetails until needed\n if (!theDetails_1 && CoreUtils.isFunction(payloadDetails)) {\n theDetails_1 = payloadDetails(); // clear it out now so the referenced objects can be garbage collected\n\n payloadDetails = null;\n }\n\n return theDetails_1;\n });\n }\n\n _self.getCtx = function (key) {\n if (key) {\n // The parent and child links are located directly on the object (for better viewing in the DebugPlugin)\n if (key === PerfEvent.ParentContextKey || key === PerfEvent.ChildrenContextKey) {\n return _self[key];\n }\n\n return (_self[strExecutionContextKey] || {})[key];\n }\n\n return null;\n };\n\n _self.setCtx = function (key, value) {\n if (key) {\n // Put the parent and child links directly on the object (for better viewing in the DebugPlugin)\n if (key === PerfEvent.ParentContextKey) {\n // Simple assumption, if we are setting a parent then we must be a child\n if (!_self[key]) {\n _self.isChildEvt = function () {\n return true;\n };\n }\n\n _self[key] = value;\n } else if (key === PerfEvent.ChildrenContextKey) {\n _self[key] = value;\n } else {\n var ctx = _self[strExecutionContextKey] = _self[strExecutionContextKey] || {};\n ctx[key] = value;\n }\n }\n };\n\n _self.complete = function () {\n var childTime = 0;\n\n var childEvts = _self.getCtx(PerfEvent.ChildrenContextKey);\n\n if (CoreUtils.isArray(childEvts)) {\n for (var lp = 0; lp < childEvts.length; lp++) {\n var childEvt = childEvts[lp];\n\n if (childEvt) {\n childTime += childEvt.time;\n }\n }\n }\n\n _self.time = CoreUtils.dateNow() - _self.start;\n _self.exTime = _self.time - childTime;\n\n _self.complete = function () {};\n\n if (!accessorDefined && CoreUtils.isFunction(payloadDetails)) {\n // If we couldn't define the property set during complete -- to minimize the perf impact until after the time\n _self.payload = payloadDetails();\n }\n };\n }\n\n PerfEvent.ParentContextKey = \"parent\";\n PerfEvent.ChildrenContextKey = \"childEvts\";\n return PerfEvent;\n}();\n\nexport { PerfEvent };\n\nvar PerfManager =\n/** @class */\nfunction () {\n function PerfManager(manager) {\n /**\r\n * General bucket used for execution context set and retrieved via setCtx() and getCtx.\r\n * Defined as private so it can be visualized via the DebugPlugin\r\n */\n this.ctx = {};\n dynamicProto(PerfManager, this, function (_self) {\n _self.create = function (src, payloadDetails, isAsync) {\n // TODO (@MSNev): at some point we will want to add additional configuration to \"select\" which events to instrument\n // for now this is just a simple do everything.\n return new PerfEvent(src, payloadDetails, isAsync);\n };\n\n _self.fire = function (perfEvent) {\n if (perfEvent) {\n perfEvent.complete();\n\n if (manager) {\n manager.perfEvent(perfEvent);\n }\n }\n };\n\n _self.setCtx = function (key, value) {\n if (key) {\n var ctx = _self[strExecutionContextKey] = _self[strExecutionContextKey] || {};\n ctx[key] = value;\n }\n };\n\n _self.getCtx = function (key) {\n return (_self[strExecutionContextKey] || {})[key];\n };\n });\n }\n /**\r\n * Create a new event and start timing, the manager may return null/undefined to indicate that it does not\r\n * want to monitor this source event.\r\n * @param src The source name of the event\r\n * @param payloadDetails - An optional callback function to fetch the payload details for the event.\r\n * @param isAsync - Is the event occurring from a async event\r\n */\n\n\n PerfManager.prototype.create = function (src, payload, isAsync) {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return null;\n };\n /**\r\n * Complete the perfEvent and fire any notifications.\r\n * @param perfEvent Fire the event which will also complete the passed event\r\n */\n\n\n PerfManager.prototype.fire = function (perfEvent) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Set an execution context value\r\n * @param key - The context key name\r\n * @param value - The value\r\n */\n\n\n PerfManager.prototype.setCtx = function (key, value) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Get the execution context value\r\n * @param key - The context key\r\n */\n\n\n PerfManager.prototype.getCtx = function (key) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n\n return PerfManager;\n}();\n\nexport { PerfManager };\nvar doPerfActiveKey = \"CoreUtils.doPerf\";\n/**\r\n * Helper function to wrap a function with a perf event\r\n * @param mgrSource - The Performance Manager or a Performance provider source (may be null)\r\n * @param getSource - The callback to create the source name for the event (if perf monitoring is enabled)\r\n * @param func - The function to call and measure\r\n * @param details - A function to return the payload details\r\n * @param isAsync - Is the event / function being call asynchronously or synchronously\r\n */\n\nexport function doPerf(mgrSource, getSource, func, details, isAsync) {\n if (mgrSource) {\n var perfMgr = mgrSource;\n\n if (perfMgr && CoreUtils.isFunction(perfMgr[\"getPerfMgr\"])) {\n // Looks like a perf manager provider object\n perfMgr = perfMgr[\"getPerfMgr\"]();\n }\n\n if (perfMgr) {\n var perfEvt = void 0;\n var currentActive = perfMgr.getCtx(doPerfActiveKey);\n\n try {\n perfEvt = perfMgr.create(getSource(), details, isAsync);\n\n if (perfEvt) {\n if (currentActive && perfEvt.setCtx) {\n perfEvt.setCtx(PerfEvent.ParentContextKey, currentActive);\n\n if (currentActive.getCtx && currentActive.setCtx) {\n var children = currentActive.getCtx(PerfEvent.ChildrenContextKey);\n\n if (!children) {\n children = [];\n currentActive.setCtx(PerfEvent.ChildrenContextKey, children);\n }\n\n children.push(perfEvt);\n }\n } // Set this event as the active event now\n\n\n perfMgr.setCtx(doPerfActiveKey, perfEvt);\n return func(perfEvt);\n }\n } catch (ex) {\n if (perfEvt && perfEvt.setCtx) {\n perfEvt.setCtx(\"exception\", ex);\n }\n } finally {\n // fire the perf event\n if (perfEvt) {\n perfMgr.fire(perfEvt);\n } // Reset the active event to the previous value\n\n\n perfMgr.setCtx(doPerfActiveKey, currentActive);\n }\n }\n }\n\n return func();\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\"use strict\";\n\nimport { CoreUtils } from \"./CoreUtils\";\nimport { doPerf } from \"./PerfManager\";\nimport { LoggingSeverity, _InternalMessageId } from '../JavaScriptSDK.Enums/LoggingEnums';\nvar _isFunction = CoreUtils.isFunction;\n\nvar TelemetryPluginChain =\n/** @class */\nfunction () {\n function TelemetryPluginChain(plugin, defItemCtx) {\n var _self = this;\n\n var _nextProxy = null;\n\n var _hasProcessTelemetry = _isFunction(plugin.processTelemetry);\n\n var _hasSetNext = _isFunction(plugin.setNextPlugin);\n\n _self._hasRun = false;\n\n _self.getPlugin = function () {\n return plugin;\n };\n\n _self.getNext = function () {\n return _nextProxy;\n };\n\n _self.setNext = function (nextPlugin) {\n _nextProxy = nextPlugin;\n };\n\n _self.processTelemetry = function (env, itemCtx) {\n if (!itemCtx) {\n // Looks like a plugin didn't pass the (optional) context, so restore to the default\n itemCtx = defItemCtx;\n }\n\n var identifier = plugin ? plugin.identifier : \"TelemetryPluginChain\";\n doPerf(itemCtx ? itemCtx.core() : null, function () {\n return identifier + \":processTelemetry\";\n }, function () {\n if (plugin && _hasProcessTelemetry) {\n _self._hasRun = true;\n\n try {\n // Ensure that we keep the context in sync (for processNext()), just in case a plugin\n // doesn't calls processTelemetry() instead of itemContext.processNext() or some \n // other form of error occurred\n itemCtx.setNext(_nextProxy);\n\n if (_hasSetNext) {\n // Backward compatibility setting the next plugin on the instance\n plugin.setNextPlugin(_nextProxy);\n } // Set a flag on the next plugin so we know if it was attempted to be executed\n\n\n _nextProxy && (_nextProxy._hasRun = false);\n plugin.processTelemetry(env, itemCtx);\n } catch (error) {\n var hasRun = _nextProxy && _nextProxy._hasRun;\n\n if (!_nextProxy || !hasRun) {\n // Either we have no next plugin or the current one did not attempt to call the next plugin\n // Which means the current one is the root of the failure so log/report this failure\n itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.PluginException, \"Plugin [\" + plugin.identifier + \"] failed during processTelemetry - \" + error);\n }\n\n if (_nextProxy && !hasRun) {\n // As part of the failure the current plugin did not attempt to call the next plugin in the cahin\n // So rather than leave the pipeline dead in the water we call the next plugin\n _nextProxy.processTelemetry(env, itemCtx);\n }\n }\n } else if (_nextProxy) {\n _self._hasRun = true; // The underlying plugin is either not defined or does not have a processTelemetry implementation\n // so we still want the next plugin to be executed.\n\n _nextProxy.processTelemetry(env, itemCtx);\n }\n }, function () {\n return {\n item: env\n };\n }, !env.sync);\n };\n }\n\n return TelemetryPluginChain;\n}();\n\nexport { TelemetryPluginChain };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\"use strict\";\n\nimport { CoreUtils } from \"./CoreUtils\";\nimport { DiagnosticLogger } from \"./DiagnosticLogger\";\nimport { TelemetryPluginChain } from \"./TelemetryPluginChain\";\nvar _isNullOrUndefined = CoreUtils.isNullOrUndefined;\n/**\r\n * Creates the instance execution chain for the plugins\r\n */\n\nfunction _createProxyChain(plugins, itemCtx) {\n var proxies = [];\n\n if (plugins && plugins.length > 0) {\n // Create the proxies and wire up the next plugin chain\n var lastProxy = null;\n\n for (var idx = 0; idx < plugins.length; idx++) {\n var thePlugin = plugins[idx];\n\n if (thePlugin && CoreUtils.isFunction(thePlugin.processTelemetry)) {\n // Only add plugins that are processors\n var newProxy = new TelemetryPluginChain(thePlugin, itemCtx);\n proxies.push(newProxy);\n\n if (lastProxy) {\n // Set this new proxy as the next for the previous one\n lastProxy.setNext(newProxy);\n }\n\n lastProxy = newProxy;\n }\n }\n }\n\n return proxies.length > 0 ? proxies[0] : null;\n}\n\nfunction _copyProxyChain(proxy, itemCtx, startAt) {\n var plugins = [];\n var add = startAt ? false : true;\n\n if (proxy) {\n while (proxy) {\n var thePlugin = proxy.getPlugin();\n\n if (add || thePlugin === startAt) {\n add = true;\n plugins.push(thePlugin);\n }\n\n proxy = proxy.getNext();\n }\n }\n\n if (!add) {\n plugins.push(startAt);\n }\n\n return _createProxyChain(plugins, itemCtx);\n}\n\nfunction _copyPluginChain(srcPlugins, itemCtx, startAt) {\n var plugins = srcPlugins;\n var add = false;\n\n if (startAt && srcPlugins) {\n plugins = [];\n CoreUtils.arrForEach(srcPlugins, function (thePlugin) {\n if (add || thePlugin === startAt) {\n add = true;\n plugins.push(thePlugin);\n }\n });\n }\n\n if (startAt && !add) {\n if (!plugins) {\n plugins = [];\n }\n\n plugins.push(startAt);\n }\n\n return _createProxyChain(plugins, itemCtx);\n}\n\nvar ProcessTelemetryContext =\n/** @class */\nfunction () {\n /**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n */\n function ProcessTelemetryContext(plugins, config, core, startAt) {\n var _self = this;\n\n var _nextProxy = null; // Null == No next plugin\n // There is no next element (null) vs not defined (undefined)\n\n if (startAt !== null) {\n if (plugins && CoreUtils.isFunction(plugins.getPlugin)) {\n // We have a proxy chain object\n _nextProxy = _copyProxyChain(plugins, _self, startAt || plugins.getPlugin());\n } else {\n // We just have an array\n if (startAt) {\n _nextProxy = _copyPluginChain(plugins, _self, startAt);\n } else if (CoreUtils.isUndefined(startAt)) {\n // Undefined means copy the existing chain\n _nextProxy = _createProxyChain(plugins, _self);\n }\n }\n }\n\n _self.core = function () {\n return core;\n };\n\n _self.diagLog = function () {\n var logger = (core || {}).logger;\n\n if (!logger) {\n // Fallback so we always have a logger\n logger = new DiagnosticLogger(config || {});\n }\n\n return logger;\n };\n\n _self.getCfg = function () {\n return config;\n };\n\n _self.getExtCfg = function (identifier, defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = {};\n }\n\n var theConfig;\n\n if (config) {\n var extConfig = config.extensionConfig;\n\n if (extConfig && identifier) {\n theConfig = extConfig[identifier];\n }\n }\n\n return theConfig ? theConfig : defaultValue;\n };\n\n _self.getConfig = function (identifier, field, defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = false;\n }\n\n var theValue;\n\n var extConfig = _self.getExtCfg(identifier, null);\n\n if (extConfig && !_isNullOrUndefined(extConfig[field])) {\n theValue = extConfig[field];\n } else if (config && !_isNullOrUndefined(config[field])) {\n theValue = config[field];\n }\n\n return !_isNullOrUndefined(theValue) ? theValue : defaultValue;\n };\n\n _self.hasNext = function () {\n return _nextProxy != null;\n };\n\n _self.getNext = function () {\n return _nextProxy;\n };\n\n _self.setNext = function (nextPlugin) {\n _nextProxy = nextPlugin;\n };\n\n _self.processNext = function (env) {\n var nextPlugin = _nextProxy;\n\n if (nextPlugin) {\n // Automatically move to the next plugin\n _nextProxy = nextPlugin.getNext();\n nextPlugin.processTelemetry(env, _self);\n }\n };\n\n _self.createNew = function (plugins, startAt) {\n if (plugins === void 0) {\n plugins = null;\n }\n\n return new ProcessTelemetryContext(plugins || _nextProxy, config, core, startAt);\n };\n }\n\n return ProcessTelemetryContext;\n}();\n\nexport { ProcessTelemetryContext };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\"use strict\";\n\nimport { CoreUtils } from \"./CoreUtils\";\nimport { ProcessTelemetryContext } from './ProcessTelemetryContext';\nvar _isFunction = CoreUtils.isFunction;\nvar getPlugin = \"getPlugin\";\n/**\r\n * BaseTelemetryPlugin provides a basic implementation of the ITelemetryPlugin interface so that plugins\r\n * can avoid implementation the same set of boiler plate code as well as provide a base\r\n * implementation so that new default implementations can be added without breaking all plugins.\r\n */\n\nvar BaseTelemetryPlugin =\n/** @class */\nfunction () {\n function BaseTelemetryPlugin() {\n var _self = this;\n\n var _isinitialized = false;\n var _rootCtx = null; // Used as the root context, holding the current config and initialized core\n\n var _nextPlugin = null; // Used for backward compatibility where plugins don't call the main pipeline\n\n _self.core = null;\n\n _self.diagLog = function (itemCtx) {\n return _self._getTelCtx(itemCtx).diagLog();\n };\n\n _self.isInitialized = function () {\n return _isinitialized;\n };\n\n _self.setInitialized = function (isInitialized) {\n _isinitialized = isInitialized;\n }; // _self.getNextPlugin = () => DO NOT IMPLEMENT\n // Sub-classes of this base class *should* not be relying on this value and instead\n // should use processNext() function. If you require access to the plugin use the\n // IProcessTelemetryContext.getNext().getPlugin() while in the pipeline, Note getNext() may return null.\n\n\n _self.setNextPlugin = function (next) {\n _nextPlugin = next;\n };\n\n _self.processNext = function (env, itemCtx) {\n if (itemCtx) {\n // Normal core execution sequence\n itemCtx.processNext(env);\n } else if (_nextPlugin && _isFunction(_nextPlugin.processTelemetry)) {\n // Looks like backward compatibility or out of band processing. And as it looks \n // like a ITelemetryPlugin or ITelemetryPluginChain, just call processTelemetry\n _nextPlugin.processTelemetry(env, null);\n }\n };\n\n _self._getTelCtx = function (currentCtx) {\n if (currentCtx === void 0) {\n currentCtx = null;\n }\n\n var itemCtx = currentCtx;\n\n if (!itemCtx) {\n var rootCtx = _rootCtx || new ProcessTelemetryContext(null, {}, _self.core); // tslint:disable-next-line: prefer-conditional-expression\n\n if (_nextPlugin && _nextPlugin[getPlugin]) {\n // Looks like a chain object\n itemCtx = rootCtx.createNew(null, _nextPlugin[getPlugin]);\n } else {\n itemCtx = rootCtx.createNew(null, _nextPlugin);\n }\n }\n\n return itemCtx;\n };\n\n _self._baseTelInit = function (config, core, extensions, pluginChain) {\n if (config) {\n // Make sure the extensionConfig exists\n config.extensionConfig = config.extensionConfig || [];\n }\n\n if (!pluginChain && core) {\n // Get the first plugin from the core\n pluginChain = core.getProcessTelContext().getNext();\n }\n\n var nextPlugin = _nextPlugin;\n\n if (_nextPlugin && _nextPlugin[getPlugin]) {\n // If it looks like a proxy/chain then get the plugin\n nextPlugin = _nextPlugin[getPlugin]();\n } // Support legacy plugins where core was defined as a property\n\n\n _self.core = core;\n _rootCtx = new ProcessTelemetryContext(pluginChain, config, core, nextPlugin);\n _isinitialized = true;\n };\n }\n\n BaseTelemetryPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\n this._baseTelInit(config, core, extensions, pluginChain);\n };\n\n return BaseTelemetryPlugin;\n}();\n\nexport { BaseTelemetryPlugin };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\"use strict\";\n\nimport { CoreUtils } from \"./CoreUtils\";\nvar _isFunction = CoreUtils.isFunction;\nvar processTelemetry = \"processTelemetry\";\nvar priority = \"priority\";\nvar setNextPlugin = \"setNextPlugin\";\nvar isInitialized = \"isInitialized\";\n/**\r\n * Initialize the queue of plugins\r\n * @param plugins - The array of plugins to initialize and setting of the next plugin\r\n * @param config The current config for the instance\r\n * @param core THe current core instance\r\n * @param extensions The extensions\r\n */\n\nexport function initializePlugins(processContext, extensions) {\n // Set the next plugin and identified the uninitialized plugins\n var initPlugins = [];\n var lastPlugin = null;\n var proxy = processContext.getNext();\n\n while (proxy) {\n var thePlugin = proxy.getPlugin();\n\n if (thePlugin) {\n if (lastPlugin && _isFunction(lastPlugin[setNextPlugin]) && _isFunction(thePlugin[processTelemetry])) {\n // Set this plugin as the next for the previous one\n lastPlugin[setNextPlugin](thePlugin);\n }\n\n if (!_isFunction(thePlugin[isInitialized]) || !thePlugin[isInitialized]()) {\n initPlugins.push(thePlugin);\n }\n\n lastPlugin = thePlugin;\n proxy = proxy.getNext();\n }\n } // Now initiatilize the plugins\n\n\n CoreUtils.arrForEach(initPlugins, function (thePlugin) {\n thePlugin.initialize(processContext.getCfg(), processContext.core(), extensions, processContext.getNext());\n });\n}\nexport function sortPlugins(plugins) {\n // Sort by priority\n return plugins.sort(function (extA, extB) {\n var result = 0;\n\n var bHasProcess = _isFunction(extB[processTelemetry]);\n\n if (_isFunction(extA[processTelemetry])) {\n result = bHasProcess ? extA[priority] - extB[priority] : 1;\n } else if (bHasProcess) {\n result = -1;\n }\n\n return result;\n }); // sort complete \n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\"use strict\";\n\nimport { CoreUtils } from \"./CoreUtils\";\nimport { BaseTelemetryPlugin } from './BaseTelemetryPlugin';\nimport { ProcessTelemetryContext } from './ProcessTelemetryContext';\nimport { initializePlugins } from './TelemetryHelpers';\nimport dynamicProto from '@microsoft/dynamicproto-js';\nvar ChannelControllerPriority = 500;\nvar ChannelValidationMessage = \"Channel has invalid priority\";\nvar _objDefineAccessors = CoreUtils.objDefineAccessors;\n\nvar ChannelController =\n/** @class */\nfunction (_super) {\n __extends(ChannelController, _super);\n\n function ChannelController() {\n var _this = _super.call(this) || this;\n\n _this.identifier = \"ChannelControllerPlugin\";\n _this.priority = ChannelControllerPriority; // in reserved range 100 to 200\n\n var _arrForEach = CoreUtils.arrForEach;\n\n var _channelQueue;\n\n dynamicProto(ChannelController, _this, function (_self, _base) {\n _self.setNextPlugin = function (next) {// The Channel controller is last in pipeline\n };\n\n _self.processTelemetry = function (item, itemCtx) {\n if (_channelQueue) {\n _arrForEach(_channelQueue, function (queues) {\n // pass on to first item in queue\n if (queues.length > 0) {\n // Copying the item context as we could have mutiple chains that are executing asynchronously\n // and calling _getDefTelCtx as it's possible that the caller doesn't pass any context\n var chainCtx = _this._getTelCtx(itemCtx).createNew(queues);\n\n chainCtx.processNext(item);\n }\n });\n }\n };\n\n _self.getChannelControls = function () {\n return _channelQueue;\n };\n\n _self.initialize = function (config, core, extensions) {\n if (_self.isInitialized()) {\n // already initialized\n return;\n }\n\n _base.initialize(config, core, extensions);\n\n if (config.isCookieUseDisabled) {\n CoreUtils.disableCookies();\n }\n\n _createChannelQueues((config || {}).channels, extensions); // Initialize the Queues\n\n\n _arrForEach(_channelQueue, function (queue) {\n return initializePlugins(new ProcessTelemetryContext(queue, config, core), extensions);\n });\n };\n });\n\n function _checkQueuePriority(queue) {\n _arrForEach(queue, function (queueItem) {\n if (queueItem.priority < ChannelControllerPriority) {\n throw Error(ChannelValidationMessage + queueItem.identifier);\n }\n });\n }\n\n function _addChannelQueue(queue) {\n if (queue && queue.length > 0) {\n queue = queue.sort(function (a, b) {\n return a.priority - b.priority;\n });\n\n _checkQueuePriority(queue);\n\n _channelQueue.push(queue);\n }\n }\n\n function _createChannelQueues(channels, extensions) {\n _channelQueue = [];\n\n if (channels) {\n // Add and sort the configuration channel queues\n _arrForEach(channels, function (queue) {\n return _addChannelQueue(queue);\n });\n }\n\n if (extensions) {\n // Create a new channel queue for any extensions with a priority > the ChannelControllerPriority\n var extensionQueue_1 = [];\n\n _arrForEach(extensions, function (plugin) {\n if (plugin.priority > ChannelControllerPriority) {\n extensionQueue_1.push(plugin);\n }\n });\n\n _addChannelQueue(extensionQueue_1);\n }\n }\n\n return _this;\n }\n\n ChannelController.prototype.processTelemetry = function (item, itemCtx) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n\n ;\n\n ChannelController.prototype.getChannelControls = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return null;\n };\n\n ChannelController.prototype.initialize = function (config, core, extensions) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Static constructor, attempt to create accessors\r\n */\n // tslint:disable-next-line\n\n\n ChannelController._staticInit = function () {\n // Dynamically create get/set property accessors\n _objDefineAccessors(ChannelController.prototype, \"ChannelControls\", ChannelController.prototype.getChannelControls);\n\n _objDefineAccessors(ChannelController.prototype, \"channelQueue\", ChannelController.prototype.getChannelControls);\n }();\n\n return ChannelController;\n}(BaseTelemetryPlugin);\n\nexport { ChannelController };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\r\n * Type of storage to differentiate between local storage and session storage\r\n */\nexport var StorageType;\n\n(function (StorageType) {\n StorageType[StorageType[\"LocalStorage\"] = 0] = \"LocalStorage\";\n StorageType[StorageType[\"SessionStorage\"] = 1] = \"SessionStorage\";\n})(StorageType || (StorageType = {}));\n/**\r\n * Enum is used in aiDataContract to describe how fields are serialized.\r\n * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array\r\n */\n\n\nexport var FieldType;\n\n(function (FieldType) {\n FieldType[FieldType[\"Default\"] = 0] = \"Default\";\n FieldType[FieldType[\"Required\"] = 1] = \"Required\";\n FieldType[FieldType[\"Array\"] = 2] = \"Array\";\n FieldType[FieldType[\"Hidden\"] = 4] = \"Hidden\";\n})(FieldType || (FieldType = {}));\n\n;\nexport var DistributedTracingModes;\n\n(function (DistributedTracingModes) {\n /**\r\n * (Default) Send Application Insights correlation headers\r\n */\n DistributedTracingModes[DistributedTracingModes[\"AI\"] = 0] = \"AI\";\n /**\r\n * Send both W3C Trace Context headers and back-compatibility Application Insights headers\r\n */\n\n DistributedTracingModes[DistributedTracingModes[\"AI_AND_W3C\"] = 1] = \"AI_AND_W3C\";\n /**\r\n * Send W3C Trace Context headers\r\n */\n\n DistributedTracingModes[DistributedTracingModes[\"W3C\"] = 2] = \"W3C\";\n})(DistributedTracingModes || (DistributedTracingModes = {}));","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\"use strict\";\n\nimport { CoreUtils } from \"./CoreUtils\";\nimport { ChannelController } from './ChannelController';\nimport { ProcessTelemetryContext } from './ProcessTelemetryContext';\nimport { initializePlugins, sortPlugins } from './TelemetryHelpers';\nimport dynamicProto from '@microsoft/dynamicproto-js';\nimport { PerfManager } from \"./PerfManager\";\nvar validationError = \"Extensions must provide callback to initialize\";\nvar _arrForEach = CoreUtils.arrForEach;\nvar _isNullOrUndefined = CoreUtils.isNullOrUndefined;\nvar strNotificationManager = \"_notificationManager\";\n\nvar BaseCore =\n/** @class */\nfunction () {\n function BaseCore() {\n var _isInitialized = false;\n\n var _eventQueue;\n\n var _channelController;\n\n var _notificationManager;\n\n var _perfManager;\n\n dynamicProto(BaseCore, this, function (_self) {\n _self._extensions = new Array();\n _channelController = new ChannelController();\n _self.logger = CoreUtils.objCreate({\n throwInternal: function throwInternal(severity, msgId, msg, properties, isUserAct) {\n if (isUserAct === void 0) {\n isUserAct = false;\n }\n },\n warnToConsole: function warnToConsole(message) {},\n resetInternalMessageCount: function resetInternalMessageCount() {}\n });\n _eventQueue = [];\n\n _self.isInitialized = function () {\n return _isInitialized;\n };\n\n _self.initialize = function (config, extensions, logger, notificationManager) {\n // Make sure core is only initialized once\n if (_self.isInitialized()) {\n throw Error(\"Core should not be initialized more than once\");\n }\n\n if (!config || _isNullOrUndefined(config.instrumentationKey)) {\n throw Error(\"Please provide instrumentation key\");\n }\n\n _notificationManager = notificationManager; // For backward compatibility only\n\n _self[strNotificationManager] = notificationManager;\n _self.config = config || {};\n config.extensions = _isNullOrUndefined(config.extensions) ? [] : config.extensions; // add notification to the extensions in the config so other plugins can access it\n\n var extConfig = config.extensionConfig = _isNullOrUndefined(config.extensionConfig) ? {} : config.extensionConfig;\n extConfig.NotificationManager = notificationManager;\n\n if (logger) {\n _self.logger = logger;\n } // Concat all available extensions\n\n\n var allExtensions = [];\n allExtensions.push.apply(allExtensions, extensions.concat(config.extensions));\n allExtensions = sortPlugins(allExtensions);\n var coreExtensions = [];\n var channelExtensions = []; // Check if any two extensions have the same priority, then warn to console\n // And extract the local extensions from the \n\n var extPriorities = {}; // Extension validation\n\n _arrForEach(allExtensions, function (ext) {\n if (_isNullOrUndefined(ext) || _isNullOrUndefined(ext.initialize)) {\n throw Error(validationError);\n }\n\n var extPriority = ext.priority;\n var identifier = ext.identifier;\n\n if (ext && extPriority) {\n if (!_isNullOrUndefined(extPriorities[extPriority])) {\n logger.warnToConsole(\"Two extensions have same priority #\" + extPriority + \" - \" + extPriorities[extPriority] + \", \" + identifier);\n } else {\n // set a value\n extPriorities[extPriority] = identifier;\n }\n } // Split extensions to core and channelController\n\n\n if (!extPriority || extPriority < _channelController.priority) {\n // Add to core extension that will be managed by BaseCore\n coreExtensions.push(ext);\n } else {\n // Add all other extensions to be managed by the channel controller\n channelExtensions.push(ext);\n }\n }); // Validation complete\n // Add the channelController to the complete extension collection and\n // to the end of the core extensions\n\n\n allExtensions.push(_channelController);\n coreExtensions.push(_channelController); // Sort the complete set of extensions by priority\n\n allExtensions = sortPlugins(allExtensions);\n _self._extensions = allExtensions; // initialize channel controller first, this will initialize all channel plugins\n\n initializePlugins(new ProcessTelemetryContext([_channelController], config, _self), allExtensions);\n initializePlugins(new ProcessTelemetryContext(coreExtensions, config, _self), allExtensions); // Now reset the extensions to just those being managed by Basecore\n\n _self._extensions = coreExtensions;\n\n if (_self.getTransmissionControls().length === 0) {\n throw new Error(\"No channels available\");\n }\n\n _isInitialized = true;\n\n _self.releaseQueue();\n };\n\n _self.getTransmissionControls = function () {\n return _channelController.getChannelControls();\n };\n\n _self.track = function (telemetryItem) {\n if (!telemetryItem.iKey) {\n // setup default iKey if not passed in\n telemetryItem.iKey = _self.config.instrumentationKey;\n }\n\n if (!telemetryItem.time) {\n // add default timestamp if not passed in\n telemetryItem.time = CoreUtils.toISOString(new Date());\n }\n\n if (_isNullOrUndefined(telemetryItem.ver)) {\n // CommonSchema 4.0\n telemetryItem.ver = \"4.0\";\n }\n\n if (_self.isInitialized()) {\n // Process the telemetry plugin chain\n _self.getProcessTelContext().processNext(telemetryItem);\n } else {\n // Queue events until all extensions are initialized\n _eventQueue.push(telemetryItem);\n }\n };\n\n _self.getProcessTelContext = function () {\n var extensions = _self._extensions;\n var thePlugins = extensions; // invoke any common telemetry processors before sending through pipeline\n\n if (!extensions || extensions.length === 0) {\n // Pass to Channel controller so data is sent to correct channel queues\n thePlugins = [_channelController];\n }\n\n return new ProcessTelemetryContext(thePlugins, _self.config, _self);\n };\n\n _self.getNotifyMgr = function () {\n if (!_notificationManager) {\n // Create Dummy notification manager\n _notificationManager = CoreUtils.objCreate({\n addNotificationListener: function addNotificationListener(listener) {},\n removeNotificationListener: function removeNotificationListener(listener) {},\n eventsSent: function eventsSent(events) {},\n eventsDiscarded: function eventsDiscarded(events, reason) {},\n eventsSendRequest: function eventsSendRequest(sendReason, isAsync) {}\n }); // For backward compatibility only\n\n _self[strNotificationManager] = _notificationManager;\n }\n\n return _notificationManager;\n };\n\n _self.getPerfMgr = function () {\n if (!_perfManager) {\n if (_self.config && _self.config.enablePerfMgr) {\n _perfManager = new PerfManager(_self.getNotifyMgr());\n }\n }\n\n return _perfManager;\n };\n\n _self.setPerfMgr = function (perfMgr) {\n _perfManager = perfMgr;\n };\n\n _self.eventCnt = function () {\n return _eventQueue.length;\n };\n\n _self.releaseQueue = function () {\n if (_eventQueue.length > 0) {\n _arrForEach(_eventQueue, function (event) {\n _self.getProcessTelContext().processNext(event);\n });\n\n _eventQueue = [];\n }\n };\n });\n }\n\n BaseCore.prototype.initialize = function (config, extensions, logger, notificationManager) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n\n BaseCore.prototype.getTransmissionControls = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return null;\n };\n\n BaseCore.prototype.track = function (telemetryItem) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n\n BaseCore.prototype.getProcessTelContext = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return null;\n };\n\n BaseCore.prototype.getNotifyMgr = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return null;\n };\n\n BaseCore.prototype.getPerfMgr = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return null;\n };\n\n BaseCore.prototype.setPerfMgr = function (perfMgr) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n\n BaseCore.prototype.eventCnt = function () {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return 0;\n };\n\n BaseCore.prototype.releaseQueue = function () {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n\n return BaseCore;\n}();\n\nexport { BaseCore };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\r\n * The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.\r\n */\nexport var EventsDiscardedReason = {\n /**\r\n * Unknown.\r\n */\n Unknown: 0,\n\n /**\r\n * Status set to non-retryable.\r\n */\n NonRetryableStatus: 1,\n\n /**\r\n * The event is invalid.\r\n */\n InvalidEvent: 2,\n\n /**\r\n * The size of the event is too large.\r\n */\n SizeLimitExceeded: 3,\n\n /**\r\n * The server is not accepting events from this instrumentation key.\r\n */\n KillSwitch: 4,\n\n /**\r\n * The event queue is full.\r\n */\n QueueFull: 5\n};","import { CoreUtils } from \"./CoreUtils\";\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\n/**\r\n * Class to manage sending notifications to all the listeners.\r\n */\n\nvar NotificationManager =\n/** @class */\nfunction () {\n function NotificationManager(config) {\n this.listeners = [];\n var arrForEach = CoreUtils.arrForEach;\n var perfEvtsSendAll = !!(config || {}).perfEvtsSendAll;\n dynamicProto(NotificationManager, this, function (_self) {\n _self.addNotificationListener = function (listener) {\n _self.listeners.push(listener);\n };\n /**\r\n * Removes all instances of the listener.\r\n * @param {INotificationListener} listener - AWTNotificationListener to remove.\r\n */\n\n\n _self.removeNotificationListener = function (listener) {\n var index = CoreUtils.arrIndexOf(_self.listeners, listener);\n\n while (index > -1) {\n _self.listeners.splice(index, 1);\n\n index = CoreUtils.arrIndexOf(_self.listeners, listener);\n }\n };\n /**\r\n * Notification for events sent.\r\n * @param {ITelemetryItem[]} events - The array of events that have been sent.\r\n */\n\n\n _self.eventsSent = function (events) {\n arrForEach(_self.listeners, function (listener) {\n if (listener && listener.eventsSent) {\n setTimeout(function () {\n return listener.eventsSent(events);\n }, 0);\n }\n });\n };\n /**\r\n * Notification for events being discarded.\r\n * @param {ITelemetryItem[]} events - The array of events that have been discarded by the SDK.\r\n * @param {number} reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\n\n\n _self.eventsDiscarded = function (events, reason) {\n arrForEach(_self.listeners, function (listener) {\n if (listener && listener.eventsDiscarded) {\n setTimeout(function () {\n return listener.eventsDiscarded(events, reason);\n }, 0);\n }\n });\n };\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param {number} sendReason - The reason why the event batch is being sent.\r\n * @param {boolean} isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */\n\n\n _self.eventsSendRequest = function (sendReason, isAsync) {\n arrForEach(_self.listeners, function (listener) {\n if (listener && listener.eventsSendRequest) {\n if (isAsync) {\n setTimeout(function () {\n return listener.eventsSendRequest(sendReason, isAsync);\n }, 0);\n } else {\n try {\n listener.eventsSendRequest(sendReason, isAsync);\n } catch (e) {// Catch errors to ensure we don't block sending the requests\n }\n }\n }\n });\n };\n\n _self.perfEvent = function (perfEvent) {\n if (perfEvent) {\n // Send all events or only parent events\n if (perfEvtsSendAll || !perfEvent.isChildEvt()) {\n arrForEach(_self.listeners, function (listener) {\n if (listener && listener.perfEvent) {\n if (perfEvent.isAsync) {\n setTimeout(function () {\n return listener.perfEvent(perfEvent);\n }, 0);\n } else {\n try {\n listener.perfEvent(perfEvent);\n } catch (e) {// Catch errors to ensure we don't block sending the requests\n }\n }\n }\n });\n }\n }\n };\n });\n }\n /**\r\n * Adds a notification listener.\r\n * @param {INotificationListener} listener - The notification listener to be added.\r\n */\n\n\n NotificationManager.prototype.addNotificationListener = function (listener) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Removes all instances of the listener.\r\n * @param {INotificationListener} listener - AWTNotificationListener to remove.\r\n */\n\n\n NotificationManager.prototype.removeNotificationListener = function (listener) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Notification for events sent.\r\n * @param {ITelemetryItem[]} events - The array of events that have been sent.\r\n */\n\n\n NotificationManager.prototype.eventsSent = function (events) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Notification for events being discarded.\r\n * @param {ITelemetryItem[]} events - The array of events that have been discarded by the SDK.\r\n * @param {number} reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\n\n\n NotificationManager.prototype.eventsDiscarded = function (events, reason) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param {number} sendReason - The reason why the event batch is being sent.\r\n * @param {boolean} isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */\n\n\n NotificationManager.prototype.eventsSendRequest = function (sendReason, isAsync) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n\n return NotificationManager;\n}();\n\nexport { NotificationManager };","import { BaseCore } from './BaseCore';\nimport { EventsDiscardedReason } from \"../JavaScriptSDK.Enums/EventsDiscardedReason\";\nimport { NotificationManager } from \"./NotificationManager\";\nimport { CoreUtils } from \"./CoreUtils\";\nimport { doPerf } from \"./PerfManager\";\nimport { _InternalLogMessage, DiagnosticLogger } from \"./DiagnosticLogger\";\nimport dynamicProto from '@microsoft/dynamicproto-js';\n\"use strict\";\n\nvar AppInsightsCore =\n/** @class */\nfunction (_super) {\n __extends(AppInsightsCore, _super);\n\n function AppInsightsCore() {\n var _this = _super.call(this) || this;\n\n dynamicProto(AppInsightsCore, _this, function (_self, _base) {\n _self.initialize = function (config, extensions, logger, notificationManager) {\n _base.initialize(config, extensions, logger || new DiagnosticLogger(config), notificationManager || new NotificationManager(config));\n };\n\n _self.track = function (telemetryItem) {\n doPerf(_self.getPerfMgr(), function () {\n return \"AppInsightsCore:track\";\n }, function () {\n if (telemetryItem === null) {\n _notifyInvalidEvent(telemetryItem); // throw error\n\n\n throw Error(\"Invalid telemetry item\");\n } // do basic validation before sending it through the pipeline\n\n\n _validateTelemetryItem(telemetryItem);\n\n _base.track(telemetryItem);\n }, function () {\n return {\n item: telemetryItem\n };\n }, !telemetryItem.sync);\n };\n /**\r\n * Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.\r\n * The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be\r\n * called.\r\n * @param {INotificationListener} listener - An INotificationListener object.\r\n */\n\n\n _self.addNotificationListener = function (listener) {\n var manager = _self.getNotifyMgr();\n\n if (manager) {\n manager.addNotificationListener(listener);\n }\n };\n /**\r\n * Removes all instances of the listener.\r\n * @param {INotificationListener} listener - INotificationListener to remove.\r\n */\n\n\n _self.removeNotificationListener = function (listener) {\n var manager = _self.getNotifyMgr();\n\n if (manager) {\n manager.removeNotificationListener(listener);\n }\n };\n /**\r\n * Periodically check logger.queue for\r\n */\n\n\n _self.pollInternalLogs = function (eventName) {\n var interval = _self.config.diagnosticLogInterval;\n\n if (!interval || !(interval > 0)) {\n interval = 10000;\n }\n\n return setInterval(function () {\n var queue = _self.logger ? _self.logger.queue : [];\n CoreUtils.arrForEach(queue, function (logMessage) {\n var item = {\n name: eventName ? eventName : \"InternalMessageId: \" + logMessage.messageId,\n iKey: _self.config.instrumentationKey,\n time: CoreUtils.toISOString(new Date()),\n baseType: _InternalLogMessage.dataType,\n baseData: {\n message: logMessage.message\n }\n };\n\n _self.track(item);\n });\n queue.length = 0;\n }, interval);\n };\n\n function _validateTelemetryItem(telemetryItem) {\n if (CoreUtils.isNullOrUndefined(telemetryItem.name)) {\n _notifyInvalidEvent(telemetryItem);\n\n throw Error(\"telemetry name required\");\n }\n }\n\n function _notifyInvalidEvent(telemetryItem) {\n var manager = _self.getNotifyMgr();\n\n if (manager) {\n manager.eventsDiscarded([telemetryItem], EventsDiscardedReason.InvalidEvent);\n }\n }\n });\n return _this;\n }\n\n AppInsightsCore.prototype.initialize = function (config, extensions, logger, notificationManager) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n\n AppInsightsCore.prototype.track = function (telemetryItem) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.\r\n * The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be\r\n * called.\r\n * @param {INotificationListener} listener - An INotificationListener object.\r\n */\n\n\n AppInsightsCore.prototype.addNotificationListener = function (listener) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Removes all instances of the listener.\r\n * @param {INotificationListener} listener - INotificationListener to remove.\r\n */\n\n\n AppInsightsCore.prototype.removeNotificationListener = function (listener) {// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n };\n /**\r\n * Periodically check logger.queue for\r\n */\n\n\n AppInsightsCore.prototype.pollInternalLogs = function (eventName) {\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\n return 0;\n };\n\n return AppInsightsCore;\n}(BaseCore);\n\nexport { AppInsightsCore };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar RequestHeaders =\n/** @class */\nfunction () {\n function RequestHeaders() {}\n /**\r\n * Request-Context header\r\n */\n\n\n RequestHeaders.requestContextHeader = \"Request-Context\";\n /**\r\n * Target instrumentation header that is added to the response and retrieved by the\r\n * calling application when processing incoming responses.\r\n */\n\n RequestHeaders.requestContextTargetKey = \"appId\";\n /**\r\n * Request-Context appId format\r\n */\n\n RequestHeaders.requestContextAppIdFormat = \"appId=cid-v1:\";\n /**\r\n * Request-Id header\r\n */\n\n RequestHeaders.requestIdHeader = \"Request-Id\";\n /**\r\n * W3C distributed tracing protocol header\r\n */\n\n RequestHeaders.traceParentHeader = \"traceparent\";\n /**\r\n * Sdk-Context header\r\n * If this header passed with appId in content then appId will be returned back by the backend.\r\n */\n\n RequestHeaders.sdkContextHeader = \"Sdk-Context\";\n /**\r\n * String to pass in header for requesting appId back from the backend.\r\n */\n\n RequestHeaders.sdkContextHeaderAppIdRequest = \"appId\";\n RequestHeaders.requestContextHeaderLowerCase = \"request-context\";\n return RequestHeaders;\n}();\n\nexport { RequestHeaders };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { LoggingSeverity, _InternalMessageId, CoreUtils, hasJSON, getJSON, objForEachKey } from '@microsoft/applicationinsights-core-js';\n\nvar DataSanitizer =\n/** @class */\nfunction () {\n function DataSanitizer() {}\n\n DataSanitizer.sanitizeKeyAndAddUniqueness = function (logger, key, map) {\n var origLength = key.length;\n var field = DataSanitizer.sanitizeKey(logger, key); // validation truncated the length. We need to add uniqueness\n\n if (field.length !== origLength) {\n var i = 0;\n var uniqueField = field;\n\n while (map[uniqueField] !== undefined) {\n i++;\n uniqueField = field.substring(0, DataSanitizer.MAX_NAME_LENGTH - 3) + DataSanitizer.padNumber(i);\n }\n\n field = uniqueField;\n }\n\n return field;\n };\n\n DataSanitizer.sanitizeKey = function (logger, name) {\n var nameTrunc;\n\n if (name) {\n // Remove any leading or trailing whitepace\n name = DataSanitizer.trim(name.toString()); // truncate the string to 150 chars\n\n if (name.length > DataSanitizer.MAX_NAME_LENGTH) {\n nameTrunc = name.substring(0, DataSanitizer.MAX_NAME_LENGTH);\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.NameTooLong, \"name is too long. It has been truncated to \" + DataSanitizer.MAX_NAME_LENGTH + \" characters.\", {\n name: name\n }, true);\n }\n }\n\n return nameTrunc || name;\n };\n\n DataSanitizer.sanitizeString = function (logger, value, maxLength) {\n if (maxLength === void 0) {\n maxLength = DataSanitizer.MAX_STRING_LENGTH;\n }\n\n var valueTrunc;\n\n if (value) {\n maxLength = maxLength ? maxLength : DataSanitizer.MAX_STRING_LENGTH; // in case default parameters dont work\n\n value = DataSanitizer.trim(value);\n\n if (value.toString().length > maxLength) {\n valueTrunc = value.toString().substring(0, maxLength);\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.StringValueTooLong, \"string value is too long. It has been truncated to \" + maxLength + \" characters.\", {\n value: value\n }, true);\n }\n }\n\n return valueTrunc || value;\n };\n\n DataSanitizer.sanitizeUrl = function (logger, url) {\n return DataSanitizer.sanitizeInput(logger, url, DataSanitizer.MAX_URL_LENGTH, _InternalMessageId.UrlTooLong);\n };\n\n DataSanitizer.sanitizeMessage = function (logger, message) {\n var messageTrunc;\n\n if (message) {\n if (message.length > DataSanitizer.MAX_MESSAGE_LENGTH) {\n messageTrunc = message.substring(0, DataSanitizer.MAX_MESSAGE_LENGTH);\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated, \"message is too long, it has been truncated to \" + DataSanitizer.MAX_MESSAGE_LENGTH + \" characters.\", {\n message: message\n }, true);\n }\n }\n\n return messageTrunc || message;\n };\n\n DataSanitizer.sanitizeException = function (logger, exception) {\n var exceptionTrunc;\n\n if (exception) {\n if (exception.length > DataSanitizer.MAX_EXCEPTION_LENGTH) {\n exceptionTrunc = exception.substring(0, DataSanitizer.MAX_EXCEPTION_LENGTH);\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, \"exception is too long, it has been truncated to \" + DataSanitizer.MAX_EXCEPTION_LENGTH + \" characters.\", {\n exception: exception\n }, true);\n }\n }\n\n return exceptionTrunc || exception;\n };\n\n DataSanitizer.sanitizeProperties = function (logger, properties) {\n if (properties) {\n var tempProps_1 = {};\n objForEachKey(properties, function (prop, value) {\n if (CoreUtils.isObject(value) && hasJSON()) {\n // Stringify any part C properties\n try {\n value = getJSON().stringify(value);\n } catch (e) {\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, \"custom property is not valid\", {\n exception: e\n }, true);\n }\n }\n\n value = DataSanitizer.sanitizeString(logger, value, DataSanitizer.MAX_PROPERTY_LENGTH);\n prop = DataSanitizer.sanitizeKeyAndAddUniqueness(logger, prop, tempProps_1);\n tempProps_1[prop] = value;\n });\n properties = tempProps_1;\n }\n\n return properties;\n };\n\n DataSanitizer.sanitizeMeasurements = function (logger, measurements) {\n if (measurements) {\n var tempMeasurements_1 = {};\n objForEachKey(measurements, function (measure, value) {\n measure = DataSanitizer.sanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);\n tempMeasurements_1[measure] = value;\n });\n measurements = tempMeasurements_1;\n }\n\n return measurements;\n };\n\n DataSanitizer.sanitizeId = function (logger, id) {\n return id ? DataSanitizer.sanitizeInput(logger, id, DataSanitizer.MAX_ID_LENGTH, _InternalMessageId.IdTooLong).toString() : id;\n };\n\n DataSanitizer.sanitizeInput = function (logger, input, maxLength, _msgId) {\n var inputTrunc;\n\n if (input) {\n input = DataSanitizer.trim(input);\n\n if (input.length > maxLength) {\n inputTrunc = input.substring(0, maxLength);\n logger.throwInternal(LoggingSeverity.WARNING, _msgId, \"input is too long, it has been truncated to \" + maxLength + \" characters.\", {\n data: input\n }, true);\n }\n }\n\n return inputTrunc || input;\n };\n\n DataSanitizer.padNumber = function (num) {\n var s = \"00\" + num;\n return s.substr(s.length - 3);\n };\n /**\r\n * helper method to trim strings (IE8 does not implement String.prototype.trim)\r\n */\n\n\n DataSanitizer.trim = function (str) {\n if (!CoreUtils.isString(str)) {\n return str;\n }\n\n return str.replace(/^\\s+|\\s+$/g, \"\");\n };\n /**\r\n * Max length allowed for custom names.\r\n */\n\n\n DataSanitizer.MAX_NAME_LENGTH = 150;\n /**\r\n * Max length allowed for Id field in page views.\r\n */\n\n DataSanitizer.MAX_ID_LENGTH = 128;\n /**\r\n * Max length allowed for custom values.\r\n */\n\n DataSanitizer.MAX_PROPERTY_LENGTH = 8192;\n /**\r\n * Max length allowed for names\r\n */\n\n DataSanitizer.MAX_STRING_LENGTH = 1024;\n /**\r\n * Max length allowed for url.\r\n */\n\n DataSanitizer.MAX_URL_LENGTH = 2048;\n /**\r\n * Max length allowed for messages.\r\n */\n\n DataSanitizer.MAX_MESSAGE_LENGTH = 32768;\n /**\r\n * Max length allowed for exceptions.\r\n */\n\n DataSanitizer.MAX_EXCEPTION_LENGTH = 32768;\n return DataSanitizer;\n}();\n\nexport { DataSanitizer };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { StorageType } from \"./Enums\";\nimport { CoreUtils, EventHelper, _InternalMessageId, LoggingSeverity, getGlobal, getGlobalInst, getWindow, getDocument, getNavigator, getPerformance, getLocation, hasJSON, getJSON, strPrototype, objForEachKey } from \"@microsoft/applicationinsights-core-js\";\nimport { RequestHeaders } from \"./RequestResponseHeaders\";\nimport { DataSanitizer } from \"./Telemetry/Common/DataSanitizer\";\n\nvar _navigator = getNavigator();\n\nvar _isString = CoreUtils.isString;\nvar _uaDisallowsSameSiteNone = null;\n\nfunction _endsWith(value, search) {\n var len = value.length;\n var start = len - search.length;\n return value.substring(start >= 0 ? start : 0, len) === search;\n}\n\nvar Util =\n/** @class */\nfunction () {\n function Util() {}\n\n Util.createDomEvent = function (eventName) {\n var event = null;\n\n if (CoreUtils.isFunction(Event)) {\n event = new Event(eventName);\n } else {\n var doc = getDocument();\n\n if (doc && doc.createEvent) {\n event = doc.createEvent(\"Event\");\n event.initEvent(eventName, true, true);\n }\n }\n\n return event;\n };\n /*\r\n * Force the SDK not to use local and session storage\r\n */\n\n\n Util.disableStorage = function () {\n Util._canUseLocalStorage = false;\n Util._canUseSessionStorage = false;\n };\n /**\r\n * Gets the localStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\n\n\n Util._getLocalStorageObject = function () {\n if (Util.canUseLocalStorage()) {\n return Util._getVerifiedStorageObject(StorageType.LocalStorage);\n }\n\n return null;\n };\n /**\r\n * Tests storage object (localStorage or sessionStorage) to verify that it is usable\r\n * More details here: https://mathiasbynens.be/notes/localstorage-pattern\r\n * @param storageType Type of storage\r\n * @return {Storage} Returns storage object verified that it is usable\r\n */\n\n\n Util._getVerifiedStorageObject = function (storageType) {\n var storage = null;\n var fail;\n var uid;\n\n try {\n if (CoreUtils.isNullOrUndefined(getGlobal())) {\n return null;\n }\n\n uid = new Date();\n storage = storageType === StorageType.LocalStorage ? getGlobalInst(\"localStorage\") : getGlobalInst(\"sessionStorage\");\n storage.setItem(uid.toString(), uid.toString());\n fail = storage.getItem(uid.toString()) !== uid.toString();\n storage.removeItem(uid.toString());\n\n if (fail) {\n storage = null;\n }\n } catch (exception) {\n storage = null;\n }\n\n return storage;\n };\n /**\r\n * Checks if endpoint URL is application insights internal injestion service URL.\r\n *\r\n * @param endpointUrl Endpoint URL to check.\r\n * @returns {boolean} True if if endpoint URL is application insights internal injestion service URL.\r\n */\n\n\n Util.isInternalApplicationInsightsEndpoint = function (endpointUrl) {\n return Util._internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;\n };\n /**\r\n * Check if the browser supports local storage.\r\n *\r\n * @returns {boolean} True if local storage is supported.\r\n */\n\n\n Util.canUseLocalStorage = function () {\n if (Util._canUseLocalStorage === undefined) {\n Util._canUseLocalStorage = !!Util._getVerifiedStorageObject(StorageType.LocalStorage);\n }\n\n return Util._canUseLocalStorage;\n };\n /**\r\n * Get an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\n\n\n Util.getStorage = function (logger, name) {\n var storage = Util._getLocalStorageObject();\n\n if (storage !== null) {\n try {\n return storage.getItem(name);\n } catch (e) {\n Util._canUseLocalStorage = false;\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotReadLocalStorage, \"Browser failed read of local storage. \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n }\n\n return null;\n };\n /**\r\n * Set the contents of an object in the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\n\n\n Util.setStorage = function (logger, name, data) {\n var storage = Util._getLocalStorageObject();\n\n if (storage !== null) {\n try {\n storage.setItem(name, data);\n return true;\n } catch (e) {\n Util._canUseLocalStorage = false;\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotWriteLocalStorage, \"Browser failed write to local storage. \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n }\n\n return false;\n };\n /**\r\n * Remove an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\n\n\n Util.removeStorage = function (logger, name) {\n var storage = Util._getLocalStorageObject();\n\n if (storage !== null) {\n try {\n storage.removeItem(name);\n return true;\n } catch (e) {\n Util._canUseLocalStorage = false;\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserFailedRemovalFromLocalStorage, \"Browser failed removal of local storage item. \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n }\n\n return false;\n };\n /**\r\n * Gets the sessionStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\n\n\n Util._getSessionStorageObject = function () {\n if (Util.canUseSessionStorage()) {\n return Util._getVerifiedStorageObject(StorageType.SessionStorage);\n }\n\n return null;\n };\n /**\r\n * Check if the browser supports session storage.\r\n *\r\n * @returns {boolean} True if session storage is supported.\r\n */\n\n\n Util.canUseSessionStorage = function () {\n if (Util._canUseSessionStorage === undefined) {\n Util._canUseSessionStorage = !!Util._getVerifiedStorageObject(StorageType.SessionStorage);\n }\n\n return Util._canUseSessionStorage;\n };\n /**\r\n * Gets the list of session storage keys\r\n *\r\n * @returns {string[]} List of session storage keys\r\n */\n\n\n Util.getSessionStorageKeys = function () {\n var keys = [];\n\n if (Util.canUseSessionStorage()) {\n objForEachKey(getGlobalInst(\"sessionStorage\"), function (key) {\n keys.push(key);\n });\n }\n\n return keys;\n };\n /**\r\n * Get an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\n\n\n Util.getSessionStorage = function (logger, name) {\n var storage = Util._getSessionStorageObject();\n\n if (storage !== null) {\n try {\n return storage.getItem(name);\n } catch (e) {\n Util._canUseSessionStorage = false;\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotReadSessionStorage, \"Browser failed read of session storage. \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n }\n\n return null;\n };\n /**\r\n * Set the contents of an object in the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\n\n\n Util.setSessionStorage = function (logger, name, data) {\n var storage = Util._getSessionStorageObject();\n\n if (storage !== null) {\n try {\n storage.setItem(name, data);\n return true;\n } catch (e) {\n Util._canUseSessionStorage = false;\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotWriteSessionStorage, \"Browser failed write to session storage. \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n }\n\n return false;\n };\n /**\r\n * Remove an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\n\n\n Util.removeSessionStorage = function (logger, name) {\n var storage = Util._getSessionStorageObject();\n\n if (storage !== null) {\n try {\n storage.removeItem(name);\n return true;\n } catch (e) {\n Util._canUseSessionStorage = false;\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserFailedRemovalFromSessionStorage, \"Browser failed removal of session storage item. \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n }\n\n return false;\n };\n /*\r\n * Force the SDK not to store and read any data from cookies\r\n */\n\n\n Util.disableCookies = function () {\n CoreUtils.disableCookies();\n };\n /*\r\n * helper method to tell if document.cookie object is available\r\n */\n\n\n Util.canUseCookies = function (logger) {\n if (CoreUtils._canUseCookies === undefined) {\n CoreUtils._canUseCookies = false;\n\n try {\n CoreUtils._canUseCookies = Util.document.cookie !== undefined;\n } catch (e) {\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotAccessCookie, \"Cannot access document.cookie - \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n\n ;\n }\n\n return CoreUtils._canUseCookies;\n };\n\n Util.disallowsSameSiteNone = function (userAgent) {\n if (!_isString(userAgent)) {\n return false;\n } // Cover all iOS based browsers here. This includes:\n // - Safari on iOS 12 for iPhone, iPod Touch, iPad\n // - WkWebview on iOS 12 for iPhone, iPod Touch, iPad\n // - Chrome on iOS 12 for iPhone, iPod Touch, iPad\n // All of which are broken by SameSite=None, because they use the iOS networking stack\n\n\n if (userAgent.indexOf(\"CPU iPhone OS 12\") !== -1 || userAgent.indexOf(\"iPad; CPU OS 12\") !== -1) {\n return true;\n } // Cover Mac OS X based browsers that use the Mac OS networking stack. This includes:\n // - Safari on Mac OS X\n // This does not include:\n // - Internal browser on Mac OS X\n // - Chrome on Mac OS X\n // - Chromium on Mac OS X\n // Because they do not use the Mac OS networking stack.\n\n\n if (userAgent.indexOf(\"Macintosh; Intel Mac OS X 10_14\") !== -1 && userAgent.indexOf(\"Version/\") !== -1 && userAgent.indexOf(\"Safari\") !== -1) {\n return true;\n } // Cover Mac OS X internal browsers that use the Mac OS networking stack. This includes:\n // - Internal browser on Mac OS X\n // This does not include:\n // - Safari on Mac OS X\n // - Chrome on Mac OS X\n // - Chromium on Mac OS X\n // Because they do not use the Mac OS networking stack.\n\n\n if (userAgent.indexOf(\"Macintosh; Intel Mac OS X 10_14\") !== -1 && _endsWith(userAgent, \"AppleWebKit/605.1.15 (KHTML, like Gecko)\")) {\n return true;\n } // Cover Chrome 50-69, because some versions are broken by SameSite=None, and none in this range require it.\n // Note: this covers some pre-Chromium Edge versions, but pre-Chromim Edge does not require SameSite=None, so this is fine.\n // Note: this regex applies to Windows, Mac OS X, and Linux, deliberately.\n\n\n if (userAgent.indexOf(\"Chrome/5\") !== -1 || userAgent.indexOf(\"Chrome/6\") !== -1) {\n return true;\n } // Unreal Engine runs Chromium 59, but does not advertise as Chrome until 4.23. Treat versions of Unreal\n // that don't specify their Chrome version as lacking support for SameSite=None.\n\n\n if (userAgent.indexOf(\"UnrealEngine\") !== -1 && userAgent.indexOf(\"Chrome\") === -1) {\n return true;\n } // UCBrowser < 12.13.2 ignores Set-Cookie headers with SameSite=None\n // NB: this rule isn't complete - you need regex to make a complete rule.\n // See: https://www.chromium.org/updates/same-site/incompatible-clients\n\n\n if (userAgent.indexOf(\"UCBrowser/12\") !== -1 || userAgent.indexOf(\"UCBrowser/11\") !== -1) {\n return true;\n }\n\n return false;\n };\n /**\r\n * helper method to set userId and sessionId cookie\r\n */\n\n\n Util.setCookie = function (logger, name, value, domain) {\n if (Util.canUseCookies(logger)) {\n var domainAttrib = \"\";\n var secureAttrib = \"\";\n\n if (domain) {\n domainAttrib = \";domain=\" + domain;\n }\n\n var location_1 = getLocation();\n\n if (location_1 && location_1.protocol === \"https:\") {\n secureAttrib = \";secure\";\n\n if (_uaDisallowsSameSiteNone === null) {\n _uaDisallowsSameSiteNone = Util.disallowsSameSiteNone((getNavigator() || {}).userAgent);\n }\n\n if (!_uaDisallowsSameSiteNone) {\n value = value + \";SameSite=None\"; // SameSite can only be set on secure pages\n }\n }\n\n Util.document.cookie = name + \"=\" + value + domainAttrib + \";path=/\" + secureAttrib;\n }\n };\n\n Util.stringToBoolOrDefault = function (str, defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = false;\n }\n\n if (str === undefined || str === null) {\n return defaultValue;\n }\n\n return str.toString().toLowerCase() === \"true\";\n };\n /**\r\n * helper method to access userId and sessionId cookie\r\n */\n\n\n Util.getCookie = function (logger, name) {\n if (!Util.canUseCookies(logger)) {\n return;\n }\n\n var value = \"\";\n\n if (name && name.length) {\n var cookieName = name + \"=\";\n var cookies = Util.document.cookie.split(\";\");\n\n for (var i = 0; i < cookies.length; i++) {\n var cookie = cookies[i];\n cookie = Util.trim(cookie);\n\n if (cookie && cookie.indexOf(cookieName) === 0) {\n value = cookie.substring(cookieName.length, cookies[i].length);\n break;\n }\n }\n }\n\n return value;\n };\n /**\r\n * Deletes a cookie by setting it's expiration time in the past.\r\n * @param name - The name of the cookie to delete.\r\n */\n\n\n Util.deleteCookie = function (logger, name) {\n if (Util.canUseCookies(logger)) {\n // Setting the expiration date in the past immediately removes the cookie\n Util.document.cookie = name + \"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\n }\n };\n /**\r\n * generate a random 32bit number (-0x80000000..0x7FFFFFFF).\r\n */\n\n\n Util.random32 = function () {\n return CoreUtils.random32(true);\n };\n /**\r\n * Gets IE version returning the document emulation mode if we are running on IE, or null otherwise\r\n */\n\n\n Util.getIEVersion = function (userAgentStr) {\n if (userAgentStr === void 0) {\n userAgentStr = null;\n }\n\n var myNav = userAgentStr ? userAgentStr.toLowerCase() : _navigator ? (_navigator.userAgent || \"\").toLowerCase() : \"\";\n\n if (myNav.indexOf(\"msie\") !== -1) {\n return parseInt(myNav.split(\"msie\")[1]);\n } else if (myNav.indexOf(\"trident/\")) {\n var tridentVer = parseInt(myNav.split(\"trident/\")[1]);\n\n if (tridentVer) {\n return tridentVer + 4;\n }\n }\n\n return null;\n };\n /**\r\n * Convert ms to c# time span format\r\n */\n\n\n Util.msToTimeSpan = function (totalms) {\n if (isNaN(totalms) || totalms < 0) {\n totalms = 0;\n }\n\n totalms = Math.round(totalms);\n var ms = \"\" + totalms % 1000;\n var sec = \"\" + Math.floor(totalms / 1000) % 60;\n var min = \"\" + Math.floor(totalms / (1000 * 60)) % 60;\n var hour = \"\" + Math.floor(totalms / (1000 * 60 * 60)) % 24;\n var days = Math.floor(totalms / (1000 * 60 * 60 * 24));\n ms = ms.length === 1 ? \"00\" + ms : ms.length === 2 ? \"0\" + ms : ms;\n sec = sec.length < 2 ? \"0\" + sec : sec;\n min = min.length < 2 ? \"0\" + min : min;\n hour = hour.length < 2 ? \"0\" + hour : hour;\n return (days > 0 ? days + \".\" : \"\") + hour + \":\" + min + \":\" + sec + \".\" + ms;\n };\n /**\r\n * Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error\r\n * happens in a script from other domain (cross origin, CORS).\r\n */\n\n\n Util.isCrossOriginError = function (message, url, lineNumber, columnNumber, error) {\n return (message === \"Script error.\" || message === \"Script error\") && !error;\n };\n /**\r\n * Returns string representation of an object suitable for diagnostics logging.\r\n */\n\n\n Util.dump = function (object) {\n var objectTypeDump = Object[strPrototype].toString.call(object);\n var propertyValueDump = \"\";\n\n if (objectTypeDump === \"[object Error]\") {\n propertyValueDump = \"{ stack: '\" + object.stack + \"', message: '\" + object.message + \"', name: '\" + object.name + \"'\";\n } else if (hasJSON()) {\n propertyValueDump = getJSON().stringify(object);\n }\n\n return objectTypeDump + propertyValueDump;\n };\n /**\r\n * Returns the name of object if it's an Error. Otherwise, returns empty string.\r\n */\n\n\n Util.getExceptionName = function (object) {\n var objectTypeDump = Object[strPrototype].toString.call(object);\n\n if (objectTypeDump === \"[object Error]\") {\n return object.name;\n }\n\n return \"\";\n };\n /**\r\n * Adds an event handler for the specified event to the window\r\n * @param eventName {string} - The name of the event\r\n * @param callback {any} - The callback function that needs to be executed for the given event\r\n * @return {boolean} - true if the handler was successfully added\r\n */\n\n\n Util.addEventHandler = function (eventName, callback) {\n return EventHelper.Attach(getWindow(), eventName, callback);\n };\n /**\r\n * Tells if a browser supports a Beacon API\r\n */\n\n\n Util.IsBeaconApiSupported = function () {\n return 'sendBeacon' in _navigator && _navigator.sendBeacon;\n };\n\n Util.getExtension = function (extensions, identifier) {\n var extension = null;\n var extIx = 0;\n\n while (!extension && extIx < extensions.length) {\n if (extensions[extIx] && extensions[extIx].identifier === identifier) {\n extension = extensions[extIx];\n }\n\n extIx++;\n }\n\n return extension;\n };\n\n Util.document = getDocument() || {};\n Util._canUseLocalStorage = undefined;\n Util._canUseSessionStorage = undefined; // listing only non-geo specific locations\n\n Util._internalEndpoints = [\"https://dc.services.visualstudio.com/v2/track\", \"https://breeze.aimon.applicationinsights.io/v2/track\", \"https://dc-int.services.visualstudio.com/v2/track\"];\n Util.NotSpecified = \"not_specified\";\n /**\r\n * helper method to trim strings (IE8 does not implement String.prototype.trim)\r\n */\n\n Util.trim = CoreUtils.strTrim;\n /**\r\n * generate random id string\r\n */\n\n Util.newId = CoreUtils.newId;\n /**\r\n * generate W3C trace id\r\n */\n\n Util.generateW3CId = CoreUtils.generateW3CId;\n /**\r\n * Check if an object is of type Array\r\n */\n\n Util.isArray = CoreUtils.isArray;\n /**\r\n * Check if an object is of type Error\r\n */\n\n Util.isError = CoreUtils.isError;\n /**\r\n * Check if an object is of type Date\r\n */\n\n Util.isDate = CoreUtils.isDate; // Keeping this name for backward compatibility (for now)\n\n Util.toISOStringForIE8 = CoreUtils.toISOString;\n return Util;\n}();\n\nexport { Util };\n\nvar UrlHelper =\n/** @class */\nfunction () {\n function UrlHelper() {}\n\n UrlHelper.parseUrl = function (url) {\n var anchorIdx = UrlHelper._htmlAnchorIdx;\n var anchorCache = UrlHelper._htmlAnchorElement;\n var tempAnchor = anchorCache[anchorIdx];\n\n if (!UrlHelper.document.createElement) {\n // Always create the temp instance if createElement is not available\n tempAnchor = {\n host: UrlHelper.parseHost(url, true)\n };\n } else if (!anchorCache[anchorIdx]) {\n // Create and cache the unattached anchor instance \n tempAnchor = anchorCache[anchorIdx] = UrlHelper.document.createElement('a');\n }\n\n tempAnchor.href = url; // Move the cache index forward\n\n anchorIdx++;\n\n if (anchorIdx >= anchorCache.length) {\n anchorIdx = 0;\n }\n\n UrlHelper._htmlAnchorIdx = anchorIdx;\n return tempAnchor;\n };\n\n UrlHelper.getAbsoluteUrl = function (url) {\n var result;\n var a = UrlHelper.parseUrl(url);\n\n if (a) {\n result = a.href;\n }\n\n return result;\n };\n\n UrlHelper.getPathName = function (url) {\n var result;\n var a = UrlHelper.parseUrl(url);\n\n if (a) {\n result = a.pathname;\n }\n\n return result;\n };\n\n UrlHelper.getCompleteUrl = function (method, absoluteUrl) {\n if (method) {\n return method.toUpperCase() + \" \" + absoluteUrl;\n } else {\n return absoluteUrl;\n }\n }; // Fallback method to grab host from url if document.createElement method is not available\n\n\n UrlHelper.parseHost = function (url, inclPort) {\n var fullHost = UrlHelper.parseFullHost(url, inclPort);\n\n if (fullHost) {\n var match = fullHost.match(/(www[0-9]?\\.)?(.[^/:]+)(\\:[\\d]+)?/i);\n\n if (match != null && match.length > 3 && _isString(match[2]) && match[2].length > 0) {\n return match[2] + (match[3] || \"\");\n }\n }\n\n return fullHost;\n };\n /**\r\n * Get the full host from the url, optionally including the port\r\n */\n\n\n UrlHelper.parseFullHost = function (url, inclPort) {\n var result = null;\n\n if (url) {\n var match = url.match(/(\\w*):\\/\\/(.[^/:]+)(\\:[\\d]+)?/i);\n\n if (match != null && match.length > 2 && _isString(match[2]) && match[2].length > 0) {\n result = match[2] || \"\";\n\n if (inclPort && match.length > 2) {\n var protocol = (match[1] || \"\").toLowerCase();\n var port = match[3] || \"\"; // IE includes the standard port so pass it off if it's the same as the protocol\n\n if (protocol === \"http\" && port === \":80\") {\n port = \"\";\n } else if (protocol === \"https\" && port === \":443\") {\n port = \"\";\n }\n\n result += port;\n }\n }\n }\n\n return result;\n };\n\n UrlHelper.document = getDocument() || {};\n UrlHelper._htmlAnchorIdx = 0; // Use an array of temporary values as it's possible for multiple calls to parseUrl() will be called with different URLs\n // Using a cache size of 5 for now as it current depth usage is at least 2, so adding a minor buffer to handle future updates\n\n UrlHelper._htmlAnchorElement = [null, null, null, null, null];\n return UrlHelper;\n}();\n\nexport { UrlHelper };\n\nvar CorrelationIdHelper =\n/** @class */\nfunction () {\n function CorrelationIdHelper() {}\n /**\r\n * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.\r\n * Headers are always included if the current domain matches the request domain. If they do not match (CORS),\r\n * they are regex-ed across correlationHeaderDomains and correlationHeaderExcludedDomains to determine if headers are included.\r\n * Some environments don't give information on currentHost via window.location.host (e.g. Cordova). In these cases, the user must\r\n * manually supply domains to include correlation headers on. Else, no headers will be included at all.\r\n */\n\n\n CorrelationIdHelper.canIncludeCorrelationHeader = function (config, requestUrl, currentHost) {\n if (!requestUrl || config && config.disableCorrelationHeaders) {\n return false;\n }\n\n if (config && config.correlationHeaderExcludePatterns) {\n for (var i = 0; i < config.correlationHeaderExcludePatterns.length; i++) {\n if (config.correlationHeaderExcludePatterns[i].test(requestUrl)) {\n return false;\n }\n }\n }\n\n var requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase();\n\n if (requestHost && (requestHost.indexOf(\":443\") !== -1 || requestHost.indexOf(\":80\") !== -1)) {\n // [Bug #1260] IE can include the port even for http and https URLs so if present \n // try and parse it to remove if it matches the default protocol port\n requestHost = (UrlHelper.parseFullHost(requestUrl, true) || \"\").toLowerCase();\n }\n\n if ((!config || !config.enableCorsCorrelation) && requestHost !== currentHost) {\n return false;\n }\n\n var includedDomains = config && config.correlationHeaderDomains;\n\n if (includedDomains) {\n var matchExists_1;\n CoreUtils.arrForEach(includedDomains, function (domain) {\n var regex = new RegExp(domain.toLowerCase().replace(/\\./g, \"\\.\").replace(/\\*/g, \".*\"));\n matchExists_1 = matchExists_1 || regex.test(requestHost);\n });\n\n if (!matchExists_1) {\n return false;\n }\n }\n\n var excludedDomains = config && config.correlationHeaderExcludedDomains;\n\n if (!excludedDomains || excludedDomains.length === 0) {\n return true;\n }\n\n for (var i = 0; i < excludedDomains.length; i++) {\n var regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\./g, \"\\.\").replace(/\\*/g, \".*\"));\n\n if (regex.test(requestHost)) {\n return false;\n }\n } // if we don't know anything about the requestHost, require the user to use included/excludedDomains.\n // Previously we always returned false for a falsy requestHost\n\n\n return requestHost && requestHost.length > 0;\n };\n /**\r\n * Combines target appId and target role name from response header.\r\n */\n\n\n CorrelationIdHelper.getCorrelationContext = function (responseHeader) {\n if (responseHeader) {\n var correlationId = CorrelationIdHelper.getCorrelationContextValue(responseHeader, RequestHeaders.requestContextTargetKey);\n\n if (correlationId && correlationId !== CorrelationIdHelper.correlationIdPrefix) {\n return correlationId;\n }\n }\n };\n /**\r\n * Gets key from correlation response header\r\n */\n\n\n CorrelationIdHelper.getCorrelationContextValue = function (responseHeader, key) {\n if (responseHeader) {\n var keyValues = responseHeader.split(\",\");\n\n for (var i = 0; i < keyValues.length; ++i) {\n var keyValue = keyValues[i].split(\"=\");\n\n if (keyValue.length === 2 && keyValue[0] === key) {\n return keyValue[1];\n }\n }\n }\n };\n\n CorrelationIdHelper.correlationIdPrefix = \"cid-v1:\";\n return CorrelationIdHelper;\n}();\n\nexport { CorrelationIdHelper };\n\nvar AjaxHelper =\n/** @class */\nfunction () {\n function AjaxHelper() {}\n\n AjaxHelper.ParseDependencyPath = function (logger, absoluteUrl, method, commandName) {\n var target,\n name = commandName,\n data = commandName;\n\n if (absoluteUrl && absoluteUrl.length > 0) {\n var parsedUrl = UrlHelper.parseUrl(absoluteUrl);\n target = parsedUrl.host;\n\n if (!name) {\n if (parsedUrl.pathname != null) {\n var pathName = parsedUrl.pathname.length === 0 ? \"/\" : parsedUrl.pathname;\n\n if (pathName.charAt(0) !== '/') {\n pathName = \"/\" + pathName;\n }\n\n data = parsedUrl.pathname;\n name = DataSanitizer.sanitizeString(logger, method ? method + \" \" + pathName : pathName);\n } else {\n name = DataSanitizer.sanitizeString(logger, absoluteUrl);\n }\n }\n } else {\n target = commandName;\n name = commandName;\n }\n\n return {\n target: target,\n name: name,\n data: data\n };\n };\n\n return AjaxHelper;\n}();\n\nexport { AjaxHelper };\n/**\r\n * A utility class that helps getting time related parameters\r\n */\n\nvar DateTimeUtils =\n/** @class */\nfunction () {\n function DateTimeUtils() {}\n /**\r\n * Get the number of milliseconds since 1970/01/01 in local timezone\r\n */\n\n\n DateTimeUtils.Now = function () {\n // returns the window or webworker performance object\n var perf = getPerformance();\n\n if (perf && perf.now && perf.timing) {\n var now = perf.now() + perf.timing.navigationStart; // Known issue with IE where this calculation can be negative, so if it is then ignore and fallback\n\n if (now > 0) {\n return now;\n }\n }\n\n return new Date().getTime();\n };\n /**\r\n * Gets duration between two timestamps\r\n */\n\n\n DateTimeUtils.GetDuration = function (start, end) {\n var result = null;\n\n if (start !== 0 && end !== 0 && !CoreUtils.isNullOrUndefined(start) && !CoreUtils.isNullOrUndefined(end)) {\n result = end - start;\n }\n\n return result;\n };\n\n return DateTimeUtils;\n}();\n\nexport { DateTimeUtils };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\r\n * This is an internal property used to cause internal (reporting) requests to be ignored from reporting\r\n * additional telemetry, to handle polyfil implementations ALL urls used with a disabled request will\r\n * also be ignored for future requests even when this property is not provided.\r\n * Tagging as Ignore as this is an internal value and is not expected to be used outside of the SDK\r\n * @ignore\r\n */\nexport var DisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\nexport var SampleRate = \"sampleRate\";\nexport var ProcessLegacy = \"ProcessLegacy\";\nexport var HttpMethod = \"http.method\";\nexport var DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { DEFAULT_BREEZE_ENDPOINT } from \"./Constants\";\nimport { CoreUtils } from \"@microsoft/applicationinsights-core-js\";\n\nvar ConnectionStringParser =\n/** @class */\nfunction () {\n function ConnectionStringParser() {}\n\n ConnectionStringParser.parse = function (connectionString) {\n if (!connectionString) {\n return {};\n }\n\n var kvPairs = connectionString.split(ConnectionStringParser._FIELDS_SEPARATOR);\n var result = CoreUtils.arrReduce(kvPairs, function (fields, kv) {\n var kvParts = kv.split(ConnectionStringParser._FIELD_KEY_VALUE_SEPARATOR);\n\n if (kvParts.length === 2) {\n var key = kvParts[0].toLowerCase();\n var value = kvParts[1];\n fields[key] = value;\n }\n\n return fields;\n }, {});\n\n if (CoreUtils.objKeys(result).length > 0) {\n // this is a valid connection string, so parse the results\n if (result.endpointsuffix) {\n // use endpoint suffix where overrides are not provided\n var locationPrefix = result.location ? result.location + \".\" : \"\";\n result.ingestionendpoint = result.ingestionendpoint || \"https://\" + locationPrefix + \"dc.\" + result.endpointsuffix;\n } // apply the default endpoints\n\n\n result.ingestionendpoint = result.ingestionendpoint || DEFAULT_BREEZE_ENDPOINT;\n }\n\n return result;\n };\n\n ConnectionStringParser._FIELDS_SEPARATOR = \";\";\n ConnectionStringParser._FIELD_KEY_VALUE_SEPARATOR = \"=\";\n return ConnectionStringParser;\n}();\n\nexport { ConnectionStringParser };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\n\n/**\r\n * Data struct to contain only C section with custom fields.\r\n */\nvar Base =\n/** @class */\nfunction () {\n function Base() {}\n\n return Base;\n}();\n\nexport { Base };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\nimport { Base } from './Base';\n/**\r\n * Data struct to contain both B and C sections.\r\n */\n\nvar Data =\n/** @class */\nfunction (_super) {\n __extends(Data, _super);\n\n function Data() {\n return _super.call(this) || this;\n }\n\n return Data;\n}(Base);\n\nexport { Data };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Envelope as AIEnvelope } from '../../Interfaces/Contracts/Generated/Envelope';\nimport { DataSanitizer } from './DataSanitizer';\nimport { FieldType } from '../../Enums';\nimport { Util } from '../../Util';\nimport { CoreUtils } from '@microsoft/applicationinsights-core-js';\n\nvar Envelope =\n/** @class */\nfunction (_super) {\n __extends(Envelope, _super);\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\n\n\n function Envelope(logger, data, name) {\n var _this = _super.call(this) || this;\n\n _this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;\n _this.data = data;\n _this.time = CoreUtils.toISOString(new Date());\n _this.aiDataContract = {\n time: FieldType.Required,\n iKey: FieldType.Required,\n name: FieldType.Required,\n sampleRate: function sampleRate() {\n return _this.sampleRate === 100 ? FieldType.Hidden : FieldType.Required;\n },\n tags: FieldType.Required,\n data: FieldType.Required\n };\n return _this;\n }\n\n return Envelope;\n}(AIEnvelope);\n\nexport { Envelope };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\r\n * System variables for a telemetry item.\r\n */\nvar Envelope =\n/** @class */\nfunction () {\n function Envelope() {\n this.ver = 1;\n this.sampleRate = 100.0;\n this.tags = {};\n }\n\n return Envelope;\n}();\n\nexport { Envelope };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\n\n/**\r\n * The abstract common base of all domains.\r\n */\nvar Domain =\n/** @class */\nfunction () {\n function Domain() {}\n\n return Domain;\n}();\n\nexport { Domain };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\nimport { Domain } from './Domain';\n/**\r\n * Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.\r\n */\n\nvar EventData =\n/** @class */\nfunction (_super) {\n __extends(EventData, _super);\n\n function EventData() {\n var _this = _super.call(this) || this;\n\n _this.ver = 2;\n _this.properties = {};\n _this.measurements = {};\n return _this;\n }\n\n return EventData;\n}(Domain);\n\nexport { EventData };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { EventData } from '../Interfaces/Contracts/Generated/EventData';\nimport { DataSanitizer } from './Common/DataSanitizer';\nimport { FieldType } from '../Enums';\nimport { Util } from '../Util';\n\nvar Event =\n/** @class */\nfunction (_super) {\n __extends(Event, _super);\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\n\n\n function Event(logger, name, properties, measurements) {\n var _this = _super.call(this) || this;\n\n _this.aiDataContract = {\n ver: FieldType.Required,\n name: FieldType.Required,\n properties: FieldType.Default,\n measurements: FieldType.Default\n };\n _this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;\n _this.properties = DataSanitizer.sanitizeProperties(logger, properties);\n _this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);\n return _this;\n }\n\n Event.envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\n Event.dataType = \"EventData\";\n return Event;\n}(EventData);\n\nexport { Event };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\n\n/**\r\n * Stack frame information.\r\n */\nvar StackFrame =\n/** @class */\nfunction () {\n function StackFrame() {}\n\n return StackFrame;\n}();\n\nexport { StackFrame };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Domain } from './Domain';\n/**\r\n * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.\r\n */\n\nvar ExceptionData =\n/** @class */\nfunction (_super) {\n __extends(ExceptionData, _super);\n\n function ExceptionData() {\n var _this = _super.call(this) || this;\n\n _this.ver = 2;\n _this.exceptions = [];\n _this.properties = {};\n _this.measurements = {};\n return _this;\n }\n\n return ExceptionData;\n}(Domain);\n\nexport { ExceptionData };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\r\n * Exception details of the exception in a chain.\r\n */\nvar ExceptionDetails =\n/** @class */\nfunction () {\n function ExceptionDetails() {\n this.hasFullStack = true;\n this.parsedStack = [];\n }\n\n return ExceptionDetails;\n}();\n\nexport { ExceptionDetails };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { StackFrame } from '../Interfaces/Contracts/Generated/StackFrame';\nimport { ExceptionData } from '../Interfaces/Contracts/Generated/ExceptionData';\nimport { ExceptionDetails } from '../Interfaces/Contracts/Generated/ExceptionDetails';\nimport { DataSanitizer } from './Common/DataSanitizer';\nimport { FieldType } from '../Enums';\nimport { Util } from '../Util';\nimport { CoreUtils } from '@microsoft/applicationinsights-core-js';\nvar strError = \"error\";\n\nfunction _isExceptionDetailsInternal(value) {\n return \"hasFullStack\" in value && \"typeName\" in value;\n}\n\nfunction _isExceptionInternal(value) {\n return \"ver\" in value && \"exceptions\" in value && \"properties\" in value;\n}\n\nfunction _getErrorType(errorType) {\n // Gets the Error Type by passing the constructor (used to get the true type of native error object).\n var typeName = \"\";\n\n if (errorType) {\n typeName = errorType.typeName || errorType.name || \"\";\n\n if (!typeName) {\n try {\n var funcNameRegex = /function (.{1,})\\(/;\n var results = funcNameRegex.exec(errorType.constructor.toString());\n typeName = results && results.length > 1 ? results[1] : \"\";\n } catch (e) {// Ignore\n }\n }\n }\n\n return typeName;\n}\n\nvar Exception =\n/** @class */\nfunction (_super) {\n __extends(Exception, _super);\n /**\r\n * Constructs a new instance of the ExceptionTelemetry object\r\n */\n\n\n function Exception(logger, exception, properties, measurements, severityLevel, id) {\n var _this = _super.call(this) || this;\n\n _this.aiDataContract = {\n ver: FieldType.Required,\n exceptions: FieldType.Required,\n severityLevel: FieldType.Default,\n properties: FieldType.Default,\n measurements: FieldType.Default\n };\n\n if (!_isExceptionInternal(exception)) {\n _this.exceptions = [new _ExceptionDetails(logger, exception)];\n _this.properties = DataSanitizer.sanitizeProperties(logger, properties) || {};\n _this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);\n\n if (severityLevel) {\n _this.severityLevel = severityLevel;\n }\n\n if (id) {\n _this.id = id;\n }\n } else {\n _this.exceptions = exception.exceptions;\n _this.properties = exception.properties;\n _this.measurements = exception.measurements;\n\n if (exception.severityLevel) {\n _this.severityLevel = exception.severityLevel;\n }\n\n if (exception.id) {\n _this.id = exception.id;\n }\n\n if (exception.problemGroup) {\n _this.problemGroup = exception.problemGroup;\n } // bool/int types, use isNullOrUndefined\n\n\n _this.ver = 2; // TODO: handle the CS\"4.0\" ==> breeze 2 conversion in a better way\n\n if (!CoreUtils.isNullOrUndefined(exception.isManual)) {\n _this.isManual = exception.isManual;\n }\n }\n\n return _this;\n }\n\n Exception.CreateFromInterface = function (logger, exception, properties, measurements) {\n var exceptions = exception.exceptions && CoreUtils.arrMap(exception.exceptions, function (ex) {\n return _ExceptionDetails.CreateFromInterface(logger, ex);\n });\n var exceptionData = new Exception(logger, __assign({}, exception, {\n exceptions: exceptions\n }), properties, measurements);\n return exceptionData;\n };\n\n Exception.prototype.toInterface = function () {\n var _a = this,\n exceptions = _a.exceptions,\n properties = _a.properties,\n measurements = _a.measurements,\n severityLevel = _a.severityLevel,\n ver = _a.ver,\n problemGroup = _a.problemGroup,\n id = _a.id,\n isManual = _a.isManual;\n\n var exceptionDetailsInterface = exceptions instanceof Array && CoreUtils.arrMap(exceptions, function (exception) {\n return exception.toInterface();\n }) || undefined;\n return {\n ver: \"4.0\",\n exceptions: exceptionDetailsInterface,\n severityLevel: severityLevel,\n properties: properties,\n measurements: measurements,\n problemGroup: problemGroup,\n id: id,\n isManual: isManual\n };\n };\n /**\r\n * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.\r\n */\n\n\n Exception.CreateSimpleException = function (message, typeName, assembly, fileName, details, line) {\n return {\n exceptions: [{\n hasFullStack: true,\n message: message,\n stack: details,\n typeName: typeName\n }]\n };\n };\n\n Exception.envelopeType = \"Microsoft.ApplicationInsights.{0}.Exception\";\n Exception.dataType = \"ExceptionData\";\n return Exception;\n}(ExceptionData);\n\nexport { Exception };\n\nvar _ExceptionDetails =\n/** @class */\nfunction (_super) {\n __extends(_ExceptionDetails, _super);\n\n function _ExceptionDetails(logger, exception) {\n var _this = _super.call(this) || this;\n\n _this.aiDataContract = {\n id: FieldType.Default,\n outerId: FieldType.Default,\n typeName: FieldType.Required,\n message: FieldType.Required,\n hasFullStack: FieldType.Default,\n stack: FieldType.Default,\n parsedStack: FieldType.Array\n };\n\n if (!_isExceptionDetailsInternal(exception)) {\n var error = exception;\n\n if (!Util.isError(error)) {\n error = error[strError] || error.evt || error;\n }\n\n _this.typeName = DataSanitizer.sanitizeString(logger, _getErrorType(error)) || Util.NotSpecified;\n _this.message = DataSanitizer.sanitizeMessage(logger, exception.message) || Util.NotSpecified;\n var stack = exception.stack;\n _this.parsedStack = _ExceptionDetails.parseStack(stack);\n _this.stack = DataSanitizer.sanitizeException(logger, stack);\n _this.hasFullStack = Util.isArray(_this.parsedStack) && _this.parsedStack.length > 0;\n } else {\n _this.typeName = exception.typeName;\n _this.message = exception.message;\n _this.stack = exception.stack;\n _this.parsedStack = exception.parsedStack;\n _this.hasFullStack = exception.hasFullStack;\n }\n\n return _this;\n }\n\n _ExceptionDetails.prototype.toInterface = function () {\n var parsedStack = this.parsedStack instanceof Array && CoreUtils.arrMap(this.parsedStack, function (frame) {\n return frame.toInterface();\n });\n var exceptionDetailsInterface = {\n id: this.id,\n outerId: this.outerId,\n typeName: this.typeName,\n message: this.message,\n hasFullStack: this.hasFullStack,\n stack: this.stack,\n parsedStack: parsedStack || undefined\n };\n return exceptionDetailsInterface;\n };\n\n _ExceptionDetails.CreateFromInterface = function (logger, exception) {\n var parsedStack = exception.parsedStack instanceof Array && CoreUtils.arrMap(exception.parsedStack, function (frame) {\n return _StackFrame.CreateFromInterface(frame);\n }) || exception.parsedStack;\n var exceptionDetails = new _ExceptionDetails(logger, __assign({}, exception, {\n parsedStack: parsedStack\n }));\n return exceptionDetails;\n };\n\n _ExceptionDetails.parseStack = function (stack) {\n var parsedStack;\n\n if (CoreUtils.isString(stack)) {\n var frames_1 = stack.split('\\n');\n parsedStack = [];\n var level = 0;\n var totalSizeInBytes = 0;\n\n for (var i = 0; i <= frames_1.length; i++) {\n var frame = frames_1[i];\n\n if (_StackFrame.regex.test(frame)) {\n var parsedFrame = new _StackFrame(frames_1[i], level++);\n totalSizeInBytes += parsedFrame.sizeInBytes;\n parsedStack.push(parsedFrame);\n }\n } // DP Constraint - exception parsed stack must be < 32KB\n // remove frames from the middle to meet the threshold\n\n\n var exceptionParsedStackThreshold = 32 * 1024;\n\n if (totalSizeInBytes > exceptionParsedStackThreshold) {\n var left = 0;\n var right = parsedStack.length - 1;\n var size = 0;\n var acceptedLeft = left;\n var acceptedRight = right;\n\n while (left < right) {\n // check size\n var lSize = parsedStack[left].sizeInBytes;\n var rSize = parsedStack[right].sizeInBytes;\n size += lSize + rSize;\n\n if (size > exceptionParsedStackThreshold) {\n // remove extra frames from the middle\n var howMany = acceptedRight - acceptedLeft + 1;\n parsedStack.splice(acceptedLeft, howMany);\n break;\n } // update pointers\n\n\n acceptedLeft = left;\n acceptedRight = right;\n left++;\n right--;\n }\n }\n }\n\n return parsedStack;\n };\n\n return _ExceptionDetails;\n}(ExceptionDetails);\n\nexport { _ExceptionDetails };\n\nvar _StackFrame =\n/** @class */\nfunction (_super) {\n __extends(_StackFrame, _super);\n\n function _StackFrame(sourceFrame, level) {\n var _this = _super.call(this) || this;\n\n _this.sizeInBytes = 0;\n _this.aiDataContract = {\n level: FieldType.Required,\n method: FieldType.Required,\n assembly: FieldType.Default,\n fileName: FieldType.Default,\n line: FieldType.Default\n }; // Not converting this to CoreUtils.isString() as typescript uses this logic to \"understand\" the different\n // types for the 2 different code paths\n\n if (typeof sourceFrame === \"string\") {\n var frame = sourceFrame;\n _this.level = level;\n _this.method = \"\";\n _this.assembly = Util.trim(frame);\n _this.fileName = \"\";\n _this.line = 0;\n var matches = frame.match(_StackFrame.regex);\n\n if (matches && matches.length >= 5) {\n _this.method = Util.trim(matches[2]) || _this.method;\n _this.fileName = Util.trim(matches[4]);\n _this.line = parseInt(matches[5]) || 0;\n }\n } else {\n _this.level = sourceFrame.level;\n _this.method = sourceFrame.method;\n _this.assembly = sourceFrame.assembly;\n _this.fileName = sourceFrame.fileName;\n _this.line = sourceFrame.line;\n _this.sizeInBytes = 0;\n }\n\n _this.sizeInBytes += _this.method.length;\n _this.sizeInBytes += _this.fileName.length;\n _this.sizeInBytes += _this.assembly.length; // todo: these might need to be removed depending on how the back-end settles on their size calculation\n\n _this.sizeInBytes += _StackFrame.baseSize;\n _this.sizeInBytes += _this.level.toString().length;\n _this.sizeInBytes += _this.line.toString().length;\n return _this;\n }\n\n _StackFrame.CreateFromInterface = function (frame) {\n return new _StackFrame(frame, null\n /* level is available in frame interface */\n );\n };\n\n _StackFrame.prototype.toInterface = function () {\n return {\n level: this.level,\n method: this.method,\n assembly: this.assembly,\n fileName: this.fileName,\n line: this.line\n };\n }; // regex to match stack frames from ie/chrome/ff\n // methodName=$2, fileName=$4, lineNo=$5, column=$6\n\n\n _StackFrame.regex = /^([\\s]+at)?(.*?)(\\@|\\s\\(|\\s)([^\\(\\@\\n]+):([0-9]+):([0-9]+)(\\)?)$/;\n _StackFrame.baseSize = 58; // '{\"method\":\"\",\"level\":,\"assembly\":\"\",\"fileName\":\"\",\"line\":}'.length\n\n return _StackFrame;\n}(StackFrame);\n\nexport { _StackFrame };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\n\n/**\r\n * Type of the metric data measurement.\r\n */\nexport var DataPointType;\n\n(function (DataPointType) {\n DataPointType[DataPointType[\"Measurement\"] = 0] = \"Measurement\";\n DataPointType[DataPointType[\"Aggregation\"] = 1] = \"Aggregation\";\n})(DataPointType || (DataPointType = {}));","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\nimport { Domain } from './Domain';\n/**\r\n * An instance of the Metric item is a list of measurements (single data points) and/or aggregations.\r\n */\n\nvar MetricData =\n/** @class */\nfunction (_super) {\n __extends(MetricData, _super);\n\n function MetricData() {\n var _this = _super.call(this) || this;\n\n _this.ver = 2;\n _this.metrics = [];\n _this.properties = {};\n _this.measurements = {};\n return _this;\n }\n\n return MetricData;\n}(Domain);\n\nexport { MetricData };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\nimport { DataPointType } from './DataPointType';\n/**\r\n * Metric data single measurement.\r\n */\n\nvar DataPoint =\n/** @class */\nfunction () {\n function DataPoint() {\n this.kind = DataPointType.Measurement;\n }\n\n return DataPoint;\n}();\n\nexport { DataPoint };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\n\n/**\r\n * Defines the level of severity for the event.\r\n */\nexport var SeverityLevel;\n\n(function (SeverityLevel) {\n SeverityLevel[SeverityLevel[\"Verbose\"] = 0] = \"Verbose\";\n SeverityLevel[SeverityLevel[\"Information\"] = 1] = \"Information\";\n SeverityLevel[SeverityLevel[\"Warning\"] = 2] = \"Warning\";\n SeverityLevel[SeverityLevel[\"Error\"] = 3] = \"Error\";\n SeverityLevel[SeverityLevel[\"Critical\"] = 4] = \"Critical\";\n})(SeverityLevel || (SeverityLevel = {}));","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { DataPoint as AIDataPoint } from '../../Interfaces/Contracts/Generated/DataPoint';\nimport { FieldType } from '../../Enums';\n\nvar DataPoint =\n/** @class */\nfunction (_super) {\n __extends(DataPoint, _super);\n\n function DataPoint() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\r\n * The data contract for serializing this object.\r\n */\n\n\n _this.aiDataContract = {\n name: FieldType.Required,\n kind: FieldType.Default,\n value: FieldType.Required,\n count: FieldType.Default,\n min: FieldType.Default,\n max: FieldType.Default,\n stdDev: FieldType.Default\n };\n return _this;\n }\n\n return DataPoint;\n}(AIDataPoint);\n\nexport { DataPoint };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { MetricData } from '../Interfaces/Contracts/Generated/MetricData';\nimport { DataSanitizer } from './Common/DataSanitizer';\nimport { FieldType } from '../Enums';\nimport { DataPoint } from './Common/DataPoint';\nimport { Util } from '../Util';\n\nvar Metric =\n/** @class */\nfunction (_super) {\n __extends(Metric, _super);\n /**\r\n * Constructs a new instance of the MetricTelemetry object\r\n */\n\n\n function Metric(logger, name, value, count, min, max, properties, measurements) {\n var _this = _super.call(this) || this;\n\n _this.aiDataContract = {\n ver: FieldType.Required,\n metrics: FieldType.Required,\n properties: FieldType.Default\n };\n var dataPoint = new DataPoint();\n dataPoint.count = count > 0 ? count : undefined;\n dataPoint.max = isNaN(max) || max === null ? undefined : max;\n dataPoint.min = isNaN(min) || min === null ? undefined : min;\n dataPoint.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;\n dataPoint.value = value;\n _this.metrics = [dataPoint];\n _this.properties = DataSanitizer.sanitizeProperties(logger, properties);\n _this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);\n return _this;\n }\n\n Metric.envelopeType = \"Microsoft.ApplicationInsights.{0}.Metric\";\n Metric.dataType = \"MetricData\";\n return Metric;\n}(MetricData);\n\nexport { Metric };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\nimport { EventData } from './EventData';\n/**\r\n * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.\r\n */\n\nvar PageViewData =\n/** @class */\nfunction (_super) {\n __extends(PageViewData, _super);\n\n function PageViewData() {\n var _this = _super.call(this) || this;\n\n _this.ver = 2;\n _this.properties = {};\n _this.measurements = {};\n return _this;\n }\n\n return PageViewData;\n}(EventData);\n\nexport { PageViewData };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { PageViewData } from '../Interfaces/Contracts/Generated/PageViewData';\nimport { DataSanitizer } from './Common/DataSanitizer';\nimport { FieldType } from '../Enums';\nimport { Util } from '../Util';\n\nvar PageView =\n/** @class */\nfunction (_super) {\n __extends(PageView, _super);\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\n\n\n function PageView(logger, name, url, durationMs, properties, measurements, id) {\n var _this = _super.call(this) || this;\n\n _this.aiDataContract = {\n ver: FieldType.Required,\n name: FieldType.Default,\n url: FieldType.Default,\n duration: FieldType.Default,\n properties: FieldType.Default,\n measurements: FieldType.Default,\n id: FieldType.Default\n };\n _this.id = DataSanitizer.sanitizeId(logger, id);\n _this.url = DataSanitizer.sanitizeUrl(logger, url);\n _this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;\n\n if (!isNaN(durationMs)) {\n _this.duration = Util.msToTimeSpan(durationMs);\n }\n\n _this.properties = DataSanitizer.sanitizeProperties(logger, properties);\n _this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);\n return _this;\n }\n\n PageView.envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\n PageView.dataType = \"PageviewData\";\n return PageView;\n}(PageViewData);\n\nexport { PageView };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { DataSanitizer } from './Common/DataSanitizer';\nimport { FieldType } from '../Enums';\nimport { Util, AjaxHelper } from '../Util';\nimport { RemoteDependencyData as GeneratedRemoteDependencyData } from '../Interfaces/Contracts/Generated/RemoteDependencyData';\n\nvar RemoteDependencyData =\n/** @class */\nfunction (_super) {\n __extends(RemoteDependencyData, _super);\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */\n\n\n function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, requestAPI, correlationContext, properties, measurements) {\n if (requestAPI === void 0) {\n requestAPI = \"Ajax\";\n }\n\n var _this = _super.call(this) || this;\n\n _this.aiDataContract = {\n id: FieldType.Required,\n ver: FieldType.Required,\n name: FieldType.Default,\n resultCode: FieldType.Default,\n duration: FieldType.Default,\n success: FieldType.Default,\n data: FieldType.Default,\n target: FieldType.Default,\n type: FieldType.Default,\n properties: FieldType.Default,\n measurements: FieldType.Default,\n kind: FieldType.Default,\n value: FieldType.Default,\n count: FieldType.Default,\n min: FieldType.Default,\n max: FieldType.Default,\n stdDev: FieldType.Default,\n dependencyKind: FieldType.Default,\n dependencySource: FieldType.Default,\n commandName: FieldType.Default,\n dependencyTypeName: FieldType.Default\n };\n _this.id = id;\n _this.duration = Util.msToTimeSpan(value);\n _this.success = success;\n _this.resultCode = resultCode + \"\";\n _this.type = DataSanitizer.sanitizeString(logger, requestAPI);\n var dependencyFields = AjaxHelper.ParseDependencyPath(logger, absoluteUrl, method, commandName);\n _this.data = DataSanitizer.sanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available\n\n _this.target = DataSanitizer.sanitizeString(logger, dependencyFields.target);\n\n if (correlationContext) {\n _this.target = _this.target + \" | \" + correlationContext;\n }\n\n _this.name = DataSanitizer.sanitizeString(logger, dependencyFields.name);\n _this.properties = DataSanitizer.sanitizeProperties(logger, properties);\n _this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);\n return _this;\n }\n\n RemoteDependencyData.envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\n RemoteDependencyData.dataType = \"RemoteDependencyData\";\n return RemoteDependencyData;\n}(GeneratedRemoteDependencyData);\n\nexport { RemoteDependencyData };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\nimport { Domain } from './Domain';\n/**\r\n * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.\r\n */\n\nvar RemoteDependencyData =\n/** @class */\nfunction (_super) {\n __extends(RemoteDependencyData, _super);\n\n function RemoteDependencyData() {\n var _this = _super.call(this) || this;\n\n _this.ver = 2;\n _this.success = true;\n _this.properties = {};\n _this.measurements = {};\n return _this;\n }\n\n return RemoteDependencyData;\n}(Domain);\n\nexport { RemoteDependencyData };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { MessageData } from '../Interfaces/Contracts/Generated/MessageData';\nimport { DataSanitizer } from './Common/DataSanitizer';\nimport { FieldType } from '../Enums';\nimport { Util } from '../Util';\n\nvar Trace =\n/** @class */\nfunction (_super) {\n __extends(Trace, _super);\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */\n\n\n function Trace(logger, message, severityLevel, properties, measurements) {\n var _this = _super.call(this) || this;\n\n _this.aiDataContract = {\n ver: FieldType.Required,\n message: FieldType.Required,\n severityLevel: FieldType.Default,\n properties: FieldType.Default\n };\n message = message || Util.NotSpecified;\n _this.message = DataSanitizer.sanitizeMessage(logger, message);\n _this.properties = DataSanitizer.sanitizeProperties(logger, properties);\n _this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);\n\n if (severityLevel) {\n _this.severityLevel = severityLevel;\n }\n\n return _this;\n }\n\n Trace.envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\n Trace.dataType = \"MessageData\";\n return Trace;\n}(MessageData);\n\nexport { Trace };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\nimport { Domain } from './Domain';\n/**\r\n * Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements.\r\n */\n\nvar MessageData =\n/** @class */\nfunction (_super) {\n __extends(MessageData, _super);\n\n function MessageData() {\n var _this = _super.call(this) || this;\n\n _this.ver = 2;\n _this.properties = {};\n _this.measurements = {};\n return _this;\n }\n\n return MessageData;\n}(Domain);\n\nexport { MessageData };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { PageViewPerfData } from '../Interfaces/Contracts/Generated/PageViewPerfData';\nimport { FieldType } from '../Enums';\nimport { DataSanitizer } from './Common/DataSanitizer';\nimport { Util } from '../Util';\n\nvar PageViewPerformance =\n/** @class */\nfunction (_super) {\n __extends(PageViewPerformance, _super);\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\n\n\n function PageViewPerformance(logger, name, url, unused, properties, measurements, cs4BaseData) {\n var _this = _super.call(this) || this;\n\n _this.aiDataContract = {\n ver: FieldType.Required,\n name: FieldType.Default,\n url: FieldType.Default,\n duration: FieldType.Default,\n perfTotal: FieldType.Default,\n networkConnect: FieldType.Default,\n sentRequest: FieldType.Default,\n receivedResponse: FieldType.Default,\n domProcessing: FieldType.Default,\n properties: FieldType.Default,\n measurements: FieldType.Default\n };\n _this.url = DataSanitizer.sanitizeUrl(logger, url);\n _this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;\n _this.properties = DataSanitizer.sanitizeProperties(logger, properties);\n _this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);\n\n if (cs4BaseData) {\n _this.domProcessing = cs4BaseData.domProcessing;\n _this.duration = cs4BaseData.duration;\n _this.networkConnect = cs4BaseData.networkConnect;\n _this.perfTotal = cs4BaseData.perfTotal;\n _this.receivedResponse = cs4BaseData.receivedResponse;\n _this.sentRequest = cs4BaseData.sentRequest;\n }\n\n return _this;\n }\n\n PageViewPerformance.envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\n PageViewPerformance.dataType = \"PageviewPerformanceData\";\n return PageViewPerformance;\n}(PageViewPerfData);\n\nexport { PageViewPerformance };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\nimport { PageViewData } from './PageViewData';\n/**\r\n * An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.\r\n */\n\nvar PageViewPerfData =\n/** @class */\nfunction (_super) {\n __extends(PageViewPerfData, _super);\n\n function PageViewPerfData() {\n var _this = _super.call(this) || this;\n\n _this.ver = 2;\n _this.properties = {};\n _this.measurements = {};\n return _this;\n }\n\n return PageViewPerfData;\n}(PageViewData);\n\nexport { PageViewPerfData };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Data as AIData } from '../../Interfaces/Contracts/Generated/Data';\nimport { FieldType } from '../../Enums';\n\nvar Data =\n/** @class */\nfunction (_super) {\n __extends(Data, _super);\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\n\n\n function Data(baseType, data) {\n var _this = _super.call(this) || this;\n /**\r\n * The data contract for serializing this object.\r\n */\n\n\n _this.aiDataContract = {\n baseType: FieldType.Required,\n baseData: FieldType.Required\n };\n _this.baseType = baseType;\n _this.baseData = data;\n return _this;\n }\n\n return Data;\n}(AIData);\n\nexport { Data };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { CoreUtils } from '@microsoft/applicationinsights-core-js';\n\nvar ConfigurationManager =\n/** @class */\nfunction () {\n function ConfigurationManager() {}\n\n ConfigurationManager.getConfig = function (config, field, identifier, defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = false;\n }\n\n var configValue;\n\n if (identifier && config.extensionConfig && config.extensionConfig[identifier] && !CoreUtils.isNullOrUndefined(config.extensionConfig[identifier][field])) {\n configValue = config.extensionConfig[identifier][field];\n } else {\n configValue = config[field];\n }\n\n return !CoreUtils.isNullOrUndefined(configValue) ? configValue : defaultValue;\n };\n\n return ConfigurationManager;\n}();\n\nexport { ConfigurationManager };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n// THIS FILE WAS AUTOGENERATED\nvar ContextTagKeys =\n/** @class */\nfunction () {\n function ContextTagKeys() {\n this.applicationVersion = \"ai.application.ver\";\n this.applicationBuild = \"ai.application.build\";\n this.applicationTypeId = \"ai.application.typeId\";\n this.applicationId = \"ai.application.applicationId\";\n this.applicationLayer = \"ai.application.layer\";\n this.deviceId = \"ai.device.id\";\n this.deviceIp = \"ai.device.ip\";\n this.deviceLanguage = \"ai.device.language\";\n this.deviceLocale = \"ai.device.locale\";\n this.deviceModel = \"ai.device.model\";\n this.deviceFriendlyName = \"ai.device.friendlyName\";\n this.deviceNetwork = \"ai.device.network\";\n this.deviceNetworkName = \"ai.device.networkName\";\n this.deviceOEMName = \"ai.device.oemName\";\n this.deviceOS = \"ai.device.os\";\n this.deviceOSVersion = \"ai.device.osVersion\";\n this.deviceRoleInstance = \"ai.device.roleInstance\";\n this.deviceRoleName = \"ai.device.roleName\";\n this.deviceScreenResolution = \"ai.device.screenResolution\";\n this.deviceType = \"ai.device.type\";\n this.deviceMachineName = \"ai.device.machineName\";\n this.deviceVMName = \"ai.device.vmName\";\n this.deviceBrowser = \"ai.device.browser\";\n this.deviceBrowserVersion = \"ai.device.browserVersion\";\n this.locationIp = \"ai.location.ip\";\n this.locationCountry = \"ai.location.country\";\n this.locationProvince = \"ai.location.province\";\n this.locationCity = \"ai.location.city\";\n this.operationId = \"ai.operation.id\";\n this.operationName = \"ai.operation.name\";\n this.operationParentId = \"ai.operation.parentId\";\n this.operationRootId = \"ai.operation.rootId\";\n this.operationSyntheticSource = \"ai.operation.syntheticSource\";\n this.operationCorrelationVector = \"ai.operation.correlationVector\";\n this.sessionId = \"ai.session.id\";\n this.sessionIsFirst = \"ai.session.isFirst\";\n this.sessionIsNew = \"ai.session.isNew\";\n this.userAccountAcquisitionDate = \"ai.user.accountAcquisitionDate\";\n this.userAccountId = \"ai.user.accountId\";\n this.userAgent = \"ai.user.userAgent\";\n this.userId = \"ai.user.id\";\n this.userStoreRegion = \"ai.user.storeRegion\";\n this.userAuthUserId = \"ai.user.authUserId\";\n this.userAnonymousUserAcquisitionDate = \"ai.user.anonUserAcquisitionDate\";\n this.userAuthenticatedUserAcquisitionDate = \"ai.user.authUserAcquisitionDate\";\n this.cloudName = \"ai.cloud.name\";\n this.cloudRole = \"ai.cloud.role\";\n this.cloudRoleVer = \"ai.cloud.roleVer\";\n this.cloudRoleInstance = \"ai.cloud.roleInstance\";\n this.cloudEnvironment = \"ai.cloud.environment\";\n this.cloudLocation = \"ai.cloud.location\";\n this.cloudDeploymentUnit = \"ai.cloud.deploymentUnit\";\n this.internalNodeName = \"ai.internal.nodeName\";\n this.internalSdkVersion = \"ai.internal.sdkVersion\";\n this.internalAgentVersion = \"ai.internal.agentVersion\";\n this.internalSnippet = \"ai.internal.snippet\";\n this.internalSdkSrc = \"ai.internal.sdkSrc\";\n }\n\n return ContextTagKeys;\n}();\n\nexport { ContextTagKeys };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Util } from \"./Util\";\nimport { DataSanitizer } from \"./Telemetry/Common/DataSanitizer\";\nimport { CoreUtils, objForEachKey } from \"@microsoft/applicationinsights-core-js\";\n\nvar TelemetryItemCreator =\n/** @class */\nfunction () {\n function TelemetryItemCreator() {}\n /**\r\n * Create a telemetry item that the 1DS channel understands\r\n * @param item domain specific properties; part B\r\n * @param baseType telemetry item type. ie PageViewData\r\n * @param envelopeName name of the envelope. ie Microsoft.ApplicationInsights..PageView\r\n * @param customProperties user defined custom properties; part C\r\n * @param systemProperties system properties that are added to the context; part A\r\n * @returns ITelemetryItem that is sent to channel\r\n */\n\n\n TelemetryItemCreator.create = function (item, baseType, envelopeName, logger, customProperties, systemProperties) {\n envelopeName = DataSanitizer.sanitizeString(logger, envelopeName) || Util.NotSpecified;\n\n if (CoreUtils.isNullOrUndefined(item) || CoreUtils.isNullOrUndefined(baseType) || CoreUtils.isNullOrUndefined(envelopeName)) {\n throw Error(\"Input doesn't contain all required fields\");\n }\n\n var telemetryItem = {\n name: envelopeName,\n time: CoreUtils.toISOString(new Date()),\n iKey: \"\",\n ext: systemProperties ? systemProperties : {},\n tags: [],\n data: {},\n baseType: baseType,\n baseData: item // Part B\n\n }; // Part C\n\n if (!CoreUtils.isNullOrUndefined(customProperties)) {\n objForEachKey(customProperties, function (prop, value) {\n telemetryItem.data[prop] = value;\n });\n }\n\n return telemetryItem;\n };\n\n return TelemetryItemCreator;\n}();\n\nexport { TelemetryItemCreator };","import { ContextTagKeys } from \"./Contracts/Generated/ContextTagKeys\";\n\nvar Extensions =\n/** @class */\nfunction () {\n function Extensions() {}\n\n Extensions.UserExt = \"user\";\n Extensions.DeviceExt = \"device\";\n Extensions.TraceExt = \"trace\";\n Extensions.WebExt = \"web\";\n Extensions.AppExt = \"app\";\n Extensions.OSExt = \"os\";\n Extensions.SessionExt = \"ses\";\n Extensions.SDKExt = \"sdk\";\n return Extensions;\n}();\n\nexport { Extensions };\nexport var CtxTagKeys = new ContextTagKeys();","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport '@microsoft/applicationinsights-shims';\nexport { Util, CorrelationIdHelper, UrlHelper, DateTimeUtils } from './Util';\nexport { ConnectionStringParser } from './ConnectionStringParser';\nexport { FieldType } from './Enums';\nexport { RequestHeaders } from './RequestResponseHeaders';\nexport { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT } from './Constants';\nexport { Data as AIData } from './Interfaces/Contracts/Generated/Data';\nexport { Base as AIBase } from './Interfaces/Contracts/Generated/Base';\nexport { Envelope } from './Telemetry/Common/Envelope';\nexport { Event } from './Telemetry/Event';\nexport { Exception } from './Telemetry/Exception';\nexport { Metric } from './Telemetry/Metric';\nexport { PageView } from './Telemetry/PageView';\nexport { PageViewData } from './Interfaces/Contracts/Generated/PageViewData';\nexport { RemoteDependencyData } from './Telemetry/RemoteDependencyData';\nexport { Trace } from './Telemetry/Trace';\nexport { PageViewPerformance } from './Telemetry/PageViewPerformance';\nexport { Data } from './Telemetry/Common/Data';\nexport { SeverityLevel } from './Interfaces/Contracts/Generated/SeverityLevel';\nexport { ConfigurationManager } from './Interfaces/IConfig';\nexport { ContextTagKeys } from './Interfaces/Contracts/Generated/ContextTagKeys';\nexport { DataSanitizer } from './Telemetry/Common/DataSanitizer';\nexport { TelemetryItemCreator } from './TelemetryItemCreator';\nexport { CtxTagKeys, Extensions } from './Interfaces/PartAExtensions';\nexport { DistributedTracingModes } from './Enums';\nexport var PropertiesPluginIdentifier = \"AppInsightsPropertiesPlugin\";\nexport var BreezeChannelIdentifier = \"AppInsightsChannelPlugin\";\nexport var AnalyticsPluginIdentifier = \"ApplicationInsightsAnalytics\";","/*!\n * Application Insights JavaScript SDK - Web Analytics, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { DateTimeUtils, Util } from '@microsoft/applicationinsights-common';\nimport { CoreUtils, LoggingSeverity, _InternalMessageId, getDocument, getLocation } from '@microsoft/applicationinsights-core-js';\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\n/**\r\n * Class encapsulates sending page views and page view performance telemetry.\r\n */\n\nvar PageViewManager =\n/** @class */\nfunction () {\n function PageViewManager(appInsights, overridePageViewDuration, core, pageViewPerformanceManager) {\n dynamicProto(PageViewManager, this, function (_self) {\n var arrForEach = CoreUtils.arrForEach;\n var isNullOrUndefined = CoreUtils.isNullOrUndefined;\n var intervalHandle = null;\n var itemQueue = [];\n var pageViewPerformanceSent = false;\n\n var _logger;\n\n if (core) {\n _logger = core.logger;\n }\n\n function _flushChannels() {\n if (core) {\n arrForEach(core.getTransmissionControls(), function (queues) {\n arrForEach(queues, function (q) {\n return q.flush(true);\n });\n });\n }\n }\n\n function _addQueue(cb) {\n itemQueue.push(cb);\n\n if (!intervalHandle) {\n intervalHandle = setInterval(function () {\n var allItems = itemQueue.slice(0);\n var doFlush = false;\n itemQueue = [];\n arrForEach(allItems, function (item) {\n if (!item()) {\n // Not processed so rescheduled\n itemQueue.push(item);\n } else {\n doFlush = true;\n }\n });\n\n if (itemQueue.length === 0) {\n clearInterval(intervalHandle);\n intervalHandle = null;\n }\n\n if (doFlush) {\n // We process at least one item so flush the queue\n _flushChannels();\n }\n }, 100);\n }\n }\n\n _self.trackPageView = function (pageView, customProperties) {\n var name = pageView.name;\n\n if (isNullOrUndefined(name) || typeof name !== \"string\") {\n var doc = getDocument();\n name = pageView.name = doc && doc.title || \"\";\n }\n\n var uri = pageView.uri;\n\n if (isNullOrUndefined(uri) || typeof uri !== \"string\") {\n var location_1 = getLocation();\n uri = pageView.uri = location_1 && location_1.href || \"\";\n } // case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user\n // do not provide the duration, set duration to undefined\n // Also this is case 4\n\n\n if (!pageViewPerformanceManager.isPerformanceTimingSupported()) {\n appInsights.sendPageViewInternal(pageView, customProperties);\n\n _flushChannels(); // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)\n\n\n _logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.NavigationTimingNotSupported, \"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.\");\n\n return;\n }\n\n var pageViewSent = false;\n var customDuration; // if the performance timing is supported by the browser, calculate the custom duration\n\n var start = pageViewPerformanceManager.getPerformanceTiming().navigationStart;\n\n if (start > 0) {\n customDuration = DateTimeUtils.GetDuration(start, +new Date());\n\n if (!pageViewPerformanceManager.shouldCollectDuration(customDuration)) {\n customDuration = undefined;\n }\n } // if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if\n // overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier\n\n\n var duration;\n\n if (!isNullOrUndefined(customProperties) && !isNullOrUndefined(customProperties.duration)) {\n duration = customProperties.duration;\n }\n\n if (overridePageViewDuration || !isNaN(duration)) {\n if (isNaN(duration)) {\n // case 3\n if (!customProperties) {\n customProperties = {};\n }\n\n customProperties[\"duration\"] = customDuration;\n } // case 2\n\n\n appInsights.sendPageViewInternal(pageView, customProperties);\n\n _flushChannels();\n\n pageViewSent = true;\n } // now try to send the page view performance telemetry\n\n\n var maxDurationLimit = 60000;\n\n if (!customProperties) {\n customProperties = {};\n } // Queue the event for processing\n\n\n _addQueue(function () {\n var processed = false;\n\n try {\n if (pageViewPerformanceManager.isPerformanceTimingDataReady()) {\n processed = true;\n var pageViewPerformance = {\n name: name,\n uri: uri\n };\n pageViewPerformanceManager.populatePageViewPerformanceEvent(pageViewPerformance);\n\n if (!pageViewPerformance.isValid && !pageViewSent) {\n // If navigation timing gives invalid numbers, then go back to \"override page view duration\" mode.\n // That's the best value we can get that makes sense.\n customProperties[\"duration\"] = customDuration;\n appInsights.sendPageViewInternal(pageView, customProperties);\n } else {\n if (!pageViewSent) {\n customProperties[\"duration\"] = pageViewPerformance.durationMs;\n appInsights.sendPageViewInternal(pageView, customProperties);\n }\n\n if (!pageViewPerformanceSent) {\n appInsights.sendPageViewPerformanceInternal(pageViewPerformance, customProperties);\n pageViewPerformanceSent = true;\n }\n }\n } else if (start > 0 && DateTimeUtils.GetDuration(start, +new Date()) > maxDurationLimit) {\n // if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry\n // with the maximum duration limit. Otherwise, keep waiting until performance timings are ready\n processed = true;\n\n if (!pageViewSent) {\n customProperties[\"duration\"] = maxDurationLimit;\n appInsights.sendPageViewInternal(pageView, customProperties);\n }\n }\n } catch (e) {\n _logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackPVFailedCalc, \"trackPageView failed on page load calculation: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n\n return processed;\n });\n };\n });\n } // Removed Stub for PageViewManager.prototype.trackPageView.\n\n\n return PageViewManager;\n}();\n\nexport { PageViewManager };","/*!\n * Application Insights JavaScript SDK - Web Analytics, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { Util } from '@microsoft/applicationinsights-common';\nimport { hasJSON, getJSON, CoreUtils } from '@microsoft/applicationinsights-core-js';\n/**\r\n * Used to track page visit durations\r\n */\n\nvar PageVisitTimeManager =\n/** @class */\nfunction () {\n /**\r\n * Creates a new instance of PageVisitTimeManager\r\n * @param pageVisitTimeTrackingHandler Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)\r\n * @returns {}\r\n */\n function PageVisitTimeManager(logger, pageVisitTimeTrackingHandler) {\n this.prevPageVisitDataKeyName = \"prevPageVisitData\";\n this.pageVisitTimeTrackingHandler = pageVisitTimeTrackingHandler;\n this._logger = logger;\n }\n /**\r\n * Tracks the previous page visit time telemetry (if exists) and starts timing of new page visit time\r\n * @param currentPageName Name of page to begin timing for visit duration\r\n * @param currentPageUrl Url of page to begin timing for visit duration\r\n */\n\n\n PageVisitTimeManager.prototype.trackPreviousPageVisit = function (currentPageName, currentPageUrl) {\n try {\n // Restart timer for new page view\n var prevPageVisitTimeData = this.restartPageVisitTimer(currentPageName, currentPageUrl); // If there was a page already being timed, track the visit time for it now.\n\n if (prevPageVisitTimeData) {\n this.pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime);\n }\n } catch (e) {\n this._logger.warnToConsole(\"Auto track page visit time failed, metric will not be collected: \" + Util.dump(e));\n }\n };\n /**\r\n * Stops timing of current page (if exists) and starts timing for duration of visit to pageName\r\n * @param pageName Name of page to begin timing visit duration\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not.\r\n */\n\n\n PageVisitTimeManager.prototype.restartPageVisitTimer = function (pageName, pageUrl) {\n try {\n var prevPageVisitData = this.stopPageVisitTimer();\n this.startPageVisitTimer(pageName, pageUrl);\n return prevPageVisitData;\n } catch (e) {\n this._logger.warnToConsole(\"Call to restart failed: \" + Util.dump(e));\n\n return null;\n }\n };\n /**\r\n * Starts timing visit duration of pageName\r\n * @param pageName\r\n * @returns {}\r\n */\n\n\n PageVisitTimeManager.prototype.startPageVisitTimer = function (pageName, pageUrl) {\n try {\n if (Util.canUseSessionStorage()) {\n if (Util.getSessionStorage(this._logger, this.prevPageVisitDataKeyName) != null) {\n throw new Error(\"Cannot call startPageVisit consecutively without first calling stopPageVisit\");\n }\n\n var currPageVisitData = new PageVisitData(pageName, pageUrl);\n var currPageVisitDataStr = getJSON().stringify(currPageVisitData);\n Util.setSessionStorage(this._logger, this.prevPageVisitDataKeyName, currPageVisitDataStr);\n }\n } catch (e) {\n // TODO: Remove this catch in next phase, since if start is called twice in a row the exception needs to be propagated out\n this._logger.warnToConsole(\"Call to start failed: \" + Util.dump(e));\n }\n };\n /**\r\n * Stops timing of current page, if exists.\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not.\r\n */\n\n\n PageVisitTimeManager.prototype.stopPageVisitTimer = function () {\n try {\n if (Util.canUseSessionStorage()) {\n // Define end time of page's visit\n var pageVisitEndTime = CoreUtils.dateNow(); // Try to retrieve page name and start time from session storage\n\n var pageVisitDataJsonStr = Util.getSessionStorage(this._logger, this.prevPageVisitDataKeyName);\n\n if (pageVisitDataJsonStr && hasJSON()) {\n // if previous page data exists, set end time of visit\n var prevPageVisitData = getJSON().parse(pageVisitDataJsonStr);\n prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData.pageVisitStartTime; // Remove data from storage since we already used it\n\n Util.removeSessionStorage(this._logger, this.prevPageVisitDataKeyName); // Return page visit data\n\n return prevPageVisitData;\n } else {\n return null;\n }\n }\n\n return null;\n } catch (e) {\n this._logger.warnToConsole(\"Stop page visit timer failed: \" + Util.dump(e));\n\n return null;\n }\n };\n\n return PageVisitTimeManager;\n}();\n\nexport { PageVisitTimeManager };\n\nvar PageVisitData =\n/** @class */\nfunction () {\n function PageVisitData(pageName, pageUrl) {\n this.pageVisitStartTime = CoreUtils.dateNow();\n this.pageName = pageName;\n this.pageUrl = pageUrl;\n }\n\n return PageVisitData;\n}();\n\nexport { PageVisitData };","/*!\n * Application Insights JavaScript SDK - Web Analytics, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { Util, DateTimeUtils } from '@microsoft/applicationinsights-common';\nimport { LoggingSeverity, _InternalMessageId, getNavigator, getPerformance } from '@microsoft/applicationinsights-core-js';\n/**\r\n * Class encapsulates sending page view performance telemetry.\r\n */\n\nvar PageViewPerformanceManager =\n/** @class */\nfunction () {\n function PageViewPerformanceManager(core) {\n this.MAX_DURATION_ALLOWED = 3600000; // 1h\n\n if (core) {\n this._logger = core.logger;\n }\n }\n\n PageViewPerformanceManager.prototype.populatePageViewPerformanceEvent = function (pageViewPerformance) {\n pageViewPerformance.isValid = false;\n /*\r\n * http://www.w3.org/TR/navigation-timing/#processing-model\r\n * |-navigationStart\r\n * | |-connectEnd\r\n * | ||-requestStart\r\n * | || |-responseStart\r\n * | || | |-responseEnd\r\n * | || | |\r\n * | || | | |-loadEventEnd\r\n * |---network---||---request---|---response---|---dom---|\r\n * |--------------------------total----------------------|\r\n */\n\n var navigationTiming = this.getPerformanceNavigationTiming();\n var timing = this.getPerformanceTiming();\n\n if (navigationTiming || timing) {\n if (navigationTiming) {\n var total = navigationTiming.duration;\n var network = DateTimeUtils.GetDuration(navigationTiming.startTime, navigationTiming.connectEnd);\n var request = DateTimeUtils.GetDuration(navigationTiming.requestStart, navigationTiming.responseStart);\n var response = DateTimeUtils.GetDuration(navigationTiming.responseStart, navigationTiming.responseEnd);\n var dom = DateTimeUtils.GetDuration(navigationTiming.responseEnd, navigationTiming.loadEventEnd);\n } else {\n var total = DateTimeUtils.GetDuration(timing.navigationStart, timing.loadEventEnd);\n var network = DateTimeUtils.GetDuration(timing.navigationStart, timing.connectEnd);\n var request = DateTimeUtils.GetDuration(timing.requestStart, timing.responseStart);\n var response = DateTimeUtils.GetDuration(timing.responseStart, timing.responseEnd);\n var dom = DateTimeUtils.GetDuration(timing.responseEnd, timing.loadEventEnd);\n }\n\n if (total === 0) {\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ErrorPVCalc, \"error calculating page view performance.\", {\n total: total,\n network: network,\n request: request,\n response: response,\n dom: dom\n });\n } else if (!this.shouldCollectDuration(total, network, request, response, dom)) {\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.InvalidDurationValue, \"Invalid page load duration value. Browser perf data won't be sent.\", {\n total: total,\n network: network,\n request: request,\n response: response,\n dom: dom\n });\n } else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {\n // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT\n // in this case, don't report client performance from this page\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ClientPerformanceMathError, \"client performance math error.\", {\n total: total,\n network: network,\n request: request,\n response: response,\n dom: dom\n });\n } else {\n pageViewPerformance.durationMs = total; // // convert to timespans\n\n pageViewPerformance.perfTotal = pageViewPerformance.duration = Util.msToTimeSpan(total);\n pageViewPerformance.networkConnect = Util.msToTimeSpan(network);\n pageViewPerformance.sentRequest = Util.msToTimeSpan(request);\n pageViewPerformance.receivedResponse = Util.msToTimeSpan(response);\n pageViewPerformance.domProcessing = Util.msToTimeSpan(dom);\n pageViewPerformance.isValid = true;\n }\n }\n };\n\n PageViewPerformanceManager.prototype.getPerformanceTiming = function () {\n if (this.isPerformanceTimingSupported()) {\n return getPerformance().timing;\n }\n\n return null;\n };\n\n PageViewPerformanceManager.prototype.getPerformanceNavigationTiming = function () {\n if (this.isPerformanceNavigationTimingSupported()) {\n return getPerformance().getEntriesByType(\"navigation\")[0];\n }\n\n return null;\n };\n /**\r\n * Returns true is window PerformanceNavigationTiming API is supported, false otherwise.\r\n */\n\n\n PageViewPerformanceManager.prototype.isPerformanceNavigationTimingSupported = function () {\n var perf = getPerformance();\n return perf && perf.getEntriesByType && perf.getEntriesByType(\"navigation\").length > 0;\n };\n /**\r\n * Returns true is window performance timing API is supported, false otherwise.\r\n */\n\n\n PageViewPerformanceManager.prototype.isPerformanceTimingSupported = function () {\n var perf = getPerformance();\n return perf && perf.timing;\n };\n /**\r\n * As page loads different parts of performance timing numbers get set. When all of them are set we can report it.\r\n * Returns true if ready, false otherwise.\r\n */\n\n\n PageViewPerformanceManager.prototype.isPerformanceTimingDataReady = function () {\n var perf = getPerformance();\n var timing = perf ? perf.timing : 0;\n return timing && timing.domainLookupStart > 0 && timing.navigationStart > 0 && timing.responseStart > 0 && timing.requestStart > 0 && timing.loadEventEnd > 0 && timing.responseEnd > 0 && timing.connectEnd > 0 && timing.domLoading > 0;\n };\n /**\r\n * This method tells if given durations should be excluded from collection.\r\n */\n\n\n PageViewPerformanceManager.prototype.shouldCollectDuration = function () {\n var durations = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n durations[_i] = arguments[_i];\n }\n\n var _navigator = getNavigator() || {}; // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en\n\n\n var botAgentNames = ['googlebot', 'adsbot-google', 'apis-google', 'mediapartners-google'];\n var userAgent = _navigator.userAgent;\n var isGoogleBot = false;\n\n if (userAgent) {\n for (var i = 0; i < botAgentNames.length; i++) {\n isGoogleBot = isGoogleBot || userAgent.toLowerCase().indexOf(botAgentNames[i]) !== -1;\n }\n }\n\n if (isGoogleBot) {\n // Don't report durations for GoogleBot, it is returning invalid values in performance.timing API.\n return false;\n } else {\n // for other page views, don't report if it's outside of a reasonable range\n for (var i = 0; i < durations.length; i++) {\n if (durations[i] < 0 || durations[i] >= this.MAX_DURATION_ALLOWED) {\n return false;\n }\n }\n }\n\n return true;\n };\n\n return PageViewPerformanceManager;\n}();\n\nexport { PageViewPerformanceManager };","/*!\n * Application Insights JavaScript SDK - Web Analytics, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n/**\r\n * ApplicationInsights.ts\r\n * @copyright Microsoft 2018\r\n */\nimport { Util, PageViewPerformance, PageView, RemoteDependencyData, Event as EventTelemetry, TelemetryItemCreator, Metric, Exception, SeverityLevel, Trace, DateTimeUtils, PropertiesPluginIdentifier, AnalyticsPluginIdentifier } from \"@microsoft/applicationinsights-common\";\nimport { BaseTelemetryPlugin, CoreUtils, LoggingSeverity, _InternalMessageId, getWindow, getDocument, getHistory, getLocation, doPerf, objForEachKey } from \"@microsoft/applicationinsights-core-js\";\nimport { PageViewManager } from \"./Telemetry/PageViewManager\";\nimport { PageVisitTimeManager } from \"./Telemetry/PageVisitTimeManager\";\nimport { PageViewPerformanceManager } from './Telemetry/PageViewPerformanceManager';\n\"use strict\";\n\nvar durationProperty = \"duration\";\n\nfunction _dispatchEvent(target, evnt) {\n if (target && target.dispatchEvent && evnt) {\n target.dispatchEvent(evnt);\n }\n}\n\nvar ApplicationInsights =\n/** @class */\nfunction (_super) {\n __extends(ApplicationInsights, _super);\n\n function ApplicationInsights() {\n var _this = _super.call(this) || this;\n\n _this.identifier = AnalyticsPluginIdentifier; // do not change name or priority\n\n _this.priority = 180; // take from reserved priority range 100- 200\n\n _this.autoRoutePVDelay = 500; // ms; Time to wait after a route change before triggering a pageview to allow DOM changes to take place\n // Counts number of trackAjax invokations.\n // By default we only monitor X ajax call per view to avoid too much load.\n // Default value is set in config.\n // This counter keeps increasing even after the limit is reached.\n\n _this._trackAjaxAttempts = 0;\n var location = getLocation();\n _this._prevUri = location && location.href || \"\";\n return _this;\n }\n\n ApplicationInsights.getDefaultConfig = function (config) {\n if (!config) {\n config = {};\n } // set default values\n\n\n config.sessionRenewalMs = 30 * 60 * 1000;\n config.sessionExpirationMs = 24 * 60 * 60 * 1000;\n config.disableExceptionTracking = Util.stringToBoolOrDefault(config.disableExceptionTracking);\n config.autoTrackPageVisitTime = Util.stringToBoolOrDefault(config.autoTrackPageVisitTime);\n config.overridePageViewDuration = Util.stringToBoolOrDefault(config.overridePageViewDuration);\n config.enableUnhandledPromiseRejectionTracking = Util.stringToBoolOrDefault(config.enableUnhandledPromiseRejectionTracking);\n\n if (isNaN(config.samplingPercentage) || config.samplingPercentage <= 0 || config.samplingPercentage >= 100) {\n config.samplingPercentage = 100;\n }\n\n config.isCookieUseDisabled = Util.stringToBoolOrDefault(config.isCookieUseDisabled);\n config.isStorageUseDisabled = Util.stringToBoolOrDefault(config.isStorageUseDisabled);\n config.isBrowserLinkTrackingEnabled = Util.stringToBoolOrDefault(config.isBrowserLinkTrackingEnabled);\n config.enableAutoRouteTracking = Util.stringToBoolOrDefault(config.enableAutoRouteTracking);\n config.namePrefix = config.namePrefix || \"\";\n return config;\n };\n\n ApplicationInsights.prototype.processTelemetry = function (env, itemCtx) {\n var _this = this;\n\n doPerf(this.core, function () {\n return _this.identifier + \":processTelemetry\";\n }, function () {\n var doNotSendItem = false;\n var telemetryInitializersCount = _this._telemetryInitializers.length;\n itemCtx = _this._getTelCtx(itemCtx);\n\n for (var i = 0; i < telemetryInitializersCount; ++i) {\n var telemetryInitializer = _this._telemetryInitializers[i];\n\n if (telemetryInitializer) {\n try {\n if (telemetryInitializer.apply(null, [env]) === false) {\n doNotSendItem = true;\n break;\n }\n } catch (e) {\n // log error but dont stop executing rest of the telemetry initializers\n // doNotSendItem = true;\n itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"One of telemetry initializers failed, telemetry item will not be sent: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n }, true);\n }\n }\n }\n\n if (!doNotSendItem) {\n _this.processNext(env, itemCtx);\n }\n }, function () {\n return {\n item: env\n };\n }, !env.sync);\n };\n\n ApplicationInsights.prototype.trackEvent = function (event, customProperties) {\n try {\n var telemetryItem = TelemetryItemCreator.create(event, EventTelemetry.dataType, EventTelemetry.envelopeType, this.diagLog(), customProperties);\n this.core.track(telemetryItem);\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TrackTraceFailed, \"trackTrace failed, trace will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * Start timing an extended event. Call `stopTrackEvent` to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\n\n\n ApplicationInsights.prototype.startTrackEvent = function (name) {\n try {\n this._eventTracking.start(name);\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.StartTrackEventFailed, \"startTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * Log an extended event that you started timing with `startTrackEvent`.\r\n * @param name The string you used to identify this event in `startTrackEvent`.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\n\n\n ApplicationInsights.prototype.stopTrackEvent = function (name, properties, measurements) {\n try {\n this._eventTracking.stop(name, undefined, properties); // Todo: Fix to pass measurements once type is updated\n\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.StopTrackEventFailed, \"stopTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * @description Log a diagnostic message\r\n * @param {ITraceTelemetry} trace\r\n * @param ICustomProperties.\r\n * @memberof ApplicationInsights\r\n */\n\n\n ApplicationInsights.prototype.trackTrace = function (trace, customProperties) {\n try {\n var telemetryItem = TelemetryItemCreator.create(trace, Trace.dataType, Trace.envelopeType, this.diagLog(), customProperties);\n this.core.track(telemetryItem);\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TrackTraceFailed, \"trackTrace failed, trace will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * @description Log a numeric value that is not associated with a specific event. Typically\r\n * used to send regular reports of performance indicators. To send single measurement, just\r\n * use the name and average fields of {@link IMetricTelemetry}. If you take measurements\r\n * frequently, you can reduce the telemetry bandwidth by aggregating multiple measurements\r\n * and sending the resulting average at intervals\r\n * @param {IMetricTelemetry} metric input object argument. Only name and average are mandatory.\r\n * @param {{[key: string]: any}} customProperties additional data used to filter metrics in the\r\n * portal. Defaults to empty.\r\n * @memberof ApplicationInsights\r\n */\n\n\n ApplicationInsights.prototype.trackMetric = function (metric, customProperties) {\n try {\n var telemetryItem = TelemetryItemCreator.create(metric, Metric.dataType, Metric.envelopeType, this.diagLog(), customProperties);\n this.core.track(telemetryItem);\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackMetricFailed, \"trackMetric failed, metric will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * Logs that a page or other item was viewed.\r\n * @param IPageViewTelemetry The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param customProperties Additional data used to filter events and metrics. Defaults to empty.\r\n * If a user wants to provide duration for pageLoad, it'll have to be in pageView.properties.duration\r\n */\n\n\n ApplicationInsights.prototype.trackPageView = function (pageView, customProperties) {\n try {\n var inPv = pageView || {};\n\n this._pageViewManager.trackPageView(inPv, __assign({}, inPv.properties, inPv.measurements, customProperties));\n\n if (this.config.autoTrackPageVisitTime) {\n this._pageVisitTimeManager.trackPreviousPageVisit(inPv.name, inPv.uri);\n }\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackPVFailed, \"trackPageView failed, page view will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * Create a page view telemetry item and send it to the SDK pipeline through the core.track API\r\n * @param pageView Page view item to be sent\r\n * @param properties Custom properties (Part C) that a user can add to the telemetry item\r\n * @param systemProperties System level properties (Part A) that a user can add to the telemetry item\r\n */\n\n\n ApplicationInsights.prototype.sendPageViewInternal = function (pageView, properties, systemProperties) {\n var doc = getDocument();\n\n if (doc) {\n pageView.refUri = pageView.refUri === undefined ? doc.referrer : pageView.refUri;\n }\n\n var telemetryItem = TelemetryItemCreator.create(pageView, PageView.dataType, PageView.envelopeType, this.diagLog(), properties, systemProperties);\n this.core.track(telemetryItem); // reset ajaxes counter\n\n this._trackAjaxAttempts = 0;\n };\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param pageViewPerformance\r\n * @param properties\r\n */\n\n\n ApplicationInsights.prototype.sendPageViewPerformanceInternal = function (pageViewPerformance, properties, systemProperties) {\n var telemetryItem = TelemetryItemCreator.create(pageViewPerformance, PageViewPerformance.dataType, PageViewPerformance.envelopeType, this.diagLog(), properties, systemProperties);\n this.core.track(telemetryItem);\n };\n /**\r\n * Send browser performance metrics.\r\n * @param pageViewPerformance\r\n * @param customProperties\r\n */\n\n\n ApplicationInsights.prototype.trackPageViewPerformance = function (pageViewPerformance, customProperties) {\n try {\n this._pageViewPerformanceManager.populatePageViewPerformanceEvent(pageViewPerformance);\n\n this.sendPageViewPerformanceInternal(pageViewPerformance, customProperties);\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackPVFailed, \"trackPageViewPerformance failed, page view will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops,\r\n * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view\r\n * and send the event.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\n\n\n ApplicationInsights.prototype.startTrackPage = function (name) {\n try {\n if (typeof name !== \"string\") {\n var doc = getDocument();\n name = doc && doc.title || \"\";\n }\n\n this._pageTracking.start(name);\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.StartTrackFailed, \"startTrackPage failed, page view may not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements.\r\n * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`.\r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\n\n\n ApplicationInsights.prototype.stopTrackPage = function (name, url, properties, measurement) {\n try {\n if (typeof name !== \"string\") {\n var doc = getDocument();\n name = doc && doc.title || \"\";\n }\n\n if (typeof url !== \"string\") {\n var loc = getLocation();\n url = loc && loc.href || \"\";\n }\n\n this._pageTracking.stop(name, url, properties, measurement);\n\n if (this.config.autoTrackPageVisitTime) {\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\n }\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.StopTrackFailed, \"stopTrackPage failed, page view will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param exception\r\n * @param properties\r\n * @param systemProperties\r\n */\n\n\n ApplicationInsights.prototype.sendExceptionInternal = function (exception, customProperties, systemProperties) {\n var exceptionPartB = new Exception(this.diagLog(), exception.exception || new Error(Util.NotSpecified), exception.properties, exception.measurements, exception.severityLevel, exception.id).toInterface();\n var telemetryItem = TelemetryItemCreator.create(exceptionPartB, Exception.dataType, Exception.envelopeType, this.diagLog(), customProperties, systemProperties);\n this.core.track(telemetryItem);\n };\n /**\r\n * Log an exception you have caught.\r\n *\r\n * @param {IExceptionTelemetry} exception Object which contains exception to be sent\r\n * @param {{[key: string]: any}} customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n *\r\n * Any property of type double will be considered a measurement, and will be treated by Application Insights as a metric.\r\n * @memberof ApplicationInsights\r\n */\n\n\n ApplicationInsights.prototype.trackException = function (exception, customProperties) {\n try {\n this.sendExceptionInternal(exception, customProperties);\n } catch (e) {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackExceptionFailed, \"trackException failed, exception will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n /**\r\n * @description Custom error handler for Application Insights Analytics\r\n * @param {IAutoExceptionTelemetry} exception\r\n * @memberof ApplicationInsights\r\n */\n\n\n ApplicationInsights.prototype._onerror = function (exception) {\n try {\n var properties_1 = {\n url: exception && exception.url || (getDocument() || {}).URL,\n lineNumber: exception.lineNumber,\n columnNumber: exception.columnNumber,\n message: exception.message\n };\n\n if (Util.isCrossOriginError(exception.message, exception.url, exception.lineNumber, exception.columnNumber, exception.error)) {\n this._sendCORSException(properties_1.url);\n } else {\n if (!Util.isError(exception.error)) {\n var stack = \"window.onerror@\" + properties_1.url + \":\" + exception.lineNumber + \":\" + (exception.columnNumber || 0);\n exception.error = new Error(exception.message);\n exception.error.stack = stack;\n }\n\n this.trackException({\n exception: exception.error,\n severityLevel: SeverityLevel.Error\n }, properties_1);\n }\n } catch (e) {\n var errorString = exception.error ? exception.error.name + \", \" + exception.error.message : \"null\";\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.ExceptionWhileLoggingError, \"_onError threw exception while logging error, error will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e),\n errorString: errorString\n });\n }\n };\n\n ApplicationInsights.prototype.addTelemetryInitializer = function (telemetryInitializer) {\n this._telemetryInitializers.push(telemetryInitializer);\n };\n\n ApplicationInsights.prototype.initialize = function (config, core, extensions, pluginChain) {\n var _this = this;\n\n if (this.isInitialized()) {\n return;\n }\n\n if (CoreUtils.isNullOrUndefined(core)) {\n throw Error(\"Error initializing\");\n }\n\n _super.prototype.initialize.call(this, config, core, extensions, pluginChain);\n\n this.setInitialized(false); // resetting the initialized state, just in case the following fails\n\n var ctx = this._getTelCtx();\n\n var identifier = this.identifier;\n this._globalconfig = {\n instrumentationKey: config.instrumentationKey,\n endpointUrl: config.endpointUrl || \"https://dc.services.visualstudio.com/v2/track\"\n };\n this.config = ctx.getExtCfg(identifier); // load default values if specified\n\n var defaults = ApplicationInsights.getDefaultConfig();\n\n if (defaults !== undefined) {\n objForEachKey(defaults, function (field, value) {\n // for each unspecified field, set the default value\n _this.config[field] = ctx.getConfig(identifier, field, value);\n });\n\n if (this._globalconfig) {\n objForEachKey(defaults, function (field, value) {\n if (_this._globalconfig[field] === undefined) {\n _this._globalconfig[field] = value;\n }\n });\n }\n } // Todo: move this out of static state\n\n\n if (this.config.isCookieUseDisabled) {\n Util.disableCookies();\n } // Todo: move this out of static state\n\n\n if (this.config.isStorageUseDisabled) {\n Util.disableStorage();\n }\n\n var configGetters = {\n instrumentationKey: function instrumentationKey() {\n return config.instrumentationKey;\n },\n accountId: function accountId() {\n return _this.config.accountId || config.accountId;\n },\n sessionRenewalMs: function sessionRenewalMs() {\n return _this.config.sessionRenewalMs || config.sessionRenewalMs;\n },\n sessionExpirationMs: function sessionExpirationMs() {\n return _this.config.sessionExpirationMs || config.sessionExpirationMs;\n },\n sampleRate: function sampleRate() {\n return _this.config.samplingPercentage || config.samplingPercentage;\n },\n cookieDomain: function cookieDomain() {\n return _this.config.cookieDomain || config.cookieDomain;\n },\n sdkExtension: function sdkExtension() {\n return _this.config.sdkExtension || config.sdkExtension;\n },\n isBrowserLinkTrackingEnabled: function isBrowserLinkTrackingEnabled() {\n return _this.config.isBrowserLinkTrackingEnabled || config.isBrowserLinkTrackingEnabled;\n },\n appId: function appId() {\n return _this.config.appId || config.appId;\n }\n };\n this._pageViewPerformanceManager = new PageViewPerformanceManager(this.core);\n this._pageViewManager = new PageViewManager(this, this.config.overridePageViewDuration, this.core, this._pageViewPerformanceManager);\n this._pageVisitTimeManager = new PageVisitTimeManager(this.diagLog(), function (pageName, pageUrl, pageVisitTime) {\n return _this.trackPageVisitTime(pageName, pageUrl, pageVisitTime);\n });\n this._telemetryInitializers = this._telemetryInitializers || [];\n\n this._addDefaultTelemetryInitializers(configGetters);\n\n this._eventTracking = new Timing(this.diagLog(), \"trackEvent\");\n\n this._eventTracking.action = function (name, url, duration, properties) {\n if (!properties) {\n properties = {};\n }\n\n properties[durationProperty] = duration.toString();\n\n _this.trackEvent({\n name: name,\n properties: properties\n });\n }; // initialize page view timing\n\n\n this._pageTracking = new Timing(this.diagLog(), \"trackPageView\");\n\n this._pageTracking.action = function (name, url, duration, properties, measurements) {\n // duration must be a custom property in order for the collector to extract it\n if (CoreUtils.isNullOrUndefined(properties)) {\n properties = {};\n }\n\n properties[durationProperty] = duration.toString();\n var pageViewItem = {\n name: name,\n uri: url,\n properties: properties,\n measurements: measurements\n };\n\n _this.sendPageViewInternal(pageViewItem, properties);\n };\n\n var _window = getWindow();\n\n var _history = getHistory();\n\n var _location = getLocation();\n\n var instance = this;\n\n if (this.config.disableExceptionTracking === false && !this.config.autoExceptionInstrumented && _window) {\n // We want to enable exception auto collection and it has not been done so yet\n var onerror_1 = \"onerror\";\n var originalOnError_1 = _window[onerror_1];\n\n _window.onerror = function (message, url, lineNumber, columnNumber, error) {\n var handled = originalOnError_1 && originalOnError_1(message, url, lineNumber, columnNumber, error);\n\n if (handled !== true) {\n instance._onerror({\n message: message,\n url: url,\n lineNumber: lineNumber,\n columnNumber: columnNumber,\n error: error\n });\n }\n\n return handled;\n };\n\n this.config.autoExceptionInstrumented = true;\n }\n\n if (this.config.disableExceptionTracking === false && this.config.enableUnhandledPromiseRejectionTracking === true && !this.config.autoUnhandledPromiseInstrumented && _window) {\n // We want to enable exception auto collection and it has not been done so yet\n var onunhandledrejection = \"onunhandledrejection\";\n var originalOnUnhandledRejection_1 = _window[onunhandledrejection];\n\n _window[onunhandledrejection] = function (error) {\n var handled = originalOnUnhandledRejection_1 && originalOnUnhandledRejection_1.call(_window, error);\n\n if (handled !== true) {\n instance._onerror({\n message: error.reason.toString(),\n error: error.reason instanceof Error ? error.reason : new Error(error.reason.toString()),\n url: _location ? _location.href : \"\",\n lineNumber: 0,\n columnNumber: 0\n });\n }\n\n return handled;\n };\n\n this.config.autoUnhandledPromiseInstrumented = true;\n }\n /**\r\n * Create a custom \"locationchange\" event which is triggered each time the history object is changed\r\n */\n\n\n if (this.config.enableAutoRouteTracking === true && _history && CoreUtils.isFunction(_history.pushState) && CoreUtils.isFunction(_history.replaceState) && _window && typeof Event !== \"undefined\") {\n var _self_1 = this; // Find the properties plugin\n\n\n CoreUtils.arrForEach(extensions, function (extension) {\n if (extension.identifier === PropertiesPluginIdentifier) {\n _this._properties = extension;\n }\n });\n\n _history.pushState = function (f) {\n return function pushState() {\n var ret = f.apply(this, arguments);\n\n _dispatchEvent(_window, Util.createDomEvent(_self_1.config.namePrefix + \"pushState\"));\n\n _dispatchEvent(_window, Util.createDomEvent(_self_1.config.namePrefix + \"locationchange\"));\n\n return ret;\n };\n }(_history.pushState);\n\n _history.replaceState = function (f) {\n return function replaceState() {\n var ret = f.apply(this, arguments);\n\n _dispatchEvent(_window, Util.createDomEvent(_self_1.config.namePrefix + \"replaceState\"));\n\n _dispatchEvent(_window, Util.createDomEvent(_self_1.config.namePrefix + \"locationchange\"));\n\n return ret;\n };\n }(_history.replaceState);\n\n if (_window.addEventListener) {\n _window.addEventListener(_self_1.config.namePrefix + \"popstate\", function () {\n _dispatchEvent(_window, Util.createDomEvent(_self_1.config.namePrefix + \"locationchange\"));\n });\n\n _window.addEventListener(_self_1.config.namePrefix + \"locationchange\", function () {\n if (_self_1._properties && _self_1._properties.context && _self_1._properties.context.telemetryTrace) {\n _self_1._properties.context.telemetryTrace.traceID = Util.generateW3CId();\n _self_1._properties.context.telemetryTrace.name = _location && _location.pathname || \"_unknown_\";\n }\n\n if (_this._currUri) {\n _this._prevUri = _this._currUri;\n _this._currUri = _location && _location.href || \"\";\n } else {\n _this._currUri = _location && _location.href || \"\";\n }\n\n setTimeout(function (uri) {\n // todo: override start time so that it is not affected by autoRoutePVDelay\n _self_1.trackPageView({\n refUri: uri,\n properties: {\n duration: 0\n }\n }); // SPA route change loading durations are undefined, so send 0\n\n }.bind(_this, _this._prevUri), _self_1.autoRoutePVDelay);\n });\n }\n }\n\n this.setInitialized(true);\n };\n /**\r\n * Log a page visit time\r\n * @param pageName Name of page\r\n * @param pageVisitDuration Duration of visit to the page in milleseconds\r\n */\n\n\n ApplicationInsights.prototype.trackPageVisitTime = function (pageName, pageUrl, pageVisitTime) {\n var properties = {\n PageName: pageName,\n PageUrl: pageUrl\n };\n this.trackMetric({\n name: \"PageVisitTime\",\n average: pageVisitTime,\n max: pageVisitTime,\n min: pageVisitTime,\n sampleCount: 1\n }, properties);\n };\n\n ApplicationInsights.prototype._addDefaultTelemetryInitializers = function (configGetters) {\n if (!configGetters.isBrowserLinkTrackingEnabled()) {\n var browserLinkPaths_1 = ['/browserLinkSignalR/', '/__browserLink/'];\n\n var dropBrowserLinkRequests = function dropBrowserLinkRequests(envelope) {\n if (envelope.baseType === RemoteDependencyData.dataType) {\n var remoteData = envelope.baseData;\n\n if (remoteData) {\n for (var i = 0; i < browserLinkPaths_1.length; i++) {\n if (remoteData.target && remoteData.target.indexOf(browserLinkPaths_1[i]) >= 0) {\n return false;\n }\n }\n }\n }\n\n return true;\n };\n\n this._addTelemetryInitializer(dropBrowserLinkRequests);\n }\n };\n\n ApplicationInsights.prototype._addTelemetryInitializer = function (telemetryInitializer) {\n this._telemetryInitializers.push(telemetryInitializer);\n };\n\n ApplicationInsights.prototype._sendCORSException = function (url) {\n var exception = {\n message: \"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.\",\n url: url,\n lineNumber: 0,\n columnNumber: 0,\n error: undefined\n };\n var telemetryItem = TelemetryItemCreator.create(exception, Exception.dataType, Exception.envelopeType, this.diagLog(), {\n url: url\n });\n this.core.track(telemetryItem);\n };\n\n ApplicationInsights.Version = \"2.5.11\"; // Not currently used anywhere\n\n return ApplicationInsights;\n}(BaseTelemetryPlugin);\n\nexport { ApplicationInsights };\n/**\r\n * Used to record timed events and page views.\r\n */\n\nvar Timing =\n/** @class */\nfunction () {\n function Timing(logger, name) {\n this._name = name;\n this._events = {};\n this._logger = logger;\n }\n\n Timing.prototype.start = function (name) {\n if (typeof this._events[name] !== \"undefined\") {\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.StartCalledMoreThanOnce, \"start was called more than once for this event without calling stop.\", {\n name: this._name,\n key: name\n }, true);\n }\n\n this._events[name] = +new Date();\n };\n\n Timing.prototype.stop = function (name, url, properties, measurements) {\n var start = this._events[name];\n\n if (isNaN(start)) {\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.StopCalledWithoutStart, \"stop was called without a corresponding start.\", {\n name: this._name,\n key: name\n }, true);\n } else {\n var end = +new Date();\n var duration = DateTimeUtils.GetDuration(start, end);\n this.action(name, url, duration, properties, measurements);\n }\n\n delete this._events[name];\n this._events[name] = undefined;\n };\n\n return Timing;\n}();","/*!\n * Application Insights JavaScript SDK - Channel, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { Util } from '@microsoft/applicationinsights-common';\nimport { LoggingSeverity, _InternalMessageId, getJSON, CoreUtils } from '@microsoft/applicationinsights-core-js';\nimport dynamicProto from '@microsoft/dynamicproto-js';\n/*\r\n * An array based send buffer.\r\n */\n\nvar ArraySendBuffer =\n/** @class */\nfunction () {\n function ArraySendBuffer(config) {\n var _buffer = [];\n dynamicProto(ArraySendBuffer, this, function (_self) {\n _self.enqueue = function (payload) {\n _buffer.push(payload);\n };\n\n _self.count = function () {\n return _buffer.length;\n };\n\n _self.clear = function () {\n _buffer.length = 0;\n };\n\n _self.getItems = function () {\n return _buffer.slice(0);\n };\n\n _self.batchPayloads = function (payload) {\n if (payload && payload.length > 0) {\n var batch = config.emitLineDelimitedJson() ? payload.join(\"\\n\") : \"[\" + payload.join(\",\") + \"]\";\n return batch;\n }\n\n return null;\n };\n\n _self.markAsSent = function (payload) {\n _self.clear();\n };\n\n _self.clearSent = function (payload) {// not supported\n };\n });\n } // Removed Stub for ArraySendBuffer.prototype.enqueue.\n // Removed Stub for ArraySendBuffer.prototype.count.\n // Removed Stub for ArraySendBuffer.prototype.clear.\n // Removed Stub for ArraySendBuffer.prototype.getItems.\n // Removed Stub for ArraySendBuffer.prototype.batchPayloads.\n // Removed Stub for ArraySendBuffer.prototype.markAsSent.\n // Removed Stub for ArraySendBuffer.prototype.clearSent.\n\n\n return ArraySendBuffer;\n}();\n\nexport { ArraySendBuffer };\n/*\r\n * Session storage buffer holds a copy of all unsent items in the browser session storage.\r\n */\n\nvar SessionStorageSendBuffer =\n/** @class */\nfunction () {\n function SessionStorageSendBuffer(logger, config) {\n var _bufferFullMessageSent = false; // An in-memory copy of the buffer. A copy is saved to the session storage on enqueue() and clear().\n // The buffer is restored in a constructor and contains unsent events from a previous page.\n\n var _buffer;\n\n dynamicProto(SessionStorageSendBuffer, this, function (_self) {\n var bufferItems = _getBuffer(SessionStorageSendBuffer.BUFFER_KEY);\n\n var notDeliveredItems = _getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\n\n _buffer = bufferItems.concat(notDeliveredItems); // If the buffer has too many items, drop items from the end.\n\n if (_buffer.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\n _buffer.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\n }\n\n _setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\n\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, _buffer);\n\n _self.enqueue = function (payload) {\n if (_buffer.length >= SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\n // sent internal log only once per page view\n if (!_bufferFullMessageSent) {\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.SessionStorageBufferFull, \"Maximum buffer size reached: \" + _buffer.length, true);\n _bufferFullMessageSent = true;\n }\n\n return;\n }\n\n _buffer.push(payload);\n\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, _buffer);\n };\n\n _self.count = function () {\n return _buffer.length;\n };\n\n _self.clear = function () {\n _buffer = [];\n\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, []);\n\n _setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\n\n _bufferFullMessageSent = false;\n };\n\n _self.getItems = function () {\n return _buffer.slice(0);\n };\n\n _self.batchPayloads = function (payload) {\n if (payload && payload.length > 0) {\n var batch = config.emitLineDelimitedJson() ? payload.join(\"\\n\") : \"[\" + payload.join(\",\") + \"]\";\n return batch;\n }\n\n return null;\n };\n\n _self.markAsSent = function (payload) {\n _buffer = _removePayloadsFromBuffer(payload, _buffer);\n\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, _buffer);\n\n var sentElements = _getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\n\n if (sentElements instanceof Array && payload instanceof Array) {\n sentElements = sentElements.concat(payload);\n\n if (sentElements.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\n // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements\n // until we receive a response from the backend and the buffer has free space again (see clearSent method)\n logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.SessionStorageBufferFull, \"Sent buffer reached its maximum size: \" + sentElements.length, true);\n sentElements.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\n }\n\n _setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\n }\n };\n\n _self.clearSent = function (payload) {\n var sentElements = _getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\n\n sentElements = _removePayloadsFromBuffer(payload, sentElements);\n\n _setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\n };\n\n function _removePayloadsFromBuffer(payloads, buffer) {\n var remaining = [];\n CoreUtils.arrForEach(buffer, function (value) {\n if (!CoreUtils.isFunction(value) && CoreUtils.arrIndexOf(payloads, value) === -1) {\n remaining.push(value);\n }\n });\n return remaining;\n }\n\n function _getBuffer(key) {\n var prefixedKey = key;\n\n try {\n prefixedKey = config.namePrefix && config.namePrefix() ? config.namePrefix() + \"_\" + prefixedKey : prefixedKey;\n var bufferJson = Util.getSessionStorage(logger, prefixedKey);\n\n if (bufferJson) {\n var buffer = getJSON().parse(bufferJson);\n\n if (CoreUtils.isString(buffer)) {\n // When using some version prototype.js the stringify / parse cycle does not decode array's correctly\n buffer = getJSON().parse(buffer);\n }\n\n if (buffer && Util.isArray(buffer)) {\n return buffer;\n }\n }\n } catch (e) {\n logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.FailedToRestoreStorageBuffer, \" storage key: \" + prefixedKey + \", \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n\n return [];\n }\n\n function _setBuffer(key, buffer) {\n var prefixedKey = key;\n\n try {\n prefixedKey = config.namePrefix && config.namePrefix() ? config.namePrefix() + \"_\" + prefixedKey : prefixedKey;\n var bufferJson = JSON.stringify(buffer);\n Util.setSessionStorage(logger, prefixedKey, bufferJson);\n } catch (e) {\n // if there was an error, clear the buffer\n // telemetry is stored in the _buffer array so we won't loose any items\n Util.setSessionStorage(logger, prefixedKey, JSON.stringify([]));\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.FailedToSetStorageBuffer, \" storage key: \" + prefixedKey + \", \" + Util.getExceptionName(e) + \". Buffer cleared\", {\n exception: Util.dump(e)\n });\n }\n }\n });\n } // Removed Stub for SessionStorageSendBuffer.prototype.enqueue.\n // Removed Stub for SessionStorageSendBuffer.prototype.count.\n // Removed Stub for SessionStorageSendBuffer.prototype.clear.\n // Removed Stub for SessionStorageSendBuffer.prototype.getItems.\n // Removed Stub for SessionStorageSendBuffer.prototype.batchPayloads.\n // Removed Stub for SessionStorageSendBuffer.prototype.markAsSent.\n // Removed Stub for SessionStorageSendBuffer.prototype.clearSent.\n\n\n SessionStorageSendBuffer.BUFFER_KEY = \"AI_buffer\";\n SessionStorageSendBuffer.SENT_BUFFER_KEY = \"AI_sentBuffer\"; // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped.\n\n SessionStorageSendBuffer.MAX_BUFFER_SIZE = 2000;\n return SessionStorageSendBuffer;\n}();\n\nexport { SessionStorageSendBuffer };","/*!\n * Application Insights JavaScript SDK - Channel, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { Data, Envelope, RemoteDependencyData, Event, Exception, Metric, PageView, Trace, PageViewPerformance, CtxTagKeys, HttpMethod, SampleRate } from '@microsoft/applicationinsights-common';\nimport { CoreUtils, LoggingSeverity, _InternalMessageId, hasJSON, getJSON, objForEachKey } from '@microsoft/applicationinsights-core-js'; // these two constants are used to filter out properties not needed when trying to extract custom properties and measurements from the incoming payload\n\nvar strBaseType = 'baseType';\nvar strBaseData = 'baseData';\nvar strProperties = 'properties';\nvar strTrue = 'true';\nvar arrForEach = CoreUtils.arrForEach;\nvar isNullOrUndefined = CoreUtils.isNullOrUndefined;\n\nfunction _setValueIf(target, field, value) {\n if (target && value) {\n target[field] = value;\n return target[field];\n }\n\n return null;\n}\n\nvar EnvelopeCreator =\n/** @class */\nfunction () {\n function EnvelopeCreator() {}\n\n EnvelopeCreator.extractPropsAndMeasurements = function (data, properties, measurements) {\n if (!isNullOrUndefined(data)) {\n objForEachKey(data, function (key, value) {\n if (CoreUtils.isNumber(value)) {\n measurements[key] = value;\n } else if (CoreUtils.isString(value)) {\n properties[key] = value;\n } else if (hasJSON()) {\n properties[key] = getJSON().stringify(value);\n }\n });\n }\n }; // TODO: Do we want this to take logger as arg or use this._logger as nonstatic?\n\n\n EnvelopeCreator.createEnvelope = function (logger, envelopeType, telemetryItem, data) {\n var envelope = new Envelope(logger, data, envelopeType);\n\n _setValueIf(envelope, 'sampleRate', telemetryItem[SampleRate]);\n\n if ((telemetryItem[strBaseData] || {}).startTime) {\n envelope.time = CoreUtils.toISOString(telemetryItem[strBaseData].startTime);\n }\n\n envelope.iKey = telemetryItem.iKey;\n var iKeyNoDashes = telemetryItem.iKey.replace(/-/g, \"\");\n envelope.name = envelope.name.replace(\"{0}\", iKeyNoDashes); // extract all extensions from ctx\n\n EnvelopeCreator.extractPartAExtensions(telemetryItem, envelope); // loop through the envelope tags (extension of Part A) and pick out the ones that should go in outgoing envelope tags\n\n telemetryItem.tags = telemetryItem.tags || [];\n return envelope;\n };\n /*\r\n * Maps Part A data from CS 4.0\r\n */\n\n\n EnvelopeCreator.extractPartAExtensions = function (item, env) {\n // todo: switch to keys from common in this method\n var envTags = env.tags = env.tags || {};\n var itmExt = item.ext = item.ext || {};\n var itmTags = item.tags = item.tags || [];\n var extUser = itmExt.user;\n\n if (extUser) {\n _setValueIf(envTags, CtxTagKeys.userAuthUserId, extUser.authId);\n\n _setValueIf(envTags, CtxTagKeys.userId, extUser.id || extUser.localId);\n }\n\n var extApp = itmExt.app;\n\n if (extApp) {\n _setValueIf(envTags, CtxTagKeys.sessionId, extApp.sesId);\n }\n\n var extDevice = itmExt.device;\n\n if (extDevice) {\n _setValueIf(envTags, CtxTagKeys.deviceId, extDevice.id || extDevice.localId);\n\n _setValueIf(envTags, CtxTagKeys.deviceType, extDevice.deviceClass);\n\n _setValueIf(envTags, CtxTagKeys.deviceIp, extDevice.ip);\n\n _setValueIf(envTags, CtxTagKeys.deviceModel, extDevice.model);\n\n _setValueIf(envTags, CtxTagKeys.deviceType, extDevice.deviceType);\n }\n\n var web = item.ext.web;\n\n if (web) {\n _setValueIf(envTags, CtxTagKeys.deviceLanguage, web.browserLang);\n\n _setValueIf(envTags, CtxTagKeys.deviceBrowserVersion, web.browserVer);\n\n _setValueIf(envTags, CtxTagKeys.deviceBrowser, web.browser);\n\n var envData = env.data = env.data || {};\n var envBaseData = envData[strBaseData] = envData[strBaseData] || {};\n var envProps = envBaseData[strProperties] = envBaseData[strProperties] || {};\n\n _setValueIf(envProps, 'domain', web.domain);\n\n _setValueIf(envProps, 'isManual', web.isManual ? strTrue : null);\n\n _setValueIf(envProps, 'screenRes', web.screenRes);\n\n _setValueIf(envProps, 'userConsent', web.userConsent ? strTrue : null);\n }\n\n var extOs = itmExt.os;\n\n if (extOs) {\n _setValueIf(envTags, CtxTagKeys.deviceOS, extOs.name);\n } // No support for mapping Trace.traceState to 2.0 as it is currently empty\n\n\n var extTrace = itmExt.trace;\n\n if (extTrace) {\n _setValueIf(envTags, CtxTagKeys.operationParentId, extTrace.parentID);\n\n _setValueIf(envTags, CtxTagKeys.operationName, extTrace.name);\n\n _setValueIf(envTags, CtxTagKeys.operationId, extTrace.traceID);\n } // Sample 4.0 schema\n // {\n // \"time\" : \"2018-09-05T22:51:22.4936Z\",\n // \"name\" : \"MetricWithNamespace\",\n // \"iKey\" : \"ABC-5a4cbd20-e601-4ef5-a3c6-5d6577e4398e\",\n // \"ext\": { \"cloud\": {\n // \"role\": \"WATSON3\",\n // \"roleInstance\": \"CO4AEAP00000260\"\n // },\n // \"device\": {}, \"correlation\": {} },\n // \"tags\": [\n // { \"amazon.region\" : \"east2\" },\n // { \"os.expid\" : \"wp:02df239\" }\n // ]\n // }\n\n\n var tgs = {}; // deals with tags.push({object})\n\n for (var i = itmTags.length - 1; i >= 0; i--) {\n var tg = itmTags[i];\n objForEachKey(tg, function (key, value) {\n tgs[key] = value;\n });\n itmTags.splice(i, 1);\n } // deals with tags[key]=value (and handles hasOwnProperty)\n\n\n objForEachKey(itmTags, function (tg, value) {\n tgs[tg] = value;\n });\n env.tags = __assign({}, envTags, tgs);\n\n if (!env.tags[CtxTagKeys.internalSdkVersion]) {\n // Append a version in case it is not already set\n env.tags[CtxTagKeys.internalSdkVersion] = \"javascript:\" + EnvelopeCreator.Version;\n }\n };\n\n EnvelopeCreator.prototype.Init = function (logger, telemetryItem) {\n this._logger = logger;\n\n if (isNullOrUndefined(telemetryItem[strBaseData])) {\n this._logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryEnvelopeInvalid, \"telemetryItem.baseData cannot be null.\");\n }\n };\n\n EnvelopeCreator.Version = \"2.5.11\";\n return EnvelopeCreator;\n}();\n\nexport { EnvelopeCreator };\n\nvar DependencyEnvelopeCreator =\n/** @class */\nfunction (_super) {\n __extends(DependencyEnvelopeCreator, _super);\n\n function DependencyEnvelopeCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n DependencyEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\n _super.prototype.Init.call(this, logger, telemetryItem);\n\n var customMeasurements = telemetryItem[strBaseData].measurements || {};\n var customProperties = telemetryItem[strBaseData][strProperties] || {};\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, customProperties, customMeasurements);\n var bd = telemetryItem[strBaseData];\n\n if (isNullOrUndefined(bd)) {\n logger.warnToConsole(\"Invalid input for dependency data\");\n return null;\n }\n\n var method = bd[strProperties] && bd[strProperties][HttpMethod] ? bd[strProperties][HttpMethod] : \"GET\";\n var remoteDepData = new RemoteDependencyData(logger, bd.id, bd.target, bd.name, bd.duration, bd.success, bd.responseCode, method, bd.type, bd.correlationContext, customProperties, customMeasurements);\n var data = new Data(RemoteDependencyData.dataType, remoteDepData);\n return EnvelopeCreator.createEnvelope(logger, RemoteDependencyData.envelopeType, telemetryItem, data);\n };\n\n DependencyEnvelopeCreator.DependencyEnvelopeCreator = new DependencyEnvelopeCreator();\n return DependencyEnvelopeCreator;\n}(EnvelopeCreator);\n\nexport { DependencyEnvelopeCreator };\n\nvar EventEnvelopeCreator =\n/** @class */\nfunction (_super) {\n __extends(EventEnvelopeCreator, _super);\n\n function EventEnvelopeCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n EventEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\n _super.prototype.Init.call(this, logger, telemetryItem);\n\n var customProperties = {};\n var customMeasurements = {};\n\n if (telemetryItem[strBaseType] !== Event.dataType) {\n customProperties['baseTypeSource'] = telemetryItem[strBaseType]; // save the passed in base type as a property\n }\n\n if (telemetryItem[strBaseType] === Event.dataType) {\n customProperties = telemetryItem[strBaseData][strProperties] || {};\n customMeasurements = telemetryItem[strBaseData].measurements || {};\n } else {\n if (telemetryItem[strBaseData]) {\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem[strBaseData], customProperties, customMeasurements);\n }\n } // Extract root level properties from part C telemetryItem.data\n\n\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, customProperties, customMeasurements);\n var eventName = telemetryItem[strBaseData].name;\n var eventData = new Event(logger, eventName, customProperties, customMeasurements);\n var data = new Data(Event.dataType, eventData);\n return EnvelopeCreator.createEnvelope(logger, Event.envelopeType, telemetryItem, data);\n };\n\n EventEnvelopeCreator.EventEnvelopeCreator = new EventEnvelopeCreator();\n return EventEnvelopeCreator;\n}(EnvelopeCreator);\n\nexport { EventEnvelopeCreator };\n\nvar ExceptionEnvelopeCreator =\n/** @class */\nfunction (_super) {\n __extends(ExceptionEnvelopeCreator, _super);\n\n function ExceptionEnvelopeCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n ExceptionEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\n _super.prototype.Init.call(this, logger, telemetryItem); // Extract root level properties from part C telemetryItem.data\n\n\n var customMeasurements = telemetryItem[strBaseData].measurements || {};\n var customProperties = telemetryItem[strBaseData][strProperties] || {};\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, customProperties, customMeasurements);\n var bd = telemetryItem[strBaseData];\n var exData = Exception.CreateFromInterface(logger, bd, customProperties, customMeasurements);\n var data = new Data(Exception.dataType, exData);\n return EnvelopeCreator.createEnvelope(logger, Exception.envelopeType, telemetryItem, data);\n };\n\n ExceptionEnvelopeCreator.ExceptionEnvelopeCreator = new ExceptionEnvelopeCreator();\n return ExceptionEnvelopeCreator;\n}(EnvelopeCreator);\n\nexport { ExceptionEnvelopeCreator };\n\nvar MetricEnvelopeCreator =\n/** @class */\nfunction (_super) {\n __extends(MetricEnvelopeCreator, _super);\n\n function MetricEnvelopeCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n MetricEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\n _super.prototype.Init.call(this, logger, telemetryItem);\n\n var baseData = telemetryItem[strBaseData];\n var props = baseData[strProperties] || {};\n var measurements = baseData.measurements || {};\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, props, measurements);\n var baseMetricData = new Metric(logger, baseData.name, baseData.average, baseData.sampleCount, baseData.min, baseData.max, props, measurements);\n var data = new Data(Metric.dataType, baseMetricData);\n return EnvelopeCreator.createEnvelope(logger, Metric.envelopeType, telemetryItem, data);\n };\n\n MetricEnvelopeCreator.MetricEnvelopeCreator = new MetricEnvelopeCreator();\n return MetricEnvelopeCreator;\n}(EnvelopeCreator);\n\nexport { MetricEnvelopeCreator };\n\nvar PageViewEnvelopeCreator =\n/** @class */\nfunction (_super) {\n __extends(PageViewEnvelopeCreator, _super);\n\n function PageViewEnvelopeCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n PageViewEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\n _super.prototype.Init.call(this, logger, telemetryItem); // Since duration is not part of the domain properties in Common Schema, extract it from part C\n\n\n var strDuration = \"duration\";\n var duration;\n var baseData = telemetryItem[strBaseData];\n\n if (!isNullOrUndefined(baseData) && !isNullOrUndefined(baseData[strProperties]) && !isNullOrUndefined(baseData[strProperties][strDuration])) {\n duration = baseData[strProperties][strDuration];\n delete baseData[strProperties][strDuration];\n } else if (!isNullOrUndefined(telemetryItem.data) && !isNullOrUndefined(telemetryItem.data[strDuration])) {\n duration = telemetryItem.data[strDuration];\n delete telemetryItem.data[strDuration];\n }\n\n var bd = telemetryItem[strBaseData]; // special case: pageview.id is grabbed from current operation id. Analytics plugin is decoupled from properties plugin, so this is done here instead. This can be made a default telemetry intializer instead if needed to be decoupled from channel\n\n var currentContextId;\n\n if (((telemetryItem.ext || {}).trace || {}).traceID) {\n currentContextId = telemetryItem.ext.trace.traceID;\n }\n\n var id = bd.id || currentContextId;\n var name = bd.name;\n var url = bd.uri;\n var properties = bd[strProperties] || {};\n var measurements = bd.measurements || {}; // refUri is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n\n if (!isNullOrUndefined(bd.refUri)) {\n properties[\"refUri\"] = bd.refUri;\n } // pageType is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n\n\n if (!isNullOrUndefined(bd.pageType)) {\n properties[\"pageType\"] = bd.pageType;\n } // isLoggedIn is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n\n\n if (!isNullOrUndefined(bd.isLoggedIn)) {\n properties[\"isLoggedIn\"] = bd.isLoggedIn.toString();\n } // pageTags is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n\n\n if (!isNullOrUndefined(bd[strProperties])) {\n var pageTags = bd[strProperties];\n objForEachKey(pageTags, function (key, value) {\n properties[key] = value;\n });\n }\n\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, properties, measurements);\n var pageViewData = new PageView(logger, name, url, duration, properties, measurements, id);\n var data = new Data(PageView.dataType, pageViewData);\n return EnvelopeCreator.createEnvelope(logger, PageView.envelopeType, telemetryItem, data);\n };\n\n PageViewEnvelopeCreator.PageViewEnvelopeCreator = new PageViewEnvelopeCreator();\n return PageViewEnvelopeCreator;\n}(EnvelopeCreator);\n\nexport { PageViewEnvelopeCreator };\n\nvar PageViewPerformanceEnvelopeCreator =\n/** @class */\nfunction (_super) {\n __extends(PageViewPerformanceEnvelopeCreator, _super);\n\n function PageViewPerformanceEnvelopeCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n PageViewPerformanceEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\n _super.prototype.Init.call(this, logger, telemetryItem);\n\n var bd = telemetryItem[strBaseData];\n var name = bd.name;\n var url = bd.uri || bd.url;\n var properties = bd[strProperties] || {};\n var measurements = bd.measurements || {};\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, properties, measurements);\n var baseData = new PageViewPerformance(logger, name, url, undefined, properties, measurements, bd);\n var data = new Data(PageViewPerformance.dataType, baseData);\n return EnvelopeCreator.createEnvelope(logger, PageViewPerformance.envelopeType, telemetryItem, data);\n };\n\n PageViewPerformanceEnvelopeCreator.PageViewPerformanceEnvelopeCreator = new PageViewPerformanceEnvelopeCreator();\n return PageViewPerformanceEnvelopeCreator;\n}(EnvelopeCreator);\n\nexport { PageViewPerformanceEnvelopeCreator };\n\nvar TraceEnvelopeCreator =\n/** @class */\nfunction (_super) {\n __extends(TraceEnvelopeCreator, _super);\n\n function TraceEnvelopeCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n TraceEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\n _super.prototype.Init.call(this, logger, telemetryItem);\n\n var message = telemetryItem[strBaseData].message;\n var severityLevel = telemetryItem[strBaseData].severityLevel;\n var props = telemetryItem[strBaseData][strProperties] || {};\n var measurements = telemetryItem[strBaseData].measurements || {};\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, props, measurements);\n var baseData = new Trace(logger, message, severityLevel, props, measurements);\n var data = new Data(Trace.dataType, baseData);\n return EnvelopeCreator.createEnvelope(logger, Trace.envelopeType, telemetryItem, data);\n };\n\n TraceEnvelopeCreator.TraceEnvelopeCreator = new TraceEnvelopeCreator();\n return TraceEnvelopeCreator;\n}(EnvelopeCreator);\n\nexport { TraceEnvelopeCreator };","/*!\n * Application Insights JavaScript SDK - Channel, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { Util, FieldType } from '@microsoft/applicationinsights-common';\nimport { LoggingSeverity, _InternalMessageId, CoreUtils, getJSON, objForEachKey } from '@microsoft/applicationinsights-core-js';\nimport dynamicProto from '@microsoft/dynamicproto-js';\n\nvar Serializer =\n/** @class */\nfunction () {\n function Serializer(logger) {\n dynamicProto(Serializer, this, function (_self) {\n /**\r\n * Serializes the current object to a JSON string.\r\n */\n _self.serialize = function (input) {\n var output = _serializeObject(input, \"root\");\n\n try {\n return getJSON().stringify(output);\n } catch (e) {\n // if serialization fails return an empty string\n logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, e && CoreUtils.isFunction(e.toString) ? e.toString() : \"Error serializing object\", null, true);\n }\n };\n\n function _serializeObject(source, name) {\n var circularReferenceCheck = \"__aiCircularRefCheck\";\n var output = {};\n\n if (!source) {\n logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, \"cannot serialize object because it is null or undefined\", {\n name: name\n }, true);\n return output;\n }\n\n if (source[circularReferenceCheck]) {\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CircularReferenceDetected, \"Circular reference detected while serializing object\", {\n name: name\n }, true);\n return output;\n }\n\n if (!source.aiDataContract) {\n // special case for measurements/properties/tags\n if (name === \"measurements\") {\n output = _serializeStringMap(source, \"number\", name);\n } else if (name === \"properties\") {\n output = _serializeStringMap(source, \"string\", name);\n } else if (name === \"tags\") {\n output = _serializeStringMap(source, \"string\", name);\n } else if (Util.isArray(source)) {\n output = _serializeArray(source, name);\n } else {\n logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, \"Attempting to serialize an object which does not implement ISerializable\", {\n name: name\n }, true);\n\n try {\n // verify that the object can be stringified\n getJSON().stringify(source);\n output = source;\n } catch (e) {\n // if serialization fails return an empty string\n logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, e && CoreUtils.isFunction(e.toString) ? e.toString() : \"Error serializing object\", null, true);\n }\n }\n\n return output;\n }\n\n source[circularReferenceCheck] = true;\n objForEachKey(source.aiDataContract, function (field, contract) {\n var isRequired = CoreUtils.isFunction(contract) ? contract() & FieldType.Required : contract & FieldType.Required;\n var isHidden = CoreUtils.isFunction(contract) ? contract() & FieldType.Hidden : contract & FieldType.Hidden;\n var isArray = contract & FieldType.Array;\n var isPresent = source[field] !== undefined;\n var isObject = CoreUtils.isObject(source[field]) && source[field] !== null;\n\n if (isRequired && !isPresent && !isArray) {\n logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.MissingRequiredFieldSpecification, \"Missing required field specification. The field is required but not present on source\", {\n field: field,\n name: name\n }); // If not in debug mode, continue and hope the error is permissible\n } else if (!isHidden) {\n var value = void 0;\n\n if (isObject) {\n if (isArray) {\n // special case; recurse on each object in the source array\n value = _serializeArray(source[field], field);\n } else {\n // recurse on the source object in this field\n value = _serializeObject(source[field], field);\n }\n } else {\n // assign the source field to the output even if undefined or required\n value = source[field];\n } // only emit this field if the value is defined\n\n\n if (value !== undefined) {\n output[field] = value;\n }\n }\n });\n delete source[circularReferenceCheck];\n return output;\n }\n\n function _serializeArray(sources, name) {\n var output;\n\n if (!!sources) {\n if (!Util.isArray(sources)) {\n logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.ItemNotInArray, \"This field was specified as an array in the contract but the item is not an array.\\r\\n\", {\n name: name\n }, true);\n } else {\n output = [];\n\n for (var i = 0; i < sources.length; i++) {\n var source = sources[i];\n\n var item = _serializeObject(source, name + \"[\" + i + \"]\");\n\n output.push(item);\n }\n }\n }\n\n return output;\n }\n\n function _serializeStringMap(map, expectedType, name) {\n var output;\n\n if (map) {\n output = {};\n objForEachKey(map, function (field, value) {\n if (expectedType === \"string\") {\n if (value === undefined) {\n output[field] = \"undefined\";\n } else if (value === null) {\n output[field] = \"null\";\n } else if (!value.toString) {\n output[field] = \"invalid field: toString() is not defined.\";\n } else {\n output[field] = value.toString();\n }\n } else if (expectedType === \"number\") {\n if (value === undefined) {\n output[field] = \"undefined\";\n } else if (value === null) {\n output[field] = \"null\";\n } else {\n var num = parseFloat(value);\n\n if (isNaN(num)) {\n output[field] = \"NaN\";\n } else {\n output[field] = num;\n }\n }\n } else {\n output[field] = \"invalid field: \" + name + \" is of unknown type.\";\n logger.throwInternal(LoggingSeverity.CRITICAL, output[field], null, true);\n }\n });\n }\n\n return output;\n }\n });\n } // Removed Stub for Serializer.prototype.serialize.\n\n\n return Serializer;\n}();\n\nexport { Serializer };","/*!\n * Application Insights JavaScript SDK - Channel, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { CoreUtils, EventHelper, getWindow, getDocument, getNavigator } from '@microsoft/applicationinsights-core-js';\nimport dynamicProto from '@microsoft/dynamicproto-js';\n/**\r\n * @description Monitors browser for offline events\r\n * @export default - Offline: Static instance of OfflineListener\r\n * @class OfflineListener\r\n */\n\nvar OfflineListener =\n/** @class */\nfunction () {\n function OfflineListener() {\n var _window = getWindow();\n\n var _document = getDocument();\n\n var isListening = false;\n var _onlineStatus = true;\n dynamicProto(OfflineListener, this, function (_self) {\n try {\n if (_window) {\n if (EventHelper.Attach(_window, 'online', _setOnline)) {\n EventHelper.Attach(_window, 'offline', _setOffline);\n isListening = true;\n }\n }\n\n if (_document) {\n // Also attach to the document.body or document\n var target = _document.body || _document;\n\n if (!CoreUtils.isUndefined(target.ononline)) {\n target.ononline = _setOnline;\n target.onoffline = _setOffline;\n isListening = true;\n }\n }\n } catch (e) {\n // this makes react-native less angry\n isListening = false;\n }\n\n _self.isListening = isListening;\n\n _self.isOnline = function () {\n var result = true;\n\n var _navigator = getNavigator();\n\n if (isListening) {\n result = _onlineStatus;\n } else if (_navigator && !CoreUtils.isNullOrUndefined(_navigator.onLine)) {\n result = _navigator.onLine;\n }\n\n return result;\n };\n\n _self.isOffline = function () {\n return !_self.isOnline();\n };\n\n function _setOnline() {\n _onlineStatus = true;\n }\n\n function _setOffline() {\n _onlineStatus = false;\n }\n });\n } // Removed Stub for OfflineListener.prototype.isOnline.\n // Removed Stub for OfflineListener.prototype.isOffline.\n\n\n OfflineListener.Offline = new OfflineListener();\n return OfflineListener;\n}();\n\nexport { OfflineListener };\nexport var Offline = OfflineListener.Offline;","/*!\n * Application Insights JavaScript SDK - Channel, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nvar HashCodeScoreGenerator =\n/** @class */\nfunction () {\n function HashCodeScoreGenerator() {}\n\n HashCodeScoreGenerator.prototype.getHashCodeScore = function (key) {\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\n return score * 100;\n };\n\n HashCodeScoreGenerator.prototype.getHashCode = function (input) {\n if (input === \"\") {\n return 0;\n }\n\n while (input.length < HashCodeScoreGenerator.MIN_INPUT_LENGTH) {\n input = input.concat(input);\n } // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\n\n\n var hash = 5381;\n\n for (var i = 0; i < input.length; ++i) {\n hash = (hash << 5) + hash + input.charCodeAt(i); // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\n\n hash = hash & hash;\n }\n\n return Math.abs(hash);\n }; // We're using 32 bit math, hence max value is (2^31 - 1)\n\n\n HashCodeScoreGenerator.INT_MAX_VALUE = 2147483647; // (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\n\n HashCodeScoreGenerator.MIN_INPUT_LENGTH = 8;\n return HashCodeScoreGenerator;\n}();\n\nexport { HashCodeScoreGenerator };","/*!\n * Application Insights JavaScript SDK - Channel, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { HashCodeScoreGenerator } from './HashCodeScoreGenerator';\nimport { ContextTagKeys } from '@microsoft/applicationinsights-common';\n\nvar SamplingScoreGenerator =\n/** @class */\nfunction () {\n function SamplingScoreGenerator() {\n this.hashCodeGeneragor = new HashCodeScoreGenerator();\n this.keys = new ContextTagKeys();\n }\n\n SamplingScoreGenerator.prototype.getSamplingScore = function (item) {\n var score = 0;\n\n if (item.tags && item.tags[this.keys.userId]) {\n score = this.hashCodeGeneragor.getHashCodeScore(item.tags[this.keys.userId]);\n } else if (item.ext && item.ext.user && item.ext.user.id) {\n score = this.hashCodeGeneragor.getHashCodeScore(item.ext.user.id);\n } else if (item.tags && item.tags[this.keys.operationId]) {\n score = this.hashCodeGeneragor.getHashCodeScore(item.tags[this.keys.operationId]);\n } else if (item.ext && item.ext.telemetryTrace && item.ext.telemetryTrace.traceID) {\n score = this.hashCodeGeneragor.getHashCodeScore(item.ext.telemetryTrace.traceID);\n } else {\n // tslint:disable-next-line:insecure-random\n score = Math.random() * 100;\n }\n\n return score;\n };\n\n return SamplingScoreGenerator;\n}();\n\nexport { SamplingScoreGenerator };","/*!\n * Application Insights JavaScript SDK - Channel, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { SamplingScoreGenerator } from './SamplingScoreGenerators/SamplingScoreGenerator';\nimport { Metric } from '@microsoft/applicationinsights-common';\nimport { _InternalMessageId, LoggingSeverity, DiagnosticLogger, CoreUtils } from '@microsoft/applicationinsights-core-js';\n\nvar Sample =\n/** @class */\nfunction () {\n function Sample(sampleRate, logger) {\n // We're using 32 bit math, hence max value is (2^31 - 1)\n this.INT_MAX_VALUE = 2147483647;\n this._logger = CoreUtils.isNullOrUndefined(logger) ? new DiagnosticLogger() : logger;\n\n if (sampleRate > 100 || sampleRate < 0) {\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.SampleRateOutOfRange, \"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.\", {\n samplingRate: sampleRate\n }, true);\n\n this.sampleRate = 100;\n }\n\n this.sampleRate = sampleRate;\n this.samplingScoreGenerator = new SamplingScoreGenerator();\n }\n /**\r\n * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).\r\n */\n\n\n Sample.prototype.isSampledIn = function (envelope) {\n var samplingPercentage = this.sampleRate; // 0 - 100\n\n var isSampledIn = false;\n\n if (samplingPercentage === null || samplingPercentage === undefined || samplingPercentage >= 100) {\n return true;\n } else if (envelope.baseType === Metric.dataType) {\n // exclude MetricData telemetry from sampling\n return true;\n }\n\n isSampledIn = this.samplingScoreGenerator.getSamplingScore(envelope) < samplingPercentage;\n return isSampledIn;\n };\n\n return Sample;\n}();\n\nexport { Sample };","/*!\n * Application Insights JavaScript SDK - Channel, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { SessionStorageSendBuffer, ArraySendBuffer } from './SendBuffer';\nimport { DependencyEnvelopeCreator, EventEnvelopeCreator, ExceptionEnvelopeCreator, MetricEnvelopeCreator, PageViewEnvelopeCreator, PageViewPerformanceEnvelopeCreator, TraceEnvelopeCreator } from './EnvelopeCreator';\nimport { Serializer } from './Serializer'; // todo move to channel\n\nimport { DisabledPropertyName, RequestHeaders, Util, PageView, Event, Trace, Exception, Metric, PageViewPerformance, RemoteDependencyData, ProcessLegacy, BreezeChannelIdentifier, SampleRate } from '@microsoft/applicationinsights-common';\nimport { CoreUtils, _InternalMessageId, LoggingSeverity, getWindow, getNavigator, getJSON, BaseTelemetryPlugin, getGlobalInst, objForEachKey } from '@microsoft/applicationinsights-core-js';\nimport { Offline } from './Offline';\nimport { Sample } from './TelemetryProcessors/Sample';\nimport dynamicProto from '@microsoft/dynamicproto-js';\n\nfunction _getResponseText(xhr) {\n try {\n return xhr.responseText;\n } catch (e) {// Best effort, as XHR may throw while XDR wont so just ignore\n }\n\n return null;\n}\n\nvar Sender =\n/** @class */\nfunction (_super) {\n __extends(Sender, _super);\n\n function Sender() {\n var _this = _super.call(this) || this;\n\n _this.priority = 1001;\n _this.identifier = BreezeChannelIdentifier;\n /**\r\n * Whether XMLHttpRequest object is supported. Older version of IE (8,9) do not support it.\r\n */\n\n _this._XMLHttpRequestSupported = false;\n /**\r\n * How many times in a row a retryable error condition has occurred.\r\n */\n\n var _consecutiveErrors;\n /**\r\n * The time to retry at in milliseconds from 1970/01/01 (this makes the timer calculation easy).\r\n */\n\n\n var _retryAt;\n /**\r\n * The time of the last send operation.\r\n */\n\n\n var _lastSend;\n /**\r\n * Handle to the timer for delayed sending of batches of data.\r\n */\n\n\n var _timeoutHandle;\n\n var _serializer;\n\n dynamicProto(Sender, _this, function (_self, _base) {\n function _notImplemented() {\n throw new Error(\"Method not implemented.\");\n }\n\n _self.pause = _notImplemented;\n _self.resume = _notImplemented;\n\n _self.flush = function () {\n try {\n _self.triggerSend(true, null, 1\n /* ManualFlush */\n );\n } catch (e) {\n _self.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.FlushFailed, \"flush failed, telemetry will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n };\n\n _self.onunloadFlush = function () {\n if ((_self._senderConfig.onunloadDisableBeacon() === false || _self._senderConfig.isBeaconApiDisabled() === false) && Util.IsBeaconApiSupported()) {\n try {\n _self.triggerSend(true, _beaconSender, 2\n /* Unload */\n );\n } catch (e) {\n _self.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.FailedToSendQueuedTelemetry, \"failed to flush with beacon sender on page unload, telemetry will not be collected: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n } else {\n _self.flush();\n }\n };\n\n _self.teardown = _notImplemented;\n\n _self.initialize = function (config, core, extensions, pluginChain) {\n _base.initialize(config, core, extensions, pluginChain);\n\n var ctx = _self._getTelCtx();\n\n var identifier = _self.identifier;\n _serializer = new Serializer(core.logger);\n _consecutiveErrors = 0;\n _retryAt = null;\n _lastSend = 0;\n _self._sender = null;\n\n var defaultConfig = Sender._getDefaultAppInsightsChannelConfig();\n\n _self._senderConfig = Sender._getEmptyAppInsightsChannelConfig();\n objForEachKey(defaultConfig, function (field, value) {\n _self._senderConfig[field] = function () {\n return ctx.getConfig(identifier, field, value());\n };\n });\n _self._buffer = _self._senderConfig.enableSessionStorageBuffer() && Util.canUseSessionStorage() ? new SessionStorageSendBuffer(_self.diagLog(), _self._senderConfig) : new ArraySendBuffer(_self._senderConfig);\n _self._sample = new Sample(_self._senderConfig.samplingPercentage(), _self.diagLog());\n\n if (!_validateInstrumentationKey(config)) {\n _self.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.InvalidInstrumentationKey, \"Invalid Instrumentation key \" + config.instrumentationKey);\n }\n\n if (!_self._senderConfig.isBeaconApiDisabled() && Util.IsBeaconApiSupported()) {\n _self._sender = _beaconSender;\n } else {\n if (typeof XMLHttpRequest !== undefined) {\n var xhr = getGlobalInst(\"XMLHttpRequest\");\n\n if (xhr) {\n var testXhr = new xhr();\n\n if (\"withCredentials\" in testXhr) {\n _self._sender = _xhrSender;\n _self._XMLHttpRequestSupported = true;\n } else if (typeof XDomainRequest !== undefined) {\n _self._sender = _xdrSender; // IE 8 and 9\n }\n }\n }\n }\n };\n\n _self.processTelemetry = function (telemetryItem, itemCtx) {\n itemCtx = _self._getTelCtx(itemCtx);\n\n try {\n // if master off switch is set, don't send any data\n if (_self._senderConfig.disableTelemetry()) {\n // Do not send/save data\n return;\n } // validate input\n\n\n if (!telemetryItem) {\n itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSendEmptyTelemetry, \"Cannot send empty telemetry\");\n return;\n } // validate event\n\n\n if (telemetryItem.baseData && !telemetryItem.baseType) {\n itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.InvalidEvent, \"Cannot send telemetry without baseData and baseType\");\n return;\n }\n\n if (!telemetryItem.baseType) {\n // Default\n telemetryItem.baseType = \"EventData\";\n } // ensure a sender was constructed\n\n\n if (!_self._sender) {\n itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.SenderNotInitialized, \"Sender was not initialized\");\n return;\n } // check if this item should be sampled in, else add sampleRate tag\n\n\n if (!_isSampledIn(telemetryItem)) {\n // Item is sampled out, do not send it\n itemCtx.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TelemetrySampledAndNotSent, \"Telemetry item was sampled out and not sent\", {\n SampleRate: _self._sample.sampleRate\n });\n return;\n } else {\n telemetryItem[SampleRate] = _self._sample.sampleRate;\n } // construct an envelope that Application Insights endpoint can understand\n\n\n var aiEnvelope_1 = Sender.constructEnvelope(telemetryItem, _self._senderConfig.instrumentationKey(), itemCtx.diagLog());\n\n if (!aiEnvelope_1) {\n itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CreateEnvelopeError, \"Unable to create an AppInsights envelope\");\n return;\n }\n\n var doNotSendItem_1 = false; // this is for running in legacy mode, where customer may already have a custom initializer present\n\n if (telemetryItem.tags && telemetryItem.tags[ProcessLegacy]) {\n CoreUtils.arrForEach(telemetryItem.tags[ProcessLegacy], function (callBack) {\n try {\n if (callBack && callBack(aiEnvelope_1) === false) {\n doNotSendItem_1 = true;\n itemCtx.diagLog().warnToConsole(\"Telemetry processor check returns false\");\n }\n } catch (e) {\n // log error but dont stop executing rest of the telemetry initializers\n // doNotSendItem = true;\n itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"One of telemetry initializers failed, telemetry item will not be sent: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n }, true);\n }\n });\n delete telemetryItem.tags[ProcessLegacy];\n }\n\n if (doNotSendItem_1) {\n return; // do not send, no need to execute next plugin\n } // check if the incoming payload is too large, truncate if necessary\n\n\n var payload = _serializer.serialize(aiEnvelope_1); // flush if we would exceed the max-size limit by adding this item\n\n\n var bufferPayload = _self._buffer.getItems();\n\n var batch = _self._buffer.batchPayloads(bufferPayload);\n\n if (batch && batch.length + payload.length > _self._senderConfig.maxBatchSizeInBytes()) {\n _self.triggerSend(true, null, 10\n /* MaxBatchSize */\n );\n } // enqueue the payload\n\n\n _self._buffer.enqueue(payload); // ensure an invocation timeout is set\n\n\n _setupTimer();\n } catch (e) {\n itemCtx.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.FailedAddingTelemetryToBuffer, \"Failed adding telemetry to the sender's buffer, some telemetry will be lost: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n } // hand off the telemetry item to the next plugin\n\n\n _self.processNext(telemetryItem, itemCtx);\n };\n /**\r\n * xhr state changes\r\n */\n\n\n _self._xhrReadyStateChange = function (xhr, payload, countOfItemsInPayload) {\n if (xhr.readyState === 4) {\n var response = null;\n\n if (!_self._appId) {\n response = _parseResponse(_getResponseText(xhr) || xhr.response);\n\n if (response && response.appId) {\n _self._appId = response.appId;\n }\n }\n\n if ((xhr.status < 200 || xhr.status >= 300) && xhr.status !== 0) {\n if (!_self._senderConfig.isRetryDisabled() && _isRetriable(xhr.status)) {\n _resendPayload(payload);\n\n _self.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TransmissionFailed, \". \" + \"Response code \" + xhr.status + \". Will retry to send \" + payload.length + \" items.\");\n } else {\n _self._onError(payload, _formatErrorMessageXhr(xhr));\n }\n } else if (Offline.isOffline()) {\n // Note: Don't check for status == 0, since adblock gives this code\n if (!_self._senderConfig.isRetryDisabled()) {\n var offlineBackOffMultiplier = 10; // arbritrary number\n\n _resendPayload(payload, offlineBackOffMultiplier);\n\n _self.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TransmissionFailed, \". Offline - Response Code: \" + xhr.status + \". Offline status: \" + Offline.isOffline() + \". Will retry to send \" + payload.length + \" items.\");\n }\n } else {\n if (xhr.status === 206) {\n if (!response) {\n response = _parseResponse(_getResponseText(xhr) || xhr.response);\n }\n\n if (response && !_self._senderConfig.isRetryDisabled()) {\n _self._onPartialSuccess(payload, response);\n } else {\n _self._onError(payload, _formatErrorMessageXhr(xhr));\n }\n } else {\n _consecutiveErrors = 0;\n\n _self._onSuccess(payload, countOfItemsInPayload);\n }\n }\n }\n };\n /**\r\n * Immediately send buffered data\r\n * @param async {boolean} - Indicates if the events should be sent asynchronously\r\n * @param forcedSender {SenderFunction} - Indicates the forcedSender, undefined if not passed\r\n */\n\n\n _self.triggerSend = function (async, forcedSender, sendReason) {\n if (async === void 0) {\n async = true;\n }\n\n try {\n // Send data only if disableTelemetry is false\n if (!_self._senderConfig.disableTelemetry()) {\n if (_self._buffer.count() > 0) {\n var payload = _self._buffer.getItems();\n\n _notifySendRequest(sendReason || 0\n /* Undefined */\n , async); // invoke send\n\n\n if (forcedSender) {\n forcedSender.call(_this, payload, async);\n } else {\n _self._sender(payload, async);\n }\n } // update lastSend time to enable throttling\n\n\n _lastSend = +new Date();\n } else {\n _self._buffer.clear();\n }\n\n clearTimeout(_timeoutHandle);\n _timeoutHandle = null;\n _retryAt = null;\n } catch (e) {\n /* Ignore this error for IE under v10 */\n var ieVer = Util.getIEVersion();\n\n if (!ieVer || ieVer > 9) {\n _self.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TransmissionFailed, \"Telemetry transmission failed, some telemetry will be lost: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n }\n };\n /**\r\n * error handler\r\n */\n\n\n _self._onError = function (payload, message, event) {\n _self.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.OnError, \"Failed to send telemetry.\", {\n message: message\n });\n\n _self._buffer.clearSent(payload);\n };\n /**\r\n * partial success handler\r\n */\n\n\n _self._onPartialSuccess = function (payload, results) {\n var failed = [];\n var retry = []; // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item.\n\n var errors = results.errors.reverse();\n\n for (var _i = 0, errors_1 = errors; _i < errors_1.length; _i++) {\n var error = errors_1[_i];\n var extracted = payload.splice(error.index, 1)[0];\n\n if (_isRetriable(error.statusCode)) {\n retry.push(extracted);\n } else {\n // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache).\n failed.push(extracted);\n }\n }\n\n if (payload.length > 0) {\n _self._onSuccess(payload, results.itemsAccepted);\n }\n\n if (failed.length > 0) {\n _self._onError(failed, _formatErrorMessageXhr(null, ['partial success', results.itemsAccepted, 'of', results.itemsReceived].join(' ')));\n }\n\n if (retry.length > 0) {\n _resendPayload(retry);\n\n _self.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TransmissionFailed, \"Partial success. \" + \"Delivered: \" + payload.length + \", Failed: \" + failed.length + \". Will retry to send \" + retry.length + \" our of \" + results.itemsReceived + \" items\");\n }\n };\n /**\r\n * success handler\r\n */\n\n\n _self._onSuccess = function (payload, countOfItemsInPayload) {\n _self._buffer.clearSent(payload);\n };\n /**\r\n * xdr state changes\r\n */\n\n\n _self._xdrOnLoad = function (xdr, payload) {\n var responseText = _getResponseText(xdr);\n\n if (xdr && (responseText + \"\" === \"200\" || responseText === \"\")) {\n _consecutiveErrors = 0;\n\n _self._onSuccess(payload, 0);\n } else {\n var results = _parseResponse(responseText);\n\n if (results && results.itemsReceived && results.itemsReceived > results.itemsAccepted && !_self._senderConfig.isRetryDisabled()) {\n _self._onPartialSuccess(payload, results);\n } else {\n _self._onError(payload, _formatErrorMessageXdr(xdr));\n }\n }\n };\n\n function _isSampledIn(envelope) {\n return _self._sample.isSampledIn(envelope);\n }\n /**\r\n * Send Beacon API request\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - not used\r\n * Note: Beacon API does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\n\n\n function _beaconSender(payload, isAsync) {\n var url = _self._senderConfig.endpointUrl();\n\n var batch = _self._buffer.batchPayloads(payload); // Chrome only allows CORS-safelisted values for the sendBeacon data argument\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\n\n\n var plainTextBatch = new Blob([batch], {\n type: 'text/plain;charset=UTF-8'\n }); // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\n\n var queued = getNavigator().sendBeacon(url, plainTextBatch);\n\n if (queued) {\n _self._buffer.markAsSent(payload); // no response from beaconSender, clear buffer\n\n\n _self._onSuccess(payload, payload.length);\n } else {\n _xhrSender(payload, true);\n\n _self.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TransmissionFailed, \". \" + \"Failed to send telemetry with Beacon API, retried with xhrSender.\");\n }\n }\n /**\r\n * Send XMLHttpRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n */\n\n\n function _xhrSender(payload, isAsync) {\n var xhr = new XMLHttpRequest();\n\n var endPointUrl = _self._senderConfig.endpointUrl();\n\n try {\n xhr[DisabledPropertyName] = true;\n } catch (e) {// If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would\n // cause the request to fail and we no telemetry would be sent\n }\n\n xhr.open(\"POST\", endPointUrl, isAsync);\n xhr.setRequestHeader(\"Content-type\", \"application/json\"); // append Sdk-Context request header only in case of breeze endpoint\n\n if (Util.isInternalApplicationInsightsEndpoint(endPointUrl)) {\n xhr.setRequestHeader(RequestHeaders.sdkContextHeader, RequestHeaders.sdkContextHeaderAppIdRequest);\n }\n\n xhr.onreadystatechange = function () {\n return _self._xhrReadyStateChange(xhr, payload, payload.length);\n };\n\n xhr.onerror = function (event) {\n return _self._onError(payload, _formatErrorMessageXhr(xhr), event);\n }; // compose an array of payloads\n\n\n var batch = _self._buffer.batchPayloads(payload);\n\n xhr.send(batch);\n\n _self._buffer.markAsSent(payload);\n }\n /**\r\n * Parses the response from the backend.\r\n * @param response - XMLHttpRequest or XDomainRequest response\r\n */\n\n\n function _parseResponse(response) {\n try {\n if (response && response !== \"\") {\n var result = getJSON().parse(response);\n\n if (result && result.itemsReceived && result.itemsReceived >= result.itemsAccepted && result.itemsReceived - result.itemsAccepted === result.errors.length) {\n return result;\n }\n }\n } catch (e) {\n _self.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.InvalidBackendResponse, \"Cannot parse the response. \" + Util.getExceptionName(e), {\n response: response\n });\n }\n\n return null;\n }\n /**\r\n * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff).\r\n * @param payload\r\n */\n\n\n function _resendPayload(payload, linearFactor) {\n if (linearFactor === void 0) {\n linearFactor = 1;\n }\n\n if (!payload || payload.length === 0) {\n return;\n }\n\n _self._buffer.clearSent(payload);\n\n _consecutiveErrors++;\n\n for (var _i = 0, payload_1 = payload; _i < payload_1.length; _i++) {\n var item = payload_1[_i];\n\n _self._buffer.enqueue(item);\n } // setup timer\n\n\n _setRetryTime(linearFactor);\n\n _setupTimer();\n }\n /**\r\n * Calculates the time to wait before retrying in case of an error based on\r\n * http://en.wikipedia.org/wiki/Exponential_backoff\r\n */\n\n\n function _setRetryTime(linearFactor) {\n var SlotDelayInSeconds = 10;\n var delayInSeconds;\n\n if (_consecutiveErrors <= 1) {\n delayInSeconds = SlotDelayInSeconds;\n } else {\n var backOffSlot = (Math.pow(2, _consecutiveErrors) - 1) / 2; // tslint:disable-next-line:insecure-random\n\n var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1;\n backOffDelay = linearFactor * backOffDelay;\n delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);\n } // TODO: Log the backoff time like the C# version does.\n\n\n var retryAfterTimeSpan = CoreUtils.dateNow() + delayInSeconds * 1000; // TODO: Log the retry at time like the C# version does.\n\n _retryAt = retryAfterTimeSpan;\n }\n /**\r\n * Sets up the timer which triggers actually sending the data.\r\n */\n\n\n function _setupTimer() {\n if (!_timeoutHandle) {\n var retryInterval = _retryAt ? Math.max(0, _retryAt - CoreUtils.dateNow()) : 0;\n var timerValue = Math.max(_self._senderConfig.maxBatchInterval(), retryInterval);\n _timeoutHandle = setTimeout(function () {\n _self.triggerSend(true, null, 1\n /* NormalSchedule */\n );\n }, timerValue);\n }\n }\n /**\r\n * Checks if the SDK should resend the payload after receiving this status code from the backend.\r\n * @param statusCode\r\n */\n\n\n function _isRetriable(statusCode) {\n return statusCode === 408 // Timeout\n || statusCode === 429 // Too many requests.\n || statusCode === 500 // Internal server error.\n || statusCode === 503; // Service unavailable.\n }\n\n function _formatErrorMessageXhr(xhr, message) {\n if (xhr) {\n return \"XMLHttpRequest,Status:\" + xhr.status + \",Response:\" + _getResponseText(xhr) || xhr.response || \"\";\n }\n\n return message;\n }\n /**\r\n * Send XDomainRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n *\r\n * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added\r\n * to maintain consistency with the xhrSender's contract\r\n * Note: XDomainRequest does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\n\n\n function _xdrSender(payload, isAsync) {\n var _window = getWindow();\n\n var xdr = new XDomainRequest();\n\n xdr.onload = function () {\n return _self._xdrOnLoad(xdr, payload);\n };\n\n xdr.onerror = function (event) {\n return _self._onError(payload, _formatErrorMessageXdr(xdr), event);\n }; // XDomainRequest requires the same protocol as the hosting page.\n // If the protocol doesn't match, we can't send the telemetry :(.\n\n\n var hostingProtocol = _window && _window.location && _window.location.protocol || \"\";\n\n if (_self._senderConfig.endpointUrl().lastIndexOf(hostingProtocol, 0) !== 0) {\n _self.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TransmissionFailed, \". \" + \"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.\");\n\n _self._buffer.clear();\n\n return;\n }\n\n var endpointUrl = _self._senderConfig.endpointUrl().replace(/^(https?:)/, \"\");\n\n xdr.open('POST', endpointUrl); // compose an array of payloads\n\n var batch = _self._buffer.batchPayloads(payload);\n\n xdr.send(batch);\n\n _self._buffer.markAsSent(payload);\n }\n\n function _formatErrorMessageXdr(xdr, message) {\n if (xdr) {\n return \"XDomainRequest,Response:\" + _getResponseText(xdr) || \"\";\n }\n\n return message;\n } // Using function lookups for backward compatibility as the getNotifyMgr() did not exist until after v2.5.6\n\n\n function _getNotifyMgr() {\n var func = 'getNotifyMgr';\n\n if (_self.core[func]) {\n return _self.core[func]();\n } // using _self.core['_notificationManager'] for backward compatibility\n\n\n return _self.core['_notificationManager'];\n }\n\n function _notifySendRequest(sendRequest, isAsync) {\n var manager = _getNotifyMgr();\n\n if (manager && manager.eventsSendRequest) {\n try {\n manager.eventsSendRequest(sendRequest, isAsync);\n } catch (e) {\n _self.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.NotificationException, \"send request notification failed: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n }\n }\n /**\r\n * Validate UUID Format\r\n * Specs taken from https://tools.ietf.org/html/rfc4122 and breeze repo\r\n */\n\n\n function _validateInstrumentationKey(config) {\n var disableIKeyValidationFlag = CoreUtils.isNullOrUndefined(config.disableInstrumentationKeyValidation) ? false : config.disableInstrumentationKeyValidation;\n\n if (disableIKeyValidationFlag) {\n return true;\n }\n\n var UUID_Regex = '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$';\n var regexp = new RegExp(UUID_Regex);\n return regexp.test(config.instrumentationKey);\n }\n });\n return _this;\n }\n\n Sender.constructEnvelope = function (orig, iKey, logger) {\n var envelope;\n\n if (iKey !== orig.iKey && !CoreUtils.isNullOrUndefined(iKey)) {\n envelope = __assign({}, orig, {\n iKey: iKey\n });\n } else {\n envelope = orig;\n }\n\n switch (envelope.baseType) {\n case Event.dataType:\n return EventEnvelopeCreator.EventEnvelopeCreator.Create(logger, envelope);\n\n case Trace.dataType:\n return TraceEnvelopeCreator.TraceEnvelopeCreator.Create(logger, envelope);\n\n case PageView.dataType:\n return PageViewEnvelopeCreator.PageViewEnvelopeCreator.Create(logger, envelope);\n\n case PageViewPerformance.dataType:\n return PageViewPerformanceEnvelopeCreator.PageViewPerformanceEnvelopeCreator.Create(logger, envelope);\n\n case Exception.dataType:\n return ExceptionEnvelopeCreator.ExceptionEnvelopeCreator.Create(logger, envelope);\n\n case Metric.dataType:\n return MetricEnvelopeCreator.MetricEnvelopeCreator.Create(logger, envelope);\n\n case RemoteDependencyData.dataType:\n return DependencyEnvelopeCreator.DependencyEnvelopeCreator.Create(logger, envelope);\n\n default:\n return EventEnvelopeCreator.EventEnvelopeCreator.Create(logger, envelope);\n }\n };\n\n Sender._getDefaultAppInsightsChannelConfig = function () {\n // set default values\n return {\n endpointUrl: function endpointUrl() {\n return \"https://dc.services.visualstudio.com/v2/track\";\n },\n emitLineDelimitedJson: function emitLineDelimitedJson() {\n return false;\n },\n maxBatchInterval: function maxBatchInterval() {\n return 15000;\n },\n maxBatchSizeInBytes: function maxBatchSizeInBytes() {\n return 102400;\n },\n disableTelemetry: function disableTelemetry() {\n return false;\n },\n enableSessionStorageBuffer: function enableSessionStorageBuffer() {\n return true;\n },\n isRetryDisabled: function isRetryDisabled() {\n return false;\n },\n isBeaconApiDisabled: function isBeaconApiDisabled() {\n return true;\n },\n onunloadDisableBeacon: function onunloadDisableBeacon() {\n return false;\n },\n instrumentationKey: function instrumentationKey() {\n return undefined;\n },\n namePrefix: function namePrefix() {\n return undefined;\n },\n samplingPercentage: function samplingPercentage() {\n return 100;\n }\n };\n };\n\n Sender._getEmptyAppInsightsChannelConfig = function () {\n return {\n endpointUrl: undefined,\n emitLineDelimitedJson: undefined,\n maxBatchInterval: undefined,\n maxBatchSizeInBytes: undefined,\n disableTelemetry: undefined,\n enableSessionStorageBuffer: undefined,\n isRetryDisabled: undefined,\n isBeaconApiDisabled: undefined,\n onunloadDisableBeacon: undefined,\n instrumentationKey: undefined,\n namePrefix: undefined,\n samplingPercentage: undefined\n };\n }; // Removed Stub for Sender.prototype.pause.\n // Removed Stub for Sender.prototype.resume.\n // Removed Stub for Sender.prototype.flush.\n // Removed Stub for Sender.prototype.onunloadFlush.\n // Removed Stub for Sender.prototype.teardown.\n // Removed Stub for Sender.prototype.initialize.\n // Removed Stub for Sender.prototype.processTelemetry.\n // Removed Stub for Sender.prototype._xhrReadyStateChange.\n // Removed Stub for Sender.prototype.triggerSend.\n // Removed Stub for Sender.prototype._onError.\n // Removed Stub for Sender.prototype._onPartialSuccess.\n // Removed Stub for Sender.prototype._onSuccess.\n // Removed Stub for Sender.prototype._xdrOnLoad.\n\n\n return Sender;\n}(BaseTelemetryPlugin);\n\nexport { Sender };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Util } from '@microsoft/applicationinsights-common';\nimport { _InternalMessageId, LoggingSeverity, CoreUtils, DiagnosticLogger } from '@microsoft/applicationinsights-core-js';\n\nvar Session =\n/** @class */\nfunction () {\n function Session() {}\n\n return Session;\n}();\n\nexport { Session };\n\nvar _SessionManager =\n/** @class */\nfunction () {\n function _SessionManager(config, logger) {\n var _this = this;\n\n if (CoreUtils.isNullOrUndefined(logger)) {\n this._logger = new DiagnosticLogger();\n } else {\n this._logger = logger;\n }\n\n if (!config) {\n config = {};\n }\n\n if (!(typeof config.sessionExpirationMs === \"function\")) {\n config.sessionExpirationMs = function () {\n return _SessionManager.acquisitionSpan;\n };\n }\n\n if (!(typeof config.sessionRenewalMs === \"function\")) {\n config.sessionRenewalMs = function () {\n return _SessionManager.renewalSpan;\n };\n }\n\n this.config = config;\n\n this._storageNamePrefix = function () {\n return _this.config.namePrefix && _this.config.namePrefix() ? _SessionManager.cookieNameConst + _this.config.namePrefix() : _SessionManager.cookieNameConst;\n };\n\n this.automaticSession = new Session();\n }\n\n _SessionManager.prototype.update = function () {\n if (!this.automaticSession.id) {\n this.initializeAutomaticSession();\n } // Always using Date getTime() as there is a bug in older IE instances that causes the performance timings to have the hi-bit set eg 0x800000000 causing\n // the number to be incorrect.\n\n\n var now = new Date().getTime();\n var acquisitionExpired = this.config.sessionExpirationMs() === 0 ? false : now - this.automaticSession.acquisitionDate > this.config.sessionExpirationMs();\n var renewalExpired = this.config.sessionExpirationMs() === 0 ? false : now - this.automaticSession.renewalDate > this.config.sessionRenewalMs(); // renew if acquisitionSpan or renewalSpan has elapsed\n\n if (acquisitionExpired || renewalExpired) {\n // update automaticSession so session state has correct id\n this.renew();\n } else {\n // do not update the cookie more often than cookieUpdateInterval\n if (!this.cookieUpdatedTimestamp || now - this.cookieUpdatedTimestamp > _SessionManager.cookieUpdateInterval) {\n this.automaticSession.renewalDate = now;\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\n }\n }\n };\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */\n\n\n _SessionManager.prototype.backup = function () {\n this.setStorage(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\n };\n /**\r\n * Use config.namePrefix + ai_session cookie data or local storage data (when the cookie is unavailable) to\r\n * initialize the automatic session.\r\n */\n\n\n _SessionManager.prototype.initializeAutomaticSession = function () {\n var cookie = Util.getCookie(this._logger, this._storageNamePrefix());\n\n if (cookie && typeof cookie.split === \"function\") {\n this.initializeAutomaticSessionWithData(cookie);\n } else {\n // There's no cookie, but we might have session data in local storage\n // This can happen if the session expired or the user actively deleted the cookie\n // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively.\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\n var storage = Util.getStorage(this._logger, this._storageNamePrefix());\n\n if (storage) {\n this.initializeAutomaticSessionWithData(storage);\n }\n }\n\n if (!this.automaticSession.id) {\n this.renew();\n }\n };\n /**\r\n * Extract id, acquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param {string} sessionData - The string stored in an ai_session cookie or local storage backup\r\n */\n\n\n _SessionManager.prototype.initializeAutomaticSessionWithData = function (sessionData) {\n var params = sessionData.split(\"|\");\n\n if (params.length > 0) {\n this.automaticSession.id = params[0];\n }\n\n try {\n if (params.length > 1) {\n var acq = +params[1];\n this.automaticSession.acquisitionDate = +new Date(acq);\n this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0;\n }\n\n if (params.length > 2) {\n var renewal = +params[2];\n this.automaticSession.renewalDate = +new Date(renewal);\n this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0;\n }\n } catch (e) {\n this._logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.ErrorParsingAISessionCookie, \"Error parsing ai_session cookie, session will be reset: \" + Util.getExceptionName(e), {\n exception: Util.dump(e)\n });\n }\n\n if (this.automaticSession.renewalDate === 0) {\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.SessionRenewalDateIsZero, \"AI session renewal date is 0, session will be reset.\");\n }\n };\n\n _SessionManager.prototype.renew = function () {\n var now = new Date().getTime();\n this.automaticSession.id = Util.newId(this.config && this.config.idLength ? this.config.idLength() : 22);\n this.automaticSession.acquisitionDate = now;\n this.automaticSession.renewalDate = now;\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate); // If this browser does not support local storage, fire an internal log to keep track of it at this point\n\n if (!Util.canUseLocalStorage()) {\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserDoesNotSupportLocalStorage, \"Browser does not support local storage. Session durations will be inaccurate.\");\n }\n };\n\n _SessionManager.prototype.setCookie = function (guid, acq, renewal) {\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\n var acquisitionExpiry = acq + this.config.sessionExpirationMs();\n var renewalExpiry = renewal + this.config.sessionRenewalMs();\n var cookieExpiry = new Date();\n var cookie = [guid, acq, renewal];\n\n if (acquisitionExpiry < renewalExpiry) {\n cookieExpiry.setTime(acquisitionExpiry);\n } else {\n cookieExpiry.setTime(renewalExpiry);\n }\n\n var cookieDomain = this.config.cookieDomain ? this.config.cookieDomain() : null; // if sessionExpirationMs is set to 0, it means the expiry is set to 0 for this session cookie\n // A cookie with 0 expiry in the session cookie will never expire for that browser session. If the browser is closed the cookie expires. \n // Another browser instance does not inherit this cookie.\n\n var UTCString = this.config.sessionExpirationMs() === 0 ? '0' : cookieExpiry.toUTCString();\n Util.setCookie(this._logger, this._storageNamePrefix(), cookie.join('|') + ';expires=' + UTCString, cookieDomain);\n this.cookieUpdatedTimestamp = new Date().getTime();\n };\n\n _SessionManager.prototype.setStorage = function (guid, acq, renewal) {\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\n // The server will notice this and end the sessions itself, with loss of accurate session duration\n Util.setStorage(this._logger, this._storageNamePrefix(), [guid, acq, renewal].join('|'));\n };\n\n _SessionManager.acquisitionSpan = 86400000; // 24 hours in ms\n\n _SessionManager.renewalSpan = 1800000; // 30 minutes in ms\n\n _SessionManager.cookieUpdateInterval = 60000; // 1 minute in ms\n\n _SessionManager.cookieNameConst = 'ai_session';\n return _SessionManager;\n}();\n\nexport { _SessionManager };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Application =\n/** @class */\nfunction () {\n function Application() {}\n\n return Application;\n}();\n\nexport { Application };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Device =\n/** @class */\nfunction () {\n /**\r\n * Constructs a new instance of the Device class\r\n */\n function Device() {\n // don't attempt to fingerprint browsers\n this.id = \"browser\"; // Device type is a dimension in our data platform\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\n\n this.deviceClass = \"Browser\";\n }\n\n return Device;\n}();\n\nexport { Device };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Version = \"2.5.11\";\n\nvar Internal =\n/** @class */\nfunction () {\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\n function Internal(config) {\n this.sdkVersion = (config.sdkExtension && config.sdkExtension() ? config.sdkExtension() + \"_\" : \"\") + \"javascript:\" + Version;\n }\n\n return Internal;\n}();\n\nexport { Internal };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Util } from '@microsoft/applicationinsights-common';\nimport { _InternalMessageId, LoggingSeverity, CoreUtils } from '@microsoft/applicationinsights-core-js';\n\nvar User =\n/** @class */\nfunction () {\n function User(config, logger) {\n this.isNewUser = false;\n this._logger = logger; // get userId or create new one if none exists\n\n var cookie = Util.getCookie(this._logger, User.userCookieName);\n\n if (cookie) {\n this.isNewUser = false;\n var params = cookie.split(User.cookieSeparator);\n\n if (params.length > 0) {\n this.id = params[0];\n }\n }\n\n this.config = config;\n\n if (!this.id) {\n this.id = CoreUtils.newId(config && config.idLength ? config.idLength() : 22);\n var date = new Date();\n var acqStr = CoreUtils.toISOString(date);\n this.accountAcquisitionDate = acqStr;\n this.isNewUser = true; // without expiration, cookies expire at the end of the session\n // set it to 365 days from now\n // 365 * 24 * 60 * 60 * 1000 = 31536000000 \n\n date.setTime(date.getTime() + 31536000000);\n var newCookie = [this.id, acqStr];\n var cookieDomain = this.config.cookieDomain ? this.config.cookieDomain() : undefined;\n Util.setCookie(this._logger, User.userCookieName, newCookie.join(User.cookieSeparator) + ';expires=' + date.toUTCString(), cookieDomain); // If we have an config.namePrefix() + ai_session in local storage this means the user actively removed our cookies.\n // We should respect their wishes and clear ourselves from local storage\n\n var name_1 = config.namePrefix && config.namePrefix() ? config.namePrefix() + 'ai_session' : 'ai_session';\n Util.removeStorage(this._logger, name_1);\n } // We still take the account id from the ctor param for backward compatibility. \n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\n\n\n this.accountId = config.accountId ? config.accountId() : undefined; // Get the auth user id and account id from the cookie if exists\n // Cookie is in the pattern: |\n\n var authCookie = Util.getCookie(this._logger, User.authUserCookieName);\n\n if (authCookie) {\n authCookie = decodeURI(authCookie);\n var authCookieString = authCookie.split(User.cookieSeparator);\n\n if (authCookieString[0]) {\n this.authenticatedId = authCookieString[0];\n }\n\n if (authCookieString.length > 1 && authCookieString[1]) {\n this.accountId = authCookieString[1];\n }\n }\n }\n /**\r\n * Sets the authenticated user id and the account id in this session.\r\n *\r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\n\n\n User.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\n if (storeInCookie === void 0) {\n storeInCookie = false;\n } // Validate inputs to ensure no cookie control characters.\n\n\n var isInvalidInput = !this.validateUserInput(authenticatedUserId) || accountId && !this.validateUserInput(accountId);\n\n if (isInvalidInput) {\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.SetAuthContextFailedAccountName, \"Setting auth user context failed. \" + \"User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\", true);\n\n return;\n } // Create cookie string.\n\n\n this.authenticatedId = authenticatedUserId;\n var authCookie = this.authenticatedId;\n\n if (accountId) {\n this.accountId = accountId;\n authCookie = [this.authenticatedId, this.accountId].join(User.cookieSeparator);\n }\n\n if (storeInCookie) {\n // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\n // Encoding the cookie to handle unexpected unicode characters.\n Util.setCookie(this._logger, User.authUserCookieName, encodeURI(authCookie), this.config.cookieDomain());\n }\n };\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {}\r\n */\n\n\n User.prototype.clearAuthenticatedUserContext = function () {\n this.authenticatedId = null;\n this.accountId = null;\n Util.deleteCookie(this._logger, User.authUserCookieName);\n };\n\n User.prototype.validateUserInput = function (id) {\n // Validate:\n // 1. Id is a non-empty string.\n // 2. It does not contain special characters for cookies.\n if (typeof id !== 'string' || !id || id.match(/,|;|=| |\\|/)) {\n return false;\n }\n\n return true;\n };\n\n User.cookieSeparator = '|';\n User.userCookieName = 'ai_user';\n User.authUserCookieName = 'ai_authUser';\n return User;\n}();\n\nexport { User };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Location =\n/** @class */\nfunction () {\n function Location() {}\n\n return Location;\n}();\n\nexport { Location };","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Util, DataSanitizer } from '@microsoft/applicationinsights-common';\nimport { getLocation } from '@microsoft/applicationinsights-core-js';\n\nvar TelemetryTrace =\n/** @class */\nfunction () {\n function TelemetryTrace(id, parentId, name, logger) {\n this.traceID = id || Util.generateW3CId();\n this.parentID = parentId;\n this.name = name;\n var location = getLocation();\n\n if (!name && location && location.pathname) {\n this.name = location.pathname;\n }\n\n this.name = DataSanitizer.sanitizeString(logger, this.name);\n }\n\n return TelemetryTrace;\n}();\n\nexport { TelemetryTrace };","/**\r\n * PropertiesPlugin.ts\r\n * @copyright Microsoft 2018\r\n */\nimport { CoreUtils, hasWindow, _InternalLogMessage } from '@microsoft/applicationinsights-core-js';\nimport { Session, _SessionManager } from './Context/Session';\nimport { Extensions, CtxTagKeys, PageView } from '@microsoft/applicationinsights-common';\nimport { Application } from './Context/Application';\nimport { Device } from './Context/Device';\nimport { Internal } from './Context/Internal';\nimport { User } from './Context/User';\nimport { Location } from './Context/Location';\nimport { TelemetryTrace } from './Context/TelemetryTrace';\n\nvar TelemetryContext =\n/** @class */\nfunction () {\n function TelemetryContext(logger, defaultConfig) {\n var _self = this;\n\n _self.application = new Application();\n _self.internal = new Internal(defaultConfig);\n\n if (hasWindow()) {\n _self.sessionManager = new _SessionManager(defaultConfig, logger);\n _self.device = new Device();\n _self.location = new Location();\n _self.user = new User(defaultConfig, logger);\n _self.telemetryTrace = new TelemetryTrace(undefined, undefined, undefined, logger);\n _self.session = new Session();\n }\n\n _self.appId = function () {\n return null;\n };\n }\n\n TelemetryContext.prototype.applySessionContext = function (event, itemCtx) {\n var session = this.session;\n var sessionManager = this.sessionManager;\n var sessionContext = session || sessionManager && sessionManager.automaticSession;\n\n if (sessionContext) {\n if (CoreUtils.isString(sessionContext.id)) {\n event.ext.app.sesId = sessionContext.id;\n }\n }\n\n if (session) {\n // If customer set session info, apply his context; otherwise apply context automatically generated\n if (CoreUtils.isString(session.id)) {\n event.ext.app.sesId = session.id;\n } else {\n event.ext.app.sesId = sessionManager.automaticSession.id;\n }\n }\n };\n\n TelemetryContext.prototype.applyOperatingSystemContxt = function (event, itemCtx) {\n var os = this.os;\n\n if (os && os.name) {\n event.ext.os = os;\n }\n };\n\n TelemetryContext.prototype.applyApplicationContext = function (event, itemCtx) {\n var application = this.application;\n\n if (application) {\n if (CoreUtils.isString(application.ver)) {\n event.tags[CtxTagKeys.applicationVersion] = application.ver;\n }\n\n if (CoreUtils.isString(application.build)) {\n event.tags[CtxTagKeys.applicationBuild] = application.build;\n }\n }\n };\n\n TelemetryContext.prototype.applyDeviceContext = function (event, itemCtx) {\n var device = this.device;\n\n if (device) {\n if (CoreUtils.isString(device.id)) {\n event.ext.device.localId = device.id;\n }\n\n if (CoreUtils.isString(device.ip)) {\n event.ext.device.ip = device.ip;\n }\n\n if (CoreUtils.isString(device.model)) {\n event.ext.device.model = device.model;\n }\n\n if (CoreUtils.isString(device.deviceClass)) {\n event.ext.device.deviceClass = device.deviceClass;\n }\n }\n };\n\n TelemetryContext.prototype.applyInternalContext = function (event, itemCtx) {\n var internal = this.internal;\n\n if (internal) {\n if (CoreUtils.isString(internal.agentVersion)) {\n event.tags[CtxTagKeys.internalAgentVersion] = internal.agentVersion; // not mapped in CS 4.0\n }\n\n if (CoreUtils.isString(internal.sdkVersion)) {\n event.tags[CtxTagKeys.internalSdkVersion] = internal.sdkVersion;\n }\n\n if (event.baseType === _InternalLogMessage.dataType || event.baseType === PageView.dataType) {\n if (CoreUtils.isString(internal.snippetVer)) {\n event.tags[CtxTagKeys.internalSnippet] = internal.snippetVer;\n }\n\n if (CoreUtils.isString(internal.sdkSrc)) {\n event.tags[CtxTagKeys.internalSdkSrc] = internal.sdkSrc;\n }\n }\n }\n };\n\n TelemetryContext.prototype.applyLocationContext = function (event, itemCtx) {\n var location = this.location;\n\n if (location) {\n if (CoreUtils.isString(location.ip)) {\n event.tags[CtxTagKeys.locationIp] = location.ip;\n }\n }\n };\n\n TelemetryContext.prototype.applyOperationContext = function (event, itemCtx) {\n var telemetryTrace = this.telemetryTrace;\n\n if (telemetryTrace) {\n var trace = event.ext.trace || {\n traceID: undefined,\n parentID: undefined\n };\n\n if (CoreUtils.isString(telemetryTrace.traceID)) {\n trace.traceID = telemetryTrace.traceID;\n }\n\n if (CoreUtils.isString(telemetryTrace.name)) {\n trace.name = telemetryTrace.name;\n }\n\n if (CoreUtils.isString(telemetryTrace.parentID)) {\n trace.parentID = telemetryTrace.parentID;\n }\n\n event.ext.trace = trace;\n }\n };\n\n TelemetryContext.prototype.applyWebContext = function (event, itemCtx) {\n var web = this.web;\n\n if (web) {\n event.ext.web = event.ext.web || {};\n event.ext.web = web;\n }\n };\n\n TelemetryContext.prototype.applyUserContext = function (event, itemCtx) {\n var user = this.user;\n\n if (user) {\n if (!event.tags) {\n event.tags = [];\n } // stays in tags\n\n\n if (CoreUtils.isString(user.accountId)) {\n event.tags[CtxTagKeys.userAccountId] = user.accountId;\n } // CS 4.0\n\n\n if (CoreUtils.isString(user.id)) {\n event.ext.user.id = user.id;\n }\n\n if (CoreUtils.isString(user.authenticatedId)) {\n event.ext.user.authId = user.authenticatedId;\n }\n }\n };\n\n TelemetryContext.prototype.cleanUp = function (event, itemCtx) {\n if (event.ext[Extensions.DeviceExt] && CoreUtils.objKeys(event.ext[Extensions.DeviceExt]).length === 0) {\n delete event.ext[Extensions.DeviceExt];\n }\n\n if (event.ext[Extensions.UserExt] && CoreUtils.objKeys(event.ext[Extensions.UserExt]).length === 0) {\n delete event.ext[Extensions.UserExt];\n }\n\n if (event.ext[Extensions.WebExt] && CoreUtils.objKeys(event.ext[Extensions.WebExt]).length === 0) {\n delete event.ext[Extensions.WebExt];\n }\n\n if (event.ext[Extensions.OSExt] && CoreUtils.objKeys(event.ext[Extensions.OSExt]).length === 0) {\n delete event.ext[Extensions.OSExt];\n }\n\n if (event.ext[Extensions.AppExt] && CoreUtils.objKeys(event.ext[Extensions.AppExt]).length === 0) {\n delete event.ext[Extensions.AppExt];\n }\n\n if (event.ext[Extensions.TraceExt] && CoreUtils.objKeys(event.ext[Extensions.TraceExt]).length === 0) {\n delete event.ext[Extensions.TraceExt];\n }\n };\n\n return TelemetryContext;\n}();\n\nexport { TelemetryContext };","/**\r\n * PropertiesPlugin.ts\r\n * @copyright Microsoft 2018\r\n */\nimport { BaseTelemetryPlugin, CoreUtils, _InternalLogMessage, LoggingSeverity, _InternalMessageId, getNavigator, objForEachKey } from '@microsoft/applicationinsights-core-js';\nimport { TelemetryContext } from './TelemetryContext';\nimport { PageView, BreezeChannelIdentifier, PropertiesPluginIdentifier, Extensions, Util } from '@microsoft/applicationinsights-common';\n\nvar PropertiesPlugin =\n/** @class */\nfunction (_super) {\n __extends(PropertiesPlugin, _super);\n\n function PropertiesPlugin() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.priority = 110;\n _this.identifier = PropertiesPluginIdentifier;\n return _this;\n }\n\n PropertiesPlugin.getDefaultConfig = function () {\n var defaultConfig = {\n instrumentationKey: function instrumentationKey() {\n return undefined;\n },\n accountId: function accountId() {\n return null;\n },\n sessionRenewalMs: function sessionRenewalMs() {\n return 30 * 60 * 1000;\n },\n samplingPercentage: function samplingPercentage() {\n return 100;\n },\n sessionExpirationMs: function sessionExpirationMs() {\n return 24 * 60 * 60 * 1000;\n },\n cookieDomain: function cookieDomain() {\n return null;\n },\n sdkExtension: function sdkExtension() {\n return null;\n },\n isBrowserLinkTrackingEnabled: function isBrowserLinkTrackingEnabled() {\n return false;\n },\n appId: function appId() {\n return null;\n },\n namePrefix: function namePrefix() {\n return undefined;\n },\n idLength: function idLength() {\n return 22;\n }\n };\n return defaultConfig;\n };\n\n PropertiesPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\n var _this = this;\n\n _super.prototype.initialize.call(this, config, core, extensions, pluginChain);\n\n var ctx = this._getTelCtx();\n\n var identifier = this.identifier;\n var defaultConfig = PropertiesPlugin.getDefaultConfig();\n this._extensionConfig = this._extensionConfig || PropertiesPlugin.getDefaultConfig();\n objForEachKey(defaultConfig, function (field, value) {\n _this._extensionConfig[field] = function () {\n return ctx.getConfig(identifier, field, value());\n };\n });\n this.context = new TelemetryContext(core.logger, this._extensionConfig);\n this._breezeChannel = Util.getExtension(extensions, BreezeChannelIdentifier);\n\n this.context.appId = function () {\n return _this._breezeChannel ? _this._breezeChannel[\"_appId\"] : null;\n };\n };\n /**\r\n * Add Part A fields to the event\r\n * @param event The event that needs to be processed\r\n */\n\n\n PropertiesPlugin.prototype.processTelemetry = function (event, itemCtx) {\n if (CoreUtils.isNullOrUndefined(event)) {// TODO(barustum): throw an internal event once we have support for internal logging\n } else {\n itemCtx = this._getTelCtx(itemCtx); // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\n\n if (event.name === PageView.envelopeType) {\n itemCtx.diagLog().resetInternalMessageCount();\n }\n\n if (this.context.session) {\n // If customer did not provide custom session id update the session manager\n if (typeof this.context.session.id !== \"string\") {\n this.context.sessionManager.update();\n }\n }\n\n this._processTelemetryInternal(event, itemCtx);\n\n if (this.context && this.context.user && this.context.user.isNewUser) {\n this.context.user.isNewUser = false;\n var message = new _InternalLogMessage(_InternalMessageId.SendBrowserInfoOnUserInit, (getNavigator() || {}).userAgent || \"\");\n itemCtx.diagLog().logInternalMessage(LoggingSeverity.CRITICAL, message);\n }\n\n this.processNext(event, itemCtx);\n }\n };\n\n PropertiesPlugin.prototype._processTelemetryInternal = function (event, itemCtx) {\n // set part A fields\n if (!event.tags) {\n event.tags = [];\n }\n\n if (!event.ext) {\n event.ext = {};\n }\n\n var ext = event.ext;\n ext[Extensions.DeviceExt] = ext[Extensions.DeviceExt] || {};\n ext[Extensions.WebExt] = ext[Extensions.WebExt] || {};\n ext[Extensions.UserExt] = ext[Extensions.UserExt] || {};\n ext[Extensions.OSExt] = ext[Extensions.OSExt] || {};\n ext[Extensions.AppExt] = ext[Extensions.AppExt] || {};\n ext[Extensions.TraceExt] = ext[Extensions.TraceExt] || {};\n var context = this.context;\n context.applySessionContext(event, itemCtx);\n context.applyApplicationContext(event, itemCtx);\n context.applyDeviceContext(event, itemCtx);\n context.applyOperationContext(event, itemCtx);\n context.applyUserContext(event, itemCtx);\n context.applyOperatingSystemContxt(event, itemCtx);\n context.applyWebContext(event, itemCtx);\n context.applyLocationContext(event, itemCtx); // legacy tags\n\n context.applyInternalContext(event, itemCtx); // legacy tags\n\n context.cleanUp(event, itemCtx);\n };\n\n return PropertiesPlugin;\n}(BaseTelemetryPlugin);\n\nexport default PropertiesPlugin;","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { strFunction, strPrototype } from \"./EnvUtils\";\nimport { CoreUtils } from './CoreUtils';\nvar aiInstrumentHooks = \"_aiHooks\";\n;\nvar cbNames = [\"req\", \"rsp\", \"hkErr\", \"fnErr\"];\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\n\nvar str__Proto = \"__proto__\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\n\nvar strConstructor = \"constructor\";\n/** @ignore */\n\nfunction _arrLoop(arr, fn) {\n if (arr) {\n for (var lp = 0; lp < arr.length; lp++) {\n if (fn(arr[lp], lp)) {\n break;\n }\n }\n }\n}\n/** @ignore */\n\n\nfunction _doCallbacks(hooks, callDetails, cbArgs, hookCtx, type) {\n if (type >= 0\n /* Request */\n && type <= 2\n /* HookError */\n ) {\n _arrLoop(hooks, function (hook, idx) {\n var cbks = hook.cbks;\n var cb = cbks[cbNames[type]];\n\n if (cb) {\n // Set the specific hook context implementation using a lazy creation pattern\n callDetails.ctx = function () {\n var ctx = hookCtx[idx] = hookCtx[idx] || {};\n return ctx;\n };\n\n try {\n cb.apply(callDetails.inst, cbArgs);\n } catch (err) {\n var orgEx = callDetails.err;\n\n try {\n // Report Hook error via the callback\n var hookErrorCb = cbks[cbNames[2\n /* HookError */\n ]];\n\n if (hookErrorCb) {\n callDetails.err = err;\n hookErrorCb.apply(callDetails.inst, cbArgs);\n }\n } catch (e) {// Not much we can do here -- swallowing the exception to avoid crashing the hosting app\n } finally {\n // restore the original exception (if any)\n callDetails.err = orgEx;\n }\n }\n }\n });\n }\n}\n/** @ignore */\n\n\nfunction _createFunctionHook(aiHook) {\n // Define a temporary method that queues-up a the real method call\n return function () {\n var funcThis = this; // Capture the original arguments passed to the method\n\n var orgArgs = arguments;\n var hooks = aiHook.h;\n var funcArgs = {\n name: aiHook.n,\n inst: funcThis,\n ctx: null,\n set: _replaceArg\n };\n var hookCtx = [];\n\n var cbArgs = _createArgs([funcArgs], orgArgs);\n\n function _createArgs(target, theArgs) {\n _arrLoop(theArgs, function (arg) {\n target.push(arg);\n });\n\n return target;\n }\n\n function _replaceArg(idx, value) {\n orgArgs = _createArgs([], orgArgs);\n orgArgs[idx] = value;\n cbArgs = _createArgs([funcArgs], orgArgs);\n } // Call the pre-request hooks\n\n\n _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 0\n /* Request */\n ); // Call the original function was called\n\n\n var theFunc = aiHook.f;\n\n try {\n funcArgs.rslt = theFunc.apply(funcThis, orgArgs);\n } catch (err) {\n // Report the request callback\n funcArgs.err = err;\n\n _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 3\n /* FunctionError */\n ); // rethrow the original exception so anyone listening for it can catch the exception\n\n\n throw err;\n } // Call the post-request hooks\n\n\n _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 1\n /* Response */\n );\n\n return funcArgs.rslt;\n };\n}\n/**\r\n * Pre-lookup to check if we are running on a modern browser (i.e. not IE8)\r\n * @ignore\r\n */\n\n\nvar _objGetPrototypeOf = Object[\"getPrototypeOf\"];\n/**\r\n * Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.\r\n * @ignore\r\n */\n\nfunction _getObjProto(target) {\n if (target) {\n // This method doesn't existing in older browsers (e.g. IE8)\n if (_objGetPrototypeOf) {\n return _objGetPrototypeOf(target);\n } // target[Constructor] May break if the constructor has been changed or removed\n\n\n var newProto = target[str__Proto] || target[strPrototype] || target[strConstructor];\n\n if (newProto) {\n return newProto;\n }\n }\n\n return null;\n}\n/** @ignore */\n\n\nfunction _getOwner(target, name, checkPrototype) {\n var owner = null;\n\n if (target) {\n if (CoreUtils.hasOwnProperty(target, name)) {\n owner = target;\n } else if (checkPrototype) {\n owner = _getOwner(_getObjProto(target), name, false);\n }\n }\n\n return owner;\n}\n/**\r\n * Intercept the named prototype functions for the target class / object\r\n * @param target - The target object\r\n * @param funcName - The function name\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n */\n\n\nexport function InstrumentProto(target, funcName, callbacks) {\n if (target) {\n return InstrumentFunc(target[strPrototype], funcName, callbacks, false);\n }\n\n return null;\n}\n/**\r\n * Intercept the named prototype functions for the target class / object\r\n * @param target - The target object\r\n * @param funcNames - The function names to intercept and call\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n */\n\nexport function InstrumentProtos(target, funcNames, callbacks) {\n if (target) {\n return InstrumentFuncs(target[strPrototype], funcNames, callbacks, false);\n }\n\n return null;\n}\n/**\r\n * Intercept the named prototype functions for the target class / object\r\n * @param target - The target object\r\n * @param funcName - The function name\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function\r\n */\n\nexport function InstrumentFunc(target, funcName, callbacks, checkPrototype) {\n if (checkPrototype === void 0) {\n checkPrototype = true;\n }\n\n if (target && funcName && callbacks) {\n var owner = _getOwner(target, funcName, checkPrototype);\n\n if (owner) {\n var fn = owner[funcName];\n\n if (typeof fn === strFunction) {\n var aiHook_1 = fn[aiInstrumentHooks];\n\n if (!aiHook_1) {\n // Only hook the function once\n aiHook_1 = {\n i: 0,\n n: funcName,\n f: fn,\n h: []\n }; // Override (hook) the original function\n\n var newFunc = _createFunctionHook(aiHook_1);\n\n newFunc[aiInstrumentHooks] = aiHook_1; // Tag and store the function hooks\n\n owner[funcName] = newFunc;\n }\n\n var theHook = {\n // tslint:disable:object-literal-shorthand\n id: aiHook_1.i,\n cbks: callbacks,\n rm: function rm() {\n // DO NOT Use () => { shorthand for the function as the this gets replaced\n // with the outer this and not the this for theHook instance.\n var id = this.id;\n\n _arrLoop(aiHook_1.h, function (hook, idx) {\n if (hook.id === id) {\n aiHook_1.h.splice(idx, 1);\n return 1;\n }\n });\n } // tslint:enable:object-literal-shorthand\n\n };\n aiHook_1.i++;\n aiHook_1.h.push(theHook);\n return theHook;\n }\n }\n }\n\n return null;\n}\n/**\r\n * Intercept the named functions for the target class / object\r\n * @param target - The target object\r\n * @param funcNames - The function names to intercept and call\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function\r\n */\n\nexport function InstrumentFuncs(target, funcNames, callbacks, checkPrototype) {\n if (checkPrototype === void 0) {\n checkPrototype = true;\n }\n\n var hooks = null;\n\n _arrLoop(funcNames, function (funcName) {\n var hook = InstrumentFunc(target, funcName, callbacks, checkPrototype);\n\n if (hook) {\n if (!hooks) {\n hooks = [];\n }\n\n hooks.push(hook);\n }\n });\n\n return hooks;\n}","/*!\n * Application Insights JavaScript SDK - Dependencies Plugin, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { DataSanitizer, UrlHelper, DateTimeUtils, Util } from '@microsoft/applicationinsights-common';\nimport { CoreUtils, normalizeJsName, objForEachKey } from '@microsoft/applicationinsights-core-js';\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nvar strProperties = \"properties\";\nvar _objKeys = CoreUtils.objKeys;\nvar _arrForEach = CoreUtils.arrForEach;\n/** @ignore */\n\nfunction _calcPerfDuration(resourceEntry, start, end) {\n var result = 0;\n var from = resourceEntry[start];\n var to = resourceEntry[end];\n\n if (from && to) {\n result = DateTimeUtils.GetDuration(from, to);\n }\n\n return result;\n}\n/** @ignore */\n\n\nfunction _setPerfDuration(props, name, resourceEntry, start, end) {\n var result = 0;\n\n var value = _calcPerfDuration(resourceEntry, start, end);\n\n if (value) {\n result = _setPerfValue(props, name, Util.msToTimeSpan(value));\n }\n\n return result;\n}\n/** @ignore */\n\n\nfunction _setPerfValue(props, name, value) {\n var strPerf = \"ajaxPerf\";\n var result = 0;\n\n if (props && name && value) {\n var perfData = props[strPerf] = props[strPerf] || {};\n perfData[name] = value;\n result = 1;\n }\n\n return result;\n}\n/** @ignore */\n\n\nfunction _populatePerfData(ajaxData, dependency) {\n /*\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API\r\n * | -startTime\r\n * | -redirectStart\r\n * | | -redirectEnd\r\n * | | | -fetchStart\r\n * | | | | -domainLookupStart\r\n * | | | | |- domainLookupEnd\r\n * | | | | | | -connectStart\r\n * | | | | | | | -secureConnectionStart\r\n * | | | | | | | | -connectEnd\r\n * | | | | | | | | | -requestStart\r\n * | | | | | | | | | | | -responseStart\r\n * | | | | | | | | | | | | | -responseEnd\r\n * +------------+-+---+----------------+-+--+--------+-+-----------+-+------------+-+\r\n * |--redirect--| |---|--domainLookup--| |--connect--| |--request--| |--response--| |\r\n * |-------------------networkConnect----------------|\r\n * | |---------sentRequest--------|\r\n * |------------------------------------perfTotal-----------------------------------|\r\n */\n var resourceEntry = ajaxData.perfTiming;\n var props = dependency[strProperties] || {};\n var propsSet = 0;\n var _isString = CoreUtils.isString;\n var strName = \"name\";\n var strStart = \"Start\";\n var strEnd = \"End\";\n var strDomainLookup = \"domainLookup\";\n var strConnect = \"connect\";\n var strRedirect = \"redirect\";\n var strRequest = \"request\";\n var strResponse = \"response\";\n var strDuration = \"duration\";\n var strStartTime = \"startTime\";\n var strDomainLookupStart = strDomainLookup + strStart;\n var strDomainLookupEnd = strDomainLookup + strEnd;\n var strConnectStart = strConnect + strStart;\n var strConnectEnd = strConnect + strEnd;\n var strRequestStart = strRequest + strStart;\n var strRequestEnd = strRequest + strEnd;\n var strResponseStart = strResponse + strStart;\n var strResponseEnd = strResponse + strEnd;\n var strRedirectStart = strRedirect + strStart;\n var strRedirectEnd = strRedirect = strEnd;\n var strTransferSize = \"transferSize\";\n var strEncodedBodySize = \"encodedBodySize\";\n var strDecodedBodySize = \"decodedBodySize\";\n var strServerTiming = \"serverTiming\";\n\n if (resourceEntry) {\n // redirect\n propsSet |= _setPerfDuration(props, strRedirect, resourceEntry, strRedirectStart, strRedirectEnd); // domainLookup\n\n propsSet |= _setPerfDuration(props, strDomainLookup, resourceEntry, strDomainLookupStart, strDomainLookupEnd); // connect\n\n propsSet |= _setPerfDuration(props, strConnect, resourceEntry, strConnectStart, strConnectEnd); // request\n\n propsSet |= _setPerfDuration(props, strRequest, resourceEntry, strRequestStart, strRequestEnd); // response\n\n propsSet |= _setPerfDuration(props, strResponse, resourceEntry, strResponseStart, strResponseEnd); // Network connection time\n\n propsSet |= _setPerfDuration(props, \"networkConnect\", resourceEntry, strStartTime, strConnectEnd); // Sent Request\n\n propsSet |= _setPerfDuration(props, \"sentRequest\", resourceEntry, strRequestStart, strResponseEnd); // PerfTotal / Duration\n\n var duration = resourceEntry[strDuration];\n\n if (!duration) {\n duration = _calcPerfDuration(resourceEntry, strStartTime, strResponseEnd) || 0;\n }\n\n propsSet |= _setPerfValue(props, strDuration, duration);\n propsSet |= _setPerfValue(props, \"perfTotal\", duration);\n var serverTiming = resourceEntry[strServerTiming];\n\n if (serverTiming) {\n var server_1 = {};\n\n _arrForEach(serverTiming, function (value, idx) {\n var name = normalizeJsName(value[strName] || \"\" + idx);\n var newValue = server_1[name] || {};\n objForEachKey(value, function (key, val) {\n if (key !== strName && _isString(val) || CoreUtils.isNumber(val)) {\n if (newValue[key]) {\n val = newValue[key] + \";\" + val;\n }\n\n if (val || !_isString(val)) {\n // Only set the value if it has a value and it's not an empty string\n newValue[key] = val;\n }\n }\n });\n server_1[name] = newValue;\n });\n\n propsSet |= _setPerfValue(props, strServerTiming, server_1);\n }\n\n propsSet |= _setPerfValue(props, strTransferSize, resourceEntry[strTransferSize]);\n propsSet |= _setPerfValue(props, strEncodedBodySize, resourceEntry[strEncodedBodySize]);\n propsSet |= _setPerfValue(props, strDecodedBodySize, resourceEntry[strDecodedBodySize]);\n } else {\n if (ajaxData.perfMark) {\n propsSet |= _setPerfValue(props, \"missing\", ajaxData.perfAttempts);\n }\n }\n\n if (propsSet) {\n dependency[strProperties] = props;\n }\n}\n\nvar XHRMonitoringState =\n/** @class */\nfunction () {\n function XHRMonitoringState() {\n var self = this;\n self.openDone = false;\n self.setRequestHeaderDone = false;\n self.sendDone = false;\n self.abortDone = false; // True, if onreadyStateChangeCallback function attached to xhr, otherwise false\n\n self.stateChangeAttached = false;\n }\n\n return XHRMonitoringState;\n}();\n\nexport { XHRMonitoringState };\n\nvar ajaxRecord =\n/** @class */\nfunction () {\n function ajaxRecord(traceID, spanID, logger) {\n var self = this;\n var _logger = logger;\n var strResponseText = \"responseText\"; // Assigning the initial/default values within the constructor to avoid typescript from creating a bunch of\n // this.XXXX = null\n\n self.perfMark = null;\n self.completed = false;\n self.requestHeadersSize = null;\n self.requestHeaders = null;\n self.responseReceivingDuration = null;\n self.callbackDuration = null;\n self.ajaxTotalDuration = null;\n self.aborted = 0;\n self.pageUrl = null;\n self.requestUrl = null;\n self.requestSize = 0;\n self.method = null;\n self.status = null;\n self.requestSentTime = null;\n self.responseStartedTime = null;\n self.responseFinishedTime = null;\n self.callbackFinishedTime = null;\n self.endTime = null;\n self.xhrMonitoringState = new XHRMonitoringState();\n self.clientFailure = 0;\n self.traceID = traceID;\n self.spanID = spanID;\n dynamicProto(ajaxRecord, self, function (self) {\n self.getAbsoluteUrl = function () {\n return self.requestUrl ? UrlHelper.getAbsoluteUrl(self.requestUrl) : null;\n };\n\n self.getPathName = function () {\n return self.requestUrl ? DataSanitizer.sanitizeUrl(_logger, UrlHelper.getCompleteUrl(self.method, self.requestUrl)) : null;\n };\n\n self.CreateTrackItem = function (ajaxType, enableRequestHeaderTracking, getResponse) {\n // round to 3 decimal points\n self.ajaxTotalDuration = Math.round(DateTimeUtils.GetDuration(self.requestSentTime, self.responseFinishedTime) * 1000) / 1000;\n\n if (self.ajaxTotalDuration < 0) {\n return null;\n }\n\n var dependency = (_a = {\n id: \"|\" + self.traceID + \".\" + self.spanID,\n target: self.getAbsoluteUrl(),\n name: self.getPathName(),\n type: ajaxType,\n duration: self.ajaxTotalDuration,\n success: +self.status >= 200 && +self.status < 400,\n responseCode: +self.status,\n method: self.method\n }, _a[strProperties] = {\n HttpMethod: self.method\n }, _a); // Add Ajax perf details if available\n\n _populatePerfData(self, dependency);\n\n if (enableRequestHeaderTracking) {\n if (_objKeys(self.requestHeaders).length > 0) {\n dependency[strProperties] = dependency[strProperties] || {};\n dependency[strProperties].requestHeaders = self.requestHeaders;\n }\n }\n\n if (getResponse) {\n var response = getResponse();\n\n if (response) {\n // enrich dependency target with correlation context from the server\n var correlationContext = response.correlationContext;\n\n if (correlationContext) {\n dependency.correlationContext =\n /* dependency.target + \" | \" + */\n correlationContext;\n }\n\n if (response.headerMap) {\n if (_objKeys(response.headerMap).length > 0) {\n dependency[strProperties] = dependency[strProperties] || {};\n dependency[strProperties].responseHeaders = response.headerMap;\n }\n }\n\n if (self.status >= 400) {\n var responseType = response.type;\n dependency[strProperties] = dependency[strProperties] || {};\n\n if (responseType === \"\" || responseType === \"text\") {\n dependency[strProperties][strResponseText] = response[strResponseText] ? response.statusText + \" - \" + response[strResponseText] : response.statusText;\n }\n\n if (responseType === \"json\") {\n dependency[strProperties][strResponseText] = response.response ? response.statusText + \" - \" + JSON.stringify(response.response) : response.statusText;\n }\n }\n }\n }\n\n return dependency;\n\n var _a;\n };\n });\n } // Removed Stub for ajaxRecord.prototype.getAbsoluteUrl.\n // Removed Stub for ajaxRecord.prototype.getPathName.\n // Removed Stub for ajaxRecord.prototype.CreateTrackItem.\n\n\n return ajaxRecord;\n}();\n\nexport { ajaxRecord };\n;","/*!\n * Application Insights JavaScript SDK - Dependencies Plugin, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { Util } from '@microsoft/applicationinsights-common';\n\nvar Traceparent =\n/** @class */\nfunction () {\n function Traceparent(traceId, spanId) {\n var self = this;\n self.traceFlag = Traceparent.DEFAULT_TRACE_FLAG;\n self.version = Traceparent.DEFAULT_VERSION;\n\n if (traceId && Traceparent.isValidTraceId(traceId)) {\n self.traceId = traceId;\n } else {\n self.traceId = Util.generateW3CId();\n }\n\n if (spanId && Traceparent.isValidSpanId(spanId)) {\n self.spanId = spanId;\n } else {\n self.spanId = Util.generateW3CId().substr(0, 16);\n }\n }\n\n Traceparent.isValidTraceId = function (id) {\n return id.match(/^[0-9a-f]{32}$/) && id !== \"00000000000000000000000000000000\";\n };\n\n Traceparent.isValidSpanId = function (id) {\n return id.match(/^[0-9a-f]{16}$/) && id !== \"0000000000000000\";\n };\n\n Traceparent.prototype.toString = function () {\n var self = this;\n return self.version + \"-\" + self.traceId + \"-\" + self.spanId + \"-\" + self.traceFlag;\n };\n\n Traceparent.DEFAULT_TRACE_FLAG = \"01\";\n Traceparent.DEFAULT_VERSION = \"00\";\n return Traceparent;\n}();\n\nexport { Traceparent };","/*!\n * Application Insights JavaScript SDK - Dependencies Plugin, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { RequestHeaders, Util, CorrelationIdHelper, TelemetryItemCreator, RemoteDependencyData, DateTimeUtils, DisabledPropertyName, PropertiesPluginIdentifier, DistributedTracingModes } from '@microsoft/applicationinsights-common';\nimport { CoreUtils, LoggingSeverity, _InternalMessageId, BaseTelemetryPlugin, getLocation, getGlobal, strUndefined, strPrototype, InstrumentFunc, InstrumentProto, getPerformance, objForEachKey } from '@microsoft/applicationinsights-core-js';\nimport { ajaxRecord } from './ajaxRecord';\nimport { EventHelper } from './ajaxUtils';\nimport { Traceparent } from './TraceParent';\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nvar AJAX_MONITOR_PREFIX = \"ai.ajxmn.\";\nvar strDiagLog = \"diagLog\";\nvar strAjaxData = \"ajaxData\";\nvar strThrowInternal = \"throwInternal\";\nvar strFetch = \"fetch\";\nvar _isNullOrUndefined = CoreUtils.isNullOrUndefined;\nvar _arrForEach = CoreUtils.arrForEach; // Using a global value so that to handle same iKey with multiple app insights instances (mostly for testing)\n\nvar _markCount = 0;\n/** @Ignore */\n\nfunction _supportsFetch() {\n var _global = getGlobal();\n\n if (!_global || _isNullOrUndefined(_global.Request) || _isNullOrUndefined(_global.Request[strPrototype]) || _isNullOrUndefined(_global[strFetch])) {\n return null;\n }\n\n return _global[strFetch];\n}\n/**\r\n * Determines whether ajax monitoring can be enabled on this document\r\n * @returns True if Ajax monitoring is supported on this page, otherwise false\r\n * @ignore\r\n */\n\n\nfunction _supportsAjaxMonitoring(ajaxMonitorInstance) {\n var result = false;\n\n if (typeof XMLHttpRequest !== strUndefined && !_isNullOrUndefined(XMLHttpRequest)) {\n var proto = XMLHttpRequest[strPrototype];\n result = !_isNullOrUndefined(proto) && !_isNullOrUndefined(proto.open) && !_isNullOrUndefined(proto.send) && !_isNullOrUndefined(proto.abort);\n }\n\n var ieVer = Util.getIEVersion();\n\n if (ieVer && ieVer < 9) {\n result = false;\n }\n\n if (result) {\n // Disable if the XmlHttpRequest can't be extended or hooked\n try {\n var xhr = new XMLHttpRequest();\n xhr[strAjaxData] = {}; // Check that we can update the prototype\n\n var theOpen = XMLHttpRequest[strPrototype].open;\n XMLHttpRequest[strPrototype].open = theOpen;\n } catch (e) {\n // We can't decorate the xhr object so disable monitoring\n result = false;\n\n _throwInternalCritical(ajaxMonitorInstance, _InternalMessageId.FailedMonitorAjaxOpen, \"Failed to enable XMLHttpRequest monitoring, extension is not supported\", {\n exception: Util.dump(e)\n });\n }\n }\n\n return result;\n}\n/** @Ignore */\n\n\nfunction _getFailedAjaxDiagnosticsMessage(xhr) {\n var result = \"\";\n\n try {\n if (!_isNullOrUndefined(xhr) && !_isNullOrUndefined(xhr[strAjaxData]) && !_isNullOrUndefined(xhr[strAjaxData].requestUrl)) {\n result += \"(url: '\" + xhr[strAjaxData].requestUrl + \"')\";\n }\n } catch (e) {}\n\n return result;\n}\n/** @ignore */\n\n\nfunction _throwInternalCritical(ajaxMonitorInstance, msgId, message, properties, isUserAct) {\n ajaxMonitorInstance[strDiagLog]()[strThrowInternal](LoggingSeverity.CRITICAL, msgId, message, properties, isUserAct);\n}\n/** @ignore */\n\n\nfunction _throwInternalWarning(ajaxMonitorInstance, msgId, message, properties, isUserAct) {\n ajaxMonitorInstance[strDiagLog]()[strThrowInternal](LoggingSeverity.WARNING, msgId, message, properties, isUserAct);\n}\n/** @Ignore */\n\n\nfunction _createErrorCallbackFunc(ajaxMonitorInstance, internalMessage, message) {\n // tslint:disable-next-line\n return function (args) {\n _throwInternalCritical(ajaxMonitorInstance, internalMessage, message, {\n ajaxDiagnosticsMessage: _getFailedAjaxDiagnosticsMessage(args.inst),\n exception: Util.dump(args.err)\n });\n };\n}\n\nfunction _indexOf(value, match) {\n if (value && match) {\n return value.indexOf(match);\n }\n\n return -1;\n}\n\nvar AjaxMonitor =\n/** @class */\nfunction (_super) {\n __extends(AjaxMonitor, _super);\n\n function AjaxMonitor() {\n var _this = _super.call(this) || this;\n\n _this.identifier = AjaxMonitor.identifier;\n _this.priority = 120;\n var strTrackDependencyDataInternal = \"trackDependencyDataInternal\"; // Using string to help with minification\n\n var location = getLocation();\n var _fetchInitialized = false; // fetch monitoring initialized\n\n var _xhrInitialized = false; // XHR monitoring initialized\n\n var _currentWindowHost = location && location.host && location.host.toLowerCase();\n\n var _config = AjaxMonitor.getEmptyConfig();\n\n var _enableRequestHeaderTracking = false;\n var _trackAjaxAttempts = 0;\n\n var _context;\n\n var _isUsingW3CHeaders;\n\n var _isUsingAIHeaders;\n\n var _markPrefix;\n\n var _enableAjaxPerfTracking = false;\n var _maxAjaxCallsPerView = 0;\n var _enableResponseHeaderTracking = false;\n var _hooks = [];\n var _disabledUrls = {};\n dynamicProto(AjaxMonitor, _this, function (_self, base) {\n _self.initialize = function (config, core, extensions, pluginChain) {\n if (!_self.isInitialized()) {\n base.initialize(config, core, extensions, pluginChain);\n\n var ctx_1 = _self._getTelCtx();\n\n var defaultConfig = AjaxMonitor.getDefaultConfig();\n objForEachKey(defaultConfig, function (field, value) {\n _config[field] = ctx_1.getConfig(AjaxMonitor.identifier, field, value);\n });\n var distributedTracingMode = _config.distributedTracingMode;\n _enableRequestHeaderTracking = _config.enableRequestHeaderTracking;\n _enableAjaxPerfTracking = _config.enableAjaxPerfTracking;\n _maxAjaxCallsPerView = _config.maxAjaxCallsPerView;\n _enableResponseHeaderTracking = _config.enableResponseHeaderTracking;\n _isUsingAIHeaders = distributedTracingMode === DistributedTracingModes.AI || distributedTracingMode === DistributedTracingModes.AI_AND_W3C;\n _isUsingW3CHeaders = distributedTracingMode === DistributedTracingModes.AI_AND_W3C || distributedTracingMode === DistributedTracingModes.W3C;\n\n if (_enableAjaxPerfTracking) {\n var iKey = config.instrumentationKey || \"unkwn\";\n\n if (iKey.length > 5) {\n _markPrefix = AJAX_MONITOR_PREFIX + iKey.substring(iKey.length - 5) + \".\";\n } else {\n _markPrefix = AJAX_MONITOR_PREFIX + iKey + \".\";\n }\n }\n\n if (_config.disableAjaxTracking === false) {\n _instrumentXhr();\n }\n\n _instrumentFetch();\n\n if (extensions.length > 0 && extensions) {\n var propExt = void 0,\n extIx = 0;\n\n while (!propExt && extIx < extensions.length) {\n if (extensions[extIx] && extensions[extIx].identifier === PropertiesPluginIdentifier) {\n propExt = extensions[extIx];\n }\n\n extIx++;\n }\n\n if (propExt) {\n _context = propExt.context; // we could move IPropertiesPlugin to common as well\n }\n }\n }\n };\n\n _self.teardown = function () {\n // Remove all instrumentation hooks\n _arrForEach(_hooks, function (fn) {\n fn.rm();\n });\n\n _hooks = [];\n _fetchInitialized = false;\n _xhrInitialized = false;\n\n _self.setInitialized(false);\n };\n\n _self.trackDependencyData = function (dependency, properties) {\n _self[strTrackDependencyDataInternal](dependency, properties);\n };\n\n _self.includeCorrelationHeaders = function (ajaxData, input, init, xhr) {\n // Test Hook to allow the overriding of the location host\n var currentWindowHost = _self[\"_currentWindowHost\"] || _currentWindowHost;\n\n if (input) {\n if (CorrelationIdHelper.canIncludeCorrelationHeader(_config, ajaxData.getAbsoluteUrl(), currentWindowHost)) {\n if (!init) {\n init = {};\n } // init headers override original request headers\n // so, if they exist use only them, otherwise use request's because they should have been applied in the first place\n // not using original request headers will result in them being lost\n\n\n init.headers = new Headers(init.headers || (input instanceof Request ? input.headers || {} : {}));\n\n if (_isUsingAIHeaders) {\n var id = \"|\" + ajaxData.traceID + \".\" + ajaxData.spanID;\n init.headers.set(RequestHeaders.requestIdHeader, id);\n\n if (_enableRequestHeaderTracking) {\n ajaxData.requestHeaders[RequestHeaders.requestIdHeader] = id;\n }\n }\n\n var appId = _config.appId || _context && _context.appId();\n\n if (appId) {\n init.headers.set(RequestHeaders.requestContextHeader, RequestHeaders.requestContextAppIdFormat + appId);\n\n if (_enableRequestHeaderTracking) {\n ajaxData.requestHeaders[RequestHeaders.requestContextHeader] = RequestHeaders.requestContextAppIdFormat + appId;\n }\n }\n\n if (_isUsingW3CHeaders) {\n var traceparent = new Traceparent(ajaxData.traceID, ajaxData.spanID);\n init.headers.set(RequestHeaders.traceParentHeader, traceparent.toString());\n\n if (_enableRequestHeaderTracking) {\n ajaxData.requestHeaders[RequestHeaders.traceParentHeader] = traceparent.toString();\n }\n }\n }\n\n return init;\n } else if (xhr) {\n if (CorrelationIdHelper.canIncludeCorrelationHeader(_config, ajaxData.getAbsoluteUrl(), currentWindowHost)) {\n if (_isUsingAIHeaders) {\n var id = \"|\" + ajaxData.traceID + \".\" + ajaxData.spanID;\n xhr.setRequestHeader(RequestHeaders.requestIdHeader, id);\n\n if (_enableRequestHeaderTracking) {\n ajaxData.requestHeaders[RequestHeaders.requestIdHeader] = id;\n }\n }\n\n var appId = _config.appId || _context && _context.appId();\n\n if (appId) {\n xhr.setRequestHeader(RequestHeaders.requestContextHeader, RequestHeaders.requestContextAppIdFormat + appId);\n\n if (_enableRequestHeaderTracking) {\n ajaxData.requestHeaders[RequestHeaders.requestContextHeader] = RequestHeaders.requestContextAppIdFormat + appId;\n }\n }\n\n if (_isUsingW3CHeaders) {\n var traceparent = new Traceparent(ajaxData.traceID, ajaxData.spanID);\n xhr.setRequestHeader(RequestHeaders.traceParentHeader, traceparent.toString());\n\n if (_enableRequestHeaderTracking) {\n ajaxData.requestHeaders[RequestHeaders.traceParentHeader] = traceparent.toString();\n }\n }\n }\n\n return xhr;\n }\n\n return undefined;\n };\n\n _self[strTrackDependencyDataInternal] = function (dependency, properties, systemProperties) {\n if (_maxAjaxCallsPerView === -1 || _trackAjaxAttempts < _maxAjaxCallsPerView) {\n // Hack since expected format in w3c mode is |abc.def.\n // Non-w3c format is |abc.def\n // @todo Remove if better solution is available, e.g. handle in portal\n if ((_config.distributedTracingMode === DistributedTracingModes.W3C || _config.distributedTracingMode === DistributedTracingModes.AI_AND_W3C) && typeof dependency.id === \"string\" && dependency.id[dependency.id.length - 1] !== \".\") {\n dependency.id += \".\";\n }\n\n if (CoreUtils.isNullOrUndefined(dependency.startTime)) {\n dependency.startTime = new Date();\n }\n\n var item = TelemetryItemCreator.create(dependency, RemoteDependencyData.dataType, RemoteDependencyData.envelopeType, _self[strDiagLog](), properties, systemProperties);\n\n _self.core.track(item);\n } else if (_trackAjaxAttempts === _maxAjaxCallsPerView) {\n _throwInternalCritical(_self, _InternalMessageId.MaxAjaxPerPVExceeded, \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\", true);\n }\n\n ++_trackAjaxAttempts;\n }; // Fetch Stuff\n\n\n function _instrumentFetch() {\n var fetch = _supportsFetch();\n\n if (!fetch) {\n return;\n }\n\n var global = getGlobal();\n var isPolyfill = fetch.polyfill;\n\n if (_config.disableFetchTracking === false) {\n _hooks.push(InstrumentFunc(global, strFetch, {\n // Add request hook\n req: function req(callDetails, input, init) {\n var fetchData;\n\n if (_fetchInitialized && !_isDisabledRequest(null, input, init) && // If we have a polyfil and XHR instrumented then let XHR report otherwise we get duplicates\n !(isPolyfill && _xhrInitialized)) {\n var ctx = callDetails.ctx();\n fetchData = _createFetchRecord(input, init);\n\n var newInit = _self.includeCorrelationHeaders(fetchData, input, init);\n\n if (newInit !== init) {\n callDetails.set(1, newInit);\n }\n\n ctx.data = fetchData;\n }\n },\n rsp: function rsp(callDetails, input) {\n var fetchData = callDetails.ctx().data;\n\n if (fetchData) {\n // Replace the result with the new promise from this code\n callDetails.rslt = callDetails.rslt.then(function (response) {\n _reportFetchMetrics(callDetails, (response || {}).status, response, fetchData, function () {\n var ajaxResponse = {\n statusText: response.statusText,\n headerMap: null,\n correlationContext: _getFetchCorrelationContext(response)\n };\n\n if (_enableResponseHeaderTracking) {\n var responseHeaderMap_1 = {};\n response.headers.forEach(function (value, name) {\n responseHeaderMap_1[name] = value;\n });\n ajaxResponse.headerMap = responseHeaderMap_1;\n }\n\n return ajaxResponse;\n });\n\n return response;\n })[\"catch\"](function (reason) {\n _reportFetchMetrics(callDetails, 0, input, fetchData, null, {\n error: reason.message\n });\n\n throw reason;\n });\n }\n },\n // Create an error callback to report any hook errors\n hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, \"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.\")\n }));\n\n _fetchInitialized = true;\n } else if (isPolyfill) {\n // If fetch is a polyfill we need to capture the request to ensure that we correctly track\n // disabled request URLS (i.e. internal urls) to ensure we don't end up in a constant loop\n // of reporting ourselves, for example React Native uses a polyfill for fetch\n // Note: Polyfill implementations that don't support the \"poyyfill\" tag are not supported\n // the workaround is to add a polyfill property to your fetch implementation before initializing\n // App Insights\n _hooks.push(InstrumentFunc(global, strFetch, {\n req: function req(callDetails, input, init) {\n // Just call so that we record any disabled URL\n _isDisabledRequest(null, input, init);\n }\n }));\n }\n\n if (isPolyfill) {\n // retag the instrumented fetch with the same polyfill settings this is mostly for testing\n // But also supports multiple App Insights usages\n global[strFetch].polyfill = isPolyfill;\n }\n }\n\n function _hookProto(target, funcName, callbacks) {\n _hooks.push(InstrumentProto(target, funcName, callbacks));\n }\n\n function _instrumentXhr() {\n if (_supportsAjaxMonitoring(_self) && !_xhrInitialized) {\n // Instrument open\n _hookProto(XMLHttpRequest, \"open\", {\n req: function req(args, method, url, async) {\n var xhr = args.inst;\n var ajaxData = xhr[strAjaxData];\n\n if (!_isDisabledRequest(xhr, url) && _isMonitoredXhrInstance(xhr, true) && (!ajaxData || !ajaxData.xhrMonitoringState.openDone)) {\n _openHandler(xhr, method, url, async);\n }\n },\n hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, \"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.\")\n }); // Instrument send\n\n\n _hookProto(XMLHttpRequest, \"send\", {\n req: function req(args, context) {\n var xhr = args.inst;\n var ajaxData = xhr[strAjaxData];\n\n if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState.sendDone) {\n _createMarkId(\"xhr\", ajaxData);\n\n ajaxData.requestSentTime = DateTimeUtils.Now();\n xhr = _self.includeCorrelationHeaders(ajaxData, undefined, undefined, xhr);\n ajaxData.xhrMonitoringState.sendDone = true;\n }\n },\n hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSend, \"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.\")\n }); // Instrument abort\n\n\n _hookProto(XMLHttpRequest, \"abort\", {\n req: function req(args) {\n var xhr = args.inst;\n var ajaxData = xhr[strAjaxData];\n\n if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState.abortDone) {\n ajaxData.aborted = 1;\n ajaxData.xhrMonitoringState.abortDone = true;\n }\n },\n hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxAbort, \"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.\")\n }); // Instrument setRequestHeader\n\n\n if (_enableRequestHeaderTracking) {\n _hookProto(XMLHttpRequest, \"setRequestHeader\", {\n req: function req(args, header, value) {\n var xhr = args.inst;\n\n if (_isMonitoredXhrInstance(xhr)) {\n xhr[strAjaxData].requestHeaders[header] = value;\n }\n },\n hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSetRequestHeader, \"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.\")\n });\n }\n\n _xhrInitialized = true;\n }\n }\n\n function _isDisabledRequest(xhr, request, init) {\n var isDisabled = false;\n var theUrl = ((!CoreUtils.isString(request) ? (request || {}).url || \"\" : request) || \"\").toLowerCase();\n\n var idx = _indexOf(theUrl, \"?\");\n\n var idx2 = _indexOf(theUrl, \"#\");\n\n if (idx === -1 || idx2 !== -1 && idx2 < idx) {\n idx = idx2;\n }\n\n if (idx !== -1) {\n // Strip off any Query string\n theUrl = theUrl.substring(0, idx);\n } // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector\n\n\n if (!_isNullOrUndefined(xhr)) {\n // Look on the XMLHttpRequest of the URL string value\n isDisabled = xhr[DisabledPropertyName] === true || theUrl[DisabledPropertyName] === true;\n } else if (!_isNullOrUndefined(request)) {\n // Look for DisabledPropertyName in either Request or RequestInit\n isDisabled = (typeof request === 'object' ? request[DisabledPropertyName] === true : false) || (init ? init[DisabledPropertyName] === true : false);\n }\n\n if (isDisabled) {\n // Add the disabled url if not present\n if (!_disabledUrls[theUrl]) {\n _disabledUrls[theUrl] = 1;\n }\n } else {\n // Check to see if the url is listed as disabled\n if (_disabledUrls[theUrl]) {\n isDisabled = true;\n }\n }\n\n return isDisabled;\n } /// Verifies that particalar instance of XMLHttpRequest needs to be monitored\n /// Optional parameter. True if ajaxData must be excluded from verification\n /// True if instance needs to be monitored, otherwise false\n\n\n function _isMonitoredXhrInstance(xhr, excludeAjaxDataValidation) {\n var ajaxValidation = true;\n var initialized = _xhrInitialized;\n\n if (!_isNullOrUndefined(xhr)) {\n ajaxValidation = excludeAjaxDataValidation === true || !_isNullOrUndefined(xhr[strAjaxData]);\n } // checking to see that all interested functions on xhr were instrumented\n\n\n return initialized // checking on ajaxData to see that it was not removed in user code\n && ajaxValidation;\n }\n\n function _openHandler(xhr, method, url, async) {\n var traceID = _context && _context.telemetryTrace && _context.telemetryTrace.traceID || Util.generateW3CId();\n var spanID = Util.generateW3CId().substr(0, 16);\n var ajaxData = new ajaxRecord(traceID, spanID, _self[strDiagLog]());\n ajaxData.method = method;\n ajaxData.requestUrl = url;\n ajaxData.xhrMonitoringState.openDone = true;\n ajaxData.requestHeaders = {};\n ajaxData.async = async;\n xhr[strAjaxData] = ajaxData;\n\n _attachToOnReadyStateChange(xhr);\n }\n\n function _attachToOnReadyStateChange(xhr) {\n xhr[strAjaxData].xhrMonitoringState.stateChangeAttached = EventHelper.Attach(xhr, \"readystatechange\", function () {\n try {\n if (xhr && xhr.readyState === 4 && _isMonitoredXhrInstance(xhr)) {\n _onAjaxComplete(xhr);\n }\n } catch (e) {\n var exceptionText = Util.dump(e); // ignore messages with c00c023f, as this a known IE9 XHR abort issue\n\n if (!exceptionText || _indexOf(exceptionText.toLowerCase(), \"c00c023f\") === -1) {\n _throwInternalCritical(_self, _InternalMessageId.FailedMonitorAjaxRSC, \"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.\", {\n ajaxDiagnosticsMessage: _getFailedAjaxDiagnosticsMessage(xhr),\n exception: exceptionText\n });\n }\n }\n });\n }\n\n function _getResponseText(xhr) {\n try {\n var responseType = xhr.responseType;\n\n if (responseType === \"\" || responseType === \"text\") {\n // As per the specification responseText is only valid if the type is an empty string or \"text\"\n return xhr.responseText;\n }\n } catch (e) {// This shouldn't happend because of the above check -- but just in case, so just ignore\n }\n\n return null;\n }\n\n function _onAjaxComplete(xhr) {\n var ajaxData = xhr[strAjaxData];\n ajaxData.responseFinishedTime = DateTimeUtils.Now();\n ajaxData.status = xhr.status;\n\n function _reportXhrError(e, failedProps) {\n var errorProps = failedProps || {};\n errorProps[\"ajaxDiagnosticsMessage\"] = _getFailedAjaxDiagnosticsMessage(xhr);\n\n if (e) {\n errorProps[\"exception\"] = Util.dump(e);\n }\n\n _throwInternalWarning(_self, _InternalMessageId.FailedMonitorAjaxDur, \"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.\", errorProps);\n }\n\n _findPerfResourceEntry(\"xmlhttprequest\", ajaxData, function () {\n try {\n var dependency = ajaxData.CreateTrackItem(\"Ajax\", _enableRequestHeaderTracking, function () {\n var ajaxResponse = {\n statusText: xhr.statusText,\n headerMap: null,\n correlationContext: _getAjaxCorrelationContext(xhr),\n type: xhr.responseType,\n responseText: _getResponseText(xhr),\n response: xhr.response\n };\n\n if (_enableResponseHeaderTracking) {\n var headers = xhr.getAllResponseHeaders();\n\n if (headers) {\n // xhr.getAllResponseHeaders() method returns all the response headers, separated by CRLF, as a string or null\n // the regex converts the header string into an array of individual headers\n var arr = CoreUtils.strTrim(headers).split(/[\\r\\n]+/);\n var responseHeaderMap_2 = {};\n\n _arrForEach(arr, function (line) {\n var parts = line.split(': ');\n var header = parts.shift();\n var value = parts.join(': ');\n responseHeaderMap_2[header] = value;\n });\n\n ajaxResponse.headerMap = responseHeaderMap_2;\n }\n }\n\n return ajaxResponse;\n });\n\n if (dependency) {\n _self[strTrackDependencyDataInternal](dependency);\n } else {\n _reportXhrError(null, {\n requestSentTime: ajaxData.requestSentTime,\n responseFinishedTime: ajaxData.responseFinishedTime\n });\n }\n } finally {\n // cleanup telemetry data\n try {\n xhr[strAjaxData] = null;\n } catch (e) {// May throw in environments that prevent extension or freeze xhr\n }\n }\n }, function (e) {\n _reportXhrError(e, null);\n });\n }\n\n function _getAjaxCorrelationContext(xhr) {\n try {\n var responseHeadersString = xhr.getAllResponseHeaders();\n\n if (responseHeadersString !== null) {\n var index = _indexOf(responseHeadersString.toLowerCase(), RequestHeaders.requestContextHeaderLowerCase);\n\n if (index !== -1) {\n var responseHeader = xhr.getResponseHeader(RequestHeaders.requestContextHeader);\n return CorrelationIdHelper.getCorrelationContext(responseHeader);\n }\n }\n } catch (e) {\n _throwInternalWarning(_self, _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\", {\n ajaxDiagnosticsMessage: _getFailedAjaxDiagnosticsMessage(xhr),\n exception: Util.dump(e)\n });\n }\n }\n\n function _createMarkId(type, ajaxData) {\n if (ajaxData.requestUrl && _markPrefix && _enableAjaxPerfTracking) {\n var performance_1 = getPerformance();\n\n if (performance_1 && CoreUtils.isFunction(performance_1.mark)) {\n _markCount++;\n var markId = _markPrefix + type + \"#\" + _markCount;\n performance_1.mark(markId);\n var entries = performance_1.getEntriesByName(markId);\n\n if (entries && entries.length === 1) {\n ajaxData.perfMark = entries[0];\n }\n }\n }\n }\n\n function _findPerfResourceEntry(initiatorType, ajaxData, trackCallback, reportError) {\n var perfMark = ajaxData.perfMark;\n var performance = getPerformance();\n var maxAttempts = _config.maxAjaxPerfLookupAttempts;\n var retryDelay = _config.ajaxPerfLookupDelay;\n var requestUrl = ajaxData.requestUrl;\n var attempt = 0;\n\n (function locateResourceTiming() {\n try {\n if (performance && perfMark) {\n attempt++;\n var perfTiming = null;\n var entries = performance.getEntries();\n\n for (var lp = entries.length - 1; lp >= 0; lp--) {\n var entry = entries[lp];\n\n if (entry) {\n if (entry.entryType === \"resource\") {\n if (entry.initiatorType === initiatorType && (_indexOf(entry.name, requestUrl) !== -1 || _indexOf(requestUrl, entry.name) !== -1)) {\n perfTiming = entry;\n }\n } else if (entry.entryType === \"mark\" && entry.name === perfMark.name) {\n // We hit the start event\n ajaxData.perfTiming = perfTiming;\n break;\n }\n\n if (entry.startTime < perfMark.startTime - 1000) {\n // Fallback to try and reduce the time spent looking for the perf entry\n break;\n }\n }\n }\n }\n\n if (!perfMark || // - we don't have a perfMark or\n ajaxData.perfTiming || // - we have not found the perf entry or\n attempt >= maxAttempts || // - we have tried too many attempts or\n ajaxData.async === false) {\n if (perfMark && CoreUtils.isFunction(performance.clearMarks)) {\n // Remove the mark so we don't fill up the performance resources too much\n performance.clearMarks(perfMark.name);\n }\n\n ajaxData.perfAttempts = attempt; // just continue and report the track event\n\n trackCallback();\n } else {\n // We need to wait for the browser to populate the window.performance entry\n // This needs to be at least 1ms as waiting <= 1 (on firefox) is not enough time for fetch or xhr,\n // this is a scheduling issue for the browser implementation\n setTimeout(locateResourceTiming, retryDelay);\n }\n } catch (e) {\n reportError(e);\n }\n })();\n }\n\n function _createFetchRecord(input, init) {\n var traceID = _context && _context.telemetryTrace && _context.telemetryTrace.traceID || Util.generateW3CId();\n var spanID = Util.generateW3CId().substr(0, 16);\n var ajaxData = new ajaxRecord(traceID, spanID, _self[strDiagLog]());\n ajaxData.requestSentTime = DateTimeUtils.Now();\n\n if (input instanceof Request) {\n ajaxData.requestUrl = input ? input.url : \"\";\n } else {\n ajaxData.requestUrl = input;\n }\n\n var method = \"GET\";\n\n if (init && init.method) {\n method = init.method;\n } else if (input && input instanceof Request) {\n method = input.method;\n }\n\n ajaxData.method = method;\n var requestHeaders = {};\n\n if (_enableRequestHeaderTracking) {\n var headers = new Headers((init ? init.headers : 0) || (input instanceof Request ? input.headers || {} : {}));\n headers.forEach(function (value, key) {\n requestHeaders[key] = value;\n });\n }\n\n ajaxData.requestHeaders = requestHeaders;\n\n _createMarkId(\"fetch\", ajaxData);\n\n return ajaxData;\n }\n\n function _getFailedFetchDiagnosticsMessage(input) {\n var result = \"\";\n\n try {\n if (!_isNullOrUndefined(input)) {\n if (typeof input === \"string\") {\n result += \"(url: '\" + input + \"')\";\n } else {\n result += \"(url: '\" + input.url + \"')\";\n }\n }\n } catch (e) {\n _throwInternalCritical(_self, _InternalMessageId.FailedMonitorAjaxOpen, \"Failed to grab failed fetch diagnostics message\", {\n exception: Util.dump(e)\n });\n }\n\n return result;\n }\n\n function _reportFetchMetrics(callDetails, status, input, ajaxData, getResponse, properties) {\n if (!ajaxData) {\n return;\n }\n\n function _reportFetchError(msgId, e, failedProps) {\n var errorProps = failedProps || {};\n errorProps[\"fetchDiagnosticsMessage\"] = _getFailedFetchDiagnosticsMessage(input);\n\n if (e) {\n errorProps[\"exception\"] = Util.dump(e);\n }\n\n _throwInternalWarning(_self, msgId, \"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.\", errorProps);\n }\n\n ajaxData.responseFinishedTime = DateTimeUtils.Now();\n ajaxData.status = status;\n\n _findPerfResourceEntry(\"fetch\", ajaxData, function () {\n var dependency = ajaxData.CreateTrackItem(\"Fetch\", _enableRequestHeaderTracking, getResponse);\n\n if (dependency) {\n _self[strTrackDependencyDataInternal](dependency);\n } else {\n _reportFetchError(_InternalMessageId.FailedMonitorAjaxDur, null, {\n requestSentTime: ajaxData.requestSentTime,\n responseFinishedTime: ajaxData.responseFinishedTime\n });\n }\n }, function (e) {\n _reportFetchError(_InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, e, null);\n });\n }\n\n function _getFetchCorrelationContext(response) {\n if (response && response.headers) {\n try {\n var responseHeader = response.headers.get(RequestHeaders.requestContextHeader);\n return CorrelationIdHelper.getCorrelationContext(responseHeader);\n } catch (e) {\n _throwInternalWarning(_self, _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\", {\n fetchDiagnosticsMessage: _getFailedFetchDiagnosticsMessage(response),\n exception: Util.dump(e)\n });\n }\n }\n }\n });\n return _this;\n }\n\n AjaxMonitor.getDefaultConfig = function () {\n var config = {\n maxAjaxCallsPerView: 500,\n disableAjaxTracking: false,\n disableFetchTracking: true,\n disableCorrelationHeaders: false,\n distributedTracingMode: DistributedTracingModes.AI,\n correlationHeaderExcludedDomains: [\"*.blob.core.windows.net\", \"*.blob.core.chinacloudapi.cn\", \"*.blob.core.cloudapi.de\", \"*.blob.core.usgovcloudapi.net\"],\n correlationHeaderDomains: undefined,\n appId: undefined,\n enableCorsCorrelation: false,\n enableRequestHeaderTracking: false,\n enableResponseHeaderTracking: false,\n enableAjaxErrorStatusText: false,\n enableAjaxPerfTracking: false,\n maxAjaxPerfLookupAttempts: 3,\n ajaxPerfLookupDelay: 25\n };\n return config;\n };\n\n AjaxMonitor.getEmptyConfig = function () {\n var emptyConfig = this.getDefaultConfig();\n objForEachKey(emptyConfig, function (value) {\n emptyConfig[value] = undefined;\n });\n return emptyConfig;\n }; // Removed Stub for AjaxMonitor.prototype.initialize.\n // Removed Stub for AjaxMonitor.prototype.teardown.\n\n\n AjaxMonitor.prototype.processTelemetry = function (item, itemCtx) {\n this.processNext(item, itemCtx);\n }; // Removed Stub for AjaxMonitor.prototype.trackDependencyData.\n // Removed Stub for AjaxMonitor.prototype.includeCorrelationHeaders.\n // Removed Stub for AjaxMonitor.prototype.trackDependencyDataInternal.\n\n\n AjaxMonitor.identifier = \"AjaxDependencyPlugin\";\n return AjaxMonitor;\n}(BaseTelemetryPlugin);\n\nexport { AjaxMonitor };","/*!\n * Application Insights JavaScript SDK - Web, 2.5.11\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { CoreUtils, AppInsightsCore, LoggingSeverity, _InternalMessageId, hasWindow, hasDocument, isReactNative, doPerf, objForEachKey, proxyAssign } from \"@microsoft/applicationinsights-core-js\";\nimport { ApplicationInsights } from \"@microsoft/applicationinsights-analytics-js\";\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\nimport { PropertiesPlugin } from \"@microsoft/applicationinsights-properties-js\";\nimport { AjaxPlugin as DependenciesPlugin } from '@microsoft/applicationinsights-dependencies-js';\nimport * as Common from \"@microsoft/applicationinsights-common\";\n\"use strict\";\n\nvar _internalSdkSrc;\n\nvar _arrForEach = CoreUtils.arrForEach;\nvar _isString = CoreUtils.isString;\nvar _isFunction = CoreUtils.isFunction; // This is an exclude list of properties that should not be updated during initialization\n// They include a combination of private and internal property names\n\nvar _ignoreUpdateSnippetProperties = [\"snippet\", \"dependencies\", \"properties\", \"_snippetVersion\", \"appInsightsNew\", \"getSKUDefaults\"];\n;\n/**\r\n * Telemetry type classes, e.g. PageView, Exception, etc\r\n */\n\nexport var Telemetry = Common;\n/**\r\n * Application Insights API\r\n * @class Initialization\r\n * @implements {IApplicationInsights}\r\n */\n\nvar Initialization =\n/** @class */\nfunction () {\n function Initialization(snippet) {\n var _self = this; // initialize the queue and config in case they are undefined\n\n\n _self._snippetVersion = \"\" + (snippet.sv || snippet.version || \"\");\n snippet.queue = snippet.queue || [];\n snippet.version = snippet.version || 2.0; // Default to new version\n\n var config = snippet.config || {};\n\n if (config.connectionString) {\n var cs = Common.ConnectionStringParser.parse(config.connectionString);\n var ingest = cs.ingestionendpoint;\n config.endpointUrl = ingest ? ingest + \"/v2/track\" : config.endpointUrl; // only add /v2/track when from connectionstring\n\n config.instrumentationKey = cs.instrumentationkey || config.instrumentationKey;\n }\n\n _self.appInsights = new ApplicationInsights();\n _self.properties = new PropertiesPlugin();\n _self.dependencies = new DependenciesPlugin();\n _self.core = new AppInsightsCore();\n _self.snippet = snippet;\n _self.config = config;\n\n _self.getSKUDefaults();\n } // Analytics Plugin\n\n /**\r\n * Log a user action or other occurrence.\r\n * @param {IEventTelemetry} event\r\n * @param {ICustomProperties} [customProperties]\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.trackEvent = function (event, customProperties) {\n this.appInsights.trackEvent(event, customProperties);\n };\n /**\r\n * Logs that a page, or similar container was displayed to the user.\r\n * @param {IPageViewTelemetry} pageView\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.trackPageView = function (pageView) {\n var inPv = pageView || {};\n this.appInsights.trackPageView(inPv);\n };\n /**\r\n * Log a bag of performance information via the customProperties field.\r\n * @param {IPageViewPerformanceTelemetry} pageViewPerformance\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.trackPageViewPerformance = function (pageViewPerformance) {\n var inPvp = pageViewPerformance || {};\n this.appInsights.trackPageViewPerformance(inPvp);\n };\n /**\r\n * Log an exception that you have caught.\r\n * @param {IExceptionTelemetry} exception\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.trackException = function (exception) {\n if (exception && !exception.exception && exception.error) {\n exception.exception = exception.error;\n }\n\n this.appInsights.trackException(exception);\n };\n /**\r\n * Manually send uncaught exception telemetry. This method is automatically triggered\r\n * on a window.onerror event.\r\n * @param {IAutoExceptionTelemetry} exception\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype._onerror = function (exception) {\n this.appInsights._onerror(exception);\n };\n /**\r\n * Log a diagnostic scenario such entering or leaving a function.\r\n * @param {ITraceTelemetry} trace\r\n * @param {ICustomProperties} [customProperties]\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.trackTrace = function (trace, customProperties) {\n this.appInsights.trackTrace(trace, customProperties);\n };\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used\r\n * to send regular reports of performance indicators.\r\n *\r\n * To send a single measurement, just use the `name` and `average` fields\r\n * of {@link IMetricTelemetry}.\r\n *\r\n * If you take measurements frequently, you can reduce the telemetry bandwidth by\r\n * aggregating multiple measurements and sending the resulting average and modifying\r\n * the `sampleCount` field of {@link IMetricTelemetry}.\r\n * @param {IMetricTelemetry} metric input object argument. Only `name` and `average` are mandatory.\r\n * @param {ICustomProperties} [customProperties]\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.trackMetric = function (metric, customProperties) {\n this.appInsights.trackMetric(metric, customProperties);\n };\n /**\r\n * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops,\r\n * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view\r\n * and send the event.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\n\n\n Initialization.prototype.startTrackPage = function (name) {\n this.appInsights.startTrackPage(name);\n };\n /**\r\n * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements.\r\n * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`.\r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\n\n\n Initialization.prototype.stopTrackPage = function (name, url, customProperties, measurements) {\n this.appInsights.stopTrackPage(name, url, customProperties, measurements);\n };\n\n Initialization.prototype.startTrackEvent = function (name) {\n this.appInsights.startTrackEvent(name);\n };\n /**\r\n * Log an extended event that you started timing with `startTrackEvent`.\r\n * @param name The string you used to identify this event in `startTrackEvent`.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\n\n\n Initialization.prototype.stopTrackEvent = function (name, properties, measurements) {\n this.appInsights.stopTrackEvent(name, properties, measurements); // Todo: Fix to pass measurements once type is updated\n };\n\n Initialization.prototype.addTelemetryInitializer = function (telemetryInitializer) {\n return this.appInsights.addTelemetryInitializer(telemetryInitializer);\n }; // Properties Plugin\n\n /**\r\n * Set the authenticated user id and the account id. Used for identifying a specific signed-in user. Parameters must not contain whitespace or ,;=|\r\n *\r\n * The method will only set the `authenticatedUserId` and `accountId` in the current page view. To set them for the whole session, you should set `storeInCookie = true`\r\n * @param {string} authenticatedUserId\r\n * @param {string} [accountId]\r\n * @param {boolean} [storeInCookie=false]\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\n if (storeInCookie === void 0) {\n storeInCookie = false;\n }\n\n this.properties.context.user.setAuthenticatedUserContext(authenticatedUserId, accountId, storeInCookie);\n };\n /**\r\n * Clears the authenticated user id and account id. The associated cookie is cleared, if present.\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.clearAuthenticatedUserContext = function () {\n this.properties.context.user.clearAuthenticatedUserContext();\n }; // Dependencies Plugin\n\n /**\r\n * Log a dependency call (e.g. ajax)\r\n * @param {IDependencyTelemetry} dependency\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.trackDependencyData = function (dependency) {\n this.dependencies.trackDependencyData(dependency);\n }; // Misc\n\n /**\r\n * Manually trigger an immediate send of all telemetry still in the buffer.\r\n * @param {boolean} [async=true]\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.flush = function (async) {\n var _this = this;\n\n if (async === void 0) {\n async = true;\n }\n\n doPerf(this.core, function () {\n return \"AISKU.flush\";\n }, function () {\n _arrForEach(_this.core.getTransmissionControls(), function (channels) {\n _arrForEach(channels, function (channel) {\n channel.flush(async);\n });\n });\n }, null, async);\n };\n /**\r\n * Manually trigger an immediate send of all telemetry still in the buffer using beacon Sender.\r\n * Fall back to xhr sender if beacon is not supported.\r\n * @param {boolean} [async=true]\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.onunloadFlush = function (async) {\n if (async === void 0) {\n async = true;\n }\n\n _arrForEach(this.core.getTransmissionControls(), function (channels) {\n _arrForEach(channels, function (channel) {\n if (channel.onunloadFlush) {\n channel.onunloadFlush();\n } else {\n channel.flush(async);\n }\n });\n });\n };\n /**\r\n * Initialize this instance of ApplicationInsights\r\n * @returns {IApplicationInsights}\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.loadAppInsights = function (legacyMode, logger, notificationManager) {\n var _this = this;\n\n if (legacyMode === void 0) {\n legacyMode = false;\n }\n\n var _self = this;\n\n function _updateSnippetProperties(snippet) {\n if (snippet) {\n var snippetVer = \"\";\n\n if (!CoreUtils.isNullOrUndefined(_self._snippetVersion)) {\n snippetVer += _self._snippetVersion;\n }\n\n if (legacyMode) {\n snippetVer += \".lg\";\n }\n\n if (_self.context && _self.context.internal) {\n _self.context.internal.snippetVer = snippetVer || \"-\";\n } // apply updated properties to the global instance (snippet)\n\n\n objForEachKey(_self, function (field, value) {\n if (_isString(field) && !_isFunction(value) && field && field[0] !== \"_\" && // Don't copy \"internal\" values\n _ignoreUpdateSnippetProperties.indexOf(field) === -1) {\n snippet[field] = value;\n }\n });\n }\n } // dont allow additional channels/other extensions for legacy mode; legacy mode is only to allow users to switch with no code changes!\n\n\n if (legacyMode && _self.config.extensions && _self.config.extensions.length > 0) {\n throw new Error(\"Extensions not allowed in legacy mode\");\n }\n\n doPerf(_self.core, function () {\n return \"AISKU.loadAppInsights\";\n }, function () {\n var extensions = [];\n var appInsightsChannel = new Sender();\n extensions.push(appInsightsChannel);\n extensions.push(_self.properties);\n extensions.push(_self.dependencies);\n extensions.push(_self.appInsights); // initialize core\n\n _self.core.initialize(_self.config, extensions, logger, notificationManager);\n\n _self.context = _self.properties.context;\n\n if (_internalSdkSrc && _self.context) {\n _self.context.internal.sdkSrc = _internalSdkSrc;\n }\n\n _updateSnippetProperties(_self.snippet); // Empty queue of all api calls logged prior to sdk download\n\n\n _self.emptyQueue();\n\n _self.pollInternalLogs();\n\n _self.addHousekeepingBeforeUnload(_this);\n });\n return _self;\n };\n /**\r\n * Overwrite the lazy loaded fields of global window snippet to contain the\r\n * actual initialized API methods\r\n * @param {Snippet} snippet\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.updateSnippetDefinitions = function (snippet) {\n // apply full appInsights to the global instance\n // Note: This must be called before loadAppInsights is called\n proxyAssign(snippet, this, function (name) {\n // Not excluding names prefixed with \"_\" as we need to proxy some functions like _onError\n return name && _ignoreUpdateSnippetProperties.indexOf(name) === -1;\n });\n };\n /**\r\n * Call any functions that were queued before the main script was loaded\r\n * @memberof Initialization\r\n */\n\n\n Initialization.prototype.emptyQueue = function () {\n var _self = this; // call functions that were queued before the main script was loaded\n\n\n try {\n if (Common.Util.isArray(_self.snippet.queue)) {\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\n var length_1 = _self.snippet.queue.length;\n\n for (var i = 0; i < length_1; i++) {\n var call = _self.snippet.queue[i];\n call();\n }\n\n _self.snippet.queue = undefined;\n delete _self.snippet.queue;\n }\n } catch (exception) {\n var properties = {};\n\n if (exception && _isFunction(exception.toString)) {\n properties.exception = exception.toString();\n } // need from core\n // Microsoft.ApplicationInsights._InternalLogging.throwInternal(\n // LoggingSeverity.WARNING,\n // _InternalMessageId.FailedToSendQueuedTelemetry,\n // \"Failed to send queued telemetry\",\n // properties);\n\n }\n };\n\n Initialization.prototype.pollInternalLogs = function () {\n this.core.pollInternalLogs();\n };\n\n Initialization.prototype.addHousekeepingBeforeUnload = function (appInsightsInstance) {\n // Add callback to push events when the user navigates away\n if (hasWindow() || hasDocument()) {\n var performHousekeeping = function performHousekeeping() {\n // Adds the ability to flush all data before the page unloads.\n // Note: This approach tries to push a sync request with all the pending events onbeforeunload.\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\n // Telemetry here will help us analyze how effective this approach is.\n // Another approach would be to make this call sync with a acceptable timeout to reduce the\n // impact on user experience.\n // appInsightsInstance.context._sender.triggerSend();\n appInsightsInstance.onunloadFlush(false); // Back up the current session to local storage\n // This lets us close expired sessions after the cookies themselves expire\n\n var ext = appInsightsInstance.appInsights.core['_extensions'][Common.PropertiesPluginIdentifier];\n\n if (ext && ext.context && ext.context._sessionManager) {\n ext.context._sessionManager.backup();\n }\n };\n\n if (!appInsightsInstance.appInsights.config.disableFlushOnBeforeUnload) {\n // Hook the unload event for the document, window and body to ensure that the client events are flushed to the server\n // As just hooking the window does not always fire (on chrome) for page navigations.\n var added = CoreUtils.addEventHandler('beforeunload', performHousekeeping);\n added = CoreUtils.addEventHandler('pagehide', performHousekeeping) || added; // A reactNative app may not have a window and therefore the beforeunload/pagehide events -- so don't\n // log the failure in this case\n\n if (!added && !isReactNative()) {\n appInsightsInstance.appInsights.core.logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.FailedToAddHandlerForOnBeforeUnload, 'Could not add handler for beforeunload and pagehide');\n }\n } // We also need to hook the pagehide event as not all versions of Safari support load/unload events.\n\n\n if (!appInsightsInstance.appInsights.config.disableFlushOnUnload) {\n // Not adding any telemetry as pagehide as it's not supported on all browsers\n CoreUtils.addEventHandler('pagehide', performHousekeeping);\n }\n }\n };\n\n Initialization.prototype.getSKUDefaults = function () {\n var _self = this;\n\n _self.config.diagnosticLogInterval = _self.config.diagnosticLogInterval && _self.config.diagnosticLogInterval > 0 ? _self.config.diagnosticLogInterval : 10000;\n };\n\n return Initialization;\n}();\n\nexport { Initialization }; // tslint:disable-next-line\n\n(function () {\n var sdkSrc = null;\n var isModule = false;\n var cdns = [\"://js.monitor.azure.com/\", \"://az416426.vo.msecnd.net/\"];\n\n try {\n // Try and determine whether the sdk is being loaded from the CDN\n // currentScript is only valid during initial processing\n var scrpt = (document || {}).currentScript;\n\n if (scrpt) {\n sdkSrc = scrpt.src; // } else {\n // // We need to update to at least typescript 2.9 for this to work :-(\n // // Leaving as a stub for now so after we upgrade this breadcrumb is available\n // let meta = import.meta;\n // sdkSrc = (meta || {}).url;\n // isModule = true;\n }\n } catch (e) {}\n\n if (sdkSrc) {\n try {\n var url = sdkSrc.toLowerCase();\n\n if (url) {\n var src = \"\";\n\n for (var idx = 0; idx < cdns.length; idx++) {\n if (url.indexOf(cdns[idx]) !== -1) {\n src = \"cdn\" + (idx + 1);\n\n if (url.indexOf(\"/scripts/\") === -1) {\n if (url.indexOf(\"/next/\") !== -1) {\n src += \"-next\";\n } else if (url.indexOf(\"/beta/\") !== -1) {\n src += \"-beta\";\n }\n }\n\n _internalSdkSrc = src + (isModule ? \".mod\" : \"\");\n break;\n }\n }\n }\n } catch (e) {}\n }\n})();","/**\r\n * ReactPlugin.ts\r\n * @copyright Microsoft 2019\r\n */\nimport { BaseTelemetryPlugin, CoreUtils, _InternalMessageId, LoggingSeverity } from \"@microsoft/applicationinsights-core-js\";\n\nvar ReactPlugin =\n/** @class */\nfunction (_super) {\n __extends(ReactPlugin, _super);\n\n function ReactPlugin() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.priority = 185;\n _this.identifier = 'ReactPlugin';\n return _this;\n }\n\n ReactPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\n var _this = this;\n\n _super.prototype.initialize.call(this, config, core, extensions, pluginChain);\n\n this._extensionConfig = config.extensionConfig && config.extensionConfig[this.identifier] ? config.extensionConfig[this.identifier] : {\n history: null\n };\n CoreUtils.arrForEach(extensions, function (ext) {\n var identifier = ext.identifier;\n\n if (identifier === 'ApplicationInsightsAnalytics') {\n _this._analyticsPlugin = ext;\n }\n });\n\n if (this._extensionConfig.history) {\n this.addHistoryListener(this._extensionConfig.history);\n var pageViewTelemetry = {\n uri: this._extensionConfig.history.location.pathname\n };\n this.trackPageView(pageViewTelemetry);\n }\n };\n /**\r\n * Add Part A fields to the event\r\n * @param event The event that needs to be processed\r\n */\n\n\n ReactPlugin.prototype.processTelemetry = function (event, itemCtx) {\n this.processNext(event, itemCtx);\n };\n\n ReactPlugin.prototype.trackMetric = function (metric, customProperties) {\n if (this._analyticsPlugin) {\n this._analyticsPlugin.trackMetric(metric, customProperties);\n } else {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"Analytics plugin is not available, React plugin telemetry will not be sent: \");\n }\n };\n\n ReactPlugin.prototype.trackPageView = function (pageView) {\n if (this._analyticsPlugin) {\n this._analyticsPlugin.trackPageView(pageView);\n } else {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"Analytics plugin is not available, React plugin telemetry will not be sent: \");\n }\n };\n\n ReactPlugin.prototype.trackEvent = function (event, customProperties) {\n if (this._analyticsPlugin) {\n this._analyticsPlugin.trackEvent(event, customProperties);\n } else {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"Analytics plugin is not available, React plugin telemetry will not be sent: \");\n }\n };\n\n ReactPlugin.prototype.trackException = function (exception, customProperties) {\n if (this._analyticsPlugin) {\n this._analyticsPlugin.trackException(exception, customProperties);\n } else {\n this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"Analytics plugin is not available, React plugin telemetry will not be sent: \");\n }\n };\n\n ;\n\n ReactPlugin.prototype.addHistoryListener = function (history) {\n var _this = this;\n\n var locationListener = function locationListener(location, action) {\n // Timeout to ensure any changes to the DOM made by route changes get included in pageView telemetry\n setTimeout(function () {\n var pageViewTelemetry = {\n uri: location.pathname\n };\n\n _this.trackPageView(pageViewTelemetry);\n }, 500);\n };\n\n history.listen(locationListener);\n };\n\n return ReactPlugin;\n}(BaseTelemetryPlugin);\n\nexport default ReactPlugin;","// AppInsights.js\nimport { ApplicationInsights } from '@microsoft/applicationinsights-web';\nimport { ReactPlugin } from '@microsoft/applicationinsights-react-js';\nimport { createBrowserHistory } from 'history';\n\nconst instrumentationKey = process.env.GATSBY_INSTRUMENTATION_KEY;\nconst browserHistory = createBrowserHistory({ basename: '' });\nconst reactPlugin = new ReactPlugin();\nlet appInsights;\nif (instrumentationKey) {\n appInsights = new ApplicationInsights({\n config: {\n instrumentationKey,\n extensions: [reactPlugin],\n extensionConfig: {\n [reactPlugin.identifier]: { history: browserHistory },\n },\n },\n });\n appInsights.loadAppInsights();\n} else {\n console.warn('Application insights key not available.');\n}\nexport { reactPlugin, appInsights };\n","import { appInsights } from './src/AppInsights';\n\nexport const onRouteUpdate = () => {\n if (appInsights) {\n appInsights.trackPageView();\n }\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","import arrayLikeToArray from \"@babel/runtime/helpers/esm/arrayLikeToArray\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","import objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","import React, { createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { publicLoader } from \"./loader\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\n\n// Renders page\nclass PageRenderer extends React.Component {\n render() {\n const props = {\n ...this.props,\n params: {\n ...grabMatchParams(this.props.location.pathname),\n ...this.props.pageResources.json.pageContext.__params,\n },\n pathContext: this.props.pageContext,\n }\n\n const [replacementElement] = apiRunner(`replaceComponentRenderer`, {\n props: this.props,\n loader: publicLoader,\n })\n\n const pageElement =\n replacementElement ||\n createElement(this.props.pageResources.component, {\n ...props,\n key: this.props.path || this.props.pageResources.page.path,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n { element: pageElement, props },\n pageElement,\n ({ result }) => {\n return { element: result, props }\n }\n ).pop()\n\n return wrappedPage\n }\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","import React from 'react';\nvar ThemeContext = React.createContext(null);\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'ThemeContext';\n}\n\nexport default ThemeContext;","exports.f = Object.getOwnPropertySymbols;\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\nvar CHROME_VERSION = require('../internals/engine-v8-version');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduce` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH || CHROME_BUG }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","\"use strict\";\n\nexports.__esModule = true;\nexports.onRouteUpdate = void 0;\n\nvar onRouteUpdate = function onRouteUpdate(_ref, pluginOptions) {\n var location = _ref.location;\n\n if (pluginOptions === void 0) {\n pluginOptions = {};\n }\n\n if (process.env.NODE_ENV !== \"production\" || typeof ga !== \"function\") {\n return null;\n }\n\n var pathIsExcluded = location && typeof window.excludeGAPaths !== \"undefined\" && window.excludeGAPaths.some(function (rx) {\n return rx.test(location.pathname);\n });\n if (pathIsExcluded) return null; // wrap inside a timeout to make sure react-helmet is done with it's changes (https://github.com/gatsbyjs/gatsby/issues/9139)\n // reactHelmet is using requestAnimationFrame: https://github.com/nfl/react-helmet/blob/5.2.0/src/HelmetUtils.js#L296-L299\n\n var sendPageView = function sendPageView() {\n var pagePath = location ? location.pathname + location.search + location.hash : undefined;\n window.ga(\"set\", \"page\", pagePath);\n window.ga(\"send\", \"pageview\");\n }; // Minimum delay for reactHelmet's requestAnimationFrame\n\n\n var delay = Math.max(32, pluginOptions.pageTransitionDelay || 0);\n setTimeout(sendPageView, delay);\n return null;\n};\n\nexports.onRouteUpdate = onRouteUpdate;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","module.exports = [{\n plugin: require('../../../node_modules/gatsby-plugin-google-analytics/gatsby-browser.js'),\n options: {\"plugins\":[],\"trackingId\":\" \"},\n },{\n plugin: require('../../../node_modules/gatsby-plugin-material-ui/gatsby-browser.js'),\n options: {\"plugins\":[]},\n },{\n plugin: require('../../../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),\n options: {\"plugins\":[],\"name\":\"gatsby-starter-default\",\"short_name\":\"starter\",\"start_url\":\"/\",\"background_color\":\"#4285f4\",\"theme_color\":\"#4285f4\",\"display\":\"material-ui\",\"cache_busting_mode\":\"query\",\"include_favicon\":true,\"legacy\":true,\"theme_color_in_head\":true,\"cacheDigest\":null},\n },{\n plugin: require('../gatsby-browser.js'),\n options: {\"plugins\":[]},\n }]\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","// prefer default export if available\nconst preferDefault = m => (m && m.default) || m\n\nexports.components = {\n \"component---src-pages-404-tsx\": () => import(\"./../../../src/pages/404.tsx\" /* webpackChunkName: \"component---src-pages-404-tsx\" */),\n \"component---src-pages-index-tsx\": () => import(\"./../../../src/pages/index.tsx\" /* webpackChunkName: \"component---src-pages-index-tsx\" */),\n \"component---src-pages-learn-more-tsx\": () => import(\"./../../../src/pages/learn-more.tsx\" /* webpackChunkName: \"component---src-pages-learn-more-tsx\" */),\n \"component---src-pages-review-[id]-tsx\": () => import(\"./../../../src/pages/review/[id].tsx\" /* webpackChunkName: \"component---src-pages-review-[id]-tsx\" */),\n \"component---src-pages-reviews-board-[abbreviation]-tsx\": () => import(\"./../../../src/pages/reviews/board/[abbreviation].tsx\" /* webpackChunkName: \"component---src-pages-reviews-board-[abbreviation]-tsx\" */),\n \"component---src-pages-reviews-tsx\": () => import(\"./../../../src/pages/reviews.tsx\" /* webpackChunkName: \"component---src-pages-reviews-tsx\" */)\n}\n\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.withPrefix = withPrefix;\nexports.withAssetPrefix = withAssetPrefix;\nexports.navigateTo = exports.replace = exports.push = exports.navigate = exports.default = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _router = require(\"@reach/router\");\n\nvar _utils = require(\"@reach/router/lib/utils\");\n\nvar _parsePath = require(\"./parse-path\");\n\nexports.parsePath = _parsePath.parsePath;\n\nvar isAbsolutePath = function isAbsolutePath(path) {\n return path === null || path === void 0 ? void 0 : path.startsWith(\"/\");\n};\n\nfunction withPrefix(path, prefix) {\n var _ref, _prefix;\n\n if (prefix === void 0) {\n prefix = getGlobalBasePrefix();\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n if (path.startsWith(\"./\") || path.startsWith(\"../\")) {\n return path;\n }\n\n var base = (_ref = (_prefix = prefix) !== null && _prefix !== void 0 ? _prefix : getGlobalPathPrefix()) !== null && _ref !== void 0 ? _ref : \"/\";\n return \"\" + ((base === null || base === void 0 ? void 0 : base.endsWith(\"/\")) ? base.slice(0, -1) : base) + (path.startsWith(\"/\") ? path : \"/\" + path);\n} // These global values are wrapped in typeof clauses to ensure the values exist.\n// This is especially problematic in unit testing of this component.\n\n\nvar getGlobalPathPrefix = function getGlobalPathPrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __PATH_PREFIX__ !== \"undefined\" ? __PATH_PREFIX__ : undefined : __PATH_PREFIX__;\n};\n\nvar getGlobalBasePrefix = function getGlobalBasePrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __BASE_PATH__ !== \"undefined\" ? __BASE_PATH__ : undefined : __BASE_PATH__;\n};\n\nvar isLocalLink = function isLocalLink(path) {\n return path && !path.startsWith(\"http://\") && !path.startsWith(\"https://\") && !path.startsWith(\"//\");\n};\n\nfunction withAssetPrefix(path) {\n return withPrefix(path, getGlobalPathPrefix());\n}\n\nfunction absolutify(path, current) {\n // If it's already absolute, return as-is\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return (0, _utils.resolve)(path, current);\n}\n\nvar rewriteLinkPath = function rewriteLinkPath(path, relativeTo) {\n if (typeof path === \"number\") {\n return path;\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n return isAbsolutePath(path) ? withPrefix(path) : absolutify(path, relativeTo);\n};\n\nvar NavLinkPropTypes = {\n activeClassName: _propTypes.default.string,\n activeStyle: _propTypes.default.object,\n partiallyActive: _propTypes.default.bool\n}; // Set up IntersectionObserver\n\nvar createIntersectionObserver = function createIntersectionObserver(el, cb) {\n var io = new window.IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (el === entry.target) {\n // Check if element is within viewport, remove listener, destroy observer, and run link callback.\n // MSEdge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(el);\n io.disconnect();\n cb();\n }\n }\n });\n }); // Add element to the observer\n\n io.observe(el);\n return {\n instance: io,\n el: el\n };\n};\n\nfunction GatsbyLinkLocationWrapper(props) {\n return /*#__PURE__*/_react.default.createElement(_router.Location, null, function (_ref2) {\n var location = _ref2.location;\n return /*#__PURE__*/_react.default.createElement(GatsbyLink, (0, _extends2.default)({}, props, {\n _location: location\n }));\n });\n}\n\nvar GatsbyLink = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(GatsbyLink, _React$Component);\n\n function GatsbyLink(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // Default to no support for IntersectionObserver\n\n _this.defaultGetProps = function (_ref3) {\n var isPartiallyCurrent = _ref3.isPartiallyCurrent,\n isCurrent = _ref3.isCurrent;\n\n if (_this.props.partiallyActive ? isPartiallyCurrent : isCurrent) {\n return {\n className: [_this.props.className, _this.props.activeClassName].filter(Boolean).join(\" \"),\n style: (0, _extends2.default)({}, _this.props.style, _this.props.activeStyle)\n };\n }\n\n return null;\n };\n\n var IOSupported = false;\n\n if (typeof window !== \"undefined\" && window.IntersectionObserver) {\n IOSupported = true;\n }\n\n _this.state = {\n IOSupported: IOSupported\n };\n _this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n var _proto = GatsbyLink.prototype;\n\n _proto._prefetch = function _prefetch() {\n var currentPath = window.location.pathname; // reach router should have the correct state\n\n if (this.props._location && this.props._location.pathname) {\n currentPath = this.props._location.pathname;\n }\n\n var rewrittenPath = rewriteLinkPath(this.props.to, currentPath);\n var newPathName = (0, _parsePath.parsePath)(rewrittenPath).pathname; // Prefech is used to speed up next navigations. When you use it on the current navigation,\n // there could be a race-condition where Chrome uses the stale data instead of waiting for the network to complete\n\n if (currentPath !== newPathName) {\n ___loader.enqueue(newPathName);\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Preserve non IO functionality if no support\n if (this.props.to !== prevProps.to && !this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n // Preserve non IO functionality if no support\n if (!this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!this.io) {\n return;\n }\n\n var _this$io = this.io,\n instance = _this$io.instance,\n el = _this$io.el;\n instance.unobserve(el);\n instance.disconnect();\n };\n\n _proto.handleRef = function handleRef(ref) {\n var _this2 = this;\n\n if (this.props.innerRef && this.props.innerRef.hasOwnProperty(\"current\")) {\n this.props.innerRef.current = ref;\n } else if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n if (this.state.IOSupported && ref) {\n // If IO supported and element reference found, setup Observer functionality\n this.io = createIntersectionObserver(ref, function () {\n _this2._prefetch();\n });\n }\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n to = _this$props.to,\n _this$props$getProps = _this$props.getProps,\n getProps = _this$props$getProps === void 0 ? this.defaultGetProps : _this$props$getProps,\n _onClick = _this$props.onClick,\n _onMouseEnter = _this$props.onMouseEnter,\n $activeClassName = _this$props.activeClassName,\n $activeStyle = _this$props.activeStyle,\n $innerRef = _this$props.innerRef,\n partiallyActive = _this$props.partiallyActive,\n state = _this$props.state,\n replace = _this$props.replace,\n _location = _this$props._location,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"to\", \"getProps\", \"onClick\", \"onMouseEnter\", \"activeClassName\", \"activeStyle\", \"innerRef\", \"partiallyActive\", \"state\", \"replace\", \"_location\"]);\n\n if (process.env.NODE_ENV !== \"production\" && !isLocalLink(to)) {\n console.warn(\"External link \" + to + \" was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links\");\n }\n\n var prefixedTo = rewriteLinkPath(to, _location.pathname);\n\n if (!isLocalLink(prefixedTo)) {\n return /*#__PURE__*/_react.default.createElement(\"a\", (0, _extends2.default)({\n href: prefixedTo\n }, rest));\n }\n\n return /*#__PURE__*/_react.default.createElement(_router.Link, (0, _extends2.default)({\n to: prefixedTo,\n state: state,\n getProps: getProps,\n innerRef: this.handleRef,\n onMouseEnter: function onMouseEnter(e) {\n if (_onMouseEnter) {\n _onMouseEnter(e);\n }\n\n ___loader.hovering((0, _parsePath.parsePath)(prefixedTo).pathname);\n },\n onClick: function onClick(e) {\n if (_onClick) {\n _onClick(e);\n }\n\n if (e.button === 0 && // ignore right clicks\n !_this3.props.target && // let browser handle \"target=_blank\"\n !e.defaultPrevented && // onClick prevented default\n !e.metaKey && // ignore clicks with modifier keys...\n !e.altKey && !e.ctrlKey && !e.shiftKey) {\n e.preventDefault();\n var shouldReplace = replace;\n\n var isCurrent = encodeURI(prefixedTo) === _location.pathname;\n\n if (typeof replace !== \"boolean\" && isCurrent) {\n shouldReplace = true;\n } // Make sure the necessary scripts and data are\n // loaded before continuing.\n\n\n window.___navigate(prefixedTo, {\n state: state,\n replace: shouldReplace\n });\n }\n\n return true;\n }\n }, rest));\n };\n\n return GatsbyLink;\n}(_react.default.Component);\n\nGatsbyLink.propTypes = (0, _extends2.default)({}, NavLinkPropTypes, {\n onClick: _propTypes.default.func,\n to: _propTypes.default.string.isRequired,\n replace: _propTypes.default.bool,\n state: _propTypes.default.object\n});\n\nvar showDeprecationWarning = function showDeprecationWarning(functionName, altFunctionName, version) {\n return console.warn(\"The \\\"\" + functionName + \"\\\" method is now deprecated and will be removed in Gatsby v\" + version + \". Please use \\\"\" + altFunctionName + \"\\\" instead.\");\n};\n\nvar _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n return /*#__PURE__*/_react.default.createElement(GatsbyLinkLocationWrapper, (0, _extends2.default)({\n innerRef: ref\n }, props));\n});\n\nexports.default = _default;\n\nvar navigate = function navigate(to, options) {\n window.___navigate(rewriteLinkPath(to, window.location.pathname), options);\n};\n\nexports.navigate = navigate;\n\nvar push = function push(to) {\n showDeprecationWarning(\"push\", \"navigate\", 3);\n\n window.___push(rewriteLinkPath(to, window.location.pathname));\n};\n\nexports.push = push;\n\nvar replace = function replace(to) {\n showDeprecationWarning(\"replace\", \"navigate\", 3);\n\n window.___replace(rewriteLinkPath(to, window.location.pathname));\n}; // TODO: Remove navigateTo for Gatsby v3\n\n\nexports.replace = replace;\n\nvar navigateTo = function navigateTo(to) {\n showDeprecationWarning(\"navigateTo\", \"navigate\", 3);\n return push(to);\n};\n\nexports.navigateTo = navigateTo;","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.parsePath = parsePath;\n\nfunction parsePath(path) {\n var pathname = path || \"/\";\n var search = \"\";\n var hash = \"\";\n var hashIndex = pathname.indexOf(\"#\");\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf(\"?\");\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === \"?\" ? \"\" : search,\n hash: hash === \"#\" ? \"\" : hash\n };\n}","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.8.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nexport function isPlainObject(item) {\n return item && _typeof(item) === 'object' && item.constructor === Object;\n}\nexport default function deepmerge(target, source) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n clone: true\n };\n var output = options.clone ? _extends({}, target) : target;\n\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(function (key) {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n\n if (isPlainObject(source[key]) && key in target) {\n output[key] = deepmerge(target[key], source[key], options);\n } else {\n output[key] = source[key];\n }\n });\n }\n\n return output;\n}","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport redirects from \"./redirects.json\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport { navigate as reachNavigate } from \"@reach/router\"\nimport { globalHistory } from \"@reach/router/lib/history\"\nimport { parsePath } from \"gatsby-link\"\n\n// Convert to a map for faster lookup in maybeRedirect()\nconst redirectMap = redirects.reduce((map, redirect) => {\n map[redirect.fromPath] = redirect\n return map\n}, {})\n\nfunction maybeRedirect(pathname) {\n const redirect = redirectMap[pathname]\n\n if (redirect != null) {\n if (process.env.NODE_ENV !== `production`) {\n if (!loader.isPageNotFound(pathname)) {\n console.error(\n `The route \"${pathname}\" matches both a page and a redirect; this is probably not intentional.`\n )\n }\n }\n\n window.___replace(redirect.toPath)\n return true\n } else {\n return false\n }\n}\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n let { pathname } = parsePath(to)\n const redirect = redirectMap[pathname]\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath\n pathname = parsePath(to).pathname\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n console.log(`Site has changed on server. Reloading browser`)\n window.location = pathname\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => this._stateStorage.read(args),\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n\n // Check for initial page-load redirect\n maybeRedirect(window.location.pathname)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
\n }\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (this.props.location.href !== prevProps.location.href) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (this.props.location.href !== prevProps.location.href) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources: pageResources || loader.loadPageSync(location.pathname),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(location.pathname)\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (process.env.NODE_ENV !== `production` && !this.state.pageResources) {\n throw new Error(\n `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n )\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Router, navigate, Location, BaseContext } from \"@reach/router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport domReady from \"@mikaelkristiansson/domready\"\nimport { StaticQueryContext } from \"gatsby\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n return (\n \n \n {children}\n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n
\n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). But\n // only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !== browserLoc.pathname &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath === `/404.html` ||\n pagePath.match(/^\\/404\\/?$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(__BASE_PATH__ + pagePath + browserLoc.search + browserLoc.hash, {\n replace: true,\n })\n }\n\n publicLoader.loadPage(browserLoc.pathname).then(page => {\n if (!page || page.status === PageResourceStatus.Error) {\n throw new Error(\n `page resources for ${browserLoc.pathname} not found. Not rendering React`\n )\n }\n\n window.___webpackCompilationHash = page.page.webpackCompilationHash\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = () => {SiteRoot}\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n ReactDOM.hydrate\n )[0]\n\n domReady(() => {\n renderer(\n ,\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : void 0,\n () => {\n apiRunner(`onInitialClientRender`)\n }\n )\n })\n })\n})\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nmodule.exports = _inheritsLoose;","/* eslint-disable no-restricted-syntax */\nexport default function getThemeProps(params) {\n var theme = params.theme,\n name = params.name,\n props = params.props;\n\n if (!theme || !theme.props || !theme.props[name]) {\n return props;\n } // Resolve default props, code borrow from React source.\n // https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221\n\n\n var defaultProps = theme.props[name];\n var propName;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n}","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport { useScrollRestoration } from \"gatsby-react-router-scroll\"\nimport PageRenderer from \"./public-page-renderer\"\nimport loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nconst StaticQueryContext = React.createContext({})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&
Loading (StaticQuery)
}\n
\n )\n}\n\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context?.[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nfunction unstable_collectionGraphql() {\n // TODO: Strip this out of the component and throw error if it gets called\n return null\n}\n\nexport {\n Link,\n withAssetPrefix,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n push, // TODO replace for v3\n replace, // TODO remove replace for v3\n navigateTo, // TODO: remove navigateTo for v3\n useScrollRestoration,\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n useStaticQuery,\n prefetchPathname,\n // Experimental API\n unstable_collectionGraphql,\n}\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","export { default } from './StylesProvider';\nexport * from './StylesProvider';","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport useTheme from '../useTheme';\nexport function withThemeCreator() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaultTheme = options.defaultTheme;\n\n var withTheme = function withTheme(Component) {\n if (process.env.NODE_ENV !== 'production') {\n if (Component === undefined) {\n throw new Error(['You are calling withTheme(Component) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n }\n\n var WithTheme = /*#__PURE__*/React.forwardRef(function WithTheme(props, ref) {\n var innerRef = props.innerRef,\n other = _objectWithoutProperties(props, [\"innerRef\"]);\n\n var theme = useTheme() || defaultTheme;\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: innerRef || ref\n }, other));\n });\n process.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithTheme.displayName = \"WithTheme(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithTheme, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // Exposed for test purposes.\n WithTheme.Naked = Component;\n }\n\n return WithTheme;\n };\n\n return withTheme;\n} // Provide the theme object as a prop to the input component.\n// It's an alternative API to useTheme().\n// We encourage the usage of useTheme() where possible.\n\nvar withTheme = withThemeCreator();\nexport default withTheme;","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","\"use strict\";\n\nmodule.exports = Object.assign;","export default function createStyles(styles) {\n return styles;\n}","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport { exactProp } from '@material-ui/utils';\nimport createGenerateClassName from '../createGenerateClassName';\nimport { create } from 'jss';\nimport jssPreset from '../jssPreset'; // Default JSS instance.\n\nvar jss = create(jssPreset()); // Use a singleton or the provided one by the context.\n//\n// The counter-based approach doesn't tolerate any mistake.\n// It's much safer to use the same counter everywhere.\n\nvar generateClassName = createGenerateClassName(); // Exported for test purposes\n\nexport var sheetsManager = new Map();\nvar defaultOptions = {\n disableGeneration: false,\n generateClassName: generateClassName,\n jss: jss,\n sheetsCache: null,\n sheetsManager: sheetsManager,\n sheetsRegistry: null\n};\nexport var StylesContext = React.createContext(defaultOptions);\n\nif (process.env.NODE_ENV !== 'production') {\n StylesContext.displayName = 'StylesContext';\n}\n\nvar injectFirstNode;\nexport default function StylesProvider(props) {\n var children = props.children,\n _props$injectFirst = props.injectFirst,\n injectFirst = _props$injectFirst === void 0 ? false : _props$injectFirst,\n _props$disableGenerat = props.disableGeneration,\n disableGeneration = _props$disableGenerat === void 0 ? false : _props$disableGenerat,\n localOptions = _objectWithoutProperties(props, [\"children\", \"injectFirst\", \"disableGeneration\"]);\n\n var outerOptions = React.useContext(StylesContext);\n\n var context = _extends({}, outerOptions, {\n disableGeneration: disableGeneration\n }, localOptions);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window === 'undefined' && !context.sheetsManager) {\n console.error('Material-UI: You need to use the ServerStyleSheets API when rendering on the server.');\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (context.jss.options.insertionPoint && injectFirst) {\n console.error('Material-UI: You cannot use a custom insertionPoint and at the same time.');\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (injectFirst && localOptions.jss) {\n console.error('Material-UI: You cannot use the jss and injectFirst props at the same time.');\n }\n }\n\n if (!context.jss.options.insertionPoint && injectFirst && typeof window !== 'undefined') {\n if (!injectFirstNode) {\n var head = document.head;\n injectFirstNode = document.createComment('mui-inject-first');\n head.insertBefore(injectFirstNode, head.firstChild);\n }\n\n context.jss = create({\n plugins: jssPreset().plugins,\n insertionPoint: injectFirstNode\n });\n }\n\n return /*#__PURE__*/React.createElement(StylesContext.Provider, {\n value: context\n }, children);\n}\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n}","const support = function (feature) {\n if (typeof document === `undefined`) {\n return false\n }\n const fakeLink = document.createElement(`link`)\n try {\n if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) {\n return fakeLink.relList.supports(feature)\n }\n } catch (err) {\n return false\n }\n return false\n}\n\nconst linkPrefetchStrategy = function (url, options) {\n return new Promise((resolve, reject) => {\n if (typeof document === `undefined`) {\n reject()\n return\n }\n\n const link = document.createElement(`link`)\n link.setAttribute(`rel`, `prefetch`)\n link.setAttribute(`href`, url)\n\n Object.keys(options).forEach(key => {\n link.setAttribute(key, options[key])\n })\n\n link.onload = resolve\n link.onerror = reject\n\n const parentElement =\n document.getElementsByTagName(`head`)[0] ||\n document.getElementsByName(`script`)[0].parentNode\n parentElement.appendChild(link)\n })\n}\n\nconst xhrPrefetchStrategy = function (url) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(`GET`, url, true)\n\n req.onload = () => {\n if (req.status === 200) {\n resolve()\n } else {\n reject()\n }\n }\n\n req.send(null)\n })\n}\n\nconst supportedPrefetchStrategy = support(`prefetch`)\n ? linkPrefetchStrategy\n : xhrPrefetchStrategy\n\nconst preFetched = {}\n\nconst prefetch = function (url, options) {\n return new Promise(resolve => {\n if (preFetched[url]) {\n resolve()\n return\n }\n\n supportedPrefetchStrategy(url, options)\n .then(() => {\n resolve()\n preFetched[url] = true\n })\n .catch(() => {}) // 404s are logged to the console anyway\n })\n}\n\nexport default prefetch\n","import prefetchHelper from \"./prefetch\"\nimport emitter from \"./emitter\"\nimport { setMatchPaths, findPath, findMatchPath } from \"./find-path\"\n\n/**\n * Available resource loading statuses\n */\nexport const PageResourceStatus = {\n /**\n * At least one of critical resources failed to load\n */\n Error: `error`,\n /**\n * Resources loaded successfully\n */\n Success: `success`,\n}\n\nconst preferDefault = m => (m && m.default) || m\n\nconst stripSurroundingSlashes = s => {\n s = s[0] === `/` ? s.slice(1) : s\n s = s.endsWith(`/`) ? s.slice(0, -1) : s\n return s\n}\n\nconst createPageDataUrl = path => {\n const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path)\n return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json`\n}\n\nfunction doFetch(url, method = `GET`) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(method, url, true)\n req.onreadystatechange = () => {\n if (req.readyState == 4) {\n resolve(req)\n }\n }\n req.send(null)\n })\n}\n\nconst doesConnectionSupportPrefetch = () => {\n if (\n `connection` in navigator &&\n typeof navigator.connection !== `undefined`\n ) {\n if ((navigator.connection.effectiveType || ``).includes(`2g`)) {\n return false\n }\n if (navigator.connection.saveData) {\n return false\n }\n }\n return true\n}\n\nconst toPageResources = (pageData, component = null) => {\n const page = {\n componentChunkName: pageData.componentChunkName,\n path: pageData.path,\n webpackCompilationHash: pageData.webpackCompilationHash,\n matchPath: pageData.matchPath,\n staticQueryHashes: pageData.staticQueryHashes,\n }\n\n return {\n component,\n json: pageData.result,\n page,\n }\n}\n\nexport class BaseLoader {\n constructor(loadComponent, matchPaths) {\n // Map of pagePath -> Page. Where Page is an object with: {\n // status: PageResourceStatus.Success || PageResourceStatus.Error,\n // payload: PageResources, // undefined if PageResourceStatus.Error\n // }\n // PageResources is {\n // component,\n // json: pageData.result,\n // page: {\n // componentChunkName,\n // path,\n // webpackCompilationHash,\n // staticQueryHashes\n // },\n // staticQueryResults\n // }\n this.pageDb = new Map()\n this.inFlightDb = new Map()\n this.staticQueryDb = {}\n this.pageDataDb = new Map()\n this.prefetchTriggered = new Set()\n this.prefetchCompleted = new Set()\n this.loadComponent = loadComponent\n setMatchPaths(matchPaths)\n }\n\n inFlightNetworkRequests = new Map()\n\n memoizedGet(url) {\n let inFlightPromise = this.inFlightNetworkRequests.get(url)\n\n if (!inFlightPromise) {\n inFlightPromise = doFetch(url, `GET`)\n this.inFlightNetworkRequests.set(url, inFlightPromise)\n }\n\n // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox\n return inFlightPromise\n .then(response => {\n this.inFlightNetworkRequests.delete(url)\n return response\n })\n .catch(err => {\n this.inFlightNetworkRequests.delete(url)\n throw err\n })\n }\n\n setApiRunner(apiRunner) {\n this.apiRunner = apiRunner\n this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a)\n }\n\n fetchPageDataJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.path === undefined) {\n throw new Error(`not a valid pageData response`)\n }\n\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: jsonPayload,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404 page and it doesn't exist, we're done\n if (pagePath === `/404.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPageDataJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n loadPageDataJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDataDb.has(pagePath)) {\n return Promise.resolve(this.pageDataDb.get(pagePath))\n }\n\n return this.fetchPageDataJson({ pagePath }).then(pageData => {\n this.pageDataDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n findMatchPath(rawPath) {\n return findMatchPath(rawPath)\n }\n\n // TODO check all uses of this and whether they use undefined for page resources not exist\n loadPage(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const page = this.pageDb.get(pagePath)\n return Promise.resolve(page.payload)\n }\n\n if (this.inFlightDb.has(pagePath)) {\n return this.inFlightDb.get(pagePath)\n }\n\n const inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n ]).then(allData => {\n const result = allData[1]\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n let pageData = result.payload\n const { componentChunkName, staticQueryHashes = [] } = pageData\n\n const finalResult = {}\n\n const componentChunkPromise = this.loadComponent(componentChunkName).then(\n component => {\n finalResult.createdAt = new Date()\n let pageResources\n if (!component) {\n finalResult.status = PageResourceStatus.Error\n } else {\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: allData[0]\n ? allData[0].webpackCompilationHash\n : ``,\n })\n pageResources = toPageResources(pageData, component)\n }\n // undefined if final result is an error\n return pageResources\n }\n )\n\n const staticQueryBatchPromise = Promise.all(\n staticQueryHashes.map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n ).then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return Promise.all([componentChunkPromise, staticQueryBatchPromise]).then(\n ([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = { ...pageResources, staticQueryResults }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n return payload\n }\n )\n })\n\n inFlightPromise\n .then(response => {\n this.inFlightDb.delete(pagePath)\n })\n .catch(error => {\n this.inFlightDb.delete(pagePath)\n throw error\n })\n\n this.inFlightDb.set(pagePath, inFlightPromise)\n\n return inFlightPromise\n }\n\n // returns undefined if loading page ran into errors\n loadPageSync(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const pageData = this.pageDb.get(pagePath).payload\n return pageData\n }\n return undefined\n }\n\n shouldPrefetch(pagePath) {\n // Skip prefetching if we know user is on slow or constrained connection\n if (!doesConnectionSupportPrefetch()) {\n return false\n }\n\n // Check if the page exists.\n if (this.pageDb.has(pagePath)) {\n return false\n }\n\n return true\n }\n\n prefetch(pagePath) {\n if (!this.shouldPrefetch(pagePath)) {\n return false\n }\n\n // Tell plugins with custom prefetching logic that they should start\n // prefetching this path.\n if (!this.prefetchTriggered.has(pagePath)) {\n this.apiRunner(`onPrefetchPathname`, { pathname: pagePath })\n this.prefetchTriggered.add(pagePath)\n }\n\n // If a plugin has disabled core prefetching, stop now.\n if (this.prefetchDisabled) {\n return false\n }\n\n const realPath = findPath(pagePath)\n // Todo make doPrefetch logic cacheable\n // eslint-disable-next-line consistent-return\n this.doPrefetch(realPath).then(() => {\n if (!this.prefetchCompleted.has(pagePath)) {\n this.apiRunner(`onPostPrefetchPathname`, { pathname: pagePath })\n this.prefetchCompleted.add(pagePath)\n }\n })\n\n return true\n }\n\n doPrefetch(pagePath) {\n throw new Error(`doPrefetch not implemented`)\n }\n\n hovering(rawPath) {\n this.loadPage(rawPath)\n }\n\n getResourceURLsForPathname(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDataDb.get(pagePath)\n if (page) {\n const pageResources = toPageResources(page.payload)\n\n return [\n ...createComponentUrls(pageResources.page.componentChunkName),\n createPageDataUrl(pagePath),\n ]\n } else {\n return null\n }\n }\n\n isPageNotFound(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDb.get(pagePath)\n return !page || page.notFound\n }\n\n loadAppData(retries = 0) {\n return this.memoizedGet(`${__PATH_PREFIX__}/page-data/app-data.json`).then(\n req => {\n const { status, responseText } = req\n\n let appData\n\n if (status !== 200 && retries < 3) {\n // Retry 3 times incase of non-200 responses\n return this.loadAppData(retries + 1)\n }\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.webpackCompilationHash === undefined) {\n throw new Error(`not a valid app-data response`)\n }\n\n appData = jsonPayload\n } catch (err) {\n // continue regardless of error\n }\n }\n\n return appData\n }\n )\n }\n}\n\nconst createComponentUrls = componentChunkName =>\n (window.___chunkMapping[componentChunkName] || []).map(\n chunk => __PATH_PREFIX__ + chunk\n )\n\nexport class ProdLoader extends BaseLoader {\n constructor(asyncRequires, matchPaths) {\n const loadComponent = chunkName =>\n asyncRequires.components[chunkName]\n ? asyncRequires.components[chunkName]()\n .then(preferDefault)\n // loader will handle the case when component is null\n .catch(() => null)\n : Promise.resolve()\n\n super(loadComponent, matchPaths)\n }\n\n doPrefetch(pagePath) {\n const pageDataUrl = createPageDataUrl(pagePath)\n return prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n })\n .then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n )\n .then(result => {\n if (result.status !== PageResourceStatus.Success) {\n return Promise.resolve()\n }\n const pageData = result.payload\n const chunkName = pageData.componentChunkName\n const componentUrls = createComponentUrls(chunkName)\n return Promise.all(componentUrls.map(prefetchHelper)).then(\n () => pageData\n )\n })\n }\n\n loadPageDataJson(rawPath) {\n return super.loadPageDataJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n}\n\nlet instance\n\nexport const setLoader = _loader => {\n instance = _loader\n}\n\nexport const publicLoader = {\n // Deprecated methods. As far as we're aware, these are only used by\n // core gatsby and the offline plugin, however there's a very small\n // chance they're called by others.\n getResourcesForPathname: rawPath => {\n console.warn(\n `Warning: getResourcesForPathname is deprecated. Use loadPage instead`\n )\n return instance.i.loadPage(rawPath)\n },\n getResourcesForPathnameSync: rawPath => {\n console.warn(\n `Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead`\n )\n return instance.i.loadPageSync(rawPath)\n },\n enqueue: rawPath => instance.prefetch(rawPath),\n\n // Real methods\n getResourceURLsForPathname: rawPath =>\n instance.getResourceURLsForPathname(rawPath),\n loadPage: rawPath => instance.loadPage(rawPath),\n loadPageSync: rawPath => instance.loadPageSync(rawPath),\n prefetch: rawPath => instance.prefetch(rawPath),\n isPageNotFound: rawPath => instance.isPageNotFound(rawPath),\n hovering: rawPath => instance.hovering(rawPath),\n loadAppData: () => instance.loadAppData(),\n}\n\nexport default publicLoader\n\nexport function getStaticQueryResults() {\n return instance.staticQueryDb\n}\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","import arrayWithoutHoles from \"@babel/runtime/helpers/esm/arrayWithoutHoles\";\nimport iterableToArray from \"@babel/runtime/helpers/esm/iterableToArray\";\nimport unsupportedIterableToArray from \"@babel/runtime/helpers/esm/unsupportedIterableToArray\";\nimport nonIterableSpread from \"@babel/runtime/helpers/esm/nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"@babel/runtime/helpers/esm/arrayLikeToArray\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\n\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n\n if (isProduction) {\n throw new Error(prefix);\n }\n\n throw new Error(prefix + \": \" + (message || ''));\n}\n\nexport default invariant;","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.wrapRootElement = exports.onInitialClientRender = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _styles = require(\"@material-ui/styles\");\n\nvar _materialUiPluginCacheEndpoint = _interopRequireDefault(require(\"material-ui-plugin-cache-endpoint\"));\n\nvar _utils = require(\"./utils\");\n\nvar onInitialClientRender = function onInitialClientRender() {\n if (process.env.BUILD_STAGE === \"develop\") {\n return;\n } // Remove the server-side injected CSS.\n\n\n var jssStyles = document.querySelector(\"#jss-server-side\");\n\n if (jssStyles) {\n jssStyles.parentNode.removeChild(jssStyles);\n }\n};\n\nexports.onInitialClientRender = onInitialClientRender;\n\nvar wrapRootElement = function wrapRootElement(_ref, pluginOptions) {\n var element = _ref.element;\n\n if ((0, _utils.hasEntries)(_materialUiPluginCacheEndpoint.default) && pluginOptions.stylesProvider) {\n throw new Error(\"You specified both pathToStylesProvider and stylesProvider in gatsby-config.js. Remove one of them.\");\n }\n\n var stylesProvider = (0, _utils.hasEntries)(_materialUiPluginCacheEndpoint.default) ? _materialUiPluginCacheEndpoint.default : pluginOptions.stylesProvider;\n\n if (!stylesProvider) {\n return element;\n }\n\n return /*#__PURE__*/_react.default.createElement(_styles.StylesProvider, stylesProvider, element);\n};\n\nexports.wrapRootElement = wrapRootElement;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollContainer = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _router = require(\"@reach/router\");\n\n// TODO: In Gatsby v3, this file should be removed.\n// We are deprecating this in V2 in favor of useScrollRestoration\nvar propTypes = {\n scrollKey: _propTypes.default.string.isRequired,\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired\n};\nvar hasNotWarnedDeprecation = true;\n\nvar ScrollContainerImplementation = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollContainerImplementation, _React$Component);\n\n function ScrollContainerImplementation(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n if (process.env.NODE_ENV !== \"production\" && hasNotWarnedDeprecation) {\n hasNotWarnedDeprecation = false;\n console.log(\"Deprecation Warning:\\n\\n Gatsby is deprecated in Gatsby v2 and will be removed in Gatsby v3.\\n Update to the React hook alternative useScrollRestoration, like this:.\\n \\n ```\\n import React from 'react';\\n import { useScrollRestoration } from 'gatsby-react-router-scroll';\\n\\n function Component() {\\n const scrollRestoration = useScrollRestoration('\" + _this.props.scrollKey + \"');\\n\\n return
    ;\\n }\\n ```\\n \");\n }\n\n return _this;\n }\n\n var _proto = ScrollContainerImplementation.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n // eslint-disable-next-line react/no-find-dom-node\n var node = _reactDom.default.findDOMNode(this);\n\n var _this$props = this.props,\n location = _this$props.location,\n scrollKey = _this$props.scrollKey;\n if (!node) return;\n node.addEventListener(\"scroll\", function () {\n _this2.props.context.save(location, scrollKey, node.scrollTop);\n });\n var position = this.props.context.read(location, scrollKey);\n node.scrollTo(0, position || 0);\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return ScrollContainerImplementation;\n}(React.Component);\n\nvar ScrollContainer = function ScrollContainer(props) {\n return /*#__PURE__*/React.createElement(_router.Location, null, function (_ref) {\n var location = _ref.location;\n return /*#__PURE__*/React.createElement(_scrollHandler.ScrollContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(ScrollContainerImplementation, (0, _extends2.default)({}, props, {\n context: context,\n location: location\n }));\n });\n });\n};\n\nexports.ScrollContainer = ScrollContainer;\nScrollContainer.propTypes = propTypes;","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","var hasSymbol = typeof Symbol === 'function' && Symbol.for;\nexport default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';","var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { exactProp } from '@material-ui/utils';\nimport ThemeContext from '../useTheme/ThemeContext';\nimport useTheme from '../useTheme';\nimport nested from './nested'; // To support composition of theme.\n\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n var mergedTheme = localTheme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['Material-UI: You should return an object from your theme function, i.e.', ' ({})} />'].join('\\n'));\n }\n }\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, localTheme);\n}\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\n\n\nfunction ThemeProvider(props) {\n var children = props.children,\n localTheme = props.theme;\n var outerTheme = useTheme();\n\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['Material-UI: You are providing a theme function prop to the ThemeProvider component:', ' outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n\n var theme = React.useMemo(function () {\n var output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);\n\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n}\n\nexport default ThemeProvider;","/*\n Why commonjs and not ES imports/exports?\n\n This module is used to alias `create-react-context` package, but drop the the actual implementation part\n because Gatsby requires version of react that has implementatoin baked in.\n \n Package source is using ES modules:\n - https://github.com/jamiebuilds/create-react-context/blob/v0.3.0/src/index.js\n \n But to build this package `babel-plugin-add-module-exports` is used ( https://www.npmjs.com/package/babel-plugin-add-module-exports).\n Which result in both `module.exports` and `exports.default` being set to same thing.\n\n We don't use that babel plugin so we only have `exports.default`.\n\n This cause problems in various 3rd party react components that rely on `module.exports` being set.\n See https://github.com/gatsbyjs/gatsby/issues/23645 for example of it.\n \n Instead of adding same babel plugin we mimic output here. Adding babel plugin just for this would:\n a) unnecesairly slow down compilation for all other files (if we just apply it everywhere)\n b) or complicate babel-loader configuration with overwrite specifically for this file\n*/\n\nconst { createContext } = require(`react`)\n\nmodule.exports = createContext\nmodule.exports.default = createContext\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","'use strict';\n\nvar reactIs = require('react-is');\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","import React from 'react';\nimport ThemeContext from './ThemeContext';\nexport default function useTheme() {\n var theme = React.useContext(ThemeContext);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n\n return theme;\n}","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport createContext from \"create-react-context\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\";\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\nvar LocationContext = createNamedContext(\"Location\");\n\n// sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(\n LocationContext.Consumer,\n null,\n function (context) {\n return context ? children(context) : React.createElement(\n LocationProvider,\n null,\n children\n );\n }\n );\n};\n\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n\n function LocationProvider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, LocationProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: { unlisten: null }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n\n return { navigate: navigate, location: location };\n };\n\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n\n _navigate(error.uri, { replace: true });\n } else {\n throw error;\n }\n };\n\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n var refs = this.state.refs,\n history = this.props.history;\n\n history._onTransitionComplete();\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return { context: _this2.getContext() };\n });\n }\n });\n });\n });\n };\n\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n\n this.unmounted = true;\n refs.unlisten();\n };\n\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n\n return React.createElement(\n LocationContext.Provider,\n { value: context },\n typeof children === \"function\" ? children(context) : children || null\n );\n };\n\n return LocationProvider;\n}(React.Component);\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? LocationProvider.propTypes = {\n history: PropTypes.object.isRequired\n} : void 0;\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n\n return React.createElement(\n LocationContext.Provider,\n {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n },\n children\n );\n};\n////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\nvar BaseContext = createNamedContext(\"Base\", { baseuri: \"/\", basepath: \"/\" });\n\n////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\nvar Router = function Router(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (baseContext) {\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n }\n );\n }\n );\n};\n\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n\n\n var match = pick(routes, pathname);\n\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value;\n\n // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(\n Router,\n { location: location, primary: primary },\n element.props.children\n ) : undefined);\n\n // using 'div' for < 16.3 support\n var FocusWrapper = primary ? FocusHandler : component;\n // don't pass any props to 'div'\n var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;\n\n return React.createElement(\n BaseContext.Provider,\n { value: { baseuri: uri, basepath: basepath } },\n React.createElement(\n FocusWrapper,\n wrapperProps,\n clone\n )\n );\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
    Not Found!
    \n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n\n return RouterImpl;\n}(React.PureComponent);\n\nRouterImpl.defaultProps = {\n primary: true\n};\n\n\nvar FocusContext = createNamedContext(\"Focus\");\n\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n\n return React.createElement(\n FocusContext.Consumer,\n null,\n function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n }\n );\n};\n\n// don't focus on initial render\nvar initialRender = true;\nvar focusHandlerCount = 0;\n\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n\n _classCallCheck(this, FocusHandlerImpl);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n\n var requestFocus = this.props.requestFocus;\n\n\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n\n return React.createElement(\n Comp,\n _extends({\n style: _extends({ outline: \"none\" }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps),\n React.createElement(\n FocusContext.Provider,\n { value: this.requestFocus },\n this.props.children\n )\n );\n };\n\n return FocusHandlerImpl;\n}(React.Component);\n\npolyfill(FocusHandlerImpl);\n\nvar k = function k() {};\n\n////////////////////////////////////////////////////////////////////////////////\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\n\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n }\n );\n }\n );\n});\n\nLink.displayName = \"Link\";\n\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\n\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\n\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\n\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n }\n\n // Support React < 16 with this hook\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), { replace: replace, state: state });\n });\n };\n\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n\n return RedirectImpl;\n}(React.Component);\n\nvar Redirect = function Redirect(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));\n }\n );\n }\n );\n};\n\nprocess.env.NODE_ENV !== \"production\" ? Redirect.propTypes = {\n from: PropTypes.string,\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n }\n );\n }\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.location;\n};\n\nvar useNavigate = function useNavigate() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.navigate;\n};\n\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var results = match(context.basepath, location.pathname);\n\n return results ? results.params : null;\n};\n\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\n\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n\n if (element.props.default) {\n return { value: element, default: true };\n }\n\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\n\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n////////////////////////////////////////////////////////////////////////\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch , BaseContext };","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nexport var strShimFunction = \"function\";\nexport var strShimObject = \"object\";\nexport var strShimUndefined = \"undefined\";\nexport var strShimPrototype = \"prototype\";\nexport var strShimHasOwnProperty = \"hasOwnProperty\";\n/**\r\n * Returns the current global scope object, for a normal web page this will be the current\r\n * window, for a Web Worker this will be current worker global scope via \"self\". The internal\r\n * implementation returns the first available instance object in the following order\r\n * - globalThis (New standard)\r\n * - self (Will return the current window instance for supported browsers)\r\n * - window (fallback for older browser implementations)\r\n * - global (NodeJS standard)\r\n * - (When all else fails)\r\n * While the return type is a Window for the normal case, not all environments will support all\r\n * of the properties or functions.\r\n */\n\nexport function getGlobal() {\n if (typeof globalThis !== strShimUndefined && globalThis) {\n return globalThis;\n }\n\n if (typeof self !== strShimUndefined && self) {\n return self;\n }\n\n if (typeof window !== strShimUndefined && window) {\n return window;\n }\n\n if (typeof global !== strShimUndefined && global) {\n return global;\n }\n\n return null;\n}\n/**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil\r\n * for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.\r\n * Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @param obj Object to use as a prototype. May be null\r\n */\n\nexport function objCreateFn(obj) {\n var func = Object[\"create\"]; // Use build in Object.create\n\n if (func) {\n // Use Object create method if it exists\n return func(obj);\n }\n\n if (obj == null) {\n return {};\n }\n\n var type = typeof obj;\n\n if (type !== strShimObject && type !== strShimFunction) {\n throw new TypeError('Object prototype may only be an Object:' + obj);\n }\n\n function tmpFunc() {}\n\n tmpFunc[strShimPrototype] = obj;\n return new tmpFunc();\n}\nexport function __assignFn(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object[strShimPrototype][strShimHasOwnProperty].call(s, p)) {\n t[p] = s[p];\n }\n }\n }\n\n return t;\n} // tslint:disable-next-line: only-arrow-functions\n\nvar _extendStaticsFn = function __extendStaticsFn(d, b) {\n _extendStaticsFn = Object[\"setPrototypeOf\"] || // tslint:disable-next-line: only-arrow-functions\n {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || // tslint:disable-next-line: only-arrow-functions\n function (d, b) {\n for (var p in b) {\n if (b[strShimHasOwnProperty](p)) {\n d[p] = b[p];\n }\n }\n };\n\n return _extendStaticsFn(d, b);\n};\n\nexport function __extendsFn(d, b) {\n _extendStaticsFn(d, b);\n\n function __() {\n this.constructor = d;\n } // tslint:disable-next-line: ban-comma-operator\n\n\n d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());\n}\nvar globalObj = getGlobal() || {}; // tslint:disable: only-arrow-functions\n\n(function (root, assignFn, extendsFn) {\n // Assign the globally scoped versions of the functions -- used when consuming individual ts files\n // If check is to support NativeScript where these are marked as readonly\n if (!root.__assign) {\n root.__assign = Object.assign || assignFn;\n }\n\n if (!root.__extends) {\n root.__extends = extendsFn;\n }\n})(globalObj, __assignFn, __extendsFn); // Assign local variables that will be used for embedded scenarios, if check is to support NativeScript where these are marked as readonly\n\n\nif (!__assign) {\n __assign = globalObj.__assign;\n}\n\nif (!__extends) {\n __extends = globalObj.__extends;\n}","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var state;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) {\n createNonEnumerableProperty(value, 'name', key);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","import warning from 'tiny-warning';\nimport { createRule } from 'jss';\nvar now = Date.now();\nvar fnValuesNs = \"fnValues\" + now;\nvar fnRuleNs = \"fnStyle\" + ++now;\n\nvar functionPlugin = function functionPlugin() {\n return {\n onCreateRule: function onCreateRule(name, decl, options) {\n if (typeof decl !== 'function') return null;\n var rule = createRule(name, {}, options);\n rule[fnRuleNs] = decl;\n return rule;\n },\n onProcessStyle: function onProcessStyle(style, rule) {\n // We need to extract function values from the declaration, so that we can keep core unaware of them.\n // We need to do that only once.\n // We don't need to extract functions on each style update, since this can happen only once.\n // We don't support function values inside of function rules.\n if (fnValuesNs in rule || fnRuleNs in rule) return style;\n var fnValues = {};\n\n for (var prop in style) {\n var value = style[prop];\n if (typeof value !== 'function') continue;\n delete style[prop];\n fnValues[prop] = value;\n } // $FlowFixMe[prop-missing]\n\n\n rule[fnValuesNs] = fnValues;\n return style;\n },\n onUpdate: function onUpdate(data, rule, sheet, options) {\n var styleRule = rule; // $FlowFixMe[prop-missing]\n\n var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object\n // will be returned from that function.\n\n if (fnRule) {\n // Empty object will remove all currently defined props\n // in case function rule returns a falsy value.\n styleRule.style = fnRule(data) || {};\n\n if (process.env.NODE_ENV === 'development') {\n for (var prop in styleRule.style) {\n if (typeof styleRule.style[prop] === 'function') {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;\n break;\n }\n }\n }\n } // $FlowFixMe[prop-missing]\n\n\n var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.\n\n if (fnValues) {\n for (var _prop in fnValues) {\n styleRule.prop(_prop, fnValues[_prop](data), options);\n }\n }\n }\n };\n};\n\nexport default functionPlugin;","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { RuleList } from 'jss';\nvar at = '@global';\nvar atPrefix = '@global ';\n\nvar GlobalContainerRule = /*#__PURE__*/function () {\n function GlobalContainerRule(key, styles, options) {\n this.type = 'global';\n this.at = at;\n this.rules = void 0;\n this.options = void 0;\n this.key = void 0;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var selector in styles) {\n this.rules.add(selector, styles[selector]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = GlobalContainerRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (rule) this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString() {\n return this.rules.toString();\n };\n\n return GlobalContainerRule;\n}();\n\nvar GlobalPrefixedRule = /*#__PURE__*/function () {\n function GlobalPrefixedRule(key, style, options) {\n this.type = 'global';\n this.at = at;\n this.options = void 0;\n this.rule = void 0;\n this.isProcessed = false;\n this.key = void 0;\n this.key = key;\n this.options = options;\n var selector = key.substr(atPrefix.length);\n this.rule = options.jss.createRule(selector, style, _extends({}, options, {\n parent: this\n }));\n }\n\n var _proto2 = GlobalPrefixedRule.prototype;\n\n _proto2.toString = function toString(options) {\n return this.rule ? this.rule.toString(options) : '';\n };\n\n return GlobalPrefixedRule;\n}();\n\nvar separatorRegExp = /\\s*,\\s*/g;\n\nfunction addScope(selector, scope) {\n var parts = selector.split(separatorRegExp);\n var scoped = '';\n\n for (var i = 0; i < parts.length; i++) {\n scoped += scope + \" \" + parts[i].trim();\n if (parts[i + 1]) scoped += ', ';\n }\n\n return scoped;\n}\n\nfunction handleNestedGlobalContainerRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n var rules = style ? style[at] : null;\n if (!rules) return;\n\n for (var name in rules) {\n sheet.addRule(name, rules[name], _extends({}, options, {\n selector: addScope(name, rule.selector)\n }));\n }\n\n delete style[at];\n}\n\nfunction handlePrefixedGlobalRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n\n for (var prop in style) {\n if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;\n var selector = addScope(prop.substr(at.length), rule.selector);\n sheet.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n delete style[prop];\n }\n}\n/**\n * Convert nested rules to separate, remove them from original styles.\n *\n * @param {Rule} rule\n * @api public\n */\n\n\nfunction jssGlobal() {\n function onCreateRule(name, styles, options) {\n if (!name) return null;\n\n if (name === at) {\n return new GlobalContainerRule(name, styles, options);\n }\n\n if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {\n return new GlobalPrefixedRule(name, styles, options);\n }\n\n var parent = options.parent;\n\n if (parent) {\n if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {\n options.scoped = false;\n }\n }\n\n if (options.scoped === false) {\n options.selector = name;\n }\n\n return null;\n }\n\n function onProcessRule(rule, sheet) {\n if (rule.type !== 'style' || !sheet) return;\n handleNestedGlobalContainerRule(rule, sheet);\n handlePrefixedGlobalRule(rule, sheet);\n }\n\n return {\n onCreateRule: onCreateRule,\n onProcessRule: onProcessRule\n };\n}\n\nexport default jssGlobal;","import _extends from '@babel/runtime/helpers/esm/extends';\nimport warning from 'tiny-warning';\nvar separatorRegExp = /\\s*,\\s*/g;\nvar parentRegExp = /&/g;\nvar refRegExp = /\\$([\\w-]+)/g;\n/**\n * Convert nested rules to separate, remove them from original styles.\n *\n * @param {Rule} rule\n * @api public\n */\n\nfunction jssNested() {\n // Get a function to be used for $ref replacement.\n function getReplaceRef(container, sheet) {\n return function (match, key) {\n var rule = container.getRule(key) || sheet && sheet.getRule(key);\n\n if (rule) {\n rule = rule;\n return rule.selector;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Could not find the referenced rule \\\"\" + key + \"\\\" in \\\"\" + (container.options.meta || container.toString()) + \"\\\".\") : void 0;\n return key;\n };\n }\n\n function replaceParentRefs(nestedProp, parentProp) {\n var parentSelectors = parentProp.split(separatorRegExp);\n var nestedSelectors = nestedProp.split(separatorRegExp);\n var result = '';\n\n for (var i = 0; i < parentSelectors.length; i++) {\n var parent = parentSelectors[i];\n\n for (var j = 0; j < nestedSelectors.length; j++) {\n var nested = nestedSelectors[j];\n if (result) result += ', '; // Replace all & by the parent or prefix & with the parent.\n\n result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + \" \" + nested;\n }\n }\n\n return result;\n }\n\n function getOptions(rule, container, prevOptions) {\n // Options has been already created, now we only increase index.\n if (prevOptions) return _extends({}, prevOptions, {\n index: prevOptions.index + 1 // $FlowFixMe[prop-missing]\n\n });\n var nestingLevel = rule.options.nestingLevel;\n nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;\n\n var options = _extends({}, rule.options, {\n nestingLevel: nestingLevel,\n index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid.\n\n });\n\n delete options.name;\n return options;\n }\n\n function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style') return style;\n var styleRule = rule;\n var container = styleRule.options.parent;\n var options;\n var replaceRef;\n\n for (var prop in style) {\n var isNested = prop.indexOf('&') !== -1;\n var isNestedConditional = prop[0] === '@';\n if (!isNested && !isNestedConditional) continue;\n options = getOptions(styleRule, container, options);\n\n if (isNested) {\n var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for\n // all nested rules within the sheet.\n\n if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs.\n\n selector = selector.replace(refRegExp, replaceRef);\n container.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n } else if (isNestedConditional) {\n // Place conditional right after the parent rule to ensure right ordering.\n container.addRule(prop, {}, options) // Flow expects more options but they aren't required\n // And flow doesn't know this will always be a StyleRule which has the addRule method\n // $FlowFixMe[incompatible-use]\n // $FlowFixMe[prop-missing]\n .addRule(styleRule.key, style[prop], {\n selector: styleRule.selector\n });\n }\n\n delete style[prop];\n }\n\n return style;\n }\n\n return {\n onProcessStyle: onProcessStyle\n };\n}\n\nexport default jssNested;","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g;\nvar msPattern = /^ms-/;\nvar cache = {};\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase();\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name];\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower);\n return cache[name] = msPattern.test(hName) ? '-' + hName : hName;\n}\n\nexport default hyphenateStyleName;","import hyphenate from 'hyphenate-style-name';\n/**\n * Convert camel cased property names to dash separated.\n *\n * @param {Object} style\n * @return {Object}\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n *\n * @param {Rule} rule\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;","import { hasCSSTOMSupport } from 'jss';\nvar px = hasCSSTOMSupport && CSS ? CSS.px : 'px';\nvar ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';\nvar percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';\n/**\n * Generated jss-plugin-default-unit CSS property units\n *\n * @type object\n */\n\nvar defaultUnits = {\n // Animation properties\n 'animation-delay': ms,\n 'animation-duration': ms,\n // Background properties\n 'background-position': px,\n 'background-position-x': px,\n 'background-position-y': px,\n 'background-size': px,\n // Border Properties\n border: px,\n 'border-bottom': px,\n 'border-bottom-left-radius': px,\n 'border-bottom-right-radius': px,\n 'border-bottom-width': px,\n 'border-left': px,\n 'border-left-width': px,\n 'border-radius': px,\n 'border-right': px,\n 'border-right-width': px,\n 'border-top': px,\n 'border-top-left-radius': px,\n 'border-top-right-radius': px,\n 'border-top-width': px,\n 'border-width': px,\n 'border-block': px,\n 'border-block-end': px,\n 'border-block-end-width': px,\n 'border-block-start': px,\n 'border-block-start-width': px,\n 'border-block-width': px,\n 'border-inline': px,\n 'border-inline-end': px,\n 'border-inline-end-width': px,\n 'border-inline-start': px,\n 'border-inline-start-width': px,\n 'border-inline-width': px,\n 'border-start-start-radius': px,\n 'border-start-end-radius': px,\n 'border-end-start-radius': px,\n 'border-end-end-radius': px,\n // Margin properties\n margin: px,\n 'margin-bottom': px,\n 'margin-left': px,\n 'margin-right': px,\n 'margin-top': px,\n 'margin-block': px,\n 'margin-block-end': px,\n 'margin-block-start': px,\n 'margin-inline': px,\n 'margin-inline-end': px,\n 'margin-inline-start': px,\n // Padding properties\n padding: px,\n 'padding-bottom': px,\n 'padding-left': px,\n 'padding-right': px,\n 'padding-top': px,\n 'padding-block': px,\n 'padding-block-end': px,\n 'padding-block-start': px,\n 'padding-inline': px,\n 'padding-inline-end': px,\n 'padding-inline-start': px,\n // Mask properties\n 'mask-position-x': px,\n 'mask-position-y': px,\n 'mask-size': px,\n // Width and height properties\n height: px,\n width: px,\n 'min-height': px,\n 'max-height': px,\n 'min-width': px,\n 'max-width': px,\n // Position properties\n bottom: px,\n left: px,\n top: px,\n right: px,\n inset: px,\n 'inset-block': px,\n 'inset-block-end': px,\n 'inset-block-start': px,\n 'inset-inline': px,\n 'inset-inline-end': px,\n 'inset-inline-start': px,\n // Shadow properties\n 'box-shadow': px,\n 'text-shadow': px,\n // Column properties\n 'column-gap': px,\n 'column-rule': px,\n 'column-rule-width': px,\n 'column-width': px,\n // Font and text properties\n 'font-size': px,\n 'font-size-delta': px,\n 'letter-spacing': px,\n 'text-indent': px,\n 'text-stroke': px,\n 'text-stroke-width': px,\n 'word-spacing': px,\n // Motion properties\n motion: px,\n 'motion-offset': px,\n // Outline properties\n outline: px,\n 'outline-offset': px,\n 'outline-width': px,\n // Perspective properties\n perspective: px,\n 'perspective-origin-x': percent,\n 'perspective-origin-y': percent,\n // Transform properties\n 'transform-origin': percent,\n 'transform-origin-x': percent,\n 'transform-origin-y': percent,\n 'transform-origin-z': percent,\n // Transition properties\n 'transition-delay': ms,\n 'transition-duration': ms,\n // Alignment properties\n 'vertical-align': px,\n 'flex-basis': px,\n // Some random properties\n 'shape-margin': px,\n size: px,\n gap: px,\n // Grid properties\n grid: px,\n 'grid-gap': px,\n 'grid-row-gap': px,\n 'grid-column-gap': px,\n 'grid-template-rows': px,\n 'grid-template-columns': px,\n 'grid-auto-rows': px,\n 'grid-auto-columns': px,\n // Not existing properties.\n // Used to avoid issues with jss-plugin-expand integration.\n 'box-shadow-x': px,\n 'box-shadow-y': px,\n 'box-shadow-blur': px,\n 'box-shadow-spread': px,\n 'font-line-height': px,\n 'text-shadow-x': px,\n 'text-shadow-y': px,\n 'text-shadow-blur': px\n};\n/**\n * Clones the object and adds a camel cased property version.\n */\n\nfunction addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n\n var newObj = {};\n\n for (var _key in obj) {\n newObj[_key] = obj[_key];\n newObj[_key.replace(regExp, replace)] = obj[_key];\n }\n\n return newObj;\n}\n\nvar units = addCamelCasedVersion(defaultUnits);\n/**\n * Recursive deep style passing function\n */\n\nfunction iterate(prop, value, options) {\n if (value == null) return value;\n\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n value[i] = iterate(prop, value[i], options);\n }\n } else if (typeof value === 'object') {\n if (prop === 'fallbacks') {\n for (var innerProp in value) {\n value[innerProp] = iterate(innerProp, value[innerProp], options);\n }\n } else {\n for (var _innerProp in value) {\n value[_innerProp] = iterate(prop + \"-\" + _innerProp, value[_innerProp], options);\n }\n }\n } else if (typeof value === 'number') {\n var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.\n\n if (unit && !(value === 0 && unit === px)) {\n return typeof unit === 'function' ? unit(value).toString() : \"\" + value + unit;\n }\n\n return value.toString();\n }\n\n return value;\n}\n/**\n * Add unit to numeric values.\n */\n\n\nfunction defaultUnit(options) {\n if (options === void 0) {\n options = {};\n }\n\n var camelCasedOptions = addCamelCasedVersion(options);\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n for (var prop in style) {\n style[prop] = iterate(prop, style[prop], camelCasedOptions);\n }\n\n return style;\n }\n\n function onChangeValue(value, prop) {\n return iterate(prop, value, camelCasedOptions);\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default defaultUnit;","import \"core-js/modules/es.array.reduce.js\";\nimport isInBrowser from 'is-in-browser';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray'; // Export javascript style and css style vendor prefixes.\n\nvar js = '';\nvar css = '';\nvar vendor = '';\nvar browser = '';\nvar isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.\n\nif (isInBrowser) {\n // Order matters. We need to check Webkit the last one because\n // other vendors use to add Webkit prefixes to some properties\n var jsCssMap = {\n Moz: '-moz-',\n ms: '-ms-',\n O: '-o-',\n Webkit: '-webkit-'\n };\n\n var _document$createEleme = document.createElement('p'),\n style = _document$createEleme.style;\n\n var testProp = 'Transform';\n\n for (var key in jsCssMap) {\n if (key + testProp in style) {\n js = key;\n css = jsCssMap[key];\n break;\n }\n } // Correctly detect the Edge browser.\n\n\n if (js === 'Webkit' && 'msHyphens' in style) {\n js = 'ms';\n css = jsCssMap.ms;\n browser = 'edge';\n } // Correctly detect the Safari browser.\n\n\n if (js === 'Webkit' && '-apple-trailing-word' in style) {\n vendor = 'apple';\n }\n}\n/**\n * Vendor prefix string for the current browser.\n *\n * @type {{js: String, css: String, vendor: String, browser: String}}\n * @api public\n */\n\n\nvar prefix = {\n js: js,\n css: css,\n vendor: vendor,\n browser: browser,\n isTouch: isTouch\n};\n/**\n * Test if a keyframe at-rule should be prefixed or not\n *\n * @param {String} vendor prefix string for the current browser.\n * @return {String}\n * @api public\n */\n\nfunction supportedKeyframes(key) {\n // Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'\n if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.\n // https://caniuse.com/#search=keyframes\n\n if (prefix.js === 'ms') return key;\n return \"@\" + prefix.css + \"keyframes\" + key.substr(10);\n} // https://caniuse.com/#search=appearance\n\n\nvar appearence = {\n noPrefill: ['appearance'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'appearance') return false;\n if (prefix.js === 'ms') return \"-webkit-\" + prop;\n return prefix.css + prop;\n }\n}; // https://caniuse.com/#search=color-adjust\n\nvar colorAdjust = {\n noPrefill: ['color-adjust'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'color-adjust') return false;\n if (prefix.js === 'Webkit') return prefix.css + \"print-\" + prop;\n return prop;\n }\n};\nvar regExp = /[-\\s]+(.)?/g;\n/**\n * Replaces the letter with the capital letter\n *\n * @param {String} match\n * @param {String} c\n * @return {String}\n * @api private\n */\n\nfunction toUpper(match, c) {\n return c ? c.toUpperCase() : '';\n}\n/**\n * Convert dash separated strings to camel-cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\n\nfunction camelize(str) {\n return str.replace(regExp, toUpper);\n}\n/**\n * Convert dash separated strings to pascal cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\n\nfunction pascalize(str) {\n return camelize(\"-\" + str);\n} // but we can use a longhand property instead.\n// https://caniuse.com/#search=mask\n\n\nvar mask = {\n noPrefill: ['mask'],\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^mask/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var longhand = 'mask-image';\n\n if (camelize(longhand) in style) {\n return prop;\n }\n\n if (prefix.js + pascalize(longhand) in style) {\n return prefix.css + prop;\n }\n }\n\n return prop;\n }\n}; // https://caniuse.com/#search=text-orientation\n\nvar textOrientation = {\n noPrefill: ['text-orientation'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'text-orientation') return false;\n\n if (prefix.vendor === 'apple' && !prefix.isTouch) {\n return prefix.css + prop;\n }\n\n return prop;\n }\n}; // https://caniuse.com/#search=transform\n\nvar transform = {\n noPrefill: ['transform'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transform') return false;\n\n if (options.transform) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n}; // https://caniuse.com/#search=transition\n\nvar transition = {\n noPrefill: ['transition'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transition') return false;\n\n if (options.transition) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n}; // https://caniuse.com/#search=writing-mode\n\nvar writingMode = {\n noPrefill: ['writing-mode'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'writing-mode') return false;\n\n if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n}; // https://caniuse.com/#search=user-select\n\nvar userSelect = {\n noPrefill: ['user-select'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'user-select') return false;\n\n if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n}; // https://caniuse.com/#search=multicolumn\n// https://github.com/postcss/autoprefixer/issues/491\n// https://github.com/postcss/autoprefixer/issues/177\n\nvar breakPropsOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^break-/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var jsProp = \"WebkitColumn\" + pascalize(prop);\n return jsProp in style ? prefix.css + \"column-\" + prop : false;\n }\n\n if (prefix.js === 'Moz') {\n var _jsProp = \"page\" + pascalize(prop);\n\n return _jsProp in style ? \"page-\" + prop : false;\n }\n\n return false;\n }\n}; // See https://github.com/postcss/autoprefixer/issues/324.\n\nvar inlineLogicalOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^(border|margin|padding)-inline/.test(prop)) return false;\n if (prefix.js === 'Moz') return prop;\n var newProp = prop.replace('-inline', '');\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n}; // Camelization is required because we can't test using.\n// CSS syntax for e.g. in FF.\n\nvar unprefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n return camelize(prop) in style ? prop : false;\n }\n};\nvar prefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.\n\n if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.\n\n if (prop[0] === '-' && prop[1] === '-') return prop;\n if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.\n\n if (prefix.js !== 'Webkit' && \"Webkit\" + pascalized in style) return \"-webkit-\" + prop;\n return false;\n }\n}; // https://caniuse.com/#search=scroll-snap\n\nvar scrollSnap = {\n supportedProperty: function supportedProperty(prop) {\n if (prop.substring(0, 11) !== 'scroll-snap') return false;\n\n if (prefix.js === 'ms') {\n return \"\" + prefix.css + prop;\n }\n\n return prop;\n }\n}; // https://caniuse.com/#search=overscroll-behavior\n\nvar overscrollBehavior = {\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'overscroll-behavior') return false;\n\n if (prefix.js === 'ms') {\n return prefix.css + \"scroll-chaining\";\n }\n\n return prop;\n }\n};\nvar propMap = {\n 'flex-grow': 'flex-positive',\n 'flex-shrink': 'flex-negative',\n 'flex-basis': 'flex-preferred-size',\n 'justify-content': 'flex-pack',\n order: 'flex-order',\n 'align-items': 'flex-align',\n 'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.\n\n}; // Support old flex spec from 2012.\n\nvar flex2012 = {\n supportedProperty: function supportedProperty(prop, style) {\n var newProp = propMap[prop];\n if (!newProp) return false;\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\nvar propMap$1 = {\n flex: 'box-flex',\n 'flex-grow': 'box-flex',\n 'flex-direction': ['box-orient', 'box-direction'],\n order: 'box-ordinal-group',\n 'align-items': 'box-align',\n 'flex-flow': ['box-orient', 'box-direction'],\n 'justify-content': 'box-pack'\n};\nvar propKeys = Object.keys(propMap$1);\n\nvar prefixCss = function prefixCss(p) {\n return prefix.css + p;\n}; // Support old flex spec from 2009.\n\n\nvar flex2009 = {\n supportedProperty: function supportedProperty(prop, style, _ref) {\n var multiple = _ref.multiple;\n\n if (propKeys.indexOf(prop) > -1) {\n var newProp = propMap$1[prop];\n\n if (!Array.isArray(newProp)) {\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n\n if (!multiple) return false;\n\n for (var i = 0; i < newProp.length; i++) {\n if (!(prefix.js + pascalize(newProp[0]) in style)) {\n return false;\n }\n }\n\n return newProp.map(prefixCss);\n }\n\n return false;\n }\n}; // plugins = [\n// ...plugins,\n// breakPropsOld,\n// inlineLogicalOld,\n// unprefixed,\n// prefixed,\n// scrollSnap,\n// flex2012,\n// flex2009\n// ]\n// Plugins without 'noPrefill' value, going last.\n// 'flex-*' plugins should be at the bottom.\n// 'flex2009' going after 'flex2012'.\n// 'prefixed' going after 'unprefixed'\n\nvar plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];\nvar propertyDetectors = plugins.filter(function (p) {\n return p.supportedProperty;\n}).map(function (p) {\n return p.supportedProperty;\n});\nvar noPrefill = plugins.filter(function (p) {\n return p.noPrefill;\n}).reduce(function (a, p) {\n a.push.apply(a, _toConsumableArray(p.noPrefill));\n return a;\n}, []);\nvar el;\nvar cache = {};\n\nif (isInBrowser) {\n el = document.createElement('p'); // We test every property on vendor prefix requirement.\n // Once tested, result is cached. It gives us up to 70% perf boost.\n // http://jsperf.com/element-style-object-access-vs-plain-object\n //\n // Prefill cache with known css properties to reduce amount of\n // properties we need to feature test at runtime.\n // http://davidwalsh.name/vendor-prefix\n\n var computed = window.getComputedStyle(document.documentElement, '');\n\n for (var key$1 in computed) {\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];\n } // Properties that cannot be correctly detected using the\n // cache prefill method.\n\n\n noPrefill.forEach(function (x) {\n return delete cache[x];\n });\n}\n/**\n * Test if a property is supported, returns supported property with vendor\n * prefix if required. Returns `false` if not supported.\n *\n * @param {String} prop dash separated\n * @param {Object} [options]\n * @return {String|Boolean}\n * @api public\n */\n\n\nfunction supportedProperty(prop, options) {\n if (options === void 0) {\n options = {};\n } // For server-side rendering.\n\n\n if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {\n return cache[prop];\n } // Check if 'transition' or 'transform' natively supported in browser.\n\n\n if (prop === 'transition' || prop === 'transform') {\n options[prop] = prop in el.style;\n } // Find a plugin for current prefix property.\n\n\n for (var i = 0; i < propertyDetectors.length; i++) {\n cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.\n\n if (cache[prop]) break;\n } // Reset styles for current property.\n // Firefox can even throw an error for invalid properties, e.g., \"0\".\n\n\n try {\n el.style[prop] = '';\n } catch (err) {\n return false;\n }\n\n return cache[prop];\n}\n\nvar cache$1 = {};\nvar transitionProperties = {\n transition: 1,\n 'transition-property': 1,\n '-webkit-transition': 1,\n '-webkit-transition-property': 1\n};\nvar transPropsRegExp = /(^\\s*[\\w-]+)|, (\\s*[\\w-]+)(?![^()]*\\))/g;\nvar el$1;\n/**\n * Returns prefixed value transition/transform if needed.\n *\n * @param {String} match\n * @param {String} p1\n * @param {String} p2\n * @return {String}\n * @api private\n */\n\nfunction prefixTransitionCallback(match, p1, p2) {\n if (p1 === 'var') return 'var';\n if (p1 === 'all') return 'all';\n if (p2 === 'all') return ', all';\n var prefixedValue = p1 ? supportedProperty(p1) : \", \" + supportedProperty(p2);\n if (!prefixedValue) return p1 || p2;\n return prefixedValue;\n}\n\nif (isInBrowser) el$1 = document.createElement('p');\n/**\n * Returns prefixed value if needed. Returns `false` if value is not supported.\n *\n * @param {String} property\n * @param {String} value\n * @return {String|Boolean}\n * @api public\n */\n\nfunction supportedValue(property, value) {\n // For server-side rendering.\n var prefixedValue = value;\n if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.\n // We want only prefixable values here.\n // eslint-disable-next-line no-restricted-globals\n\n if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {\n return prefixedValue;\n } // Create cache key for current value.\n\n\n var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache$1[cacheKey] != null) {\n return cache$1[cacheKey];\n } // IE can even throw an error in some cases, for e.g. style.content = 'bar'.\n\n\n try {\n // Test value as it is.\n el$1.style[property] = prefixedValue;\n } catch (err) {\n // Return false if value not supported.\n cache$1[cacheKey] = false;\n return false;\n } // If 'transition' or 'transition-property' property.\n\n\n if (transitionProperties[property]) {\n prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);\n } else if (el$1.style[property] === '') {\n // Value with a vendor prefix.\n prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert \"flex\" to \"-ms-flexbox\" for IE10.\n\n if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.\n\n el$1.style[property] = prefixedValue; // Return false if value not supported.\n\n if (el$1.style[property] === '') {\n cache$1[cacheKey] = false;\n return false;\n }\n } // Reset styles for current property.\n\n\n el$1.style[property] = ''; // Write current value to cache.\n\n cache$1[cacheKey] = prefixedValue;\n return cache$1[cacheKey];\n}\n\nexport { prefix, supportedKeyframes, supportedProperty, supportedValue };","import { supportedKeyframes, supportedValue, supportedProperty } from 'css-vendor';\nimport { toCssValue } from 'jss';\n/**\n * Add vendor prefix to a property name when needed.\n *\n * @api public\n */\n\nfunction jssVendorPrefixer() {\n function onProcessRule(rule) {\n if (rule.type === 'keyframes') {\n var atRule = rule;\n atRule.at = supportedKeyframes(atRule.at);\n }\n }\n\n function prefixStyle(style) {\n for (var prop in style) {\n var value = style[prop];\n\n if (prop === 'fallbacks' && Array.isArray(value)) {\n style[prop] = value.map(prefixStyle);\n continue;\n }\n\n var changeProp = false;\n var supportedProp = supportedProperty(prop);\n if (supportedProp && supportedProp !== prop) changeProp = true;\n var changeValue = false;\n var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));\n if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;\n\n if (changeProp || changeValue) {\n if (changeProp) delete style[prop];\n style[supportedProp || prop] = supportedValue$1 || value;\n }\n }\n\n return style;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n return prefixStyle(style);\n }\n\n function onChangeValue(value, prop) {\n return supportedValue(prop, toCssValue(value)) || value;\n }\n\n return {\n onProcessRule: onProcessRule,\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default jssVendorPrefixer;","/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;","import functions from 'jss-plugin-rule-value-function';\nimport global from 'jss-plugin-global';\nimport nested from 'jss-plugin-nested';\nimport camelCase from 'jss-plugin-camel-case';\nimport defaultUnit from 'jss-plugin-default-unit';\nimport vendorPrefixer from 'jss-plugin-vendor-prefixer';\nimport propsSort from 'jss-plugin-props-sort'; // Subset of jss-preset-default with only the plugins the Material-UI components are using.\n\nexport default function jssPreset() {\n return {\n plugins: [functions(), global(), nested(), camelCase(), defaultUnit(), // Disable the vendor prefixer server-side, it does nothing.\n // This way, we can get a performance boost.\n // In the documentation, we are using `autoprefixer` to solve this problem.\n typeof window === 'undefined' ? null : vendorPrefixer(), propsSort()]\n };\n}","var isProduction = process.env.NODE_ENV === 'production';\n\nfunction warning(condition, message) {\n if (!isProduction) {\n if (condition) {\n return;\n }\n\n var text = \"Warning: \" + message;\n\n if (typeof console !== 'undefined') {\n console.warn(text);\n }\n\n try {\n throw Error(text);\n } catch (x) {}\n }\n}\n\nexport default warning;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport makeStyles from '../makeStyles';\nimport getThemeProps from '../getThemeProps';\nimport useTheme from '../useTheme'; // Link a style sheet with a component.\n// It does not modify the component passed to it;\n// instead, it returns a new component, with a `classes` property.\n\nvar withStyles = function withStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return function (Component) {\n var defaultTheme = options.defaultTheme,\n _options$withTheme = options.withTheme,\n withTheme = _options$withTheme === void 0 ? false : _options$withTheme,\n name = options.name,\n stylesOptions = _objectWithoutProperties(options, [\"defaultTheme\", \"withTheme\", \"name\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (Component === undefined) {\n throw new Error(['You are calling withStyles(styles)(Component) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n }\n\n var classNamePrefix = name;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = getDisplayName(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var useStyles = makeStyles(stylesOrCreator, _extends({\n defaultTheme: defaultTheme,\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var WithStyles = /*#__PURE__*/React.forwardRef(function WithStyles(props, ref) {\n var classesProp = props.classes,\n innerRef = props.innerRef,\n other = _objectWithoutProperties(props, [\"classes\", \"innerRef\"]); // The wrapper receives only user supplied props, which could be a subset of\n // the actual props Component might receive due to merging with defaultProps.\n // So copying it here would give us the same result in the wrapper as well.\n\n\n var classes = useStyles(_extends({}, Component.defaultProps, props));\n var theme;\n var more = other;\n\n if (typeof name === 'string' || withTheme) {\n // name and withTheme are invariant in the outer scope\n // eslint-disable-next-line react-hooks/rules-of-hooks\n theme = useTheme() || defaultTheme;\n\n if (name) {\n more = getThemeProps({\n theme: theme,\n name: name,\n props: other\n });\n } // Provide the theme to the wrapped component.\n // So we don't have to use the `withTheme()` Higher-order Component.\n\n\n if (withTheme && !more.theme) {\n more.theme = theme;\n }\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: innerRef || ref,\n classes: classes\n }, more));\n });\n process.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithStyles.displayName = \"WithStyles(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithStyles, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // Exposed for test purposes.\n WithStyles.Naked = Component;\n WithStyles.options = options;\n WithStyles.useStyles = useStyles;\n }\n\n return WithStyles;\n };\n};\n\nexport default withStyles;","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","const plugins = require(`./api-runner-browser-plugins`)\nconst {\n getResourcesForPathname,\n getResourcesForPathnameSync,\n getResourceURLsForPathname,\n loadPage,\n loadPageSync,\n} = require(`./loader`).publicLoader\n\nexports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {\n // Hooks for gatsby-cypress's API handler\n if (process.env.CYPRESS_SUPPORT) {\n if (window.___apiHandler) {\n window.___apiHandler(api)\n } else if (window.___resolvedAPIs) {\n window.___resolvedAPIs.push(api)\n } else {\n window.___resolvedAPIs = [api]\n }\n }\n\n let results = plugins.map(plugin => {\n if (!plugin.plugin[api]) {\n return undefined\n }\n\n // Deprecated April 2019. Use `loadPageSync` instead\n args.getResourcesForPathnameSync = getResourcesForPathnameSync\n // Deprecated April 2019. Use `loadPage` instead\n args.getResourcesForPathname = getResourcesForPathname\n args.getResourceURLsForPathname = getResourceURLsForPathname\n args.loadPage = loadPage\n args.loadPageSync = loadPageSync\n\n const result = plugin.plugin[api](args, plugin.options)\n if (result && argTransform) {\n args = argTransform({ args, result, plugin })\n }\n return result\n })\n\n // Filter out undefined results.\n results = results.filter(result => typeof result !== `undefined`)\n\n if (results.length > 0) {\n return results\n } else if (defaultReturn) {\n return [defaultReturn]\n } else {\n return []\n }\n}\n\nexports.apiRunnerAsync = (api, args, defaultReturn) =>\n plugins.reduce(\n (previous, next) =>\n next.plugin[api]\n ? previous.then(() => next.plugin[api](args, next.options))\n : previous,\n Promise.resolve()\n )\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar b = \"function\" === typeof Symbol && Symbol.for,\n c = b ? Symbol.for(\"react.element\") : 60103,\n d = b ? Symbol.for(\"react.portal\") : 60106,\n e = b ? Symbol.for(\"react.fragment\") : 60107,\n f = b ? Symbol.for(\"react.strict_mode\") : 60108,\n g = b ? Symbol.for(\"react.profiler\") : 60114,\n h = b ? Symbol.for(\"react.provider\") : 60109,\n k = b ? Symbol.for(\"react.context\") : 60110,\n l = b ? Symbol.for(\"react.async_mode\") : 60111,\n m = b ? Symbol.for(\"react.concurrent_mode\") : 60111,\n n = b ? Symbol.for(\"react.forward_ref\") : 60112,\n p = b ? Symbol.for(\"react.suspense\") : 60113,\n q = b ? Symbol.for(\"react.suspense_list\") : 60120,\n r = b ? Symbol.for(\"react.memo\") : 60115,\n t = b ? Symbol.for(\"react.lazy\") : 60116,\n v = b ? Symbol.for(\"react.block\") : 60121,\n w = b ? Symbol.for(\"react.fundamental\") : 60117,\n x = b ? Symbol.for(\"react.responder\") : 60118,\n y = b ? Symbol.for(\"react.scope\") : 60119;\n\nfunction z(a) {\n if (\"object\" === typeof a && null !== a) {\n var u = a.$$typeof;\n\n switch (u) {\n case c:\n switch (a = a.type, a) {\n case l:\n case m:\n case e:\n case g:\n case f:\n case p:\n return a;\n\n default:\n switch (a = a && a.$$typeof, a) {\n case k:\n case n:\n case t:\n case r:\n case h:\n return a;\n\n default:\n return u;\n }\n\n }\n\n case d:\n return u;\n }\n }\n}\n\nfunction A(a) {\n return z(a) === m;\n}\n\nexports.AsyncMode = l;\nexports.ConcurrentMode = m;\nexports.ContextConsumer = k;\nexports.ContextProvider = h;\nexports.Element = c;\nexports.ForwardRef = n;\nexports.Fragment = e;\nexports.Lazy = t;\nexports.Memo = r;\nexports.Portal = d;\nexports.Profiler = g;\nexports.StrictMode = f;\nexports.Suspense = p;\n\nexports.isAsyncMode = function (a) {\n return A(a) || z(a) === l;\n};\n\nexports.isConcurrentMode = A;\n\nexports.isContextConsumer = function (a) {\n return z(a) === k;\n};\n\nexports.isContextProvider = function (a) {\n return z(a) === h;\n};\n\nexports.isElement = function (a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === c;\n};\n\nexports.isForwardRef = function (a) {\n return z(a) === n;\n};\n\nexports.isFragment = function (a) {\n return z(a) === e;\n};\n\nexports.isLazy = function (a) {\n return z(a) === t;\n};\n\nexports.isMemo = function (a) {\n return z(a) === r;\n};\n\nexports.isPortal = function (a) {\n return z(a) === d;\n};\n\nexports.isProfiler = function (a) {\n return z(a) === g;\n};\n\nexports.isStrictMode = function (a) {\n return z(a) === f;\n};\n\nexports.isSuspense = function (a) {\n return z(a) === p;\n};\n\nexports.isValidElementType = function (a) {\n return \"string\" === typeof a || \"function\" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || \"object\" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);\n};\n\nexports.typeOf = z;","import nested from '../ThemeProvider/nested';\n/**\n * This is the list of the style rule name we use as drop in replacement for the built-in\n * pseudo classes (:checked, :disabled, :focused, etc.).\n *\n * Why do they exist in the first place?\n * These classes are used at a specificity of 2.\n * It allows them to override previously definied styles as well as\n * being untouched by simple user overrides.\n */\n\nvar pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; // Returns a function which generates unique class names based on counters.\n// When new generator function is created, rule counter is reset.\n// We need to reset the rule counter for SSR for each request.\n//\n// It's inspired by\n// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js\n\nexport default function createGenerateClassName() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$disableGloba = options.disableGlobal,\n disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba,\n _options$productionPr = options.productionPrefix,\n productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr,\n _options$seed = options.seed,\n seed = _options$seed === void 0 ? '' : _options$seed;\n var seedPrefix = seed === '' ? '' : \"\".concat(seed, \"-\");\n var ruleCounter = 0;\n\n var getNextCounterId = function getNextCounterId() {\n ruleCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (ruleCounter >= 1e10) {\n console.warn(['Material-UI: You might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join(''));\n }\n }\n\n return ruleCounter;\n };\n\n return function (rule, styleSheet) {\n var name = styleSheet.options.name; // Is a global static MUI style?\n\n if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) {\n // We can use a shorthand class name, we never use the keys to style the components.\n if (pseudoClasses.indexOf(rule.key) !== -1) {\n return \"Mui-\".concat(rule.key);\n }\n\n var prefix = \"\".concat(seedPrefix).concat(name, \"-\").concat(rule.key);\n\n if (!styleSheet.options.theme[nested] || seed !== '') {\n return prefix;\n }\n\n return \"\".concat(prefix, \"-\").concat(getNextCounterId());\n }\n\n if (process.env.NODE_ENV === 'production') {\n return \"\".concat(seedPrefix).concat(productionPrefix).concat(getNextCounterId());\n }\n\n var suffix = \"\".concat(rule.key, \"-\").concat(getNextCounterId()); // Help with debuggability.\n\n if (styleSheet.options.classNamePrefix) {\n return \"\".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, \"-\").concat(suffix);\n }\n\n return \"\".concat(seedPrefix).concat(suffix);\n };\n}","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj[\"default\"] = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nmodule.exports = _interopRequireWildcard;","module.exports = null","\"use strict\";\n\nexports.__esModule = true;\nexports.SessionStorage = void 0;\nvar STATE_KEY_PREFIX = \"@@scroll|\";\nvar GATSBY_ROUTER_SCROLL_STATE = \"___GATSBY_REACT_ROUTER_SCROLL\";\n\nvar SessionStorage = /*#__PURE__*/function () {\n function SessionStorage() {}\n\n var _proto = SessionStorage.prototype;\n\n _proto.read = function read(location, key) {\n var stateKey = this.getStateKey(location, key);\n\n try {\n var value = window.sessionStorage.getItem(stateKey);\n return value ? JSON.parse(value) : 0;\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.\");\n }\n\n if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {\n return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];\n }\n\n return 0;\n }\n };\n\n _proto.save = function save(location, key, value) {\n var stateKey = this.getStateKey(location, key);\n var storedValue = JSON.stringify(value);\n\n try {\n window.sessionStorage.setItem(stateKey, storedValue);\n } catch (e) {\n if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n } else {\n window[GATSBY_ROUTER_SCROLL_STATE] = {};\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.\");\n }\n }\n };\n\n _proto.getStateKey = function getStateKey(location, key) {\n var stateKeyBase = \"\" + STATE_KEY_PREFIX + location.pathname;\n return key === null || typeof key === \"undefined\" ? stateKeyBase : stateKeyBase + \"|\" + key;\n };\n\n return SessionStorage;\n}();\n\nexports.SessionStorage = SessionStorage;","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport React from 'react';\nimport { SheetsRegistry } from 'jss';\nimport StylesProvider from '../StylesProvider';\nimport createGenerateClassName from '../createGenerateClassName';\n\nvar ServerStyleSheets = /*#__PURE__*/function () {\n function ServerStyleSheets() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, ServerStyleSheets);\n\n this.options = options;\n }\n\n _createClass(ServerStyleSheets, [{\n key: \"collect\",\n value: function collect(children) {\n // This is needed in order to deduplicate the injection of CSS in the page.\n var sheetsManager = new Map(); // This is needed in order to inject the critical CSS.\n\n this.sheetsRegistry = new SheetsRegistry(); // A new class name generator\n\n var generateClassName = createGenerateClassName();\n return /*#__PURE__*/React.createElement(StylesProvider, _extends({\n sheetsManager: sheetsManager,\n serverGenerateClassName: generateClassName,\n sheetsRegistry: this.sheetsRegistry\n }, this.options), children);\n }\n }, {\n key: \"toString\",\n value: function toString() {\n return this.sheetsRegistry ? this.sheetsRegistry.toString() : '';\n }\n }, {\n key: \"getStyleElement\",\n value: function getStyleElement(props) {\n return /*#__PURE__*/React.createElement('style', _extends({\n id: 'jss-server-side',\n key: 'jss-server-side',\n dangerouslySetInnerHTML: {\n __html: this.toString()\n }\n }, props));\n }\n }]);\n\n return ServerStyleSheets;\n}();\n\nexport { ServerStyleSheets as default };","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\n\nvar defineProperty = Object.defineProperty;\nvar cache = {};\n\nvar thrower = function (it) { throw it; };\n\nmodule.exports = function (METHOD_NAME, options) {\n if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];\n if (!options) options = {};\n var method = [][METHOD_NAME];\n var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;\n var argument0 = has(options, 0) ? options[0] : thrower;\n var argument1 = has(options, 1) ? options[1] : undefined;\n\n return cache[METHOD_NAME] = !!method && !fails(function () {\n if (ACCESSORS && !DESCRIPTORS) return true;\n var O = { length: -1 };\n\n if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });\n else O[1] = 1;\n\n method.call(O, argument0, argument1);\n });\n};\n"],"sourceRoot":""}