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,OACzBC,0BAA2B,CAAC,OAAQ,QACpCxL,eAAgB,CAAC,CACfC,SAAU,QACVC,SAAU,KACT,CACDD,SAAU,QACVC,SAAU,MAEZE,cAAe,M","sources":["webpack://@finviz/website/./js/main/components/SubMenu/SubMenu.tsx","webpack://@finviz/website/./js/main/components/SubMenu/SubMenuTabs.tsx","webpack://@finviz/website/./js/main/components/chart/LineDot.tsx","webpack://@finviz/website/./js/main/components/chart/ManualGrid.tsx","webpack://@finviz/website/./js/main/components/financials-table/constants.ts","webpack://@finviz/website/./js/main/components/financials-table/useFinancialsTablePersistScrollPosition.ts","webpack://@finviz/website/./js/main/components/line-stacked-bar-chart/ChartTooltip.tsx","webpack://@finviz/website/./js/main/components/line-stacked-bar-chart/constants.ts","webpack://@finviz/website/./js/main/components/line-stacked-bar-chart/utils.ts","webpack://@finviz/website/./js/main/components/line-stacked-bar-chart/BarChart.tsx","webpack://@finviz/website/./js/main/components/line-stacked-bar-chart/EmptyDataOverlayWrapper.tsx","webpack://@finviz/website/../node_modules/recharts/es6/chart/LineChart.js","webpack://@finviz/website/./js/main/components/line-stacked-bar-chart/LineChart.tsx","webpack://@finviz/website/./js/main/components/line-stacked-bar-chart/XAxis.tsx","webpack://@finviz/website/./js/main/components/line-stacked-bar-chart/LineStackedBarChart.tsx","webpack://@finviz/website/./js/main/components/line-stacked-bar-chart/types.ts","webpack://@finviz/website/./js/main/modules/earnings-common/WidgetHeader.tsx","webpack://@finviz/website/./js/main/modules/quote/components/QuoteFinancialsTabMenu.tsx","webpack://@finviz/website/./js/main/modules/quote/components/QuoteStickySubMenu.tsx","webpack://@finviz/website/./js/main/modules/revenue/utils.ts","webpack://@finviz/website/./js/main/modules/revenue/RevenueTableFooter.tsx","webpack://@finviz/website/./js/main/modules/revenue/RevenueTableHead.tsx","webpack://@finviz/website/./js/main/modules/revenue/WidgetHeader.tsx","webpack://@finviz/website/./js/main/modules/revenue/types.ts","webpack://@finviz/website/./js/main/modules/revenue/constants.ts","webpack://@finviz/website/./js/main/modules/revenue/useTableColumns.tsx","webpack://@finviz/website/./js/main/modules/revenue/CategoryWidget.tsx","webpack://@finviz/website/./js/main/modules/revenue/WidgetSettingsSection.tsx","webpack://@finviz/website/./js/main/modules/revenue/index.tsx","webpack://@finviz/website/../node_modules/recharts/es6/chart/BarChart.js"],"sourcesContent":["import classNames from 'classnames'\r\nimport { isRedesignEnabled } from 'finviz-charts/app/utils'\r\nimport * as React from 'react'\r\n\r\ninterface Props extends React.HTMLProps {\r\n leftContent?: React.ReactNode\r\n middleContent?: React.ReactNode\r\n rightContent?: React.ReactNode\r\n}\r\n\r\nexport function SubMenu({ leftContent, middleContent, rightContent, ...props }: Props) {\r\n return (\r\n
\r\n
\r\n \r\n {leftContent}\r\n
\r\n {middleContent &&
{middleContent}
}\r\n
{rightContent}
\r\n
\r\n \r\n )\r\n}\r\n","import { Link } from 'react-router-dom'\r\n\r\nimport { Button, ButtonSizeType } from '../button'\r\n\r\ninterface Props {\r\n items: Array<{ label: string; href: string; isActive: boolean; reloadDocument?: boolean }>\r\n size?: ButtonSizeType\r\n}\r\n\r\nexport function SubMenuTabs({ items, size = 'medium' }: Props) {\r\n return (\r\n
\r\n {items.map(({ label, href, isActive, reloadDocument }) => (\r\n \r\n {label}\r\n \r\n ))}\r\n
\r\n )\r\n}\r\n","import classNames from 'classnames'\r\nimport * as React from 'react'\r\nimport { Dot, DotProps } from 'recharts'\r\n\r\nimport { ChartWrapperContext } from './ChartWrapper'\r\nimport { CHART_ITEM_COLORS, ChartItemColorType } from './constants'\r\n\r\ninterface LineDotProps extends DotProps {\r\n dataKey?: string\r\n value?: unknown\r\n color?: ChartItemColorType\r\n isActive?: boolean\r\n}\r\n\r\nexport function LineDot({ cx, cy, r = 4, dataKey, color, className, isActive, value }: LineDotProps) {\r\n const { setActiveKey } = React.useContext(ChartWrapperContext)\r\n const lineColor = color ? CHART_ITEM_COLORS[color] : undefined\r\n\r\n if (value === null) return null\r\n\r\n return (\r\n setActiveKey(dataKey ?? null)}\r\n onMouseLeave={() => setActiveKey(null)}\r\n />\r\n )\r\n}\r\n\r\nexport function RedGreenDot({ cx, cy, value, isActive }: LineDotProps) {\r\n if (typeof value !== 'number') return null\r\n\r\n return (\r\n 0 ? 'green' : 'red'}\r\n className=\"stroke-bg-primary stroke-1\"\r\n />\r\n )\r\n}\r\n","import classNames from 'classnames'\r\nimport * as React from 'react'\r\n\r\ninterface ManualGridProps extends React.HTMLProps {\r\n numberOfLines?: number\r\n visibleLeftAxes?: number\r\n estimateAreaWidth?: number\r\n rightOffset?: number\r\n}\r\n\r\nfunction ManualGridComponent(\r\n {\r\n numberOfLines = 5,\r\n visibleLeftAxes = 0,\r\n rightOffset = 32,\r\n estimateAreaWidth,\r\n children,\r\n ...props\r\n }: React.PropsWithChildren,\r\n ref: React.ForwardedRef\r\n) {\r\n const lines = Array.from({ length: numberOfLines })\r\n\r\n return (\r\n
\r\n \r\n {lines.map((_, index) => (\r\n
\r\n ))}\r\n {!!estimateAreaWidth && (\r\n \r\n )}\r\n
\r\n\r\n {children}\r\n
\r\n )\r\n}\r\n\r\nexport const ManualGrid = React.forwardRef(ManualGridComponent)\r\n","export const TABLE_ROW_HIGHT = 24\r\n","import React from 'react'\r\n\r\nimport { usePrevious } from '../../hooks/use-previous'\r\nimport { useFinancialsTableContext } from './FinancialsTableContext'\r\nimport { TABLE_ROW_HIGHT } from './constants'\r\n\r\ninterface Props {\r\n categoryAreasCounts: number[]\r\n dataKeys: string[]\r\n}\r\n\r\nexport function useFinancialsTablePersistScrollPosition({ categoryAreasCounts, dataKeys }: Props) {\r\n const { settings, scrollInfo } = useFinancialsTableContext()\r\n const previousSettings = usePrevious(settings)\r\n\r\n React.useLayoutEffect(() => {\r\n const widgetSettingsSectionElement = document.getElementById('js-widget-settings-section')\r\n if (!previousSettings || !scrollInfo || !widgetSettingsSectionElement) return\r\n\r\n const financialsTables = document.getElementsByClassName('js-financials-widget')\r\n const widgetSettingsSectionElementTopPosition = widgetSettingsSectionElement.getBoundingClientRect().top\r\n let index = 0\r\n let lastAbsDiffInPx: number | null = null\r\n\r\n Array.from(financialsTables).forEach((financialTableElement, i) => {\r\n const { top } = financialTableElement.getBoundingClientRect()\r\n const absDiffInPx = Math.abs(top - widgetSettingsSectionElementTopPosition)\r\n if (lastAbsDiffInPx === null || absDiffInPx < lastAbsDiffInPx) {\r\n lastAbsDiffInPx = absDiffInPx\r\n index = i\r\n }\r\n })\r\n\r\n let areas = 0\r\n for (let i = 0; i < index; i++) {\r\n areas += categoryAreasCounts[i]\r\n }\r\n\r\n let sign = 0\r\n dataKeys.forEach((dataKey) => {\r\n if (settings[dataKey] !== previousSettings[dataKey]) {\r\n sign = settings[dataKey] ? 1 : -1\r\n }\r\n })\r\n\r\n const shift = areas * TABLE_ROW_HIGHT * sign\r\n window.scrollTo(window.scrollX, scrollInfo.yPosition + shift)\r\n\r\n // effect should run only when scroll info is changed = user toggled data settings\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [scrollInfo])\r\n}\r\n","import * as React from 'react'\r\nimport { NameType, Payload, ValueType } from 'recharts/types/component/DefaultTooltipContent'\r\n\r\nimport { shortFormatNumber } from '../../util'\r\nimport { TooltipInner, TooltipRow } from '../chart/Tooltip'\r\nimport { ChartItemColorType } from '../chart/constants'\r\nimport { LineChartTooltipSort } from './types'\r\n\r\ntype ChartTooltipProps = {\r\n activeKey?: string | null\r\n payload?: Payload[] | undefined\r\n isReversed?: boolean\r\n payloadSort?: keyof typeof LineChartTooltipSort\r\n valueFormatter?: (data: ValueType) => string\r\n}\r\nexport default function ChartTooltip({\r\n payload,\r\n payloadSort = 'default',\r\n isReversed = false,\r\n valueFormatter,\r\n}: ChartTooltipProps) {\r\n const items = React.useMemo(() => {\r\n if (!payload || payload.length === 0) return []\r\n\r\n if (LineChartTooltipSort[payloadSort] === LineChartTooltipSort.value) {\r\n return [...payload].sort((a, b) => Number(b.value ?? 0) - Number(a.value ?? 0))\r\n }\r\n return isReversed ? [...payload].reverse() : payload\r\n }, [payload, payloadSort, isReversed])\r\n\r\n const formatter = React.useCallback(\r\n (value: ValueType) => valueFormatter?.(value) ?? shortFormatNumber(value as number),\r\n [valueFormatter]\r\n )\r\n\r\n if (items.length === 0) return null\r\n\r\n return (\r\n \r\n {items.map((area) => (\r\n \r\n ))}\r\n \r\n )\r\n}\r\n","import colors from '../../../../../config/colors'\r\n\r\nexport const CHART_HEIGHT = 250\r\nexport const LABELS_WIDTH = 28\r\nexport const BAR_CHART_LABELS_MARGIN = 22\r\nexport const LINE_CHART_LABELS_MARGIN = 57\r\nexport const BAR_WIDTH = 72\r\nexport const BAR_GAP = 16\r\nexport const EXTRA_WIDTH = 44\r\nexport const BAR_CHART_MARGINS = { top: 0, right: 0, bottom: 0, left: 0 }\r\nexport const LINE_CHART_MARGINS = { top: 5, right: 35, bottom: 5, left: 55 }\r\nexport const TICK_STYLE = { fontSize: 10, fontWeight: 500, textAnchor: 'end' }\r\nexport const TOOLTIP_WRAPPER_STYLE = { outline: 'none', zIndex: 10 }\r\nexport const CURSOR_STYLE = { fill: FinvizSettings.hasDarkTheme ? colors.gray[700] : colors.gray[50], opacity: 0.65 }\r\nexport const TRANSPARENT_CURSOR = { opacity: 0 }\r\n","import { shortFormatNumber } from '../../util'\r\nimport { FinancialsRowDataType } from '../financials-table/types'\r\nimport { ChartData, View } from './types'\r\n\r\nexport function tickFormatter(value: any) {\r\n return shortFormatNumber(value, { fractions: 0 })\r\n}\r\n\r\nexport function getChartDataItemKey(item: Pick) {\r\n return item.id || item.label\r\n}\r\n\r\nexport function getChartData(data: FinancialsRowDataType[], yearKeys: string[], chartView: View) {\r\n /*\r\n * Bar chart renders segments from the bottom up, so the sorting of visible areas is correct here\r\n * assuming it's sorted by column values\r\n * */\r\n const visibleAreas = data.filter((item) => item.isSelected).map((item) => ({ ...item, color: item.color }))\r\n /*\r\n * Line chart has reverse order because we need to render lines from the end so they don't cover main lines\r\n * you can think about it as visibleAreas index === zIndex on the chart\r\n * */\r\n if (chartView === View.lines) visibleAreas.reverse()\r\n\r\n const chartData = yearKeys.map((year) => {\r\n const stackedBar = { year, topKey: '', bottomKey: '', total: 0 } as ChartData\r\n\r\n visibleAreas.forEach((item) => {\r\n const valueKey = getChartDataItemKey(item)\r\n const value = item.values.find((v) => v.year === year)?.value ?? null\r\n stackedBar[valueKey] = value\r\n stackedBar.total += value ?? 0\r\n\r\n if (item.isSelected && value !== 0) {\r\n // top key is the key of latest area which is visible and have some positive value\r\n // bottom key is the key of latest area which is visible and have some negative value\r\n stackedBar[value && value > 0 ? 'topKey' : 'bottomKey'] = valueKey\r\n }\r\n })\r\n\r\n return stackedBar\r\n })\r\n\r\n return { chartData, visibleAreas }\r\n}\r\n","import * as React from 'react'\r\nimport { Cell, BarChart as RechartsBarChart, ResponsiveContainer } from 'recharts'\r\n\r\nimport { Bar } from '../chart/Bar'\r\nimport { ChartContext } from '../chart/ChartWrapper'\r\nimport { CursorBar } from '../chart/Cursor'\r\nimport { Tooltip } from '../chart/Tooltip'\r\nimport { YAxis } from '../chart/YAxis'\r\nimport { ChartItemColorType } from '../chart/constants'\r\nimport ChartTooltip from './ChartTooltip'\r\nimport {\r\n BAR_CHART_LABELS_MARGIN,\r\n BAR_CHART_MARGINS,\r\n BAR_GAP,\r\n BAR_WIDTH,\r\n CHART_HEIGHT,\r\n EXTRA_WIDTH,\r\n LABELS_WIDTH,\r\n} from './constants'\r\nimport { ChartProps } from './types'\r\nimport { getChartDataItemKey, tickFormatter } from './utils'\r\n\r\nexport default function BarChart({ chartData, visibleAreas, columnsCount, isFullWidth }: ChartProps) {\r\n const chartWidth = columnsCount * BAR_WIDTH + (columnsCount - 1) * BAR_GAP + EXTRA_WIDTH\r\n const ChartWrapper = isFullWidth ? ResponsiveContainer : React.Fragment\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n } content={} />\r\n {/* Don't change the order of mapped items here, see getChartData */}\r\n {visibleAreas.map((area) => {\r\n const itemKey = getChartDataItemKey(area)\r\n return (\r\n \r\n {chartData.map((row, index) => (\r\n \r\n ))}\r\n \r\n )\r\n })}\r\n \r\n \r\n \r\n )\r\n}\r\n","import classnames from 'classnames'\r\nimport * as React from 'react'\r\n\r\nimport { Heading } from '../typography'\r\nimport { LineStackedBarChartProps } from './types'\r\n\r\ninterface Props extends Pick {\r\n className: string\r\n children: React.ReactNode\r\n}\r\n\r\nexport function EmptyDataOverlayWrapper({ className, children, emptyMessage, isEmpty = false }: Props) {\r\n return (\r\n
\r\n
{children}
\r\n\r\n {isEmpty && (\r\n
\r\n {!!emptyMessage && (\r\n
\r\n \r\n {emptyMessage}\r\n \r\n
\r\n )}\r\n
\r\n )}\r\n
\r\n )\r\n}\r\n","/**\n * @fileOverview Line Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { Line } from '../cartesian/Line';\nimport { XAxis } from '../cartesian/XAxis';\nimport { YAxis } from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport var LineChart = generateCategoricalChart({\n chartName: 'LineChart',\n GraphicalChild: Line,\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});","import classNames from 'classnames'\r\nimport React from 'react'\r\nimport { LineChart as RechartsLineChart, ResponsiveContainer } from 'recharts'\r\n\r\nimport { ChartContext } from '../chart/ChartWrapper'\r\nimport { Line } from '../chart/Line'\r\nimport { LineDot } from '../chart/LineDot'\r\nimport { Tooltip } from '../chart/Tooltip'\r\nimport { YAxis } from '../chart/YAxis'\r\nimport { ChartItemColorType } from '../chart/constants'\r\nimport ChartTooltip from './ChartTooltip'\r\nimport {\r\n BAR_GAP,\r\n BAR_WIDTH,\r\n CHART_HEIGHT,\r\n EXTRA_WIDTH,\r\n LABELS_WIDTH,\r\n LINE_CHART_LABELS_MARGIN,\r\n LINE_CHART_MARGINS,\r\n} from './constants'\r\nimport { ChartProps, LineChartTooltipSort } from './types'\r\nimport { getChartDataItemKey, tickFormatter } from './utils'\r\n\r\ninterface Props extends ChartProps {\r\n tooltipSort?: keyof typeof LineChartTooltipSort\r\n}\r\n\r\nexport default function LineChart({\r\n chartData,\r\n visibleAreas,\r\n columnsCount,\r\n barWidth = BAR_WIDTH,\r\n tooltipSort,\r\n showTotal,\r\n isFullWidth,\r\n}: Props) {\r\n const chartWidth = columnsCount * barWidth + (columnsCount - 1) * BAR_GAP + EXTRA_WIDTH\r\n const ChartWrapper = isFullWidth ? ResponsiveContainer : React.Fragment\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n } />\r\n {showTotal && (\r\n }\r\n activeDot={}\r\n dataKey=\"total\"\r\n color=\"lightGray\"\r\n />\r\n )}\r\n {visibleAreas.map((area) => {\r\n const itemKey = getChartDataItemKey(area)\r\n return (\r\n }\r\n activeDot={\r\n \r\n }\r\n />\r\n )\r\n })}\r\n \r\n \r\n \r\n )\r\n}\r\n","import * as React from 'react'\r\n\r\nimport { MONTHS } from '../../constants/common'\r\nimport { LABELS_WIDTH, LINE_CHART_MARGINS } from './constants'\r\nimport { LineStackedBarChartProps, View } from './types'\r\n\r\ninterface Props extends Pick {\r\n barWidth: number\r\n}\r\n\r\nexport function XAxis({ barWidth, yearKeys, chartView }: Props) {\r\n const rightOffset = chartView === View.lines ? LINE_CHART_MARGINS.right - barWidth / 2 : 0\r\n return (\r\n \r\n {yearKeys.map((value) => {\r\n const year = value.substring(0, 4)\r\n const month = Number.parseInt(value.substring(4, 6))\r\n\r\n return (\r\n \r\n {month === 1 ? year.substring(2, 4) : MONTHS[month - 1]}\r\n \r\n )\r\n })}\r\n \r\n )\r\n}\r\n","import classnames from 'classnames'\r\nimport * as React from 'react'\r\n\r\nimport { ManualGrid } from '../chart/ManualGrid'\r\nimport BarChart from './BarChart'\r\nimport { EmptyDataOverlayWrapper } from './EmptyDataOverlayWrapper'\r\nimport LineChart from './LineChart'\r\nimport { XAxis } from './XAxis'\r\nimport { CHART_HEIGHT, LABELS_WIDTH } from './constants'\r\nimport { LineStackedBarChartProps, View } from './types'\r\nimport { getChartData } from './utils'\r\n\r\nexport function LineStackedBarChart({\r\n data,\r\n yearKeys,\r\n chartView,\r\n lineChartTooltipSort,\r\n emptyMessage,\r\n isEmpty,\r\n isFullWidth = false,\r\n hasXAxis = false,\r\n isShowAll = false,\r\n isInView = true,\r\n hasBeenInView = true,\r\n}: LineStackedBarChartProps) {\r\n const wrapperRef = React.useRef(null)\r\n const [barWidth, setBarWidth] = React.useState(0)\r\n const { chartData, visibleAreas } = React.useMemo(\r\n () => (hasBeenInView ? getChartData(data, yearKeys, chartView) : { chartData: [], visibleAreas: [] }),\r\n [data, yearKeys, hasBeenInView, chartView]\r\n )\r\n\r\n const columnsCount = yearKeys.length\r\n\r\n React.useEffect(() => {\r\n const wrapperWidth = wrapperRef.current?.clientWidth ?? 0\r\n setBarWidth((wrapperWidth - LABELS_WIDTH) / columnsCount)\r\n }, [columnsCount])\r\n\r\n return (\r\n \r\n \r\n {isInView && chartView === View.bars && (\r\n \r\n )}\r\n {isInView && chartView === View.lines && (\r\n \r\n )}\r\n\r\n {hasXAxis && }\r\n \r\n \r\n )\r\n}\r\n","import * as React from 'react'\r\n\r\nimport { ColorVariant } from '../checkbox'\r\nimport { FinancialsRowDataType } from '../financials-table/types'\r\n\r\nexport enum View {\r\n bars,\r\n lines,\r\n}\r\n\r\nexport interface ChartProps {\r\n chartData: ChartData[]\r\n showTotal?: boolean\r\n visibleAreas: Array<\r\n Pick & {\r\n color: ColorVariant\r\n }\r\n >\r\n columnsCount: number\r\n barWidth?: number\r\n isFullWidth?: boolean\r\n}\r\n\r\nexport type ChartData = {\r\n year: string\r\n topKey: string\r\n bottomKey: string\r\n total: number\r\n} & Record\r\n\r\nexport enum LineChartTooltipSort {\r\n default = 'default',\r\n value = 'value',\r\n}\r\n\r\nexport type LineStackedBarChartProps = {\r\n data: FinancialsRowDataType[]\r\n yearKeys: string[]\r\n chartView: View\r\n isShowAll?: boolean\r\n isFullWidth?: boolean\r\n hasXAxis?: boolean\r\n isInView?: boolean\r\n hasBeenInView?: boolean\r\n lineChartTooltipSort?: keyof typeof LineChartTooltipSort\r\n emptyMessage?: React.ReactNode\r\n isEmpty?: boolean\r\n}\r\n","import classnames from 'classnames'\r\nimport * as React from 'react'\r\n\r\nimport { Heading } from '../../components/typography'\r\n\r\ninterface Props {\r\n children: React.ReactNode\r\n className?: string\r\n}\r\n\r\nexport function WidgetHeader({ children, className }: Props) {\r\n return (\r\n // m-0 & text-base are necessary to override default H* styles on old design\r\n \r\n {children}\r\n \r\n )\r\n}\r\n","import { decodeQueryString, encodeQueryString } from '../../../../app/queryString'\r\nimport { SubMenuTabs } from '../../../components/SubMenu/SubMenuTabs'\r\nimport { QuoteSubview } from '../types'\r\n\r\nexport const FINANCIALS_SECTION_LABELS = {\r\n [QuoteSubview.Revenue]: 'Revenue',\r\n [QuoteSubview.Dividends]: 'Dividends',\r\n [QuoteSubview.Earnings]: 'Earnings',\r\n [QuoteSubview.Forecast]: 'Forecast',\r\n}\r\n\r\nconst FINANCIAL_MENU_TABS: Array = [\r\n QuoteSubview.Dividends,\r\n QuoteSubview.Earnings,\r\n QuoteSubview.Revenue,\r\n QuoteSubview.Forecast,\r\n]\r\n\r\nfunction getFinancialMenuTabs() {\r\n const searchParams = decodeQueryString()\r\n\r\n return FINANCIAL_MENU_TABS.map((value) => ({\r\n label: FINANCIALS_SECTION_LABELS[value],\r\n href: `/quote.ashx?${encodeQueryString({ ...searchParams, ty: value })}`,\r\n isActive: searchParams.ty === value,\r\n reloadDocument: true,\r\n }))\r\n}\r\n\r\nexport function QuoteFinancialsTabMenu() {\r\n return \r\n}\r\n","import * as React from 'react'\r\n\r\nimport { SubMenu } from '../../../components/SubMenu/SubMenu'\r\n\r\ninterface Props {\r\n leftContent?: React.ReactNode\r\n rightContent?: React.ReactNode\r\n}\r\n\r\nexport function QuoteStickySubMenu({ leftContent, rightContent }: Props) {\r\n return \r\n}\r\n","import { FinancialsRowDataType } from '../../components/financials-table/types'\r\n\r\nexport { tickFormatter } from '../../components/line-stacked-bar-chart'\r\n\r\nexport function getSumData>(data: T[], absolute = false) {\r\n return data.reduce>((sumObj, revenue) => {\r\n revenue.values.forEach(({ year, value }) => {\r\n if (!sumObj[year]) {\r\n sumObj[year] = 0\r\n }\r\n\r\n sumObj[year] += absolute ? Math.abs(value ?? 0) : (value ?? 0)\r\n })\r\n\r\n return sumObj\r\n }, {})\r\n}\r\n","import classNames from 'classnames'\r\nimport * as React from 'react'\r\n\r\nimport { TableCell, TableFooter } from '../../components/Table'\r\nimport { Checkbox, ColorVariant } from '../../components/checkbox'\r\nimport { useFinancialsTableContext } from '../../components/financials-table'\r\nimport { FinancialsRowDataType } from '../../components/financials-table/types'\r\nimport { View } from '../../components/line-stacked-bar-chart'\r\nimport { shortFormatNumber } from '../../util'\r\nimport { RevenueColumnsType, RevenueSettings } from './types'\r\nimport { getSumData } from './utils'\r\n\r\ntype Props = {\r\n columns: RevenueColumnsType['columns']\r\n data: FinancialsRowDataType[]\r\n}\r\n\r\nexport function RevenueTableFooter({ columns, data }: Props) {\r\n const { settings, setSettings } = useFinancialsTableContext()\r\n\r\n return (\r\n \r\n {settings.chartView === View.bars ? (\r\n \r\n Total\r\n \r\n ) : (\r\n \r\n \r\n setSettings({\r\n ...settings,\r\n isShowAll: !settings.isShowAll,\r\n })\r\n }\r\n />\r\n \r\n )}\r\n {columns.map((column) => (\r\n \r\n {shortFormatNumber(getSumData(data)[column.id])}\r\n \r\n ))}\r\n \r\n )\r\n}\r\n","import classNames from 'classnames'\r\nimport * as React from 'react'\r\n\r\nimport { TableAlign, TableHead, TableHeader, TableHeaderSortable } from '../../components/Table'\r\nimport { FinancialsColumnDefinition, FinancialsRowDataType } from '../../components/financials-table/types'\r\nimport { SortByShape } from '../../hooks/use-sort-data'\r\nimport { SortDirection } from '../../types'\r\nimport { RevenueColumnsType } from './types'\r\n\r\ntype Props = {\r\n columns: RevenueColumnsType['columns']\r\n unit: string\r\n sort: SortByShape>\r\n onSortChange: (column: FinancialsColumnDefinition) => void\r\n}\r\n\r\nexport function RevenueTableHead({ columns, unit, sort, onSortChange }: Props) {\r\n const handleChangeSort = (column: FinancialsColumnDefinition) => {\r\n const shouldRemoveOrder = sort.direction === SortDirection.Descending && column === sort.column\r\n if (shouldRemoveOrder) {\r\n onSortChange('order' as unknown as FinancialsColumnDefinition)\r\n } else {\r\n onSortChange(column)\r\n }\r\n }\r\n\r\n return (\r\n \r\n \r\n Currency: {unit}\r\n \r\n {columns.map((column) => (\r\n handleChangeSort(column)}\r\n >\r\n {column.name}\r\n \r\n ))}\r\n \r\n )\r\n}\r\n","import { WidgetHeader as CommonWidgetHeader } from '../earnings-common/WidgetHeader'\r\n\r\nfunction getCategoryLabel(category: string) {\r\n switch (category) {\r\n case 'products_and_services':\r\n return 'Products and Services'\r\n\r\n default:\r\n return category[0].toUpperCase() + category.substring(1)\r\n }\r\n}\r\n\r\ntype WidgetHeaderProps = {\r\n category: string\r\n}\r\n\r\nexport default function WidgetHeader({ category }: WidgetHeaderProps) {\r\n return Revenue by {getCategoryLabel(category)}\r\n}\r\n","import { FinancialsColumnDefinition, FinancialsRowDataType } from '../../components/financials-table/types'\r\nimport { View } from '../../components/line-stacked-bar-chart'\r\n\r\nexport enum Category {\r\n products_and_services = 'products_and_services',\r\n regions = 'regions',\r\n segment = 'segment',\r\n subsegment = 'subsegment',\r\n additional = 'additional',\r\n}\r\n\r\nexport type CategoryData = {\r\n revenues: Record>\r\n unit: string\r\n}\r\n\r\nexport type RevenueData = Record, CategoryData>\r\n\r\nexport type RevenueColumnsType = {\r\n columns: FinancialsColumnDefinition[]\r\n subColumns: Record[]>\r\n}\r\n\r\n// I kept the values with bool prefix because users may already have cookis with this keys\r\nexport enum RevenueDataEnum {\r\n yoyChange = 'isYoyChange',\r\n yoyChangePct = 'isYoyChangePct',\r\n sharePct = 'isSharePct',\r\n}\r\n\r\nexport type RevenueSettings = {\r\n isShowAll: boolean\r\n chartView: View\r\n} & Record\r\n","import { ColorVariant } from '../../components'\r\nimport { FinancialsTableSettingsType } from '../../components/financials-table'\r\nimport { View } from '../../components/line-stacked-bar-chart'\r\nimport { RevenueDataEnum } from './types'\r\n\r\nexport const COOKIE_KEY = 'revenueSettings'\r\n\r\nexport const DEFAULT_SETTINGS: FinancialsTableSettingsType = {\r\n [RevenueDataEnum.yoyChange]: false,\r\n [RevenueDataEnum.yoyChangePct]: false,\r\n [RevenueDataEnum.sharePct]: false,\r\n isShowAll: false,\r\n chartView: View.bars,\r\n}\r\n\r\nexport const SEGMENT_COLORS = Object.keys(ColorVariant).filter(\r\n (c) => c !== ColorVariant.gray && c !== ColorVariant.default\r\n) as ColorVariant[]\r\n","import classNames from 'classnames'\r\nimport * as React from 'react'\r\n\r\nimport { RedGreenText } from '../../components/RedGreenText'\r\nimport { TableAlign } from '../../components/Table'\r\nimport { shortFormatNumber } from '../../util'\r\nimport { RevenueColumnsType, RevenueDataEnum } from './types'\r\n\r\nconst getColumns = (yearKeys: string[]) => {\r\n const commonClassName = 'w-22 last:w-29.5 px-4 last:pr-11'\r\n\r\n const columns: RevenueColumnsType['columns'] = yearKeys.map((year) => ({\r\n id: year,\r\n name: year,\r\n align: TableAlign.Right,\r\n className: commonClassName,\r\n getValueForSort: (data) => data.values.find((value) => value.year === year)?.value ?? null,\r\n renderColumn: (data) => {\r\n const revenueColValue = data.values.find((value) => value.year === year)\r\n if (!revenueColValue?.value) return \r\n return shortFormatNumber(revenueColValue.value)\r\n },\r\n }))\r\n\r\n const subColumns: RevenueColumnsType['subColumns'] = {\r\n [RevenueDataEnum.yoyChange]: yearKeys.map((year) => ({\r\n id: year,\r\n name: year,\r\n align: TableAlign.Right,\r\n className: commonClassName,\r\n renderColumn: (data) => {\r\n const revenueColSubValue = data.values.find((value) => value.year === year)\r\n return (\r\n \r\n {shortFormatNumber(revenueColSubValue?.value, { defaultValue: '—' })}\r\n \r\n )\r\n },\r\n })),\r\n [RevenueDataEnum.yoyChangePct]: yearKeys.map((year) => ({\r\n id: year,\r\n name: year,\r\n align: TableAlign.Right,\r\n className: commonClassName,\r\n renderColumn: (data) => {\r\n const revenueColSubValue = data.values.find((value) => value.year === year)\r\n return (\r\n \r\n {revenueColSubValue?.value?.toFixed(2) ?? '—'}\r\n \r\n )\r\n },\r\n })),\r\n [RevenueDataEnum.sharePct]: yearKeys.map((year) => ({\r\n id: year,\r\n name: year,\r\n align: TableAlign.Right,\r\n className: classNames(commonClassName, 'text-muted-2'),\r\n renderColumn: (data) => {\r\n const revenueColSubValue = data.values.find((value) => value.year === year)\r\n if (typeof revenueColSubValue?.value !== 'number') return '-'\r\n\r\n return `${revenueColSubValue.value.toFixed(2)}%`\r\n },\r\n })),\r\n }\r\n return { columns, subColumns }\r\n}\r\n\r\nexport function useTableColumns(yearKeys: string[]) {\r\n return React.useMemo(() => getColumns(yearKeys), [yearKeys])\r\n}\r\n","import * as React from 'react'\r\n\r\nimport { useTableSort } from '../../components/Table'\r\nimport { FinancialsWidget, getYoYData, useFinancialsTableContext } from '../../components/financials-table'\r\nimport {\r\n FinancialsRowDataType,\r\n FinancialsRowValue,\r\n FinancialsSubRowDataType,\r\n} from '../../components/financials-table/types'\r\nimport { LineStackedBarChart } from '../../components/line-stacked-bar-chart'\r\nimport { RevenueTableFooter } from './RevenueTableFooter'\r\nimport { RevenueTableHead } from './RevenueTableHead'\r\nimport WidgetHeader from './WidgetHeader'\r\nimport { SEGMENT_COLORS } from './constants'\r\nimport { CategoryData, RevenueDataEnum, RevenueSettings } from './types'\r\nimport { useTableColumns } from './useTableColumns'\r\nimport { getSumData } from './utils'\r\n\r\nfunction getSharePctData(data: T[], absSumRow: Record) {\r\n return data.reduce>((acc, { year, value }) => {\r\n const sharePct = absSumRow[year] > 0 ? (100 / absSumRow[year]) * Math.abs(value ?? 0) : null\r\n return {\r\n ...acc,\r\n [year]: sharePct === null || isNaN(sharePct) ? null : sharePct,\r\n }\r\n }, {})\r\n}\r\n\r\nfunction mapData(data: CategoryData) {\r\n const revenuesArray: FinancialsRowDataType[] = Object.entries(data.revenues)\r\n .map(([key, revenues]) => ({\r\n id: key,\r\n label: key,\r\n isSelected: true,\r\n color: SEGMENT_COLORS[0],\r\n values: revenues\r\n .map((annualData) => ({\r\n year: annualData.fiscal_year,\r\n value: annualData.value,\r\n }))\r\n .sort((a, b) => Number.parseInt(a.year) - Number.parseInt(b.year)),\r\n subData: [],\r\n }))\r\n .sort((a, b) => b.values[b.values.length - 1].value - a.values[a.values.length - 1].value)\r\n\r\n return revenuesArray.map((revenue, index) => {\r\n const yoyData = getYoYData(revenue.values)\r\n const absSumRow = getSumData(revenuesArray, true)\r\n const sharePctData = getSharePctData(revenue.values, absSumRow)\r\n\r\n return {\r\n ...revenue,\r\n color: SEGMENT_COLORS[index % SEGMENT_COLORS.length],\r\n subData: [\r\n {\r\n id: RevenueDataEnum.yoyChange,\r\n label: 'YoY Growth',\r\n values: revenue.values.map(({ year }) => ({ year, value: yoyData.change[year] })),\r\n },\r\n {\r\n id: RevenueDataEnum.yoyChangePct,\r\n label: 'YoY Growth %',\r\n values: revenue.values.map(({ year }) => ({ year, value: yoyData.changePct[year] })),\r\n },\r\n {\r\n id: RevenueDataEnum.sharePct,\r\n label: 'Share %',\r\n values: revenue.values.map(({ year }) => ({ year, value: sharePctData[year] })),\r\n },\r\n ].filter(Boolean) as FinancialsSubRowDataType[],\r\n }\r\n })\r\n}\r\n\r\ntype CategoryWidgetProps = {\r\n category: string\r\n data: CategoryData\r\n}\r\n\r\nexport default function CategoryWidget({ category, data }: CategoryWidgetProps) {\r\n const { settings } = useFinancialsTableContext()\r\n const [revenueData, setRevenueData] = React.useState(() => mapData(data))\r\n const yearKeys = React.useMemo(\r\n () => revenueData[0].values.map(({ year }) => year).sort((a, b) => Number.parseInt(a) - Number.parseInt(b)),\r\n [revenueData]\r\n )\r\n const { columns, subColumns } = useTableColumns(yearKeys)\r\n\r\n const {\r\n data: sortedData,\r\n sort,\r\n changeSort,\r\n } = useTableSort({\r\n data: revenueData.map((revenue) => ({\r\n ...revenue,\r\n subData: revenue.subData.filter(({ id }) => settings[id as RevenueDataEnum]),\r\n })),\r\n columns,\r\n defaultSort: { column: columns[columns.length - 1], direction: -1 },\r\n })\r\n\r\n const onVisibilityChange = (id: string, isSelected: boolean) => {\r\n setRevenueData(\r\n revenueData.map((item) =>\r\n item.id === id\r\n ? {\r\n ...item,\r\n isSelected,\r\n }\r\n : item\r\n )\r\n )\r\n }\r\n\r\n return (\r\n }\r\n columns={columns}\r\n subColumns={subColumns}\r\n onVisibilityChange={onVisibilityChange}\r\n tableHead={}\r\n tableFooter={}\r\n >\r\n \r\n \r\n )\r\n}\r\n","import React from 'react'\r\n\r\nimport { ChipSwitch, ChipSwitchButton } from '../../components/ChipSwitch'\r\nimport { useFinancialsTableContext } from '../../components/financials-table'\r\nimport { View } from '../../components/line-stacked-bar-chart'\r\nimport { RevenueDataEnum, RevenueSettings } from './types'\r\n\r\nexport default function WidgetSettingsSection() {\r\n const { settings, setSettings } = useFinancialsTableContext()\r\n\r\n const toggleSetting = (key: keyof RevenueSettings, value: RevenueSettings[typeof key]) => {\r\n setSettings({\r\n ...settings,\r\n [key]: value,\r\n })\r\n }\r\n\r\n return (\r\n
\r\n \r\n {\r\n toggleSetting(RevenueDataEnum.yoyChange, !settings.isYoyChange)\r\n }}\r\n >\r\n YoY Growth\r\n \r\n {\r\n toggleSetting(RevenueDataEnum.yoyChangePct, !settings.isYoyChangePct)\r\n }}\r\n >\r\n YoY Growth %\r\n \r\n {\r\n toggleSetting(RevenueDataEnum.sharePct, !settings.isSharePct)\r\n }}\r\n >\r\n Share %\r\n \r\n \r\n\r\n \r\n {\r\n toggleSetting('chartView', View.bars)\r\n }}\r\n />\r\n {\r\n toggleSetting('chartView', View.lines)\r\n }}\r\n />\r\n \r\n
\r\n )\r\n}\r\n","import React from 'react'\r\n\r\nimport { FinancialsTableContextProvider } from '../../components/financials-table'\r\nimport { useFinancialsTablePersistScrollPosition } from '../../components/financials-table/useFinancialsTablePersistScrollPosition'\r\nimport { useCachedLoaderData } from '../../hooks/useCachedLoaderData'\r\nimport { QuoteFinancialsTabMenu } from '../quote/components/QuoteFinancialsTabMenu'\r\nimport { QuoteStickySubMenu } from '../quote/components/QuoteStickySubMenu'\r\nimport CategoryWidget from './CategoryWidget'\r\nimport WidgetSettingsSection from './WidgetSettingsSection'\r\nimport { COOKIE_KEY, DEFAULT_SETTINGS } from './constants'\r\nimport { RevenueData, RevenueDataEnum } from './types'\r\n\r\nfunction getAreasCounts(data: RevenueData | null) {\r\n if (!data) return []\r\n\r\n return Object.keys(data).map((key) => {\r\n const category = data[key as keyof RevenueData]\r\n return Object.keys(category.revenues).length\r\n })\r\n}\r\n\r\nfunction RevenueComponent() {\r\n const { data } = useCachedLoaderData()\r\n const categoryAreasCounts = React.useMemo(() => getAreasCounts(data), [data])\r\n\r\n useFinancialsTablePersistScrollPosition({\r\n categoryAreasCounts,\r\n dataKeys: [RevenueDataEnum.yoyChange, RevenueDataEnum.yoyChangePct, RevenueDataEnum.sharePct],\r\n })\r\n\r\n React.useEffect(() => {\r\n // Remove min-height from react root element which is set on BE because of CLS\r\n document.getElementById('root')?.style.removeProperty('min-height')\r\n }, [])\r\n\r\n const hasData = !!data && Object.keys(data).length > 0\r\n\r\n return (\r\n <>\r\n }\r\n rightContent={hasData ? : undefined}\r\n />\r\n\r\n {hasData ? (\r\n
\r\n {Object.entries(data).map(([key, val]) => (\r\n \r\n ))}\r\n
\r\n ) : (\r\n
\r\n Revenue is not available for this stock.\r\n
\r\n )}\r\n \r\n )\r\n}\r\n\r\nexport default function Revenue() {\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n","/**\n * @fileOverview Bar Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { Bar } from '../cartesian/Bar';\nimport { XAxis } from '../cartesian/XAxis';\nimport { YAxis } from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport var BarChart = generateCategoricalChart({\n chartName: 'BarChart',\n GraphicalChild: Bar,\n defaultTooltipEventType: 'axis',\n validateTooltipEventTypes: ['axis', 'item'],\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});"],"names":["SubMenu","_ref","leftContent","middleContent","rightContent","props","_jsx","className","classNames","children","_jsxs","isRedesignEnabled","SubMenuTabs","items","size","map","_ref2","label","href","isActive","reloadDocument","Button","as","Link","to","theme","rounding","active","LineDot","cx","cy","r","dataKey","color","value","setActiveKey","React","ChartWrapperContext","lineColor","CHART_ITEM_COLORS","undefined","Dot","onMouseEnter","onMouseLeave","RedGreenDot","ManualGridComponent","ref","numberOfLines","visibleLeftAxes","rightOffset","estimateAreaWidth","lines","Array","from","length","style","right","_","index","width","ManualGrid","TABLE_ROW_HIGHT","useFinancialsTablePersistScrollPosition","categoryAreasCounts","dataKeys","settings","scrollInfo","useFinancialsTableContext","previousSettings","usePrevious","widgetSettingsSectionElement","document","getElementById","financialsTables","getElementsByClassName","widgetSettingsSectionElementTopPosition","getBoundingClientRect","top","lastAbsDiffInPx","forEach","financialTableElement","i","absDiffInPx","Math","abs","areas","sign","shift","window","scrollTo","scrollX","yPosition","ChartTooltip","payload","payloadSort","isReversed","valueFormatter","LineChartTooltipSort","sort","a","b","_b$value","_a$value","Number","reverse","formatter","_valueFormatter","shortFormatNumber","TooltipInner","formatValue","area","TooltipRow","name","indicator","labelClass","valueClass","CHART_HEIGHT","LABELS_WIDTH","BAR_CHART_LABELS_MARGIN","LINE_CHART_LABELS_MARGIN","BAR_WIDTH","BAR_GAP","EXTRA_WIDTH","BAR_CHART_MARGINS","bottom","left","LINE_CHART_MARGINS","FinvizSettings","hasDarkTheme","colors","tickFormatter","fractions","getChartDataItemKey","item","id","BarChart","chartData","visibleAreas","columnsCount","isFullWidth","chartWidth","ChartWrapper","ResponsiveContainer","ChartContext","height","RechartsBarChart","data","margin","barCategoryGap","stackOffset","YAxis","orientation","textAnchor","tickMargin","interval","Tooltip","cursor","CursorBar","numberOfDatapoints","content","itemKey","Bar","stackId","shape","fill","row","Cell","radius","topKey","bottomKey","includes","EmptyDataOverlayWrapper","emptyMessage","isEmpty","classnames","relative","Heading","level","LineChart","generateCategoricalChart","chartName","GraphicalChild","Line","axisComponents","axisType","AxisComp","XAxis","formatAxisMap","barWidth","tooltipSort","showTotal","RechartsLineChart","dot","activeDot","stroke","strokeWidth","isHighlighted","yearKeys","chartView","View","paddingLeft","paddingRight","year","substring","month","parseInt","MONTHS","LineStackedBarChart","lineChartTooltipSort","hasXAxis","isShowAll","isInView","hasBeenInView","wrapperRef","setBarWidth","filter","isSelected","stackedBar","total","_item$values$find$val","_item$values$find","valueKey","values","find","v","getChartData","_wrapperRef$current$c","_wrapperRef$current","wrapperWidth","current","clientWidth","bars","WidgetHeader","FINANCIALS_SECTION_LABELS","QuoteSubview","Revenue","Dividends","Earnings","Forecast","FINANCIAL_MENU_TABS","getFinancialMenuTabs","searchParams","decodeQueryString","encodeQueryString","ty","QuoteFinancialsTabMenu","QuoteStickySubMenu","getSumData","absolute","arguments","reduce","sumObj","revenue","RevenueTableFooter","columns","setSettings","TableFooter","TableCell","hasLeading","Checkbox","checked","ColorVariant","gray","onChange","column","align","RevenueTableHead","unit","onSortChange","TableHead","TableHeader","TableAlign","Left","_sort$column","TableHeaderSortable","direction","onClick","shouldRemoveOrder","SortDirection","Descending","handleChangeSort","getCategoryLabel","category","toUpperCase","CommonWidgetHeader","RevenueDataEnum","COOKIE_KEY","DEFAULT_SETTINGS","yoyChange","yoyChangePct","sharePct","SEGMENT_COLORS","Object","keys","c","default","getColumns","commonClassName","Right","getValueForSort","_data$values$find$val","_data$values$find","renderColumn","revenueColValue","subColumns","revenueColSubValue","RedGreenText","defaultValue","_revenueColSubValue$v","_revenueColSubValue$v2","toFixed","mapData","revenuesArray","entries","revenues","key","annualData","fiscal_year","subData","yoyData","getYoYData","absSumRow","sharePctData","acc","isNaN","getSharePctData","_ref3","change","_ref4","changePct","_ref5","Boolean","CategoryWidget","_ref6","revenueData","setRevenueData","_ref7","useTableColumns","sortedData","changeSort","useTableSort","_ref8","defaultSort","FinancialsWidget","header","onVisibilityChange","tableHead","tableFooter","WidgetSettingsSection","toggleSetting","ChipSwitch","ChipSwitchButton","isYoyChange","isYoyChangePct","isSharePct","RevenueComponent","useCachedLoaderData","getAreasCounts","_document$getElementB","removeProperty","hasData","_Fragment","val","FinancialsTableContextProvider","defaultSettings","cookieKey","defaultTooltipEventType","validateTooltipEventTypes"],"sourceRoot":""}