@decafhub/decaf-react-webapp 0.0.15 → 0.1.1

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/components/Breadcrumb.d.ts +16 -0
  3. package/dist/components/Breadcrumb.d.ts.map +1 -0
  4. package/dist/components/DocumentationButton.d.ts +3 -0
  5. package/dist/components/DocumentationButton.d.ts.map +1 -0
  6. package/dist/components/Error.d.ts +5 -5
  7. package/dist/components/Layout.d.ts +16 -17
  8. package/dist/components/Layout.d.ts.map +1 -1
  9. package/dist/components/Logo.d.ts +2 -2
  10. package/dist/components/Menu.d.ts +9 -0
  11. package/dist/components/Menu.d.ts.map +1 -0
  12. package/dist/components/PageAbout.d.ts +8 -8
  13. package/dist/components/PageAbout.d.ts.map +1 -1
  14. package/dist/components/PageLayout.d.ts +10 -0
  15. package/dist/components/PageLayout.d.ts.map +1 -0
  16. package/dist/components/PageScroller.d.ts +2 -2
  17. package/dist/components/PageScroller.d.ts.map +1 -1
  18. package/dist/components/Screenshotter.d.ts +5 -5
  19. package/dist/components/Screenshotter.d.ts.map +1 -1
  20. package/dist/components/ThemeSwitcher.d.ts +7 -7
  21. package/dist/components/ThemeSwitcher.d.ts.map +1 -1
  22. package/dist/components/UserProfileDropdown.d.ts +3 -0
  23. package/dist/components/UserProfileDropdown.d.ts.map +1 -0
  24. package/dist/components/VersionSelector.d.ts +11 -11
  25. package/dist/components/VersionSelector.d.ts.map +1 -1
  26. package/dist/components/ZendeskWidget.d.ts +8 -8
  27. package/dist/components/ZendeskWidget.d.ts.map +1 -1
  28. package/dist/index.d.ts +7 -51
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/index.modern.mjs +2 -2
  33. package/dist/index.modern.mjs.map +1 -1
  34. package/dist/index.module.js +1 -1
  35. package/dist/index.module.js.map +1 -1
  36. package/dist/index.umd.js +1 -1
  37. package/dist/index.umd.js.map +1 -1
  38. package/dist/machinery/-plausible.d.ts +2 -0
  39. package/dist/machinery/-plausible.d.ts.map +1 -0
  40. package/dist/machinery/index.d.ts +91 -0
  41. package/dist/machinery/index.d.ts.map +1 -0
  42. package/dist/style.d.ts +4 -4
  43. package/dist/style.d.ts.map +1 -1
  44. package/dist/theme/-styles.d.ts +7 -0
  45. package/dist/theme/-styles.d.ts.map +1 -0
  46. package/dist/theme/-theme-context.d.ts +7 -0
  47. package/dist/theme/-theme-context.d.ts.map +1 -0
  48. package/dist/theme/-theme-hooks.d.ts +2 -0
  49. package/dist/theme/-theme-hooks.d.ts.map +1 -0
  50. package/dist/theme/-theme-provider.d.ts +9 -0
  51. package/dist/theme/-theme-provider.d.ts.map +1 -0
  52. package/dist/theme/index.d.ts +6 -0
  53. package/dist/theme/index.d.ts.map +1 -0
  54. package/dist/theme.d.ts +17 -17
  55. package/dist/theme.d.ts.map +1 -1
  56. package/dist/types.d.ts +12 -0
  57. package/dist/types.d.ts.map +1 -0
  58. package/dist/utils.d.ts +58 -24
  59. package/dist/utils.d.ts.map +1 -1
  60. package/dist/utils.spec.d.ts +2 -0
  61. package/dist/utils.spec.d.ts.map +1 -0
  62. package/package.json +36 -31
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/theme.tsx","../src/components/Error.tsx","../src/utils.tsx","../src/style.ts","../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 { 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 components: {\n Layout: {\n colorBgHeader: '#ededed',\n },\n },\n token: {\n borderRadius: 0,\n colorBgContainer: '#f8f8f8',\n colorBgBase: '#f8f8f8',\n colorBgLayout: '#f8f8f8',\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: 'Inter, 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: '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\nexport const useDecafTheme = () => React.useContext(ThemeContext);\n","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 { 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: 'Inter, 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.components?.Layout?.colorBgHeader,\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 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, 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 { theme, toggleTheme: setTheme } = useDecafTheme();\n\n return (\n <Layout style={{ height: '100%' }}>\n <Layout.Header id=\"decaf-header\">\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 style={{ maxWidth: 700, width: '100%' }}>\n <Descriptions.Item label=\"Application Name\">{props.appName}</Descriptions.Item>\n <Descriptions.Item label=\"Application Description\">{props.appDescription}</Descriptions.Item>\n <Descriptions.Item label=\"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 { Page401, Page403, Page404, PageError } 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: <PageError />,\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}\n\nexport {\n DecafWebapp,\n Global as GlobalStyle,\n css,\n styled,\n decafThemeDark,\n decafThemeLight,\n useTableMaxHeight,\n Page401,\n Page403,\n Page404,\n PageError,\n};\n"],"names":["_templateObject","ErrorPageSubtitle","_ref","React","createElement","Fragment","Typography","message","Link","to","Button","style","marginTop","Page404","Result","status","title","subTitle","PageError","lightenDarkenColor","col","amt","usePound","slice","num","parseInt","r","b","g","String","toString","getBaseStyles","theme","_theme$token","_theme$components","_theme$components$Lay","body","background","token","colorBgBase","fontFamily","margin","button","boxShadow","overflow","position","zIndex","right","left","paddingInline","paddingTop","paddingBottom","bottom","components","Layout","colorBgHeader","paddingBlock","height","borderRadius","width","display","backgroundColor","MAIN_BLACK","INPUT_BG_COLOR","BORDER_COLORS_TRANSPARENT","colorBorder","colorBorderSecondary","colorBorderBg","decafThemeLight","hashed","algorithm","defaultAlgorithm","colorBgContainer","colorBgLayout","decafThemeDark","boxShadowSecondary","Input","Select","_extends","Checkbox","Dropdown","DatePicker","colorBgElevated","InputNumber","Menu","colorItemText","colorPrimary","green","red","blue","yellow","orange","colorWhite","colorLink","colorLinkHover","colorLinkActive","darkAlgorithm","ThemeContext","createContext","toggleTheme","ThemeProvider","props","_React$useState","useState","localStorage","getItem","value","setValue","themeConfig","globalStyles","getLightStyles","_theme$token2","_theme$token3","_theme$token4","_theme$token5","_theme$token6","_theme$token7","_theme$token8","_theme$token9","_theme$token10","_theme$token11","_theme$components2","_theme$components2$Bu","_theme$token12","_theme$token13","_theme$token14","_theme$token15","color","getDarkStyles","Provider","t","setItem","ConfigProvider","Global","styles","css","children","useDecafTheme","useContext","Logo","version","id","xmlns","xmlnsXlink","x","y","viewBox","enableBackground","xmlSpace","fill","d","PageScroller","type","size","onClick","window","scrollTo","top","behavior","icon","UpOutlined","document","scrollHeight","DownOutlined","ScreenShotter","handleScreenshot","getElementById","footer","setProperty","Promise","resolve","html2canvas","canvas","dataUrl","toDataURL","link","download","href","click","remove","e","reject","triggerNode","cloneElement","CameraOutlined","ThemeSwitcher","BulbFilled","onChange","url","parts","split","indexOfWebapps","indexOf","join","VersionSelector","appName","location","appVersion","getAppVersionFromUrl","startsWith","length","isPreviewVersion","isReleaseVersion","versions","code","name","getCurrentAppPath","show","process","env","NODE_ENV","currentVersion","find","v","appVersionCode","placement","arrow","menu","items","filter","map","key","label","className","alignItems","marginRight","CaretUpOutlined","ZENDESK_WIDGET_SCRIPT","ZendeskWidget","useDecaf","me","_useDecaf","publicConfig","open","_useState","setOpen","useEffect","zendesk","script","src","async","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","matches","useMatches","useLocation","matchedMenuItems","match","pathname","setTheme","Header","justifyContent","gap","Title","level","border","flex","mode","menuItems","selectedKeys","Content","Outlet","Footer","Row","justify","align","Col","span","textAlign","Text","target","rel","UserOutlined","username","PageAbout","client","undefined","versionBarista","setVersionBarista","barista","get","then","data","Space","direction","Descriptions","column","bordered","maxWidth","Item","appDescription","content","addTo","array","index","findIndex","defer","setAttribute","hostname","path","element","_props$config","config","aboutPageContent","menuWithAboutPage","InfoCircleOutlined","DecafLayout","errorElement","router","createBrowserRouter","basename","_props$config2","basePath","controller","DecafWebappController","disableZendeskWidget","DecafApp","RouterProvider","Page401","LockFilled","useTableMaxHeight","elementId","bottomSpace","maxHeight","setMaxHeight","w","useLayoutEffect","calculate","parentPaddingBottom","closestContainer","parentElement","parseFloat","getComputedStyle","isNaN","getBoundingClientRect","max","innerHeight","boundingRect","bottomMargin","addEventListener","removeEventListener"],"mappings":"0UAAAA,8DCKA,SAASC,EAAkDC,GACzD,OACEC,EAAA,QAAAC,cAAAD,EAAA,QAAAE,SAAA,KACEF,EAAC,QAAAC,cAAAE,aAAY,KAHiBJ,EAAPK,SAIvBJ,UAAAC,cAACI,EAAAA,KAAI,CAACC,GAAG,KACPN,EAAA,QAAAC,cAACM,EAAMA,OAAA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A5BAK,EAAAA,gBAAgB,WACd,IAAeC,EAAG,WAChB,GAAKF,EAAL,CAGA,IACIG,EAAsB,GACJC,EAAGJ,EAAEK,cACvBD,IACFD,EAAsBG,WAAWC,iBAAiBH,EAAkB,MAAM7S,eAC1E4S,EAAsBK,MAAML,IAAwBA,EAAsB,GAAK,GAAKA,GAEtF,MAAqBA,EAPA,IAOsCN,GAAe,KACrDG,EAAES,wBACjBC,EAAM3M,OAAO4M,YAAcC,EAAa3M,IAAM4M,EACpDd,EAAaW,EAAM,IAAMA,EAAM,OAX9B,CAYH,EAMA,OAJAR,UACAF,GAAAA,EAAGc,iBAAiB,SAAUZ,GAC9BnM,OAAO+M,iBAAiB,SAAUZ,GAE3B,WACLnM,OAAOgN,oBAAoB,SAAUb,GACpC,MAADF,GAAAA,EAAGe,oBAAoB,SAAUb,EACnC,CACF,EAAG,CAACN,EAAWI,EAAGH,IAGpBC,CAAA"}
1
+ {"version":3,"file":"index.js","sources":["../src/utils.tsx","../src/components/Error.tsx","../src/theme/-styles.tsx","../src/theme/-theme-context.tsx","../src/theme/-theme-provider.tsx","../src/theme/-theme-hooks.tsx","../src/components/Breadcrumb.tsx","../src/components/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 { 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 { 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 { 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 { css, Global } from '@emotion/react';\nimport { ConfigProvider } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React from 'react';\nimport { decafThemeDark, decafThemeLight, getDarkStyles, getLightStyles } from './-styles';\nimport { ThemeContext } from './-theme-context';\n\nexport interface ThemeProviderProps {\n children: React.ReactNode;\n themeConfig?: ThemeConfig;\n theme?: 'dark' | 'light';\n}\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n const [value, setValue] = React.useState<'dark' | 'light'>(() => {\n const theme = props.theme || localStorage.getItem('decafAppTheme');\n if (theme === 'dark' || theme === 'light') {\n return theme;\n }\n return 'dark';\n });\n\n function setTheme() {\n const t = value === 'dark' ? 'light' : 'dark';\n setValue(t);\n localStorage.setItem('decafAppTheme', t);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n let theme = value === 'light' ? decafThemeLight : decafThemeDark;\n theme = { ...theme, ...(props.themeConfig || {}) };\n theme = { ...theme, token: { ...theme.token, fontFamily: 'Inter, sans-serif' } };\n\n const globalStyles = value === 'light' ? getLightStyles(theme) : getDarkStyles(theme);\n\n return (\n <ThemeContext.Provider\n value={{\n theme: value,\n toggleTheme: setTheme,\n }}\n >\n <ConfigProvider theme={theme}>\n <Global\n styles={css`\n @import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap);\n `}\n />\n <Global styles={globalStyles} />\n\n {props.children}\n </ConfigProvider>\n </ThemeContext.Provider>\n );\n}\n","import React from 'react';\nimport { ThemeContext } from './-theme-context';\n\nexport const useDecafTheme = () => React.useContext(ThemeContext);\n","import { DownOutlined, RightOutlined } from '@ant-design/icons';\nimport { Dropdown, Grid } from 'antd';\nimport React, { ReactNode } from 'react';\nimport { Link } from 'react-router-dom';\nimport { useDecafTheme } from 'theme';\n\nexport interface BreadcrumbItem {\n title: ReactNode;\n href?: string;\n children?: { title: ReactNode; href?: string }[];\n}\n\nexport interface BreadcrumbProps {\n items: BreadcrumbItem[];\n itemRender?: (item: BreadcrumbItem) => ReactNode;\n separator?: ReactNode;\n}\n\nexport function Breadcrumb(props: BreadcrumbProps) {\n const { items, itemRender, separator } = props;\n const { theme } = useDecafTheme();\n const breakpoints = Grid.useBreakpoint();\n\n const firstAndLAst = items.slice(0, 1).concat(items.slice(-1));\n const _items = breakpoints.lg ? items : firstAndLAst;\n\n return (\n <ul className={`decaf-breadcrumb ${theme}`}>\n {renderBreadcrumbs(_items, separator || <RightOutlined />, itemRender)}\n </ul>\n );\n}\n\nfunction renderBreadcrumbs(\n items: BreadcrumbItem[],\n separator: ReactNode,\n itemRender?: (item: BreadcrumbItem) => ReactNode\n) {\n const result: ReactNode[] = [];\n\n items.forEach((item, i) => {\n const isLast = i === items.length - 1;\n\n if (item.href && !isLast) {\n result.push(\n <li key={i}>\n {itemRender ? (\n itemRender(item)\n ) : (\n <Link className=\"decaf-breadcrumb-link\" to={item.href}>\n {item.title}\n </Link>\n )}\n </li>\n );\n } else if (item.children) {\n const dmenu = item.children.map((child, j) => ({\n key: j,\n label: (\n <Link className=\"decaf-breadcrumb-link\" to={child.href!}>\n {child.title}\n </Link>\n ),\n }));\n\n result.push(\n <li key={i}>\n <Dropdown menu={{ items: dmenu }}>\n <div style={{ display: 'flex', cursor: 'pointer', gap: 3 }}>\n <span>{item.title}</span>\n <DownOutlined style={{ fontSize: 12 }} />\n </div>\n </Dropdown>\n </li>\n );\n } else {\n result.push(<li key={i}>{item.title}</li>);\n }\n if (i < items.length - 1) {\n result.push(\n <li key={`sep-${i}`} className=\"separator\">\n {separator}\n </li>\n );\n }\n });\n\n return result;\n}\n","import { 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 justifyContent: 'center',\n }}\n icon={<i className={`dot ${currentVersion?.color}`} />}\n >\n <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>\n {!isProd && md && (\n <>\n <span style={{ marginInline: 5 }}>\n You are on <b>{currentVersion.name}</b>\n </span>\n <CaretUpOutlined />\n </>\n )}\n </div>\n </Button>\n </Dropdown>\n );\n}\n","import { MessageOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button, Grid, theme } from 'antd';\nimport React, { useEffect, useState } from 'react';\n\nconst ZENDESK_WIDGET_SCRIPT = 'https://static.zdassets.com/ekr/snippet.js';\n\ndeclare global {\n // eslint-disable-next-line no-unused-vars\n interface Window {\n zE: any;\n zESettings: any;\n }\n}\n\nexport default function ZendeskWidget() {\n const { me, publicConfig } = useDecaf();\n const [open, setOpen] = useState(false);\n const { token } = theme.useToken();\n const breakpoints = Grid.useBreakpoint();\n\n useEffect(() => {\n if (!publicConfig.zendesk || typeof document === 'undefined') return;\n const script = document.createElement('script');\n script.src = ZENDESK_WIDGET_SCRIPT + '?key=' + publicConfig.zendesk;\n script.async = true;\n script.id = 'ze-snippet'; // do not change this. zendesk expects this to be ze-snippet\n script.onload = () => {\n window.zE('webWidget', 'hide');\n window.zE('webWidget:on', 'open', () => {\n window.zE('webWidget', 'show');\n setOpen(true);\n });\n window.zE('webWidget:on', 'close', () => {\n window.zE('webWidget', 'hide');\n setOpen(false);\n });\n };\n\n document.body.appendChild(script);\n window.zESettings = {\n webWidget: {\n offset: {\n horizontal: -7,\n vertical: 20,\n },\n },\n contactForm: {\n subject: true,\n fields: [\n {\n id: 'name',\n prefill: { '*': me.fullname },\n },\n {\n id: 'email',\n prefill: { '*': me.email },\n },\n ],\n },\n };\n\n return () => {\n document.body.removeChild(script);\n };\n }, [publicConfig, me]);\n\n function toggle() {\n if (open) {\n window.zE?.('webWidget', 'close');\n } else {\n window.zE?.('webWidget', 'open');\n }\n setOpen(!open);\n }\n\n if (!publicConfig.zendesk) return null;\n\n return (\n <Button type=\"link\" icon={<MessageOutlined />} style={{ backgroundColor: token.colorBgElevated }} onClick={toggle}>\n {!breakpoints.xs && 'Support'}\n </Button>\n );\n}\n","import { 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":["Direction","ErrorPageSubtitle","_ref","React","createElement","Fragment","Typography","message","Link","to","Button","style","marginTop","Page404","Result","status","title","subTitle","PageError","useRemaningHeight","elementId","_useState","useState","remainingHeight","setRemainingHeight","useLayoutEffect","e","document","getElementById","calculate","elementTop","getBoundingClientRect","top","elementHeight","window","innerHeight","addEventListener","removeEventListener","lightenDarkenColor","col","amt","usePound","slice","num","parseInt","r","b","g","String","toString","logout","client","fromAll","barista","get","timeout","console","error","alert","Cookies","remove","location","reload","booleanMap","map","x","True","False","toDirection","Decimal","comparedTo","Short","Square","Long","setAtKey","array","items","key","result","concat","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","getCrumbColor","darkColors","lightColors","menuOverride","color","borderBottomColor","body","background","margin","minHeight","button","overflow","position","zIndex","right","left","paddingInline","display","alignItems","paddingTop","paddingBottom","backgroundColor","flexDirection","justifyContent","width","height","colorBase","listStyle","padding","marginInline","transition","bottom","paddingBlock","_templateObject","ThemeContext","createContext","toggleTheme","useDecafTheme","useContext","ThemeProvider","props","_React$useState","localStorage","getItem","value","setValue","themeConfig","globalStyles","getLightStyles","_theme$token3","_theme$token4","_theme$token5","_theme$token6","_theme$token7","_theme$token8","_theme$token9","_theme$token10","_theme$token11","_theme$components","_theme$components$But","_theme$token12","_theme$token13","_theme$token14","_theme$token15","getDarkStyles","Provider","t","setItem","ConfigProvider","Global","styles","css","children","Breadcrumb","itemRender","separator","breakpoints","Grid","useBreakpoint","firstAndLAst","className","i","href","length","dmenu","child","j","label","menu","cursor","gap","DownOutlined","fontSize","renderBreadcrumbs","lg","RightOutlined","DocumentationButton","useToken","type","target","rel","icon","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","handleScreenshot","setProperty","Promise","resolve","html2canvas","then","canvas","dataUrl","toDataURL","link","download","click","reject","triggerNode","cloneElement","CameraOutlined","ThemeSwitcher","BulbFilled","BulbOutlined","onChange","UserProfileDropdown","undefined","gravatar","setGravatar","decaf","useDecaf","navigate","useNavigate","email","url","me","md5","fetch","method","response","fullname","username","disabled","UserOutlined","dashed","LogoutOutlined","confirm","InfoCircleOutlined","propsAvatar","src","trigger","Avatar","getCurrentAppPath","parts","split","indexOfWebapps","indexOf","join","VersionSelector","appName","appVersion","getAppVersionFromUrl","appVersionCode","startsWith","isPreviewVersion","isReleaseVersion","versions","code","name","show","process","env","NODE_ENV","currentVersion","find","v","isProd","placement","arrow","CaretUpOutlined","ZENDESK_WIDGET_SCRIPT","ZendeskWidget","_useDecaf","publicConfig","setOpen","zendesk","script","async","onload","zE","appendChild","zESettings","webWidget","offset","horizontal","vertical","contactForm","subject","fields","prefill","removeChild","MessageOutlined","DecafLayout","navigation","useNavigation","_useDecafTheme","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","_ref2","_useNProgress","useNProgress","animationDuration","opacity","isFinished","pointerEvents","marginLeft","progress","transform","crumbs","_match$handle","Boolean","crumb","data","breadcrumb","HomeOutlined","_key","PageAbout","versionCultproxy","setVersionCultproxy","_useState2","versionBarista","setVersionBarista","_useState3","versionEstate","setVersionEstate","bare","_ref3","gutter","sm","xl","xxl","Card","bordered","Statistic","appDescription","prefix","content","_excluded","DecafWebappInternal","_props$config","_props$config2","defaultRoutes","path","element","config","buildAboutPageContent","buildRouteItems","router","createBrowserRouter","context","buildMenuItems","decafRouteToReactRoute","errorElement","compileRoutes","basename","basePath","RouterProvider","rest","_objectWithoutPropertiesLoose","defer","setAttribute","hostname","getPlausibleScript","controller","DecafWebappController","disableZendeskWidget","DecafApp","LockFilled","Null","bottomSpace","maxHeight","setMaxHeight","remaining","w","tableWrapper","closest","observer","ResizeObserver","_tableWrapper$querySe","_tableWrapper$querySe2","_tableWrapper$querySe3","_tableWrapper$querySe4","_tableWrapper$querySe5","tableHeaderHeight","querySelector","tableFooterHeight","paginations","querySelectorAll","paginationPaddings","paginationHeights","Array","from","reduce","acc","cur","observe","box","disconnect"],"mappings":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,CAAgBE,EAAE,CAC1D,yHAvGgB,SAAkB7C,EAAmBsd,GACnD,IAAAlD,EAAkCla,EAAQA,SAAkB,KAArDqd,EAASnD,EAAEoD,GAAAA,EAAYpD,EAC9B,GAAMqD,EAAY1d,EAAkBC,GAE9B0d,EAAInd,SAASC,eAAeR,GAkClC,OAhCAK,EAAAA,gBAAgB,WACd,GAAIqd,EAAG,CACL,IAAMC,EAAgB,MAADD,OAAC,EAADA,EAAGE,QAAQ,sBAC1BC,EAAW,IAAIC,eAAe,WAAK,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EACjCC,SAAiBL,EAAeC,MAAZL,GAAgD,OAApCK,EAAZL,EAAcU,cAAc,2BAAhBL,EAAZA,EAAkDrd,wBAAwBkI,QAAMkV,EAAI,EACxGO,EAAoGL,OAAnFA,EAAe,MAAZN,GAAgD,OAApCO,EAAZP,EAAcU,cAAc,2BAAhB,EAAZH,EAAkDvd,wBAAwBkI,QAAMoV,EAAI,EACxGM,EAA+DJ,OAApDA,EAAe,MAAZR,OAAY,EAAZA,EAAca,iBAAiB,oBAAkBL,EAAI,GACnEM,EAzEa,GAyEQF,EAAYhS,OACjCmS,EAAoBC,MAAMC,KAAKL,GAAaM,OAChD,SAACC,EAAKC,GAAG,OAAKD,EAAMC,EAAIpe,wBAAwBkI,MAAM,EACtD,GAWF2U,EAAaC,EAAY,IAPvBA,EACAW,EACAE,EACAI,EACAD,GACCnB,GAAe,GAEmB,OACvC,GAIA,OAFAO,EAASmB,QAAQrB,EAAe,CAAEsB,IAAK,gBAE3B,WACVpB,EAASqB,YACX,CACD,CACH,EAAG,CAAC5B,EAAaG,EAAWC,IAErBH,CACT"}
@@ -1,4 +1,4 @@
1
- import{LockFilled as e,UpOutlined as t,DownOutlined as n,CameraOutlined as o,BulbFilled as r,CaretUpOutlined as l,QuestionCircleOutlined as a,UserOutlined as c,InfoCircleOutlined as i}from"@ant-design/icons";import{useDecaf as s,DecafApp as d,DecafWebappController as m}from"@decafhub/decaf-react";import{Global as u,css as p}from"@emotion/react";export{Global as GlobalStyle,css}from"@emotion/react";export{default as styled}from"@emotion/styled";import"antd/dist/reset.css";import g,{useState as f,useLayoutEffect as h,useEffect as b}from"react";import{Link as E,useMatches as w,useLocation as y,Outlet as k,NavLink as v,createBrowserRouter as C,RouterProvider as B}from"react-router-dom";import{Result as x,Typography as z,Button as I,theme as $,ConfigProvider as S,Dropdown as T,Layout as W,Menu as N,Row as P,Col as A,Space as D,Descriptions as L}from"antd";import j from"html2canvas";function V({message:e}){return g.createElement(g.Fragment,null,g.createElement(z,null,e),g.createElement(E,{to:"/"},g.createElement(I,{style:{marginTop:20}},"Home Page")))}function F(){return g.createElement(x,{icon:g.createElement(e,{style:{color:"#ff603b"}}),title:"Authentication Error",subTitle:g.createElement(V,{message:"Your credentials are invalid. Please try to log in again."})})}function H(){return g.createElement(x,{status:"403",title:"Access Denied",subTitle:g.createElement(V,{message:"You are not authorized to access this content."})})}function M(){return g.createElement(x,{status:"404",title:"Page Not Found",subTitle:g.createElement(V,{message:"Sorry, the page you visited does not exist."})})}function O(){return g.createElement(x,{status:"500",title:"Error",subTitle:g.createElement(V,{message:"Something went wrong. Please try again later. If the problem persists, please contact the administrator."})})}function R(){return R=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},R.apply(this,arguments)}function Y(e,t){const[n,o]=f(400),r=document.getElementById(e);return h(()=>{const e=()=>{if(!r)return;let e=80;const n=r.parentElement;n&&(e=parseFloat(getComputedStyle(n,null).paddingBottom),e=isNaN(e)||e<10?80:e);const l=e+50+(t||0),a=r.getBoundingClientRect(),c=window.innerHeight-a.top-l;o(c>350?c:"100%")};return e(),null==r||r.addEventListener("resize",e),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),null==r||r.removeEventListener("resize",e)}},[e,r,t]),n}function _(e,t){let n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);const o=parseInt(e,16);let r=(o>>16)+t;r>255?r=255:r<0&&(r=0);let l=(o>>8&255)+t;l>255?l=255:l<0&&(l=0);let 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 G(e){var t,n,o;return{body:{background:null==(t=e.token)?void 0:t.colorBgBase,fontFamily:"Inter, 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.components)||null==(o=n.Layout)?void 0:o.colorBgHeader,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"}}}}let K,U=e=>e;const X="#10161d",Z="#2c3d50",q={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},J={hashed:!0,algorithm:[$.defaultAlgorithm],components:{Layout:{colorBgHeader:"#ededed"}},token:{borderRadius:0,colorBgContainer:"#f8f8f8",colorBgBase:"#f8f8f8",colorBgLayout:"#f8f8f8"}},Q={hashed:!0,components:{Layout:{colorBgHeader:X},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:Z},Input:R({},q,{colorBgContainer:Z}),Select:R({},q,{colorBgContainer:Z}),Checkbox:R({},q,{colorBgContainer:Z}),Dropdown:R({},q),DatePicker:R({},q,{colorBgContainer:Z,colorBgElevated:Z}),InputNumber:R({},q,{colorBgContainer:Z}),Menu:{colorItemText:"rgba(255, 255, 255, 0.5)"}},token:{fontFamily:"Inter, sans-serif",colorPrimary:"#344961",colorBgBase:"#1a242f",colorBgContainer:X,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:[$.darkAlgorithm]},ee=g.createContext({theme:"dark",toggleTheme:()=>{}});function te(e){const[t,n]=g.useState(()=>{const t=e.theme||localStorage.getItem("decafAppTheme");return"dark"===t||"light"===t?t:"dark"});let o="light"===t?J:Q;o=R({},o,e.themeConfig||{}),o=R({},o,{token:R({},o.token,{fontFamily:"Inter, sans-serif"})});const r="light"===t?function(e){return R({},G(e))}(o):function(e){var t,n,o,r,l,a,c,i,s,d,m,u,p,g,f,h;return R({},G(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:`${_((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==(s=e.token)?void 0:s.colorWhite} !important`},".ant-tabs-tab-active":{".ant-tabs-tab-btn":{color:`${null==(d=e.token)?void 0:d.colorWhite} !important`}},".ant-radio-button-wrapper-checked":{backgroundColor:`${null==(m=e.components)||null==(u=m.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==(g=e.token)?void 0:g.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==(h=e.token)?void 0:h.colorPrimary} !important`}}}})}(o);return g.createElement(ee.Provider,{value:{theme:t,toggleTheme:function(){const e="dark"===t?"light":"dark";n(e),localStorage.setItem("decafAppTheme",e)}}},g.createElement(S,{theme:o},g.createElement(u,{styles:p(K||(K=U`
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 o,DownOutlined as r,QuestionCircleOutlined as l,EllipsisOutlined as a,MenuOutlined as c,UpOutlined as i,CameraOutlined as s,BulbFilled as d,BulbOutlined as m,UserOutlined as u,LogoutOutlined as p,InfoCircleOutlined as g,CaretUpOutlined as f,MessageOutlined as h,HomeOutlined as b}from"@ant-design/icons";import{Result as E,Typography as y,Button as w,theme as k,ConfigProvider as v,Grid as x,Dropdown as C,Menu as B,Drawer as S,Avatar as z,Layout as I,Row as $,Col as A,Card as L,Statistic as N}from"antd";import T,{useState as D,useLayoutEffect as P,useEffect as W}from"react";import{Link as j,useMatches as F,useLocation as V,NavLink as R,useNavigate as H,useNavigation as O,Outlet as q,createBrowserRouter as M,RouterProvider as _}from"react-router-dom";import{useDecaf as Y,DecafApp as G,DecafWebappController as K}from"@decafhub/decaf-react";import"antd/dist/reset.css";import{useNProgress as U}from"@tanem/react-nprogress";import X from"decimal.js";import Z from"js-cookie";import J from"md5";import Q from"html2canvas";function ee({message:e}){return T.createElement(T.Fragment,null,T.createElement(y,null,e),T.createElement(j,{to:"/"},T.createElement(w,{style:{marginTop:20}},"Home Page")))}function te(){return T.createElement(E,{icon:T.createElement(n,{style:{color:"#ff603b"}}),title:"Authentication Error",subTitle:T.createElement(ee,{message:"Your credentials are invalid. Please try to log in again."})})}function ne(){return T.createElement(E,{status:"403",title:"Access Denied",subTitle:T.createElement(ee,{message:"You are not authorized to access this content."})})}function oe(){return T.createElement(E,{status:"404",title:"Page Not Found",subTitle:T.createElement(ee,{message:"Sorry, the page you visited does not exist."})})}function re(){return T.createElement(E,{status:"500",title:"Error",subTitle:T.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 o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},le.apply(this,arguments)}const ae=32,ce=16;function ie(e){const[t,n]=D(0);return P(()=>{const t=document.getElementById(e),o=()=>{if(!t)return;const e=t.getBoundingClientRect().top,o=window.innerHeight-e-ae-ce;n(o)};return o(),null==t||t.addEventListener("resize",o),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),null==t||t.removeEventListener("resize",o)}},[e]),t}function se(e,t){const[n,o]=D(400),r=ie(e),l=document.getElementById(e);return P(()=>{if(l){const e=null==l?void 0:l.closest(".ant-table-wrapper"),n=new ResizeObserver(()=>{var n,l,a,c,i;const s=null!=(n=null==e||null==(l=e.querySelector(".ant-table-header"))?void 0:l.getBoundingClientRect().height)?n:0,d=null!=(a=null==e||null==(c=e.querySelector(".ant-table-footer"))?void 0:c.getBoundingClientRect().height)?a:0,m=null!=(i=null==e?void 0:e.querySelectorAll(".ant-pagination"))?i:[],u=32*m.length,p=Array.from(m).reduce((e,t)=>e+t.getBoundingClientRect().height,0);o(r>350?r-s-d-p-u-(t||0):"100%")});return n.observe(e,{box:"content-box"}),()=>{n.disconnect()}}},[t,r,l]),n}function de(e,t){let n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);const o=parseInt(e,16);let r=(o>>16)+t;r>255?r=255:r<0&&(r=0);let l=(o>>8&255)+t;l>255?l=255:l<0&&(l=0);let 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 me(e,t){e.barista.get("/auth/"+(t?"logoutall":"logout"),{timeout:3e3}).catch(e=>{t&&(console.error(e),alert("Failed to logout from all devices. Please try to logout from each device individually."))}).finally(()=>{Z.remove("ember_simple_auth-session"),window.location.reload()})}function ue(e){return t=>t?e.True:e.False}function pe(e){return t=>null==t?e.Null:ue(e)(t)}var ge;function fe(e){switch(new X(0).comparedTo(e)){case 1:return ge.Short;case 0:return ge.Square;case-1:return ge.Long}return ge.Square}function he(e){return t=>{switch(fe(t)){case ge.Short:return e.Short;case ge.Square:return e.Square;case ge.Long:return e.Long}}}function be(e,t,n){const o=[...e];return t.forEach(e=>{const t=o.findIndex(t=>t[n]===e[n]);t>=0?o[t]=e:o.push(e)}),o}!function(e){e[e.Short=-1]="Short",e[e.Square=0]="Square",e[e.Long=1]="Long"}(ge||(ge={}));const Ee="#10161d",ye="rgb(31, 41, 55)",we="#f3f4f6",ke="#2c3d50",ve={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},xe={hashed:!0,algorithm:[k.defaultAlgorithm],components:{Layout:{colorBgHeader:"#ededed"}},token:{borderRadius:0,colorBgContainer:"white",colorBgBase:we,colorBgLayout:we,colorBgElevated:"#fafbfc"}},Ce={hashed:!0,components:{Layout:{colorBgHeader:Ee},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:ke},Input:le({},ve,{colorBgContainer:ke}),Select:le({},ve,{colorBgContainer:ke}),Checkbox:le({},ve,{colorBgContainer:ke}),Dropdown:le({},ve),DatePicker:le({},ve,{colorBgContainer:ke,colorBgElevated:ke}),InputNumber:le({},ve,{colorBgContainer:ke}),Menu:{colorItemText:"rgba(255, 255, 255, 0.5)"}},token:{fontFamily:"Inter, sans-serif",colorPrimary:"#344961",colorBgBase:ye,colorBgContainer:Ee,colorBgElevated:"rgb(20, 29, 41)",colorBorderSecondary:ye,colorBorder:ye,colorBgLayout:ye,borderRadius:0,green:"#48734d",red:"#b03a38",blue:"#0d6efd",yellow:"#ffc107",orange:"#fd7e14",colorWhite:"#fff",colorLink:"#a4bfff",colorLinkHover:"#7199fb",colorLinkActive:"#7199fb"},algorithm:[k.darkAlgorithm]};function Be(e){var t,n,o,r;const l={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)"},Se()),"#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==(o=Ce.components)||null==(r=o.Layout)?void 0:r.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":l,".ant-menu-light.ant-menu-horizontal >.ant-menu-submenu-selected, .ant-menu-light .ant-menu-submenu-selected >.ant-menu-submenu-title":l}}function Se(){const e=e=>{const t="dark"===e?"255, 255, 255":"0, 0, 0";return{color:`rgba(${t}, 0.5) !important`,"&:hover":{color:`rgba(${t}, 0.75) !important`}}},t=le({},e("dark"),{"&:last-child":{color:"rgba(255, 255, 255, 0.85) !important"}}),n=le({},e("light"),{"&:last-child":{color:"rgba(0, 0, 0, 0.85) !important"}});return{".decaf-breadcrumb":{display:"flex",alignItems:"center",listStyle:"none",margin:0,padding:0,">li":le({"&.separator":{paddingInline:3,marginInline:3},"a, span":le({},e("light")),display:"flex",alignItems:"center",transition:"color 0.2s"},n),"&.dark":{">li":le({"a, span":le({},e("dark"))},t)}}}}const ze=T.createContext({theme:"dark",toggleTheme:()=>{}}),Ie=()=>T.useContext(ze);let $e,Ae=e=>e;function Le(n){const[o,r]=T.useState(()=>{const e=n.theme||localStorage.getItem("decafAppTheme");return"dark"===e||"light"===e?e:"dark"});let l="light"===o?xe:Ce;l=le({},l,n.themeConfig||{}),l=le({},l,{token:le({},l.token,{fontFamily:"Inter, sans-serif"})});const a="light"===o?function(e){return le({},Be(e))}(l):function(e){var t,n,o,r,l,a,c,i,s,d,m,u,p,g,f;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==(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:`${de((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-tabs-tab-active":{".ant-tabs-tab-btn":{color:`${null==(s=e.token)?void 0:s.colorWhite} !important`}},".ant-radio-button-wrapper-checked":{backgroundColor:`${null==(d=e.components)||null==(m=d.Button)?void 0:m.colorBgContainer} !important`,color:`${null==(u=e.token)?void 0:u.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==(g=e.token)?void 0:g.colorBgBase} !important`}},".ant-picker-cell-range-start, .ant-picker-cell-range-end":{".ant-picker-cell-inner":{background:`${null==(f=e.token)?void 0:f.colorPrimary} !important`}}}})}(l);return T.createElement(ze.Provider,{value:{theme:o,toggleTheme:function(){const e="dark"===o?"light":"dark";r(e),localStorage.setItem("decafAppTheme",e)}}},T.createElement(v,{theme:l},T.createElement(e,{styles:t($e||($e=Ae`
2
2
  @import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap);
3
- `))}),g.createElement(u,{styles:r}),e.children))}const ne=()=>g.useContext(ee);function oe(){return g.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},g.createElement("g",null,g.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"}),g.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"}),g.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"}),g.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"}),g.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"}),g.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"}),g.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 re(){return g.createElement("div",null,g.createElement(I,{title:"Scroll to top",type:"text",size:"small",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),icon:g.createElement(t,null)}),g.createElement(I,{title:"Scroll to bottom",type:"text",size:"small",onClick:()=>window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"}),icon:g.createElement(n,null)}))}function le(e){async function t(){const e=document.getElementById("decaf-footer");null==e||e.style.setProperty("display","none");const t=(await j(document.body)).toDataURL("image/png");null==e||e.style.setProperty("display","block");const n=document.createElement("a");n.download="screenshot.png",n.href=t,n.click(),n.remove()}return e.triggerNode?g.cloneElement(e.triggerNode,{onClick:t}):g.createElement(I,{title:"Take a screenshot of the current page",type:"text",size:"small",icon:g.createElement(o,null),onClick:t})}function ae(e){return g.createElement(I,{title:"dark"===e.theme?"switch to light theme":"switch to dark theme",type:"text",size:"small",icon:g.createElement(r,{style:{color:"dark"===e.theme?"white":"black"}}),onClick:()=>e.onChange()})}function ce(e){const t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function ie(){const e=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+1]}(),t=function(e){return e.startsWith("preview-")&&e.length>8}(n=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+2]}())?"preview":function(e){return e.startsWith("v")&&e.length>1}(n)?"release":n;var n;const o=[{code:"development",name:"Development Version",color:"red",url:`/webapps/${e}/development/${ce(window.location.href)}`,show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:`/webapps/${e}/testing/${ce(window.location.href)}`,show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:`/webapps/${e}/staging/${ce(window.location.href)}`,show:!0},{code:"production",name:"Production Version",color:"green",url:`/webapps/${e}/production/${ce(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}],r=o.find(e=>e.code===t);return r?g.createElement(T,{placement:"top",arrow:!0,menu:{items:o.filter(e=>e.show).map(e=>({key:e.name,label:g.createElement("span",null,g.createElement("i",{className:`dot ${e.color}`})," ",e.name),onClick:()=>{window.location.href=e.url}}))}},g.createElement(I,{type:"text",size:"small"},g.createElement("div",{style:{display:"flex",alignItems:"center"}},g.createElement("i",{className:`dot ${null==r?void 0:r.color}`,style:{marginRight:5}}),"production"!==r.code&&g.createElement("span",{style:{marginRight:5}},"You are on ",g.createElement("b",null,r.name)),g.createElement(l,null)))):null}const se="https://static.zdassets.com/ekr/snippet.js";function de(){const{me:e,publicConfig:t}=s(),[n,o]=f(!1);return b(()=>{if(!t.zendesk||"undefined"==typeof document)return;const n=document.createElement("script");return n.src=se+"?key="+t.zendesk,n.async=!0,n.id="ze-snippet",n.onload=()=>{window.zE("webWidget","hide"),window.zE("webWidget:on","open",()=>{window.zE("webWidget","show"),o(!0)}),window.zE("webWidget:on","close",()=>{window.zE("webWidget","hide"),o(!1)})},document.body.appendChild(n),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":e.fullname}},{id:"email",prefill:{"*":e.email}}]}},()=>{document.body.removeChild(n)}},[t,e]),t.zendesk?g.createElement(I,{size:"small",icon:g.createElement(a,null),onClick:function(){n?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),o(!n)}},"Support"):null}function me(e){const t=[];return e.forEach(e=>{const n={key:"to"in e?e.to:e.label,label:e.label,icon:e.icon};"to"in e&&e.to?n.label=g.createElement(v,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=g.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=me(e.children||[])),t.push(n)}),t}function ue(e){const t=me(e.menu),n=w(),o=y(),r=n.map(e=>e.pathname).filter(e=>"/"===o.pathname||"/"!==e),{me:l}=s(),{theme:a,toggleTheme:i}=ne();return g.createElement(W,{style:{height:"100%"}},g.createElement(W.Header,{id:"decaf-header"},g.createElement("div",{style:{paddingInline:20,display:"flex",justifyContent:"space-between",alignItems:"center"}},g.createElement(E,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},g.createElement(oe,null),g.createElement(z.Title,{level:4,style:{margin:0}},e.appName)),g.createElement(N,{style:{justifyContent:"flex-end",backgroundColor:"transparent",border:"none",flex:1},mode:"horizontal",items:t,selectedKeys:r}))),g.createElement(W.Content,{id:"decaf-content"},g.createElement(k,null)),g.createElement(W.Footer,{id:"decaf-footer"},g.createElement(P,{justify:"space-between",align:"middle"},g.createElement(A,{span:10},g.createElement(de,null)),g.createElement(A,{span:4,style:{textAlign:"center"}},g.createElement(z.Text,{type:"secondary"},"Powered by"," ",g.createElement("b",null,g.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube")))),g.createElement(A,{span:10,style:{justifyContent:"flex-end",display:"flex",gap:10}},g.createElement(I,{size:"small",icon:g.createElement(c,null)},l.username),g.createElement(ie,null),g.createElement(ae,{theme:a,onChange:i}),g.createElement(le,null),g.createElement(re,null)))))}function pe(e){const{client:t}=s(),[n,o]=f(void 0);return b(()=>{t.barista.get("/version/").then(({data:e})=>o(e.version))},[t]),g.createElement(D,{direction:"vertical",size:"middle",style:{width:"100%"}},g.createElement(L,{title:"About",column:1,bordered:!0,style:{maxWidth:700,width:"100%"}},g.createElement(L.Item,{label:"Application Name"},e.appName),g.createElement(L.Item,{label:"Application Description"},e.appDescription),g.createElement(L.Item,{label:"Application Version"},`v${e.appVersion}`),g.createElement(L.Item,{label:"DECAF Barista Version"},`v${n}`)),e.content)}function ge(e,t,n){const o=[...e];return t.forEach(e=>{const t=o.findIndex(t=>t[n]===e[n]);t>=0?o[t]=e:o.push(e)}),o}function fe(e){var t,n;b(()=>{const 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),()=>{document.body.removeChild(e)}},[]);let o=ge(e.routes,[{path:"/about",element:g.createElement(pe,{appName:e.appName,appVersion:null==(t=e.config)?void 0:t.currentVersion,appDescription:e.appDescription,content:e.aboutPageContent})},{path:"*",element:g.createElement(M,null)}],"path");const r=ge(e.menuItems,[{label:"About",to:"/about",icon:g.createElement(i,null)}],"to");o=[{element:g.createElement(ue,{menu:r,appName:e.appName}),path:"/",children:o,errorElement:g.createElement(O,null)}];const l=C(o,{basename:null==(n=e.config)?void 0:n.basePath}),a=e.controller||m;return a.disableZendeskWidget=!0,g.createElement(te,{themeConfig:e.themeConfig,theme:e.theme},g.createElement(d,{config:e.config,controller:a},g.createElement(B,{router:l})))}export{fe as DecafWebapp,F as Page401,H as Page403,M as Page404,O as PageError,Q as decafThemeDark,J as decafThemeLight,Y as useTableMaxHeight};
3
+ `))}),T.createElement(e,{styles:a}),n.children))}function Ne(e){const{items:t,itemRender:n,separator:l}=e,{theme:a}=Ie(),c=x.useBreakpoint(),i=t.slice(0,1).concat(t.slice(-1));return T.createElement("ul",{className:`decaf-breadcrumb ${a}`},function(e,t,n){const o=[];return e.forEach((l,a)=>{if(l.href&&a!==e.length-1)o.push(T.createElement("li",{key:a},n?n(l):T.createElement(j,{className:"decaf-breadcrumb-link",to:l.href},l.title)));else if(l.children){const e=l.children.map((e,t)=>({key:t,label:T.createElement(j,{className:"decaf-breadcrumb-link",to:e.href},e.title)}));o.push(T.createElement("li",{key:a},T.createElement(C,{menu:{items:e}},T.createElement("div",{style:{display:"flex",cursor:"pointer",gap:3}},T.createElement("span",null,l.title),T.createElement(r,{style:{fontSize:12}})))))}else o.push(T.createElement("li",{key:a},l.title));a<e.length-1&&o.push(T.createElement("li",{key:`sep-${a}`,className:"separator"},t))}),o}(c.lg?t:i,l||T.createElement(o,null),n))}function Te(){const{token:e}=k.useToken(),t=x.useBreakpoint();return T.createElement(w,{type:"link",href:"https://docs.decafhub.com",target:"_blank",rel:"noreferrer",icon:T.createElement(l,null),style:{backgroundColor:e.colorBgElevated}},!t.xs&&"Documentation")}function De(){return T.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},T.createElement("g",null,T.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"}),T.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"}),T.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"}),T.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"}),T.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"}),T.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"}),T.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){const t=[];return e.forEach(e=>{const n={key:"to"in e?e.to:e.label,label:e.label,icon:e.icon};"to"in e&&e.to?n.label=T.createElement(R,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=T.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=Pe(e.children||[])),t.push(n)}),t}function We(){return T.createElement(y.Text,{type:"secondary"},"Powered by"," ",T.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube"))}function je(e){const[t,n]=T.useState(!1),o=F(),r=V(),{md:l}=x.useBreakpoint(),i=Pe(e.menu),s=o.map(e=>e.pathname).filter(e=>"/"===r.pathname||"/"!==e);W(()=>{l||n(!1)},[r.pathname,l]);const d=T.createElement(B,{items:[...i],selectedKeys:s,mode:l?"horizontal":"inline",overflowedIndicator:T.createElement(a,{style:{fontSize:20,color:"white"}}),style:{flex:"auto",justifyContent:"flex-end",backgroundColor:"transparent",border:"none",minWidth:0}});return l?d:T.createElement("div",{style:{display:"flex",flex:"auto",justifyContent:"flex-end"}},T.createElement(c,{style:{fontSize:20,marginRight:20},onClick:()=>n(!t)}),T.createElement(S,{open:t,footer:T.createElement(We,null),onClose:()=>n(!1),bodyStyle:{padding:10},width:document.body.clientWidth-50>350?350:.85*document.body.clientWidth},d))}function Fe(){return T.createElement("div",{style:{display:"flex"}},T.createElement(w,{type:"text",icon:T.createElement(i,null),title:"Scroll to top",onClick:()=>window.scrollTo({top:0,behavior:"smooth"})}),T.createElement(w,{type:"text",icon:T.createElement(r,null),title:"Scroll to bottom",onClick:()=>window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})}))}function Ve(e){async function t(){const e=document.getElementById("decaf-footer");null==e||e.style.setProperty("display","none");const t=(await Q(document.body)).toDataURL("image/png");null==e||e.style.setProperty("display","block");const n=document.createElement("a");n.download="screenshot.png",n.href=t,n.click(),n.remove()}return e.triggerNode?T.cloneElement(e.triggerNode,{onClick:t}):T.createElement(w,{type:"text",icon:T.createElement(s,null),title:"Take a screenshot of the current page",onClick:t})}function Re(e){return T.createElement(w,{type:"text",icon:T.createElement("dark"===e.theme?d:m,null),title:"dark"===e.theme?"Switch to light theme":"Switch to dark theme",onClick:()=>e.onChange()})}function He(){const[e,t]=D(void 0),n=Y(),o=H();W(()=>{n.me.email&&function(e){const t=`https://www.gravatar.com/avatar/${J(e)}`;return fetch(`${t}?d=404`,{method:"HEAD"}).then(e=>200!==e.status?void 0:t).catch(()=>{})}(n.me.email).then(t)},[n.me.email]);const r=[{key:"me",label:n.me.fullname||n.me.username,title:n.me.email,disabled:!0,icon:T.createElement(u,null),style:{cursor:"default"}},{key:"divider-1",dashed:!0,type:"divider"},{key:"logout",label:"Logout",icon:T.createElement(p,null),onClick:()=>me(n.client,!1)},{key:"logout-all",label:"Logout All Sessions",icon:T.createElement(p,null),onClick:()=>window.confirm("Logout from all sessions?")&&me(n.client,!0)},{key:"divider-2",dashed:!0,type:"divider"},{key:"about",label:"About",icon:T.createElement(g,null),onClick:()=>o("/about")}],l=e?{src:e}:{icon:T.createElement(u,{style:{color:"rgba(255,255,255, 0.5)"}}),style:{backgroundColor:"transparent",border:"1px solid rgba(255,255,255, 0.5)"}};return T.createElement(C,{trigger:["click"],menu:{items:r}},T.createElement(z,le({},l,{style:le({},l.style,{cursor:"pointer"})})))}function Oe(e){const t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function qe(){const e=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+1]}(),t=function(e){return e.startsWith("preview-")&&e.length>8}(n=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+2]}())?"preview":function(e){return e.startsWith("v")&&e.length>1}(n)?"release":n;var n;const{md:o}=x.useBreakpoint(),r=[{code:"development",name:"Development Version",color:"red",url:`/webapps/${e}/development/${Oe(window.location.href)}`,show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:`/webapps/${e}/testing/${Oe(window.location.href)}`,show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:`/webapps/${e}/staging/${Oe(window.location.href)}`,show:!0},{code:"production",name:"Production Version",color:"green",url:`/webapps/${e}/production/${Oe(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}],l=r.find(e=>e.code===t),a="production"===(null==l?void 0:l.code);return l?T.createElement(C,{placement:"top",arrow:!0,menu:{items:r.filter(e=>e.show).map(e=>({key:e.name,label:T.createElement("span",null,T.createElement("i",{className:`dot ${e.color}`})," ",e.name),onClick:()=>{window.location.href=e.url}}))}},T.createElement(w,{type:"text",style:{width:a?32:"initial",padding:a?0:"revert",display:"flex",alignItems:"center",justifyContent:"center"},icon:T.createElement("i",{className:`dot ${null==l?void 0:l.color}`})},T.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},!a&&o&&T.createElement(T.Fragment,null,T.createElement("span",{style:{marginInline:5}},"You are on ",T.createElement("b",null,l.name)),T.createElement(f,null))))):null}const Me="https://static.zdassets.com/ekr/snippet.js";function _e(){const{me:e,publicConfig:t}=Y(),[n,o]=D(!1),{token:r}=k.useToken(),l=x.useBreakpoint();return W(()=>{if(!t.zendesk||"undefined"==typeof document)return;const n=document.createElement("script");return n.src=Me+"?key="+t.zendesk,n.async=!0,n.id="ze-snippet",n.onload=()=>{window.zE("webWidget","hide"),window.zE("webWidget:on","open",()=>{window.zE("webWidget","show"),o(!0)}),window.zE("webWidget:on","close",()=>{window.zE("webWidget","hide"),o(!1)})},document.body.appendChild(n),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":e.fullname}},{id:"email",prefill:{"*":e.email}}]}},()=>{document.body.removeChild(n)}},[t,e]),t.zendesk?T.createElement(w,{type:"link",icon:T.createElement(h,null),style:{backgroundColor:r.colorBgElevated},onClick:function(){n?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),o(!n)}},!l.xs&&"Support"):null}function Ye(e){const t=V(),n=O(),o=F(),r=x.useBreakpoint(),{theme:l,toggleTheme:a}=Ie(),c=null==o?void 0:o[(null==o?void 0:o.length)-1],i=!(null==c||!c.handle.fullScreen),s=null==c?void 0:c.handle.extras;return T.createElement(I,{style:{height:"100%"}},T.createElement(Ke,{isAnimating:"loading"===n.state,key:t.key}),T.createElement(v,{theme:Ce},T.createElement(I.Header,{id:"decaf-header"},T.createElement(Ge,{title:e.appName}),T.createElement(je,{title:e.appName,menu:e.menu}),T.createElement(He,null))),T.createElement(I.Content,{id:"decaf-content",style:{flex:1,minHeight:"100%"}},T.createElement(Ue,null,s),T.createElement("div",{id:"decaf-layout-content-outlet",className:i?"full-screen":""},T.createElement(q,null))),T.createElement(v,{theme:Ce},T.createElement(I.Footer,{id:"decaf-footer"},T.createElement($,{justify:"space-between",align:"middle"},T.createElement(A,{span:r.lg?10:12},T.createElement(_e,null),T.createElement("span",{style:{display:"inline-block",width:1}}),T.createElement(Te,null)),T.createElement(A,{span:r.lg?4:0,style:{textAlign:"center"}},T.createElement(We,null)),T.createElement(A,{span:r.lg?10:12,style:{justifyContent:"flex-end",display:"flex",gap:10}},T.createElement(qe,null),T.createElement(Re,{theme:l,onChange:a}),T.createElement(Ve,null),T.createElement(Fe,null))))))}function Ge({title:e}){const t=x.useBreakpoint();return T.createElement(j,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},T.createElement(De,null),t.lg&&T.createElement(y.Title,{level:1,style:{margin:0,fontWeight:"normal",fontSize:20,color:"rgba(255, 255, 255, 0.75)",whiteSpace:"nowrap"}},e))}function Ke({isAnimating:e}){const{animationDuration:t,isFinished:n,progress:o}=U({isAnimating:e});return T.createElement("div",{style:{opacity:n?0:1,pointerEvents:"none",transition:`opacity ${t}ms linear`}},T.createElement("div",{style:{background:"#29d",height:2,left:0,marginLeft:100*(-1+o)+"%",position:"fixed",top:0,transition:`margin-left ${t}ms linear`,width:"100%",zIndex:1031}},T.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 Ue(e){const t=F().filter(e=>{var t;return Boolean(null==(t=e.handle)?void 0:t.crumb)}).map(e=>e.handle.crumb(e.data)),n=[{href:"/",title:T.createElement(b,null)},...t].map((e,t)=>le({},e,{_key:t}));return n.length<2?T.createElement(T.Fragment,null):T.createElement("div",{id:"decaf-layout-breadcrumb"},T.createElement(Ne,{items:n}),T.createElement("div",null,e.children))}function Xe(e){const{client:t}=Y(),[n,o]=D(void 0),[r,l]=D(void 0),[a,c]=D(void 0);return W(()=>{t.bare.get("/_cultproxy").then(({data:e})=>o(e.version)),t.barista.get("/version/").then(({data:e})=>l(e.version)),t.bare.get("/apis/estate/version").then(({data:e})=>c(e))},[t]),T.createElement($,{gutter:[16,16]},T.createElement(A,{xs:{span:24},sm:{span:24},md:{span:24},lg:{span:12},xl:{span:8},xxl:{span:6}},T.createElement(L,{bordered:!1},T.createElement(N,{title:"Application Name",value:e.appName}))),T.createElement(A,{xs:{span:24},lg:{span:12},xl:{span:16},xxl:{span:18}},T.createElement(L,{bordered:!1},T.createElement(N,{title:"Application Description",value:e.appDescription}))),T.createElement(A,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},T.createElement(L,{bordered:!1},T.createElement(N,{title:"Application Version",value:e.appVersion,prefix:"v"}))),T.createElement(A,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},T.createElement(L,{bordered:!1},T.createElement(N,{title:"DECAF Cultproxy Version",value:n,prefix:"v"}))),T.createElement(A,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},T.createElement(L,{bordered:!1},T.createElement(N,{title:"DECAF Barista Version",value:r,prefix:"v"}))),T.createElement(A,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},T.createElement(L,{bordered:!1},T.createElement(N,{title:"DECAF Estate Version",value:a,prefix:"v"}))),T.createElement(A,{span:24},e.content))}const Ze=["crumb","fullScreen","extras","children"];function Je(e){W(()=>{const e=function(){const 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),()=>{document.body.removeChild(e)}},[]);const t=e.controller||K;return t.disableZendeskWidget=!0,T.createElement(Le,{themeConfig:e.themeConfig,theme:e.theme},T.createElement(G,{config:e.config,controller:t},T.createElement(Qe,le({},e))))}function Qe(e){var t,n;const o=Y(),r=[{path:"/about",element:T.createElement(Xe,{appName:e.appName,appVersion:null==(t=e.config)?void 0:t.currentVersion,appDescription:e.appDescription,content:null==e.buildAboutPageContent?void 0:e.buildAboutPageContent(o)}),crumb:()=>({title:"About"})},{path:"*",element:T.createElement(oe,null),crumb:()=>({title:"Error: Page Not Found"})}],l=be(e.buildRouteItems(o),r,"path"),a=M(function(e,t,n){return[{element:T.createElement(Ye,{menu:e.buildMenuItems(t),appName:e.appName}),path:"/",children:n.map(et),errorElement:T.createElement(re,null)}]}(e,o,l),{basename:null==(n=e.config)?void 0:n.basePath});return T.createElement(_,{router:a})}function et(e){const{crumb:t,fullScreen:n,extras:o,children:r}=e;return le({},function(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)t.indexOf(n=l[o])>=0||(r[n]=e[n]);return r}(e,Ze),r?{handle:{crumb:t,fullScreen:n,extras:o},children:r.map(et)}:{handle:{crumb:t,fullScreen:n,extras:o}})}export{Je as DecafWebapp,ge as Direction,te as Page401,ne as Page403,oe as Page404,re as PageError,ue as booleanMap,Ce as decafThemeDark,xe as decafThemeLight,he as directionMap,pe as nullableBooleanMap,be as setAtKey,fe as toDirection,Ie as useDecafTheme,ie as useRemaningHeight,se as useTableMaxHeight};
4
4
  //# sourceMappingURL=index.modern.mjs.map