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EAAAA,GAAKC,EAAAA,UAAkBkO,IAAkB1E,GAG5D,OACElM,EAAAA,cAAAA,MAAAA,CAAKsC,WAAWG,EAAAA,EAAAA,GAAKC,EAAAA,KAAaN,GAAQM,EAAON,GAAOuO,KACpDG,GAAmBC,EACrB/Q,EAAAA,cAAAA,MAAAA,CAAKsC,WAAWG,EAAAA,EAAAA,GAAKC,EAAAA,UAAkBmO,IAAkBjN,GACxDkN,GAAmBC,K,yFCnC1B,EAA4B,0BCI5B,MAAMC,EAAS1Q,IACb,MAAM,SAAEsB,EAAF,cAAYqP,GAAkB3Q,EAEpC,OACEN,EAAAA,cAAAA,KAAAA,CAAIsC,UAAY,GAAEI,KAAoBuO,GAAiB,MACpDjR,EAAAA,SAAAA,IACC4B,GACCsP,GAAWA,GAASlR,EAAAA,cAAAA,KAAAA,CAAIgM,IAAKkF,EAAMhF,OAAQgF,IAAgB,OAMpEF,EAAM/P,UAAY,CAChBW,SAAUV,IAAAA,KAAAA,WACV+P,cAAe/P,IAAAA,QAGjB8P,EAAMjQ,aAAe,CACnBkQ,cAAe,MAGjB,S","sources":["webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/react-hooks/src/use-safe-state/useSafeState.hook.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/NavigationProfileHighlightedMedium.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/BadgesMulticolorSuperuserSmall.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/BadgesMulticolorSummitSmall.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/BadgesMulticolorProSmall.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/BadgesMulticolorVerifiedSmall.js","webpack://StravaModern/./node_modules/@strava/ui/Avatar/Avatar.module.scss?3ebc","webpack://StravaModern/./node_modules/@strava/ui/Avatar/Avatar.tsx","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/now.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/_trimmedEndIndex.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/_baseTrim.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/isSymbol.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/toNumber.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/debounce.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/throttle.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/area.module.scss?1347","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Area.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/axis.module.scss?8da9","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Axis.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Tooltip/styles.module.scss?cba6","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Tooltip/index.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/styles.module.scss?3232","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/index.js","webpack://StravaModern/./node_modules/@strava/ui/Stat/Stat.module.scss?3051","webpack://StravaModern/./node_modules/@strava/ui/Stat/Stat.tsx","webpack://StravaModern/./node_modules/@strava/ui/Stats/styles.module.scss?4754","webpack://StravaModern/./node_modules/@strava/ui/Stats/index.js"],"sourcesContent":["import { useRef, useCallback, useEffect, useState } from 'react';\n\n/**\n * The `useSafeState` hook acts the same as React's `useState`,\n * where we can set the initial state, and it returns (1) the current state,\n * and (2) the state setter.\n *\n * But with `useSafeState`, it will only set the state when the component is mounted\n * in order to prevent memory leaks and avoid this warning:\n * \"Warning: Can’t perform a React state update on an unmounted component.\"\n * When a component is unmounted, we don't want to set the state.\n *\n * This helps when we have async behavior where we call an async API call,\n * then based on the async response, we set the state. But if the component\n * unmounts before the API call resolves, we don't want to set the state.\n * */\nexport const useSafeState = (initialState) => {\n const mountedRef = useRef(false);\n const [state, setState] = useState(initialState);\n\n useEffect(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n const setSafeState = useCallback(\n (args) => (mountedRef.current ? setState(args) : () => {}),\n []\n );\n\n return [state, setSafeState];\n};\n\nexport default useSafeState;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgNavigationProfileHighlightedMedium = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n )\n);\nSvgNavigationProfileHighlightedMedium.defaultProps = {\n color: \"currentColor\",\n size: 32,\n title: undefined,\n titleId: undefined,\n};\nSvgNavigationProfileHighlightedMedium.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgNavigationProfileHighlightedMedium;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgBadgesMulticolorSuperuserSmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n \n \n \n \n )\n);\nSvgBadgesMulticolorSuperuserSmall.defaultProps = {\n color: \"currentColor\",\n size: 24,\n title: undefined,\n titleId: undefined,\n};\nSvgBadgesMulticolorSuperuserSmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgBadgesMulticolorSuperuserSmall;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgBadgesMulticolorSummitSmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n \n \n \n \n )\n);\nSvgBadgesMulticolorSummitSmall.defaultProps = {\n color: \"currentColor\",\n size: 24,\n title: undefined,\n titleId: undefined,\n};\nSvgBadgesMulticolorSummitSmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgBadgesMulticolorSummitSmall;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgBadgesMulticolorProSmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n \n \n \n \n )\n);\nSvgBadgesMulticolorProSmall.defaultProps = {\n color: \"currentColor\",\n size: 24,\n title: undefined,\n titleId: undefined,\n};\nSvgBadgesMulticolorProSmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgBadgesMulticolorProSmall;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgBadgesMulticolorVerifiedSmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n);\nSvgBadgesMulticolorVerifiedSmall.defaultProps = {\n color: \"currentColor\",\n size: 24,\n title: undefined,\n titleId: undefined,\n};\nSvgBadgesMulticolorVerifiedSmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgBadgesMulticolorVerifiedSmall;\n","// extracted by mini-css-extract-plugin\nexport default {\"avatar\":\"Avatar--avatar--EjA+i\",\"imgWrapper\":\"Avatar--imgWrapper--no4rK\",\"badge\":\"Avatar--badge--AGhgx\",\"athlete\":\"Avatar--athlete--swByo\",\"xsmall\":\"Avatar--xsmall--ooxrp\",\"small\":\"Avatar--small--d-InS\",\"large\":\"Avatar--large--yUfy1\",\"xlarge\":\"Avatar--xlarge--Yt5UL\",\"club\":\"Avatar--club--HMeLa\",\"default\":\"Avatar--default--cRgUh\"};","import React, { useEffect } from 'react';\nimport { useSafeState } from '@strava/react-hooks/src/use-safe-state';\nimport AvatarFallback from '@strava/icons/NavigationProfileHighlightedMedium';\nimport EmployeeBadge from '@strava/icons/BadgesMulticolorSuperuserSmall';\nimport SubscriberBadge from '@strava/icons/BadgesMulticolorSummitSmall';\nimport ProBadge from '@strava/icons/BadgesMulticolorProSmall';\nimport VerifiedBadge from '@strava/icons/BadgesMulticolorVerifiedSmall';\nimport clsx from '../clsx';\n\nimport styles from './Avatar.module.scss';\n\ninterface ImgProps {\n src: string;\n alt: string;\n title: string;\n fallback?: React.ReactNode;\n}\n\nconst Img = ({ src, alt, title, fallback = null }: ImgProps) => {\n const [children, setChildren] = useSafeState(\n {alt}\n );\n\n useEffect(() => {\n let image: HTMLImageElement | null = new Image();\n image.onload = () => {\n setChildren({alt});\n };\n image.onerror = () => {\n setChildren(fallback);\n };\n image.src = src;\n return () => {\n image = null;\n };\n }, [src, alt, title, fallback]);\n\n return <>{children};\n};\n\nfunction getBadge(badge: string) {\n switch (badge) {\n case 'ambassador':\n return ;\n case 'employee':\n return ;\n case 'subscriber':\n case 'premium':\n return ;\n case 'pro':\n return ;\n case 'verified':\n return ;\n default:\n return null;\n }\n}\n\nexport type AvatarType = 'athlete' | 'club';\nexport type AvatarSize = 'xsmall' | 'small' | 'default' | 'large' | 'xlarge';\nexport type AvatarBadge =\n | '' // in some cases active has member_type as empty string for default users\n | 'ambassador'\n | 'employee'\n | 'subscriber'\n | 'premium' // legacy name referring to 'subscriber', used in active\n | 'pro'\n | 'verified';\n\ninterface BaseAvatarProps {\n src: string;\n type: AvatarType;\n name?: string;\n alt?: string;\n title?: string;\n size?: AvatarSize;\n badge?: AvatarBadge;\n className?: string;\n}\n\ntype AnchorProps = React.ComponentPropsWithoutRef<'a'> & {\n href?: string;\n};\ntype DivProps = React.ComponentPropsWithoutRef<'div'> & {\n href?: never;\n};\n\n// Guard to check if href exists in props\nconst hasHref = (props: AnchorProps | DivProps): props is AnchorProps =>\n 'href' in props;\n\ntype AvatarProps = BaseAvatarProps & (AnchorProps | DivProps);\n\n/**\n * Prop Deprecation Warning: We are slowly deprecating the `name` prop in favor of the `title` prop\n * so that the React props match up to the element's attribute.\n * */\nconst Avatar = ({\n name = '',\n alt = '',\n title,\n type,\n src,\n size,\n badge,\n className,\n ...otherProps\n}: AvatarProps) => {\n const classNames = clsx([\n styles.avatar,\n styles[type],\n className,\n size && styles[size]\n ]);\n\n // TODO: uncomment when existing Avatar usage is refactored. Otherwise, there will be a lot of warning in the console.\n // if (name || process.env.NODE_ENV !== 'production') {\n // console.warn(\n // '[Prop Deprecation Warning] Deprecating the `name` prop in favor of the `title`.'\n // );\n // }\n\n const children = (\n <>\n {badge &&
{getBadge(badge)}
}\n
\n : null}\n />\n
\n \n );\n\n if (hasHref(otherProps)) {\n return (\n \n {children}\n \n );\n }\n\n return (\n \n {children}\n \n );\n};\n\nexport default Avatar;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","import debounce from './debounce.js';\nimport isObject from './isObject.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nexport default throttle;\n","// extracted by mini-css-extract-plugin\nexport default {\"area\":\"ElevationChart--area--rQlaC\"};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { area } from 'd3-shape';\nimport styles from './area.module.scss';\n\nconst Area = ({ stream, xScale, yScale, height, clipPath, fill }) => {\n const formatData = stream.convertedElevation.map((elev, index) => ({\n elev,\n dist: stream.convertedDistance[index]\n }));\n\n const drawArea = area()\n .x((d) => xScale(d.dist))\n .y1((d) => yScale(d.elev))\n .y0(height);\n\n return (\n \n \n \n );\n};\n\nArea.propTypes = {\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n height: PropTypes.number.isRequired,\n stream: PropTypes.shape().isRequired,\n clipPath: PropTypes.string,\n fill: PropTypes.string\n};\n\nArea.defaultProps = {\n clipPath: null,\n fill: 'rgba(100, 100, 100, 0.66)'\n};\n\nexport default Area;\n","// extracted by mini-css-extract-plugin\nexport default {\"axis\":\"ElevationChart--axis--kmMnQ\",\"yAxis\":\"ElevationChart--yAxis--ZTl9K\",\"xAxis\":\"ElevationChart--xAxis--Md58V\"};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { axisBottom, axisLeft } from 'd3-axis';\nimport { select } from 'd3-selection';\nimport styles from './axis.module.scss';\n\nclass Axis extends React.Component {\n xAxisNode = React.createRef();\n\n yAxisNode = React.createRef();\n\n componentDidMount() {\n this.drawAxes();\n }\n\n componentDidUpdate(prevProps) {\n const { scopeTo, width, xScale, yScale } = this.props;\n\n const hasScopeChanged =\n scopeTo &&\n (prevProps.scopeTo[0] !== scopeTo[0] ||\n prevProps.scopeTo[1] !== scopeTo[1]);\n\n const hasScaleChanged =\n !this.scalesAreEqual(xScale, prevProps.xScale) ||\n !this.scalesAreEqual(yScale, prevProps.yScale);\n\n const hasWidthChanged = prevProps.width !== width;\n\n if (hasScopeChanged || hasWidthChanged || hasScaleChanged) {\n this.drawAxes();\n }\n }\n\n scalesAreEqual = (scaleA, scaleB) => {\n return scaleA\n .domain()\n .every((domainElement) => scaleB.domain().includes(domainElement));\n };\n\n drawAxes() {\n const { xScale, yScale, width, formatters } = this.props;\n const { elevationFormatter, distanceFormatter } = formatters;\n const xAxis = axisBottom(xScale);\n const yAxis = axisLeft(yScale);\n const xTickCount = width > 480 ? 8 : 4;\n\n yAxis\n .ticks(4)\n .tickSize(-width)\n .tickFormat((e) =>\n // As e here is converted/formatted value we need to unconver it\n // so that the value does not get converted twice.\n elevationFormatter.formatShort(e / elevationFormatter.convert(1.0))\n );\n\n xAxis.ticks(xTickCount).tickFormat((d) =>\n // As d here is converted/formatted value we need to unconver it\n // so that the value does not get converted twice.\n distanceFormatter.formatShort(d / distanceFormatter.convert(1.0))\n );\n\n yAxis(select(this.yAxisNode.current));\n xAxis(select(this.xAxisNode.current));\n }\n\n render() {\n const { height } = this.props;\n\n return (\n <>\n \n \n \n );\n }\n}\n\nexport default Axis;\n\nAxis.propTypes = {\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n height: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired,\n formatters: PropTypes.shape().isRequired,\n scopeTo: PropTypes.arrayOf(PropTypes.number)\n};\n\nAxis.defaultProps = {\n scopeTo: null\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"group\":\"Tooltip--group--+mCJX\",\"infoBox\":\"Tooltip--infoBox--QnbSw\",\"value\":\"Tooltip--value--RmlpA\"};","import React, { useLayoutEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport styles from './styles.module.scss';\n\nconst Tooltip = ({ content, position, clipPath, chartWidth, chartMargin }) => {\n const textRef = useRef([]);\n const [boxWidth, setBoxWidth] = useState(120);\n const padding = 6;\n const lineHeight = 16;\n\n const rightBound = position + boxWidth + padding * 2;\n const currBoxAlign =\n rightBound >= chartWidth ? chartWidth - rightBound + padding : padding;\n\n useLayoutEffect(() => {\n if (textRef.current && Object.keys(content).length !== 0) {\n const widths = textRef.current.map(\n (el) => el.getBoundingClientRect().width\n );\n const maxWidth = Math.max(...widths);\n const newSize = Math.round(maxWidth + padding * 2);\n if (boxWidth !== newSize) {\n setBoxWidth(newSize);\n }\n }\n }, [content, boxWidth]);\n\n const InfoBox = () => {\n const keys = Object.keys(content);\n const contentLength = keys.length;\n const boxHeight = contentLength * lineHeight + padding + 2;\n\n return (\n \n \n {keys.map((stat, index) => {\n const contentItem = content[stat];\n\n function setRef(el) {\n textRef.current[index] = el;\n }\n\n return (\n \n {contentItem.label}\n \n {contentItem.value}\n \n \n );\n })}\n \n );\n };\n\n return (\n \n \n \n \n );\n};\n\nexport default Tooltip;\n\nTooltip.propTypes = {\n content: PropTypes.shape().isRequired,\n position: PropTypes.number.isRequired,\n clipPath: PropTypes.string.isRequired,\n chartWidth: PropTypes.number.isRequired,\n chartMargin: PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n }).isRequired\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"hitbox\":\"ElevationChart--hitbox--JJmeG\",\"marker\":\"ElevationChart--marker--dn-WA\"};","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { scaleLinear } from 'd3-scale';\nimport { max, min, bisectLeft } from 'd3-array';\nimport { throttle } from 'lodash-es';\nimport { color } from '@strava/ui-tokens/js';\nimport Area from './Area';\nimport Axis from './Axis';\nimport Tooltip from './Tooltip';\nimport styles from './styles.module.scss';\n\nclass ElevationChart extends Component {\n state = {\n stream: null,\n xScale: null,\n yScale: null,\n height: 0,\n width: 0,\n markerPosition: this.props.margin.left,\n tooltipContent: {}\n };\n\n container = React.createRef();\n\n formatters = null;\n\n node = React.createRef();\n\n hitbox = React.createRef();\n\n handleResize = throttle(() => {\n this.buildScales();\n }, 250);\n\n componentDidMount() {\n window.addEventListener('resize', this.handleResize);\n this.updateFormatters();\n this.buildScales();\n }\n\n componentDidUpdate({\n elevation: prevElevation,\n distance: prevDistance,\n units: prevUnits\n }) {\n const { distance, elevation, units } = this.props;\n const elevationChanged = prevElevation.length !== elevation.length;\n const distanceChanged = prevDistance.length !== distance.length;\n const unitsChanged = prevUnits !== units;\n\n if (unitsChanged) {\n this.updateFormatters();\n }\n\n if (elevationChanged || distanceChanged || unitsChanged) {\n this.buildScales();\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.handleResize);\n }\n\n // TODO: hover got really slow on long streams\n updateMarker = (e) => {\n const {\n onUpdateMarker,\n tooltipDistanceLabel,\n tooltipElevationLabel,\n tooltipGradeLabel\n } = this.props;\n const { xScale, stream } = this.state;\n const { elevationFormatter, distanceFormatter } = this.formatters;\n const bounds = this.hitbox.current.getBoundingClientRect();\n const cursorPosition = e.clientX - bounds.left;\n const markerPosition = cursorPosition;\n const distCursor = xScale.invert(cursorPosition);\n const streamIndex = bisectLeft(stream.convertedDistance, distCursor);\n\n const tooltipContent = {\n distance: {\n label: tooltipDistanceLabel,\n value: distanceFormatter.formatShort(stream.distance[streamIndex])\n },\n elevation: {\n label: tooltipElevationLabel,\n value: elevationFormatter.formatShort(stream.elevation[streamIndex])\n },\n grade: {\n label: tooltipGradeLabel,\n value: this.gradeAtIndex(streamIndex)\n }\n };\n\n onUpdateMarker(streamIndex, {\n // distCursor at this point will be in kilometers or miles so convert distance back to meters\n // as stream.distance is in meters so we want to be consistent\n distance: distCursor / distanceFormatter.convert(1)\n });\n\n this.setState({\n markerPosition,\n tooltipContent\n });\n };\n\n handleMouseLeave = (e) => {\n const { onUpdateMarker, onMouseLeave } = this.props;\n onUpdateMarker(null, { distance: null });\n onMouseLeave(e);\n };\n\n updateFormatters() {\n const { units, formatters } = this.props;\n\n this.formatters = {\n elevationFormatter: new formatters.ElevationFormatter(units),\n distanceFormatter: new formatters.DistanceFormatter(units),\n gradePercentFormatter: new formatters.PercentFormatter()\n };\n }\n\n buildScales() {\n const { margin, height: heightProp, elevation, distance } = this.props;\n const { elevationFormatter, distanceFormatter } = this.formatters;\n\n const convertedElevation = elevation.map((elev) =>\n elevationFormatter.convert(elev)\n );\n const convertedDistance = distance.map((dist) =>\n distanceFormatter.convert(dist)\n );\n\n const width =\n this.container.current.offsetWidth - margin.left - margin.right;\n const height = heightProp - margin.top - margin.bottom;\n const yMax = max(convertedElevation);\n const yMin = min(convertedElevation);\n const xScale = scaleLinear().range([0, width]);\n const yScale = scaleLinear().range([height, 0]);\n\n xScale.domain([0, max(convertedDistance)]);\n yScale.domain([yMin, yMax + yMax * 0.02]);\n\n this.setState({\n height,\n width,\n xScale,\n yScale,\n stream: { elevation, convertedElevation, distance, convertedDistance }\n });\n }\n\n gradeAtIndex(index) {\n // Taken from charts.js: 1689 but extending the window to 5 data points\n const { stream } = this.state;\n const { gradePercentFormatter } = this.formatters;\n const { elevation, distance } = stream;\n const maxIndex = distance.length - 1;\n const threshold = 2;\n\n let streamIndex = index;\n\n if (streamIndex < threshold) {\n streamIndex = threshold;\n }\n if (maxIndex - streamIndex < threshold) {\n streamIndex = maxIndex - threshold;\n }\n\n const distanceDiff =\n distance[streamIndex + threshold] - distance[streamIndex - threshold];\n const elevationDiff =\n elevation[streamIndex + threshold] - elevation[streamIndex - threshold];\n const grade = (elevationDiff * 100) / distanceDiff;\n\n return gradePercentFormatter.formatShort(grade);\n }\n\n scopeTo() {\n const { scopeTo } = this.props;\n const { stream, xScale, yScale } = this.state;\n\n if (!stream || !scopeTo) {\n return;\n }\n\n const start = scopeTo[0];\n const end = scopeTo[1];\n\n // Taken from directory/ElevationChart.js.coffee: 263\n const range = end - start;\n // the padding on each side of the selected area should ideally be\n // 1/3 of the area itself, but this can't be the case if the start\n // or the end are too close to the edges\n const padding = parseInt(range / 3, 10);\n const enoughSpaceAtStart = start - padding <= 0;\n const enoughSpaceAtEnd = end + padding > stream.distance.length - 1;\n\n const paddedStart = enoughSpaceAtStart\n ? parseInt(start / 3, 10)\n : start - padding;\n\n const paddedEnd = enoughSpaceAtEnd\n ? parseInt(end + (stream.distance.length - 1 - end) / 3, 10)\n : end + padding;\n\n xScale.domain([\n stream.convertedDistance[paddedStart],\n stream.convertedDistance[paddedEnd]\n ]);\n\n const croppedElevationStream = stream.convertedElevation.slice(\n paddedStart,\n paddedEnd + 1\n );\n const yMax = max(croppedElevationStream);\n const yMin = min(croppedElevationStream);\n\n yScale.domain([yMin, yMax + yMax * 0.02]);\n }\n\n render() {\n const { margin, scopeTo, scopeColor, highlightArea, highlightAreaColor } =\n this.props;\n const {\n stream,\n xScale,\n yScale,\n width,\n height,\n markerPosition,\n tooltipContent\n } = this.state;\n\n if (scopeTo) this.scopeTo();\n\n return (\n
\n {height > 0 && width > 0 && (\n \n \n \n\n \n\n {scopeTo && (\n \n )}\n\n {highlightArea && (\n \n )}\n\n \n \n \n\n \n \n \n \n \n \n )}\n
\n );\n }\n}\n\nElevationChart.propTypes = {\n height: PropTypes.number.isRequired,\n elevation: PropTypes.arrayOf(PropTypes.number).isRequired,\n distance: PropTypes.arrayOf(PropTypes.number).isRequired,\n units: PropTypes.string.isRequired,\n margin: PropTypes.shape({\n top: PropTypes.number.isRequired,\n right: PropTypes.number.isRequired,\n bottom: PropTypes.number.isRequired,\n left: PropTypes.number.isRequired\n }),\n scopeTo: PropTypes.arrayOf(PropTypes.number),\n scopeColor: PropTypes.string,\n highlightArea: PropTypes.arrayOf(PropTypes.number),\n highlightAreaColor: PropTypes.string,\n onUpdateMarker: PropTypes.func,\n onMouseLeave: PropTypes.func,\n formatters: PropTypes.shape().isRequired,\n tooltipDistanceLabel: PropTypes.string,\n tooltipElevationLabel: PropTypes.string,\n tooltipGradeLabel: PropTypes.string\n};\n\nElevationChart.defaultProps = {\n margin: {\n top: 10,\n right: 24,\n bottom: 20,\n left: 45\n },\n scopeTo: null,\n scopeColor: 'rgb(23, 90, 189)',\n highlightArea: null,\n highlightAreaColor: color.colorCoreO3,\n onUpdateMarker: () => null,\n onMouseLeave: () => null,\n tooltipDistanceLabel: 'Distance',\n tooltipElevationLabel: 'Elevation',\n tooltipGradeLabel: 'Grade'\n};\n\nexport default ElevationChart;\n","// extracted by mini-css-extract-plugin\nexport default {\"stat\":\"Stat--stat--7Qurd\",\"statLabel\":\"Stat--statLabel--qWLL-\",\"statValue\":\"Stat--statValue--7eWuL\",\"stat-xs\":\"Stat--stat-xs--svVNE\",\"statXs\":\"Stat--stat-xs--svVNE\",\"stat-sm\":\"Stat--stat-sm--7BLLi\",\"statSm\":\"Stat--stat-sm--7BLLi\",\"stat-lg\":\"Stat--stat-lg--bYBGt\",\"statLg\":\"Stat--stat-lg--bYBGt\",\"stat-xl\":\"Stat--stat-xl--GtHFn\",\"statXl\":\"Stat--stat-xl--GtHFn\"};","import React, { ReactNode } from 'react';\n\nimport styles from './Stat.module.scss';\n\nimport clsx from '../clsx';\n\nexport const StatTypes = ['stat-xs', 'stat-sm', 'stat-lg', 'stat-xl'] as const;\ntype StatTypesType = (typeof StatTypes)[number];\n\ninterface StatProps {\n value: string | number | ReactNode;\n label: string;\n type?: StatTypesType;\n wrapperClassName?: string;\n labelClassName?: string;\n valueClassName?: string;\n labelAfterValue?: boolean;\n}\n\nconst Stat = ({\n value,\n label,\n type,\n wrapperClassName,\n labelClassName,\n valueClassName,\n labelAfterValue = false\n}: StatProps) => {\n const labelElement = (\n {label}\n );\n\n return (\n
\n {!labelAfterValue && labelElement}\n
{value}
\n {labelAfterValue && labelElement}\n
\n );\n};\n\nexport default Stat;\n","// extracted by mini-css-extract-plugin\nexport default {\"listStats\":\"Stats--listStats--hRQeq\"};","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport styles from './styles.module.scss';\n\nconst Stats = (props) => {\n const { children, listClassName } = props;\n\n return (\n
    \n {React.Children.map(\n children,\n (child) => (child &&
  • {child}
  • ) || ''\n )}\n
\n );\n};\n\nStats.propTypes = {\n children: PropTypes.node.isRequired,\n listClassName: PropTypes.string\n};\n\nStats.defaultProps = {\n listClassName: null\n};\n\nexport default Stats;\n"],"names":["useSafeState","initialState","mountedRef","useRef","state","setState","useState","useEffect","current","useCallback","args","SvgNavigationProfileHighlightedMedium","React","ref","color","size","title","titleId","props","_ref","fill","xmlns","viewBox","width","height","id","d","defaultProps","undefined","propTypes","PropTypes","SvgBadgesMulticolorSuperuserSmall","fillRule","SvgBadgesMulticolorSummitSmall","SvgBadgesMulticolorProSmall","SvgBadgesMulticolorVerifiedSmall","Img","src","alt","fallback","children","setChildren","image","Image","onload","onerror","_ref2","name","type","badge","className","otherProps","classNames","clsx","styles","ProBadge","EmployeeBadge","SubscriberBadge","VerifiedBadge","getBadge","AvatarFallback","root","reWhitespace","string","index","length","test","charAt","reTrimStart","slice","trimmedEndIndex","replace","value","isObjectLike","baseGetTag","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","isSymbol","isObject","other","valueOf","baseTrim","isBinary","nativeMax","Math","max","nativeMin","min","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","thisArg","apply","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","now","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","arguments","this","clearTimeout","toNumber","cancel","flush","debounce","Area","stream","xScale","yScale","clipPath","formatData","convertedElevation","map","elev","dist","convertedDistance","drawArea","area","x","y1","y0","isRequired","Axis","xAxisNode","yAxisNode","scalesAreEqual","scaleA","scaleB","domain","every","domainElement","includes","componentDidMount","drawAxes","componentDidUpdate","prevProps","scopeTo","hasScopeChanged","hasScaleChanged","hasWidthChanged","formatters","elevationFormatter","distanceFormatter","xAxis","axisBottom","yAxis","axisLeft","xTickCount","ticks","tickSize","tickFormat","e","formatShort","convert","select","render","transform","Tooltip","content","position","chartWidth","chartMargin","textRef","boxWidth","setBoxWidth","rightBound","padding","currBoxAlign","useLayoutEffect","Object","keys","widths","el","getBoundingClientRect","maxWidth","newSize","round","InfoBox","boxHeight","y","stat","contentItem","key","dy","label","dx","top","y2","x1","x2","right","bottom","left","ElevationChart","Component","markerPosition","margin","tooltipContent","container","node","hitbox","handleResize","throttle","buildScales","updateMarker","onUpdateMarker","tooltipDistanceLabel","tooltipElevationLabel","tooltipGradeLabel","bounds","cursorPosition","clientX","distCursor","invert","streamIndex","bisectLeft","distance","elevation","grade","gradeAtIndex","handleMouseLeave","onMouseLeave","window","addEventListener","updateFormatters","prevElevation","prevDistance","units","prevUnits","elevationChanged","distanceChanged","unitsChanged","componentWillUnmount","removeEventListener","ElevationFormatter","DistanceFormatter","gradePercentFormatter","PercentFormatter","heightProp","offsetWidth","yMax","yMin","scaleLinear","range","maxIndex","distanceDiff","start","end","enoughSpaceAtStart","enoughSpaceAtEnd","paddedStart","paddedEnd","croppedElevationStream","scopeColor","highlightArea","highlightAreaColor","onMouseMove","wrapperClassName","labelClassName","valueClassName","labelAfterValue","labelElement","Stats","listClassName","child"],"sourceRoot":""}