@decafhub/decaf-react-webapp 0.2.14 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.js","sources":["../src/components/Error.tsx","../src/utils.tsx","../src/theme/-styles.tsx","../src/theme/-theme-context.tsx","../src/theme/-theme-provider.tsx","../src/theme/-theme-hooks.tsx","../src/components/Breadcrumb.tsx","../src/components/Page.tsx","../src/components/DocumentationButton.tsx","../src/components/Logo.tsx","../src/components/Menu.tsx","../src/components/PageScroller.tsx","../src/components/Screenshotter.tsx","../src/components/ThemeSwitcher.tsx","../src/components/UserProfileDropdown.tsx","../src/components/VersionSelector.tsx","../src/components/ZendeskWidget.tsx","../src/components/Layout.tsx","../src/components/PageAbout.tsx","../src/machinery/index.tsx","../src/machinery/-plausible.tsx"],"sourcesContent":["import { LockFilled } from '@ant-design/icons';\nimport { Button, Result, Typography } from 'antd';\nimport React from 'react';\nimport { Link, isRouteErrorResponse, useRouteError } from 'react-router-dom';\n\nfunction ErrorPageSubtitle({ message }: { message: string }) {\n return (\n <>\n <Typography>{message}</Typography>\n <Link to=\"/\">\n <Button style={{ marginTop: 20 }}>Home Page</Button>\n </Link>\n </>\n );\n}\n\nexport function Page401() {\n return (\n <Result\n icon={<LockFilled style={{ color: '#ff603b' }} />}\n title={'Authentication Error'}\n subTitle={<ErrorPageSubtitle message={'Your credentials are invalid. Please try to log in again.'} />}\n />\n );\n}\n\nexport function Page403() {\n return (\n <Result\n status=\"403\"\n title={'Access Denied'}\n subTitle={<ErrorPageSubtitle message={'You are not authorized to access this content.'} />}\n />\n );\n}\n\nexport function Page404() {\n return (\n <Result\n status=\"404\"\n title={'Page Not Found'}\n subTitle={<ErrorPageSubtitle message={'Sorry, the page you visited does not exist.'} />}\n />\n );\n}\n\nexport function PageError() {\n return (\n <Result\n status=\"500\"\n title={'Error'}\n subTitle={\n <ErrorPageSubtitle\n message={\n 'Something went wrong. Please try again later. If the problem persists, please contact the administrator.'\n }\n />\n }\n />\n );\n}\n\nexport function PageRouteError() {\n const error = useRouteError();\n\n if (isRouteErrorResponse(error)) {\n switch (error.status) {\n case 401:\n return <Page401 />;\n case 403:\n return <Page403 />;\n case 404:\n return <Page404 />;\n default:\n return <PageError />;\n }\n } else {\n return <PageError />;\n }\n}\n","import { DecafClient } from '@decafhub/decaf-client';\nimport { DecafContextType } from '@decafhub/decaf-react';\nimport Decimal from 'decimal.js';\nimport Cookies from 'js-cookie';\nimport md5 from 'md5';\nimport { useLayoutEffect, useRef, useState } from 'react';\nimport { Params } from 'react-router-dom';\n\nconst FOOTER_HEIGHT = 32;\nconst FOOTER_PADDING = 16;\n\n/**\n * This hook is used to calculate the remaining height of an element.\n * It takes into account the footer height and padding.\n *\n * @param elementId the id of the element to calculate the available height.\n * @returns the remaining height of the element.\n */\nexport function useRemaningHeight(elementId: string): number {\n const [remainingHeight, setRemainingHeight] = useState<number>(0);\n\n useLayoutEffect(() => {\n const e = document.getElementById(elementId);\n\n const calculate = () => {\n if (!e) {\n return;\n }\n\n const elementTop = e.getBoundingClientRect().top;\n const elementHeight = window.innerHeight - elementTop - FOOTER_HEIGHT - FOOTER_PADDING;\n setRemainingHeight(elementHeight);\n };\n\n calculate();\n e?.addEventListener('resize', calculate);\n window.addEventListener('resize', calculate);\n\n return () => {\n window.removeEventListener('resize', calculate);\n e?.removeEventListener('resize', calculate);\n };\n }, [elementId]);\n\n return remainingHeight;\n}\n\n/**\n * This hook is used to calculate the max possible height of a table.\n * It is used to set the height of the table to make it scrollable\n * when the content is too large.\n * @param elementId the id of the element that contains the table.\n * @param bottomSpace extra space to be added to the bottom of the table container.\n * @returns the max height of the table.\n * @example\n * ```tsx\n * const maxHeight = useTableMaxHeight('table-container', 50);\n * return (\n * <Table\n {...tableProps}\n id={'table-container'}\n scroll={{\n x: 'max-content',\n y: maxHeight,\n }}\n />\n* );\n* ```\n**/\nexport function useTableMaxHeight(elementId: string, bottomSpace: number = 0): string | number {\n const [maxHeight, setMaxHeight] = useState<string | number>(400);\n const remaining = useRemaningHeight(elementId);\n const observer = useRef<ResizeObserver | null>(null);\n\n useLayoutEffect(() => {\n const w = document.getElementById(elementId);\n\n observer.current = new ResizeObserver((e) => {\n let max = 0;\n\n e.forEach((tableWrapper) => {\n const tHeaderHeight = getElementComputedHeight(tableWrapper.target.querySelector('.ant-table-header'));\n const tFooterHeight = getElementComputedHeight(tableWrapper.target.querySelector('.ant-table-footer'));\n const tContainerOffset = getElementTotalOffset(tableWrapper.target.querySelector('.ant-table-container'));\n const paginations = tableWrapper.target.querySelectorAll('.ant-pagination') ?? [];\n const paginationHeights = Array.from(paginations).reduce((acc, cur) => acc + getElementComputedHeight(cur), 0);\n\n max = remaining - tHeaderHeight - tFooterHeight - tContainerOffset - paginationHeights - bottomSpace;\n });\n\n setMaxHeight(max > 350 ? max : '100%');\n });\n\n observer.current.observe(w?.closest('.ant-table-wrapper')!);\n\n return () => {\n observer.current?.disconnect();\n };\n }, [bottomSpace, elementId, remaining]);\n\n return maxHeight;\n}\n\nexport function getElementComputedHeight(element?: Element | null): number {\n if (!element) {\n return 0;\n }\n\n const height = element.getBoundingClientRect().height;\n const offset = getElementTotalOffset(element);\n return Math.ceil(height + offset);\n}\n\nexport function getElementTotalOffset(element?: Element | null): number {\n if (!element) {\n return 0;\n }\n\n const height = element.getBoundingClientRect().height;\n const style = window.getComputedStyle(element);\n const marginTop = parseFloat(style.marginTop || '0');\n const marginBottom = parseFloat(style.marginBottom || '0');\n\n return Math.ceil(height - element.clientHeight + marginTop + marginBottom);\n}\n\nexport function lightenDarkenColor(col: string, amt: number) {\n let usePound = false;\n\n if (col[0] === '#') {\n col = col.slice(1);\n usePound = true;\n }\n\n const num = parseInt(col, 16);\n\n let r = (num >> 16) + amt;\n\n if (r > 255) r = 255;\n else if (r < 0) r = 0;\n\n let b = ((num >> 8) & 0x00ff) + amt;\n\n if (b > 255) b = 255;\n else if (b < 0) b = 0;\n\n let g = (num & 0x0000ff) + amt;\n\n if (g > 255) g = 255;\n else if (g < 0) g = 0;\n\n return (usePound ? '#' : '') + String('000000' + (g | (b << 8) | (r << 16)).toString(16)).slice(-6);\n}\n\nexport function logout(client: DecafClient, fromAll?: boolean) {\n client.barista\n .get(`/auth/${fromAll ? 'logoutall' : 'logout'}`, { timeout: 3000 })\n .catch((e) => {\n if (fromAll) {\n console.error(e);\n alert('Failed to logout from all devices. Please try to logout from each device individually.');\n }\n })\n .finally(() => {\n const DECAF_AUTH_COOKIE_NAME = 'ember_simple_auth-session';\n Cookies.remove(DECAF_AUTH_COOKIE_NAME);\n window.location.reload();\n });\n}\n\nexport function getGravatarUrl(email: string): Promise<string | undefined> {\n const url = `https://www.gravatar.com/avatar/${md5(email)}`;\n\n return fetch(`${url}?d=404`, { method: 'HEAD' })\n .then((response) => (response.status !== 200 ? undefined : url))\n .catch(() => undefined);\n}\n\nexport type BooleanMap<T> = { True: T; False: T };\n\nexport function booleanMap<T>(map: BooleanMap<T>): (x: boolean) => T {\n return (x) => (x ? map.True : map.False);\n}\n\nexport type NullableBooleanMap<T> = { Null: T } & BooleanMap<T>;\n\nexport function nullableBooleanMap<T>(map: NullableBooleanMap<T>): (x?: boolean | undefined | null) => T {\n return (x) => (x == null ? map.Null : booleanMap(map)(x));\n}\n\nexport enum Direction {\n Short = -1,\n Square = 0,\n Long = 1,\n}\n\nexport function toDirection(x: number | Decimal | Direction): Direction {\n switch (new Decimal(0).comparedTo(x)) {\n case 1:\n return Direction.Short;\n case 0:\n return Direction.Square;\n case -1:\n return Direction.Long;\n }\n return Direction.Square;\n}\n\nexport type DirectionMap<T> = { Short: T; Square: T; Long: T };\n\nexport function directionMap<T>(map: DirectionMap<T>): (x: number | Decimal | Direction) => T {\n return (x) => {\n switch (toDirection(x)) {\n case Direction.Short:\n return map.Short;\n case Direction.Square:\n return map.Square;\n case Direction.Long:\n return map.Long;\n }\n };\n}\n\nexport function setAtKey<T>(array: T[], items: T[], key: keyof T): T[] {\n const result: T[] = [...array];\n\n items.forEach((item) => {\n const index = result.findIndex((r) => r[key] === item[key]);\n\n if (index >= 0) {\n result[index] = item;\n } else {\n result.push(item);\n }\n });\n\n return result;\n}\n\nexport type DecafLoaderFactory<T> = (context: DecafContextType) => DecafLoader<T>;\n\nexport type DecafLoader<T> = (args: { request: Request; params: Params; context?: any }) => Promise<T>;\n\nexport function getSearchParams(request: Request): URLSearchParams {\n return new URL(request.url).searchParams;\n}\n\nexport function getSearchParam(request: Request, name: string): string | null {\n return new URL(request.url).searchParams.get(name);\n}\n\nexport function getSearchParamDefault(request: Request, name: string, defaultValue: string): string {\n return new URL(request.url).searchParams.get(name) ?? defaultValue;\n}\n\nexport function getSearchParamAll(request: Request, name: string): string[] {\n return new URL(request.url).searchParams.getAll(name);\n}\n","import { Interpolation, Theme } from '@emotion/react';\nimport { theme } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport { lightenDarkenColor } from '../utils';\n\nconst DARK_BLACK_PRIMARY = '#10161d';\nconst DARK_BLACK_SECONDARY = 'rgb(31, 41, 55)';\nconst DARK_BLACK_ELEVATED = 'rgb(20, 29, 41)';\nconst LIGHT_WHITE_PRIMARY = '#f3f4f6';\nconst LIGHT_WHITE_SECONDARY = 'white';\nconst LIGHT_BLACK_ELEVATED = '#fafbfc';\nconst INPUT_BG_COLOR = '#2c3d50';\nconst BORDER_COLORS_TRANSPARENT = {\n colorBorder: 'transparent',\n colorBorderSecondary: 'transparent',\n colorBorderBg: 'transparent',\n};\nconst HEADER_HEIGHT = 40;\nconst BREADCRUMB_HEIGHT = 54;\n\nexport const decafThemeLight: ThemeConfig = {\n hashed: true,\n algorithm: [theme.defaultAlgorithm],\n components: {\n Layout: {\n headerBg: '#ededed',\n headerHeight: HEADER_HEIGHT,\n },\n },\n token: {\n borderRadius: 0,\n colorBgContainer: LIGHT_WHITE_SECONDARY,\n colorBgBase: LIGHT_WHITE_PRIMARY,\n colorBgLayout: LIGHT_WHITE_PRIMARY,\n colorBgElevated: LIGHT_BLACK_ELEVATED,\n },\n};\n\nexport const decafThemeDark: ThemeConfig = {\n hashed: true,\n components: {\n Layout: {\n headerBg: DARK_BLACK_PRIMARY,\n headerHeight: HEADER_HEIGHT,\n },\n Button: {\n boxShadow: 'none',\n boxShadowSecondary: 'none',\n colorBgContainer: INPUT_BG_COLOR,\n },\n Input: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Select: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Checkbox: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Dropdown: {\n ...BORDER_COLORS_TRANSPARENT,\n },\n DatePicker: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n InputNumber: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Menu: {\n itemColor: 'rgba(255, 255, 255, 0.5)',\n },\n Tabs: {\n colorBorderSecondary: DARK_BLACK_ELEVATED,\n },\n },\n token: {\n fontFamily: 'Inter, sans-serif',\n colorPrimary: '#344961',\n colorBgBase: DARK_BLACK_SECONDARY,\n colorBgContainer: DARK_BLACK_PRIMARY,\n colorBgElevated: DARK_BLACK_ELEVATED,\n colorBorderSecondary: DARK_BLACK_SECONDARY,\n colorBorder: DARK_BLACK_SECONDARY,\n colorBgLayout: DARK_BLACK_SECONDARY,\n borderRadius: 0,\n green: '#48734d',\n red: '#b03a38',\n blue: '#0d6efd',\n yellow: '#ffc107',\n orange: '#fd7e14',\n colorWhite: '#fff',\n colorLink: '#a4bfff',\n colorLinkHover: '#7199fb',\n colorLinkActive: '#7199fb',\n },\n\n algorithm: [theme.darkAlgorithm],\n};\n\nfunction getBaseStyles(theme: ThemeConfig): Interpolation<Theme> {\n const menuOverride = {\n color: `white !important`,\n ':after': {\n borderBottomColor: 'white',\n },\n };\n\n return {\n body: {\n background: theme.token?.colorBgBase,\n fontFamily: 'Inter, sans-serif',\n margin: 0,\n },\n '#root': {\n minHeight: '100%',\n },\n button: {\n boxShadow: 'none !important',\n },\n '.ant-table-body': {\n overflow: 'auto !important',\n },\n '#decaf-header': {\n position: 'fixed',\n zIndex: 999,\n right: 0,\n left: 0,\n paddingInline: 16,\n display: 'flex',\n alignItems: 'center',\n },\n '#decaf-content': {\n paddingTop: decafThemeDark.components?.Layout?.headerHeight,\n paddingBottom: 32,\n '#decaf-layout-breadcrumb': {\n backgroundColor: theme.token?.colorBgElevated,\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n height: BREADCRUMB_HEIGHT,\n paddingInline: 16,\n boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.10)',\n ...breadcrumbStyles(),\n },\n '#decaf-layout-content-outlet': {\n minHeight: '100%',\n padding: 16,\n '&.full-screen': {\n padding: '0 !important',\n },\n },\n },\n '#decaf-footer': {\n position: 'fixed',\n bottom: 0,\n right: 0,\n left: 0,\n paddingBlock: 0,\n paddingInline: 0,\n zIndex: 999,\n boxShadow: '0px -2px 4px rgba(0, 0, 0, 0.15)',\n backgroundColor: decafThemeDark.components?.Layout?.headerBg,\n },\n '.dot': {\n borderRadius: '50%',\n width: 10,\n height: 10,\n display: 'inline-block',\n backgroundColor: 'rgba(255,255,255,.25)',\n '&.green': {\n backgroundColor: `#80ff00 !important`,\n },\n '&.yellow': {\n backgroundColor: `#ff0 !important`,\n },\n '&.orange': {\n backgroundColor: `#ff7000 !important`,\n },\n '&.red': {\n backgroundColor: `#ff0000 !important`,\n },\n },\n '.ant-menu-item-selected': menuOverride,\n '.ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected': menuOverride,\n '.ant-menu-light.ant-menu-horizontal >.ant-menu-submenu-selected, .ant-menu-light .ant-menu-submenu-selected >.ant-menu-submenu-title':\n menuOverride,\n };\n}\n\nexport function getLightStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...(baseStyles as any),\n };\n}\n\nexport function getDarkStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...baseStyles,\n '*': {\n '&::-webkit-scrollbar': {\n width: 10,\n height: 10,\n },\n '&::-webkit-scrollbar-track': {\n background: theme.token?.colorBgContainer,\n },\n '&::-webkit-scrollbar-thumb': {\n background: theme.token?.colorPrimary,\n },\n },\n '.ant-page-header-back-button, .ant-page-header-heading-title': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-badge-count': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-table-thead > tr > th': {\n background: `${lightenDarkenColor(theme.token?.colorBgContainer || '', -5)} !important`,\n '&:hover': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-table-filter-dropdown': {\n 'input, .ant-table-filter-dropdown-search-input': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n '.ant-dropdown-menu-item, .ant-dropdown-menu': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-tabs-tab-active': {\n '.ant-tabs-tab-btn': {\n color: `${theme.token?.colorWhite} !important`,\n },\n },\n '.ant-radio-button-wrapper-checked': {\n backgroundColor: `${theme.components?.Button?.colorBgContainer} !important`,\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-picker-date-panel': {\n '.ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end': {\n '&::before': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n '.ant-picker-cell-inner': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n },\n '.ant-picker-cell-range-start, .ant-picker-cell-range-end': {\n '.ant-picker-cell-inner': {\n background: `${theme.token?.colorPrimary} !important`,\n },\n },\n },\n };\n}\n\nfunction breadcrumbStyles() {\n const getCrumbColor = (theme: 'dark' | 'light') => {\n const colorBase = theme === 'dark' ? '255, 255, 255' : '0, 0, 0';\n return {\n color: `rgba(${colorBase}, 0.5) !important`,\n '&:hover': {\n color: `rgba(${colorBase}, 0.75) !important`,\n },\n };\n };\n\n const darkColors = {\n ...getCrumbColor('dark'),\n '&:last-child': {\n color: 'rgba(255, 255, 255, 0.85) !important',\n },\n };\n\n const lightColors = {\n ...getCrumbColor('light'),\n '&:last-child': {\n color: 'rgba(0, 0, 0, 0.85) !important',\n },\n };\n\n return {\n '.decaf-breadcrumb': {\n display: 'flex',\n alignItems: 'center',\n listStyle: 'none',\n margin: 0,\n padding: 0,\n '>li': {\n '&.separator': {\n paddingInline: 3,\n marginInline: 3,\n },\n 'a, span': {\n ...getCrumbColor('light'),\n },\n display: 'flex',\n alignItems: 'center',\n transition: 'color 0.2s',\n ...lightColors,\n },\n '&.dark': {\n '>li': {\n 'a, span': {\n ...getCrumbColor('dark'),\n },\n ...darkColors,\n },\n },\n },\n };\n}\n","import React from 'react';\n\nexport interface ThemeContextProps {\n theme: 'dark' | 'light';\n toggleTheme: () => void;\n}\n\nexport const ThemeContext = React.createContext<ThemeContextProps>({\n theme: 'dark',\n toggleTheme: () => {},\n});\n","import { css, Global } from '@emotion/react';\nimport { ConfigProvider } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React from 'react';\nimport { decafThemeDark, decafThemeLight, getDarkStyles, getLightStyles } from './-styles';\nimport { ThemeContext } from './-theme-context';\n\nexport interface ThemeProviderProps {\n children: React.ReactNode;\n themeConfig?: ThemeConfig;\n theme?: 'dark' | 'light';\n}\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n const [value, setValue] = React.useState<'dark' | 'light'>(() => {\n const theme = props.theme || localStorage.getItem('decafAppTheme');\n if (theme === 'dark' || theme === 'light') {\n return theme;\n }\n return 'dark';\n });\n\n function setTheme() {\n const t = value === 'dark' ? 'light' : 'dark';\n setValue(t);\n localStorage.setItem('decafAppTheme', t);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n let theme = value === 'light' ? decafThemeLight : decafThemeDark;\n theme = { ...theme, ...(props.themeConfig || {}) };\n theme = { ...theme, token: { ...theme.token, fontFamily: 'Inter, sans-serif' } };\n\n const globalStyles = value === 'light' ? getLightStyles(theme) : getDarkStyles(theme);\n\n return (\n <ThemeContext.Provider\n value={{\n theme: value,\n toggleTheme: setTheme,\n }}\n >\n <ConfigProvider theme={theme}>\n <Global\n styles={css`\n @import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap);\n `}\n />\n <Global styles={globalStyles} />\n\n {props.children}\n </ConfigProvider>\n </ThemeContext.Provider>\n );\n}\n","import React from 'react';\nimport { ThemeContext } from './-theme-context';\n\nexport const useDecafTheme = () => React.useContext(ThemeContext);\n","import { DownOutlined, RightOutlined } from '@ant-design/icons';\nimport { Dropdown, Grid } from 'antd';\nimport React, { ReactNode } from 'react';\nimport { Link } from 'react-router-dom';\nimport { useDecafTheme } from '../theme';\n\nexport interface BreadcrumbItem {\n title: ReactNode;\n href?: string;\n children?: { title: ReactNode; href?: string }[];\n}\n\nexport interface BreadcrumbProps {\n items: BreadcrumbItem[];\n itemRender?: (item: BreadcrumbItem) => ReactNode;\n separator?: ReactNode;\n}\n\nexport function Breadcrumb(props: BreadcrumbProps) {\n const { items, itemRender, separator } = props;\n const { theme } = useDecafTheme();\n const breakpoints = Grid.useBreakpoint();\n\n const firstAndLAst = items.slice(0, 1).concat(items.slice(-1));\n const _items = breakpoints.lg ? items : firstAndLAst;\n\n return (\n <ul className={`decaf-breadcrumb ${theme}`}>\n {renderBreadcrumbs(_items, separator || <RightOutlined />, itemRender)}\n </ul>\n );\n}\n\nfunction renderBreadcrumbs(\n items: BreadcrumbItem[],\n separator: ReactNode,\n itemRender?: (item: BreadcrumbItem) => ReactNode\n) {\n const result: ReactNode[] = [];\n\n items.forEach((item, i) => {\n const isLast = i === items.length - 1;\n\n if (item.href && !isLast) {\n result.push(\n <li key={i}>\n {itemRender ? (\n itemRender(item)\n ) : (\n <Link className=\"decaf-breadcrumb-link\" to={item.href}>\n {item.title}\n </Link>\n )}\n </li>\n );\n } else if (item.children) {\n const dmenu = item.children.map((child, j) => ({\n key: j,\n label: (\n <Link className=\"decaf-breadcrumb-link\" to={child.href!}>\n {child.title}\n </Link>\n ),\n }));\n\n result.push(\n <li key={i}>\n <Dropdown menu={{ items: dmenu }}>\n <div style={{ display: 'flex', cursor: 'pointer', gap: 3 }}>\n <span>{item.title}</span>\n <DownOutlined style={{ fontSize: 12 }} />\n </div>\n </Dropdown>\n </li>\n );\n } else {\n result.push(<li key={i}>{item.title}</li>);\n }\n if (i < items.length - 1) {\n result.push(\n <li key={`sep-${i}`} className=\"separator\">\n {separator}\n </li>\n );\n }\n });\n\n return result;\n}\n","import { HomeOutlined } from '@ant-design/icons';\nimport { Layout } from 'antd';\nimport React from 'react';\nimport { useMatches } from 'react-router-dom';\nimport { Breadcrumb, BreadcrumbItem } from './Breadcrumb';\n\ntype PageBreadcrumb = React.ReactNode | false;\n\nexport interface PageProps {\n /** When true, removes paddings from the content area. */\n isFullScreen?: boolean;\n /** The extra content to be rendered in the top right corner of the page. */\n extras?: React.ReactNode;\n children?: React.ReactNode;\n /**\n * This is for overriding the breadcrumb section. Do not use this to define your own breadcrumbs.\n * Instead, use the `crumb` property of the route item.\n *\n * - When leave untouched or passed `undefined`, the breadcrumb section will be rendered based on the route item config.\n * - When `false`, the breadcrumb section will be disabled. There will be nothing rendered on the top left corner.\n * - When a ReactNode passed, the node will be rendered instead of the breadcrumbs.\n */\n breadcrumb?: PageBreadcrumb;\n}\n\n/**\n * Page component.\n * Wrapping your pages with this component will give you the following features:\n * - Breadcrumbs\n * - Full screen mode\n * - Extra content area on the top right corner\n * - Automatically setting the document title based on the breadcrumbs\n * - Override the breadcrumb section with your own content\n *\n * You can implement your pages without wrapping them with this. However, you will have to implement the above features yourself if needed.\n *\n * Example usage:\n *\n * ```jsx\n * <Page {...props}>\n * <div>My page content</div>\n * </Page>\n * ```\n */\nexport default function Page(props: PageProps) {\n const matches: any = useMatches();\n const match = matches?.[matches?.length - 1];\n const isFullScreen = props.isFullScreen !== undefined ? props.isFullScreen : !!match?.handle?.fullScreen;\n const extras = props.extras !== undefined ? props.extras : match?.handle?.extras;\n\n return (\n <Layout.Content id=\"decaf-content\" style={{ flex: 1, minHeight: '100%' }}>\n <DecafLayoutPageTitle />\n <DecafLayoutBreadcrumb breadcrumb={props.breadcrumb}>{extras}</DecafLayoutBreadcrumb>\n\n <div id=\"decaf-layout-content-outlet\" className={isFullScreen ? 'full-screen' : ''}>\n {props.children}\n </div>\n </Layout.Content>\n );\n}\n\nfunction getAppNameFromDocumentTitle() {\n const title = document.title;\n if (title.split(' | ').length > 1) {\n return title.split(' | ')[title.split(' | ').length - 1];\n } else {\n return title;\n }\n}\n\nfunction getRenderedTitle() {\n // const div = document.createElement('div');\n // flushSync(() => {\n // createRoot(div).render(title);\n // });\n // return div.textContent || '';\n const bc = document.getElementById('decaf-layout-breadcrumb');\n const lastLi = bc?.querySelector('li:last-child');\n return (lastLi?.textContent || '').trim();\n}\n\nfunction DecafLayoutPageTitle() {\n const matches: any = useMatches();\n const crumbs = matches\n .filter((match: any) => Boolean(match.handle?.crumb))\n .map((match: any) => match.handle.crumb(match.data));\n const appName = getAppNameFromDocumentTitle();\n const title = crumbs?.[crumbs.length - 1]?.title;\n const rTitle = typeof title === 'string' ? title : getRenderedTitle();\n\n if (rTitle) {\n document.title = `${rTitle} | ${appName}`;\n } else {\n document.title = appName;\n }\n\n return null;\n}\n\nfunction DecafLayoutBreadcrumb(props: { children?: React.ReactNode; breadcrumb?: PageBreadcrumb }) {\n const matches = useMatches();\n\n if (props.breadcrumb === false) {\n return (\n <div id=\"decaf-layout-breadcrumb\" style={{ justifyContent: 'flex-end' }}>\n {props.children}\n </div>\n );\n } else if (props.breadcrumb) {\n return (\n <div id=\"decaf-layout-breadcrumb\">\n {props.breadcrumb}\n {props.children}\n </div>\n );\n } else {\n const crumbs = matches\n .filter((match: any) => Boolean(match.handle?.crumb))\n .map((match: any) => match.handle.crumb(match.data));\n\n const breadcrumb: BreadcrumbItem[] = [{ href: '/', title: <HomeOutlined /> }, ...crumbs].map((x, i) => ({\n ...x,\n _key: i,\n }));\n\n if (breadcrumb.length < 2) {\n return <></>;\n }\n\n return (\n <div id=\"decaf-layout-breadcrumb\">\n <Breadcrumb items={breadcrumb} />\n {props.children}\n </div>\n );\n }\n}\n","import { QuestionCircleOutlined } from '@ant-design/icons';\nimport { Button, Grid, theme } from 'antd';\nimport React from 'react';\n\nexport default function DocumentationButton() {\n const { token } = theme.useToken();\n const breakpoints = Grid.useBreakpoint();\n\n return (\n <Button\n type=\"link\"\n href=\"https://docs.decafhub.com\"\n target=\"_blank\"\n rel=\"noreferrer\"\n icon={<QuestionCircleOutlined />}\n style={{ backgroundColor: token.colorBgElevated }}\n >\n {!breakpoints.xs && 'Documentation'}\n </Button>\n );\n}\n","import React from 'react';\n\nexport default function Logo() {\n return (\n <svg\n version=\"1.1\"\n id=\"Layer_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 649.6 767.9\"\n enableBackground={'new 0 0 649.6 767.9'}\n xmlSpace=\"preserve\"\n width={32}\n height={32}\n >\n <g>\n <path\n fill=\"#52CEF4\"\n d=\"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z\"\n />\n <path\n fill=\"#52CEF4\"\n d=\"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z\"\n />\n </g>\n </svg>\n );\n}\n","import { EllipsisOutlined, MenuOutlined } from '@ant-design/icons';\nimport { Drawer, Grid, Menu, Typography } from 'antd';\nimport { ItemType, SubMenuType } from 'antd/es/menu/hooks/useItems';\nimport React, { useEffect } from 'react';\nimport { NavLink, useLocation, useMatches } from 'react-router-dom';\nimport { DecafMenuItem } from '../types';\n\nfunction getMenuItemKey(item: DecafMenuItem, isChild = false): string {\n if (!item) return '';\n if ('to' in item && item.to) {\n const parentKeyPrefix = item.to.substring(0, item.to.lastIndexOf('/')) || item.to;\n const parentKey = parentKeyPrefix + ':_parent_';\n return isChild ? parentKey : item.to;\n }\n if ('href' in item && item.href) return item.href + (isChild ? ':_parent_' : '');\n if ('children' in item && item.children) return getMenuItemKey(item.children[0], true);\n return '';\n}\n\nfunction buildAntMenuFromDecafMenu(routes: DecafMenuItem[]): ItemType[] {\n const result: ItemType[] = [];\n\n routes.forEach((route) => {\n const item: ItemType = {\n key: getMenuItemKey(route),\n label: route.label,\n icon: route.icon,\n };\n\n if ('to' in route && route.to) {\n item.label = (\n <NavLink to={route.to} end={route.to === '/'}>\n {route.label}\n </NavLink>\n );\n } else if ('href' in route && route.href) {\n item.label = <a href={route.href}>{route.label}</a>;\n } else if (route.children) {\n item.label = route.label;\n (item as SubMenuType).children = buildAntMenuFromDecafMenu(route.children || []);\n }\n\n result.push(item);\n });\n\n return result;\n}\n\nexport function DecafPoweredBy() {\n return (\n <Typography.Text type=\"secondary\">\n Powered by{' '}\n <a href=\"https://teloscube.com\" target=\"_blank\" rel=\"noreferrer\">\n Teloscube\n </a>\n </Typography.Text>\n );\n}\n\nexport interface MenuProps {\n title: string;\n menu: DecafMenuItem[];\n}\n\nexport default function DecafMenu(props: MenuProps) {\n const [drawerOpen, setDrawerOpen] = React.useState(false);\n const matches = useMatches();\n const location = useLocation();\n const { md } = Grid.useBreakpoint();\n\n const menuItems = buildAntMenuFromDecafMenu(props.menu);\n const matchedMenuItems = matches\n .map((match) => match.pathname)\n .filter((pathname) => (location.pathname !== '/' ? pathname !== '/' : true)); // WORKAROUND: the root path always matches. We don't want that.\n\n useEffect(() => {\n if (!md) {\n setDrawerOpen(false);\n }\n }, [location.pathname, md]);\n\n const menu = (\n <Menu\n items={menuItems}\n selectedKeys={matchedMenuItems}\n mode={md ? 'horizontal' : 'inline'}\n overflowedIndicator={<EllipsisOutlined style={{ fontSize: 20, color: 'white' }} />}\n style={{ flex: 'auto', justifyContent: 'flex-end', backgroundColor: 'transparent', border: 'none', minWidth: 0 }}\n />\n );\n\n if (md) {\n return menu;\n }\n\n return (\n <div style={{ display: 'flex', flex: 'auto', justifyContent: 'flex-end' }}>\n <MenuOutlined style={{ fontSize: 20, marginRight: 20 }} onClick={() => setDrawerOpen(!drawerOpen)} />\n\n <Drawer\n open={drawerOpen}\n footer={<DecafPoweredBy />}\n onClose={() => setDrawerOpen(false)}\n styles={{ body: { padding: 10 } }}\n width={document.body.clientWidth - 50 > 350 ? 350 : document.body.clientWidth * 0.85}\n >\n {menu}\n </Drawer>\n </div>\n );\n}\n","import { DownOutlined, UpOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\nexport default function PageScroller() {\n return (\n <div style={{ display: 'flex' }}>\n <Button\n type=\"text\"\n icon={<UpOutlined />}\n title=\"Scroll to top\"\n onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}\n />\n <Button\n type=\"text\"\n icon={<DownOutlined />}\n title=\"Scroll to bottom\"\n onClick={() => window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' })}\n />\n </div>\n );\n}\n","import { CameraOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport html2canvas from 'html2canvas';\nimport React from 'react';\n\nexport interface ScreenShotterProps {\n triggerNode?: React.ReactNode;\n}\n\nexport default function ScreenShotter(props: ScreenShotterProps) {\n async function handleScreenshot() {\n // hide footer before taking screenshot\n const footer = document.getElementById('decaf-footer');\n footer?.style.setProperty('display', 'none');\n\n const canvas = await html2canvas(document.body);\n const dataUrl = canvas.toDataURL('image/png');\n\n // show footer after taking screenshot\n footer?.style.setProperty('display', 'block');\n\n const link = document.createElement('a');\n link.download = 'screenshot.png';\n link.href = dataUrl;\n link.click();\n link.remove();\n }\n\n if (props.triggerNode) {\n return React.cloneElement(props.triggerNode as React.ReactElement, {\n onClick: handleScreenshot,\n });\n }\n\n return (\n <Button\n type=\"text\"\n icon={<CameraOutlined />}\n title=\"Take a screenshot of the current page\"\n onClick={handleScreenshot}\n />\n );\n}\n","import { BulbFilled, BulbOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\ninterface ThemeSwitcherProps {\n theme: 'dark' | 'light';\n onChange: () => void;\n}\nexport default function ThemeSwitcher(props: ThemeSwitcherProps) {\n return (\n <Button\n type=\"text\"\n icon={props.theme === 'dark' ? <BulbFilled /> : <BulbOutlined />}\n title={props.theme === 'dark' ? 'Switch to light theme' : 'Switch to dark theme'}\n onClick={() => props.onChange()}\n />\n );\n}\n","import { InfoCircleOutlined, LogoutOutlined, UserOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Avatar, Dropdown } from 'antd';\nimport React, { useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { getGravatarUrl, logout } from '../utils';\n\nexport function UserProfileDropdown() {\n const [gravatar, setGravatar] = useState<string | undefined>(undefined);\n const decaf = useDecaf();\n const navigate = useNavigate();\n\n useEffect(() => {\n if (!decaf.me.email) {\n return;\n }\n\n getGravatarUrl(decaf.me.email).then(setGravatar);\n }, [decaf.me.email]);\n\n const doLogout = () => logout(decaf.client, false);\n const doLogoutAll = () => window.confirm('Logout from all sessions?') && logout(decaf.client, true);\n const doGoToAbout = () => navigate('/about');\n\n const items = [\n {\n key: 'me',\n label: decaf.me.fullname || decaf.me.username,\n title: decaf.me.email,\n disabled: true,\n icon: <UserOutlined />,\n style: { cursor: 'default' },\n },\n { key: 'divider-1', dashed: true, type: 'divider' },\n { key: 'logout', label: 'Logout', icon: <LogoutOutlined />, onClick: doLogout },\n { key: 'logout-all', label: 'Logout All Sessions', icon: <LogoutOutlined />, onClick: doLogoutAll },\n { key: 'divider-2', dashed: true, type: 'divider' },\n { key: 'about', label: 'About', icon: <InfoCircleOutlined />, onClick: doGoToAbout },\n ];\n\n const propsAvatar: any = gravatar\n ? { src: gravatar }\n : {\n icon: <UserOutlined style={{ color: 'rgba(255,255,255, 0.5)' }} />,\n style: { backgroundColor: 'transparent', border: '1px solid rgba(255,255,255, 0.5)' },\n };\n\n return (\n <Dropdown trigger={['click']} menu={{ items }}>\n <Avatar {...propsAvatar} style={{ ...propsAvatar.style, cursor: 'pointer' }} />\n </Dropdown>\n );\n}\n","import { CaretUpOutlined } from '@ant-design/icons';\nimport { Button, Dropdown, Grid } from 'antd';\nimport React from 'react';\n\ntype VersionCode = 'production' | 'staging' | 'testing' | 'development' | 'preview' | 'release';\n\nexport type Version = {\n code: VersionCode;\n name: string;\n color: string;\n url: string;\n show: boolean;\n};\n\nfunction getAppNameFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 1];\n }\n}\n\nfunction getAppVersionFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 2];\n }\n}\n\nfunction isPreviewVersion(version: string) {\n return version.startsWith('preview-') && version.length > 8;\n}\n\nfunction isReleaseVersion(version: string) {\n return version.startsWith('v') && version.length > 1;\n}\n\nfunction getAppVersionCode(version: string) {\n if (isPreviewVersion(version)) {\n return 'preview';\n } else if (isReleaseVersion(version)) {\n return 'release';\n } else {\n return version;\n }\n}\n\nfunction getCurrentAppPath(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts.slice(indexOfWebapps + 3).join('/');\n }\n}\n\nexport default function VersionSelector() {\n const appName = getAppNameFromUrl(window.location.href);\n const appVersion = getAppVersionFromUrl(window.location.href); // development, staging, preview-123, v1.0.0\n const appVersionCode = getAppVersionCode(appVersion); // development, staging, preview, release\n const { md } = Grid.useBreakpoint();\n\n const versions: Version[] = [\n {\n code: 'development',\n name: 'Development Version',\n color: 'red',\n url: `/webapps/${appName}/development/${getCurrentAppPath(window.location.href)}`,\n show: process.env.NODE_ENV === 'development',\n },\n {\n code: 'testing',\n name: 'Testing Version',\n color: 'orange',\n url: `/webapps/${appName}/testing/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'staging',\n name: 'Staging Version',\n color: 'yellow',\n url: `/webapps/${appName}/staging/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'production',\n name: 'Production Version',\n color: 'green',\n url: `/webapps/${appName}/production/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'preview',\n name: 'Preview Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n {\n code: 'release',\n name: 'Release Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n ];\n\n const currentVersion = versions.find((v) => v.code === appVersionCode);\n const isProd = currentVersion?.code === 'production';\n\n if (!currentVersion) {\n return null;\n }\n\n return (\n <Dropdown\n placement=\"top\"\n arrow\n menu={{\n items: versions\n .filter((v) => v.show)\n .map((version) => ({\n key: version.name,\n label: (\n <span>\n <i className={`dot ${version.color}`} /> {version.name}\n </span>\n ),\n onClick: () => {\n window.location.href = version.url;\n },\n })),\n }}\n >\n <Button\n type=\"text\"\n style={{\n width: isProd ? 32 : 'initial',\n padding: isProd ? 0 : 'revert',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n icon={<i className={`dot ${currentVersion?.color}`} />}\n >\n <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>\n {!isProd && md && (\n <>\n <span style={{ marginInline: 5 }}>\n You are on <b>{currentVersion.name}</b>\n </span>\n <CaretUpOutlined />\n </>\n )}\n </div>\n </Button>\n </Dropdown>\n );\n}\n","import { MessageOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button, Grid, theme } from 'antd';\nimport React, { useEffect, useState } from 'react';\n\nconst ZENDESK_WIDGET_SCRIPT = 'https://static.zdassets.com/ekr/snippet.js';\n\ndeclare global {\n // eslint-disable-next-line no-unused-vars\n interface Window {\n zE: any;\n zESettings: any;\n }\n}\n\nexport default function ZendeskWidget() {\n const { me, publicConfig } = useDecaf();\n const [open, setOpen] = useState(false);\n const { token } = theme.useToken();\n const breakpoints = Grid.useBreakpoint();\n\n useEffect(() => {\n if (!publicConfig.zendesk || typeof document === 'undefined') return;\n const script = document.createElement('script');\n script.src = ZENDESK_WIDGET_SCRIPT + '?key=' + publicConfig.zendesk;\n script.async = true;\n script.id = 'ze-snippet'; // do not change this. zendesk expects this to be ze-snippet\n script.onload = () => {\n window.zE('webWidget', 'hide');\n window.zE('webWidget:on', 'open', () => {\n window.zE('webWidget', 'show');\n setOpen(true);\n });\n window.zE('webWidget:on', 'close', () => {\n window.zE('webWidget', 'hide');\n setOpen(false);\n });\n };\n\n document.body.appendChild(script);\n window.zESettings = {\n webWidget: {\n offset: {\n horizontal: -7,\n vertical: 20,\n },\n },\n contactForm: {\n subject: true,\n fields: [\n {\n id: 'name',\n prefill: { '*': me.fullname },\n },\n {\n id: 'email',\n prefill: { '*': me.email },\n },\n ],\n },\n };\n\n return () => {\n document.body.removeChild(script);\n };\n }, [publicConfig, me]);\n\n function toggle() {\n if (open) {\n window.zE?.('webWidget', 'close');\n } else {\n window.zE?.('webWidget', 'open');\n }\n setOpen(!open);\n }\n\n if (!publicConfig.zendesk) return null;\n\n return (\n <Button type=\"link\" icon={<MessageOutlined />} style={{ backgroundColor: token.colorBgElevated }} onClick={toggle}>\n {!breakpoints.xs && 'Support'}\n </Button>\n );\n}\n","import { useNProgress } from '@tanem/react-nprogress';\nimport { Col, ConfigProvider, Grid, Layout, Row, Typography } from 'antd';\nimport React from 'react';\nimport { Link, Outlet, useLocation, useNavigation } from 'react-router-dom';\nimport { decafThemeDark, useDecafTheme } from '../theme';\nimport { DecafMenuItem } from '../types';\nimport DocumentationButton from './DocumentationButton';\nimport Logo from './Logo';\nimport DecafMenu, { DecafPoweredBy } from './Menu';\nimport PageScroller from './PageScroller';\nimport ScreenShotter from './Screenshotter';\nimport ThemeSwitcher from './ThemeSwitcher';\nimport { UserProfileDropdown } from './UserProfileDropdown';\nimport VersionSelector from './VersionSelector';\nimport ZendeskWidget from './ZendeskWidget';\n\nexport interface DecafLayoutProps {\n menu: DecafMenuItem[];\n appName: string;\n children?: React.ReactNode;\n}\n\nexport default function DecafLayout(props: DecafLayoutProps) {\n const location = useLocation();\n const navigation = useNavigation();\n const breakpoints = Grid.useBreakpoint();\n const { theme: currentTheme, toggleTheme: setCurrentTheme } = useDecafTheme();\n\n return (\n <Layout style={{ height: '100%' }}>\n <DecafLayoutProgress isAnimating={navigation.state === 'loading'} key={location.key} />\n\n <ConfigProvider theme={decafThemeDark}>\n <Layout.Header id=\"decaf-header\">\n <DecafLayoutBrand title={props.appName} />\n <DecafMenu title={props.appName} menu={props.menu} />\n <UserProfileDropdown />\n </Layout.Header>\n </ConfigProvider>\n\n <Outlet />\n {props.children ?? null}\n\n <ConfigProvider theme={decafThemeDark}>\n <Layout.Footer id=\"decaf-footer\">\n <Row justify=\"space-between\" align={'middle'}>\n <Col span={breakpoints.lg ? 10 : 12}>\n <ZendeskWidget />\n <span style={{ display: 'inline-block', width: 1 }} />\n <DocumentationButton />\n </Col>\n\n <Col span={breakpoints.lg ? 4 : 0} style={{ textAlign: 'center' }}>\n <DecafPoweredBy />\n </Col>\n\n <Col span={breakpoints.lg ? 10 : 12} style={{ justifyContent: 'flex-end', display: 'flex', gap: 10 }}>\n <VersionSelector />\n <ThemeSwitcher theme={currentTheme} onChange={setCurrentTheme} />\n <ScreenShotter />\n <PageScroller />\n </Col>\n </Row>\n </Layout.Footer>\n </ConfigProvider>\n </Layout>\n );\n}\n\nexport function DecafLayoutBrand({ title }: { title: string }) {\n const breakpoints = Grid.useBreakpoint();\n\n return (\n <Link to=\"/\" style={{ display: 'flex', alignItems: 'center', gap: 10 }}>\n <Logo />\n\n {breakpoints.lg && (\n <Typography.Title\n level={1}\n style={{\n margin: 0,\n fontWeight: 'normal',\n fontSize: 20,\n color: 'rgba(255, 255, 255, 0.75)',\n whiteSpace: 'nowrap',\n }}\n >\n {title}\n </Typography.Title>\n )}\n </Link>\n );\n}\n\nexport function DecafLayoutProgress({ isAnimating }: { isAnimating: boolean }) {\n const { animationDuration, isFinished, progress } = useNProgress({ isAnimating });\n\n return (\n <div\n style={{\n opacity: isFinished ? 0 : 1,\n pointerEvents: 'none',\n transition: `opacity ${animationDuration}ms linear`,\n }}\n >\n <div\n style={{\n background: '#29d',\n height: 2,\n left: 0,\n marginLeft: `${(-1 + progress) * 100}%`,\n position: 'fixed',\n top: 0,\n transition: `margin-left ${animationDuration}ms linear`,\n width: '100%',\n zIndex: 1031,\n }}\n >\n <div\n style={{\n boxShadow: '0 0 10px #29d, 0 0 5px #29d',\n display: 'block',\n height: '100%',\n opacity: 1,\n position: 'absolute',\n right: 0,\n transform: 'rotate(3deg) translate(0px, -4px)',\n width: 100,\n }}\n />\n </div>\n </div>\n );\n}\n","import { useDecaf } from '@decafhub/decaf-react';\nimport { Card, Col, Row, Statistic } from 'antd';\nimport React, { useEffect, useState } from 'react';\nimport Page from './Page';\n\nexport interface AboutPageProps {\n appName?: string;\n appVersion?: string;\n appDescription?: string;\n content?: React.ReactNode;\n}\n\nexport default function PageAbout(props: AboutPageProps) {\n const { client } = useDecaf();\n const [versionCultproxy, setVersionCultproxy] = useState<string | undefined>(undefined);\n const [versionBarista, setVersionBarista] = useState<string | undefined>(undefined);\n const [versionEstate, setVersionEstate] = useState<string | undefined>(undefined);\n\n useEffect(() => {\n client.bare.get<{ version: string }>('/_cultproxy').then(({ data }) => setVersionCultproxy(data.version));\n client.barista.get<{ version: string }>('/version/').then(({ data }) => setVersionBarista(data.version));\n client.bare.get<string>('/apis/estate/version').then(({ data }) => setVersionEstate(data));\n }, [client]);\n\n return (\n <Page>\n <Row gutter={[16, 16]}>\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 24 }} lg={{ span: 12 }} xl={{ span: 8 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"Application Name\" value={props.appName} />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} lg={{ span: 12 }} xl={{ span: 16 }} xxl={{ span: 18 }}>\n <Card bordered={false}>\n <Statistic title=\"Application Description\" value={props.appDescription} />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"Application Version\" value={props.appVersion} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"DECAF Cultproxy Version\" value={versionCultproxy} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"DECAF Barista Version\" value={versionBarista} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"DECAF Estate Version\" value={versionEstate} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col span={24}>{props.content}</Col>\n </Row>\n </Page>\n );\n}\n","import {\n DecafApp,\n DecafAppConfig,\n DecafAppController,\n DecafContextType,\n DecafWebappController,\n useDecaf,\n} from '@decafhub/decaf-react';\nimport { App } from 'antd';\nimport 'antd/dist/reset.css';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport qs from 'query-string';\nimport React, { useEffect } from 'react';\nimport { RouteObject, RouterProvider, createBrowserRouter } from 'react-router-dom';\nimport { QueryParamProvider } from 'use-query-params';\nimport { ReactRouter6Adapter } from 'use-query-params/adapters/react-router-6';\nimport { BreadcrumbItem } from '../components/Breadcrumb';\nimport { Page404, PageRouteError } from '../components/Error';\nimport DecafLayout from '../components/Layout';\nimport Page from '../components/Page';\nimport PageAbout from '../components/PageAbout';\nimport { ThemeProvider } from '../theme';\nimport { DecafMenuItem } from '../types';\nimport { setAtKey } from '../utils';\nimport { getPlausibleScript } from './-plausible';\n\n/**\n * DECAF Web appliaction route type.\n */\nexport type DecafRoute = Omit<RouteObject, 'children'> & {\n /** Define breadcrumbs for this route.\n *\n * @param data It is the return value of the `loader` function.\n * @returns A breadcrumb item.\n *\n * Example:\n * ```ts\n * { crumb: (data?: MyRecord) => ({ title: data?.title, href: `/details/${data?.id}` }) }\n * // or\n * { crumb: () => ({ title: \"My Page\", href: `/my-page` }) }\n * ```\n */\n crumb?: (data?: any) => BreadcrumbItem;\n /** When true, removes paddings from the content area. */\n fullScreen?: boolean;\n /** The extra content to be rendered in the top right corner of the page. */\n extras?: React.ReactNode;\n /** Child routes. */\n children?: DecafRoute[];\n};\n\n/**\n * DECAF Web application route items builder.\n */\nexport type DecafRouteItemsBuilder = (context: DecafContextType) => DecafRoute[];\n\n/**\n * DECAF Web application menu items builder.\n */\nexport type DecafMenuItemsBuilder = (context: DecafContextType) => DecafMenuItem[];\n\n/**\n * DECAF Web application properties.\n */\nexport interface DecafWebappProps {\n /**\n * DECAF application name.\n */\n appName: string;\n\n /**\n * DECAF application description.\n */\n appDescription?: string;\n\n /**\n * DECAF application configuration.\n */\n config?: DecafAppConfig;\n\n /**\n * DECAF application controller.\n */\n controller?: DecafAppController;\n\n /**\n * The theme of the app.\n *\n * Defaults to `dark`.\n */\n theme?: 'dark' | 'light';\n\n /**\n * The theme config of the app.\n *\n * This will be merged with the default theme config (dark or light).\n *\n * See https://ant.design/docs/react/customize-theme\n */\n themeConfig?: ThemeConfig;\n\n /**\n * Builds a collection of DECAF route items.\n *\n * About page and 404 page will be added automatically.\n *\n * See https://reactrouter.com/en/main/routers/create-browser-router#routes\n */\n buildRouteItems: DecafRouteItemsBuilder;\n\n /**\n * Builds a collection of DECAF menu items.\n *\n * About page will be added automatically.\n */\n buildMenuItems: DecafMenuItemsBuilder;\n\n /**\n * The extra content to show on the about page.\n */\n buildAboutPageContent?: (context: DecafContextType) => React.ReactNode;\n}\n\nexport function DecafWebapp(props: DecafWebappProps) {\n // Manage Plausible script:\n useEffect(() => {\n const script = getPlausibleScript();\n document.body.appendChild(script);\n return () => {\n document.body.removeChild(script);\n };\n }, []);\n\n // Get or create the DECAF Webapp controller:\n const controller = props.controller || DecafWebappController;\n controller.disableZendeskWidget = true;\n\n // Prepare the DECAF Web application and return:\n return (\n <ThemeProvider themeConfig={props.themeConfig} theme={props.theme}>\n <App>\n <DecafApp config={props.config} controller={controller}>\n <DecafWebappInternal {...props} />\n </DecafApp>\n </App>\n </ThemeProvider>\n );\n}\n\n/**\n * Auxiliary DECAF Webapp component.\n */\nexport function DecafWebappInternal(props: DecafWebappProps) {\n const decaf = useDecaf();\n\n const defaultRoutes = [\n {\n path: '/about',\n element: (\n <PageAbout\n appName={props.appName}\n appVersion={props.config?.currentVersion}\n appDescription={props.appDescription}\n content={props.buildAboutPageContent?.(decaf)}\n />\n ),\n crumb: () => ({ title: 'About' }),\n },\n {\n path: '*',\n element: (\n <Page>\n <Page404 />\n </Page>\n ),\n crumb: () => ({ title: 'Page Not Found' }),\n },\n ];\n\n const routes = setAtKey<DecafRoute>(props.buildRouteItems(decaf), defaultRoutes, 'path');\n\n const router = createBrowserRouter(compileRoutes(props, decaf, routes), { basename: props.config?.basePath });\n\n return <RouterProvider router={router} />;\n}\n\nexport function compileRoutes(props: DecafWebappProps, context: DecafContextType, routes: DecafRoute[]) {\n const menu = props.buildMenuItems(context);\n return [\n {\n element: (\n <QueryParamProvider\n adapter={ReactRouter6Adapter}\n options={{\n removeDefaultsFromUrl: true,\n searchStringToObject: qs.parse,\n objectToSearchString: qs.stringify,\n enableBatching: true,\n includeAllParams: true,\n }}\n >\n <DecafLayout menu={menu} appName={props.appName} />\n </QueryParamProvider>\n ),\n path: '/',\n children: routes.map(decafRouteToReactRoute),\n errorElement: (\n <DecafLayout menu={menu} appName={props.appName}>\n <Page breadcrumb={false}>\n <PageRouteError />\n </Page>\n </DecafLayout>\n ),\n },\n ];\n}\n\nexport function decafRouteToReactRoute(route: DecafRoute): RouteObject {\n const { crumb, fullScreen, extras, children, ...rest } = route;\n\n if (children) {\n // @ts-expect-error\n return { ...rest, handle: { crumb, fullScreen, extras }, children: children.map(decafRouteToReactRoute) };\n } else {\n return { ...rest, handle: { crumb, fullScreen, extras } };\n }\n}\n","export function getPlausibleScript(): HTMLScriptElement {\n const script = document.createElement('script');\n\n script.defer = true;\n script.setAttribute('data-domain', location.hostname);\n script.src = 'https://webax.svc.sys.decafhub.com/js/plausible.js';\n\n return script;\n}\n"],"names":["ErrorPageSubtitle","_ref","React","createElement","Fragment","Typography","message","Link","to","Button","style","marginTop","Page401","Result","icon","LockFilled","color","title","subTitle","Page403","status","Page404","PageError","PageRouteError","error","useRouteError","isRouteErrorResponse","Direction","FOOTER_HEIGHT","FOOTER_PADDING","useRemaningHeight","elementId","_useState","useState","remainingHeight","setRemainingHeight","useLayoutEffect","e","document","getElementById","calculate","elementTop","getBoundingClientRect","top","elementHeight","window","innerHeight","addEventListener","removeEventListener","useTableMaxHeight","bottomSpace","_useState2","maxHeight","setMaxHeight","remaining","observer","useRef","w","current","ResizeObserver","max","forEach","tableWrapper","_tableWrapper$target$","tHeaderHeight","getElementComputedHeight","target","querySelector","tFooterHeight","tContainerOffset","getElementTotalOffset","paginations","querySelectorAll","paginationHeights","Array","from","reduce","acc","cur","observe","closest","_observer$current","disconnect","element","height","offset","Math","ceil","getComputedStyle","parseFloat","marginBottom","clientHeight","lightenDarkenColor","col","amt","usePound","slice","num","parseInt","r","b","g","String","toString","logout","client","fromAll","barista","get","timeout","console","alert","Cookies","remove","location","reload","booleanMap","map","x","True","False","nullableBooleanMap","Null","toDirection","Decimal","comparedTo","Short","Square","Long","directionMap","setAtKey","array","items","key","result","concat","item","index","findIndex","push","getSearchParams","request","URL","url","searchParams","getSearchParam","name","getSearchParamDefault","defaultValue","_URL$searchParams$get","getSearchParamAll","getAll","DARK_BLACK_PRIMARY","DARK_BLACK_SECONDARY","DARK_BLACK_ELEVATED","LIGHT_WHITE_PRIMARY","INPUT_BG_COLOR","BORDER_COLORS_TRANSPARENT","colorBorder","colorBorderSecondary","colorBorderBg","BREADCRUMB_HEIGHT","decafThemeLight","hashed","algorithm","theme","defaultAlgorithm","components","Layout","headerBg","headerHeight","token","borderRadius","colorBgContainer","colorBgBase","colorBgLayout","colorBgElevated","decafThemeDark","boxShadow","boxShadowSecondary","Input","_extends","Select","Checkbox","Dropdown","DatePicker","InputNumber","Menu","itemColor","Tabs","fontFamily","colorPrimary","green","red","blue","yellow","orange","colorWhite","colorLink","colorLinkHover","colorLinkActive","darkAlgorithm","getBaseStyles","_theme$token","_decafThemeDark$compo","_decafThemeDark$compo2","_theme$token2","_decafThemeDark$compo3","_decafThemeDark$compo4","getCrumbColor","darkColors","lightColors","menuOverride","borderBottomColor","body","background","margin","minHeight","button","overflow","position","zIndex","right","left","paddingInline","display","alignItems","paddingTop","paddingBottom","backgroundColor","flexDirection","justifyContent","width","colorBase","listStyle","padding","marginInline","transition","bottom","paddingBlock","_templateObject","ThemeContext","createContext","toggleTheme","useDecafTheme","useContext","ThemeProvider","props","_React$useState","localStorage","getItem","value","setValue","themeConfig","globalStyles","baseStyles","getLightStyles","_theme$token3","_theme$token4","_theme$token5","_theme$token6","_theme$token7","_theme$token8","_theme$token9","_theme$token10","_theme$token11","_theme$components","_theme$components$But","_theme$token12","_theme$token13","_theme$token14","_theme$token15","getDarkStyles","Provider","t","setItem","ConfigProvider","Global","styles","css","children","Breadcrumb","itemRender","separator","breakpoints","Grid","useBreakpoint","firstAndLAst","className","i","href","length","dmenu","child","j","label","menu","cursor","gap","DownOutlined","fontSize","renderBreadcrumbs","lg","RightOutlined","Page","_match$handle","_match$handle2","matches","useMatches","match","isFullScreen","undefined","handle","fullScreen","extras","Content","id","flex","DecafLayoutPageTitle","DecafLayoutBreadcrumb","breadcrumb","_crumbs","bc","lastLi","crumbs","filter","_match$handle3","Boolean","crumb","data","appName","split","getAppNameFromDocumentTitle","rTitle","textContent","trim","_match$handle4","HomeOutlined","_key","DocumentationButton","useToken","type","rel","QuestionCircleOutlined","xs","Logo","version","xmlns","xmlnsXlink","y","viewBox","enableBackground","xmlSpace","fill","d","getMenuItemKey","isChild","parentKeyPrefix","substring","lastIndexOf","buildAntMenuFromDecafMenu","routes","route","NavLink","end","DecafPoweredBy","Text","DecafMenu","drawerOpen","setDrawerOpen","useLocation","md","menuItems","matchedMenuItems","pathname","useEffect","selectedKeys","mode","overflowedIndicator","EllipsisOutlined","border","minWidth","MenuOutlined","marginRight","onClick","Drawer","open","footer","onClose","clientWidth","PageScroller","UpOutlined","scrollTo","behavior","scrollHeight","ScreenShotter","handleScreenshot","setProperty","Promise","resolve","html2canvas","then","canvas","dataUrl","toDataURL","link","download","click","reject","triggerNode","cloneElement","CameraOutlined","ThemeSwitcher","BulbFilled","BulbOutlined","onChange","UserProfileDropdown","gravatar","setGravatar","decaf","useDecaf","navigate","useNavigate","email","me","md5","fetch","method","response","fullname","username","disabled","UserOutlined","dashed","LogoutOutlined","confirm","InfoCircleOutlined","propsAvatar","src","trigger","Avatar","getCurrentAppPath","parts","indexOfWebapps","indexOf","join","VersionSelector","appVersion","getAppVersionFromUrl","appVersionCode","startsWith","isPreviewVersion","isReleaseVersion","versions","code","show","process","env","NODE_ENV","currentVersion","find","v","isProd","placement","arrow","CaretUpOutlined","ZENDESK_WIDGET_SCRIPT","ZendeskWidget","_useDecaf","publicConfig","setOpen","zendesk","script","async","onload","zE","appendChild","zESettings","webWidget","horizontal","vertical","contactForm","subject","fields","prefill","removeChild","MessageOutlined","DecafLayout","_props$children","navigation","useNavigation","_useDecafTheme","currentTheme","setCurrentTheme","DecafLayoutProgress","isAnimating","state","Header","DecafLayoutBrand","Outlet","Footer","Row","justify","align","Col","span","textAlign","Title","level","fontWeight","whiteSpace","_ref2","_useNProgress","useNProgress","animationDuration","opacity","isFinished","pointerEvents","marginLeft","progress","transform","PageAbout","versionCultproxy","setVersionCultproxy","versionBarista","setVersionBarista","_useState3","versionEstate","setVersionEstate","bare","_ref3","gutter","sm","xl","xxl","Card","bordered","Statistic","appDescription","prefix","content","_excluded","DecafWebapp","defer","setAttribute","hostname","getPlausibleScript","controller","DecafWebappController","disableZendeskWidget","App","DecafApp","config","DecafWebappInternal","_props$config","_props$config2","defaultRoutes","path","buildAboutPageContent","buildRouteItems","router","createBrowserRouter","context","buildMenuItems","QueryParamProvider","adapter","ReactRouter6Adapter","options","removeDefaultsFromUrl","searchStringToObject","qs","parse","objectToSearchString","stringify","enableBatching","includeAllParams","decafRouteToReactRoute","errorElement","compileRoutes","basename","basePath","RouterProvider","rest","_objectWithoutPropertiesLoose"],"mappings":"k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,CAAAA,oIAJsCC,CAAK7N,EAAKmL,IAE1DrQ,EAEgBgC,CAAAA,OAAQ,CAAEgB,MAAAA,EAAOf,WAAAA,EAAYC,OAAAA,GAAUlC,SAAUA,EAASnK,IAAI2c,MAE9DxQ,OAAQ,CAAEgB,MAAAA,EAAOf,WAAAA,EAAYC,OAAAA,IAEnD"}
1
+ {"version":3,"file":"index.module.js","sources":["../src/components/Error.tsx","../src/utils.tsx","../src/theme/-styles.tsx","../src/theme/-theme-context.tsx","../src/theme/-theme-provider.tsx","../src/theme/-theme-hooks.tsx","../src/components/Breadcrumb.tsx","../src/components/Page.tsx","../src/components/DocumentationButton.tsx","../src/components/Logo.tsx","../src/components/Menu.tsx","../src/components/PageScroller.tsx","../src/components/Screenshotter.tsx","../src/components/ThemeSwitcher.tsx","../src/components/UserProfileDropdown.tsx","../src/components/VersionSelector.tsx","../src/components/ZendeskWidget.tsx","../src/components/Layout.tsx","../src/components/PageAbout.tsx","../src/machinery/index.tsx","../src/machinery/-plausible.tsx"],"sourcesContent":["import { LockFilled } from '@ant-design/icons';\nimport { Button, Result, Typography } from 'antd';\nimport React from 'react';\nimport { Link, isRouteErrorResponse, useRouteError } from 'react-router-dom';\n\nfunction ErrorPageSubtitle({ message }: { message: string }) {\n return (\n <>\n <Typography>{message}</Typography>\n <Link to=\"/\">\n <Button style={{ marginTop: 20 }}>Home Page</Button>\n </Link>\n </>\n );\n}\n\nexport function Page401() {\n return (\n <Result\n icon={<LockFilled style={{ color: '#ff603b' }} />}\n title={'Authentication Error'}\n subTitle={<ErrorPageSubtitle message={'Your credentials are invalid. Please try to log in again.'} />}\n />\n );\n}\n\nexport function Page403() {\n return (\n <Result\n status=\"403\"\n title={'Access Denied'}\n subTitle={<ErrorPageSubtitle message={'You are not authorized to access this content.'} />}\n />\n );\n}\n\nexport function Page404() {\n return (\n <Result\n status=\"404\"\n title={'Page Not Found'}\n subTitle={<ErrorPageSubtitle message={'Sorry, the page you visited does not exist.'} />}\n />\n );\n}\n\nexport function PageError() {\n return (\n <Result\n status=\"500\"\n title={'Error'}\n subTitle={\n <ErrorPageSubtitle\n message={\n 'Something went wrong. Please try again later. If the problem persists, please contact the administrator.'\n }\n />\n }\n />\n );\n}\n\nexport function PageRouteError() {\n const error = useRouteError();\n\n if (isRouteErrorResponse(error)) {\n switch (error.status) {\n case 401:\n return <Page401 />;\n case 403:\n return <Page403 />;\n case 404:\n return <Page404 />;\n default:\n return <PageError />;\n }\n } else {\n return <PageError />;\n }\n}\n","import { DecafClient } from '@decafhub/decaf-client';\nimport { DecafContextType } from '@decafhub/decaf-react';\nimport Decimal from 'decimal.js';\nimport Cookies from 'js-cookie';\nimport md5 from 'md5';\nimport { useLayoutEffect, useRef, useState } from 'react';\nimport { Params } from 'react-router-dom';\n\nconst FOOTER_HEIGHT = 32;\nconst FOOTER_PADDING = 16;\n\n/**\n * This hook is used to calculate the remaining height of an element.\n * It takes into account the footer height and padding.\n *\n * @param elementId the id of the element to calculate the available height.\n * @returns the remaining height of the element.\n */\nexport function useRemaningHeight(elementId: string): number {\n const [remainingHeight, setRemainingHeight] = useState<number>(0);\n\n useLayoutEffect(() => {\n const e = document.getElementById(elementId);\n\n const calculate = () => {\n if (!e) {\n return;\n }\n\n const elementTop = e.getBoundingClientRect().top;\n const elementHeight = window.innerHeight - elementTop - FOOTER_HEIGHT - FOOTER_PADDING;\n setRemainingHeight(elementHeight);\n };\n\n calculate();\n e?.addEventListener('resize', calculate);\n window.addEventListener('resize', calculate);\n\n return () => {\n window.removeEventListener('resize', calculate);\n e?.removeEventListener('resize', calculate);\n };\n }, [elementId]);\n\n return remainingHeight;\n}\n\n/**\n * This hook is used to calculate the max possible height of a table.\n * It is used to set the height of the table to make it scrollable\n * when the content is too large.\n * @param elementId the id of the element that contains the table.\n * @param bottomSpace extra space to be added to the bottom of the table container.\n * @returns the max height of the table.\n * @example\n * ```tsx\n * const maxHeight = useTableMaxHeight('table-container', 50);\n * return (\n * <Table\n {...tableProps}\n id={'table-container'}\n scroll={{\n x: 'max-content',\n y: maxHeight,\n }}\n />\n* );\n* ```\n**/\nexport function useTableMaxHeight(elementId: string, bottomSpace: number = 0): string | number {\n const [maxHeight, setMaxHeight] = useState<string | number>(400);\n const remaining = useRemaningHeight(elementId);\n const observer = useRef<ResizeObserver | null>(null);\n\n useLayoutEffect(() => {\n const w = document.getElementById(elementId);\n if (!w) {\n process.env.NODE_ENV === 'development' &&\n console.warn(`useTableMaxHeight: Element with id ${elementId} not found. Aborting...`);\n return;\n }\n\n observer.current = new ResizeObserver((e) => {\n let max = 0;\n\n e.forEach((tableWrapper) => {\n const tHeaderHeight = getElementComputedHeight(tableWrapper.target.querySelector('.ant-table-header'));\n const tFooterHeight = getElementComputedHeight(tableWrapper.target.querySelector('.ant-table-footer'));\n const tContainerOffset = getElementTotalOffset(tableWrapper.target.querySelector('.ant-table-container'));\n const paginations = tableWrapper.target.querySelectorAll('.ant-pagination') ?? [];\n const paginationHeights = Array.from(paginations).reduce((acc, cur) => acc + getElementComputedHeight(cur), 0);\n\n max = remaining - tHeaderHeight - tFooterHeight - tContainerOffset - paginationHeights - bottomSpace;\n });\n\n setMaxHeight(max > 350 ? max : '100%');\n });\n\n observer.current.observe(w?.closest('.ant-table-wrapper')!);\n\n return () => {\n observer.current?.disconnect();\n };\n }, [bottomSpace, elementId, remaining]);\n\n return maxHeight;\n}\n\nexport function getElementComputedHeight(element?: Element | null): number {\n if (!element) {\n return 0;\n }\n\n const height = element.getBoundingClientRect().height;\n const offset = getElementTotalOffset(element);\n return Math.ceil(height + offset);\n}\n\nexport function getElementTotalOffset(element?: Element | null): number {\n if (!element) {\n return 0;\n }\n\n const height = element.getBoundingClientRect().height;\n const style = window.getComputedStyle(element);\n const marginTop = parseFloat(style.marginTop || '0');\n const marginBottom = parseFloat(style.marginBottom || '0');\n\n return Math.ceil(height - element.clientHeight + marginTop + marginBottom);\n}\n\nexport function lightenDarkenColor(col: string, amt: number) {\n let usePound = false;\n\n if (col[0] === '#') {\n col = col.slice(1);\n usePound = true;\n }\n\n const num = parseInt(col, 16);\n\n let r = (num >> 16) + amt;\n\n if (r > 255) r = 255;\n else if (r < 0) r = 0;\n\n let b = ((num >> 8) & 0x00ff) + amt;\n\n if (b > 255) b = 255;\n else if (b < 0) b = 0;\n\n let g = (num & 0x0000ff) + amt;\n\n if (g > 255) g = 255;\n else if (g < 0) g = 0;\n\n return (usePound ? '#' : '') + String('000000' + (g | (b << 8) | (r << 16)).toString(16)).slice(-6);\n}\n\nexport function logout(client: DecafClient, fromAll?: boolean) {\n client.barista\n .get(`/auth/${fromAll ? 'logoutall' : 'logout'}`, { timeout: 3000 })\n .catch((e) => {\n if (fromAll) {\n console.error(e);\n alert('Failed to logout from all devices. Please try to logout from each device individually.');\n }\n })\n .finally(() => {\n const DECAF_AUTH_COOKIE_NAME = 'ember_simple_auth-session';\n Cookies.remove(DECAF_AUTH_COOKIE_NAME);\n window.location.reload();\n });\n}\n\nexport function getGravatarUrl(email: string): Promise<string | undefined> {\n const url = `https://www.gravatar.com/avatar/${md5(email)}`;\n\n return fetch(`${url}?d=404`, { method: 'HEAD' })\n .then((response) => (response.status !== 200 ? undefined : url))\n .catch(() => undefined);\n}\n\nexport type BooleanMap<T> = { True: T; False: T };\n\nexport function booleanMap<T>(map: BooleanMap<T>): (x: boolean) => T {\n return (x) => (x ? map.True : map.False);\n}\n\nexport type NullableBooleanMap<T> = { Null: T } & BooleanMap<T>;\n\nexport function nullableBooleanMap<T>(map: NullableBooleanMap<T>): (x?: boolean | undefined | null) => T {\n return (x) => (x == null ? map.Null : booleanMap(map)(x));\n}\n\nexport enum Direction {\n Short = -1,\n Square = 0,\n Long = 1,\n}\n\nexport function toDirection(x: number | Decimal | Direction): Direction {\n switch (new Decimal(0).comparedTo(x)) {\n case 1:\n return Direction.Short;\n case 0:\n return Direction.Square;\n case -1:\n return Direction.Long;\n }\n return Direction.Square;\n}\n\nexport type DirectionMap<T> = { Short: T; Square: T; Long: T };\n\nexport function directionMap<T>(map: DirectionMap<T>): (x: number | Decimal | Direction) => T {\n return (x) => {\n switch (toDirection(x)) {\n case Direction.Short:\n return map.Short;\n case Direction.Square:\n return map.Square;\n case Direction.Long:\n return map.Long;\n }\n };\n}\n\nexport function setAtKey<T>(array: T[], items: T[], key: keyof T): T[] {\n const result: T[] = [...array];\n\n items.forEach((item) => {\n const index = result.findIndex((r) => r[key] === item[key]);\n\n if (index >= 0) {\n result[index] = item;\n } else {\n result.push(item);\n }\n });\n\n return result;\n}\n\nexport type DecafLoaderFactory<T> = (context: DecafContextType) => DecafLoader<T>;\n\nexport type DecafLoader<T> = (args: { request: Request; params: Params; context?: any }) => Promise<T>;\n\nexport function getSearchParams(request: Request): URLSearchParams {\n return new URL(request.url).searchParams;\n}\n\nexport function getSearchParam(request: Request, name: string): string | null {\n return new URL(request.url).searchParams.get(name);\n}\n\nexport function getSearchParamDefault(request: Request, name: string, defaultValue: string): string {\n return new URL(request.url).searchParams.get(name) ?? defaultValue;\n}\n\nexport function getSearchParamAll(request: Request, name: string): string[] {\n return new URL(request.url).searchParams.getAll(name);\n}\n","import { Interpolation, Theme } from '@emotion/react';\nimport { theme } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport { lightenDarkenColor } from '../utils';\n\nconst DARK_BLACK_PRIMARY = '#10161d';\nconst DARK_BLACK_SECONDARY = 'rgb(31, 41, 55)';\nconst DARK_BLACK_ELEVATED = 'rgb(20, 29, 41)';\nconst LIGHT_WHITE_PRIMARY = '#f3f4f6';\nconst LIGHT_WHITE_SECONDARY = 'white';\nconst LIGHT_BLACK_ELEVATED = '#fafbfc';\nconst INPUT_BG_COLOR = '#2c3d50';\nconst BORDER_COLORS_TRANSPARENT = {\n colorBorder: 'transparent',\n colorBorderSecondary: 'transparent',\n colorBorderBg: 'transparent',\n};\nconst HEADER_HEIGHT = 40;\nconst BREADCRUMB_HEIGHT = 54;\n\nexport const decafThemeLight: ThemeConfig = {\n hashed: true,\n algorithm: [theme.defaultAlgorithm],\n components: {\n Layout: {\n headerBg: '#ededed',\n headerHeight: HEADER_HEIGHT,\n },\n },\n token: {\n borderRadius: 0,\n colorBgContainer: LIGHT_WHITE_SECONDARY,\n colorBgBase: LIGHT_WHITE_PRIMARY,\n colorBgLayout: LIGHT_WHITE_PRIMARY,\n colorBgElevated: LIGHT_BLACK_ELEVATED,\n },\n};\n\nexport const decafThemeDark: ThemeConfig = {\n hashed: true,\n components: {\n Layout: {\n headerBg: DARK_BLACK_PRIMARY,\n headerHeight: HEADER_HEIGHT,\n },\n Button: {\n boxShadow: 'none',\n boxShadowSecondary: 'none',\n colorBgContainer: INPUT_BG_COLOR,\n },\n Input: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Select: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Checkbox: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Dropdown: {\n ...BORDER_COLORS_TRANSPARENT,\n },\n DatePicker: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n InputNumber: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Menu: {\n itemColor: 'rgba(255, 255, 255, 0.5)',\n },\n Tabs: {\n colorBorderSecondary: DARK_BLACK_ELEVATED,\n },\n },\n token: {\n fontFamily: 'Inter, sans-serif',\n colorPrimary: '#344961',\n colorBgBase: DARK_BLACK_SECONDARY,\n colorBgContainer: DARK_BLACK_PRIMARY,\n colorBgElevated: DARK_BLACK_ELEVATED,\n colorBorderSecondary: DARK_BLACK_SECONDARY,\n colorBorder: DARK_BLACK_SECONDARY,\n colorBgLayout: DARK_BLACK_SECONDARY,\n borderRadius: 0,\n green: '#48734d',\n red: '#b03a38',\n blue: '#0d6efd',\n yellow: '#ffc107',\n orange: '#fd7e14',\n colorWhite: '#fff',\n colorLink: '#a4bfff',\n colorLinkHover: '#7199fb',\n colorLinkActive: '#7199fb',\n },\n\n algorithm: [theme.darkAlgorithm],\n};\n\nfunction getBaseStyles(theme: ThemeConfig): Interpolation<Theme> {\n const menuOverride = {\n color: `white !important`,\n ':after': {\n borderBottomColor: 'white',\n },\n };\n\n return {\n body: {\n background: theme.token?.colorBgBase,\n fontFamily: 'Inter, sans-serif',\n margin: 0,\n },\n '#root': {\n minHeight: '100%',\n },\n button: {\n boxShadow: 'none !important',\n },\n '.ant-table-body': {\n overflow: 'auto !important',\n },\n '#decaf-header': {\n position: 'fixed',\n zIndex: 999,\n right: 0,\n left: 0,\n paddingInline: 16,\n display: 'flex',\n alignItems: 'center',\n },\n '#decaf-content': {\n paddingTop: decafThemeDark.components?.Layout?.headerHeight,\n paddingBottom: 32,\n '#decaf-layout-breadcrumb': {\n backgroundColor: theme.token?.colorBgElevated,\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n height: BREADCRUMB_HEIGHT,\n paddingInline: 16,\n boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.10)',\n ...breadcrumbStyles(),\n },\n '#decaf-layout-content-outlet': {\n minHeight: '100%',\n padding: 16,\n '&.full-screen': {\n padding: '0 !important',\n },\n },\n },\n '#decaf-footer': {\n position: 'fixed',\n bottom: 0,\n right: 0,\n left: 0,\n paddingBlock: 0,\n paddingInline: 0,\n zIndex: 999,\n boxShadow: '0px -2px 4px rgba(0, 0, 0, 0.15)',\n backgroundColor: decafThemeDark.components?.Layout?.headerBg,\n },\n '.dot': {\n borderRadius: '50%',\n width: 10,\n height: 10,\n display: 'inline-block',\n backgroundColor: 'rgba(255,255,255,.25)',\n '&.green': {\n backgroundColor: `#80ff00 !important`,\n },\n '&.yellow': {\n backgroundColor: `#ff0 !important`,\n },\n '&.orange': {\n backgroundColor: `#ff7000 !important`,\n },\n '&.red': {\n backgroundColor: `#ff0000 !important`,\n },\n },\n '.ant-menu-item-selected': menuOverride,\n '.ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected': menuOverride,\n '.ant-menu-light.ant-menu-horizontal >.ant-menu-submenu-selected, .ant-menu-light .ant-menu-submenu-selected >.ant-menu-submenu-title':\n menuOverride,\n };\n}\n\nexport function getLightStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...(baseStyles as any),\n };\n}\n\nexport function getDarkStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...baseStyles,\n '*': {\n '&::-webkit-scrollbar': {\n width: 10,\n height: 10,\n },\n '&::-webkit-scrollbar-track': {\n background: theme.token?.colorBgContainer,\n },\n '&::-webkit-scrollbar-thumb': {\n background: theme.token?.colorPrimary,\n },\n },\n '.ant-page-header-back-button, .ant-page-header-heading-title': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-badge-count': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-table-thead > tr > th': {\n background: `${lightenDarkenColor(theme.token?.colorBgContainer || '', -5)} !important`,\n '&:hover': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-table-filter-dropdown': {\n 'input, .ant-table-filter-dropdown-search-input': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n '.ant-dropdown-menu-item, .ant-dropdown-menu': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-tabs-tab-active': {\n '.ant-tabs-tab-btn': {\n color: `${theme.token?.colorWhite} !important`,\n },\n },\n '.ant-radio-button-wrapper-checked': {\n backgroundColor: `${theme.components?.Button?.colorBgContainer} !important`,\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-picker-date-panel': {\n '.ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end': {\n '&::before': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n '.ant-picker-cell-inner': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n },\n '.ant-picker-cell-range-start, .ant-picker-cell-range-end': {\n '.ant-picker-cell-inner': {\n background: `${theme.token?.colorPrimary} !important`,\n },\n },\n },\n };\n}\n\nfunction breadcrumbStyles() {\n const getCrumbColor = (theme: 'dark' | 'light') => {\n const colorBase = theme === 'dark' ? '255, 255, 255' : '0, 0, 0';\n return {\n color: `rgba(${colorBase}, 0.5) !important`,\n '&:hover': {\n color: `rgba(${colorBase}, 0.75) !important`,\n },\n };\n };\n\n const darkColors = {\n ...getCrumbColor('dark'),\n '&:last-child': {\n color: 'rgba(255, 255, 255, 0.85) !important',\n },\n };\n\n const lightColors = {\n ...getCrumbColor('light'),\n '&:last-child': {\n color: 'rgba(0, 0, 0, 0.85) !important',\n },\n };\n\n return {\n '.decaf-breadcrumb': {\n display: 'flex',\n alignItems: 'center',\n listStyle: 'none',\n margin: 0,\n padding: 0,\n '>li': {\n '&.separator': {\n paddingInline: 3,\n marginInline: 3,\n },\n 'a, span': {\n ...getCrumbColor('light'),\n },\n display: 'flex',\n alignItems: 'center',\n transition: 'color 0.2s',\n ...lightColors,\n },\n '&.dark': {\n '>li': {\n 'a, span': {\n ...getCrumbColor('dark'),\n },\n ...darkColors,\n },\n },\n },\n };\n}\n","import React from 'react';\n\nexport interface ThemeContextProps {\n theme: 'dark' | 'light';\n toggleTheme: () => void;\n}\n\nexport const ThemeContext = React.createContext<ThemeContextProps>({\n theme: 'dark',\n toggleTheme: () => {},\n});\n","import { css, Global } from '@emotion/react';\nimport { ConfigProvider } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React from 'react';\nimport { decafThemeDark, decafThemeLight, getDarkStyles, getLightStyles } from './-styles';\nimport { ThemeContext } from './-theme-context';\n\nexport interface ThemeProviderProps {\n children: React.ReactNode;\n themeConfig?: ThemeConfig;\n theme?: 'dark' | 'light';\n}\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n const [value, setValue] = React.useState<'dark' | 'light'>(() => {\n const theme = props.theme || localStorage.getItem('decafAppTheme');\n if (theme === 'dark' || theme === 'light') {\n return theme;\n }\n return 'dark';\n });\n\n function setTheme() {\n const t = value === 'dark' ? 'light' : 'dark';\n setValue(t);\n localStorage.setItem('decafAppTheme', t);\n }\n\n let theme = value === 'light' ? decafThemeLight : decafThemeDark;\n theme = { ...theme, ...(props.themeConfig || {}) };\n theme = { ...theme, token: { ...theme.token, fontFamily: 'Inter, sans-serif' } };\n\n const globalStyles = value === 'light' ? getLightStyles(theme) : getDarkStyles(theme);\n\n return (\n <ThemeContext.Provider\n value={{\n theme: value,\n toggleTheme: setTheme,\n }}\n >\n <ConfigProvider theme={theme}>\n <Global\n styles={css`\n @import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap);\n `}\n />\n <Global styles={globalStyles} />\n\n {props.children}\n </ConfigProvider>\n </ThemeContext.Provider>\n );\n}\n","import React from 'react';\nimport { ThemeContext } from './-theme-context';\n\nexport const useDecafTheme = () => React.useContext(ThemeContext);\n","import { DownOutlined, RightOutlined } from '@ant-design/icons';\nimport { Dropdown, Grid } from 'antd';\nimport React, { ReactNode } from 'react';\nimport { Link } from 'react-router-dom';\nimport { useDecafTheme } from '../theme';\n\nexport interface BreadcrumbItem {\n title: ReactNode;\n href?: string;\n children?: { title: ReactNode; href?: string }[];\n}\n\nexport interface BreadcrumbProps {\n items: BreadcrumbItem[];\n itemRender?: (item: BreadcrumbItem) => ReactNode;\n separator?: ReactNode;\n}\n\nexport function Breadcrumb(props: BreadcrumbProps) {\n const { items, itemRender, separator } = props;\n const { theme } = useDecafTheme();\n const breakpoints = Grid.useBreakpoint();\n\n const firstAndLAst = items.slice(0, 1).concat(items.slice(-1));\n const _items = breakpoints.lg ? items : firstAndLAst;\n\n return (\n <ul className={`decaf-breadcrumb ${theme}`}>\n {renderBreadcrumbs(_items, separator || <RightOutlined />, itemRender)}\n </ul>\n );\n}\n\nfunction renderBreadcrumbs(\n items: BreadcrumbItem[],\n separator: ReactNode,\n itemRender?: (item: BreadcrumbItem) => ReactNode\n) {\n const result: ReactNode[] = [];\n\n items.forEach((item, i) => {\n const isLast = i === items.length - 1;\n\n if (item.href && !isLast) {\n result.push(\n <li key={i}>\n {itemRender ? (\n itemRender(item)\n ) : (\n <Link className=\"decaf-breadcrumb-link\" to={item.href}>\n {item.title}\n </Link>\n )}\n </li>\n );\n } else if (item.children) {\n const dmenu = item.children.map((child, j) => ({\n key: j,\n label: (\n <Link className=\"decaf-breadcrumb-link\" to={child.href!}>\n {child.title}\n </Link>\n ),\n }));\n\n result.push(\n <li key={i}>\n <Dropdown menu={{ items: dmenu }}>\n <div style={{ display: 'flex', cursor: 'pointer', gap: 3 }}>\n <span>{item.title}</span>\n <DownOutlined style={{ fontSize: 12 }} />\n </div>\n </Dropdown>\n </li>\n );\n } else {\n result.push(<li key={i}>{item.title}</li>);\n }\n if (i < items.length - 1) {\n result.push(\n <li key={`sep-${i}`} className=\"separator\">\n {separator}\n </li>\n );\n }\n });\n\n return result;\n}\n","import { HomeOutlined } from '@ant-design/icons';\nimport { Layout } from 'antd';\nimport React from 'react';\nimport { useMatches } from 'react-router-dom';\nimport { Breadcrumb, BreadcrumbItem } from './Breadcrumb';\n\ntype PageBreadcrumb = React.ReactNode | false;\n\nexport interface PageProps {\n /** When true, removes paddings from the content area. */\n isFullScreen?: boolean;\n /** The extra content to be rendered in the top right corner of the page. */\n extras?: React.ReactNode;\n children?: React.ReactNode;\n /**\n * This is for overriding the breadcrumb section. Do not use this to define your own breadcrumbs.\n * Instead, use the `crumb` property of the route item.\n *\n * - When leave untouched or passed `undefined`, the breadcrumb section will be rendered based on the route item config.\n * - When `false`, the breadcrumb section will be disabled. There will be nothing rendered on the top left corner.\n * - When a ReactNode passed, the node will be rendered instead of the breadcrumbs.\n */\n breadcrumb?: PageBreadcrumb;\n}\n\n/**\n * Page component.\n * Wrapping your pages with this component will give you the following features:\n * - Breadcrumbs\n * - Full screen mode\n * - Extra content area on the top right corner\n * - Automatically setting the document title based on the breadcrumbs\n * - Override the breadcrumb section with your own content\n *\n * You can implement your pages without wrapping them with this. However, you will have to implement the above features yourself if needed.\n *\n * Example usage:\n *\n * ```jsx\n * <Page {...props}>\n * <div>My page content</div>\n * </Page>\n * ```\n */\nexport default function Page(props: PageProps) {\n const matches: any = useMatches();\n const match = matches?.[matches?.length - 1];\n const isFullScreen = props.isFullScreen !== undefined ? props.isFullScreen : !!match?.handle?.fullScreen;\n const extras = props.extras !== undefined ? props.extras : match?.handle?.extras;\n\n return (\n <Layout.Content id=\"decaf-content\" style={{ flex: 1, minHeight: '100%' }}>\n <DecafLayoutPageTitle />\n <DecafLayoutBreadcrumb breadcrumb={props.breadcrumb}>{extras}</DecafLayoutBreadcrumb>\n\n <div id=\"decaf-layout-content-outlet\" className={isFullScreen ? 'full-screen' : ''}>\n {props.children}\n </div>\n </Layout.Content>\n );\n}\n\nfunction getAppNameFromDocumentTitle() {\n const title = document.title;\n if (title.split(' | ').length > 1) {\n return title.split(' | ')[title.split(' | ').length - 1];\n } else {\n return title;\n }\n}\n\nfunction getRenderedTitle() {\n // const div = document.createElement('div');\n // flushSync(() => {\n // createRoot(div).render(title);\n // });\n // return div.textContent || '';\n const bc = document.getElementById('decaf-layout-breadcrumb');\n const lastLi = bc?.querySelector('li:last-child');\n return (lastLi?.textContent || '').trim();\n}\n\nfunction DecafLayoutPageTitle() {\n const matches: any = useMatches();\n const crumbs = matches\n .filter((match: any) => Boolean(match.handle?.crumb))\n .map((match: any) => match.handle.crumb(match.data));\n const appName = getAppNameFromDocumentTitle();\n const title = crumbs?.[crumbs.length - 1]?.title;\n const rTitle = typeof title === 'string' ? title : getRenderedTitle();\n\n if (rTitle) {\n document.title = `${rTitle} | ${appName}`;\n } else {\n document.title = appName;\n }\n\n return null;\n}\n\nfunction DecafLayoutBreadcrumb(props: { children?: React.ReactNode; breadcrumb?: PageBreadcrumb }) {\n const matches = useMatches();\n\n if (props.breadcrumb === false) {\n return (\n <div id=\"decaf-layout-breadcrumb\" style={{ justifyContent: 'flex-end' }}>\n {props.children}\n </div>\n );\n } else if (props.breadcrumb) {\n return (\n <div id=\"decaf-layout-breadcrumb\">\n {props.breadcrumb}\n {props.children}\n </div>\n );\n } else {\n const crumbs = matches\n .filter((match: any) => Boolean(match.handle?.crumb))\n .map((match: any) => match.handle.crumb(match.data));\n\n const breadcrumb: BreadcrumbItem[] = [{ href: '/', title: <HomeOutlined /> }, ...crumbs].map((x, i) => ({\n ...x,\n _key: i,\n }));\n\n if (breadcrumb.length < 2) {\n return <></>;\n }\n\n return (\n <div id=\"decaf-layout-breadcrumb\">\n <Breadcrumb items={breadcrumb} />\n {props.children}\n </div>\n );\n }\n}\n","import { QuestionCircleOutlined } from '@ant-design/icons';\nimport { Button, Grid, theme } from 'antd';\nimport React from 'react';\n\nexport default function DocumentationButton() {\n const { token } = theme.useToken();\n const breakpoints = Grid.useBreakpoint();\n\n return (\n <Button\n type=\"link\"\n href=\"https://docs.decafhub.com\"\n target=\"_blank\"\n rel=\"noreferrer\"\n icon={<QuestionCircleOutlined />}\n style={{ backgroundColor: token.colorBgElevated }}\n >\n {!breakpoints.xs && 'Documentation'}\n </Button>\n );\n}\n","import React from 'react';\n\nexport default function Logo() {\n return (\n <svg\n version=\"1.1\"\n id=\"Layer_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 649.6 767.9\"\n enableBackground={'new 0 0 649.6 767.9'}\n xmlSpace=\"preserve\"\n width={32}\n height={32}\n >\n <g>\n <path\n fill=\"#52CEF4\"\n d=\"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z\"\n />\n <path\n fill=\"#52CEF4\"\n d=\"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z\"\n />\n </g>\n </svg>\n );\n}\n","import { EllipsisOutlined, MenuOutlined } from '@ant-design/icons';\nimport { Drawer, Grid, Menu, Typography } from 'antd';\nimport { ItemType, SubMenuType } from 'antd/es/menu/interface';\nimport React, { useEffect } from 'react';\nimport { NavLink, useLocation, useMatches } from 'react-router-dom';\nimport { DecafMenuItem } from '../types';\n\nfunction getMenuItemKey(item: DecafMenuItem, isChild = false): string {\n if (!item) return '';\n if ('to' in item && item.to) {\n const parentKeyPrefix = item.to.substring(0, item.to.lastIndexOf('/')) || item.to;\n const parentKey = parentKeyPrefix + ':_parent_';\n return isChild ? parentKey : item.to;\n }\n if ('href' in item && item.href) return item.href + (isChild ? ':_parent_' : '');\n if ('children' in item && item.children) return getMenuItemKey(item.children[0], true);\n return '';\n}\n\nfunction buildAntMenuFromDecafMenu(routes: DecafMenuItem[]): ItemType[] {\n const result: ItemType[] = [];\n\n routes.forEach((route) => {\n const item: ItemType = {\n key: getMenuItemKey(route),\n label: route.label,\n icon: route.icon,\n };\n\n if ('to' in route && route.to) {\n item.label = (\n <NavLink to={route.to} end={route.to === '/'}>\n {route.label}\n </NavLink>\n );\n } else if ('href' in route && route.href) {\n item.label = <a href={route.href}>{route.label}</a>;\n } else if (route.children) {\n item.label = route.label;\n (item as SubMenuType).children = buildAntMenuFromDecafMenu(route.children || []);\n }\n\n result.push(item);\n });\n\n return result;\n}\n\nexport function DecafPoweredBy() {\n return (\n <Typography.Text type=\"secondary\">\n Powered by{' '}\n <a href=\"https://teloscube.com\" target=\"_blank\" rel=\"noreferrer\">\n Teloscube\n </a>\n </Typography.Text>\n );\n}\n\nexport interface MenuProps {\n title: string;\n menu: DecafMenuItem[];\n}\n\nexport default function DecafMenu(props: MenuProps) {\n const [drawerOpen, setDrawerOpen] = React.useState(false);\n const matches = useMatches();\n const location = useLocation();\n const { md } = Grid.useBreakpoint();\n\n const menuItems = buildAntMenuFromDecafMenu(props.menu);\n const matchedMenuItems = matches\n .map((match) => match.pathname)\n .filter((pathname) => (location.pathname !== '/' ? pathname !== '/' : true)); // WORKAROUND: the root path always matches. We don't want that.\n\n useEffect(() => {\n if (!md) {\n setDrawerOpen(false);\n }\n }, [location.pathname, md]);\n\n const menu = (\n <Menu\n items={menuItems}\n selectedKeys={matchedMenuItems}\n mode={md ? 'horizontal' : 'inline'}\n overflowedIndicator={<EllipsisOutlined style={{ fontSize: 20, color: 'white' }} />}\n style={{ flex: 'auto', justifyContent: 'flex-end', backgroundColor: 'transparent', border: 'none', minWidth: 0 }}\n />\n );\n\n if (md) {\n return menu;\n }\n\n return (\n <div style={{ display: 'flex', flex: 'auto', justifyContent: 'flex-end' }}>\n <MenuOutlined style={{ fontSize: 20, marginRight: 20 }} onClick={() => setDrawerOpen(!drawerOpen)} />\n\n <Drawer\n open={drawerOpen}\n footer={<DecafPoweredBy />}\n onClose={() => setDrawerOpen(false)}\n styles={{ body: { padding: 10 } }}\n width={document.body.clientWidth - 50 > 350 ? 350 : document.body.clientWidth * 0.85}\n >\n {menu}\n </Drawer>\n </div>\n );\n}\n","import { DownOutlined, UpOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\nexport default function PageScroller() {\n return (\n <div style={{ display: 'flex' }}>\n <Button\n type=\"text\"\n icon={<UpOutlined />}\n title=\"Scroll to top\"\n onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}\n />\n <Button\n type=\"text\"\n icon={<DownOutlined />}\n title=\"Scroll to bottom\"\n onClick={() => window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' })}\n />\n </div>\n );\n}\n","import { CameraOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport html2canvas from 'html2canvas';\nimport React from 'react';\n\nexport interface ScreenShotterProps {\n triggerNode?: React.ReactNode;\n}\n\nexport default function ScreenShotter(props: ScreenShotterProps) {\n async function handleScreenshot() {\n // hide footer before taking screenshot\n const footer = document.getElementById('decaf-footer');\n footer?.style.setProperty('display', 'none');\n\n const canvas = await html2canvas(document.body);\n const dataUrl = canvas.toDataURL('image/png');\n\n // show footer after taking screenshot\n footer?.style.setProperty('display', 'block');\n\n const link = document.createElement('a');\n link.download = 'screenshot.png';\n link.href = dataUrl;\n link.click();\n link.remove();\n }\n\n if (props.triggerNode) {\n return React.cloneElement(props.triggerNode as React.ReactElement, {\n onClick: handleScreenshot,\n });\n }\n\n return (\n <Button\n type=\"text\"\n icon={<CameraOutlined />}\n title=\"Take a screenshot of the current page\"\n onClick={handleScreenshot}\n />\n );\n}\n","import { BulbFilled, BulbOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\ninterface ThemeSwitcherProps {\n theme: 'dark' | 'light';\n onChange: () => void;\n}\nexport default function ThemeSwitcher(props: ThemeSwitcherProps) {\n return (\n <Button\n type=\"text\"\n icon={props.theme === 'dark' ? <BulbFilled /> : <BulbOutlined />}\n title={props.theme === 'dark' ? 'Switch to light theme' : 'Switch to dark theme'}\n onClick={() => props.onChange()}\n />\n );\n}\n","import { InfoCircleOutlined, LogoutOutlined, UserOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Avatar, Dropdown } from 'antd';\nimport { ItemType } from 'antd/es/menu/interface';\nimport React, { useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { getGravatarUrl, logout } from '../utils';\n\nexport function UserProfileDropdown() {\n const [gravatar, setGravatar] = useState<string | undefined>(undefined);\n const decaf = useDecaf();\n const navigate = useNavigate();\n\n useEffect(() => {\n if (!decaf.me.email) {\n return;\n }\n\n getGravatarUrl(decaf.me.email).then(setGravatar);\n }, [decaf.me.email]);\n\n const doLogout = () => logout(decaf.client, false);\n const doLogoutAll = () => window.confirm('Logout from all sessions?') && logout(decaf.client, true);\n const doGoToAbout = () => navigate('/about');\n\n const items: ItemType[] = [\n {\n key: 'me',\n label: decaf.me.fullname || decaf.me.username,\n title: decaf.me.email,\n disabled: true,\n icon: <UserOutlined />,\n style: { cursor: 'default' },\n },\n { key: 'divider-1', dashed: true, type: 'divider' },\n { key: 'logout', label: 'Logout', icon: <LogoutOutlined />, onClick: doLogout },\n { key: 'logout-all', label: 'Logout All Sessions', icon: <LogoutOutlined />, onClick: doLogoutAll },\n { key: 'divider-2', dashed: true, type: 'divider' },\n { key: 'about', label: 'About', icon: <InfoCircleOutlined />, onClick: doGoToAbout },\n ];\n\n const propsAvatar: any = gravatar\n ? { src: gravatar }\n : {\n icon: <UserOutlined style={{ color: 'rgba(255,255,255, 0.5)' }} />,\n style: { backgroundColor: 'transparent', border: '1px solid rgba(255,255,255, 0.5)' },\n };\n\n return (\n <Dropdown trigger={['click']} menu={{ items }}>\n <Avatar {...propsAvatar} style={{ ...propsAvatar.style, cursor: 'pointer' }} />\n </Dropdown>\n );\n}\n","import { CaretUpOutlined } from '@ant-design/icons';\nimport { Button, Dropdown, Grid } from 'antd';\nimport React from 'react';\n\ntype VersionCode = 'production' | 'staging' | 'testing' | 'development' | 'preview' | 'release';\n\nexport type Version = {\n code: VersionCode;\n name: string;\n color: string;\n url: string;\n show: boolean;\n};\n\nfunction getAppNameFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 1];\n }\n}\n\nfunction getAppVersionFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 2];\n }\n}\n\nfunction isPreviewVersion(version: string) {\n return version.startsWith('preview-') && version.length > 8;\n}\n\nfunction isReleaseVersion(version: string) {\n return version.startsWith('v') && version.length > 1;\n}\n\nfunction getAppVersionCode(version: string) {\n if (isPreviewVersion(version)) {\n return 'preview';\n } else if (isReleaseVersion(version)) {\n return 'release';\n } else {\n return version;\n }\n}\n\nfunction getCurrentAppPath(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts.slice(indexOfWebapps + 3).join('/');\n }\n}\n\nexport default function VersionSelector() {\n const appName = getAppNameFromUrl(window.location.href);\n const appVersion = getAppVersionFromUrl(window.location.href); // development, staging, preview-123, v1.0.0\n const appVersionCode = getAppVersionCode(appVersion); // development, staging, preview, release\n const { md } = Grid.useBreakpoint();\n\n const versions: Version[] = [\n {\n code: 'development',\n name: 'Development Version',\n color: 'red',\n url: `/webapps/${appName}/development/${getCurrentAppPath(window.location.href)}`,\n show: process.env.NODE_ENV === 'development',\n },\n {\n code: 'testing',\n name: 'Testing Version',\n color: 'orange',\n url: `/webapps/${appName}/testing/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'staging',\n name: 'Staging Version',\n color: 'yellow',\n url: `/webapps/${appName}/staging/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'production',\n name: 'Production Version',\n color: 'green',\n url: `/webapps/${appName}/production/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'preview',\n name: 'Preview Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n {\n code: 'release',\n name: 'Release Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n ];\n\n const currentVersion = versions.find((v) => v.code === appVersionCode);\n const isProd = currentVersion?.code === 'production';\n\n if (!currentVersion) {\n return null;\n }\n\n return (\n <Dropdown\n placement=\"top\"\n arrow\n menu={{\n items: versions\n .filter((v) => v.show)\n .map((version) => ({\n key: version.name,\n label: (\n <span>\n <i className={`dot ${version.color}`} /> {version.name}\n </span>\n ),\n onClick: () => {\n window.location.href = version.url;\n },\n })),\n }}\n >\n <Button\n type=\"text\"\n style={{\n width: isProd ? 32 : 'initial',\n padding: isProd ? 0 : 'revert',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n icon={<i className={`dot ${currentVersion?.color}`} />}\n >\n <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>\n {!isProd && md && (\n <>\n <span style={{ marginInline: 5 }}>\n You are on <b>{currentVersion.name}</b>\n </span>\n <CaretUpOutlined />\n </>\n )}\n </div>\n </Button>\n </Dropdown>\n );\n}\n","import { MessageOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button, Grid, theme } from 'antd';\nimport React, { useEffect, useState } from 'react';\n\nconst ZENDESK_WIDGET_SCRIPT = 'https://static.zdassets.com/ekr/snippet.js';\n\ndeclare global {\n interface Window {\n zE: any;\n zESettings: any;\n }\n}\n\nexport default function ZendeskWidget() {\n const { me, publicConfig } = useDecaf();\n const [open, setOpen] = useState(false);\n const { token } = theme.useToken();\n const breakpoints = Grid.useBreakpoint();\n\n useEffect(() => {\n if (!publicConfig.zendesk || typeof document === 'undefined') return;\n const script = document.createElement('script');\n script.src = ZENDESK_WIDGET_SCRIPT + '?key=' + publicConfig.zendesk;\n script.async = true;\n script.id = 'ze-snippet'; // do not change this. zendesk expects this to be ze-snippet\n script.onload = () => {\n window.zE('webWidget', 'hide');\n window.zE('webWidget:on', 'open', () => {\n window.zE('webWidget', 'show');\n setOpen(true);\n });\n window.zE('webWidget:on', 'close', () => {\n window.zE('webWidget', 'hide');\n setOpen(false);\n });\n };\n\n document.body.appendChild(script);\n window.zESettings = {\n webWidget: {\n offset: {\n horizontal: -7,\n vertical: 20,\n },\n },\n contactForm: {\n subject: true,\n fields: [\n {\n id: 'name',\n prefill: { '*': me.fullname },\n },\n {\n id: 'email',\n prefill: { '*': me.email },\n },\n ],\n },\n };\n\n return () => {\n document.body.removeChild(script);\n };\n }, [publicConfig, me]);\n\n function toggle() {\n if (open) {\n window.zE?.('webWidget', 'close');\n } else {\n window.zE?.('webWidget', 'open');\n }\n setOpen(!open);\n }\n\n if (!publicConfig.zendesk) return null;\n\n return (\n <Button type=\"link\" icon={<MessageOutlined />} style={{ backgroundColor: token.colorBgElevated }} onClick={toggle}>\n {!breakpoints.xs && 'Support'}\n </Button>\n );\n}\n","import { useNProgress } from '@tanem/react-nprogress';\nimport { Col, ConfigProvider, Grid, Layout, Row, Typography } from 'antd';\nimport React from 'react';\nimport { Link, Outlet, useLocation, useNavigation } from 'react-router-dom';\nimport { decafThemeDark, useDecafTheme } from '../theme';\nimport { DecafMenuItem } from '../types';\nimport DocumentationButton from './DocumentationButton';\nimport Logo from './Logo';\nimport DecafMenu, { DecafPoweredBy } from './Menu';\nimport PageScroller from './PageScroller';\nimport ScreenShotter from './Screenshotter';\nimport ThemeSwitcher from './ThemeSwitcher';\nimport { UserProfileDropdown } from './UserProfileDropdown';\nimport VersionSelector from './VersionSelector';\nimport ZendeskWidget from './ZendeskWidget';\n\nexport interface DecafLayoutProps {\n menu: DecafMenuItem[];\n appName: string;\n children?: React.ReactNode;\n}\n\nexport default function DecafLayout(props: DecafLayoutProps) {\n const location = useLocation();\n const navigation = useNavigation();\n const breakpoints = Grid.useBreakpoint();\n const { theme: currentTheme, toggleTheme: setCurrentTheme } = useDecafTheme();\n\n return (\n <Layout style={{ height: '100%' }}>\n <DecafLayoutProgress isAnimating={navigation.state === 'loading'} key={location.key} />\n\n <ConfigProvider theme={decafThemeDark}>\n <Layout.Header id=\"decaf-header\">\n <DecafLayoutBrand title={props.appName} />\n <DecafMenu title={props.appName} menu={props.menu} />\n <UserProfileDropdown />\n </Layout.Header>\n </ConfigProvider>\n\n <Outlet />\n {props.children ?? null}\n\n <ConfigProvider theme={decafThemeDark}>\n <Layout.Footer id=\"decaf-footer\">\n <Row justify=\"space-between\" align={'middle'}>\n <Col span={breakpoints.lg ? 10 : 12}>\n <ZendeskWidget />\n <span style={{ display: 'inline-block', width: 1 }} />\n <DocumentationButton />\n </Col>\n\n <Col span={breakpoints.lg ? 4 : 0} style={{ textAlign: 'center' }}>\n <DecafPoweredBy />\n </Col>\n\n <Col span={breakpoints.lg ? 10 : 12} style={{ justifyContent: 'flex-end', display: 'flex', gap: 10 }}>\n <VersionSelector />\n <ThemeSwitcher theme={currentTheme} onChange={setCurrentTheme} />\n <ScreenShotter />\n <PageScroller />\n </Col>\n </Row>\n </Layout.Footer>\n </ConfigProvider>\n </Layout>\n );\n}\n\nexport function DecafLayoutBrand({ title }: { title: string }) {\n const breakpoints = Grid.useBreakpoint();\n\n return (\n <Link to=\"/\" style={{ display: 'flex', alignItems: 'center', gap: 10 }}>\n <Logo />\n\n {breakpoints.lg && (\n <Typography.Title\n level={1}\n style={{\n margin: 0,\n fontWeight: 'normal',\n fontSize: 20,\n color: 'rgba(255, 255, 255, 0.75)',\n whiteSpace: 'nowrap',\n }}\n >\n {title}\n </Typography.Title>\n )}\n </Link>\n );\n}\n\nexport function DecafLayoutProgress({ isAnimating }: { isAnimating: boolean }) {\n const { animationDuration, isFinished, progress } = useNProgress({ isAnimating });\n\n return (\n <div\n style={{\n opacity: isFinished ? 0 : 1,\n pointerEvents: 'none',\n transition: `opacity ${animationDuration}ms linear`,\n }}\n >\n <div\n style={{\n background: '#29d',\n height: 2,\n left: 0,\n marginLeft: `${(-1 + progress) * 100}%`,\n position: 'fixed',\n top: 0,\n transition: `margin-left ${animationDuration}ms linear`,\n width: '100%',\n zIndex: 1031,\n }}\n >\n <div\n style={{\n boxShadow: '0 0 10px #29d, 0 0 5px #29d',\n display: 'block',\n height: '100%',\n opacity: 1,\n position: 'absolute',\n right: 0,\n transform: 'rotate(3deg) translate(0px, -4px)',\n width: 100,\n }}\n />\n </div>\n </div>\n );\n}\n","import { useDecaf } from '@decafhub/decaf-react';\nimport { Card, Col, Row, Statistic } from 'antd';\nimport React, { useEffect, useState } from 'react';\nimport Page from './Page';\n\nexport interface AboutPageProps {\n appName?: string;\n appVersion?: string;\n appDescription?: string;\n content?: React.ReactNode;\n}\n\nexport default function PageAbout(props: AboutPageProps) {\n const { client } = useDecaf();\n const [versionCultproxy, setVersionCultproxy] = useState<string | undefined>(undefined);\n const [versionBarista, setVersionBarista] = useState<string | undefined>(undefined);\n const [versionEstate, setVersionEstate] = useState<string | undefined>(undefined);\n\n useEffect(() => {\n client.bare.get<{ version: string }>('/_cultproxy').then(({ data }) => setVersionCultproxy(data.version));\n client.barista.get<{ version: string }>('/version/').then(({ data }) => setVersionBarista(data.version));\n client.bare.get<string>('/apis/estate/version').then(({ data }) => setVersionEstate(data));\n }, [client]);\n\n return (\n <Page>\n <Row gutter={[16, 16]}>\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 24 }} lg={{ span: 12 }} xl={{ span: 8 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"Application Name\" value={props.appName} />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} lg={{ span: 12 }} xl={{ span: 16 }} xxl={{ span: 18 }}>\n <Card bordered={false}>\n <Statistic title=\"Application Description\" value={props.appDescription} />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"Application Version\" value={props.appVersion} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"DECAF Cultproxy Version\" value={versionCultproxy} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"DECAF Barista Version\" value={versionBarista} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"DECAF Estate Version\" value={versionEstate} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col span={24}>{props.content}</Col>\n </Row>\n </Page>\n );\n}\n","import {\n DecafApp,\n DecafAppConfig,\n DecafAppController,\n DecafContextType,\n DecafWebappController,\n useDecaf,\n} from '@decafhub/decaf-react';\nimport { App } from 'antd';\nimport 'antd/dist/reset.css';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport qs from 'query-string';\nimport React, { useEffect } from 'react';\nimport { RouteObject, RouterProvider, createBrowserRouter } from 'react-router-dom';\nimport { QueryParamProvider } from 'use-query-params';\nimport { ReactRouter6Adapter } from 'use-query-params/adapters/react-router-6';\nimport { BreadcrumbItem } from '../components/Breadcrumb';\nimport { Page404, PageRouteError } from '../components/Error';\nimport DecafLayout from '../components/Layout';\nimport Page from '../components/Page';\nimport PageAbout from '../components/PageAbout';\nimport { ThemeProvider } from '../theme';\nimport { DecafMenuItem } from '../types';\nimport { setAtKey } from '../utils';\nimport { getPlausibleScript } from './-plausible';\n\n/**\n * DECAF Web appliaction route type.\n */\nexport type DecafRoute = Omit<RouteObject, 'children'> & {\n /** Define breadcrumbs for this route.\n *\n * @param data It is the return value of the `loader` function.\n * @returns A breadcrumb item.\n *\n * Example:\n * ```ts\n * { crumb: (data?: MyRecord) => ({ title: data?.title, href: `/details/${data?.id}` }) }\n * // or\n * { crumb: () => ({ title: \"My Page\", href: `/my-page` }) }\n * ```\n */\n crumb?: (data?: any) => BreadcrumbItem;\n /** When true, removes paddings from the content area. */\n fullScreen?: boolean;\n /** The extra content to be rendered in the top right corner of the page. */\n extras?: React.ReactNode;\n /** Child routes. */\n children?: DecafRoute[];\n};\n\n/**\n * DECAF Web application route items builder.\n */\nexport type DecafRouteItemsBuilder = (context: DecafContextType) => DecafRoute[];\n\n/**\n * DECAF Web application menu items builder.\n */\nexport type DecafMenuItemsBuilder = (context: DecafContextType) => DecafMenuItem[];\n\n/**\n * DECAF Web application properties.\n */\nexport interface DecafWebappProps {\n /**\n * DECAF application name.\n */\n appName: string;\n\n /**\n * DECAF application description.\n */\n appDescription?: string;\n\n /**\n * DECAF application configuration.\n */\n config?: DecafAppConfig;\n\n /**\n * DECAF application controller.\n */\n controller?: DecafAppController;\n\n /**\n * The theme of the app.\n *\n * Defaults to `dark`.\n */\n theme?: 'dark' | 'light';\n\n /**\n * The theme config of the app.\n *\n * This will be merged with the default theme config (dark or light).\n *\n * See https://ant.design/docs/react/customize-theme\n */\n themeConfig?: ThemeConfig;\n\n /**\n * Builds a collection of DECAF route items.\n *\n * About page and 404 page will be added automatically.\n *\n * See https://reactrouter.com/en/main/routers/create-browser-router#routes\n */\n buildRouteItems: DecafRouteItemsBuilder;\n\n /**\n * Builds a collection of DECAF menu items.\n *\n * About page will be added automatically.\n */\n buildMenuItems: DecafMenuItemsBuilder;\n\n /**\n * The extra content to show on the about page.\n */\n buildAboutPageContent?: (context: DecafContextType) => React.ReactNode;\n}\n\nexport function DecafWebapp(props: DecafWebappProps) {\n // Manage Plausible script:\n useEffect(() => {\n const script = getPlausibleScript();\n document.body.appendChild(script);\n return () => {\n document.body.removeChild(script);\n };\n }, []);\n\n // Get or create the DECAF Webapp controller:\n const controller = props.controller || DecafWebappController;\n controller.disableZendeskWidget = true;\n\n // Prepare the DECAF Web application and return:\n return (\n <ThemeProvider themeConfig={props.themeConfig} theme={props.theme}>\n <App>\n <DecafApp config={props.config} controller={controller}>\n <DecafWebappInternal {...props} />\n </DecafApp>\n </App>\n </ThemeProvider>\n );\n}\n\n/**\n * Auxiliary DECAF Webapp component.\n */\nexport function DecafWebappInternal(props: DecafWebappProps) {\n const decaf = useDecaf();\n\n const defaultRoutes = [\n {\n path: '/about',\n element: (\n <PageAbout\n appName={props.appName}\n appVersion={props.config?.currentVersion}\n appDescription={props.appDescription}\n content={props.buildAboutPageContent?.(decaf)}\n />\n ),\n crumb: () => ({ title: 'About' }),\n },\n {\n path: '*',\n element: (\n <Page>\n <Page404 />\n </Page>\n ),\n crumb: () => ({ title: 'Page Not Found' }),\n },\n ];\n\n const routes = setAtKey<DecafRoute>(props.buildRouteItems(decaf), defaultRoutes, 'path');\n\n const router = createBrowserRouter(compileRoutes(props, decaf, routes), { basename: props.config?.basePath });\n\n return <RouterProvider router={router} />;\n}\n\nexport function compileRoutes(props: DecafWebappProps, context: DecafContextType, routes: DecafRoute[]) {\n const menu = props.buildMenuItems(context);\n return [\n {\n element: (\n <QueryParamProvider\n adapter={ReactRouter6Adapter}\n options={{\n removeDefaultsFromUrl: true,\n searchStringToObject: qs.parse,\n objectToSearchString: qs.stringify,\n enableBatching: true,\n includeAllParams: true,\n }}\n >\n <DecafLayout menu={menu} appName={props.appName} />\n </QueryParamProvider>\n ),\n path: '/',\n children: routes.map(decafRouteToReactRoute),\n errorElement: (\n <DecafLayout menu={menu} appName={props.appName}>\n <Page breadcrumb={false}>\n <PageRouteError />\n </Page>\n </DecafLayout>\n ),\n },\n ];\n}\n\nexport function decafRouteToReactRoute(route: DecafRoute): RouteObject {\n const { crumb, fullScreen, extras, children, ...rest } = route;\n\n if (children) {\n // @ts-expect-error\n return { ...rest, handle: { crumb, fullScreen, extras }, children: children.map(decafRouteToReactRoute) };\n } else {\n return { ...rest, handle: { crumb, fullScreen, extras } };\n }\n}\n","export function getPlausibleScript(): HTMLScriptElement {\n const script = document.createElement('script');\n\n script.defer = true;\n script.setAttribute('data-domain', location.hostname);\n script.src = 'https://webax.svc.sys.decafhub.com/js/plausible.js';\n\n return script;\n}\n"],"names":["ErrorPageSubtitle","_ref","React","createElement","Fragment","Typography","message","Link","to","Button","style","marginTop","Page401","Result","icon","LockFilled","color","title","subTitle","Page403","status","Page404","PageError","PageRouteError","error","useRouteError","isRouteErrorResponse","Direction","FOOTER_HEIGHT","FOOTER_PADDING","useRemaningHeight","elementId","_useState","useState","remainingHeight","setRemainingHeight","useLayoutEffect","e","document","getElementById","calculate","elementTop","getBoundingClientRect","top","elementHeight","window","innerHeight","addEventListener","removeEventListener","useTableMaxHeight","bottomSpace","_useState2","maxHeight","setMaxHeight","remaining","observer","useRef","w","current","ResizeObserver","max","forEach","tableWrapper","_tableWrapper$target$","tHeaderHeight","getElementComputedHeight","target","querySelector","tFooterHeight","tContainerOffset","getElementTotalOffset","paginations","querySelectorAll","paginationHeights","Array","from","reduce","acc","cur","observe","closest","_observer$current","disconnect","process","env","NODE_ENV","console","warn","element","height","offset","Math","ceil","getComputedStyle","parseFloat","marginBottom","clientHeight","lightenDarkenColor","col","amt","usePound","slice","num","parseInt","r","b","g","String","toString","logout","client","fromAll","barista","get","timeout","alert","Cookies","remove","location","reload","booleanMap","map","x","True","False","nullableBooleanMap","Null","toDirection","Decimal","comparedTo","Short","Square","Long","directionMap","setAtKey","array","items","key","result","concat","item","index","findIndex","push","getSearchParams","request","URL","url","searchParams","getSearchParam","name","getSearchParamDefault","defaultValue","_URL$searchParams$get","getSearchParamAll","getAll","DARK_BLACK_PRIMARY","DARK_BLACK_SECONDARY","DARK_BLACK_ELEVATED","LIGHT_WHITE_PRIMARY","INPUT_BG_COLOR","BORDER_COLORS_TRANSPARENT","colorBorder","colorBorderSecondary","colorBorderBg","BREADCRUMB_HEIGHT","decafThemeLight","hashed","algorithm","theme","defaultAlgorithm","components","Layout","headerBg","headerHeight","token","borderRadius","colorBgContainer","colorBgBase","colorBgLayout","colorBgElevated","decafThemeDark","boxShadow","boxShadowSecondary","Input","_extends","Select","Checkbox","Dropdown","DatePicker","InputNumber","Menu","itemColor","Tabs","fontFamily","colorPrimary","green","red","blue","yellow","orange","colorWhite","colorLink","colorLinkHover","colorLinkActive","darkAlgorithm","getBaseStyles","_theme$token","_decafThemeDark$compo","_theme$token2","_decafThemeDark$compo2","getCrumbColor","darkColors","lightColors","menuOverride","borderBottomColor","body","background","margin","minHeight","button","overflow","position","zIndex","right","left","paddingInline","display","alignItems","paddingTop","paddingBottom","backgroundColor","flexDirection","justifyContent","width","colorBase","listStyle","padding","marginInline","transition","bottom","paddingBlock","_templateObject","ThemeContext","createContext","toggleTheme","useDecafTheme","useContext","ThemeProvider","props","_React$useState","localStorage","getItem","value","setValue","themeConfig","globalStyles","baseStyles","getLightStyles","_theme$token3","_theme$token4","_theme$token5","_theme$token6","_theme$token7","_theme$token8","_theme$token9","_theme$token10","_theme$token11","_theme$components","_theme$token12","_theme$token13","_theme$token14","_theme$token15","getDarkStyles","Provider","t","setItem","ConfigProvider","Global","styles","css","children","Breadcrumb","itemRender","separator","breakpoints","Grid","useBreakpoint","firstAndLAst","className","i","href","length","dmenu","child","j","label","menu","cursor","gap","DownOutlined","fontSize","renderBreadcrumbs","lg","RightOutlined","Page","_match$handle","_match$handle2","matches","useMatches","match","isFullScreen","undefined","handle","fullScreen","extras","Content","id","flex","DecafLayoutPageTitle","DecafLayoutBreadcrumb","breadcrumb","_crumbs","bc","lastLi","crumbs","filter","_match$handle3","Boolean","crumb","data","appName","split","getAppNameFromDocumentTitle","rTitle","textContent","trim","_match$handle4","HomeOutlined","_key","DocumentationButton","useToken","type","rel","QuestionCircleOutlined","xs","Logo","version","xmlns","xmlnsXlink","y","viewBox","enableBackground","xmlSpace","fill","d","getMenuItemKey","isChild","parentKeyPrefix","substring","lastIndexOf","buildAntMenuFromDecafMenu","routes","route","NavLink","end","DecafPoweredBy","Text","DecafMenu","drawerOpen","setDrawerOpen","useLocation","md","menuItems","matchedMenuItems","pathname","useEffect","selectedKeys","mode","overflowedIndicator","EllipsisOutlined","border","minWidth","MenuOutlined","marginRight","onClick","Drawer","open","footer","onClose","clientWidth","PageScroller","UpOutlined","scrollTo","behavior","scrollHeight","ScreenShotter","handleScreenshot","setProperty","Promise","resolve","html2canvas","then","canvas","dataUrl","toDataURL","link","download","click","reject","triggerNode","cloneElement","CameraOutlined","ThemeSwitcher","BulbFilled","BulbOutlined","onChange","UserProfileDropdown","gravatar","setGravatar","decaf","useDecaf","navigate","useNavigate","email","me","md5","fetch","method","response","fullname","username","disabled","UserOutlined","dashed","LogoutOutlined","confirm","InfoCircleOutlined","propsAvatar","src","trigger","Avatar","getCurrentAppPath","parts","indexOfWebapps","indexOf","join","VersionSelector","appVersion","getAppVersionFromUrl","appVersionCode","startsWith","isPreviewVersion","isReleaseVersion","versions","code","show","currentVersion","find","v","isProd","placement","arrow","CaretUpOutlined","ZENDESK_WIDGET_SCRIPT","ZendeskWidget","_useDecaf","publicConfig","setOpen","zendesk","script","async","onload","zE","appendChild","zESettings","webWidget","horizontal","vertical","contactForm","subject","fields","prefill","removeChild","MessageOutlined","DecafLayout","_props$children","navigation","useNavigation","_useDecafTheme","currentTheme","setCurrentTheme","DecafLayoutProgress","isAnimating","state","Header","DecafLayoutBrand","Outlet","Footer","Row","justify","align","Col","span","textAlign","Title","level","fontWeight","whiteSpace","_ref2","_useNProgress","useNProgress","animationDuration","opacity","isFinished","pointerEvents","marginLeft","progress","transform","PageAbout","versionCultproxy","setVersionCultproxy","versionBarista","setVersionBarista","_useState3","versionEstate","setVersionEstate","bare","_ref3","gutter","sm","xl","xxl","Card","bordered","Statistic","appDescription","prefix","content","_excluded","DecafWebapp","defer","setAttribute","hostname","getPlausibleScript","controller","DecafWebappController","disableZendeskWidget","App","DecafApp","config","DecafWebappInternal","_props$config","_props$config2","defaultRoutes","path","buildAboutPageContent","buildRouteItems","router","createBrowserRouter","context","buildMenuItems","QueryParamProvider","adapter","ReactRouter6Adapter","options","removeDefaultsFromUrl","searchStringToObject","qs","parse","objectToSearchString","stringify","enableBatching","includeAllParams","decafRouteToReactRoute","errorElement","compileRoutes","basename","basePath","RouterProvider","_objectWithoutPropertiesLoose"],"mappings":"k9CAKA,SAASA,GAAiBC,GACxB,OACEC,EAAAC,cAAAD,EAAAE,SAAA,KACEF,EAACC,cAAAE,EAAY,KAHiBJ,EAAPK,SAIvBJ,EAAAC,cAACI,EAAI,CAACC,GAAG,KACPN,EAAAC,cAACM,EAAM,CAACC,MAAO,CAAEC,UAAW,KAAI,cAIxC,UAEgBC,KACd,OACEV,EAAAC,cAACU,EAAM,CACLC,KAAMZ,EAAAC,cAACY,EAAU,CAACL,MAAO,CAAEM,MAAO,aAClCC,MAAO,uBACPC,SAAUhB,EAAAC,cAACH,GAAiB,CAACM,QAAS,+DAG5C,UAEgBa,KACd,OACEjB,gBAACW,EAAM,CACLO,OAAO,MACPH,MAAO,gBACPC,SAAUhB,EAACC,cAAAH,GAAkB,CAAAM,QAAS,oDAG5C,UAEgBe,KACd,OACEnB,gBAACW,EAAM,CACLO,OAAO,MACPH,MAAO,iBACPC,SAAUhB,EAACC,cAAAH,GAAkB,CAAAM,QAAS,iDAG5C,UAEgBgB,KACd,OACEpB,gBAACW,EAAM,CACLO,OAAO,MACPH,MAAO,QACPC,SACEhB,EAACC,cAAAH,GACC,CAAAM,QACE,8GAMZ,UAEgBiB,KACd,IAAMC,EAAQC,IAEd,IAAIC,EAAqBF,GAYvB,OAAOtB,EAAAC,cAACmB,GAAS,MAXjB,OAAQE,EAAMJ,QACZ,SACE,OAAOlB,EAAAC,cAACS,GAAO,MACjB,KAAK,IACH,OAAOV,EAAAC,cAACgB,GAAO,MACjB,KAAK,IACH,OAAOjB,EAAAC,cAACkB,GAAO,MACjB,QACE,OAAOnB,EAAAC,cAACmB,GAAS,MAKzB,4NCvEA,IA2LYK,GA3LNC,GAAgB,GAChBC,GAAiB,GASP,SAAAC,GAAkBC,GAChC,IAAAC,EAA8CC,EAAiB,GAAxDC,EAAeF,KAAEG,EAAk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