@rivm-loculus-tools/sequence-editor 0.1.5 → 0.1.7

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 (61) hide show
  1. package/dist/_chunks/EditorWorkerService.js +12 -11
  2. package/dist/_chunks/EditorWorkerService.js.map +1 -1
  3. package/dist/_chunks/SequenceEditor.js +362 -489
  4. package/dist/_chunks/SequenceEditor.js.map +1 -1
  5. package/dist/_chunks/SequenceEditorPageDrawer.js +160 -49577
  6. package/dist/_chunks/SequenceEditorPageDrawer.js.map +1 -1
  7. package/dist/_chunks/comlink.js +228 -0
  8. package/dist/_chunks/comlink.js.map +1 -0
  9. package/dist/_chunks/react.js +11 -0
  10. package/dist/_chunks/react.js.map +1 -0
  11. package/dist/_chunks/sequenceEditorStore.js +40 -273
  12. package/dist/_chunks/sequenceEditorStore.js.map +1 -1
  13. package/dist/assets/index-Dn92arD_.js +8 -0
  14. package/dist/assets/index-Dn92arD_.js.map +1 -0
  15. package/dist/classes/services/SequenceEditorEventBusService/index.js +16 -2
  16. package/dist/classes/services/SequenceEditorEventBusService/index.js.map +1 -0
  17. package/dist/classes/workers/EngineWorker/index.js +3 -2
  18. package/dist/classes/workers/EngineWorker/index.js.map +1 -1
  19. package/dist/components/app/App/index.js +15 -951
  20. package/dist/components/app/App/index.js.map +1 -1
  21. package/dist/components/pages/SequenceEditorErrorPage/index.js +6 -6
  22. package/dist/components/pages/SequenceEditorErrorPage/index.js.map +1 -1
  23. package/dist/components/pages/SequenceEditorMainPage/index.js +61 -2
  24. package/dist/components/pages/SequenceEditorMainPage/index.js.map +1 -0
  25. package/dist/components/ui/SequenceEditorPage/index.js +8 -8
  26. package/dist/components/ui/SequenceEditorPage/index.js.map +1 -1
  27. package/dist/components/ui/SequenceEditorPageHeader/index.js +60 -2
  28. package/dist/components/ui/SequenceEditorPageHeader/index.js.map +1 -0
  29. package/dist/components/ui/SequenceEditorSearchBar/index.js +27 -2
  30. package/dist/components/ui/SequenceEditorSearchBar/index.js.map +1 -0
  31. package/dist/constants/keyboard.js +1 -1
  32. package/dist/utils/EditorUtil/index.js +158 -150
  33. package/dist/utils/EditorUtil/index.js.map +1 -1
  34. package/package.json +44 -21
  35. package/dist/_chunks/Box.js +0 -6737
  36. package/dist/_chunks/Box.js.map +0 -1
  37. package/dist/_chunks/Close.js +0 -7
  38. package/dist/_chunks/Close.js.map +0 -1
  39. package/dist/_chunks/KeyboardArrowDown.js +0 -1023
  40. package/dist/_chunks/KeyboardArrowDown.js.map +0 -1
  41. package/dist/_chunks/Redo.js +0 -2559
  42. package/dist/_chunks/Redo.js.map +0 -1
  43. package/dist/_chunks/SequenceEditorEventBusService.js +0 -102
  44. package/dist/_chunks/SequenceEditorEventBusService.js.map +0 -1
  45. package/dist/_chunks/SequenceEditorMainPage.js +0 -552
  46. package/dist/_chunks/SequenceEditorMainPage.js.map +0 -1
  47. package/dist/_chunks/SequenceEditorPageHeader.js +0 -236
  48. package/dist/_chunks/SequenceEditorPageHeader.js.map +0 -1
  49. package/dist/_chunks/SequenceEditorSearchBar.js +0 -143
  50. package/dist/_chunks/SequenceEditorSearchBar.js.map +0 -1
  51. package/dist/_chunks/TestIdUtil.js +0 -4695
  52. package/dist/_chunks/TestIdUtil.js.map +0 -1
  53. package/dist/_chunks/TextField.js +0 -3083
  54. package/dist/_chunks/TextField.js.map +0 -1
  55. package/dist/_chunks/rolldown-runtime.js +0 -13
  56. package/dist/_chunks/sequence_editor.js +0 -517
  57. package/dist/_chunks/sequence_editor.js.map +0 -1
  58. package/dist/_chunks/withDialog.js +0 -289
  59. package/dist/_chunks/withDialog.js.map +0 -1
  60. package/dist/assets/index-C5rc-pJV.js +0 -8
  61. package/dist/assets/index-C5rc-pJV.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"Redo.js","names":["useUtilityClasses","capitalize","PropTypes","useUtilityClasses","capitalize","useForkRef","CancelIcon","PropTypes","unsupportedProp","ownerWindow","useForkRef","debounce","PropTypes","useUtilityClasses","capitalize","useForkRef","PropTypes","PropTypes","use"],"sources":["../../../../../../node_modules/.pnpm/@mui+utils@9.4.0_@types+react@19.3.0_react@19.3.0/node_modules/@mui/utils/unsupportedProp/unsupportedProp.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/utils/unsupportedProp.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/AppBar/appBarClasses.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/AppBar/AppBar.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/internal/svg-icons/Cancel.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/Chip/chipClasses.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/Chip/Chip.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/Slide/Slide.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/Drawer/drawerClasses.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/Drawer/Drawer.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/Toolbar/toolbarClasses.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/Toolbar/Toolbar.mjs","../../../../../../node_modules/.pnpm/i18next@26.4.2_typescript@6.0.3/node_modules/i18next/dist/esm/i18next.js","../../../../../common/frontend/src/components/page/ErrorPageCommon.tsx","../../../../../common/frontend/src/components/page/PageCommonContext.ts","../../../../../common/frontend/src/components/page/PageCommon.tsx","../../../../../common/frontend/src/components/page/PageCommonContextProvider.tsx","../../../../../common/frontend/src/components/page/PageCommonDrawer.tsx","../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/Menu.mjs","../../../../../common/frontend/src/components/page/PageCommonHeader.tsx","../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/Undo.mjs","../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/Redo.mjs"],"sourcesContent":["export default function unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The prop \\`${propFullNameSafe}\\` is not supported. Please remove it.`);\n }\n return null;\n}","import unsupportedProp from '@mui/utils/unsupportedProp';\nexport default unsupportedProp;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getAppBarUtilityClass(slot) {\n return generateUtilityClass('MuiAppBar', slot);\n}\nconst appBarClasses = generateUtilityClasses('MuiAppBar', ['root', 'positionFixed', 'positionAbsolute', 'positionSticky', 'positionStatic', 'positionRelative', 'colorDefault', 'colorPrimary', 'colorSecondary', 'colorInherit', 'colorTransparent', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning']);\nexport default appBarClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport { applyChildrenFocusVisible } from \"../styles/focusVisible.mjs\";\nimport capitalize from \"../utils/capitalize.mjs\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.mjs\";\nimport Paper from \"../Paper/index.mjs\";\nimport { getAppBarUtilityClass } from \"./appBarClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n position,\n classes\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, `position${capitalize(position)}`]\n };\n return composeClasses(slots, getAppBarUtilityClass, classes);\n};\n\n// var2 is the fallback.\n// Ex. var1: 'var(--a)', var2: 'var(--b)'; return: 'var(--a, var(--b))'\nconst joinVars = (var1, var2) => var1 ? `${var1.replace(')', '')}, ${var2})` : var2;\nconst AppBarRoot = styled(Paper, {\n name: 'MuiAppBar',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`position${capitalize(ownerState.position)}`], styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n boxSizing: 'border-box',\n // Prevent padding issue with the Modal and fixed positioned AppBar.\n flexShrink: 0,\n variants: [{\n props: {\n position: 'fixed'\n },\n style: {\n position: 'fixed',\n zIndex: (theme.vars || theme).zIndex.appBar,\n top: 0,\n left: 'auto',\n right: 0,\n '@media print': {\n // Prevent the app bar to be visible on each printed page.\n position: 'absolute'\n }\n }\n }, {\n props: {\n position: 'absolute'\n },\n style: {\n position: 'absolute',\n zIndex: (theme.vars || theme).zIndex.appBar,\n top: 0,\n left: 'auto',\n right: 0\n }\n }, {\n props: {\n position: 'sticky'\n },\n style: {\n position: 'sticky',\n zIndex: (theme.vars || theme).zIndex.appBar,\n top: 0,\n left: 'auto',\n right: 0\n }\n }, {\n props: {\n position: 'static'\n },\n style: {\n position: 'static'\n }\n }, {\n props: {\n position: 'relative'\n },\n style: {\n position: 'relative'\n }\n }, {\n props: {\n color: 'inherit'\n },\n style: {\n '--AppBar-color': 'inherit',\n color: 'var(--AppBar-color)'\n }\n }, {\n props: {\n color: 'default'\n },\n style: {\n '--AppBar-background': theme.vars ? theme.vars.palette.AppBar.defaultBg : theme.palette.grey[100],\n '--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[100]),\n ...theme.applyStyles('dark', {\n '--AppBar-background': theme.vars ? theme.vars.palette.AppBar.defaultBg : theme.palette.grey[900],\n '--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[900])\n })\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => ({\n props: {\n color\n },\n style: {\n '--AppBar-background': (theme.vars ?? theme).palette[color].main,\n '--AppBar-color': (theme.vars ?? theme).palette[color].contrastText,\n ...(theme.focusVisible && applyChildrenFocusVisible(`0 0 0 4px ${(theme.vars || theme).palette.background.default}`))\n }\n })), {\n props: props => props.enableColorOnDark === true && !['inherit', 'transparent'].includes(props.color),\n style: {\n backgroundColor: 'var(--AppBar-background)',\n color: 'var(--AppBar-color)'\n }\n }, {\n props: props => props.enableColorOnDark === false && !['inherit', 'transparent'].includes(props.color),\n style: {\n backgroundColor: 'var(--AppBar-background)',\n color: 'var(--AppBar-color)',\n ...theme.applyStyles('dark', {\n backgroundColor: theme.vars ? joinVars(theme.vars.palette.AppBar.darkBg, 'var(--AppBar-background)') : null,\n color: theme.vars ? joinVars(theme.vars.palette.AppBar.darkColor, 'var(--AppBar-color)') : null\n })\n }\n }, {\n props: {\n color: 'transparent'\n },\n style: {\n '--AppBar-background': 'transparent',\n '--AppBar-color': 'inherit',\n backgroundColor: 'var(--AppBar-background)',\n color: 'var(--AppBar-color)',\n ...theme.applyStyles('dark', {\n backgroundImage: 'none'\n })\n }\n }]\n})));\nconst AppBar = /*#__PURE__*/React.forwardRef(function AppBar(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiAppBar'\n });\n const {\n className,\n color = 'primary',\n enableColorOnDark = false,\n position = 'fixed',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n position,\n enableColorOnDark\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(AppBarRoot, {\n square: true,\n component: \"header\",\n ownerState: ownerState,\n elevation: 4,\n className: clsx(classes.root, className, position === 'fixed' && 'mui-fixed'),\n ref: ref,\n ...other\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? AppBar.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 4\n */\n elevation: PropTypes.number,\n /**\n * If true, the `color` prop is applied in dark mode.\n * @default false\n */\n enableColorOnDark: PropTypes.bool,\n /**\n * The positioning type. The behavior of the different options is described\n * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/position).\n * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.\n * @default 'fixed'\n */\n position: PropTypes.oneOf(['absolute', 'fixed', 'relative', 'static', 'sticky']),\n /**\n * If `false`, rounded corners are enabled.\n * @default true\n */\n square: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default AppBar;","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.mjs\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getChipUtilityClass(slot) {\n return generateUtilityClass('MuiChip', slot);\n}\nconst chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorDefault', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'disabled', 'clickable', 'deletable', 'outlined', 'filled', 'avatar', 'icon', 'label', 'deleteIcon', 'focusVisible']);\nexport default chipClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport CancelIcon from \"../internal/svg-icons/Cancel.mjs\";\nimport useForkRef from \"../utils/useForkRef.mjs\";\nimport unsupportedProp from \"../utils/unsupportedProp.mjs\";\nimport capitalize from \"../utils/capitalize.mjs\";\nimport ButtonBase from \"../ButtonBase/index.mjs\";\nimport { styled } from \"../zero-styled/index.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.mjs\";\nimport chipClasses, { getChipUtilityClass } from \"./chipClasses.mjs\";\nimport useSlot from \"../utils/useSlot.mjs\";\nimport { getTransitionStyles } from \"../transitions/utils.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n size,\n color,\n onDelete,\n clickable,\n variant\n } = ownerState;\n const slots = {\n root: ['root', variant, disabled && 'disabled', `size${capitalize(size)}`, `color${capitalize(color)}`, clickable && 'clickable', onDelete && 'deletable'],\n label: ['label'],\n avatar: ['avatar'],\n icon: ['icon'],\n deleteIcon: ['deleteIcon']\n };\n return composeClasses(slots, getChipUtilityClass, classes);\n};\nconst ChipRoot = styled('div', {\n name: 'MuiChip',\n slot: 'Root',\n shouldForwardProp: prop => rootShouldForwardProp(prop) && prop !== 'focusableWhenDisabled' && prop !== 'skipFocusWhenDisabled',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n const {\n color,\n clickable,\n onDelete,\n size,\n variant\n } = ownerState;\n return [{\n [`& .${chipClasses.avatar}`]: styles.avatar\n }, {\n [`& .${chipClasses.icon}`]: styles.icon\n }, {\n [`& .${chipClasses.deleteIcon}`]: styles.deleteIcon\n }, styles.root, styles[`size${capitalize(size)}`], styles[`color${capitalize(color)}`], clickable && styles.clickable, onDelete && styles.deletable, styles[variant]];\n }\n})(memoTheme(({\n theme\n}) => {\n const textColor = theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300];\n return {\n maxWidth: '100%',\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(13),\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 32,\n lineHeight: 1.5,\n color: (theme.vars || theme).palette.text.primary,\n backgroundColor: (theme.vars || theme).palette.action.selected,\n borderRadius: 32 / 2,\n whiteSpace: 'nowrap',\n ...getTransitionStyles(theme, ['background-color', 'box-shadow']),\n // reset cursor explicitly in case ButtonBase is used\n cursor: 'unset',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n textDecoration: 'none',\n border: 0,\n // Remove `button` border\n padding: 0,\n // Remove `button` padding\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n [`&.${chipClasses.disabled}`]: {\n opacity: (theme.vars || theme).palette.action.disabledOpacity,\n pointerEvents: 'none'\n },\n [`& .${chipClasses.avatar}`]: {\n marginLeft: 5,\n marginRight: -6,\n width: 24,\n height: 24,\n color: theme.vars ? theme.vars.palette.Chip.defaultAvatarColor : textColor,\n fontSize: theme.typography.pxToRem(12)\n },\n [`& .${chipClasses.icon}`]: {\n marginLeft: 5,\n marginRight: -6\n },\n [`& .${chipClasses.deleteIcon}`]: {\n WebkitTapHighlightColor: 'transparent',\n color: theme.alpha((theme.vars || theme).palette.text.primary, 0.26),\n fontSize: 22,\n cursor: 'pointer',\n margin: '0 5px 0 -6px',\n '&:hover': {\n color: theme.alpha((theme.vars || theme).palette.text.primary, 0.4)\n }\n },\n variants: [{\n props: {\n color: 'primary'\n },\n style: {\n [`& .${chipClasses.avatar}`]: {\n color: (theme.vars || theme).palette.primary.contrastText,\n backgroundColor: (theme.vars || theme).palette.primary.dark\n }\n }\n }, {\n props: {\n color: 'secondary'\n },\n style: {\n [`& .${chipClasses.avatar}`]: {\n color: (theme.vars || theme).palette.secondary.contrastText,\n backgroundColor: (theme.vars || theme).palette.secondary.dark\n }\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n height: 24,\n [`& .${chipClasses.avatar}`]: {\n marginLeft: 4,\n marginRight: -4,\n width: 18,\n height: 18,\n fontSize: theme.typography.pxToRem(10)\n },\n [`& .${chipClasses.icon}`]: {\n fontSize: 18,\n marginLeft: 4,\n marginRight: -4\n },\n [`& .${chipClasses.deleteIcon}`]: {\n fontSize: 16,\n marginRight: 4,\n marginLeft: -4\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => {\n return {\n props: {\n color\n },\n style: {\n backgroundColor: (theme.vars || theme).palette[color].main,\n color: (theme.vars || theme).palette[color].contrastText,\n [`& .${chipClasses.deleteIcon}`]: {\n color: theme.alpha((theme.vars || theme).palette[color].contrastText, 0.7),\n '&:hover, &:active': {\n color: (theme.vars || theme).palette[color].contrastText\n }\n }\n }\n };\n }), {\n props: props => props.iconColor === props.color,\n style: {\n [`& .${chipClasses.icon}`]: {\n color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor\n }\n }\n }, {\n props: props => props.iconColor === props.color && props.color !== 'default',\n style: {\n [`& .${chipClasses.icon}`]: {\n color: 'inherit'\n }\n }\n }, {\n props: {\n onDelete: true\n },\n style: !theme.focusVisible && {\n [`&.${chipClasses.focusVisible}`]: {\n backgroundColor: theme.alpha((theme.vars || theme).palette.action.selected, `${(theme.vars || theme).palette.action.selectedOpacity} + ${(theme.vars || theme).palette.action.focusOpacity}`)\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => {\n return {\n props: {\n color,\n onDelete: true\n },\n style: !theme.focusVisible && {\n [`&.${chipClasses.focusVisible}`]: {\n background: (theme.vars || theme).palette[color].dark\n }\n }\n };\n }), {\n props: {\n clickable: true\n },\n style: {\n userSelect: 'none',\n WebkitTapHighlightColor: 'transparent',\n cursor: 'pointer',\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette.action.selected, `${(theme.vars || theme).palette.action.selectedOpacity} + ${(theme.vars || theme).palette.action.hoverOpacity}`)\n },\n ...(!theme.focusVisible && {\n [`&.${chipClasses.focusVisible}`]: {\n backgroundColor: theme.alpha((theme.vars || theme).palette.action.selected, `${(theme.vars || theme).palette.action.selectedOpacity} + ${(theme.vars || theme).palette.action.focusOpacity}`)\n }\n }),\n '&:active': {\n boxShadow: (theme.vars || theme).shadows[1]\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => ({\n props: {\n color,\n clickable: true\n },\n style: {\n '&:hover': {\n backgroundColor: (theme.vars || theme).palette[color].dark\n },\n ...(!theme.focusVisible && {\n [`&.${chipClasses.focusVisible}`]: {\n backgroundColor: (theme.vars || theme).palette[color].dark\n }\n })\n }\n })), {\n props: {\n variant: 'outlined'\n },\n style: {\n backgroundColor: 'transparent',\n border: theme.vars ? `1px solid ${theme.vars.palette.Chip.defaultBorder}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700]}`,\n [`&.${chipClasses.clickable}:hover`]: {\n backgroundColor: (theme.vars || theme).palette.action.hover\n },\n ...(!theme.focusVisible && {\n [`&.${chipClasses.focusVisible}`]: {\n backgroundColor: (theme.vars || theme).palette.action.focus\n }\n }),\n [`& .${chipClasses.avatar}`]: {\n marginLeft: 4\n },\n [`& .${chipClasses.icon}`]: {\n marginLeft: 4\n },\n [`& .${chipClasses.deleteIcon}`]: {\n marginRight: 5\n }\n }\n }, {\n props: {\n size: 'small',\n variant: 'outlined'\n },\n style: {\n [`& .${chipClasses.avatar}`]: {\n marginLeft: 2\n },\n [`& .${chipClasses.icon}`]: {\n marginLeft: 2\n },\n [`& .${chipClasses.deleteIcon}`]: {\n marginRight: 3\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // no need to check for mainChannel as it's calculated from main\n .map(([color]) => ({\n props: {\n variant: 'outlined',\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main,\n border: `1px solid ${theme.alpha((theme.vars || theme).palette[color].main, 0.7)}`,\n [`&.${chipClasses.clickable}:hover`]: {\n backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)\n },\n ...(!theme.focusVisible && {\n [`&.${chipClasses.focusVisible}`]: {\n backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.focusOpacity)\n }\n }),\n [`& .${chipClasses.deleteIcon}`]: {\n color: theme.alpha((theme.vars || theme).palette[color].main, 0.7),\n '&:hover, &:active': {\n color: (theme.vars || theme).palette[color].main\n }\n }\n }\n }))]\n };\n}));\nconst ChipLabel = styled('span', {\n name: 'MuiChip',\n slot: 'Label'\n})({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n paddingLeft: 12,\n paddingRight: 12,\n whiteSpace: 'nowrap',\n variants: [{\n props: {\n variant: 'outlined'\n },\n style: {\n paddingLeft: 11,\n paddingRight: 11\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n paddingLeft: 8,\n paddingRight: 8\n }\n }, {\n props: {\n size: 'small',\n variant: 'outlined'\n },\n style: {\n paddingLeft: 7,\n paddingRight: 7\n }\n }]\n});\nfunction isDeleteKeyboardEvent(keyboardEvent) {\n return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete';\n}\n\n/**\n * Chips represent complex entities in small blocks, such as a contact.\n */\nconst Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiChip'\n });\n const {\n avatar: avatarProp,\n className,\n clickable: clickableProp,\n color = 'default',\n component: ComponentProp,\n deleteIcon: deleteIconProp,\n disabled = false,\n icon: iconProp,\n label,\n onClick,\n onDelete,\n onKeyDown,\n onKeyUp,\n size = 'medium',\n variant = 'filled',\n tabIndex,\n skipFocusWhenDisabled = false,\n // TODO v6: Rename to `focusableWhenDisabled`.\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const {\n nativeButton,\n ...buttonBaseProps\n } = other;\n const chipRef = React.useRef(null);\n const handleRef = useForkRef(chipRef, ref);\n const handleDeleteIconClick = event => {\n // Stop the event from bubbling up to the `Chip`\n event.stopPropagation();\n onDelete(event);\n };\n const handleKeyDown = event => {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {\n // Will be handled in keyUp, otherwise some browsers\n // might init navigation\n event.preventDefault();\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleKeyUp = event => {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target) {\n if (onDelete && isDeleteKeyboardEvent(event)) {\n onDelete(event);\n }\n }\n if (onKeyUp) {\n onKeyUp(event);\n }\n };\n const clickable = clickableProp !== false && onClick ? true : clickableProp;\n const component = clickable || onDelete ? ButtonBase : ComponentProp || 'div';\n const ownerState = {\n ...props,\n component,\n disabled,\n size,\n color,\n iconColor: /*#__PURE__*/React.isValidElement(iconProp) ? iconProp.props.color || color : color,\n onDelete: !!onDelete,\n clickable,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const moreProps = component === ButtonBase ? {\n component: ComponentProp || 'div',\n internalNativeButton: false,\n focusVisibleClassName: classes.focusVisible,\n ...(onDelete && {\n disableRipple: true\n }),\n ...(nativeButton !== undefined && {\n nativeButton\n })\n } : {};\n let deleteIcon = null;\n if (onDelete) {\n deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? (/*#__PURE__*/React.cloneElement(deleteIconProp, {\n className: clsx(deleteIconProp.props.className, classes.deleteIcon),\n onClick: handleDeleteIconClick\n })) : /*#__PURE__*/_jsx(CancelIcon, {\n className: classes.deleteIcon,\n onClick: handleDeleteIconClick\n });\n }\n let avatar = null;\n if (avatarProp && /*#__PURE__*/React.isValidElement(avatarProp)) {\n avatar = /*#__PURE__*/React.cloneElement(avatarProp, {\n className: clsx(classes.avatar, avatarProp.props.className)\n });\n }\n let icon = null;\n if (iconProp && /*#__PURE__*/React.isValidElement(iconProp)) {\n icon = /*#__PURE__*/React.cloneElement(iconProp, {\n className: clsx(classes.icon, iconProp.props.className)\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n if (avatar && icon) {\n console.error('MUI: The Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.');\n }\n }\n const externalForwardedProps = {\n slots,\n slotProps\n };\n const [RootSlot, rootProps] = useSlot('root', {\n elementType: ChipRoot,\n externalForwardedProps: {\n ...externalForwardedProps,\n ...buttonBaseProps\n },\n ownerState,\n // The `component` prop is preserved because `Chip` relies on it for internal logic. If `shouldForwardComponentProp` were `false`, `useSlot` would remove the `component` prop, potentially breaking the component's behavior.\n shouldForwardComponentProp: true,\n ref: handleRef,\n className: clsx(classes.root, className),\n additionalProps: {\n disabled: clickable && disabled ? true : undefined,\n tabIndex: skipFocusWhenDisabled && disabled ? -1 : tabIndex,\n ...moreProps\n },\n getSlotProps: handlers => ({\n ...handlers,\n onClick: event => {\n handlers.onClick?.(event);\n onClick?.(event);\n },\n onKeyDown: event => {\n handlers.onKeyDown?.(event);\n handleKeyDown(event);\n },\n onKeyUp: event => {\n handlers.onKeyUp?.(event);\n handleKeyUp(event);\n }\n })\n });\n const [LabelSlot, labelProps] = useSlot('label', {\n elementType: ChipLabel,\n externalForwardedProps,\n ownerState,\n className: classes.label\n });\n return /*#__PURE__*/_jsxs(RootSlot, {\n as: component,\n ...rootProps,\n children: [avatar || icon, /*#__PURE__*/_jsx(LabelSlot, {\n ...labelProps,\n children: label\n }), deleteIcon]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Chip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The Avatar element to display.\n */\n avatar: PropTypes.element,\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the chip will appear clickable, and will raise when pressed,\n * even if the onClick prop is not defined.\n * If `false`, the chip will not appear clickable, even if onClick prop is defined.\n * This can be used, for example,\n * along with the component prop to indicate an anchor Chip is clickable.\n * Note: this controls the UI and does not affect the onClick event.\n */\n clickable: PropTypes.bool,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'default'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Override the default delete icon element. Shown only if `onDelete` is set.\n */\n deleteIcon: PropTypes.element,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * Icon element.\n */\n icon: PropTypes.element,\n /**\n * The content of the component.\n */\n label: PropTypes.node,\n /**\n * If `true`, the component is expected to resolve to a native `<button>` element.\n * When omitted, custom components inherit the default button semantics of the current wrapper.\n * Set to `true` when a custom component resolves to a native `<button>`, or `false`\n * when it resolves to a non-button host.\n */\n nativeButton: PropTypes.bool,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * Callback fired when the delete icon is clicked.\n * If set, the delete icon will be shown.\n */\n onDelete: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * If `true`, allows the disabled chip to escape focus.\n * If `false`, allows the disabled chip to receive focus.\n * @default false\n */\n skipFocusWhenDisabled: PropTypes.bool,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n label: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n label: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @ignore\n */\n tabIndex: PropTypes.number,\n /**\n * The variant to use.\n * @default 'filled'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['filled', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Chip;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport Transition from \"../internal/Transition.mjs\";\nimport isLayoutSupported from \"../utils/isLayoutSupported.mjs\";\nimport debounce from \"../utils/debounce.mjs\";\nimport useForkRef from \"../utils/useForkRef.mjs\";\nimport { useTheme } from \"../zero-styled/index.mjs\";\nimport useReducedMotion from \"../transitions/useReducedMotion.mjs\";\nimport { normalizedTransitionCallback, reflow, getTransitionProps, getTranslateOffsets } from \"../transitions/utils.mjs\";\nimport { ownerWindow } from \"../utils/index.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst hiddenStyles = {\n visibility: 'hidden'\n};\nconst DEFAULT_TRANSLATE_OPTIONS = {};\n\n/**\n * Detects SwipeableDrawer's active-swipe `translate(x, y)` transform.\n * Keep this in sync with SwipeableDrawer.setPosition.\n */\nfunction isGestureTranslate(transform) {\n return typeof transform === 'string' && /^translate\\(.+,\\s*.+\\)$/.test(transform);\n}\n\n// Move the node off-screen. Later we reset transform to `none` to slide it in.\nfunction getTranslateValue(direction, node, resolvedContainer, options = DEFAULT_TRANSLATE_OPTIONS) {\n const {\n resetInlineTransform = true\n } = options;\n const containerRect = resolvedContainer && resolvedContainer.getBoundingClientRect();\n const containerWindow = ownerWindow(node);\n let rect;\n let transform;\n if (resetInlineTransform) {\n // Read layout from the element's natural position, not from a previous\n // off-screen transform. Clear transition too, or the browser may report an\n // in-between animated value during exit.\n const previousTransform = node.style.transform;\n const previousTransition = node.style.transition;\n node.style.transition = '';\n node.style.transform = '';\n rect = node.getBoundingClientRect();\n const computedStyle = containerWindow.getComputedStyle(node);\n transform = computedStyle.getPropertyValue('transform');\n node.style.transform = previousTransform;\n node.style.transition = previousTransition;\n } else {\n rect = node.getBoundingClientRect();\n const computedStyle = containerWindow.getComputedStyle(node);\n transform = computedStyle.getPropertyValue('transform');\n }\n const {\n offsetX,\n offsetY\n } = getTranslateOffsets(transform);\n if (direction === 'left') {\n if (containerRect) {\n return `translateX(${containerRect.right + offsetX - rect.left}px)`;\n }\n return `translateX(${containerWindow.innerWidth + offsetX - rect.left}px)`;\n }\n if (direction === 'right') {\n if (containerRect) {\n return `translateX(-${rect.right - containerRect.left - offsetX}px)`;\n }\n return `translateX(-${rect.left + rect.width - offsetX}px)`;\n }\n if (direction === 'up') {\n if (containerRect) {\n return `translateY(${containerRect.bottom + offsetY - rect.top}px)`;\n }\n return `translateY(${containerWindow.innerHeight + offsetY - rect.top}px)`;\n }\n\n // direction === 'down'\n if (containerRect) {\n return `translateY(-${rect.top - containerRect.top + rect.height - offsetY}px)`;\n }\n return `translateY(-${rect.top + rect.height - offsetY}px)`;\n}\nfunction resolveContainer(containerPropProp) {\n return typeof containerPropProp === 'function' ? containerPropProp() : containerPropProp;\n}\nexport function setTranslateValue(direction, node, containerProp, options) {\n const resolvedContainer = resolveContainer(containerProp);\n const transform = getTranslateValue(direction, node, resolvedContainer, options);\n if (transform) {\n node.style.transform = transform;\n }\n}\n\n/**\n * The Slide transition is used by the [Drawer](/material-ui/react-drawer/) component.\n */\nconst Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {\n const theme = useTheme();\n const defaultEasing = {\n enter: theme.transitions.easing.easeOut,\n exit: theme.transitions.easing.sharp\n };\n const defaultTimeout = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n addEndListener,\n appear = true,\n children,\n container: containerProp,\n disablePrefersReducedMotion = false,\n direction = 'down',\n easing: easingProp = defaultEasing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = defaultTimeout,\n ...other\n } = props;\n const reducedMotion = useReducedMotion(theme.motion.reducedMotion, disablePrefersReducedMotion);\n const childrenRef = React.useRef(null);\n const preserveInlineTransformRef = React.useRef(false);\n const handleRef = useForkRef(getReactElementRef(children), childrenRef, ref);\n const handleEnter = normalizedTransitionCallback(childrenRef, (node, isAppearing) => {\n setTranslateValue(direction, node, containerProp);\n if (!reducedMotion.shouldReduceMotion) {\n reflow(node);\n }\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntering = normalizedTransitionCallback(childrenRef, (node, isAppearing) => {\n const transitionProps = getTransitionProps({\n timeout,\n style,\n easing: easingProp\n }, {\n mode: 'enter'\n });\n const transitionTiming = reducedMotion.getTransitionTiming({\n duration: transitionProps.duration,\n delay: transitionProps.delay\n });\n node.style.transition = theme.transitions.create('transform', {\n duration: transitionTiming.duration,\n easing: transitionProps.easing,\n delay: transitionTiming.delay\n });\n node.style.transform = 'none';\n if (onEntering) {\n onEntering(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(childrenRef, onEntered);\n const handleExiting = normalizedTransitionCallback(childrenRef, onExiting);\n const handleExit = normalizedTransitionCallback(childrenRef, node => {\n const transitionProps = getTransitionProps({\n timeout,\n style,\n easing: easingProp\n }, {\n mode: 'exit'\n });\n const transitionTiming = reducedMotion.getTransitionTiming({\n duration: transitionProps.duration,\n delay: transitionProps.delay\n });\n node.style.transition = theme.transitions.create('transform', {\n duration: transitionTiming.duration,\n easing: transitionProps.easing,\n delay: transitionTiming.delay\n });\n const preserveInlineTransform = isGestureTranslate(node.style.transform);\n preserveInlineTransformRef.current = preserveInlineTransform;\n\n // Preserve SwipeableDrawer's inline gesture transform during exit. Slide's\n // own off-screen translateX/Y transforms still use the reset path.\n setTranslateValue(direction, node, containerProp, {\n resetInlineTransform: !preserveInlineTransform\n });\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(childrenRef, node => {\n preserveInlineTransformRef.current = false;\n // Hidden nodes stay off-screen without animating.\n node.style.transition = '';\n if (onExited) {\n onExited(node);\n }\n });\n const handleAddEndListener = addEndListener ? next => {\n addEndListener(childrenRef.current, next);\n } : undefined;\n const updatePosition = React.useCallback(() => {\n if (childrenRef.current) {\n setTranslateValue(direction, childrenRef.current, containerProp);\n }\n }, [direction, containerProp]);\n React.useEffect(() => {\n // Skip resize listeners when the off-screen position does not depend on screen size.\n if (inProp || direction === 'down' || direction === 'right') {\n return undefined;\n }\n const handleResize = debounce(() => {\n if (childrenRef.current) {\n setTranslateValue(direction, childrenRef.current, containerProp);\n }\n });\n const containerWindow = ownerWindow(childrenRef.current);\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [direction, inProp, containerProp]);\n React.useEffect(() => {\n if (!inProp && !preserveInlineTransformRef.current) {\n // While hidden, keep the child at the correct off-screen position if\n // direction or container changes.\n updatePosition();\n }\n }, [inProp, updatePosition]);\n return /*#__PURE__*/_jsx(Transition, {\n nodeRef: childrenRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n appear: appear,\n in: inProp,\n reduceMotion: reducedMotion.shouldReduceMotion,\n timeout: timeout,\n ...other,\n children: (state, {\n ownerState,\n ...restChildProps\n }) => {\n // Do not pass ownerState to a DOM child. ownerState is only for\n // Material UI styling, and React would treat it as an invalid DOM attribute.\n let childStyle;\n if (state === 'exited' && !inProp) {\n childStyle = style || children.props.style ? {\n visibility: 'hidden',\n ...style,\n ...children.props.style\n } : hiddenStyles;\n } else if (style && children.props.style) {\n childStyle = {\n ...style,\n ...children.props.style\n };\n } else {\n childStyle = style || children.props.style;\n }\n return /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n style: childStyle,\n ...restChildProps\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Slide.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger.\n * Use it when you need custom logic to decide when the transition has ended.\n * Note: Timeouts are still used as a fallback if provided.\n *\n * @param {HTMLElement} node The transitioning DOM node.\n * @param {Function} done Call this when the transition has finished.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * An HTML element, or a function that returns one.\n * It's used to set the container the Slide is transitioning from.\n */\n container: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {\n if (props.open) {\n const resolvedContainer = resolveContainer(props.container);\n if (resolvedContainer && resolvedContainer.nodeType === 1) {\n const box = resolvedContainer.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n if (isLayoutSupported() && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `container` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n } else if (!resolvedContainer || typeof resolvedContainer.getBoundingClientRect !== 'function' || resolvedContainer.contextElement != null && resolvedContainer.contextElement.nodeType !== 1) {\n return new Error(['MUI: The `container` prop provided to the component is invalid.', 'It should be an HTML element instance.'].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * Direction the child node will enter from.\n * @default 'down'\n */\n direction: PropTypes.oneOf(['down', 'left', 'right', 'up']),\n /**\n * If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.\n * @default false\n */\n disablePrefersReducedMotion: PropTypes.bool,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n * @default {\n * enter: theme.transitions.easing.easeOut,\n * exit: theme.transitions.easing.sharp,\n * }\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Slide;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDrawerUtilityClass(slot) {\n return generateUtilityClass('MuiDrawer', slot);\n}\nconst drawerClasses = generateUtilityClasses('MuiDrawer', ['root', 'docked', 'paper', 'anchorLeft', 'anchorRight', 'anchorTop', 'anchorBottom', 'modal']);\nexport default drawerClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport integerPropType from '@mui/utils/integerPropType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport Modal from \"../Modal/index.mjs\";\nimport Slide from \"../Slide/index.mjs\";\nimport Paper from \"../Paper/index.mjs\";\nimport capitalize from \"../utils/capitalize.mjs\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.mjs\";\nimport { styled, useTheme } from \"../zero-styled/index.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport useForkRef from \"../utils/useForkRef.mjs\";\nimport { getDrawerUtilityClass } from \"./drawerClasses.mjs\";\nimport useSlot from \"../utils/useSlot.mjs\";\nimport { FOCUSABLE_ATTRIBUTE } from \"../utils/focusable.mjs\";\nimport { mergeSlotProps } from \"../utils/index.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, (ownerState.variant === 'permanent' || ownerState.variant === 'persistent') && styles.docked, ownerState.variant === 'temporary' && styles.modal];\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n anchor,\n variant\n } = ownerState;\n const slots = {\n root: ['root', `anchor${capitalize(anchor)}`],\n docked: [(variant === 'permanent' || variant === 'persistent') && 'docked'],\n modal: ['modal'],\n paper: ['paper']\n };\n return composeClasses(slots, getDrawerUtilityClass, classes);\n};\nconst DrawerRoot = styled(Modal, {\n name: 'MuiDrawer',\n slot: 'Root',\n overridesResolver\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.drawer\n})));\nconst DrawerDockedRoot = styled('div', {\n shouldForwardProp: rootShouldForwardProp,\n name: 'MuiDrawer',\n slot: 'Docked',\n skipVariantsResolver: false,\n overridesResolver\n})({\n flex: '0 0 auto'\n});\nconst DrawerPaper = styled(Paper, {\n name: 'MuiDrawer',\n slot: 'Paper'\n})(memoTheme(({\n theme\n}) => ({\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n flex: '1 0 auto',\n zIndex: (theme.vars || theme).zIndex.drawer,\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch',\n // temporary style\n position: 'fixed',\n top: 0,\n // We disable the focus ring for mouse, touch and keyboard users.\n // At some point, it would be better to keep it for keyboard users.\n // :focus-ring CSS pseudo-class will help.\n outline: 0,\n variants: [{\n props: {\n anchor: 'left'\n },\n style: {\n left: 0\n }\n }, {\n props: {\n anchor: 'top'\n },\n style: {\n top: 0,\n left: 0,\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n }\n }, {\n props: {\n anchor: 'right'\n },\n style: {\n right: 0\n }\n }, {\n props: {\n anchor: 'bottom'\n },\n style: {\n top: 'auto',\n left: 0,\n bottom: 0,\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchor === 'left' && ownerState.variant !== 'temporary',\n style: {\n borderRight: `1px solid ${(theme.vars || theme).palette.divider}`\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchor === 'top' && ownerState.variant !== 'temporary',\n style: {\n borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchor === 'right' && ownerState.variant !== 'temporary',\n style: {\n borderLeft: `1px solid ${(theme.vars || theme).palette.divider}`\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchor === 'bottom' && ownerState.variant !== 'temporary',\n style: {\n borderTop: `1px solid ${(theme.vars || theme).palette.divider}`\n }\n }]\n})));\nconst oppositeDirection = {\n left: 'right',\n right: 'left',\n top: 'down',\n bottom: 'up'\n};\nexport function isHorizontal(anchor) {\n return ['left', 'right'].includes(anchor);\n}\nexport function getAnchor({\n direction\n}, anchor) {\n return direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor;\n}\n\n/**\n * The props of the [Modal](/material-ui/api/modal/) component are available\n * when `variant=\"temporary\"` is set.\n */\nconst Drawer = /*#__PURE__*/React.forwardRef(function Drawer(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiDrawer'\n });\n const theme = useTheme();\n const isRtl = useRtl();\n const defaultTransitionDuration = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n anchor: anchorProp = 'left',\n children,\n className,\n elevation = 16,\n hideBackdrop = false,\n ModalProps = {},\n onClose,\n open = false,\n transitionDuration = defaultTransitionDuration,\n variant = 'temporary',\n slots = {},\n slotProps = {},\n ...other\n } = props;\n\n // Let's assume that the Drawer will always be rendered on user space.\n // We use this state is order to skip the appear transition during the\n // initial mount of the component.\n const mounted = React.useRef(false);\n const rootRef = React.useRef(null);\n const handleRef = useForkRef(ref, rootRef);\n React.useEffect(() => {\n mounted.current = true;\n }, []);\n\n // Resolve the container lazily so Slide reads the mounted modal root\n // after refs are assigned, rather than the initial null ref during render.\n const resolveSlideContainer = React.useCallback(() => rootRef.current, []);\n const anchorInvariant = getAnchor({\n direction: isRtl ? 'rtl' : 'ltr'\n }, anchorProp);\n const anchor = anchorProp;\n const ownerState = {\n ...props,\n anchor,\n elevation,\n open,\n variant,\n ...other\n };\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = {\n slots,\n slotProps: {\n ...slotProps,\n backdrop: mergeSlotProps(slotProps.backdrop, {\n transitionDuration\n })\n }\n };\n const [RootSlot, rootSlotProps] = useSlot('root', {\n ref: handleRef,\n elementType: DrawerRoot,\n className: clsx(classes.root, classes.modal, className),\n shouldForwardComponentProp: true,\n ownerState,\n externalForwardedProps: {\n ...externalForwardedProps,\n ...other,\n ...ModalProps\n },\n additionalProps: {\n closeAfterTransition: true,\n open,\n onClose,\n hideBackdrop,\n slots: {\n backdrop: externalForwardedProps.slots.backdrop\n },\n slotProps: {\n backdrop: externalForwardedProps.slotProps.backdrop\n }\n }\n });\n const [PaperSlot, paperSlotProps] = useSlot('paper', {\n elementType: DrawerPaper,\n shouldForwardComponentProp: true,\n className: classes.paper,\n ownerState,\n externalForwardedProps,\n additionalProps: {\n elevation: variant === 'temporary' ? elevation : 0,\n square: true,\n ...(variant === 'temporary' && {\n role: 'dialog',\n 'aria-modal': 'true',\n [FOCUSABLE_ATTRIBUTE]: '',\n tabIndex: -1\n })\n }\n });\n const [DockedSlot, dockedSlotProps] = useSlot('docked', {\n elementType: DrawerDockedRoot,\n ref: handleRef,\n className: clsx(classes.root, classes.docked, className),\n ownerState,\n externalForwardedProps,\n additionalProps: other // pass `other` here because `DockedSlot` is also a root slot for some variants\n });\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Slide,\n ownerState,\n externalForwardedProps,\n additionalProps: {\n in: open,\n direction: oppositeDirection[anchorInvariant],\n timeout: transitionDuration,\n appear: mounted.current,\n ...(variant === 'temporary' && (slots.transition == null || slots.transition === Slide) && {\n container: resolveSlideContainer\n })\n }\n });\n const drawer = /*#__PURE__*/_jsx(PaperSlot, {\n ...paperSlotProps,\n children: children\n });\n if (variant === 'permanent') {\n return /*#__PURE__*/_jsx(DockedSlot, {\n ...dockedSlotProps,\n children: drawer\n });\n }\n const slidingDrawer = /*#__PURE__*/_jsx(TransitionSlot, {\n ...transitionSlotProps,\n children: drawer\n });\n if (variant === 'persistent') {\n return /*#__PURE__*/_jsx(DockedSlot, {\n ...dockedSlotProps,\n children: slidingDrawer\n });\n }\n\n // variant === temporary\n return /*#__PURE__*/_jsx(RootSlot, {\n ...rootSlotProps,\n children: slidingDrawer\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Drawer.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Side from which the drawer will appear.\n * @default 'left'\n */\n anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The elevation of the drawer.\n * @default 16\n */\n elevation: integerPropType,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Props applied to the [`Modal`](https://mui.com/material-ui/api/modal/) element.\n * @default {}\n */\n ModalProps: PropTypes.object,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n * @default false\n */\n open: PropTypes.bool,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n docked: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n docked: PropTypes.elementType,\n paper: PropTypes.elementType,\n root: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * The variant to use.\n * @default 'temporary'\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default Drawer;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getToolbarUtilityClass(slot) {\n return generateUtilityClass('MuiToolbar', slot);\n}\nconst toolbarClasses = generateUtilityClasses('MuiToolbar', ['root', 'gutters', 'regular', 'dense']);\nexport default toolbarClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport { getToolbarUtilityClass } from \"./toolbarClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableGutters,\n variant\n } = ownerState;\n const slots = {\n root: ['root', !disableGutters && 'gutters', variant]\n };\n return composeClasses(slots, getToolbarUtilityClass, classes);\n};\nconst ToolbarRoot = styled('div', {\n name: 'MuiToolbar',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableGutters && styles.gutters, styles[ownerState.variant]];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableGutters,\n style: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }\n }\n }, {\n props: {\n variant: 'dense'\n },\n style: {\n minHeight: 48\n }\n }, {\n props: {\n variant: 'regular'\n },\n style: theme.mixins.toolbar\n }]\n})));\nconst Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiToolbar'\n });\n const {\n className,\n component = 'div',\n disableGutters = false,\n variant = 'regular',\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n disableGutters,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ToolbarRoot, {\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState,\n ...other\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Toolbar.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.\n * The Toolbar is a flex container, allowing flex item properties to be used to lay out the children.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, disables gutter padding.\n * @default false\n */\n disableGutters: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'regular'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['dense', 'regular']), PropTypes.string])\n} : void 0;\nexport default Toolbar;","const isString = obj => typeof obj === 'string';\nconst defer = () => {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n};\nconst makeString = object => {\n if (object == null) return '';\n return String(object);\n};\nconst copy = (a, s, t) => {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n const stack = !isString(path) ? path : path.split('.');\n let stackIndex = 0;\n while (stackIndex < stack.length - 1) {\n if (canNotTraverseDeeper(object)) return {};\n const key = cleanKey(stack[stackIndex]);\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n ++stackIndex;\n }\n if (canNotTraverseDeeper(object)) return {};\n return {\n obj: object,\n k: cleanKey(stack[stackIndex])\n };\n};\nconst setPath = (object, path, newValue) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n if (obj !== undefined || path.length === 1) {\n obj[k] = newValue;\n return;\n }\n let e = path[path.length - 1];\n let p = path.slice(0, path.length - 1);\n let last = getLastOfPath(object, p, Object);\n while (last.obj === undefined && p.length) {\n e = `${p[p.length - 1]}.${e}`;\n p = p.slice(0, p.length - 1);\n last = getLastOfPath(object, p, Object);\n if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n last.obj = undefined;\n }\n }\n last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (Object.prototype.hasOwnProperty.call(target, prop)) {\n if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nconst _entityMap = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;',\n '/': '&#x2F;'\n};\nconst escape = data => {\n if (isString(data)) {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n};\nclass RegExpCache {\n constructor(capacity) {\n this.capacity = capacity;\n this.regExpMap = new Map();\n this.regExpQueue = [];\n }\n getRegExp(pattern) {\n const regExpFromCache = this.regExpMap.get(pattern);\n if (regExpFromCache !== undefined) {\n return regExpFromCache;\n }\n const regExpNew = new RegExp(pattern);\n if (this.regExpQueue.length === this.capacity) {\n this.regExpMap.delete(this.regExpQueue.shift());\n }\n this.regExpMap.set(pattern, regExpNew);\n this.regExpQueue.push(pattern);\n return regExpNew;\n }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));\n if (possibleChars.length === 0) return true;\n const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n};\nconst deepFind = (obj, path, keySeparator = '.') => {\n if (!obj) return undefined;\n if (obj[path]) {\n if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;\n return obj[path];\n }\n const tokens = path.split(keySeparator);\n let current = obj;\n for (let i = 0; i < tokens.length;) {\n if (!current || typeof current !== 'object') {\n return undefined;\n }\n let next;\n let nextPath = '';\n for (let j = i; j < tokens.length; ++j) {\n if (j !== i) {\n nextPath += keySeparator;\n }\n nextPath += tokens[j];\n next = current[nextPath];\n if (next !== undefined) {\n if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {\n continue;\n }\n i += j - i + 1;\n break;\n }\n }\n current = next;\n }\n return current;\n};\nconst getCleanedCode = code => code?.replace(/_/g, '-');\n\nconst consoleLogger = {\n type: 'logger',\n log(args) {\n this.output('log', args);\n },\n warn(args) {\n this.output('warn', args);\n },\n error(args) {\n this.output('error', args);\n },\n output(type, args) {\n console?.[type]?.apply?.(console, args);\n }\n};\nclass Logger {\n constructor(concreteLogger, options = {}) {\n this.init(concreteLogger, options);\n }\n init(concreteLogger, options = {}) {\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n log(...args) {\n return this.forward(args, 'log', '', true);\n }\n warn(...args) {\n return this.forward(args, 'warn', '', true);\n }\n error(...args) {\n return this.forward(args, 'error', '');\n }\n deprecate(...args) {\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n args = args.map(a => isString(a) ? a.replace(/[\\r\\n\\x00-\\x1F\\x7F]/g, ' ') : a);\n if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;\n return this.logger[lvl](args);\n }\n create(moduleName) {\n return new Logger(this.logger, {\n ...{\n prefix: `${this.prefix}:${moduleName}:`\n },\n ...this.options\n });\n }\n clone(options) {\n options = options || this.options;\n options.prefix = options.prefix || this.prefix;\n return new Logger(this.logger, options);\n }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n on(events, listener) {\n events.split(' ').forEach(event => {\n if (!this.observers[event]) this.observers[event] = new Map();\n const numListeners = this.observers[event].get(listener) || 0;\n this.observers[event].set(listener, numListeners + 1);\n });\n return this;\n }\n off(event, listener) {\n if (!this.observers[event]) return;\n if (!listener) {\n delete this.observers[event];\n return;\n }\n this.observers[event].delete(listener);\n }\n once(event, listener) {\n const wrapper = (...args) => {\n listener(...args);\n this.off(event, wrapper);\n };\n this.on(event, wrapper);\n return this;\n }\n emit(event, ...args) {\n if (this.observers[event]) {\n const cloned = Array.from(this.observers[event].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(...args);\n }\n });\n }\n if (this.observers['*']) {\n const cloned = Array.from(this.observers['*'].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(event, ...args);\n }\n });\n }\n }\n}\n\nclass ResourceStore extends EventEmitter {\n constructor(data, options = {\n ns: ['translation'],\n defaultNS: 'translation'\n }) {\n super();\n this.data = data || {};\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n if (this.options.ignoreJSONStructure === undefined) {\n this.options.ignoreJSONStructure = true;\n }\n }\n addNamespaces(ns) {\n if (!this.options.ns.includes(ns)) {\n this.options.ns.push(ns);\n }\n }\n removeNamespaces(ns) {\n const index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n getResource(lng, ns, key, options = {}) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n let path;\n if (lng.includes('.')) {\n path = lng.split('.');\n } else {\n path = [lng, ns];\n if (key) {\n if (Array.isArray(key)) {\n path.push(...key);\n } else if (isString(key) && keySeparator) {\n path.push(...key.split(keySeparator));\n } else {\n path.push(key);\n }\n }\n }\n const result = getPath(this.data, path);\n if (!result && !ns && !key && lng.includes('.')) {\n lng = path[0];\n ns = path[1];\n key = path.slice(2).join('.');\n }\n if (result || !ignoreJSONStructure || !isString(key)) return result;\n return deepFind(this.data?.[lng]?.[ns], key, keySeparator);\n }\n addResource(lng, ns, key, value, options = {\n silent: false\n }) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.includes('.')) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n addResources(lng, ns, resources, options = {\n silent: false\n }) {\n for (const m in resources) {\n if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n addResourceBundle(lng, ns, resources, deep, overwrite, options = {\n silent: false,\n skipCopy: false\n }) {\n let path = [lng, ns];\n if (lng.includes('.')) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n let pack = getPath(this.data, path) || {};\n if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = {\n ...pack,\n ...resources\n };\n }\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n return this.getResource(lng, ns);\n }\n getDataByLanguage(lng) {\n return this.data[lng];\n }\n hasLanguageSomeTranslations(lng) {\n const data = this.getDataByLanguage(lng);\n const n = data && Object.keys(data) || [];\n return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n }\n toJSON() {\n return this.data;\n }\n}\n\nvar postProcessor = {\n processors: {},\n addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle(processors, value, key, options, translator) {\n processors.forEach(processor => {\n value = this.processors[processor]?.process(value, key, options, translator) ?? value;\n });\n return value;\n }\n};\n\nconst PATH_KEY = Symbol('i18next/PATH_KEY');\nfunction createProxy() {\n const state = [];\n const handler = Object.create(null);\n let proxy;\n handler.get = (target, key) => {\n proxy?.revoke?.();\n if (key === PATH_KEY) return state;\n state.push(key);\n proxy = Proxy.revocable(target, handler);\n return proxy.proxy;\n };\n return Proxy.revocable(Object.create(null), handler).proxy;\n}\nfunction keysFromSelector(selector, opts) {\n const {\n [PATH_KEY]: path\n } = selector(createProxy());\n const keySeparator = opts?.keySeparator ?? '.';\n const nsSeparator = opts?.nsSeparator ?? ':';\n const strict = opts?.enableSelector === 'strict';\n if (path.length > 1 && nsSeparator) {\n const ns = opts?.ns;\n const nsList = strict ? Array.isArray(ns) ? ns : ns ? [ns] : null : Array.isArray(ns) ? ns : null;\n if (nsList) {\n const candidates = strict ? nsList : nsList.length > 1 ? nsList.slice(1) : [];\n if (candidates.includes(path[0])) {\n return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;\n }\n }\n }\n return path.join(keySeparator);\n}\n\nconst shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';\nclass Translator extends EventEmitter {\n constructor(services, options = {}) {\n super();\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n this.logger = baseLogger.create('translator');\n this.checkedLoadedFor = {};\n }\n changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n exists(key, o = {\n interpolation: {}\n }) {\n const opt = {\n ...o\n };\n if (key == null) return false;\n const resolved = this.resolve(key, opt);\n if (resolved?.res === undefined) return false;\n const isObject = shouldHandleAsObject(resolved.res);\n if (opt.returnObjects === false && isObject) {\n return false;\n }\n return true;\n }\n extractFromKey(key, opt) {\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n let namespaces = opt.ns || this.options.defaultNS || [];\n const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);\n const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n const m = key.match(this.interpolator.nestingRegexp);\n if (m && m.length > 0) {\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n const parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n translate(keys, o, lastKey) {\n let opt = typeof o === 'object' ? {\n ...o\n } : o;\n if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {\n opt = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (typeof opt === 'object') opt = {\n ...opt\n };\n if (!opt) opt = {};\n if (keys == null) return '';\n if (typeof keys === 'function') keys = keysFromSelector(keys, {\n ...this.options,\n ...opt\n });\n if (!Array.isArray(keys)) keys = [String(keys)];\n keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : String(k));\n const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n const {\n key,\n namespaces\n } = this.extractFromKey(keys[keys.length - 1], opt);\n const namespace = namespaces[namespaces.length - 1];\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const lng = opt.lng || this.language;\n const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng?.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n if (returnDetails) {\n return {\n res: `${namespace}${nsSeparator}${key}`,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return `${namespace}${nsSeparator}${key}`;\n }\n if (returnDetails) {\n return {\n res: key,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return key;\n }\n const resolved = this.resolve(keys, opt);\n let res = resolved?.res;\n const resUsedKey = resolved?.usedKey || key;\n const resExactUsedKey = resolved?.exactUsedKey || key;\n const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;\n const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const hasDefaultValue = Translator.hasDefaultValue(opt);\n const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';\n const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {\n ordinal: false\n }) : '';\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;\n let resForObjHndl = res;\n if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {\n resForObjHndl = defaultValue;\n }\n const handleAsObject = shouldHandleAsObject(resForObjHndl);\n const resType = Object.prototype.toString.apply(resForObjHndl);\n if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {\n if (!opt.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {\n ...opt,\n ns: namespaces\n }) : `key '${key} (${this.language})' returned an object instead of string.`;\n if (returnDetails) {\n resolved.res = r;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return r;\n }\n if (keySeparator) {\n const resTypeIsArray = Array.isArray(resForObjHndl);\n const copy = resTypeIsArray ? [] : {};\n const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (const m in resForObjHndl) {\n if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {\n const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n if (hasDefaultValue && !res) {\n copy[m] = this.translate(deepKey, {\n ...opt,\n defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n } else {\n copy[m] = this.translate(deepKey, {\n ...opt,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n }\n if (copy[m] === deepKey) copy[m] = resForObjHndl[m];\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, opt, lastKey);\n } else {\n let usedDefault = false;\n let usedKey = false;\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, needsPluralHandling && !updateMissing ? `${key}${this.pluralResolver.getSuffix(lng, opt.count, opt)}` : key, updateMissing ? defaultValue : res);\n if (keySeparator) {\n const fk = this.resolve(key, {\n ...opt,\n keySeparator: false\n });\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n let lngs = [];\n const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (let i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);\n } else {\n lngs.push(opt.lng || this.language);\n }\n const send = (l, k, specificDefaultValue) => {\n const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n if (this.options.missingKeyHandler) {\n this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);\n } else if (this.backendConnector?.saveMissing) {\n this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);\n }\n this.emit('missingKey', l, namespace, k, res);\n };\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(language => {\n const suffixes = this.pluralResolver.getSuffixes(language, opt);\n if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {\n suffixes.push(`${this.options.pluralSeparator}zero`);\n }\n suffixes.forEach(suffix => {\n send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n res = this.extendTranslation(res, keys, opt, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {\n res = `${namespace}${nsSeparator}${key}`;\n }\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);\n }\n }\n if (returnDetails) {\n resolved.res = res;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return res;\n }\n extendTranslation(res, key, opt, resolved, lastKey) {\n if (this.i18nFormat?.parse) {\n res = this.i18nFormat.parse(res, {\n ...this.options.interpolation.defaultVariables,\n ...opt\n }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved\n });\n } else if (!opt.skipInterpolation) {\n if (opt.interpolation) this.interpolator.init({\n ...opt,\n ...{\n interpolation: {\n ...this.options.interpolation,\n ...opt.interpolation\n }\n }\n });\n const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n let nestBef;\n if (skipOnVariables) {\n const nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;\n if (this.options.interpolation.defaultVariables) data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);\n if (skipOnVariables) {\n const na = res.match(this.interpolator.nestingRegexp);\n const nestAft = na && na.length;\n if (nestBef < nestAft) opt.nest = false;\n }\n if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;\n if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {\n if (lastKey?.[0] === args[0] && !opt.context) {\n this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n return null;\n }\n return this.translate(...args, key);\n }, opt);\n if (opt.interpolation) this.interpolator.reset();\n }\n const postProcess = opt.postProcess || this.options.postProcess;\n const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;\n if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n i18nResolved: {\n ...resolved,\n usedParams: this.getUsedParamsDetails(opt)\n },\n ...opt\n } : opt, this);\n }\n return res;\n }\n resolve(keys, opt = {}) {\n let found;\n let usedKey;\n let exactUsedKey;\n let usedLng;\n let usedNS;\n if (isString(keys)) keys = [keys];\n if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : k);\n keys.forEach(k => {\n if (this.isValidLookup(found)) return;\n const extracted = this.extractFromKey(k, opt);\n const key = extracted.key;\n usedKey = key;\n let namespaces = extracted.namespaces;\n if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';\n const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);\n namespaces.forEach(ns => {\n if (this.isValidLookup(found)) return;\n usedNS = ns;\n if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {\n this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n codes.forEach(code => {\n if (this.isValidLookup(found)) return;\n usedLng = code;\n const finalKeys = [key];\n if (this.i18nFormat?.addLookupKeys) {\n this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);\n } else {\n let pluralSuffix;\n if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);\n const zeroSuffix = `${this.options.pluralSeparator}zero`;\n const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(key + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(key + zeroSuffix);\n }\n }\n if (needsContextHandling) {\n const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;\n finalKeys.push(contextKey);\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(contextKey + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(contextKey + zeroSuffix);\n }\n }\n }\n }\n let possibleKey;\n while (possibleKey = finalKeys.pop()) {\n if (!this.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = this.getResource(code, ns, possibleKey, opt);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey,\n exactUsedKey,\n usedLng,\n usedNS\n };\n }\n isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n getResource(code, ns, key, options = {}) {\n if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n getUsedParamsDetails(options = {}) {\n const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];\n const useOptionsReplaceForData = options.replace && !isString(options.replace);\n let data = useOptionsReplaceForData ? options.replace : options;\n if (useOptionsReplaceForData && typeof options.count !== 'undefined') {\n data = {\n ...data,\n count: options.count\n };\n }\n if (this.options.interpolation.defaultVariables) {\n data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n }\n if (!useOptionsReplaceForData) {\n data = {\n ...data\n };\n for (const key of optionsKeys) {\n delete data[key];\n }\n }\n return data;\n }\n static hasDefaultValue(options) {\n const prefix = 'defaultValue';\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {\n return true;\n }\n }\n return false;\n }\n}\n\nclass LanguageUtil {\n constructor(options) {\n this.options = options;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n this.resolveHierarchyCache = {};\n }\n clearCache() {\n this.resolveHierarchyCache = {};\n }\n getScriptPartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || !code.includes('-')) return null;\n const p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n getLanguagePartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || !code.includes('-')) return code;\n const p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n formatLanguageCode(code) {\n if (isString(code) && code.includes('-')) {\n let formattedCode;\n try {\n formattedCode = Intl.getCanonicalLocales(code)[0];\n } catch (e) {}\n if (formattedCode && this.options.lowerCaseLng) {\n formattedCode = formattedCode.toLowerCase();\n }\n if (formattedCode) return formattedCode;\n if (this.options.lowerCaseLng) {\n return code.toLowerCase();\n }\n return code;\n }\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);\n }\n getBestMatchFromCodes(codes) {\n if (!codes) return null;\n let found;\n codes.forEach(code => {\n if (found) return;\n const cleanedLng = this.formatLanguageCode(code);\n if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n if (!found && this.options.supportedLngs) {\n codes.forEach(code => {\n if (found) return;\n const lngScOnly = this.getScriptPartFromCode(code);\n if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;\n const lngOnly = this.getLanguagePartFromCode(code);\n if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = this.options.supportedLngs.find(supportedLng => {\n if (supportedLng === lngOnly) return true;\n if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;\n if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;\n if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;\n return false;\n });\n });\n }\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (isString(fallbacks)) fallbacks = [fallbacks];\n if (Array.isArray(fallbacks)) return fallbacks;\n if (!code) return fallbacks.default || [];\n let found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks.default;\n return found || [];\n }\n toResolveHierarchy(code, fallbackCode) {\n const fallbackLng = this.options.fallbackLng;\n const fallbackLngKey = Array.isArray(fallbackLng) ? fallbackLng.join('|') : fallbackLng;\n if (fallbackLngKey !== this._cachedFallbackLng) {\n this.resolveHierarchyCache = {};\n this._cachedFallbackLng = fallbackLngKey;\n }\n const hasCacheableFallback = fallbackCode === undefined || fallbackCode === false || isString(fallbackCode);\n const usesUncacheableOptionsFallback = fallbackCode === undefined && typeof this.options.fallbackLng === 'function';\n const cacheable = isString(code) && hasCacheableFallback && !usesUncacheableOptionsFallback;\n let cacheKey = null;\n if (cacheable) {\n let fallbackCacheKey;\n if (fallbackCode === undefined) fallbackCacheKey = 'undefined';else if (fallbackCode === false) fallbackCacheKey = 'boolean:false';else fallbackCacheKey = `string:${fallbackCode}`;\n cacheKey = `${code.length}:${code}|${fallbackCacheKey}`;\n }\n if (cacheKey !== null) {\n const cached = this.resolveHierarchyCache[cacheKey];\n if (cached !== undefined) return cached.slice();\n }\n const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);\n const codes = [];\n const addCode = c => {\n if (!c) return;\n if (this.isSupportedCode(c)) {\n codes.push(c);\n } else {\n this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n }\n };\n if (isString(code) && (code.includes('-') || code.includes('_'))) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (isString(code)) {\n addCode(this.formatLanguageCode(code));\n }\n fallbackCodes.forEach(fc => {\n if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));\n });\n if (cacheKey !== null) {\n this.resolveHierarchyCache[cacheKey] = codes;\n return codes.slice();\n }\n return codes;\n }\n}\n\nconst suffixesOrder = {\n zero: 0,\n one: 1,\n two: 2,\n few: 3,\n many: 4,\n other: 5\n};\nconst dummyRule = {\n select: count => count === 1 ? 'one' : 'other',\n resolvedOptions: () => ({\n pluralCategories: ['one', 'other']\n })\n};\nclass PluralResolver {\n constructor(languageUtils, options = {}) {\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.pluralRulesCache = {};\n }\n clearCache() {\n this.pluralRulesCache = {};\n }\n getRule(code, options = {}) {\n const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);\n const type = options.ordinal ? 'ordinal' : 'cardinal';\n const cacheKey = JSON.stringify({\n cleanedCode,\n type\n });\n if (cacheKey in this.pluralRulesCache) {\n return this.pluralRulesCache[cacheKey];\n }\n let rule;\n try {\n rule = new Intl.PluralRules(cleanedCode, {\n type\n });\n } catch (err) {\n if (typeof Intl === 'undefined') {\n this.logger.error('No Intl support, please use an Intl polyfill!');\n return dummyRule;\n }\n if (!code.match(/-|_/)) return dummyRule;\n const lngPart = this.languageUtils.getLanguagePartFromCode(code);\n rule = this.getRule(lngPart, options);\n }\n this.pluralRulesCache[cacheKey] = rule;\n return rule;\n }\n needsPlural(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n return rule?.resolvedOptions().pluralCategories.length > 1;\n }\n getPluralFormsOfKey(code, key, options = {}) {\n return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n }\n getSuffixes(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n if (!rule) return [];\n return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n }\n getSuffix(code, count, options = {}) {\n const rule = this.getRule(code, options);\n if (rule) {\n return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n }\n this.logger.warn(`no plural rule found for: ${code}`);\n return this.getSuffix('dev', count, options);\n }\n}\n\nconst deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {\n let path = getPathWithDefaults(data, defaultData, key);\n if (!path && ignoreJSONStructure && isString(key)) {\n path = deepFind(data, key, keySeparator);\n if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n }\n return path;\n};\nconst regexSafe = val => val.replace(/\\$/g, '$$$$');\nclass Interpolator {\n constructor(options = {}) {\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n this.format = options?.interpolation?.format || (value => value);\n this.init(options);\n }\n init(options = {}) {\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n const {\n escape: escape$1,\n escapeValue,\n useRawValueToEscape,\n prefix,\n prefixEscaped,\n suffix,\n suffixEscaped,\n formatSeparator,\n unescapeSuffix,\n unescapePrefix,\n nestingPrefix,\n nestingPrefixEscaped,\n nestingSuffix,\n nestingSuffixEscaped,\n nestingOptionsSeparator,\n maxReplaces,\n alwaysFormat\n } = options.interpolation;\n this.escape = escape$1 !== undefined ? escape$1 : escape;\n this.escapeValue = escapeValue !== undefined ? escapeValue : true;\n this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;\n this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';\n this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';\n this.formatSeparator = formatSeparator || ',';\n this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix ? regexEscape(unescapePrefix) : '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix ? regexEscape(unescapeSuffix) : '';\n this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = nestingOptionsSeparator || ',';\n this.maxReplaces = maxReplaces || 1000;\n this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;\n this.resetRegExp();\n }\n reset() {\n if (this.options) this.init(this.options);\n }\n resetRegExp() {\n const getOrResetRegExp = (existingRegExp, pattern) => {\n if (existingRegExp?.source === pattern) {\n existingRegExp.lastIndex = 0;\n return existingRegExp;\n }\n return new RegExp(pattern, 'g');\n };\n this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);\n this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);\n this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\\\))*?)${this.nestingSuffix}`);\n }\n interpolate(str, data, lng, options) {\n let match;\n let value;\n let replaces;\n const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n const handleFormat = key => {\n if (!key.includes(this.formatSeparator)) {\n const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n return this.alwaysFormat ? this.format(path, undefined, lng, {\n ...options,\n ...data,\n interpolationkey: key\n }) : path;\n }\n const p = key.split(this.formatSeparator);\n const k = p.shift().trim();\n const f = p.join(this.formatSeparator).trim();\n return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n ...options,\n ...data,\n interpolationkey: k\n });\n };\n this.resetRegExp();\n if (!this.escapeValue && typeof str === 'string' && /\\$t\\([^)]*\\{[^}]*\\{\\{/.test(str)) {\n this.logger.warn('nesting options string contains interpolated variables with escapeValue: false — ' + 'if any of those values are attacker-controlled they can inject additional ' + 'nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing ' + 'it to t(), or keep escapeValue: true.');\n }\n const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;\n const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n const todos = [{\n regex: this.regexpUnescape,\n safeValue: val => val\n }, {\n regex: this.regexp,\n safeValue: val => this.escapeValue ? this.escape(val) : val\n }];\n todos.forEach(todo => {\n replaces = 0;\n while (match = todo.regex.exec(str)) {\n const matchedVar = match[1].trim();\n value = handleFormat(matchedVar);\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n const temp = missingInterpolationHandler(str, match, options);\n value = isString(temp) ? temp : '';\n } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n value = '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n value = '';\n }\n } else if (!isString(value) && !this.useRawValueToEscape) {\n value = makeString(value);\n }\n const safeValue = todo.safeValue(value);\n str = str.replace(match[0], regexSafe(safeValue));\n if (skipOnVariables) {\n todo.regex.lastIndex += safeValue.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n nest(str, fc, options = {}) {\n let match;\n let value;\n let clonedOptions;\n const handleHasOptions = (key, inheritedOptions) => {\n const sep = this.nestingOptionsSeparator;\n if (!key.includes(sep)) return key;\n const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));\n let optionsString = `{${c[1]}`;\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n const matchedSingleQuotes = optionsString.match(/'/g);\n const matchedDoubleQuotes = optionsString.match(/\"/g);\n if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {\n optionsString = optionsString.replace(/'/g, '\"');\n }\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = {\n ...inheritedOptions,\n ...clonedOptions\n };\n } catch (e) {\n this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n return `${key}${sep}${optionsString}`;\n }\n if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;\n return key;\n };\n while (match = this.nestingRegexp.exec(str)) {\n let formatters = [];\n clonedOptions = {\n ...options\n };\n clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n const keyEndIndex = /{.*}/s.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);\n if (keyEndIndex !== -1) {\n formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);\n match[1] = match[1].slice(0, keyEndIndex);\n }\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && !isString(value)) return value;\n if (!isString(value)) value = makeString(value);\n if (!value) {\n this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n value = '';\n }\n if (formatters.length) {\n value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n ...options,\n interpolationkey: match[1].trim()\n }), value.trim());\n }\n str = str.replace(match[0], regexSafe(makeString(value)));\n this.regexp.lastIndex = 0;\n }\n return str;\n }\n}\n\nconst parseFormatStr = formatStr => {\n let formatName = formatStr.toLowerCase().trim();\n const formatOptions = {};\n if (formatStr.includes('(')) {\n const p = formatStr.split('(');\n formatName = p[0].toLowerCase().trim();\n const optStr = p[1].slice(0, -1);\n if (formatName === 'currency' && !optStr.includes(':')) {\n if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n } else if (formatName === 'relativetime' && !optStr.includes(':')) {\n if (!formatOptions.range) formatOptions.range = optStr.trim();\n } else {\n const opts = optStr.split(';');\n opts.forEach(opt => {\n if (opt) {\n const [key, ...rest] = opt.split(':');\n const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n const trimmedKey = key.trim();\n if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;\n if (val === 'false') formatOptions[trimmedKey] = false;\n if (val === 'true') formatOptions[trimmedKey] = true;\n if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);\n }\n });\n }\n }\n return {\n formatName,\n formatOptions\n };\n};\nconst createCachedFormatter = fn => {\n const cache = {};\n return (v, l, o) => {\n let optForCache = o;\n if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {\n optForCache = {\n ...optForCache,\n [o.interpolationkey]: undefined\n };\n }\n const key = l + JSON.stringify(optForCache);\n let frm = cache[key];\n if (!frm) {\n frm = fn(getCleanedCode(l), o);\n cache[key] = frm;\n }\n return frm(v);\n };\n};\nconst createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);\nclass Formatter {\n constructor(options = {}) {\n this.logger = baseLogger.create('formatter');\n this.options = options;\n this.init(options);\n }\n init(services, options = {\n interpolation: {}\n }) {\n this.formatSeparator = options.interpolation.formatSeparator || ',';\n const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;\n this.formats = {\n number: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n currency: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt,\n style: 'currency'\n });\n return val => formatter.format(val);\n }),\n datetime: cf((lng, opt) => {\n const formatter = new Intl.DateTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n relativetime: cf((lng, opt) => {\n const formatter = new Intl.RelativeTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val, opt.range || 'day');\n }),\n list: cf((lng, opt) => {\n const formatter = new Intl.ListFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n })\n };\n }\n add(name, fc) {\n this.formats[name.toLowerCase().trim()] = fc;\n }\n addCached(name, fc) {\n this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n }\n format(value, format, lng, options = {}) {\n if (!format) return value;\n if (value == null) return value;\n const rawFormats = format.split(this.formatSeparator);\n const formats = [];\n for (let i = 0; i < rawFormats.length; i++) {\n let f = rawFormats[i];\n while (f.indexOf('(') > -1 && !f.includes(')') && i + 1 < rawFormats.length) {\n f = `${f}${this.formatSeparator}${rawFormats[++i]}`;\n }\n formats.push(f);\n }\n const result = formats.reduce((mem, f) => {\n const {\n formatName,\n formatOptions\n } = parseFormatStr(f);\n if (this.formats[formatName]) {\n let formatted = mem;\n try {\n const valOptions = options?.formatParams?.[options.interpolationkey] || {};\n const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n formatted = this.formats[formatName](mem, l, {\n ...formatOptions,\n ...options,\n ...valOptions\n });\n } catch (error) {\n this.logger.warn(error);\n }\n return formatted;\n } else {\n this.logger.warn(`there was no format function for ${formatName}`);\n }\n return mem;\n }, value);\n return result;\n }\n}\n\nconst removePending = (q, name) => {\n if (q.pending[name] !== undefined) {\n delete q.pending[name];\n q.pendingCount--;\n }\n};\nclass Connector extends EventEmitter {\n constructor(backend, store, services, options = {}) {\n super();\n this.backend = backend;\n this.store = store;\n this.services = services;\n this.languageUtils = services.languageUtils;\n this.options = options;\n this.logger = baseLogger.create('backendConnector');\n this.waitingReads = [];\n this.maxParallelReads = options.maxParallelReads || 10;\n this.readingCalls = 0;\n this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n this.state = {};\n this.queue = [];\n this.backend?.init?.(services, options.backend, options);\n }\n queueLoad(languages, namespaces, options, callback) {\n const toLoad = {};\n const pending = {};\n const toLoadLanguages = {};\n const toLoadNamespaces = {};\n languages.forEach(lng => {\n let hasAllNamespaces = true;\n namespaces.forEach(ns => {\n const name = `${lng}|${ns}`;\n if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n this.state[name] = 2;\n } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n if (pending[name] === undefined) pending[name] = true;\n } else {\n this.state[name] = 1;\n hasAllNamespaces = false;\n if (pending[name] === undefined) pending[name] = true;\n if (toLoad[name] === undefined) toLoad[name] = true;\n if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n }\n });\n if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n });\n if (Object.keys(toLoad).length || Object.keys(pending).length) {\n this.queue.push({\n pending,\n pendingCount: Object.keys(pending).length,\n loaded: {},\n errors: [],\n callback\n });\n }\n return {\n toLoad: Object.keys(toLoad),\n pending: Object.keys(pending),\n toLoadLanguages: Object.keys(toLoadLanguages),\n toLoadNamespaces: Object.keys(toLoadNamespaces)\n };\n }\n loaded(name, err, data) {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n if (!err && data) {\n this.store.addResourceBundle(lng, ns, data, undefined, undefined, {\n skipCopy: true\n });\n }\n this.state[name] = err ? -1 : 2;\n if (err && data) this.state[name] = 0;\n const loaded = {};\n this.queue.forEach(q => {\n pushPath(q.loaded, [lng], ns);\n removePending(q, name);\n if (err) q.errors.push(err);\n if (q.pendingCount === 0 && !q.done) {\n Object.keys(q.loaded).forEach(l => {\n if (!loaded[l]) loaded[l] = {};\n const loadedKeys = q.loaded[l];\n if (loadedKeys.length) {\n loadedKeys.forEach(n => {\n if (loaded[l][n] === undefined) loaded[l][n] = true;\n });\n }\n });\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(q => !q.done);\n }\n read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {\n if (!lng.length) return callback(null, {});\n if (this.readingCalls >= this.maxParallelReads) {\n this.waitingReads.push({\n lng,\n ns,\n fcName,\n tried,\n wait,\n callback\n });\n return;\n }\n this.readingCalls++;\n const resolver = (err, data) => {\n this.readingCalls--;\n if (this.waitingReads.length > 0) {\n const next = this.waitingReads.shift();\n this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n }\n if (err && data && tried < this.maxRetries) {\n setTimeout(() => {\n this.read(lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n };\n const fc = this.backend[fcName].bind(this.backend);\n if (fc.length === 2) {\n try {\n const r = fc(lng, ns);\n if (r && typeof r.then === 'function') {\n r.then(data => resolver(null, data)).catch(resolver);\n } else {\n resolver(null, r);\n }\n } catch (err) {\n resolver(err);\n }\n return;\n }\n return fc(lng, ns, resolver);\n }\n prepareLoading(languages, namespaces, options = {}, callback) {\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);\n if (isString(namespaces)) namespaces = [namespaces];\n const toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n toLoad.toLoad.forEach(name => {\n this.loadOne(name);\n });\n }\n load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n loadOne(name, prefix = '') {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n this.loaded(name, err, data);\n });\n }\n saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {\n if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {\n this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n if (key === undefined || key === null || key === '') return;\n if (this.backend?.create) {\n const opts = {\n ...options,\n isUpdate\n };\n const fc = this.backend.create.bind(this.backend);\n if (fc.length < 6) {\n try {\n let r;\n if (fc.length === 5) {\n r = fc(languages, namespace, key, fallbackValue, opts);\n } else {\n r = fc(languages, namespace, key, fallbackValue);\n }\n if (r && typeof r.then === 'function') {\n r.then(data => clb(null, data)).catch(clb);\n } else {\n clb(null, r);\n }\n } catch (err) {\n clb(err);\n }\n } else {\n fc(languages, namespace, key, fallbackValue, clb, opts);\n }\n }\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n}\n\nconst get = () => ({\n debug: false,\n initAsync: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n enableSelector: false,\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: false,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: args => {\n let ret = {};\n if (typeof args[1] === 'object') ret = args[1];\n if (isString(args[1])) ret.defaultValue = args[1];\n if (isString(args[2])) ret.tDescription = args[2];\n if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n const options = args[3] || args[2];\n Object.keys(options).forEach(key => {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: true\n },\n cacheInBuiltFormats: true\n});\nconst transformOptions = options => {\n if (isString(options.ns)) options.ns = [options.ns];\n if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];\n if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];\n if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n return options;\n};\n\nconst noop = () => {};\nconst bindMemberFunctions = inst => {\n const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n mems.forEach(mem => {\n if (typeof inst[mem] === 'function') {\n inst[mem] = inst[mem].bind(inst);\n }\n });\n};\nclass I18n extends EventEmitter {\n constructor(options = {}, callback) {\n super();\n this.options = transformOptions(options);\n this.services = {};\n this.logger = baseLogger;\n this.modules = {\n external: []\n };\n bindMemberFunctions(this);\n if (callback && !this.isInitialized && !options.isClone) {\n if (!this.options.initAsync) {\n this.init(options, callback);\n return this;\n }\n setTimeout(() => {\n this.init(options, callback);\n }, 0);\n }\n }\n init(options = {}, callback) {\n this.isInitializing = true;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (options.defaultNS == null && options.ns) {\n if (isString(options.ns)) {\n options.defaultNS = options.ns;\n } else if (!options.ns.includes('translation')) {\n options.defaultNS = options.ns[0];\n }\n }\n const defOpts = get();\n this.options = {\n ...defOpts,\n ...this.options,\n ...transformOptions(options)\n };\n this.options.interpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation\n };\n if (options.keySeparator !== undefined) {\n this.options.userDefinedKeySeparator = options.keySeparator;\n }\n if (options.nsSeparator !== undefined) {\n this.options.userDefinedNsSeparator = options.nsSeparator;\n }\n if (typeof this.options.overloadTranslationOptionHandler !== 'function') {\n this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;\n }\n const createClassOnDemand = ClassOrObject => {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n };\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n let formatter;\n if (this.modules.formatter) {\n formatter = this.modules.formatter;\n } else {\n formatter = Formatter;\n }\n const lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n const s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator\n });\n if (formatter) {\n s.formatter = createClassOnDemand(formatter);\n if (s.formatter.init) s.formatter.init(s, this.options);\n this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n }\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n }\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n this.modules.external.forEach(m => {\n if (m.init) m.init(this);\n });\n }\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(fcName => {\n this[fcName] = (...args) => this.store[fcName](...args);\n });\n const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(fcName => {\n this[fcName] = (...args) => {\n this.store[fcName](...args);\n return this;\n };\n });\n const deferred = defer();\n const load = () => {\n const finish = (err, t) => {\n this.isInitializing = false;\n if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n this.isInitialized = true;\n if (!this.options.isClone) this.logger.log('initialized', this.options);\n this.emit('initialized', this.options);\n deferred.resolve(t);\n callback(err, t);\n };\n if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return finish(null, this.t.bind(this));\n this.changeLanguage(this.options.lng, finish);\n };\n if (this.options.resources || !this.options.initAsync) {\n load();\n } else {\n setTimeout(load, 0);\n }\n return deferred;\n }\n loadResources(language, callback = noop) {\n let usedCallback = callback;\n const usedLng = isString(language) ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n const toLoad = [];\n const append = lng => {\n if (!lng) return;\n if (lng === 'cimode') return;\n const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(l => {\n if (l === 'cimode') return;\n if (!toLoad.includes(l)) toLoad.push(l);\n });\n };\n if (!usedLng) {\n const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(l => append(l));\n } else {\n append(usedLng);\n }\n this.options.preload?.forEach?.(l => append(l));\n this.services.backendConnector.load(toLoad, this.options.ns, e => {\n if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n usedCallback(e);\n });\n } else {\n usedCallback(null);\n }\n }\n reloadResources(lngs, ns, callback) {\n const deferred = defer();\n if (typeof lngs === 'function') {\n callback = lngs;\n lngs = undefined;\n }\n if (typeof ns === 'function') {\n callback = ns;\n ns = undefined;\n }\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, err => {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n if (module.type === 'formatter') {\n this.modules.formatter = module;\n }\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n return this;\n }\n setResolvedLanguage(l) {\n if (!l || !this.languages) return;\n if (['cimode', 'dev'].includes(l)) return;\n for (let li = 0; li < this.languages.length; li++) {\n const lngInLngs = this.languages[li];\n if (['cimode', 'dev'].includes(lngInLngs)) continue;\n if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n this.resolvedLanguage = lngInLngs;\n break;\n }\n }\n if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {\n this.resolvedLanguage = l;\n this.languages.unshift(l);\n }\n }\n changeLanguage(lng, callback) {\n this.isLanguageChangingTo = lng;\n const deferred = defer();\n this.emit('languageChanging', lng);\n const setLngProps = l => {\n this.language = l;\n this.languages = this.services.languageUtils.toResolveHierarchy(l);\n this.resolvedLanguage = undefined;\n this.setResolvedLanguage(l);\n };\n const done = (err, l) => {\n if (l) {\n if (this.isLanguageChangingTo === lng) {\n setLngProps(l);\n this.translator.changeLanguage(l);\n this.isLanguageChangingTo = undefined;\n this.emit('languageChanged', l);\n this.logger.log('languageChanged', l);\n }\n } else {\n this.isLanguageChangingTo = undefined;\n }\n deferred.resolve((...args) => this.t(...args));\n if (callback) callback(err, (...args) => this.t(...args));\n };\n const setLng = lngs => {\n if (!lng && !lngs && this.services.languageDetector) lngs = [];\n const fl = isString(lngs) ? lngs : lngs && lngs[0];\n const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);\n if (l) {\n if (!this.language) {\n setLngProps(l);\n }\n if (!this.translator.language) this.translator.changeLanguage(l);\n this.services.languageDetector?.cacheUserLanguage?.(l);\n }\n this.loadResources(l, err => {\n done(err, l);\n });\n };\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n if (this.services.languageDetector.detect.length === 0) {\n this.services.languageDetector.detect().then(setLng);\n } else {\n this.services.languageDetector.detect(setLng);\n }\n } else {\n setLng(lng);\n }\n return deferred;\n }\n getFixedT(lng, ns, keyPrefix, fixedOpts) {\n const scopeNs = fixedOpts?.scopeNs;\n const fixedT = (key, opts, ...rest) => {\n let o;\n if (typeof opts !== 'object') {\n o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n o = {\n ...opts\n };\n }\n o.lng = o.lng || fixedT.lng;\n o.lngs = o.lngs || fixedT.lngs;\n const explicitCallNs = o.ns !== undefined && o.ns !== null;\n o.ns = o.ns || fixedT.ns;\n if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;\n const selectorOpts = {\n ...this.options,\n ...o\n };\n if (Array.isArray(scopeNs) && !explicitCallNs) selectorOpts.ns = scopeNs;\n if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);\n const keySeparator = this.options.keySeparator || '.';\n let resultKey;\n if (o.keyPrefix && Array.isArray(key)) {\n resultKey = key.map(k => {\n if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);\n return `${o.keyPrefix}${keySeparator}${k}`;\n });\n } else {\n if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);\n resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;\n }\n return this.t(resultKey, o);\n };\n if (isString(lng)) {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n t(...args) {\n return this.translator?.translate(...args);\n }\n exists(...args) {\n return this.translator?.exists(...args);\n }\n setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n hasLoadedNamespace(ns, options = {}) {\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n const lng = options.lng || this.resolvedLanguage || this.languages[0];\n const fallbackLng = this.options ? this.options.fallbackLng : false;\n const lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n const loadNotPending = (l, n) => {\n const loadState = this.services.backendConnector.state[`${l}|${n}`];\n return loadState === -1 || loadState === 0 || loadState === 2;\n };\n if (options.precheck) {\n const preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n loadNamespaces(ns, callback) {\n const deferred = defer();\n if (!this.options.ns) {\n if (callback) callback();\n return Promise.resolve();\n }\n if (isString(ns)) ns = [ns];\n ns.forEach(n => {\n if (!this.options.ns.includes(n)) this.options.ns.push(n);\n });\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n loadLanguages(lngs, callback) {\n const deferred = defer();\n if (isString(lngs)) lngs = [lngs];\n const preloaded = this.options.preload || [];\n const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n dir(lng) {\n if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);\n if (!lng) return 'rtl';\n try {\n const l = new Intl.Locale(lng);\n if (l && l.getTextInfo) {\n const ti = l.getTextInfo();\n if (ti && ti.direction) return ti.direction;\n }\n } catch (e) {}\n const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n const languageUtils = this.services?.languageUtils || new LanguageUtil(get());\n if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';\n return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n }\n static createInstance(options = {}, callback) {\n const instance = new I18n(options, callback);\n instance.createInstance = I18n.createInstance;\n return instance;\n }\n cloneInstance(options = {}, callback = noop) {\n const forkResourceStore = options.forkResourceStore;\n if (forkResourceStore) delete options.forkResourceStore;\n const mergedOptions = {\n ...this.options,\n ...options,\n ...{\n isClone: true\n }\n };\n const clone = new I18n(mergedOptions);\n if (options.debug !== undefined || options.prefix !== undefined) {\n clone.logger = clone.logger.clone(options);\n }\n const membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(m => {\n clone[m] = this[m];\n });\n clone.services = {\n ...this.services\n };\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n if (forkResourceStore) {\n const clonedData = Object.keys(this.store.data).reduce((prev, l) => {\n prev[l] = {\n ...this.store.data[l]\n };\n prev[l] = Object.keys(prev[l]).reduce((acc, n) => {\n acc[n] = {\n ...prev[l][n]\n };\n return acc;\n }, prev[l]);\n return prev;\n }, {});\n clone.store = new ResourceStore(clonedData, mergedOptions);\n clone.services.resourceStore = clone.store;\n }\n if (options.interpolation) {\n const defOpts = get();\n const mergedInterpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation,\n ...options.interpolation\n };\n const mergedForInterpolator = {\n ...mergedOptions,\n interpolation: mergedInterpolation\n };\n clone.services.interpolator = new Interpolator(mergedForInterpolator);\n }\n clone.translator = new Translator(clone.services, mergedOptions);\n clone.translator.on('*', (event, ...args) => {\n clone.emit(event, ...args);\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = mergedOptions;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages,\n resolvedLanguage: this.resolvedLanguage\n };\n }\n}\nconst instance = I18n.createInstance();\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, keysFromSelector as keyFromSelector, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n","import {\n Box,\n Typography,\n} from '@mui/material';\nimport { t } from 'i18next';\n\nexport type ErrorPageCommonProps = {\n error: unknown;\n};\n\nexport const ErrorPageCommon = ({ error }: ErrorPageCommonProps) => {\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n width: '100%',\n }}\n >\n <Box sx={{ padding: 1 }}>\n <Typography\n variant={'h1'}\n >\n {t`Something went wrong`}\n </Typography>\n </Box>\n <Box sx={{ padding: 1 }}>\n <Typography\n variant={'body2'}\n >\n {error instanceof Error ? error.message : t`An unexpected error occurred.`}\n </Typography>\n </Box>\n <Box sx={{ padding: 1 }}>\n <Typography variant={'h6'}>\n {t`Details for our technicians`}\n </Typography>\n <Box\n component={'pre'}\n sx={{\n fontSize: '0.8rem',\n }}\n >\n {(error as Error)?.stack}\n </Box>\n </Box>\n </Box>\n );\n};\n","import { createContext } from 'react';\n\nexport type PageCommonContextData = {\n readonly isDrawerOpen: boolean;\n readonly isNoInteraction: boolean;\n readonly setIsDrawerOpen: (open: boolean) => void;\n readonly setIsNoInteraction: (open: boolean) => void;\n};\n\nexport const PageCommonContext = createContext<PageCommonContextData>({\n isDrawerOpen: false,\n isNoInteraction: false,\n setIsDrawerOpen: () => null,\n setIsNoInteraction: () => null,\n});\n","import {\n Box,\n useTheme,\n} from '@mui/material';\nimport {\n use,\n useEffect,\n} from 'react';\nimport type { ReactNode } from 'react';\n\nimport { DRAWER_WIDTH } from '../../constants/page';\n\nimport { PageCommonContext } from './PageCommonContext';\n\nexport type PageCommonProps = {\n readonly children: ReactNode;\n readonly drawerComponent?: ReactNode;\n readonly headerComponent?: ReactNode;\n readonly isNoInteraction?: boolean;\n};\n\n\nexport const PageCommon = ({ children, drawerComponent, headerComponent, isNoInteraction }: PageCommonProps) => {\n const theme = useTheme();\n const { isDrawerOpen, setIsNoInteraction } = use(PageCommonContext);\n\n useEffect(() => {\n setIsNoInteraction(!!isNoInteraction);\n }, [isNoInteraction, setIsNoInteraction]);\n\n return (\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n height: '100vh',\n overflow: 'hidden',\n position: 'relative',\n width: '100vw',\n }}\n >\n {headerComponent}\n {/* Main Body */}\n <Box\n sx={{\n display: 'flex',\n flex: 1,\n height: 'calc(100vh - 56px)',\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n }}\n >\n {drawerComponent}\n <Box\n component={'main'}\n sx={{\n flexGrow: 1,\n height: '100%',\n overflow: 'hidden',\n position: 'relative',\n transition: () =>\n theme.transitions.create(['margin', 'width'], {\n duration: theme.transitions.duration.leavingScreen,\n easing: theme.transitions.easing.sharp,\n }),\n width: isDrawerOpen ? `calc(100% - ${DRAWER_WIDTH}px)` : '100%',\n }}\n >\n {children}\n </Box>\n\n </Box>\n </Box>\n );\n};\n","import {\n useMemo,\n useState,\n} from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport type { PageCommonContextData } from './PageCommonContext';\nimport { PageCommonContext } from './PageCommonContext';\n\nexport type PageCommonContextProviderProps = PropsWithChildren;\n\nexport const PageCommonContextProvider = ({ children }: PageCommonContextProviderProps) => {\n const [isDrawerOpen, setIsDrawerOpen] = useState(false);\n const [isNoInteraction, setIsNoInteraction] = useState(false);\n\n const contextValue = useMemo<PageCommonContextData>(() => {\n return {\n isDrawerOpen,\n isNoInteraction,\n setIsDrawerOpen,\n setIsNoInteraction,\n };\n }, [isDrawerOpen, isNoInteraction]);\n\n return (\n <PageCommonContext value={contextValue}>\n { children }\n </PageCommonContext>\n );\n};\n","import { Drawer } from '@mui/material';\nimport { use } from 'react';\nimport type { ReactNode } from 'react';\n\nimport { DRAWER_WIDTH } from '../../constants/page';\n\nimport { PageCommonContext } from './PageCommonContext';\n\nexport type PageCommonDrawerProps = {\n readonly children: ReactNode;\n};\n\nexport const PageCommonDrawer = ({ children }: PageCommonDrawerProps) => {\n const { isDrawerOpen } = use(PageCommonContext);\n\n return (\n <Drawer\n anchor={'left'}\n open={isDrawerOpen}\n sx={{\n '& .MuiDrawer-paper': {\n height: 'calc(100% - 56px)',\n overflowY: 'auto',\n top: '56px',\n width: DRAWER_WIDTH,\n },\n flexShrink: 0,\n width: isDrawerOpen ? DRAWER_WIDTH : 0,\n }}\n variant={'persistent'}\n >\n {children}\n </Drawer>\n );\n};\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z\"\n}), 'Menu');","import type { ReactNode } from 'react';\nimport {\n use,\n useCallback,\n} from 'react';\nimport {\n AppBar,\n Box,\n IconButton,\n Toolbar,\n Typography,\n} from '@mui/material';\nimport MenuIcon from '@mui/icons-material/Menu';\n\nimport { PageCommonContext } from './PageCommonContext';\n\nexport type PageCommonHeaderProps = {\n readonly centerComponent?: ReactNode;\n readonly icon?: ReactNode;\n readonly rightComponent?: ReactNode;\n readonly title: string;\n};\n\nexport const PageCommonHeader = ({ centerComponent, icon, rightComponent, title }: PageCommonHeaderProps) => {\n const { isDrawerOpen, isNoInteraction, setIsDrawerOpen } = use(PageCommonContext);\n\n const onToggleDrawerButtonClick = useCallback(() => {\n setIsDrawerOpen(!isDrawerOpen);\n }, [isDrawerOpen, setIsDrawerOpen]);\n\n return (\n <AppBar\n elevation={1}\n position={'static'}\n sx={{\n backgroundColor: 'primary.main',\n color: '#FFFFFF',\n height: 56,\n justifyContent: 'center',\n zIndex: (theme) => theme.zIndex.drawer + 1,\n }}\n >\n <Toolbar\n sx={{ display: 'flex', justifyContent: 'space-between', px: 2 }}\n variant={'dense'}\n >\n {/* Left: Menu toggle and App Branding */}\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1.5 }}>\n {!isNoInteraction && (\n <IconButton\n aria-label={'open drawer'}\n color={'inherit'}\n edge={'start'}\n onClick={onToggleDrawerButtonClick}\n size={'small'}\n >\n <MenuIcon />\n </IconButton>\n )}\n {icon && (\n <>\n {icon}\n </>\n )}\n <Typography\n component={'div'}\n noWrap\n sx={{ color: 'inherit', fontSize: '1.05rem', fontWeight: 700, letterSpacing: '-0.01em' }}\n variant={'h6'}\n >\n {title}\n </Typography>\n <Typography\n sx={{\n backgroundColor: 'rgba(255, 255, 255, 0.15)',\n borderRadius: 1,\n display: { sm: 'inline-block', xs: 'none' },\n fontSize: '0.7rem',\n fontWeight: 600,\n px: 1,\n py: 0.25,\n }}\n variant={'caption'}\n >\n {'Loculus Tool'}\n </Typography>\n </Box>\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {centerComponent}\n </Box>\n {!isNoInteraction && (\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {rightComponent}\n </Box>\n )}\n </Toolbar>\n </AppBar>\n );\n};\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8\"\n}), 'Undo');","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z\"\n}), 'Redo');"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,18,20,21],"mappings":";;;;AAAA,SAAwB,EAAgB,GAAO,GAAU,GAAe,GAAU,GAAc;CAC9F,IAAA,QAAA,IAAA,aAA6B,cAC3B,OAAO;CAET,IAAM,IAAmB,KAAgB;CAIzC,OAHW,EAAM,OAAc,SAGxB,OAFE,gBAAI,MAAM,cAAc,EAAiB,uCAAuC;AAG3F;;;2ECRA,IAAe;;;ACCf,SAAgB,GAAsB,GAAM;CAC1C,OAAO,EAAqB,aAAa,CAAI;AAC/C;AACsB,EAAuB,aAAa;CAAC;CAAQ;CAAiB;CAAoB;CAAkB;CAAkB;CAAoB;CAAgB;CAAgB;CAAkB;CAAgB;CAAoB;CAAc;CAAa;CAAgB;AAAc,CAAC;;;ACUhT,IAAMA,MAAoB,MAAc;CACtC,IAAM,EACJ,UACA,aACA,eACE,GACE,IAAQ,EACZ,MAAM;EAAC;EAAQ,QAAQC,EAAW,CAAK;EAAK,WAAWA,EAAW,CAAQ;CAAG,EAC/E;CACA,OAAO,EAAe,GAAO,IAAuB,CAAO;AAC7D,GAIM,MAAY,GAAM,MAAS,IAAO,GAAG,EAAK,QAAQ,KAAK,EAAE,EAAE,IAAI,EAAK,KAAK,GACzE,KAAa,EAAO,GAAO;CAC/B,MAAM;CACN,MAAM;CACN,oBAAoB,GAAO,MAAW;EACpC,IAAM,EACJ,kBACE;EACJ,OAAO;GAAC,EAAO;GAAM,EAAO,WAAWA,EAAW,EAAW,QAAQ;GAAM,EAAO,QAAQA,EAAW,EAAW,KAAK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