@decafhub/decaf-react-webapp 0.0.14 → 0.1.0
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.
- package/CHANGELOG.md +49 -0
- package/dist/components/Breadcrumb.d.ts +16 -0
- package/dist/components/Breadcrumb.d.ts.map +1 -0
- package/dist/components/DocumentationButton.d.ts +3 -0
- package/dist/components/DocumentationButton.d.ts.map +1 -0
- package/dist/components/Error.d.ts +5 -3
- package/dist/components/Error.d.ts.map +1 -1
- package/dist/components/Layout.d.ts +16 -17
- package/dist/components/Layout.d.ts.map +1 -1
- package/dist/components/Logo.d.ts +2 -2
- package/dist/components/Menu.d.ts +9 -0
- package/dist/components/Menu.d.ts.map +1 -0
- package/dist/components/PageAbout.d.ts +8 -8
- package/dist/components/PageAbout.d.ts.map +1 -1
- package/dist/components/PageLayout.d.ts +10 -0
- package/dist/components/PageLayout.d.ts.map +1 -0
- package/dist/components/PageScroller.d.ts +2 -2
- package/dist/components/PageScroller.d.ts.map +1 -1
- package/dist/components/Screenshotter.d.ts +5 -5
- package/dist/components/Screenshotter.d.ts.map +1 -1
- package/dist/components/ThemeSwitcher.d.ts +7 -7
- package/dist/components/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/UserProfileDropdown.d.ts +3 -0
- package/dist/components/UserProfileDropdown.d.ts.map +1 -0
- package/dist/components/VersionSelector.d.ts +11 -11
- package/dist/components/VersionSelector.d.ts.map +1 -1
- package/dist/components/ZendeskWidget.d.ts +8 -8
- package/dist/components/ZendeskWidget.d.ts.map +1 -1
- package/dist/index.d.ts +7 -50
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +3 -3
- package/dist/index.modern.mjs.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/machinery/-plausible.d.ts +2 -0
- package/dist/machinery/-plausible.d.ts.map +1 -0
- package/dist/machinery/index.d.ts +91 -0
- package/dist/machinery/index.d.ts.map +1 -0
- package/dist/style.d.ts +4 -4
- package/dist/style.d.ts.map +1 -1
- package/dist/theme/-styles.d.ts +7 -0
- package/dist/theme/-styles.d.ts.map +1 -0
- package/dist/theme/-theme-context.d.ts +7 -0
- package/dist/theme/-theme-context.d.ts.map +1 -0
- package/dist/theme/-theme-hooks.d.ts +2 -0
- package/dist/theme/-theme-hooks.d.ts.map +1 -0
- package/dist/theme/-theme-provider.d.ts +9 -0
- package/dist/theme/-theme-provider.d.ts.map +1 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme.d.ts +17 -17
- package/dist/theme.d.ts.map +1 -1
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils.d.ts +58 -24
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.spec.d.ts +2 -0
- package/dist/utils.spec.d.ts.map +1 -0
- package/package.json +40 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.modern.mjs","sources":["../src/components/Error.tsx","../src/utils.tsx","../src/style.ts","../src/theme.tsx","../src/components/Logo.tsx","../src/components/PageScroller.tsx","../src/components/Screenshotter.tsx","../src/components/ThemeSwitcher.tsx","../src/components/VersionSelector.tsx","../src/components/ZendeskWidget.tsx","../src/components/Layout.tsx","../src/components/PageAbout.tsx","../src/index.tsx"],"sourcesContent":["import { Button, Result, Typography } from 'antd';\nimport React from 'react';\nimport { Link } from 'react-router-dom';\n\nexport function Page404() {\n return <Result status=\"404\" title={'404'} subTitle={'Sorry, the page you visited does not exist.'} />;\n}\n\nexport function ErrorElement() {\n return (\n <Result\n status=\"500\"\n title={'Error'}\n subTitle={\n <>\n <Typography>\n Something went wrong. Please try again later. If the problem persists, please contact the administrator.\n </Typography>\n <Link to=\"/\">\n <Button style={{ marginTop: 20 }}>Back Home</Button>\n </Link>\n </>\n }\n />\n );\n}\n","import { useLayoutEffect, useState } from 'react';\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): string | number {\n const [maxHeight, setMaxHeight] = useState<string | number>(400);\n const w = document.getElementById(elementId);\n\n useLayoutEffect(() => {\n const calculate = () => {\n if (!w) {\n return;\n }\n const footerHeight = 50; // height of the footer with some padding\n let parentPaddingBottom = 80; // default padding bottom of the container element\n const closestContainer = w.parentElement; // get the closest container element\n if (closestContainer) {\n parentPaddingBottom = parseFloat(getComputedStyle(closestContainer, null).paddingBottom);\n parentPaddingBottom = isNaN(parentPaddingBottom) || parentPaddingBottom < 10 ? 80 : parentPaddingBottom;\n }\n const bottomMargin = parentPaddingBottom + footerHeight + (bottomSpace || 0);\n const boundingRect = w.getBoundingClientRect(); // get area and offset information.\n const max = window.innerHeight - boundingRect.top - bottomMargin; // this is the height of the our table content.\n setMaxHeight(max > 350 ? max : '100%');\n };\n\n calculate();\n w?.addEventListener('resize', calculate);\n window.addEventListener('resize', calculate);\n\n return () => {\n window.removeEventListener('resize', calculate);\n w?.removeEventListener('resize', calculate);\n };\n }, [elementId, w, bottomSpace]);\n\n return maxHeight;\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","import { Interpolation, Theme } from '@emotion/react';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport { lightenDarkenColor } from './utils';\n\nfunction getBaseStyles(theme: ThemeConfig): Interpolation<Theme> {\n return {\n body: {\n background: theme.token?.colorBgBase,\n fontFamily: 'Lato, sans-serif',\n margin: 0,\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: 0,\n },\n '#decaf-content': {\n paddingInline: 20,\n paddingTop: '5rem',\n paddingBottom: '5rem',\n },\n '#decaf-footer': {\n position: 'fixed',\n bottom: 0,\n right: 0,\n left: 0,\n background: theme.token?.colorBgContainer,\n paddingBlock: 0,\n paddingInline: 0,\n zIndex: 999,\n\n button: {\n height: 34,\n },\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 };\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-menu-light.ant-menu-horizontal >.ant-menu-item-selected': {\n color: `${theme.token?.colorWhite} !important`,\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","import { css, Global } from '@emotion/react';\nimport { ConfigProvider, theme } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React from 'react';\nimport { getDarkStyles, getLightStyles } from './style';\n\nconst MAIN_BLACK = '#10161d';\nconst INPUT_BG_COLOR = '#2c3d50';\n\nconst BORDER_COLORS_TRANSPARENT = {\n colorBorder: 'transparent',\n colorBorderSecondary: 'transparent',\n colorBorderBg: 'transparent',\n};\n\nexport const decafThemeLight: ThemeConfig = {\n hashed: true,\n algorithm: [theme.defaultAlgorithm],\n token: {\n borderRadius: 0,\n },\n};\n\nexport const decafThemeDark: ThemeConfig = {\n hashed: true,\n components: {\n Layout: {\n colorBgHeader: MAIN_BLACK,\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 colorBgElevated: INPUT_BG_COLOR,\n },\n InputNumber: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Menu: {\n colorItemText: 'rgba(255, 255, 255, 0.5)',\n },\n },\n token: {\n fontFamily: 'Lato, sans-serif',\n colorPrimary: '#344961',\n colorBgBase: '#1a242f',\n colorBgContainer: MAIN_BLACK,\n colorBgElevated: '#1a242f',\n colorBorderSecondary: '#1a242f',\n colorBorder: '#1a242f',\n colorBgLayout: '#1a242f',\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\ninterface ThemeContextProps {\n theme: 'dark' | 'light';\n toggleTheme: () => void;\n}\nexport const ThemeContext = React.createContext<ThemeContextProps>({\n theme: 'dark',\n toggleTheme: () => {},\n});\n\ninterface ThemeProviderProps {\n children: React.ReactNode;\n themeConfig?: ThemeConfig;\n theme?: 'dark' | 'light';\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: 'Lato, 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=Lato:wght@400;700&display=swap);\n `}\n />\n <Global styles={globalStyles} />\n\n {props.children}\n </ConfigProvider>\n </ThemeContext.Provider>\n );\n}\n\nexport const useDecafTheme = () => React.useContext(ThemeContext);\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={50}\n height={50}\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 { DownOutlined, UpOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\nexport default function PageScroller() {\n return (\n <div>\n <Button\n title=\"Scroll to top\"\n type=\"text\"\n size=\"small\"\n onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}\n icon={<UpOutlined />}\n />\n <Button\n title=\"Scroll to bottom\"\n type=\"text\"\n size=\"small\"\n onClick={() => window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' })}\n icon={<DownOutlined />}\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}\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 } else {\n return (\n <Button\n title=\"Take a screenshot of the current page\"\n type=\"text\"\n size=\"small\"\n icon={<CameraOutlined />}\n onClick={handleScreenshot}\n />\n );\n }\n}\n","import { BulbFilled } 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 title={props.theme === 'dark' ? 'switch to light theme' : 'switch to dark theme'}\n type=\"text\"\n size=\"small\"\n icon={\n <BulbFilled\n style={{\n color: props.theme === 'dark' ? 'white' : 'black',\n }}\n />\n }\n onClick={() => props.onChange()}\n />\n );\n}\n","import { CaretUpOutlined } from '@ant-design/icons';\nimport { Button, Dropdown } from 'antd';\nimport React from 'react';\n\ntype VersionCode = 'production' | 'staging' | 'testing' | 'development' | 'preview' | 'release';\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\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\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 type=\"text\" size=\"small\">\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <i className={`dot ${currentVersion?.color}`} style={{ marginRight: 5 }} />\n {currentVersion.code !== 'production' && (\n <span style={{ marginRight: 5 }}>\n You are on <b>{currentVersion.name}</b>\n </span>\n )}\n <CaretUpOutlined />\n </div>\n </Button>\n </Dropdown>\n );\n}\n","import { QuestionCircleOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button } 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\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 size=\"small\" icon={<QuestionCircleOutlined />} onClick={toggle}>\n Support\n </Button>\n );\n}\n","import { UserOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button, Col, Layout, Menu, Row, theme as anttheme, Typography } from 'antd';\nimport { ItemType, SubMenuType } from 'antd/es/menu/hooks/useItems';\nimport React from 'react';\nimport { Link, NavLink, Outlet, useLocation, useMatches } from 'react-router-dom';\nimport { useDecafTheme } from '../theme';\nimport Logo from './Logo';\nimport PageScroller from './PageScroller';\nimport ScreenShotter from './Screenshotter';\nimport ThemeSwitcher from './ThemeSwitcher';\nimport VersionSelector from './VersionSelector';\nimport ZendeskWidget from './ZendeskWidget';\n\ninterface BaseDecafMenuItem {\n label: any;\n icon?: React.ReactNode;\n children?: DecafMenuItem[];\n}\n\nexport type DecafMenuItem = BaseDecafMenuItem & ({ to?: string } | { href?: string });\n\nexport interface DecafLayoutProps {\n menu: DecafMenuItem[];\n appName: string;\n}\n\nfunction buildAntMenuFromDecafMenu(routes: DecafMenuItem[]): ItemType[] {\n const result: ItemType[] = [];\n routes.forEach((route) => {\n const item: ItemType = {\n key: 'to' in route ? route.to : route.label,\n label: route.label,\n icon: route.icon,\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 result.push(item);\n });\n\n return result;\n}\n\nexport default function DecafLayout(props: DecafLayoutProps) {\n const menuItems = buildAntMenuFromDecafMenu(props.menu);\n const matches = useMatches();\n const location = useLocation();\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 const { me } = useDecaf();\n const { token } = anttheme.useToken();\n const { theme, toggleTheme: setTheme } = useDecafTheme();\n\n return (\n <Layout style={{ height: '100%' }}>\n <Layout.Header id=\"decaf-header\" style={{ background: token.colorBgContainer }}>\n <div style={{ paddingInline: 20, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>\n <Link to=\"/\" style={{ display: 'flex', alignItems: 'center', gap: 10 }}>\n <Logo />\n <Typography.Title level={4} style={{ margin: 0 }}>\n {props.appName}\n </Typography.Title>\n </Link>\n <Menu\n style={{ justifyContent: 'flex-end', backgroundColor: 'transparent', border: 'none', flex: 1 }}\n mode=\"horizontal\"\n items={menuItems}\n selectedKeys={matchedMenuItems}\n />\n </div>\n </Layout.Header>\n <Layout.Content id=\"decaf-content\">\n <Outlet />\n </Layout.Content>\n <Layout.Footer id=\"decaf-footer\">\n <Row justify=\"space-between\" align={'middle'}>\n <Col span={10}>\n <ZendeskWidget />\n </Col>\n <Col span={4} style={{ textAlign: 'center' }}>\n <Typography.Text type=\"secondary\">\n Powered by{' '}\n <b>\n <a href=\"https://teloscube.com\" target=\"_blank\" rel=\"noreferrer\">\n Teloscube\n </a>\n </b>\n </Typography.Text>\n </Col>\n <Col span={10} style={{ justifyContent: 'flex-end', display: 'flex', gap: 10 }}>\n <Button size=\"small\" icon={<UserOutlined />}>\n {me.username}\n </Button>\n <VersionSelector />\n <ThemeSwitcher theme={theme} onChange={setTheme} />\n <ScreenShotter />\n <PageScroller />\n </Col>\n </Row>\n </Layout.Footer>\n </Layout>\n );\n}\n","import { useDecaf } from '@decafhub/decaf-react';\nimport { Descriptions, Space } from 'antd';\nimport React, { useEffect, useState } from 'react';\n\nexport interface AboutPageProps {\n appName?: string;\n appVersion?: string;\n appDescription?: string;\n content?: React.ReactNode;\n}\nexport default function PageAbout(props: AboutPageProps) {\n const { client } = useDecaf();\n const [versionBarista, setVersionBarista] = useState<string | undefined>(undefined);\n\n useEffect(() => {\n client.barista.get<{ version: string }>('/version/').then(({ data }) => setVersionBarista(data.version));\n }, [client]);\n\n return (\n <Space direction=\"vertical\" size=\"middle\" style={{ width: '100%' }}>\n <Descriptions title=\"About\" column={1} bordered>\n <Descriptions.Item label=\"Web Application Name\">{props.appName}</Descriptions.Item>\n <Descriptions.Item label=\"Web Application Description\">{props.appDescription}</Descriptions.Item>\n <Descriptions.Item label=\"Web Application Version\">{`v${props.appVersion}`}</Descriptions.Item>\n <Descriptions.Item label=\"DECAF Barista Version\">{`v${versionBarista}`}</Descriptions.Item>\n </Descriptions>\n {props.content}\n </Space>\n );\n}\n","import { InfoCircleOutlined } from '@ant-design/icons';\nimport { DecafApp, DecafAppConfig, DecafAppController, DecafWebappController } from '@decafhub/decaf-react';\nimport { css, Global } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport 'antd/dist/reset.css';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React, { useEffect } from 'react';\nimport { createBrowserRouter, RouteObject, RouterProvider } from 'react-router-dom';\nimport { ErrorElement, Page404 } from './components/Error';\nimport DecafLayout, { DecafMenuItem } from './components/Layout';\nimport PageAbout from './components/PageAbout';\nimport { decafThemeDark, decafThemeLight, ThemeProvider } from './theme';\nimport { useTableMaxHeight } from './utils';\n\nexport type DecafRoute = RouteObject;\n\nexport interface DecafWebappProps {\n config?: DecafAppConfig;\n controller?: DecafAppController;\n /**\n * The theme of the app.\n *\n * Defaults to `dark`.\n */\n theme?: 'dark' | 'light';\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 * App routes.\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 routes: DecafRoute[];\n /**\n * App menu.<br />\n * About page will be added automatically.\n */\n menuItems: DecafMenuItem[];\n appName: string;\n appDescription?: string;\n /**\n * The extra content to show on the about page.\n */\n aboutPageContent?: React.ReactNode;\n}\n\nfunction addTo<T>(array: T[], items: T[], key: keyof T): T[] {\n const result: T[] = [...array];\n items.forEach((item) => {\n const index = result.findIndex((r) => r[key] === item[key]);\n if (index >= 0) {\n result[index] = item;\n } else {\n result.push(item);\n }\n });\n return result;\n}\n\nfunction DecafWebapp(props: DecafWebappProps) {\n useEffect(() => {\n // add plausible analytics\n const script = document.createElement('script');\n script.defer = true;\n script.setAttribute('data-domain', location.hostname);\n script.src = 'https://webax.svc.sys.decafhub.com/js/plausible.js';\n document.body.appendChild(script);\n\n return () => {\n document.body.removeChild(script);\n };\n }, []);\n\n let routes = addTo<RouteObject>(\n props.routes,\n [\n {\n path: '/about',\n element: (\n <PageAbout\n appName={props.appName}\n appVersion={props.config?.currentVersion}\n appDescription={props.appDescription}\n content={props.aboutPageContent}\n />\n ),\n },\n { path: '*', element: <Page404 /> },\n ],\n 'path'\n );\n\n const menuWithAboutPage = addTo(\n props.menuItems,\n [\n {\n label: 'About',\n to: '/about',\n icon: <InfoCircleOutlined />,\n },\n ],\n 'to' as any\n );\n\n routes = [\n {\n element: <DecafLayout menu={menuWithAboutPage} appName={props.appName} />,\n path: '/',\n children: routes,\n errorElement: <ErrorElement />,\n },\n ];\n\n const router = createBrowserRouter(routes, {\n basename: props.config?.basePath,\n });\n\n const controller = props.controller || DecafWebappController;\n controller.disableZendeskWidget = true;\n\n return (\n <ThemeProvider themeConfig={props.themeConfig} theme={props.theme}>\n <DecafApp config={props.config} controller={controller}>\n <RouterProvider router={router} />\n </DecafApp>\n </ThemeProvider>\n );\n}\nexport { DecafWebapp, Global as GlobalStyle, css, styled, decafThemeDark, decafThemeLight, useTableMaxHeight };\n"],"names":["Page404","React","createElement","Result","status","title","subTitle","ErrorElement","Fragment","Typography","Link","to","Button","style","marginTop","useTableMaxHeight","elementId","bottomSpace","maxHeight","setMaxHeight","useState","w","document","getElementById","useLayoutEffect","parentPaddingBottom","closestContainer","parentElement","parseFloat","getComputedStyle","paddingBottom","isNaN","getBoundingClientRect","max","window","innerHeight","boundingRect","top","bottomMargin","calculate","addEventListener","removeEventListener","lightenDarkenColor","col","amt","usePound","slice","num","parseInt","r","b","g","String","toString","getBaseStyles","theme","_theme$token","_theme$token2","body","background","token","colorBgBase","fontFamily","margin","button","boxShadow","overflow","position","zIndex","right","left","paddingInline","paddingTop","bottom","colorBgContainer","paddingBlock","height","borderRadius","width","display","backgroundColor","MAIN_BLACK","INPUT_BG_COLOR","BORDER_COLORS_TRANSPARENT","colorBorder","colorBorderSecondary","colorBorderBg","decafThemeLight","hashed","algorithm","defaultAlgorithm","decafThemeDark","components","Layout","colorBgHeader","boxShadowSecondary","Input","Select","_extends","Checkbox","Dropdown","DatePicker","colorBgElevated","InputNumber","Menu","colorItemText","colorPrimary","colorBgLayout","green","red","blue","yellow","orange","colorWhite","colorLink","colorLinkHover","colorLinkActive","darkAlgorithm","ThemeContext","createContext","toggleTheme","ThemeProvider","props","value","setValue","localStorage","getItem","themeConfig","globalStyles","getLightStyles","baseStyles","_theme$token3","_theme$token4","_theme$token5","_theme$token6","_theme$token7","_theme$token8","_theme$token9","_theme$token10","_theme$token11","_theme$token12","_theme$components","_theme$components$But","_theme$token13","_theme$token14","_theme$token15","_theme$token16","color","getDarkStyles","Provider","t","setItem","ConfigProvider","Global","styles","css","_t","_","children","useDecafTheme","useContext","Logo","version","id","xmlns","xmlnsXlink","x","y","viewBox","enableBackground","xmlSpace","fill","d","PageScroller","type","size","onClick","scrollTo","behavior","icon","UpOutlined","scrollHeight","DownOutlined","ScreenShotter","async","handleScreenshot","footer","setProperty","dataUrl","toDataURL","link","download","href","click","remove","triggerNode","cloneElement","CameraOutlined","ThemeSwitcher","BulbFilled","onChange","url","split","indexOfWebapps","parts","indexOf","join","appName","location","getAppNameFromUrl","appVersionCode","startsWith","length","isPreviewVersion","getAppVersionFromUrl","isReleaseVersion","versions","code","name","getCurrentAppPath","show","process","env","NODE_ENV","find","v","currentVersion","placement","arrow","menu","items","filter","map","key","label","className","alignItems","marginRight","CaretUpOutlined","ZENDESK_WIDGET_SCRIPT","ZendeskWidget","me","publicConfig","useDecaf","open","setOpen","useEffect","zendesk","script","src","onload","zE","appendChild","zESettings","webWidget","offset","horizontal","vertical","contactForm","subject","fields","prefill","fullname","email","removeChild","QuestionCircleOutlined","buildAntMenuFromDecafMenu","routes","result","forEach","route","item","NavLink","end","push","DecafLayout","menuItems","matches","useMatches","useLocation","matchedMenuItems","match","pathname","anttheme","useToken","setTheme","Header","justifyContent","gap","Title","level","border","flex","mode","selectedKeys","Content","Outlet","Footer","Row","justify","align","Col","span","textAlign","Text","target","rel","UserOutlined","username","VersionSelector","PageAbout","client","versionBarista","setVersionBarista","undefined","barista","get","then","data","Space","direction","Descriptions","column","bordered","Item","appDescription","appVersion","content","array","index","findIndex","DecafWebapp","defer","setAttribute","hostname","addTo","path","element","config","_props$config","aboutPageContent","menuWithAboutPage","InfoCircleOutlined","errorElement","router","createBrowserRouter","basename","_props$config2","basePath","controller","DecafWebappController","disableZendeskWidget","DecafApp","RouterProvider"],"mappings":"02BAIgBA,SAAAA,IACd,OAAOC,EAACC,cAAAC,EAAO,CAAAC,OAAO,MAAMC,MAAO,MAAOC,SAAU,+CACtD,UAE4BC,IAC1B,OACEN,EAAAC,cAACC,EAAM,CACLC,OAAO,MACPC,MAAO,QACPC,SACEL,EAAAC,cAAAD,EAAAO,SAAA,KACEP,EAAAC,cAACO,EAEY,KAAA,4GACbR,EAAAC,cAACQ,EAAI,CAACC,GAAG,KACPV,EAAAC,cAACU,EAAM,CAACC,MAAO,CAAEC,UAAW,KAAwB,gBAMhE,qOCDgBC,SAAAA,EAAkBC,EAAmBC,GACnD,MAAOC,EAAWC,GAAgBC,EAA0B,KACrDC,EAAGC,SAASC,eAAeP,GA8BlC,OA5BAQ,EAAgB,KACd,QAAkB,KAChB,IAAKH,EACH,OAGF,IAAII,EAAsB,GAC1B,MAAsBC,EAAGL,EAAEM,cACvBD,IACFD,EAAsBG,WAAWC,iBAAiBH,EAAkB,MAAMI,eAC1EL,EAAsBM,MAAMN,IAAwBA,EAAsB,GAAK,GAAKA,GAEtF,QAAqBA,EAPA,IAOsCR,GAAe,KACrDI,EAAEW,wBACjBC,EAAMC,OAAOC,YAAcC,EAAaC,IAAMC,EACpDnB,EAAac,EAAM,IAAMA,EAAM,SAOjC,OAJAM,UACAlB,GAAAA,EAAGmB,iBAAiB,SAAUD,GAC9BL,OAAOM,iBAAiB,SAAUD,GAE3B,KACLL,OAAOO,oBAAoB,SAAUF,GACpC,MAADlB,GAAAA,EAAGoB,oBAAoB,SAAUF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KAAM,IAAKC,QAAShV,EAAAC,cAACF,EAAO,QAEhC,QAGF,MAAuBqV,EAAGN,GACxBrN,EAAM0J,UACN,CACE,CACE1C,MAAO,QACP/N,GAAI,SACJwK,KAAMlL,EAACC,cAAAoV,EAAqB,QAGhC,MAGF3E,EAAS,CACP,CACEsE,QAAShV,EAAAC,cAACiR,GAAW,CAAC9C,KAAMgH,EAAmBtI,QAASrF,EAAMqF,UAC9DiI,KAAM,IACNlL,SAAU6G,EACV4E,aAActV,EAACC,cAAAK,EAAe,QAIlC,MAAYiV,EAAGC,EAAoB9E,EAAQ,CACzC+E,SAAU,OAAAhO,EAAAA,EAAMwN,aAAN,EAAAS,EAAcC,WAGVC,EAAGnO,EAAMmO,YAAcC,EAGvC,OAFAD,EAAWE,sBAAuB,EAGhC9V,EAAAC,cAACuH,EAAa,CAACM,YAAaL,EAAMK,YAAaxE,MAAOmE,EAAMnE,OAC1DtD,EAACC,cAAA8V,EAAS,CAAAd,OAAQxN,EAAMwN,OAAQW,WAAYA,GAC1C5V,EAACC,cAAA+V,GAAeT,OAAQA,KAIhC"}
|
|
1
|
+
{"version":3,"file":"index.modern.mjs","sources":["../src/components/Error.tsx","../src/utils.tsx","../src/theme/-styles.tsx","../src/theme/-theme-context.tsx","../src/theme/-theme-hooks.tsx","../src/theme/-theme-provider.tsx","../src/components/Breadcrumb.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 } 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","import { DecafClient } from '@decafhub/decaf-client';\nimport Decimal from 'decimal.js';\nimport Cookies from 'js-cookie';\nimport md5 from 'md5';\nimport { useLayoutEffect, useState } from 'react';\n\nconst FOOTER_HEIGHT = 32;\nconst FOOTER_PADDING = 16;\nconst PAGINATION_PADDING = 32;\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): string | number {\n const [maxHeight, setMaxHeight] = useState<string | number>(400);\n const remaining = useRemaningHeight(elementId);\n\n const w = document.getElementById(elementId);\n\n useLayoutEffect(() => {\n if (w) {\n const tableWrapper = w?.closest('.ant-table-wrapper');\n const observer = new ResizeObserver(() => {\n const tableHeaderHeight = tableWrapper?.querySelector('.ant-table-header')?.getBoundingClientRect().height ?? 0;\n const tableFooterHeight = tableWrapper?.querySelector('.ant-table-footer')?.getBoundingClientRect().height ?? 0;\n const paginations = tableWrapper?.querySelectorAll('.ant-pagination') ?? [];\n const paginationPaddings = paginations.length * PAGINATION_PADDING;\n const paginationHeights = Array.from(paginations).reduce(\n (acc, cur) => acc + cur.getBoundingClientRect().height,\n 0\n );\n\n const max =\n remaining -\n tableHeaderHeight -\n tableFooterHeight -\n paginationHeights -\n paginationPaddings -\n (bottomSpace || 0);\n\n setMaxHeight(remaining > 350 ? max : '100%');\n });\n\n observer.observe(tableWrapper!, { box: 'content-box' });\n\n return () => {\n observer.disconnect();\n };\n }\n }, [bottomSpace, remaining, w]);\n\n return maxHeight;\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","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};\n\nexport const decafThemeLight: ThemeConfig = {\n hashed: true,\n algorithm: [theme.defaultAlgorithm],\n components: {\n Layout: {\n colorBgHeader: '#ededed',\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 colorBgHeader: DARK_BLACK_PRIMARY,\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 colorBgElevated: INPUT_BG_COLOR,\n },\n InputNumber: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Menu: {\n colorItemText: 'rgba(255, 255, 255, 0.5)',\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: 64,\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: 50,\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?.colorBgHeader,\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-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 React from 'react';\nimport { ThemeContext } from './-theme-context';\n\nexport const useDecafTheme = () => React.useContext(ThemeContext);\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 { 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 { 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 buildAntMenuFromDecafMenu(routes: DecafMenuItem[]): ItemType[] {\n const result: ItemType[] = [];\n\n routes.forEach((route) => {\n const item: ItemType = {\n key: 'to' in route ? route.to : route.label,\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 bodyStyle={{ 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 }}\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 { HomeOutlined } from '@ant-design/icons';\nimport { useNProgress } from '@tanem/react-nprogress';\nimport { Col, ConfigProvider, Grid, Layout, Row, Typography } from 'antd';\nimport React from 'react';\nimport { Link, Outlet, useLocation, useMatches, useNavigation } from 'react-router-dom';\nimport { decafThemeDark, useDecafTheme } from '../theme';\nimport { DecafMenuItem } from '../types';\nimport { Breadcrumb, BreadcrumbItem } from './Breadcrumb';\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}\n\nexport default function DecafLayout(props: DecafLayoutProps) {\n const location = useLocation();\n const navigation = useNavigation();\n const matches: any = useMatches();\n const breakpoints = Grid.useBreakpoint();\n const { theme: currentTheme, toggleTheme: setCurrentTheme } = useDecafTheme();\n const match = matches?.[matches?.length - 1];\n const isFullScreen = !!match?.handle.fullScreen;\n const extras: React.ReactNode | undefined = match?.handle.extras;\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 <Layout.Content id=\"decaf-content\" style={{ flex: 1, minHeight: '100%' }}>\n <DecafLayoutBreadcrumb>{extras}</DecafLayoutBreadcrumb>\n\n <div id=\"decaf-layout-content-outlet\" className={isFullScreen ? 'full-screen' : ''}>\n <Outlet />\n </div>\n </Layout.Content>\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\nexport function DecafLayoutBreadcrumb(props: { children?: React.ReactNode }) {\n const matches = useMatches();\n\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 <div>{props.children}</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';\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 <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 );\n}\n","import {\n DecafApp,\n DecafAppConfig,\n DecafAppController,\n DecafContextType,\n DecafWebappController,\n useDecaf,\n} from '@decafhub/decaf-react';\nimport 'antd/dist/reset.css';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React, { useEffect } from 'react';\nimport { RouteObject, RouterProvider, createBrowserRouter } from 'react-router-dom';\nimport { BreadcrumbItem } from '../components/Breadcrumb';\nimport { Page404, PageError } from '../components/Error';\nimport DecafLayout from '../components/Layout';\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 crumb?: (data: any) => BreadcrumbItem;\n /** When true, removes paddings from the content area. */\n fullScreen?: boolean;\n extras?: React.ReactNode;\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 <DecafApp config={props.config} controller={controller}>\n <DecafWebappInternal {...props} />\n </DecafApp>\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 { path: '*', element: <Page404 />, crumb: () => ({ title: 'Error: Page Not Found' }) },\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 return [\n {\n element: <DecafLayout menu={props.buildMenuItems(context)} appName={props.appName} />,\n path: '/',\n children: routes.map(decafRouteToReactRoute),\n errorElement: <PageError />,\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","message","React","createElement","Fragment","Typography","Link","to","Button","style","marginTop","Page401","Result","icon","LockFilled","color","title","subTitle","Page403","status","Page404","PageError","FOOTER_HEIGHT","FOOTER_PADDING","useRemaningHeight","elementId","remainingHeight","setRemainingHeight","useState","useLayoutEffect","e","document","getElementById","calculate","elementTop","getBoundingClientRect","top","elementHeight","window","innerHeight","addEventListener","removeEventListener","useTableMaxHeight","bottomSpace","maxHeight","setMaxHeight","remaining","w","tableWrapper","closest","observer","ResizeObserver","_tableWrapper$querySe","_tableWrapper$querySe2","_tableWrapper$querySe3","_tableWrapper$querySe4","_tableWrapper$querySe5","tableHeaderHeight","querySelector","height","tableFooterHeight","paginations","querySelectorAll","paginationPaddings","length","paginationHeights","Array","from","reduce","acc","cur","observe","box","disconnect","lightenDarkenColor","col","amt","usePound","slice","num","parseInt","r","b","g","String","toString","logout","client","fromAll","barista","get","timeout","catch","console","error","alert","finally","Cookies","remove","location","reload","booleanMap","map","x","True","False","nullableBooleanMap","Null","Direction","toDirection","Decimal","comparedTo","Short","Square","Long","directionMap","setAtKey","array","items","key","result","forEach","item","index","findIndex","push","DARK_BLACK_PRIMARY","DARK_BLACK_SECONDARY","LIGHT_WHITE_PRIMARY","INPUT_BG_COLOR","BORDER_COLORS_TRANSPARENT","colorBorder","colorBorderSecondary","colorBorderBg","decafThemeLight","hashed","algorithm","theme","defaultAlgorithm","components","Layout","colorBgHeader","token","borderRadius","colorBgContainer","colorBgBase","colorBgLayout","colorBgElevated","decafThemeDark","boxShadow","boxShadowSecondary","Input","_extends","Select","Checkbox","Dropdown","DatePicker","InputNumber","Menu","colorItemText","fontFamily","colorPrimary","green","red","blue","yellow","orange","colorWhite","colorLink","colorLinkHover","colorLinkActive","darkAlgorithm","getBaseStyles","_theme$token","_theme$token2","_decafThemeDark$compo","_decafThemeDark$compo2","menuOverride","borderBottomColor","body","background","margin","minHeight","button","overflow","position","zIndex","right","left","paddingInline","display","alignItems","paddingTop","paddingBottom","backgroundColor","flexDirection","justifyContent","width","breadcrumbStyles","padding","bottom","paddingBlock","getCrumbColor","colorBase","darkColors","lightColors","listStyle","marginInline","transition","ThemeContext","createContext","toggleTheme","useDecafTheme","useContext","ThemeProvider","props","value","setValue","localStorage","getItem","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","_t","_","children","Breadcrumb","itemRender","separator","breakpoints","Grid","useBreakpoint","firstAndLAst","concat","className","i","href","dmenu","child","j","label","menu","cursor","gap","DownOutlined","fontSize","renderBreadcrumbs","lg","RightOutlined","DocumentationButton","useToken","type","target","rel","QuestionCircleOutlined","xs","Logo","version","id","xmlns","xmlnsXlink","y","viewBox","enableBackground","xmlSpace","fill","d","buildAntMenuFromDecafMenu","routes","route","NavLink","end","DecafPoweredBy","Text","DecafMenu","drawerOpen","setDrawerOpen","matches","useMatches","useLocation","md","menuItems","matchedMenuItems","match","pathname","filter","useEffect","selectedKeys","mode","overflowedIndicator","EllipsisOutlined","flex","border","minWidth","MenuOutlined","marginRight","onClick","Drawer","open","footer","onClose","bodyStyle","clientWidth","PageScroller","UpOutlined","scrollTo","behavior","scrollHeight","ScreenShotter","async","handleScreenshot","setProperty","dataUrl","html2canvas","toDataURL","link","download","click","triggerNode","cloneElement","CameraOutlined","ThemeSwitcher","BulbFilled","BulbOutlined","onChange","UserProfileDropdown","gravatar","setGravatar","undefined","decaf","useDecaf","navigate","useNavigate","me","email","url","md5","fetch","method","then","response","getGravatarUrl","fullname","username","disabled","UserOutlined","dashed","LogoutOutlined","doLogout","doLogoutAll","confirm","InfoCircleOutlined","doGoToAbout","propsAvatar","src","trigger","Avatar","getCurrentAppPath","parts","split","indexOfWebapps","indexOf","join","VersionSelector","appName","getAppNameFromUrl","appVersionCode","startsWith","isPreviewVersion","getAppVersionFromUrl","isReleaseVersion","versions","code","name","show","process","env","NODE_ENV","currentVersion","find","v","isProd","placement","arrow","CaretUpOutlined","ZENDESK_WIDGET_SCRIPT","ZendeskWidget","publicConfig","setOpen","zendesk","script","onload","zE","appendChild","zESettings","webWidget","offset","horizontal","vertical","contactForm","subject","fields","prefill","removeChild","MessageOutlined","DecafLayout","navigation","useNavigation","currentTheme","setCurrentTheme","isFullScreen","handle","fullScreen","extras","DecafLayoutProgress","isAnimating","state","Header","DecafLayoutBrand","Content","DecafLayoutBreadcrumb","Outlet","Footer","Row","justify","align","Col","span","textAlign","Title","level","fontWeight","whiteSpace","animationDuration","isFinished","progress","useNProgress","opacity","pointerEvents","marginLeft","transform","crumbs","_match$handle","Boolean","crumb","data","breadcrumb","HomeOutlined","_key","PageAbout","versionCultproxy","setVersionCultproxy","versionBarista","setVersionBarista","versionEstate","setVersionEstate","bare","gutter","sm","xl","xxl","Card","bordered","Statistic","appDescription","appVersion","prefix","content","DecafWebapp","defer","setAttribute","hostname","getPlausibleScript","controller","DecafWebappController","disableZendeskWidget","DecafApp","config","DecafWebappInternal","_props$config","_props$config2","defaultRoutes","path","element","buildAboutPageContent","buildRouteItems","router","createBrowserRouter","context","buildMenuItems","decafRouteToReactRoute","errorElement","compileRoutes","basename","basePath","RouterProvider","rest","_objectWithoutPropertiesLoose","_excluded"],"mappings":"gsCAKA,SAASA,IAAkBC,QAAEA,IAC3B,OACEC,EAAAC,cAAAD,EAAAE,SAAA,KACEF,EAACC,cAAAE,EAAY,KAAAJ,GACbC,EAAAC,cAACG,EAAI,CAACC,GAAG,KACPL,EAAAC,cAACK,EAAM,CAACC,MAAO,CAAEC,UAAW,KAAI,cAIxC,CAEgB,SAAAC,KACd,OACET,EAAAC,cAACS,EAAM,CACLC,KAAMX,EAAAC,cAACW,EAAU,CAACL,MAAO,CAAEM,MAAO,aAClCC,MAAO,uBACPC,SAAUf,EAAAC,cAACH,GAAiB,CAACC,QAAS,+DAG5C,UAEgBiB,KACd,OACEhB,gBAACU,EAAM,CACLO,OAAO,MACPH,MAAO,gBACPC,SAAUf,EAACC,cAAAH,GAAkB,CAAAC,QAAS,oDAG5C,CAEgB,SAAAmB,KACd,OACElB,gBAACU,EAAM,CACLO,OAAO,MACPH,MAAO,iBACPC,SAAUf,EAACC,cAAAH,GAAkB,CAAAC,QAAS,iDAG5C,UAEgBoB,KACd,OACEnB,gBAACU,EAAM,CACLO,OAAO,MACPH,MAAO,QACPC,SACEf,EAACC,cAAAH,GACC,CAAAC,QACE,8GAMZ,wOCtDA,MAAMqB,GAAgB,GAChBC,GAAiB,GAUP,SAAAC,GAAkBC,GAChC,MAAOC,EAAiBC,GAAsBC,EAAiB,GAyB/D,OAvBAC,EAAgB,KACd,MAAMC,EAAIC,SAASC,eAAeP,GAE5BQ,EAAYA,KAChB,IAAKH,EACH,OAGF,MAAMI,EAAaJ,EAAEK,wBAAwBC,IACvCC,EAAgBC,OAAOC,YAAcL,EAAaZ,GAAgBC,GACxEI,EAAmBU,EACrB,EAMA,OAJAJ,IACC,MAADH,GAAAA,EAAGU,iBA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AAM6K,QACfqG,WAAwB,OAAdc,EAAEhS,EAAM8R,aAAM,EAAZE,EAAcrG,eAC1BsF,eAAgBjR,EAAMiR,eACtBG,QAAoC,MAA3BpR,EAAMqS,2BAAqB,EAA3BrS,EAAMqS,sBAAwB3J,KAG3CmH,MAAOA,KAAO,CAAEpc,MAAO,WAEzB,CAAE0e,KAAM,IAAKC,QAASzf,EAAAC,cAACiB,GAAO,MAAKgc,MAAOA,KAAO,CAAEpc,MAAO,4BAGtDoR,EAAShL,GAAqBmG,EAAMsS,gBAAgB5J,GAAQwJ,EAAe,QAE3EK,EAASC,WAKaxS,EAAyByS,EAA2B5N,GAChF,MAAO,CACL,CACEuN,QAASzf,EAACC,cAAA0a,IAAYpK,KAAMlD,EAAM0S,eAAeD,GAAU5H,QAAS7K,EAAM6K,UAC1EsH,KAAM,IACNjQ,SAAU2C,EAAO9L,IAAI4Z,IACrBC,aAAcjgB,EAACC,cAAAkB,GAAY,OAGjC,CAdqC+e,CAAc7S,EAAO0I,EAAO7D,GAAS,CAAEiO,SAAUb,OAAFA,EAAEjS,EAAM8R,aAANG,EAAAA,EAAcc,WAElG,OAAOpgB,gBAACqgB,EAAc,CAACT,OAAQA,GACjC,CAaM,SAAUI,GAAuB7N,GACrC,MAAM+K,MAAEA,EAAKhC,WAAEA,EAAUC,OAAEA,EAAM5L,SAAEA,GAAsB4C,EAEzD,OAEE7I,GAAYgX,CAAAA,oIAJsCC,CAAKpO,EAAKqO,IAE1DjR,EAEgB0L,CAAAA,OAAQ,CAAEiC,QAAOhC,aAAYC,UAAU5L,SAAUA,EAASnJ,IAAI4Z,KAEhE,CAAE/E,OAAQ,CAAEiC,QAAOhC,aAAYC,WAEnD"}
|
package/dist/index.module.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{UpOutlined as e,DownOutlined as t,CameraOutlined as n,BulbFilled as o,CaretUpOutlined as r,QuestionCircleOutlined as l,UserOutlined as a,InfoCircleOutlined as c}from"@ant-design/icons";import{useDecaf as i,DecafApp as d,DecafWebappController as m}from"@decafhub/decaf-react";import{Global as s,css as u}from"@emotion/react";export{Global as GlobalStyle,css}from"@emotion/react";export{default as styled}from"@emotion/styled";import"antd/dist/reset.css";import p,{useState as f,useLayoutEffect as g,useEffect as h}from"react";import{Link as b,useMatches as w,useLocation as E,Outlet as v,NavLink as k,createBrowserRouter as y,RouterProvider as C}from"react-router-dom";import{Result as B,Typography as x,Button as z,theme as I,ConfigProvider as S,Dropdown as W,Layout as T,Menu as N,Row as P,Col as L,Space as D,Descriptions as j}from"antd";import A from"html2canvas";function V(){return p.createElement(B,{status:"404",title:"404",subTitle:"Sorry, the page you visited does not exist."})}function F(){return p.createElement(B,{status:"500",title:"Error",subTitle:p.createElement(p.Fragment,null,p.createElement(x,null,"Something went wrong. Please try again later. If the problem persists, please contact the administrator."),p.createElement(b,{to:"/"},p.createElement(z,{style:{marginTop:20}},"Back Home")))})}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},M.apply(this,arguments)}function O(e,t){var n=f(400),o=n[0],r=n[1],l=document.getElementById(e);return g(function(){var e=function(){if(l){var e=80,n=l.parentElement;n&&(e=parseFloat(getComputedStyle(n,null).paddingBottom),e=isNaN(e)||e<10?80:e);var o=e+50+(t||0),a=l.getBoundingClientRect(),c=window.innerHeight-a.top-o;r(c>350?c:"100%")}};return e(),null==l||l.addEventListener("resize",e),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),null==l||l.removeEventListener("resize",e)}},[e,l,t]),o}function R(e,t){var n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);var o=parseInt(e,16),r=(o>>16)+t;r>255?r=255:r<0&&(r=0);var l=(o>>8&255)+t;l>255?l=255:l<0&&(l=0);var a=(255&o)+t;return a>255?a=255:a<0&&(a=0),(n?"#":"")+String("000000"+(a|l<<8|r<<16).toString(16)).slice(-6)}function H(e){var t,n;return{body:{background:null==(t=e.token)?void 0:t.colorBgBase,fontFamily:"Lato, sans-serif",margin:0},button:{boxShadow:"none !important"},".ant-table-body":{overflow:"auto !important"},"#decaf-header":{position:"fixed",zIndex:999,right:0,left:0,paddingInline:0},"#decaf-content":{paddingInline:20,paddingTop:"5rem",paddingBottom:"5rem"},"#decaf-footer":{position:"fixed",bottom:0,right:0,left:0,background:null==(n=e.token)?void 0:n.colorBgContainer,paddingBlock:0,paddingInline:0,zIndex:999,button:{height:34}},".dot":{borderRadius:"50%",width:10,height:10,display:"inline-block",backgroundColor:"rgba(255,255,255,.25)","&.green":{backgroundColor:"#80ff00 !important"},"&.yellow":{backgroundColor:"#ff0 !important"},"&.orange":{backgroundColor:"#ff7000 !important"},"&.red":{backgroundColor:"#ff0000 !important"}}}}var _,G="#10161d",K="#2c3d50",U={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},X={hashed:!0,algorithm:[I.defaultAlgorithm],token:{borderRadius:0}},Y={hashed:!0,components:{Layout:{colorBgHeader:G},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:K},Input:M({},U,{colorBgContainer:K}),Select:M({},U,{colorBgContainer:K}),Checkbox:M({},U,{colorBgContainer:K}),Dropdown:M({},U),DatePicker:M({},U,{colorBgContainer:K,colorBgElevated:K}),InputNumber:M({},U,{colorBgContainer:K}),Menu:{colorItemText:"rgba(255, 255, 255, 0.5)"}},token:{fontFamily:"Lato, sans-serif",colorPrimary:"#344961",colorBgBase:"#1a242f",colorBgContainer:G,colorBgElevated:"#1a242f",colorBorderSecondary:"#1a242f",colorBorder:"#1a242f",colorBgLayout:"#1a242f",borderRadius:0,green:"#48734d",red:"#b03a38",blue:"#0d6efd",yellow:"#ffc107",orange:"#fd7e14",colorWhite:"#fff",colorLink:"#a4bfff",colorLinkHover:"#7199fb",colorLinkActive:"#7199fb"},algorithm:[I.darkAlgorithm]},Z=p.createContext({theme:"dark",toggleTheme:function(){}});function q(e){var t=p.useState(function(){var t=e.theme||localStorage.getItem("decafAppTheme");return"dark"===t||"light"===t?t:"dark"}),n=t[0],o=t[1],r="light"===n?X:Y;r=M({},r,e.themeConfig||{}),r=M({},r,{token:M({},r.token,{fontFamily:"Lato, sans-serif"})});var l,a,c="light"===n?function(e){return M({},H(e))}(r):function(e){var t,n,o,r,l,a,c,i,d,m,s,u,p,f,g,h;return M({},H(e),{"*":{"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:null==(t=e.token)?void 0:t.colorBgContainer},"&::-webkit-scrollbar-thumb":{background:null==(n=e.token)?void 0:n.colorPrimary}},".ant-page-header-back-button, .ant-page-header-heading-title":{color:(null==(o=e.token)?void 0:o.colorWhite)+" !important"},".ant-badge-count":{color:(null==(r=e.token)?void 0:r.colorWhite)+" !important"},".ant-table-thead > tr > th":{background:R((null==(l=e.token)?void 0:l.colorBgContainer)||"",-5)+" !important","&:hover":{background:(null==(a=e.token)?void 0:a.colorBgContainer)+" !important"}},".ant-table-filter-dropdown":{"input, .ant-table-filter-dropdown-search-input":{background:(null==(c=e.token)?void 0:c.colorBgBase)+" !important"},".ant-dropdown-menu-item, .ant-dropdown-menu":{background:(null==(i=e.token)?void 0:i.colorBgContainer)+" !important"}},".ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected":{color:(null==(d=e.token)?void 0:d.colorWhite)+" !important"},".ant-tabs-tab-active":{".ant-tabs-tab-btn":{color:(null==(m=e.token)?void 0:m.colorWhite)+" !important"}},".ant-radio-button-wrapper-checked":{backgroundColor:(null==(s=e.components)||null==(u=s.Button)?void 0:u.colorBgContainer)+" !important",color:(null==(p=e.token)?void 0:p.colorWhite)+" !important"},".ant-picker-date-panel":{".ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end":{"&::before":{background:(null==(f=e.token)?void 0:f.colorBgBase)+" !important"},".ant-picker-cell-inner":{background:(null==(g=e.token)?void 0:g.colorBgBase)+" !important"}},".ant-picker-cell-range-start, .ant-picker-cell-range-end":{".ant-picker-cell-inner":{background:(null==(h=e.token)?void 0:h.colorPrimary)+" !important"}}}})}(r);return p.createElement(Z.Provider,{value:{theme:n,toggleTheme:function(){var e="dark"===n?"light":"dark";o(e),localStorage.setItem("decafAppTheme",e)}}},p.createElement(S,{theme:r},p.createElement(s,{styles:u(_||(l=["\n @import url(https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap);\n "],a||(a=l.slice(0)),l.raw=a,_=l))}),p.createElement(s,{styles:c}),e.children))}var J=function(){return p.useContext(Z)};function Q(){return p.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 649.6 767.9",enableBackground:"new 0 0 649.6 767.9",xmlSpace:"preserve",width:50,height:50},p.createElement("g",null,p.createElement("path",{fill:"#52CEF4",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"}),p.createElement("path",{fill:"#227EC3",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"}),p.createElement("path",{fill:"#409DD5",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"}),p.createElement("path",{fill:"#227EC3",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"}),p.createElement("path",{fill:"#227EC3",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"}),p.createElement("path",{fill:"#52CEF4",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"}),p.createElement("path",{fill:"#409DD5",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"})))}function $(){return p.createElement("div",null,p.createElement(z,{title:"Scroll to top",type:"text",size:"small",onClick:function(){return window.scrollTo({top:0,behavior:"smooth"})},icon:p.createElement(e,null)}),p.createElement(z,{title:"Scroll to bottom",type:"text",size:"small",onClick:function(){return window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},icon:p.createElement(t,null)}))}function ee(e){var t=function(){try{var e=document.getElementById("decaf-footer");return null==e||e.style.setProperty("display","none"),Promise.resolve(A(document.body)).then(function(t){var n=t.toDataURL("image/png");null==e||e.style.setProperty("display","block");var o=document.createElement("a");o.download="screenshot.png",o.href=n,o.click(),o.remove()})}catch(e){return Promise.reject(e)}};return e.triggerNode?p.cloneElement(e.triggerNode,{onClick:t}):p.createElement(z,{title:"Take a screenshot of the current page",type:"text",size:"small",icon:p.createElement(n,null),onClick:t})}function te(e){return p.createElement(z,{title:"dark"===e.theme?"switch to light theme":"switch to dark theme",type:"text",size:"small",icon:p.createElement(o,{style:{color:"dark"===e.theme?"white":"black"}}),onClick:function(){return e.onChange()}})}function ne(e){var t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function oe(){var e,t,n,o=-1===(t=(e=window.location.href.split("/")).indexOf("webapps"))?"":e[t+1],l=function(e){var t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+2]}(),a=function(e){return e.startsWith("preview-")&&e.length>8}(n=l)?"preview":function(e){return e.startsWith("v")&&e.length>1}(n)?"release":n,c=[{code:"development",name:"Development Version",color:"red",url:"/webapps/"+o+"/development/"+ne(window.location.href),show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:"/webapps/"+o+"/testing/"+ne(window.location.href),show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:"/webapps/"+o+"/staging/"+ne(window.location.href),show:!0},{code:"production",name:"Production Version",color:"green",url:"/webapps/"+o+"/production/"+ne(window.location.href),show:!0},{code:"preview",name:"Preview Version",color:"grey",url:"/",show:!1},{code:"release",name:"Release Version",color:"grey",url:"/",show:!1}],i=c.find(function(e){return e.code===a});return i?p.createElement(W,{placement:"top",arrow:!0,menu:{items:c.filter(function(e){return e.show}).map(function(e){return{key:e.name,label:p.createElement("span",null,p.createElement("i",{className:"dot "+e.color})," ",e.name),onClick:function(){window.location.href=e.url}}})}},p.createElement(z,{type:"text",size:"small"},p.createElement("div",{style:{display:"flex",alignItems:"center"}},p.createElement("i",{className:"dot "+(null==i?void 0:i.color),style:{marginRight:5}}),"production"!==i.code&&p.createElement("span",{style:{marginRight:5}},"You are on ",p.createElement("b",null,i.name)),p.createElement(r,null)))):null}var re="https://static.zdassets.com/ekr/snippet.js";function le(){var e=i(),t=e.me,n=e.publicConfig,o=f(!1),r=o[0],a=o[1];return h(function(){if(n.zendesk&&"undefined"!=typeof document){var e=document.createElement("script");return e.src=re+"?key="+n.zendesk,e.async=!0,e.id="ze-snippet",e.onload=function(){window.zE("webWidget","hide"),window.zE("webWidget:on","open",function(){window.zE("webWidget","show"),a(!0)}),window.zE("webWidget:on","close",function(){window.zE("webWidget","hide"),a(!1)})},document.body.appendChild(e),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":t.fullname}},{id:"email",prefill:{"*":t.email}}]}},function(){document.body.removeChild(e)}}},[n,t]),n.zendesk?p.createElement(z,{size:"small",icon:p.createElement(l,null),onClick:function(){r?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),a(!r)}},"Support"):null}function ae(e){var t=[];return e.forEach(function(e){var n={key:"to"in e?e.to:e.label,label:e.label,icon:e.icon};"to"in e&&e.to?n.label=p.createElement(k,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=p.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=ae(e.children||[])),t.push(n)}),t}function ce(e){var t=ae(e.menu),n=w(),o=E(),r=n.map(function(e){return e.pathname}).filter(function(e){return"/"===o.pathname||"/"!==e}),l=i().me,c=I.useToken().token,d=J(),m=d.theme,s=d.toggleTheme;return p.createElement(T,{style:{height:"100%"}},p.createElement(T.Header,{id:"decaf-header",style:{background:c.colorBgContainer}},p.createElement("div",{style:{paddingInline:20,display:"flex",justifyContent:"space-between",alignItems:"center"}},p.createElement(b,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},p.createElement(Q,null),p.createElement(x.Title,{level:4,style:{margin:0}},e.appName)),p.createElement(N,{style:{justifyContent:"flex-end",backgroundColor:"transparent",border:"none",flex:1},mode:"horizontal",items:t,selectedKeys:r}))),p.createElement(T.Content,{id:"decaf-content"},p.createElement(v,null)),p.createElement(T.Footer,{id:"decaf-footer"},p.createElement(P,{justify:"space-between",align:"middle"},p.createElement(L,{span:10},p.createElement(le,null)),p.createElement(L,{span:4,style:{textAlign:"center"}},p.createElement(x.Text,{type:"secondary"},"Powered by"," ",p.createElement("b",null,p.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube")))),p.createElement(L,{span:10,style:{justifyContent:"flex-end",display:"flex",gap:10}},p.createElement(z,{size:"small",icon:p.createElement(a,null)},l.username),p.createElement(oe,null),p.createElement(te,{theme:m,onChange:s}),p.createElement(ee,null),p.createElement($,null)))))}function ie(e){var t=i().client,n=f(void 0),o=n[0],r=n[1];return h(function(){t.barista.get("/version/").then(function(e){return r(e.data.version)})},[t]),p.createElement(D,{direction:"vertical",size:"middle",style:{width:"100%"}},p.createElement(j,{title:"About",column:1,bordered:!0},p.createElement(j.Item,{label:"Web Application Name"},e.appName),p.createElement(j.Item,{label:"Web Application Description"},e.appDescription),p.createElement(j.Item,{label:"Web Application Version"},"v"+e.appVersion),p.createElement(j.Item,{label:"DECAF Barista Version"},"v"+o)),e.content)}function de(e,t,n){var o=[].concat(e);return t.forEach(function(e){var t=o.findIndex(function(t){return t[n]===e[n]});t>=0?o[t]=e:o.push(e)}),o}function me(e){var t,n;h(function(){var e=document.createElement("script");return e.defer=!0,e.setAttribute("data-domain",location.hostname),e.src="https://webax.svc.sys.decafhub.com/js/plausible.js",document.body.appendChild(e),function(){document.body.removeChild(e)}},[]);var o=de(e.routes,[{path:"/about",element:p.createElement(ie,{appName:e.appName,appVersion:null==(t=e.config)?void 0:t.currentVersion,appDescription:e.appDescription,content:e.aboutPageContent})},{path:"*",element:p.createElement(V,null)}],"path"),r=de(e.menuItems,[{label:"About",to:"/about",icon:p.createElement(c,null)}],"to");o=[{element:p.createElement(ce,{menu:r,appName:e.appName}),path:"/",children:o,errorElement:p.createElement(F,null)}];var l=y(o,{basename:null==(n=e.config)?void 0:n.basePath}),a=e.controller||m;return a.disableZendeskWidget=!0,p.createElement(q,{themeConfig:e.themeConfig,theme:e.theme},p.createElement(d,{config:e.config,controller:a},p.createElement(C,{router:l})))}export{me as DecafWebapp,Y as decafThemeDark,X as decafThemeLight,O as useTableMaxHeight};
|
|
1
|
+
import{Global as e,css as t}from"@emotion/react";export{Global as GlobalStyle,css}from"@emotion/react";export{default as styled}from"@emotion/styled";import{LockFilled as n,RightOutlined as r,DownOutlined as o,QuestionCircleOutlined as l,EllipsisOutlined as a,MenuOutlined as i,UpOutlined as c,CameraOutlined as u,BulbFilled as d,BulbOutlined as s,UserOutlined as m,LogoutOutlined as p,InfoCircleOutlined as f,CaretUpOutlined as g,MessageOutlined as h,HomeOutlined as b}from"@ant-design/icons";import{Result as E,Typography as v,Button as y,theme as w,ConfigProvider as k,Grid as x,Dropdown as C,Menu as B,Drawer as S,Avatar as z,Layout as I,Row as A,Col as L,Card as N,Statistic as T}from"antd";import P,{useState as D,useLayoutEffect as W,useEffect as j}from"react";import{Link as F,useMatches as V,useLocation as R,NavLink as H,useNavigate as O,useNavigation as q,Outlet as M,createBrowserRouter as _,RouterProvider as Y}from"react-router-dom";import{useDecaf as G,DecafApp as K,DecafWebappController as U}from"@decafhub/decaf-react";import"antd/dist/reset.css";import{useNProgress as X}from"@tanem/react-nprogress";import Z from"decimal.js";import J from"js-cookie";import Q from"md5";import $ from"html2canvas";function ee(e){return P.createElement(P.Fragment,null,P.createElement(v,null,e.message),P.createElement(F,{to:"/"},P.createElement(y,{style:{marginTop:20}},"Home Page")))}function te(){return P.createElement(E,{icon:P.createElement(n,{style:{color:"#ff603b"}}),title:"Authentication Error",subTitle:P.createElement(ee,{message:"Your credentials are invalid. Please try to log in again."})})}function ne(){return P.createElement(E,{status:"403",title:"Access Denied",subTitle:P.createElement(ee,{message:"You are not authorized to access this content."})})}function re(){return P.createElement(E,{status:"404",title:"Page Not Found",subTitle:P.createElement(ee,{message:"Sorry, the page you visited does not exist."})})}function oe(){return P.createElement(E,{status:"500",title:"Error",subTitle:P.createElement(ee,{message:"Something went wrong. Please try again later. If the problem persists, please contact the administrator."})})}function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(this,arguments)}var ae,ie=32,ce=16;function ue(e){var t=D(0),n=t[0],r=t[1];return W(function(){var t=document.getElementById(e),n=function(){if(t){var e=t.getBoundingClientRect().top,n=window.innerHeight-e-ie-ce;r(n)}};return n(),null==t||t.addEventListener("resize",n),window.addEventListener("resize",n),function(){window.removeEventListener("resize",n),null==t||t.removeEventListener("resize",n)}},[e]),n}function de(e,t){var n=D(400),r=n[0],o=n[1],l=ue(e),a=document.getElementById(e);return W(function(){if(a){var e=null==a?void 0:a.closest(".ant-table-wrapper"),n=new ResizeObserver(function(){var n,r,a,i,c,u=null!=(n=null==e||null==(r=e.querySelector(".ant-table-header"))?void 0:r.getBoundingClientRect().height)?n:0,d=null!=(a=null==e||null==(i=e.querySelector(".ant-table-footer"))?void 0:i.getBoundingClientRect().height)?a:0,s=null!=(c=null==e?void 0:e.querySelectorAll(".ant-pagination"))?c:[],m=32*s.length,p=Array.from(s).reduce(function(e,t){return e+t.getBoundingClientRect().height},0);o(l>350?l-u-d-p-m-(t||0):"100%")});return n.observe(e,{box:"content-box"}),function(){n.disconnect()}}},[t,l,a]),r}function se(e,t){var n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);var r=parseInt(e,16),o=(r>>16)+t;o>255?o=255:o<0&&(o=0);var l=(r>>8&255)+t;l>255?l=255:l<0&&(l=0);var a=(255&r)+t;return a>255?a=255:a<0&&(a=0),(n?"#":"")+String("000000"+(a|l<<8|o<<16).toString(16)).slice(-6)}function me(e,t){e.barista.get("/auth/"+(t?"logoutall":"logout"),{timeout:3e3}).catch(function(e){t&&(console.error(e),alert("Failed to logout from all devices. Please try to logout from each device individually."))}).finally(function(){J.remove("ember_simple_auth-session"),window.location.reload()})}function pe(e){return function(t){return t?e.True:e.False}}function fe(e){return function(t){return null==t?e.Null:pe(e)(t)}}function ge(e){switch(new Z(0).comparedTo(e)){case 1:return ae.Short;case 0:return ae.Square;case-1:return ae.Long}return ae.Square}function he(e){return function(t){switch(ge(t)){case ae.Short:return e.Short;case ae.Square:return e.Square;case ae.Long:return e.Long}}}function be(e,t,n){var r=[].concat(e);return t.forEach(function(e){var t=r.findIndex(function(t){return t[n]===e[n]});t>=0?r[t]=e:r.push(e)}),r}!function(e){e[e.Short=-1]="Short",e[e.Square=0]="Square",e[e.Long=1]="Long"}(ae||(ae={}));var Ee="#10161d",ve="rgb(31, 41, 55)",ye="#f3f4f6",we="#2c3d50",ke={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},xe={hashed:!0,algorithm:[w.defaultAlgorithm],components:{Layout:{colorBgHeader:"#ededed"}},token:{borderRadius:0,colorBgContainer:"white",colorBgBase:ye,colorBgLayout:ye,colorBgElevated:"#fafbfc"}},Ce={hashed:!0,components:{Layout:{colorBgHeader:Ee},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:we},Input:le({},ke,{colorBgContainer:we}),Select:le({},ke,{colorBgContainer:we}),Checkbox:le({},ke,{colorBgContainer:we}),Dropdown:le({},ke),DatePicker:le({},ke,{colorBgContainer:we,colorBgElevated:we}),InputNumber:le({},ke,{colorBgContainer:we}),Menu:{colorItemText:"rgba(255, 255, 255, 0.5)"}},token:{fontFamily:"Inter, sans-serif",colorPrimary:"#344961",colorBgBase:ve,colorBgContainer:Ee,colorBgElevated:"rgb(20, 29, 41)",colorBorderSecondary:ve,colorBorder:ve,colorBgLayout:ve,borderRadius:0,green:"#48734d",red:"#b03a38",blue:"#0d6efd",yellow:"#ffc107",orange:"#fd7e14",colorWhite:"#fff",colorLink:"#a4bfff",colorLinkHover:"#7199fb",colorLinkActive:"#7199fb"},algorithm:[w.darkAlgorithm]};function Be(e){var t,n,r,o,l,a,i,c={color:"white !important",":after":{borderBottomColor:"white"}};return{body:{background:null==(t=e.token)?void 0:t.colorBgBase,fontFamily:"Inter, sans-serif",margin:0},"#root":{minHeight:"100%"},button:{boxShadow:"none !important"},".ant-table-body":{overflow:"auto !important"},"#decaf-header":{position:"fixed",zIndex:999,right:0,left:0,paddingInline:16,display:"flex",alignItems:"center"},"#decaf-content":{paddingTop:64,paddingBottom:32,"#decaf-layout-breadcrumb":le({backgroundColor:null==(n=e.token)?void 0:n.colorBgElevated,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",height:50,paddingInline:16,boxShadow:"0px 1px 2px rgba(0, 0, 0, 0.10)"},(l=function(e){var t="dark"===e?"255, 255, 255":"0, 0, 0";return{color:"rgba("+t+", 0.5) !important","&:hover":{color:"rgba("+t+", 0.75) !important"}}},a=le({},l("dark"),{"&:last-child":{color:"rgba(255, 255, 255, 0.85) !important"}}),i=le({},l("light"),{"&:last-child":{color:"rgba(0, 0, 0, 0.85) !important"}}),{".decaf-breadcrumb":{display:"flex",alignItems:"center",listStyle:"none",margin:0,padding:0,">li":le({"&.separator":{paddingInline:3,marginInline:3},"a, span":le({},l("light")),display:"flex",alignItems:"center",transition:"color 0.2s"},i),"&.dark":{">li":le({"a, span":le({},l("dark"))},a)}}})),"#decaf-layout-content-outlet":{minHeight:"100%",padding:16,"&.full-screen":{padding:"0 !important"}}},"#decaf-footer":{position:"fixed",bottom:0,right:0,left:0,paddingBlock:0,paddingInline:0,zIndex:999,boxShadow:"0px -2px 4px rgba(0, 0, 0, 0.15)",backgroundColor:null==(r=Ce.components)||null==(o=r.Layout)?void 0:o.colorBgHeader},".dot":{borderRadius:"50%",width:10,height:10,display:"inline-block",backgroundColor:"rgba(255,255,255,.25)","&.green":{backgroundColor:"#80ff00 !important"},"&.yellow":{backgroundColor:"#ff0 !important"},"&.orange":{backgroundColor:"#ff7000 !important"},"&.red":{backgroundColor:"#ff0000 !important"}},".ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected":c,".ant-menu-light.ant-menu-horizontal >.ant-menu-submenu-selected, .ant-menu-light .ant-menu-submenu-selected >.ant-menu-submenu-title":c}}var Se,ze=P.createContext({theme:"dark",toggleTheme:function(){}}),Ie=function(){return P.useContext(ze)};function Ae(n){var r=P.useState(function(){var e=n.theme||localStorage.getItem("decafAppTheme");return"dark"===e||"light"===e?e:"dark"}),o=r[0],l=r[1],a="light"===o?xe:Ce;a=le({},a,n.themeConfig||{}),a=le({},a,{token:le({},a.token,{fontFamily:"Inter, sans-serif"})});var i,c,u="light"===o?function(e){return le({},Be(e))}(a):function(e){var t,n,r,o,l,a,i,c,u,d,s,m,p,f,g;return le({},Be(e),{"*":{"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:null==(t=e.token)?void 0:t.colorBgContainer},"&::-webkit-scrollbar-thumb":{background:null==(n=e.token)?void 0:n.colorPrimary}},".ant-page-header-back-button, .ant-page-header-heading-title":{color:(null==(r=e.token)?void 0:r.colorWhite)+" !important"},".ant-badge-count":{color:(null==(o=e.token)?void 0:o.colorWhite)+" !important"},".ant-table-thead > tr > th":{background:se((null==(l=e.token)?void 0:l.colorBgContainer)||"",-5)+" !important","&:hover":{background:(null==(a=e.token)?void 0:a.colorBgContainer)+" !important"}},".ant-table-filter-dropdown":{"input, .ant-table-filter-dropdown-search-input":{background:(null==(i=e.token)?void 0:i.colorBgBase)+" !important"},".ant-dropdown-menu-item, .ant-dropdown-menu":{background:(null==(c=e.token)?void 0:c.colorBgContainer)+" !important"}},".ant-tabs-tab-active":{".ant-tabs-tab-btn":{color:(null==(u=e.token)?void 0:u.colorWhite)+" !important"}},".ant-radio-button-wrapper-checked":{backgroundColor:(null==(d=e.components)||null==(s=d.Button)?void 0:s.colorBgContainer)+" !important",color:(null==(m=e.token)?void 0:m.colorWhite)+" !important"},".ant-picker-date-panel":{".ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end":{"&::before":{background:(null==(p=e.token)?void 0:p.colorBgBase)+" !important"},".ant-picker-cell-inner":{background:(null==(f=e.token)?void 0:f.colorBgBase)+" !important"}},".ant-picker-cell-range-start, .ant-picker-cell-range-end":{".ant-picker-cell-inner":{background:(null==(g=e.token)?void 0:g.colorPrimary)+" !important"}}}})}(a);return P.createElement(ze.Provider,{value:{theme:o,toggleTheme:function(){var e="dark"===o?"light":"dark";l(e),localStorage.setItem("decafAppTheme",e)}}},P.createElement(k,{theme:a},P.createElement(e,{styles:t(Se||(i=["\n @import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap);\n "],c||(c=i.slice(0)),i.raw=c,Se=i))}),P.createElement(e,{styles:u}),n.children))}function Le(e){var t=e.items,n=e.itemRender,l=e.separator,a=Ie().theme,i=x.useBreakpoint(),c=t.slice(0,1).concat(t.slice(-1));return P.createElement("ul",{className:"decaf-breadcrumb "+a},function(e,t,n){var r=[];return e.forEach(function(l,a){if(l.href&&a!==e.length-1)r.push(P.createElement("li",{key:a},n?n(l):P.createElement(F,{className:"decaf-breadcrumb-link",to:l.href},l.title)));else if(l.children){var i=l.children.map(function(e,t){return{key:t,label:P.createElement(F,{className:"decaf-breadcrumb-link",to:e.href},e.title)}});r.push(P.createElement("li",{key:a},P.createElement(C,{menu:{items:i}},P.createElement("div",{style:{display:"flex",cursor:"pointer",gap:3}},P.createElement("span",null,l.title),P.createElement(o,{style:{fontSize:12}})))))}else r.push(P.createElement("li",{key:a},l.title));a<e.length-1&&r.push(P.createElement("li",{key:"sep-"+a,className:"separator"},t))}),r}(i.lg?t:c,l||P.createElement(r,null),n))}function Ne(){var e=w.useToken().token,t=x.useBreakpoint();return P.createElement(y,{type:"link",href:"https://docs.decafhub.com",target:"_blank",rel:"noreferrer",icon:P.createElement(l,null),style:{backgroundColor:e.colorBgElevated}},!t.xs&&"Documentation")}function Te(){return P.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 649.6 767.9",enableBackground:"new 0 0 649.6 767.9",xmlSpace:"preserve",width:32,height:32},P.createElement("g",null,P.createElement("path",{fill:"#52CEF4",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"}),P.createElement("path",{fill:"#227EC3",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"}),P.createElement("path",{fill:"#409DD5",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"}),P.createElement("path",{fill:"#227EC3",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"}),P.createElement("path",{fill:"#227EC3",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"}),P.createElement("path",{fill:"#52CEF4",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"}),P.createElement("path",{fill:"#409DD5",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"})))}function Pe(e){var t=[];return e.forEach(function(e){var n={key:"to"in e?e.to:e.label,label:e.label,icon:e.icon};"to"in e&&e.to?n.label=P.createElement(H,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=P.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=Pe(e.children||[])),t.push(n)}),t}function De(){return P.createElement(v.Text,{type:"secondary"},"Powered by"," ",P.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube"))}function We(e){var t=P.useState(!1),n=t[0],r=t[1],o=V(),l=R(),c=x.useBreakpoint().md,u=Pe(e.menu),d=o.map(function(e){return e.pathname}).filter(function(e){return"/"===l.pathname||"/"!==e});j(function(){c||r(!1)},[l.pathname,c]);var s=P.createElement(B,{items:[].concat(u),selectedKeys:d,mode:c?"horizontal":"inline",overflowedIndicator:P.createElement(a,{style:{fontSize:20,color:"white"}}),style:{flex:"auto",justifyContent:"flex-end",backgroundColor:"transparent",border:"none",minWidth:0}});return c?s:P.createElement("div",{style:{display:"flex",flex:"auto",justifyContent:"flex-end"}},P.createElement(i,{style:{fontSize:20,marginRight:20},onClick:function(){return r(!n)}}),P.createElement(S,{open:n,footer:P.createElement(De,null),onClose:function(){return r(!1)},bodyStyle:{padding:10},width:document.body.clientWidth-50>350?350:.85*document.body.clientWidth},s))}function je(){return P.createElement("div",{style:{display:"flex"}},P.createElement(y,{type:"text",icon:P.createElement(c,null),title:"Scroll to top",onClick:function(){return window.scrollTo({top:0,behavior:"smooth"})}}),P.createElement(y,{type:"text",icon:P.createElement(o,null),title:"Scroll to bottom",onClick:function(){return window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})}}))}function Fe(e){var t=function(){try{var e=document.getElementById("decaf-footer");return null==e||e.style.setProperty("display","none"),Promise.resolve($(document.body)).then(function(t){var n=t.toDataURL("image/png");null==e||e.style.setProperty("display","block");var r=document.createElement("a");r.download="screenshot.png",r.href=n,r.click(),r.remove()})}catch(e){return Promise.reject(e)}};return e.triggerNode?P.cloneElement(e.triggerNode,{onClick:t}):P.createElement(y,{type:"text",icon:P.createElement(u,null),title:"Take a screenshot of the current page",onClick:t})}function Ve(e){return P.createElement(y,{type:"text",icon:P.createElement("dark"===e.theme?d:s,null),title:"dark"===e.theme?"Switch to light theme":"Switch to dark theme",onClick:function(){return e.onChange()}})}function Re(){var e=D(void 0),t=e[0],n=e[1],r=G(),o=O();j(function(){var e,t;r.me.email&&(e=r.me.email,t="https://www.gravatar.com/avatar/"+Q(e),fetch(t+"?d=404",{method:"HEAD"}).then(function(e){return 200!==e.status?void 0:t}).catch(function(){})).then(n)},[r.me.email]);var l=[{key:"me",label:r.me.fullname||r.me.username,title:r.me.email,disabled:!0,icon:P.createElement(m,null),style:{cursor:"default"}},{key:"divider-1",dashed:!0,type:"divider"},{key:"logout",label:"Logout",icon:P.createElement(p,null),onClick:function(){return me(r.client,!1)}},{key:"logout-all",label:"Logout All Sessions",icon:P.createElement(p,null),onClick:function(){return window.confirm("Logout from all sessions?")&&me(r.client,!0)}},{key:"divider-2",dashed:!0,type:"divider"},{key:"about",label:"About",icon:P.createElement(f,null),onClick:function(){return o("/about")}}],a=t?{src:t}:{icon:P.createElement(m,{style:{color:"rgba(255,255,255, 0.5)"}}),style:{backgroundColor:"transparent",border:"1px solid rgba(255,255,255, 0.5)"}};return P.createElement(C,{trigger:["click"],menu:{items:l}},P.createElement(z,le({},a,{style:le({},a.style,{cursor:"pointer"})})))}function He(e){var t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function Oe(){var e,t,n,r=-1===(t=(e=window.location.href.split("/")).indexOf("webapps"))?"":e[t+1],o=function(e){var t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+2]}(),l=function(e){return e.startsWith("preview-")&&e.length>8}(n=o)?"preview":function(e){return e.startsWith("v")&&e.length>1}(n)?"release":n,a=x.useBreakpoint().md,i=[{code:"development",name:"Development Version",color:"red",url:"/webapps/"+r+"/development/"+He(window.location.href),show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:"/webapps/"+r+"/testing/"+He(window.location.href),show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:"/webapps/"+r+"/staging/"+He(window.location.href),show:!0},{code:"production",name:"Production Version",color:"green",url:"/webapps/"+r+"/production/"+He(window.location.href),show:!0},{code:"preview",name:"Preview Version",color:"grey",url:"/",show:!1},{code:"release",name:"Release Version",color:"grey",url:"/",show:!1}],c=i.find(function(e){return e.code===l}),u="production"===(null==c?void 0:c.code);return c?P.createElement(C,{placement:"top",arrow:!0,menu:{items:i.filter(function(e){return e.show}).map(function(e){return{key:e.name,label:P.createElement("span",null,P.createElement("i",{className:"dot "+e.color})," ",e.name),onClick:function(){window.location.href=e.url}}})}},P.createElement(y,{type:"text",style:{width:u?32:"initial",padding:u?0:"revert",display:"flex",alignItems:"center"},icon:P.createElement("i",{className:"dot "+(null==c?void 0:c.color)})},P.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},!u&&a&&P.createElement(P.Fragment,null,P.createElement("span",{style:{marginInline:5}},"You are on ",P.createElement("b",null,c.name)),P.createElement(g,null))))):null}var qe="https://static.zdassets.com/ekr/snippet.js";function Me(){var e=G(),t=e.me,n=e.publicConfig,r=D(!1),o=r[0],l=r[1],a=w.useToken().token,i=x.useBreakpoint();return j(function(){if(n.zendesk&&"undefined"!=typeof document){var e=document.createElement("script");return e.src=qe+"?key="+n.zendesk,e.async=!0,e.id="ze-snippet",e.onload=function(){window.zE("webWidget","hide"),window.zE("webWidget:on","open",function(){window.zE("webWidget","show"),l(!0)}),window.zE("webWidget:on","close",function(){window.zE("webWidget","hide"),l(!1)})},document.body.appendChild(e),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":t.fullname}},{id:"email",prefill:{"*":t.email}}]}},function(){document.body.removeChild(e)}}},[n,t]),n.zendesk?P.createElement(y,{type:"link",icon:P.createElement(h,null),style:{backgroundColor:a.colorBgElevated},onClick:function(){o?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),l(!o)}},!i.xs&&"Support"):null}function _e(e){var t=R(),n=q(),r=V(),o=x.useBreakpoint(),l=Ie(),a=l.theme,i=l.toggleTheme,c=null==r?void 0:r[(null==r?void 0:r.length)-1],u=!(null==c||!c.handle.fullScreen),d=null==c?void 0:c.handle.extras;return P.createElement(I,{style:{height:"100%"}},P.createElement(Ge,{isAnimating:"loading"===n.state,key:t.key}),P.createElement(k,{theme:Ce},P.createElement(I.Header,{id:"decaf-header"},P.createElement(Ye,{title:e.appName}),P.createElement(We,{title:e.appName,menu:e.menu}),P.createElement(Re,null))),P.createElement(I.Content,{id:"decaf-content",style:{flex:1,minHeight:"100%"}},P.createElement(Ke,null,d),P.createElement("div",{id:"decaf-layout-content-outlet",className:u?"full-screen":""},P.createElement(M,null))),P.createElement(k,{theme:Ce},P.createElement(I.Footer,{id:"decaf-footer"},P.createElement(A,{justify:"space-between",align:"middle"},P.createElement(L,{span:o.lg?10:12},P.createElement(Me,null),P.createElement("span",{style:{display:"inline-block",width:1}}),P.createElement(Ne,null)),P.createElement(L,{span:o.lg?4:0,style:{textAlign:"center"}},P.createElement(De,null)),P.createElement(L,{span:o.lg?10:12,style:{justifyContent:"flex-end",display:"flex",gap:10}},P.createElement(Oe,null),P.createElement(Ve,{theme:a,onChange:i}),P.createElement(Fe,null),P.createElement(je,null))))))}function Ye(e){var t=e.title,n=x.useBreakpoint();return P.createElement(F,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},P.createElement(Te,null),n.lg&&P.createElement(v.Title,{level:1,style:{margin:0,fontWeight:"normal",fontSize:20,color:"rgba(255, 255, 255, 0.75)",whiteSpace:"nowrap"}},t))}function Ge(e){var t=X({isAnimating:e.isAnimating}),n=t.animationDuration;return P.createElement("div",{style:{opacity:t.isFinished?0:1,pointerEvents:"none",transition:"opacity "+n+"ms linear"}},P.createElement("div",{style:{background:"#29d",height:2,left:0,marginLeft:100*(-1+t.progress)+"%",position:"fixed",top:0,transition:"margin-left "+n+"ms linear",width:"100%",zIndex:1031}},P.createElement("div",{style:{boxShadow:"0 0 10px #29d, 0 0 5px #29d",display:"block",height:"100%",opacity:1,position:"absolute",right:0,transform:"rotate(3deg) translate(0px, -4px)",width:100}})))}function Ke(e){var t=V().filter(function(e){var t;return Boolean(null==(t=e.handle)?void 0:t.crumb)}).map(function(e){return e.handle.crumb(e.data)}),n=[{href:"/",title:P.createElement(b,null)}].concat(t).map(function(e,t){return le({},e,{_key:t})});return n.length<2?P.createElement(P.Fragment,null):P.createElement("div",{id:"decaf-layout-breadcrumb"},P.createElement(Le,{items:n}),P.createElement("div",null,e.children))}function Ue(e){var t=G().client,n=D(void 0),r=n[0],o=n[1],l=D(void 0),a=l[0],i=l[1],c=D(void 0),u=c[0],d=c[1];return j(function(){t.bare.get("/_cultproxy").then(function(e){return o(e.data.version)}),t.barista.get("/version/").then(function(e){return i(e.data.version)}),t.bare.get("/apis/estate/version").then(function(e){return d(e.data)})},[t]),P.createElement(A,{gutter:[16,16]},P.createElement(L,{xs:{span:24},sm:{span:24},md:{span:24},lg:{span:12},xl:{span:8},xxl:{span:6}},P.createElement(N,{bordered:!1},P.createElement(T,{title:"Application Name",value:e.appName}))),P.createElement(L,{xs:{span:24},lg:{span:12},xl:{span:16},xxl:{span:18}},P.createElement(N,{bordered:!1},P.createElement(T,{title:"Application Description",value:e.appDescription}))),P.createElement(L,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},P.createElement(N,{bordered:!1},P.createElement(T,{title:"Application Version",value:e.appVersion,prefix:"v"}))),P.createElement(L,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},P.createElement(N,{bordered:!1},P.createElement(T,{title:"DECAF Cultproxy Version",value:r,prefix:"v"}))),P.createElement(L,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},P.createElement(N,{bordered:!1},P.createElement(T,{title:"DECAF Barista Version",value:a,prefix:"v"}))),P.createElement(L,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},P.createElement(N,{bordered:!1},P.createElement(T,{title:"DECAF Estate Version",value:u,prefix:"v"}))),P.createElement(L,{span:24},e.content))}var Xe=["crumb","fullScreen","extras","children"];function Ze(e){j(function(){var e=function(){var e=document.createElement("script");return e.defer=!0,e.setAttribute("data-domain",location.hostname),e.src="https://webax.svc.sys.decafhub.com/js/plausible.js",e}();return document.body.appendChild(e),function(){document.body.removeChild(e)}},[]);var t=e.controller||U;return t.disableZendeskWidget=!0,P.createElement(Ae,{themeConfig:e.themeConfig,theme:e.theme},P.createElement(K,{config:e.config,controller:t},P.createElement(Je,le({},e))))}function Je(e){var t,n,r=G(),o=[{path:"/about",element:P.createElement(Ue,{appName:e.appName,appVersion:null==(t=e.config)?void 0:t.currentVersion,appDescription:e.appDescription,content:null==e.buildAboutPageContent?void 0:e.buildAboutPageContent(r)}),crumb:function(){return{title:"About"}}},{path:"*",element:P.createElement(re,null),crumb:function(){return{title:"Error: Page Not Found"}}}],l=be(e.buildRouteItems(r),o,"path"),a=_(function(e,t,n){return[{element:P.createElement(_e,{menu:e.buildMenuItems(t),appName:e.appName}),path:"/",children:n.map(Qe),errorElement:P.createElement(oe,null)}]}(e,r,l),{basename:null==(n=e.config)?void 0:n.basePath});return P.createElement(Y,{router:a})}function Qe(e){var t=e.crumb,n=e.fullScreen,r=e.extras,o=e.children;return le({},function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)t.indexOf(n=l[r])>=0||(o[n]=e[n]);return o}(e,Xe),o?{handle:{crumb:t,fullScreen:n,extras:r},children:o.map(Qe)}:{handle:{crumb:t,fullScreen:n,extras:r}})}export{Ze as DecafWebapp,ae as Direction,te as Page401,ne as Page403,re as Page404,oe as PageError,pe as booleanMap,Ce as decafThemeDark,xe as decafThemeLight,he as directionMap,fe as nullableBooleanMap,be as setAtKey,ge as toDirection,Ie as useDecafTheme,ue as useRemaningHeight,de as useTableMaxHeight};
|
|
2
2
|
//# sourceMappingURL=index.module.js.map
|